福州一号线 车辆段仿真 添加 排列进路 取消进路 信号重开指令

This commit is contained in:
joylink_cuiweidong 2021-09-07 15:13:38 +08:00
parent bafc4d65e7
commit 35cea8a8f7
2 changed files with 709 additions and 708 deletions

View File

@ -114,15 +114,15 @@
</div>
<div id="menuButton">
<div class="promptInfo">
<span class="status_lable">提示<br />信息</span>
<span class="status_lable">提示<br>信息</span>
<span class="status_detailInfo" style="color: #fd00f4">{{ promptInfo }}</span>
</div>
<div class="alamMessage">
<span class="status_lable">报警<br />信息</span>
<span class="status_lable">报警<br>信息</span>
<span class="status_detailInfo" style="color: #e61013">{{ alamMessage }}</span>
</div>
<div class="delayTime">
<span class="status_lable">延时<br />时间</span>
<span class="status_lable">延时<br>时间</span>
<span class="status_detailInfo" style="color: #e61013">{{ delayTime }}</span>
</div>
</div>
@ -130,218 +130,157 @@
</div>
</template>
<script>
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox'
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'
import Handler from '@/scripts/cmdPlugin/Handler'
import CMD from '@/scripts/cmdPlugin/CommandEnum'
import PasswordBox from '@/jmapNew/theme/components/menus/childDialog/passwordInputBox';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import Handler from '@/scripts/cmdPlugin/Handler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'MenuDeplotButton',
components: {
PasswordBox,
},
data() {
return {
point: {
x: 130,
y: 0,
},
inter: null,
operation: '0',
delayTime: '',
promptInfo: '',
alamMessage: '',
deviceList: [],
buttonDownColor: '#A8A8A8',
buttonUpColor: '#F0F0F0',
width: 85,
}
},
computed: {
Switch() {
return OperationEvent.Switch
name: 'MenuDeplotButton',
components: {
PasswordBox
},
Signal() {
return OperationEvent.Signal
data() {
return {
point: {
x: 130,
y: 0
},
inter: null,
operation: '0',
delayTime: '',
promptInfo: '',
alamMessage: '',
deviceList: [],
buttonDownColor: '#A8A8A8',
buttonUpColor: '#F0F0F0',
width: 85
};
},
Command() {
return OperationEvent.Command
},
Section() {
return OperationEvent.Section
},
Station() {
return OperationEvent.Station
},
isShowBtn() {
return this.$store.state.training.prdType == '09'
},
},
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
this.updateButtonShow(val, old)
},
},
beforeDestroy() {
this.resetMbmButton()
},
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
computed: {
Switch() {
return OperationEvent.Switch;
},
Signal() {
return OperationEvent.Signal;
},
Command() {
return OperationEvent.Command;
},
Section() {
return OperationEvent.Section;
},
Station() {
return OperationEvent.Station;
},
isShowBtn() {
return this.$store.state.training.prdType == '09';
}
}
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,
watch: {
'$store.state.menuOperation.buttonOperation': function (val, old) {
this.updateButtonShow(val, old);
}
} 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()
})
beforeDestroy() {
this.resetMbmButton();
},
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 })
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;
}
}
})
.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 = [
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)
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;
}
}
this.$store.dispatch('training/emitTipFresh')
}
})
},
},
},
}
},
//
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();
});
},
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);
},
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
];
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');
}
});
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
$bg: #fff;

File diff suppressed because it is too large Load Diff