From 7ce6cf6e8a2f116c2a593bd11297576a2c2cf710 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 8 Dec 2020 18:41:18 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8C=BA=E6=AE=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/newMap/newMapdraft/mapoperate/section/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/newMap/newMapdraft/mapoperate/section/index.vue b/src/views/newMap/newMapdraft/mapoperate/section/index.vue index fa47a6fcc..3cc9ff847 100644 --- a/src/views/newMap/newMapdraft/mapoperate/section/index.vue +++ b/src/views/newMap/newMapdraft/mapoperate/section/index.vue @@ -429,7 +429,7 @@ export default { this.handleInit(); this.activeName = 'first'; this.editModel = deepAssign(this.editModel, selected); - this.oldPoint = selected.points; + this.oldPoint = JSON.parse(JSON.stringify(selected.points)); this.oldLeftSectionCode = selected.leftSectionCode; this.oldRightSectionCode = selected.rightSectionCode; if (this.field.toUpperCase() === 'splitSection'.toUpperCase()) { @@ -540,7 +540,8 @@ export default { copySection.stationCode = model.stationCode; // 给元素 子逻辑区段设置 设备集中站 if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) { copySection.points[0] = model.points[0]; - } else if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], copySection.points[copySection.points.length - 1])) { + } + if (this.checkPointsCoincide(this.oldPoint[this.oldPoint.length - 1], copySection.points[copySection.points.length - 1])) { copySection.points[copySection.points.length - 1] = model.points[model.points.length - 1]; } models.push(copySection); @@ -653,6 +654,9 @@ export default { !sectionMap[startPoint].deepFlag && models.push(model); startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000; startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y; + if (model.points[model.points.length - 1].x == model.points[0].x && model.points[model.points.length - 1].y == model.points[0].y) { + return models; + } } } return models; From a9b94c8e5d93ba9b03fd6a51202aef03974f54c2 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 8 Dec 2020 18:43:55 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E5=9B=BD=E8=B5=9B=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=88=AA=E6=AD=A2=E6=97=A5=E6=9C=9F&?= =?UTF-8?q?=E6=8B=A6=E6=88=AA=E5=99=A8=E6=8F=90=E7=A4=BA=E7=99=BB=E5=87=BA?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D&=E5=AE=81=E6=B3=A2=E4=B8=89=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_03.js | 7 +- .../shape/StationStand/detain/EDetainRect.js | 63 ++++++++++---- .../menus/menuDialog/allocateTime.vue | 54 +++++++++--- .../menuDialog/initializeSwitchBlock.vue | 81 +++++++++++++++-- .../menus/menuDialog/standControl.vue | 15 +++- .../menus/menuDialog/standDetail.vue | 36 ++++++-- .../menus/menuDialog/standDetain.vue | 50 +++++++++-- .../menus/menuDialog/switchBlock.vue | 67 +++++++++++++-- .../menus/menuDialog/switchCommand.vue | 86 +++++++++++++++---- src/utils/request.js | 17 ++-- src/views/login/index.vue | 2 +- 11 files changed, 382 insertions(+), 96 deletions(-) diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index 02fc2e07c..40c63a6ac 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -414,8 +414,9 @@ class SkinCode extends defaultStyle { position: 1, // 扣车标识在站台上显示方向 text: 'H', // 扣车显示内容 offset: { x: -8, y: 10 }, // 扣车偏移量 - centerTrainColor: '#00FF00', // 中心扣车颜色 - andCenterTrainColor: '#00FF00', // 车站+中心扣车颜色 + centerTrainColor: ['#FFFF00', '#0000FF'], // 中心扣车颜色 + localTrainColor: ['#FFFF00', '#0000FF'], // 车站扣车颜色 + andCenterTrainColor: ['#FFFF00', '#0000FF'], // 车站+中心扣车颜色 detainTrainTextColor: '#FFFF00', // 车站扣除文字颜色 spareStrokeColor: '#000000', // 扣车描边颜色 lineWidth: 3, // 扣车线宽 @@ -566,7 +567,7 @@ class SkinCode extends defaultStyle { this[deviceType.ZcControl] = { // 是否显示 - visible: true, + visible: false, text: { fontSize: 11, // 字体大小 fontWeight: 'normal', // 字体粗细 diff --git a/src/jmapNew/shape/StationStand/detain/EDetainRect.js b/src/jmapNew/shape/StationStand/detain/EDetainRect.js index 103add84e..068ce9e38 100644 --- a/src/jmapNew/shape/StationStand/detain/EDetainRect.js +++ b/src/jmapNew/shape/StationStand/detain/EDetainRect.js @@ -15,22 +15,27 @@ class EDetainCircle extends Group { const standX = model.position.x - model.width / 2; const standY = model.position.y - model.height / 2; - let y; + let y1; + let y2; if (model.right && model.inside) { - y = standY + model.height / 2; + y1 = standY + model.height / 2; + y2 = standY; } else if (model.right && !model.inside) { - y = standY; + y1 = standY; + y2 = standY + model.height / 2; } else if (!model.right && model.inside) { - y = standY; + y1 = standY; + y2 = standY + model.height / 2; } else if (!model.right && !model.inside) { - y = standY + model.height / 2; + y1 = standY + model.height / 2; + y2 = standY; } - this.detainRect = new Rect({ + this.detainRectTop = new Rect({ zlevel: this.model.zlevel, z: this.model.z + 1, shape: { x: standX, - y: y, + y: y1, width: model.width, height: model.height / 2 }, @@ -40,18 +45,38 @@ class EDetainCircle extends Group { fill: '#000' } }); - this.add(this.detainRect); - this.detainRect.hide(); + this.detainRectBottom = new Rect({ + zlevel: this.model.zlevel, + z: this.model.z + 1, + shape: { + x: standX, + y: y2, + width: model.width, + height: model.height / 2 + }, + style: { + lineWidth: style.StationStand.detainRect.lineWidth || 0, + stroke: style.StationStand.detainRect.spareStrokeColor, + fill: '#000' + } + }); + this.add(this.detainRectTop); + this.add(this.detainRectBottom); + this.detainRectTop.hide(); + this.detainRectBottom.hide(); } - setColor(color) { - this.detainRect.setStyle('stroke', color); + setColor(color1, color2) { + this.detainRectTop.setStyle('fill', color1); + this.detainRectBottom.setStyle('fill', color2); } setShow() { - this.detainRect.show(); + this.detainRectTop.show(); + this.detainRectBottom.show(); } setHide() { - this.detainRect.hide(); + this.detainRectTop.hide(); + this.detainRectBottom.hide(); } recover() { this.setHide(); @@ -61,14 +86,14 @@ class EDetainCircle extends Group { const style = this.model.style; /** 设置扣车*/ if (model.stationHoldTrain && model.centerHoldTrain) { - this.showMode(); - this.setColor(style.StationStand.detainRect.centerTrainColor); + this.setShow(); + this.setColor(...style.StationStand.detainRect.centerTrainColor); } else if (model.stationHoldTrain) { - this.showMode(); - this.setColor(style.StationStand.detainRect.detainTrainTextColor); + this.setShow(); + this.setColor(...style.StationStand.detainRect.localTrainColor); } else if (model.centerHoldTrain) { - this.showMode(); - this.setColor(style.StationStand.detainRect.centerTrainColor); + this.setShow(); + this.setColor(...style.StationStand.detainRect.centerTrainColor); } } } diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue index af55e9e1e..558c8172c 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/allocateTime.vue @@ -1,13 +1,23 @@ - + - + + + {{ getParkingTime(scope.row.code) }} + + - 所有站台(L) + 所有站台(L) @@ -20,19 +30,19 @@ 最小值 - + - + 最大值 - + - + @@ -53,15 +63,15 @@ 额定值 - + - + - 复位 + 复位(R) 停站时间范围:1-999 @@ -70,7 +80,7 @@ - 确定(O) + 确定(O) 应用(A) @@ -89,7 +99,7 @@ diff --git a/src/views/planMonitor/editTool/menus/gernaratePlanTrain.vue b/src/views/planMonitor/editTool/menus/gernaratePlanTrain.vue new file mode 100644 index 000000000..1333bf688 --- /dev/null +++ b/src/views/planMonitor/editTool/menus/gernaratePlanTrain.vue @@ -0,0 +1,168 @@ + + + + + {{ $t('global.cancel') }} + {{ $t('global.confirm') }} + + + + + + diff --git a/src/views/planMonitor/editTool/routingoperate/routeConfig.vue b/src/views/planMonitor/editTool/routingoperate/routeConfig.vue new file mode 100644 index 000000000..97524b3c8 --- /dev/null +++ b/src/views/planMonitor/editTool/routingoperate/routeConfig.vue @@ -0,0 +1,644 @@ + + + + + {{ $t('map.preview') }} + {{ $t('map.newConstruction') }} + + + + + + + + + + + {{ $t('map.activate') }} + + + + + + {{ $t('map.activate') }} + + + + + + {{ $t('map.activate') }} + + + + + + {{ $t('map.activate') }} + + + + + + + + + + + + + + + + + + {{ formatName(scope.row.stationCode) }} + + + + + {{ formatName(scope.row.sectionCode) }} + + + + + + {{ $t('map.remove') }} + + + + + + 车站: + + + + {{ $t('map.activate') }} + + + 区段: + + + + {{ $t('map.activate') }} + + {{ $t('map.add') }} + + + + + + {{ $t('map.save') }} + + {{ $t('map.updata') }} + + + + + + + + + + + diff --git a/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue b/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue new file mode 100644 index 000000000..2287d843b --- /dev/null +++ b/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue @@ -0,0 +1,207 @@ + + + 折返配置 + + + 区段: + + + + {{ $t('map.activate') }} + + {{ $t('map.add') }} + + + + + + {{ formatName(scope.row.sectionCode) }} + + + + + + {{ $t('map.remove') }} + + + + + + {{ $t('map.save') }} + + + + + + + From 0bfc5cb3302002404697ec49fbe828448a828934 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Wed, 9 Dec 2020 18:28:25 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E5=9B=BE=E7=BC=96?= =?UTF-8?q?=E5=88=B6=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 --- src/components/QueryListPage/DataForm.vue | 2 + .../editTool/menus/gernaratePlanTrain.vue | 38 +++++++++++-------- .../editTool/routingoperate/runplanConfig.vue | 5 +++ 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/components/QueryListPage/DataForm.vue b/src/components/QueryListPage/DataForm.vue index e78e3c752..702c166bb 100644 --- a/src/components/QueryListPage/DataForm.vue +++ b/src/components/QueryListPage/DataForm.vue @@ -199,6 +199,7 @@ v-model="formModel[item.prop]" filterable :placeholder="item.placeholder" + :no-data-text="item.noDataText?item.noDataText:'无数据'" :disabled="item.disabled" @change="item.onChange" > @@ -215,6 +216,7 @@ { - const serviceNumberList = Object.keys(this.$store.state.runPlan.editData); - if (serviceNumberList.includes(this.formModel.serviceNumber)) { - this.$messageBox('该服务号已存在,请重新填写'); - return false; - } - if (this.formModel.runningRouting1 == this.formModel.runningRouting2) { - this.$messageBox('环路1和环路2不能相同'); - return false; - } if (this.formModel.overTime <= this.formModel.beginTime) { this.$messageBox('结束时间必须大于开始时间'); return false; diff --git a/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue b/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue index 2287d843b..f17c887b8 100644 --- a/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue +++ b/src/views/planMonitor/editTool/routingoperate/runplanConfig.vue @@ -32,6 +32,11 @@ height="300" class="el-parkSectionCode-table" > + + + {{ formatName(scope.row.stationCode) }} + + {{ formatName(scope.row.sectionCode) }} From c118fccd3f3d8f9d872763297bddeda0578829c1 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Thu, 10 Dec 2020 10:01:51 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E5=AE=81=E6=B3=A2=E4=B8=89=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E6=93=8D=E4=BD=9C=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/config/skinCode/ningbo_03.js | 4 +- src/jmapNew/theme/ningbo_03/menus/menuBar.vue | 24 +- .../menuDialog/initSectionLimitSpeed.vue | 196 +++++++++++++++ .../menus/menuDialog/initSectionOpen.vue | 225 ++++++++++++++++++ .../menus/menuDialog/initSignalBlock.vue | 102 +++++++- .../menuDialog/initializeSignalCanBlock.vue | 94 +++++++- .../menuDialog/initializeSignalGuide.vue | 110 ++++++++- .../menuDialog/initializeSwitchBlock.vue | 41 +++- .../menus/menuDialog/routeCommand.vue | 218 ++++++++++++++--- .../menus/menuDialog/sectionOpen.vue | 81 +++++-- .../menus/menuDialog/signalBlock.vue | 81 ++++++- .../menus/menuDialog/signalCanBlock.vue | 65 ++++- .../menus/menuDialog/signalDetail.vue | 39 ++- .../menus/menuDialog/signalGuide.vue | 82 ++++++- .../menus/menuDialog/standControl.vue | 52 +++- .../menus/menuDialog/switchActive.vue | 69 +++++- .../menus/menuDialog/switchBlock.vue | 31 ++- .../menus/menuDialog/switchDetail.vue | 37 ++- src/scripts/cmdPlugin/OperationHandler.js | 52 ++++ src/views/system/dictionaryDetail/edit.vue | 4 +- 20 files changed, 1433 insertions(+), 174 deletions(-) create mode 100644 src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue create mode 100644 src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue diff --git a/src/jmapNew/config/skinCode/ningbo_03.js b/src/jmapNew/config/skinCode/ningbo_03.js index 40c63a6ac..30df092d5 100644 --- a/src/jmapNew/config/skinCode/ningbo_03.js +++ b/src/jmapNew/config/skinCode/ningbo_03.js @@ -90,7 +90,7 @@ class SkinCode extends defaultStyle { faultLockColor: '#81007F', // 区段故障锁定颜色 undefinedColor: '#0071C1', // 区段未定义颜色 protectionLockedColor: '#FFFFFF', // 保护区段锁闭 - blockColor: '#d659d6', // 区段封锁颜色(淡紫色) + blockColor: '#FE0000', // 区段封锁颜色(淡紫色) atcExcisionColor: '#A0522D', // 区段atc切除颜色 atsExcisionColor: '#A0522D', // 区段ats切除颜色 invalidColor: '#AC8F40', // 计轴故障颜色 @@ -146,7 +146,7 @@ class SkinCode extends defaultStyle { halfHeight: 8 // 区段分隔符高度的一半 }, block: { - blockGlint: true // 区段封锁闪烁显示 + blockGlint: false // 区段封锁闪烁显示 }, trainPosition:{ display: true, // 列车实时位置显示 diff --git a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue index adcd6e633..4a63d69ef 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuBar.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuBar.vue @@ -131,6 +131,7 @@ + + diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue new file mode 100644 index 000000000..038c67b4d --- /dev/null +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionOpen.vue @@ -0,0 +1,225 @@ + + + + + + + + {{ getStationName(scope.row) }} + + + + + {{ getSectionStatus(scope.row.code) }} + + + + + {{ getProcess(scope.row.code) }} + + + + + + + 确定(O) + + + 应用(A) + + + 关闭(C) + + + 帮助(H) + + + + + + + + + diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue index e6f33b463..2f4e2b264 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSignalBlock.vue @@ -1,16 +1,34 @@ - + - - - + + + {{ getSignalStatus(scope.row.code) }} + + + + + {{ getProcess(scope.row.code, 'lock') }} + + + + + {{ getProcess(scope.row.code, 'unlock') }} + + - 确定(O) + 确定(O) 应用(A) @@ -23,6 +41,7 @@ + @@ -31,11 +50,13 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import SignalBlock from './signalBlock'; export default { name: 'InitSignalBlock', components: { - NoticeInfo + NoticeInfo, + SignalBlock }, data() { return { @@ -45,13 +66,18 @@ export default { dialogShow: false, loading: false, selected: null, - operate: {} + operate: {}, + initEle: null, + commandEleCode: null }; }, computed: { ...mapGetters('map', [ 'signalList' ]), + isBlock() { + return this.operate && this.operate.operation === OperationEvent.Signal.lock.menu.operation; + }, show() { return this.dialogShow && !this.$store.state.menuOperation.break; }, @@ -82,6 +108,8 @@ export default { }, methods: { doShow(operate, selected) { + this.initEle = null; + this.commandEleCode = null; this.selected = selected; this.operate = operate; // 如果不是断点激活,而是第一次显示,则需要设置初始值 @@ -93,12 +121,68 @@ export default { doClose() { this.loading = false; this.dialogShow = false; + this.$refs.singleTable.setCurrentRow(); this.$store.dispatch('training/emitTipFresh'); }, commit() { + const step = { + code: `${this.selected.code}`, + operation: this.isBlock ? OperationEvent.Signal.lock.confirm.operation : OperationEvent.Signal.unlock.confirm.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.signalBlock.doShow(step, this.selected); + this.initEle = this.selected; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); }, - handleClick() { - + handleCurrentChange(val) { + if (!val) { return; } + this.initEle = null; + this.commandEleCode = null; + const step = { + code: `${val.code}`, + operation: this.isBlock ? OperationEvent.Signal.lock.choose.operation : OperationEvent.Signal.unlock.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + getSignalStatus(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (this.commandEleCode === code) { + return this.isBlock ? '锁闭的' : '未锁闭的'; + } + if (signalEle.blockade) { + return '锁闭的'; + } else { + return '未设锁闭'; + } + }, + commandSuccess(code) { + this.commandEleCode = code; + }, + cancelCommand() { + this.initEle = null; + }, + getProcess(code, type) { + if (this.commandEleCode && this.commandEleCode === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) { + return this.isBlock ? '已完成封锁' : '已完成解封'; + } else if (this.initEle && this.initEle.code === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) { + return '已初始化'; + } else { + return ''; + } }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue index 0c19cd799..3b8e3d0a5 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalCanBlock.vue @@ -1,16 +1,30 @@ - + - + - - - + + + {{ getSignalBlock(scope.row.code) }} + + + 否 + + + {{ getProcess(scope.row.code) }} + + - 确定(O) + 确定(O) 应用(A) @@ -23,6 +37,7 @@ + @@ -31,11 +46,13 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import SignalCanBlock from './signalCanBlock'; export default { name: 'StandDetain', components: { - NoticeInfo + NoticeInfo, + SignalCanBlock }, data() { return { @@ -45,7 +62,9 @@ export default { dialogShow: false, loading: false, selected: null, - operate: '' + operate: '', + initEle: null, + commandEleCode: null }; }, computed: { @@ -82,6 +101,8 @@ export default { }, methods: { doShow(operate, selected) { + this.initEle = null; + this.commandEleCode = null; this.selected = selected; this.operate = operate; // 如果不是断点激活,而是第一次显示,则需要设置初始值 @@ -93,12 +114,65 @@ export default { doClose() { this.loading = false; this.dialogShow = false; + this.$refs.singleTable.setCurrentRow(); this.$store.dispatch('training/emitTipFresh'); }, commit() { + const step = { + code: `${this.selected.code}`, + operation: OperationEvent.Signal.lock.confirm.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.signalCanBlock.doShow(step, this.selected); + this.initEle = this.selected; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); }, - handleClick() { - + getSignalBlock(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.blockade) { + return '关闭'; + } else { + return '开启'; + } + }, + getProcess(code) { + if (this.commandEleCode === code) { + return '完成'; + } else if (this.initEle && this.initEle.code === code) { + return '已初始化'; + } else { + return ''; + } + }, + commandSuccess(code) { + this.commandEleCode = code; + }, + cancelCommand() { + this.initEle = null; + }, + handleCurrentChange(val) { + if (!val) { return; } + this.initEle = null; + this.commandEleCode = null; + const step = { + code: `${val.code}`, + operation: OperationEvent.Signal.lock.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue index 54d3c8cf2..51369dc77 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSignalGuide.vue @@ -1,17 +1,35 @@ - + - - - + + + {{ getSignalShow(scope.row.code) }} + + + + + {{ getCanGuide(scope.row.code) }} + + + + + {{ getProcess(scope.row.code) }} + + - 确定(O) + 确定(O) 应用(A) @@ -24,6 +42,7 @@ + @@ -31,11 +50,13 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import SignalGuide from './signalGuide'; import { mapGetters } from 'vuex'; export default { name: 'StandDetain', components: { + SignalGuide, NoticeInfo }, data() { @@ -46,7 +67,9 @@ export default { dialogShow: false, loading: false, selected: null, - operate: '' + operate: '', + initEle: null, + commandEleCode: null }; }, computed: { @@ -83,6 +106,8 @@ export default { }, methods: { doShow(operate, selected) { + this.initEle = null; + this.commandEleCode = null; this.selected = selected; this.operate = operate; // 如果不是断点激活,而是第一次显示,则需要设置初始值 @@ -94,12 +119,79 @@ export default { doClose() { this.loading = false; this.dialogShow = false; + this.$refs.singleTable.setCurrentRow(); this.$store.dispatch('training/emitTipFresh'); }, - commit() { + getSignalShow(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) { + return '红'; + } else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) { + return '绿'; + } else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) { + return '黄'; + } else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) { + return '引导'; + } else { + return ''; + } }, - handleClick() { - + getCanGuide(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.callOn) { + return '是'; + } else { + return '否'; + } + }, + getProcess(code) { + if (this.commandEleCode === code) { + return '完成'; + } else if (this.initEle && this.initEle.code === code) { + return '等待确认/取消'; + } else { + return ''; + } + }, + commit() { + const step = { + code: `${this.selected.code}`, + operation: OperationEvent.Signal.guide.confirm.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.$refs.signalGuide.doShow(step, this.selected); + this.initEle = this.selected; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + handleCurrentChange(val) { + if (!val) { return; } + this.initEle = null; + this.commandEleCode = null; + const step = { + code: `${val.code}`, + operation: OperationEvent.Signal.guide.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + commandSuccess(code) { + this.commandEleCode = code; + }, + cancelCommand() { + this.initEle = null; }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue index 6248e8aa9..a416c56a5 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initializeSwitchBlock.vue @@ -1,5 +1,5 @@ - + - {{ getProcess(scope.row.code) }} + {{ getProcess(scope.row.code, 'block') }} + + + + + {{ getProcess(scope.row.code, 'unblock') }} - @@ -37,7 +41,7 @@ - + @@ -75,7 +79,7 @@ export default { 'switchList' ]), isBlock() { - return this.operate === OperationEvent.Switch.block.init.operation; + return this.operate && this.operate.operation === OperationEvent.Switch.block.button.operation; }, show() { return this.dialogShow && !this.$store.state.menuOperation.break; @@ -126,7 +130,7 @@ export default { commit() { const step = { code: `${this.selected.code}`, - operation: OperationEvent.Switch.block.menu.init, + operation: this.isBlock ? OperationEvent.Switch.block.confirm.operation : OperationEvent.Switch.unblock.confirm.operation, param: {} }; this.$store.dispatch('training/nextNew', step).then(({ valid }) => { @@ -142,24 +146,36 @@ export default { handleCurrentChange(val) { if (!val) { return; } this.initEle = null; - commitOperate(menuOperate.Switch.block, {code:val.code}, 1).then(({valid})=>{ + this.commandEleCode = null; + const step = { + code: `${val.code}`, + operation: this.isBlock ? OperationEvent.Switch.block.choose.operation : OperationEvent.Switch.unblock.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.selected = val; } + }).catch(() => { + this.$refs.noticeInfo.doShow(); }); }, getSwitchStatus(code) { const switchEle = this.$store.getters['map/getDeviceByCode'](code); + if (this.commandEleCode === code) { + return this.isBlock ? '锁闭的' : '未锁闭的'; + } if (switchEle.blockade) { return '锁闭的'; } else { return '未锁闭的'; } }, - getProcess(code) { - if (this.commandEleCode && this.commandEleCode === code) { - return '已完成封锁'; - } else if (this.initEle && this.initEle.code === code) { + getProcess(code, type) { + if (this.commandEleCode && this.commandEleCode === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) { + return this.isBlock ? '已完成封锁' : '已完成解封'; + } else if (this.initEle && this.initEle.code === code && ((type === 'block' && this.isBlock) || (type === 'unblock' && !this.isBlock))) { return '已初始化'; } else { return ''; @@ -169,6 +185,9 @@ export default { this.commandEleCode = code; this.$refs.singleTable.setCurrentRow(); }, + cancelCommand() { + this.initEle = null; + }, cancel() { const operate = { operation: OperationEvent.Command.cancel.menu.operation diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue index bb18d7609..35c41e844 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/routeCommand.vue @@ -33,7 +33,15 @@ CBTC - + + @@ -50,9 +58,20 @@ 后备 - + - + + + {{ getRouteDirection(scope.row) }} + + @@ -64,7 +83,15 @@ CBTC - + + @@ -73,9 +100,21 @@ 后备 - + + - + + + {{ getRouteDirection(scope.row) }} + + @@ -83,28 +122,39 @@ - - - - 后备 - - - - - - - - - - 禁止进路 - - 设置(S) - 取消(N) - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -131,6 +181,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'SwitchActive', @@ -149,7 +200,7 @@ export default { activeName: 'first', tempData: [], checked: false, - unlockType: '', + unlockType: 'auto', forbidRoute: false }; }, @@ -199,11 +250,118 @@ export default { this.loading = false; this.dialogShow = false; this.$store.dispatch('training/emitTipFresh'); + this.$refs.singleTable1.setCurrentRow(); + this.$refs.singleTable2.setCurrentRow(); + this.$refs.singleTable3.setCurrentRow(); + this.$refs.singleTable4.setCurrentRow(); }, commit() { + const step = { + over: true, + param: {routeCode: this.selected.code, signalCode: this.selected.startSignalCode} + }; + if (this.activeName === 'first') { + if (this.unlockType === 'auto') { + step.operation = OperationEvent.Signal.atsAutoControl.confirm.operation; + step.cmdType = CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING; + } else if (this.unlockType === 'artificial') { + step.operation = OperationEvent.Signal.humanControl.confirm.operation; + step.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING; + } + } else if (this.activeName === 'second') { + step.operation = OperationEvent.Signal.cancelTrainRoute.confirm.operation; + step.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE; + } + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.doClose(); + } + }).catch((error) => { + this.$refs.noticeInfo.doShow(); + }); }, - handleClick() { + handleCurrentChange1(val) { + this.$refs.singleTable2.setCurrentRow(); + this.$refs.singleTable1.setCurrentRow(val); + if (!val) { return; } + const step = { + code: `${val.code}`, + operation: OperationEvent.Signal.atsAutoControl.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + handleCurrentChange2(val) { + this.$refs.singleTable1.setCurrentRow(); + this.$refs.singleTable2.setCurrentRow(val); + if (!val) { return; } + const step = { + code: `${val.code}`, + operation: OperationEvent.Signal.atsAutoControl.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + handleCurrentChange3(val) { + this.$refs.singleTable4.setCurrentRow(); + this.$refs.singleTable3.setCurrentRow(val); + if (!val) { return; } + const step = { + code: `${val.code}`, + operation: OperationEvent.Signal.cancelTrainRoute.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + handleCurrentChange4(val) { + this.$refs.singleTable3.setCurrentRow(); + this.$refs.singleTable4.setCurrentRow(val); + const step = { + code: `${val.code}`, + operation: OperationEvent.Signal.cancelTrainRoute.choose.operation, + param: {} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + this.selected = val; + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + }, + handleCurrentChange5(val) { + }, + getRouteDirection(route) { + const signalEle = this.$store.getters['map/getDeviceByCode'](route.startSignalCode); + if (signalEle.right) { + return '0'; + } else { + return '1'; + } }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionOpen.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionOpen.vue index 3f0aa36ca..50956db42 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionOpen.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionOpen.vue @@ -2,19 +2,31 @@ - + - - - + + + {{ getStationName(scope.row) }} + + + + + {{ getSectionStatus(scope.row.code) }} + + + + + {{ getProcess(scope.row.code) }} + + - + 命令 - - 确认(F) - 取消(N) + + 确认(F) + 取消(N) @@ -42,6 +54,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'SwitchActive', @@ -57,16 +70,20 @@ export default { loading: false, selected: null, active: false, - selectShow: false, activeName: 'first', tempData: [], - radio: '1' + radio: '1', + operate: {}, + command: true }; }, computed: { ...mapGetters('map', [ 'sectionList' ]), + isBlock() { + return !!this.operate && this.operate.operation === OperationEvent.Section.lock.confirm.operation; + }, show() { return this.dialogShow && !this.$store.state.menuOperation.break; }, @@ -80,7 +97,7 @@ export default { return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; }, title() { - return '初始化开放轨道'; + return this.isBlock ? '初始化关闭轨道' : '初始化开放轨道'; } }, watch: { @@ -98,9 +115,10 @@ export default { methods: { doShow(operate, selected) { this.selected = selected; - // 如果不是断点激活,而是第一次显示,则需要设置初始值 + this.operate = operate; this.dialogShow = true; this.$nextTick(function () { + this.$refs.singleTable.setCurrentRow(this.selected); this.$store.dispatch('training/emitTipFresh'); }); }, @@ -110,13 +128,42 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, selectLine(val) { - // console.log(val); - this.selectShow = true; + this.$refs.singleTable.setCurrentRow(this.selected); + }, + getProcess(code) { + if (this.selected && this.selected.code === code) { + return '等待确认/取消'; + } else { + return ''; + } + }, + getStationName(val) { + const stationElm = this.$store.getters['map/getDeviceByCode'](val.stationCode); + return stationElm.name; + }, + getSectionStatus(code) { + const sectionElm = this.$store.getters['map/getDeviceByCode'](code); + return sectionElm.blockade ? '关闭双向:所有列车' : '打开'; }, commit() { - }, - handleClick() { - + if (this.command) { + const operate = { + cmdType: this.isBlock ? CMD.Section.CMD_SECTION_BLOCK : CMD.Section.CMD_SECTION_UNBLOCK, + operation: this.isBlock ? OperationEvent.Section.lock.confirm1.operation : OperationEvent.Section.unlock.confirm1.operation, + over: true, + param: {sectionCode: this.selected.code} + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + this.$emit('commandSuccess', this.selected.code); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + } else { + this.cancel(); + } }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalBlock.vue index 0c0ade72b..85aa7417a 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalBlock.vue @@ -2,17 +2,35 @@ - + - - - + + + {{ getSignalStatus(scope.row.code) }} + + + + + {{ getProcess(scope.row.code, 'lock') }} + + + + + {{ getProcess(scope.row.code, 'unlock') }} + + 命令 - 确认 + 确认 取消 @@ -41,6 +59,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'SignalBlock', @@ -55,13 +74,17 @@ export default { dialogShow: false, loading: false, selected: null, - operate: {} + operate: {}, + title: '' }; }, computed: { ...mapGetters('map', [ 'signalList' ]), + isBlock() { + return this.operate && this.operate.operation === OperationEvent.Signal.lock.confirm.operation; + }, show() { return this.dialogShow && !this.$store.state.menuOperation.break; }, @@ -73,10 +96,10 @@ export default { }, domIdConfirm() { return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; - }, - title() { - return this.operate.operation === OperationEvent.Signal.lock.menu.operation ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁'; } + // title() { + // return this.operate.operation === OperationEvent.Signal.lock.menu.operation ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁'; + // } }, watch: { '$store.state.map.keyboardEnterCount': function (val) { @@ -95,8 +118,10 @@ export default { this.selected = selected; this.operate = operate; // 如果不是断点激活,而是第一次显示,则需要设置初始值 + this.title = this.operate && this.operate.operation === OperationEvent.Switch.block.confirm.operation ? '确认/取消信号机封锁' : '确认/取消信号机解除封锁'; this.dialogShow = true; this.$nextTick(function () { + this.$refs.singleTable.setCurrentRow(selected); this.$store.dispatch('training/emitTipFresh'); }); }, @@ -106,9 +131,42 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, commit() { + if (this.command) { + const operate = { + cmdType: this.isBlock ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK, + operation: this.isBlock ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation, + over: true, + param: {signalCode: this.selected.code} + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + this.$emit('commandSuccess', this.selected.code); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); + } else { + this.cancel(); + } }, - handleClick() { - + handleCurrentChange(val) { + this.$refs.singleTable.setCurrentRow(this.selected); + }, + getSignalStatus(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.blockade) { + return '锁闭的'; + } else { + return '未设锁闭'; + } + }, + getProcess(code, type) { + if (this.selected.code === code && ((type === 'lock' && this.isBlock) || (type === 'unlock' && !this.isBlock))) { + return '等待确认/取消'; + } else { + return ''; + } }, cancel() { const operate = { @@ -116,6 +174,7 @@ export default { }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { + this.$emit('cancelCommand'); this.doClose(); } }).catch(() => { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue index c0e72f42f..fac6dc557 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue @@ -1,19 +1,33 @@ - + - + - - - + + + {{ getSignalBlock(scope.row.code) }} + + + 否 + + + {{ getProcess(scope.row.code) }} + + 命令 - 确认 - 取消 + 确认 + 取消 @@ -40,6 +54,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'SignalCanBlock', @@ -55,7 +70,7 @@ export default { loading: false, selected: null, operate: '', - command: '' + command: true }; }, computed: { @@ -97,6 +112,7 @@ export default { // 如果不是断点激活,而是第一次显示,则需要设置初始值 this.dialogShow = true; this.$nextTick(function () { + this.$refs.singleTable.setCurrentRow(selected); this.$store.dispatch('training/emitTipFresh'); }); }, @@ -106,9 +122,38 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, commit() { + const operate = { + cmdType: this.command ? CMD.Signal.CMD_SIGNAL_BLOCK : CMD.Signal.CMD_SIGNAL_UNBLOCK, + operation: this.command ? OperationEvent.Signal.lock.confirm1.operation : OperationEvent.Signal.unlock.confirm1.operation, + over: true, + param: {signalCode: this.selected.code} + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + this.$emit('commandSuccess', this.selected.code); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); }, - handleClick() { - + handleCurrentChange(val) { + this.$refs.singleTable.setCurrentRow(this.selected); + }, + getSignalBlock(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.blockade) { + return '关闭'; + } else { + return '开启'; + } + }, + getProcess(code) { + if (this.selected && this.selected.code === code) { + return '等待确认/取消'; + } else { + return ''; + } }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalDetail.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalDetail.vue index 772fcb3f8..518c38c74 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalDetail.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalDetail.vue @@ -3,7 +3,11 @@ - + + + {{ getSignalShow(scope.row.code) }} + + @@ -14,20 +18,24 @@ - + + + {{ getSignalStatus(scope.row.code) }} + + - 打印(P) + 打印(P) 关闭(C) - 帮助(H) + 帮助(H) @@ -111,8 +119,27 @@ export default { } }); }, - handleClick() { - + getSignalStatus(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.blockade) { + return '锁闭的'; + } else { + return '未设锁闭'; + } + }, + getSignalShow(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) { + return '红'; + } else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) { + return '绿'; + } else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) { + return '黄'; + } else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) { + return '引导'; + } else { + return ''; + } }, cancel() { const operate = { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalGuide.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalGuide.vue index d35a8aef2..244da0bf3 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalGuide.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalGuide.vue @@ -2,19 +2,37 @@ - + - - - + + + {{ getSignalShow(scope.row.code) }} + + + + + {{ getCanGuide(scope.row.code) }} + + + + + {{ getProcess(scope.row.code) }} + + 命令 - 确认 - 取消 + 确认 + 取消 @@ -41,6 +59,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; // import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import { mapGetters } from 'vuex'; +import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { name: 'SignalGuide', @@ -55,7 +74,7 @@ export default { dialogShow: false, loading: false, selected: null, - command: '', + command: true, operate: '' }; }, @@ -98,6 +117,7 @@ export default { // 如果不是断点激活,而是第一次显示,则需要设置初始值 this.dialogShow = true; this.$nextTick(function () { + this.$refs.singleTable.setCurrentRow(selected); this.$store.dispatch('training/emitTipFresh'); }); }, @@ -107,9 +127,52 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, commit() { + const operate = { + cmdType: this.command ? CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE : CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE, + operation: this.command ? OperationEvent.Signal.guide.confirm1.operation : OperationEvent.Signal.cancelGuide.confirm1.operation, + over: true, + param: {signalCode: this.selected.code} + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.doClose(); + this.$emit('commandSuccess', this.selected.code); + } + }).catch(() => { + this.$refs.noticeInfo.doShow(); + }); }, - handleClick() { - + getSignalShow(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.redOpen && !signalEle.yellowOpen && !signalEle.greenOpen) { + return '红'; + } else if (!signalEle.redOpen && !signalEle.yellowOpen && signalEle.greenOpen) { + return '绿'; + } else if (!signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) { + return '黄'; + } else if (signalEle.redOpen && signalEle.yellowOpen && !signalEle.greenOpen) { + return '引导'; + } else { + return ''; + } + }, + getCanGuide(code) { + const signalEle = this.$store.getters['map/getDeviceByCode'](code); + if (signalEle.callOn) { + return '是'; + } else { + return '否'; + } + }, + getProcess(code) { + if (this.selected && this.selected.code === code) { + return '等待确认/取消'; + } else { + return ''; + } + }, + handleCurrentChange(val) { + this.$refs.singleTable.setCurrentRow(this.selected); }, cancel() { const operate = { @@ -117,6 +180,7 @@ export default { }; this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { + this.$emit('cancelCommand'); this.doClose(); } }).catch(() => { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/standControl.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/standControl.vue index f91e67046..24f365647 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/standControl.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/standControl.vue @@ -11,7 +11,9 @@ > - 打开 + + {{ getStandStatus(scope.row.code) }} + @@ -22,7 +24,7 @@ 关闭 - 所有站台(F) + 所有站台(F) @@ -46,8 +48,8 @@