调整宁波线右键菜单显示

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>
<el-dialog 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>
<el-dialog
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;">
<span class="base-label">准备</span>
<div style="margin-top: -10px">
@ -10,14 +19,28 @@
</el-row>
<el-row type="flex" justify="left">
<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 :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 :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-row>
</div>
@ -31,41 +54,63 @@
</el-row>
<el-row type="flex" justify="left">
<el-col :span="9">
<el-select :id="domIdChoose1" v-model="model.confirmStationName" filterable 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
:id="domIdChoose1"
v-model="model.confirmStationName"
filterable
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-col>
<el-col :span="9">
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable 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
:id="domIdChoose2"
v-model="model.confirmSectionName"
filterable
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-col>
<el-col :span="4" :offset="1">
<el-button :id="domIdConfirm2" size="mini" :loading="loading" @click="commit"
:disabled="type==='text'">确认</el-button>
<el-button
:id="domIdConfirm2"
size="mini"
:loading="loading"
@click="commit"
:disabled="type==='text'"
>确认</el-button>
</el-col>
</el-row>
</div>
</div>
<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-input v-model="model.time" size="mini" :readonly="true"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :offset="1"> 状态</el-col>
<el-col :offset="1">状态</el-col>
</el-row>
<el-row>
<el-col :offset="1" :span="23">
<el-input type="textarea" :rows="2" placeholder="" v-model="model.status">
</el-input>
<el-input type="textarea" :rows="2" placeholder v-model="model.status"></el-input>
</el-col>
</el-row>
<el-row class="botton-group" style="margin-top:20px">
@ -79,336 +124,450 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import PopupAlarm from './childDialog/popupAlarm';
import { mapGetters } from "vuex";
import {
MapDeviceType,
OperationEvent,
getDomIdByOperation
} from "@/scripts/ConstDic";
import { mouseCancelState } from "../utils/menuItemStatus";
import NoticeInfo from "./childDialog/childDialog/noticeInfo";
import PopupAlarm from "./childDialog/popupAlarm";
export default {
name: 'AlxeEffective',
components: {
NoticeInfo,
PopupAlarm
export default {
name: "AlxeEffective",
components: {
NoticeInfo,
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() {
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: []
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;
}
}
},
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 });
}
});
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;
}
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: {
'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 {
i--;
}
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 "确认计轴恢复工作";
}
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 {
i--;
}
} else {
i--;
}
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
stopTask() {
if (this.task) {
clearInterval(this.task);
this.task = null;
}
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch("training/tipReload");
});
},
methods: {
stopTask() {
if (this.task) {
clearInterval(this.task);
this.task = null;
}
if (this.stepNum < 3) {
this.$store.dispatch('training/backSteps', this.stepNum);
this.$store.dispatch('training/emitTipFresh');
this.model.name = '';
this.model.time = '';
this.type = 'text';
}
},
doShow(operate, selected) {
this.selected = selected;
this.operate = operate || {};
this.operation = operate.operation;
this.status = '';
this.model.stationName = '';
this.model.sectionName = '';
this.model.confirmStationName = '';
this.model.confirmSectionName = '';
if (selected) {
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
if (selected.isSwitchSection) {
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
if (section) {
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 (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
let section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
if (this.stepNum < 3) {
this.$store.dispatch("training/backSteps", this.stepNum);
this.$store.dispatch("training/emitTipFresh");
this.model.name = "";
this.model.time = "";
this.type = "text";
}
},
doShow(operate, selected) {
this.selected = selected;
this.operate = operate || {};
this.operation = operate.operation;
this.status = "";
this.model.stationName = "";
this.model.sectionName = "";
this.model.confirmStationName = "";
this.model.confirmSectionName = "";
if (selected) {
if (
selected &&
selected._type.toUpperCase() === "Section".toUpperCase()
) {
if (selected.isSwitchSection) {
let section = this.$store.getters[
"map/getDeviceByCode"
](selected.parentCode);
if (section) {
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}`;
}
}
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.model.stationName = station.name;
} else if (
selected._type.toUpperCase() === "Switch".toUpperCase()
) {
let section = this.$store.getters["map/getDeviceByCode"](
selected.switchSectionCode
);
if (section) {
this.model.sectionName = section.name;
}
}
this.stepNum = 0;
this.loading = false;
this.dialogShow = true;
this.stopTask();
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
let station = this.$store.getters["map/getDeviceByCode"](
selected.stationCode
);
if (station) {
this.model.stationName = station.name;
}
}
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;
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: ''
}
});
},
sectionSelectChange(val) {
if (this.model.confirmSectionName === this.model.sectionName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
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
}
let operate = {
type: this.operate.type,
operation: "",
val: val
};
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;
}
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;
}
let operate = {
type: this.operate.type,
operation: '',
val: val
}
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.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
) {
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.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
})
},
sectionSelectChange(val) {
if (this.model.confirmSectionName === this.model.sectionName) {
this.stepNum = 2;
} else {
this.model.time = 0;
}
this.model.status = "";
if (
this.model.stationName == this.model.confirmStationName &&
this.model.sectionName == this.model.confirmSectionName
) {
this.stepNum = 3;
let operate = {
type: this.operate.type,
operation: '',
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
}
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 = true;
this.$store
.dispatch("training/next", operate)
.then(({ valid }) => {
this.loading = false;
if (valid) {
this.type = 'text';
this.type = "text";
this.stopTask();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
this.$store.dispatch(
"menuOperation/handleBreakFlag",
{
break: true
}
);
this.$refs.popupAlarm.doShow(
Object.assign(this.operate, {
val: operate.val
}),
[
`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`
]
);
}
}).catch(error => {
this.$refs.noticeInfo.doShow(operate);
})
} else {
if (this.model.stationName != this.model.confirmStationName) {
this.model.status = '车站选择错误';
} else if (this.model.sectionName != this.model.confirmSectionName) {
this.model.status = '区段选择错误';
}
}
},
cancel() {
let operate = {
type: this.operate.type,
operation: OperationEvent.Command.cancel.menu.operation,
.catch(error => {
this.$refs.noticeInfo.doShow(operate);
});
} else {
if (this.model.stationName != this.model.confirmStationName) {
this.model.status = "车站选择错误";
} else if (
this.model.sectionName != this.model.confirmSectionName
) {
this.model.status = "区段选择错误";
}
}
},
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) {
this.doClose();
}
}).catch(error => {
})
.catch(error => {
this.doClose();
});
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.alxe-effective .context {
height: 80px !important;
}
.alxe-effective .context {
height: 80px !important;
}
</style>

View File

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

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-col>
</el-row>
<div v-if="!earlyDepar">
<div v-if="buckle">
<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;">
@ -60,6 +60,30 @@
</el-row>
</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 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>
@ -122,8 +146,12 @@ export default {
radio: '1',
radio1: '1',
radio2: '1',
earlyDepar: false,
standCode: ''
earlyDepar: false, //
buckle: true, //
AutomaticBuckle: false, //
standCode: '',
autoRadio: '1',
autoRadio1: '1'
};
},
computed: {
@ -149,6 +177,10 @@ export default {
return '取消扣车';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
return '提前发车';
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
return '区间自动扣车';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
return '区间自动扣车';
}
return '';
}
@ -190,9 +222,13 @@ export default {
},
setDefaultItems() { //
this.earlyDepar = false;
this.buckle = false;
this.AutomaticBuckle = false;
if (this.operation == OperationEvent.StationStand.setDetainTrain.menu.operation) {
this.buckle = true;
this.radio1 = '1';
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrain.menu.operation) {
this.buckle = true;
this.radio1 = '2';
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
this.earlyDepar = true;
@ -201,6 +237,12 @@ export default {
} else {
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() {

View File

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

View File

@ -20,10 +20,7 @@ import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail';
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 CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
@ -56,7 +53,7 @@ export default {
return {
menu: [],
menuNormal: {
local: [
Local: [
{
label: '排列进路',
handler: this.arrangementRoute,
@ -95,10 +92,10 @@ export default {
{
label: '查询进路控制状态',
handler: this.detail,
cmdType: ''
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
],
central: [
Center: [
{
label: '设置进路',
handler: this.arrangementRoute,
@ -124,10 +121,15 @@ export default {
handler: this.atsAutoControl,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
},
{
label: '设置/取消通过模式',
handler: this.singalPassModel,
cmdType: CMD.Signal.CMD_SIGNAL_PASS_MODEL
},
{
label: '查询进路控制状态',
handler: this.detail,
cmdType: ''
cmdType: CMD.Signal.CMD_SIGNAL_DETAIL
}
]
},
@ -157,7 +159,10 @@ export default {
]),
...mapGetters('menuOperation', [
'buttonOperation'
])
]),
group() {
return this.$route.query.group;
}
},
watch: {
'$store.state.menuOperation.menuCount': function (val) {
@ -253,7 +258,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (valid) {
querySignalStatus(this.group, {signalCode: `${this.selected.code}`}).then(resp => {
querySignalStatus(this.group, {signalCode: this.selected.code}).then(resp => {
const tempData = resp.data;
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() {
const operate = {

View File

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

View File

@ -9,6 +9,7 @@
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
</div>
</template>
@ -20,6 +21,7 @@ import StandBackStrategy from './dialog/standBackStrategy';
import StandDetail from './dialog/standDetail';
import StandRunLevel from './dialog/standRunLevel';
import StandStopTime from './dialog/standStopTime';
import StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
@ -36,6 +38,7 @@ export default {
PopMenu,
StandControl,
StandJumpStopControl,
StandBulkBuckleTrain,
StandDetail,
StandRunLevel,
NoticeInfo,
@ -88,6 +91,16 @@ export default {
handler: this.cancelDetainTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
},
{
label: '批量扣车',
handler: this.setBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
},
{
label: '批量取消扣车',
handler: this.cancelBulkBuckleTrain,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
},
{
label: '提前发车',
handler: this.earlyDeparture,
@ -113,18 +126,16 @@ export default {
handler: this.setRunLevel,
cmdType:CMD.Stand.CMD_STAND_SET_RUN_TIME
},
// {
// label: '',
// handler: this.setDetainTrainAll,
// disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
// auth: { station: true, center: true }
// },
// {
// label: '',
// handler: this.cancelDetainTrainAll,
// disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
// auth: { station: true, center: true }
// },
{
label: '区间列车数量限制',
handler: this.setDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO
},
{
label: '取消区间列车数量限制',
handler: this.cancelDetainTrainAll,
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO
},
{
label: '查看站台信息',
handler: this.detail,
@ -274,7 +285,7 @@ export default {
const step = {
start: true,
code: this.selected.code,
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
@ -292,7 +303,7 @@ export default {
const step = {
start: true,
code: this.selected.code,
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
}
@ -304,20 +315,37 @@ export default {
}
});
},
//
cancelDetainTrainForce() {
//
setBulkBuckleTrain() {
const step = {
start: true,
code: `${this.selected.code}`,
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
code: this.selected.code,
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
param: {
StationStand_Code: `${this.selected.code}`
StationStand_Code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
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 {
menu: [],
menuNormal: {
local: [
Local: [
{
label: '单操到定位',
handler: this.locate,
@ -84,7 +84,7 @@ export default {
cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK
}
],
central: [
Center: [
{
label: '轨道切除',
handler: this.split,
@ -98,7 +98,7 @@ export default {
{
label: '确认计轴有效',
handler: this.alxeEffective,
cmdType: ''
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
},
{
label: '设置临时限速',

View File

@ -27,7 +27,9 @@ export default {
/** 转动 */
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_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_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_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_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: '全线取消扣车'},
/** 提前发车 */

View File

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

View File

@ -880,6 +880,13 @@ export const OperationEvent = {
operation: '316',
domId: '_Tips-Signal-Detail-Menu'
}
},
// 查询进路状态
singalPassModel: {
menu: {
operation: '317',
domId: '_Tips-Signal-SingalPassModel-Menu'
}
}
},
@ -1461,6 +1468,34 @@ export const OperationEvent = {
operation: '5142',
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;
if (process.env.NODE_ENV === 'development') {
// 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.6: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 {
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 { PermissionType } from '@/scripts/ConstDic';
import { getCountTime } from '@/utils/index';
import { runDiagramIsStart, quitScript } from '@/api/simulation';
import { runDiagramIsStart, runDiagramQuit, quitScript } from '@/api/simulation';
import { timeFormat } from '@/utils/date';
import { getToken } from '@/utils/auth';
// import { getToken } from '@/utils/auth';
export default {
name: 'MenuDemon',
@ -189,7 +189,8 @@ export default {
this.$messageBox(this.$t('display.demon.exitTaskFail'));
});
},
back() {
async back() {
await runDiagramQuit(this.group);
this.$store.dispatch('training/over').then(() => {
history.go(-1);
Notification.closeAll();

View File

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