竞赛操作方式 由北京线路转换为宁波线路

This commit is contained in:
joylink_cuiweidong 2020-10-26 10:21:11 +08:00
parent 620d73bf54
commit f456e71a95
60 changed files with 4029 additions and 4751 deletions

View File

@ -1,18 +1,8 @@
<template> <template>
<el-dialog <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">
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"
>
<div style="padding: 10px 20px;border: 1px solid lightgray;"> <div style="padding: 10px 20px;border: 1px solid lightgray;">
<span class="base-label">准备</span> <span class="base-label">准备</span>
<div style="margin-top: 10px"> <div style="margin-top: -10px">
<el-row type="flex" justify="left"> <el-row type="flex" justify="left">
<el-col :span="9">车站</el-col> <el-col :span="9">车站</el-col>
<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-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
</el-col> </el-col>
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认 <el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px"> <div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
<span class="base-label">确认</span> <span class="base-label">确认</span>
<div> <div style="margin-top: -10px">
<el-row type="flex" justify="left"> <el-row type="flex" justify="left">
<el-col :span="9">车站</el-col> <el-col :span="9">车站</el-col>
<el-col :span="9">轨道/计轴</el-col> <el-col :span="9">轨道/计轴</el-col>
@ -42,35 +31,27 @@
<el-col :span="9"> <el-col :span="9">
<el-select <el-select
:id="domIdChoose1" :id="domIdChoose1"
v-model="model.confirmStationName" ref="chooseStation"
v-model="model.confirmStationCode"
filterable filterable
size="mini" size="mini"
:disabled="type==='text'" :disabled="type==='text'"
@change="stationSelectChange" @change="stationSelectChange"
> >
<el-option <el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" :value="option.code" />
v-for="(option,index) in filterStationList"
:key="index"
:label="option.name"
:value="option.name"
/>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-select <el-select
:id="domIdChoose2" :id="domIdChoose2"
v-model="model.confirmSectionName" ref="chooseSection"
v-model="model.confirmSectionCode"
filterable filterable
size="mini" size="mini"
:disabled="type==='text'" :disabled="type==='text'"
@change="sectionSelectChange" @change="sectionSelectChange"
> >
<el-option <el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.code" />
v-for="(option,index) in randomSectionList"
:key="index"
:label="option.name"
:value="option.name"
/>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
@ -85,7 +66,7 @@
</el-row> </el-row>
</div> </div>
</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="6" :offset="1">操作倒计时</el-col>
<el-col :span="16"> <el-col :span="16">
<el-input v-model="model.time" size="mini" :readonly="true" /> <el-input v-model="model.time" size="mini" :readonly="true" />
@ -96,7 +77,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="1" :span="23"> <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-col>
</el-row> </el-row>
<el-row class="botton-group" style="margin-top:20px"> <el-row class="botton-group" style="margin-top:20px">
@ -104,24 +85,21 @@
<el-button :id="domIdCancel" @click="cancel">关闭</el-button> <el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<popup-alarm ref="popupAlarm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; 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 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 CMD from '@/scripts/cmdPlugin/CommandEnum';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default { export default {
name: 'AlxeEffective', name: 'AlxeEffective',
components: { components: {
NoticeInfo, NoticeInfo
PopupAlarm
}, },
data() { data() {
return { return {
@ -129,14 +107,15 @@ export default {
loading: false, loading: false,
type: 'text', type: 'text',
timeout: 1000, timeout: 1000,
timenum: 30,
stepNum: 0, stepNum: 0,
task: null, task: null,
model: { model: {
stationName: '', stationName: '',
sectionName: '', sectionName: '',
confirmStationName: '', stationCode: '',
confirmSectionName: '', sectionCode: '',
confirmStationCode: '',
confirmSectionCode: '',
status: '', status: '',
time: 0 time: 0
}, },
@ -147,16 +126,17 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', ['stationList', 'sectionList']),
'stationList',
'sectionList'
]),
filterStationList() { filterStationList() {
const list = []; const list = [];
if (this.stationList) { if (this.stationList) {
this.stationList.forEach(elem => { this.stationList.forEach(elem => {
if (list.findIndex(it => { return it.name == elem.name; }) < 0) { if (
list.push({ name: elem.name }); 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 : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
title() { title() {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return '确认计轴恢复工作'; return '确认计轴恢复工作';
} }
return '';
}
}, },
watch: { watch: {
'model.sectionName': function (name) { '$store.state.map.keyboardEnterCount': function (val) {
const index = Math.floor(Math.random(1) * 5); if (this.show) {
for (var i = 0; i < 5; i++) { if (this.type !== 'password') {
if (i == index) { this.commitOnce();
this.randomSectionList.push({ name }); } else if (this.type !== 'text') {
} else { this.commit();
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--;
}
} }
} }
} }
@ -256,35 +222,31 @@ export default {
this.status = ''; this.status = '';
this.model.stationName = ''; this.model.stationName = '';
this.model.sectionName = ''; this.model.sectionName = '';
this.model.confirmStationName = ''; this.model.confirmStationCode = '';
this.model.confirmSectionName = ''; this.model.confirmSectionCode = '';
this.model.sectionCode = '';
this.model.stationCode = '';
if (selected) { if (selected) {
this.model.sectionCode = selected.code;
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.type == '03') {
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
this.model.sectionName = section.name;
}
} else {
const hasParentCode = (this.selected.type == '02'); const hasParentCode = (this.selected.type == '02');
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section && hasParentCode) { if (section && hasParentCode) {
this.model.sectionName = section.name; this.model.sectionName = `${section.name}-${selected.name}(${selected.code})`;
this.model.sectionName = `${section.name}-${selected.name}`;
} else { } else {
this.model.sectionName = `${selected.name}`; this.model.sectionName = `${selected.name}(${selected.code})`;
}
} }
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) { } 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) { 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); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.model.stationName = station.name; this.model.stationName = station.name;
this.model.stationCode = station.code;
} }
} }
@ -301,6 +263,19 @@ export default {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); 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() { waitSelectEvent() {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {
this.model.time -= 1; this.model.time -= 1;
@ -312,7 +287,6 @@ export default {
commitOnce() { commitOnce() {
this.stepNum = 1; this.stepNum = 1;
const operate = { const operate = {
type: this.operate.type,
operation: '' operation: ''
}; };
@ -326,23 +300,17 @@ export default {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.type = 'password'; this.type = 'password';
this.model.time = this.timenum; this.model.time = 60;
this.task = setInterval(this.waitSelectEvent, this.timeout); this.task = setInterval(this.waitSelectEvent, this.timeout);
} }
}); });
}, },
stationSelectChange(val) { stationSelectChange(code) {
if (this.model.confirmStationName === this.model.stationName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
const operate = { const operate = {
type: this.operate.type,
operation: '', operation: '',
val: val val: code
}; };
this.getSectionList(code);
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.choose1.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('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.chooseStation.blur();
}); });
}, },
sectionSelectChange(val) { sectionSelectChange(code) {
if (this.model.confirmSectionName === this.model.sectionName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
const operate = { const operate = {
type: this.operate.type,
operation: '', operation: '',
val: val val: code
}; };
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { 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('training/nextNew', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.chooseSection.blur();
}); });
}, },
/** 确认计轴恢复工作*/ /** 确认计轴恢复工作*/
commit() { commit() {
const operate = { const operate = {
over: true, over: true,
val: this.selected.code, operation: '',
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE cmdType: ''
}; };
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.confirm2.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) { } else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation; operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
operate.cmdType = CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE;
} }
this.model.status = ''; this.model.status = '';
if (this.model.stationName == this.model.confirmStationName && if (this.model.stationCode == this.model.confirmStationCode && this.model.sectionCode == this.model.confirmSectionCode) {
this.model.sectionName == this.model.confirmSectionName) {
this.stepNum = 3; this.stepNum = 3;
this.loading = true; this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.type = 'text'; this.type = 'text';
this.stopTask(); 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.loading = false;
this.$refs.noticeInfo.doShow(operate, error.message); this.doClose();
this.$refs.noticeInfo.doShow();
}); });
} else { } else {
if (this.model.stationName != this.model.confirmStationName) { if (this.model.stationCode != this.model.confirmStationCode) {
this.model.status = '车站选择错误'; this.model.status = '车站选择错误';
} else if (this.model.sectionName != this.model.confirmSectionName) { } else if (
this.model.sectionCode != this.model.confirmSectionCode
) {
this.model.status = '区段选择错误'; this.model.status = '区段选择错误';
} }
} }
}, },
cancel() { cancel() {
const operate = { const operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store
.dispatch('training/nextNew', operate)
.then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { })
.catch(() => {
this.doClose(); this.doClose();
}); });
} }
} }
}; };
</script> </script>
<style> <style rel="stylesheet/scss" lang="scss" scoped>
.alxe-effective .context { .alxe-effective .context {
height: 80px !important; height: 80px !important;
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm confirm-control" class="ningbo-01__systerm confirm-control"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -12,8 +12,8 @@
append-to-body append-to-body
> >
<div class="context"> <div class="context">
<template v-for="message in messages"> <template v-for="(message, index) in messages">
<span :key="message">{{ message }}</span> <span :key="index">{{ message }}</span>
</template> </template>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -24,14 +24,14 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; 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 { export default {
name: 'ConfirmControl', name: 'ConfirmControl',
@ -54,25 +54,24 @@ export default {
title() { title() {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) { if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯'; return '信号关灯';
} else { } else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return ''; return '设置折返策略';
} }
return '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) { if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/ /** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId; return OperationEvent.Signal.signalClose.confirm.domId;
} else { } else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return ''; /** 设置折返策略*/
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
} }
} else {
return ''; return '';
} }
}
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
@ -102,27 +101,18 @@ export default {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) { if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/ /** 信号关灯*/
this.signalClose(); this.signalClose();
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
this.setBackStrategy();
} }
}, },
// //
signalClose() { signalClose() {
const operate = { this.sendCommand(menuOperate.Signal.signalClose);
over: true, },
operation: OperationEvent.Signal.signalClose.confirm.operation, //
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL setBackStrategy() {
}; this.sendCommand(menuOperate.StationStand.setBackStrategy);
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]);
});
}, },
cancel() { cancel() {
const operate = { const operate = {
@ -137,10 +127,22 @@ export default {
}).catch(() => { }).catch(() => {
this.doClose(); 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> </script>
<style> <style>
.confirm-control .context { .confirm-control .context {

View File

@ -1,47 +1,41 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm station-human-control-all" class="ningbo-01__systerm route-unlock-confirm"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="500px"
:before-close="doClose" :before-close="doClose"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
append-to-body append-to-body
> >
<div class="context"> <div style="height: 60px; padding-left: 20px">
<span>{{ title }}</span> <span>{{ stationName }}{{ signalName }}信号机信号解锁确认下达吗</span>
</div> </div>
<el-row justify="center" class="button-group"> <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-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="10" :offset="2">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; 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 { export default {
name: 'StationHumanControlAll', name: 'RouteUnlockConfirm',
components: {
NoticeInfo
},
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
selected: null, signalName: '',
operation: null stationName: ''
}; };
}, },
computed: { computed: {
@ -49,13 +43,13 @@ export default {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
return '全集中站进路交人工控'; return '信号解封';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : ''; return this.dialogShow ? OperationEvent.Signal.unlock.confirm.domId : '';
} }
}, },
mounted() { mounted() {
@ -65,12 +59,17 @@ export default {
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.stationName = '';
if (!this.dialogShow) { this.signalName = '';
this.loading = false; if (selected) {
this.operation = operate.operation; 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.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
@ -80,36 +79,37 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
}, },
commit() { commit() {
const operate = { const operate = {
send: true, type: MapDeviceType.Signal.type,
type: MapDeviceType.Station.type, operation: OperationEvent.Signal.unlock.confirm.operation
label: MapDeviceType.Station.label,
operation: OperationEvent.Station.humanControlALL.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.$emit('setOperate', { step: 1, success: true });
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.$emit('setOperate', { step: 0, success: false });
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate);
}); });
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Station.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.$emit('setOperate', { step: 0, success: false });
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(() => {
@ -121,7 +121,7 @@ export default {
</script> </script>
<style> <style>
.station-human-control-all .context { .route-unlock-confirm .context {
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }

View File

@ -1,12 +1,22 @@
<template> <template>
<el-dialog class="beijing-01__systerm confirm-control-speed" :title="title" :visible.sync="show" width="340px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> 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"> <div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span> <span style="font-size: 18px">{{ message }}</span>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="11"> <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>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-button @click="doClose"> </el-button> <el-button @click="doClose"> </el-button>
@ -16,7 +26,7 @@
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; // import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
export default { export default {
name: 'ConfirmTip', name: 'ConfirmTip',
@ -24,17 +34,15 @@
return { return {
dialogShow: false, dialogShow: false,
message: '', message: '',
confirmId: '', confirmId: ''
} };
}, },
computed: { computed: {
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
if (this.dialogShow) { return '提示';
return "提示";
}
} }
}, },
mounted() { mounted() {
@ -53,7 +61,7 @@
this.dialogShow = false; this.dialogShow = false;
} }
} }
} };
</script> </script>
<style scoped> <style scoped>
@ -61,7 +69,7 @@
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
.beijing-01__systerm .el-dialog .el-button{ .ningbo-01__systerm .el-dialog .el-button{
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }

View File

@ -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>

View File

@ -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"> &lt; </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>

View File

@ -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>

View File

@ -1,15 +1,5 @@
<template> <template>
<el-dialog <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">
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-row class="header"> <el-row class="header">
<el-col :span="11"><span>集中站</span></el-col> <el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><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-button class="expand" @click="expandPath">展开进路预览</el-button> -->
</el-col> </el-col>
</el-row> </el-row>
<el-table <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">
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-column :id="domIdChoose" prop="name" style="margin-left:30px" /> <el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />
</el-table> </el-table>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button <el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>
:id="domIdConfirm"
type="primary"
:loading="loading"
:disabled="commitDisabled"
@click="commit"
>确定</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { deepAssign } from '@/utils/index';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; 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 { export default {
name: 'RouteSelection', name: 'RouteSelection',
@ -90,6 +64,9 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters('map', [
'overlapData'
]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
@ -113,28 +90,19 @@ export default {
return disabled; return disabled;
} }
}, },
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.commitDisabled) {
this.commit();
}
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); });
}, },
methods: { 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() { expandPath() {
console.log('展开进路预览'); console.log('展开进路预览');
}, },
@ -151,8 +119,14 @@ export default {
this.stationName = station.name; 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.operation = operate.operation;
} }
this.dialogShow = true; this.dialogShow = true;
@ -186,7 +160,7 @@ export default {
this.row.canSetting = true; this.row.canSetting = true;
this.restoreBeforeDevices(); this.restoreBeforeDevices();
const containSectionList = []; const containSectionList = [];
if (row.canSetting) { if (!row.setting) {
// //
if (row.routeSectionList && row.routeSectionList.length) { 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.$store.dispatch('training/updateMapState', [...containSectionList]);
this.beforeSectionList = containSectionList || []; this.beforeSectionList = containSectionList || [];
@ -219,6 +211,8 @@ export default {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}); });
} else {
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
} }
} }
}, },
@ -241,6 +235,7 @@ export default {
const operate = { const operate = {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();

View 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>

View 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>

View 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>

View File

@ -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>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm stand-run-level" class="ningbo-01__systerm stand-run-level"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="320px" width="320px"
@ -26,7 +26,7 @@
:cell-style="tableStyle" :cell-style="tableStyle"
style="width: 100%; margin-top:10px" style="width: 100%; margin-top:10px"
size="mini" size="mini"
height="120" height="180"
highlight-current-row highlight-current-row
:show-header="false" :show-header="false"
@row-click="clickEvent" @row-click="clickEvent"
@ -42,15 +42,12 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<confirm-control ref="confirmControl" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -58,37 +55,18 @@ import { mapGetters } from 'vuex';
export default { export default {
name: 'StandBackStrategy', name: 'StandBackStrategy',
components: { components: {
ConfirmControl,
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
tempData: [], strategyList: [],
strategyList: [
{
value: '01',
label: '无折返'
},
{
value: '02',
label: '无人折返'
},
{
value: '03',
label: '自动换端'
},
{
value: '04',
label: '关闭'
}
],
stationName: '', stationName: '',
stationStrategy: '', stationStrategy: '',
selection: [], selection: [],
isConfirm: false, isConfirm: false,
strategy: '', strategyId: '',
tableStyle: { tableStyle: {
'border-bottom': 'none' 'border-bottom': 'none'
} }
@ -105,13 +83,20 @@ export default {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : ''; return this.dialogShow ? OperationEvent.Station.setBackStrategy.menu.domId : '';
}, },
domIdChoose() { domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : ''; return this.dialogShow ? OperationEvent.Station.setBackStrategy.choose.domId : '';
}, },
title() { title() {
return '变通策略管理'; return '策略选择';
}
},
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.loading && this.isConfirm) {
this.commit();
}
} }
}, },
mounted() { mounted() {
@ -120,31 +105,13 @@ export default {
}); });
}, },
methods: { methods: {
loadInitData(selected, opts) { doShow(operate, selected) {
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) {
this.selected = selected; this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.stationName = ''; const name = selected.optionList.find(ele => ele.id == selected.tbStrategyId).label;
this.stationStrategy = ''; this.stationName = selected.name || '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) { this.stationStrategy = selected.tbStrategyId ? name : '无策略折返'; //
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); this.strategyList = selected.optionList; //
if (station) {
this.stationName = station.name;
this.strategyList.forEach(item => {
if (item.value == opts.reentryStrategy) {
this.stationStrategy = item.label;
}
});
}
}
this.loadInitData(selected, opts);
} }
this.dialogShow = true; this.dialogShow = true;
@ -154,11 +121,11 @@ export default {
}, },
clickEvent(row, column, event) { clickEvent(row, column, event) {
const operate = { 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.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
@ -183,20 +150,19 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
}, },
commit() { commit() {
if (this.isConfirm) { if (this.isConfirm) {
this.loading = true; 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; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch((error) => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.noticeInfo.doShow();
}); });
} else { } else {
this.doClose(); this.doClose();

View File

@ -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>

View 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>

View File

@ -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>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm train-define" class="ningbo-01__systerm train-define"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -38,15 +38,15 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default { export default {
name: 'TrainDefine', name: 'TrainDefine',
@ -83,7 +83,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
}, },
title() { title() {
return '定义车组号'; return '设置车体号';
} }
}, },
mounted() { mounted() {
@ -147,7 +147,7 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
cancel() { cancel() {
@ -170,7 +170,7 @@ export default {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm stand-stop-time" class="ningbo-01__systerm stand-stop-time"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="320px" width="320px"
@ -24,7 +24,7 @@
</el-col> </el-col>
</el-row> </el-row>
<confirm-control ref="confirmControl" /> <confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
@ -32,9 +32,9 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
// import { getPublishMapTrainNos } from '@/api/runplan'; // import { getPublishMapTrainNos } from '@/api/runplan';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default { export default {
name: 'TrainDelete', name: 'TrainDelete',
@ -145,7 +145,7 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
} else { } else {
return false; return false;

View File

@ -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">&emsp; :</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>

View File

@ -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>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm train-move" class="ningbo-01__systerm train-move"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -38,15 +38,15 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default { export default {
name: 'TrainMove', name: 'TrainMove',
@ -83,7 +83,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
}, },
title() { title() {
return '移车组号'; return '车组号';
} }
}, },
mounted() { mounted() {
@ -147,7 +147,7 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
cancel() { cancel() {
@ -165,13 +165,13 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, 0.3);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View File

@ -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">&emsp; :</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>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm train-set-head" class="ningbo-01__systerm train-set-head"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -40,7 +40,7 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm train-set-plan" class="ningbo-01__systerm train-set-plan"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -40,7 +40,7 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm train-set-work" class="ningbo-01__systerm train-set-work"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="320px" width="320px"
@ -24,7 +24,7 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>

View File

@ -1,33 +1,29 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm train-edit" class="ningbo-01__systerm train-set-work"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="360px" width="320px"
:before-close="doClose" :before-close="doClose"
:z-index="2000" :z-index="2000"
:modal="false" :modal="false"
:close-on-click-modal="false" :close-on-click-modal="false"
> >
<el-row> <el-row>
<el-col :span="12">新车组号</el-col> <el-col :span="6">车组号:</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="18">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" /> <el-input :id="domIdInput" v-model="addModel.groupNumber" size="mini" @change="inputGroupNumber" />
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12">车站</el-col> <el-col :span="11">
<el-col :span="11" :offset="1">车次窗</el-col> <el-radio v-model="radio" label="01">标记ATP切除</el-radio>
</el-row>
<el-row>
<el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true" />
</el-col> </el-col>
<el-col :span="11" :offset="1"> <el-col :span="11" :offset="2">
<el-input v-model="addModel.trainWindowCode" :disabled="true" /> <el-radio v-model="radio" label="02">标记APT恢复</el-radio>
</el-col> </el-col>
</el-row> </el-row>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -38,18 +34,18 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
export default { export default {
name: 'TrainEdit', name: 'TrainSetWork',
components: { components: {
NoticeInfo NoticeInfo
}, },
@ -58,10 +54,9 @@ export default {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: '' groupNumber: ''
}, },
radio: '01',
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
@ -83,7 +78,7 @@ export default {
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
}, },
title() { title() {
return '修改计划车'; return 'ATP切除功能';
} }
}, },
mounted() { mounted() {
@ -121,7 +116,7 @@ export default {
const operate = { const operate = {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.input.operation, operation: OperationEvent.Train.editTrainId.input.operation,
val: this.addModel.groupNumber val: this.addModel.tripNumber
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -135,7 +130,7 @@ export default {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation, operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber val: this.addModel.tripNumber
}; };
this.loading = true; this.loading = true;
@ -147,7 +142,7 @@ export default {
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
cancel() { cancel() {
@ -165,13 +160,13 @@ export default {
} }
}; };
</script> </script>
<style scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
margin: 10px margin: 10px
} }
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); // background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;
top: -18px; top: -18px;

View 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>

View File

@ -2,17 +2,20 @@
<div class="menus" :style="{width: width + 'px'}"> <div class="menus" :style="{width: width + 'px'}">
<menu-cancel ref="menuCancel" /> <menu-cancel ref="menuCancel" />
<menu-bar v-show="isShowBar" ref="menuBar" :selected="selected" /> <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-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-switch ref="menuSwitch" :selected="selected" />
<menu-signal ref="menuSignal" :selected="selected" /> <menu-signal ref="menuSignal" :selected="selected" />
<menu-section ref="menuSection" :selected="selected" /> <menu-section ref="menuSection" :selected="selected" />
<menu-train ref="menuTrain" :selected="selected" /> <menu-train ref="menuTrain" :selected="selected" />
<menu-station ref="menuStation" :selected="selected" /> <menu-station ref="menuStation" :selected="selected" />
<menu-limit ref="menuLimit" :selected="selected" /> <menu-limit ref="menuLimit" :selected="selected" />
<passive-alarm ref="passiveAlarm" /> <!--<passive-alarm ref="passiveAlarm" />-->
<passive-contorl ref="passiveControl" pop-class="beijing-01__systerm" /> <passive-contorl ref="passiveControl" pop-class="ningbo-01__systerm" />
<passive-Timeout ref="passiveTimeout" /> <!--<passive-Timeout ref="passiveTimeout" />-->
</div> </div>
</template> </template>
@ -20,34 +23,40 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import MenuCancel from './menuCancel'; import MenuCancel from './menuCancel';
import MenuSignal from './menuSignal'; import MenuSignal from './menuSignal';
import MenuButton from './menuButton'; import MenuAxleReset from './menuAxleReset';
import MenuAutoTrunRoute from './menuAutoTrunRoute';
import MenuStationStand from './menuStationStand'; import MenuStationStand from './menuStationStand';
import MenuStationControl from './menuStationControl';
import MenuSwitch from './menuSwitch'; import MenuSwitch from './menuSwitch';
import MenuSection from './menuSection'; import MenuSection from './menuSection';
import MenuTrain from './menuTrain'; import MenuTrain from './menuTrain';
import MenuStation from './menuStation'; import MenuStation from './menuStation';
import MenuBar from './menuBar'; import MenuBar from './menuBar';
import MenuLimit from './menuLimit'; 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 PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout'; // import PassiveTimeout from './passiveDialog/timeout';
export default { export default {
name: 'Menus', name: 'Menus',
components: { components: {
MenuBar, MenuBar,
MenuButton, MenuAxleReset,
MenuAutoTrunRoute,
MenuCancel, MenuCancel,
MenuSignal, MenuSignal,
MenuSwitch, MenuSwitch,
MenuSection, MenuSection,
MenuStationStand, MenuStationStand,
MenuStationControl,
MenuStation, MenuStation,
MenuTrain, MenuTrain,
MenuStationTurnBack,
MenuLimit, MenuLimit,
PassiveAlarm, // PassiveAlarm,
PassiveContorl, PassiveContorl
PassiveTimeout // PassiveTimeout
}, },
props: { props: {
selected: { selected: {
@ -73,13 +82,15 @@ export default {
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('config/updateMenuBar'); this.$store.dispatch('config/updateMenuBar');
this.$refs['menuSignal'].setRouteSignal();
}); });
} }
}; };
</script> </script>
<style> <style>
.menus{
height:0px;
}
.menus .pop-menu { .menus .pop-menu {
background: #F0F0F0; background: #F0F0F0;
} }
@ -92,29 +103,29 @@ export default {
color: #B4B3B8; color: #B4B3B8;
} }
.beijing-01__systerm { .ningbo-01__systerm {
overflow: hidden !important; overflow: hidden !important;
} }
.beijing-01__systerm .el-dialog { .ningbo-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3); 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; border-radius: 6px;
color: #000; color: #000;
font-size: 14px; font-size: 14px;
} }
.beijing-01__systerm .el-dialog .el-dialog__header { .ningbo-01__systerm .el-dialog .el-dialog__header {
padding: 10px; padding: 10px;
height: 26px; height: 26px;
} }
.beijing-01__systerm .el-dialog .el-dialog__footer { .ningbo-01__systerm .el-dialog .el-dialog__footer {
background: #F0F0F0; background: #F0F0F0;
opacity: 1; opacity: 1;
} }
.beijing-01__systerm .el-dialog .el-dialog__body { .ningbo-01__systerm .el-dialog .el-dialog__body {
padding: 10px; padding: 10px;
margin: 5px; margin: 5px;
border: 2px solid rgba(120, 121, 123, 0.5); border: 2px solid rgba(120, 121, 123, 0.5);
@ -123,7 +134,7 @@ export default {
opacity: 1; opacity: 1;
} }
.beijing-01__systerm .el-dialog .el-dialog__title { .ningbo-01__systerm .el-dialog .el-dialog__title {
position: absolute; position: absolute;
top: 6px; top: 6px;
color: #000; color: #000;
@ -133,7 +144,7 @@ export default {
line-height: 20px line-height: 20px
} }
.beijing-01__systerm .el-dialog .el-dialog__title::before { .ningbo-01__systerm .el-dialog .el-dialog__title::before {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
@ -145,7 +156,7 @@ export default {
z-index: -1; 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); background: linear-gradient(#CD98A0, #C27D6E, #B63022, #C68770);
border: 1px solid #fff; border: 1px solid #fff;
border-radius: 4px; border-radius: 4px;
@ -154,15 +165,15 @@ export default {
line-height: 18px; 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; 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; color: #fff;
} }
.beijing-01__systerm .el-dialog .el-button { .ningbo-01__systerm .el-dialog .el-button {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
padding: 0px; padding: 0px;
@ -173,31 +184,31 @@ export default {
background: #F0F0F0; background: #F0F0F0;
} }
.beijing-01__systerm .el-dialog .expand { .ningbo-01__systerm .el-dialog .expand {
width: 120px; width: 120px;
} }
.beijing-01__systerm .el-dialog .el-button:focus span { .ningbo-01__systerm .el-dialog .el-button:focus span {
border: 1px dashed gray; border: 1px dashed gray;
} }
.beijing-01__systerm .el-dialog .el-button:active { .ningbo-01__systerm .el-dialog .el-button:active {
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
} }
.beijing-01__systerm .el-dialog .el-button:disabled { .ningbo-01__systerm .el-dialog .el-button:disabled {
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
} }
.beijing-01__systerm .el-dialog .el-button:disabled span { .ningbo-01__systerm .el-dialog .el-button:disabled span {
border: 0px; border: 0px;
} }
.beijing-01__systerm .el-dialog .el-input { .ningbo-01__systerm .el-dialog .el-input {
border: 2px inset #E9E9E9; 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; color: #000;
background: #fff !important; background: #fff !important;
border: 0px; border: 0px;
@ -205,16 +216,16 @@ export default {
box-sizing: border-box; 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; background: #F0F0F0 !important;
} }
.beijing-01__systerm .el-dialog .el-textarea { .ningbo-01__systerm .el-dialog .el-textarea {
border: 2px inset #E9E9E9; border: 2px inset #E9E9E9;
border-radius: 0px; 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; color: #000;
background: #fff !important; background: #fff !important;
border: 0px; border: 0px;
@ -222,24 +233,24 @@ export default {
box-sizing: border-box; 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; 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; background: #EBEADB !important;
} }
.beijing-01__systerm .el-dialog .el-table { .ningbo-01__systerm .el-dialog .el-table {
border: 2px inset #E9E9E9; border: 2px inset #E9E9E9;
color: #000 !important; color: #000 !important;
} }
.beijing-01__systerm .el-dialog .el-table .cell { .ningbo-01__systerm .el-dialog .el-table .cell {
line-height: unset !important; 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; background: #F0F0F0 !important;
border-right: 1px solid #BDBDBD !important; border-right: 1px solid #BDBDBD !important;
border-bottom: 1px solid #BDBDBD !important; border-bottom: 1px solid #BDBDBD !important;
@ -248,42 +259,57 @@ export default {
padding: 0px; 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; height: 20px !important;
padding: 0px; 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; top: 15px !important;
} }
.beijing-01__systerm .el-dialog .current-row>td { .ningbo-01__systerm .el-dialog .current-row>td {
background: #3399FF !important; background: #3399FF !important;
color: #fff !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; border: 1px inset #dcdfe6 !important;
} }
.beijing-01__systerm .el-dialog .el-checkbox__label { .ningbo-01__systerm .el-dialog .el-checkbox__label {
color: #000 !important; 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; 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; 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; background: #fff !important;
border: 1px inset #dcdfe6 !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; position: absolute;
-webkit-box-sizing: content-box; -webkit-box-sizing: content-box;
box-sizing: content-box; box-sizing: content-box;
@ -296,20 +322,20 @@ export default {
top: 1px; top: 1px;
} }
.beijing-01__systerm .el-dialog .el-radio__inner { .ningbo-01__systerm .el-dialog .el-radio__inner {
border: 1px inset #dcdfe6 !important; border: 1px inset #dcdfe6 !important;
} }
.beijing-01__systerm .el-dialog .el-radio__label { .ningbo-01__systerm .el-dialog .el-radio__label {
color: #000 !important; 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; background: #fff !important;
border: 1px inset #dcdfe6 !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; width: 4px;
height: 4px; height: 4px;
border-radius: 100%; border-radius: 100%;
@ -319,42 +345,43 @@ export default {
top: 50%; 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; 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; color: #C5C9CC !important;
} }
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: #F0F0F0;
padding: 0 5px;
position: relative; position: relative;
left: -15px; left: -15px;
top: -18px; top: -18px;
} }
.beijing-01__systerm .el-dialog .el-form-item label { .ningbo-01__systerm .el-dialog .el-form-item label {
font-weight: normal !important; font-weight: normal !important;
color: #000 !important; color: #000 !important;
} }
.beijing-01__systerm .el-dialog .context { .ningbo-01__systerm .el-dialog .context {
height: 100px; height: 100px;
border: 2px inset #E2E2E2; border: 2px inset #E2E2E2;
overflow-y: scroll; overflow-y: scroll;
} }
.beijing-01__systerm .el-dialog .table { .ningbo-01__systerm .el-dialog .table {
margin-top: 10px; margin-top: 10px;
} }
.beijing-01__systerm .el-dialog .notice { .ningbo-01__systerm .el-dialog .notice {
margin-left: 62px; margin-left: 62px;
line-height: 30px; line-height: 30px;
} }
.beijing-01__systerm .el-dialog .button-group { .ningbo-01__systerm .el-dialog .button-group {
margin-top: 10px; margin-top: 10px;
} }
</style> </style>

View 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>

View 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>

View File

@ -89,7 +89,7 @@
<station-control ref="stationControl" /> <station-control ref="stationControl" />
<detain-train-contorl ref="detainTrainContorl" /> <detain-train-contorl ref="detainTrainContorl" />
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" /> <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-add ref="trainAdd" />
<train-transtalet ref="trainTranstalet" /> <train-transtalet ref="trainTranstalet" />
<train-delete ref="trainDelete" /> <train-delete ref="trainDelete" />
@ -379,6 +379,7 @@ export default {
}, },
{ {
title: '帮助', title: '帮助',
operate: '',
children: [ children: [
{ {
title: '关于ITS GPC 工作站', title: '关于ITS GPC 工作站',
@ -585,22 +586,22 @@ export default {
{ {
title: '全线扣车', title: '全线扣车',
operate: OperationEvent.StationStand.setDetainTrainAll.mbar, operate: OperationEvent.StationStand.setDetainTrainAll.mbar,
click: this.setDetainTrainAll click: this.undeveloped
}, },
{ {
title: '取消全线扣车', title: '取消全线扣车',
operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar, operate: OperationEvent.StationStand.cancelDetainTrainAll.mbar,
click: this.cancelDetainTrainAll click: this.undeveloped
}, },
{ {
title: '取消上行全线扣车', title: '取消上行全线扣车',
operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar, operate: OperationEvent.StationStand.cancelUpDetainTrainAll.mbar,
click: this.cancelUpDetainTrainAll click: this.undeveloped
}, },
{ {
title: '取消下行全线扣车', title: '取消下行全线扣车',
operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar, operate: OperationEvent.StationStand.cancelDownDetainTrainAll.mbar,
click: this.cancelDownDetainTrainAll click: this.undeveloped
} }
] ]
}, },
@ -703,8 +704,8 @@ export default {
initMenu(menu) { initMenu(menu) {
const type = State2SimulationMap[this.$store.state.training.prdType]; const type = State2SimulationMap[this.$store.state.training.prdType];
this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode); this.menu = MenuContextHandler.menuBarConvert(this.menuNormal[type], this.$store.state.training.operatemode);
if (this.menu[3]) { if (this.menu[2]) {
this.menu[3].children = this.initStationList(); this.menu[2].children = this.initStationList();
} }
this.clickEvent(); this.clickEvent();
this.closeMenu(true); 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) { popupMenuB(item, index) {
this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null }); this.$store.dispatch('menuOperation/setPopMenu', { position: null, menu: null });
const operate = { const operate = {

View File

@ -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>

View File

@ -79,9 +79,6 @@ export default {
if (this.isScreen) { if (this.isScreen) {
this.menu = [...this.menuScreen]; this.menu = [...this.menuScreen];
} }
// else {
// this.menu = [...this.menuNormal];
// }
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm two-confirmation" class="ningbo-01__systerm two-confirmation"
title="二次确认" title="二次确认"
:visible.sync="show" :visible.sync="show"
width="360px" width="360px"
@ -25,14 +25,14 @@
<el-button :id="domIdCancel" @click="cancel">关闭</el-button> <el-button :id="domIdCancel" @click="cancel">关闭</el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default { export default {
name: 'TwoConfirmation', name: 'TwoConfirmation',
@ -73,6 +73,13 @@ export default {
return []; return [];
} }
}, },
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.loading) {
this.commit();
}
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
@ -118,13 +125,13 @@ export default {
} else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) { } else if (this.operation == OperationEvent.StationControl.emergencyStationControl.menu.operation) {
operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL; operate.cmdType = CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL;
} }
this.doClose();
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
if (valid) { if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}).catch((error) => { }, 1000).catch(() => {
this.$refs.noticeInfo.doShow(operate, error.message); this.$refs.noticeInfo.doShow();
}); });
} }
} }

View File

@ -1,5 +1,5 @@
<template> <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> :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; "> <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"> <el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
@ -151,7 +151,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,10 +1,10 @@
<template> <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> :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"> <div style="padding-left: 10px; padding-bottom: 10px">
<i class="el-icon-info"></i> <i class="el-icon-info"></i>
<template v-for="message in messages"> <template v-for="(message, index) in messages">
<span>{{message}}</span> <span :key="index">{{message}}</span>
</template> </template>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -123,7 +123,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,5 +1,5 @@
<template> <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> :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; "> <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"> <el-form size="small" label-width="90px" :model="model" label-position="left" :rules="rules" ref="form">
@ -167,7 +167,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm station-control" class="ningbo-01__systerm station-control"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="400px" width="400px"
@ -11,9 +11,9 @@
:modal="false" :modal="false"
:close-on-click-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-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-row>
</el-radio-group> </el-radio-group>
<el-row type="flex" justify="center" class="button-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 :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button> </el-button>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
@ -45,6 +45,10 @@ export default {
controlProps: { controlProps: {
'01': '全线扣车', '01': '全线扣车',
'02': '取消全线扣车' '02': '取消全线扣车'
},
controlPropDisabled:{
'01':false,
'02':false
} }
}; };
@ -61,25 +65,39 @@ export default {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
return '全线扣车'; return '全线扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return '取消全线扣车'; return '取消全线扣车';
} } else {
return ''; return '';
}
} else {
return '';
}
}, },
domIdCommit() { domIdCommit() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.setDetainTrainAll.menu.domId; return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId; return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
} }
}
return ''; return '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
} }
}, },
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.disabledCommit) {
this.handleCommit();
}
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
@ -95,9 +113,13 @@ export default {
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
// 线 // 线
this.control = '01'; this.control = '01';
this.controlPropDisabled['01'] = false;
this.controlPropDisabled['02'] = true;
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
// 线 // 线
this.control = '02'; this.control = '02';
this.controlPropDisabled['01'] = true;
this.controlPropDisabled['02'] = false;
} }
this.dialogShow = true; this.dialogShow = true;
@ -141,17 +163,17 @@ export default {
messages: ['确认设置全线扣车!'] messages: ['确认设置全线扣车!']
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
@ -165,16 +187,17 @@ export default {
messages: ['确认取消全线扣车!'] messages: ['确认取消全线扣车!']
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
} }
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm station-control" class="ningbo-01__systerm station-control"
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
width="400px" width="400px"
@ -11,9 +11,9 @@
:modal="false" :modal="false"
:close-on-click-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-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-row>
</el-radio-group> </el-radio-group>
<el-row type="flex" justify="center" class="button-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 :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button> </el-button>
</el-row> </el-row>
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</el-dialog> </el-dialog>
</template> </template>
@ -45,8 +45,11 @@ export default {
controlProps: { controlProps: {
'01': '取消上行扣车', '01': '取消上行扣车',
'02': '取消下行扣车' '02': '取消下行扣车'
},
controlPropDisabled:{
'01':false,
'02':false
} }
}; };
}, },
computed: { computed: {
@ -61,25 +64,36 @@ export default {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
title() { title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) { if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return '取消上行扣车'; return '取消上行扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return '取消下行扣车'; return '取消下行扣车';
} }
}
return ''; return '';
}, },
domIdCommit() { domIdCommit() {
if (this.dialogShow) {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) { if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId; return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId; return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
} }
}
return ''; return '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
} }
}, },
watch: {
'$store.state.map.keyboardEnterCount': function (val) {
if (this.show && !this.disabledCommit) {
this.handleCommit();
}
}
},
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
@ -95,9 +109,13 @@ export default {
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) { if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
// 线 // 线
this.control = '01'; this.control = '01';
this.controlPropDisabled['01'] = false;
this.controlPropDisabled['02'] = true;
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
// 线 // 线
this.control = '02'; this.control = '02';
this.controlPropDisabled['01'] = true;
this.controlPropDisabled['02'] = false;
} }
this.dialogShow = true; this.dialogShow = true;
@ -144,14 +162,14 @@ export default {
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.doClose();
} else { } else {
this.disabledSure = false; this.disabledSure = false;
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
} }
} }

