调整宁波一号线右键菜单流程
This commit is contained in:
parent
6e0ab142f7
commit
3d8fcd305a
@ -12,8 +12,8 @@
|
|||||||
append-to-body
|
append-to-body
|
||||||
>
|
>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="(message, index) in messages">
|
||||||
<span>{{ message }}</span>
|
<span :key="index">{{ message }}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -55,6 +55,7 @@ export default {
|
|||||||
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '信号关灯';
|
return '信号关灯';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
@ -66,6 +67,7 @@ export default {
|
|||||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -112,7 +114,7 @@ export default {
|
|||||||
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);
|
||||||
@ -127,7 +129,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
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">
|
||||||
@ -19,28 +9,13 @@
|
|||||||
</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
|
<el-input v-model="model.stationName" :type="type" size="mini" :disabled="true" />
|
||||||
: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
|
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||||
: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
|
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
||||||
:id="domIdConfirm1"
|
|
||||||
size="mini"
|
|
||||||
@click="commitOnce"
|
|
||||||
:disabled="type==='password'"
|
|
||||||
>确认</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
@ -59,15 +34,10 @@
|
|||||||
v-model="model.confirmStationName"
|
v-model="model.confirmStationName"
|
||||||
filterable
|
filterable
|
||||||
size="mini"
|
size="mini"
|
||||||
@change="stationSelectChange"
|
|
||||||
:disabled="type==='text'"
|
:disabled="type==='text'"
|
||||||
|
@change="stationSelectChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name" :value="option.name" />
|
||||||
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">
|
||||||
@ -76,15 +46,10 @@
|
|||||||
v-model="model.confirmSectionName"
|
v-model="model.confirmSectionName"
|
||||||
filterable
|
filterable
|
||||||
size="mini"
|
size="mini"
|
||||||
@change="sectionSelectChange"
|
|
||||||
:disabled="type==='text'"
|
:disabled="type==='text'"
|
||||||
|
@change="sectionSelectChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||||
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">
|
||||||
@ -92,8 +57,8 @@
|
|||||||
:id="domIdConfirm2"
|
:id="domIdConfirm2"
|
||||||
size="mini"
|
size="mini"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click="commit"
|
|
||||||
:disabled="type==='text'"
|
:disabled="type==='text'"
|
||||||
|
@click="commit"
|
||||||
>确认</el-button>
|
>确认</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -102,7 +67,7 @@
|
|||||||
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||||
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
<el-input v-model="model.time" size="mini" :readonly="true"></el-input>
|
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -110,7 +75,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>
|
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="botton-group" style="margin-top:20px">
|
<el-row class="botton-group" style="margin-top:20px">
|
||||||
@ -118,24 +83,21 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
<popup-alarm ref="popupAlarm"></popup-alarm>
|
<popup-alarm ref="popupAlarm" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from 'vuex';
|
||||||
import {
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
MapDeviceType,
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
OperationEvent,
|
import PopupAlarm from './childDialog/popupAlarm';
|
||||||
getDomIdByOperation
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
} from "@/scripts/ConstDic";
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
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
|
||||||
@ -144,30 +106,29 @@ export default {
|
|||||||
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", ["stationList", "sectionList"]),
|
...mapGetters('map', ['stationList', 'sectionList']),
|
||||||
filterStationList() {
|
filterStationList() {
|
||||||
let i = 0,
|
const list = [];
|
||||||
list = [];
|
|
||||||
if (this.stationList) {
|
if (this.stationList) {
|
||||||
this.stationList.forEach(elem => {
|
this.stationList.forEach(elem => {
|
||||||
if (
|
if (
|
||||||
@ -185,94 +146,58 @@ export default {
|
|||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
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 (
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Switch.alxeEffective.menu.operation
|
|
||||||
) {
|
|
||||||
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
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 (
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Switch.alxeEffective.menu.operation
|
|
||||||
) {
|
|
||||||
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdChoose1() {
|
domIdChoose1() {
|
||||||
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 (
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Switch.alxeEffective.menu.operation
|
|
||||||
) {
|
|
||||||
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdChoose2() {
|
domIdChoose2() {
|
||||||
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 (
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Switch.alxeEffective.menu.operation
|
|
||||||
) {
|
|
||||||
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
? OperationEvent.Command.cancel.menu.domId
|
|
||||||
: "";
|
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
this.earlyDepar = false;
|
if ( this.operation == OperationEvent.Section.alxeEffective.menu.operation || this.operation == OperationEvent.Switch.alxeEffective.menu.operation ) {
|
||||||
if (
|
return '确认计轴恢复工作';
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Section.alxeEffective.menu.operation ||
|
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Switch.alxeEffective.menu.operation
|
|
||||||
) {
|
|
||||||
return "确认计轴恢复工作";
|
|
||||||
}
|
}
|
||||||
return "";
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
"model.sectionName": function(name) {
|
'model.sectionName': function(name) {
|
||||||
let index = Math.floor(Math.random(1) * 5);
|
const 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[
|
const section = this.sectionList[
|
||||||
Math.floor(Math.random(1) * this.sectionList.length)
|
Math.floor(Math.random(1) * this.sectionList.length)
|
||||||
];
|
];
|
||||||
if (section.type != "02") {
|
if (section.type != '02') {
|
||||||
if (
|
if (
|
||||||
this.randomSectionList.findIndex(it => {
|
this.randomSectionList.findIndex(it => {
|
||||||
return it.name == section.name;
|
return it.name == section.name;
|
||||||
@ -291,7 +216,7 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch("training/tipReload");
|
this.$store.dispatch('training/tipReload');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -302,38 +227,31 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 (
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
selected &&
|
|
||||||
selected._type.toUpperCase() === "Section".toUpperCase()
|
|
||||||
) {
|
|
||||||
if (selected.isSwitchSection) {
|
if (selected.isSwitchSection) {
|
||||||
let section = this.$store.getters[
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
"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[
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
"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}`;
|
||||||
@ -341,20 +259,14 @@ export default {
|
|||||||
this.model.sectionName = `${selected.name}`;
|
this.model.sectionName = `${selected.name}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (
|
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
selected._type.toUpperCase() === "Switch".toUpperCase()
|
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||||
) {
|
|
||||||
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"](
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
selected.stationCode
|
|
||||||
);
|
|
||||||
if (station) {
|
if (station) {
|
||||||
this.model.stationName = station.name;
|
this.model.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -365,12 +277,12 @@ export default {
|
|||||||
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() {
|
||||||
@ -383,183 +295,125 @@ export default {
|
|||||||
},
|
},
|
||||||
commitOnce() {
|
commitOnce() {
|
||||||
this.stepNum = 1;
|
this.stepNum = 1;
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
operation: ''
|
||||||
operation: ""
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation;
|
||||||
OperationEvent.Section.alxeEffective.menu.operation
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
) {
|
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.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 }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch("menuOperation/handleBreakFlag", {
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
break: true
|
this.type = 'password';
|
||||||
});
|
|
||||||
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() {
|
||||||
if (this.model.confirmStationName === this.model.stationName) {
|
if (this.model.confirmStationName === this.model.stationName) {
|
||||||
this.stepNum = 2;
|
this.stepNum = 2;
|
||||||
} else {
|
} else {
|
||||||
this.model.time = 0;
|
this.model.time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
operation: ''
|
||||||
operation: "",
|
|
||||||
val: val
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||||
OperationEvent.Section.alxeEffective.menu.operation
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
) {
|
operate.operation = OperationEvent.Switch.alxeEffective.choose1.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('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch("menuOperation/handleBreakFlag", {
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
break: true
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
sectionSelectChange(val) {
|
sectionSelectChange() {
|
||||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||||
this.stepNum = 2;
|
this.stepNum = 2;
|
||||||
} else {
|
} else {
|
||||||
this.model.time = 0;
|
this.model.time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
operation: ''
|
||||||
operation: "",
|
|
||||||
val: val
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation;
|
||||||
OperationEvent.Section.alxeEffective.menu.operation
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
) {
|
operate.operation = OperationEvent.Switch.alxeEffective.choose2.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('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.$store.dispatch("menuOperation/handleBreakFlag", {
|
this.$store.dispatch('menuOperation/handleBreakFlag', {
|
||||||
break: true
|
break: true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 确认计轴恢复工作*/
|
/** 确认计轴恢复工作*/
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.operate.type,
|
operation: '',
|
||||||
operation: "",
|
cmdType: ''
|
||||||
val: this.selected.code
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (
|
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||||
this.operation ==
|
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||||
OperationEvent.Section.alxeEffective.menu.operation
|
operate.cmdType = CMD.Section.CMD_SECTION_COMFIRMATION_AXLE;
|
||||||
) {
|
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||||
operate.operation =
|
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||||
OperationEvent.Section.alxeEffective.confirm2.operation;
|
operate.cmdType = CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE;
|
||||||
} else if (
|
|
||||||
this.operation ==
|
|
||||||
OperationEvent.Switch.alxeEffective.menu.operation
|
|
||||||
) {
|
|
||||||
operate.operation =
|
|
||||||
OperationEvent.Switch.alxeEffective.confirm2.operation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.model.status = "";
|
this.model.status = '';
|
||||||
if (
|
if (this.model.stationName == this.model.confirmStationName && this.model.sectionName == this.model.confirmSectionName) {
|
||||||
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
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
.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(
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
"menuOperation/handleBreakFlag",
|
|
||||||
{
|
|
||||||
break: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
this.$refs.popupAlarm.doShow(
|
this.$refs.popupAlarm.doShow(
|
||||||
Object.assign(this.operate, {
|
Object.assign(this.operate, {val: operate.val}), [`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]
|
||||||
val: operate.val
|
|
||||||
}),
|
|
||||||
[
|
|
||||||
`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`
|
|
||||||
]
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})
|
}).catch(() => {
|
||||||
.catch(error => {
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
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 (
|
} else if (
|
||||||
this.model.sectionName != this.model.confirmSectionName
|
this.model.sectionName != this.model.confirmSectionName
|
||||||
) {
|
) {
|
||||||
this.model.status = "区段选择错误";
|
this.model.status = '区段选择错误';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store
|
this.$store
|
||||||
.dispatch("training/next", operate)
|
.dispatch('training/nextNew', operate)
|
||||||
.then(({ valid }) => {
|
.then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ConfirmControl',
|
name: 'ConfirmControl',
|
||||||
|
components: {
|
||||||
|
NoticeInfo
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
@ -31,10 +35,7 @@
|
|||||||
operate: {},
|
operate: {},
|
||||||
messages: '',
|
messages: '',
|
||||||
operation: null
|
operation: null
|
||||||
}
|
};
|
||||||
},
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -52,7 +53,7 @@
|
|||||||
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
return '进路交人工控';
|
return '进路交人工控';
|
||||||
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||||
return '进路交ATS自动控'
|
return '进路交ATS自动控';
|
||||||
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
|
||||||
return '设置运行等级';
|
return '设置运行等级';
|
||||||
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
|
||||||
@ -60,15 +61,15 @@
|
|||||||
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
|
||||||
return '设置折返策略';
|
return '设置折返策略';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdCancel() {
|
domIdCancel() {
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
||||||
/** 进路设置*/
|
/** 进路设置*/
|
||||||
return OperationEvent.Signal.arrangementRoute.confirm.domId
|
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
return OperationEvent.Signal.signalClose.confirm.domId;
|
||||||
@ -94,13 +95,13 @@
|
|||||||
/** 设置折返策略*/
|
/** 设置折返策略*/
|
||||||
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
@ -153,204 +154,123 @@
|
|||||||
},
|
},
|
||||||
// 进路设置
|
// 进路设置
|
||||||
routeSetting() {
|
routeSetting() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
operation: OperationEvent.Signal.arrangementRoute.confirm.operation,
|
||||||
}
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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() {
|
signalClose() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||||
operation: OperationEvent.Signal.signalClose.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 取消进路
|
// 取消进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 进路交人工控
|
// 进路交人工控
|
||||||
humanControl() {
|
humanControl() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||||
}
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 进路交ATS自动控
|
// 进路交ATS自动控
|
||||||
atsAutoControl() {
|
atsAutoControl() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||||
}
|
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// 设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
||||||
val: this.operate.val
|
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 停站时间
|
// 停站时间
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
|
||||||
val: this.operate.val,
|
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.sendCommand(operate);
|
||||||
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);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
// 设置折返策略
|
// 设置折返策略
|
||||||
setBackStrategy() {
|
setBackStrategy() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
|
||||||
val: this.operate.val,
|
cmdType: CMD.Stand.CMD_STAND_SET_REENTRY_STRATEGY
|
||||||
}
|
};
|
||||||
|
|
||||||
|
this.sendCommand(operate);
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
const operate = {
|
||||||
|
type: this.operate.type,
|
||||||
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
|
};
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
sendCommand(operate) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
|
||||||
},
|
|
||||||
cancel() {
|
|
||||||
let operate = {
|
|
||||||
type: this.operate.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.confirm-control .context {
|
.confirm-control .context {
|
||||||
|
@ -45,6 +45,7 @@ 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';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteControl',
|
name: 'RouteControl',
|
||||||
@ -136,53 +137,23 @@ export default {
|
|||||||
/** 信号重开*/
|
/** 信号重开*/
|
||||||
this.reopenSignal();
|
this.reopenSignal();
|
||||||
} else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.singalPassModel.menu.operation) {
|
||||||
this.reopenSignal();
|
this.singalPassModel(); // 设置/取消通过模式
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 取消列车进路
|
// 取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.training.prdType == '01') {
|
|
||||||
/** 现地工作站*/
|
|
||||||
this.cancelTrainRouteByLocal();
|
|
||||||
} else if (this.$store.state.training.prdType == '02') {
|
|
||||||
/** 行调工作站*/
|
|
||||||
this.cancelTrainRouteByCentral();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 现地工作站取消进路
|
|
||||||
cancelTrainRouteByLocal() {
|
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation
|
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({valid}) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).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.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -191,11 +162,12 @@ export default {
|
|||||||
signalClose() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Signal.signalClose.menu.operation,
|
operation: OperationEvent.Signal.signalClose.menu.operation,
|
||||||
messages: [`信号关灯: ${this.signalName}`]
|
messages: [`信号关灯: ${this.signalName}`],
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -209,12 +181,36 @@ export default {
|
|||||||
// 信号重开
|
// 信号重开
|
||||||
reopenSignal() {
|
reopenSignal() {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.reopenSignal.menu.operation
|
operation: OperationEvent.Signal.reopenSignal.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.doClose();
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置/取消通过模式
|
||||||
|
singalPassModel() {
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: OperationEvent.Signal.singalPassModel.menu.operation,
|
||||||
|
cmdType: CMD.Signal.CMD_SIGNAL_PASS_MODEL,
|
||||||
|
param: {
|
||||||
|
Pass_Auto: this.passRadio
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -231,7 +227,7 @@ export default {
|
|||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<el-row style="margin-top: 10px; line-height: 30px;">
|
<el-row style="margin-top: 10px; line-height: 30px;">
|
||||||
<el-col :span="11"><span>进路列表</span></el-col>
|
<el-col :span="11"><span>进路列表</span></el-col>
|
||||||
<el-col :span="11" :offset="2">
|
<el-col :span="11" :offset="2">
|
||||||
<el-button class="expand" @click="expandPath">展开进路预览</el-button>
|
<!-- <el-button class="expand" @click="expandPath">展开进路预览</el-button> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row :show-header="false" @row-click="clickEvent">
|
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; margin-top:10px" size="mini" height="120" highlight-current-row :show-header="false" @row-click="clickEvent">
|
||||||
@ -34,9 +34,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
@ -170,12 +171,10 @@ export default {
|
|||||||
|
|
||||||
// 设置选中指令
|
// 设置选中指令
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.arrangementRoute.choose.operation
|
||||||
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
|
|
||||||
val: row.code
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
@ -186,13 +185,16 @@ export default {
|
|||||||
commit() {
|
commit() {
|
||||||
if (this.row && this.row.canSetting) {
|
if (this.row && this.row.canSetting) {
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Signal.type,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation
|
cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE,
|
||||||
|
param: {
|
||||||
|
Route_Code: this.row.code
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -206,11 +208,10 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -1,248 +1,221 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
<el-dialog class="ningbo-01__systerm section-cmd-control" :title="title" :visible.sync="show" width="800px"
|
|
||||||
: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>
|
||||||
<el-form label-position="center" size="mini">
|
<div style="margin-top: -10px">
|
||||||
<el-row>
|
<el-row type="flex" justify="left">
|
||||||
<el-col :span="8">
|
<el-col :span="18">区段设备</el-col>
|
||||||
<el-form-item label="类型" label-width="40px">
|
</el-row>
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-row type="flex" justify="left">
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-col :span="18">
|
||||||
:value="option.code">
|
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||||
</el-option>
|
</el-col>
|
||||||
|
<el-col :span="4" :offset="1">
|
||||||
|
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||||
|
<span class="base-label">确认</span>
|
||||||
|
<div style="margin-top: -10px">
|
||||||
|
<el-row type="flex" justify="left">
|
||||||
|
<el-col :span="18">区段</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row type="flex" justify="left">
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable size="mini" :disabled="type==='text'" @change="sectionSelectChange">
|
||||||
|
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="4" :offset="1">
|
||||||
<el-form-item label="车站名称" label-width="80px">
|
<el-button :id="domIdConfirm2" size="mini" :loading="loading" :disabled="type==='text'" @click="commit">确认</el-button>
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="区段名称" label-width="100px">
|
|
||||||
<el-input v-model="sectionName" size="small" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
</div>
|
||||||
highlight-current-row height="200">
|
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||||
<el-table-column prop="order" :width="50" label="序号">
|
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
||||||
</el-table-column>
|
<el-col :span="16">
|
||||||
<el-table-column prop="date" :width="160" label="时间">
|
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="context" :width="180" label="执行过程">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="result" label="执行结果">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<span class="notice">{{message}}</span>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1">状态</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1" :span="23">
|
||||||
|
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="botton-group" style="margin-top:20px">
|
||||||
|
<el-col :span="4" :offset="10">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<popup-alarm ref="popupAlarm" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { mapGetters } from 'vuex';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { now } from '@/utils/date';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import PopupAlarm from './childDialog/popupAlarm';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionCmdControl',
|
name: 'AlxeEffective',
|
||||||
|
components: {
|
||||||
|
NoticeInfo,
|
||||||
|
PopupAlarm
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
backOperate: '',
|
loading: false,
|
||||||
selected: '',
|
type: 'text',
|
||||||
order: 0,
|
timeout: 1000,
|
||||||
row: null,
|
timenum: 30,
|
||||||
timer: null,
|
stepNum: 0,
|
||||||
|
task: null,
|
||||||
|
model: {
|
||||||
|
sectionName: '',
|
||||||
|
confirmSectionName: '',
|
||||||
|
status: '',
|
||||||
|
time: 0
|
||||||
|
},
|
||||||
|
selected: null,
|
||||||
|
operate: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
cmdDisabled: [true, true, true],
|
randomSectionList: []
|
||||||
stpDisabled: true,
|
};
|
||||||
tempData: [],
|
|
||||||
message: '',
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
stationName: '',
|
|
||||||
sectionName: ''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
...mapGetters('map', ['stationList', 'sectionList']),
|
||||||
return [
|
|
||||||
{ code: OperationEvent.Section.unlock.menu.operation, name: '区段解封' },
|
|
||||||
{ code: OperationEvent.Section.fault.menu.operation, name: '区段故障解锁' },
|
|
||||||
{ code: OperationEvent.Section.axlePreReset.menu.operation, name: '区段计轴预复位' },
|
|
||||||
]
|
|
||||||
},
|
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCommand() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
return OperationEvent.Section.axlePreReset.order.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.confirm1.domId;
|
return OperationEvent.Section.fault.confirm1.domId;
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
return OperationEvent.Section.unlock.confirm1.domId;
|
||||||
return OperationEvent.Section.axlePreReset.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
return OperationEvent.Section.unlock.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.confirm2.domId;
|
return OperationEvent.Section.fault.confirm2.domId;
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
return OperationEvent.Section.unlock.confirm2.domId;
|
||||||
return OperationEvent.Section.axlePreReset.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdChoose2() {
|
||||||
if (this.dialogShow) {
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
return OperationEvent.Section.fault.choose2.domId;
|
||||||
/** 区段解封*/
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
return OperationEvent.Section.unlock.stop.domId;
|
return OperationEvent.Section.unlock.choose2.domId;
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
return OperationEvent.Section.fault.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
return OperationEvent.Section.axlePreReset.stop.domId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdCancel() {
|
||||||
if (this.dialogShow) {
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
return '区故解';
|
||||||
return '区段解封';
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
return '解除封锁';
|
||||||
return '区段故障解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
return '区段计轴预复位';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cmdDisabled: {
|
'model.sectionName': function(name) {
|
||||||
handler(val, oldVal) {
|
const index = Math.floor(Math.random(1) * 5);
|
||||||
this.stpDisabled = true;
|
for (var i = 0; i < 5; i++) {
|
||||||
val.forEach((elem, index) => {
|
if (i == index) {
|
||||||
// 在确定1之前的操作才可以终止
|
this.randomSectionList.push({ name });
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
} else {
|
||||||
this.stpDisabled = false;
|
const section = this.sectionList[
|
||||||
|
Math.floor(Math.random(1) * this.sectionList.length)
|
||||||
|
];
|
||||||
|
if (section.type != '02') {
|
||||||
|
if (
|
||||||
|
this.randomSectionList.findIndex(it => {
|
||||||
|
return it.name == section.name;
|
||||||
|
}) < 0
|
||||||
|
) {
|
||||||
|
this.randomSectionList.push({ name: section.name });
|
||||||
|
} else {
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
i--;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
this.operate = operate || {};
|
||||||
this.sectionName = '';
|
this.operation = operate.operation;
|
||||||
this.stationName = '';
|
this.status = '';
|
||||||
|
this.model.sectionName = '';
|
||||||
|
this.model.confirmSectionName = '';
|
||||||
|
if (selected) {
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (selected.type === '02') {
|
if (selected.isSwitchSection) {
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
if (section) {
|
if (section) {
|
||||||
this.sectionName += section.name
|
this.model.sectionName = section.name;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const 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}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.sectionName += selected.name
|
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
|
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
if (section) {
|
||||||
if (station) {
|
this.model.sectionName = section.name;
|
||||||
this.stationName = station.name;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.order = 0;
|
this.stepNum = 0;
|
||||||
this.operation = operate.operation || '';
|
this.loading = false;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.tempData = [];
|
this.stopTask();
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.cmdDisabled = [false, true, true];
|
|
||||||
}
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
@ -252,184 +225,114 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
command() {
|
waitSelectEvent() {
|
||||||
if (this.operation == OperationEvent.Section.fault.menu.operation ||
|
if (!this.$store.state.menuOperation.break) {
|
||||||
this.operation == OperationEvent.Section.unlock.menu.operation ||
|
this.model.time -= 1;
|
||||||
this.operation == OperationEvent.Section.cancelSpeed.menu.operation ||
|
if (this.model.time <= 0) {
|
||||||
this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
this.stopTask();
|
||||||
/** 第一步不带弹框处理*/
|
}
|
||||||
this.commandNoPopUp();
|
|
||||||
} else {
|
|
||||||
/** 第一步带弹框处理*/
|
|
||||||
this.commandHasPopUp();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commandHasPopUp() {
|
commitOnce() {
|
||||||
},
|
this.stepNum = 1;
|
||||||
commandNoPopUp() {
|
const operate = {
|
||||||
let operate = {
|
operation: ''
|
||||||
type: MapDeviceType.Section.type
|
};
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.order.operation
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
operate.operation = OperationEvent.Section.fault.confirm1.operation;
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
/** 区段计轴预复位*/
|
operate.operation = OperationEvent.Section.unlock.confirm1.operation;
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.confirm1.operation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.timeCountCommand = -1;
|
this.type = 'password';
|
||||||
this.timeCountConfirm = 10;
|
this.model.time = this.timenum;
|
||||||
this.setButtonEnable({ step: 2 });
|
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Section.type
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.confirm2.operation;
|
|
||||||
}
|
|
||||||
this.setMessage('');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
|
||||||
/** 区段解封*/
|
|
||||||
operate.operation = OperationEvent.Section.unlock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
|
||||||
/** 区段故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Section.fault.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
|
||||||
/** 区段计轴预复位*/
|
|
||||||
operate.operation = OperationEvent.Section.axlePreReset.stop.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getOperate(operate) {
|
sectionSelectChange() {
|
||||||
/** 弹框返回值处理*/
|
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||||
|
this.stepNum = 2;
|
||||||
|
} else {
|
||||||
|
this.model.time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const operate = {
|
||||||
|
operation: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.fault.choose2.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.unlock.choose2.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', {
|
||||||
|
break: true
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
setButtonEnable(param) {
|
commit() {
|
||||||
this.cmdDisabled = [true, true, true];
|
const operate = {
|
||||||
if (param && param.step >= 0) {
|
over: true,
|
||||||
this.cmdDisabled[param.step] = false;
|
operation: '',
|
||||||
|
cmdType: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.fault.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_FAULT_UNLOCK;
|
||||||
|
} else if (this.operation == OperationEvent.Section.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Section.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_UNBLOCK;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.status = '';
|
||||||
|
if (this.model.sectionName == this.model.confirmSectionName) {
|
||||||
|
this.stepNum = 3;
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.type = 'text';
|
||||||
|
this.stopTask();
|
||||||
|
this.doClose();
|
||||||
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
// this.$refs.popupAlarm.doShow(Object.assign(this.operate, {val: operate.val}), [`区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.model.status = '区段选择错误';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setMessage(message) {
|
cancel() {
|
||||||
this.message = message;
|
const operate = {
|
||||||
},
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
writeRecord(param) {
|
};
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
this.$store
|
||||||
editRecord(param) {
|
.dispatch('training/nextNew', operate)
|
||||||
this.tempData.forEach(elem => {
|
.then(({ valid }) => {
|
||||||
if (elem.order == param.order) {
|
if (valid) {
|
||||||
for (var prop in param) {
|
this.doClose();
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.alxe-effective .context {
|
||||||
|
height: 80px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,16 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="ningbo-01__systerm section-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 section-control"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="300px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
<el-row class="header">
|
<el-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="sectionName" size="small" disabled></el-input>
|
<el-input v-model="sectionName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row style="margin-top: 10px;">
|
<el-row style="margin-top: 10px;">
|
||||||
@ -31,14 +40,16 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionControl',
|
name: 'SectionControl',
|
||||||
@ -53,8 +64,8 @@
|
|||||||
operation: '',
|
operation: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
sectionName: '',
|
sectionName: '',
|
||||||
radio: '',
|
radio: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -64,24 +75,23 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||||
return '区段封锁';
|
return '区段封锁';
|
||||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||||
this.radio = '2';
|
|
||||||
return '区段控制';
|
return '区段控制';
|
||||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
this.radio = '1';
|
|
||||||
return '区段控制';
|
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) {
|
||||||
@ -91,19 +101,25 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (selected.type === '02') {
|
if (selected.type === '02') {
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
if (section) {
|
if (section) {
|
||||||
this.sectionName += section.name;
|
this.sectionName += section.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.sectionName += `-${selected.name}`;
|
this.sectionName += `-${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.Section.split.menu.operation) {
|
||||||
|
this.radio = '2';
|
||||||
|
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||||
|
this.radio = '1';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -128,21 +144,21 @@
|
|||||||
this.active();
|
this.active();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//道岔单锁
|
// 区段封锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Section.lock.menu.operation,
|
operation: OperationEvent.Section.lock.menu.operation,
|
||||||
}
|
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -150,19 +166,19 @@
|
|||||||
},
|
},
|
||||||
// 轨道区段切除
|
// 轨道区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Section.split.menu.operation,
|
operation: OperationEvent.Section.split.menu.operation,
|
||||||
}
|
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -170,38 +186,37 @@
|
|||||||
},
|
},
|
||||||
// 轨道区段激活
|
// 轨道区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Section.type,
|
|
||||||
operation: OperationEvent.Section.active.menu.operation,
|
operation: OperationEvent.Section.active.menu.operation,
|
||||||
}
|
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
};
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog class="ningbo-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px"
|
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
: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>
|
||||||
<el-form label-position="center" size="mini">
|
<el-form label-position="center" size="mini">
|
||||||
@ -52,16 +51,14 @@
|
|||||||
<span class="notice">{{message}}</span>
|
<span class="notice">{{message}}</span>
|
||||||
<el-row class="button-group">
|
<el-row class="button-group">
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" :offset="2">
|
<el-col :span="2" :offset="2">
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||||
@ -75,9 +72,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
import ConfirmControlSpeed from './childDialog/confirmControlSpeed';
|
||||||
import { now } from '@/utils/date';
|
import { now } from '@/utils/date';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionCmdSpeed',
|
name: 'SectionCmdSpeed',
|
||||||
@ -106,7 +104,7 @@
|
|||||||
stationName: '',
|
stationName: '',
|
||||||
name: '',
|
name: '',
|
||||||
speed: ''
|
speed: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
nameLabel() {
|
nameLabel() {
|
||||||
@ -117,11 +115,12 @@
|
|||||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||||
return '道岔名称';
|
return '道岔名称';
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
speedList() {
|
speedList() {
|
||||||
let list = [{ name: '不限速', value: '-1' }];
|
const list = [{ name: '不限速', value: '-1' }];
|
||||||
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
for (var i = 0; i * this.speedSpace <= this.maxSpeed; i++) {
|
||||||
let speed = String(i * this.speedSpace);
|
const speed = String(i * this.speedSpace);
|
||||||
list.push({ name: speed, value: speed });
|
list.push({ name: speed, value: speed });
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
@ -131,27 +130,25 @@
|
|||||||
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
|
{ code: OperationEvent.Section.setSpeed.menu.operation, name: '区段设置限速' },
|
||||||
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
|
{ code: OperationEvent.Section.cancelSpeed.menu.operation, name: '区段取消限速' },
|
||||||
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
|
{ code: OperationEvent.Switch.setSpeed.menu.operation, name: '区段设置限速' },
|
||||||
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' },
|
{ code: OperationEvent.Switch.cancelSpeed.menu.operation, name: '区段取消限速' }
|
||||||
]
|
];
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
return '区段设置限速';
|
return '区段设置限速';
|
||||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||||
return '区段取消限速'
|
return '区段取消限速';
|
||||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||||
return '区段设置限速';
|
return '区段设置限速';
|
||||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||||
return '区段取消限速'
|
return '区段取消限速';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdChoose() {
|
domIdChoose() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
return OperationEvent.Section.setSpeed.choose.domId;
|
return OperationEvent.Section.setSpeed.choose.domId;
|
||||||
@ -159,10 +156,9 @@
|
|||||||
/** 道岔设置限速*/
|
/** 道岔设置限速*/
|
||||||
return OperationEvent.Switch.setSpeed.choose.domId;
|
return OperationEvent.Switch.setSpeed.choose.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdCommand() {
|
domIdCommand() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
return OperationEvent.Section.setSpeed.order.domId;
|
return OperationEvent.Section.setSpeed.order.domId;
|
||||||
@ -176,10 +172,9 @@
|
|||||||
/** 道岔取消限速*/
|
/** 道岔取消限速*/
|
||||||
return OperationEvent.Switch.cancelSpeed.order.domId;
|
return OperationEvent.Switch.cancelSpeed.order.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
return OperationEvent.Section.setSpeed.confirm1.domId;
|
return OperationEvent.Section.setSpeed.confirm1.domId;
|
||||||
@ -193,10 +188,9 @@
|
|||||||
/** 道岔取消限速*/
|
/** 道岔取消限速*/
|
||||||
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
|
return OperationEvent.Switch.cancelSpeed.confirm1.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
return OperationEvent.Section.setSpeed.confirm2.domId;
|
return OperationEvent.Section.setSpeed.confirm2.domId;
|
||||||
@ -210,10 +204,9 @@
|
|||||||
/** 道岔设置限速*/
|
/** 道岔设置限速*/
|
||||||
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
|
return OperationEvent.Switch.cancelSpeed.confirm2.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdStop() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
return OperationEvent.Section.setSpeed.stop.domId;
|
return OperationEvent.Section.setSpeed.stop.domId;
|
||||||
@ -227,17 +220,14 @@
|
|||||||
/** 道岔取消限速*/
|
/** 道岔取消限速*/
|
||||||
return OperationEvent.Switch.cancelSpeed.stop.domId;
|
return OperationEvent.Switch.cancelSpeed.stop.domId;
|
||||||
}
|
}
|
||||||
}
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdClose() {
|
||||||
if (this.dialogShow) {
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
isCancelSpeed() {
|
isCancelSpeed() {
|
||||||
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation
|
return this.operation == OperationEvent.Section.cancelSpeed.menu.operation || this.operation == OperationEvent.Switch.cancelSpeed.menu.operation;
|
||||||
|| this.operation == OperationEvent.Switch.cancelSpeed.menu.operation
|
}
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cmdDisabled: {
|
cmdDisabled: {
|
||||||
@ -265,7 +255,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
if (!this.$store.state.menuOperation.break) {
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.timeCountCommand > 0) {
|
if (this.timeCountCommand > 0) {
|
||||||
@ -281,7 +271,7 @@
|
|||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
clearInterval(this.timer);
|
clearInterval(this.timer);
|
||||||
@ -297,20 +287,20 @@
|
|||||||
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
operate.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||||
if (selected.type === '02') {
|
if (selected.type === '02') {
|
||||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||||
if (section) {
|
if (section) {
|
||||||
this.name += section.name
|
this.name += section.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.name += selected.name
|
this.name += selected.name;
|
||||||
}
|
}
|
||||||
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
} else if (operate.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||||
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
this.name = selected.name
|
this.name = 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;
|
||||||
}
|
}
|
||||||
@ -344,31 +334,30 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
speedSelectChange(val) {
|
speedSelectChange(val) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type,
|
operation: ''
|
||||||
val: val,
|
};
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
operate.operation = OperationEvent.Section.setSpeed.choose.operation
|
operate.operation = OperationEvent.Section.setSpeed.choose.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||||
/** 道岔设置限速*/
|
/** 道岔设置限速*/
|
||||||
operate.operation = OperationEvent.Switch.setSpeed.choose.operation
|
operate.operation = OperationEvent.Switch.setSpeed.choose.operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
this.setMessage('请点击“下达”按钮,下达命令!');
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.setButtonEnable({ step: 0 });
|
this.setButtonEnable({ step: 0 });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
command() {
|
command() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type,
|
operation: ''
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -390,7 +379,7 @@
|
|||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
this.setMessage('请点击“确认1”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
||||||
@ -400,12 +389,12 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm1() {
|
confirm1() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type,
|
operation: ''
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -423,7 +412,7 @@
|
|||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
this.setMessage('请点击“确认2”按钮,确认命令!');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
@ -435,32 +424,40 @@
|
|||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
confirm2() {
|
confirm2() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: this.type,
|
operation: '',
|
||||||
val: this.speed
|
cmdType: '',
|
||||||
|
param: {
|
||||||
|
Spped: this.speed
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
// 目前取消限速没有用
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Section.setSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_SET_LIMIT_SPEED;
|
||||||
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Section.cancelSpeed.menu.operation) {
|
||||||
/** 区段取消限速*/
|
/** 区段取消限速*/
|
||||||
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Section.cancelSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED;
|
||||||
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.setSpeed.menu.operation) {
|
||||||
/** 道岔设置限速*/
|
/** 道岔设置限速*/
|
||||||
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Switch.setSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED;
|
||||||
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
||||||
/** 道岔取消限速*/
|
/** 道岔取消限速*/
|
||||||
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
operate.operation = OperationEvent.Switch.cancelSpeed.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('');
|
this.setMessage('');
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
@ -470,17 +467,17 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.timeCountCommand = -1;
|
this.timeCountCommand = -1;
|
||||||
this.timeCountConfirm = -1;
|
this.timeCountConfirm = -1;
|
||||||
this.setButtonEnable({ step: -1 });
|
this.setButtonEnable({ step: -1 });
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
stop() {
|
stop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type,
|
operation: ''
|
||||||
}
|
};
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
if (this.operation == OperationEvent.Section.setSpeed.menu.operation) {
|
||||||
/** 区段设置限速*/
|
/** 区段设置限速*/
|
||||||
@ -497,7 +494,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.setButtonEnable({ step: 0 });
|
this.setButtonEnable({ step: 0 });
|
||||||
@ -505,21 +502,21 @@
|
|||||||
} else {
|
} else {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: this.type,
|
type: this.type,
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
}
|
};
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
this.writeRecord({ order: ++this.order, date: now(), context: '点击关闭', result: '' });
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -547,8 +544,8 @@
|
|||||||
elem[prop] = param[prop];
|
elem[prop] = param[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -94,6 +94,7 @@
|
|||||||
v-model="radio2"
|
v-model="radio2"
|
||||||
label="1"
|
label="1"
|
||||||
style="display: block; text-align: left;"
|
style="display: block; text-align: left;"
|
||||||
|
:disabled="radio2 == 2"
|
||||||
@change="changeRadio"
|
@change="changeRadio"
|
||||||
>
|
>
|
||||||
本站台上行</el-radio>
|
本站台上行</el-radio>
|
||||||
@ -104,6 +105,7 @@
|
|||||||
v-model="radio2"
|
v-model="radio2"
|
||||||
label="2"
|
label="2"
|
||||||
style="display: block; text-align: left;"
|
style="display: block; text-align: left;"
|
||||||
|
:disabled="radio2 == 1"
|
||||||
@change="changeRadio"
|
@change="changeRadio"
|
||||||
>
|
>
|
||||||
本站台下行</el-radio>
|
本站台下行</el-radio>
|
||||||
@ -149,7 +151,6 @@ export default {
|
|||||||
earlyDepar: false, // 提前发车
|
earlyDepar: false, // 提前发车
|
||||||
buckle: true, // 设置扣车
|
buckle: true, // 设置扣车
|
||||||
AutomaticBuckle: false, // 区间自动扣车
|
AutomaticBuckle: false, // 区间自动扣车
|
||||||
standCode: '',
|
|
||||||
autoRadio: '1',
|
autoRadio: '1',
|
||||||
autoRadio1: '1'
|
autoRadio1: '1'
|
||||||
};
|
};
|
||||||
@ -213,7 +214,6 @@ export default {
|
|||||||
|
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
this.setDefaultItems();
|
this.setDefaultItems();
|
||||||
this.standCode = operate.code;
|
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -232,7 +232,7 @@ export default {
|
|||||||
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;
|
||||||
if (this.selected.direction == '01') {
|
if (!this.selected.right) {
|
||||||
this.radio2 = '2';
|
this.radio2 = '2';
|
||||||
} else {
|
} else {
|
||||||
this.radio2 = '1';
|
this.radio2 = '1';
|
||||||
@ -240,9 +240,17 @@ export default {
|
|||||||
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
|
||||||
this.AutomaticBuckle = true;
|
this.AutomaticBuckle = true;
|
||||||
this.autoRadio1 = '1';
|
this.autoRadio1 = '1';
|
||||||
|
this.autoRadio = '1';
|
||||||
|
if (!this.selected.right) {
|
||||||
|
this.autoRadio = '2';
|
||||||
|
}
|
||||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
|
||||||
this.AutomaticBuckle = true;
|
this.AutomaticBuckle = true;
|
||||||
this.autoRadio1 = '2';
|
this.autoRadio1 = '2';
|
||||||
|
this.autoRadio = '1';
|
||||||
|
if (!this.selected.right) {
|
||||||
|
this.autoRadio = '2';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
@ -281,17 +289,66 @@ export default {
|
|||||||
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
} else if (this.operation == OperationEvent.StationStand.earlyDeparture.menu.operation) {
|
||||||
/** 提前发车*/
|
/** 提前发车*/
|
||||||
this.earlyDeparture();
|
this.earlyDeparture();
|
||||||
|
} else if (this.operation == OperationEvent.StationStand.setDetainTrainAuto.menu.operation) {
|
||||||
|
/** 区间自动扣车*/
|
||||||
|
this.setDetainTrainAuto();
|
||||||
|
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation) {
|
||||||
|
/** 取消区间自动扣车*/
|
||||||
|
this.cancelDetainTrainAuto();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
setDetainTrainAuto() { // 区间自动扣车
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: OperationEvent.StationStand.setDetainTrainAuto.menu.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_AUTO,
|
||||||
|
param: {
|
||||||
|
Direction: this.autoRadio // 1 上行 2 下行
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancelDetainTrainAuto() { // 取消区间自动扣车
|
||||||
|
const operate = {
|
||||||
|
over: true,
|
||||||
|
operation: OperationEvent.StationStand.cancelDetainTrainAuto.menu.operation,
|
||||||
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_AUTO,
|
||||||
|
param: {
|
||||||
|
Direction: this.autoRadio // 1 上行 2 下行
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
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);
|
||||||
|
});
|
||||||
|
},
|
||||||
// 设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.setDetainTrain.menu.operation,
|
||||||
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN,
|
cmdType: CMD.Stand.CMD_STAND_SET_HOLD_TRAIN
|
||||||
param: {
|
|
||||||
StationStand_Code: this.standCode
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -312,10 +369,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrain.menu.operation,
|
||||||
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN,
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN
|
||||||
param: {
|
|
||||||
StationStand_Code: this.standCode
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -336,10 +390,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
||||||
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART,
|
cmdType: CMD.Stand.CMD_STAND_EARLY_DEPART
|
||||||
param: {
|
|
||||||
StationStand_Code: this.standCode
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -1,13 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="ningbo-01__systerm stand-detail" :title="title" :visible.sync="show" width="400px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<el-tree :data="treeData" :lazy="false" class="tree-height-max" :default-expand-all="true"
|
class="ningbo-01__systerm stand-detail"
|
||||||
style="background: #f0f0f0;">
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="400px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-tree
|
||||||
|
:data="treeData"
|
||||||
|
:lazy="false"
|
||||||
|
class="tree-height-max"
|
||||||
|
:default-expand-all="true"
|
||||||
|
style="background: #f0f0f0;"
|
||||||
|
>
|
||||||
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
|
<div slot-scope="{ node, data }" style="height: 24px; width: 100%;">
|
||||||
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
|
<div v-if="data.level == 1" style="line-height: 26px;">{{ data.name }}</div>
|
||||||
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
|
<div v-if="data.level == 2" style="background: lightgray; overflow: hidden; height: 100%;">
|
||||||
<div
|
<div
|
||||||
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;">
|
style="width: 46%;float: left; height: 24px; line-height: 24px; padding-left: 5px; border-right: 1px solid #f0f0f0;"
|
||||||
|
>
|
||||||
{{ data.name }}</div>
|
{{ data.name }}</div>
|
||||||
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
|
<div style="width: 54%;float: left; height: 24px; line-height: 24px; padding-left: 5px;">
|
||||||
{{ data.value }}</div>
|
{{ data.value }}</div>
|
||||||
@ -43,7 +58,7 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -77,65 +92,65 @@
|
|||||||
{
|
{
|
||||||
name: '车站',
|
name: '车站',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '站台',
|
name: '站台',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '停站时间',
|
name: '停站时间',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '跳停',
|
name: '跳停',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
name: '站台基本信息',
|
name: '站台基本信息',
|
||||||
level: 1,
|
level: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: '中心扣车',
|
name: '中心扣车',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '车站扣车',
|
name: '车站扣车',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
name: '扣车',
|
name: '扣车',
|
||||||
level: 1,
|
level: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: '上行站台',
|
name: '上行站台',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '下行站台',
|
name: '下行站台',
|
||||||
value: '',
|
value: '',
|
||||||
level: 2,
|
level: 2
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
name: '运行等级',
|
name: '运行等级',
|
||||||
level: 1,
|
level: 1
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationList',
|
'stationList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -153,14 +168,13 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
|
|
||||||
let stationList = this.stationList.slice();
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
|
||||||
let stationStand, station;
|
let stationStand, station;
|
||||||
if (selected.direction == '01') { // 下行
|
if (selected.direction == '01') { // 下行
|
||||||
// 下行时,此站不是最后一站
|
// 下行时,此站不是最后一站
|
||||||
@ -205,7 +219,7 @@
|
|||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
// this.standName = selected.name;
|
// this.standName = selected.name;
|
||||||
this.treeData[0].children[1].value = selected.name;
|
this.treeData[0].children[1].value = 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.treeData[0].children[0].value = station.name;
|
this.treeData[0].children[0].value = station.name;
|
||||||
@ -226,10 +240,10 @@
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.close.confirm.operation,
|
operation: OperationEvent.Command.close.confirm.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -237,25 +251,25 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.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(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,180 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog class="ningbo-01__systerm stand-detain-train-all" :title="title" :visible.sync="show" width="340px" :before-close="doClose"
|
|
||||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<div style="padding: 10px 20px; border: 1px double lightgray; ">
|
|
||||||
<span class="base-label">范围</span>
|
|
||||||
<el-row>
|
|
||||||
<el-radio-group v-model="upDown" @change="choose">
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-radio label="02" :id="upDown == '01' ? domIdChoose : ''">上行全线</el-radio>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6" :offset="8">
|
|
||||||
<el-radio label="01" :id="upDown == '02' ? domIdChoose : ''">下行全线</el-radio>
|
|
||||||
</el-col>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="table">
|
|
||||||
<span>扣车站台列表(中心设置)</span>
|
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" empty-text="所有站台都无扣车状态!" height="160" highlight-current-row>
|
|
||||||
<el-table-column prop="stationName" label="车站名称">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="standName" :width="140" label="扣车站台">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<el-row justify="center" class="button-group">
|
|
||||||
<el-col :span="10" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="disabled" @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"></notice-info>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { mapGetters } from 'vuex';
|
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'StandDetainTrainAll',
|
|
||||||
components: {
|
|
||||||
NoticeInfo
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialogShow: false,
|
|
||||||
loading: false,
|
|
||||||
selected: null,
|
|
||||||
upDown: '01',
|
|
||||||
tempData: [],
|
|
||||||
disabled: true,
|
|
||||||
operation: '',
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapGetters('map', [
|
|
||||||
'stationStandList',
|
|
||||||
]),
|
|
||||||
show() {
|
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
|
||||||
},
|
|
||||||
domIdCancel() {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
|
||||||
},
|
|
||||||
domIdChoose() {
|
|
||||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.choose.domId : '';
|
|
||||||
},
|
|
||||||
domIdConfirm() {
|
|
||||||
return this.dialogShow ? OperationEvent.StationStand.cancelDetainTrainAll.menu.domId : '';
|
|
||||||
},
|
|
||||||
title() {
|
|
||||||
// if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.menu.operation) {
|
|
||||||
if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
|
||||||
return '全线取消扣车';
|
|
||||||
} else {
|
|
||||||
return '全线取消跳停';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$store.dispatch('training/tipReload');
|
|
||||||
})
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
loadTableData() {
|
|
||||||
this.tempData = [];
|
|
||||||
this.stationStandList.forEach(elem => {
|
|
||||||
/** status 01: 未扣车*/
|
|
||||||
let stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).state;
|
|
||||||
let station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {}).model;
|
|
||||||
if (station && stand && stand.holdStatus != '01' && Number(elem.direction) === Number(this.upDown)) {
|
|
||||||
this.tempData.push({ stationName: station.name, standName: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//如果存在未扣车的情况,才可以做此操作
|
|
||||||
if (this.tempData.length > 0) {
|
|
||||||
this.disabled = false;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
doShow(operate, selected) {
|
|
||||||
this.selected = selected;
|
|
||||||
//不是断点激活的菜单应该将状态初始化
|
|
||||||
if (!this.dialogShow) {
|
|
||||||
this.loading = false;
|
|
||||||
this.upDown = selected.direction;
|
|
||||||
this.loadTableData();
|
|
||||||
this.operation = operate.operation;
|
|
||||||
}
|
|
||||||
this.dialogShow = true;
|
|
||||||
this.$nextTick(function () {
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose() {
|
|
||||||
this.loading = false;
|
|
||||||
this.dialogShow = false;
|
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
|
||||||
mouseCancelState(this.selected);
|
|
||||||
},
|
|
||||||
choose(upDown) {
|
|
||||||
//重新设置扣车站台
|
|
||||||
this.loadTableData();
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
|
||||||
val: `${upDown}`,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
commit() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
|
||||||
val: this.upDown,
|
|
||||||
}
|
|
||||||
|
|
||||||
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.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -92,9 +92,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrains',
|
name: 'StandDetainTrains',
|
||||||
@ -151,7 +153,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '跳停';
|
return '跳停';
|
||||||
@ -186,7 +188,7 @@ export default {
|
|||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.radio1 = '',
|
this.radio1 = '';
|
||||||
this.standName = '';
|
this.standName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected) {
|
if (selected) {
|
||||||
@ -238,18 +240,20 @@ export default {
|
|||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
let val = this.model.val1;
|
let val = this.model.val1;
|
||||||
if (this.model.val2) {
|
if (this.model.val2) {
|
||||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
val = this.model.val2;
|
||||||
}
|
}
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
||||||
// val: this.selected.direction //站台的上下行方向, 01:下行 /02:上行
|
cmdType: CMD.Stand.CMD_STAND_SET_JUMP_STOP,
|
||||||
val: val
|
param: {
|
||||||
|
Is_This_Platform: val,
|
||||||
|
Trip_Number: this.model.tripNumber
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -264,17 +268,20 @@ export default {
|
|||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
let val = this.model.val1;
|
let val = this.model.val1;
|
||||||
if (this.model.val2) {
|
if (this.model.val2) {
|
||||||
val = this.model.val2 + '::' + this.model.tripNumber;
|
val = this.model.val2;
|
||||||
}
|
}
|
||||||
const operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
||||||
val: val // 站台的上下行方向, 01:下行 /02:上行
|
cmdType: CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP,
|
||||||
|
param: {
|
||||||
|
Is_This_Platform: val,
|
||||||
|
Trip_Number: this.model.tripNumber
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -287,12 +294,11 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
@ -305,10 +311,9 @@ export default {
|
|||||||
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
? OperationEvent.StationStand.setJumpStop.selfStationStand.operation : OperationEvent.StationStand.cancelJumpStop.selfStationStand.operation;
|
||||||
this.model.val2 = '';
|
this.model.val2 = '';
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
@ -319,10 +324,9 @@ export default {
|
|||||||
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
? OperationEvent.StationStand.setJumpStop.otherStationStand.operation : OperationEvent.StationStand.cancelJumpStop.otherStationStand.operation;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
@ -333,11 +337,9 @@ export default {
|
|||||||
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
? OperationEvent.StationStand.setJumpStop.select.operation : OperationEvent.StationStand.cancelJumpStop.select.operation;
|
||||||
this.model.val1 = '';
|
this.model.val1 = '';
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: operation
|
||||||
operation: operation,
|
|
||||||
val: val
|
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
|
@ -1,47 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="ningbo-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
|
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<el-row class="header">
|
<el-row class="header">
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
<el-col :span="10"><span>集中站</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<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="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>站台状态</span>
|
<span>站台状态</span>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||||
<el-table-column prop="name" :width="180" label="下一站台">
|
<el-table-column prop="name" :width="180" label="下一站台" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="level" label="运行等级">
|
<el-table-column prop="level" label="运行等级">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)"
|
<el-select :id="chooseLevelId" v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)">
|
||||||
:id='chooseLevelId'>
|
<el-option
|
||||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
v-for="item in levelList"
|
||||||
:value="item.value">
|
:key="item.value"
|
||||||
</el-option>
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="time" label="区间运行时间">
|
<el-table-column prop="time" label="区间运行时间">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange"
|
<el-select
|
||||||
:disabled="scope.row.level == 0" :id='domIdChoose'>
|
:id="domIdChoose"
|
||||||
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label"
|
v-model="scope.row.time"
|
||||||
:value="item.value">
|
size="mini"
|
||||||
</el-option>
|
:disabled="scope.row.level == 0"
|
||||||
|
@change="timeSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeList[scope.row.level]"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="check" label="一直有效">
|
<el-table-column prop="check" label="一直有效">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
|
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||||
</el-checkbox>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -59,15 +66,16 @@
|
|||||||
<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" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import ConfirmControl from './childDialog/confirmControl';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandRunLevel',
|
name: 'StandRunLevel',
|
||||||
@ -87,38 +95,29 @@
|
|||||||
levelList: [
|
levelList: [
|
||||||
{
|
{
|
||||||
value: '0',
|
value: '0',
|
||||||
label: '自动',
|
label: '自动'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
label: '1',
|
label: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
label: '2',
|
label: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: '3',
|
label: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '4',
|
value: '4',
|
||||||
label: '4',
|
label: '4'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
isSelect: true,
|
isSelect: true,
|
||||||
isConfirm: false,
|
isConfirm: false,
|
||||||
time: ''
|
time: ''
|
||||||
}
|
};
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
//深度数据状态
|
|
||||||
tempData: {
|
|
||||||
handler(val, oldVal) {
|
|
||||||
this.checkTableDataSelction(val);
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -147,32 +146,41 @@
|
|||||||
return '设置运行等级';
|
return '设置运行等级';
|
||||||
},
|
},
|
||||||
timeList() {
|
timeList() {
|
||||||
let list = {
|
const list = {
|
||||||
'0': [{ value: 0, label: '0' }],
|
'0': [{ value: 0, label: '0' }],
|
||||||
'1': [], // 120 - 110
|
'1': [], // 120 - 110
|
||||||
'2': [], // 100 - 90
|
'2': [], // 100 - 90
|
||||||
'3': [], // 80 - 70
|
'3': [], // 80 - 70
|
||||||
'4': [], // 60 - 50
|
'4': [] // 60 - 50
|
||||||
|
};
|
||||||
|
for (let i = 110; i <= 120; i++) {
|
||||||
|
list['1'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
for (var i = 110; i <= 120; i++) {
|
for (let i = 90; i <= 100; i++) {
|
||||||
list['1'].push({ value: i, label: `${i}` })
|
list['2'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
for (var i = 90; i <= 100; i++) {
|
for (let i = 70; i <= 80; i++) {
|
||||||
list['2'].push({ value: i, label: `${i}` })
|
list['3'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
for (var i = 70; i <= 80; i++) {
|
for (let i = 50; i <= 60; i++) {
|
||||||
list['3'].push({ value: i, label: `${i}` })
|
list['4'].push({ value: i, label: `${i}` });
|
||||||
}
|
|
||||||
for (var i = 50; i <= 60; i++) {
|
|
||||||
list['4'].push({ value: i, label: `${i}` })
|
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
// 深度数据状态
|
||||||
|
tempData: {
|
||||||
|
handler(val, oldVal) {
|
||||||
|
this.checkTableDataSelction(val);
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getLevelByTime(time) {
|
getLevelByTime(time) {
|
||||||
@ -184,20 +192,19 @@
|
|||||||
},
|
},
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
let stationList = this.stationList.slice();
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
|
|
||||||
if (selected.direction == '01') { // 下行
|
if (selected.direction == '01') { // 下行
|
||||||
// 下行时,此站不是最后一站
|
// 下行时,此站不是最后一站
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 上行时,此站不是最后一站
|
// 上行时,此站不是最后一站
|
||||||
if (index != this.stationList.length) {
|
if (index != this.stationList.length) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -223,65 +230,58 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) { // 深度监测
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.check && !row.disabled) {
|
if (row.check && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.disabledSend = selection.length ? false : true;
|
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
timeSelectChange(time) {
|
timeSelectChange(time) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setRunLevel.choose.operation
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
};
|
||||||
val: time.toString(),
|
|
||||||
}
|
|
||||||
|
|
||||||
this.time = time.toString();
|
this.time = time.toString();
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
this.isConfirm = true;
|
this.isConfirm = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
levelSelectChange(row) {
|
levelSelectChange(row) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation
|
||||||
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
};
|
||||||
val: row.level.toString(),
|
|
||||||
}
|
|
||||||
|
|
||||||
this.time = row.time = this.timeList[row.level][0].value;
|
this.time = row.time = this.timeList[row.level][0].value;
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
this.isConfirm = true;
|
this.isConfirm = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
checkChange(check) {
|
checkChange(check) {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setRunLevel.check.operation
|
||||||
operation: OperationEvent.StationStand.setRunLevel.check.operation,
|
};
|
||||||
val: check.toString(),
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -291,46 +291,43 @@
|
|||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.isConfirm) {
|
if (this.isConfirm) {
|
||||||
let forver = this.tempData[0].check ? true : false;
|
const operate = {
|
||||||
let operate = {
|
over: true,
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||||
// operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
|
cmdType: CMD.Stand.CMD_STAND_SET_RUN_TIME,
|
||||||
// messages: [`设置运行等级:${this.tempData[0].name}-${this.standName},${this.tempData[0].time == 0 ? `运行时间自动` : `运行时间为${this.tempData[0].time}s`},有效次数为${this.tempData[0].check ? '一直有效' : '一次有效'}`],
|
param: {
|
||||||
val: [this.time, forver].join('::'),
|
Time: this.time,
|
||||||
|
Forver: this.tempData[0].check
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
};
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px"
|
<el-dialog v-dialogDrag class="ningbo-01__systerm stand-stop-time" :zIndex="2000" :title="title" :visible.sync="show" width="340px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<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>
|
||||||
@ -55,7 +54,8 @@
|
|||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
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';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
@ -73,8 +73,8 @@
|
|||||||
effective: false,
|
effective: false,
|
||||||
selected: null,
|
selected: null,
|
||||||
standName: '',
|
standName: '',
|
||||||
stationName: '',
|
stationName: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -97,13 +97,13 @@
|
|||||||
},
|
},
|
||||||
disabledUp() {
|
disabledUp() {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
return this.selected.direction !== '02'
|
return this.selected.direction !== '02';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
disabledDown() {
|
disabledDown() {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
return this.selected.direction !== '01'
|
return this.selected.direction !== '01';
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
@ -120,7 +120,7 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(operate, selected, tempDate) {
|
doShow(operate, selected, tempDate) {
|
||||||
@ -131,7 +131,7 @@
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.deviceStationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -139,7 +139,8 @@
|
|||||||
|
|
||||||
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
this.control = Number(tempDate.parkingTime) === -1 ? '01' : '02';
|
||||||
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
this.time = Number(tempDate.parkingTime) === -1 ? 15 : Number(tempDate.parkingTime);
|
||||||
this.effective = tempDate.parkingValidStatus ? true : false;
|
// this.effective = tempDate.parkingValidStatus ? true : false;
|
||||||
|
this.effective = tempDate.parkingValidStatus;
|
||||||
this.direction = selected.direction;
|
this.direction = selected.direction;
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
@ -160,79 +161,76 @@
|
|||||||
this.effective = true;
|
this.effective = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setStopTime.choose1.operation
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose1.operation,
|
};
|
||||||
val: `${control}`
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
chooseEffective(effective) {
|
chooseEffective() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setStopTime.choose2.operation
|
||||||
operation: OperationEvent.StationStand.setStopTime.choose2.operation,
|
};
|
||||||
val: `${effective}`
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
inputTime(time) {
|
inputTime() {
|
||||||
let operate = {
|
const operate = {
|
||||||
repeat: true,
|
repeat: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
operation: OperationEvent.StationStand.setStopTime.input.operation
|
||||||
operation: OperationEvent.StationStand.setStopTime.input.operation,
|
};
|
||||||
val: `${time}`
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||||
val: [`${this.control}`, this.time, this.effective].join('::'),
|
cmdType: CMD.Stand.CMD_STAND_SET_PARK_TIME,
|
||||||
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
param: {
|
||||||
|
Is_Control: this.control,
|
||||||
|
Time: this.time,
|
||||||
|
Effective: this.effective
|
||||||
}
|
}
|
||||||
|
// messages: [`停站时间: ${this.stationName} - ${this.standName}, 停站时间为${this.control == '01' ? '自动' : this.time + '秒'}, 有效次数为${this.effective == false ? '一次有效' : '一直有效'}`]
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// 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;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.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/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,256 +1,206 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<el-dialog v-dialogDrag :z-index="2000" class="ningbo-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||||
<el-dialog class="ningbo-01__systerm switch-cmd-control" :title="title" :visible.sync="show" width="800px"
|
|
||||||
: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>
|
||||||
<el-form label-position="center" size="mini">
|
<div style="margin-top: -10px">
|
||||||
<el-row>
|
<el-row type="flex" justify="left">
|
||||||
<el-col :span="8">
|
<el-col :span="18">操作设备</el-col>
|
||||||
<el-form-item label="类型" label-width="40px">
|
</el-row>
|
||||||
<el-select v-model="operation" size="small" disabled>
|
<el-row type="flex" justify="left">
|
||||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
<el-col :span="18">
|
||||||
:value="option.code">
|
<el-input v-model="model.switchName" :type="type" size="mini" :disabled="true" />
|
||||||
</el-option>
|
</el-col>
|
||||||
|
<el-col :span="4" :offset="1">
|
||||||
|
<el-button :id="domIdConfirm1" size="mini" :disabled="type==='password'" @click="commitOnce">确认</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||||
|
<span class="base-label">确认</span>
|
||||||
|
<div style="margin-top: -10px">
|
||||||
|
<el-row type="flex" justify="left">
|
||||||
|
<el-col :span="18">操作设备</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row type="flex" justify="left">
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-select :id="domIdChoose2" v-model="model.confirmSwitchName" filterable size="mini" :disabled="type==='text'" @change="sectionSelectChange">
|
||||||
|
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name" :value="option.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="4" :offset="1">
|
||||||
<el-form-item label="车站名称" label-width="80px">
|
<el-button :id="domIdConfirm2" size="mini" :loading="loading" :disabled="type==='text'" @click="commit">确认</el-button>
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="道岔名称" label-width="80px">
|
|
||||||
<el-input v-model="switchName" size="small" disabled></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
|
||||||
</div>
|
</div>
|
||||||
<el-table class="table" ref="tempData" :data="tempData" border style="width: 100%" size="mini"
|
</div>
|
||||||
highlight-current-row height="200">
|
<el-row type="flex" justify="left" style="margin-top:20px;margin-bottom: 10px;">
|
||||||
<el-table-column prop="order" :width="50" label="序号">
|
<el-col :span="6" :offset="1">操作倒计时</el-col>
|
||||||
</el-table-column>
|
<el-col :span="16">
|
||||||
<el-table-column prop="date" :width="160" label="时间">
|
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="context" :width="180" label="执行过程">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="result" label="执行结果">
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<span class="notice">{{message}}</span>
|
|
||||||
<el-row class="button-group">
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
|
|
||||||
v-show="timeCountCommand>0">({{timeCountCommand}})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
|
|
||||||
v-show="timeCountConfirm>0">({{timeCountConfirm}})</span></el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2" :offset="2">
|
|
||||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1">状态</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :offset="1" :span="23">
|
||||||
|
<el-input v-model="model.status" type="textarea" :rows="2" placeholder />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row class="botton-group" style="margin-top:20px">
|
||||||
|
<el-col :span="4" :offset="10">
|
||||||
|
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
|
<popup-alarm ref="popupAlarm" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { mapGetters } from 'vuex';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { now } from '@/utils/date';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import PopupAlarm from './childDialog/popupAlarm';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchCmdControl',
|
name: 'AlxeEffective',
|
||||||
|
components: {
|
||||||
|
NoticeInfo,
|
||||||
|
PopupAlarm
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
backOperate: '',
|
loading: false,
|
||||||
selected: '',
|
type: 'text',
|
||||||
order: 0,
|
timeout: 1000,
|
||||||
row: null,
|
timenum: 30,
|
||||||
timer: null,
|
stepNum: 0,
|
||||||
|
task: null,
|
||||||
|
model: {
|
||||||
|
switchName: '',
|
||||||
|
confirmSwitchName: '',
|
||||||
|
status: '',
|
||||||
|
time: 0
|
||||||
|
},
|
||||||
|
selected: null,
|
||||||
|
operate: null,
|
||||||
operation: '',
|
operation: '',
|
||||||
cmdDisabled: [true, true, true],
|
randomSectionList: []
|
||||||
stpDisabled: true,
|
};
|
||||||
tempData: [],
|
|
||||||
message: '',
|
|
||||||
timeCountCommand: -1,
|
|
||||||
timeCountConfirm: -1,
|
|
||||||
stationName: '',
|
|
||||||
switchName: ''
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeList() {
|
...mapGetters('map', ['stationList', 'switchList']),
|
||||||
return [
|
|
||||||
{ code: OperationEvent.Switch.unlock.menu.operation, name: '道岔单解' },
|
|
||||||
{ code: OperationEvent.Switch.unblock.menu.operation, name: '道岔解封' },
|
|
||||||
{ code: OperationEvent.Switch.fault.menu.operation, name: '道岔故障解锁' },
|
|
||||||
{ code: OperationEvent.Switch.axlePreReset.menu.operation, name: '道岔计轴预复位' },
|
|
||||||
]
|
|
||||||
},
|
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
domIdCommand() {
|
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
/** 道岔单解*/
|
|
||||||
return OperationEvent.Switch.unlock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
/** 道岔解封*/
|
|
||||||
return OperationEvent.Switch.unblock.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
return OperationEvent.Switch.fault.order.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
return OperationEvent.Switch.axlePreReset.order.domId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
domIdConfirm1() {
|
domIdConfirm1() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
|
||||||
return OperationEvent.Switch.unlock.confirm1.domId;
|
return OperationEvent.Switch.unlock.confirm1.domId;
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
/** 道岔解封*/
|
|
||||||
return OperationEvent.Switch.unblock.confirm1.domId;
|
return OperationEvent.Switch.unblock.confirm1.domId;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
return OperationEvent.Switch.fault.confirm1.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
return OperationEvent.Switch.axlePreReset.confirm1.domId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdConfirm2() {
|
domIdConfirm2() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
|
||||||
return OperationEvent.Switch.unlock.confirm2.domId;
|
return OperationEvent.Switch.unlock.confirm2.domId;
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
/** 道岔解封*/
|
|
||||||
return OperationEvent.Switch.unblock.confirm2.domId;
|
return OperationEvent.Switch.unblock.confirm2.domId;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
return OperationEvent.Switch.fault.confirm2.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
return OperationEvent.Switch.axlePreReset.confirm2.domId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdStop() {
|
domIdChoose2() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
return OperationEvent.Switch.unlock.choose2.domId;
|
||||||
return OperationEvent.Switch.unlock.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
/** 道岔解封*/
|
return OperationEvent.Switch.unblock.choose2.domId;
|
||||||
return OperationEvent.Switch.unblock.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
return OperationEvent.Switch.fault.stop.domId;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
return OperationEvent.Switch.axlePreReset.stop.domId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
},
|
},
|
||||||
domIdClose() {
|
domIdCancel() {
|
||||||
if (this.dialogShow) {
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
return OperationEvent.Command.close.menu.domId;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.dialogShow) {
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
return '道岔单解';
|
return '区故解';
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
return '道岔解封';
|
return '解除封锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
return '道岔故障解锁';
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
return '道岔计轴复位';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
cmdDisabled: {
|
'model.switchName': function(name) {
|
||||||
handler(val, oldVal) {
|
const index = Math.floor(Math.random(1) * 5);
|
||||||
this.stpDisabled = true;
|
for (var i = 0; i < 5; i++) {
|
||||||
val.forEach((elem, index) => {
|
if (i == index) {
|
||||||
// 在确定1之前的操作才可以终止
|
this.randomSectionList.push({ name });
|
||||||
if (elem == false && 1 <= index && index <= 2) {
|
} else {
|
||||||
this.stpDisabled = false;
|
const section = this.switchList[
|
||||||
|
Math.floor(Math.random(1) * this.switchList.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--;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
this.timer = setInterval(() => {
|
|
||||||
if (!this.$store.state.menuOperation.break) {
|
|
||||||
if (this.timeCountCommand > 0) {
|
|
||||||
this.timeCountCommand--;
|
|
||||||
} else if (this.timeCountCommand == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
}
|
|
||||||
if (this.timeCountConfirm > 0) {
|
|
||||||
this.timeCountConfirm--;
|
|
||||||
} else if (this.timeCountConfirm == 0) {
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null;
|
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
if (!this.dialogShow) {
|
this.operate = operate || {};
|
||||||
this.switchName = '';
|
this.operation = operate.operation;
|
||||||
this.stationName = '';
|
this.status = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
this.model.switchName = '';
|
||||||
this.switchName = selected.name
|
this.model.confirmSwitchName = '';
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
if (selected) {
|
||||||
if (station) {
|
if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
this.stationName = station.name;
|
const section = this.$store.getters['map/getDeviceByCode'](selected.code);
|
||||||
|
if (section) {
|
||||||
|
this.model.switchName = section.name;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.order = 0;
|
this.stepNum = 0;
|
||||||
this.operation = operate.operation;
|
this.loading = false;
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.tempData = [];
|
this.stopTask();
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.cmdDisabled = [false, true, true];
|
|
||||||
}
|
|
||||||
this.stpDisabled = true;
|
|
||||||
this.setMessage('请点击“下达”按钮,下达命令!');
|
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
});
|
});
|
||||||
@ -260,200 +210,114 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
command() {
|
waitSelectEvent() {
|
||||||
/** 道岔单解/道岔解封/道岔故障解锁/道岔计轴复位*/
|
if (!this.$store.state.menuOperation.break) {
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation ||
|
this.model.time -= 1;
|
||||||
this.operation == OperationEvent.Switch.unblock.menu.operation ||
|
if (this.model.time <= 0) {
|
||||||
this.operation == OperationEvent.Switch.fault.menu.operation ||
|
this.stopTask();
|
||||||
this.operation == OperationEvent.Switch.axlePreReset.menu.operation ||
|
}
|
||||||
this.operation == OperationEvent.Switch.cancelSpeed.menu.operation) {
|
|
||||||
/** 第一步不带弹框处理*/
|
|
||||||
this.commandNoPopUp();
|
|
||||||
} else {
|
|
||||||
/** 第一步带弹框处理*/
|
|
||||||
this.commandHasPopUp();
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
commandHasPopUp() {
|
commitOnce() {
|
||||||
|
this.stepNum = 1;
|
||||||
},
|
const operate = {
|
||||||
commandNoPopUp() {
|
operation: ''
|
||||||
let operate = {
|
};
|
||||||
type: MapDeviceType.Switch.type
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
/** 道岔单解*/
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
/** 道岔解封*/
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Switch.fault.order.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.order.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('请点击“确认1”按钮,确认命令!');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm1() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
/** 道岔单解*/
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
|
operate.operation = OperationEvent.Switch.unlock.confirm1.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
/** 道岔解封*/
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
operate.operation = OperationEvent.Switch.unblock.confirm1.operation;
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Switch.fault.confirm1.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm1.operation;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setMessage('请点击“确认2”按钮,确认命令!');
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.timeCountCommand = -1;
|
this.type = 'password';
|
||||||
this.timeCountConfirm = 10;
|
this.model.time = this.timenum;
|
||||||
this.setButtonEnable({ step: 2 });
|
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
confirm2() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
/** 道岔单解*/
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
/** 道岔解封*/
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Switch.fault.confirm2.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.confirm2.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.setMessage('');
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.timeCountCommand = -1;
|
|
||||||
this.timeCountConfirm = -1;
|
|
||||||
this.setButtonEnable({ step: -1 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
stop() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
|
||||||
/** 道岔单解*/
|
|
||||||
operate.operation = OperationEvent.Switch.unlock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
|
||||||
/** 道岔解封*/
|
|
||||||
operate.operation = OperationEvent.Switch.unblock.stop.operation;
|
|
||||||
} else if (this.operation == OperationEvent.Switch.fault.menu.operation) {
|
|
||||||
/** 道岔故障解锁*/
|
|
||||||
operate.operation = OperationEvent.Switch.fault.stop.operation
|
|
||||||
} else if (this.operation == OperationEvent.Switch.axlePreReset.menu.operation) {
|
|
||||||
/** 道岔计轴复位*/
|
|
||||||
operate.operation = OperationEvent.Switch.axlePreReset.stop.operation;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.setButtonEnable({ step: 0 });
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
|
|
||||||
} else {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
|
|
||||||
})
|
|
||||||
},
|
|
||||||
close() {
|
|
||||||
let operate = {
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation,
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
|
||||||
if (valid) {
|
|
||||||
this.doClose();
|
|
||||||
}
|
|
||||||
}).catch(error => {
|
|
||||||
this.doClose();
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getOperate(operate) {
|
sectionSelectChange() {
|
||||||
/** 弹框返回值处理*/
|
if (this.model.confirmSwitchName === this.model.switchName) {
|
||||||
|
this.stepNum = 2;
|
||||||
|
} else {
|
||||||
|
this.model.time = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
const operate = {
|
||||||
|
operation: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unlock.choose2.operation;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unblock.choose2.operation;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', {
|
||||||
|
break: true
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
setButtonEnable(param) {
|
commit() {
|
||||||
this.cmdDisabled = [true, true, true];
|
const operate = {
|
||||||
if (param && param.step >= 0) {
|
over: true,
|
||||||
this.cmdDisabled[param.step] = false;
|
operation: '',
|
||||||
|
cmdType: ''
|
||||||
|
};
|
||||||
|
|
||||||
|
if (this.operation == OperationEvent.Switch.unlock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unlock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK; // 解锁
|
||||||
|
} else if (this.operation == OperationEvent.Switch.unblock.menu.operation) {
|
||||||
|
operate.operation = OperationEvent.Switch.unblock.confirm2.operation;
|
||||||
|
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK; // 解封
|
||||||
|
}
|
||||||
|
|
||||||
|
this.model.status = '';
|
||||||
|
if (this.model.switchName == this.model.confirmSwitchName) {
|
||||||
|
this.stepNum = 3;
|
||||||
|
this.loading = true;
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
this.loading = false;
|
||||||
|
if (valid) {
|
||||||
|
this.type = 'text';
|
||||||
|
this.stopTask();
|
||||||
|
this.doClose();
|
||||||
|
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
// this.$refs.popupAlarm.doShow(Object.assign(this.operate, {val: operate.val}), [`区段 ${this.model.switchName}报告恢复计轴有效`]);
|
||||||
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.model.status = '区段选择错误';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setMessage(message) {
|
cancel() {
|
||||||
this.message = message;
|
const operate = {
|
||||||
},
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
writeRecord(param) {
|
};
|
||||||
this.tempData.push(param);
|
|
||||||
},
|
this.$store
|
||||||
editRecord(param) {
|
.dispatch('training/nextNew', operate)
|
||||||
this.tempData.forEach(elem => {
|
.then(({ valid }) => {
|
||||||
if (elem.order == param.order) {
|
if (valid) {
|
||||||
for (var prop in param) {
|
this.doClose();
|
||||||
elem[prop] = param[prop];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.doClose();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.alxe-effective .context {
|
||||||
|
height: 80px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,16 +1,55 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="ningbo-01__systerm switch-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 switch-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="switchName" size="small" disabled></el-input>
|
<el-input v-model="switchName" size="small" disabled />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="isActive" style="margin-top: 10px;">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-radio v-model="activeRadio" label="1" :disabled="activeRadio == 2" style="display: block; text-align: center;">
|
||||||
|
激活</el-radio>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-radio v-model="activeRadio" label="2" :disabled="activeRadio == 1" style="display: block; text-align: center;">
|
||||||
|
切除</el-radio>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="isLock" style="margin-top: 10px;">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-radio v-model="lockRadio" label="1" style="display: block; text-align: center;">
|
||||||
|
道岔单锁</el-radio>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-radio v-model="lockRadio" label="2" disabled style="display: block; text-align: center;">
|
||||||
|
道岔解单锁</el-radio>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row v-if="isTurnBlock" style="margin-top: 10px;">
|
||||||
|
<el-col :span="11">
|
||||||
|
<el-radio v-model="turnRadio" label="1" :disabled="turnRadio == 2" style="display: block; text-align: center;">
|
||||||
|
道岔定位</el-radio>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="11" :offset="2">
|
||||||
|
<el-radio v-model="turnRadio" label="2" :disabled="turnRadio == 1" style="display: block; text-align: center;">
|
||||||
|
道岔反位</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -21,14 +60,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>
|
||||||
<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 { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SwitchControl',
|
name: 'SwitchControl',
|
||||||
@ -43,7 +85,13 @@
|
|||||||
operation: '',
|
operation: '',
|
||||||
stationName: '',
|
stationName: '',
|
||||||
switchName: '',
|
switchName: '',
|
||||||
}
|
isLock: false,
|
||||||
|
isTurnBlock: false,
|
||||||
|
isActive: false,
|
||||||
|
turnRadio: '1',
|
||||||
|
lockRadio: '1',
|
||||||
|
activeRadio: '1'
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
@ -53,28 +101,29 @@
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||||
return '道岔单锁';
|
return '道岔控制';
|
||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
return '道岔封锁';
|
return '道岔封锁';
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.locate.menu.operation || this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
return '道岔转动';
|
return '道岔控制';
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
||||||
return '道岔强扳';
|
return '道岔强扳';
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||||
return '区段切除'
|
return '区段控制';
|
||||||
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||||
return '区段激活'
|
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) {
|
||||||
@ -83,13 +132,31 @@
|
|||||||
this.switchName = '';
|
this.switchName = '';
|
||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||||
this.switchName = selected.name
|
this.switchName = 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;
|
||||||
|
this.isLock = false;
|
||||||
|
this.isTurnBlock = false;
|
||||||
|
this.isActive = false;
|
||||||
|
if (this.operation == OperationEvent.Switch.locate.menu.operation) {
|
||||||
|
this.isTurnBlock = true;
|
||||||
|
this.turnRadio = '1';
|
||||||
|
} else if (this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
|
this.isTurnBlock = true;
|
||||||
|
this.turnRadio = '2';
|
||||||
|
} else if (this.operation == OperationEvent.Switch.lock.menu.operation) {
|
||||||
|
this.isLock = true;
|
||||||
|
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||||
|
this.isActive = true;
|
||||||
|
this.activeRadio = '2';
|
||||||
|
} else if (this.operation == OperationEvent.Switch.active.menu.operation) {
|
||||||
|
this.isActive = true;
|
||||||
|
this.activeRadio = '1';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -109,12 +176,9 @@
|
|||||||
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.block.menu.operation) {
|
||||||
/** 道岔封锁*/
|
/** 道岔封锁*/
|
||||||
this.block();
|
this.block();
|
||||||
} else if (this.operation == OperationEvent.Switch.turnout.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.locate.menu.operation || this.operation == OperationEvent.Switch.reverse.menu.operation) {
|
||||||
/** 道岔转动*/
|
/** 道岔转动*/
|
||||||
this.turnout(this.operation);
|
this.turnout(this.operation);
|
||||||
} else if (this.operation == OperationEvent.Switch.turnoutForce.menu.operation) {
|
|
||||||
/** 道岔强扳*/
|
|
||||||
this.turnoutForce();
|
|
||||||
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
} else if (this.operation == OperationEvent.Switch.split.menu.operation) {
|
||||||
/** 区段激活*/
|
/** 区段激活*/
|
||||||
this.split();
|
this.split();
|
||||||
@ -125,19 +189,19 @@
|
|||||||
},
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.lock.menu.operation,
|
operation: OperationEvent.Switch.lock.menu.operation,
|
||||||
}
|
cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -145,58 +209,39 @@
|
|||||||
},
|
},
|
||||||
// 道岔封锁
|
// 道岔封锁
|
||||||
block() {
|
block() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.block.menu.operation,
|
operation: OperationEvent.Switch.block.menu.operation,
|
||||||
}
|
cmdType: CMD.Switch.CMD_SWITCH_BLOCK
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔转动
|
// 道岔转动
|
||||||
turnout(operation) {
|
turnout() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.turnout.menu.operation,
|
operation: OperationEvent.Switch.turnout.menu.operation,
|
||||||
}
|
cmdType: CMD.Switch.CMD_SWITCH_TURN
|
||||||
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//道岔强扮
|
|
||||||
turnoutForce() {
|
|
||||||
let operate = {
|
|
||||||
send: true,
|
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.turnoutForce.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.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -204,18 +249,18 @@
|
|||||||
},
|
},
|
||||||
// 区段切除
|
// 区段切除
|
||||||
split() {
|
split() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.split.menu.operation,
|
operation: OperationEvent.Switch.split.menu.operation,
|
||||||
}
|
cmdType: CMD.Switch.CMD_SWITCH_CUT_OFF
|
||||||
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
@ -223,37 +268,36 @@
|
|||||||
},
|
},
|
||||||
// 区段激活
|
// 区段激活
|
||||||
active() {
|
active() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
over: true,
|
||||||
type: MapDeviceType.Switch.type,
|
|
||||||
operation: OperationEvent.Switch.active.menu.operation,
|
operation: OperationEvent.Switch.active.menu.operation,
|
||||||
}
|
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
};
|
||||||
}
|
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -251,7 +251,7 @@ export default {
|
|||||||
code: `${this.selected.code}`,
|
code: `${this.selected.code}`,
|
||||||
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
operation: OperationEvent.Signal.arrangementRoute.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
Signal_Code: `${this.selected.code}`
|
Signal_Code: this.selected.code
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ export default {
|
|||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.Station.type,
|
type: MapDeviceType.Station.type,
|
||||||
label: MapDeviceType.Station.label,
|
label: MapDeviceType.Station.label,
|
||||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
|
operation: OperationEvent.Station.stationSetRouteControlAll.menu.operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
@ -6,10 +6,9 @@
|
|||||||
<stand-detail ref="standDetail" />
|
<stand-detail ref="standDetail" />
|
||||||
<stand-run-level ref="standRunLevel" />
|
<stand-run-level ref="standRunLevel" />
|
||||||
<stand-stop-time ref="standStopTime" />
|
<stand-stop-time ref="standStopTime" />
|
||||||
<stand-detain-train-all ref="standDetainTrainAll" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
|
||||||
<stand-back-strategy ref="standBackStrategy" />
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
<StandBulkBuckleTrain ref="standBulkBuckleTrain" />
|
||||||
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -22,10 +21,9 @@ 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 StandBulkBuckleTrain from './dialog/standBulkBuckleTrain';
|
||||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
import Handler from '@/scripts/cmdPlugin/Handler';
|
// import Handler from '@/scripts/cmdPlugin/Handler';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||||
@ -43,8 +41,7 @@ export default {
|
|||||||
StandRunLevel,
|
StandRunLevel,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime
|
||||||
StandDetainTrainAll
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -353,10 +350,10 @@ export default {
|
|||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: `${this.selected.code}`,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.setJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.setJumpStop.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 }) => {
|
||||||
@ -370,10 +367,10 @@ export default {
|
|||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: `${this.selected.code}`,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.cancelJumpStop.menu.operation,
|
operation: OperationEvent.StationStand.cancelJumpStop.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 }) => {
|
||||||
@ -387,10 +384,10 @@ export default {
|
|||||||
setStopTime() {
|
setStopTime() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: `${this.selected.code}`,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
operation: OperationEvent.StationStand.setStopTime.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
StationStand_Code: `${this.selected.code}`
|
StationStand_Code: this.selected.code
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
||||||
@ -410,10 +407,10 @@ export default {
|
|||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: `${this.selected.code}`,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
StationStand_Code: `${this.selected.code}`
|
StationStand_Code: this.selected.code
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
||||||
@ -433,10 +430,10 @@ export default {
|
|||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: `${this.selected.code}`,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
operation: OperationEvent.StationStand.earlyDeparture.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 }) => {
|
||||||
@ -450,10 +447,10 @@ export default {
|
|||||||
detail() {
|
detail() {
|
||||||
const step = {
|
const step = {
|
||||||
start: true,
|
start: true,
|
||||||
code: `${this.selected.code}`,
|
code: this.selected.code,
|
||||||
operation: OperationEvent.StationStand.detail.menu.operation,
|
operation: OperationEvent.StationStand.detail.menu.operation,
|
||||||
param: {
|
param: {
|
||||||
StationStand_Code: `${this.selected.code}`
|
StationStand_Code: this.selected.code
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
this.$store.dispatch('training/nextNew', step).then(({ valid, response }) => {
|
||||||
|
@ -95,11 +95,11 @@ export default {
|
|||||||
handler: this.active,
|
handler: this.active,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
cmdType: CMD.Switch.CMD_SWITCH_ACTIVE
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
label: '确认计轴有效',
|
// label: '确认计轴有效',
|
||||||
handler: this.alxeEffective,
|
// handler: this.alxeEffective,
|
||||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
// cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
label: '设置临时限速',
|
label: '设置临时限速',
|
||||||
handler: this.setSpeed,
|
handler: this.setSpeed,
|
||||||
@ -211,6 +211,38 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 单操到定位
|
||||||
|
locate() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
operation: OperationEvent.Switch.locate.menu.operation,
|
||||||
|
param: {
|
||||||
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 单操到反位
|
||||||
|
reverse() {
|
||||||
|
const operate = {
|
||||||
|
start: true,
|
||||||
|
operation: OperationEvent.Switch.reverse.menu.operation,
|
||||||
|
param: {
|
||||||
|
Switch_Code: this.selected.code
|
||||||
|
}
|
||||||
|
};
|
||||||
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
|
if (valid) {
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
this.$refs.switchControl.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 道岔单锁
|
// 道岔单锁
|
||||||
lock() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -228,7 +260,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 道岔解封
|
// 道岔解锁
|
||||||
unlock() {
|
unlock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusBar" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusBar',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,26 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusDownTrainDetail" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusDownTrainDetail',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object,
|
|
||||||
default() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
};
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
|
|
||||||
</style>
|
|
@ -1,31 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div id="statusUpTrainDetail"></div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'StatusUpTrainDetail',
|
|
||||||
props: {
|
|
||||||
selected: {
|
|
||||||
type: Object
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
#statusUpTrainDetail {
|
|
||||||
z-index: 1000;
|
|
||||||
position: absolute;
|
|
||||||
height: $height;
|
|
||||||
line-height: $height;
|
|
||||||
border-radius: 0px !important;
|
|
||||||
top: 0px;
|
|
||||||
left: 0px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -84,7 +84,7 @@ export default {
|
|||||||
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_PASS_MODEL: {value:'Signal_Pass_Model', label: '设置/取消通过模式'},
|
||||||
/** 设置/取消通过模式 */
|
/** 查询进路状态 */
|
||||||
CMD_SIGNAL_DETAIL: {value:'Signal_Detail', label: '查询进路状态'}
|
CMD_SIGNAL_DETAIL: {value:'Signal_Detail', label: '查询进路状态'}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ class CommandHandle {
|
|||||||
getDefinition(cmdType) {
|
getDefinition(cmdType) {
|
||||||
if (cmdType) {
|
if (cmdType) {
|
||||||
const simulationRole = Handler.getSimulationRole();
|
const simulationRole = Handler.getSimulationRole();
|
||||||
// const simulationRole = 'Center';
|
|
||||||
return this.definitionMap[simulationRole][cmdType.value] || null;
|
return this.definitionMap[simulationRole][cmdType.value] || null;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
|
@ -881,7 +881,7 @@ export const OperationEvent = {
|
|||||||
domId: '_Tips-Signal-Detail-Menu'
|
domId: '_Tips-Signal-Detail-Menu'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 查询进路状态
|
// 设置/取消通过模式
|
||||||
singalPassModel: {
|
singalPassModel: {
|
||||||
menu: {
|
menu: {
|
||||||
operation: '317',
|
operation: '317',
|
||||||
@ -918,7 +918,7 @@ export const OperationEvent = {
|
|||||||
domId: '_Tips-Section-Query-Menu'
|
domId: '_Tips-Section-Query-Menu'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 区故解
|
// 区故解 (故障解锁)
|
||||||
fault: {
|
fault: {
|
||||||
button: {
|
button: {
|
||||||
operation: '4020',
|
operation: '4020',
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user