调整宁波线右键菜单显示

This commit is contained in:
zyy 2020-01-03 15:50:26 +08:00
parent 2c01e8ace1
commit 4f2fb97477
15 changed files with 1134 additions and 579 deletions

View File

@ -1,6 +1,15 @@
<template> <template>
<el-dialog class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> class="ningbo-01__systerm alxe-effective"
:title="title"
:visible.sync="show"
width="420px"
:before-close="doClose"
:zIndex="2000"
:modal="false"
:close-on-click-modal="false"
v-dialogDrag
>
<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">
@ -10,14 +19,28 @@
</el-row> </el-row>
<el-row type="flex" justify="left"> <el-row type="flex" justify="left">
<el-col :span="9"> <el-col :span="9">
<el-input :type="type" v-model="model.stationName" size="mini" :disabled="true"></el-input> <el-input
:type="type"
v-model="model.stationName"
size="mini"
:disabled="true"
></el-input>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-input :type="type" v-model="model.sectionName" size="mini" :disabled="true"></el-input> <el-input
:type="type"
v-model="model.sectionName"
size="mini"
:disabled="true"
></el-input>
</el-col> </el-col>
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm1" size="mini" @click="commitOnce" :disabled="type==='password'">确认 <el-button
</el-button> :id="domIdConfirm1"
size="mini"
@click="commitOnce"
:disabled="type==='password'"
>确认</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -31,41 +54,63 @@
</el-row> </el-row>
<el-row type="flex" justify="left"> <el-row type="flex" justify="left">
<el-col :span="9"> <el-col :span="9">
<el-select :id="domIdChoose1" v-model="model.confirmStationName" filterable size="mini" <el-select
@change="stationSelectChange" :disabled="type==='text'"> :id="domIdChoose1"
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" v-model="model.confirmStationName"
:value="option.name"> filterable
</el-option> size="mini"
@change="stationSelectChange"
:disabled="type==='text'"
>
<el-option
v-for="(option,index) in filterStationList"
:key="index"
:label="option.name"
:value="option.name"
></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable size="mini" <el-select
@change="sectionSelectChange" :disabled="type==='text'"> :id="domIdChoose2"
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" v-model="model.confirmSectionName"
:value="option.name"> filterable
</el-option> size="mini"
@change="sectionSelectChange"
:disabled="type==='text'"
>
<el-option
v-for="(option,index) in randomSectionList"
:key="index"
:label="option.name"
:value="option.name"
></el-option>
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="4" :offset="1"> <el-col :span="4" :offset="1">
<el-button :id="domIdConfirm2" size="mini" :loading="loading" @click="commit" <el-button
:disabled="type==='text'">确认</el-button> :id="domIdConfirm2"
size="mini"
:loading="loading"
@click="commit"
:disabled="type==='text'"
>确认</el-button>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
</div> </div>
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;"> <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> <el-input v-model="model.time" size="mini" :readonly="true"></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="1"> 状态</el-col> <el-col :offset="1">状态</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :offset="1" :span="23"> <el-col :offset="1" :span="23">
<el-input type="textarea" :rows="2" placeholder="" v-model="model.status"> <el-input type="textarea" :rows="2" placeholder v-model="model.status"></el-input>
</el-input>
</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">
@ -79,336 +124,450 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from "vuex";
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import {
import { mouseCancelState } from '../utils/menuItemStatus'; MapDeviceType,
import NoticeInfo from './childDialog/childDialog/noticeInfo' OperationEvent,
import PopupAlarm from './childDialog/popupAlarm'; getDomIdByOperation
} from "@/scripts/ConstDic";
import { mouseCancelState } from "../utils/menuItemStatus";
import NoticeInfo from "./childDialog/childDialog/noticeInfo";
import PopupAlarm from "./childDialog/popupAlarm";
export default { export default {
name: 'AlxeEffective', name: "AlxeEffective",
components: { components: {
NoticeInfo, NoticeInfo,
PopupAlarm PopupAlarm
},
data() {
return {
dialogShow: false,
loading: false,
type: "text",
timeout: 1000,
timenum: 30,
stepNum: 0,
task: null,
model: {
stationName: "",
sectionName: "",
confirmStationName: "",
confirmSectionName: "",
status: "",
time: 0
},
selected: null,
operate: null,
operation: "",
randomSectionList: []
};
},
computed: {
...mapGetters("map", ["stationList", "sectionList"]),
filterStationList() {
let i = 0,
list = [];
if (this.stationList) {
this.stationList.forEach(elem => {
if (
list.findIndex(it => {
return it.name == elem.name;
}) < 0
) {
list.push({ name: elem.name });
}
});
}
return list;
}, },
data() { show() {
return { return this.dialogShow && !this.$store.state.menuOperation.break;
dialogShow: false, },
loading: false, domIdConfirm1() {
type: 'text', if (this.dialogShow) {
timeout: 1000, if (
timenum: 30, this.operation ==
stepNum: 0, OperationEvent.Section.alxeEffective.menu.operation
task: null, ) {
model: { return OperationEvent.Section.alxeEffective.confirm1.domId;
stationName: '', } else if (
sectionName: '', this.operation ==
confirmStationName: '', OperationEvent.Switch.alxeEffective.menu.operation
confirmSectionName: '', ) {
status: '', return OperationEvent.Switch.alxeEffective.confirm1.domId;
time: 0, }
},
selected: null,
operate: null,
operation: '',
randomSectionList: []
} }
}, },
computed: { domIdConfirm2() {
...mapGetters('map', [ if (this.dialogShow) {
'stationList', if (
'sectionList' this.operation ==
]), OperationEvent.Section.alxeEffective.menu.operation
filterStationList() { ) {
let i = 0, list = []; return OperationEvent.Section.alxeEffective.confirm2.domId;
if (this.stationList) { } else if (
this.stationList.forEach(elem => { this.operation ==
if (list.findIndex(it => { return it.name == elem.name }) < 0) { OperationEvent.Switch.alxeEffective.menu.operation
list.push({ name: elem.name }); ) {
} return OperationEvent.Switch.alxeEffective.confirm2.domId;
});
} }
return list; }
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.confirm2.domId;
}
}
},
domIdChoose1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.choose1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.choose1.domId;
}
}
},
domIdChoose2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
return OperationEvent.Section.alxeEffective.choose2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return OperationEvent.Switch.alxeEffective.choose2.domId;
}
}
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
title() {
this.earlyDepar = false;
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
return '确认计轴恢复工作';
}
},
}, },
watch: { domIdChoose1() {
'model.sectionName': function (name) { if (this.dialogShow) {
let index = Math.floor(Math.random(1) * 5); if (
for (var i = 0; i < 5; i++) { this.operation ==
if (i == index) { OperationEvent.Section.alxeEffective.menu.operation
this.randomSectionList.push({ name }); ) {
} else { return OperationEvent.Section.alxeEffective.choose1.domId;
let section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)]; } else if (
if (section.type != '02') { this.operation ==
if (this.randomSectionList.findIndex(it => { return it.name == section.name }) < 0) { OperationEvent.Switch.alxeEffective.menu.operation
this.randomSectionList.push({ name: section.name }); ) {
} else { return OperationEvent.Switch.alxeEffective.choose1.domId;
i--; }
} }
},
domIdChoose2() {
if (this.dialogShow) {
if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
return OperationEvent.Section.alxeEffective.choose2.domId;
} else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return OperationEvent.Switch.alxeEffective.choose2.domId;
}
}
},
domIdCancel() {
return this.dialogShow
? OperationEvent.Command.cancel.menu.domId
: "";
},
title() {
this.earlyDepar = false;
if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation ||
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return "确认计轴恢复工作";
}
return "";
}
},
watch: {
"model.sectionName": function(name) {
let index = Math.floor(Math.random(1) * 5);
for (var i = 0; i < 5; i++) {
if (i == index) {
this.randomSectionList.push({ name });
} else {
let 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 { } else {
i--; i--;
} }
} else {
i--;
} }
} }
} }
}, }
mounted() { },
this.$nextTick(() => { mounted() {
this.$store.dispatch('training/tipReload'); this.$nextTick(() => {
}) this.$store.dispatch("training/tipReload");
}, });
methods: { },
stopTask() { methods: {
if (this.task) { stopTask() {
clearInterval(this.task); if (this.task) {
this.task = null; clearInterval(this.task);
} this.task = null;
}
if (this.stepNum < 3) { if (this.stepNum < 3) {
this.$store.dispatch('training/backSteps', this.stepNum); this.$store.dispatch("training/backSteps", this.stepNum);
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch("training/emitTipFresh");
this.model.name = ''; this.model.name = "";
this.model.time = ''; this.model.time = "";
this.type = 'text'; this.type = "text";
} }
}, },
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
this.operate = operate || {}; this.operate = operate || {};
this.operation = operate.operation; this.operation = operate.operation;
this.status = ''; this.status = "";
this.model.stationName = ''; this.model.stationName = "";
this.model.sectionName = ''; this.model.sectionName = "";
this.model.confirmStationName = ''; this.model.confirmStationName = "";
this.model.confirmSectionName = ''; this.model.confirmSectionName = "";
if (selected) { if (selected) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (
if (selected.isSwitchSection) { selected &&
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); selected._type.toUpperCase() === "Section".toUpperCase()
if (section) { ) {
this.model.sectionName = section.name; if (selected.isSwitchSection) {
} let section = this.$store.getters[
} else { "map/getDeviceByCode"
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); ](selected.parentCode);
if (section) {
this.model.sectionName = section.name;
this.model.sectionName = `${section.name}-${selected.name}`;
} else {
this.model.sectionName = `${selected.name}`;
}
}
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
let section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
if (section) { if (section) {
this.model.sectionName = section.name; this.model.sectionName = section.name;
} }
} else {
let section = this.$store.getters[
"map/getDeviceByCode"
](selected.parentCode);
if (section) {
this.model.sectionName = section.name;
this.model.sectionName = `${section.name}-${selected.name}`;
} else {
this.model.sectionName = `${selected.name}`;
}
} }
} else if (
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); selected._type.toUpperCase() === "Switch".toUpperCase()
if (station) { ) {
this.model.stationName = station.name; let section = this.$store.getters["map/getDeviceByCode"](
selected.switchSectionCode
);
if (section) {
this.model.sectionName = section.name;
} }
} }
this.stepNum = 0; let station = this.$store.getters["map/getDeviceByCode"](
this.loading = false; selected.stationCode
this.dialogShow = true; );
this.stopTask(); if (station) {
this.$nextTick(function () { this.model.stationName = station.name;
this.$store.dispatch('training/emitTipFresh'); }
}
this.stepNum = 0;
this.loading = false;
this.dialogShow = true;
this.stopTask();
this.$nextTick(function() {
this.$store.dispatch("training/emitTipFresh");
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch("training/emitTipFresh");
mouseCancelState(this.selected);
},
waitSelectEvent() {
if (!this.$store.state.menuOperation.break) {
this.model.time -= 1;
if (this.model.time <= 0) {
this.stopTask();
}
}
},
commitOnce() {
this.stepNum = 1;
let operate = {
type: this.operate.type,
operation: ""
};
if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
operate.operation =
OperationEvent.Section.alxeEffective.confirm1.operation;
} else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
operate.operation =
OperationEvent.Switch.alxeEffective.confirm1.operation;
}
this.$store.dispatch("training/next", operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch("menuOperation/handleBreakFlag", {
break: true
});
this.type = "password";
this.model.time = this.timenum;
this.task = setInterval(this.waitSelectEvent, this.timeout);
}
});
},
stationSelectChange(val) {
if (this.model.confirmStationName === this.model.stationName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
let operate = {
type: this.operate.type,
operation: "",
val: val
};
if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
operate.operation =
OperationEvent.Section.alxeEffective.choose1.operation;
} else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
operate.operation =
OperationEvent.Switch.alxeEffective.choose1.operation;
}
this.$store.dispatch("training/next", operate).then(({ valid }) => {
this.$store.dispatch("menuOperation/handleBreakFlag", {
break: true
}); });
}, });
doClose() { },
this.dialogShow = false; sectionSelectChange(val) {
this.$store.dispatch('training/emitTipFresh'); if (this.model.confirmSectionName === this.model.sectionName) {
mouseCancelState(this.selected); this.stepNum = 2;
}, } else {
waitSelectEvent() { this.model.time = 0;
if (!this.$store.state.menuOperation.break) { }
this.model.time -= 1;
if (this.model.time <= 0) {
this.stopTask();
}
}
},
commitOnce() {
this.stepNum = 1;
let operate = {
type: this.operate.type,
operation: ''
}
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { let operate = {
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation type: this.operate.type,
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { operation: "",
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation val: val
} };
this.$store.dispatch('training/next', operate).then(({ valid }) => { if (
if (valid) { this.operation ==
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); OperationEvent.Section.alxeEffective.menu.operation
this.type = 'password'; ) {
this.model.time = this.timenum; operate.operation =
this.task = setInterval(this.waitSelectEvent, this.timeout); OperationEvent.Section.alxeEffective.choose2.operation;
} } else if (
}) this.operation ==
}, OperationEvent.Switch.alxeEffective.menu.operation
stationSelectChange(val) { ) {
if (this.model.confirmStationName === this.model.stationName) { operate.operation =
this.stepNum = 2; OperationEvent.Switch.alxeEffective.choose2.operation;
} else { }
this.model.time = 0;
}
let operate = { this.$store.dispatch("training/next", operate).then(({ valid }) => {
type: this.operate.type, this.$store.dispatch("menuOperation/handleBreakFlag", {
operation: '', break: true
val: val });
} });
},
/** 确认计轴恢复工作*/
commit() {
let operate = {
send: true,
type: this.operate.type,
operation: "",
val: this.selected.code
};
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation this.operation ==
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { OperationEvent.Section.alxeEffective.menu.operation
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation ) {
} operate.operation =
OperationEvent.Section.alxeEffective.confirm2.operation;
} else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
operate.operation =
OperationEvent.Switch.alxeEffective.confirm2.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.model.status = "";
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); if (
}) this.model.stationName == this.model.confirmStationName &&
}, this.model.sectionName == this.model.confirmSectionName
sectionSelectChange(val) { ) {
if (this.model.confirmSectionName === this.model.sectionName) { this.stepNum = 3;
this.stepNum = 2;
} else {
this.model.time = 0;
}
let operate = { this.loading = true;
type: this.operate.type, this.$store
operation: '', .dispatch("training/next", operate)
val: val .then(({ valid }) => {
}
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
})
},
/** 确认计轴恢复工作*/
commit() {
let operate = {
send: true,
type: this.operate.type,
operation: '',
val: this.selected.code
}
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation
}
this.model.status = '';
if (this.model.stationName == this.model.confirmStationName &&
this.model.sectionName == this.model.confirmSectionName) {
this.stepNum = 3;
this.loading = true;
this.$store.dispatch('training/next', 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.$store.dispatch(
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }), "menuOperation/handleBreakFlag",
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]); {
break: true
}
);
this.$refs.popupAlarm.doShow(
Object.assign(this.operate, {
val: operate.val
}),
[
`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`
]
);
} }
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
}) })
} else { .catch(error => {
if (this.model.stationName != this.model.confirmStationName) { this.$refs.noticeInfo.doShow(operate);
this.model.status = '车站选择错误'; });
} else if (this.model.sectionName != this.model.confirmSectionName) { } else {
this.model.status = '区段选择错误'; if (this.model.stationName != this.model.confirmStationName) {
} this.model.status = "车站选择错误";
} else if (
} this.model.sectionName != this.model.confirmSectionName
}, ) {
cancel() { this.model.status = "区段选择错误";
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
} }
}
},
cancel() {
let operate = {
type: this.operate.type,
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 => { })
.catch(error => {
this.doClose(); this.doClose();
}); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.alxe-effective .context { .alxe-effective .context {
height: 80px !important; height: 80px !important;
} }
</style> </style>

View File

@ -1,223 +1,245 @@
<template> <template>
<el-dialog class="ningbo-01__systerm signal-control" :title="title" :visible.sync="show" width="300px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row class="header"> class="ningbo-01__systerm signal-control"
<el-col :span="11"><span>集中站</span></el-col> :title="title"
<el-col :span="11" :offset="2"><span>信号机</span></el-col> :visible.sync="show"
</el-row> width="300px"
<el-row> :before-close="doClose"
<el-col :span="11"> :z-index="2000"
<el-input v-model="stationName" size="small" disabled></el-input> :modal="false"
</el-col> :close-on-click-modal="false"
<el-col :span="11" :offset="2"> >
<el-input v-model="signalName" size="small" disabled></el-input> <el-row class="header">
</el-col> <el-col :span="11"><span>集中站</span></el-col>
</el-row> <el-col :span="11" :offset="2"><span>信号机</span></el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="10" :offset="2"> <el-row>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-col :span="11">
</el-col> <el-input v-model="stationName" size="small" disabled />
<el-col :span="8" :offset="4"> </el-col>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-col :span="11" :offset="2">
</el-col> <el-input v-model="signalName" size="small" disabled />
</el-row> </el-col>
<confirm-control ref="confirmControl"></confirm-control> </el-row>
<notice-info ref="noticeInfo"></notice-info> <div v-if="passModel" style="margin: 12px 0;">
</el-dialog> <el-radio :id="upRadioId" v-model="passRadio" label="1" style="display: block; padding-left: 10px; margin-bottom: 10px;" @change="changeRadio">设置自动通过</el-radio>
<el-radio :id="upRadioId" v-model="passRadio" label="2" style="display: block; padding-left: 10px;" @change="changeRadio">取消自动通过</el-radio>
</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>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import ConfirmControl from './childDialog/confirmControl'; import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteControl', name: 'RouteControl',
components: { components: {
ConfirmControl, ConfirmControl,
NoticeInfo NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
stationName: '',
signalName: '',
passRadio: '1',
passModel: false //
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
data() { domIdCancel() {
return { return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
dialogShow: false, },
loading: false, domIdConfirm() {
selected: null, return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
operation: null, },
stationName: '', title() {
signalName: '' if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消列车进路';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号';
} else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
return '信号机控制';
} }
}, return '';
computed: { }
show() { },
return this.dialogShow && !this.$store.state.menuOperation.break; mounted() {
}, this.$nextTick(() => {
domIdCancel() { this.$store.dispatch('training/tipReload');
return this.dialogShow ? OperationEvent.Command.close.menu.domId : ''; });
}, },
domIdConfirm() { methods: {
return this.dialogShow ? getDomIdByOperation(this.operation) : ''; doShow(operate, selected) {
}, this.selected = selected;
title() { if (!this.dialogShow) {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) { this.passModel = false;
return '取消列车进路'; this.signalName = '';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) { this.stationName = '';
return '信号关灯'; if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) { this.signalName = selected.name;
return '重开信号'; const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
} if (station) {
} this.stationName = station.name;
},
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() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
} }
this.operation = operate.operation;
} }
this.dialogShow = true; this.operation = operate.operation;
this.$nextTick(function () { if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
this.$store.dispatch('training/emitTipFresh'); this.passModel = true;
}); }
}, }
doClose() { this.dialogShow = true;
this.loading = false; this.$nextTick(function () {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); });
}, },
commit() { doClose() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) { this.loading = false;
/** 取消列车进路*/ this.dialogShow = false;
this.cancelTrainRoute(); this.$store.dispatch('training/emitTipFresh');
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) { mouseCancelState(this.selected);
/** 信号关灯*/ },
this.signalClose(); changeRadio() {
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
}
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
}
this.loading = true; },
this.$store.dispatch('training/next', operate).then(({ valid }) => { commit() {
this.loading = false; if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
if (valid) { /** 取消列车进路*/
this.doClose(); this.cancelTrainRoute();
} } else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
}).catch(error => { /** 信号关灯*/
this.loading = false; this.signalClose();
this.doClose(); } else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
this.$refs.noticeInfo.doShow(operate); /** 信号重开*/
}); this.reopenSignal();
}, } else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
// this.reopenSignal();
cancelTrainRouteByCentral() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`],
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(error => {
this.loading = false;
});
},
//
reopenSignal() {
let operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
}
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} }
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}
},
//
cancelTrainRouteByLocal() {
const operate = {
send: true,
operation: OperationEvent.Signal.cancelTrainRoute.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();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRouteByCentral() {
const operate = {
send: true,
operation: OperationEvent.Signal.cancelTrainRoute.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();
this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
const operate = {
operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`]
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate);
}
}).catch(() => {
this.loading = false;
});
},
//
reopenSignal() {
const operate = {
send: true,
operation: OperationEvent.Signal.reopenSignal.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();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancel() {
const operate = {
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
} }
} }
</script> };
</script>

