From ed9815393ae20331469b454cd91b7309b81e5758 Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Tue, 21 Jul 2020 15:11:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BA=BF=E8=B7=AF=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E5=8F=B3=E9=94=AE=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuTrain.vue | 29 ++++++-- .../theme/chengdu_01/menus/menuTrain.vue | 29 ++++++-- .../theme/chengdu_03/menus/menuTrain.vue | 29 ++++++-- .../theme/foshan_01/menus/menuTrain.vue | 29 ++++++-- .../theme/fuzhou_01/menus/menuTrain.vue | 29 ++++++-- .../theme/haerbin_01/menus/menuButton.vue | 11 +-- .../theme/haerbin_01/menus/menuTrain.vue | 29 ++++++-- .../theme/ningbo_01/menus/menuTrain.vue | 69 +++++++------------ src/jmapNew/theme/xian_02/menus/menuTrain.vue | 29 ++++++-- src/store/modules/training.js | 2 +- 10 files changed, 207 insertions(+), 78 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue index d7f54cdef..3fe261b7b 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuTrain.vue @@ -36,7 +36,7 @@ import TrainFlag from './dialog/trainFlag'; // import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; // import CMD from '@/scripts/cmdPlugin/CommandEnum'; export default { @@ -241,7 +241,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -310,13 +311,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue index 993fdfdd1..23bcb4716 100644 --- a/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_01/menus/menuTrain.vue @@ -16,7 +16,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; // import CMD from '@/scripts/cmdPlugin/CommandEnum'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CancelMouseState from '@/mixin/CancelMouseState'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -154,7 +154,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -217,13 +218,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue index d2984d5ef..406043f95 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuTrain.vue @@ -28,7 +28,7 @@ import CancelMouseState from '@/mixin/CancelMouseState'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -137,7 +137,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -197,13 +198,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue index 2acc45347..7d460fdd9 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuTrain.vue @@ -37,7 +37,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -146,7 +146,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -207,13 +208,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue index e77da48b3..e6743a40c 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuTrain.vue @@ -25,7 +25,7 @@ import TrainMove from './dialog/trainMove'; import TrainSwitch from './dialog/trainSwitch'; import TrainEditNumber from './dialog/trainEditNumber'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -115,7 +115,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -190,13 +191,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index f14cc319f..b3ef68015 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -232,9 +232,9 @@ export default { this.tempData = []; this.tempData.push(this.selectedObj); this.param = { - switchCode: this.selectedObj.code, - sectionCode: section.code, - speedLimitValue: '5' + switchCode: this.selectedObj.code + // sectionCode: section.code, + // speedLimitValue: '5' }; }, handleSingalMenu() { @@ -373,7 +373,8 @@ export default { cmdType: this.cmdType, operation: OperationEvent.Command.commandHaerbin.confirm.operation, param: this.param - }; + }; + console.log(this.param, '=======') this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.doClose(); @@ -435,7 +436,7 @@ export default { { name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu, show: false }, { name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menu, show: false, disabledName: 'normalPosition' }, { name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu, show: false, disabledName: 'reversePosition' }, - { name: '解封区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false} + { name: '封锁区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }, ]; this.signalParamList = this.$store.state.training.prdType === '01' ? [ { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu, show: false, disabledName: 'fleetMode' }, diff --git a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue index 13745eec0..5de805801 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuTrain.vue @@ -25,7 +25,7 @@ import TrainMove from './dialog/trainMove'; import TrainSwitch from './dialog/trainSwitch'; import TrainEditNumber from './dialog/trainEditNumber'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -96,7 +96,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -186,13 +187,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index 457eb2d94..e60c6e118 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -34,7 +34,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; // import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; -import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -229,7 +229,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -290,57 +291,37 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { groupNumber: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, - // // 设置故障 - // setStoppage() { - // const operate = { - // start: true, - // send: true, - // code: this.selected.code, - // operation: OperationEvent.Train.stoppage.menu.operation - // }; - - // mouseCancelState(this.selected); - // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // } else { - // this.$refs.noticeInfo.doShow(); - // } - // }).catch(() => { - // this.$refs.noticeInfo.doShow(); - // }); - // }, - // // 取消故障 - // cancelStoppage() { - // const operate = { - // start: true, - // send: true, - // code: this.selected.code, - // operation: OperationEvent.Train.cancelStoppage.menu.operation - // }; - - // mouseCancelState(this.selected); - // this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { - // if (valid) { - // this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); - // } else { - // this.$refs.noticeInfo.doShow(); - // } - // }).catch(() => { - // this.$refs.noticeInfo.doShow(); - // }); - // }, // 限速行驶 limitSpeed() { const operate = { diff --git a/src/jmapNew/theme/xian_02/menus/menuTrain.vue b/src/jmapNew/theme/xian_02/menus/menuTrain.vue index 39902b74f..0c7a798bd 100644 --- a/src/jmapNew/theme/xian_02/menus/menuTrain.vue +++ b/src/jmapNew/theme/xian_02/menus/menuTrain.vue @@ -32,7 +32,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; // import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import CMD from '@/scripts/cmdPlugin/CommandEnum'; -import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; +import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate'; export default { name: 'MenuTrain', @@ -243,7 +243,8 @@ export default { computed: { ...mapGetters('training', [ 'mode', - 'operatemode' + 'operatemode', + 'memberList' ]), ...mapGetters('menuOperation', [ 'buttonOperation' @@ -307,13 +308,33 @@ export default { }); }, nextStation() { - commitOperate(menuOperate.Train.nextStation, { code: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.nextStation, { code: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Drive_Ahead', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); }, routeBlockRun() { - commitOperate(menuOperate.Train.routeBlockRun, { code: this.selected.code }, 3).then(({valid, operate})=>{ + // commitOperate(menuOperate.Train.routeBlockRun, { code: this.selected.code }, 3).then(({valid, operate})=>{ + // }).catch((error) => { + // this.$refs.noticeInfo.doShow(error.message); + // }); + const group = this.$route.query.group; + const param = { + commandType: 'Route_Block_Drive', + targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id, + params: {} + }; + commitTrainSend(group, param).then(({valid, operate})=>{ }).catch((error) => { this.$refs.noticeInfo.doShow(error.message); }); diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 97f4a0167..b13b08b34 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -466,7 +466,7 @@ const training = { } try { - // 处理operation + // 处理operation Handler.handle(operate).then(rtn => { if (state.started) { // 教学和联系模式需要给出过程步骤提示