From 93a3deb20cd19514b9eff57c1f8d88c8af8c37fe Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 22 Apr 2022 17:55:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E9=93=81=E7=BA=BF=E8=B7=AF=E8=B0=83?= =?UTF-8?q?=E6=95=B411?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/components/utils/menuOperate.js | 8 +- .../datie_02/menus/dialog/routeSelection1.vue | 7 +- .../theme/datie_02/menus/menuSection.vue | 16 ++-- .../theme/datie_02/menus/menuSignal.vue | 16 ++-- .../theme/datie_02/menus/menuStation.vue | 16 ++-- .../theme/datie_02/menus/menuSwitch.vue | 16 ++-- src/scripts/cmdPlugin/CommandEnum.js | 3 +- src/scripts/cmdPlugin/OperationHandler.js | 8 +- src/views/newMap/displayCity/lineBoard.vue | 73 ++++++++++++++++++- 9 files changed, 116 insertions(+), 47 deletions(-) diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index 933eba1c5..bd277352a 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -503,6 +503,11 @@ export const menuOperate = { departureNotice: { operation: OperationEvent.CTCCommand.departureNotice.menu.operation, cmdType: CMD.CTC.CTC_DEPARTURE_NOTICE + }, + // 自动触发 + autoTrigger: { + operation: OperationEvent.CTCCommand.autoTrigger.menu.operation, + cmdType: CMD.CTC.CTC_AUTO_TRIGGER } } @@ -542,15 +547,12 @@ export function commitOperate(operate, paramList, over, fillStep = {}) { Object.assign(step, fillStep); return new Promise(function(resolve, reject) { - console.log(step, '============='); store.dispatch('training/nextNew', step).then(({ valid }) => { - console.log(valid, '===11'); if (valid) { store.dispatch('menuOperation/handleBreakFlag', { break: true }); } resolve({ valid: valid, operate: {...step} }); }).catch(error=>{ - console.log(error, '===22'); reject(error); }); }); diff --git a/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue b/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue index d784b08d2..45759badc 100644 --- a/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue +++ b/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue @@ -2,7 +2,7 @@ 列车车次 - {{ selected.tripNumber }} + {{ selected.tripNumber }} 进路描述 @@ -244,7 +244,6 @@ export default { this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]); this.beforeSectionList = containSectionList; this.beforeSwitchList = containSwitchList; - console.log(this.beforeSectionList, this.beforeSwitchList, '======'); // 设置选中指令 const operate = { @@ -267,14 +266,10 @@ export default { this.loading = true; const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute :menuOperate.Signal.arrangementRoute; const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code }; - console.log(this.route.startSignalCode, '-----------', type, param); commitOperate(type, param, 3).then(({valid, operate})=>{ this.loading = false; if (valid) { - // const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode); - // operate.message = `命令:进路设置
始端信号机:${signal.name}
进路:${this.row.name}`; this.doClose(); - this.$refs.confirmTip.doShow(operate); } }).catch((e) => { console.error(e); diff --git a/src/jmapNew/theme/datie_02/menus/menuSection.vue b/src/jmapNew/theme/datie_02/menus/menuSection.vue index 210aa664a..440819197 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSection.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSection.vue @@ -51,14 +51,14 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '图纸调用', - handler: this.drawingCall - }, - { - label: '基础设备培训', - handler: this.baDeTrCall - } + // { + // label: '图纸调用', + // handler: this.drawingCall + // }, + // { + // label: '基础设备培训', + // handler: this.baDeTrCall + // } ], Center: [ // { diff --git a/src/jmapNew/theme/datie_02/menus/menuSignal.vue b/src/jmapNew/theme/datie_02/menus/menuSignal.vue index 06e046f46..02c035a1c 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSignal.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSignal.vue @@ -57,14 +57,14 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '图纸调用', - handler: this.drawingCall - }, - { - label: '基础设备培训', - handler: this.baDeTrCall - } + // { + // label: '图纸调用', + // handler: this.drawingCall + // }, + // { + // label: '基础设备培训', + // handler: this.baDeTrCall + // } // { // label: '办理进路', // handler: this.arrangementRoute, diff --git a/src/jmapNew/theme/datie_02/menus/menuStation.vue b/src/jmapNew/theme/datie_02/menus/menuStation.vue index e370afb71..2039dbcc8 100644 --- a/src/jmapNew/theme/datie_02/menus/menuStation.vue +++ b/src/jmapNew/theme/datie_02/menus/menuStation.vue @@ -42,14 +42,14 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '图纸调用', - handler: this.drawingCall - }, - { - label: '基础设备培训', - handler: this.baDeTrCall - } + // { + // label: '图纸调用', + // handler: this.drawingCall + // }, + // { + // label: '基础设备培训', + // handler: this.baDeTrCall + // } ], Center: [ ] diff --git a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue index 983d64619..8bd8d3db2 100644 --- a/src/jmapNew/theme/datie_02/menus/menuSwitch.vue +++ b/src/jmapNew/theme/datie_02/menus/menuSwitch.vue @@ -51,14 +51,14 @@ export default { menu: [], menuNormal: { Local: [ - { - label: '图纸调用', - handler: this.drawingCall - }, - { - label: '基础设备培训', - handler: this.baDeTrCall - } + // { + // label: '图纸调用', + // handler: this.drawingCall + // }, + // { + // label: '基础设备培训', + // handler: this.baDeTrCall + // } ], Center: [ // { diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index bb08a6ac2..6e9d9e27b 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -370,6 +370,7 @@ export default { CTC: { CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'}, CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'}, - CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'} + CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'}, + CTC_AUTO_TRIGGER: {value: 'CTC_AUTO_TRIGGER', label: '自动触发'} } }; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 402f59db9..563d729c4 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -3555,7 +3555,13 @@ export const OperationEvent = { operation:'1102', domId: '_Tips-CTC-AssistPressDownTurnDirection-Menu{TOP}' } - } + }, + autoTrigger: { + menu: { + operation: '1103', + domId: '_Tips-CTC-AutoTrigger-Menu{TOP}' + } + } } }; diff --git a/src/views/newMap/displayCity/lineBoard.vue b/src/views/newMap/displayCity/lineBoard.vue index 4c2f490bc..d176c1f25 100644 --- a/src/views/newMap/displayCity/lineBoard.vue +++ b/src/views/newMap/displayCity/lineBoard.vue @@ -19,7 +19,7 @@
-
{{item.trackName}}
+
{{item.trackName}}
{{item.tripNumber}}
{{ item.trainType?'客':'' }}
{{item.trainDistanceInfo}}
@@ -38,6 +38,7 @@
{{ '接路' + (item.receivingRouteLock ? '':getRouteName(item.receivingRouteCode)) }}
@@ -51,12 +52,13 @@
{{ item.planArriveTime }}
{{ item.planDepartureTime }}
-
起点-->终点
+
发预
{{ '发路' + (item.departureRouteLock ? '':getRouteName(item.departureRouteCode)) }}
@@ -128,7 +130,11 @@ - + + + @@ -196,6 +202,7 @@
+
@@ -210,15 +217,21 @@ import CameraPic from '@/assets/datie/camera.png'; import RecDep from '@/jmapNew/theme/datie_02/menus/dialog/recDep' import RouteSelection from '@/jmapNew/theme/datie_02/menus/dialog/routeSelection1'; + import PopMenu from '@/components/PopMenu'; + import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; + import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'lineBoard', components: { RecDep, - RouteSelection + RouteSelection, + PopMenu }, data() { return { + menu: [{label: '设置自触', handler: this.setTrigger, disabled: false},{label: '取消自触', handler: this.cancelTrigger, disabled: false}], dialogVisible: false, + triggerParam: {}, selectCode: '', selectCode1: '', readOnly: '', @@ -312,6 +325,55 @@ }, doShowRoute(row, type) { this.$refs.routeSelection.doShow(row, type, this.selectCode); + }, + popMenuShow(item,type, e){ + console.log(e,item, '===='); + if (type === 'rec') { + this.menu[0].disabled = item.receivingRouteAutoTrigger; + this.menu[1].disabled = !item.receivingRouteAutoTrigger; + this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.receivingRouteCode } + } else if (type === 'dep') { + this.menu[0].disabled = item.departureRouteAutoTrigger; + this.menu[1].disabled = !item.departureRouteAutoTrigger; + this.triggerParam = { stationCode: this.selectCode, tripNumber: item.tripNumber, routeCode: item.departureRouteCode } + } else { + this.menu[0].disabled = item.autoTrigger; + this.menu[1].disabled = !item.autoTrigger; + this.triggerParam = { stationCode: this.selectCode1, tripNumber: item.tripNumber, routeCode: item.routeCode } + } + this.$refs.popMenu.resetShowPosition({x: e.x, y:e.y}); + }, + setTrigger() { + const param = { ...this.triggerParam, trigger: true }; + + commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{ + this.loading = false; + this.triggerParam = {}; + if (valid) { + this.doClose(); + this.$message.success('设置自动触发成功!') + } + }).catch((e) => { + console.error(e); + this.loading = false; + this.doClose(); + this.triggerParam = {}; + this.$refs.noticeInfo.doShow(); + }); + }, + cancelTrigger() { + const param = { ...this.triggerParam, trigger: false }; + console.log(menuOperate.CTC.autoTrigger, 'trigger'); + commitOperate(menuOperate.CTC.autoTrigger, param, 3).then(({valid, operate})=>{ + this.triggerParam = {}; + if (valid) { + this.$message.success('取消自动触发成功!') + } + }).catch((e) => { + console.error(e); + this.triggerParam = {}; + this.$message.error('取消自动触发失败!') + }); } } }; @@ -370,4 +432,7 @@ padding: 5px; cursor: pointer; } + .pop-background { + background: #DFE3E6; + }