竞赛操作方式 由北京线路转换为宁波线路
This commit is contained in:
parent
620d73bf54
commit
f456e71a95
@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm alxe-effective"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||
<span class="base-label">准备</span>
|
||||
<div style="margin-top: 10px">
|
||||
<div style="margin-top: -10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
@ -25,15 +15,14 @@
|
||||
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认
|
||||
</el-button>
|
||||
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||
<span class="base-label">确认</span>
|
||||
<div>
|
||||
<div style="margin-top: -10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
@ -42,35 +31,27 @@
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose1"
|
||||
v-model="model.confirmStationName"
|
||||
ref="chooseStation"
|
||||
v-model="model.confirmStationCode"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="stationSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option,index) in filterStationList"
|
||||
:key="index"
|
||||
:label="option.name"
|
||||
:value="option.name"
|
||||
/>
|
||||
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose2"
|
||||
v-model="model.confirmSectionName"
|
||||
ref="chooseSection"
|
||||
v-model="model.confirmSectionCode"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="sectionSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option,index) in randomSectionList"
|
||||
:key="index"
|
||||
:label="option.name"
|
||||
:value="option.name"
|
||||
/>
|
||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.code" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
@ -85,7 +66,7 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||
@ -96,7 +77,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1" :span="23">
|
||||
<el-input v-model="model.status" type="textarea" :rows="2" placeholder="" />
|
||||
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="botton-group" style="margin-top:20px">
|
||||
@ -104,24 +85,21 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<popup-alarm ref="popupAlarm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -129,14 +107,15 @@ export default {
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
timenum: 30,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
confirmStationName: '',
|
||||
confirmSectionName: '',
|
||||
stationCode: '',
|
||||
sectionCode: '',
|
||||
confirmStationCode: '',
|
||||
confirmSectionCode: '',
|
||||
status: '',
|
||||
time: 0
|
||||
},
|
||||
@ -147,16 +126,17 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'sectionList'
|
||||
]),
|
||||
...mapGetters('map', ['stationList', 'sectionList']),
|
||||
filterStationList() {
|
||||
const list = [];
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(elem => {
|
||||
if (list.findIndex(it => { return it.name == elem.name; }) < 0) {
|
||||
list.push({ name: elem.name });
|
||||
if (
|
||||
list.findIndex(it => {
|
||||
return it.name == elem.name;
|
||||
}) < 0
|
||||
) {
|
||||
list.push({ name: elem.name, code: elem.code });
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -201,30 +181,16 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.sectionName': function (name) {
|
||||
const index = Math.floor(Math.random(1) * 5);
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (i == index) {
|
||||
this.randomSectionList.push({ name });
|
||||
} else {
|
||||
const section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
|
||||
if (section.type != '02') {
|
||||
if (this.randomSectionList.findIndex(it => { return it.name == section.name; }) < 0) {
|
||||
this.randomSectionList.push({ name: section.name });
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
if (this.type !== 'password') {
|
||||
this.commitOnce();
|
||||
} else if (this.type !== 'text') {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -256,35 +222,31 @@ export default {
|
||||
this.status = '';
|
||||
this.model.stationName = '';
|
||||
this.model.sectionName = '';
|
||||
this.model.confirmStationName = '';
|
||||
this.model.confirmSectionName = '';
|
||||
this.model.confirmStationCode = '';
|
||||
this.model.confirmSectionCode = '';
|
||||
this.model.sectionCode = '';
|
||||
this.model.stationCode = '';
|
||||
if (selected) {
|
||||
this.model.sectionCode = selected.code;
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type == '03') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
} else {
|
||||
const hasParentCode = (this.selected.type == '02');
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section && hasParentCode) {
|
||||
this.model.sectionName = section.name;
|
||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
||||
this.model.sectionName = `${section.name}-${selected.name}(${selected.code})`;
|
||||
} else {
|
||||
this.model.sectionName = `${selected.name}`;
|
||||
}
|
||||
this.model.sectionName = `${selected.name}(${selected.code})`;
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionParentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
this.model.sectionName = `${section.name}(${section.code})`;
|
||||
this.model.sectionCode = section.code;
|
||||
}
|
||||
}
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
this.model.stationCode = station.code;
|
||||
}
|
||||
}
|
||||
|
||||
@ -301,6 +263,19 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
getSectionList(code) {
|
||||
this.randomSectionList = [];
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.stationCode == code) {
|
||||
let name = `${section.name}(${section.code})`;
|
||||
if (section.type == '02') {
|
||||
const sectionParent = this.$store.getters['map/getDeviceByCode'](section.parentCode);
|
||||
name = `${sectionParent.name}-${section.name}(${section.code})`;
|
||||
}
|
||||
this.randomSectionList.push({ name: `${name}`, code: section.code });
|
||||
}
|
||||
});
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
@ -312,7 +287,6 @@ export default {
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: ''
|
||||
};
|
||||
|
||||
@ -326,23 +300,17 @@ export default {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = this.timenum;
|
||||
this.model.time = 60;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
});
|
||||
},
|
||||
stationSelectChange(val) {
|
||||
if (this.model.confirmStationName === this.model.stationName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
stationSelectChange(code) {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
val: code
|
||||
};
|
||||
this.getSectionList(code);
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||
@ -352,19 +320,13 @@ export default {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseStation.blur();
|
||||
});
|
||||
},
|
||||
sectionSelectChange(val) {
|
||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
sectionSelectChange(code) {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
val: code
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
@ -375,68 +337,70 @@ export default {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseSection.blur();
|
||||
});
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
val: this.selected.code,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
operation: '',
|
||||
cmdType: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Section.CMD_SECTION_COMFIRMATION_AXLE;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE;
|
||||
}
|
||||
|
||||
this.model.status = '';
|
||||
if (this.model.stationName == this.model.confirmStationName &&
|
||||
this.model.sectionName == this.model.confirmSectionName) {
|
||||
if (this.model.stationCode == this.model.confirmStationCode && this.model.sectionCode == this.model.confirmSectionCode) {
|
||||
this.stepNum = 3;
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.type = 'text';
|
||||
this.stopTask();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
|
||||
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
if (this.model.stationName != this.model.confirmStationName) {
|
||||
if (this.model.stationCode != this.model.confirmStationCode) {
|
||||
this.model.status = '车站选择错误';
|
||||
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
||||
} else if (
|
||||
this.model.sectionCode != this.model.confirmSectionCode
|
||||
) {
|
||||
this.model.status = '区段选择错误';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store
|
||||
.dispatch('training/nextNew', operate)
|
||||
.then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
})
|
||||
.catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.alxe-effective .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control"
|
||||
class="ningbo-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -12,8 +12,8 @@
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span :key="message">{{ message }}</span>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -24,14 +24,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmControl',
|
||||
@ -54,25 +54,24 @@ export default {
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
} else {
|
||||
return '';
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
return '设置折返策略';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||
} else {
|
||||
return '';
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
@ -102,27 +101,18 @@ export default {
|
||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||
/** 信号关灯*/
|
||||
this.signalClose();
|
||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||
/** 设置折返策略*/
|
||||
this.setBackStrategy();
|
||||
}
|
||||
},
|
||||
// 信号关灯
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
||||
});
|
||||
this.sendCommand(menuOperate.Signal.signalClose);
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
this.sendCommand(menuOperate.StationStand.setBackStrategy);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
@ -137,10 +127,22 @@ export default {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
|
@ -1,47 +1,41 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-human-control-all"
|
||||
class="ningbo-01__systerm route-unlock-confirm"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
width="500px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<span>{{ title }}</span>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span>在{{ stationName }}【{{ signalName }}】信号机,信号解锁,确认下达吗?</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-col :span="6" :offset="6">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationHumanControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
name: 'RouteUnlockConfirm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null
|
||||
signalName: '',
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -49,13 +43,13 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '全集中站进路交人工控';
|
||||
return '信号解封';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -65,12 +59,17 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
this.signalName = '';
|
||||
if (selected) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -80,36 +79,37 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 1, success: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setOperate', { step: 0, success: false });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
@ -121,7 +121,7 @@ export default {
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.station-human-control-all .context {
|
||||
.route-unlock-confirm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
@ -1,12 +1,22 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm confirm-control-speed"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="height: 60px; padding-left: 20px">
|
||||
<span style="font-size: 18px">{{ message }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11">
|
||||
<el-button type="primary" :id="confirmId" @click="confirm">确定</el-button>
|
||||
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
@ -16,7 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTip',
|
||||
@ -24,17 +34,15 @@
|
||||
return {
|
||||
dialogShow: false,
|
||||
message: '',
|
||||
confirmId: '',
|
||||
}
|
||||
confirmId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
return "提示";
|
||||
}
|
||||
return '提示';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -53,7 +61,7 @@
|
||||
this.dialogShow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
@ -61,7 +69,7 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
.beijing-01__systerm .el-dialog .el-button{
|
||||
.ningbo-01__systerm .el-dialog .el-button{
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
@ -1,178 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.confirm-control .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,198 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
title="密码校验"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-input v-model="encryptionPassword" placeholder="请使用软键盘输入" size="medium" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="showMistake">
|
||||
<el-col :span="22" :offset="1">
|
||||
<span class="password-error">*密码输入错误请重新输入*</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">7</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">8</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">9</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">4</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">5</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">6</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">1</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">2</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputNum">3</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button @click="inputNum">0</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="inputClear">C</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="4">
|
||||
<el-button @click="backSpace"> < </el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="12">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
/* 写死的初始密码*/
|
||||
correctPassword: '1',
|
||||
dialogShow: false,
|
||||
operation: null,
|
||||
checkHasInput: false,
|
||||
/* 输入值*/
|
||||
passwordCheck: '',
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel: {
|
||||
get: function () {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
set: function () {
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operate.operateNext) : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.checkHasInput = false;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.showMistake = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() { // 确定
|
||||
if (this.passwordCheck === this.correctPassword) {
|
||||
this.$emit('checkOver', this.operate);
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
} else {
|
||||
this.showMistake = true;
|
||||
}
|
||||
},
|
||||
/* 软键盘输入*/
|
||||
inputNum(e) {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck += e.path[0].innerText;
|
||||
this.encryptionPassword = this.passwordCheck.replace(/./g, '*');
|
||||
},
|
||||
/* 软键盘清除*/
|
||||
inputClear() {
|
||||
this.showMistake = false;
|
||||
this.passwordCheck = '';
|
||||
this.encryptionPassword = '';
|
||||
},
|
||||
/* 软键盘回退*/
|
||||
backSpace() {
|
||||
this.showMistake = false;
|
||||
const password = this.passwordCheck;
|
||||
if (password !== '') {
|
||||
this.passwordCheck = password.substring(0, password.length - 1);
|
||||
this.encryptionPassword = this.passwordCheck;
|
||||
}
|
||||
},
|
||||
|
||||
cancel() {
|
||||
const operate = {
|
||||
send: false,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.inputClear();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
|
||||
.password-error {
|
||||
|
||||
color: red;
|
||||
}
|
||||
</style>
|
@ -1,90 +0,0 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm popup-alarm" :title="title" :visible.sync="show" width="500px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="message in messages">{{message}}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'Popup-Alarm',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: [],
|
||||
operate: null,
|
||||
operation: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '弹出式告警';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.alarm.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.dialogShow = true;
|
||||
this.messages = messages || [];
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
// 确认计轴有效
|
||||
this.alxeEffective();
|
||||
}
|
||||
|
||||
},
|
||||
alxeEffective() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.alarm.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.popup-alarm .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,15 +1,5 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm route-setting"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="350px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="350px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
||||
@ -28,44 +18,28 @@
|
||||
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table
|
||||
ref="table"
|
||||
:data="tempData"
|
||||
border
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="160"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 120px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
|
||||
</el-table>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:loading="loading"
|
||||
:disabled="commitDisabled"
|
||||
@click="commit"
|
||||
>确定</el-button>
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
@ -90,6 +64,9 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'overlapData'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
@ -113,28 +90,19 @@ export default {
|
||||
return disabled;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.commitDisabled) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
expandPath() {
|
||||
console.log('展开进路预览');
|
||||
},
|
||||
@ -151,8 +119,14 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
const routeList = JSON.parse(JSON.stringify(tempData || []));
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.tempData = routeList;
|
||||
this.tempData.forEach(route => {
|
||||
if (route.turnBack) {
|
||||
route.name = `${route.name}(Z)`;
|
||||
}
|
||||
});
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -186,7 +160,7 @@ export default {
|
||||
this.row.canSetting = true;
|
||||
this.restoreBeforeDevices();
|
||||
const containSectionList = [];
|
||||
if (row.canSetting) {
|
||||
if (!row.setting) {
|
||||
// 设置选中区段为切除状态
|
||||
if (row.routeSectionList && row.routeSectionList.length) {
|
||||
// 设置新选的进路区段为切除状态
|
||||
@ -204,7 +178,25 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (this.overlapData[row.overlapCode] && this.overlapData[row.overlapCode].pathList && this.overlapData[row.overlapCode].pathList.length) {
|
||||
this.overlapData[row.overlapCode].pathList.forEach(item => {
|
||||
if (item.sectionList && item.sectionList.length) {
|
||||
item.sectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(logicSectionCode => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](logicSectionCode));
|
||||
sec.cutOff = true;
|
||||
containSectionList.push(sec);
|
||||
});
|
||||
} else {
|
||||
section.cutOff = true;
|
||||
containSectionList.push(section);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
this.$store.dispatch('training/updateMapState', [...containSectionList]);
|
||||
this.beforeSectionList = containSectionList || [];
|
||||
|
||||
@ -219,6 +211,8 @@ export default {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -241,6 +235,7 @@ export default {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
144
src/jmapNew/theme/race_01/menus/dialog/routerCommand.vue
Normal file
144
src/jmapNew/theme/race_01/menus/dialog/routerCommand.vue
Normal file
@ -0,0 +1,144 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm route-lock"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header" style="line-height: 44px;">
|
||||
{{ message }}
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'RouteLock',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
message: '',
|
||||
selected: null,
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.cancelGuide.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
return '人解进路';
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
return '办理引导进路';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, message) {
|
||||
this.selected = selected;
|
||||
this.operate = operate.operation;
|
||||
this.message = message;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operate == OperationEvent.Signal.cancelGuide.menu.operation) {
|
||||
this.cancelGuide();
|
||||
} else if (this.operate == OperationEvent.Signal.guide.menu.operation) {
|
||||
this.guide();
|
||||
}
|
||||
},
|
||||
// 人解进路 / 取消进路引导
|
||||
cancelGuide() {
|
||||
this.sendCommand(menuOperate.Signal.cancelGuide);
|
||||
},
|
||||
// 引导进路
|
||||
guide() {
|
||||
this.sendCommand(menuOperate.Signal.guide);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
164
src/jmapNew/theme/race_01/menus/dialog/sectionAlxeReset.vue
Normal file
164
src/jmapNew/theme/race_01/menus/dialog/sectionAlxeReset.vue
Normal file
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="24">
|
||||
<span style="margin-right: 10px;">区段:</span>
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="sectionCode"
|
||||
filterable
|
||||
size="mini"
|
||||
@change="sectionSelectChange"
|
||||
>
|
||||
<el-option v-for="(option,index) in switchAndPhySicalSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
sectionCode: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'sectionList'
|
||||
]),
|
||||
switchAndPhySicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01' || elem.type === '03'; });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.AxleReset.SetAxleReset.choose.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
return '计轴复位';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionCode = '';
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
sectionSelectChange() {
|
||||
const operate = {
|
||||
operation: OperationEvent.AxleReset.SetAxleReset.choose.operation,
|
||||
val: this.sectionCode
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET,
|
||||
param: {
|
||||
sectionCode: this.sectionCode
|
||||
}
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
280
src/jmapNew/theme/race_01/menus/dialog/standBulkBuckleTrain.vue
Normal file
280
src/jmapNew/theme/race_01/menus/dialog/standBulkBuckleTrain.vue
Normal file
@ -0,0 +1,280 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-detain-train" :title="'批量设置' + title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row :id="chooseId" style="margin-top: -13px; padding: 20px 0px 5px 0;">
|
||||
<el-col :span="11">
|
||||
<span>上行线路设置{{ title }}</span>
|
||||
<el-table ref="tableUp" :data="upStandList" tooltip-effect="dark" height="400" style="width: 100%;margin: 5px 0;" @selection-change="handleSelectionChangeUp">
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column label="站台名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="upForward" style="display: block; text-align: left;margin-bottom: 5px;">正向{{ title }}</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<span>下行线路设置{{ title }}</span>
|
||||
<el-table ref="tableDown" :data="downStandList" tooltip-effect="dark" height="400" style="width: 100%;margin: 5px 0;" @selection-change="handleSelectionChangeDown">
|
||||
<el-table-column type="selection" width="50" />
|
||||
<el-table-column label="站台名称">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-checkbox v-model="downForward" style="display: block; text-align: left;margin-bottom: 5px;">正向{{ title }}</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'StandDetainTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
standCode: '',
|
||||
radio: '1',
|
||||
upSelectList: [],
|
||||
downSelectList: [],
|
||||
upStandList: [],
|
||||
downStandList: [],
|
||||
upForward: true, // 上行
|
||||
downForward: false // 下行
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
chooseId() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
return OperationEvent.StationStand.setBulkBuckleTrain.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
return OperationEvent.StationStand.cancelBulkBuckleTrain.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
return '扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
return '取消扣车';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.standName = '';
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.standName = selected.name;
|
||||
}
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
this.standName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.initList();
|
||||
this.upSelectList = [];
|
||||
this.downSelectList = [];
|
||||
|
||||
this.operation = operate.operation;
|
||||
this.standCode = operate.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
initList() {
|
||||
this.upStandList = [];
|
||||
this.downStandList = [];
|
||||
if (this.stationStandList && this.stationStandList.length) {
|
||||
this.stationStandList.filter(elem => { return !elem.small; }).forEach(item => {
|
||||
if (item.right) {
|
||||
this.upStandList.push(item);
|
||||
} else {
|
||||
this.downStandList.push(item);
|
||||
}
|
||||
});
|
||||
this.upForward = false;
|
||||
this.downForward = false;
|
||||
this.$nextTick(() => {
|
||||
this.upStandList.forEach(item => {
|
||||
if (item.code == this.selected.code) {
|
||||
this.$refs.tableUp && this.$refs.tableUp.toggleRowSelection(item);
|
||||
this.upForward = true;
|
||||
}
|
||||
});
|
||||
this.downStandList.forEach(item => {
|
||||
if (item.code == this.selected.code) {
|
||||
this.$refs.tableDown && this.$refs.tableDown.toggleRowSelection(item);
|
||||
this.downForward = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.operation = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
handleSelectionChangeUp(val) {
|
||||
this.upSelectList = val;
|
||||
},
|
||||
handleSelectionChangeDown(val) {
|
||||
this.downSelectList = val;
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
|
||||
/** 设置扣车*/
|
||||
this.setDetainTrain();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
|
||||
/** 取消扣车*/
|
||||
this.cancelDetainTrain();
|
||||
}
|
||||
},
|
||||
// 批量扣车
|
||||
setDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL,
|
||||
param: {
|
||||
rightHoldTrain: { standCodes: [], forward: this.upForward },
|
||||
leftHoldTrain: { standCodes: [], forward: this.downForward }
|
||||
}
|
||||
};
|
||||
this.upSelectList.forEach(item => {
|
||||
operate.param.rightHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
this.downSelectList.forEach(item => {
|
||||
operate.param.leftHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
if (!operate.param.rightHoldTrain.forward) {
|
||||
operate.param.rightHoldTrain.standCodes = [];
|
||||
}
|
||||
if (!operate.param.leftHoldTrain.forward) {
|
||||
operate.param.leftHoldTrain.standCodes = [];
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 批量取消扣车
|
||||
cancelDetainTrain() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL,
|
||||
param: {
|
||||
rightHoldTrain: { standCodes: [], forward: this.upForward },
|
||||
leftHoldTrain: { standCodes: [], forward: this.downForward }
|
||||
}
|
||||
};
|
||||
this.upSelectList.forEach(item => {
|
||||
operate.param.rightHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
this.downSelectList.forEach(item => {
|
||||
operate.param.leftHoldTrain.standCodes.push(item.code);
|
||||
});
|
||||
if (!operate.param.rightHoldTrain.forward) {
|
||||
operate.param.rightHoldTrain.standCodes = [];
|
||||
}
|
||||
if (!operate.param.leftHoldTrain.forward) {
|
||||
operate.param.leftHoldTrain.standCodes = [];
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
if (!valid) {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scope>
|
||||
|
||||
</style>
|
@ -1,275 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-tree
|
||||
:data="treeData"
|
||||
:lazy="false"
|
||||
class="tree-height-max"
|
||||
:default-expand-all="true"
|
||||
style="background: #f0f0f0;"
|
||||
>
|
||||
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
|
||||
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
|
||||
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
|
||||
<div
|
||||
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;"
|
||||
>
|
||||
{{ data.name }}</div>
|
||||
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
|
||||
{{ data.value }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
<!-- <el-row class="header">
|
||||
<el-col :span="10"><span>车站名称</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>站台状态</span>
|
||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" highlight-current-row>
|
||||
<el-table-column prop="item" :width="140" label="项目">
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div> -->
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
standName: '',
|
||||
strategyMap: {
|
||||
'01': '无折返',
|
||||
'02': '无人折返',
|
||||
'03': '自动换端',
|
||||
'04': '默认'
|
||||
},
|
||||
treeData: [
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '车站',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '站台',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '停站时间',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '跳停',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '站台基本信息',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '中心扣车',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '车站扣车',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '扣车',
|
||||
level: 1
|
||||
},
|
||||
{
|
||||
children: [
|
||||
{
|
||||
name: '上行站台',
|
||||
value: '',
|
||||
level: 2
|
||||
},
|
||||
{
|
||||
name: '下行站台',
|
||||
value: '',
|
||||
level: 2
|
||||
}
|
||||
],
|
||||
name: '运行等级',
|
||||
level: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '站台详细信息';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
}
|
||||
|
||||
/** 01: 未设置扣车 02: 车站扣车 03: 中心扣车 04: 中心+车站扣车*/
|
||||
// this.tempData.push({ item: '车站扣车', status: opts.holdStatus == '02' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||
// this.tempData.push({ item: '中心扣车', status: opts.holdStatus == '03' || opts.holdStatus == '04' ? '已设置' : '未设置' });
|
||||
// 中心扣车
|
||||
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
|
||||
// 车站扣车
|
||||
this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置';
|
||||
// this.tempData.push({ item: '停站时间', status: opts.parkingTime != -1 ? opts.parkingTime : '自动' });
|
||||
// 停站时间
|
||||
this.treeData[0].children[2].value = selected.parkingTime != -1 ? selected.parkingTime : '自动';
|
||||
// 跳停
|
||||
this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置';
|
||||
if (!stationStand || !station) {
|
||||
this.tempData.push({ item: '运行等级', status: `自动` });
|
||||
} else {
|
||||
this.tempData.push({ item: '运行等级', status: selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动` });
|
||||
}
|
||||
// this.tempData.push({ item: '跳停', status: opts.jumpStopStatus != '01' ? '已设置' : '未设置' });
|
||||
this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' });
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
// this.standName = '';
|
||||
// this.stationName = '';
|
||||
this.treeData[0].children[0].value = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
// this.standName = selected.name;
|
||||
this.treeData[0].children[1].value = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
// this.stationName = station.name;
|
||||
this.treeData[0].children[0].value = station.name;
|
||||
// this.treeData[0].children[1].value = station.runPlanName
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-run-level"
|
||||
class="ningbo-01__systerm stand-run-level"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
@ -26,7 +26,7 @@
|
||||
:cell-style="tableStyle"
|
||||
style="width: 100%; margin-top:10px"
|
||||
size="mini"
|
||||
height="120"
|
||||
height="180"
|
||||
highlight-current-row
|
||||
:show-header="false"
|
||||
@row-click="clickEvent"
|
||||
@ -42,15 +42,12 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -58,37 +55,18 @@ import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'StandBackStrategy',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tempData: [],
|
||||
strategyList: [
|
||||
{
|
||||
value: '01',
|
||||
label: '无折返'
|
||||
},
|
||||
{
|
||||
value: '02',
|
||||
label: '无人折返'
|
||||
},
|
||||
{
|
||||
value: '03',
|
||||
label: '自动换端'
|
||||
},
|
||||
{
|
||||
value: '04',
|
||||
label: '关闭'
|
||||
}
|
||||
],
|
||||
strategyList: [],
|
||||
stationName: '',
|
||||
stationStrategy: '',
|
||||
selection: [],
|
||||
isConfirm: false,
|
||||
strategy: '',
|
||||
strategyId: '',
|
||||
tableStyle: {
|
||||
'border-bottom': 'none'
|
||||
}
|
||||
@ -105,13 +83,20 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Station.setBackStrategy.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
|
||||
return this.dialogShow ? OperationEvent.Station.setBackStrategy.choose.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '变通策略管理';
|
||||
return '策略选择';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading && this.isConfirm) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -120,31 +105,13 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
this.$refs.table.setCurrentRow(null);
|
||||
});
|
||||
},
|
||||
doShow(operate, selected, opts) {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.stationName = '';
|
||||
this.stationStrategy = '';
|
||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
this.strategyList.forEach(item => {
|
||||
if (item.value == opts.reentryStrategy) {
|
||||
this.stationStrategy = item.label;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
this.loadInitData(selected, opts);
|
||||
const name = selected.optionList.find(ele => ele.id == selected.tbStrategyId).label;
|
||||
this.stationName = selected.name || '';
|
||||
this.stationStrategy = selected.tbStrategyId ? name : '无策略折返'; // 当前默认折返策略
|
||||
this.strategyList = selected.optionList; // 策略列表
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -154,11 +121,11 @@ export default {
|
||||
},
|
||||
clickEvent(row, column, event) {
|
||||
const operate = {
|
||||
operation: OperationEvent.StationStand.setBackStrategy.choose.operation
|
||||
operation: OperationEvent.Station.setBackStrategy.choose.operation
|
||||
};
|
||||
this.strategy = row.value;
|
||||
this.strategyId = row.id;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
@ -183,20 +150,19 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standReentryStrategy: this.strategy}, 2).then(({valid})=>{
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {id: this.strategyId}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
this.doClose();
|
@ -1,400 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-cmd-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="800px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="车站名称" label-width="100px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="tempData"
|
||||
class="table"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
||||
v-show="timeCountCommand>0"
|
||||
>({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
||||
v-show="timeCountConfirm>0"
|
||||
>({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { now } from '@/utils/date';
|
||||
|
||||
export default {
|
||||
name: 'StationCmdControl',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
backOperate: '',
|
||||
selected: null,
|
||||
order: 0,
|
||||
row: null,
|
||||
timer: null,
|
||||
operation: '',
|
||||
cmdDisabled: [true, true, true],
|
||||
stpDisabled: true,
|
||||
tempData: [],
|
||||
message: '',
|
||||
timeCountCommand: -1,
|
||||
timeCountConfirm: -1,
|
||||
stationName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
typeList() {
|
||||
return [
|
||||
{ code: OperationEvent.Station.powerUnLock.menu.operation, name: '上电解锁' },
|
||||
{ code: OperationEvent.Station.execKeyOperationTest.menu.operation, name: '执行关键操作测试' }
|
||||
];
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCommand() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.order.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.order.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdStop() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
return OperationEvent.Station.powerUnLock.stop.domId;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
return OperationEvent.Station.execKeyOperationTest.stop.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdClose() {
|
||||
return OperationEvent.Command.close.menu.domId;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
return '执行关键操作测试';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cmdDisabled: {
|
||||
handler(val, oldVal) {
|
||||
this.stpDisabled = true;
|
||||
val.forEach((elem, index) => {
|
||||
// 在确定1之前的操作才可以终止
|
||||
if (elem == false && index >= 1 && index <= 2) {
|
||||
this.stpDisabled = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
this.timer = setInterval(() => {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
if (this.timeCountCommand > 0) {
|
||||
this.timeCountCommand--;
|
||||
} else if (this.timeCountCommand == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountCommand = -1;
|
||||
}
|
||||
if (this.timeCountConfirm > 0) {
|
||||
this.timeCountConfirm--;
|
||||
} else if (this.timeCountConfirm == 0) {
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.timeCountConfirm = -1;
|
||||
}
|
||||
}
|
||||
}, 1000);
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Station'.toUpperCase()) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
|
||||
this.order = 0;
|
||||
this.operation = operate.operation;
|
||||
this.tempData = [];
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.cmdDisabled = [false, true, true];
|
||||
}
|
||||
this.stpDisabled = true;
|
||||
this.dialogShow = true;
|
||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
command() {
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||
|
||||
this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 第一步不带弹框处理*/
|
||||
this.commandNoPopUp();
|
||||
} else {
|
||||
/** 第一步带弹框处理*/
|
||||
this.commandHasPopUp();
|
||||
}
|
||||
},
|
||||
commandHasPopUp() {
|
||||
},
|
||||
commandNoPopUp() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.order.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.order.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm1() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm1.operation;
|
||||
}
|
||||
|
||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = 10;
|
||||
this.setButtonEnable({ step: 2 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
confirm2() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.confirm2.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.confirm2.operation;
|
||||
}
|
||||
|
||||
this.setMessage('');
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.timeCountCommand = -1;
|
||||
this.timeCountConfirm = -1;
|
||||
this.setButtonEnable({ step: -1 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
stop() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation) {
|
||||
/** 上电解锁*/
|
||||
operate.operation = OperationEvent.Station.powerUnLock.stop.operation;
|
||||
} else if (this.operation == OperationEvent.Station.execKeyOperationTest.menu.operation) {
|
||||
/** 执行关键操作测试*/
|
||||
operate.operation = OperationEvent.Station.execKeyOperationTest.stop.operation;
|
||||
}
|
||||
|
||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.setButtonEnable({ step: 0 });
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
||||
} else {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||
});
|
||||
},
|
||||
close() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
},
|
||||
getOperate(operate) {
|
||||
/** 弹框返回值处理*/
|
||||
},
|
||||
setButtonEnable(param) {
|
||||
this.cmdDisabled = [true, true, true];
|
||||
if (param && param.step >= 0) {
|
||||
this.cmdDisabled[param.step] = false;
|
||||
}
|
||||
},
|
||||
setMessage(message) {
|
||||
this.message = message;
|
||||
},
|
||||
writeRecord(param) {
|
||||
this.tempData.push(param);
|
||||
},
|
||||
editRecord(param) {
|
||||
this.tempData.forEach(elem => {
|
||||
if (elem.order == param.order) {
|
||||
for (var prop in param) {
|
||||
elem[prop] = param[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
313
src/jmapNew/theme/race_01/menus/dialog/stationControl.vue
Normal file
313
src/jmapNew/theme/race_01/menus/dialog/stationControl.vue
Normal file
@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="540px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row style="margin-bottom: 10px;">
|
||||
<el-col :span="17">
|
||||
<el-table ref="table" :data="stationLists" border style="width: 100%;" size="mini" height="260" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column label="选择" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox v-model="scope.row.checked" :disabled="scope.row.disable" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="车站名">
|
||||
<template slot-scope="scope">{{ scope.row.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前状态">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.controlMode == 'Center'">遥控</span>
|
||||
<span v-else-if="scope.row.controlMode == 'Local'">站控</span>
|
||||
<!-- <span v-else-if="scope.row.controlMode == 'Local' && $route.query.prdType == '02'">中心请求站控</span>
|
||||
<span v-else-if="scope.row.controlMode == 'Center' && $route.query.prdType == '01'">现地请求遥控</span> -->
|
||||
<span v-else>获取状态中...</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="1">
|
||||
<el-radio v-model="controlMode" label="center" :disabled="disabledAll" style="margin-bottom: 8px;">请求站控</el-radio>
|
||||
<el-radio v-model="controlMode" label="local" :disabled="disabledAll">请求遥控</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 15px;">
|
||||
<el-col :span="17">
|
||||
<el-col :span="11" style="text-align: center;"><el-checkbox v-model="checkedAll" size="medium" :disabled="disabledAll" @change="selectAll">全部选择</el-checkbox></el-col>
|
||||
<el-col :span="11" :offset="2"><el-checkbox v-model="checked2" :disabled="disabledAll" size="medium">全部确认</el-checkbox></el-col>
|
||||
</el-col>
|
||||
<el-col :span="5" :offset="1" style="margin-top: -56px;">
|
||||
<el-button :id="domIdConfirm" type="primary" :disabled="commitDisabled" :loading="loading" style="margin-left: 0; margin-bottom: 10px; width: 100%;" @click="commit">应 用</el-button>
|
||||
<el-button :id="domIdCancel" style="margin-left: 0; width: 100%;" @click="cancel">关 闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'StationControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
controlMode: 'center',
|
||||
beforeSectionList: [],
|
||||
checkedAll: false,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
row: null,
|
||||
operation: '',
|
||||
stationLists: [],
|
||||
disabledAll: false,
|
||||
checked2: false,
|
||||
commitDisabled:false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.choose.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
return OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
title() {
|
||||
return '站遥控转换';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.controlTransfer':function (controlTransferList) {
|
||||
controlTransferList.forEach(controlTransfer=>{
|
||||
this.updateTableValue(controlTransfer);
|
||||
});
|
||||
},
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getStationList(disable) {
|
||||
this.stationLists = [];
|
||||
if (this.stationList && this.stationList.length) {
|
||||
this.stationList.forEach(item => {
|
||||
if (item.centralized) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](item.code);
|
||||
let checked = false;
|
||||
if (station.code == this.selected.code) {
|
||||
checked = true;
|
||||
}
|
||||
const param = {
|
||||
checked: checked,
|
||||
disable: disable,
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
controlMode: station.controlMode
|
||||
};
|
||||
this.stationLists.push(param);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
updateTableValue(controlTransfer) {
|
||||
this.stationLists.forEach((row, index) => {
|
||||
if (row.code == controlTransfer.code) {
|
||||
if (controlTransfer.applicantId) {
|
||||
this.commitDisabled = true;
|
||||
} else {
|
||||
this.commitDisabled = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
// this.tableData.forEach((row, index) => {
|
||||
// if (row.code == controlTransfer.code) {
|
||||
// if (controlTransfer.applicantId) {
|
||||
// row.result = this.$t('menu.menuDialog.senedMessageOne') + controlTransfer.validDuration + this.$t('menu.menuDialog.senedMessageTwo');
|
||||
// row.disabled = true;
|
||||
// row.check = false;
|
||||
// } else {
|
||||
// if (row.control != this.controlProps[controlTransfer.controlMode]) {
|
||||
// row.result = this.$t('menu.menuDialog.controlModeTransfersuccees');
|
||||
// row.control = this.controlProps[controlTransfer.controlMode];
|
||||
// this.removeSelection(controlTransfer.code);
|
||||
// row.disabled = true;
|
||||
// row.check = false;
|
||||
// } else {
|
||||
// row.result = this.$t('menu.menuDialog.controlModeTransferFailed');
|
||||
// this.removeSelection(controlTransfer.code);
|
||||
// row.disabled = false;
|
||||
// row.check = false;
|
||||
// }
|
||||
// this.disabledClose = false;
|
||||
// this.disabledSure = false;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
},
|
||||
getProtectedSectionName(row) {
|
||||
let name = '';
|
||||
if (row &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList &&
|
||||
row.overlapSectionList.length > 0) {
|
||||
|
||||
const protect = row.overlapSectionList[0];
|
||||
name = `${protect.name}`;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](protect.stationCode);
|
||||
if (station) {
|
||||
name = `${name}(${station.name})`;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,而是第一次显示,则需要设置初始值
|
||||
if (!this.dialogShow) {
|
||||
this.operation = operate.operation;
|
||||
if (selected) {
|
||||
this.getStationList(true);
|
||||
this.disabledAll = true;
|
||||
} else {
|
||||
this.getStationList(false);
|
||||
this.disabledAll = false;
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.StationControl.requestCentralControl.menu.operation) {
|
||||
this.controlMode = 'local';
|
||||
} else if (this.operation == OperationEvent.StationControl.requestStationControl.menu.operation) {
|
||||
this.controlMode = 'center';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.restoreBeforeDevices();
|
||||
this.$refs.table.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
restoreBeforeDevices() {
|
||||
// 恢复之前选中设备
|
||||
if (this.beforeSectionList && this.beforeSectionList.length) {
|
||||
this.beforeSectionList.forEach(elem => {
|
||||
elem.cutOff = false;
|
||||
});
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/updateMapState', [...this.beforeSectionList]);
|
||||
this.beforeSectionList = [];
|
||||
},
|
||||
selectAll() {
|
||||
this.stationLists.forEach(row => {
|
||||
if (this.checkedAll) {
|
||||
row.checked = true;
|
||||
} else {
|
||||
row.checked = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
clickEvent(row, event, column) {
|
||||
this.row = row;
|
||||
if (row) {
|
||||
// 设置选中指令
|
||||
const operate = {
|
||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
commit() {
|
||||
const list = [];
|
||||
this.stationLists.forEach(row => {
|
||||
if (row.checked) {
|
||||
list.push(row.code);
|
||||
}
|
||||
});
|
||||
if (list && list.length) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: '',
|
||||
cmdType: '',
|
||||
param: {
|
||||
stationCodes: list
|
||||
}
|
||||
};
|
||||
if (this.controlMode == 'center') {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL;
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (this.controlMode == 'local') {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL;
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,147 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-set-route-control-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="padding: 0px 10px">
|
||||
<el-form ref="form" size="small" label-width="90px" label-position="left">
|
||||
<el-form-item label="集中站名称:" prop="stationName">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-radio-group v-model="mode">
|
||||
<el-row>
|
||||
<el-radio :label="true">检查冲突</el-radio>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-radio :label="false">不检查冲突</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationSetRouteControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
mode: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '全集中站设置进路控制模式';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
val: this.mode
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.station-set-route-control-all .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-define"
|
||||
class="ningbo-01__systerm train-define"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -38,15 +38,15 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainDefine',
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '定义车组号';
|
||||
return '设置车体号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -170,7 +170,7 @@ export default {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm stand-stop-time"
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
@ -24,7 +24,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
@ -145,7 +145,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
@ -1,167 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 98%; float: left; padding: 10px 15px; margin: 20px 0px; height: 120px;">
|
||||
<!-- <span class="base-label">目的</span> -->
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal" style="width:280px">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.deletePlanTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou_01 .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -1,160 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-flag"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 15px; margin-bottom: 30px">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="addModel.type" :disabled="true">
|
||||
<el-radio label="01">备选项</el-radio>
|
||||
<el-radio label="02">备选项</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainFlag',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
type: '01',
|
||||
groupNumber: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'ATP切除功能';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-move"
|
||||
class="ningbo-01__systerm train-move"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -38,15 +38,15 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
@ -83,7 +83,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移车组号';
|
||||
return '移动车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -165,13 +165,13 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
|
@ -1,175 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="overflow: hidden;">
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
|
||||
<span class="base-label">源</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item label="车 次 号:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
// trainNo: '',
|
||||
trainSource: '',
|
||||
// stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
// trainNo: [
|
||||
// { required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
// ],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
// stationStandSource: [
|
||||
// { required: true, message: '请选择车站', trigger: 'change' }
|
||||
// ],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
// operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.fuzhou_01 .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-head"
|
||||
class="ningbo-01__systerm train-set-head"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -40,7 +40,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
class="ningbo-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -40,7 +40,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-work"
|
||||
class="ningbo-01__systerm train-set-work"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
@ -24,7 +24,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -1,33 +1,29 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-edit"
|
||||
class="ningbo-01__systerm train-set-work"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">新车组号</el-col>
|
||||
<el-col :span="6">车组号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
<el-col :span="18">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="01">标记ATP切除</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="radio" label="02">标记APT恢复</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -38,18 +34,18 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
|
||||
export default {
|
||||
name: 'TrainEdit',
|
||||
name: 'TrainSetWork',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
@ -58,10 +54,9 @@ export default {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: ''
|
||||
},
|
||||
radio: '01',
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
@ -83,7 +78,7 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改计划车';
|
||||
return 'ATP切除功能';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -121,7 +116,7 @@ export default {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
@ -135,7 +130,7 @@ export default {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
@ -147,7 +142,7 @@ export default {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
@ -165,13 +160,13 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
/deep/ .el-row {
|
||||
margin: 10px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
// background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
top: -18px;
|
181
src/jmapNew/theme/race_01/menus/dialog/turnBackControl.vue
Normal file
181
src/jmapNew/theme/race_01/menus/dialog/turnBackControl.vue
Normal file
@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm signal-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>折返</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin: 12px 0;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" :disabled="passRadio == '2'">设置</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="passRadio" label="2" style="display: block; padding-left: 10px;" :disabled="passRadio == '1'">取消</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
passRadio: '1'
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||
return OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.domId;
|
||||
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||
return OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.domId;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
title() {
|
||||
return '自动折返';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'AutoTurnBack'.toUpperCase()) {
|
||||
const autoReentryData = this.$store.getters['map/autoReentryData'];
|
||||
this.signalName = autoReentryData[selected.cycleCode].name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation;
|
||||
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||
this.passRadio = '1';
|
||||
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||
this.passRadio = '2';
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation) {
|
||||
this.singalPassModel(); // 设置自动折返
|
||||
} else if (this.operation == OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation) {
|
||||
this.singalCancelPassModel(); // 取消自动折返
|
||||
}
|
||||
},
|
||||
// 设置自动折返
|
||||
singalPassModel() {
|
||||
this.sendCommand(menuOperate.Signal.setAutoTurnBack);
|
||||
},
|
||||
// 取消自动折返
|
||||
singalCancelPassModel() {
|
||||
this.sendCommand(menuOperate.Signal.cancelAutoTurnBack);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then((data)=>{
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
// 取消
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.close.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,17 +2,20 @@
|
||||
<div class="menus" :style="{width: width + 'px'}">
|
||||
<menu-cancel ref="menuCancel" />
|
||||
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" />
|
||||
<menu-button ref="menuButton" />
|
||||
<menu-axle-reset ref="menuAxleReset" :selected="selected" />
|
||||
<menu-auto-trun-route ref="menuAutoTrunRoute" :selected="selected" />
|
||||
<menu-station-stand ref="menuStationStand" :selected="selected" />
|
||||
<menu-station-control ref="menuStationControl" />
|
||||
<menu-station-turn-back ref="menuStationTurnBack" :selected="selected" />
|
||||
<menu-switch ref="menuSwitch" :selected="selected" />
|
||||
<menu-signal ref="menuSignal" :selected="selected" />
|
||||
<menu-section ref="menuSection" :selected="selected" />
|
||||
<menu-train ref="menuTrain" :selected="selected" />
|
||||
<menu-station ref="menuStation" :selected="selected" />
|
||||
<menu-limit ref="menuLimit" :selected="selected" />
|
||||
<passive-alarm ref="passiveAlarm" />
|
||||
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" />
|
||||
<passive-Timeout ref="passiveTimeout" />
|
||||
<!--<passive-alarm ref="passiveAlarm" />-->
|
||||
<passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
|
||||
<!--<passive-Timeout ref="passiveTimeout" />-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,34 +23,40 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import MenuCancel from './menuCancel';
|
||||
import MenuSignal from './menuSignal';
|
||||
import MenuButton from './menuButton';
|
||||
import MenuAxleReset from './menuAxleReset';
|
||||
import MenuAutoTrunRoute from './menuAutoTrunRoute';
|
||||
import MenuStationStand from './menuStationStand';
|
||||
import MenuStationControl from './menuStationControl';
|
||||
import MenuSwitch from './menuSwitch';
|
||||
import MenuSection from './menuSection';
|
||||
import MenuTrain from './menuTrain';
|
||||
import MenuStation from './menuStation';
|
||||
import MenuBar from './menuBar';
|
||||
import MenuLimit from './menuLimit';
|
||||
import PassiveAlarm from './passiveDialog/alarm';
|
||||
import MenuStationTurnBack from './menuStationTurnBack';
|
||||
// import PassiveAlarm from './passiveDialog/alarm';
|
||||
import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
|
||||
import PassiveTimeout from './passiveDialog/timeout';
|
||||
// import PassiveTimeout from './passiveDialog/timeout';
|
||||
|
||||
export default {
|
||||
name: 'Menus',
|
||||
components: {
|
||||
MenuBar,
|
||||
MenuButton,
|
||||
MenuAxleReset,
|
||||
MenuAutoTrunRoute,
|
||||
MenuCancel,
|
||||
MenuSignal,
|
||||
MenuSwitch,
|
||||
MenuSection,
|
||||
MenuStationStand,
|
||||
MenuStationControl,
|
||||
MenuStation,
|
||||
MenuTrain,
|
||||
MenuStationTurnBack,
|
||||
MenuLimit,
|
||||
PassiveAlarm,
|
||||
PassiveContorl,
|
||||
PassiveTimeout
|
||||
// PassiveAlarm,
|
||||
PassiveContorl
|
||||
// PassiveTimeout
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -73,13 +82,15 @@ export default {
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('config/updateMenuBar');
|
||||
this.$refs['menuSignal'].setRouteSignal();
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.menus{
|
||||
height:0px;
|
||||
}
|
||||
.menus .pop-menu {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
@ -92,29 +103,29 @@ export default {
|
||||
color: #B4B3B8;
|
||||
}
|
||||
|
||||
.beijing-01__systerm {
|
||||
.ningbo-01__systerm {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog {
|
||||
.ningbo-01__systerm .el-dialog {
|
||||
background: rgba(100, 100, 100, 0.3);
|
||||
border: 2px solid rgb(144, 144, 144, 0.8);
|
||||
border: 2px solid rgba(144, 144, 144, 0.8);
|
||||
border-radius: 6px;
|
||||
color: #000;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__header {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__header {
|
||||
padding: 10px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__footer {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__footer {
|
||||
background: #F0F0F0;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__body {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__body {
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
border: 2px solid rgba(120, 121, 123, 0.5);
|
||||
@ -123,7 +134,7 @@ export default {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__title {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__title {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
color: #000;
|
||||
@ -133,7 +144,7 @@ export default {
|
||||
line-height: 20px
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__title::before {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__title::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@ -145,7 +156,7 @@ export default {
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn {
|
||||
background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
|
||||
border: 1px solid #fff;
|
||||
border-radius: 4px;
|
||||
@ -154,15 +165,15 @@ export default {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-icon-close:before {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
.ningbo-01__systerm .el-dialog .el-dialog__headerbtn .el-dialog__close {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button {
|
||||
.ningbo-01__systerm .el-dialog .el-button {
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
padding: 0px;
|
||||
@ -173,31 +184,31 @@ export default {
|
||||
background: #F0F0F0;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .expand {
|
||||
.ningbo-01__systerm .el-dialog .expand {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:focus span {
|
||||
.ningbo-01__systerm .el-dialog .el-button:focus span {
|
||||
border: 1px dashed gray;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:active {
|
||||
.ningbo-01__systerm .el-dialog .el-button:active {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:disabled {
|
||||
.ningbo-01__systerm .el-dialog .el-button:disabled {
|
||||
border: 2px inset #E2E2E2;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-button:disabled span {
|
||||
.ningbo-01__systerm .el-dialog .el-button:disabled span {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input {
|
||||
.ningbo-01__systerm .el-dialog .el-input {
|
||||
border: 2px inset #E9E9E9;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-input .el-input__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
@ -205,16 +216,16 @@ export default {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-input.is-disabled .el-input__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-textarea {
|
||||
.ningbo-01__systerm .el-dialog .el-textarea {
|
||||
border: 2px inset #E9E9E9;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-textarea .el-textarea__inner {
|
||||
color: #000;
|
||||
background: #fff !important;
|
||||
border: 0px;
|
||||
@ -222,24 +233,24 @@ export default {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-textarea.is-disabled .el-textarea__inner {
|
||||
background: #F0F0F0 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table--border th.gutter {
|
||||
.ningbo-01__systerm .el-dialog .el-table--border th.gutter {
|
||||
background: #EBEADB !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table {
|
||||
.ningbo-01__systerm .el-dialog .el-table {
|
||||
border: 2px inset #E9E9E9;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table .cell {
|
||||
.ningbo-01__systerm .el-dialog .el-table .cell {
|
||||
line-height: unset !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
.ningbo-01__systerm .el-dialog .el-table th.is-leaf {
|
||||
background: #F0F0F0 !important;
|
||||
border-right: 1px solid #BDBDBD !important;
|
||||
border-bottom: 1px solid #BDBDBD !important;
|
||||
@ -248,42 +259,57 @@ export default {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table tr td {
|
||||
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table th.is-leaf {
|
||||
background: #fff !important;
|
||||
border-right: 1px solid #fff !important;
|
||||
border-bottom: 1px solid #EBEEF5 !important;
|
||||
color: #000 !important;
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table th.el-table-column--selection{
|
||||
border-right: 1px solid #e2e2e2 !important;
|
||||
}
|
||||
.ningbo-01__systerm.stand-detain-train .el-dialog .el-table .el-table__body-wrapper .el-table__row .el-table-column--selection {
|
||||
border-right: 1px solid #e2e2e2 !important;
|
||||
}
|
||||
|
||||
.ningbo-01__systerm .el-dialog .el-table tr td {
|
||||
height: 20px !important;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
.ningbo-01__systerm .el-dialog .el-table .el-table__empty-text {
|
||||
top: 15px !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .current-row>td {
|
||||
.ningbo-01__systerm .el-dialog .current-row>td {
|
||||
background: #3399FF !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__label {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox.is-disabled .el-checkbox__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
.ningbo-01__systerm .el-dialog .el-checkbox__input.is-checked .el-checkbox__inner::after {
|
||||
position: absolute;
|
||||
-webkit-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
@ -296,20 +322,20 @@ export default {
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__inner {
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__label {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__label {
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner {
|
||||
background: #fff !important;
|
||||
border: 1px inset #dcdfe6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
.ningbo-01__systerm .el-dialog .el-radio__input.is-checked .el-radio__inner::after {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 100%;
|
||||
@ -319,42 +345,43 @@ export default {
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__inner {
|
||||
background: #E6E6E6 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
.ningbo-01__systerm .el-dialog .el-radio.is-disabled .el-radio__label {
|
||||
color: #C5C9CC !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: #F0F0F0;
|
||||
padding: 0 5px;
|
||||
position: relative;
|
||||
left: -15px;
|
||||
top: -18px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .el-form-item label {
|
||||
.ningbo-01__systerm .el-dialog .el-form-item label {
|
||||
font-weight: normal !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .context {
|
||||
.ningbo-01__systerm .el-dialog .context {
|
||||
height: 100px;
|
||||
border: 2px inset #E2E2E2;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .table {
|
||||
.ningbo-01__systerm .el-dialog .table {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .notice {
|
||||
.ningbo-01__systerm .el-dialog .notice {
|
||||
margin-left: 62px;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.beijing-01__systerm .el-dialog .button-group {
|
||||
.ningbo-01__systerm .el-dialog .button-group {
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
125
src/jmapNew/theme/race_01/menus/menuAutoTrunRoute.vue
Normal file
125
src/jmapNew/theme/race_01/menus/menuAutoTrunRoute.vue
Normal file
@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<turn-back-control ref="turnBackControl" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import TurnBackControl from './dialog/turnBackControl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
TurnBackControl
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置自动折返',
|
||||
handler: this.handlerTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
{
|
||||
label: '取消自动折返',
|
||||
handler: this.cancelTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置自动折返',
|
||||
handler: this.handlerTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
{
|
||||
label: '取消自动折返',
|
||||
handler: this.cancelTurnBack,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AutoTurnBack) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置自动折返
|
||||
handlerTurnBack() {
|
||||
commitOperate(menuOperate.Signal.setAutoTurnBack, {cycleCode:this.selected.cycleCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消自动折返
|
||||
cancelTurnBack() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoTurnBack, {cycleCode:this.selected.cycleCode, cancelRoute:false}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.turnBackControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
103
src/jmapNew/theme/race_01/menus/menuAxleReset.vue
Normal file
103
src/jmapNew/theme/race_01/menus/menuAxleReset.vue
Normal file
@ -0,0 +1,103 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-alxe-reset ref="sectionAlxeReset" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionAlxeReset from './dialog/sectionAlxeReset';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionAlxeReset
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '计轴复位',
|
||||
handler: this.handleAxleReset,
|
||||
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.AxleReset) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置计轴复位
|
||||
handleAxleReset() {
|
||||
commitOperate(menuOperate.AxleReset.SetAxleReset, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionAlxeReset.doShow(operate);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -89,7 +89,7 @@
|
||||
<station-control ref="stationControl" />
|
||||
<detain-train-contorl ref="detainTrainContorl" />
|
||||
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
@ -379,6 +379,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
operate: '',
|
||||
children: [
|
||||
{
|
||||
title: '关于ITS GPC 工作站',
|
||||
@ -585,22 +586,22 @@ export default {
|
||||
{
|
||||
title: '全线扣车',
|
||||
operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
|
||||
click: this.setDetainTrainAll
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消全线扣车',
|
||||
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
|
||||
click: this.cancelDetainTrainAll
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消上行全线扣车',
|
||||
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
|
||||
click: this.cancelUpDetainTrainAll
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '取消下行全线扣车',
|
||||
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
|
||||
click: this.cancelDownDetainTrainAll
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -703,8 +704,8 @@ export default {
|
||||
initMenu(menu) {
|
||||
const type = State2SimulationMap[this.$store.state.training.prdType];
|
||||
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
|
||||
if (this.menu[3]) {
|
||||
this.menu[3].children = this.initStationList();
|
||||
if (this.menu[2]) {
|
||||
this.menu[2].children = this.initStationList();
|
||||
}
|
||||
this.clickEvent();
|
||||
this.closeMenu(true);
|
||||
@ -771,7 +772,14 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
selectedClassB(item, index) {
|
||||
const order = this.order || 0;
|
||||
if (this.mode !== TrainingMode.TEACH) { // 编辑模式下可显示
|
||||
this.popupMenuB(item, index);
|
||||
} else if (this.steps[order] && this.steps[order].type == 'bar') { // 操作步骤没有顶部操作顶部菜单都不可显示
|
||||
this.popupMenuB(item, index);
|
||||
}
|
||||
},
|
||||
popupMenuB(item, index) {
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
|
||||
const operate = {
|
||||
|
@ -1,468 +0,0 @@
|
||||
<template>
|
||||
<div v-if="isShowBtn" id="menuButtons_box" class="menu menuButton" style="height:45px;" :style="{left: point.x+'px', bottom: 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>
|
||||
<b>路</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>建</b>
|
||||
<b>立</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="MixinCommand.totalCancel.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(MixinCommand.totalCancel.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>总</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>取</b>
|
||||
<b>消</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
</center>
|
||||
<center>
|
||||
<b>人</b>
|
||||
<b>解</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>号</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>重</b>
|
||||
<b>开</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>按</b>
|
||||
<b>钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="Station.guideLock.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Station.guideLock.button.operation)"
|
||||
>
|
||||
<span style="color: red">
|
||||
<center>
|
||||
<b>引</b>
|
||||
<b>导</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>定</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>总</b>
|
||||
<b>反</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>单</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>岔</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>解</b>
|
||||
<b>锁</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>动</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>进</b>
|
||||
<b>路</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
</center>
|
||||
<center>
|
||||
<b>故</b>
|
||||
<b>解</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<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>
|
||||
<b>轴</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>复</b>
|
||||
<b>位</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
:id="MixinCommand.functionButton.button.domId"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(MixinCommand.functionButton.button.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b style="color:deepskyblue">功</b>
|
||||
<b style="color:burlywood">能</b>
|
||||
</center>
|
||||
<center>
|
||||
<b style="color: red">按</b>
|
||||
<b style="color:forestgreen">钮</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
id="mbm_12"
|
||||
:style="{display: 'block', float: 'left', width: width+'px', backgroundColor:buttonUpColor}"
|
||||
@click="buttonDown(Switch.turnoutForce.menu.operation)"
|
||||
>
|
||||
<span style="color: black">
|
||||
<center>
|
||||
<b>强</b>
|
||||
<b>扳</b>
|
||||
</center>
|
||||
<center>
|
||||
<b>授</b>
|
||||
<b>权</b>
|
||||
</center>
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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 { deepAssign } from '@/utils/index';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
components: {
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
point: {
|
||||
x: 0,
|
||||
y: 15
|
||||
},
|
||||
operation: '0',
|
||||
buttonName: '',
|
||||
buttonDownColor: '#A8A8A8',
|
||||
buttonUpColor: '#DCDCDC',
|
||||
width: 58,
|
||||
tempData: null,
|
||||
offset: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
Switch() {
|
||||
return OperationEvent.Switch;
|
||||
},
|
||||
Section() {
|
||||
return OperationEvent.Section;
|
||||
},
|
||||
Signal() {
|
||||
return OperationEvent.Signal;
|
||||
},
|
||||
Station() {
|
||||
return OperationEvent.Station;
|
||||
},
|
||||
MixinCommand() {
|
||||
return OperationEvent.MixinCommand;
|
||||
},
|
||||
Command() {
|
||||
return OperationEvent.Command;
|
||||
},
|
||||
isShowBtn() {
|
||||
return this.$store.state.training.prdType == '01';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.config.canvasOffsetCount': function (val) {
|
||||
this.resetPosition();
|
||||
},
|
||||
'$store.state.menuOperation.buttonOperation': function (val, old) {
|
||||
this.updateButtonShow(val, old);
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function (val) {
|
||||
this.selectedChange();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.resetPosition();
|
||||
},
|
||||
methods: {
|
||||
resetPosition() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
updateButtonShow(val, old) {
|
||||
if (old) {
|
||||
// 恢复旧按钮显示
|
||||
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) {
|
||||
dom.disabled = true;
|
||||
dom.style.backgroundColor = this.buttonDownColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonDown(operation) {
|
||||
const operate = {
|
||||
type: 'mbm',
|
||||
operation: operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
}
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
operation: data.operation,
|
||||
over:true,
|
||||
cmdType:data.cmdType
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
selectedChange() {
|
||||
const model = this.$store.state.menuOperation.selected;
|
||||
if (model && model._type) {
|
||||
switch (this.$store.state.menuOperation.buttonOperation) {
|
||||
case OperationEvent.Station.guideLock.button.operation : {
|
||||
if (model && model._type == 'GuideLock') {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Station.guideLock.button.operation,
|
||||
param:{
|
||||
stationCode:model.stationCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (model.totalGuideLock) {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_CANCEL_MASTER_GUIDE_LOCK;
|
||||
} else {
|
||||
operate.cmdType = CMD.Station.CMD_STATION_SET_MASTER_GUIDE_LOCK;
|
||||
}
|
||||
this.$refs.password.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.functionButton.button.operation : {
|
||||
|
||||
if (model && model._type == 'AutoTurnBack' && !model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Station.guideLock.button.operation,
|
||||
param:{
|
||||
cycleCode:model.cycleCode
|
||||
},
|
||||
cmdType : CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
if (model && model._type == 'AutoTurnBack' && model.setUp) {
|
||||
const operate = {
|
||||
start: true,
|
||||
over: true,
|
||||
operation: OperationEvent.Station.guideLock.button.operation,
|
||||
param:{
|
||||
cycleCode:model.cycleCode,
|
||||
cancelRoute:false
|
||||
},
|
||||
cmdType : CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Handler.clear();
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
$bg: #fff;
|
||||
$hoverBg: #f5f7fa;
|
||||
|
||||
.menu {
|
||||
background-color: $bg;
|
||||
position: fixed;
|
||||
border: 1px solid gray;
|
||||
z-index: 10;
|
||||
display: block;
|
||||
|
||||
.dsp-block {
|
||||
display: block;
|
||||
text-align: center;
|
||||
border-radius: unset;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dsp-block:hover {
|
||||
background-color: $hoverBg;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -79,9 +79,6 @@ export default {
|
||||
if (this.isScreen) {
|
||||
this.menu = [...this.menuScreen];
|
||||
}
|
||||
// else {
|
||||
// this.menu = [...this.menuNormal];
|
||||
// }
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm two-confirmation"
|
||||
class="ningbo-01__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
@ -25,14 +25,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
@ -73,6 +73,13 @@ export default {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.loading) {
|
||||
this.commit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -118,13 +125,13 @@ export default {
|
||||
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
|
||||
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
|
||||
}
|
||||
this.doClose();
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
}, 1000).catch(() => {
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
<el-dialog class="ningbo-01__systerm user-add" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
@ -151,7 +151,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
<el-dialog class="ningbo-01__systerm user-delete" :title="title" :visible.sync="show" width="260px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding-left: 10px; padding-bottom: 10px">
|
||||
<i class="el-icon-info"></i>
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -123,7 +123,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
<el-dialog class="ningbo-01__systerm user-edit" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div style="padding: 15px 40px; border: 1px double lightgray; margin: 20px 10px; ">
|
||||
<el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
|
||||
@ -167,7 +167,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
class="ningbo-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item" disabled="false">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -21,7 +21,7 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -45,6 +45,10 @@ export default {
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
@ -61,25 +65,39 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.disabledCommit) {
|
||||
this.handleCommit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -95,9 +113,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -141,17 +163,17 @@ export default {
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -165,16 +187,17 @@ export default {
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
class="ningbo-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -11,9 +11,9 @@
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-radio-group v-model="control">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item">{{ controlProps[item] }}</el-radio>
|
||||
<el-radio :label="item" :disabled="controlPropDisabled[item]">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
@ -21,7 +21,7 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -45,8 +45,11 @@ export default {
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车'
|
||||
},
|
||||
controlPropDisabled:{
|
||||
'01':false,
|
||||
'02':false
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -61,25 +64,36 @@ export default {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.disabledCommit) {
|
||||
this.handleCommit();
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -95,9 +109,13 @@ export default {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01';
|
||||
this.controlPropDisabled['01'] = false;
|
||||
this.controlPropDisabled['02'] = true;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02';
|
||||
this.controlPropDisabled['01'] = true;
|
||||
this.controlPropDisabled['02'] = false;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -144,14 +162,14 @@ export default {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
|
||||
@ -168,13 +186,14 @@ export default {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
<el-dialog class="ningbo-01__systerm manage-user" :title="title" :visible.sync="show" width="600px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="height: 70px;">
|
||||
<div style="position: relative; left: 10px;">
|
||||
@ -120,7 +120,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
<el-dialog class="ningbo-01__systerm manage-user" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
|
||||
<span class="base-label">用户列表</span>
|
||||
@ -279,7 +279,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
class="ningbo-01__systerm station-control"
|
||||
title="控制模式转换"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -15,6 +15,7 @@
|
||||
<el-row style="margin-bottom: 20px">
|
||||
<el-select
|
||||
:id="domIdChooseStation"
|
||||
ref="chooseStation"
|
||||
v-model="station"
|
||||
value-key="code"
|
||||
filterable
|
||||
@ -24,6 +25,7 @@
|
||||
>
|
||||
<el-option v-for="item in concertrateStationList" :key="item.code" :label="item.name" :value="item" />
|
||||
</el-select>
|
||||
|
||||
</el-row>
|
||||
<el-radio-group :id="domIdChooseControl" v-model="stationType">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px">
|
||||
@ -37,14 +39,15 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
|
||||
<two-confirmation ref="twoConfirmation" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import TwoConfirmation from './childDialog/twoConfirmation';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
@ -88,14 +91,19 @@ export default {
|
||||
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.stationType == '01') {
|
||||
return OperationEvent.StationControl.requestCentralControl.menu.domId;
|
||||
} else if (this.stationType == '02') {
|
||||
return OperationEvent.StationControl.requestStationControl.menu.domId;
|
||||
} else if (this.stationType == '03') {
|
||||
return OperationEvent.StationControl.emergencyStationControl.menu.domId;
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
@ -106,6 +114,18 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.keyboardEnterCount': function (val) {
|
||||
if (this.show && !this.disabledCommit) {
|
||||
this.handleCommit();
|
||||
}
|
||||
},
|
||||
'$store.state.map.controlTransfer':function (controlTransferList) {
|
||||
controlTransferList.forEach(controlTransfer=>{
|
||||
this.updateTableValue(controlTransfer);
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
@ -119,11 +139,29 @@ export default {
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
// if (this.$store.state.training.prdType == '01') {
|
||||
// this.controlProps = {
|
||||
// '03': '紧急站控',
|
||||
// '02': '站控'
|
||||
// };
|
||||
// }
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
updateTableValue(controlTransfer) {
|
||||
this.concertrateStationList.forEach((row, index) => {
|
||||
if (row.code == controlTransfer.code) {
|
||||
if (controlTransfer.applicantId) {
|
||||
this.disabledCommit = true;
|
||||
} else {
|
||||
this.disabledCommit = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
@ -131,19 +169,21 @@ export default {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChooseChangeStation(data) {
|
||||
this.message = '';
|
||||
this.stationCode = data.code;
|
||||
this.stationName = data.name;
|
||||
this.message = '';
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.order.choose1.operation
|
||||
operation: OperationEvent.Command.order.choose1.operation,
|
||||
val: this.stationCode
|
||||
};
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
|
||||
// } else if (this.stationType == '02') {
|
||||
@ -155,12 +195,14 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.chooseStation.blur();
|
||||
}
|
||||
});
|
||||
},
|
||||
handleChooseChangeControl() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.order.choose.operation
|
||||
operation: OperationEvent.Command.order.choose.operation,
|
||||
val: this.stationCode
|
||||
};
|
||||
|
||||
// if (this.stationType == '01') {
|
||||
@ -198,35 +240,29 @@ export default {
|
||||
},
|
||||
// 请求遥控
|
||||
conterCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName);
|
||||
}
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由站控转为遥控:\n' + this.stationName);
|
||||
});
|
||||
},
|
||||
// 请求站控
|
||||
requestCommit() {
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
});
|
||||
},
|
||||
// 紧急站控
|
||||
emergencyCommit() {
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
|
||||
this.doClose();
|
||||
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
}
|
||||
this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-radio {
|
||||
|
@ -1,25 +1,37 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">添加位置</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终   端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="前车车次号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -47,7 +59,7 @@
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
@ -59,12 +71,12 @@
|
||||
// ],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -80,13 +92,13 @@
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '添加计划车'
|
||||
return '添加计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -111,47 +123,44 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.planTrain.addPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,16 +1,24 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code">
|
||||
</el-option>
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -37,7 +45,7 @@
|
||||
trainNoList: [],
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
stationStandCode: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
@ -46,12 +54,12 @@
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -67,13 +75,13 @@
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除计划车'
|
||||
return '删除计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -98,47 +106,44 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.planTrain.delPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.beijing-01__systerm .el-dialog .base-label {
|
||||
.ningbo-01__systerm .el-dialog .base-label {
|
||||
background: rgba(0, 0, 0, x);
|
||||
position: relative;
|
||||
left: -5px;
|
||||
|
@ -1,9 +1,18 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form">
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="100px" :model="addModel" :rules="rules">
|
||||
<el-form-item label="车 次 号:" label-width="115px" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的</span>
|
||||
@ -11,13 +20,16 @@
|
||||
<el-form-item prop="stationStandCode">
|
||||
<span slot="label">终  端:</span>
|
||||
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 号:" prop="trainNumberLimber">
|
||||
<el-input v-model="addModel.trainNumberLimber"></el-input>
|
||||
<el-input v-model="addModel.trainNumberLimber" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
@ -47,7 +59,7 @@
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
stationStandCode: '',
|
||||
trainNumberLimber: '',
|
||||
trainNumberLimber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
@ -59,12 +71,12 @@
|
||||
],
|
||||
stationStandCode: [
|
||||
{ required: true, message: '请选择终端', trigger: 'change' }
|
||||
],
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
@ -80,13 +92,13 @@
|
||||
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移计划车'
|
||||
return '平移计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
@ -111,42 +123,39 @@
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
} else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -31,7 +31,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
systemName:'beijing-01__systerm',
|
||||
systemName:'ningbo-01__systerm',
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
@ -51,6 +51,10 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
|
@ -1,41 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="beijing-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="beijing-01__systerm" />
|
||||
<section-control ref="sectionControl" pop-class="ningbo-01__systerm" />
|
||||
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
<train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import TrainAddPlan from '@/jmapNew/theme/components/menus/dialog/trainAddPlan';
|
||||
|
||||
export default {
|
||||
name: 'SectionMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo,
|
||||
SetFault,
|
||||
TrainAddPlan
|
||||
TrainAddPlan,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -50,26 +51,48 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '轨道激活',
|
||||
label: '区段故障解锁',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '区段跟踪激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '轨道切除',
|
||||
label: '区段跟踪切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '区段封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '区段跟踪激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段跟踪切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
// },
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
@ -78,18 +101,18 @@ export default {
|
||||
{
|
||||
label: '取消临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
@ -117,11 +140,6 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Section') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -144,7 +162,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -162,25 +179,7 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Section.fault.button.operation: {
|
||||
// 区故解
|
||||
if (selectType.fault) {
|
||||
this.faultUnlock(selectType);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `该区段[${selectType.name}(${selectType.code})]没有故障`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Section.axlePreReset.button.operation: {
|
||||
// 计轴复位
|
||||
this.axlePreReset(selectType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 添加计划车(开发专用)
|
||||
// 新建计划车(开发专用)
|
||||
addPlanTrain() {
|
||||
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -190,39 +189,17 @@ export default {
|
||||
},
|
||||
// // 设置计轴失效
|
||||
// alxeFailure() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// param: {
|
||||
// sectionCode: `${this.selected.code}`
|
||||
// }
|
||||
// };
|
||||
|
||||
// mouseCancelState(this.selected);
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// } else {
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// }
|
||||
// this.mouseCancelState(this.selected);
|
||||
// commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
|
||||
// }).catch(()=>{
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
// this.$refs.noticeInfo.doShow();
|
||||
// });
|
||||
// },
|
||||
// 故障解锁
|
||||
faultUnlock(selectType) {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
fault() {
|
||||
commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -236,6 +213,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 确认计轴有效
|
||||
alxeEffective() {
|
||||
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -243,7 +221,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 激活
|
||||
// 区段激活
|
||||
active() {
|
||||
const hasParentCode = (this.selected.type == '02' || this.selected.type == '03');
|
||||
const sectionCode = hasParentCode ? this.selected.parentCode : this.selected.code;
|
||||
@ -253,35 +231,50 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
axlePreReset(selectType) {
|
||||
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
// 区段封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionControl.doShow(operate, selectType);
|
||||
this.$refs.sectionControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段解锁
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Section.unlock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段计轴预复位
|
||||
// axlePreReset() {
|
||||
// this.commitOperate(menuOperate.Section.axlePreReset, {sectionCode:this.selected.code},0).then((data)=>{
|
||||
// this.$refs.sectionCmdControl.doShow(data.operate, this.selected);
|
||||
// });
|
||||
// },
|
||||
// 设置速度
|
||||
setSpeed() {
|
||||
const hasParentCode = (this.selected.type == '02' || this.selected.type == '03');
|
||||
const sectionCode = hasParentCode ? this.selected.parentCode : this.selected.code;
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
cancelSpeed() {
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.SetFault, this.selected);
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -295,17 +288,6 @@ export default {
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
},
|
||||
cancelSpeed() {
|
||||
let sectionCode = this.selected.code;
|
||||
if (this.selected.type == '02' || this.selected.type == '03') {
|
||||
sectionCode = this.selected.parentCode;
|
||||
}
|
||||
commitOperate(menuOperate.Section.cancelSpeed, {sectionCode:sectionCode}).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,12 +2,13 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" :pop-class="systemName" />
|
||||
<route-hand-control ref="routeHandControl" :system-name="systemName" />
|
||||
<route-detail ref="routeDetail" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
<set-fault ref="setFault" :pop-class="systemName" />
|
||||
<route-un-lock ref="routeUnLock" pop-class="ningbo-01__systerm" />
|
||||
<route-control ref="routeControl" pop-class="ningbo-01__systerm" />
|
||||
<route-hand-control ref="routeHandControl" system-name="ningbo-01__systerm" />
|
||||
<route-detail ref="routeDetail" system-name="ningbo-01__systerm" />
|
||||
<router-command ref="routerCommand" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -16,17 +17,16 @@ import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandControl';
|
||||
import RouterCommand from './dialog/routerCommand';
|
||||
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'SignalMenu',
|
||||
@ -34,10 +34,11 @@ export default {
|
||||
PopMenu,
|
||||
RouteControl,
|
||||
RouteSelection,
|
||||
RouteUnLock,
|
||||
RouteHandControl,
|
||||
RouteDetail,
|
||||
RouterCommand,
|
||||
NoticeInfo,
|
||||
PasswordBox,
|
||||
SetFault
|
||||
},
|
||||
props: {
|
||||
@ -51,13 +52,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
clickNum:0,
|
||||
systemName:'beijing-01__systerm',
|
||||
oldSelected:null,
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
@ -74,7 +70,34 @@ export default {
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '信号机引导办理',
|
||||
handler: this.guide,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号封锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_BLOCK
|
||||
},
|
||||
{
|
||||
label: '信号解封',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK
|
||||
},
|
||||
{
|
||||
label: 'Fleet进路办理',
|
||||
handler: this.singalPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: 'Fleet进路取消',
|
||||
handler: this.singalCancelPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
@ -91,6 +114,53 @@ export default {
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '排列进路',
|
||||
handler: this.arrangementRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||
},
|
||||
{
|
||||
label: '取消进路',
|
||||
handler: this.cancelTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
},
|
||||
{
|
||||
label: '人工解锁进路', // 信号机引导取消
|
||||
handler: this.humanTrainRoute,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
{
|
||||
label: '信号重开',
|
||||
handler: this.reopenSignal,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
},
|
||||
{
|
||||
label: '进路交人工控',
|
||||
handler: this.humanControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '进路交自动控',
|
||||
handler: this.atsAutoControl,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '设置通过模式',
|
||||
handler: this.singalPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '取消通过模式',
|
||||
handler: this.singalCancelPassModel,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
|
||||
},
|
||||
{
|
||||
label: '查询进路控制状态',
|
||||
handler: this.detail,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -122,7 +192,10 @@ export default {
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'routeList'
|
||||
])
|
||||
]),
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
@ -131,14 +204,8 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Signal') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
@ -147,12 +214,7 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
@ -171,137 +233,17 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
setRouteSignal() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
let signalList = [];
|
||||
this.routeList.forEach(route=>{
|
||||
signalList.push(route.startSignalCode);
|
||||
signalList.push(route.endSignalCode);
|
||||
});
|
||||
signalList = Array.from(new Set(signalList));
|
||||
signalList.forEach(signal=>{
|
||||
const signalDevice = this.$store.getters['map/getDeviceByCode'](signal);
|
||||
const signalModel = Object.assign({_type: 'Signal'}, signalDevice);
|
||||
signalModel.isRouteSignal = true;
|
||||
this.$store.dispatch('map/updateMapDevices', signalModel);
|
||||
});
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Signal.arrangementRoute.button.operation: {
|
||||
// 进路建立
|
||||
if (this.clickNum >= 1) {
|
||||
let route = null;
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.oldSelected.code) {
|
||||
if (elem.endSignalCode === selectType.code) {
|
||||
route = elem;
|
||||
}
|
||||
const signalCode = this.$store.getters['map/getDeviceByCode'](elem.endSignalCode);
|
||||
const data = Object.assign({_type: 'Signal'}, signalCode);
|
||||
data.isRouteActive = false;
|
||||
this.$store.dispatch('map/updateMapDevices', data);
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
}
|
||||
});
|
||||
if (route) {
|
||||
this.setRoute(route);
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `没有以[${this.oldSelected.name}(${this.oldSelected.code})]为始端信号机,以[${selectType.name}(${selectType.code})] 为终端信号机的进路`);
|
||||
}
|
||||
this.clickNum = 0;
|
||||
} else {
|
||||
this.oldSelected = selectType;
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === this.oldSelected.code) {
|
||||
const signalCode = this.$store.getters['map/getDeviceByCode'](elem.endSignalCode);
|
||||
const data = Object.assign({_type: 'Signal'}, signalCode);
|
||||
data.isRouteActive = true;
|
||||
this.$store.dispatch('map/updateMapDevices', data);
|
||||
}
|
||||
});
|
||||
this.clickNum++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
// 总取消
|
||||
const occupy = this.isTrainOccupy(selectType);
|
||||
if (occupy) {
|
||||
// 关闭信号
|
||||
this.signalCloseByLow(selectType);
|
||||
} else {
|
||||
// 取消进路
|
||||
this.cancelTrainRouteByLow(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.humanTrainRoute.button.operation: {
|
||||
// 总人解
|
||||
this.humanTrainRoute(selectType);
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.reopenSignal.button.operation: {
|
||||
// 信号重开
|
||||
if (selectType.greenOpen) {
|
||||
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
|
||||
} else {
|
||||
// 开放进路信号机因故关闭
|
||||
this.reopenSignalByRoute(selectType);
|
||||
// 开放非进路信号机因故关闭
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.guide.button.operation: {
|
||||
// 引导按钮
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Signal.setAutoInterlock.button.operation: {
|
||||
// 自动进路
|
||||
if (selectType.fleetMode != undefined) {
|
||||
if (selectType.fleetMode) {
|
||||
this.singalCancelPassModel(selectType);
|
||||
} else {
|
||||
this.singalPassModel(selectType);
|
||||
}
|
||||
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]没有已锁闭进路,不能设置联锁自动进路`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return routes;
|
||||
},
|
||||
isTrainOccupy(selectType) {
|
||||
const data = this.$store.getters['map/getApproachSectionByCode'](selectType.code);
|
||||
if (data && data.routeSectionList.length > 0) {
|
||||
let isTrainOccupy = false;
|
||||
data.routeSectionList.forEach(sectionCode=>{
|
||||
const section = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||
if (section && (section.ctOccupied || section.nctOccupied) ) {
|
||||
isTrainOccupy = isTrainOccupy || true;
|
||||
}
|
||||
});
|
||||
return isTrainOccupy;
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置进路
|
||||
// 排列进路
|
||||
arrangementRoute() {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -309,13 +251,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地设置进路
|
||||
setRoute(route) {
|
||||
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 取消进路
|
||||
cancelTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -324,27 +259,20 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地取消进路
|
||||
cancelTrainRouteByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地总人解
|
||||
humanTrainRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
// 信号封锁
|
||||
lock() {
|
||||
commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号重开操作
|
||||
reopenSignalByRoute(selectType) {
|
||||
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 信号解封
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 信号重开
|
||||
@ -363,13 +291,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地信号关灯
|
||||
signalCloseByLow(selectType) {
|
||||
commitOperate(menuOperate.Signal.signalClose, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -387,17 +308,19 @@ export default {
|
||||
});
|
||||
},
|
||||
// 设置通过模式
|
||||
singalPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
singalPassModel() {
|
||||
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消通过模式
|
||||
singalCancelPassModel(selectType) {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
singalCancelPassModel() {
|
||||
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routeControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询进路状态
|
||||
@ -408,28 +331,36 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取进路列表
|
||||
getRouteList(selectType) {
|
||||
const routes = [];
|
||||
this.routeList.forEach(elem => {
|
||||
if (elem.startSignalCode === selectType.code) {
|
||||
routes.push(elem);
|
||||
// 人工解锁进路(信号机取消引导)
|
||||
humanTrainRoute() {
|
||||
commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
|
||||
}
|
||||
});
|
||||
return routes;
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
operation: data.operation,
|
||||
over:true,
|
||||
cmdType:data.cmdType
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// 进路引导
|
||||
guide() {
|
||||
commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.routerCommand.doShow(operate, this.selected, '是否执行引导命令?');
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
|
@ -1,37 +1,35 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-cmd-control ref="stationCmdControl" />
|
||||
<station-human-control-all ref="stationHumanControlAll" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<station-cmd-control ref="stationCmdControl" pop-class="ningbo-01__systerm" />
|
||||
<station-human-control-all ref="stationHumanControlAll" pop-class="ningbo-01__systerm" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationCmdControl from './dialog/stationCmdControl';
|
||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||
import StationCmdControl from '@/jmapNew/theme/components/menus/dialog/stationCmdControl';
|
||||
import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'StationMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SetFault,
|
||||
StationCmdControl,
|
||||
StationHumanControlAll,
|
||||
SetFault,
|
||||
StationSetRouteControlAll,
|
||||
NoticeInfo
|
||||
},
|
||||
@ -51,49 +49,40 @@ export default {
|
||||
{
|
||||
label: '全站设置联锁自动触发',
|
||||
handler: this.setAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER,
|
||||
auth: { station: true, center: false }
|
||||
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '全站取消联锁自动触发',
|
||||
handler: this.cancelAutoTrigger,
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER,
|
||||
auth: { station: true, center: false }
|
||||
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
|
||||
},
|
||||
{
|
||||
label: '上电解锁',
|
||||
handler: this.powerUnLock,
|
||||
cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
}
|
||||
// 暂时没有该操作-------等后端后续添加
|
||||
// {
|
||||
// label: '上电解锁',
|
||||
// handler: this.powerUnLock,
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: true, center: false }
|
||||
// },
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: true, center: false }
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '所有进路自排关',
|
||||
handler: this.humanControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING,
|
||||
auth: { station: false, center: true }
|
||||
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '所有进路自排开',
|
||||
handler: this.atsAutoControlALL,
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING,
|
||||
auth: { station: false, center: true }
|
||||
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
|
||||
},
|
||||
{
|
||||
label: '执行关键操作测试',
|
||||
handler: this.execKeyOperationTest,
|
||||
cmdType: CMD.Station.CMD_STATION_KEY_OPERATION_TEST
|
||||
}
|
||||
// 暂时没有该操作-------等后端后续添加
|
||||
// {
|
||||
// label: '执行关键操作测试',
|
||||
// handler: this.execKeyOperationTest,
|
||||
// cmdType: CMD.Station.active,
|
||||
// auth: { station: false, center: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
@ -141,20 +130,10 @@ export default {
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
this.menu = [];
|
||||
if (this.selected.centralized) {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu, ...this.menuForce];
|
||||
}
|
||||
}
|
||||
|
||||
if (this.selected.centralized) {
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = [...this.menuForce];
|
||||
}
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
@ -187,92 +166,58 @@ export default {
|
||||
},
|
||||
// 全站设置联锁自动触发
|
||||
setAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.setAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.Station.setAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 全站取消联锁自动触发
|
||||
cancelAutoTrigger() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.cancelAutoTrigger.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
commitOperate(menuOperate.Station.cancelAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 上电解锁
|
||||
powerUnLock() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.powerUnLock.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.powerUnLock, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 执行关键操作测试
|
||||
execKeyOperationTest() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.execKeyOperationTest, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationCmdControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排关
|
||||
humanControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.humanControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationHumanControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 所有进路自排开
|
||||
atsAutoControlALL() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
commitOperate(menuOperate.Station.atsAutoControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
|
131
src/jmapNew/theme/race_01/menus/menuStationControl.vue
Normal file
131
src/jmapNew/theme/race_01/menus/menuStationControl.vue
Normal file
@ -0,0 +1,131 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-control ref="stationControl" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationControl from './dialog/stationControl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'StationControlMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
StationControl
|
||||
},
|
||||
// props: {
|
||||
// selected: {
|
||||
// type: Object,
|
||||
// default() {
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '请求站控',
|
||||
handler: this.setStationControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
{
|
||||
label: '请求遥控',
|
||||
handler: this.setCenterControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '请求站控',
|
||||
handler: this.setStationControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL
|
||||
},
|
||||
{
|
||||
label: '请求遥控',
|
||||
handler: this.setCenterControl,
|
||||
cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
this.getCurrentStateObject();
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
getCurrentStateObject() {
|
||||
this.selected = this.$store.getters['menuOperation/selected'];
|
||||
},
|
||||
setCenterControl() {
|
||||
// 请求中控(遥控)
|
||||
commitOperate(menuOperate.StationControl.requestCentralControl, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
setStationControl() {
|
||||
// 请求站控
|
||||
commitOperate(menuOperate.StationControl.requestStationControl, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,34 +1,32 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" :system-name="systemName" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<stand-run-level ref="standRunLevel" :system-name="systemName" />
|
||||
<stand-stop-time ref="standStopTime" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<stand-control ref="standControl" system-name="ningbo-01__systerm" />
|
||||
<stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
|
||||
<stand-detail ref="standDetail" pop-class="ningbo-01__systerm" />
|
||||
<stand-run-level ref="standRunLevel" system-name="ningbo-01__systerm" />
|
||||
<stand-stop-time ref="standStopTime" system-name="ningbo-01__systerm" />
|
||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
|
||||
import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import StandDetail from '@/jmapNew/theme/components/menus/dialog/standDetail';
|
||||
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
|
||||
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
|
||||
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
export default {
|
||||
name: 'StationStandMenu',
|
||||
@ -36,10 +34,10 @@ export default {
|
||||
PopMenu,
|
||||
StandControl,
|
||||
StandJumpStopControl,
|
||||
StandBulkBuckleTrain,
|
||||
StandDetail,
|
||||
StandRunLevel,
|
||||
NoticeInfo,
|
||||
StandBackStrategy,
|
||||
StandStopTime,
|
||||
SetFault
|
||||
},
|
||||
@ -54,13 +52,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
systemName:'beijing-01__systerm',
|
||||
menuNormal: {
|
||||
Local: [
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置扣车',
|
||||
label: '扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
@ -69,6 +64,43 @@ export default {
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: '查看站台信息',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '扣车',
|
||||
handler: this.setDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '取消扣车',
|
||||
handler: this.cancelDetainTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
{
|
||||
label: '批量扣车',
|
||||
handler: this.setBulkBuckleTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||
},
|
||||
{
|
||||
label: '批量取消扣车',
|
||||
handler: this.cancelBulkBuckleTrain,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
},
|
||||
{
|
||||
label: '提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType:CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
label: '设置跳停',
|
||||
handler: this.setJumpStop,
|
||||
@ -80,33 +112,27 @@ export default {
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
|
||||
},
|
||||
{
|
||||
label: '提前发车',
|
||||
handler: this.earlyDeparture,
|
||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '停站时间控制',
|
||||
label: '设置停站时间',
|
||||
handler: this.setStopTime,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||
},
|
||||
{
|
||||
label: '运行时间控制',
|
||||
label: '设置运行等级',
|
||||
handler: this.setRunLevel,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||
},
|
||||
{
|
||||
label: '变通策略管理',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||
label: '区间列车数量限制',
|
||||
handler: this.setDetainTrainAll,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
label: '取消区间列车数量限制',
|
||||
handler: this.cancelDetainTrainAll,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
|
||||
},
|
||||
{
|
||||
label: '站台信息',
|
||||
label: '查看站台信息',
|
||||
handler: this.detail,
|
||||
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
}
|
||||
@ -147,11 +173,6 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'StationStand') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -164,9 +185,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
@ -185,24 +203,6 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.MixinCommand.functionButton.button.operation: {
|
||||
// 扣车
|
||||
if (!selectType.stationHoldTrain || !selectType.centerHoldTrain) {
|
||||
this.setDetainTrainByLow(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.MixinCommand.totalCancel.button.operation: {
|
||||
if (selectType.stationHoldTrain || selectType.centerHoldTrain) {
|
||||
// 取消扣车
|
||||
this.cancleDetainTrainByLow(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
@ -219,20 +219,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 现地设置扣车
|
||||
setDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
/** 取消扣车 */
|
||||
cancleDetainTrainByLow(selectType) {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrain, {standCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 设置扣车
|
||||
setDetainTrain() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -249,22 +235,38 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 强制取消扣车
|
||||
// cancelDetainTrainForce() {
|
||||
// const operate = {
|
||||
// start: true,
|
||||
// code: this.selected.code,
|
||||
// type: MapDeviceType.StationStand.type,
|
||||
// label: MapDeviceType.StationStand.label,
|
||||
// operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation
|
||||
// };
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// this.$refs.standControl.doShow(operate, this.selected);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
// 区间列车数量限制
|
||||
setDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消区间列车数量限制
|
||||
cancelDetainTrainAll() {
|
||||
commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 批量扣车
|
||||
setBulkBuckleTrain() {
|
||||
commitOperate(menuOperate.StationStand.setBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 批量取消扣车
|
||||
cancelBulkBuckleTrain() {
|
||||
commitOperate(menuOperate.StationStand.cancelBulkBuckleTrain, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBulkBuckleTrain.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置跳停
|
||||
setJumpStop() {
|
||||
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
@ -281,7 +283,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 停站时间控制
|
||||
// 设置停站时间
|
||||
setStopTime() {
|
||||
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
@ -289,11 +291,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 运行时间控制
|
||||
// 设置运行等级
|
||||
setRunLevel() {
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected, []);
|
||||
this.$refs.standRunLevel.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -305,19 +307,11 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationStand.setBackStrategy, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 查询站台状态
|
||||
detail() {
|
||||
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.standDetail.doShow(operate, this.selected, []);
|
||||
this.$refs.standDetail.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
111
src/jmapNew/theme/race_01/menus/menuStationTurnBack.vue
Normal file
111
src/jmapNew/theme/race_01/menus/menuStationTurnBack.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<station-back-strategy ref="stationBackStrategy" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StationBackStrategy from './dialog/stationBackStrategy';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuStationTurnBack',
|
||||
components: {
|
||||
PopMenu,
|
||||
StationBackStrategy
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置折返策略',
|
||||
handler: this.setBackStrategy,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationTurnBack) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
this.menu = this.menuForce;
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 设置折返策略
|
||||
setBackStrategy() {
|
||||
commitOperate(menuOperate.StationControl.setBackStrategy, {stationCode: this.selected.stationCode}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.stationBackStrategy.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,39 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" pop-class="beijing-01__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="beijing-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="beijing-01__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="ningbo-01__systerm" />
|
||||
<section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<switch-hook-lock ref="switchHookLock" pop-class="ningbo-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import SectionUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
|
||||
import SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SwitchMenu',
|
||||
components: {
|
||||
PopMenu,
|
||||
SectionControl,
|
||||
SwitchControl,
|
||||
SectionUnLock,
|
||||
SpeedLimitControl,
|
||||
AlxeEffective,
|
||||
NoticeInfo,
|
||||
@ -53,51 +52,99 @@ export default {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
{
|
||||
label: '道岔单锁',
|
||||
handler: this.lock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
},
|
||||
{
|
||||
label: '道岔单解',
|
||||
handler: this.unlock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔封锁',
|
||||
handler: this.block,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||
},
|
||||
{
|
||||
label: '道岔解封',
|
||||
handler: this.unblock,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '轨道切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
label: '定操',
|
||||
handler: this.locate,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION
|
||||
},
|
||||
{
|
||||
label: '轨道激活',
|
||||
label: '反操',
|
||||
handler: this.reverse,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION
|
||||
},
|
||||
// {
|
||||
// label: '道岔单锁',
|
||||
// handler: this.lock,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||
// },
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
handler: this.active,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
handler: this.split,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
// {
|
||||
// label: '确认计轴有效',
|
||||
// handler: this.alxeEffective,
|
||||
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE,
|
||||
// auth: { station: false, center: true }
|
||||
// },
|
||||
{
|
||||
label: '确认计轴有效',
|
||||
handler: this.alxeEffective,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
},
|
||||
{
|
||||
label: '设置临时限速',
|
||||
handler: this.setSpeed,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '查看公里标',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED
|
||||
}
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '查看站场设备状态',
|
||||
// handler: this.undeveloped,
|
||||
// disabledCallback: MenuDisabledState.Switch.setSpeed,
|
||||
// auth: { station: false, center: true }
|
||||
// }
|
||||
]
|
||||
},
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
handler: this.setStoppage
|
||||
handler: this.setStoppage,
|
||||
cmdType: CMD.Fault.CMD_SET_FAULT
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
handler: this.cancelStoppage
|
||||
handler: this.cancelStoppage,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_FAULT
|
||||
},
|
||||
{
|
||||
label: '触发故障管理',
|
||||
@ -123,11 +170,6 @@ export default {
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
},
|
||||
'$store.state.menuOperation.selectedCount': function(val) {
|
||||
if (this.buttonOperation && this.$store.state.menuOperation.selected._type == 'Switch') {
|
||||
this.operationHandler(this.buttonOperation, this.$store.state.menuOperation.selected);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -140,10 +182,6 @@ export default {
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
@ -169,99 +207,52 @@ export default {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
operationHandler(buttonOperation, selectType) {
|
||||
switch (buttonOperation) {
|
||||
case OperationEvent.Switch.locate.button.operation: {
|
||||
// 道岔总定
|
||||
if (!selectType.normalPosition && selectType.reversePosition) {
|
||||
this.locate(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.reverse.button.operation: {
|
||||
// 道岔总反
|
||||
if (selectType.normalPosition && !selectType.reversePosition) {
|
||||
this.reverse(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.lock.button.operation: {
|
||||
// 道岔单锁
|
||||
if (!selectType.singleLock) {
|
||||
this.lock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.unlock.button.operation: {
|
||||
// 道岔解锁
|
||||
if (selectType.singleLock) {
|
||||
this.unlock(selectType);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OperationEvent.Switch.turnoutForce.menu.operation: {
|
||||
// 道岔强扳授权
|
||||
// this.switchTurnoutForce(selectType);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
// 定操定位
|
||||
locate() {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
// 定操反位
|
||||
reverse() {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔单锁
|
||||
lock(selectType) {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 道岔解锁
|
||||
unlock(selectType) {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
lock() {
|
||||
commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 现地道岔强扳
|
||||
switchTurnoutForce(selectType) {
|
||||
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
|
||||
// 道岔单解
|
||||
unlock() {
|
||||
commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, selectType);
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
},
|
||||
// 单操到定位
|
||||
locate(selectType) {
|
||||
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 道岔封锁
|
||||
block() {
|
||||
commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.switchControl.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 单操到反位
|
||||
reverse(selectType) {
|
||||
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{
|
||||
}).catch(error=>{
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
// 道岔解封
|
||||
unblock() {
|
||||
commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.sectionUnLock.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 区段切除
|
||||
@ -296,10 +287,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
@ -308,6 +295,26 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置故障
|
||||
setStoppage() {
|
||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消故障
|
||||
cancelStoppage() {
|
||||
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 道岔钩锁
|
||||
hookLock() {
|
||||
this.$refs.switchHookLock.doShow(this.selected);
|
||||
},
|
||||
triggerFaultManagement() {
|
||||
this.$store.dispatch('training/setTriggerFaultCount', this.selected);
|
||||
}
|
||||
|
@ -1,202 +0,0 @@
|
||||
<template>
|
||||
<div id="menuTool">
|
||||
<div class="nav">
|
||||
<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 v-if="isShowSystemTime" class="time" :time="time" :zoom="2" :width="180" :height="48" :fine="2" :top="6" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { prefixIntrger } from '@/utils/date';
|
||||
import SystemTime from '@/views/components/systemTime/index';
|
||||
import logo_ from '@/assets/logo_.png';
|
||||
|
||||
export default {
|
||||
name: 'MenuTool',
|
||||
components: {
|
||||
SystemTime
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
logoImg: logo_,
|
||||
time: '00:0000',
|
||||
tools: [
|
||||
{
|
||||
title: '服务器1',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '服务器2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '前置机2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '主调',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台1',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台2',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '调度台3',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '大屏',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '维护工作站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '运行图显示人工站',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '跳停',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '扣车',
|
||||
operate: '',
|
||||
src: '',
|
||||
click: this.undeveloped
|
||||
},
|
||||
{
|
||||
title: '列车报警',
|
||||
operate: '',
|
||||
src: logo_,
|
||||
click: this.undeveloped
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
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();
|
||||
},
|
||||
methods: {
|
||||
initTools() {
|
||||
this.tools = [];
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
$top: 30px;
|
||||
$width: 50px;
|
||||
$height: 50px;
|
||||
|
||||
#menuTool {
|
||||
z-index: 5;
|
||||
position: absolute;
|
||||
top: $top;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: block;
|
||||
height: $height;
|
||||
line-height: $height;
|
||||
color: #0000;
|
||||
background: #ECE9D8;
|
||||
border: 1px solid #B6BCCC !important;
|
||||
border-bottom: 2px solid #B6BCCC !important;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tool {
|
||||
background: #808080;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
float: left;
|
||||
height: $height - 2;
|
||||
width: $width + 15;
|
||||
margin: 1px;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
height: $height - 10;
|
||||
width: $width - 10;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
position: relative;
|
||||
float: right;
|
||||
text-align: center;
|
||||
margin: 1px 10px;
|
||||
height: $height - 4;
|
||||
width: $width - 4;
|
||||
}
|
||||
</style>
|
@ -1,18 +1,16 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<train-define ref="trainDefine" />
|
||||
<train-move ref="trainMove" />
|
||||
<train-edit ref="trainEdit" />
|
||||
<train-set-plan ref="trainSetPlan" />
|
||||
<train-move-evently ref="trainMoveEvently" />
|
||||
<train-delete-plan ref="trainDeletePlan" />
|
||||
<train-set-head ref="trainSetHead" />
|
||||
<train-set-work ref="trainSetWork" />
|
||||
<train-flag ref="trainFlag" />
|
||||
<set-fault ref="setFault" pop-class="beijing-01__systerm" />
|
||||
<trainSetWorkATP ref="trainSetWorkATP" />
|
||||
<SpeedLimit ref="speedLimit" pop-class="ningbo-01__systerm" />
|
||||
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -20,25 +18,21 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
import TrainEdit from './dialog/trainEdit';
|
||||
import TrainSetPlan from './dialog/trainSetPlan';
|
||||
import TrainMoveEvently from './dialog/trainMoveEvently';
|
||||
import TrainDeletePlan from './dialog/trainDeletePlan';
|
||||
import TrainSetHead from './dialog/trainSetHead';
|
||||
import TrainSetWork from './dialog/trainSetWork';
|
||||
import TrainFlag from './dialog/trainFlag';
|
||||
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
|
||||
import trainSetWorkATP from './dialog/trainSetWorkATP';
|
||||
import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
|
||||
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
@ -48,14 +42,12 @@ export default {
|
||||
TrainDelete,
|
||||
TrainDefine,
|
||||
TrainMove,
|
||||
TrainEdit,
|
||||
TrainSetPlan,
|
||||
TrainMoveEvently,
|
||||
TrainDeletePlan,
|
||||
TrainSetHead,
|
||||
TrainSetWork,
|
||||
TrainFlag,
|
||||
SetFault
|
||||
trainSetWorkATP,
|
||||
SetFault,
|
||||
SpeedLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
@ -71,161 +63,94 @@ export default {
|
||||
menuNormal: {
|
||||
Local: [
|
||||
// {
|
||||
// label: '定义车组号',
|
||||
// label: '设置车组号',
|
||||
// handler: this.addTrainId,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainId,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '添加计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.addPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '删除计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.deletePlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '平移计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.moveEventlyTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记重点列车',
|
||||
// handler: this.trainToFlag,
|
||||
// },
|
||||
// {
|
||||
// label: '取消标记重点列车',
|
||||
// handler: this.trainUnFlag,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// }
|
||||
{
|
||||
label: '设置计划车',
|
||||
handler: this.setPlanTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
},
|
||||
{
|
||||
label: '设置头码车',
|
||||
handler: this.setHeadTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
|
||||
},
|
||||
{
|
||||
label: '设置人工车',
|
||||
handler: this.setWorkTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
// {
|
||||
// label: '定义车组号',
|
||||
// handler: this.addTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '删除车组号',
|
||||
// handler: this.delTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '修改车组号',
|
||||
// handler: this.editTrainId,
|
||||
// },
|
||||
// {
|
||||
// label: '移动车组号',
|
||||
// handler: this.moveTrainId,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '添加计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.addPlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '删除计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.deletePlanTrain,
|
||||
// },
|
||||
// {
|
||||
// label: '平移计划车',
|
||||
// // handler: this.undeveloped,
|
||||
// handler: this.moveEventlyTrain,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记重点列车',
|
||||
// handler: this.trainToFlag,
|
||||
// },
|
||||
// {
|
||||
// label: '取消标记重点列车',
|
||||
// handler: this.trainUnFlag,
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '新建计划车',
|
||||
// handler: this.addPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '设置计划车',
|
||||
// handler: this.setPlanTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '设置头码车',
|
||||
// handler: this.setHeadTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '设置人工车',
|
||||
// handler: this.setWorkTrain,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '设乘务组号',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '标记ATP切除',
|
||||
// handler: this.setTrainATPdel,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '标记ATP恢复',
|
||||
// handler: this.setTrainATPRec,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// type: 'separator'
|
||||
// },
|
||||
// {
|
||||
// label: '旅行冲突列车',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// },
|
||||
// {
|
||||
// label: '列车信息',
|
||||
// handler: this.undeveloped,
|
||||
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
// }
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '设置车组号',
|
||||
handler: this.addTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '删除车组号',
|
||||
handler: this.delTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '移动车组号',
|
||||
handler: this.moveTrainId,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '设置计划车',
|
||||
handler: this.setPlanTrain,
|
||||
@ -240,6 +165,37 @@ export default {
|
||||
label: '设置人工车',
|
||||
handler: this.setWorkTrain,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||
},
|
||||
{
|
||||
label: '设乘务组号',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '标记ATP切除',
|
||||
handler: this.setTrainATPdel,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '标记ATP恢复',
|
||||
handler: this.setTrainATPRec,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: '旅行冲突列车',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
},
|
||||
{
|
||||
label: '列车信息',
|
||||
handler: this.undeveloped,
|
||||
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -262,18 +218,30 @@ export default {
|
||||
label: '进路闭塞法行车',
|
||||
handler: this.routeBlockRun
|
||||
},
|
||||
{
|
||||
label: '限速指令',
|
||||
handler: this.handleSpeedLimit
|
||||
},
|
||||
{
|
||||
label: '越引导信号行驶',
|
||||
handler: this.handleOverFuideSignal
|
||||
},
|
||||
{
|
||||
label: 'URM模式驾驶',
|
||||
handler: this.handleURMTrain
|
||||
},
|
||||
{
|
||||
label: '越红灯行驶',
|
||||
handler: this.handleOverEedLight
|
||||
},
|
||||
{
|
||||
label: '开/关门',
|
||||
handler: this.handleOpenCloseDoor
|
||||
}
|
||||
],
|
||||
menuSpeed: [
|
||||
{
|
||||
label: '确认运行至前方站',
|
||||
label: '限速行驶',
|
||||
handler: this.limitSpeed
|
||||
}
|
||||
]
|
||||
@ -307,12 +275,7 @@ export default {
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
// this.menu = trainMenuFiltration(this.menuNormal);
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
// if (this.operatemode === OperateMode.ADMIN) {
|
||||
// this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
|
||||
// }
|
||||
|
||||
// 故障模式菜单列表
|
||||
if (this.operatemode === OperateMode.FAULT) {
|
||||
if (!this.$store.state.scriptRecord.bgSet) {
|
||||
@ -327,8 +290,6 @@ export default {
|
||||
this.menu = [...this.menuDirective];
|
||||
}
|
||||
}
|
||||
|
||||
// this.menu = menuConvert(this.menu);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
@ -416,6 +377,34 @@ export default {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
handleURMTrain() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Drive_In_Urm_Mode',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
handleSpeedLimit() { // 限速指令
|
||||
this.$refs.speedLimit.doShow(this.selected);
|
||||
},
|
||||
// 操作列车 开/关门
|
||||
handleOpenCloseDoor() {
|
||||
const group = this.$route.query.group;
|
||||
const param = {
|
||||
commandType: 'Open_Or_Close_Door',
|
||||
targetMemberId: this.memberList.find(ele => ele.deviceCode == this.selected.code).id,
|
||||
params: {}
|
||||
};
|
||||
commitTrainSend(group, param).then(({valid, operate})=>{
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(error.message);
|
||||
});
|
||||
},
|
||||
// 限速行驶
|
||||
limitSpeed() {
|
||||
const operate = {
|
||||
@ -424,14 +413,14 @@ export default {
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.limitSpeed.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
undeveloped() {
|
||||
@ -442,62 +431,58 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 添加列车识别号
|
||||
// 设置车体号
|
||||
addTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDefine.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除列车识别号
|
||||
// 删除车组号
|
||||
delTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDelete.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 移动列车识别号
|
||||
// 移动车组号
|
||||
moveTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMove.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 修改列车识别号
|
||||
editTrainId() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainEdit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置计划车
|
||||
setPlanTrain() {
|
||||
const operate = {
|
||||
@ -513,34 +498,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 平移计划车
|
||||
moveEventlyTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.moveEventlyTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainMoveEvently.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 删除计划车
|
||||
deletePlanTrain() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.deletePlanTrainId.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainDeletePlan.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置头码车
|
||||
setHeadTrain() {
|
||||
const operate = {
|
||||
@ -573,31 +530,37 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 标记重点车
|
||||
trainToFlag() {
|
||||
// 标记ATP切除
|
||||
setTrainATPdel() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainFlag.doShow(operate, this.selected);
|
||||
this.$refs.trainSetWorkATP.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 取消标记重点车
|
||||
trainUnFlag() {
|
||||
// 标记ATP恢复
|
||||
setTrainATPRec() {
|
||||
const operate = {
|
||||
start: true,
|
||||
code: this.selected.code,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
param: {
|
||||
sectionCode: this.$store.state.map.trainWindowSectionCode
|
||||
}
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.trainFlag.doShow(operate, this.selected);
|
||||
this.$refs.trainSetWorkATP.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm alarm-detail"
|
||||
class="ningbo-01__systerm alarm-detail"
|
||||
:title="level+'级告警详细信息'"
|
||||
:visible.sync="show"
|
||||
width="760px"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm cmd-notice"
|
||||
class="ningbo-01__systerm cmd-notice"
|
||||
title="操作命令提示"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -95,9 +95,10 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.notice.operation
|
||||
};
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -3,6 +3,8 @@ import deviceType from '../../constant/deviceType';
|
||||
class Model {
|
||||
constructor() {
|
||||
this.screenLine = 3;
|
||||
this.screenSplit = ['5165', '10303'];
|
||||
this.screenDifference = 180;
|
||||
// 公共字段部分默认初始值
|
||||
this['public'] = {};
|
||||
this['public'][deviceType.Signal] = {
|
||||
@ -37,10 +39,19 @@ class Model {
|
||||
this['private'][deviceType.Train] = {
|
||||
};
|
||||
this['private'][deviceType.TrainWindow] = {
|
||||
trainWindowShow: true
|
||||
trainWindowShow: false
|
||||
};
|
||||
}
|
||||
|
||||
handleScreenProps(viewModel) { // 大屏隐藏元素
|
||||
const model = viewModel.model;
|
||||
if (model._type == deviceType.OutFrame ||
|
||||
model._type == deviceType.Text ||
|
||||
model._type == deviceType.AutoTurnBack) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
initPublicProps(model) {
|
||||
if (model) {
|
||||
var modelInitial = this.public[model._type];
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -93,8 +93,6 @@ const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
|
||||
const BigScreen = () => import('@/views/designPlatform/bigScreen');
|
||||
const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
|
||||
|
||||
// const DesignPlatformUser = () => import('@/views/designUser/index');
|
||||
|
||||
const Package = () => import('@/views/package/index');
|
||||
|
||||
const PublishMap = () => import('@/views/publish/publishMap/index');
|
||||
|
Loading…
Reference in New Issue
Block a user