home.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. <template>
  2. <view class="mybody bgclF8 df fdc">
  3. <TopMenu ref="TopMenu" v-on:onTopSYClick="onTopSYClick" v-on:onTopQXZBClick="onTopQXZBClick"
  4. v-on:onLoginClick="onLoginClick" v-on:onTopXXYSYClick="onTopXXYSYClick"
  5. v-on:onTopMenuIconClick="onTopMenuIconClick" v-on:onClick_return="onClick_return"
  6. v-on:onClick_avatar="onClick_avatar" v-on:onClick_topMenu_sy="onClick_topMenu_sy"
  7. v-on:onClick_exit="onClick_userExit"></TopMenu>
  8. <view class="content homeContent">
  9. <Login ref="Login" v-show="bShow[0]" v-on:onLogin="onLogin"></Login>
  10. <SYJJ ref="SYJJ" v-show="bShow[1]" v-on:onClick_Btn1="onClick_SYJJ_btn1"></SYJJ>
  11. <!-- <XXLC ref="XXLC" v-show="bShow[2]" v-on:onClick_ksxx="onClick_ksxx"></XXLC> -->
  12. <XQDL ref="XQDL" v-show="bShow[2]" v-on:onClick_Btn1="onClick_XQDL_btn1"></XQDL>
  13. <KSXX ref="KSXX" v-show="bShow[3]" v-on:on2thTitleClick="on2thKSXXClick"></KSXX>
  14. <!-- <image v-show="bShow[4]" class="homeBG" mode="aspectFill" src="../assets/home/homeBG.jpg"></image> -->
  15. <SY ref="SY" v-show="bShow[4]" v-on:onClick_menu_btn="onClick_sy_btn" v-on:onTheoryLearnu_btn="onTheoryLearnu_btn" v-on:onStartExperiment_btn="onStartExperiment_btn"></SY>
  16. <QXZB ref="QXZB" v-show="bShow[5]"></QXZB>
  17. <XXYSY ref="XXYSY" v-show="bShow[6]" v-on:onClick_KSRZ="onClick_KSRZ" v-on:onClick_KSKC="onClick_KSKC"
  18. v-on:onShowWebview720="onShowWebview720"></XXYSY>
  19. <YLRZ ref="YLRZ" v-show="bShow[7]"></YLRZ>
  20. <SYJJ2 ref="SYJJ2" v-show="bShow[8]"></SYJJ2>
  21. <simulation ref="simulation" v-show="bShow[9]"></simulation>
  22. <simulationLibrary ref="simulationLibrary" v-show="bShow[10]"></simulationLibrary>
  23. <simulationcore ref="simulationcore" v-show="bShow[11]" v-on:goToTeachCreation="goToTeachCreation"
  24. v-on:goToStudentPlatform="goToStudentPlatform"></simulationcore>
  25. <simulationBase ref="simulationBase" v-show="bShow[12]"></simulationBase>
  26. <teacherCreation ref="teacherCreation" v-show="bShow[13]"></teacherCreation>
  27. <User ref="User" v-show="bShow[14]" v-on:onClick_proManage="onClick_proManage"></User>
  28. <XXGY ref="XXGY" v-show="bShow[15]"></XXGY>
  29. <SYBZ ref="SYBZ" v-show="bShow[16]" v-on:onClick_ksxx="onClick_ksxx"></SYBZ>
  30. <SYYDSP ref="SYYDSP" v-show="bShow[17]"></SYYDSP>
  31. <student ref="student" v-show="bShow[18]"></student>
  32. <vstudentPlatform ref="vstudentPlatform" v-show="bShow[19]"></vstudentPlatform>
  33. <survey ref="survey" v-show="bShow[20]"></survey>
  34. <SJKC ref="SJKC" v-show="bShow[21]"></SJKC>
  35. <XXZLXZ ref="XXZLXZ" v-show="bShow[22]"></XXZLXZ>
  36. </view>
  37. <!-- 左侧导航栏永远保持在最上层 -->
  38. <LeftMenu ref="LeftMenu" v-on:onLeftMenuClick="onLeftMenuClick"></LeftMenu>
  39. <webview720 ref="webview720"></webview720>
  40. <shutDownWebview ref="shutDownWebview" v-on:onHideWebview="onHideWebview" v-on:onClick_KSKC="onClick_KSKC"></shutDownWebview>
  41. <!-- 联系方式 -->
  42. <view class='contact'>
  43. <!-- 弹出框 -->
  44. <view class='contactPopView'>
  45. <view class='qrcode' v-show="bShowQrCode">
  46. <!-- <img class="contactPopViewBg" src="../assets/contact/bubble_01.png"></img> -->
  47. <img class="contactPopViewContent" src="../assets/contact/QRCode.png"></img>
  48. </view>
  49. <view class='mail' v-show="bShowMail">
  50. <img class="contactPopViewBg" src="../assets/contact/bubble_02.png"></img>
  51. <text selectable="true" class="contactPopViewContent" src="../assets/contact/QRCode.png">2812319400@qq.com</text>
  52. </view>
  53. <view class='tel' v-show="bShowTel">
  54. <img class="contactPopViewBg" src="../assets/contact/bubble_02.png"></img>
  55. <text selectable="true" class="contactPopViewContent" src="../assets/contact/QRCode.png">15017534446</text>
  56. </view>
  57. </view>
  58. <!-- 背景 -->
  59. <view class='contactBg'></view>
  60. <!-- icon -->
  61. <view class="imageBg">
  62. <img src="../assets/contact/qrcode_icon.png" @mousemove="showContact(0)" @mouseout="showContact(4)"></img>
  63. <img src="../assets/contact/mail_icon.png" @mousemove="showContact(1)" @mouseout="showContact(4)"></img>
  64. <img src="../assets/contact/tel_icon.png" @mousemove="showContact(2)" @mouseout="showContact(4)"></img>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. import SY from '../components/home/sy.vue'
  71. import LeftMenu from '../components/leftMenu.vue'
  72. import TopMenu from '../components/topMenu.vue'
  73. import Login from '../components/login/login.vue'
  74. import simulation from "../components/home/simulation.vue"
  75. import simulationLibrary from "../components/home/simulationLibrary.vue"
  76. import simulationcore from "../components/home/simulationCore.vue"
  77. import simulationBase from "../components/home/simulationBase.vue"
  78. import teacherCreation from "../components/home/teacherCreation.vue"
  79. import vstudentPlatform from "../components/student/Index.vue"
  80. import student from "../components/student/commoand.vue"
  81. import survey from "../components/student/survey.vue"
  82. //一级页面
  83. import KSXX from '../components/startLearning/startLearning.vue' //开始学习
  84. import SYJJ from '../components/introductionToTheExperiment/introductionToTheExperiment.vue' //实验简介
  85. // import XXLC from '../components/learningProcess/learningProcess.vue' //学习流程
  86. //二级页面
  87. //开始学习
  88. import QXZB from '../components/startLearning/preludePreparation/preludePreparation.vue' //前序准备
  89. import XXYSY from '../components/startLearning/learningAndExperiment/learningAndExperiment.vue' //学习与实验
  90. import YLRZ from '../components/startLearning/learningAndExperiment/ksxx_xxysy_ylrz/ksxx_xxysy_ylrz.vue' //原理认知
  91. //实验简介的详情页
  92. import SYJJ2 from '../components/introductionToTheExperiment/syjj_second.vue' //实验简介的详情页
  93. import User from '../components/user/user.vue' //用户信息等
  94. import XQDL from '../components/learningProcess/xqdl.vue' //学前导览
  95. import XXGY from '../components/learningProcess/xxgy.vue' //学习概要
  96. import SYBZ from '../components/learningProcess/learningProcess.vue' //实验步骤
  97. import SYYDSP from '../components/learningProcess/syydsp.vue' //实验引导视频
  98. import XXZLXZ from '../components/learningProcess/xxzlxz.vue' //学习资料下载
  99. import SJKC from '../components/startLearning/learningAndExperiment/ksxx_xxysy_sjkc/ksxx_xxysy_sjkc.vue' //实景勘察
  100. import shutDownWebview from '../components/home/shutDownWebview.vue' //实景勘察720
  101. import webview720 from '../components/home/webview720.vue' //实景勘察720
  102. export default {
  103. components: {
  104. LeftMenu,
  105. TopMenu,
  106. Login,
  107. SYJJ,
  108. XQDL,
  109. KSXX,
  110. QXZB,
  111. XXYSY,
  112. YLRZ,
  113. SYJJ2,
  114. simulation,
  115. simulationLibrary,
  116. simulationcore,
  117. simulationBase,
  118. teacherCreation,
  119. User,
  120. XXGY,
  121. SYBZ,
  122. SYYDSP,
  123. SY,
  124. student,
  125. vstudentPlatform,
  126. survey,
  127. SJKC,
  128. XXZLXZ,
  129. shutDownWebview,
  130. webview720
  131. },
  132. data() {
  133. return {
  134. curShowPage: 4,
  135. //这里记录当前需要显示哪个页面。每新添加一个页面,都需要在这里注册。
  136. bShow: [
  137. false, //0登录
  138. false, //1实验简介一级页面
  139. false, //2学习流程一级页面----改为学前导览
  140. false, //3开始学习一级页面
  141. true, //4首页
  142. false, //5开始学习-前序准备
  143. false, //6开始学习-学习与实验
  144. false, //7开始学习-学习与实验-原理认知
  145. false, //8实验简介的详情页
  146. false, //9虚拟仿真1号摄影棚
  147. false, //10虚拟仿真资产库
  148. false, //11虚拟影视项目开发管理中心
  149. false, //12虚拟仿真真题拍摄基地
  150. false, //13老师创作管理平台
  151. false, //14用户(个人信息等)
  152. false, //15学习概要
  153. false, //16实验步骤
  154. false, //17实验引导视频
  155. false, //18 学生信息
  156. false, //19 学生创作项目管理平台
  157. false, //20开始勘测
  158. false, //21实景勘察
  159. false, //22学习资料下载
  160. ],
  161. checkedIndex_SYJJ: 0, //实F验简介选中标题索引值
  162. bShowQrCode:false,
  163. bShowMail:false,
  164. bShowTel:false,
  165. }
  166. },
  167. onLoad() {
  168. let account = localStorage.getItem("account");
  169. let password = localStorage.getItem("password");
  170. if (account != null && password != null) {
  171. let url = mydata_api + "/user/loginin";
  172. uni.request({
  173. header: {
  174. 'Content-Type': 'application/json;charset=UTF-8'
  175. },
  176. url: url,
  177. method: 'POST',
  178. data: {
  179. "IlabAccount": account,
  180. "Password": password
  181. },
  182. dataType: 'json',
  183. success: (res) => {
  184. let data = res.data;
  185. //登录成功
  186. if (data.Code == 100) {
  187. // console.log("登陆成功");
  188. if (data.Image != '') {
  189. mydata_userInfo.avatarSrc = data.Image;
  190. }
  191. console.log("home登陆成功data=", data);
  192. mydata_userInfo.Name = data.Name;
  193. mydata_userInfo.UserID = data.UserID;
  194. mydata_userInfo.Position = data.Position;
  195. mydata_userInfo.role = data.Type;
  196. if (mydata_userInfo.role == '老师') {
  197. userController.updateStudentList(null, null);
  198. }
  199. else{
  200. mydata_userInfo.role = '学生';
  201. }
  202. userController.updateUserInfo();
  203. userController.updateScore();
  204. // MyRequest.SetUserType(mydata_userInfo.role,null,null);
  205. getApp().globalData.bLogin = true;
  206. this.onLogin();
  207. }
  208. },
  209. fail: (res) => {
  210. console.log("fail+**+*", res)
  211. }
  212. });
  213. }
  214. },
  215. methods: {
  216. onTopSYClick(index) {
  217. if (!getApp().globalData.bLogin) {
  218. alert('请先登录')
  219. return
  220. };
  221. // console.log("点击了首页标题", index, myData_QXZB_SYQY.length);
  222. let pageIndex = -1;
  223. switch (index) {
  224. case 0: //实验简介
  225. pageIndex = 1;
  226. // this.$refs.SYJJ.initData();
  227. break;
  228. case 1: //学习流程
  229. pageIndex = 2;
  230. // this.$refs.XXLC.initData();
  231. break;
  232. case 2: //开始学习
  233. pageIndex = 3;
  234. this.$refs.KSXX.initData();
  235. break;
  236. default:
  237. console.log("选中状态为home:", state);
  238. }
  239. this.showPage(pageIndex);
  240. },
  241. onLogin: function() {
  242. // console.log("登陆成功home");
  243. this.$refs.TopMenu.switchLoginState(true);
  244. this.showPage(4);
  245. },
  246. showPage(index) {
  247. this.curShowPage = index;
  248. for (let i = 0; i < this.bShow.length; i++) {
  249. if (i == index) {
  250. this.bShow[i] = true;
  251. } else {
  252. this.bShow[i] = false;
  253. }
  254. }
  255. // console.log("显示页面", index, this.bShow, this.bShow.length);
  256. this.$forceUpdate();
  257. },
  258. //2级开始学习标题点击事件
  259. on2thKSXXClick(data) {
  260. // console.log("2级点击", data);
  261. let lineIndex = data.indexOf("-");
  262. let type = data.substr(0, lineIndex)
  263. let index = data.substr(lineIndex + 1, data.length - 1)
  264. // console.log("2级点击home---", type, index);
  265. //前序准备
  266. if (type == "QXZB") {
  267. this.showPage(5)
  268. this.$refs.TopMenu.switchMiddleState(topMenuS.QXZB, index);
  269. this.$refs.QXZB.onTopQXZBClick(index);
  270. }
  271. //学习与实验
  272. else if (type == "XXYSY") {
  273. this.showPage(6)
  274. this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY, index);
  275. this.$refs.XXYSY.onTopXXYSYClick(index);
  276. } else {
  277. console.log("2级点击---", lineIndex, type, index);
  278. }
  279. },
  280. //顶部前序准备小标题点击事件
  281. onTopQXZBClick(index) {
  282. // console.log("顶部点击home",index);
  283. this.$refs.QXZB.onTopQXZBClick(index);
  284. },
  285. //顶部学习与实验小标题点击事件
  286. onTopXXYSYClick(index) {
  287. // console.log("顶部点击home",index);
  288. this.$refs.XXYSY.onTopXXYSYClick(index);
  289. },
  290. //左侧导航点击事件
  291. onLeftMenuClick(indexArr) {
  292. let targetPage = -1;
  293. let topMiddleState = '';
  294. let target2thIndex = indexArr[1];
  295. switch (indexArr[0]) {
  296. case 0: //首页
  297. if (indexArr[1] == 0) {
  298. targetPage = 9;
  299. topMiddleState = topMenuS.home1;
  300. } else if (indexArr[1] == 1) {
  301. targetPage = 10;
  302. topMiddleState = topMenuS.home2;
  303. } else if (indexArr[1] == 2) {
  304. targetPage = 11;
  305. topMiddleState = topMenuS.home3;
  306. } else if (indexArr[1] == 3) {
  307. targetPage = 12;
  308. topMiddleState = topMenuS.home4;
  309. } else if (indexArr[1] == 4) {
  310. targetPage = 13;
  311. topMiddleState = topMenuS.home5;
  312. } else {
  313. targetPage = 4;
  314. topMiddleState = topMenuS.SY;
  315. }
  316. break;
  317. case 1: //实验简介
  318. if (indexArr[1] == 1) {
  319. //点击快速进入实验后跳转到原理认知页
  320. targetPage = 6;
  321. topMiddleState = topMenuS.XXYSY;
  322. this.$refs.XXYSY.onTopXXYSYClick(0);
  323. target2thIndex = 0;
  324. } else {
  325. targetPage = 8;
  326. topMiddleState = topMenuS.SYJJ;
  327. this.$refs.SYJJ2.showPage(indexArr[1]);
  328. this.$refs.TopMenu.switchState_syjj(indexArr[1]);
  329. }
  330. break;
  331. case 2: //学习流程
  332. switch (indexArr[1]) {
  333. case 0: //学习概要
  334. targetPage = indexArr[1] + 15;
  335. topMiddleState = topMenuS.XXGY;
  336. break;
  337. case 1: //实验步骤
  338. targetPage = indexArr[1] + 15;
  339. topMiddleState = topMenuS.SYBZ;
  340. break;
  341. case 2: //实验引导视频
  342. targetPage = indexArr[1] + 15;
  343. topMiddleState = topMenuS.SYYDSP;
  344. break;
  345. case 3: //学习资料下载
  346. targetPage = 22;
  347. topMiddleState = topMenuS.XXZLXZ;
  348. break;
  349. default:
  350. }
  351. break;
  352. case 3: //开始学习
  353. targetPage = 6;
  354. topMiddleState = topMenuS.XXYSY;
  355. this.$refs.XXYSY.checkedIndex_topTitle = indexArr[1];
  356. break;
  357. case 4:
  358. targetPage = 18;
  359. topMiddleState = topMenuS.info;
  360. break;
  361. case 5:
  362. targetPage = 19;
  363. topMiddleState = topMenuS.info;
  364. break;
  365. case 6:
  366. targetPage = 20;
  367. topMiddleState = '开始勘测'
  368. break;
  369. default:
  370. console.log("展示页面home:", this.curShowPage);
  371. }
  372. this.showPage(targetPage);
  373. this.$refs.TopMenu.switchMiddleState(topMiddleState, target2thIndex);
  374. // console.log("左侧导航点击home", indexArr);
  375. this.$forceUpdate();
  376. },
  377. goToTeachCreation() {
  378. this.showPage(13);
  379. },
  380. goToStudentPlatform() {
  381. this.showPage(19);
  382. this.$refs.vstudentPlatform.updateInfo();
  383. },
  384. //顶部导航左上角icon点击事件
  385. onTopMenuIconClick() {
  386. if (!getApp().globalData.bLogin) {
  387. alert('请先登录')
  388. return
  389. };
  390. let indexArr = [];
  391. switch (this.curShowPage) {
  392. case 0: //登录
  393. indexArr = [-1, -1];
  394. break;
  395. case 1: //实验简介1级
  396. indexArr = [1, -1];
  397. break;
  398. case 2: //学习流程1级
  399. indexArr = [2, -1];
  400. break;
  401. case 3: //开始学习1级
  402. indexArr = [3, -1];
  403. break;
  404. case 4: //首页
  405. indexArr = [0, -1];
  406. break;
  407. case 5: //开始学习-前序准备
  408. indexArr = [3, 0];
  409. break;
  410. case 6: //开始学习-学习与实验
  411. indexArr = [3, 1];
  412. break;
  413. case 7: //开始学习-学习与实验-原理认知
  414. indexArr = [3, 1];
  415. break;
  416. case 8: //实验简介2级
  417. indexArr = [1, this.checkedIndex_SYJJ];
  418. break;
  419. default:
  420. console.log("展示页面home:", this.curShowPage);
  421. }
  422. this.$refs.LeftMenu.show(indexArr);
  423. },
  424. //开始学习-学习与实验-开始认知按钮
  425. onClick_KSRZ() {
  426. this.showPage(7);
  427. this.$refs.TopMenu.switchMiddleState(topMenuS.YLRZ, -1);
  428. },
  429. //开始学习-实景勘察-开始勘察按钮
  430. onClick_KSKC() {
  431. this.showPage(21);
  432. this.$refs.TopMenu.switchMiddleState(topMenuS.SJKC, -1);
  433. },
  434. onClick_return(type) {
  435. //从首页建筑页返回到首页
  436. if (type == 9 || type == 10 || type == 11 || type == 12) {
  437. this.showPage(4);
  438. this.$refs.SY.initData();
  439. }
  440. //学前导览三级级返回到学前导览
  441. else if (type == 5 || type == 6 || type == 7 || type == 8) {
  442. this.showPage(2);
  443. } else {
  444. switch (type) {
  445. case 1: //前序准备-返回上一层:返回到开始学习-前序准备的展开页 type-1
  446. this.showPage(3);
  447. this.$refs.KSXX.switchSecondTitle(0);
  448. break;
  449. case 2: //学习与实验-返回上一层:返回到开始学习-学习与实验的展开页 type-2
  450. this.showPage(3);
  451. this.$refs.KSXX.switchSecondTitle(1);
  452. break;
  453. case 3: //原理认知-返回上一层:返回到开始学习-学习与实验-原理认知页 type-3
  454. this.showPage(6);
  455. this.$refs.XXYSY.checkedIndex_topTitle = 0;
  456. break;
  457. case 4: //实验简介-返回上一层:返回到实验简介的展开页 type-4
  458. this.showPage(1);
  459. break;
  460. case 14: //开始勘察-返回上一层:返回到开始学习-实景勘察页
  461. this.showPage(6);
  462. this.$refs.XXYSY.checkedIndex_topTitle = 1;
  463. break;
  464. default:
  465. console.log("返回上一层", type);
  466. }
  467. }
  468. },
  469. //实验简介按钮点击
  470. onClick_SYJJ_btn1(index) {
  471. if (index == 1) { //点击快速进入实验后跳转到原理认知页
  472. this.showPage(6)
  473. this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY, 0);
  474. this.$refs.XXYSY.onTopXXYSYClick(0);
  475. } else {
  476. this.showPage(8);
  477. this.checkedIndex_SYJJ = index;
  478. this.$refs.SYJJ2.showPage(index);
  479. this.$refs.TopMenu.switchMiddleState(topMenuS.SYJJ, -1);
  480. this.$refs.TopMenu.switchState_syjj(index);
  481. this.$forceUpdate();
  482. }
  483. },
  484. onClick_ksxx() {
  485. this.showPage(3);
  486. this.$refs.KSXX.initData();
  487. this.$refs.TopMenu.switchMiddleState(topMenuS.SY, 2);
  488. },
  489. //顶部导航栏-头像点击事件
  490. onClick_avatar() {
  491. this.showPage(14);
  492. this.$refs.User.initData();
  493. },
  494. //学前导览
  495. onClick_XQDL_btn1(index) {
  496. let targetPage = 0;
  497. switch (index) {
  498. case 0: //学习概要
  499. this.$refs.TopMenu.switchMiddleState(topMenuS.XXGY, -1);
  500. targetPage = index + 15;
  501. break;
  502. case 1: //实验步骤
  503. this.$refs.TopMenu.switchMiddleState(topMenuS.SYBZ, -1);
  504. targetPage = index + 15;
  505. break;
  506. case 2: //实验引导视频
  507. this.$refs.TopMenu.switchMiddleState(topMenuS.SYYDSP, -1);
  508. targetPage = index + 15;
  509. break;
  510. case 3: //学习资料下载
  511. this.$refs.TopMenu.switchMiddleState(topMenuS.XXZLXZ, -1);
  512. targetPage = 22;
  513. break;
  514. default:
  515. console.log("onClick_XQDL_btn1", type);
  516. }
  517. this.showPage(targetPage);
  518. },
  519. //顶部导航点击"影视现场实时特效虚拟仿真实验"
  520. onClick_topMenu_sy() {
  521. this.showPage(4);
  522. this.$refs.SY.initData();
  523. },
  524. //首页建筑按钮点击事件
  525. onClick_sy_btn(index) {
  526. let targetPage = -1;
  527. let topMiddleState = '';
  528. switch (index) {
  529. case 0: //资产库
  530. targetPage = 10;
  531. topMiddleState = topMenuS.home2;
  532. this.$refs.simulationLibrary.init();
  533. break;
  534. case 1: //摄影棚
  535. targetPage = 9;
  536. topMiddleState = topMenuS.home1;
  537. break;
  538. case 2: //管理中心
  539. targetPage = 11;
  540. topMiddleState = topMenuS.home3;
  541. this.$refs.simulationcore.init();
  542. break;
  543. case 3: //拍摄基地
  544. targetPage = 12;
  545. topMiddleState = topMenuS.home4;
  546. break;
  547. default:
  548. console.log("展示页面home:", this.curShowPage);
  549. }
  550. this.showPage(targetPage);
  551. this.$refs.TopMenu.switchMiddleState(topMiddleState, index);
  552. this.$forceUpdate();
  553. },
  554. //项目管理平台
  555. onClick_proManage() {
  556. let targetPage = -1;
  557. let topMiddleState = '';
  558. if (mydata_userInfo.role == '老师') {
  559. targetPage = 13;
  560. } else {
  561. targetPage = 19;
  562. this.$refs.vstudentPlatform.updateInfo();
  563. }
  564. topMiddleState = topMenuS.SY;
  565. this.showPage(targetPage);
  566. this.$refs.TopMenu.switchMiddleState(topMiddleState, -1);
  567. this.$forceUpdate();
  568. },
  569. //用户退出
  570. onClick_userExit() {
  571. this.showPage(4);
  572. this.$refs.TopMenu.switchMiddleState(topMenuS.SY, -1);
  573. },
  574. onLoginClick() {
  575. this.showPage(0);
  576. this.$refs.Login.initData();
  577. this.$refs.TopMenu.switchMiddleState(topMenuS.SY, -1);
  578. },
  579. onHideWebview() {
  580. this.$refs.TopMenu.hideTopMenu(true);
  581. this.$refs.webview720.onClickShutWebview();
  582. },
  583. onShowWebview720() {
  584. this.$refs.TopMenu.hideTopMenu(false);
  585. this.$refs.shutDownWebview.onClickShow();
  586. this.$refs.webview720.onClickShow();
  587. },
  588. showContact(idx){
  589. // console.log('idx=',idx)
  590. if(0==idx)
  591. {
  592. this.bShowQrCode = true;
  593. this.bShowMail = false;
  594. this.bShowTel = false;
  595. }
  596. else if(1==idx)
  597. {
  598. this.bShowQrCode = false;
  599. this.bShowMail = true;
  600. this.bShowTel = false;
  601. }
  602. else if(2==idx)
  603. {
  604. this.bShowQrCode = false;
  605. this.bShowMail = false;
  606. this.bShowTel = true;
  607. }
  608. else{
  609. this.bShowQrCode = false;
  610. this.bShowMail = false;
  611. this.bShowTel = false;
  612. }
  613. },
  614. onTheoryLearnu_btn(){
  615. this.showPage(6);
  616. this.$refs.XXYSY.checkedIndex_topTitle = 0;
  617. },
  618. onStartExperiment_btn(){
  619. this.showPage(6)
  620. this.$refs.TopMenu.switchMiddleState(topMenuS.XXYSY, 3);
  621. this.$refs.XXYSY.onTopXXYSYClick(3);
  622. }
  623. }
  624. }
  625. </script>
  626. <style lang="scss">
  627. .homeBG {
  628. width: 100%;
  629. height: 100%;
  630. }
  631. .homeContent {
  632. margin-top: px2vw(120);
  633. }
  634. //联系方式
  635. .contact{
  636. width: 20%;
  637. height: 30%;
  638. position: fixed;
  639. bottom: 1%;
  640. right: 1%;
  641. // border: 1px solid #ff0000;
  642. }
  643. //联系方式图标
  644. .contactBg{
  645. width: 15%;
  646. height: 60%;
  647. position: absolute;
  648. right: 0;
  649. bottom: 0;
  650. background-color: #000000;
  651. opacity: 0.5;
  652. }
  653. .imageBg{
  654. width: 15%;
  655. height: 60%;
  656. position: absolute;
  657. right: 0;
  658. bottom: 0;
  659. display: flex;
  660. justify-content: space-around;
  661. align-items:center;
  662. flex-direction:column;
  663. }
  664. .contact img{
  665. width: 50%;
  666. // border: 5px solid #0000ff;
  667. }
  668. // 联系方式弹出框
  669. .contactPopView {
  670. width: 85%;
  671. height: 100%;
  672. // border: 5px solid #0000ff;
  673. }
  674. .qrcode{
  675. position: absolute;
  676. width: 100%;
  677. height: 100%;
  678. // border: 5px solid #00aa00;
  679. display: flex;
  680. justify-content: center;
  681. align-items:center;
  682. }
  683. .mail{
  684. position: absolute;
  685. width: 100%;
  686. height: 100%;
  687. display: flex;
  688. justify-content: center;
  689. align-items:center;
  690. }
  691. .tel{
  692. position: absolute;
  693. width: 100%;
  694. height: 100%;
  695. display: flex;
  696. justify-content: center;
  697. align-items:center;
  698. }
  699. .contactPopViewBg{
  700. position: absolute;
  701. width: 100%;
  702. // border: 5px solid #00aa00;
  703. }
  704. .contactPopViewContent{
  705. position: absolute;
  706. width: 100%;
  707. font-size: px2vw(12);
  708. display: flex;
  709. justify-content: center;
  710. align-items:center;
  711. // border: 5px solid #00aa00;
  712. }
  713. </style>