From ae28541ae1322a1b1e7b5c83aabb301c71ccc9c1 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 20 Jul 2021 18:06:22 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E8=A5=BF=E5=AE=89=E4=B8=89=20=E8=BF=9B?= =?UTF-8?q?=E8=B7=AF=E4=BA=A4Ats=E6=8E=A7=20=E5=86=B2=E7=AA=81=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../menus/dialog/routeHandControl.vue | 78 ++++++++++++++++--- 1 file changed, 66 insertions(+), 12 deletions(-) diff --git a/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/components/menus/dialog/routeHandControl.vue index 6eae3f4aa..66dd27716 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="300px" + :width="systemName == 'xian-01__systerm'?'400px':'300px'" :before-close="doClose" :z-index="2000" :modal="false" @@ -48,6 +48,22 @@ {{ scope.row.name }} + + + + + + @@ -83,6 +99,7 @@ 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', @@ -108,6 +125,8 @@ export default { signalName: '', allSelect: false, changeList:[], + checkConflictList:[], + selectedCheckConflict:[], commitDisabled: true, disabledLength: 0 }; @@ -143,7 +162,12 @@ export default { if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { return '进路交人工控'; } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { - return '进路交自动控'; + if (this.systemName == 'xian-01__systerm') { + return '进路交ATS自动控'; + } else { + return '进路交自动控'; + } + } else { return ''; } @@ -162,6 +186,7 @@ export default { this.selected = selected; this.allSelect = false; this.changeList = []; + this.checkConflictList.splice(0, this.checkConflictList.length - 1); this.commitDisabled = true; this.selection = []; this.disabledLength = 0; @@ -178,18 +203,28 @@ export default { } if (tempData && tempData.length > 0) { + const that = this; tempData.forEach(elem => { - this.changeList.push(false); + that.changeList.push(false); + elem.disabled = false; // 设置禁用状态 if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && (elem.atsControl == '0')) { elem.disabled = true; - this.disabledLength++; - } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && - (elem.atsControl == '1')) { - elem.disabled = true; - this.disabledLength++; + that.disabledLength++; + } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation) { + if (elem.atsControl == '1') { + elem.disabled = true; + that.disabledLength++; + } else { + if (that.systemName == 'xian-01__systerm') { + this.checkConflictList.push({code:elem.code, value:false}); + // that.$set('checkConflictMap', elem.code, ); + // that.checkConflictMap[elem.code] = false; + } + } + } }); } @@ -215,6 +250,16 @@ export default { this.$store.dispatch('training/emitTipFresh'); // mouseCancelState(this.selected); }, + changeCheckConflit(check, code) { + // debugger; + // this.checkConflictMap; + // this.$set('checkConflictMap', code, check); + // if (check) { + // this.checkConflictMap[code] = false; + // } else { + // this.checkConflictMap[code] = true; + // } + }, changeCheck(check, code) { if (check) { this.selection.push(code); @@ -324,7 +369,7 @@ export default { operate.message = `命令:进路交人工控
始端信号机:${this.stationName} ${this.signalName}` + msg; this.$refs.ningBoConfirmTip.doShow(operate); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(); @@ -335,7 +380,7 @@ export default { if (valid) { this.doClose(); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(); @@ -359,13 +404,22 @@ export default { operate.message = `命令:进路交自动控
始端信号机:${this.stationName} ${this.signalName}` + msg; this.$refs.ningBoConfirmTip.doShow(operate); } - }).catch((error) => { + }).catch(() => { this.loading = false; this.doClose(); this.$refs.noticeInfo.doShow(); }); } else { - commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, {val}).then(({valid})=>{ + const params = {routeCodeList:this.selection}; + if (this.systemName === 'xian-01__systerm') { + const checkConflictList = []; + this.selection.forEach(each=>{ + const checkConflict = this.checkConflictList.find(check=>{ return check.code == each; }); + if (checkConflict) { checkConflictList.push(checkConflict.value); } + }); + params.checkConflictList = checkConflictList; + } + commitOperate(menuOperate.Signal.atsAutoControl, params, 2, {val}).then(({valid})=>{ this.loading = false; if (valid) { this.doClose(); 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 2/8] =?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 }} - + @@ -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 @@ -