diff --git a/src/assets/psl_images/top_on.png b/src/assets/psl_images/top_on.png index 5ee4f41c9..fd177c5be 100644 Binary files a/src/assets/psl_images/top_on.png and b/src/assets/psl_images/top_on.png differ diff --git a/src/i18n/langs/en/jlmap3d.js b/src/i18n/langs/en/jlmap3d.js index e7af7a536..9357343c3 100644 --- a/src/i18n/langs/en/jlmap3d.js +++ b/src/i18n/langs/en/jlmap3d.js @@ -7,6 +7,12 @@ export default { surveillanceDisplay: 'In-vehicle surveillance - display', trainInstrumentationDisplay: 'Train instrumentation - display', trainInstrumentationHidden: 'Train instrumentation - hidden', + + trainInstrumentationMmiDisplay: 'Train instrumentation mmi - display', + trainInstrumentationMmiHidden: 'Train instrumentation mmi - hidden', + trainInstrumentationTmsDisplay: 'Train instrumentation tms - display', + trainInstrumentationTmsHidden: 'Train instrumentation tms - hidden', + terminal: 'terminal:', nextStation: 'Next station:', confirmSignalOpen: 'Please confirm that the signal ahead is open', diff --git a/src/i18n/langs/zh/jlmap3d.js b/src/i18n/langs/zh/jlmap3d.js index 3d98fac37..472b357e1 100644 --- a/src/i18n/langs/zh/jlmap3d.js +++ b/src/i18n/langs/zh/jlmap3d.js @@ -5,8 +5,12 @@ export default { stopTime:'停站时间:', surveillanceHidden: '车内监控——隐藏', surveillanceDisplay: '车内监控——显示', - trainInstrumentationDisplay: '列车仪表——显示', - trainInstrumentationHidden: '列车仪表——隐藏', + trainInstrumentationDisplay: '列车mmi仪表——显示', + trainInstrumentationHidden: '列车mmi仪表——隐藏', + trainInstrumentationMmiDisplay: '列车mmi仪表——显示', + trainInstrumentationMmiHidden: '列车mmi仪表——隐藏', + trainInstrumentationTmsDisplay: '列车tms仪表——显示', + trainInstrumentationTmsHidden: '列车tms仪表——隐藏', terminal: '终点站:', nextStation: '下一站:', confirmSignalOpen: '请确认前方信号开放', diff --git a/src/jlmap3d/edit/jlmap3dedit.js b/src/jlmap3d/edit/jlmap3dedit.js index ff089cdf1..37f4c11c4 100644 --- a/src/jlmap3d/edit/jlmap3dedit.js +++ b/src/jlmap3d/edit/jlmap3dedit.js @@ -305,10 +305,36 @@ export function JLmap3dEdit(dom, data, mapid) { for(let i=0,leni=scope.mapdata.stationstandlist.list.length;i 0 ) { - - showEnterVR( displays[ 0 ] ); - - } else { - - showVRNotFound(); - - } - - } ).catch( showVRNotFound ); - - return button; - } else { - var message = document.createElement( 'a' ); - message.href = 'https://immersive-web.github.io/webxr/'; - message.innerHTML = 'WEBXR NOT SUPPORTED'; + const message = document.createElement( 'a' ); + + if ( window.isSecureContext === false ) { + + message.href = document.location.href.replace( /^http:/, 'https:' ); + message.innerHTML = 'WEBXR NEEDS HTTPS'; // TODO Improve message + + } else { + + message.href = 'https://immersiveweb.dev/'; + message.innerHTML = 'WEBXR NOT AVAILABLE'; + + } message.style.left = 'calc(50% - 90px)'; message.style.width = '180px'; @@ -257,6 +164,6 @@ var VRButton = { } -}; +} export { VRButton }; diff --git a/src/jlmap3d/jl3dmaintainer/jl3dTrainRescue/jl3dTrainRescueVr.js b/src/jlmap3d/jl3dmaintainer/jl3dTrainRescue/jl3dTrainRescueVr.js index a9570e448..22a5d5ea8 100644 --- a/src/jlmap3d/jl3dmaintainer/jl3dTrainRescue/jl3dTrainRescueVr.js +++ b/src/jlmap3d/jl3dmaintainer/jl3dTrainRescue/jl3dTrainRescueVr.js @@ -54,6 +54,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) { // this.renderer.shadowMap.type = THREE.PCFSoftShadowMap; this.renderer.gammaInput = true; this.renderer.gammaOutput = true; + console.log( this.renderer); this.renderer.vr.enabled = true; this.dom.appendChild(this.renderer.domElement); document.body.appendChild( VRButton.createButton( human,{x:25,y:1.3,z:1},this.renderer ) ); @@ -208,6 +209,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) { function onSelectStart( event ) { // console.log(); + console.log("select"); var controller = event.target; var intersections = getIntersections( controller ); @@ -249,6 +251,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) { let controlMoveSwitch = false; let nowControlModel = null; function squeezeStart(){ + console.log("squeezestart"); TrainRescueStatic.handR.action.reset(); TrainRescueStatic.handR.action.time = TrainRescueStatic.handR.action._clip.duration; TrainRescueStatic.handR.action.timeScale = 1; @@ -271,6 +274,7 @@ export function Jl3dTrainRescueVr(dom,group,skinCode) { } function squeezeEnd(){ + console.log("squeezeend"); TrainRescueStatic.handR.action.reset(); TrainRescueStatic.handR.action.time = 0; TrainRescueStatic.handR.action.timeScale = -1; diff --git a/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js b/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js index 4f0bbb622..3f5b1d6f3 100644 --- a/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js +++ b/src/jlmap3d/jl3dsimulation/connect/Jlmap3dSubscribeNew.js @@ -798,29 +798,29 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) { code = data.code; if(signallist.list[code]){ if(data.red == 1){ - signallist.list[code].mesh.getObjectByName("red").material.map = materials[0]; + signallist.list[code].mesh.getObjectByName("red").material.map = materials["red"]; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("red").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("red").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("red").material.map.needsUpdate = true; } if(data.yellow == 1){ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[1]; + signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["yellow"]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("yellow").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("yellow").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("yellow").material.map.needsUpdate = true; } if(data.green == 1){ - signallist.list[code].mesh.getObjectByName("green").material.map = materials[2]; + signallist.list[code].mesh.getObjectByName("green").material.map = materials["green"]; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; }else{ - signallist.list[code].mesh.getObjectByName("green").material.map = materials[3]; + signallist.list[code].mesh.getObjectByName("green").material.map = materials["black"]; signallist.list[code].mesh.getObjectByName("green").material.map.needsUpdate = true; } diff --git a/src/jlmap3d/lesson3d/lesson3dplayer.js b/src/jlmap3d/lesson3d/lesson3dplayer.js index c4d7230b6..403ddcae7 100644 --- a/src/jlmap3d/lesson3d/lesson3dplayer.js +++ b/src/jlmap3d/lesson3d/lesson3dplayer.js @@ -47,8 +47,8 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { light.position.set( 0, 4000, 0 ); scene.add( light ); - let fire = new Fire(); - fire.init(scene); + // let fire = new Fire(); + // fire.init(scene); let animateManager = new AnimateManager(); @@ -60,8 +60,6 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { animateManager.initAnimation(assetModelManager); controlManager.init(animateManager.actions,assetModelManager); - - startLesson(); animate(); resolve("loadeend"); //['成功了', 'success'] @@ -90,12 +88,14 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { this.changeIndex = function(nowIndex){ lessonIndex = nowIndex; scope.nowSceneType = lessonData.lessonProgress[nowIndex].progressScene; - + console.log(nowRole); + console.log(lessonData.lessonProgress[lessonIndex].roleName); if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ controlManager.initControlMode(lessonIndex); controlManager.initRoleMode(true,nowRole); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,true,assetModelManager.lessonTriggerList[scope.nowSceneType]); }else{ + controlManager.initControlMode(lessonIndex); controlManager.initRoleMode(false,nowRole); controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,false,assetModelManager.lessonTriggerList[scope.nowSceneType]); } @@ -107,18 +107,23 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { } this.initNowRole = function(role){ - nowRole = role; - controlManager.initControlMode(lessonIndex); - let roleMode = false; - if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ - roleMode = true; - } + if(role){ + nowRole = role; + controlManager.initControlMode(lessonIndex); + let roleMode = false; + if(lessonData.lessonProgress[lessonIndex].roleName == nowRole){ + roleMode = true; + } - controlManager.initRoleMode(roleMode); - console.log(assetModelManager); - // if(lessonData.lessonProgress[lessonIndex].action.length>0){ + controlManager.initRoleMode(roleMode); + console.log(assetModelManager); + // if(lessonData.lessonProgress[lessonIndex].action.length>0){ controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,roleMode,assetModelManager.lessonTriggerList[scope.nowSceneType]); - // } + + }else{ + controlManager.changeIndexEvent(lessonData.lessonProgress[lessonIndex].action,false,assetModelManager.lessonTriggerList[scope.nowSceneType]); + } + // } }; //循环渲染函数 @@ -133,7 +138,7 @@ export function Lesson3dPlayer(dom,lessonData,lessonIndex) { if(controlManager.controlMode == "non"){ controlManager.updateOrbitControl(); } - fire.update(); + // fire.update(); animateManager.updateAnimation(); requestAnimationFrame(animate); diff --git a/src/jlmap3d/lesson3d/manager/controlmanager.js b/src/jlmap3d/lesson3d/manager/controlmanager.js index bbe821fcc..7939387c5 100644 --- a/src/jlmap3d/lesson3d/manager/controlmanager.js +++ b/src/jlmap3d/lesson3d/manager/controlmanager.js @@ -529,9 +529,8 @@ export function ControlManager(dom,scene,lessonData,lessonIndex) { } } } - + console.log(eventTrigger); if(actions[i].actionType == "contact"){ - for(let j=0;j0){ + console.log(actions); } }; diff --git a/src/jlmap3d/lesson3dedit/assetmodelmanager/assetmodelmanager.js b/src/jlmap3d/lesson3dedit/assetmodelmanager/assetmodelmanager.js index 1508366ce..1c404abef 100644 --- a/src/jlmap3d/lesson3dedit/assetmodelmanager/assetmodelmanager.js +++ b/src/jlmap3d/lesson3dedit/assetmodelmanager/assetmodelmanager.js @@ -146,7 +146,7 @@ export function AssetModelManager(editor,scene) { } - // console.log(modelList); + console.log(modelList); return modelList; } @@ -218,9 +218,9 @@ export function AssetModelManager(editor,scene) { this.deleteAsset = function(selectModel,nowSceneType){ scope.otherModel.remove(selectModel); - for(let i=0;i zrRectX || arrowTextRectY > zrRectY) { + const offsetX = arrowTextRectX > zrRectX ? arrowTextRectX - zrRectX : 0; + const offsetY = arrowTextRectY > zrRectY ? arrowTextRectY - zrRectY : 0; + this.arrowText.setStyle({ x: this.device.model.point.x + 50 - offsetX, y: this.device.model.point.y + 25 - offsetY }); + } this.arrowText.show(); } if (this.device.style.Train.mouseOverStyle) { diff --git a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue index aec38561e..ee36f2c7c 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue @@ -223,6 +223,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -365,6 +369,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue index cd95208e6..0f75cc538 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue @@ -136,6 +136,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -275,6 +279,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index 77efd2776..910290b29 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -119,6 +119,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -246,6 +250,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue index 91b619eec..5106f91c1 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue @@ -5,7 +5,7 @@ :class="systemName+' route-hand-control'" :title="title" :visible.sync="show" - :width="systemName == 'xian-01__systerm'?'400px':'300px'" + :width="width" :before-close="doClose" :z-index="2000" :modal="false" @@ -63,6 +63,11 @@ + + + @@ -132,7 +137,8 @@ export default { computed: { ...mapGetters('map', [ 'signalList', - 'routeData' + 'routeData', + 'overlapData' ]), show() { return this.dialogShow && !this.$store.state.menuOperation.break; @@ -140,6 +146,9 @@ export default { domIdCancel() { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; }, + width() { + return this.systemName === 'xian-01__systerm' ? '500px' : '300px'; + }, domIdChoose() { if (this.dialogShow) { if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { @@ -291,6 +300,19 @@ export default { }); }, + getProtectedSectionName(row) { + let name = ''; + if (row && row.overlapCode && this.overlapData[row.overlapCode] && + this.overlapData[row.overlapCode].pathList.length && + this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) { + const switchLength = this.overlapData[row.overlapCode].pathList[0].switchPositionList.length; + const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].switchCode); + if (switchDevice) { + name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].normal ? '定位保护' : '反位保护'); + } + } + return name; + }, allSelectChange() { this.changeList = []; if (this.allSelect) { diff --git a/src/jmapNew/theme/datie_01/menus/menuTrain.vue b/src/jmapNew/theme/datie_01/menus/menuTrain.vue index 93f0f859a..0aa2adfb2 100644 --- a/src/jmapNew/theme/datie_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/datie_01/menus/menuTrain.vue @@ -116,6 +116,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -209,6 +213,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue index d07f029b1..97446c4fd 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue @@ -127,6 +127,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -262,6 +266,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue index cf6eeecd2..88a81cca8 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue @@ -96,6 +96,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -237,6 +241,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index dc77dba63..6ab721aa2 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -207,6 +207,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -335,6 +339,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue index 8c11bff6e..02edddab7 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuTrain.vue @@ -208,6 +208,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -335,6 +339,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, nextStation() { const group = this.$route.query.group; const param = { diff --git a/src/jmapNew/theme/race_01/menus/menuTrain.vue b/src/jmapNew/theme/race_01/menus/menuTrain.vue index 8dd7259f8..378f60745 100644 --- a/src/jmapNew/theme/race_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/race_01/menus/menuTrain.vue @@ -211,6 +211,10 @@ export default { label: '取消故障', handler: this.cancelStoppage }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement + }, { label: '托管', handler: this.setCollocation @@ -361,6 +365,9 @@ export default { } }); }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); + }, // 设置连挂 setLink() { commitOperate(menuOperate.Common.setLink, { code: this.selected.code }, 0).then(({valid, operate})=>{ diff --git a/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue index a6d0887ba..9cee32dfb 100644 --- a/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/xian_01/menus/dialog/routeSelection.vue @@ -102,19 +102,13 @@ export default { methods: { getProtectedSectionName(row) { let name = ''; - if (row && - row.overlapSectionList && - row.overlapSectionList && - row.overlapSectionList.length > 0) { - - const protect = row.overlapSectionList[0]; - name = `${protect.name}`; - if (protect.parentName) { - name = `${protect.parentName}${protect.name}`; - } - const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode); - if (station) { - name = `${name}(${station.name})`; + if (row && row.overlapCode && this.overlapData[row.overlapCode] && + this.overlapData[row.overlapCode].pathList.length && + this.overlapData[row.overlapCode].pathList[0].switchPositionList.length) { + const switchLength = this.overlapData[row.overlapCode].pathList[0].switchPositionList.length; + const switchDevice = this.$store.getters['map/getDeviceByCode'](this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].switchCode); + if (switchDevice) { + name = switchDevice.name + (this.overlapData[row.overlapCode].pathList[0].switchPositionList[switchLength - 1].normal ? '定位保护' : '反位保护'); } } return name; diff --git a/src/jmapNew/theme/xian_01/menus/index.vue b/src/jmapNew/theme/xian_01/menus/index.vue index 2b7676df2..2d1c4fb81 100644 --- a/src/jmapNew/theme/xian_01/menus/index.vue +++ b/src/jmapNew/theme/xian_01/menus/index.vue @@ -74,7 +74,8 @@ export default { val && this.$store.dispatch('config/updateMenuBar'); }, '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel) && this.$store.state.training.prdType == '02') { + // && this.$store.state.training.prdType == '02' + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) { this.popDoShow(this.$store.state.menuOperation.menuPosition); } else { this.popDoClose(); @@ -118,30 +119,71 @@ export default { }, initMenu() { this.menuNormal = []; - this.$store.state.map.map.stationList.forEach(station => { - if (station.relStationCodeList && station.relStationCodeList.length) { - const node = { - label: station.name, - children: [] - }; - const relStationCodeList = [...station.relStationCodeList]; - relStationCodeList.push(station.code); - relStationCodeList.sort((a, b) => { + if (this.$store.state.training.prdType == '02') { + this.$store.state.map.map.stationList.forEach(station => { + if (station.relStationCodeList && station.relStationCodeList.length) { + const node = { + label: station.name, + children: [] + }; + const relStationCodeList = [...station.relStationCodeList]; + relStationCodeList.push(station.code); + relStationCodeList.sort((a, b) => { + const stationA = this.$store.getters['map/getDeviceByCode'](a); + const stationB = this.$store.getters['map/getDeviceByCode'](b); + return stationA.kmRange - stationB.kmRange; + }); + relStationCodeList.forEach(item => { + const next = this.$store.getters['map/getDeviceByCode'](item); + node.children.push({ + code: next.code, + label: next.name, + handler: this.mapLocation + }); + }); + this.menuNormal.push(node); + } + }); + } else if (this.$store.state.training.prdType == '01') { + const roleDeviceCode = this.$store.state.training.roleDeviceCode; + const displayList = this.$store.state.map.map.displayList; + const display = displayList.find(each=>{ + return each.stationCodeList.includes(roleDeviceCode); + }); + if (display) { + const codeList = [...display.switchStationCodeList]; + let relStationCodeList = []; + let ciStaionCode = ''; + codeList.sort((a, b) => { const stationA = this.$store.getters['map/getDeviceByCode'](a); const stationB = this.$store.getters['map/getDeviceByCode'](b); + if (stationA.relStationCodeList && stationA.relStationCodeList.length > 0 && relStationCodeList.length <= 0) { + relStationCodeList = [...stationA.relStationCodeList]; + ciStaionCode = stationA.code; + relStationCodeList.push(stationA.code); + } return stationA.kmRange - stationB.kmRange; }); - relStationCodeList.forEach(item => { - const next = this.$store.getters['map/getDeviceByCode'](item); - node.children.push({ - code: next.code, - label: next.name, - handler: this.mapLocation - }); + const ciStaion = this.$store.getters['map/getDeviceByCode'](ciStaionCode); + const currentNode = {label: ciStaion.name, children: []}; + codeList.forEach(code=>{ + let node; + const station = this.$store.getters['map/getDeviceByCode'](code); + if (station.depot) { + return; + } + if (relStationCodeList.includes(code)) { + currentNode.children.push({label: station.name, code: station.code, handler: this.mapLocation}); + if (currentNode.children.length == relStationCodeList.length) { + this.menuNormal.push(currentNode); + } + } else { + node = {label: station.name, code: station.code, handler: this.mapLocation}; + this.menuNormal.push(node); + } }); - this.menuNormal.push(node); } - }); + } this.menu = [...this.menuNormal]; }, popDoClose() { diff --git a/src/jmapNew/theme/xian_01/menus/menuBar.vue b/src/jmapNew/theme/xian_01/menus/menuBar.vue index 527d7b2c4..11c964005 100644 --- a/src/jmapNew/theme/xian_01/menus/menuBar.vue +++ b/src/jmapNew/theme/xian_01/menus/menuBar.vue @@ -5,7 +5,7 @@ - + @@ -15,6 +15,7 @@ + @@ -23,6 +24,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBar'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler.js'; import StationControlConvert from './menuDialog/stationControlConvert'; +import WarningInfo from './menuDialog/warningInfo'; import TrainAdd from './menuDialog/trainAdd'; // import AddRunplanLine from './menuDialog/addRunplanLine'; import TrainTranstalet from './menuDialog/trainTranstalet'; @@ -50,7 +52,8 @@ export default { TrainTranstalet, TrainDelete, ManageUser, - HelpAbout + HelpAbout, + WarningInfo // DeleteRunplanLine }, props: { @@ -484,6 +487,9 @@ export default { blankClickClose() { this.$refs.menuBar.doClose(); }, + warningInfoDoShow(info) { + this.$refs.warningInfo.doShow(info); + }, undeveloped() { this.$refs.menuBar.doClose(); this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), { diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue index 7339a23a1..65a827a7d 100644 --- a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue @@ -153,6 +153,12 @@ export default { '$store.state.map.controlTransfer':function (controlTransferList) { controlTransferList.forEach(controlTransfer=>{ this.updateTableValue(controlTransfer); + if (controlTransfer.applicantId && this.$store.state.training.memberData[controlTransfer.applicantId] && + this.$store.state.training.memberData[controlTransfer.applicantId].userId == this.$store.state.user.id && + this.$store.state.training.prdType === '01' + ) { + this.$emit('warningInfoDoShow', controlTransfer); + } }); }, // 深度数据状态 @@ -164,7 +170,7 @@ export default { } }, mounted() { - this.loadTableData(); + // this.loadTableData(); }, methods: { updateTableValue(controlTransfer) { @@ -241,15 +247,37 @@ export default { } }, initTableDataStatus() { - this.tableData.forEach(row => { - row.disabled = this.checkBoxDisabled(row); - row.check = false; - row.result = ''; - const control = this.$store.getters['map/getDeviceByCode'](row.code); - if (control) { - row.control = this.controlProps[control.controlMode]; - } - }); + this.tableData = []; + if (this.$store.state.training.prdType === '02') { + this.stationList && this.stationList.forEach(station => { + if (station.createControlMode) { + const control = this.$store.getters['map/getDeviceByCode'](station.code); + this.tableData.push({ + code: station.code, + operate: station.name || '', + control: control ? this.controlProps[control.controlMode] : '', + check: false, + disabled: this.checkBoxDisabled(station), + status: '正常', + result: '' + }); + } + }); + } else if (this.$store.state.training.prdType === '01') { + const stationCodeList = this.$store.state.map.stationControlMap[this.$store.state.training.roleDeviceCode]; + stationCodeList && stationCodeList.forEach(stationCode => { + const station = this.$store.getters['map/getDeviceByCode'](stationCode); + this.tableData.push({ + code: station.code, + operate: station.name || '', + control: station ? this.controlProps[station.controlMode] : '', + check: false, + disabled: this.checkBoxDisabled(station), + status: '正常', + result: '' + }); + }); + } }, doShow(operate) { if (!this.dialogShow) { diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue new file mode 100644 index 000000000..0fb63db15 --- /dev/null +++ b/src/jmapNew/theme/xian_01/menus/menuDialog/warningInfo.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/jmapNew/theme/xian_01/menus/menuSignal.vue b/src/jmapNew/theme/xian_01/menus/menuSignal.vue index 6fe8e89b5..79f5049b2 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSignal.vue @@ -263,6 +263,14 @@ export default { initMenu() { this.menu = MenuContextHandler.covert(this.menuNormal); // 故障模式菜单列表 + const menuItem = this.menu.find( item => item.cmdType === CMD.Signal.CMD_SIGNAL_SET_CI_AUTO); + const menuItemDisabled = menuItem.disabled; + menuItem.disabled = true; + this.routeList.forEach(route => { + if (route.startSignalCode === this.selected.code && route.flt) { + menuItem.disabled = menuItemDisabled; + } + }); if (this.operatemode === OperateMode.FAULT) { this.menu = this.menuForce; } diff --git a/src/jmapNew/theme/xian_01/menus/menuTrain.vue b/src/jmapNew/theme/xian_01/menus/menuTrain.vue index 787cd9e0a..5d71aa020 100644 --- a/src/jmapNew/theme/xian_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_01/menus/menuTrain.vue @@ -120,6 +120,10 @@ export default { { label: '取消故障', handler: this.cancelStoppage + }, + { + label: '触发故障管理', + handler: this.triggerFaultManagement } ], menuDirective: [ @@ -528,6 +532,9 @@ export default { callback: action => { } }); + }, + triggerFaultManagement() { + this.$store.dispatch('training/setTriggerFaultCount', this.selected); } // // 交换列车识别号 // switchTrainId() { diff --git a/src/scripts/cmdPlugin/Config.js b/src/scripts/cmdPlugin/Config.js index f5dffe8d6..018f506cf 100644 --- a/src/scripts/cmdPlugin/Config.js +++ b/src/scripts/cmdPlugin/Config.js @@ -29,7 +29,7 @@ export const MapDeviceType = { /** 设备故障类型 */ export const deviceFaultType = { Section: [ - {label: '计轴故障', value: 'FAULT'}, + {label: '红光带故障', value: 'FAULT'}, {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}, {label: '橙光带故障', value: 'ARB'} // {label: '计轴干扰', value: 'DISTURBANCE'} @@ -43,7 +43,7 @@ export const deviceFaultType = { {label: '反位失表', value: 'REVERSE_SPLIT'}, {label: '挤岔', value: 'SQUEEZE'}, {label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}, - {label: '计轴故障', value: 'AXLE_FAULT'}, + {label: '红光带故障', value: 'AXLE_FAULT'}, {label: '橙光带故障', value: 'ARB'} // {label: '道岔区段计轴故障', value: 'AXLE_FAULT'} ], @@ -61,7 +61,8 @@ export const deviceFaultType = { ], Train: [ {label: '通信异常', value: 'COMMUNICATION_ABNORMAL'}, - {label: '驾驶故障', value: 'DRIVE_FAULT'} + {label: '驾驶故障', value: 'DRIVE_FAULT'}, + {label: '突然EB', value: 'SUDDEN_EB' } ], Power:[ {label: '供电故障', value: 'FAULT'} @@ -70,7 +71,7 @@ export const deviceFaultType = { /** 设备故障类型map */ export const deviceFaultMap = { Section: { - FAULT: '计轴故障', + FAULT: '红光带故障', CBTC_OCCUPIED_FAULT: '通信车占用', ARB: '橙光带故障' }, @@ -83,7 +84,7 @@ export const deviceFaultMap = { REVERSE_SPLIT: '反位失表', SQUEEZE: '挤岔', CBTC_OCCUPIED_FAULT: '通信车占用', - AXLE_FAULT: '计轴故障', + AXLE_FAULT: '红光带故障', ARB: '橙光带故障' }, StationStand: { diff --git a/src/store/modules/map.js b/src/store/modules/map.js index bfe1812de..91d38410f 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -246,7 +246,8 @@ const map = { controlTransfer:[], // 控制权转移消息 mapDataParseCount: 0, foldLineMap: {}, // 现地折行线map数据 - clearButtonCount: 0 // 清除操作按钮计数器 + clearButtonCount: 0, // 清除操作按钮计数器 + stationControlMap: {} // 站控显示的map { 当前车站:显示车站列表 } }, getters: { @@ -718,6 +719,18 @@ const map = { state.foldLineMap = foldLineMap; const parser = parserFactory(ParserType.Graph.value); state.mapDevice = parser.parser(map, map.skinVO.code, showConfig); + state.stationControlMap = {}; + map.stationList.forEach(station => { + if (station.ciStation) { + const centrailzedList = [station.code]; + station.relStationCodeList.forEach(relStationCode => { + state.stationControlMap[relStationCode] = centrailzedList; + if (state.mapDevice[relStationCode].centralized) { + centrailzedList.push(relStationCode); + } + }); + } + }); Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice); } else { state.map = null; @@ -905,9 +918,9 @@ const map = { const holdIndex = state.holdStandList.indexOf(status.code); const jumpIndex = state.jumpStandList.indexOf(status.code); const device = state.mapDevice[status.code]; - if ((device.stationHoldTrain || device.centerHoldTrain) && holdIndex < 0) { + if ((device.stationHoldTrain || device.centerHoldTrain || device.ibpHoldTrain) && holdIndex < 0) { state.holdStandList.push(device.code); - } else if (!(device.stationHoldTrain || device.centerHoldTrain) && holdIndex > -1) { + } else if (!(device.stationHoldTrain || device.centerHoldTrain || device.ibpHoldTrain) && holdIndex > -1) { state.holdStandList.splice(holdIndex, 1); } state.holdStatus = state.holdStandList.length > 0; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index 8b75cd8e6..bc303bcc8 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/components/StatusIcon/statusIcon.vue b/src/views/components/StatusIcon/statusIcon.vue index 2a916e311..517a16a4c 100644 --- a/src/views/components/StatusIcon/statusIcon.vue +++ b/src/views/components/StatusIcon/statusIcon.vue @@ -1,7 +1,7 @@