From dfab1da1c67a9d2a10b471d251f85d81278e5a2b Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 21 Jul 2021 17:53:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E7=AA=81=E6=A3=80=E6=B5=8B=20?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4=20=20=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E8=BF=9B=E8=B7=AF=E5=8A=9E=E7=90=86=E7=A1=AE=E8=AE=A4=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/menus/dialog/routeDetail.vue | 13 +- .../menus/dialog/routeHandControl.vue | 11 +- .../theme/components/utils/menuOperate.js | 5 + .../xian_01/menus/dialog/conflictRoute.vue | 186 ++++++++++++++++++ .../theme/xian_01/menus/menuSignal.vue | 21 ++ src/scripts/cmdPlugin/CommandEnum.js | 4 +- src/scripts/cmdPlugin/Handler.js | 1 + src/scripts/cmdPlugin/OperationHandler.js | 7 + 8 files changed, 237 insertions(+), 11 deletions(-) create mode 100644 src/jmapNew/theme/xian_01/menus/dialog/conflictRoute.vue diff --git a/src/jmapNew/theme/components/menus/dialog/routeDetail.vue b/src/jmapNew/theme/components/menus/dialog/routeDetail.vue index 34eb60f43..fab1c9311 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeDetail.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeDetail.vue @@ -39,9 +39,14 @@ {{ scope.row.name }} - + - {{ scope.row.atsControl == '0' ? '人工' : '自动' }} + + {{ scope.row.atsControl == '0' ? '人工' : scope.row.checkConflict?'自动 (进行冲突检查)':'自动 (不进行冲突检查)' }} + + + {{ scope.row.atsControl == '0' ? '人工' : '自动' }} + @@ -112,7 +117,7 @@ export default { }, methods: { doShow(operate, selected, tempData) { - this.$root.$emit('dialogOpen', selected); + this.$root.$emit('dialogOpen', selected); this.selected = selected; // 如果不是因为断点激活则需要,初始化菜单初始值 if (!this.dialogShow) { @@ -142,7 +147,7 @@ export default { doClose() { this.loading = false; this.dialogShow = false; - this.$root.$emit('dialogClose', this.selected); + this.$root.$emit('dialogClose', this.selected); this.$store.dispatch('training/emitTipFresh'); // mouseCancelState(this.selected); }, diff --git a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue index 66dd27716..91b619eec 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue @@ -54,9 +54,8 @@ - + @@ -99,7 +98,6 @@ import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confir // import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from '../childDialog/noticeInfo'; import {menuOperate, commitOperate} from '../../utils/menuOperate'; -import { delimiter } from 'path'; export default { name: 'RouteHandControl', @@ -186,7 +184,8 @@ export default { this.selected = selected; this.allSelect = false; this.changeList = []; - this.checkConflictList.splice(0, this.checkConflictList.length - 1); + this.checkConflictList = []; + // .splice(0, this.checkConflictList.length - 1); this.commitDisabled = true; this.selection = []; this.disabledLength = 0; @@ -217,14 +216,14 @@ export default { if (elem.atsControl == '1') { elem.disabled = true; that.disabledLength++; + that.checkConflictList.push({code:elem.code, value:null}); } else { if (that.systemName == 'xian-01__systerm') { - this.checkConflictList.push({code:elem.code, value:false}); + that.checkConflictList.push({code:elem.code, value:false}); // that.$set('checkConflictMap', elem.code, ); // that.checkConflictMap[elem.code] = false; } } - } }); } diff --git a/src/jmapNew/theme/components/utils/menuOperate.js b/src/jmapNew/theme/components/utils/menuOperate.js index bc377bdf3..ee3bdd589 100644 --- a/src/jmapNew/theme/components/utils/menuOperate.js +++ b/src/jmapNew/theme/components/utils/menuOperate.js @@ -149,7 +149,12 @@ export const menuOperate = { signalTotalCancle:{ // 信号机总取消 operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, cmdType: CMD.Signal.CMD_SIGNAL_TOTAL_CANCLE + }, + signalConflictRoute:{ // 冲突进路办理 + operation: OperationEvent.Signal.signalConflictRoute.menu.operation, + cmdType:CMD.Signal.CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM } + // Signal_Conflict_Route_Set_Confirm }, Switch:{ lock:{ diff --git a/src/jmapNew/theme/xian_01/menus/dialog/conflictRoute.vue b/src/jmapNew/theme/xian_01/menus/dialog/conflictRoute.vue new file mode 100644 index 000000000..c4ef497b0 --- /dev/null +++ b/src/jmapNew/theme/xian_01/menus/dialog/conflictRoute.vue @@ -0,0 +1,186 @@ + + + + + + + 冲突进路: + {{ routeName }} + + + 冲突描述: + + {{ message }} + + 距离对话框关闭还有:{{ minutes }}分{{ seconds }}秒,请确认是否办理冲突进路。 + + + 选排冲突进路 + + + + + + 按计划执行 + + + + + + + + + diff --git a/src/jmapNew/theme/xian_01/menus/menuSignal.vue b/src/jmapNew/theme/xian_01/menus/menuSignal.vue index 1d03576ea..895a03460 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSignal.vue @@ -9,6 +9,7 @@ + @@ -27,6 +28,7 @@ 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 ConflictRoute from './dialog/conflictRoute'; export default { name: 'SignalMenu', @@ -39,6 +41,7 @@ export default { RouteHandControl, RouteDetail, NoticeInfo, + ConflictRoute, SetFault }, props: { @@ -239,6 +242,21 @@ export default { } else { this.doClose(); } + }, + '$store.state.socket.simulationAlarmInfo': function(val) { + (val || []).forEach(item => { + if (!item.confirmed) { + if (item.level === '0') { + if (item.type == 'Conflict_Route_Set') { + const route = this.routeList.find(each=>{ return each.code == item.deviceCode; }); + this.$refs.conflictRoute.doShow({route:route, description:item.description}); + // doShow(); + // "":"Route205", + // "description":"计划车(111046(322)触发的进路[X2112-X2102]与计划(311045)从节点(务庄站(22)_G2202)到节点(香湖湾站(21)_G2102)的计划冲突,无法选排" + } + } + } + }); } }, methods: { @@ -291,6 +309,9 @@ export default { commitOperate(menuOperate.Signal.arrangementRoute, { signalCode: this.selected.code }, 0).then(({valid, operate})=>{ if (valid) { this.$refs.routeSelection.doShow(operate, this.selected, this.getRouteList(this.selected)); + // const route = this.routeList.find(each=>{ return each.code == 'Route205'; }); + // this.$refs.conflictRoute.doShow({route:route, description:'计划车(111046(322)触发的进路[X2112-X2102]与计划(311045)从节点(务庄站(22)_G2202)到节点(香湖湾站(21)_G2102)的计划冲突,无法选排'}); + // this.$refs.conflictRoute.doShow({deviceCode:'Route205', }); } }); }, diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index adcc00007..c6694c329 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -126,7 +126,9 @@ export default { /** 信号机总取消 */ CMD_SIGNAL_TOTAL_CANCLE:{value:'Signal_Total_Cancel', label: '信号机总取消'}, /** 设置保护 */ - CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'} + CMD_SIGNAL_SET_OVERLAP : {value: 'Signal_Set_Overlap', label: '设置保护'}, + /** 冲突进路办理 */ + CMD_SIGNAL_CONFLICT_ROUTE_SET_CONFIRM:{value: 'Signal_Conflict_Route_Set_Confirm', label: '冲突进路办理'} }, // 物理区段操作 diff --git a/src/scripts/cmdPlugin/Handler.js b/src/scripts/cmdPlugin/Handler.js index 23bd42953..01f18db97 100644 --- a/src/scripts/cmdPlugin/Handler.js +++ b/src/scripts/cmdPlugin/Handler.js @@ -109,6 +109,7 @@ class Handler { this.afterValid(operation, valid).then(()=>{ rtn.valid = valid; if (operation.cmdType && valid) { + debugger; const command = this.getCommand(operation); if (command) { CommandHandler.execute(command.id, command.get()).then(response => { diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 90756f12f..6acb2a8a0 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -1703,6 +1703,13 @@ export const OperationEvent = { operation: '3211', domId: '_Tips-Signal-setOverlap-Menu{BOTTOM}' } + }, + // 冲突进路办理 + signalConflictRoute:{ + menu: { + operation: '322', + domId: '_Tips-Signal-conflictRoute-Menu{TOP}' + } } },