From 4dfe892f18b8077dc19f1eeb6d8559b8c1c3dc94 Mon Sep 17 00:00:00 2001 From: sunzhenyu Date: Wed, 16 Dec 2020 13:54:08 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=89=E7=BB=B4?= =?UTF-8?q?=E5=AE=A2=E6=B5=81=E5=88=9D=E5=A7=8B=E5=8C=96=E4=BB=BF=E7=9C=9F?= =?UTF-8?q?=E9=87=8D=E7=BD=AE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jl3dtrafficplan/connect/stationconnect.js | 12 ++++-- .../jl3dtrafficplan/connect/trainconnect.js | 16 ++++++-- .../jl3dtrafficplan/jl3dtrafficplan.js | 2 +- .../jl3dtrafficplan/jl3dtraffictrain.js | 5 +++ .../jl3dtrafficplan/model/passerhuman.js | 3 -- src/jlmap3d/main/loaders/AssetLoader.js | 38 +++++++++++-------- src/utils/baseUrl.js | 4 +- src/views/jlmap3d/edit/component/assets.vue | 5 ++- .../jlmap3d/trafficplan/jl3dtraffictrain.vue | 6 ++- 9 files changed, 59 insertions(+), 32 deletions(-) diff --git a/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js b/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js index 255ad8dca..9a10d6c14 100644 --- a/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/connect/stationconnect.js @@ -30,9 +30,8 @@ export function PassflowConnect(deviceaction,toptrain,downtrain,routegroup,passe // 仿真socket接口回调函数 function callback(Response) { const data = JSON.parse(Response.body); - if(data.type == "PFV"){ - console.log(data); + for(let i=0;i { location.reload(); diff --git a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js index 7b1211d60..b52036ba7 100644 --- a/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js +++ b/src/jlmap3d/jl3dtrafficplan/connect/trainconnect.js @@ -10,7 +10,7 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe let topic = '/user/queue/simulation/jl3d/'+routegroup; let header = {'X-Token': getToken() }; - + let restart = false; socketon(topic); function socketon(topic) { @@ -35,7 +35,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe // console.log(trafficTrain.trainList); for(let k in trafficTrain.trainList){ if(trafficTrain.trainList[k].code == data.body){ - updateValue(data.body); + console.log( trafficTrain.trainList[k].code); + console.log( data.body); + updateTrafficTrainValue(data.body); trafficTrain.updateNowTrainCode(data.body); trafficTrain.updateNowTrunk(0+''); break; @@ -62,7 +64,10 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe // console.log(data); trafficTrain.updateTrainData(data.body); - + if(restart == true){ + restart = false; + trafficTrain.restart(); + } // if(toptrain.nowcode == data.body.code){ // console.log(data); // //根据上下车人数创建人 @@ -76,7 +81,7 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe } if(data.type == "TRAIN_PIS"){ - + for(let i=0;i { location.reload(); diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js b/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js index 71ffe2a7b..2aae806be 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtrafficplan.js @@ -192,11 +192,11 @@ export function Jl3dTrafficPlan(dom,skinCode,routegroup,viewMap,initCode) { passerAi.initPasser(humanlist,topWaitPassers,downWaitPassers,passerHuman,scope); updatePasserData(humanlist.children.length,topWaitPassers.children.length,downWaitPassers.children.length,outStationPassers.children.length,passerHuman.speed); + scope.resetscene(); } this.changestation = function(stationname){ passerStation.changestation(stationname); - console.log(passerStation.nowStation); scope.humanWaitTop = passerStation.nowStation.toppassers; scope.humanWaitDown = passerStation.nowStation.downpassers; passerHuman.speed = passerStation.nowStation.topspeed + passerStation.nowStation.downspeed; diff --git a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js index a9675fe2d..206fb62e1 100644 --- a/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js +++ b/src/jlmap3d/jl3dtrafficplan/jl3dtraffictrain.js @@ -343,6 +343,11 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap,initCode) { } } } + this.restart = function(){ + updateTrafficTrainValue(passerTrain.toptrain.nowcode); + scope.updateNowTrainCode(passerTrain.toptrain.nowcode); + scope.updateNowTrunk(0+''); + }; this.updateNowTrainCode = function(newCode){ passerTrain.toptrain.nowcode = newCode; diff --git a/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js b/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js index 5b1b9420d..ba9ed3849 100644 --- a/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js +++ b/src/jlmap3d/jl3dtrafficplan/model/passerhuman.js @@ -1,8 +1,5 @@ export function PasserHuman() { let scope = this; - - - //初始人物模型和动画 let originhuman1 = null; let originhuman2 = null; diff --git a/src/jlmap3d/main/loaders/AssetLoader.js b/src/jlmap3d/main/loaders/AssetLoader.js index 670d46715..3b104309a 100644 --- a/src/jlmap3d/main/loaders/AssetLoader.js +++ b/src/jlmap3d/main/loaders/AssetLoader.js @@ -11,7 +11,7 @@ let defaultsignal = { deviceType:"signal", type:"low", picUrl:"", - url:BASE_ASSET_API+"/MODEL/signal/d3d.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/13-42231.FBX" } let defaulttrain = { @@ -20,7 +20,7 @@ let defaulttrain = { deviceType:"train", type:"num4", picUrl:"", - url:BASE_ASSET_API+"/MODEL/train/train.FBX" + url:BASE_ASSET_API+"/MODEL/2020-11-16/57-53841.FBX" } @@ -30,7 +30,7 @@ let defaultstation = { deviceType:"stand", type:"num4", picUrl:"", - url:BASE_ASSET_API+"/MODEL/station/fuzhou.FBX" + url:BASE_ASSET_API+"/MODEL/2020-11-16/52-60478.FBX" } let waicestation = { id:"10", @@ -38,7 +38,7 @@ let waicestation = { deviceType:"standwaice", type:"num4", picUrl:"", - url:BASE_ASSET_API+"/MODEL/station/waicestation.FBX" + url:BASE_ASSET_API+"/MODEL/2020-11-16/53-61736.FBX" } let defaultswitch = { @@ -47,7 +47,7 @@ let defaultswitch = { deviceType:"switch", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/daocha/daocha.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } @@ -57,7 +57,7 @@ let defaultsuidao = { deviceType:"suidao", type:"suidao", picUrl:"", - url:BASE_ASSET_API+"/MODEL/suidao/suidao.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/21-35677.FBX" } @@ -68,7 +68,7 @@ let defaultbackground = { deviceType:"background", type:"background", picUrl:"", - url:BASE_ASSET_API+"/MODEL/suidao/background.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/21-35677.FBX" } let defaultautorail = { @@ -86,7 +86,7 @@ let autoswitch = { deviceType:"autoswitch", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/auto/autoswitch.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } let autoswitch1 = { @@ -95,7 +95,7 @@ let autoswitch1 = { deviceType:"autoswitch1", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/auto/switch1.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } let autoswitch2 = { @@ -104,7 +104,7 @@ let autoswitch2 = { deviceType:"autoswitch2", type:"fuzhou", picUrl:"", - url:BASE_ASSET_API+"/MODEL/auto/switch2.FBX" + url:BASE_ASSET_API+"/MODEL/2020-07-10/17-43789.FBX" } export function AssetLoader(){ @@ -305,34 +305,40 @@ export function AssetLoader(){ fbxpromise(signal) .then(function(data){ ////console.log(data); + console.log("test"); return fbxpromise(train); }) .then(function(data){ ////console.log(data); + console.log("test"); return fbxpromise(station); }) .then(function(data){ ////console.log(data); + console.log("test"); return fbxpromise(wstation); }) - .then(function(data){ - ////console.log(data); - return fbxpromise(autorail); - }) + // .then(function(data){ + // ////console.log(data); + // return fbxpromise(autorail); + // }) // .then(function(data){ // ////console.log(data); // return fbxpromise(autosuidao); // }) .then(function(data){ ////console.log(data); + console.log("defaultswitch1"); return fbxpromise(defaultswitch1); }) .then(function(data){ + console.log("defaultswitch2"); ////console.log(data); return fbxpromise(defaultswitch2); }) .then(function(data){ ////console.log(data); + console.log("autoswitchs"); return fbxpromise(autoswitchs); }) .then(function(data){ @@ -637,9 +643,9 @@ export function AssetLoader(){ //object.traverse(function (node) {//获取其中对象 // node.frustumCulled = true; //}); - - if(asset.type == "train"){ console.log(asset); + if(asset.type == "train"){ + let realtrain = new THREE.Group(); let j = object.children.length; for(j;j>0;j--){ diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index c0569ef83..798608c73 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.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.119:9000'; // 张赛 - // BASE_API = 'http://192.168.8.110:9000'; // 杜康 + BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛 diff --git a/src/views/jlmap3d/edit/component/assets.vue b/src/views/jlmap3d/edit/component/assets.vue index 54a02c3f7..f5d7f2383 100644 --- a/src/views/jlmap3d/edit/component/assets.vue +++ b/src/views/jlmap3d/edit/component/assets.vue @@ -6,7 +6,9 @@ +
+
- + +
diff --git a/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue b/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue index 0ced8d416..ee74bcde2 100644 --- a/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue +++ b/src/views/jlmap3d/trafficplan/jl3dtraffictrain.vue @@ -178,7 +178,7 @@ export default { if (this.$route.query.type == 'CCTV') { this.isCctv = false; } - window.updateValue = this.updateValue; + window.updateTrafficTrainValue = this.updateTrafficTrainValue; window.updateTrainNum = this.updateTrainNum; }, @@ -215,7 +215,8 @@ export default { this.isActive=index; this.jl3d.switchcamera(index+''); }, - updateValue(newcode){ + updateTrafficTrainValue(newcode){ + this.nowCode = newcode; this.value = newcode; }, @@ -252,6 +253,7 @@ export default { for(let i = 0;i Date: Wed, 16 Dec 2020 14:51:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E7=BC=96?= =?UTF-8?q?=E5=88=B6=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/displayNew/practiceDisplay.vue | 4 ++-- .../editTool/menus/modifyingStationIntervalTime.vue | 2 +- .../planMonitor/editTool/menus/modifyingStationStopTime.vue | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/newMap/displayNew/practiceDisplay.vue b/src/views/newMap/displayNew/practiceDisplay.vue index 1ee2bc248..85e570e1e 100644 --- a/src/views/newMap/displayNew/practiceDisplay.vue +++ b/src/views/newMap/displayNew/practiceDisplay.vue @@ -178,7 +178,7 @@ export default { }, '$store.state.socket.standPfiNum':function(val) { if (val) { - console.log(val, 'standPfiNum'); + // console.log(val, 'standPfiNum'); const stationNumList = val; stationNumList.forEach(stationNum=>{ stationNum.deviceType = 'STAND'; @@ -189,7 +189,7 @@ export default { }, '$store.state.socket.trainPfiNum':function(val) { if (val) { - console.log(val, 'trainPfiNum'); + // console.log(val, 'trainPfiNum'); const trainNumList = this.$store.state.socket.trainPfiNum; trainNumList.forEach(stationNum=>{ stationNum.deviceType = 'TRAIN'; diff --git a/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue b/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue index 540779e38..c72874879 100644 --- a/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue +++ b/src/views/planMonitor/editTool/menus/modifyingStationIntervalTime.vue @@ -139,7 +139,7 @@ export default { } }, mounted() { - this.loadInitData(); + // this.loadInitData(); }, methods: { formatName(code) { diff --git a/src/views/planMonitor/editTool/menus/modifyingStationStopTime.vue b/src/views/planMonitor/editTool/menus/modifyingStationStopTime.vue index d0990d7d6..68a42e18f 100644 --- a/src/views/planMonitor/editTool/menus/modifyingStationStopTime.vue +++ b/src/views/planMonitor/editTool/menus/modifyingStationStopTime.vue @@ -64,7 +64,7 @@ export default { } }, mounted() { - this.loadInitData(); + // this.loadInitData(); }, methods: { formatName(code) { From c2f6c3461b37408a17c2db57c45d9831ae5662da Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Wed, 16 Dec 2020 15:37:09 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=81=E6=B3=A2?= =?UTF-8?q?=E4=B8=89=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/SplitStation/index.js | 32 ++++- src/jmapNew/theme/ningbo_03/menus/menuBar.vue | 22 ++- .../menuDialog/initializeSwitchBlock.vue | 2 +- .../menus/menuDialog/routeCommand.vue | 125 ++++++++++++++++-- .../menus/menuDialog/switchBlock.vue | 7 +- src/views/newMap/jlmapNew/index.vue | 2 +- src/views/newMap/newMapdraft/index.vue | 4 +- .../newMapdraft/mapoperate/splitStation.vue | 11 ++ 8 files changed, 177 insertions(+), 28 deletions(-) diff --git a/src/jmapNew/shape/SplitStation/index.js b/src/jmapNew/shape/SplitStation/index.js index 5c06a5c0d..6ac6771c7 100644 --- a/src/jmapNew/shape/SplitStation/index.js +++ b/src/jmapNew/shape/SplitStation/index.js @@ -132,9 +132,35 @@ export default class SplitStation extends Group { this.add(this.leftText); this.add(this.rightText); } - setShowMode() {} - setShowStation() {} - setState() {} + setShowMode() { + const showMode = this.model.showMode; + if (showMode == '04') { + this.eachChild(item => item.hide() ); + return; + } + const showConditions = this.model.showConditions; + if (!showConditions || showConditions === '01' || showMode === showConditions) { + this.eachChild(item => item.show() ); + } else { + this.eachChild(item => item.hide() ); + } + } + setShowStation(stationCode) { + if (!stationCode || this.model.stationCode === stationCode) { + this.eachChild(item => { + item.show(); + }); + this.isShowShape = true; + } else { + this.eachChild(item => { + item.hide(); + }); + this.isShowShape = false; + } + } + setState(model) { + if (!this.isShowShape) return; + } screenShow() { this.eachChild((child) => { child.hide(); diff --git a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue index 2f31feb66..502d1f7bb 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue @@ -98,11 +98,11 @@ - + - + @@ -153,11 +153,11 @@ import AllocateTime from './menuDialog/allocateTime'; import StationControl from './menuDialog/stationControl'; import SwitchCommand from './menuDialog/switchCommand'; import InitializeSwitchBlock from './menuDialog/initializeSwitchBlock'; -import SwitchBlock from './menuDialog/switchBlock'; +// import SwitchBlock from './menuDialog/switchBlock'; import SwitchActive from './menuDialog/switchActive'; import SwitchDetail from './menuDialog/switchDetail'; import InitializeSignalGuide from './menuDialog/initializeSignalGuide'; -import SignalGuide from './menuDialog/signalGuide'; +// import SignalGuide from './menuDialog/signalGuide'; import InitialzedSignalCanBlock from './menuDialog/initializeSignalCanBlock'; import SignalCanBlock from './menuDialog/signalCanBlock'; import RouteCommand from './menuDialog/routeCommand'; @@ -203,11 +203,11 @@ export default { StandDetail, SwitchCommand, InitializeSwitchBlock, - SwitchBlock, + // SwitchBlock, SwitchActive, SwitchDetail, InitializeSignalGuide, - SignalGuide, + // SignalGuide, InitialzedSignalCanBlock, SignalCanBlock, RouteCommand, @@ -1390,6 +1390,7 @@ export default { } }); }, + // 站台开放/关闭 standOpenOrClose() { const operate = { type: 'bar', @@ -1403,6 +1404,7 @@ export default { } }); }, + // 站台扣车 setStandDetain() { const operate = { type: 'bar', @@ -1429,6 +1431,7 @@ export default { } }); }, + // 停站时间 setAllocateTime() { const operate = { type: 'bar', @@ -1442,6 +1445,7 @@ export default { } }); }, + // 控制权转移 authorizeTransfer() { const operate = { type: 'bar', @@ -1481,6 +1485,7 @@ export default { } }); }, + // 道岔封锁 setBlockSwitch() { const operate = { type: 'bar', @@ -1495,6 +1500,7 @@ export default { } }); }, + // 道岔解除封锁 setUnblockSwitch() { const operate = { type: 'bar', @@ -1508,6 +1514,7 @@ export default { } }); }, + // 道岔授权 setSwitchActive() { const operate = { type: 'bar', @@ -1521,6 +1528,7 @@ export default { } }); }, + // 道岔显示详情 showSwitchDetail() { const operate = { type: 'bar', @@ -1534,6 +1542,7 @@ export default { } }); }, + // 信号引导 setSignalGuide() { const operate = { type: 'bar', @@ -1562,6 +1571,7 @@ export default { } }); }, + // 进路指令 setRouteCommand() { const operate = { type: 'bar', diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue index a416c56a5..c73829143 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue @@ -48,7 +48,7 @@