merge
This commit is contained in:
parent
bafc4d65e7
commit
939cf77b2e
@ -245,100 +245,39 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow()
|
this.$refs.noticeInfo.doShow()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
resetMbmButton() {
|
||||||
updateButtonShow(val, old) {
|
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
||||||
if (old) {
|
Handler.clear() // 清空操作组
|
||||||
// 恢复旧按钮显示
|
},
|
||||||
// this.promptInfo = '';
|
buttonDown(operation) {
|
||||||
const domId = OperationHandler.getDomIdByOperation(old)
|
// 清空当前的选择的设备
|
||||||
const dom = document.getElementById(domId)
|
this.deviceList = []
|
||||||
if (dom) {
|
// if (operation != this.Command.cancel.clearMbm.operation) {
|
||||||
dom.disabled = false
|
const operate = {
|
||||||
dom.style.backgroundColor = this.buttonUpColor
|
operation: operation,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (val) {
|
|
||||||
// 新按钮按下效果
|
|
||||||
const domId = OperationHandler.getDomIdByOperation(val)
|
|
||||||
const dom = document.getElementById(domId)
|
|
||||||
if (dom) {
|
|
||||||
// this.promptInfo = dom.innerText;
|
|
||||||
dom.disabled = true
|
|
||||||
dom.style.backgroundColor = this.buttonDownColor
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
passWordCommit(data) {
|
|
||||||
let operate = {}
|
|
||||||
if (data.overNext) {
|
|
||||||
operate = {
|
|
||||||
over: true,
|
|
||||||
code: data.code,
|
|
||||||
operation: data.operation,
|
|
||||||
cmdType: this.cmdType,
|
|
||||||
param: data.param,
|
|
||||||
}
|
|
||||||
} else if (data.nextCmdType) {
|
|
||||||
operate = {
|
|
||||||
over: true,
|
|
||||||
operation: data.operation,
|
|
||||||
cmdType: data.nextCmdType,
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
operate = {
|
|
||||||
operation: data.operateNext,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
this.trainingOperation(operate)
|
|
||||||
},
|
|
||||||
// 执行操作
|
|
||||||
trainingOperation(operate) {
|
|
||||||
this.$store
|
|
||||||
.dispatch('training/nextNew', operate)
|
|
||||||
.then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((error) => {
|
|
||||||
console.error(error)
|
|
||||||
this.$refs.noticeInfo.doShow()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
resetMbmButton() {
|
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', null)
|
|
||||||
Handler.clear() // 清空操作组
|
|
||||||
},
|
|
||||||
buttonDown(operation) {
|
|
||||||
// 清空当前的选择的设备
|
|
||||||
this.deviceList = []
|
|
||||||
// if (operation != this.Command.cancel.clearMbm.operation) {
|
|
||||||
const operate = {
|
|
||||||
operation: operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
// 以下 会弹出密码框 (区故解,人解列车进路 (总人解),引导总锁,上电解锁) 待修改
|
// 以下 会弹出密码框 (区故解,人解列车进路 (总人解),引导总锁,上电解锁) 待修改
|
||||||
const operationList = [
|
const operationList = [
|
||||||
this.Section.fault.button.operation,
|
this.Section.fault.button.operation,
|
||||||
this.Signal.humanTrainRoute.button.operation,
|
this.Signal.humanTrainRoute.button.operation,
|
||||||
this.Station.guideLock.button.operation,
|
this.Station.guideLock.button.operation,
|
||||||
this.Station.powerUnLock.button.operation,
|
this.Station.powerUnLock.button.operation,
|
||||||
]
|
]
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.operation = operation
|
this.operation = operation
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', operation) // 按钮菜单是否被按下
|
this.$store.dispatch('menuOperation/setButtonOperation', operation) // 按钮菜单是否被按下
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
|
||||||
// 判断是否需要 弹窗密码框
|
// 判断是否需要 弹窗密码框
|
||||||
if (operationList.includes(operation)) {
|
if (operationList.includes(operation)) {
|
||||||
operate['operateNext'] = this.Command.close.password.operation
|
operate['operateNext'] = this.Command.close.password.operation
|
||||||
this.$refs.password.doShow(operate)
|
this.$refs.password.doShow(operate)
|
||||||
}
|
|
||||||
this.$store.dispatch('training/emitTipFresh')
|
|
||||||
}
|
}
|
||||||
})
|
this.$store.dispatch('training/emitTipFresh')
|
||||||
},
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user