View File

@ -0,0 +1,229 @@
<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 style="margin-top: -13px; padding: 20px 0px 5px 0;">
<el-col :span="11">
<span>上行线路{{ title }}</span>
<el-table ref="multipleTable" :data="standList" tooltip-effect="dark" height="400" style="width: 100%;margin: 5px 0;" @selection-change="handleSelectionChange">
<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-radio v-model="radio" label="1" style="display: block; text-align: left;margin-bottom: 5px;">正向扣车</el-radio>
<el-radio v-model="radio" label="2" style="display: block; text-align: left;">反向扣车</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<span>下行线路{{ title }}</span>
<el-table ref="multipleTable" :data="standList" tooltip-effect="dark" height="400" style="width: 100%;margin: 5px 0;" @selection-change="handleSelectionChange">
<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-radio v-model="radio" label="3" style="display: block; text-align: left;margin-bottom: 5px;">正向扣车</el-radio>
<el-radio v-model="radio" label="4" style="display: block; text-align: left;">反向扣车</el-radio>
</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" />
</el-dialog>
</template>
<script>
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
export default {
name: 'StandDetainTrain',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
operation: null,
standCode: '',
radio: '1'
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
standList() {
let list = [];
if (this.stationStandList && this.stationStandList.length) {
list = this.stationStandList.filter(elem => { return !elem.small; });
}
return list;
},
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) : '';
},
upRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.upSelect.domId : '';
},
downRadioId() {
return this.dialogShow ? OperationEvent.StationStand.earlyDeparture.downSelect.domId : '';
},
title() {
if (this.operation == OperationEvent.StationStand.setBulkBuckleTrain.menu.operation) {
return '设置扣车';
} else if (this.operation == OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation) {
return '设置取消扣车';
}
return '';
}
},
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.operation = operate.operation;
this.standCode = operate.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.operation = '';
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
changeRadio(val) { //
const operate = {
operation: '',
val: val
};
if (val == 1) {
operate.operation = OperationEvent.StationStand.earlyDeparture.upSelect.operation;
} else if (val == 2) {
operate.operation = OperationEvent.StationStand.earlyDeparture.downSelect.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
commit() {
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
/** 设置扣车*/
this.setDetainTrain();
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
/** 取消扣车*/
this.cancelDetainTrain();
}
},
//
setDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
param: {
StationStand_Code: this.standCode
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelDetainTrain() {
const operate = {
over: true,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
param: {
StationStand_Code: this.standCode
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
this.doClose();
if (!valid) {
this.$refs.noticeInfo.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
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 scope>
</style>

View File

@ -12,7 +12,7 @@
<el-input v-model="standName" size="small" disabled /> <el-input v-model="standName" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<div v-if="!earlyDepar"> <div v-if="buckle">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"> <div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;"> <el-row style="margin-top: -13px;">
@ -60,6 +60,30 @@
</el-row> </el-row>
</div> </div>
</div> </div>
<div v-if="AutomaticBuckle">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="autoRadio" label="1" style="display: block; text-align: left;">上行</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="autoRadio" label="2" style="display: block; text-align: left;">下行</el-radio>
</el-col>
</el-row>
</div>
<div style="padding: 15px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">功能</span>
<el-row style="margin-top: -13px;">
<el-col :span="11">
<el-radio v-model="autoRadio1" label="1" :disabled="autoRadio1 == '2'" style="display: block; text-align: left;">设置</el-radio>
</el-col>
<el-col :span="11" :offset="2">
<el-radio v-model="autoRadio1" label="2" :disabled="autoRadio1 == '1'" style="display: block; text-align: left;">取消</el-radio>
</el-col>
</el-row>
</div>
</div>
<div v-if="earlyDepar"> <div v-if="earlyDepar">
<div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;"> <div style="padding: 15px; margin-bottom: 25px; margin-top: 20px; border: 1px solid lightgray;">
<span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span> <span class="base-label" style="left: -5px; top: -22px; background: #f0f0f0; padding: 0 4px;">类型</span>
@ -122,8 +146,12 @@ export default {
radio: '1', radio: '1',
radio1: '1', radio1: '1',
radio2: '1', radio2: '1',
earlyDepar: false, earlyDepar: false, //
standCode: '' buckle: true, //
AutomaticBuckle: false, //
standCode: '',
autoRadio: '1',
autoRadio1: '1'
}; };
}, },
computed: { computed: {
@ -149,6 +177,10 @@ export default {
return '取消扣车'; return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return '提前发车'; return '提前发车';
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
return '区间自动扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
return '区间自动扣车';
} }
return ''; return '';
} }
@ -190,9 +222,13 @@ export default {
}, },
setDefaultItems() { // setDefaultItems() { //
this.earlyDepar = false; this.earlyDepar = false;
this.buckle = false;
this.AutomaticBuckle = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) { if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.buckle = true;
this.radio1 = '1'; this.radio1 = '1';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) { } else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.buckle = true;
this.radio1 = '2'; this.radio1 = '2';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) { } else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true; this.earlyDepar = true;
@ -201,6 +237,12 @@ export default {
} else { } else {
this.radio2 = '1'; this.radio2 = '1';
} }
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
this.AutomaticBuckle = true;
this.autoRadio1 = '1';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
this.AutomaticBuckle = true;
this.autoRadio1 = '2';
} }
}, },
doClose() { doClose() {

View File

@ -51,7 +51,7 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ Local: [
{ {
label: '区段故障解锁', label: '区段故障解锁',
handler: this.fault, handler: this.fault,
@ -78,7 +78,7 @@ export default {
cmdType: CMD.Section.CMD_SECTION_UNBLOCK cmdType: CMD.Section.CMD_SECTION_UNBLOCK
} }
], ],
central: [ Center: [
{ {
label: '区段跟踪激活', label: '区段跟踪激活',
handler: this.active, handler: this.active,
@ -92,7 +92,7 @@ export default {
{ {
label: '确认计轴有效', label: '确认计轴有效',
handler: this.alxeEffective, handler: this.alxeEffective,
cmdType: '' cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
}, },
{ {
label: '设置临时限速', label: '设置临时限速',

View File

@ -20,10 +20,7 @@ import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl'; import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail'; import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
// import { mapGetters } from 'vuex';
// import { OperateMode } from '@/scripts/ConstDic';
// import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
// import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus'; import { mouseCancelState } from './utils/menuItemStatus';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -56,7 +53,7 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ Local: [
{ {
label: '排列进路', label: '排列进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
@ -91,14 +88,14 @@ export default {
label: '进路交自动控', label: '进路交自动控',
handler: this.atsAutoControl, handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}, },
{ {
label: '查询进路控制状态', label: '查询进路控制状态',
handler: this.detail, handler: this.detail,
cmdType: '' cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
} }
], ],
central: [ Center: [
{ {
label: '设置进路', label: '设置进路',
handler: this.arrangementRoute, handler: this.arrangementRoute,
@ -124,10 +121,15 @@ export default {
handler: this.atsAutoControl, handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
}, },
{
label: '设置/取消通过模式',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_PASS_MODEL
},
{ {
label: '查询进路控制状态', label: '查询进路控制状态',
handler: this.detail, handler: this.detail,
cmdType: '' cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
} }
] ]
}, },
@ -157,7 +159,10 @@ export default {
]), ]),
...mapGetters('menuOperation', [ ...mapGetters('menuOperation', [
'buttonOperation' 'buttonOperation'
]) ]),
group() {
return this.$route.query.group;
}
}, },
watch: { watch: {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
@ -253,7 +258,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) { if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => { querySignalStatus(this.group, {signalCode: this.selected.code}).then(resp => {
const tempData = resp.data; const tempData = resp.data;
this.$refs.routeSelection.doShow(step.operation, this.selected, tempData); this.$refs.routeSelection.doShow(step.operation, this.selected, tempData);
}); });
@ -390,6 +395,23 @@ export default {
} }
}); });
}, },
// /
singalPassModel() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Signal.singalPassModel.menu.operation,
param: {
Signal_Code: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.routeControl.doShow(operate, this.selected);
}
});
},
// //
detail() { detail() {
const operate = { const operate = {

View File

@ -41,7 +41,7 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ Local: [
{ {
label: '全站设置联锁自动触发', label: '全站设置联锁自动触发',
handler: this.setAutoTrigger, handler: this.setAutoTrigger,
@ -67,7 +67,7 @@ export default {
auth: { station: true, center: false } auth: { station: true, center: false }
} }
], ],
central: [ Center: [
{ {
label: '所有进路自排关', label: '所有进路自排关',
handler: this.humanControlALL, handler: this.humanControlALL,

View File

@ -9,6 +9,7 @@
<stand-detain-train-all ref="standDetainTrainAll" /> <stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" /> <notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" /> <stand-back-strategy ref="standBackStrategy" />
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
</div> </div>
</template> </template>
@ -20,6 +21,7 @@ import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail'; import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel'; import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime'; import StandStopTime from './dialog/standStopTime';
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
import StandDetainTrainAll from './dialog/standDetainTrainAll'; import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
@ -36,6 +38,7 @@ export default {
PopMenu, PopMenu,
StandControl, StandControl,
StandJumpStopControl, StandJumpStopControl,
StandBulkBuckleTrain,
StandDetail, StandDetail,
StandRunLevel, StandRunLevel,
NoticeInfo, NoticeInfo,
@ -88,6 +91,16 @@ 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.setBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
},
{
label: '批量取消扣车',
handler: this.cancelBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
},
{ {
label: '提前发车', label: '提前发车',
handler: this.earlyDeparture, handler: this.earlyDeparture,
@ -113,18 +126,16 @@ export default {
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.setDetainTrainAll, handler: this.setDetainTrainAll,
// disabledCallback: MenuDisabledState.StationStand.setDetainTrain, cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
// auth: { station: true, center: true } },
// }, {
// { label: '取消区间列车数量限制',
// label: '', handler: this.cancelDetainTrainAll,
// handler: this.cancelDetainTrainAll, cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
// disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain, },
// auth: { station: true, center: true }
// },
{ {
label: '查看站台信息', label: '查看站台信息',
handler: this.detail, handler: this.detail,
@ -274,7 +285,7 @@ export default {
const step = { const step = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation, operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` StationStand_Code: `${this.selected.code}`
} }
@ -292,7 +303,7 @@ export default {
const step = { const step = {
start: true, start: true,
code: this.selected.code, code: this.selected.code,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation, operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` StationStand_Code: `${this.selected.code}`
} }
@ -304,20 +315,37 @@ export default {
} }
}); });
}, },
// //
cancelDetainTrainForce() { setBulkBuckleTrain() {
const step = { const step = {
start: true, start: true,
code: `${this.selected.code}`, code: this.selected.code,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation, operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
param: { param: {
StationStand_Code: `${this.selected.code}` StationStand_Code: this.selected.code
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standControl.doShow(step, this.selected); this.$refs.standBulkBuckleTrain.doShow(step, this.selected);
}
});
},
//
cancelBulkBuckleTrain() {
const step = {
start: true,
code: this.selected.code,
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
param: {
StationStand_Code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.standBulkBuckleTrain.doShow(step, this.selected);
} }
}); });
}, },

View File

@ -52,7 +52,7 @@ export default {
return { return {
menu: [], menu: [],
menuNormal: { menuNormal: {
local: [ Local: [
{ {
label: '单操到定位', label: '单操到定位',
handler: this.locate, handler: this.locate,
@ -84,7 +84,7 @@ export default {
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
} }
], ],
central: [ Center: [
{ {
label: '轨道切除', label: '轨道切除',
handler: this.split, handler: this.split,
@ -98,7 +98,7 @@ export default {
{ {
label: '确认计轴有效', label: '确认计轴有效',
handler: this.alxeEffective, handler: this.alxeEffective,
cmdType: '' cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
}, },
{ {
label: '设置临时限速', label: '设置临时限速',

View File

@ -27,7 +27,9 @@ export default {
/** 转动 */ /** 转动 */
CMD_SWITCH_TURN: {value:'Switch_Turn', label: '转动'}, CMD_SWITCH_TURN: {value:'Switch_Turn', label: '转动'},
/** 强扳 */ /** 强扳 */
CMD_SWITCH_FORCE_TURN: {value:'Switch_Force_Turn', label: '强扳'} CMD_SWITCH_FORCE_TURN: {value:'Switch_Force_Turn', label: '强扳'},
/** 确认计轴有效 */
CMD_SWITCH_COMFIRMATION_AXLE:{value:'Switch_Comfirmation_Axle', label: '确认计轴有效'}
}, },
// 控制模式操作 // 控制模式操作
@ -79,7 +81,11 @@ export default {
/** 设置联锁自动触发 */ /** 设置联锁自动触发 */
CMD_SIGNAL_SET_CI_AUTO_TRIGGER: {value:'Signal_Set_CI_Auto_Trigger', label: '设置联锁自动触发'}, CMD_SIGNAL_SET_CI_AUTO_TRIGGER: {value:'Signal_Set_CI_Auto_Trigger', label: '设置联锁自动触发'},
/** 取消联锁自动触发 */ /** 取消联锁自动触发 */
CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER: {value:'Signal_Cancel_CI_Auto_Trigger', label: '取消联锁自动触发'} CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER: {value:'Signal_Cancel_CI_Auto_Trigger', label: '取消联锁自动触发'},
/** 设置/取消通过模式 */
CMD_SIGNAL_PASS_MODEL: {value:'Signal_Pass_Model', label: '设置/取消通过模式'},
/** 设置/取消通过模式 */
CMD_SIGNAL_DETAIL: {value:'Signal_Detail', label: '查询进路状态'}
}, },
// 物理区段操作 // 物理区段操作
@ -103,7 +109,9 @@ export default {
/** 故障解锁 */ /** 故障解锁 */
CMD_SECTION_FAULT_UNLOCK: {value:'Section_Fault_Unlock', label: '故障解锁'}, CMD_SECTION_FAULT_UNLOCK: {value:'Section_Fault_Unlock', label: '故障解锁'},
/** 取消临时限速 */ /** 取消临时限速 */
CMD_SECTION_CANCEL_LIMIT_SPEED:{value:'Section_Cancel_Limit_Speed', label: '取消临时限速'} CMD_SECTION_CANCEL_LIMIT_SPEED:{value:'Section_Cancel_Limit_Speed', label: '取消临时限速'},
/** 确认计轴有效 */
CMD_SECTION_COMFIRMATION_AXLE:{value:'Section_Comfirmation_Axle', label: '确认计轴有效'}
}, },
// 站台 // 站台
@ -120,8 +128,16 @@ export default {
CMD_STAND_SET_HOLD_TRAIN: {value:'Stand_Set_Hold_Train', label: '设置扣车'}, CMD_STAND_SET_HOLD_TRAIN: {value:'Stand_Set_Hold_Train', label: '设置扣车'},
/** 取消扣车 */ /** 取消扣车 */
CMD_STAND_CANCEL_HOLD_TRAIN: {value:'Stand_Cancel_Hold_Train', label: '取消扣车'}, CMD_STAND_CANCEL_HOLD_TRAIN: {value:'Stand_Cancel_Hold_Train', label: '取消扣车'},
/** 批量扣车 */
CMD_STAND_SET_HOLD_TRAIN_ALL: {value:'Stand_Set_Hold_Train_All', label: '批量扣车'},
/** 批量取消扣车 */
CMD_STAND_CANCEL_HOLD_TRAIN_ALL: {value:'Stand_Cancel_Hold_Train_All', label: '批量取消扣车'},
/** 强制取消扣车 */ /** 强制取消扣车 */
CMD_STAND_FORCE_CANCEL_HOLD_TRAIN: {value:'Stand_Force_Cancel_Hold_Train', label: '强制取消扣车'}, CMD_STAND_FORCE_CANCEL_HOLD_TRAIN: {value:'Stand_Force_Cancel_Hold_Train', label: '强制取消扣车'},
/** 区间列车数量限制 */
CMD_STAND_SET_HOLD_TRAIN_AUTO: {value:'Stand_Set_Hold_Train_Auto', label: '区间列车数量限制'},
/** 取消区间列车数量限制 */
CMD_STAND_CANCEL_HOLD_TRAIN_AUTO: {value:'Stand_Cancel_Hold_Train_Auto', label: '取消区间列车数量限制'},
/** 全线取消扣车 */ /** 全线取消扣车 */
CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN: {value:'Stand_Whole_Line_Cancel_Hold_Train', label: '全线取消扣车'}, CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN: {value:'Stand_Whole_Line_Cancel_Hold_Train', label: '全线取消扣车'},
/** 提前发车 */ /** 提前发车 */

View File

@ -20,7 +20,7 @@ class MenuContextHandler {
} else if (selected._type == 'Station') { } else if (selected._type == 'Station') {
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.code); control = store.getters['map/getDeviceStationCodeByStationCode'](selected.code);
} else { } else {
control = store.getters['map/getDeviceStationCodeByStationCode'](selected.deviceStationCode); control = store.getters['map/getDeviceStationCodeByStationCode'](selected.stationCode);
} }
return control; return control;
} }

View File

@ -880,6 +880,13 @@ export const OperationEvent = {
operation: '316', operation: '316',
domId: '_Tips-Signal-Detail-Menu' domId: '_Tips-Signal-Detail-Menu'
} }
},
// 查询进路状态
singalPassModel: {
menu: {
operation: '317',
domId: '_Tips-Signal-SingalPassModel-Menu'
}
} }
}, },
@ -1461,6 +1468,34 @@ export const OperationEvent = {
operation: '5142', operation: '5142',
domId: '_Tips-Stand-clearDownCar-confirm' domId: '_Tips-Stand-clearDownCar-confirm'
} }
},
// 批量扣车
setBulkBuckleTrain: {
menu: {
operation: '515',
domId: '_Tips-Stand-setBulkBuckleTrain-Menu'
}
},
// 批量取消扣车
cancelBulkBuckleTrain: {
menu: {
operation: '516',
domId: '_Tips-Stand-cancelBulkBuckleTrain-Menu'
}
},
// 区间列车数量限制
setDetainTrainAuto: {
menu: {
operation: '515',
domId: '_Tips-Stand-setDetainTrainAuto-Menu'
}
},
// 取消区间列车数量限制
cancelDetainTrainAuto: {
menu: {
operation: '516',
domId: '_Tips-Stand-cancelDetainTrainAuto-Menu'
}
} }
}, },

