调整宁波线右键菜单显示

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,24 +54,47 @@
</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>
@ -64,8 +110,7 @@
</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,14 +124,18 @@
</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
@ -95,35 +144,37 @@
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
type: 'text', type: "text",
timeout: 1000, timeout: 1000,
timenum: 30, timenum: 30,
stepNum: 0, stepNum: 0,
task: null, task: null,
model: { model: {
stationName: '', stationName: "",
sectionName: '', sectionName: "",
confirmStationName: '', confirmStationName: "",
confirmSectionName: '', confirmSectionName: "",
status: '', status: "",
time: 0, time: 0
}, },
selected: null, selected: null,
operate: null, operate: null,
operation: '', operation: "",
randomSectionList: [] randomSectionList: []
} };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters("map", ["stationList", "sectionList"]),
'stationList',
'sectionList'
]),
filterStationList() { filterStationList() {
let i = 0, list = []; let i = 0,
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.findIndex(it => {
return it.name == elem.name;
}) < 0
) {
list.push({ name: elem.name }); list.push({ name: elem.name });
} }
}); });
@ -135,61 +186,98 @@
}, },
domIdConfirm1() { domIdConfirm1() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
return OperationEvent.Section.alxeEffective.confirm1.domId; return OperationEvent.Section.alxeEffective.confirm1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { } else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return OperationEvent.Switch.alxeEffective.confirm1.domId; return OperationEvent.Switch.alxeEffective.confirm1.domId;
} }
} }
}, },
domIdConfirm2() { domIdConfirm2() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
return OperationEvent.Section.alxeEffective.confirm2.domId; return OperationEvent.Section.alxeEffective.confirm2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { } else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return OperationEvent.Switch.alxeEffective.confirm2.domId; return OperationEvent.Switch.alxeEffective.confirm2.domId;
} }
} }
}, },
domIdChoose1() { domIdChoose1() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
return OperationEvent.Section.alxeEffective.choose1.domId; return OperationEvent.Section.alxeEffective.choose1.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { } else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return OperationEvent.Switch.alxeEffective.choose1.domId; return OperationEvent.Switch.alxeEffective.choose1.domId;
} }
} }
}, },
domIdChoose2() { domIdChoose2() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { if (
this.operation ==
OperationEvent.Section.alxeEffective.menu.operation
) {
return OperationEvent.Section.alxeEffective.choose2.domId; return OperationEvent.Section.alxeEffective.choose2.domId;
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { } else if (
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return OperationEvent.Switch.alxeEffective.choose2.domId; return OperationEvent.Switch.alxeEffective.choose2.domId;
} }
} }
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow
? OperationEvent.Command.cancel.menu.domId
: "";
}, },
title() { title() {
this.earlyDepar = false; this.earlyDepar = false;
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation || if (
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { this.operation ==
return '确认计轴恢复工作'; OperationEvent.Section.alxeEffective.menu.operation ||
this.operation ==
OperationEvent.Switch.alxeEffective.menu.operation
) {
return "确认计轴恢复工作";
}
return "";
} }
}, },
},
watch: { watch: {
'model.sectionName': function (name) { "model.sectionName": function(name) {
let index = Math.floor(Math.random(1) * 5); let index = Math.floor(Math.random(1) * 5);
for (var i = 0; i < 5; i++) { for (var i = 0; i < 5; i++) {
if (i == index) { if (i == index) {
this.randomSectionList.push({ name }); this.randomSectionList.push({ name });
} else { } else {
let section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)]; let section = this.sectionList[
if (section.type != '02') { Math.floor(Math.random(1) * this.sectionList.length)
if (this.randomSectionList.findIndex(it => { return it.name == section.name }) < 0) { ];
if (section.type != "02") {
if (
this.randomSectionList.findIndex(it => {
return it.name == section.name;
}) < 0
) {
this.randomSectionList.push({ name: section.name }); this.randomSectionList.push({ name: section.name });
} else { } else {
i--; i--;
@ -203,8 +291,8 @@
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch("training/tipReload");
}) });
}, },
methods: { methods: {
stopTask() { stopTask() {
@ -214,31 +302,38 @@
} }
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 (
selected &&
selected._type.toUpperCase() === "Section".toUpperCase()
) {
if (selected.isSwitchSection) { if (selected.isSwitchSection) {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); let section = this.$store.getters[
"map/getDeviceByCode"
](selected.parentCode);
if (section) { if (section) {
this.model.sectionName = section.name; this.model.sectionName = section.name;
} }
} else { } else {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode); let section = this.$store.getters[
"map/getDeviceByCode"
](selected.parentCode);
if (section) { if (section) {
this.model.sectionName = section.name; this.model.sectionName = section.name;
this.model.sectionName = `${section.name}-${selected.name}`; this.model.sectionName = `${section.name}-${selected.name}`;
@ -246,14 +341,20 @@
this.model.sectionName = `${selected.name}`; this.model.sectionName = `${selected.name}`;
} }
} }
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) { } else if (
let section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode); 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;
} }
} }
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); let station = this.$store.getters["map/getDeviceByCode"](
selected.stationCode
);
if (station) { if (station) {
this.model.stationName = station.name; this.model.stationName = station.name;
} }
@ -264,12 +365,12 @@
this.dialogShow = true; this.dialogShow = true;
this.stopTask(); this.stopTask();
this.$nextTick(function() { this.$nextTick(function() {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch("training/emitTipFresh");
}); });
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch("training/emitTipFresh");
mouseCancelState(this.selected); mouseCancelState(this.selected);
}, },
waitSelectEvent() { waitSelectEvent() {
@ -284,23 +385,33 @@
this.stepNum = 1; this.stepNum = 1;
let operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: '' 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;
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { this.$store.dispatch("training/next", operate).then(({ valid }) => {
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) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch("menuOperation/handleBreakFlag", {
this.type = 'password'; break: true
});
this.type = "password";
this.model.time = this.timenum; this.model.time = this.timenum;
this.task = setInterval(this.waitSelectEvent, this.timeout); this.task = setInterval(this.waitSelectEvent, this.timeout);
} }
}) });
}, },
stationSelectChange(val) { stationSelectChange(val) {
if (this.model.confirmStationName === this.model.stationName) { if (this.model.confirmStationName === this.model.stationName) {
@ -311,19 +422,29 @@
let operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: '', operation: "",
val: val 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;
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { this.$store.dispatch("training/next", operate).then(({ valid }) => {
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation this.$store.dispatch("menuOperation/handleBreakFlag", {
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { break: true
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation });
} });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
})
}, },
sectionSelectChange(val) { sectionSelectChange(val) {
if (this.model.confirmSectionName === this.model.sectionName) { if (this.model.confirmSectionName === this.model.sectionName) {
@ -334,78 +455,116 @@
let operate = { let operate = {
type: this.operate.type, type: this.operate.type,
operation: '', operation: "",
val: val val: val
};
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;
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { this.$store.dispatch("training/next", operate).then(({ valid }) => {
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation this.$store.dispatch("menuOperation/handleBreakFlag", {
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { break: true
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation });
} });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
})
}, },
/** 确认计轴恢复工作*/ /** 确认计轴恢复工作*/
commit() { commit() {
let operate = { let operate = {
send: true, send: true,
type: this.operate.type, type: this.operate.type,
operation: '', operation: "",
val: this.selected.code 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;
} }
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) { this.model.status = "";
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation if (
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) { this.model.stationName == this.model.confirmStationName &&
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation this.model.sectionName == this.model.confirmSectionName
} ) {
this.model.status = '';
if (this.model.stationName == this.model.confirmStationName &&
this.model.sectionName == this.model.confirmSectionName) {
this.stepNum = 3; this.stepNum = 3;
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.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);
}) })
.catch(error => {
this.$refs.noticeInfo.doShow(operate);
});
} else { } else {
if (this.model.stationName != this.model.confirmStationName) { if (this.model.stationName != this.model.confirmStationName) {
this.model.status = '车站选择错误'; this.model.status = "车站选择错误";
} else if (this.model.sectionName != this.model.confirmSectionName) { } else if (
this.model.status = '区段选择错误'; this.model.sectionName != this.model.confirmSectionName
) {
this.model.status = "区段选择错误";
} }
} }
}, },
cancel() { cancel() {
let operate = { let operate = {
type: this.operate.type, 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/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 {

View File

@ -1,18 +1,31 @@
<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
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-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>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input> <el-input v-model="stationName" size="small" disabled />
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-input v-model="signalName" size="small" disabled></el-input> <el-input v-model="signalName" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<div v-if="passModel" style="margin: 12px 0;">
<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-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
@ -21,16 +34,17 @@
<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"></confirm-control> <confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteControl', name: 'RouteControl',
@ -45,9 +59,10 @@
selected: null, selected: null,
operation: null, operation: null,
stationName: '', stationName: '',
signalName: '' signalName: '',
passRadio: '1',
} passModel: false //
};
}, },
computed: { computed: {
show() { show() {
@ -57,7 +72,7 @@
return this.dialogShow ? OperationEvent.Command.close.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : ''; return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
}, },
title() { title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) { if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
@ -66,28 +81,35 @@
return '信号关灯'; return '信号关灯';
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) { } else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
return '重开信号'; return '重开信号';
} else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
return '信号机控制';
} }
return '';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}) });
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.passModel = false;
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name this.signalName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.operation = operate.operation; this.operation = operate.operation;
if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
this.passModel = true;
}
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
@ -99,6 +121,9 @@
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); mouseCancelState(this.selected);
},
changeRadio() {
}, },
commit() { commit() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) { if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
@ -110,6 +135,8 @@
} else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) { } else if (this.operation == OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/ /** 信号重开*/
this.reopenSignal(); this.reopenSignal();
} else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
this.reopenSignal();
} }
}, },
// //
@ -124,11 +151,10 @@
}, },
// //
cancelTrainRouteByLocal() { cancelTrainRouteByLocal() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -136,7 +162,7 @@
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(operate); this.$refs.noticeInfo.doShow(operate);
@ -144,11 +170,10 @@
}, },
// //
cancelTrainRouteByCentral() { cancelTrainRouteByCentral() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation, };
}
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -156,7 +181,7 @@
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(operate); this.$refs.noticeInfo.doShow(operate);
@ -164,11 +189,10 @@
}, },
// //
signalClose() { signalClose() {
let operate = { const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.signalClose.menu.operation, operation: OperationEvent.Signal.signalClose.menu.operation,
messages: [`信号关灯: ${this.signalName}`], messages: [`信号关灯: ${this.signalName}`]
} };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -178,17 +202,16 @@
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmControl.doShow(operate); this.$refs.confirmControl.doShow(operate);
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
}); });
}, },
// //
reopenSignal() { reopenSignal() {
let operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, operation: OperationEvent.Signal.reopenSignal.menu.operation
operation: OperationEvent.Signal.reopenSignal.menu.operation, };
}
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -196,7 +219,7 @@
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(operate); this.$refs.noticeInfo.doShow(operate);
@ -204,20 +227,19 @@
}, },
// //
cancel() { cancel() {
let operate = { const operate = {
type: MapDeviceType.Signal.type, operation: OperationEvent.Command.close.menu.operation
operation: OperationEvent.Command.close.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(() => {
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); 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,
@ -95,10 +92,10 @@ export default {
{ {
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') {