代码调整
This commit is contained in:
parent
362caf8ef1
commit
150ede0cb9
@ -98,14 +98,16 @@ export default {
|
||||
},
|
||||
{
|
||||
label: '封锁/解封',
|
||||
handle: '',
|
||||
handler: this.blockOrUnblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK,
|
||||
isDisabled: (section, station, work) => station.controlMode !== 'Local',
|
||||
isShow: (section, work) => work === 'ctcWork'
|
||||
},
|
||||
{
|
||||
label: '区故解',
|
||||
handle: '',
|
||||
isDisabled: (section, station, work) => station.controlMode !== 'Local',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK,
|
||||
isDisabled: (_section, station, work) => station.controlMode !== 'Local',
|
||||
isShow: (section, work) => work === 'ctcWork'
|
||||
},
|
||||
{
|
||||
@ -275,27 +277,37 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
blockOrUnblock() {
|
||||
if (this.selected.blockade) {
|
||||
this.unblock();
|
||||
} else {
|
||||
this.block();
|
||||
}
|
||||
},
|
||||
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.block, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.unblock, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 道岔故障解锁/ 区故解
|
||||
fault() {
|
||||
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 0).then(({valid, operate}) => {
|
||||
commitOperate(menuOperate.Switch.fault, { switchCode: this.selected.code}, 3).then(({valid, operate}) => {
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
// this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user