调整线路列车右键操作

This commit is contained in:
zyy 2020-07-21 15:11:33 +08:00
parent 47513d1d50
commit ed9815393a
10 changed files with 207 additions and 78 deletions

View File

@ -36,7 +36,7 @@ import TrainFlag from './dialog/trainFlag';
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus'; // import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; 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'; // import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
@ -241,7 +241,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -310,13 +311,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });

View File

@ -16,7 +16,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import CMD from '@/scripts/cmdPlugin/CommandEnum'; // import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CancelMouseState from '@/mixin/CancelMouseState'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -154,7 +154,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -217,13 +218,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });

View File

@ -28,7 +28,7 @@ import CancelMouseState from '@/mixin/CancelMouseState';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -137,7 +137,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -197,13 +198,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });

View File

@ -37,7 +37,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -146,7 +146,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -207,13 +208,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });

View File

@ -25,7 +25,7 @@ import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch'; import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber'; import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -115,7 +115,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -190,13 +191,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });

View File

@ -232,9 +232,9 @@ export default {
this.tempData = []; this.tempData = [];
this.tempData.push(this.selectedObj); this.tempData.push(this.selectedObj);
this.param = { this.param = {
switchCode: this.selectedObj.code, switchCode: this.selectedObj.code
sectionCode: section.code, // sectionCode: section.code,
speedLimitValue: '5' // speedLimitValue: '5'
}; };
}, },
handleSingalMenu() { handleSingalMenu() {
@ -374,6 +374,7 @@ export default {
operation: OperationEvent.Command.commandHaerbin.confirm.operation, operation: OperationEvent.Command.commandHaerbin.confirm.operation,
param: this.param param: this.param
}; };
console.log(this.param, '=======')
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); 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_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_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_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' ? [ 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' }, { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu, show: false, disabledName: 'fleetMode' },

View File

@ -25,7 +25,7 @@ import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch'; import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber'; import TrainEditNumber from './dialog/trainEditNumber';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -96,7 +96,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -186,13 +187,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });

View File

@ -34,7 +34,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; // 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -229,7 +229,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -290,57 +291,37 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); 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() { limitSpeed() {
const operate = { const operate = {

View File

@ -32,7 +32,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; // import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; 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 { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -243,7 +243,8 @@ export default {
computed: { computed: {
...mapGetters('training', [ ...mapGetters('training', [
'mode', 'mode',
'operatemode' 'operatemode',
'memberList'
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
@ -307,13 +308,33 @@ export default {
}); });
}, },
nextStation() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });
}, },
routeBlockRun() { 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) => { }).catch((error) => {
this.$refs.noticeInfo.doShow(error.message); this.$refs.noticeInfo.doShow(error.message);
}); });