车辆段道岔操作
This commit is contained in:
parent
1efcb7491f
commit
e350ae04dc
@ -219,46 +219,26 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
operationHandler(buttonOperation, selected) {
|
operationHandler(buttonOperation, selected) {
|
||||||
|
const map = new Map([
|
||||||
switch (buttonOperation) {
|
[OperationEvent.Switch.locate.button.operation, menuOperate.Switch.locate],
|
||||||
case OperationEvent.Switch.locate.button.operation: {
|
[OperationEvent.Switch.reverse.button.operation, menuOperate.Switch.reverse],
|
||||||
//总定
|
[OperationEvent.Switch.lock.button.operation, menuOperate.Switch.lock],
|
||||||
commitOperate(menuOperate.Switch.locate, { switchCode: selected.code }, 3)
|
[OperationEvent.Switch.unlock.button.operation, menuOperate.Switch.unlock],
|
||||||
.then(({ valid }) => {
|
[OperationEvent.Switch.block.button.operation, menuOperate.Switch.block],
|
||||||
if (valid) {
|
[OperationEvent.Switch.unblock.button.operation, menuOperate.Switch.unblock],
|
||||||
} else {
|
])
|
||||||
this.$refs.noticeInfo.doShow()
|
commitOperate(map.get(buttonOperation), { switchCode: selected.code }, 3)
|
||||||
}
|
.then(({ valid }) => {
|
||||||
})
|
if (valid) {
|
||||||
.catch((error) => {
|
console.log('123')
|
||||||
console.error(error)
|
} else {
|
||||||
this.$refs.noticeInfo.doShow()
|
this.$refs.noticeInfo.doShow()
|
||||||
})
|
}
|
||||||
break
|
})
|
||||||
}
|
.catch((error) => {
|
||||||
case OperationEvent.Switch.reverse.button.operation: {
|
console.error(error)
|
||||||
//总反
|
this.$refs.noticeInfo.doShow()
|
||||||
break
|
})
|
||||||
}
|
|
||||||
case OperationEvent.Switch.lock.button.operation: {
|
|
||||||
//单锁
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case OperationEvent.Switch.unlock.button.operation: {
|
|
||||||
//单解
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case OperationEvent.Switch.block.button.operation: {
|
|
||||||
//岔封
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case OperationEvent.Switch.unblock.button.operation: {
|
|
||||||
//岔解
|
|
||||||
break
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
doShow(point) {
|
doShow(point) {
|
||||||
this.initMenu()
|
this.initMenu()
|
||||||
|
Loading…
Reference in New Issue
Block a user