View File

@ -1,5 +1,5 @@
<template> <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> :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<div style="height: 70px;"> <div style="height: 70px;">
<div style="position: relative; left: 10px;"> <div style="position: relative; left: 10px;">
@ -120,7 +120,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,5 +1,5 @@
<template> <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> :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; "> <div style="padding: 5px 5px; border: 1px double lightgray; margin: 20px 0px; ">
<span class="base-label">用户列表</span> <span class="base-label">用户列表</span>
@ -279,7 +279,7 @@
} }
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm station-control" class="ningbo-01__systerm station-control"
title="控制模式转换" title="控制模式转换"
:visible.sync="show" :visible.sync="show"
width="400px" width="400px"
@ -15,6 +15,7 @@
<el-row style="margin-bottom: 20px"> <el-row style="margin-bottom: 20px">
<el-select <el-select
:id="domIdChooseStation" :id="domIdChooseStation"
ref="chooseStation"
v-model="station" v-model="station"
value-key="code" value-key="code"
filterable filterable
@ -24,6 +25,7 @@
> >
<el-option v-for="item in concertrateStationList" :key="item.code" :label="item.name" :value="item" /> <el-option v-for="item in concertrateStationList" :key="item.code" :label="item.name" :value="item" />
</el-select> </el-select>
</el-row> </el-row>
<el-radio-group :id="domIdChooseControl" v-model="stationType"> <el-radio-group :id="domIdChooseControl" v-model="stationType">
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px"> <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 :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
</el-button> </el-button>
</el-row> </el-row>
<two-confirmation ref="twoConfirmation" /> <two-confirmation ref="twoConfirmation" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import TwoConfirmation from './childDialog/twoConfirmation';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import TwoConfirmation from './childDialog/twoConfirmation';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
@ -88,14 +91,19 @@ export default {
return this.dialogShow ? OperationEvent.Command.order.choose1.domId : ''; return this.dialogShow ? OperationEvent.Command.order.choose1.domId : '';
}, },
domIdCommit() { domIdCommit() {
if (this.dialogShow) {
if (this.stationType == '01') { if (this.stationType == '01') {
return OperationEvent.StationControl.requestCentralControl.menu.domId; return OperationEvent.StationControl.requestCentralControl.menu.domId;
} else if (this.stationType == '02') { } else if (this.stationType == '02') {
return OperationEvent.StationControl.requestStationControl.menu.domId; return OperationEvent.StationControl.requestStationControl.menu.domId;
} else if (this.stationType == '03') { } else if (this.stationType == '03') {
return OperationEvent.StationControl.emergencyStationControl.menu.domId; return OperationEvent.StationControl.emergencyStationControl.menu.domId;
} } else {
return ''; return '';
}
} else {
return '';
}
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; 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() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
@ -119,11 +139,29 @@ export default {
this.operation = operate.operation; this.operation = operate.operation;
} }
this.dialogShow = true; this.dialogShow = true;
// if (this.$store.state.training.prdType == '01') {
// this.controlProps = {
// '03': '',
// '02': ''
// };
// }
this.$store.dispatch('training/emitTipFresh'); 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() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('socket/shiftMsgQueue');
}, },
cancel() { cancel() {
const operate = { const operate = {
@ -131,19 +169,21 @@ export default {
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}); });
}, },
handleChooseChangeStation(data) { handleChooseChangeStation(data) {
this.message = '';
this.stationCode = data.code; this.stationCode = data.code;
this.stationName = data.name; this.stationName = data.name;
this.message = '';
const operate = { const operate = {
operation: OperationEvent.Command.order.choose1.operation operation: OperationEvent.Command.order.choose1.operation,
val: this.stationCode
}; };
// if (this.stationType == '01') { // if (this.stationType == '01') {
// operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation // operate.operation = OperationEvent.StationControl.requestCentralControl.choose1.operation
// } else if (this.stationType == '02') { // } else if (this.stationType == '02') {
@ -155,12 +195,14 @@ export default {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.chooseStation.blur();
} }
}); });
}, },
handleChooseChangeControl() { handleChooseChangeControl() {
const operate = { const operate = {
operation: OperationEvent.Command.order.choose.operation operation: OperationEvent.Command.order.choose.operation,
val: this.stationCode
}; };
// if (this.stationType == '01') { // if (this.stationType == '01') {
@ -198,35 +240,29 @@ export default {
}, },
// //
conterCommit() { conterCommit() {
commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationControl.requestCentralControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
if (valid) {
this.doClose(); this.doClose();
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由站控转为中控:\n' + this.stationName); this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由站控转为遥控:\n' + this.stationName);
}
}); });
}, },
// //
requestCommit() { requestCommit() {
commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationControl.requestStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
if (valid) {
this.doClose(); this.doClose();
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName); this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
}
}); });
}, },
// //
emergencyCommit() { emergencyCommit() {
commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationControl.emergencyStationControl, {stationCodes:[this.stationCode]}, 0).then((data)=>{
if (valid) {
this.doClose(); this.doClose();
this.$refs.twoConfirmation.doShow(operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName); this.$refs.twoConfirmation.doShow(data.operate, '确认将如下操作区域的控制模式由中控转为站控:\n' + this.stationName);
}
}); });
} }
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss"> <style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
/deep/ .el-radio { /deep/ .el-radio {

View File

@ -1,25 +1,37 @@
<template> <template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form"> 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;"> <div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">添加位置</span> <span class="base-label">添加位置</span>
<div style="position: relative; top:-10px;"> <div style="position: relative; top:-10px;">
<el-form-item prop="stationStandCode"> <el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;&emsp;:</span> <span slot="label">&emsp;&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择"> <el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" <el-option
:value="item.code"> v-for="item in stationStandList"
</el-option> :key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="前车车次号:" prop="trainNumberLimber"> <el-form-item label="前车车次号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input> <el-input v-model="addModel.trainNumberLimber" />
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<el-form-item label="添加车次号:" label-width="115px" prop="groupNumber"> <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-item>
</el-form> </el-form>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -47,7 +59,7 @@
addModel: { addModel: {
groupNumber: '', groupNumber: '',
stationStandCode: '', stationStandCode: '',
trainNumberLimber: '', trainNumberLimber: ''
}, },
rules: { rules: {
@ -59,12 +71,12 @@
// ], // ],
stationStandCode: [ stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' } { required: true, message: '请选择终端', trigger: 'change' }
], ]
}, },
operation: null, operation: null,
dialogShow: false, dialogShow: false,
loading: false, loading: false
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -80,13 +92,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : ''; return this.dialogShow ? OperationEvent.Command.planTrain.addPlanTrain.domId : '';
}, },
title() { title() {
return '添加计划车' return '添加计划车';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -111,47 +123,44 @@
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.addPlanTrain.operation, operation: OperationEvent.Command.planTrain.addPlanTrain.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); });
})
} else { } else {
return false; return false;
} }
}); });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,16 +1,24 @@
<template> <template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form"> 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"> <el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span> <span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择"> <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 v-for="item in stationStandList" :key="item.code" :label="item.name" :value="item.code" />
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车 次 号:" prop="groupNumber"> <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-item>
</el-form> </el-form>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
@ -37,7 +45,7 @@
trainNoList: [], trainNoList: [],
addModel: { addModel: {
groupNumber: '', groupNumber: '',
stationStandCode: '', stationStandCode: ''
}, },
rules: { rules: {
@ -46,12 +54,12 @@
], ],
stationStandCode: [ stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' } { required: true, message: '请选择终端', trigger: 'change' }
], ]
}, },
operation: null, operation: null,
dialogShow: false, dialogShow: false,
loading: false, loading: false
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -67,13 +75,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : ''; return this.dialogShow ? OperationEvent.Command.planTrain.delPlanTrain.domId : '';
}, },
title() { title() {
return '删除计划车' return '删除计划车';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -98,47 +106,44 @@
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.delPlanTrain.operation, operation: OperationEvent.Command.planTrain.delPlanTrain.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); });
})
} else { } else {
return false; return false;
} }
}); });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style scoped> <style scoped>
.beijing-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
background: rgba(0, 0, 0, x); background: rgba(0, 0, 0, x);
position: relative; position: relative;
left: -5px; left: -5px;

