From c4a6b076da431bb82f4f4f7307fd539fde59476a Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Mon, 29 Jul 2019 17:57:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8F=9C=E5=8D=95=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmap/shape/TrainWindow/index.js | 2 +- .../batong_01/menus/dialog/routeControl.vue | 4 +- src/jmap/theme/batong_01/menus/index.vue | 2 +- src/jmap/theme/batong_01/menus/menuBar.vue | 4 +- src/jmap/theme/batong_01/menus/menuCancel.vue | 2 +- .../batong_01/menus/menuDialog/viewDevice.vue | 74 ++++--- .../batong_01/menus/menuDialog/viewName.vue | 192 ++++++++-------- .../menus/menuDialog/viewTrainId.vue | 20 +- .../batong_01/menus/passiveDialog/control.vue | 8 +- .../batong_01/menus/utils/menuItemStatus.js | 19 +- .../beijing_01/menus/dialog/routeControl.vue | 4 +- src/jmap/theme/beijing_01/menus/index.vue | 2 +- src/jmap/theme/beijing_01/menus/menuBar.vue | 4 +- .../theme/beijing_01/menus/menuButton.vue | 2 +- .../menus/menuDialog/viewDevice.vue | 72 +++--- .../beijing_01/menus/menuDialog/viewName.vue | 192 ++++++++-------- .../menus/menuDialog/viewTrainId.vue | 20 +- .../menus/passiveDialog/control.vue | 8 +- .../beijing_01/menus/utils/menuItemStatus.js | 25 +-- .../menusPlan/chooseTemplatePlan.vue | 2 +- .../beijing_01/menusPlan/createTodayPlan.vue | 2 +- .../chengdou_03/menus/dialog/routeControl.vue | 4 +- src/jmap/theme/chengdou_03/menus/index.vue | 2 +- src/jmap/theme/chengdou_03/menus/menuBar.vue | 4 +- .../menus/menuDialog/viewDevice.vue | 72 +++--- .../chengdou_03/menus/menuDialog/viewName.vue | 192 ++++++++-------- .../menus/menuDialog/viewTrainId.vue | 20 +- .../menus/passiveDialog/control.vue | 8 +- .../chengdou_03/menus/utils/menuItemStatus.js | 21 +- .../menusPlan/chooseTemplatePlan.vue | 2 +- .../chengdou_03/menusPlan/createTodayPlan.vue | 2 +- .../fuzhou_01/menus/dialog/routeControl.vue | 4 +- src/jmap/theme/fuzhou_01/menus/index.vue | 9 +- src/jmap/theme/fuzhou_01/menus/menuBar.vue | 4 +- src/jmap/theme/fuzhou_01/menus/menuCancel.vue | 2 +- .../childDialog/twoConfirmation.vue | 2 +- .../menuDialog/stationControlConvert.vue | 2 +- .../fuzhou_01/menus/menuDialog/viewDevice.vue | 72 +++--- .../fuzhou_01/menus/menuDialog/viewName.vue | 195 ++++++++--------- .../menus/menuDialog/viewTrainId.vue | 20 +- src/jmap/theme/fuzhou_01/menus/menuTool.vue | 205 ------------------ .../fuzhou_01/menus/passiveDialog/control.vue | 8 +- src/jmap/theme/fuzhou_01/menus/statusBar.vue | 31 --- .../fuzhou_01/menus/utils/menuItemStatus.js | 26 ++- .../menusPlan/chooseTemplatePlan.vue | 2 +- .../fuzhou_01/menusPlan/createTodayPlan.vue | 2 +- src/store/modules/map.js | 100 ++++----- src/views/jlmap/index.vue | 2 +- src/views/map/mapdraft/mapmanage/edit.vue | 6 +- src/views/mapsystem/common/index.vue | 15 +- 50 files changed, 724 insertions(+), 970 deletions(-) delete mode 100644 src/jmap/theme/fuzhou_01/menus/menuTool.vue delete mode 100644 src/jmap/theme/fuzhou_01/menus/statusBar.vue diff --git a/src/jmap/shape/TrainWindow/index.js b/src/jmap/shape/TrainWindow/index.js index 8001a5336..69384e0ff 100644 --- a/src/jmap/shape/TrainWindow/index.js +++ b/src/jmap/shape/TrainWindow/index.js @@ -16,7 +16,7 @@ class TrainWindow extends Group { this.setState(state); } _create(model) { - const prdType = '02';// store.state.map.prdType; + const prdType = '02';// store.state.training.prdType; if (prdType !== '01') { this.createTrainWindow(); this.setTrainWindowEventShow(model.trainWindowShow); diff --git a/src/jmap/theme/batong_01/menus/dialog/routeControl.vue b/src/jmap/theme/batong_01/menus/dialog/routeControl.vue index 53853eec9..86b6d0b17 100644 --- a/src/jmap/theme/batong_01/menus/dialog/routeControl.vue +++ b/src/jmap/theme/batong_01/menus/dialog/routeControl.vue @@ -134,10 +134,10 @@ }, //取消列车进路 cancelTrainRoute() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { /** 现地工作站*/ this.cancelTrainRouteByLocal(); - } else if (this.$store.state.map.prdType == '02') { + } else if (this.$store.state.training.prdType == '02') { /** 行调工作站*/ this.cancelTrainRouteByCentral(); } diff --git a/src/jmap/theme/batong_01/menus/index.vue b/src/jmap/theme/batong_01/menus/index.vue index 33126c241..84810ec55 100644 --- a/src/jmap/theme/batong_01/menus/index.vue +++ b/src/jmap/theme/batong_01/menus/index.vue @@ -68,7 +68,7 @@ return this.$route.params.mode == 'dp' }, isShowMenu() { - return this.$store.state.map.prdType != ''; + return this.$store.state.training.prdType != ''; } }, data() { diff --git a/src/jmap/theme/batong_01/menus/menuBar.vue b/src/jmap/theme/batong_01/menus/menuBar.vue index 83c535d4c..4778d9836 100644 --- a/src/jmap/theme/batong_01/menus/menuBar.vue +++ b/src/jmap/theme/batong_01/menus/menuBar.vue @@ -438,7 +438,7 @@ '$store.state.training.started': function (val) { this.closeMenu(true); }, - '$store.state.map.prdType': function () { + '$store.state.training.prdType': function () { this.initMenu(); } }, @@ -447,7 +447,7 @@ }, methods: { initMenu(menu) { - this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode); + this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode); this.clickEvent(); this.closeMenu(true); }, diff --git a/src/jmap/theme/batong_01/menus/menuCancel.vue b/src/jmap/theme/batong_01/menus/menuCancel.vue index c51791b9f..4f887ff45 100644 --- a/src/jmap/theme/batong_01/menus/menuCancel.vue +++ b/src/jmap/theme/batong_01/menus/menuCancel.vue @@ -87,7 +87,7 @@ if (elem.visible) { let next = elem; while (!next.centralized) { - next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode); + next = (this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode) || {}).model; } if (station.code == next.code) { diff --git a/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue b/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue index c7ba148fa..726e3cbc8 100644 --- a/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue +++ b/src/jmap/theme/batong_01/menus/menuDialog/viewDevice.vue @@ -113,46 +113,48 @@ }) }, setDeviceDisplay() { - let show = false; - let deviceList = []; + // let show = false; + // let deviceList = []; - //区段边界设置 - let sectionList = this.$store.getters['map/sectionList']; - if (sectionList && sectionList.length > 0) { - sectionList.forEach(elem => { - //区段边界 - show = this.deviceLevels.indexOf(2) !== -1 ? true : false; - elem.borderBorderShow = show; - deviceList.push(elem); - }); - } + // //区段边界设置 + // let sectionList = this.$store.getters['map/sectionList']; + // if (sectionList && sectionList.length > 0) { + // sectionList.forEach(elem => { + // //区段边界 + // show = this.deviceLevels.indexOf(2) !== -1 ? true : false; + // elem.borderBorderShow = show; + // elem.type = deviceType.Section; + // deviceList.push(elem); + // }); + // } - //车次窗设置 - let trainWindowList = this.$store.getters['map/trainWindowList']; - if (trainWindowList && trainWindowList.length > 0) { - trainWindowList.forEach(elem => { - //车次窗 - show = this.deviceLevels.indexOf(1) !== -1 ? true : false; - elem.trainWindowShow = show; - deviceList.push(elem); - }); - } + // //车次窗设置 + // let trainWindowList = this.$store.getters['map/trainWindowList']; + // if (trainWindowList && trainWindowList.length > 0) { + // trainWindowList.forEach(elem => { + // //车次窗 + // show = this.deviceLevels.indexOf(1) !== -1 ? true : false; + // elem.type = deviceType.Section; + // elem.trainWindowShow = show; + // deviceList.push(elem); + // }); + // } - //联锁自动进路表示灯和ATS自动触发表示灯设置 - let signalList = this.$store.getters['map/signalList']; - if (signalList && signalList.length > 0) { - signalList.forEach(elem => { - //联锁自动进路表示灯 - show = this.deviceLevels.indexOf(3) !== -1 ? true : false; - elem.linkageAutoRouteShow = show; - //ATS自动触发表示灯 - show = this.deviceLevels.indexOf(4) !== -1 ? true : false; - elem.atsAutoTriggerShow = show; - deviceList.push(elem); - }) - } + // //联锁自动进路表示灯和ATS自动触发表示灯设置 + // let signalList = this.$store.getters['map/signalList']; + // if (signalList && signalList.length > 0) { + // signalList.forEach(elem => { + // //联锁自动进路表示灯 + // show = this.deviceLevels.indexOf(3) !== -1 ? true : false; + // elem.linkageAutoRouteShow = show; + // //ATS自动触发表示灯 + // show = this.deviceLevels.indexOf(4) !== -1 ? true : false; + // elem.atsAutoTriggerShow = show; + // deviceList.push(elem); + // }) + // } - this.$store.dispatch('map/updateMapView', deviceList); + // this.$store.dispatch('map/updateMapDevices', deviceList); } } } diff --git a/src/jmap/theme/batong_01/menus/menuDialog/viewName.vue b/src/jmap/theme/batong_01/menus/menuDialog/viewName.vue index 1e306a263..4286f97d0 100644 --- a/src/jmap/theme/batong_01/menus/menuDialog/viewName.vue +++ b/src/jmap/theme/batong_01/menus/menuDialog/viewName.vue @@ -147,115 +147,115 @@ }) }, setNameDisplay() { - let show = false; - let deviceList = []; + // let show = false; + // let deviceList = []; - //信号机 - show = this.nameLevels.indexOf(1) !== -1 ? true : false; - let signalList = this.$store.getters['map/signalList']; - if (signalList && signalList.length > 0) { - signalList.forEach(elem => { - elem.nameShow = show; - deviceList.push(elem); - }) - } + // //信号机 + // show = this.nameLevels.indexOf(1) !== -1 ? true : false; + // let signalList = this.$store.getters['map/signalList']; + // if (signalList && signalList.length > 0) { + // signalList.forEach(elem => { + // elem.nameShow = show; + // deviceList.push(elem); + // }) + // } - //按钮名称 - show = this.nameLevels.indexOf(3) !== -1 ? true : false; + // //按钮名称 + // show = this.nameLevels.indexOf(3) !== -1 ? true : false; - //道岔 - let switchList = this.$store.getters['map/switchList']; - if (switchList && switchList.length > 0) { - switchList.forEach(elem => { - //道岔名称 - show = this.nameLevels.indexOf(7) !== -1 ? true : false; - elem.nameShow = show; - //道岔轨名称 - show = this.nameLevels.indexOf(9) !== -1 ? true : false; - elem.switchSectionNameShow = show; - deviceList.push(elem); - }) - } + // //道岔 + // let switchList = this.$store.getters['map/switchList']; + // if (switchList && switchList.length > 0) { + // switchList.forEach(elem => { + // //道岔名称 + // show = this.nameLevels.indexOf(7) !== -1 ? true : false; + // elem.nameShow = show; + // //道岔轨名称 + // show = this.nameLevels.indexOf(9) !== -1 ? true : false; + // elem.switchSectionNameShow = show; + // deviceList.push(elem); + // }) + // } - //控制模式 - show = this.nameLevels.indexOf(8) !== -1 ? true : false; - let control = this.$store.getters['map/stationControlList']; - if (control && control.length > 0) { - control.forEach(elem => { - //标识灯名称 - elem.indicatorShow = show; - deviceList.push(elem); - }) - } + // //控制模式 + // show = this.nameLevels.indexOf(8) !== -1 ? true : false; + // let control = this.$store.getters['map/stationControlList']; + // if (control && control.length > 0) { + // control.forEach(elem => { + // //标识灯名称 + // elem.indicatorShow = show; + // deviceList.push(elem); + // }) + // } - //区段 - let sectionList = this.$store.getters['map/sectionList']; - if (sectionList && sectionList.length > 0) { - sectionList.forEach(elem => { - if (elem.isSwitchSection && elem.parentCode) { - //道岔轨的区段名称默认不显示 - elem.nameShow = false; - } else { - if (elem.type === '01') { - show = this.nameLevels.indexOf(11) !== -1 ? true : false; - elem.nameShow = show; - } else if (elem.type === '02') { - //股道轨名称 - show = this.nameLevels.indexOf(5) !== -1 ? true : false; - elem.nameShow = show; - } else if (elem.type === '03') { - //道岔区段名称 - show = this.nameLevels.indexOf(9) !== -1 ? true : false; - elem.nameShow = show; - } - } + // //区段 + // let sectionList = this.$store.getters['map/sectionList']; + // if (sectionList && sectionList.length > 0) { + // sectionList.forEach(elem => { + // if (elem.isSwitchSection && elem.parentCode) { + // //道岔轨的区段名称默认不显示 + // elem.nameShow = false; + // } else { + // if (elem.type === '01') { + // show = this.nameLevels.indexOf(11) !== -1 ? true : false; + // elem.nameShow = show; + // } else if (elem.type === '02') { + // //股道轨名称 + // show = this.nameLevels.indexOf(5) !== -1 ? true : false; + // elem.nameShow = show; + // } else if (elem.type === '03') { + // //道岔区段名称 + // show = this.nameLevels.indexOf(9) !== -1 ? true : false; + // elem.nameShow = show; + // } + // } - //站台轨名称 - if (elem.isStandTrack) { - show = this.nameLevels.indexOf(2) !== -1 ? true : false; - elem.standTrackNameShow = show; - } + // //站台轨名称 + // if (elem.isStandTrack) { + // show = this.nameLevels.indexOf(2) !== -1 ? true : false; + // elem.standTrackNameShow = show; + // } - //折返轨名称 - if (elem.isReentryTrack) { - show = this.nameLevels.indexOf(4) !== -1 ? true : false; - elem.reentryTrackNameShow = show; - } + // //折返轨名称 + // if (elem.isReentryTrack) { + // show = this.nameLevels.indexOf(4) !== -1 ? true : false; + // elem.reentryTrackNameShow = show; + // } - //转换轨名称 - if (elem.isTransferTrack) { - show = this.nameLevels.indexOf(6) !== -1 ? true : false; - elem.transferTrackNameShow = show; - } + // //转换轨名称 + // if (elem.isTransferTrack) { + // show = this.nameLevels.indexOf(6) !== -1 ? true : false; + // elem.transferTrackNameShow = show; + // } - deviceList.push(elem); - }) - } + // deviceList.push(elem); + // }) + // } - //停车点 - show = this.nameLevels.indexOf(10) !== -1 ? true : false; - let stopPointList = this.$store.getters['map/stopPointList']; - if (stopPointList && stopPointList.length > 0) { - stopPointList.forEach(elem => { - //目的地名称 - elem.destCodeShow = show; - deviceList.push(elem); - }) - } + // //停车点 + // show = this.nameLevels.indexOf(10) !== -1 ? true : false; + // let stopPointList = this.$store.getters['map/stopPointList']; + // if (stopPointList && stopPointList.length > 0) { + // stopPointList.forEach(elem => { + // //目的地名称 + // elem.destCodeShow = show; + // deviceList.push(elem); + // }) + // } - //车站 - show = this.nameLevels.indexOf(12) !== -1 ? true : false; - let stationList = this.$store.getters['map/stationList']; - if (stationList && stationList.length > 0) { - stationList.forEach(elem => { - //公里标 - elem.kmPostShow = show; - deviceList.push(elem); - }) - } + // //车站 + // show = this.nameLevels.indexOf(12) !== -1 ? true : false; + // let stationList = this.$store.getters['map/stationList']; + // if (stationList && stationList.length > 0) { + // stationList.forEach(elem => { + // //公里标 + // elem.kmPostShow = show; + // deviceList.push(elem); + // }) + // } - this.$store.dispatch('map/updateMapView', deviceList); + // this.$store.dispatch('map/updateMapDevices', deviceList); } } } diff --git a/src/jmap/theme/batong_01/menus/menuDialog/viewTrainId.vue b/src/jmap/theme/batong_01/menus/menuDialog/viewTrainId.vue index e2a2d4c02..3f82afaf6 100644 --- a/src/jmap/theme/batong_01/menus/menuDialog/viewTrainId.vue +++ b/src/jmap/theme/batong_01/menus/menuDialog/viewTrainId.vue @@ -155,17 +155,17 @@ }) }, setTrainDispaly() { - let trainList = this.$store.getters['training/viewTrainList']; - if (trainList && trainList.length > 0) { - let planFormat = this.trainNameFormatBy(this.planMode); - let nameFontSize = this.fontSize; - trainList.forEach(elem => { - elem.nameFormat = planFormat; - elem.nameFontSize = nameFontSize; - }); + // let trainList = this.$store.getters['training/viewTrainList']; + // if (trainList && trainList.length > 0) { + // let planFormat = this.trainNameFormatBy(this.planMode); + // let nameFontSize = this.fontSize; + // trainList.forEach(elem => { + // elem.nameFormat = planFormat; + // elem.nameFontSize = nameFontSize; + // }); - this.$store.dispatch('map/updateMapView', trainList); - } + // this.$store.dispatch('map/updateMapDevices', trainList); + // } }, trainNameFormatBy(mode) { switch (mode.toString()) { diff --git a/src/jmap/theme/batong_01/menus/passiveDialog/control.vue b/src/jmap/theme/batong_01/menus/passiveDialog/control.vue index 9803b0494..6d0730c01 100644 --- a/src/jmap/theme/batong_01/menus/passiveDialog/control.vue +++ b/src/jmap/theme/batong_01/menus/passiveDialog/control.vue @@ -69,10 +69,10 @@ }, computed: { targetStatus() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { return '01'; } - if (this.$store.state.map.prdType == '02') { + if (this.$store.state.training.prdType == '02') { return '02' } }, @@ -237,7 +237,7 @@ type: MapDeviceType.StationControl.type, operation: OperationEvent.StationControl.controlResponse.agree.operation, val: this.selection[0].code, - prdType: this.$store.state.map.prdType + prdType: this.$store.state.training.prdType } this.clearTimer(); @@ -258,7 +258,7 @@ type: MapDeviceType.StationControl.type, operation: OperationEvent.StationControl.controlResponse.refuse.operation, val: this.tableData[0].code, - prdType: this.$store.state.map.prdType + prdType: this.$store.state.training.prdType } this.clearTimer(); diff --git a/src/jmap/theme/batong_01/menus/utils/menuItemStatus.js b/src/jmap/theme/batong_01/menus/utils/menuItemStatus.js index 460415442..29671319d 100644 --- a/src/jmap/theme/batong_01/menus/utils/menuItemStatus.js +++ b/src/jmap/theme/batong_01/menus/utils/menuItemStatus.js @@ -474,18 +474,19 @@ export function menuFiltration(menuObj) { var selected = store.getters['menuOperation/selected']; var control; var menu = []; + if (selected._type == 'StationStand') { - control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode); + control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode); } else if (selected._type == 'Station') { - control = store.getters['map/getStationControlByStationCode'](selected.code); + control = store.getters['map/getStationControlByStationCode'](selected.model.code); } else { - control = store.getters['map/getStationControlByStationCode'](selected.stationCode); + control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode); } + if (control) { - var controlStatus = (control || {}).state; - if (store.state.map.prdType != '') { - var type = SystemType[store.state.map.prdType]; - var status = StationControlType[controlStatus.status]; + if (store.state.training.prdType != '') { + var type = SystemType[store.state.training.prdType]; + var status = StationControlType[control.state.status]; menu = [...menuObj[type]]; if (menu.constructor === Array) { menu.forEach(elem => { @@ -508,8 +509,8 @@ export function menuFiltration(menuObj) { */ export function trainMenuFiltration(menuObj) { var menu = []; - if (store.state.map.prdType != '') { - var type = SystemType[store.state.map.prdType]; + if (store.state.training.prdType != '') { + var type = SystemType[store.state.training.prdType]; menu = [...menuObj[type]]; if (menu.constructor === Array) { menu.forEach(elem => { diff --git a/src/jmap/theme/beijing_01/menus/dialog/routeControl.vue b/src/jmap/theme/beijing_01/menus/dialog/routeControl.vue index 62b586ff1..94625989c 100644 --- a/src/jmap/theme/beijing_01/menus/dialog/routeControl.vue +++ b/src/jmap/theme/beijing_01/menus/dialog/routeControl.vue @@ -114,10 +114,10 @@ }, //取消列车进路 cancelTrainRoute() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { /** 现地工作站*/ this.cancelTrainRouteByLocal(); - } else if (this.$store.state.map.prdType == '02') { + } else if (this.$store.state.training.prdType == '02') { /** 行调工作站*/ this.cancelTrainRouteByCentral(); } diff --git a/src/jmap/theme/beijing_01/menus/index.vue b/src/jmap/theme/beijing_01/menus/index.vue index 96aade877..3761abda0 100644 --- a/src/jmap/theme/beijing_01/menus/index.vue +++ b/src/jmap/theme/beijing_01/menus/index.vue @@ -75,7 +75,7 @@ this.$route.params.mode !== 'plan' }, isShowBar() { - return this.$store.state.map.prdType != ''; + return this.$store.state.training.prdType != ''; }, }, diff --git a/src/jmap/theme/beijing_01/menus/menuBar.vue b/src/jmap/theme/beijing_01/menus/menuBar.vue index 97e4ac2f6..67cd0f806 100644 --- a/src/jmap/theme/beijing_01/menus/menuBar.vue +++ b/src/jmap/theme/beijing_01/menus/menuBar.vue @@ -698,7 +698,7 @@ '$store.state.training.started': function (val) { this.closeMenu(true); }, - '$store.state.map.prdType': function () { + '$store.state.training.prdType': function () { this.initMenu(); } }, @@ -730,7 +730,7 @@ return list; }, initMenu(menu) { - this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode); + this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode); this.menu[2].children = this.initStationList(); this.clickEvent(); this.closeMenu(true); diff --git a/src/jmap/theme/beijing_01/menus/menuButton.vue b/src/jmap/theme/beijing_01/menus/menuButton.vue index 0220568d0..bb22c5531 100644 --- a/src/jmap/theme/beijing_01/menus/menuButton.vue +++ b/src/jmap/theme/beijing_01/menus/menuButton.vue @@ -229,7 +229,7 @@ return OperationEvent.Signal; }, isShowBtn() { - return this.$store.state.map.prdType == '01'; + return this.$store.state.training.prdType == '01'; } }, watch: { diff --git a/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue b/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue index 7794565f6..0f9ee4b72 100644 --- a/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue +++ b/src/jmap/theme/beijing_01/menus/menuDialog/viewDevice.vue @@ -114,46 +114,46 @@ }) }, setDeviceDisplay() { - let show = false; - let deviceList = []; + // let show = false; + // let deviceList = []; - //区段边界设置 - let sectionList = this.$store.getters['map/sectionList']; - if (sectionList && sectionList.length > 0) { - sectionList.forEach(elem => { - //区段边界 - show = this.deviceLevels.indexOf(2) !== -1 ? true : false; - elem.borderBorderShow = show; - deviceList.push(elem); - }); - } + // //区段边界设置 + // let sectionList = this.$store.getters['map/sectionList']; + // if (sectionList && sectionList.length > 0) { + // sectionList.forEach(elem => { + // //区段边界 + // show = this.deviceLevels.indexOf(2) !== -1 ? true : false; + // elem.borderBorderShow = show; + // deviceList.push(elem); + // }); + // } - //车次窗设置 - let trainWindowList = this.$store.getters['map/trainWindowList']; - if (trainWindowList && trainWindowList.length > 0) { - trainWindowList.forEach(elem => { - //车次窗 - show = this.deviceLevels.indexOf(1) !== -1 ? true : false; - elem.trainWindowShow = show; - deviceList.push(elem); - }); - } + // //车次窗设置 + // let trainWindowList = this.$store.getters['map/trainWindowList']; + // if (trainWindowList && trainWindowList.length > 0) { + // trainWindowList.forEach(elem => { + // //车次窗 + // show = this.deviceLevels.indexOf(1) !== -1 ? true : false; + // elem.trainWindowShow = show; + // deviceList.push(elem); + // }); + // } - //联锁自动进路表示灯和ATS自动触发表示灯设置 - let signalList = this.$store.getters['map/signalList']; - if (signalList && signalList.length > 0) { - signalList.forEach(elem => { - //联锁自动进路表示灯 - show = this.deviceLevels.indexOf(3) !== -1 ? true : false; - elem.linkageAutoRouteShow = show; - //ATS自动触发表示灯 - show = this.deviceLevels.indexOf(4) !== -1 ? true : false; - elem.atsAutoTriggerShow = show; - deviceList.push(elem); - }) - } + // //联锁自动进路表示灯和ATS自动触发表示灯设置 + // let signalList = this.$store.getters['map/signalList']; + // if (signalList && signalList.length > 0) { + // signalList.forEach(elem => { + // //联锁自动进路表示灯 + // show = this.deviceLevels.indexOf(3) !== -1 ? true : false; + // elem.linkageAutoRouteShow = show; + // //ATS自动触发表示灯 + // show = this.deviceLevels.indexOf(4) !== -1 ? true : false; + // elem.atsAutoTriggerShow = show; + // deviceList.push(elem); + // }) + // } - this.$store.dispatch('map/updateMapView', deviceList); + // this.$store.dispatch('map/updateMapDevices', deviceList); } } } diff --git a/src/jmap/theme/beijing_01/menus/menuDialog/viewName.vue b/src/jmap/theme/beijing_01/menus/menuDialog/viewName.vue index ae3ab73ac..39ae6bb83 100644 --- a/src/jmap/theme/beijing_01/menus/menuDialog/viewName.vue +++ b/src/jmap/theme/beijing_01/menus/menuDialog/viewName.vue @@ -147,116 +147,116 @@ }) }, setNameDisplay() { - let show = false; - let deviceList = []; + // let show = false; + // let deviceList = []; - //信号机 - show = this.nameLevels.indexOf(1) !== -1 ? true : false; - let signalList = this.$store.getters['map/signalList']; - if (signalList && signalList.length > 0) { - signalList.forEach(elem => { - elem.nameShow = show; - deviceList.push(elem); - }) - } + // //信号机 + // show = this.nameLevels.indexOf(1) !== -1 ? true : false; + // let signalList = this.$store.getters['map/signalList']; + // if (signalList && signalList.length > 0) { + // signalList.forEach(elem => { + // elem.nameShow = show; + // deviceList.push(elem); + // }) + // } - //按钮名称 - show = this.nameLevels.indexOf(3) !== -1 ? true : false; + // //按钮名称 + // show = this.nameLevels.indexOf(3) !== -1 ? true : false; - //道岔 - let switchList = this.$store.getters['map/switchList']; - if (switchList && switchList.length > 0) { - switchList.forEach(elem => { - //道岔名称 - show = this.nameLevels.indexOf(7) !== -1 ? true : false; - elem.nameShow = show; - //道岔轨名称 - show = this.nameLevels.indexOf(9) !== -1 ? true : false; - elem.switchSectionNameShow = show; - deviceList.push(elem); - }) - } + // //道岔 + // let switchList = this.$store.getters['map/switchList']; + // if (switchList && switchList.length > 0) { + // switchList.forEach(elem => { + // //道岔名称 + // show = this.nameLevels.indexOf(7) !== -1 ? true : false; + // elem.nameShow = show; + // //道岔轨名称 + // show = this.nameLevels.indexOf(9) !== -1 ? true : false; + // elem.switchSectionNameShow = show; + // deviceList.push(elem); + // }) + // } - //控制模式 - show = this.nameLevels.indexOf(8) !== -1 ? true : false; - let control = this.$store.getters['map/stationControlList']; - if (control && control.length > 0) { - control.forEach(elem => { - //标识灯名称 - elem.indicatorShow = show; - deviceList.push(elem); - }) - } + // //控制模式 + // show = this.nameLevels.indexOf(8) !== -1 ? true : false; + // let control = this.$store.getters['map/stationControlList']; + // if (control && control.length > 0) { + // control.forEach(elem => { + // //标识灯名称 + // elem.indicatorShow = show; + // deviceList.push(elem); + // }) + // } - //区段 - let sectionList = this.$store.getters['map/sectionList']; - if (sectionList && sectionList.length > 0) { - sectionList.forEach(elem => { - if (elem.isSwitchSection && elem.parentCode) { - //道岔轨的区段名称默认不显示 - elem.nameShow = false; - } else { - if (elem.type === '01') { - show = this.nameLevels.indexOf(11) !== -1 ? true : false; - elem.nameShow = show; - } else if (elem.type === '02') { - //股道轨名称 - show = this.nameLevels.indexOf(5) !== -1 ? true : false; - elem.nameShow = show; - } else if (elem.type === '03') { - //道岔区段名称 - show = this.nameLevels.indexOf(9) !== -1 ? true : false; - elem.nameShow = show; - } - } + // //区段 + // let sectionList = this.$store.getters['map/sectionList']; + // if (sectionList && sectionList.length > 0) { + // sectionList.forEach(elem => { + // if (elem.isSwitchSection && elem.parentCode) { + // //道岔轨的区段名称默认不显示 + // elem.nameShow = false; + // } else { + // if (elem.type === '01') { + // show = this.nameLevels.indexOf(11) !== -1 ? true : false; + // elem.nameShow = show; + // } else if (elem.type === '02') { + // //股道轨名称 + // show = this.nameLevels.indexOf(5) !== -1 ? true : false; + // elem.nameShow = show; + // } else if (elem.type === '03') { + // //道岔区段名称 + // show = this.nameLevels.indexOf(9) !== -1 ? true : false; + // elem.nameShow = show; + // } + // } - //站台轨名称 - if (elem.isStandTrack) { - show = this.nameLevels.indexOf(2) !== -1 ? true : false; - elem.standTrackNameShow = show; - } + // //站台轨名称 + // if (elem.isStandTrack) { + // show = this.nameLevels.indexOf(2) !== -1 ? true : false; + // elem.standTrackNameShow = show; + // } - //折返轨名称 - if (elem.isReentryTrack) { - show = this.nameLevels.indexOf(4) !== -1 ? true : false; - elem.reentryTrackNameShow = show; - } + // //折返轨名称 + // if (elem.isReentryTrack) { + // show = this.nameLevels.indexOf(4) !== -1 ? true : false; + // elem.reentryTrackNameShow = show; + // } - //转换轨名称 - if (elem.isTransferTrack) { - show = this.nameLevels.indexOf(6) !== -1 ? true : false; - elem.transferTrackNameShow = show; - } + // //转换轨名称 + // if (elem.isTransferTrack) { + // show = this.nameLevels.indexOf(6) !== -1 ? true : false; + // elem.transferTrackNameShow = show; + // } - deviceList.push(elem); - }) - } + // deviceList.push(elem); + // }) + // } - //停车点 - show = this.nameLevels.indexOf(10) !== -1 ? true : false; - let stopPointList = this.$store.getters['map/stopPointList']; - if (stopPointList && stopPointList.length > 0) { - stopPointList.forEach(elem => { - //目的地名称 - elem.destCodeShow = show; - deviceList.push(elem); - }) - } + // //停车点 + // show = this.nameLevels.indexOf(10) !== -1 ? true : false; + // let stopPointList = this.$store.getters['map/stopPointList']; + // if (stopPointList && stopPointList.length > 0) { + // stopPointList.forEach(elem => { + // //目的地名称 + // elem.destCodeShow = show; + // deviceList.push(elem); + // }) + // } - //车站 - show = this.nameLevels.indexOf(12) !== -1 ? true : false; - let stationList = this.$store.getters['map/stationList']; - if (stationList && stationList.length > 0) { - stationList.forEach(elem => { - //公里标 - elem.kmPostShow = show; - deviceList.push(elem); + // //车站 + // show = this.nameLevels.indexOf(12) !== -1 ? true : false; + // let stationList = this.$store.getters['map/stationList']; + // if (stationList && stationList.length > 0) { + // stationList.forEach(elem => { + // //公里标 + // elem.kmPostShow = show; + // deviceList.push(elem); - }) - } + // }) + // } - this.$store.dispatch('map/updateMapView', deviceList); + // this.$store.dispatch('map/updateMapDevices', deviceList); } } } diff --git a/src/jmap/theme/beijing_01/menus/menuDialog/viewTrainId.vue b/src/jmap/theme/beijing_01/menus/menuDialog/viewTrainId.vue index d97963dd9..4b4414847 100644 --- a/src/jmap/theme/beijing_01/menus/menuDialog/viewTrainId.vue +++ b/src/jmap/theme/beijing_01/menus/menuDialog/viewTrainId.vue @@ -155,17 +155,17 @@ }) }, setTrainDispaly() { - let trainList = this.$store.getters['training/viewTrainList']; - if (trainList && trainList.length > 0) { - let planFormat = this.trainNameFormatBy(this.planMode); - let nameFontSize = this.fontSize; - trainList.forEach(elem => { - elem.nameFormat = planFormat; - elem.nameFontSize = nameFontSize; - }); + // let trainList = this.$store.getters['training/viewTrainList']; + // if (trainList && trainList.length > 0) { + // let planFormat = this.trainNameFormatBy(this.planMode); + // let nameFontSize = this.fontSize; + // trainList.forEach(elem => { + // elem.nameFormat = planFormat; + // elem.nameFontSize = nameFontSize; + // }); - this.$store.dispatch('map/updateMapView', trainList); - } + // this.$store.dispatch('map/updateMapDevices', trainList); + // } }, trainNameFormatBy(mode) { switch (mode.toString()) { diff --git a/src/jmap/theme/beijing_01/menus/passiveDialog/control.vue b/src/jmap/theme/beijing_01/menus/passiveDialog/control.vue index 6faca033e..0512ddb23 100644 --- a/src/jmap/theme/beijing_01/menus/passiveDialog/control.vue +++ b/src/jmap/theme/beijing_01/menus/passiveDialog/control.vue @@ -69,10 +69,10 @@ }, computed: { targetStatus() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { return '01'; } - if (this.$store.state.map.prdType == '02') { + if (this.$store.state.training.prdType == '02') { return '02' } }, @@ -237,7 +237,7 @@ type: MapDeviceType.StationControl.type, operation: OperationEvent.StationControl.controlResponse.agree.operation, val: this.selection[0].code, - prdType: this.$store.state.map.prdType + prdType: this.$store.state.training.prdType } this.clearTimer(); @@ -258,7 +258,7 @@ type: MapDeviceType.StationControl.type, operation: OperationEvent.StationControl.controlResponse.refuse.operation, val: this.tableData[0].code, - prdType: this.$store.state.map.prdType + prdType: this.$store.state.training.prdType } this.clearTimer(); diff --git a/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js b/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js index cf2d42c7d..ca24ef158 100644 --- a/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js +++ b/src/jmap/theme/beijing_01/menus/utils/menuItemStatus.js @@ -494,20 +494,19 @@ export function menuFiltration(menuObj) { var selected = store.getters['menuOperation/selected']; var control; var menu = []; + if (selected._type == 'StationStand') { - control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode); + control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode); } else if (selected._type == 'Station') { - control = store.getters['map/getStationControlByStationCode'](selected.code); - } else if (selected._type == 'LimitControl') { - control = store.getters['map/getStationControlByStationCode'](selected.code); + control = store.getters['map/getStationControlByStationCode'](selected.model.code); } else { - control = store.getters['map/getStationControlByStationCode'](selected.stationCode); + control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode); } + if (control) { - const controlStatus = getStatusObject(control); - if (store.state.map.prdType != '') { - const type = SystemType[store.state.map.prdType]; - const status = StationControlType[controlStatus.status]; + if (store.state.training.prdType != '') { + const type = SystemType[store.state.training.prdType]; + const status = StationControlType[control.state.status]; menu = [...menuObj[type]]; if (menu.constructor === Array) { menu.forEach(elem => { @@ -518,7 +517,7 @@ export function menuFiltration(menuObj) { if (elem.auth.constructor === Object) { elem.show = true; - if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示 + if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示 elem.show = false; } elem.defaultDisabled = !elem.auth[status]; @@ -535,8 +534,8 @@ export function menuFiltration(menuObj) { */ export function trainMenuFiltration(menuObj) { var menu = []; - if (store.state.map.prdType != '') { - const type = SystemType[store.state.map.prdType]; + if (store.state.training.prdType != '') { + const type = SystemType[store.state.training.prdType]; menu = [...menuObj[type]]; if (menu.constructor === Array) { menu.forEach(elem => { @@ -547,7 +546,7 @@ export function trainMenuFiltration(menuObj) { if (elem.auth.constructor === Object) { elem.show = true; - if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示 + if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示 elem.show = false; } } diff --git a/src/jmap/theme/beijing_01/menusPlan/chooseTemplatePlan.vue b/src/jmap/theme/beijing_01/menusPlan/chooseTemplatePlan.vue index 721ec4684..9677b8e13 100644 --- a/src/jmap/theme/beijing_01/menusPlan/chooseTemplatePlan.vue +++ b/src/jmap/theme/beijing_01/menusPlan/chooseTemplatePlan.vue @@ -82,7 +82,7 @@ }, queryFunction(params) { if (this.$store.state.map && this.$store.state.map.map) { - params['skinStyle'] = this.$store.state.map.map.skinStyle; + params['skinStyle'] = this.$store.getters['map/skinStyle']; } return runPlanTemplateList(params); }, diff --git a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue index fce4c328a..9db58acca 100644 --- a/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/beijing_01/menusPlan/createTodayPlan.vue @@ -86,7 +86,7 @@ }, queryFunction(params) { if (this.$store.state.map && this.$store.state.map.map) { - params['skinStyle'] = this.$store.state.map.map.skinStyle; + params['skinStyle'] = this.$store.getters['map/skinStyle']; } return runPlanTemplateList(params); }, diff --git a/src/jmap/theme/chengdou_03/menus/dialog/routeControl.vue b/src/jmap/theme/chengdou_03/menus/dialog/routeControl.vue index 7b9c86dd9..237523881 100644 --- a/src/jmap/theme/chengdou_03/menus/dialog/routeControl.vue +++ b/src/jmap/theme/chengdou_03/menus/dialog/routeControl.vue @@ -140,10 +140,10 @@ }, //取消列车进路 cancelTrainRoute() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { /** 现地工作站*/ this.cancelTrainRouteByLocal(); - } else if (this.$store.state.map.prdType == '02') { + } else if (this.$store.state.training.prdType == '02') { /** 行调工作站*/ this.cancelTrainRouteByCentral(); } diff --git a/src/jmap/theme/chengdou_03/menus/index.vue b/src/jmap/theme/chengdou_03/menus/index.vue index 6590ced81..2cb7de849 100644 --- a/src/jmap/theme/chengdou_03/menus/index.vue +++ b/src/jmap/theme/chengdou_03/menus/index.vue @@ -73,7 +73,7 @@ this.$route.params.mode !== 'plan' }, isShowBar() { - return this.$store.state.map.prdType != ''; + return this.$store.state.training.prdType != ''; } }, data() { diff --git a/src/jmap/theme/chengdou_03/menus/menuBar.vue b/src/jmap/theme/chengdou_03/menus/menuBar.vue index 58b00a99e..4951008ed 100644 --- a/src/jmap/theme/chengdou_03/menus/menuBar.vue +++ b/src/jmap/theme/chengdou_03/menus/menuBar.vue @@ -698,7 +698,7 @@ '$store.state.training.started': function (val) { this.closeMenu(true); }, - '$store.state.map.prdType': function () { + '$store.state.training.prdType': function () { this.initMenu(); } }, @@ -730,7 +730,7 @@ return list; }, initMenu(menu) { - this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode); + this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode); this.menu[2].children = this.initStationList(); this.clickEvent(); this.closeMenu(true); diff --git a/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue b/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue index 432a3511b..f94f60716 100644 --- a/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue +++ b/src/jmap/theme/chengdou_03/menus/menuDialog/viewDevice.vue @@ -114,46 +114,46 @@ }) }, setDeviceDisplay() { - let show = false; - let deviceList = []; + // let show = false; + // let deviceList = []; - //区段边界设置 - let sectionList = this.$store.getters['map/sectionList']; - if (sectionList && sectionList.length > 0) { - sectionList.forEach(elem => { - //区段边界 - show = this.deviceLevels.indexOf(2) !== -1 ? true : false; - elem.borderBorderShow = show; - deviceList.push(elem); - }); - } + // //区段边界设置 + // let sectionList = this.$store.getters['map/sectionList']; + // if (sectionList && sectionList.length > 0) { + // sectionList.forEach(elem => { + // //区段边界 + // show = this.deviceLevels.indexOf(2) !== -1 ? true : false; + // elem.borderBorderShow = show; + // deviceList.push(elem); + // }); + // } - //车次窗设置 - let trainWindowList = this.$store.getters['map/trainWindowList']; - if (trainWindowList && trainWindowList.length > 0) { - trainWindowList.forEach(elem => { - //车次窗 - show = this.deviceLevels.indexOf(1) !== -1 ? true : false; - elem.trainWindowShow = show; - deviceList.push(elem); - }); - } + // //车次窗设置 + // let trainWindowList = this.$store.getters['map/trainWindowList']; + // if (trainWindowList && trainWindowList.length > 0) { + // trainWindowList.forEach(elem => { + // //车次窗 + // show = this.deviceLevels.indexOf(1) !== -1 ? true : false; + // elem.trainWindowShow = show; + // deviceList.push(elem); + // }); + // } - //联锁自动进路表示灯和ATS自动触发表示灯设置 - let signalList = this.$store.getters['map/signalList']; - if (signalList && signalList.length > 0) { - signalList.forEach(elem => { - //联锁自动进路表示灯 - show = this.deviceLevels.indexOf(3) !== -1 ? true : false; - elem.linkageAutoRouteShow = show; - //ATS自动触发表示灯 - show = this.deviceLevels.indexOf(4) !== -1 ? true : false; - elem.atsAutoTriggerShow = show; - deviceList.push(elem); - }) - } + // //联锁自动进路表示灯和ATS自动触发表示灯设置 + // let signalList = this.$store.getters['map/signalList']; + // if (signalList && signalList.length > 0) { + // signalList.forEach(elem => { + // //联锁自动进路表示灯 + // show = this.deviceLevels.indexOf(3) !== -1 ? true : false; + // elem.linkageAutoRouteShow = show; + // //ATS自动触发表示灯 + // show = this.deviceLevels.indexOf(4) !== -1 ? true : false; + // elem.atsAutoTriggerShow = show; + // deviceList.push(elem); + // }) + // } - this.$store.dispatch('map/updateMapView', deviceList); + // this.$store.dispatch('map/updateMapDevices', deviceList); } } } diff --git a/src/jmap/theme/chengdou_03/menus/menuDialog/viewName.vue b/src/jmap/theme/chengdou_03/menus/menuDialog/viewName.vue index d892b724a..ffd4a4e2d 100644 --- a/src/jmap/theme/chengdou_03/menus/menuDialog/viewName.vue +++ b/src/jmap/theme/chengdou_03/menus/menuDialog/viewName.vue @@ -147,116 +147,116 @@ }) }, setNameDisplay() { - let show = false; - let deviceList = []; + // let show = false; + // let deviceList = []; - //信号机 - show = this.nameLevels.indexOf(1) !== -1 ? true : false; - let signalList = this.$store.getters['map/signalList']; - if (signalList && signalList.length > 0) { - signalList.forEach(elem => { - elem.nameShow = show; - deviceList.push(elem); - }) - } + // //信号机 + // show = this.nameLevels.indexOf(1) !== -1 ? true : false; + // let signalList = this.$store.getters['map/signalList']; + // if (signalList && signalList.length > 0) { + // signalList.forEach(elem => { + // elem.nameShow = show; + // deviceList.push(elem); + // }) + // } - //按钮名称 - show = this.nameLevels.indexOf(3) !== -1 ? true : false; + // //按钮名称 + // show = this.nameLevels.indexOf(3) !== -1 ? true : false; - //道岔 - let switchList = this.$store.getters['map/switchList']; - if (switchList && switchList.length > 0) { - switchList.forEach(elem => { - //道岔名称 - show = this.nameLevels.indexOf(7) !== -1 ? true : false; - elem.nameShow = show; - //道岔轨名称 - show = this.nameLevels.indexOf(9) !== -1 ? true : false; - elem.switchSectionNameShow = show; - deviceList.push(elem); - }) - } + // //道岔 + // let switchList = this.$store.getters['map/switchList']; + // if (switchList && switchList.length > 0) { + // switchList.forEach(elem => { + // //道岔名称 + // show = this.nameLevels.indexOf(7) !== -1 ? true : false; + // elem.nameShow = show; + // //道岔轨名称 + // show = this.nameLevels.indexOf(9) !== -1 ? true : false; + // elem.switchSectionNameShow = show; + // deviceList.push(elem); + // }) + // } - //控制模式 - show = this.nameLevels.indexOf(8) !== -1 ? true : false; - let control = this.$store.getters['map/stationControlList']; - if (control && control.length > 0) { - control.forEach(elem => { - //标识灯名称 - elem.indicatorShow = show; - deviceList.push(elem); - }) - } + // //控制模式 + // show = this.nameLevels.indexOf(8) !== -1 ? true : false; + // let control = this.$store.getters['map/stationControlList']; + // if (control && control.length > 0) { + // control.forEach(elem => { + // //标识灯名称 + // elem.indicatorShow = show; + // deviceList.push(elem); + // }) + // } - //区段 - let sectionList = this.$store.getters['map/sectionList']; - if (sectionList && sectionList.length > 0) { - sectionList.forEach(elem => { - if (elem.isSwitchSection && elem.parentCode) { - //道岔轨的区段名称默认不显示 - elem.nameShow = false; - } else { - if (elem.type === '01') { - show = this.nameLevels.indexOf(11) !== -1 ? true : false; - elem.nameShow = show; - } else if (elem.type === '02') { - //股道轨名称 - show = this.nameLevels.indexOf(5) !== -1 ? true : false; - elem.nameShow = show; - } else if (elem.type === '03') { - //道岔区段名称 - show = this.nameLevels.indexOf(9) !== -1 ? true : false; - elem.nameShow = show; - } - } + // //区段 + // let sectionList = this.$store.getters['map/sectionList']; + // if (sectionList && sectionList.length > 0) { + // sectionList.forEach(elem => { + // if (elem.isSwitchSection && elem.parentCode) { + // //道岔轨的区段名称默认不显示 + // elem.nameShow = false; + // } else { + // if (elem.type === '01') { + // show = this.nameLevels.indexOf(11) !== -1 ? true : false; + // elem.nameShow = show; + // } else if (elem.type === '02') { + // //股道轨名称 + // show = this.nameLevels.indexOf(5) !== -1 ? true : false; + // elem.nameShow = show; + // } else if (elem.type === '03') { + // //道岔区段名称 + // show = this.nameLevels.indexOf(9) !== -1 ? true : false; + // elem.nameShow = show; + // } + // } - //站台轨名称 - if (elem.isStandTrack) { - show = this.nameLevels.indexOf(2) !== -1 ? true : false; - elem.standTrackNameShow = show; - } + // //站台轨名称 + // if (elem.isStandTrack) { + // show = this.nameLevels.indexOf(2) !== -1 ? true : false; + // elem.standTrackNameShow = show; + // } - //折返轨名称 - if (elem.isReentryTrack) { - show = this.nameLevels.indexOf(4) !== -1 ? true : false; - elem.reentryTrackNameShow = show; - } + // //折返轨名称 + // if (elem.isReentryTrack) { + // show = this.nameLevels.indexOf(4) !== -1 ? true : false; + // elem.reentryTrackNameShow = show; + // } - //转换轨名称 - if (elem.isTransferTrack) { - show = this.nameLevels.indexOf(6) !== -1 ? true : false; - elem.transferTrackNameShow = show; - } + // //转换轨名称 + // if (elem.isTransferTrack) { + // show = this.nameLevels.indexOf(6) !== -1 ? true : false; + // elem.transferTrackNameShow = show; + // } - deviceList.push(elem); - }) - } + // deviceList.push(elem); + // }) + // } - //停车点 - show = this.nameLevels.indexOf(10) !== -1 ? true : false; - let stopPointList = this.$store.getters['map/stopPointList']; - if (stopPointList && stopPointList.length > 0) { - stopPointList.forEach(elem => { - //目的地名称 - elem.destCodeShow = show; - deviceList.push(elem); - }) - } + // //停车点 + // show = this.nameLevels.indexOf(10) !== -1 ? true : false; + // let stopPointList = this.$store.getters['map/stopPointList']; + // if (stopPointList && stopPointList.length > 0) { + // stopPointList.forEach(elem => { + // //目的地名称 + // elem.destCodeShow = show; + // deviceList.push(elem); + // }) + // } - //车站 - show = this.nameLevels.indexOf(12) !== -1 ? true : false; - let stationList = this.$store.getters['map/stationList']; - if (stationList && stationList.length > 0) { - stationList.forEach(elem => { - //公里标 - elem.kmPostShow = show; - deviceList.push(elem); + // //车站 + // show = this.nameLevels.indexOf(12) !== -1 ? true : false; + // let stationList = this.$store.getters['map/stationList']; + // if (stationList && stationList.length > 0) { + // stationList.forEach(elem => { + // //公里标 + // elem.kmPostShow = show; + // deviceList.push(elem); - }) - } + // }) + // } - this.$store.dispatch('map/updateMapView', deviceList); + // this.$store.dispatch('map/updateMapDevices', deviceList); } } } diff --git a/src/jmap/theme/chengdou_03/menus/menuDialog/viewTrainId.vue b/src/jmap/theme/chengdou_03/menus/menuDialog/viewTrainId.vue index 3e8ad4617..55280864b 100644 --- a/src/jmap/theme/chengdou_03/menus/menuDialog/viewTrainId.vue +++ b/src/jmap/theme/chengdou_03/menus/menuDialog/viewTrainId.vue @@ -155,17 +155,17 @@ }) }, setTrainDispaly() { - let trainList = this.$store.getters['training/viewTrainList']; - if (trainList && trainList.length > 0) { - let planFormat = this.trainNameFormatBy(this.planMode); - let nameFontSize = this.fontSize; - trainList.forEach(elem => { - elem.nameFormat = planFormat; - elem.nameFontSize = nameFontSize; - }); + // let trainList = this.$store.getters['training/viewTrainList']; + // if (trainList && trainList.length > 0) { + // let planFormat = this.trainNameFormatBy(this.planMode); + // let nameFontSize = this.fontSize; + // trainList.forEach(elem => { + // elem.nameFormat = planFormat; + // elem.nameFontSize = nameFontSize; + // }); - this.$store.dispatch('map/updateMapView', trainList); - } + // this.$store.dispatch('map/updateMapDevices', trainList); + // } }, trainNameFormatBy(mode) { switch (mode.toString()) { diff --git a/src/jmap/theme/chengdou_03/menus/passiveDialog/control.vue b/src/jmap/theme/chengdou_03/menus/passiveDialog/control.vue index 9683d66af..c9ec4589c 100644 --- a/src/jmap/theme/chengdou_03/menus/passiveDialog/control.vue +++ b/src/jmap/theme/chengdou_03/menus/passiveDialog/control.vue @@ -69,10 +69,10 @@ }, computed: { targetStatus() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { return '01'; } - if (this.$store.state.map.prdType == '02') { + if (this.$store.state.training.prdType == '02') { return '02' } }, @@ -237,7 +237,7 @@ type: MapDeviceType.StationControl.type, operation: OperationEvent.StationControl.controlResponse.agree.operation, val: this.selection[0].code, - prdType: this.$store.state.map.prdType + prdType: this.$store.state.training.prdType } this.clearTimer(); @@ -258,7 +258,7 @@ type: MapDeviceType.StationControl.type, operation: OperationEvent.StationControl.controlResponse.refuse.operation, val: this.tableData[0].code, - prdType: this.$store.state.map.prdType + prdType: this.$store.state.training.prdType } this.clearTimer(); diff --git a/src/jmap/theme/chengdou_03/menus/utils/menuItemStatus.js b/src/jmap/theme/chengdou_03/menus/utils/menuItemStatus.js index 214755c09..0d74ba071 100644 --- a/src/jmap/theme/chengdou_03/menus/utils/menuItemStatus.js +++ b/src/jmap/theme/chengdou_03/menus/utils/menuItemStatus.js @@ -514,20 +514,19 @@ export function menuFiltration(menuObj) { var selected = store.getters['menuOperation/selected']; var control; var menu = []; + if (selected._type == 'StationStand') { - control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode); + control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode); } else if (selected._type == 'Station') { - control = store.getters['map/getStationControlByStationCode'](selected.code); - } else if (selected._type == 'LimitControl') { - control = store.getters['map/getStationControlByStationCode'](selected.code); + control = store.getters['map/getStationControlByStationCode'](selected.model.code); } else { - control = store.getters['map/getStationControlByStationCode'](selected.stationCode); + control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode); } + if (control) { - const controlStatus = (control || {}).state; - if (store.state.map.prdType != '') { - const type = SystemType[store.state.map.prdType]; - const status = StationControlType[controlStatus.status]; + if (store.state.training.prdType != '') { + const type = SystemType[store.state.training.prdType]; + const status = StationControlType[control.state.status]; menu = [...menuObj[type]]; if (menu.constructor === Array) { menu.forEach(elem => { @@ -555,8 +554,8 @@ export function menuFiltration(menuObj) { */ export function trainMenuFiltration(menuObj) { var menu = []; - if (store.state.map.prdType != '') { - var type = SystemType[store.state.map.prdType]; + if (store.state.training.prdType != '') { + var type = SystemType[store.state.training.prdType]; menu = [...menuObj[type]]; if (menu.constructor === Array) { menu.forEach(elem => { diff --git a/src/jmap/theme/chengdou_03/menusPlan/chooseTemplatePlan.vue b/src/jmap/theme/chengdou_03/menusPlan/chooseTemplatePlan.vue index 721ec4684..9677b8e13 100644 --- a/src/jmap/theme/chengdou_03/menusPlan/chooseTemplatePlan.vue +++ b/src/jmap/theme/chengdou_03/menusPlan/chooseTemplatePlan.vue @@ -82,7 +82,7 @@ }, queryFunction(params) { if (this.$store.state.map && this.$store.state.map.map) { - params['skinStyle'] = this.$store.state.map.map.skinStyle; + params['skinStyle'] = this.$store.getters['map/skinStyle']; } return runPlanTemplateList(params); }, diff --git a/src/jmap/theme/chengdou_03/menusPlan/createTodayPlan.vue b/src/jmap/theme/chengdou_03/menusPlan/createTodayPlan.vue index fce4c328a..9db58acca 100644 --- a/src/jmap/theme/chengdou_03/menusPlan/createTodayPlan.vue +++ b/src/jmap/theme/chengdou_03/menusPlan/createTodayPlan.vue @@ -86,7 +86,7 @@ }, queryFunction(params) { if (this.$store.state.map && this.$store.state.map.map) { - params['skinStyle'] = this.$store.state.map.map.skinStyle; + params['skinStyle'] = this.$store.getters['map/skinStyle']; } return runPlanTemplateList(params); }, diff --git a/src/jmap/theme/fuzhou_01/menus/dialog/routeControl.vue b/src/jmap/theme/fuzhou_01/menus/dialog/routeControl.vue index 1651001da..59cbc1868 100644 --- a/src/jmap/theme/fuzhou_01/menus/dialog/routeControl.vue +++ b/src/jmap/theme/fuzhou_01/menus/dialog/routeControl.vue @@ -132,10 +132,10 @@ }, //取消列车进路 cancelTrainRoute() { - if (this.$store.state.map.prdType == '01') { + if (this.$store.state.training.prdType == '01') { /** 现地工作站*/ this.cancelTrainRouteByLocal(); - } else if (this.$store.state.map.prdType == '02') { + } else if (this.$store.state.training.prdType == '02') { /** 行调工作站*/ this.cancelTrainRouteByCentral(); } diff --git a/src/jmap/theme/fuzhou_01/menus/index.vue b/src/jmap/theme/fuzhou_01/menus/index.vue index e2a16821c..f295533d3 100644 --- a/src/jmap/theme/fuzhou_01/menus/index.vue +++ b/src/jmap/theme/fuzhou_01/menus/index.vue @@ -3,9 +3,6 @@