From 59f5336f8ae6137362bae32a3c3bbe7513c760d0 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 20 Mar 2020 10:31:19 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E4=B8=80=E5=8F=B7?= =?UTF-8?q?=E7=BA=BF=E4=BF=A1=E5=8F=B7=E6=9C=BA=E5=8C=BA=E6=AE=B5=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=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 --- .../theme/beijing_01/menus/menuSection.vue | 47 +-- .../theme/beijing_01/menus/menuSignal.vue | 280 ++++-------------- .../beijing_01/menus/utils/menuOperate.js | 106 +++++-- .../config/broadcast/centerHome.vue | 10 +- 4 files changed, 156 insertions(+), 287 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index 200a9d641..7561350c1 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -20,7 +20,7 @@ import { DeviceMenu } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import {menuOperate} from './utils/menuOperate'; +import {menuOperate, commitOperate} from './utils/menuOperate'; export default { name: 'SectionMenu', @@ -173,7 +173,7 @@ export default { // }, // 故障解锁 faultUnlock(selectType) { - this.commitOperate(menuOperate.Section.fault, selectType, [selectType.code]).then((data)=>{ + commitOperate(menuOperate.Section.fault, selectType, [selectType.code]).then((data)=>{ this.$refs.sectionControl.doShow(data.operate, data.selected); }); }, @@ -187,56 +187,37 @@ export default { }, // 切除 split() { - this.commitOperate(menuOperate.Section.split, this.selected, [this.selected.code]).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, data.selected); + commitOperate(menuOperate.Section.split, {sectionCode:this.selected.code}, 0).then((data)=>{ + this.$refs.sectionControl.doShow(data.operate, this.selected); }); }, alxeEffective() { - this.commitOperate(menuOperate.Section.alxeEffective, this.selected, [this.selected.code]).then((data)=>{ - this.$refs.alxeEffective.doShow(data.operate, data.selected); + commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then((data)=>{ + this.$refs.alxeEffective.doShow(data.operate, this.selected); }); }, // 激活 active() { - this.commitOperate(menuOperate.Section.active, this.selected, [this.selected.code]).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, data.selected); + commitOperate(menuOperate.Section.active, {sectionCode:this.selected.code}, 0).then((data)=>{ + this.$refs.sectionControl.doShow(data.operate, this.selected); }); }, // 区段计轴预复位 axlePreReset(selectType) { - this.commitOperate(menuOperate.Section.axlePreReset, selectType, [selectType.code]).then((data)=>{ - this.$refs.sectionControl.doShow(data.operate, data.selected); + commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then((data)=>{ + this.$refs.sectionControl.doShow(data.operate, selectType); }); }, // 区段计轴预复位 // axlePreReset() { - // this.commitOperate(menuOperate.Section.axlePreReset, this.selected, [this.selected.code]).then((data)=>{ - // this.$refs.sectionCmdControl.doShow(data.operate, data.selected); + // this.commitOperate(menuOperate.Section.axlePreReset, {sectionCode:this.selected.code},0).then((data)=>{ + // this.$refs.sectionCmdControl.doShow(data.operate, this.selected); // }); // }, // 设置速度 setSpeed() { - this.commitOperate(menuOperate.Section.setSpeed, this.selected, [this.selected.code]).then((data)=>{ - this.$refs.speedLimitControl.doShow(data.operate, data.selected); - }); - }, - commitOperate(operate, selected, paramList) { - const step = { - start: true, - operation: operate.operation, - param:{} - }; - operate.param.forEach((each, index)=>{ - step.param[each] = paramList[index]; - }); - const obj = this; - return new Promise(function(resolve, reject) { - obj.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - obj.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - resolve({operate:step, selected:selected}); - } - }); + commitOperate(menuOperate.Section.setSpeed, {sectionCode:this.selected.code}, 0).then((data)=>{ + this.$refs.speedLimitControl.doShow(data.operate, this.selected); }); } } diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index 0a9f82256..bf35a12d4 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -25,6 +25,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu } from '@/scripts/ConstDic'; import { mouseCancelState } from './utils/menuItemStatus'; import PasswordBox from './dialog/childDialog/passwordInputBox.vue'; +import {menuOperate, commitOperate} from './utils/menuOperate'; export default { name: 'SignalMenu', @@ -294,7 +295,6 @@ export default { } }; - mouseCancelState(this.selected); this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { @@ -332,278 +332,118 @@ export default { }, // 设置进路 arrangementRoute() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.arrangementRoute.menu.operation - // param: { - // signalCode: `${this.selected.code}` - // } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (valid) { - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeSelection.doShow(operate, this.selected, routes); - } - }).catch(() => { - this.$refs.noticeInfo.doShow(operate); + commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then((data)=>{ + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); + this.$refs.routeSelection.doShow(data.operate, this.selected, routes); }); }, // 现地设置进路 setRoute(route) { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.arrangementRoute.menu.operation, - param: { - routeCode: route.code - }, - cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - }).catch((error) => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, [], 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 取消进路 cancelTrainRoute() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (valid) { - this.$refs.routeControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then((data)=>{ + this.$refs.routeControl.doShow(data.operate, this.selected); }); }, // 现地取消进路 cancelTrainRouteByLow(selectType) { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, - param: { - signalCode: selectType.code - }, - cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch((error) => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 现地总人解 humanTrainRoute(selectType) { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.humanTrainRoute.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - if (valid) { - step.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; - this.$refs.password.doShow(step); - } + commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then((data)=>{ + data.operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; + this.$refs.password.doShow(data.operate); }); }, // 现地信号重开操作 reopenSignalByRoute(selectType) { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.reopenSignal.menu.operation, - param: { - signalCode: selectType.code - }, - cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch((error) => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 信号重开 reopenSignal() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.reopenSignal.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Signal.reopenSignal, {signalCode:this.selected.code}, 0).then((data)=>{ + this.$refs.routeControl.doShow(data.operate, this.selected); }); }, // 信号关灯 signalClose() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.signalClose.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeControl.doShow(operate, this.selected); - } + commitOperate(menuOperate.Signal.signalClose, {signalCode:this.selected.code}, 0).then((data)=>{ + this.$refs.routeControl.doShow(data.operate, this.selected); }); }, // 现地信号关灯 signalCloseByLow(selectType) { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.signalClose.menu.operation, - param: { - signalCode: selectType.code - }, - cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch((error) => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 进路交人工控 humanControl() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.humanControl.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.$refs.routeHandControl.doShow(operate, this.selected, routes); - } + commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then((data)=>{ + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); + this.$refs.routeHandControl.doShow(data.operate, this.selected, routes); }); }, // 进路交自动控 atsAutoControl() { - const operate = { - start: true, - code: this.selected.code, - operation: OperationEvent.Signal.atsAutoControl.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeHandControl.doShow(operate, this.selected, routes); - } + commitOperate(menuOperate.Signal.atsAutoControl, {signalCode:this.selected.code}, 0).then((data)=>{ + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); + this.$refs.routeHandControl.doShow(data.operate, this.selected, routes); }); }, // 设置通过模式 singalPassModel(selectType) { - const operate = { - start: true, - over: true, - operation: OperationEvent.Signal.setAutoInterlock.menu.operation, - param: { - signalCode:selectType.code - }, - cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch(error => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 取消通过模式 singalCancelPassModel(selectType) { - const operate = { - start: true, - over: true, - operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation, - param: { - signalCode:selectType.code - }, - cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO - }; - this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - } - }).catch(error => { - this.$refs.noticeInfo.doShow(operate, error.message); + commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then((data)=>{ + }).catch(error=>{ + this.$refs.noticeInfo.doShow({}, error.message); }); }, // 查询进路状态 detail() { - const step = { - start: true, - code: `${this.selected.code}`, - operation: OperationEvent.Signal.detail.menu.operation, - param: { - signalCode: `${this.selected.code}` - } - }; - this.$store.dispatch('training/nextNew', step).then(({ valid }) => { - if (valid) { - this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - const routes = []; - this.routeList.forEach(elem => { - if (elem.startSignalCode === this.selected.code) { - routes.push(elem); - } - }); - this.$refs.routeDetail.doShow(step, this.selected, routes); - } + commitOperate(menuOperate.Signal.detail, {signalCode:this.selected.code}, 0).then((data)=>{ + const routes = []; + this.routeList.forEach(elem => { + if (elem.startSignalCode === this.selected.code) { + routes.push(elem); + } + }); + this.$refs.routeDetail.doShow(data.operate, this.selected, routes); }); }, passWordCommit(data) { diff --git a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js index 9befae7c6..b6936687f 100644 --- a/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js +++ b/src/jmapNew/theme/beijing_01/menus/utils/menuOperate.js @@ -1,4 +1,3 @@ -import Vue from 'vue'; import store from '@/store'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; @@ -42,34 +41,83 @@ export const menuOperate = { param:['sectionCode'], cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK } + }, + Signal:{ + arrangementRoute:{ + // 排列进路 + operation: OperationEvent.Signal.arrangementRoute.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE + }, + cancelTrainRoute:{ + // 取消进路 + operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE + }, + humanTrainRoute:{ + // 总人解 + operation: OperationEvent.Signal.humanTrainRoute.menu.operation, + cmdType:CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE + }, + reopenSignal:{ + // 信号重开 + operation: OperationEvent.Signal.reopenSignal.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL + }, + signalClose:{ + // 信号关灯 + operation: OperationEvent.Signal.signalClose.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL + }, + humanControl:{ + // 进路交人工控 + operation: OperationEvent.Signal.humanControl.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING + }, + atsAutoControl:{ + // 进路交自动控 + operation: OperationEvent.Signal.atsAutoControl.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING + }, + setAutoInterlock:{ + // 设置通过模式 + operation: OperationEvent.Signal.setAutoInterlock.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO + }, + cancelAutoInterlock:{ + // 取消通过模式 + operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation, + cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO + }, + detail:{ + // 查询进路状态 + operation: OperationEvent.Signal.detail.menu.operation + } } }; -// export function commitOperate(menuoperate, paramList, selected, callback) { -// return new Promise((resolve, reject) => { -// try { -// const operate = { -// start: true, -// operation: OperationEvent.Section.split.menu.operation, -// param: { -// sectionCode: `${this.selected.code}` -// } -// }; -// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { -// if (valid) { -// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); -// resolve(true); -// // callback({operate:operate, selected:selected}); -// // this.$refs.sectionControl.doShow(operate, this.selected); -// } -// }).catch((error) => { -// this.loading = false; -// this.doClose(); -// this.$refs.noticeInfo.doShow(operate, error.message); -// }); -// } catch (error) { -// reject(error); -// } -// }); - -// } +export function commitOperate(operate, paramList, over) { + const step = { + start: true, + operation: operate.operation, + param:{} + }; + step.param = paramList; + // isOnce 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作 + if (over != 0) { + delete step.start; + } + if (over == 2 || over == 3) { + step.over = true; + step.cmdType = operate.cmdType; + } + return new Promise(function(resolve, reject) { + store.dispatch('training/nextNew', step).then(({ valid }) => { + if (valid) { + store.dispatch('menuOperation/handleBreakFlag', { break: true }); + resolve({operate:step}); + } + }).catch(error=>{ + reject(error); + }); + }); +} diff --git a/src/views/iscs/iscsSystem/config/broadcast/centerHome.vue b/src/views/iscs/iscsSystem/config/broadcast/centerHome.vue index ce54fb38f..2ce124d25 100644 --- a/src/views/iscs/iscsSystem/config/broadcast/centerHome.vue +++ b/src/views/iscs/iscsSystem/config/broadcast/centerHome.vue @@ -12,16 +12,16 @@
全换乘通道
-
+
{{ item.name }}
-
+
{{ it }}
-
+
0
@@ -40,7 +40,7 @@
预备
广播
-
+
普通预录

@@ -72,7 +72,7 @@
- +
From 404d8677672ed5dcb946a5100a6d793eabe1dbad Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Fri, 20 Mar 2020 11:09:06 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=BB=98=E5=9B=BE&=E6=88=90=E4=B8=89?= =?UTF-8?q?=E7=8E=B0=E5=9C=B0=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/zh/map.js | 2 +- src/jmapNew/constant/stateTransition.js | 27 ++++++ .../theme/chengdu_03/menus/menuButton.vue | 22 +++-- src/jmapNew/utils/parser.js | 83 +++++++++---------- src/scripts/cmdPlugin/CommandEnum.js | 4 +- src/store/modules/map.js | 60 +------------- .../newMapdraft/mapoperate/controlLamp.vue | 76 ++++++++++++++--- 7 files changed, 153 insertions(+), 121 deletions(-) diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js index 18f9657fc..f286ed13e 100644 --- a/src/i18n/langs/zh/map.js +++ b/src/i18n/langs/zh/map.js @@ -595,7 +595,7 @@ export default { reentrySection2: '折返区段2', setPriority: '设置优先级', associatedStationList: '关联站台列表:', - whetherAutoRoute: '是否自定进路', + whetherAutoRoute: '是否自动进路', hostileData: '敌对数据', routeContinuesToProtectSectorData: '进路延续保护区段数据', physicalSectionID: '物理区段ID', diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index d88b91330..85ffd91a6 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -135,6 +135,33 @@ class Status { handleResource(device) { this.statusObj = { }; } + handleAtsControl(device) { + this.statusObj = {}; + } + handleCenterCommunication(device) { + this.statusObj = {}; + } + handleChainControl(device) { + this.statusObj = {}; + } + handleIntersiteControl(device) { + this.statusObj = {}; + } + handleLeuControl(device) { + this.statusObj = {}; + } + handleLocalControl(device) { + this.statusObj = {}; + } + handleMaintain(device) { + this.statusObj = {}; + } + handlePowerSupply(device) { + this.statusObj = {}; + } + handleNoOneReturn(device) { + this.statusObj = {}; + } getStatus() { return this.statusObj; } diff --git a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue index 5eaed4f53..18c438f4e 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue @@ -331,16 +331,22 @@ export default { }); } } else if (deviceList.length === 2) { + let flag = false; this.routeList.forEach(item => { if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_ROUTE; operate.param = {routeCode: item.code}; this.deviceList = []; + flag = true; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => { this.$refs.noticeInfo.doShow(operate); }); } }); + if (!flag) { + this.deviceList = []; + this.$refs.noticeInfo.doShow(operate); + } } }, handelFunctionButton(model, subType) { @@ -446,30 +452,30 @@ export default { cmdType: this.cmdType, param: '' }; + let flag = false; this.routeList.forEach(item => { if (item.startSignalCode === deviceList[0].code && item.endSignalCode === deviceList[1].code) { operate.param = {routeCode: item.code}; this.deviceList = []; + flag = true; this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {}).catch(() => { this.$refs.noticeInfo.doShow(operate); }); } }); + if (!flag) { + this.deviceList = []; + this.$refs.noticeInfo.doShow(operate); + } } }, handleTotalHumanSolution(model) { - let route = ''; - this.routeList.forEach(item => { - if (item.startSignalCode === model.code) { - route = item; - } - }); const operate = { send: true, operation: this.$store.state.menuOperation.buttonOperation }; - if (this.routeData[route.code].settingGuide) { - operate.cmdType = CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE; + if (model.yellowOpen && model.redOpen) { + operate.cmdType = CMD.Signal.CMD_SIGNAL_CLOSE_GUIDE; operate.param = {signalCode: model.code}; this.deviceList = []; this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}); diff --git a/src/jmapNew/utils/parser.js b/src/jmapNew/utils/parser.js index 30c23c569..5db4a6ffd 100644 --- a/src/jmapNew/utils/parser.js +++ b/src/jmapNew/utils/parser.js @@ -135,41 +135,38 @@ export function parser(data, skinCode, showConfig) { mapDevice[elem.code] = createDevice(deviceType.OutFrame, elem, propConvert, showConfig); }, this); - zrUtil.each(data.atsControlList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.AtsControl, elem, propConvert, showConfig); - }); + zrUtil.each(data.indicatorLightList || [], elem => { + switch (elem.type) { + case 'AtsControl': + mapDevice[elem.code] = createDevice(deviceType.AtsControl, elem, propConvert, showConfig); + break; + case 'CenterCommunication': + mapDevice[elem.code] = createDevice(deviceType.CenterCommunication, elem, propConvert, showConfig); + break; + case 'ChainControl': + mapDevice[elem.code] = createDevice(deviceType.ChainControl, elem, propConvert, showConfig); + break; + case 'IntersiteControl': + mapDevice[elem.code] = createDevice(deviceType.IntersiteControl, elem, propConvert, showConfig); + break; + case 'LeuControl': + mapDevice[elem.code] = createDevice(deviceType.LeuControl, elem, propConvert, showConfig); + break; + case 'LocalControl': + mapDevice[elem.code] = createDevice(deviceType.LocalControl, elem, propConvert, showConfig); + break; + case 'Maintain': + mapDevice[elem.code] = createDevice(deviceType.Maintain, elem, propConvert, showConfig); + break; + case 'PowerSupply': + mapDevice[elem.code] = createDevice(deviceType.PowerSupply, elem, propConvert, showConfig); + break; + case 'NoOneReturn': + mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig); + break; + } + }, this); - zrUtil.each(data.centerCommunicationList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.CenterCommunication, elem, propConvert, showConfig); - }); - - zrUtil.each(data.chainControlList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.ChainControl, elem, propConvert, showConfig); - }); - - zrUtil.each(data.intersiteControlList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.IntersiteControl, elem, propConvert, showConfig); - }); - - zrUtil.each(data.leuControlList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.LeuControl, elem, propConvert, showConfig); - }); - - zrUtil.each(data.localControlList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.LocalControl, elem, propConvert, showConfig); - }); - - zrUtil.each(data.maintainList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.Maintain, elem, propConvert, showConfig); - }); - - zrUtil.each(data.powerSupplyList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.PowerSupply, elem, propConvert, showConfig); - }); - - zrUtil.each(data.noOneReturnList || [], elem => { - mapDevice[elem.code] = createDevice(deviceType.NoOneReturn, elem, propConvert, showConfig); - }); zrUtil.each(data.trainWindowList || [], elem => { mapDevice[elem.code] = createDevice(deviceType.TrainWindow, elem, propConvert, showConfig); if (elem.sectionCode) { @@ -266,15 +263,15 @@ export function updateMapData(state, model) { case deviceType.GuideLock: updateForList(model, state, 'totalGuideLockButtonVOList'); break; case deviceType.OutFrame: updateForList(model, state, 'outerFrameList'); break; case deviceType.AutomaticRoute: updateForList(model, state, 'automaticRouteButtonList'); break; - case deviceType.AtsControl: updateForList(model, state, 'atsControlList'); break; - case deviceType.CenterCommunication: updateForList(model, state, 'centerCommunicationList'); break; - case deviceType.ChainControl: updateForList(model, state, 'chainControlList'); break; - case deviceType.IntersiteControl: updateForList(model, state, 'intersiteControlList'); break; - case deviceType.LeuControl: updateForList(model, state, 'leuControlList'); break; - case deviceType.LocalControl: updateForList(model, state, 'localControlList'); break; - case deviceType.Maintain: updateForList(model, state, 'maintainList'); break; - case deviceType.PowerSupply: updateForList(model, state, 'powerSupplyList'); break; - case deviceType.NoOneReturn: updateForList(model, state, 'noOneReturnList'); break; + case deviceType.AtsControl: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.CenterCommunication: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.ChainControl: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.IntersiteControl: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.LeuControl: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.LocalControl: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.Maintain: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.PowerSupply: updateForList(model, state, 'indicatorLightList'); break; + case deviceType.NoOneReturn: updateForList(model, state, 'indicatorLightList'); break; } } } diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 150696916..f767ecc9d 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -78,8 +78,10 @@ export default { CMD_SIGNAL_REOPEN_SIGNAL: {value:'Signal_Reopen_Signal', label: '信号重开'}, /** 办理引导 */ CMD_SIGNAL_ROUTE_GUIDE: {value:'Signal_Set_Guide', label: '办理引导'}, + /** 取消引导同时取消进路 */ + CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导&进路'}, /** 取消引导 */ - CMD_SIGNAL_CANCEL_GUIDE: {value:'Signal_Cancel_Guide', label: '取消引导'}, + CMD_SIGNAL_CLOSE_GUIDE: {value: 'Signal_Close_Guide', label: '取消引导'}, /** 进路自排开 */ CMD_SIGNAL_OPEN_AUTO_SETTING: {value:'Signal_Open_Auto_Setting', label: '进路自排开'}, /** 进路自排关 */ diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 05ca7913c..3ba86a0f0 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -361,65 +361,9 @@ const map = { return []; } }, - atsControlList: (state) => { + indicatorLightList: (state) => { if (state.map) { - return state.map.atsControlList || []; - } else { - return []; - } - }, - centerCommunicationList: (state) => { - if (state.map) { - return state.map.centerCommunicationList || []; - } else { - return []; - } - }, - chainControlList: (state) => { - if (state.map) { - return state.map.chainControlList || []; - } else { - return []; - } - }, - intersiteControlList: (state) => { - if (state.map) { - return state.map.intersiteControlList || []; - } else { - return []; - } - }, - leuControlList: (state) => { - if (state.map) { - return state.map.leuControlList || []; - } else { - return []; - } - }, - powerSupplyList: (state) => { - if (state.map) { - return state.map.powerSupplyList || []; - } else { - return []; - } - }, - maintainList: (state) => { - if (state.map) { - return state.map.maintainList || []; - } else { - return []; - } - }, - localControlList: (state) => { - if (state.map) { - return state.map.localControlList || []; - } else { - return []; - } - }, - noOneReturnList: (state) => { - if (state.map) { - return state.map.noOneReturnList || []; + return state.map.indicatorLightList || []; } else { return []; } diff --git a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue index 01d765f51..5c806bb9c 100644 --- a/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue +++ b/src/views/newMap/newMapdraft/mapoperate/controlLamp.vue @@ -53,6 +53,15 @@ export default { return { activeName: 'first', autoList: [], + atsControlList: [], + centerCommunicationList: [], + chainControlList: [], + intersiteControlList: [], + leuControlList: [], + localControlList: [], + maintainList: [], + powerSupplyList: [], + noOneReturnList: [], typeList: [ { name: 'LEU通信', value: 'LeuControl' }, { name: '站间通信', value: 'IntersiteControl' }, @@ -96,6 +105,9 @@ export default { ], 'position.y': [ { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } + ], + stationCode: [ + { required: true, message: '请选择设备集中站', trigger: 'change'} ] } }; @@ -103,15 +115,7 @@ export default { computed: { ...mapGetters('map', [ 'stationList', - 'atsControlList', - 'centerCommunicationList', - 'chainControlList', - 'intersiteControlList', - 'leuControlList', - 'localControlList', - 'maintainList', - 'powerSupplyList', - 'noOneReturnList' + 'indicatorLightList' ]), form() { const form = { @@ -124,7 +128,7 @@ export default { draw: { name: this.$t('map.drawData'), item: [ - { prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, disabled: true }, + { prop:'type', label: '表示灯类型:', type: 'select', optionLabel: 'name', optionValue: 'value', options: this.typeList, change: true, deviceChange: this.typeChange }, { prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.selectLists, change: true, deviceChange: this.deviceChange }, { prop: 'name', label: '表示灯名称:', type: 'input' }, { prop: 'position', label: '坐标:', type: 'coordinate', width: '140px', children: [ @@ -166,6 +170,9 @@ export default { ], 'position.y': [ { required: true, message: this.$t('rules.trainPositionY'), trigger: 'blur' } + ], + stationCode: [ + { required: true, message: '请选择设备集中站', trigger: 'change'} ] }; } @@ -173,17 +180,64 @@ export default { watch: { selected(val, oldVal) { this.deviceSelect(val); + }, + indicatorLightList(val) { + this.handleIndicatorLightList(val); } }, mounted() { + this.handleIndicatorLightList(this.indicatorLightList); }, methods: { typeChange(type) { this.$refs.dataform.resetFields(); this.$refs.make.resetFields(); this.addModel.type = type; + this.editModel.type = type; this.handleTypes(type); }, + handleIndicatorLightList(indicatorLightList) { + this.atsControlList = []; + this.centerCommunicationList = []; + this.chainControlList = []; + this.intersiteControlList = []; + this.leuControlList = []; + this.localControlList = []; + this.maintainList = []; + this.powerSupplyList = []; + this.noOneReturnList = []; + indicatorLightList.forEach(item => { + switch (item._type) { + case 'AtsControl': + this.atsControlList.push(item); + break; + case 'CenterCommunication': + this.centerCommunicationList.push(item); + break; + case 'ChainControl': + this.chainControlList.push(item); + break; + case 'IntersiteControl': + this.intersiteControlList.push(item); + break; + case 'LeuControl': + this.leuControlList.push(item); + break; + case 'LocalControl': + this.localControlList.push(item); + break; + case 'Maintain': + this.maintainList.push(item); + break; + case 'PowerSupply': + this.powerSupplyList.push(item); + break; + case 'NoOneReturn': + this.noOneReturnList.push(item); + break; + } + }); + }, handleTypes(type) { switch (type) { case 'AtsControl': @@ -214,6 +268,7 @@ export default { this.selectLists = this.noOneReturnList; break; } + console.log(this.selectLists, '==============='); }, changeStation(code) { // 选择对应的所属设备集中站 this.autoList.forEach(elem => { @@ -253,6 +308,7 @@ export default { const models = []; const model = { _type: this.addModel.type, + type: this.addModel.type, code: uid, name: this.addModel.name, position: { From 3e14220cfc79b579747f9f86181ae68ac8cd90a0 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Fri, 20 Mar 2020 11:20:13 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BB=BC=E5=90=88?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E7=AB=99=E5=8F=B0=E6=95=B0=E6=8D=AE=EF=BC=8C?= =?UTF-8?q?=E5=8F=8A=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iscs/iscsSystem/config/bas/controlBAS.vue | 170 ++++++++------ .../config/broadcast/centerHome.vue | 212 ++++++++++-------- .../config/broadcast/homeScreen.vue | 2 +- src/views/iscs/iscsSystem/config/index.vue | 6 +- .../iscs/iscsSystem/config/pis/mainScreen.vue | 108 ++------- 5 files changed, 242 insertions(+), 256 deletions(-) diff --git a/src/views/iscs/iscsSystem/config/bas/controlBAS.vue b/src/views/iscs/iscsSystem/config/bas/controlBAS.vue index c67973b00..4612fcdf4 100644 --- a/src/views/iscs/iscsSystem/config/bas/controlBAS.vue +++ b/src/views/iscs/iscsSystem/config/bas/controlBAS.vue @@ -39,7 +39,7 @@
状态比较
- +