操作调整
This commit is contained in:
parent
71a99f225c
commit
8fc521a780
@ -238,125 +238,76 @@ export default {
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.split, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
param: {
|
||||
sectionCode: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.active, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.axlePreReset.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
lock() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.lock, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionControl.doShow(step, this.selected);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段封锁
|
||||
unlock() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.unlock, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.sectionCmdControl.doShow(step, this.selected);
|
||||
this.$refs.sectionCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected);
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
const step = {
|
||||
start: true,
|
||||
code: `${this.selected.code}`,
|
||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
param: {
|
||||
Section_Code: `${this.selected.code}`
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
|
||||
const tempData = resp.data;
|
||||
this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||
});
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
// const step = {
|
||||
// start: true,
|
||||
// code: `${this.selected.code}`,
|
||||
// operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
// param: {
|
||||
// Section_Code: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
// this.$store.dispatch('training/next', step).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// Handler.execute(CMD.Section.CMD_QUERY, {}).then(resp => {
|
||||
// const tempData = resp.data;
|
||||
// this.$refs.speedCmdControl.doShow(step, this.selected, tempData);
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -18,7 +18,13 @@ class CommandHandle {
|
||||
Common: {
|
||||
Set_Fault:{operate: 'Set_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
|
||||
Cancel_Fault: {operate:'Cancel_Fault', paramList:[{name: 'code'}, {name: 'faultType'}]},
|
||||
Train_Init_Plan: {operate: 'Train_Init_Plan', paramList: [{name: 'sectionCode'}, {name: 'serviceNumber'}, {name: 'tripNumber'}]}
|
||||
Train_Init_Plan: {
|
||||
operate: 'Train_Init_Plan',
|
||||
paramList: [{name: 'sectionCode'}, {name: 'serviceNumber'}, {name: 'tripNumber'}],
|
||||
simulationRole: 'Center',
|
||||
controlMode: ['OperateCenterControl'],
|
||||
conditionList: []
|
||||
}
|
||||
}
|
||||
};
|
||||
(list || []).forEach(definition => {
|
||||
|
Loading…
Reference in New Issue
Block a user