View File

@ -1,9 +1,18 @@
<template> <template>
<el-dialog class="beijing-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-form size="small" label-width="100px" :model="addModel" :rules="rules" ref="form"> 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-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-item>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"> <div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
<span class="base-label">目的</span> <span class="base-label">目的</span>
@ -11,13 +20,16 @@
<el-form-item prop="stationStandCode"> <el-form-item prop="stationStandCode">
<span slot="label">&emsp;&emsp;:</span> <span slot="label">&emsp;&emsp;:</span>
<el-select v-model="addModel.stationStandCode" filterable placeholder="请选择"> <el-select v-model="addModel.stationStandCode" filterable placeholder="请选择">
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name" <el-option
:value="item.code"> v-for="item in stationStandList"
</el-option> :key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="车 次 号:" prop="trainNumberLimber"> <el-form-item label="车 次 号:" prop="trainNumberLimber">
<el-input v-model="addModel.trainNumberLimber"></el-input> <el-input v-model="addModel.trainNumberLimber" />
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
@ -47,7 +59,7 @@
addModel: { addModel: {
groupNumber: '', groupNumber: '',
stationStandCode: '', stationStandCode: '',
trainNumberLimber: '', trainNumberLimber: ''
}, },
rules: { rules: {
@ -59,12 +71,12 @@
], ],
stationStandCode: [ stationStandCode: [
{ required: true, message: '请选择终端', trigger: 'change' } { required: true, message: '请选择终端', trigger: 'change' }
], ]
}, },
operation: null, operation: null,
dialogShow: false, dialogShow: false,
loading: false, loading: false
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
@ -80,13 +92,13 @@
return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : ''; return this.dialogShow ? OperationEvent.Command.planTrain.translatPlanTrain.domId : '';
}, },
title() { title() {
return '平移计划车' return '平移计划车';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate) { doShow(operate) {
@ -111,42 +123,39 @@
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.planTrain.translatPlanTrain.operation, operation: OperationEvent.Command.planTrain.translatPlanTrain.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} else {
// this.$refs.noticeInfo.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); });
})
} else { } else {
return false; return false;
} }
}); });
}, },
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation, operation: OperationEvent.Command.cancel.menu.operation
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>

