福州一号线 车辆段仿真 添加 排列进路 取消进路 信号重开指令
This commit is contained in:
parent
bafc4d65e7
commit
35cea8a8f7
@ -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
Loading…
Reference in New Issue
Block a user