From 26e0347ae8b2e877855fc76b10344b99c94adf71 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Wed, 16 Jun 2021 18:27:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4=E5=A4=A7?= =?UTF-8?q?=E9=93=81=E9=A9=BE=E9=A9=B6=E5=88=B9=E8=BD=A6=E7=9B=98=E6=95=B0?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/baseUrl.js | 4 +-- .../railwaydrive/drivecontrol/centerpane.vue | 34 ++++++++----------- .../railwaydrive/drivecontrol/rightpane.vue | 2 +- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index aa7bf7e1b..11702c286 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,9 +2,9 @@ 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.3.83:9000'; // 旭强 有线 + // BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线 // BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线 // BASE_API = 'http://192.168.3.120:9000'; // 张赛 // BASE_API = 'http://192.168.8.140:9000'; // 杜康 diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue index 75525e72c..04c59130b 100644 --- a/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/centerpane.vue @@ -256,23 +256,19 @@ } }, touchstartbrake:function(e){ - - let domoffset = document.getElementById("directimgbrake").getBoundingClientRect(); // movelimit this.angleoffset.x = domoffset.x; this.angleoffset.y = domoffset.y; - e.preventDefault(); document.getElementById("directimgbrake").onmousemove = this.touchmovebrake; document.getElementById("directimgbrake").onmouseup = this.touchendbrake; - }, touchmovebrake:function(e){//finger move 触发 - // console.log(e); + this.getAnglebrake(e.pageX-this.angleoffset.x ,e.pageY-this.angleoffset.y); }, touchendbrake:function(e){ @@ -281,10 +277,9 @@ }, getAnglebrake:function(mx,my){ //圆心坐标 - // console.log(mx); - // console.log(my); + let px=150; - let py=150; + let py=170; let x = Math.abs(px-mx); let y = Math.abs(py-my); let z = Math.sqrt(Math.pow(x,2)+Math.pow(y,2)); @@ -296,28 +291,27 @@ angle = 180 - angle; } - if(mx==px&&my>py){//鼠标在y轴负方向上 - angle = 180; - } - - if(mx>px&&my==py){//鼠标在x轴正方向上 - angle = 90; - } + // if(mx==px&&my>py){//鼠标在y轴负方向上 + // angle = 180; + // } + // + // if(mx>px&&my==py){//鼠标在x轴正方向上 + // angle = 90; + // } if(mxpy){//鼠标在第三象限 angle = 180+angle; } - - if(mx292 && angle<427){ let stopspeed = 0; if(angle>=397){ diff --git a/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue b/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue index d90bd73d5..b49574677 100644 --- a/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue +++ b/src/views/jlmap3d/railwaydrive/drivecontrol/rightpane.vue @@ -293,7 +293,7 @@ pos:parseInt(this.stalls[this.stallh][this.stalll].type) }; const userInfo = store.state.training.simulationUserList.find(el => el.id == store.state.user.id); - + console.log(userInfo); trainSimulationForce(this.group,userInfo.memberId,param,"Train_Drive_Gear_Change").then(res => { // console.log(res); }).catch((error) => {