From 5f0816c2d6f79a6b26340b0f93f2ef502dae449b Mon Sep 17 00:00:00 2001 From: fan Date: Fri, 9 Dec 2022 16:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=97=E4=BA=AC=E4=BA=8C=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 2 +- src/jmapNew/shape/graph/Line/index.js | 2 +- src/jmapNew/theme/factory.js | 4 +- .../theme/haerbin_01/menus/menuButton.vue | 10 +- .../nanjing_02/menus/dispatchWorkMenu.vue | 439 +++++ .../menus/dispatchWorkMenuButton.vue | 1525 ++++++++++++++++ .../theme/nanjing_02/menus/localWorkMenu.vue | 457 +++++ .../nanjing_02/menus/localWorkMenuBar.vue | 670 +++++++ .../nanjing_02/menus/localWorkMenuButton.vue | 1605 +++++++++++++++++ .../theme/nanjing_02/menus/menuSection.vue | 13 +- .../theme/nanjing_02/menus/menuSignal.vue | 6 - .../theme/nanjing_02/menus/menuStation.vue | 10 +- .../nanjing_02/menus/menuStationStand.vue | 25 +- .../theme/nanjing_02/menus/menuSwitch.vue | 3 +- .../theme/nanjing_02/menus/menuTrain.vue | 126 +- .../display/stationDiagram/jlmap/index.vue | 1 - .../terminals/displayBaSiDi/baSiDi.vue | 13 +- .../display/terminals/displayBaSiDi/index.vue | 53 +- .../display/terminals/displayBaSiDi/rps.vue | 103 +- .../display/terminals/displayBaSiDi/tro.vue | 135 +- .../terminals/displayBaSiDi/troDetail.vue | 123 +- src/views/newMap/display/terminals/index.vue | 5 +- .../newMap/display/terminals/terminalMenu.vue | 9 +- 23 files changed, 4877 insertions(+), 462 deletions(-) create mode 100644 src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenu.vue create mode 100644 src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenuButton.vue create mode 100644 src/jmapNew/theme/nanjing_02/menus/localWorkMenu.vue create mode 100644 src/jmapNew/theme/nanjing_02/menus/localWorkMenuBar.vue create mode 100644 src/jmapNew/theme/nanjing_02/menus/localWorkMenuButton.vue diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index 7d63a7b0b..6f2a12293 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -432,7 +432,7 @@ class Jlmap { const type = elem._type; const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig); oDevice.showMode = showMode; - oDevice.instance && oDevice.model && oDevice.instance.setState(oDevice.model); + oDevice.instance && oDevice.instance.model && oDevice.instance.setState(oDevice.instance.model); }); this.$painter.$transformHandle.revisibleAll(); } diff --git a/src/jmapNew/shape/graph/Line/index.js b/src/jmapNew/shape/graph/Line/index.js index 8403236b4..1dbbe14c7 100644 --- a/src/jmapNew/shape/graph/Line/index.js +++ b/src/jmapNew/shape/graph/Line/index.js @@ -105,7 +105,7 @@ export default class Line2 extends Group { this.segment && this.segment.hide(); this.viceSegment && this.viceSegment.hide(); } else { - this.setLineType(model.type); + model && this.setLineType(model.type); } } recover() { diff --git a/src/jmapNew/theme/factory.js b/src/jmapNew/theme/factory.js index 4d159054c..cbaf5016e 100644 --- a/src/jmapNew/theme/factory.js +++ b/src/jmapNew/theme/factory.js @@ -109,12 +109,12 @@ class Theme { } // 加载行调菜单组件 loadDispatchWorkMenuComponent(code) { - if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07'].includes(code)) { + if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07', '14'].includes(code)) { return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/dispatchWorkMenu`).default); } } loadLocalWorkMenuComponent(code) { - if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07'].includes(code)) { + if (['02', '09', '10', '11', '16', '08', '03', '01', '04', '07', '14'].includes(code)) { return Object.assign({}, require(`./${this._mapMenu[code || this._code]}/menus/localWorkMenu`).default); } } diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index 31b3c0d22..57c964a55 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -799,7 +799,15 @@ export default { }); }, setSpeedLimitValue(val) { - this.speedLimitValue = val; + const operate = { + operation: OperationEvent.Section.setSpeed.choose.operation, + param: { speedLimitValue: val } + }; + this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => { + if (valid) { + this.speedLimitValue = val; + } + }); }, changeShowMode(flag) { if (this.work === 'localWork') { diff --git a/src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenu.vue b/src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenu.vue new file mode 100644 index 000000000..1c88cbd5d --- /dev/null +++ b/src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenu.vue @@ -0,0 +1,439 @@ + + + + + diff --git a/src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenuButton.vue b/src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenuButton.vue new file mode 100644 index 000000000..802102352 --- /dev/null +++ b/src/jmapNew/theme/nanjing_02/menus/dispatchWorkMenuButton.vue @@ -0,0 +1,1525 @@ + + + + + diff --git a/src/jmapNew/theme/nanjing_02/menus/localWorkMenu.vue b/src/jmapNew/theme/nanjing_02/menus/localWorkMenu.vue new file mode 100644 index 000000000..7af534495 --- /dev/null +++ b/src/jmapNew/theme/nanjing_02/menus/localWorkMenu.vue @@ -0,0 +1,457 @@ + + + + + diff --git a/src/jmapNew/theme/nanjing_02/menus/localWorkMenuBar.vue b/src/jmapNew/theme/nanjing_02/menus/localWorkMenuBar.vue new file mode 100644 index 000000000..215dec74c --- /dev/null +++ b/src/jmapNew/theme/nanjing_02/menus/localWorkMenuBar.vue @@ -0,0 +1,670 @@ + + + + diff --git a/src/jmapNew/theme/nanjing_02/menus/localWorkMenuButton.vue b/src/jmapNew/theme/nanjing_02/menus/localWorkMenuButton.vue new file mode 100644 index 000000000..865f2a8be --- /dev/null +++ b/src/jmapNew/theme/nanjing_02/menus/localWorkMenuButton.vue @@ -0,0 +1,1605 @@ + + + + + diff --git a/src/jmapNew/theme/nanjing_02/menus/menuSection.vue b/src/jmapNew/theme/nanjing_02/menus/menuSection.vue index 9ee0ee2d9..01cb72cdb 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuSection.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuSection.vue @@ -13,7 +13,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; -// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import LoadSpareTrain from '@/jmapNew/theme/components/menus/dialog/loadSpareTrain'; export default { @@ -34,12 +33,6 @@ export default { data() { return { menu: [], - menuNormal: { - Local: [ - ], - Center: [ - ] - }, menuForce: [ { label: '设置故障', @@ -101,11 +94,7 @@ export default { }, initMenu() { // 编辑模式菜单列表 - if (this.selected.type != '04') { - // this.menu = MenuContextHandler.covert(this.menuNormal); - } else { - this.menu = []; - } + this.menu = []; // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT && this.selected.type != '04') { this.menu = this.menuForce; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue b/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue index 159559f83..cb75601cb 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuSignal.vue @@ -31,12 +31,6 @@ export default { return { menu: [], systemName:'xian-01__systerm', - menuNormal: { - Local: [ - ], - Center: [ - ] - }, menuForce: [ { label: '设置故障', diff --git a/src/jmapNew/theme/nanjing_02/menus/menuStation.vue b/src/jmapNew/theme/nanjing_02/menus/menuStation.vue index 223794f1c..65a915235 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuStation.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuStation.vue @@ -12,7 +12,6 @@ import { OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; -// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { @@ -32,12 +31,6 @@ export default { data() { return { menu: [], - menuNormal: { - Local: [ - ], - Center: [ - ] - }, menuForce: [ { label: '设置ZC故障', @@ -99,8 +92,7 @@ export default { }, initMenu() { // 编辑模式菜单列表 - // this.menu = MenuContextHandler.covert(this.menuNormal); - + this.menu = []; // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = [...this.menuForce]; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue b/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue index 1d4f02274..0065d4570 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuStationStand.vue @@ -2,7 +2,6 @@
-
@@ -10,18 +9,15 @@ import PopMenu from '@/components/PopMenu'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; -import Psl from '@/jmapNew/theme/components/menus/dialog/psl'; export default { name: 'StationStandMenu', components: { PopMenu, - SetFault, - Psl + SetFault }, props: { selected: { @@ -34,12 +30,6 @@ export default { data() { return { menu: [], - menuNormal: { - Local: [ - ], - Center: [ - ] - }, menuForce: [ { label: this.$t('menu.menuStationStand.setFault'), @@ -86,17 +76,10 @@ export default { }, initMenu() { // 编辑模式菜单列表 - // this.menu = MenuContextHandler.covert(this.menuNormal); - + this.menu = []; // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { this.menu = [...this.menuForce]; - if (this.$store.state.training.prdType === '01') { - this.menu.push({ - label: 'PSL', - handler: this.openPsl - }); - } } }, doShow(point) { @@ -129,10 +112,6 @@ export default { }, triggerFaultManagement() { this.$store.dispatch('training/setTriggerFaultCount', this.selected); - }, - // 打开PSL面板 - openPsl() { - this.$refs.psl.doShow(this.selected); } } }; diff --git a/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue b/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue index 527ba5fc1..cf74f4d27 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuSwitch.vue @@ -11,7 +11,6 @@ import PopMenu from '@/components/PopMenu'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import { mapGetters } from 'vuex'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; @@ -86,7 +85,7 @@ export default { }, initMenu() { // 编辑模式菜单列表 - // this.menu = MenuContextHandler.covert(this.menuNormal); + this.menu = []; // 故障模式菜单列表 if (this.operatemode === OperateMode.FAULT) { if (!this.$store.state.scriptRecord.bgSet) { diff --git a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue index b1044d69a..19b2c6053 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuTrain.vue @@ -2,11 +2,6 @@
- - - - -
@@ -20,12 +15,6 @@ import { mapGetters } from 'vuex'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -// import TrainControl from './dialog/trainControl'; -// import TrainDelete from './dialog/trainDelete'; -// import TrainMove from './dialog/trainMove'; -// import TrainSwitch from './dialog/trainSwitch'; -// import TrainEditNumber from './dialog/trainEditNumber'; -// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit'; import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; @@ -35,11 +24,6 @@ export default { PopMenu, NoticeInfo, SpeedLimit, - // TrainControl, - // TrainDelete, - // TrainMove, - // TrainSwitch, - // TrainEditNumber, SetFault }, props: { @@ -53,12 +37,6 @@ export default { data() { return { menu: [], - menuNormal: { - Local: [ - ], - Center: [ - ] - }, menuForce: [ { label: '设置故障', @@ -170,7 +148,7 @@ export default { }, initMenu() { // 编辑模式菜单列表 - // this.menu = MenuContextHandler.covert(this.menuNormal); + this.menu = []; if (this.operatemode === OperateMode.ADMIN) { this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed]; } @@ -332,108 +310,6 @@ export default { triggerFaultManagement() { this.$store.dispatch('training/setTriggerFaultCount', this.selected); } - // // 添加列车识别号 - // addTrainId() { - // const step = { - // start: true, - - // operation: OperationEvent.Train.addTrainId.menu.operation, - // param: { - // code: this.selected.code - // } - // }; - // this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.trainControl.doShow(step, this.selected); - // } - // }); - // }, - // // 删除列车识别号 - // delTrainId() { - // const step = { - // start: true, - - // operation: OperationEvent.Train.delTrainId.menu.operation, - // param: { - // code: this.selected.code - // } - // }; - // this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.trainDelete.doShow(step, this.selected); - // } - // }); - // }, - // // 修改列车识别号 - // editTrainId() { - // const step = { - // start: true, - - // operation: OperationEvent.Train.editTrainId.menu.operation, - // param: { - // code: this.selected.code - // } - // }; - // this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.trainControl.doShow(step, this.selected); - // } - // }); - // }, - // // 修改车组号 - // editTrainNo() { - // const step = { - // start: true, - - // operation: OperationEvent.Train.editTrainNo.menu.operation, - // param: { - // code: this.selected.code - // } - // }; - // this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.trainEditNumber.doShow(step, this.selected); - // } - // }); - // }, - // // 移动列车识别号 - // moveTrainId() { - // const step = { - // start: true, - - // operation: OperationEvent.Train.moveTrainId.menu.operation, - // param: { - // code: this.selected.code - // } - // }; - // this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.trainMove.doShow(step, this.selected); - // } - // }); - // }, - // // 交换列车识别号 - // switchTrainId() { - // const step = { - // start: true, - - // operation: OperationEvent.Train.switchTrainId.menu.operation, - // param: { - // code: this.selected.code - // } - // }; - // this.$store.dispatch('trainingNew/next', step).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // this.$refs.trainSwitch.doShow(step, this.selected); - // } - // }); - // } } }; diff --git a/src/views/newMap/display/stationDiagram/jlmap/index.vue b/src/views/newMap/display/stationDiagram/jlmap/index.vue index 37358041f..d93a9942c 100644 --- a/src/views/newMap/display/stationDiagram/jlmap/index.vue +++ b/src/views/newMap/display/stationDiagram/jlmap/index.vue @@ -245,7 +245,6 @@ export default { }, // 地图视图加载完成 handleViewLoaded() { - console.log('handleViewLoaded'); this.$store.dispatch('map/mapViewLoaded'); this.mapViewLoaded(false); }, diff --git a/src/views/newMap/display/terminals/displayBaSiDi/baSiDi.vue b/src/views/newMap/display/terminals/displayBaSiDi/baSiDi.vue index be5ff9da0..4ee295c6e 100644 --- a/src/views/newMap/display/terminals/displayBaSiDi/baSiDi.vue +++ b/src/views/newMap/display/terminals/displayBaSiDi/baSiDi.vue @@ -167,11 +167,8 @@ export default { } }, watch: { - '$store.state.training.initTime': function (initTime) { - this.initDate(initTime); - }, '$store.state.socket.simulationTimeSync': function (time) { // 仿真时间更新 - this.$store.dispatch('training/setInitTime', time); + this.initDate(time); }, '$store.state.socket.simulationAlarmInfo': function(val) { (val || []).forEach(item => { @@ -224,7 +221,7 @@ export default { }, methods: { undeveloped() { - this.doClose(); + // this.doClose(); this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), { confirmButtonText: this.$t('global.confirm'), callback: action => { @@ -261,9 +258,9 @@ export default { this.$emit('back'); }, initDate(date) { - this.time = timestampFormat('HH:mm:ss', date) - this.dateString = timestampFormat('YYYY.MM.DD', date) - }, + this.time = timestampFormat('HH:mm:ss', date); + this.dateString = timestampFormat('YYYY.MM.DD', date); + } } }; diff --git a/src/views/newMap/display/terminals/displayBaSiDi/index.vue b/src/views/newMap/display/terminals/displayBaSiDi/index.vue index 435169ddd..2b9c3681b 100644 --- a/src/views/newMap/display/terminals/displayBaSiDi/index.vue +++ b/src/views/newMap/display/terminals/displayBaSiDi/index.vue @@ -1,10 +1,10 @@