home.vue 23 KB

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