This commit is contained in:
yuan 2021-09-07 14:35:20 +08:00
parent bafc4d65e7
commit 939cf77b2e

View File

@ -245,100 +245,39 @@ export default {
this.$refs.noticeInfo.doShow()
})
},
methods: {
updateButtonShow(val, old) {
if (old) {
//
// this.promptInfo = '';
const domId = OperationHandler.getDomIdByOperation(old)
const dom = document.getElementById(domId)
if (dom) {
dom.disabled = false
dom.style.backgroundColor = this.buttonUpColor
}
}
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,
}
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 = [
this.Section.fault.button.operation,
this.Signal.humanTrainRoute.button.operation,
this.Station.guideLock.button.operation,
this.Station.powerUnLock.button.operation,
]
// ()
const operationList = [
this.Section.fault.button.operation,
this.Signal.humanTrainRoute.button.operation,
this.Station.guideLock.button.operation,
this.Station.powerUnLock.button.operation,
]
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.operation = operation
this.$store.dispatch('menuOperation/setButtonOperation', operation) //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
//
if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation
this.$refs.password.doShow(operate)
}
this.$store.dispatch('training/emitTipFresh')
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.operation = operation
this.$store.dispatch('menuOperation/setButtonOperation', operation) //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true })
//
if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation
this.$refs.password.doShow(operate)
}
})
},
this.$store.dispatch('training/emitTipFresh')
}
})
},
},
}