From a31a6288f749f44ebe04d02dadcc0f1c1fcdf4ef Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Fri, 30 Jul 2021 19:02:10 +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=E9=9D=A2=E6=9D=BF=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jlmap3d/edit/jlmap3dedit.js | 27 +++++++---- src/utils/baseUrl.js | 4 +- src/views/jlmap3d/drive/sceneview/mmiview.vue | 46 ++++++++++--------- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/src/jlmap3d/edit/jlmap3dedit.js b/src/jlmap3d/edit/jlmap3dedit.js index 1359c1fa8..37f4c11c4 100644 --- a/src/jlmap3d/edit/jlmap3dedit.js +++ b/src/jlmap3d/edit/jlmap3dedit.js @@ -310,19 +310,26 @@ export function JLmap3dEdit(dom, data, mapid) { let downStandTrack = scope.mapdata.sectionlist.sections.datalist[changeData.stands[changeData.stands.length-1].section]; console.log(scope.mapdata.sectionlist.sections); - console.log(topStandTrack); - console.log(downStandTrack); + console.log(topStandTrack.mesh.railpoint[0].x); + console.log(topStandTrack.mesh.railpoint[2].x); + console.log(downStandTrack.mesh.railpoint[0].x); + console.log(downStandTrack.mesh.railpoint[2].x); - let rightpos = topStandTrack.rightStopPercent*(topStandTrack.railpoint[2].x -topStandTrack.railpoint[0].x)+topStandTrack.railpoint[0].x; - let leftpos = downStandTrack.leftStopPercent*(downStandTrack.railpoint[2].x -downStandTrack.railpoint[0].x)+downStandTrack.railpoint[0].x; + let rightpos = topStandTrack.leftStopPercent*(topStandTrack.mesh.railpoint[2].x -topStandTrack.mesh.railpoint[0].x)+topStandTrack.mesh.railpoint[0].x; + let leftpos = downStandTrack.rightStopPercent*(downStandTrack.mesh.railpoint[2].x -downStandTrack.mesh.railpoint[0].x)+downStandTrack.mesh.railpoint[0].x; - let rightX = changeData.mesh.position.x-63.2 - rightpos; - let leftX = changeData.mesh.position.x+63.2 - leftpos; - - topStandTrack.mesh.position.x = topStandTrack.mesh.position.x + rightX; + let rightX = changeData.mesh.position.x-63.4 - rightpos; + let leftX = changeData.mesh.position.x+63.4 - leftpos; + console.log("----------------------------"); + console.log(rightpos); + console.log(leftpos); + console.log("----------------------------"); + console.log(rightX); + console.log(leftX); + topStandTrack.mesh.position.x = topStandTrack.mesh.position.z + rightX; downStandTrack.mesh.position.x = downStandTrack.mesh.position.x + leftX; - - // changeStation.position.set(topStandTrack.railpoint[0].x+(topStandTrack.leftStopPointOffset+topStandTrack.rightStopPointOffset)/2,topStandTrack.railpoint[1].y,(topStandTrack.railpoint[1].z+downStandTrack.railpoint[1].z)/2); + // + // // changeStation.position.set(topStandTrack.railpoint[0].x+(topStandTrack.leftStopPointOffset+topStandTrack.rightStopPointOffset)/2,topStandTrack.railpoint[1].y,(topStandTrack.railpoint[1].z+downStandTrack.railpoint[1].z)/2); topStandTrack.mesh.railpoint[0].x = topStandTrack.mesh.railpoint[0].x+rightX; topStandTrack.mesh.railpoint[2].x = topStandTrack.mesh.railpoint[2].x+rightX; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index bc303bcc8..8b75cd8e6 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.2.175:9000'; // 旭强 有线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 - // BASE_API = 'http://192.168.2.183:9000'; // 张赛 + BASE_API = 'http://192.168.2.183:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/jlmap3d/drive/sceneview/mmiview.vue b/src/views/jlmap3d/drive/sceneview/mmiview.vue index 04c0a9128..521a5ac75 100644 --- a/src/views/jlmap3d/drive/sceneview/mmiview.vue +++ b/src/views/jlmap3d/drive/sceneview/mmiview.vue @@ -160,7 +160,7 @@ export default { } }, mounted() { - // window.updatemmic1 = this.updatemmic1; + window.updatemmic1 = this.updatemmic1; this.init(); }, beforeDestroy() { @@ -215,7 +215,7 @@ export default { }, updatetrainstatus(newdata){ - // console.log(newdata); + console.log(newdata); if(typeof(newdata.eb) != "undefined"){ this.updateEbStatus(newdata.eb); @@ -249,7 +249,6 @@ export default { if(newdata.jump){ } - console.log(newdata.parking); if(newdata.parking != undefined){ this.m4parking = newdata.parking; this.updateM4(newdata); @@ -269,7 +268,9 @@ export default { this.tiaotinghold = newdata.hold; this.updateTiaoting(newdata); } - + if(newdata.tow != undefined){ + updatemmic1(newdata.tow); + } this.updatemmidoormode(newdata.leftDoorCanClose,newdata.rightDoorCanClose); }, @@ -313,7 +314,7 @@ export default { } }else{ this.nowspeed = parseInt(speed); - this.updatemmic1(this.nowspeed); + if(this.mmimodel.updatezz){ this.mmimodel.updatezz(speed); } @@ -548,25 +549,28 @@ export default { this.malen = +parseInt(len)/2*10+"px"; } }, - updatemmic1(nowspeed){ - if(this.nowspeed != 0 ){ - this.newc1state = 'duoxing'; - }else{ - this.newc1state = 'none'; + updatemmic1(tow){ + console.log("tow:"+tow); + if(tow == "1"){ + this.c1image = this.images.c1["qianyin"]; } - if(nowspeed>this.oldspeed){ - - this.newc1state = 'qianyin'; - }else if(nowspeed