View File

@ -31,7 +31,7 @@ export default {
data() { data() {
return { return {
menu: [], menu: [],
systemName:'beijing-01__systerm', systemName:'ningbo-01__systerm',
menuNormal: { menuNormal: {
Local: [ Local: [
{ {
@ -51,6 +51,10 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters('training', [
'mode',
'operatemode'
]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]) ])

View File

@ -1,41 +1,42 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" pop-class="beijing-01__systerm" /> <section-control ref="sectionControl" pop-class="ningbo-01__systerm" />
<speed-limit-control ref="speedLimitControl" pop-class="beijing-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" /> <alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-add-plan ref="trainAddPlan" pop-class="beijing-01__systerm" /> <train-add-plan ref="trainAddPlan" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl'; 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 SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
import AlxeEffective from './dialog/alxeEffective'; import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; 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 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 {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 { export default {
name: 'SectionMenu', name: 'SectionMenu',
components: { components: {
PopMenu, PopMenu,
SectionControl, SectionControl,
SectionUnLock,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo,
SetFault, TrainAddPlan,
TrainAddPlan SetFault
}, },
props: { props: {
selected: { selected: {
@ -50,26 +51,48 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ Local: [
],
Center: [
{ {
label: '轨道激活', label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: '区段跟踪激活',
handler: this.active, handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE cmdType: CMD.Section.CMD_SECTION_ACTIVE
}, },
{ {
label: '轨道切除', label: '区段跟踪切除',
handler: this.split, handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF 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: '设置临时限速', label: '设置临时限速',
handler: this.setSpeed, handler: this.setSpeed,
@ -78,18 +101,18 @@ export default {
{ {
label: '取消临时限速', label: '取消临时限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
} }
] ]
}, },
menuForce: [ menuForce: [
{ {
label: '设置故障', label: this.$t('menu.menuSection.setFault'),
handler: this.setStoppage, handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT cmdType: CMD.Fault.CMD_SET_FAULT
}, },
{ {
label: '取消故障', label: this.$t('menu.menuSection.cancelFault'),
handler: this.cancelStoppage, handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
@ -117,11 +140,6 @@ export default {
} else { } else {
this.doClose(); 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() { mounted() {
@ -144,7 +162,6 @@ export default {
initMenu() { initMenu() {
// //
this.menu = MenuContextHandler.covert(this.menuNormal); this.menu = MenuContextHandler.covert(this.menuNormal);
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce; this.menu = this.menuForce;
@ -162,25 +179,7 @@ export default {
this.$refs.popMenu.close(); 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() { addPlanTrain() {
commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Train.createPlanTrain, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
@ -190,39 +189,17 @@ export default {
}, },
// // // //
// alxeFailure() { // alxeFailure() {
// const operate = { // this.mouseCancelState(this.selected);
// start: true, // commitOperate(menuOperate.Section.alxeFailure, {sectionCode:this.selected.code}, 3).then(({valid, operate})=>{
// 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);
// }
// }).catch(()=>{ // }).catch(()=>{
// this.$refs.noticeInfo.doShow(operate); // this.$refs.noticeInfo.doShow();
// }); // });
// }, // },
// //
faultUnlock(selectType) { fault() {
commitOperate(menuOperate.Section.fault, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Section.fault, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.sectionControl.doShow(operate, selectType); this.$refs.sectionUnLock.doShow(operate, this.selected);
}
});
},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
} }
}); });
}, },
@ -236,6 +213,7 @@ export default {
} }
}); });
}, },
//
alxeEffective() { alxeEffective() {
commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Section.alxeEffective, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
@ -243,7 +221,7 @@ export default {
} }
}); });
}, },
// //
active() { active() {
const hasParentCode = (this.selected.type == '02' || this.selected.type == '03'); const hasParentCode = (this.selected.type == '02' || this.selected.type == '03');
const sectionCode = hasParentCode ? this.selected.parentCode : this.selected.code; const sectionCode = hasParentCode ? this.selected.parentCode : this.selected.code;
@ -253,35 +231,50 @@ export default {
} }
}); });
}, },
// //
axlePreReset(selectType) { lock() {
commitOperate(menuOperate.Section.axlePreReset, {sectionCode:selectType.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Section.lock, {sectionCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { 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() { setSpeed() {
const hasParentCode = (this.selected.type == '02' || this.selected.type == '03'); let sectionCode = this.selected.code;
const sectionCode = hasParentCode ? this.selected.parentCode : 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})=>{ commitOperate(menuOperate.Section.setSpeed, {sectionCode:sectionCode}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.speedLimitControl.doShow(operate, this.selected); 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() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) { 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() { triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected); 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);
}
});
} }
} }
}; };

