Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
b529b0ad94
@ -93,6 +93,35 @@ export default {
|
||||
if (this.row && this.row.deviceCode) {
|
||||
this.$store.dispatch('menuOperation/spliceRequestList', this.row);
|
||||
}
|
||||
},
|
||||
commit(){
|
||||
let requestList=this.$store.state.menuOperation.requestList;
|
||||
if(requestList && requestList.length>0){
|
||||
this.commitEachCommand(requestList,0);
|
||||
}
|
||||
},
|
||||
commitEachCommand(requestList,index){
|
||||
let eachCmd=requestList[index];
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: eachCmd.operation.code,
|
||||
cmdType: eachCmd.operation.cmdType
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/spliceRequestList',{deviceCode:eachCmd.device.code,operateCode:eachCmd.operation.code});
|
||||
let nextIndex=index++;
|
||||
if(nextIndex<requestList.length){
|
||||
this.commitEachCommand(requestList,nextIndex);
|
||||
}
|
||||
// this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
// this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -44,12 +44,12 @@ export default {
|
||||
{
|
||||
label: '道岔定位',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔反位',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
@ -241,7 +241,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位'}});
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.locate.menu.operation, name: '道岔定位',cmdType:CMD.Switch.CMD_SWITCH_TURN}});
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
@ -258,7 +258,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位'}});
|
||||
this.$store.dispatch('menuOperation/pushRequestList', { device: this.selected, operation: { code: OperationEvent.Switch.reverse.menu.operation, name: '道岔反位',cmdType:CMD.Switch.CMD_SWITCH_TURN}});
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user