代码调整
This commit is contained in:
parent
9c3a61a747
commit
9bac0200be
@ -17,9 +17,9 @@
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Signal.cancelTrainRoute.button.domId"
|
||||
:id="MixinCommand.totalCancel.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.cancelTrainRoute.button.operation)"
|
||||
@click="buttonDown(MixinCommand.totalCancel.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
@ -79,9 +79,9 @@
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_06"
|
||||
:id="Station.guideLock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_06')"
|
||||
@click="buttonDown(Station.guideLock.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
@ -206,9 +206,9 @@
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_11"
|
||||
:id="MixinCommand.functionButton.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_11')"
|
||||
@click="buttonDown(MixinCommand.functionButton.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
@ -241,8 +241,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import OperateHandler from '@/scripts/plugin/OperateHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
||||
// import { deepAssign } from '@/utils/index';
|
||||
// import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
@ -271,6 +274,15 @@ export default {
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
@ -303,7 +315,7 @@ export default {
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
const domId = getDomIdByOperation(old);
|
||||
const domId = OperationHandler.getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
@ -312,7 +324,7 @@ export default {
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
const domId = getDomIdByOperation(val);
|
||||
const domId = OperationHandler.getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
@ -337,13 +349,13 @@ export default {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.menuOperation.buttonOperation) {
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (model) {
|
||||
const deviceType = MapDeviceType[model._type];
|
||||
if (model && model._type) {
|
||||
// const deviceType = MapDeviceType[model._type];
|
||||
const operate = {
|
||||
send: true,
|
||||
model: model,
|
||||
code: model.code,
|
||||
type: deviceType.type,
|
||||
// type: deviceType.type,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
tempData: this.tempData
|
||||
};
|
||||
@ -356,7 +368,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
OperateHandler.cleanOperates();
|
||||
Handler.clear();
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
</span>
|
||||
</button>
|
||||
<!-- 流程未做暂不显示 -->
|
||||
<button :id="Switch.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Switch.guideLock.button.operation)">
|
||||
<button :id="Station.guideLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.guideLock.button.operation)">
|
||||
<span style="color: #800000">
|
||||
<center><b>引</b><b>导</b></center>
|
||||
<center><b>总</b><b>锁</b></center>
|
||||
@ -152,6 +152,9 @@ export default {
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user