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 @@