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/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 @@