diff --git a/.env.development b/.env.development index 535c20d5e..c0924475f 100644 --- a/.env.development +++ b/.env.development @@ -6,7 +6,7 @@ NODE_ENV = 'development' # VUE_APP_BASE_API = 'https://joylink.club/jlcloud' # VUE_APP_BASE_API = 'http://192.168.3.4:9000' VUE_APP_BASE_API = 'http://192.168.3.6:9000' -VUE_APP_VOICE_API = 'https://test.joylink.club' +VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud' # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable, # to control whether the babel-plugin-dynamic-import-node plugin is enabled. diff --git a/.env.native b/.env.native index af5c4a6d3..09eb3fd7c 100644 --- a/.env.native +++ b/.env.native @@ -4,4 +4,4 @@ VUE_APP_PRO = 'local' # base api VUE_APP_BASE_API = 'https://joylink.club/jlcloud' -VUE_APP_VOICE_API = 'https://joylink.club' +VUE_APP_VOICE_API = 'https://joylink.club/jlcloud' diff --git a/.env.production b/.env.production index 684381f92..68c9d7458 100644 --- a/.env.production +++ b/.env.production @@ -3,4 +3,4 @@ NODE_ENV = 'production' # base api VUE_APP_BASE_API = 'https://joylink.club/jlcloud' -VUE_APP_VOICE_API = 'https://joylink.club' +VUE_APP_VOICE_API = 'https://joylink.club/jlcloud' diff --git a/.env.staging b/.env.staging index 41dbe65d7..2e62c739e 100644 --- a/.env.staging +++ b/.env.staging @@ -3,4 +3,4 @@ NODE_ENV = 'production' # base api VUE_APP_BASE_API = 'https://test.joylink.club/jlcloud' -VUE_APP_VOICE_API = 'https://test.joylink.club' +VUE_APP_VOICE_API = 'https://test.joylink.club/jlcloud' diff --git a/src/jlmap3d/jl3ddrive/drivecontrol/simulation.js b/src/jlmap3d/jl3ddrive/drivecontrol/simulation.js index 9be9c30b9..cd85e049c 100644 --- a/src/jlmap3d/jl3ddrive/drivecontrol/simulation.js +++ b/src/jlmap3d/jl3ddrive/drivecontrol/simulation.js @@ -76,6 +76,7 @@ export function bindSimulationTrain(group,groupNumber) { params: '' }) } +//EB紧急制动 export function trainSimulationEb(group,groupNumber) { return request({ url: `/simulation/driving/${group}/train/${groupNumber}/eb`, @@ -83,6 +84,8 @@ export function trainSimulationEb(group,groupNumber) { params: '' }) } + +//改变列车牵引/制动力 export function trainSimulationForce(group,groupNumber,percent) { return request({ url: `/simulation/driving/${group}/train/${groupNumber}/force/${percent}`, @@ -90,6 +93,8 @@ export function trainSimulationForce(group,groupNumber,percent) { params: '' }) } + +//改变列车档位 export function trainSimulationGear(group,groupNumber,gear) { return request({ url: `/simulation/driving/${group}/train/${groupNumber}/gear/${gear}`, @@ -97,3 +102,30 @@ export function trainSimulationGear(group,groupNumber,gear) { params: '' }) } + +//改变列车运行级别 +export function trainSimulationDriveMode(group,groupNumber,driveMode) { + return request({ + url: `/simulation/driving/${group}/train/${groupNumber}/driveMode/${driveMode}`, + method: 'put', + params: '' + }) +} +//ATP切除 +//ATO +export function trainSimulationAtp(group,groupNumber) { + return request({ + url: `/simulation/driving/${group}/train/${groupNumber}/atp`, + method: 'put', + params: '' + }) +} + +//ATO +export function trainSimulationAto(group,groupNumber) { + return request({ + url: `/simulation/driving/${group}/train/${groupNumber}/openAto`, + method: 'put', + params: '' + }) +} diff --git a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js index 132d67030..e73ceb6c6 100644 --- a/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js +++ b/src/jlmap3d/jl3ddrive/moveupdate/DrivingConnectNew.js @@ -94,6 +94,7 @@ export function Jl3dDrivingNew(mixers,updatemmi,sound,translation,routegroup,sta // 对象化数据 let data = JSON.parse(Response.body); + // 遍历后台数据 // console.log(data); if(data.type == "Train_Position"){ diff --git a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js index ac0db1ba6..63e3acf7b 100644 --- a/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js +++ b/src/jlmap3d/jl3dpassflow/connect/passflowconnect.js @@ -3,14 +3,14 @@ import { getBaseUrl } from '@/utils/baseUrl' import { getToken } from '@/utils/auth'; // 定于仿真socket接口 -export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup) { +export function PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup) { const scope = this; this.controlstation = nowstation; this.teststomp = new StompClient(); - let trainleftnow = null; - let trainrightnow = null; + let traintopnow = null; + let traindownnow = null; let topic = '/user/queue/simulation/jl3d/'+routegroup; let header = {'X-Token': getToken() }; @@ -37,19 +37,7 @@ export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,rou if(data.body.type == "PSD"){ if(data.body.code == nowstation.toppsd){ if(data.body.open == 0){ - deviceaction.down.action.reset(); - deviceaction.down.action.time = deviceaction.down.action._clip.duration; - deviceaction.down.action.timeScale = -1; - deviceaction.down.action.play(); - }else{ - deviceaction.down.action.reset(); - deviceaction.down.action.time = 0; - deviceaction.down.action.timeScale = 1; - deviceaction.down.action.play(); - } - } - if(data.body.code == nowstation.downpsd){ - if(data.body.open == 0){ + deviceaction.top.action.reset(); deviceaction.top.action.time =deviceaction.top.action._clip.duration; deviceaction.top.action.timeScale = -1; @@ -61,25 +49,133 @@ export function PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,rou deviceaction.top.action.play(); } } + if(data.body.code == nowstation.downpsd){ + if(data.body.open == 0){ + deviceaction.down.action.reset(); + deviceaction.down.action.time = deviceaction.down.action._clip.duration; + deviceaction.down.action.timeScale = -1; + deviceaction.down.action.play(); + }else{ + deviceaction.down.action.reset(); + deviceaction.down.action.time = 0; + deviceaction.down.action.timeScale = 1; + deviceaction.down.action.play(); + } + + } } if(data.body.type == "TRAIN_DOOR"){ + if(traintopnow == data.body.code){ + if(data.body.open == "0"){ + closetraindoor(toptrain,data.body.doorCode,"top"); + + }else{ + opentraindoor(toptrain,data.body.doorCode,"top"); + } + } + if(traindownnow == data.body.code){ + // console.log(data.body); + if(data.body.open == "0"){ + closetraindoor(downtrain,data.body.doorCode,"down"); + + }else{ + opentraindoor(downtrain,data.body.doorCode,"down"); + } + } } } if(data.type == "TrainRun_3D"){ - console.log(data.body); - console.log(nowstation); + for(let i=0,leni = data.body.length;i=0;an--){ + actions[an].reset(); + actions[an].time = 0; + actions[an].timeScale = 1; + actions[an].play(); + } + } + function closetraindoor(train,doorcode,direct){ + if(direct == "top"){ + if(doorcode == "1"){ + actions = train.action.down; + } + + if(doorcode == "2"){ + actions = train.action.top; + } + }else{ + if(doorcode == "1"){ + actions = train.action.top; + } + + if(doorcode == "2"){ + actions = train.action.down; + } + } + + for(let an=actions.length-1;an>=0;an--){ + actions[an].reset(); + actions[an].time = actions[an]._clip.duration; + actions[an].timeScale = -1; + actions[an].play(); + } + + } } diff --git a/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js b/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js index 97e6cc9d4..17f8b76ba 100644 --- a/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js +++ b/src/jlmap3d/jl3dpassflow/jl3dpassflownew.js @@ -41,8 +41,8 @@ let originhuman1 = null; let originhuman2 = null; let originanima1 = null; let originanima2 = null; -let lefttrain = null; -let righttrain = null; +let toptrain = null; +let downtrain = null; let zhajiin = []; let zhajiout = []; @@ -395,9 +395,9 @@ export function Jl3dpassflow(dom,skinCode,routegroup) { getPublishMapDetail(skinCode).then(netdata => { - console.log(netdata); + // console.log(netdata); initstationlist(netdata.data.stationList,netdata.data.stationStandList,netdata.data.psdList); - socktest = new PassflowConnect(nowstation,deviceaction,lefttrain,righttrain,routegroup); + socktest = new PassflowConnect(nowstation,deviceaction,toptrain,downtrain,routegroup); }); animate(); @@ -815,7 +815,7 @@ export function Jl3dpassflow(dom,skinCode,routegroup) { // console.log(humanlist.children.length); } function initstationlist(stationdata,standdata,psddata){ - + // console.log(standdata); let list = []; for(let i=0,leni = standdata.length;ilist[k][1].position.y){ + if(list[k][0].position.y85&&this.moveheight<76){ - this.movex=73+"px"; + if(this.moveheight<82&&this.moveheight>73){ + this.movex=75+"px"; this.move = 0; }else if(this.moveheight<0&&this.moveheight>159){ }else{ - if(this.moveheight>=85){ - this.move = -(this.moveheight-85)/65; + if(this.moveheight>=82){ + this.move = -(this.moveheight-82)/65; } - if(this.moveheight<=75){ - this.move = (75 - this.moveheight)/75; + if(this.moveheight<=73){ + this.move = (73 - this.moveheight)/75; } this.movex=this.moveheight-7+"px"; if(this.moveheight>=145){ diff --git a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue index a449f2fd4..1a6c7f223 100644 --- a/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue +++ b/src/views/jlmap3d/drive/drivecontrol/drivecontrol.vue @@ -20,7 +20,7 @@ - + @@ -118,9 +118,12 @@ import axios from 'axios'; // this.groupnum = selVal; for(let i=0;i { this.groupnum = oldgroupnum; @@ -152,6 +155,7 @@ import axios from 'axios'; option.disabled = false; if(netdata.data[i].name){ option.label = netdata.data[i].name+"正在驾驶"+netdata.data[i].groupNumber; + this.groupNumber = netdata.data[i].groupNumber; option.disabled = true; } if(netdata.data[i].driverId){ diff --git a/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue b/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue index 6d36c6164..2c8038e7c 100644 --- a/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue +++ b/src/views/jlmap3d/drive/drivecontrol/toprightpane.vue @@ -1,42 +1,42 @@