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