From 5d01ca21b474d0dd27d427413e68b3a0e4837417 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 24 Sep 2021 16:29:12 +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=B6=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drive/drivecontrol/toprightpane.vue | 25 ++++++++++++++++++- src/views/jlmap3d/drive/sceneview/mmiimage.js | 2 +- src/views/jlmap3d/drive/sceneview/mmiview.vue | 3 --- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue b/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue index 0939821a8..205c7ed73 100644 --- a/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue +++ b/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue @@ -236,6 +236,9 @@ oldDoorSelection:"", doorModePut:true, doorSelectionPut:true, + + atoLightTimer:'', + atoLights:false, } }, watch: { @@ -261,6 +264,7 @@ mounted() { window.updatabuttonlight = this.updatabuttonlight; window.updatedoorlight = this.updatedoorlight; + }, beforeDestroy() { @@ -542,8 +546,11 @@ let data = { groupNumber:this.groupNum, }; + trainSimulationAto(this.group,data).then(netdata => { // console.log(netdata); + // clearInterval(this.atoLightTimer); + // this.atobuttonimg = this.greenimg; }); }, modechange: function (type){ @@ -603,13 +610,29 @@ } if(typeof(data.atoOn) != "undefined"){ // console.log(data.atoOn); - // this.atoOn = data.atoOn; + this.atoOn = data.atoOn; if(data.atoOn){ + clearInterval(this.atoLightTimer); this.atobuttonimg = this.greenlimg; }else{ this.atobuttonimg = this.greenimg; } } + if(data.atoCanOpen){ + + if(data.atoCanOpen == true && this.atoOn != true){ + this.atoLightTimer = setInterval(()=>{ + if(this.atoLights == false){ + this.atoLights = true; + this.atobuttonimg = this.greenlimg; + }else{ + this.atoLights = false; + this.atobuttonimg = this.greenimg; + } + }, 1000); + + } + } if(typeof(data.circuitEB) != "undefined"){ if(data.circuitEB){ diff --git a/src/views/jlmap3d/drive/sceneview/mmiimage.js b/src/views/jlmap3d/drive/sceneview/mmiimage.js index ea9916e1a..e49620467 100644 --- a/src/views/jlmap3d/drive/sceneview/mmiimage.js +++ b/src/views/jlmap3d/drive/sceneview/mmiimage.js @@ -19,7 +19,7 @@ export function mmiimage() { this.m1['am'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-am.png'; this.m1['cm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-cm.png'; this.m1['rm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-rm.png'; - this.m1['sm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/ m1-sm.png'; + this.m1['sm'] = JL3D_LOCAL_STATIC+'/jl3d/mmi/m1-sm.png'; this.m2 = []; diff --git a/src/views/jlmap3d/drive/sceneview/mmiview.vue b/src/views/jlmap3d/drive/sceneview/mmiview.vue index 22e8f59bd..58fb35cbc 100644 --- a/src/views/jlmap3d/drive/sceneview/mmiview.vue +++ b/src/views/jlmap3d/drive/sceneview/mmiview.vue @@ -283,14 +283,11 @@ export default { if(newdata.preselectionMode){ this.updateBfhm(newdata.preselectionMode); } - console.log(newdata); if(newdata.message){ this.jl3dUpdateMmiMsg("",newdata.message); } }, - - updatemmistate(aaa){ },