View File

@ -3,11 +3,11 @@ export function getBaseUrl() {
let BASE_API; let BASE_API;
if (process.env.NODE_ENV === 'development') { if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud'; // BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康 BASE_API = 'http://192.168.3.82:9000'; // 杜康
} else { } else {
BASE_API = process.env.VUE_APP_BASE_API; BASE_API = process.env.VUE_APP_BASE_API;
} }

View File

@ -35,9 +35,9 @@ import { getGoodsTryUse } from '@/api/management/goods';
import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation'; import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
import { PermissionType } from '@/scripts/ConstDic'; import { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index'; import { getCountTime } from '@/utils/index';
import { runDiagramIsStart, quitScript } from '@/api/simulation'; import { runDiagramIsStart, runDiagramQuit, quitScript } from '@/api/simulation';
import { timeFormat } from '@/utils/date'; import { timeFormat } from '@/utils/date';
import { getToken } from '@/utils/auth'; // import { getToken } from '@/utils/auth';
export default { export default {
name: 'MenuDemon', name: 'MenuDemon',
@ -189,7 +189,8 @@ export default {
this.$messageBox(this.$t('display.demon.exitTaskFail')); this.$messageBox(this.$t('display.demon.exitTaskFail'));
}); });
}, },
back() { async back() {
await runDiagramQuit(this.group);
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
history.go(-1); history.go(-1);
Notification.closeAll(); Notification.closeAll();

View File

@ -35,9 +35,9 @@ import { getGoodsTryUse } from '@/api/management/goods';
import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation'; import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
import { PermissionType } from '@/scripts/ConstDic'; import { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index'; import { getCountTime } from '@/utils/index';
import { runDiagramIsStart, quitScript } from '@/api/simulation'; import { runDiagramIsStart, runDiagramQuit, quitScript } from '@/api/simulation';
import { timeFormat } from '@/utils/date'; // import { timeFormat } from '@/utils/date';
import { getToken } from '@/utils/auth'; // import { getToken } from '@/utils/auth';
export default { export default {
name: 'MenuDemon', name: 'MenuDemon',
@ -189,7 +189,8 @@ export default {
this.$messageBox(this.$t('display.demon.exitTaskFail')); this.$messageBox(this.$t('display.demon.exitTaskFail'));
}); });
}, },
back() { async back() {
await runDiagramQuit(this.group);
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
history.go(-1); history.go(-1);
Notification.closeAll(); Notification.closeAll();
@ -210,10 +211,10 @@ export default {
} }
}, },
async loadSystemTime() { async loadSystemTime() {
// const rest = await runDiagramGetTime(this.group); const rest = await runDiagramGetTime(this.group);
// if (rest && rest.code == 200) { if (rest && rest.code == 200) {
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
// } }
}, },
change3dname() { change3dname() {
if (this.$route.query.prdType == '04') { if (this.$route.query.prdType == '04') {