diff --git a/src/jmapNew/theme/components/menus/dialog/routeControl.vue b/src/jmapNew/theme/components/menus/dialog/routeControl.vue index f6499bad4..e05d0f716 100644 --- a/src/jmapNew/theme/components/menus/dialog/routeControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/routeControl.vue @@ -39,6 +39,7 @@ + @@ -50,13 +51,15 @@ import ConfirmControl from '../childDialog/confirmControl'; import NoticeInfo from '../childDialog/noticeInfo'; import PasswordBox from '../childDialog/passwordInputBox'; import {menuOperate, commitOperate} from '../../utils/menuOperate'; +import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip'; export default { name: 'RouteControl', components: { ConfirmControl, NoticeInfo, - PasswordBox + PasswordBox, + NingBoConfirmTip }, props: { popClass: { @@ -184,7 +187,11 @@ export default { switch (this.popClass) { case 'ningbo-01__systerm': // 信号机总取消 - this.sendCommand(menuOperate.Signal.signalTotalCancle); + // this.sendCommand(menuOperate.Signal.signalTotalCancle); + this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => { + operate.message = `命令:进路取消
始端信号机:${this.stationName} ${this.signalName}`; + this.$refs.ningBoConfirmTip.doShow(operate); + }); break; case 'fuzhou-01__systerm': if (this.$store.state.training.prdType === '01') { diff --git a/src/jmapNew/theme/components/menus/dialog/sectionUnLock.vue b/src/jmapNew/theme/components/menus/dialog/sectionUnLock.vue index 2db8440d0..25a4185d6 100644 --- a/src/jmapNew/theme/components/menus/dialog/sectionUnLock.vue +++ b/src/jmapNew/theme/components/menus/dialog/sectionUnLock.vue @@ -213,14 +213,6 @@ export default { } }, mounted() { - this.timer = setInterval(() => { - if (this.timeCountConfirm > 0) { - this.timeCountConfirm--; - } else if (this.timeCountConfirm == 0) { // 关闭会话 - this.timeCountConfirm = -1; - this.disabledConfirm2 = true; - } - }, 1000); }, methods: { doShow(operate, selected) { @@ -251,6 +243,7 @@ export default { this.messageText2 = ''; this.$store.dispatch('training/emitTipFresh'); mouseCancelState(this.selected); + this.timer && clearInterval(this.timer); }, SelectChange() { @@ -280,6 +273,7 @@ export default { }, confirm1() { + this.message = '发送First request消息成功,请等待服务器!'; const operate = { operation: '' }; @@ -297,11 +291,22 @@ export default { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.messageText1 = '*****'; - this.messageText2 = ''; - this.disabledConfirm1 = true; - this.disabledConfirm2 = false; - this.timeCountConfirm = 60; // 倒计时 + setTimeout(() => { + this.message = '收到First request消息!'; + this.messageText1 = '*****'; + this.messageText2 = ''; + this.disabledConfirm1 = true; + this.disabledConfirm2 = false; + this.timeCountConfirm = 30; // 倒计时 + this.timer = setInterval(() => { + if (this.timeCountConfirm > 0) { + this.timeCountConfirm--; + } else if (this.timeCountConfirm == 0) { // 关闭会话 + this.timeCountConfirm = -1; + this.disabledConfirm2 = true; + } + }, 1000); + }, 1000); } }).catch(() => { this.$refs.noticeInfo.doShow(); @@ -336,7 +341,7 @@ export default { this.messageText2 = '*****'; this.disabledConfirm2 = true; this.timeCountConfirm = -1; - this.message = '操作成功'; + this.message = '发送 Second Confirm消息成功,请等待服务器'; } }).catch(() => { this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/components/menus/dialog/standControl.vue b/src/jmapNew/theme/components/menus/dialog/standControl.vue index efa9767b8..7973260c9 100644 --- a/src/jmapNew/theme/components/menus/dialog/standControl.vue +++ b/src/jmapNew/theme/components/menus/dialog/standControl.vue @@ -122,6 +122,7 @@ + @@ -131,11 +132,13 @@ import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import NoticeInfo from '../childDialog/noticeInfo'; import {menuOperate, commitOperate} from '../../utils/menuOperate'; import { mapGetters } from 'vuex'; +import NingBoConfirmTip from '../../../ningbo_01/menus/dialog/childDialog/confirmTip'; export default { name: 'StandDetainTrain', components: { - NoticeInfo + NoticeInfo, + NingBoConfirmTip }, props:{ systemName:{ @@ -321,7 +324,14 @@ export default { }, // 设置扣车 setDetainTrain() { - this.sendCommand(menuOperate.StationStand.setDetainTrain); + if (this.systemName === 'ningbo-01__systerm') { + this.sendCommandNext(menuOperate.StationStand.setDetainTrain).then(operate => { + operate.message = `命令:扣车
范围:${this.radio === '1' ? '本站台上行' : '本站台下行'}
车站:${this.stationName}
站台:${this.standName}`; + this.$refs.ningBoConfirmTip.doShow(operate); + }); + } else { + this.sendCommand(menuOperate.StationStand.setDetainTrain); + } }, // 取消扣车 cancelDetainTrain() { @@ -348,6 +358,25 @@ export default { this.$refs.noticeInfo.doShow(); }); }, + sendCommandNext(operate) { + const that = this; + return new Promise(function(resolve, reject) { + that.loading = true; + commitOperate(operate, {}, 1).then(({valid})=>{ + that.loading = false; + if (valid) { + that.doClose(); + that.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + resolve({...operate}); + } + }).catch((error) => { + that.loading = false; + that.doClose(); + console.error(error); + that.$refs.noticeInfo.doShow(); + }); + }); + }, cancel() { const operate = { operation: OperationEvent.Command.cancel.menu.operation diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue index c37a3a2d2..d623d35df 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/confirmTip.vue @@ -67,22 +67,46 @@ export default { this.message = operate.message || ''; this.dialogShow = true; this.operation = operate.operation; + console.log(this.operation, '--'); }, confirm() { - if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) { - const step = { - operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation, - cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE - }; - commitOperate(step, {}, 2).then(({valid, operate})=>{ - if (valid) { - this.$emit('close'); - this.doClose(); - } - }).catch(() => { - this.doClose(); - this.$refs.noticeInfo.doShow(); - }); + try { + if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) { + const step = { + operation: OperationEvent.Signal.arrangementRoute.secondaryConfirm.operation, + cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE + }; + commitOperate(step, {}, 2).then(({valid, operate})=>{ + if (valid) { + this.$emit('close'); + this.doClose(); + } + }); + } else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) { + const step = { + operation: OperationEvent.Signal.cancelTrainRoute.secondaryConfirm.operation, + cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE + }; + commitOperate(step, {}, 2).then(({valid}) => { + if (valid) { + this.doClose(); + } + }); + } else if (this.operation === OperationEvent.StationStand.setDetainTrain.menu.operation) { + const step = { + operation: OperationEvent.StationStand.setDetainTrain.secondaryConfirm.operation, + cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN + }; + commitOperate(step, {}, 2).then(({valid}) => { + if (valid) { + this.doClose(); + } + }); + } + } catch (e) { + console.error(e); + this.doClose(); + this.$refs.noticeInfo.doShow(); } }, doClose() { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/operateConfirm.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/operateConfirm.vue index f71f36489..87ae59b84 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/operateConfirm.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/childDialog/operateConfirm.vue @@ -76,6 +76,12 @@ export default { this.doClose(); } }); + } else if (this.operation === OperationEvent.Station.atsAutoControlALL.confirm) { + commitOperate({ operation: this.operation, cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING }, {stationCode: this.$store.state.map.showCentralizedStationCode }, 2).then(({valid}) => { + if (valid) { + this.doClose(); + } + }); } }, doClose() { diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/routeSelection.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/routeSelection.vue index 083b8bf67..34e1d2f62 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/routeSelection.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/routeSelection.vue @@ -37,7 +37,7 @@ - + @@ -118,7 +118,7 @@ export default { }, methods: { expandPath() { - this.showExpand = !this.showExpand; + this.showExpand = !this.showExpand; }, doShow(operate, selected, tempData) { this.selected = selected; @@ -268,7 +268,7 @@ export default { if (valid) { const signal = this.$store.getters['map/getDeviceByCode'](this.row.startSignalCode); operate.message = `命令:进路设置
始端信号机:${signal.name}
进路:${this.row.name}`; - this.doClose(); + // this.doClose(); this.$refs.confirmTip.doShow(operate); } }).catch(() => { diff --git a/src/jmapNew/theme/ningbo_01/menus/menuBar.vue b/src/jmapNew/theme/ningbo_01/menus/menuBar.vue index 2af20179b..a812fefb6 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuBar.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuBar.vue @@ -60,7 +60,7 @@ @click.stop="hookClick(child)" > - {{ child.title }} + {{ child.computedTitle?computedTitle(child): child.title }} @@ -292,17 +292,20 @@ export default { { title: '设置全站自动通过进路', operate: OperationEvent.Station.stationSetCIAuto.mbar, - click: this.setAllCiAuto + click: this.setAllCiAuto, + computedTitle: true }, { title: '取消全站自动通过进路', operate: OperationEvent.Station.stationCancelCIAuto.mbar, - click: this.cancelAllCiAuto + click: this.cancelAllCiAuto, + computedTitle: true }, { title: '全站自动交自动控', operate: OperationEvent.Station.atsAutoControlALL.mbar, - click: '' + click: this.setAllAutoControl, + computedTitle: true } ] }, @@ -631,6 +634,18 @@ export default { } return true; }, + computedTitle(child) { + const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); + if (child.operate === OperationEvent.Station.stationSetCIAuto.mbar && station) { + return `设置${station.name}全站自动通过进路`; + } else if (child.operate === OperationEvent.Station.stationCancelCIAuto.mbar && station) { + return `取消${station.name}全站自动通过进路`; + } else if (child.operate === OperationEvent.Station.atsAutoControlALL.mbar && station) { + return `${station.name}全站进路交自动控`; + } else { + return ''; + } + }, initStationList() { const list = []; this.stationList.forEach(station => { @@ -923,6 +938,25 @@ export default { } }); }, + setAllAutoControl(order) { + const operate = { + type: 'bar', + operation: order.operation + }; + + this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { + if (valid) { + this.closeMenu(true); + this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); + const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); + const nextOperate = { + operation: OperationEvent.Station.atsAutoControlALL.confirm, + message: `是否要执行批处理命令: ${station.name}全站进路交自动控` + }; + this.$refs.operateConfirm.doShow(nextOperate); + } + }); + }, cancelAllCiAuto(order) { const operate = { type: 'bar', diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue index 2475d3558..9fce8ae63 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/initSectionLimitSpeed.vue @@ -37,10 +37,10 @@ - 确定(O) + 确定(O) - 应用(A) + 应用(A) 关闭(C) @@ -176,13 +176,15 @@ export default { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/setSelected', {device: val}); - const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code); - this.speedLimitValue = sectionEle.speedUpLimit; - if (this.speedLimitValue > 0) { - this.$refs.table2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]); - } else { - this.$refs.table2.setCurrentRow(); - } + // const sectionEle = this.$store.getters['map/getDeviceByCode'](val.code); + // this.speedLimitValue = sectionEle.speedUpLimit; + // if (this.speedLimitValue > 0) { + // this.$refs.table2.setCurrentRow(this.limitList[this.speedLimitValue / 5 - 1]); + // } else { + // this.$refs.table2.setCurrentRow(); + // } + this.$refs.table2.setCurrentRow() + this.speedLimitValue = 0; } }).catch(() => { this.$refs.noticeInfo.doShow(); @@ -192,15 +194,17 @@ export default { if (!val) { return; } this.initEle = null; this.commandEleCode = null; - const step = { - operation: OperationEvent.Command.common.choose1.operation, - val: val.value, - param: {speedLimitValue: val.value} - }; + + const step = { + operation: OperationEvent.Command.common.choose1.operation, + val: val.value, + param: {speedLimitValue: val.value} + }; + this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - this.speedLimitValue = val.value; + this.speedLimitValue = val.value; } }).catch(() => { this.$refs.noticeInfo.doShow(); diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue index d1b1f57d5..41f1ba52e 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/sectionLimitSpeed.vue @@ -187,8 +187,8 @@ export default { }, commit(isClose = true) { const operate = { - // cmdType: this.command ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, - cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, + cmdType: this.speedLimitValue ? CMD.Section.CMD_SECTION_SET_LIMIT_SPEED : CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, + // cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operation: isClose ? OperationEvent.Command.common.confirm1.operation : OperationEvent.Command.common.apply1.operation, over: true, param: {sectionCode: this.selected.code, speedLimitValue:this.speedLimitValue} diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue index f23c08cef..de966f947 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/signalCanBlock.vue @@ -92,7 +92,7 @@ export default { return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : ''; }, title() { - return '开始允许锁闭解除'; + return '确认/取消允许锁闭'; } }, watch: { diff --git a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue index 75d9c496e..1e42dcf3b 100644 --- a/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue +++ b/src/jmapNew/theme/ningbo_03/menus/menuDialog/switchCommand.vue @@ -33,14 +33,14 @@
设置位置
- 定位 - 反位 + 定位 + 反位
设置预留
- 自动与预留 - 预留 - 释放 + 自动与预留 + 预留 + 释放
@@ -80,7 +80,7 @@ export default { allChecked: false, dialogShow: false, loading: false, - mode: '', + mode: 'artificial', position: '', reserved: 'reversed' @@ -110,11 +110,23 @@ export default { } }, watch: { + mode(val) { + if (val == 'auto') { + this.position = ''; + this.reserved = ''; + } + }, '$store.state.map.keyboardEnterCount': function (val) { if (this.show) { this.commit(); } - } + }, + 'selected': function(val) { + if (val) { + const section = this.$store.getters['map/getDeviceByCode'](val.code); + this.position = section && section.normalPosition? 'reverse': 'normal'; + } + } }, methods: { doShow(operate) { @@ -132,10 +144,12 @@ export default { this.$store.dispatch('training/emitTipFresh'); }, commit(isClose = false) { - const cmd = { - normal: menuOperate.Switch.locate, - reverse: menuOperate.Switch.reverse - }[this.position]; + const cmd = this.mode == 'auto' + ? menuOperate.Switch.turnout + : { + normal: menuOperate.Switch.locate, + reverse: menuOperate.Switch.reverse + }[this.position]; if (cmd) { commitOperate(cmd, {switchCode: this.selected.code}, 3).then(({valid})=>{ @@ -154,13 +168,7 @@ export default { if (!val) { return; } commitOperate(menuOperate.Switch.turnout, {code:val.code}).then(({valid, operate})=>{ if (valid) { - const switchEle = this.$store.getters['map/getDeviceByCode'](val.code); this.position = ''; - if (switchEle.normalPosition) { - this.position = 'reverse'; - } else if (switchEle.reversePosition) { - this.position = 'normal'; - } this.$store.dispatch('menuOperation/setSelected', {device: val}); } }); diff --git a/src/jmapNew/theme/xian_02/operationConfig.js b/src/jmapNew/theme/xian_02/operationConfig.js index b933c2781..a1896b8ed 100644 --- a/src/jmapNew/theme/xian_02/operationConfig.js +++ b/src/jmapNew/theme/xian_02/operationConfig.js @@ -248,7 +248,7 @@ export default { trainingType: 'Switch', productTypes: ['01', '02'], stepVOList: [ - { deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标左键菜单选择【道岔定位】' }, + { deviceType: '02', orderNum: 1, operateCode: '101', tip: '鼠标右键菜单选择【道岔定位】' }, { deviceType: '02', orderNum: 2, operateCode: '009', tip: '鼠标左键点击【发送请求】按钮' } ] }, diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 271c51733..16dc79758 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -1111,6 +1111,10 @@ export const OperationEvent = { choose: { operation: '3033', domId: '_Tips-Signal-CancelTrainRoute-Choose' + }, + secondaryConfirm: { + operation: '3034', + domId: '_Tips-Signal-CancelTrainRoute-SecondaryConfirm' } }, // 信号重开 @@ -1944,6 +1948,10 @@ export const OperationEvent = { tableMenu: { operation: '5042', domId: '_Tips-Stand-SetOrCancelDetain-TableMenu' + }, + secondaryConfirm: { + operation: '5043', + domId: '_Tips-Stand-SetOrCancelDetain-SecondaryConfirm' } }, // 取消扣车 @@ -2279,6 +2287,10 @@ export const OperationEvent = { mbar: { operation: '6062', domId: '_Tips-Station-AtsAutoControlAll-Mbar' + }, + confirm: { + operation: '6063', + domId: '_Tips-Station-AtsAutoControlAll-Confirm' } }, split: { diff --git a/src/views/newMap/displayNew/menuSystemTime.vue b/src/views/newMap/displayNew/menuSystemTime.vue index 53733f187..9a6f8004f 100644 --- a/src/views/newMap/displayNew/menuSystemTime.vue +++ b/src/views/newMap/displayNew/menuSystemTime.vue @@ -135,7 +135,7 @@ export default { .display-time{ padding: 3px 5px; - box-shadow: 0px 0px 5px #eee; + box-shadow: 0px 0px 3px #eee; border-radius: 3px; }