修改代码格式
This commit is contained in:
parent
a250833772
commit
6c5469ec90
@ -63,7 +63,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -99,7 +99,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { OperateMode, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import { menuBarConvert, SystemType } from './utils/menuItemStatus';
|
||||
import StationControl from './menuDialog/stationControl';
|
||||
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
||||
@ -133,7 +132,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -1,7 +1,10 @@
|
||||
<template>
|
||||
<div class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }" v-if="isShowBtn">
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id='Signal.arrangementRoute.button.domId' @click="buttonDown(Signal.arrangementRoute.button.operation)">
|
||||
<div v-if="isShowBtn" class="menu" style="height: 45px;" :style="{left: point.x+'px', top: point.y+'px' }">
|
||||
<button
|
||||
:id="Signal.arrangementRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.arrangementRoute.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>进</b>
|
||||
@ -13,8 +16,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.cancelTrainRoute.button.domId" @click="buttonDown(Signal.cancelTrainRoute.button.operation)">
|
||||
<button
|
||||
:id="Signal.cancelTrainRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.cancelTrainRoute.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>总</b>
|
||||
@ -25,8 +31,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.humanTrainRoute.button.domId" @click="buttonDown(Signal.humanTrainRoute.button.operation)">
|
||||
<button
|
||||
:id="Signal.humanTrainRoute.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.humanTrainRoute.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>总</b>
|
||||
@ -37,8 +46,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.reopenSignal.button.domId" @click="buttonDown(Signal.reopenSignal.button.operation)">
|
||||
<button
|
||||
:id="Signal.reopenSignal.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.reopenSignal.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>信</b>
|
||||
@ -50,8 +62,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.guide.button.domId" @click="buttonDown(Signal.guide.button.operation)">
|
||||
<button
|
||||
:id="Signal.guide.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.guide.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>引</b>
|
||||
@ -63,8 +78,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_06"
|
||||
@click="buttonDown('mbm_06')">
|
||||
<button
|
||||
id="mbm_06"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_06')"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>引</b>
|
||||
@ -76,8 +94,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
|
||||
:id="Switch.locate.button.domId" @click="buttonDown(Switch.locate.button.operation)">
|
||||
<button
|
||||
:id="Switch.locate.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px',backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.locate.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
@ -89,8 +110,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Switch.reverse.button.domId" @click="buttonDown(Switch.reverse.button.operation)">
|
||||
<button
|
||||
:id="Switch.reverse.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.reverse.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
@ -102,8 +126,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Switch.lock.button.domId" @click="buttonDown(Switch.lock.button.operation)">
|
||||
<button
|
||||
:id="Switch.lock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.lock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>道</b>
|
||||
@ -115,8 +142,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Switch.unlock.button.domId" @click="buttonDown(Switch.unlock.button.operation)">
|
||||
<button
|
||||
:id="Switch.unlock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.unlock.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>道</b>
|
||||
@ -128,8 +158,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Signal.setAutoInterlock.button.domId" @click="buttonDown(Signal.setAutoInterlock.button.operation)">
|
||||
<button
|
||||
:id="Signal.setAutoInterlock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Signal.setAutoInterlock.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>自</b>
|
||||
@ -141,8 +174,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Section.fault.button.domId" @click="buttonDown(Section.fault.button.operation)">
|
||||
<button
|
||||
:id="Section.fault.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Section.fault.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>区</b>
|
||||
@ -153,8 +189,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
:id="Section.axlePreReset.button.domId" @click="buttonDown(Section.axlePreReset.button.operation)">
|
||||
<button
|
||||
:id="Section.axlePreReset.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Section.axlePreReset.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>计</b>
|
||||
@ -166,8 +205,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_11"
|
||||
@click="buttonDown('mbm_11')">
|
||||
<button
|
||||
id="mbm_11"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_11')"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b style="color:deepskyblue">功</b>
|
||||
@ -179,8 +221,11 @@
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button :style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}" id="mbm_12"
|
||||
@click="buttonDown('mbm_12')">
|
||||
<button
|
||||
id="mbm_12"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown('mbm_12')"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>强</b>
|
||||
@ -197,14 +242,12 @@
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { getDomOffset } from '@/utils/index';
|
||||
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
data() {
|
||||
return {
|
||||
__type: 'mbm',
|
||||
point: {
|
||||
x: -1000,
|
||||
y: -1000
|
||||
@ -215,8 +258,8 @@
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 58,
|
||||
tempData: null,
|
||||
offset: {},
|
||||
}
|
||||
offset: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
Switch() {
|
||||
@ -241,7 +284,7 @@
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.resetPosition();
|
||||
@ -249,19 +292,19 @@
|
||||
methods: {
|
||||
resetPosition() {
|
||||
this.$nextTick(() => {
|
||||
let canvasOffset = this.$store.state.config.canvasOffset;
|
||||
const canvasOffset = this.$store.state.config.canvasOffset;
|
||||
this.point = {
|
||||
x: canvasOffset.x + 20,
|
||||
y: canvasOffset.y + this.$store.state.config.height - 65
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
let domId = getDomIdByOperation(old);
|
||||
let dom = document.getElementById(domId);
|
||||
const domId = getDomIdByOperation(old);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = false;
|
||||
dom.style.backgroundColor = this.buttonUpColor;
|
||||
@ -269,8 +312,8 @@
|
||||
}
|
||||
if (val) {
|
||||
// 新按钮按下效果
|
||||
let domId = getDomIdByOperation(val);
|
||||
let dom = document.getElementById(domId);
|
||||
const domId = getDomIdByOperation(val);
|
||||
const dom = document.getElementById(domId);
|
||||
if (dom) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
@ -278,10 +321,10 @@
|
||||
}
|
||||
},
|
||||
buttonDown(operation) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
@ -293,17 +336,17 @@
|
||||
selectedChange() {
|
||||
// 按钮按下时
|
||||
if (this.$store.state.menuOperation.buttonOperation) {
|
||||
let model = this.$store.state.menuOperation.selected;
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (model) {
|
||||
let deviceType = MapDeviceType[model._type];
|
||||
let operate = {
|
||||
const deviceType = MapDeviceType[model._type];
|
||||
const operate = {
|
||||
send: true,
|
||||
model: model,
|
||||
code: model.code,
|
||||
type: deviceType.type,
|
||||
operation: this.$store.state.menuOperation.buttonOperation,
|
||||
tempData: this.tempData
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
@ -319,7 +362,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
|
@ -6,12 +6,10 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
// import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { exitFullscreen } from '@/utils/screen';
|
||||
import { runDiagramQuit } from '@/api/simulation';
|
||||
// import { screenTopic, clearSubscribe } from '@/utils/stomp';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -56,7 +54,7 @@ export default {
|
||||
watch: {
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
if (!this.isScreen && this.menu && this.menu.length > 1) {
|
||||
this.menu[0].disabled = (this.menu[0] && val) ? true : true;
|
||||
this.menu[0].disabled = true;
|
||||
this.menu[1].disabled = !((this.menu[1] && val));
|
||||
}
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<cancel-all-limit ref="cancelAllLimit"></cancel-all-limit>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<cancel-all-limit ref="cancelAllLimit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -9,20 +9,20 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit,
|
||||
CancelAllLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -50,17 +50,8 @@
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
@ -71,17 +62,26 @@
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu]
|
||||
this.menu = [...this.menu];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
@ -98,7 +98,7 @@
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -112,7 +112,7 @@
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<section-control ref="sectionControl"></section-control>
|
||||
<section-cmd-control ref="sectionCmdControl"></section-cmd-control>
|
||||
<speed-limit-control ref="speedLimitControl"></speed-limit-control>
|
||||
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
|
||||
<train-create ref="trainCreate"></train-create>
|
||||
<alxe-effective ref="alxeEffective"></alxe-effective>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<train-create ref="trainCreate" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import TrainCreate from './dialog/trainCreate';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
@ -40,7 +40,8 @@
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -130,7 +131,7 @@
|
||||
handler: this.undeveloped,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
menuTrain: [
|
||||
@ -138,7 +139,7 @@
|
||||
label: '新建列车',
|
||||
handler: this.newTrain,
|
||||
disabledCallback: MenuDisabledState.Section.newTrain
|
||||
},
|
||||
}
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
@ -147,7 +148,7 @@
|
||||
disabledCallback: MenuDisabledState.Section.alxeFailure
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
@ -169,21 +170,21 @@
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain]
|
||||
this.menu = [...this.menu, ...this.menuForce, ...this.menuTrain];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -202,7 +203,7 @@
|
||||
},
|
||||
// 设置计轴失效
|
||||
alxeFailure() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -218,13 +219,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 故障解锁
|
||||
fault() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -249,7 +250,7 @@
|
||||
},
|
||||
// 切除
|
||||
split() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -264,7 +265,7 @@
|
||||
});
|
||||
},
|
||||
alxeEffective() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -280,7 +281,7 @@
|
||||
},
|
||||
// 激活
|
||||
active() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -296,7 +297,7 @@
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -312,7 +313,7 @@
|
||||
},
|
||||
// 区段解锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -328,7 +329,7 @@
|
||||
},
|
||||
// 区段封锁
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -357,7 +358,7 @@
|
||||
// this.$refs.speedCmdControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -391,7 +392,7 @@
|
||||
// },
|
||||
// 新建列车
|
||||
newTrain() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Section.type,
|
||||
@ -403,8 +404,8 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainCreate.doShow(operate, this.selected);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<route-selection ref="routeSelection"></route-selection>
|
||||
<route-lock ref="routeLock"></route-lock>
|
||||
<route-control ref="routeControl"></route-control>
|
||||
<route-cmd-control ref="routeCmdControl"></route-cmd-control>
|
||||
<route-hand-control ref="routeHandControl"></route-hand-control>
|
||||
<route-detail ref="routeDetail"></route-detail>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-lock ref="routeLock" />
|
||||
<route-control ref="routeControl" />
|
||||
<route-cmd-control ref="routeCmdControl" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
import RouteCmdControl from './dialog/routeCmdControl';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
@ -40,7 +40,8 @@
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -52,19 +53,19 @@
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
@ -73,19 +74,19 @@
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
@ -93,19 +94,19 @@
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.arrangementRoute,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
disabledCallback: MenuDisabledState.Signal.cancelTrainRoute,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
disabledCallback: MenuDisabledState.Signal.reopenSignal,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
@ -114,27 +115,27 @@
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
disabledCallback: MenuDisabledState.Signal.humanControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
disabledCallback: MenuDisabledState.Signal.atsAutoControl,
|
||||
auth: { station: false, center: true },
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
disabledCallback: MenuDisabledState.Signal.detail,
|
||||
auth: { station: true, center: true },
|
||||
auth: { station: true, center: true }
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '信号关灯',
|
||||
handler: this.signalClose,
|
||||
disabledCallback: '',
|
||||
disabledCallback: ''
|
||||
},
|
||||
{
|
||||
label: '设置故障',
|
||||
@ -147,7 +148,7 @@
|
||||
disabledCallback: MenuDisabledState.Signal.cancelStoppage
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
@ -169,21 +170,21 @@
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -203,7 +204,7 @@
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -219,13 +220,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -241,13 +242,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
arrangementRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
model: this.selected,
|
||||
@ -255,7 +256,7 @@
|
||||
type: MapDeviceType.Signal.type,
|
||||
label: MapDeviceType.Signal.label,
|
||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
||||
}
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
@ -266,13 +267,13 @@
|
||||
}
|
||||
this.$refs.routeSelection.doShow(operate.operation, this.selected, tempData);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -288,7 +289,7 @@
|
||||
},
|
||||
// 信号封锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -302,13 +303,13 @@
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routeLock.doShow(operate.operation, this.selected);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 信号解封
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -324,7 +325,7 @@
|
||||
},
|
||||
// 信号重开
|
||||
reopenSignal() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -340,7 +341,7 @@
|
||||
},
|
||||
// 进路引导
|
||||
guide() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -356,7 +357,7 @@
|
||||
},
|
||||
// 设置联锁自动进路
|
||||
setAutoInterlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -372,7 +373,7 @@
|
||||
},
|
||||
// 取消联锁自动进路
|
||||
cancelAutoInterlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -388,7 +389,7 @@
|
||||
},
|
||||
// 设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -404,7 +405,7 @@
|
||||
},
|
||||
// 取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -420,7 +421,7 @@
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Signal.type,
|
||||
@ -436,7 +437,7 @@
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -457,7 +458,7 @@
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -478,7 +479,7 @@
|
||||
},
|
||||
// 查询进路状态
|
||||
detail() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -494,5 +495,5 @@
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -31,7 +31,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -5,10 +5,7 @@
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import { mapGetters } from 'vuex';
|
||||
// import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
// import { MenuDisabledState, menuConvert } from './utils/menuItemStatus';
|
||||
// import { mouseCancelState } from './utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
@ -17,7 +14,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -43,7 +43,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
||||
<section-control ref="sectionControl"></section-control>
|
||||
<switch-control ref="switchControl"></switch-control>
|
||||
<switch-cmd-control ref="switchCmdControl"></switch-cmd-control>
|
||||
<speed-cmd-control ref="speedCmdControl"></speed-cmd-control>
|
||||
<speed-limit-control ref="speedLimitControl"></speed-limit-control>
|
||||
<alxe-effective ref="alxeEffective"></alxe-effective>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<switch-control ref="switchControl" />
|
||||
<switch-cmd-control ref="switchCmdControl" />
|
||||
<speed-cmd-control ref="speedCmdControl" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
@ -40,7 +40,8 @@
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -59,7 +60,7 @@
|
||||
handler: this.active,
|
||||
disabledCallback: MenuDisabledState.Switch.active,
|
||||
auth: { station: true, center: true }
|
||||
},
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
@ -121,7 +122,7 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
@ -143,21 +144,21 @@
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
let self = this;
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
}
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = menuFiltration(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce]
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
|
||||
this.menu = menuConvert(this.menu);
|
||||
@ -176,7 +177,7 @@
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -192,13 +193,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -214,13 +215,13 @@
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -236,7 +237,7 @@
|
||||
},
|
||||
// 道岔解封
|
||||
unlock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -252,7 +253,7 @@
|
||||
},
|
||||
// 道岔封锁
|
||||
block() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -268,7 +269,7 @@
|
||||
},
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -284,7 +285,7 @@
|
||||
},
|
||||
// 道岔强扳
|
||||
switchTurnoutForce() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -300,7 +301,7 @@
|
||||
},
|
||||
// 道岔转动
|
||||
switchTurnout() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -319,7 +320,7 @@
|
||||
},
|
||||
// 道岔故障解锁
|
||||
fault() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -335,7 +336,7 @@
|
||||
},
|
||||
// 道岔取消速度
|
||||
cancelSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
@ -345,7 +346,7 @@
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
let tempData = response.data;
|
||||
const tempData = response.data;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
|
||||
}
|
||||
@ -354,7 +355,7 @@
|
||||
|
||||
// 区段切除
|
||||
split() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -370,7 +371,7 @@
|
||||
},
|
||||
// 区段激活
|
||||
active() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -386,7 +387,7 @@
|
||||
},
|
||||
// 道岔计轴预复位
|
||||
axlePreReset() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -402,7 +403,7 @@
|
||||
},
|
||||
// 设置临时限速
|
||||
setSpeed() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -418,7 +419,7 @@
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.Switch.type,
|
||||
@ -439,7 +440,7 @@
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,33 +1,30 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<div class="tool" v-for="(item,index) in tools" :key="index">
|
||||
<img :src="item.src" :alt="item.title" />
|
||||
<div v-for="(item,index) in tools" :key="index" class="tool">
|
||||
<img :src="item.src" :alt="item.title">
|
||||
</div>
|
||||
<img class="logo" :src="logoImg" />
|
||||
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2" :top="6"></system-time>
|
||||
<img class="logo" :src="logoImg">
|
||||
<system-time v-if="isShowSystemTime" class="time" :time="time" :zoom="2" :width="180" :height="48" :fine="2" :top="6" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
}
|
||||
},
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
@ -37,100 +34,100 @@
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
let date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShowSystemTime() {
|
||||
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.initTime': function (initTime) {
|
||||
const date = new Date(initTime);
|
||||
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.initTools();
|
||||
},
|
||||
@ -139,10 +136,10 @@
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
@ -186,7 +183,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
|
@ -55,7 +55,8 @@ export default {
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="statusBar"></div>
|
||||
<div id="statusBar" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -7,25 +7,18 @@
|
||||
name: 'StatusBar',
|
||||
props: {
|
||||
selected: {
|
||||
type: Object
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
#statusBar {
|
||||
z-index: 2000;
|
||||
position: absolute;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
border-radius: 0px !important;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
</style>
|
@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<div v-show="show" class="progressShade" :style="{background: background}">
|
||||
<el-progress class="progressBar"
|
||||
<el-progress
|
||||
class="progressBar"
|
||||
:type="type"
|
||||
:show-text="showText"
|
||||
:text-inside="textInside"
|
||||
:stroke-width="strokeWidth"
|
||||
:percentage="percentage"
|
||||
:color="color"
|
||||
:status="status" ></el-progress>
|
||||
:status="status"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,31 +22,31 @@
|
||||
type: {
|
||||
type: String,
|
||||
default() {
|
||||
return 'line'
|
||||
return 'line';
|
||||
}
|
||||
},
|
||||
showText: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return true
|
||||
return true;
|
||||
}
|
||||
},
|
||||
textInside: {
|
||||
type: Boolean,
|
||||
default() {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
},
|
||||
strokeWidth: {
|
||||
type: Number,
|
||||
default() {
|
||||
return 5
|
||||
return 5;
|
||||
}
|
||||
},
|
||||
background: {
|
||||
type: String,
|
||||
default() {
|
||||
return 'rgba(0, 0, 0, 0.8)'
|
||||
return 'rgba(0, 0, 0, 0.8)';
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -55,25 +57,25 @@
|
||||
show: true,
|
||||
percentage: 0,
|
||||
fps: 30,
|
||||
then: null,
|
||||
}
|
||||
then: null
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.percentage = this.randomNum();
|
||||
},
|
||||
methods: {
|
||||
randomNum() {
|
||||
return Math.ceil(Math.random() * 5) + 50
|
||||
return Math.ceil(Math.random() * 5) + 50;
|
||||
},
|
||||
run() {
|
||||
let now = +Date.now();
|
||||
let delta = now - this.then || +Date.now();
|
||||
let interval = 1000 / this.fps;
|
||||
const now = +Date.now();
|
||||
const delta = now - this.then || +Date.now();
|
||||
const interval = 1000 / this.fps;
|
||||
|
||||
if (delta > interval) {
|
||||
this.then = now - (delta % interval);
|
||||
if (this.percentage < 90) {
|
||||
this.percentage = this.percentage + 5
|
||||
this.percentage = this.percentage + 5;
|
||||
} else {
|
||||
cancelRequestAnimFrame(this.run);
|
||||
}
|
||||
@ -101,7 +103,7 @@
|
||||
},
|
||||
progressAt(num) {
|
||||
if (num > 0 && num < 100 && num > this.percentage) {
|
||||
this.percentage = num
|
||||
this.percentage = num;
|
||||
}
|
||||
},
|
||||
success() {
|
||||
@ -118,7 +120,7 @@
|
||||
}, 1000 / this.fps);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
@ -1,29 +1,29 @@
|
||||
<template>
|
||||
<div class="reminder-drag">
|
||||
<div class="reminder-box" ref="drapBox">
|
||||
<div ref="drapBox" class="reminder-box">
|
||||
<div class="tip-title">
|
||||
<i class="icon el-icon-minus" @click="shrink" v-show="isShrink"></i>
|
||||
<i class="icon el-icon-plus" @click="shrink" v-show="!isShrink"></i>
|
||||
<p style="color: #fff;" v-if="isShrink">
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||
<p v-if="isShrink" style="color: #fff;">
|
||||
<span>{{ title }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class="tip-body-box" ref="dragBody">
|
||||
<div ref="dragBody" class="tip-body-box">
|
||||
<div class="tip-body">
|
||||
<template v-if="displayType=='role'">
|
||||
<role-condition-script :group="group" @getBehaviorList="getBehaviorList"></role-condition-script>
|
||||
<role-condition-script :group="group" @getBehaviorList="getBehaviorList" />
|
||||
</template>
|
||||
<template v-if="displayType=='behavior'">
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elScrollbar">
|
||||
<get-behavior ref="getBehavior" :group="group" :memberId="memberId" @backToMember="backToMember" @getActions="getActions" @backToTop="backToTop"></get-behavior>
|
||||
<el-scrollbar ref="elScrollbar" wrap-class="scrollbar-wrapper">
|
||||
<get-behavior ref="getBehavior" :group="group" :member-id="memberId" @backToMember="backToMember" @getActions="getActions" @backToTop="backToTop" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="displayType=='action'">
|
||||
<div class="tab-pane-big">
|
||||
<el-scrollbar wrapClass="scrollbar-wrapper" ref="elActionScrollbar">
|
||||
<get-action ref="getAction" :group="group" :memberId="memberId" :behaviorId="behaviorId" @backToBehavior="backToBehavior" @backToTop="backToActionTop"></get-action>
|
||||
<el-scrollbar ref="elActionScrollbar" wrap-class="scrollbar-wrapper">
|
||||
<get-action ref="getAction" :group="group" :member-id="memberId" :behavior-id="behaviorId" @backToBehavior="backToBehavior" @backToTop="backToActionTop" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</template>
|
||||
@ -42,23 +42,20 @@
|
||||
import GetBehavior from './scriptRecord/getBehavior';
|
||||
import GetAction from './scriptRecord/getAction';
|
||||
import RoleConditionScript from './scriptRecord/roleConditionScript';
|
||||
|
||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
||||
import {saveScriptScenes, saveScriptData, dumpScriptData} from '@/api/simulation';
|
||||
import {updateMapLocation} from '@/api/quest';
|
||||
|
||||
export default {
|
||||
name: 'TipScriptRecord',
|
||||
components: {
|
||||
GetBehavior,
|
||||
GetAction,
|
||||
RoleConditionScript
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
},
|
||||
components: {
|
||||
GetBehavior,
|
||||
GetAction,
|
||||
RoleConditionScript,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -66,10 +63,10 @@
|
||||
isShrink: false,
|
||||
memberId: null,
|
||||
behaviorId: null,
|
||||
displayType:"role",
|
||||
mapLocation:{},
|
||||
displayType: 'role',
|
||||
mapLocation: {}
|
||||
// isSaveStage: true,
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapViewLoadedCount': function (val) {
|
||||
@ -87,8 +84,8 @@
|
||||
jump(obj) {
|
||||
},
|
||||
shrink() {
|
||||
let height = this.$refs.dragBody.offsetHeight + 40;
|
||||
let top = this.$refs.drapBox.style.top;
|
||||
const height = this.$refs.dragBody.offsetHeight + 40;
|
||||
const top = this.$refs.drapBox.style.top;
|
||||
if (this.isShrink) {
|
||||
this.$refs.drapBox.style.height = '40px';
|
||||
this.$refs.drapBox.style.top = '';
|
||||
@ -100,13 +97,13 @@
|
||||
}
|
||||
},
|
||||
backToMember() {
|
||||
this.displayType="role";
|
||||
this.displayType='role';
|
||||
},
|
||||
backToBehavior() {
|
||||
this.displayType="behavior";
|
||||
this.displayType='behavior';
|
||||
},
|
||||
getActions(row) {
|
||||
this.displayType="action";
|
||||
this.displayType='action';
|
||||
this.behaviorId=row.id;
|
||||
this.$store.dispatch('scriptRecord/updateBehaviorName', row.description);
|
||||
},
|
||||
@ -114,16 +111,16 @@
|
||||
saveScriptScenes(this.group).then(resp => {
|
||||
// this.isSaveStage = false;
|
||||
this.$message.success('保存背景成功');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('保存背景失败!');
|
||||
})
|
||||
});
|
||||
},
|
||||
saveScenesData() {
|
||||
saveScriptData(this.group).then(resp => {
|
||||
this.$message.success('保存数据成功');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('保存数据失败!');
|
||||
})
|
||||
});
|
||||
},
|
||||
dumpScenesData() {
|
||||
this.$confirm('此操作将会清除已保存的录制数据, 是否继续?', '提示', {
|
||||
@ -134,13 +131,13 @@
|
||||
dumpScriptData(this.scriptId).then(resp => {
|
||||
// this.isSaveStage = true;
|
||||
this.$message.success('清除数据成功');
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.$messageBox('清除数据失败!');
|
||||
})
|
||||
}).catch(error => { })
|
||||
});
|
||||
});
|
||||
},
|
||||
getBehaviorList(id) {
|
||||
this.displayType="behavior";
|
||||
this.displayType='behavior';
|
||||
this.memberId=id;
|
||||
},
|
||||
backToTop() {
|
||||
@ -151,8 +148,7 @@
|
||||
var div = this.$refs['elActionScrollbar'].$refs['wrap'];
|
||||
div.scrollTop=0;
|
||||
},
|
||||
saveMaplocation()
|
||||
{
|
||||
saveMaplocation() {
|
||||
// this.$parent.$parent.$refs['mapCanvas'].$refs['mapCommon'].$refs['jlmapVisual'].$jlmap.$options
|
||||
// let dataZoom = this.$store.state.map.dataZoom;
|
||||
// let scriptId=this.$route.query.scriptId;
|
||||
@ -164,7 +160,7 @@
|
||||
// });
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
Loading…
Reference in New Issue
Block a user