View File

@ -2,12 +2,13 @@
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" /> <route-selection ref="routeSelection" />
<route-control ref="routeControl" :pop-class="systemName" /> <route-un-lock ref="routeUnLock" pop-class="ningbo-01__systerm" />
<route-hand-control ref="routeHandControl" :system-name="systemName" /> <route-control ref="routeControl" pop-class="ningbo-01__systerm" />
<route-detail ref="routeDetail" :system-name="systemName" /> <route-hand-control ref="routeHandControl" system-name="ningbo-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <route-detail ref="routeDetail" system-name="ningbo-01__systerm" />
<password-box ref="password" @checkOver="passWordCommit" /> <router-command ref="routerCommand" />
<set-fault ref="setFault" :pop-class="systemName" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
@ -16,17 +17,16 @@ import PopMenu from '@/components/PopMenu';
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl'; import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import RouteSelection from './dialog/routeSelection'; import RouteSelection from './dialog/routeSelection';
import RouteUnLock from '@/jmapNew/theme/components/menus/dialog/sectionUnLock';
import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandControl'; import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandControl';
import RouterCommand from './dialog/routerCommand';
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail'; import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; 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 {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 { export default {
name: 'SignalMenu', name: 'SignalMenu',
@ -34,10 +34,11 @@ export default {
PopMenu, PopMenu,
RouteControl, RouteControl,
RouteSelection, RouteSelection,
RouteUnLock,
RouteHandControl, RouteHandControl,
RouteDetail, RouteDetail,
RouterCommand,
NoticeInfo, NoticeInfo,
PasswordBox,
SetFault SetFault
}, },
props: { props: {
@ -51,13 +52,8 @@ export default {
data() { data() {
return { return {
menu: [], menu: [],
clickNum:0,
systemName:'beijing-01__systerm',
oldSelected:null,
menuNormal: { menuNormal: {
Local: [ Local: [
],
Center: [
{ {
label: '排列进路', label: '排列进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
@ -74,7 +70,34 @@ export default {
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL 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: '进路交人工控', label: '进路交人工控',
@ -91,6 +114,53 @@ export default {
handler: this.detail, handler: this.detail,
cmdType: CMD.Signal.CMD_SIGNAL_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: [ menuForce: [
@ -122,7 +192,10 @@ export default {
]), ]),
...mapGetters('map', [ ...mapGetters('map', [
'routeList' 'routeList'
]) ]),
group() {
return this.$route.query.group;
}
}, },
watch: { watch: {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
@ -131,14 +204,8 @@ export default {
} else { } else {
this.doClose(); 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: { methods: {
clickEvent() { clickEvent() {
const self = this; const self = this;
@ -147,12 +214,7 @@ export default {
}; };
}, },
initMenu() { initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal); this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce];
}
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce; this.menu = this.menuForce;
@ -171,137 +233,17 @@ export default {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
setRouteSignal() { //
if (this.$store.state.training.prdType == '01') { getRouteList(selectType) {
let signalList = []; const routes = [];
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;
this.routeList.forEach(elem => { this.routeList.forEach(elem => {
if (elem.startSignalCode === this.oldSelected.code) { if (elem.startSignalCode === selectType.code) {
if (elem.endSignalCode === selectType.code) { routes.push(elem);
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 (route) { return routes;
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;
}
}
}, },
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() { arrangementRoute() {
commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.arrangementRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { 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() { cancelTrainRoute() {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
@ -324,27 +259,20 @@ export default {
} }
}); });
}, },
// //
cancelTrainRouteByLow(selectType) { lock() {
commitOperate(menuOperate.Signal.cancelTrainRoute, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.lock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
});
},
//
humanTrainRoute(selectType) {
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode:selectType.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE; this.$refs.routeControl.doShow(operate, this.selected);
this.$refs.password.doShow(operate);
} }
}); });
}, },
// //
reopenSignalByRoute(selectType) { unlock() {
commitOperate(menuOperate.Signal.reopenSignal, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.unlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{ if (valid) {
this.$refs.noticeInfo.doShow({}, error.message); 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() { humanControl() {
commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.humanControl, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
@ -387,17 +308,19 @@ export default {
}); });
}, },
// //
singalPassModel(selectType) { singalPassModel() {
commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.setAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{ if (valid) {
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.routeControl.doShow(operate, this.selected);
}
}); });
}, },
// //
singalCancelPassModel(selectType) { singalCancelPassModel() {
commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.cancelAutoInterlock, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{ if (valid) {
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.routeControl.doShow(operate, this.selected);
}
}); });
}, },
// //
@ -408,28 +331,36 @@ export default {
} }
}); });
}, },
// //
getRouteList(selectType) { humanTrainRoute() {
const routes = []; commitOperate(menuOperate.Signal.cancelGuide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
this.routeList.forEach(elem => { if (valid) {
if (elem.startSignalCode === selectType.code) { this.$refs.routerCommand.doShow(operate, this.selected, '是否执行人解列车进路命令?');
routes.push(elem);
} }
}); });
return routes;
}, },
passWordCommit(data) { //
const operate = { guide() {
operation: data.operation, commitOperate(menuOperate.Signal.guide, {signalCode:this.selected.code}, 0).then(({valid, operate})=>{
over:true,
cmdType:data.cmdType
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { 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() { triggerFaultManagement() {

View File

@ -1,37 +1,35 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<station-cmd-control ref="stationCmdControl" /> <station-cmd-control ref="stationCmdControl" pop-class="ningbo-01__systerm" />
<station-human-control-all ref="stationHumanControlAll" /> <station-human-control-all ref="stationHumanControlAll" pop-class="ningbo-01__systerm" />
<station-set-route-control-all ref="stationSetRouteControlAll" /> <station-set-route-control-all ref="stationSetRouteControlAll" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StationCmdControl from './dialog/stationCmdControl'; import StationCmdControl from '@/jmapNew/theme/components/menus/dialog/stationCmdControl';
import StationHumanControlAll from './dialog/stationHumanControlAll'; import StationHumanControlAll from '@/jmapNew/theme/components/menus/dialog/stationHumanControlAll';
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll'; import StationSetRouteControlAll from '@/jmapNew/theme/components/menus/dialog/stationSetRouteControlAll';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { DeviceMenu } from '@/scripts/ConstDic'; import { DeviceMenu } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
// import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus'; // import {mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate'; import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
components: { components: {
PopMenu, PopMenu,
SetFault,
StationCmdControl, StationCmdControl,
StationHumanControlAll, StationHumanControlAll,
SetFault,
StationSetRouteControlAll, StationSetRouteControlAll,
NoticeInfo NoticeInfo
}, },
@ -51,49 +49,40 @@ export default {
{ {
label: '全站设置联锁自动触发', label: '全站设置联锁自动触发',
handler: this.setAutoTrigger, handler: this.setAutoTrigger,
cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER
auth: { station: true, center: false }
}, },
{ {
label: '全站取消联锁自动触发', label: '全站取消联锁自动触发',
handler: this.cancelAutoTrigger, handler: this.cancelAutoTrigger,
cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER
auth: { station: true, center: false } },
{
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: [ Center: [
{ {
label: '所有进路自排关', label: '所有进路自排关',
handler: this.humanControlALL, handler: this.humanControlALL,
cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING, cmdType: CMD.Station.CMD_STATION_CLOSE_AUTO_SETTING
auth: { station: false, center: true }
}, },
{ {
label: '所有进路自排开', label: '所有进路自排开',
handler: this.atsAutoControlALL, handler: this.atsAutoControlALL,
cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING, cmdType: CMD.Station.CMD_STATION_OPEN_AUTO_SETTING
auth: { station: false, center: true } },
{
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: [ menuForce: [
@ -141,20 +130,10 @@ export default {
}; };
}, },
initMenu() { initMenu() {
this.menu = [];
if (this.selected.centralized) {
//
this.menu = MenuContextHandler.covert(this.menuNormal); 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) { if (this.operatemode === OperateMode.FAULT) {
this.menu = [...this.menuForce]; this.menu = this.menuForce;
}
} }
}, },
doShow(point) { doShow(point) {
@ -187,92 +166,58 @@ export default {
}, },
// //
setAutoTrigger() { setAutoTrigger() {
const operate = { commitOperate(menuOperate.Station.setAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
start: true, }).catch(error=>{
send: true, this.$refs.noticeInfo.doShow(error.message);
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);
}); });
}, },
// //
cancelAutoTrigger() { cancelAutoTrigger() {
const operate = { commitOperate(menuOperate.Station.cancelAutoTrigger, { stationCode: this.selected.code }, 3).then(({valid, operate})=>{
start: true, }).catch(error=>{
send: true, this.$refs.noticeInfo.doShow(error.message);
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);
}); });
}, },
// //
powerUnLock() { powerUnLock() {
const operate = { commitOperate(menuOperate.Station.powerUnLock, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.powerUnLock.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected); this.$refs.stationCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
execKeyOperationTest() { execKeyOperationTest() {
const operate = { commitOperate(menuOperate.Station.execKeyOperationTest, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.execKeyOperationTest.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationCmdControl.doShow(operate, this.selected); this.$refs.stationCmdControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
humanControlALL() { humanControlALL() {
const operate = { commitOperate(menuOperate.Station.humanControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.humanControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationHumanControlAll.doShow(operate, this.selected); this.$refs.stationHumanControlAll.doShow(operate, this.selected);
} }
}); });
}, },
// //
atsAutoControlALL() { atsAutoControlALL() {
const operate = { commitOperate(menuOperate.Station.atsAutoControlALL, { stationCode: this.selected.code }, 0).then(({valid, operate})=>{
start: true,
code: this.selected.code,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.stationSetRouteControlAll.doShow(operate, this.selected); this.$refs.stationSetRouteControlAll.doShow(operate, this.selected);
} }
}); });
}, },
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
triggerFaultManagement() { triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected); this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }

View 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>

View File

@ -1,34 +1,32 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<stand-control ref="standControl" :system-name="systemName" /> <stand-control ref="standControl" system-name="ningbo-01__systerm" />
<stand-jump-stop-control ref="standJumpStopControl" :system-name="systemName" /> <stand-jump-stop-control ref="standJumpStopControl" system-name="ningbo-01__systerm" />
<stand-detail ref="standDetail" /> <stand-detail ref="standDetail" pop-class="ningbo-01__systerm" />
<stand-run-level ref="standRunLevel" :system-name="systemName" /> <stand-run-level ref="standRunLevel" system-name="ningbo-01__systerm" />
<stand-stop-time ref="standStopTime" :system-name="systemName" /> <stand-stop-time ref="standStopTime" system-name="ningbo-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <StandBulkBuckleTrain ref="standBulkBuckleTrain" />
<stand-back-strategy ref="standBackStrategy" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import StandControl from '@/jmapNew/theme/components/menus/dialog/standControl'; 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 StandJumpStopControl from '@/jmapNew/theme/components/menus/dialog/standJumpStopControl';
import StandBackStrategy from './dialog/standBackStrategy'; import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault';
import StandDetail from './dialog/standDetail'; import StandDetail from '@/jmapNew/theme/components/menus/dialog/standDetail';
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel'; import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime'; import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; 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 {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 { export default {
name: 'StationStandMenu', name: 'StationStandMenu',
@ -36,10 +34,10 @@ export default {
PopMenu, PopMenu,
StandControl, StandControl,
StandJumpStopControl, StandJumpStopControl,
StandBulkBuckleTrain,
StandDetail, StandDetail,
StandRunLevel, StandRunLevel,
NoticeInfo, NoticeInfo,
StandBackStrategy,
StandStopTime, StandStopTime,
SetFault SetFault
}, },
@ -54,13 +52,10 @@ export default {
data() { data() {
return { return {
menu: [], menu: [],
systemName:'beijing-01__systerm',
menuNormal: { menuNormal: {
Local: [ Local: [
],
Center: [
{ {
label: '设置扣车', label: '扣车',
handler: this.setDetainTrain, handler: this.setDetainTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
}, },
@ -69,6 +64,43 @@ export default {
handler: this.cancelDetainTrain, handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN 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: '设置跳停', label: '设置跳停',
handler: this.setJumpStop, handler: this.setJumpStop,
@ -80,33 +112,27 @@ export default {
cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP cmdType:CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP
}, },
{ {
label: '提前发车', label: '设置停站时间',
handler: this.earlyDeparture,
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
},
{
type: 'separator'
},
{
label: '停站时间控制',
handler: this.setStopTime, handler: this.setStopTime,
cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME cmdType:CMD.Stand.CMD_STAND_SET_PARK_TIME
}, },
{ {
label: '运行时间控制', label: '设置运行等级',
handler: this.setRunLevel, handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
}, },
{ {
label: '变通策略管理', label: '区间列车数量限制',
handler: this.setBackStrategy, handler: this.setDetainTrainAll,
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY 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, handler: this.detail,
cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS cmdType:CMD.Stand.CMD_STAND_VIEW_STATUS
} }
@ -147,11 +173,6 @@ export default {
} else { } else {
this.doClose(); 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: { methods: {
@ -164,9 +185,6 @@ export default {
initMenu() { initMenu() {
// //
this.menu = MenuContextHandler.covert(this.menuNormal); this.menu = MenuContextHandler.covert(this.menuNormal);
// if (this.operatemode === OperateMode.ADMIN) {
// this.menu = [...this.menu, ...this.menuForce];
// }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
@ -185,24 +203,6 @@ export default {
this.$refs.popMenu.close(); 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() { setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ 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() { setDetainTrain() {
commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationStand.setDetainTrain, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
@ -249,22 +235,38 @@ export default {
} }
}); });
}, },
// //
// cancelDetainTrainForce() { setDetainTrainAll() {
// const operate = { commitOperate(menuOperate.StationStand.setDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
// start: true, if (valid) {
// code: this.selected.code, this.$refs.standControl.doShow(operate, this.selected);
// type: MapDeviceType.StationStand.type, }
// label: MapDeviceType.StationStand.label, });
// operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation },
// }; //
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { cancelDetainTrainAll() {
// if (valid) { commitOperate(menuOperate.StationStand.cancelDetainTrainAuto, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (valid) {
// this.$refs.standControl.doShow(operate, this.selected); 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() { setJumpStop() {
commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationStand.setJumpStop, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
@ -281,7 +283,7 @@ export default {
} }
}); });
}, },
// //
setStopTime() { setStopTime() {
commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationStand.setStopTime, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
@ -289,11 +291,11 @@ export default {
} }
}); });
}, },
// //
setRunLevel() { setRunLevel() {
commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationStand.setRunLevel, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { 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() { detail() {
commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.StationStand.detail, {standCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.standDetail.doShow(operate, this.selected, []); this.$refs.standDetail.doShow(operate, this.selected);
} }
}); });
}, },

View 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>

View File

@ -1,39 +1,38 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" pop-class="beijing-01__systerm" /> <switch-control ref="switchControl" pop-class="ningbo-01__systerm" />
<switch-control ref="switchControl" pop-class="beijing-01__systerm" /> <section-un-lock ref="sectionUnLock" pop-class="ningbo-01__systerm" />
<speed-limit-control ref="speedLimitControl" pop-class="beijing-01__systerm" /> <speed-limit-control ref="speedLimitControl" pop-class="ningbo-01__systerm" />
<alxe-effective ref="alxeEffective" /> <alxe-effective ref="alxeEffective" />
<switch-hook-lock ref="switchHookLock" pop-class="beijing-01__systerm" /> <switch-hook-lock ref="switchHookLock" pop-class="ningbo-01__systerm" />
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" /> <notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" /> <set-fault ref="setFault" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
<script> <script>
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl'; import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; 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 SpeedLimitControl from '@/jmapNew/theme/components/menus/dialog/speedCmdControl';
import AlxeEffective from './dialog/alxeEffective'; import AlxeEffective from './dialog/alxeEffective';
import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock'; import SwitchHookLock from '@/jmapNew/theme/components/menus/dialog/switchHookLock';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; 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 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 {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'SwitchMenu', name: 'SwitchMenu',
components: { components: {
PopMenu, PopMenu,
SectionControl,
SwitchControl, SwitchControl,
SectionUnLock,
SpeedLimitControl, SpeedLimitControl,
AlxeEffective, AlxeEffective,
NoticeInfo, NoticeInfo,
@ -53,51 +52,99 @@ export default {
menu: [], menu: [],
menuNormal: { menuNormal: {
Local: [ 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: [ Center: [
{ {
label: '轨道切除', label: '定操',
handler: this.split, handler: this.locate,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF 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, handler: this.active,
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
}, },
{
label: '区段切除',
handler: this.split,
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
},
{ {
type: 'separator' type: 'separator'
}, },
// { {
// label: '', label: '确认计轴有效',
// handler: this.alxeEffective, handler: this.alxeEffective,
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE, cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
// auth: { station: false, center: true } },
// },
{ {
label: '设置临时限速', label: '设置临时限速',
handler: this.setSpeed, handler: this.setSpeed,
cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED 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: [ menuForce: [
{ {
label: '设置故障', label: '设置故障',
handler: this.setStoppage handler: this.setStoppage,
cmdType: CMD.Fault.CMD_SET_FAULT
}, },
{ {
label: '取消故障', label: '取消故障',
handler: this.cancelStoppage handler: this.cancelStoppage,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}, },
{ {
label: '触发故障管理', label: '触发故障管理',
@ -123,11 +170,6 @@ export default {
} else { } else {
this.doClose(); 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: { methods: {
@ -140,10 +182,6 @@ export default {
initMenu() { initMenu() {
// //
this.menu = MenuContextHandler.covert(this.menuNormal); this.menu = MenuContextHandler.covert(this.menuNormal);
// if (this.operatemode === OperateMode.ADMIN) {
// this.menu = [...this.menu, ...this.menuForce];
// }
// //
if (this.operatemode === OperateMode.FAULT) { if (this.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) { if (!this.$store.state.scriptRecord.bgSet) {
@ -169,99 +207,52 @@ export default {
this.$refs.popMenu.close(); this.$refs.popMenu.close();
} }
}, },
operationHandler(buttonOperation, selectType) { //
switch (buttonOperation) { locate() {
case OperationEvent.Switch.locate.button.operation: { commitOperate(menuOperate.Switch.locate, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
//
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})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
cancelStoppage() { reverse() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.reverse, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected); this.$refs.switchControl.doShow(operate, this.selected);
} }
}); });
}, },
// //
lock(selectType) { lock() {
commitOperate(menuOperate.Switch.lock, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.lock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{
this.$refs.noticeInfo.doShow({}, error.message);
});
},
//
unlock(selectType) {
commitOperate(menuOperate.Switch.unlock, {switchCode:selectType.code}, 0).then(({valid, operate})=>{
if (valid) { 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) { unlock() {
commitOperate(menuOperate.Switch.turnoutForce, {switchCode:selectType.code}, 0).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.unlock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
if (valid) { 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) { block() {
commitOperate(menuOperate.Switch.locate, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.block, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{ if (valid) {
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.switchControl.doShow(operate, this.selected);
}
}); });
}, },
// //
reverse(selectType) { unblock() {
commitOperate(menuOperate.Switch.reverse, {switchCode:selectType.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Switch.unblock, {switchCode:this.selected.code}, 0).then(({valid, operate})=>{
}).catch(error=>{ if (valid) {
this.$refs.noticeInfo.doShow({}, error.message); this.$refs.sectionUnLock.doShow(operate, this.selected);
}
}); });
}, },
// //
@ -296,10 +287,6 @@ export default {
} }
}); });
}, },
//
hookLock() {
this.$refs.switchHookLock.doShow(this.selected);
},
undeveloped() { undeveloped() {
this.doClose(); this.doClose();
this.$alert('实现中......', '提示', { 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() { triggerFaultManagement() {
this.$store.dispatch('training/setTriggerFaultCount', this.selected); this.$store.dispatch('training/setTriggerFaultCount', this.selected);
} }

View File

@ -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>

View File

@ -1,18 +1,16 @@
<template> <template>
<div> <div>
<pop-menu ref="popMenu" :menu="menu" /> <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-delete ref="trainDelete" />
<train-define ref="trainDefine" /> <train-define ref="trainDefine" />
<train-move ref="trainMove" /> <train-move ref="trainMove" />
<train-edit ref="trainEdit" />
<train-set-plan ref="trainSetPlan" /> <train-set-plan ref="trainSetPlan" />
<train-move-evently ref="trainMoveEvently" />
<train-delete-plan ref="trainDeletePlan" />
<train-set-head ref="trainSetHead" /> <train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" /> <train-set-work ref="trainSetWork" />
<train-flag ref="trainFlag" /> <trainSetWorkATP ref="trainSetWorkATP" />
<set-fault ref="setFault" pop-class="beijing-01__systerm" /> <SpeedLimit ref="speedLimit" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
</div> </div>
</template> </template>
@ -20,25 +18,21 @@
import PopMenu from '@/components/PopMenu'; import PopMenu from '@/components/PopMenu';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo'; import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import SetFault from '@/jmapNew/theme/components/menus/dialog/setFault'; 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 TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine'; import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove'; import TrainMove from './dialog/trainMove';
import TrainEdit from './dialog/trainEdit';
import TrainSetPlan from './dialog/trainSetPlan'; import TrainSetPlan from './dialog/trainSetPlan';
import TrainMoveEvently from './dialog/trainMoveEvently';
import TrainDeletePlan from './dialog/trainDeletePlan';
import TrainSetHead from './dialog/trainSetHead'; import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork'; import TrainSetWork from './dialog/trainSetWork';
import TrainFlag from './dialog/trainFlag'; import trainSetWorkATP from './dialog/trainSetWorkATP';
// import { mouseCancelState } from '@/jmapNew/theme/components/utils/menuItemStatus'; import SpeedLimit from '@/jmapNew/theme/components/menus/dialog/trainSpeedLimit';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; 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 CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate, commitTrainSend } from '@/jmapNew/theme/components/utils/menuOperate';
export default { export default {
name: 'MenuTrain', name: 'MenuTrain',
@ -48,14 +42,12 @@ export default {
TrainDelete, TrainDelete,
TrainDefine, TrainDefine,
TrainMove, TrainMove,
TrainEdit,
TrainSetPlan, TrainSetPlan,
TrainMoveEvently,
TrainDeletePlan,
TrainSetHead, TrainSetHead,
TrainSetWork, TrainSetWork,
TrainFlag, trainSetWorkATP,
SetFault SetFault,
SpeedLimit
}, },
props: { props: {
selected: { selected: {
@ -71,161 +63,94 @@ export default {
menuNormal: { menuNormal: {
Local: [ Local: [
// { // {
// label: '', // label: '',
// handler: this.addTrainId, // handler: this.addTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }, // },
// { // {
// label: '', // label: '',
// handler: this.delTrainId, // handler: this.delTrainId,
// }, // cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// {
// label: '',
// handler: this.editTrainId,
// }, // },
// { // {
// label: '', // label: '',
// handler: this.moveTrainId, // handler: this.moveTrainId,
// }, // cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// {
// 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,
// }, // },
// { // {
// label: '', // label: '',
// handler: this.addPlanTrain, // handler: this.addPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan // 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: '设置计划车', label: '设置计划车',
handler: this.setPlanTrain, handler: this.setPlanTrain,
@ -240,6 +165,37 @@ export default {
label: '设置人工车', label: '设置人工车',
handler: this.setWorkTrain, handler: this.setWorkTrain,
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL 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: '进路闭塞法行车', label: '进路闭塞法行车',
handler: this.routeBlockRun handler: this.routeBlockRun
}, },
{
label: '限速指令',
handler: this.handleSpeedLimit
},
{ {
label: '越引导信号行驶', label: '越引导信号行驶',
handler: this.handleOverFuideSignal handler: this.handleOverFuideSignal
}, },
{
label: 'URM模式驾驶',
handler: this.handleURMTrain
},
{ {
label: '越红灯行驶', label: '越红灯行驶',
handler: this.handleOverEedLight handler: this.handleOverEedLight
},
{
label: '开/关门',
handler: this.handleOpenCloseDoor
} }
], ],
menuSpeed: [ menuSpeed: [
{ {
label: '确认运行至前方站', label: '限速行驶',
handler: this.limitSpeed handler: this.limitSpeed
} }
] ]
@ -307,12 +275,7 @@ export default {
}, },
initMenu() { initMenu() {
// //
// this.menu = trainMenuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(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.operatemode === OperateMode.FAULT) {
if (!this.$store.state.scriptRecord.bgSet) { if (!this.$store.state.scriptRecord.bgSet) {
@ -327,8 +290,6 @@ export default {
this.menu = [...this.menuDirective]; this.menu = [...this.menuDirective];
} }
} }
// this.menu = menuConvert(this.menu);
}, },
doShow(point) { doShow(point) {
this.clickEvent(); this.clickEvent();
@ -416,6 +377,34 @@ export default {
this.$refs.noticeInfo.doShow(error.message); 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() { limitSpeed() {
const operate = { const operate = {
@ -424,14 +413,14 @@ export default {
code: this.selected.code, code: this.selected.code,
operation: OperationEvent.Train.limitSpeed.menu.operation operation: OperationEvent.Train.limitSpeed.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else { } else {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
} }
}).catch(() => { }).catch(() => {
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow();
}); });
}, },
undeveloped() { undeveloped() {
@ -442,62 +431,58 @@ export default {
} }
}); });
}, },
// //
addTrainId() { addTrainId() {
const operate = { const operate = {
start: true, start: true,
code: this.selected.code, 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) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDefine.doShow(operate, this.selected); this.$refs.trainDefine.doShow(operate, this.selected);
} }
}); });
}, },
// //
delTrainId() { delTrainId() {
const operate = { const operate = {
start: true, start: true,
code: this.selected.code, 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) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(operate, this.selected); this.$refs.trainDelete.doShow(operate, this.selected);
} }
}); });
}, },
// //
moveTrainId() { moveTrainId() {
const operate = { const operate = {
start: true, start: true,
code: this.selected.code, 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) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(operate, this.selected); 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() { setPlanTrain() {
const operate = { 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() { setHeadTrain() {
const operate = { const operate = {
@ -573,31 +530,37 @@ export default {
} }
}); });
}, },
// // ATP
trainToFlag() { setTrainATPdel() {
const operate = { const operate = {
start: true, start: true,
code: this.selected.code, 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) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainFlag.doShow(operate, this.selected); this.$refs.trainSetWorkATP.doShow(operate, this.selected);
} }
}); });
}, },
// // ATP
trainUnFlag() { setTrainATPRec() {
const operate = { const operate = {
start: true, start: true,
code: this.selected.code, 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) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainFlag.doShow(operate, this.selected); this.$refs.trainSetWorkATP.doShow(operate, this.selected);
} }
}); });
} }

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm alarm-detail" class="ningbo-01__systerm alarm-detail"
:title="level+'级告警详细信息'" :title="level+'级告警详细信息'"
:visible.sync="show" :visible.sync="show"
width="760px" width="760px"

View File

@ -1,7 +1,7 @@
<template> <template>
<el-dialog <el-dialog
v-dialogDrag v-dialogDrag
class="beijing-01__systerm cmd-notice" class="ningbo-01__systerm cmd-notice"
title="操作命令提示" title="操作命令提示"
:visible.sync="show" :visible.sync="show"
width="400px" width="400px"
@ -86,7 +86,7 @@ export default {
operation: OperationEvent.Command.close.notice.operation 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 }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.doClose(); this.doClose();
@ -95,9 +95,10 @@ export default {
}, },
commit() { commit() {
const operate = { const operate = {
type: this.operate.type,
operation: OperationEvent.Command.close.notice.operation 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 }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
this.doClose(); this.doClose();

View File

@ -3,6 +3,8 @@ import deviceType from '../../constant/deviceType';
class Model { class Model {
constructor() { constructor() {
this.screenLine = 3; this.screenLine = 3;
this.screenSplit = ['5165', '10303'];
this.screenDifference = 180;
// 公共字段部分默认初始值 // 公共字段部分默认初始值
this['public'] = {}; this['public'] = {};
this['public'][deviceType.Signal] = { this['public'][deviceType.Signal] = {
@ -37,10 +39,19 @@ class Model {
this['private'][deviceType.Train] = { this['private'][deviceType.Train] = {
}; };
this['private'][deviceType.TrainWindow] = { 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) { initPublicProps(model) {
if (model) { if (model) {
var modelInitial = this.public[model._type]; var modelInitial = this.public[model._type];

File diff suppressed because it is too large Load Diff

View File

@ -93,8 +93,6 @@ const MapPreviewNew = () => import('@/views/designPlatform/mapPreviewNew');
const BigScreen = () => import('@/views/designPlatform/bigScreen'); const BigScreen = () => import('@/views/designPlatform/bigScreen');
const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen'); const BigSplitScreen = () => import('@/views/designPlatform/bigSplitScreen');
// const DesignPlatformUser = () => import('@/views/designUser/index');
const Package = () => import('@/views/package/index'); const Package = () => import('@/views/package/index');
const PublishMap = () => import('@/views/publish/publishMap/index'); const PublishMap = () => import('@/views/publish/publishMap/index');