From 744544d2a654525e100dcfc3110df07468e4d390 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 6 Aug 2021 16:36:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E9=A9=BE?= =?UTF-8?q?=E9=A9=B6tms=E7=95=8C=E9=9D=A2=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E8=AF=BE=E7=A8=8B=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E8=80=83=E8=AF=95=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/lesson3d/lesson3dplayer.js | 35 +- .../lesson3d/manager/controlmanager.js | 13 + src/views/jlmap3d/drive/jl3ddrive.vue | 9 +- .../drive/sceneview/tmscomponent/tmsfault.vue | 285 +++++++++++--- src/views/jlmap3d/drive/sceneview/tmsview.vue | 367 +++++++++++++++++- .../jlmap3d/lesson3dplayer/lesson3dplayer.vue | 84 ++-- .../lesson3dplayer/tools/actiontips.vue | 71 ---- .../lesson3dplayer/tools/explainpane.vue | 4 +- .../lesson3dplayer/tools/resulttips.vue | 119 ++++++ .../lesson3dplayer/tools/stepstips.vue | 4 +- static/jl3d/tms/PMS3.png | Bin 0 -> 3242 bytes static/jl3d/tms/PMsa2.png | Bin 0 -> 4705 bytes 12 files changed, 829 insertions(+), 162 deletions(-) delete mode 100644 src/views/jlmap3d/lesson3dplayer/tools/actiontips.vue create mode 100644 src/views/jlmap3d/lesson3dplayer/tools/resulttips.vue create mode 100644 static/jl3d/tms/PMS3.png create mode 100644 static/jl3d/tms/PMsa2.png diff --git a/src/jlmap3d/lesson3d/lesson3dplayer.js b/src/jlmap3d/lesson3d/lesson3dplayer.js index 4dc2dcc89..1a84b8f0b 100644 --- a/src/jlmap3d/lesson3d/lesson3dplayer.js +++ b/src/jlmap3d/lesson3d/lesson3dplayer.js @@ -35,6 +35,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { //定义当前课程角色 let nowRole = ""; + let oldIndex = 0; //考试课程 let examList = []; let examData = {}; @@ -88,20 +89,34 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { } this.changeIndex = function(nowIndex){ + if(nowIndex!=0){ + oldIndex = lessonIndex; + } + if(lessonData.lessonProgress[oldIndex].roleName == nowRole){ + updateExam(lessonData.lessonProgress[oldIndex],oldIndex); + } + + lessonIndex = nowIndex; + + console.log(nowIndex); scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene; - console.log(nowRole); - console.log(lessonData.lessonProgress[lessonIndex].roleName); + // console.log(nowRole); + // console.log(lessonData.lessonProgress[lessonIndex].roleName); if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ controlManager.initControlMode(lessonIndex); controlManager.initRoleMode(true,nowRole); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]); + }else{ controlManager.initControlMode(lessonIndex); controlManager.initRoleMode(false,nowRole); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,false,assetModelManager.lessonTriggerList[scope.nowSceneType]); } + if(nowIndex == lessonData.lessonProgress.length-1){ + lessonEnd(); + } } this.changeCameraPos = function(pos){ @@ -116,10 +131,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ roleMode = true; } - controlManager.initRoleMode(roleMode); - console.log(assetModelManager); - for(let i=0;i0){ controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,roleMode,assetModelManager.lessonTriggerList[scope.nowSceneType]); @@ -151,6 +163,17 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { // } }; + function updateExam(newIndexData,newIndex){ + for(let i=0;i - + @@ -105,6 +105,9 @@ export default { if (this.mmishow == true) { this.$refs.mmiui.updatespeed(newVal); } + // if(this.tmsshow == true){ + // this.$refs.tmsui.updatespeed(newVal); + // } } } }, @@ -336,10 +339,14 @@ export default { // updateDriveValue(this.trainnum); // } updatedoorlight(newdata); + console.log(newdata.v); + updatetmsstatus(newdata); + if(this.$refs.mmiui){ this.$refs.mmiui.updatetrainstatus(newdata); } + updatabuttonlight(newdata); }, warningmsg(nowmsg){ diff --git a/src/views/jlmap3d/drive/sceneview/tmscomponent/tmsfault.vue b/src/views/jlmap3d/drive/sceneview/tmscomponent/tmsfault.vue index cce1a2b75..e0b79dbb8 100644 --- a/src/views/jlmap3d/drive/sceneview/tmscomponent/tmsfault.vue +++ b/src/views/jlmap3d/drive/sceneview/tmscomponent/tmsfault.vue @@ -1,9 +1,210 @@ @@ -18,10 +219,7 @@ export default { }, data() { return { - voltage:"750V", - current:"0A", - level:"", - speed:"km/h", + } }, mounted() { @@ -48,48 +246,43 @@ export default { diff --git a/src/views/jlmap3d/drive/sceneview/tmsview.vue b/src/views/jlmap3d/drive/sceneview/tmsview.vue index 186f1d9a9..3a028cc20 100644 --- a/src/views/jlmap3d/drive/sceneview/tmsview.vue +++ b/src/views/jlmap3d/drive/sceneview/tmsview.vue @@ -1,7 +1,65 @@