Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
03716c5ed3
@ -220,7 +220,7 @@ class SkinCode extends defaultStyle {
|
||||
detainCar: { // 扣车
|
||||
position: 1, // 扣车标识在站台上显示方向
|
||||
text: 'H', // 扣车显示内容
|
||||
offset: {x: -8, y: 13}, // 扣车偏移量
|
||||
offset: {x: -8, y: 17}, // 扣车偏移量
|
||||
centerTrainColor: '#FFFFFF', // 中心扣车颜色
|
||||
andCenterTrainColor: '#F61107', // 车站+中心扣车颜色
|
||||
detainTrainTextColor: '#E4EF50', // 车站扣除文字颜色
|
||||
@ -236,11 +236,11 @@ class SkinCode extends defaultStyle {
|
||||
jump: {
|
||||
position: 1, // 停跳方向
|
||||
text: 'S', // 停跳显示内容
|
||||
offset: {x: -8, y: -5},
|
||||
offset: {x: -8, y: -8},
|
||||
textColor: '#5376B3', // 停跳文字颜色
|
||||
arcColor: '#000000', // 停跳圆圈颜色
|
||||
fillColor: 'rgba(0,0,0,0)', // 透明填充颜色
|
||||
r: 8, // 圆半径大小
|
||||
r: 0, // 圆半径大小
|
||||
fontWeight: 'normal', // 文字居中
|
||||
textFontSize: 11
|
||||
},
|
||||
|
@ -56,7 +56,8 @@ class Status {
|
||||
logicLight: device.logicLight,
|
||||
greenOpen: device.greenOpen,
|
||||
redOpen: device.redOpen,
|
||||
yellowOpen: device.yellowOpen
|
||||
yellowOpen: device.yellowOpen,
|
||||
ciControl: device.ciControl || 0
|
||||
};
|
||||
}
|
||||
handlePsd(device) {
|
||||
|
@ -1,418 +1,445 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm alxe-effective" :title="title" :visible.sync="show" width="420px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||
<span class="base-label">准备</span>
|
||||
<div style="margin-top: 10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">
|
||||
<el-input :type="type" v-model="model.stationName" size="mini" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-input :type="type" v-model="model.sectionName" size="mini" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm1" size="mini" @click="commitOnce" :disabled="type==='password'">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||
<span class="base-label">确认</span>
|
||||
<div>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">
|
||||
<el-select :id="domIdChoose1" v-model="model.confirmStationName" filterable size="mini"
|
||||
@change="stationSelectChange" :disabled="type==='text'">
|
||||
<el-option v-for="(option,index) in filterStationList" :key="index" :label="option.name"
|
||||
:value="option.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-select :id="domIdChoose2" v-model="model.confirmSectionName" filterable size="mini"
|
||||
@change="sectionSelectChange" :disabled="type==='text'">
|
||||
<el-option v-for="(option,index) in randomSectionList" :key="index" :label="option.name"
|
||||
:value="option.name">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button :id="domIdConfirm2" size="mini" :loading="loading" @click="commit"
|
||||
:disabled="type==='text'">确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" :readonly="true"></el-input>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm alxe-effective"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="420px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;">
|
||||
<span class="base-label">准备</span>
|
||||
<div style="margin-top: 10px">
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :offset="1"> 状态</el-col>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">
|
||||
<el-input v-model="model.stationName" :type="type" size="mini" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<el-input v-model="model.sectionName" :type="type" size="mini" :disabled="true" />
|
||||
</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>
|
||||
<el-row>
|
||||
<el-col :offset="1" :span="23">
|
||||
<el-input type="textarea" :rows="2" placeholder="" v-model="model.status">
|
||||
</el-input>
|
||||
</el-col>
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding: 10px 20px;border: 1px solid lightgray;margin-top: 10px">
|
||||
<span class="base-label">确认</span>
|
||||
<div>
|
||||
<el-row type="flex" justify="left">
|
||||
<el-col :span="9">车站</el-col>
|
||||
<el-col :span="9">轨道/计轴</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 type="flex" justify="left">
|
||||
<el-col :span="9">
|
||||
<el-select
|
||||
:id="domIdChoose1"
|
||||
v-model="model.confirmStationName"
|
||||
filterable
|
||||
size="mini"
|
||||
:disabled="type==='text'"
|
||||
@change="stationSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="(option,index) in filterStationList"
|
||||
:key="index"
|
||||
:label="option.name"
|
||||
:value="option.name"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<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-col>
|
||||
<el-col :span="4" :offset="1">
|
||||
<el-button
|
||||
:id="domIdConfirm2"
|
||||
size="mini"
|
||||
:loading="loading"
|
||||
:disabled="type==='text'"
|
||||
@click="commit"
|
||||
>确认</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
<popup-alarm ref="popupAlarm"></popup-alarm>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
<el-row type="flex" justify="left" style="margin-top:20px">
|
||||
<el-col :span="6" :offset="1"> 操作倒计时</el-col>
|
||||
<el-col :span="16">
|
||||
<el-input v-model="model.time" size="mini" :readonly="true" />
|
||||
</el-col>
|
||||
</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" pop-class="beijing-01__systerm" />
|
||||
<popup-alarm ref="popupAlarm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import PopupAlarm from './childDialog/popupAlarm';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
timenum: 30,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
confirmStationName: '',
|
||||
confirmSectionName: '',
|
||||
status: '',
|
||||
time: 0,
|
||||
},
|
||||
selected: null,
|
||||
operate: null,
|
||||
operation: '',
|
||||
randomSectionList: []
|
||||
export default {
|
||||
name: 'AlxeEffective',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PopupAlarm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
type: 'text',
|
||||
timeout: 1000,
|
||||
timenum: 30,
|
||||
stepNum: 0,
|
||||
task: null,
|
||||
model: {
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
confirmStationName: '',
|
||||
confirmSectionName: '',
|
||||
status: '',
|
||||
time: 0
|
||||
},
|
||||
selected: null,
|
||||
operate: null,
|
||||
operation: '',
|
||||
randomSectionList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'sectionList'
|
||||
]),
|
||||
filterStationList() {
|
||||
const list = [];
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(elem => {
|
||||
if (list.findIndex(it => { return it.name == elem.name; }) < 0) {
|
||||
list.push({ name: elem.name });
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList',
|
||||
'sectionList'
|
||||
]),
|
||||
filterStationList() {
|
||||
let i = 0, list = [];
|
||||
if (this.stationList) {
|
||||
this.stationList.forEach(elem => {
|
||||
if (list.findIndex(it => { return it.name == elem.name }) < 0) {
|
||||
list.push({ name: elem.name });
|
||||
}
|
||||
});
|
||||
}
|
||||
return list;
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
this.earlyDepar = false;
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdConfirm1() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdConfirm2() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.confirm2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.confirm2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose1() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose1.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose1.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdChoose2() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Section.alxeEffective.choose2.domId;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return OperationEvent.Switch.alxeEffective.choose2.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation ||
|
||||
this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'model.sectionName': function (name) {
|
||||
let index = Math.floor(Math.random(1) * 5);
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (i == index) {
|
||||
this.randomSectionList.push({ name });
|
||||
} else {
|
||||
let section = this.sectionList[Math.floor(Math.random(1) * this.sectionList.length)];
|
||||
if (section.type != '02') {
|
||||
if (this.randomSectionList.findIndex(it => { return it.name == section.name }) < 0) {
|
||||
this.randomSectionList.push({ name: section.name });
|
||||
} else {
|
||||
i--;
|
||||
}
|
||||
return '确认计轴恢复工作';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'model.sectionName': function (name) {
|
||||
const index = Math.floor(Math.random(1) * 5);
|
||||
for (var i = 0; i < 5; i++) {
|
||||
if (i == index) {
|
||||
this.randomSectionList.push({ name });
|
||||
} else {
|
||||
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--;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
stopTask() {
|
||||
if (this.task) {
|
||||
clearInterval(this.task);
|
||||
this.task = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
stopTask() {
|
||||
if (this.task) {
|
||||
clearInterval(this.task);
|
||||
this.task = null;
|
||||
}
|
||||
|
||||
if (this.stepNum < 3) {
|
||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.model.name = '';
|
||||
this.model.time = '';
|
||||
this.type = 'text';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.status = '';
|
||||
this.model.stationName = '';
|
||||
this.model.sectionName = '';
|
||||
this.model.confirmStationName = '';
|
||||
this.model.confirmSectionName = '';
|
||||
if (selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.isSwitchSection) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
} else {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
this.model.sectionName = `${section.name}-${selected.name}`;
|
||||
} else {
|
||||
this.model.sectionName = `${selected.name}`;
|
||||
}
|
||||
}
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||
if (this.stepNum < 3) {
|
||||
this.$store.dispatch('training/backSteps', this.stepNum);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.model.name = '';
|
||||
this.model.time = '';
|
||||
this.type = 'text';
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.status = '';
|
||||
this.model.stationName = '';
|
||||
this.model.sectionName = '';
|
||||
this.model.confirmStationName = '';
|
||||
this.model.confirmSectionName = '';
|
||||
if (selected) {
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.isSwitchSection) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.stepNum = 0;
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.stopTask();
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
if (this.model.time <= 0) {
|
||||
this.stopTask();
|
||||
}
|
||||
}
|
||||
},
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: ''
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = this.timenum;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
})
|
||||
},
|
||||
stationSelectChange(val) {
|
||||
if (this.model.confirmStationName === this.model.stationName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
})
|
||||
},
|
||||
sectionSelectChange(val) {
|
||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
})
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over:true,
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: this.selected.code,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE,
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation
|
||||
}
|
||||
|
||||
this.model.status = '';
|
||||
if (this.model.stationName == this.model.confirmStationName &&
|
||||
this.model.sectionName == this.model.confirmSectionName) {
|
||||
this.stepNum = 3;
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.type = 'text';
|
||||
this.stopTask();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
|
||||
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
||||
} 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}`;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
})
|
||||
} else {
|
||||
if (this.model.stationName != this.model.confirmStationName) {
|
||||
this.model.status = '车站选择错误';
|
||||
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
||||
this.model.status = '区段选择错误';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
} else if (selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.switchSectionCode);
|
||||
if (section) {
|
||||
this.model.sectionName = section.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.model.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.stepNum = 0;
|
||||
this.loading = false;
|
||||
this.dialogShow = true;
|
||||
this.stopTask();
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
waitSelectEvent() {
|
||||
if (!this.$store.state.menuOperation.break) {
|
||||
this.model.time -= 1;
|
||||
if (this.model.time <= 0) {
|
||||
this.stopTask();
|
||||
}
|
||||
}
|
||||
},
|
||||
commitOnce() {
|
||||
this.stepNum = 1;
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: ''
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm1.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.type = 'password';
|
||||
this.model.time = this.timenum;
|
||||
this.task = setInterval(this.waitSelectEvent, this.timeout);
|
||||
}
|
||||
});
|
||||
},
|
||||
stationSelectChange(val) {
|
||||
if (this.model.confirmStationName === this.model.stationName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose1.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose1.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
sectionSelectChange(val) {
|
||||
if (this.model.confirmSectionName === this.model.sectionName) {
|
||||
this.stepNum = 2;
|
||||
} else {
|
||||
this.model.time = 0;
|
||||
}
|
||||
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: val
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.choose2.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.choose2.operation;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
});
|
||||
},
|
||||
/** 确认计轴恢复工作*/
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over:true,
|
||||
type: this.operate.type,
|
||||
operation: '',
|
||||
val: this.selected.code,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_COMFIRMATION_AXLE
|
||||
};
|
||||
|
||||
if (this.operation == OperationEvent.Section.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Section.alxeEffective.confirm2.operation;
|
||||
} else if (this.operation == OperationEvent.Switch.alxeEffective.menu.operation) {
|
||||
operate.operation = OperationEvent.Switch.alxeEffective.confirm2.operation;
|
||||
}
|
||||
|
||||
this.model.status = '';
|
||||
if (this.model.stationName == this.model.confirmStationName &&
|
||||
this.model.sectionName == this.model.confirmSectionName) {
|
||||
this.stepNum = 3;
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.type = 'text';
|
||||
this.stopTask();
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.popupAlarm.doShow(Object.assign(this.operate, { val: operate.val }),
|
||||
[`集中站 ${this.model.stationName} 区段 ${this.model.sectionName}报告恢复计轴有效`]);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
} else {
|
||||
if (this.model.stationName != this.model.confirmStationName) {
|
||||
this.model.status = '车站选择错误';
|
||||
} else if (this.model.sectionName != this.model.confirmSectionName) {
|
||||
this.model.status = '区段选择错误';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.alxe-effective .context {
|
||||
height: 80px !important;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,87 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -24,13 +24,13 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -1,163 +1,173 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo'
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号'
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
//进路设置
|
||||
routeSetting() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
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();
|
||||
});
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -165,4 +175,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -56,14 +56,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
|
@ -1,204 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>区段名</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="isDisplay" style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||
激活</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
|
||||
切除</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
radio: '',
|
||||
isDisplay: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.radio = '2';
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.radio = '1';
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解';
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return '计轴复位';
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.radio = '2';
|
||||
this.isDisplay = true;
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.radio = '1';
|
||||
this.isDisplay = true;
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
this.isDisplay = false;
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
this.isDisplay = false;
|
||||
}
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
/** 轨道区段切除*/
|
||||
this.split();
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
/** 轨道区段激活*/
|
||||
this.active();
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区故解*/
|
||||
this.faultUnlock();
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
/** 计轴预复位*/
|
||||
this.axlePreReset();
|
||||
}
|
||||
},
|
||||
// 区故解
|
||||
faultUnlock() {
|
||||
this.sendCommand(menuOperate.Section.fault);
|
||||
},
|
||||
// 计轴预复位
|
||||
axlePreReset() {
|
||||
this.sendCommand(menuOperate.Section.axlePreReset);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
this.sendCommand(menuOperate.Section.split);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
this.sendCommand(menuOperate.Section.active);
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
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;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow({}, error.message);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -43,13 +43,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
@ -122,7 +122,6 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
|
@ -58,7 +58,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
@ -174,7 +174,6 @@ export default {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
const stationList = this.stationList.slice();
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
|
@ -1,113 +1,123 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm station-human-control-all" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<span>{{title}}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-human-control-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationHumanControlAll',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null
|
||||
}
|
||||
export default {
|
||||
name: 'StationHumanControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
title() {
|
||||
return '全集中站进路交人工控';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '全集中站进路交人工控';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
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);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.humanControlALL.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -115,4 +125,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,133 +1,142 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm station-set-route-control-all" :title="title" :visible.sync="show"
|
||||
width="320px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body
|
||||
v-dialogDrag>
|
||||
<div style="padding: 0px 10px">
|
||||
<el-form size="small" label-width="90px" label-position="left" ref="form">
|
||||
<el-form-item label="集中站名称:" prop="stationName">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-radio-group v-model="mode">
|
||||
<el-row>
|
||||
<el-radio :label="true">检查冲突</el-radio>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-radio :label="false">不检查冲突</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-set-route-control-all"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div style="padding: 0px 10px">
|
||||
<el-form ref="form" size="small" label-width="90px" label-position="left">
|
||||
<el-form-item label="集中站名称:" prop="stationName">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-radio-group v-model="mode">
|
||||
<el-row>
|
||||
<el-radio :label="true">检查冲突</el-radio>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-radio :label="false">不检查冲突</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationSetRouteControlAll',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
mode: true,
|
||||
}
|
||||
export default {
|
||||
name: 'StationSetRouteControlAll',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: null,
|
||||
stationName: '',
|
||||
mode: true
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
title() {
|
||||
return '全集中站设置进路控制模式';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '全集中站设置进路控制模式';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
val: this.mode
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
this.operation = operate.operation;
|
||||
this.stationName = '';
|
||||
if (selected) {
|
||||
this.stationName = selected.name;
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Station.type,
|
||||
label: MapDeviceType.Station.label,
|
||||
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
|
||||
val: this.mode
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Station.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
@ -135,4 +144,4 @@
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,160 +1,169 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-define" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">新车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-define"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">新车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainDefine',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
tripNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
export default {
|
||||
name: 'TrainDefine',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
tripNumber: ''
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '定义车组号'
|
||||
}
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '定义车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.input.operation,
|
||||
val: this.addModel.tripNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.input.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
@ -169,4 +178,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -24,7 +24,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -34,136 +34,136 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
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');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.delTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
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');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.delTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,160 +1,169 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-edit" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="12">新车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-edit"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">新车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainEdit',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
export default {
|
||||
name: 'TrainEdit',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: ''
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改计划车'
|
||||
}
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '修改计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
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 = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
@ -169,4 +178,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,139 +1,148 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-flag" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 15px; margin-bottom: 30px">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="addModel.type" :disabled="true">
|
||||
<el-radio label="01">备选项</el-radio>
|
||||
<el-radio label="02">备选项</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-flag"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号:</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 15px; margin-bottom: 30px">
|
||||
<el-col :span="24">
|
||||
<el-radio-group v-model="addModel.type" :disabled="true">
|
||||
<el-radio label="01">备选项</el-radio>
|
||||
<el-radio label="02">备选项</el-radio>
|
||||
</el-radio-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainFlag',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
type: '01',
|
||||
groupNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
export default {
|
||||
name: 'TrainFlag',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
type: '01',
|
||||
groupNumber: ''
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'ATP切除功能'
|
||||
}
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return 'ATP切除功能';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
@ -148,4 +157,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,160 +1,169 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-move" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-move"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">车站</el-col>
|
||||
<el-col :span="11" :offset="1">车次窗</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName: '',
|
||||
trainWindowCode: '',
|
||||
groupNumber: ''
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移车组号'
|
||||
}
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '平移车组号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
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 = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
|
@ -1,160 +1,169 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-set-head" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">目的地号</el-col>
|
||||
<el-col :span="11" :offset="1">车次号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.targetCode" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.tripNumber" :disabled="true"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-head"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">目的地号</el-col>
|
||||
<el-col :span="11" :offset="1">车次号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.tripNumber" :disabled="true" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainSetHead',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
targetCode: '',
|
||||
tripNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
export default {
|
||||
name: 'TrainSetHead',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
targetCode: '',
|
||||
tripNumber: ''
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置头码车'
|
||||
}
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置头码车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.groupNumber
|
||||
};
|
||||
|
||||
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 = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
@ -169,4 +178,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,144 +1,151 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-set-plan" :title="title" :visible.sync="show" width="360px" :before-close="doClose"
|
||||
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号</el-col>
|
||||
<el-col :span="11" :offset="1">车次号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber"></el-input>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-plan"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="12">车组号</el-col>
|
||||
<el-col :span="11" :offset="1">车次号</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainSetPlan',
|
||||
components: {
|
||||
NoticeInfo
|
||||
export default {
|
||||
name: 'TrainSetPlan',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
tripNumber: ''
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
tripNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置计划车'
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
title() {
|
||||
return '设置计划车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.tripNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
@ -153,4 +160,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,144 +1,153 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm train-set-work" :title="title" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row>
|
||||
<el-col :span="6">车组号:</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm train-set-work"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="6">车组号:</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="5">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainSetWork',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: '',
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
export default {
|
||||
name: 'TrainSetWork',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置人工车'
|
||||
}
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdInput() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '设置人工车';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
|
||||
if (section) {
|
||||
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
|
||||
if (station) {
|
||||
this.addModel.stationName = station.name;
|
||||
}
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.addModel.trainWindowCode = selected.code;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.tripNumber
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
inputGroupNumber() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.input.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
val: this.addModel.tripNumber
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Train.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
/deep/ .el-row {
|
||||
@ -153,4 +162,4 @@
|
||||
padding: 0 5px;
|
||||
background-color: #F0F0F0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -89,7 +89,7 @@
|
||||
<station-control ref="stationControl" />
|
||||
<detain-train-contorl ref="detainTrainContorl" />
|
||||
<detain-train-contorl-up-down ref="detainTrainContorlUpDown" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
@ -100,7 +100,6 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { menuBarConvert, SystemType } from './utils/menuItemStatus';
|
||||
import StationControl from './menuDialog/stationControl';
|
||||
import DetainTrainContorl from './menuDialog/detainTrainContorl';
|
||||
import DetainTrainContorlUpDown from './menuDialog/detainTrainContorlUpDown';
|
||||
@ -109,7 +108,7 @@ import TrainTranstalet from './menuDialog/trainTranstalet';
|
||||
import TrainDelete from './menuDialog/trainDelete';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
@ -700,7 +699,6 @@ export default {
|
||||
return list;
|
||||
},
|
||||
initMenu(menu) {
|
||||
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
|
||||
if (this.menu[2]) {
|
||||
this.menu[2].children = this.initStationList();
|
||||
}
|
||||
|
@ -13,8 +13,8 @@
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span> {{ message }}</span><br>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
@ -25,13 +25,13 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -21,168 +21,166 @@
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
}
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '全线扣车',
|
||||
'02': '取消全线扣车'
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return '全线扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return '取消全线扣车';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.setDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDetainTrainAll.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.control = '02';
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.setDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.cancelDetainTrainAll();
|
||||
}
|
||||
},
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.setDetainTrainAll.mbar.operation) {
|
||||
// 设置全线扣车
|
||||
this.setDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDetainTrainAll.mbar.operation) {
|
||||
// 取消全线扣车
|
||||
this.cancelDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
// 设置全线扣车
|
||||
setDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
// 设置全线扣车
|
||||
setDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.setDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认设置全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
// 取消全线扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
// 取消全线扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-radio {
|
||||
|
@ -1,183 +1,190 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm station-control" :title="title" :visible.sync="show" width="400px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-row style="padding-bottom: 10px;padding-top:10px" v-for="item in Object.keys(controlProps)" :key="item">
|
||||
<el-radio :label="item">{{controlProps[item]}}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" @click="cancel" style="margin-left: 200px">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm station-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-radio-group v-model="control" :disabled="true">
|
||||
<el-row v-for="item in Object.keys(controlProps)" :key="item" style="padding-bottom: 10px;padding-top:10px">
|
||||
<el-radio :label="item">{{ controlProps[item] }}</el-radio>
|
||||
</el-row>
|
||||
</el-radio-group>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button :id="domIdCommit" :disabled="disabledCommit" @click="handleCommit">设置</el-button>
|
||||
<el-button :id="domIdCancel" :disabled="disabledClose" style="margin-left: 200px" @click="cancel">退出
|
||||
</el-button>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo'
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车',
|
||||
},
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StationStand',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
operate: null,
|
||||
dialogShow: false,
|
||||
disabledClose: false,
|
||||
disabledCommit: false,
|
||||
control: '01',
|
||||
controlProps: {
|
||||
'01': '取消上行扣车',
|
||||
'02': '取消下行扣车'
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
]),
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'started'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCommit() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
title() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return '取消上行扣车';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return '取消下行扣车';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelUpDetainTrainAll.menu.domId;
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
return OperationEvent.StationStand.cancelDownDetainTrainAll.menu.domId;
|
||||
}
|
||||
return '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01'
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02'
|
||||
}
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.control = '01';
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.control = '02';
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: 'bar',
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.cancelUpDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.cancelDownDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
// 取消全线上行扣车
|
||||
cancelUpDetainTrainAll() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelUpDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线上行扣车!'],
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
// 取消全线下行扣车
|
||||
cancelDetainTrainAll() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDownDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线下行扣车!'],
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
// 路由指令
|
||||
handleCommit() {
|
||||
if (this.operation == OperationEvent.StationStand.cancelUpDetainTrainAll.mbar.operation) {
|
||||
// 取消全线上行扣车
|
||||
this.cancelUpDetainTrainAll();
|
||||
} else if (this.operation == OperationEvent.StationStand.cancelDownDetainTrainAll.mbar.operation) {
|
||||
// 取消全线下行扣车
|
||||
this.cancelDownDetainTrainAll();
|
||||
}
|
||||
},
|
||||
|
||||
// 取消全线上行扣车
|
||||
cancelUpDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelUpDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线上行扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
// 取消全线下行扣车
|
||||
cancelDetainTrainAll() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: MapDeviceType.StationStand.type,
|
||||
operation: OperationEvent.StationStand.cancelDownDetainTrainAll.menu.operation,
|
||||
val: this.control,
|
||||
messages: ['确认取消全线下行扣车!']
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
} else {
|
||||
this.disabledSure = false;
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped rel="stylesheet/scss" lang="scss" scoped>
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
/deep/ .el-radio {
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -9,112 +9,91 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import CancelAllLimit from './dialog/cancelAllLimit';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: '',
|
||||
auth: { station: true, center: false }
|
||||
}],
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: true, center: false }
|
||||
}
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: false, center: true }
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
if (this.operatemode === OperateMode.ADMIN) {
|
||||
this.menu = [...this.menu];
|
||||
}
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
const operate = {
|
||||
start: true,
|
||||
send: true,
|
||||
code: this.selected.code,
|
||||
type: MapDeviceType.LimitControl.type,
|
||||
label: MapDeviceType.LimitControl.label,
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation
|
||||
};
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
name: 'MenuLimit',
|
||||
components: {
|
||||
PopMenu,
|
||||
CancelAllLimit
|
||||
},
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
default() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menu: [],
|
||||
menuNormal: {
|
||||
Local: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '取消全线临时限速',
|
||||
handler: this.cancelSpeed,
|
||||
cmdType: CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.LimitControl) && !this.buttonOperation) {
|
||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||
} else {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
clickEvent() {
|
||||
const self = this;
|
||||
window.onclick = function (e) {
|
||||
self.doClose();
|
||||
};
|
||||
},
|
||||
initMenu() {
|
||||
// 编辑模式菜单列表
|
||||
this.menu = MenuContextHandler.covert(this.menuNormal);
|
||||
},
|
||||
doShow(point) {
|
||||
this.clickEvent();
|
||||
this.initMenu();
|
||||
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
|
||||
this.$refs.popMenu.resetShowPosition(point);
|
||||
}
|
||||
},
|
||||
doClose() {
|
||||
if (this.$refs && this.$refs.popMenu) {
|
||||
this.$refs.popMenu.close();
|
||||
}
|
||||
},
|
||||
// 取消速度
|
||||
cancelSpeed() {
|
||||
commitOperate(menuOperate.LimitControl.cancelSpeed, {}, 0).then(({valid, operate})=>{
|
||||
if (valid) {
|
||||
this.$refs.cancelAllLimit.doShow(operate, this.selected);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<section-control ref="sectionControl" pop-class="beijing-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
@ -85,6 +85,15 @@ export default {
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
'$store.state.menuOperation.menuCount': function (val) {
|
||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) {
|
||||
@ -99,15 +108,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('training', [
|
||||
'mode',
|
||||
'operatemode'
|
||||
]),
|
||||
...mapGetters('menuOperation', [
|
||||
'buttonOperation'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
const isDev = process.env.NODE_ENV === 'development';
|
||||
if (isDev) {
|
||||
|
@ -2,10 +2,10 @@
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<route-selection ref="routeSelection" />
|
||||
<route-control ref="routeControl" :pop-class="'beijing-01__systerm'" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<route-detail ref="routeDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<route-control ref="routeControl" :pop-class="systemName" />
|
||||
<route-hand-control ref="routeHandControl" :system-name="systemName" />
|
||||
<route-detail ref="routeDetail" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<password-box ref="password" @checkOver="passWordCommit" />
|
||||
</div>
|
||||
</template>
|
||||
@ -14,9 +14,9 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import RouteControl from '@/jmapNew/theme/components/menus/dialog/routeControl';
|
||||
import RouteSelection from './dialog/routeSelection';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import RouteHandControl from '@/jmapNew/theme/components/menus/dialog/routeHandControl';
|
||||
import RouteDetail from '@/jmapNew/theme/components/menus/dialog/routeDetail';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
@ -49,6 +49,7 @@ export default {
|
||||
return {
|
||||
menu: [],
|
||||
clickNum:0,
|
||||
systemName:'beijing-01__systerm',
|
||||
oldSelected:null,
|
||||
menuNormal: {
|
||||
Local: [
|
||||
|
@ -4,7 +4,7 @@
|
||||
<station-cmd-control ref="stationCmdControl" />
|
||||
<station-human-control-all ref="stationHumanControlAll" />
|
||||
<station-set-route-control-all ref="stationSetRouteControlAll" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -13,7 +13,7 @@ import PopMenu from '@/components/PopMenu';
|
||||
import StationCmdControl from './dialog/stationCmdControl';
|
||||
import StationHumanControlAll from './dialog/stationHumanControlAll';
|
||||
import StationSetRouteControlAll from './dialog/stationSetRouteControlAll';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
|
@ -6,7 +6,7 @@
|
||||
<stand-detail ref="standDetail" />
|
||||
<stand-run-level ref="standRunLevel" :system-name="systemName" />
|
||||
<stand-stop-time ref="standStopTime" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<stand-back-strategy ref="standBackStrategy" />
|
||||
</div>
|
||||
</template>
|
||||
@ -19,7 +19,7 @@ import StandBackStrategy from './dialog/standBackStrategy';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import StandRunLevel from '@/jmapNew/theme/components/menus/dialog/standRunLevel';
|
||||
import StandStopTime from '@/jmapNew/theme/components/menus/dialog/standStopTime';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
|
@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<section-control ref="sectionControl" pop-class="beijing-01__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="beijing-01__systerm" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
<alxe-effective ref="alxeEffective" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import AlxeEffective from './dialog/alxeEffective';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import {DeviceMenu } from '@/scripts/ConstDic';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
<train-delete ref="trainDelete" />
|
||||
<train-define ref="trainDefine" />
|
||||
<train-move ref="trainMove" />
|
||||
@ -17,11 +17,11 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperateMode } from '@/scripts/ConstDic';
|
||||
import { DeviceMenu } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState, menuConvert, trainMenuFiltration } from './utils/menuItemStatus';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import TrainDelete from './dialog/trainDelete';
|
||||
import TrainDefine from './dialog/trainDefine';
|
||||
import TrainMove from './dialog/trainMove';
|
||||
@ -35,7 +35,7 @@ import TrainFlag from './dialog/trainFlag';
|
||||
import { mouseCancelState } from './utils/menuItemStatus';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'MenuTrain',
|
||||
|
@ -1,278 +1,297 @@
|
||||
<template>
|
||||
<el-dialog class="beijing-01__systerm passive-control" title="控制模式请求" :visible.sync="show" width="700px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span>
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%" height="250" center
|
||||
size="mini" highlight-current-row>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.operate}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.control.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.target.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{count}}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm passive-control"
|
||||
title="控制模式请求"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span class="control-label">{{ `${requestInfo}请求如下区域的控制模式` }}</span>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%"
|
||||
height="250"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{ count }}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="beijing-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, TrainingMode, OperationEvent, getDomIdByOperation, checkOperationIsCurrentOperate } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
// import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0,
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000);
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02'
|
||||
}
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
|
||||
const model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false
|
||||
};
|
||||
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
const control = (device || {}).state;
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
},
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
const operate = {
|
||||
start: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000)
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
let selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
})
|
||||
}
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.disabledSend = selection.length ? false : true;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
|
||||
let model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
let device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
let control = (device||{}).state;
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
let operate = {
|
||||
start: true,
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::')
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
let codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
})
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
let operate = {
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
refuse() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
type: MapDeviceType.StationControl.type,
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@ -282,4 +301,4 @@
|
||||
line-height: 30px;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -1,87 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-01__system notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -248,7 +248,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,168 +0,0 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag class="chengdou-01__system section-control" :title="title" :visible.sync="show" width="300px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>{{ $t('menu.stationName') }}</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>{{ $t('menu.section') }}</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">{{ $t('global.confirm') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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 {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
return this.$t('menu.menuSection.sectionBlockade');
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
return this.$t('menu.menuSection.orbitalSectionResection');
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return this.$t('menu.menuSection.orbitalSectionActive');
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
this.lock(); // 区段封锁
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
this.split(); // 轨道区段切除
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
this.active(); // 轨道区段激活
|
||||
}
|
||||
},
|
||||
// 区段单锁
|
||||
lock() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.doClose();
|
||||
this.loading = false;
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -62,7 +62,7 @@
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
<system-login ref="systemLogin" />
|
||||
<system-logout ref="systemLogout" />
|
||||
</div>
|
||||
@ -75,7 +75,7 @@ import { State2SimulationMap } from '@/scripts/cmdPlugin/Config';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import SystemLogin from './menuDialog/systemLogin';
|
||||
import SystemLogout from './menuDialog/systemLogout';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-01__system two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
v-dialogDrag
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
@ -13,8 +13,8 @@
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span> {{ message }}</span><br>
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
@ -25,14 +25,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
@ -127,7 +127,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch((error) => {
|
||||
}, 1000).catch(() => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<section-control ref="sectionControl" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-01__system" />
|
||||
<section-cmd-control ref="sectionCmdControl" />
|
||||
<speed-limit-control ref="speedLimitControl" />
|
||||
</div>
|
||||
@ -10,9 +10,9 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SectionCmdControl from './dialog/sectionCmdControl';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" :pop-class="popClass" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CreateDeviceLabel from './dialog/createDeviceLabel';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
<platform-dwell ref="platformDwell" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import PlatformDwell from './dialog/platformDwell';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
<switch-control ref="switchControl" pop-class="chengdou-01__system" />
|
||||
<create-device-label ref="createDeviceLabel" />
|
||||
</div>
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CreateDeviceLabel from './dialog/createDeviceLabel';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-01__system" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
@ -20,7 +20,7 @@ export default {
|
||||
name: 'MenuTrain',
|
||||
components: {
|
||||
PopMenu,
|
||||
NoticeInfo,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
|
@ -1,280 +1,298 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-01__system passive-control" title="控制模式请求" :visible.sync="show" width="700px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span>
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%; height: 250px" center
|
||||
size="mini" highlight-current-row>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.operate}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.control.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.target.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{count}}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-01__system passive-control"
|
||||
title="控制模式请求"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span class="control-label">{{ `${requestInfo}请求如下区域的控制模式` }}</span>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%; height: 250px"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{ count }}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
// import { mapGetters } from 'vuex';
|
||||
// import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0,
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000);
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02'
|
||||
}
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
|
||||
const model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false
|
||||
};
|
||||
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
const control = (device || {}).state;
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
},
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
const operate = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000)
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
let selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
})
|
||||
}
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.disabledSend = selection.length ? false : true;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
|
||||
let model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
let device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
let control = (device || {}).state
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
let operate = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::')
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
let codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
})
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
let operate = {
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
refuse() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -1,86 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
if (messages && messages != 'null') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -24,13 +24,13 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -1,163 +1,173 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm confirm-control" :title="title" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span>{{message}}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm confirm-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/noticeInfo'
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
export default {
|
||||
name: 'ConfirmTrain',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: {},
|
||||
messages: '',
|
||||
operation: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
return '添加列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
return '修改列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
return '删除列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
return '移动列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
return '交换列车识别号';
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
return '修改车组号'
|
||||
}
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
domIdConfirm() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
/** 添加列车识别号*/
|
||||
return OperationEvent.Train.addTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
/** 修改列车识别号*/
|
||||
return OperationEvent.Train.editTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
/** 删除列车识别号*/
|
||||
return OperationEvent.Train.delTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
/** 移动列车识别号*/
|
||||
return OperationEvent.Train.moveTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
/** 交换列车识别号*/
|
||||
return OperationEvent.Train.switchTrainId.confirm.domId;
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
/** 修改车组号*/
|
||||
return OperationEvent.Train.editTrainNo.confirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
if (!this.dialogShow) {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
//进路设置
|
||||
routeSetting() {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation,
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.doClose();
|
||||
});
|
||||
this.operate = operate || {};
|
||||
this.messages = operate.messages;
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation === OperationEvent.Train.addTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.delTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.moveTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.switchTrainId.menu.operation) {
|
||||
this.routeSetting();
|
||||
} else if (this.operation === OperationEvent.Train.editTrainNo.menu.operation) {
|
||||
this.routeSetting();
|
||||
}
|
||||
},
|
||||
// 进路设置
|
||||
routeSetting() {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Train.addTrainId.confirm.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
|
@ -13,7 +13,7 @@
|
||||
>
|
||||
<el-row>
|
||||
<el-col :offset="2">
|
||||
<span v-for="message in messages">{{ message }}</span><br>
|
||||
<span v-for="(message, index) in messages" :key="index">{{ message }}</span><br>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
@ -21,7 +21,6 @@
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -67,7 +67,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -76,7 +76,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
|
@ -23,34 +23,34 @@
|
||||
<div class="route-table-box">
|
||||
<span class="route-table-tip">进路列表</span>
|
||||
<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 99%;" size="mini" height="90" highlight-current-row @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" style="margin-top: 40px">
|
||||
@ -65,7 +65,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<!--<password-box ref="passwordBox" @checkOver="passWordCommit" />-->
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -73,7 +73,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import PasswordBox from './childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -81,7 +81,7 @@ import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name: 'RouteSelection',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
NoticeInfo
|
||||
// PasswordBox
|
||||
},
|
||||
mixins: [
|
||||
|
@ -15,32 +15,32 @@
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" :highlight-current-row="highlight" :height="140" @row-click="clickEvent">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -54,7 +54,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -65,7 +65,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -33,32 +33,32 @@
|
||||
highlight-current-row
|
||||
@row-click="clickEvent"
|
||||
>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px;" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleRouteName(scope.row.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="startSignalCode" label="方向" style="margin-left: 30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ handleDirection(scope.row.startSignalCode) }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="turnBack" label="属性" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.turnBack ? '折返': '直通' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="controlType" label="控制" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
<div :style="{color: scope.row.turnBack? '#00FFFF':'#000000'}">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -75,7 +75,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -83,7 +83,7 @@
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
@ -230,7 +230,7 @@ export default {
|
||||
// 设置新选的进路区段为切除状态
|
||||
row.routeSectionList.forEach(elem => {
|
||||
const section = deepAssign({}, this.$store.getters['map/getDeviceByCode'](elem));
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length){
|
||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||
section.logicSectionCodeList.forEach(item => {
|
||||
const sec = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item));
|
||||
sec.cutOff = true;
|
||||
|
@ -1,167 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="440px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="3"><span>车站</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="3" :offset="2"><span>区段</span></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="11" :offset="13">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import PasswordBox from './childDialog/passwordInputBox';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += selected.name;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.operation = operate.operation || '';
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
/** 区故解*/
|
||||
this.fault();
|
||||
}
|
||||
},
|
||||
passWordCommit(data) {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: data.operateNext,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
// 区故解
|
||||
fault() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
operateNext: OperationEvent.Section.fault.confirm.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -30,7 +30,7 @@
|
||||
<el-button :id="domIdConfirm" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -38,7 +38,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
@ -112,7 +112,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
|
@ -225,7 +225,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -233,7 +233,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
@ -665,14 +665,14 @@ export default {
|
||||
},
|
||||
// 设置运行速度
|
||||
setRunLevel() {
|
||||
|
||||
|
||||
const forver = this.effective == '01';
|
||||
let val = this.radio;
|
||||
if (this.radio == '02') {
|
||||
val = `${this.radio}::${this.trainRunlevel}::${forver}`;
|
||||
} else {
|
||||
val = `${this.radio}::01::${forver}`;
|
||||
}
|
||||
// let val = this.radio;
|
||||
// if (this.radio == '02') {
|
||||
// val = `${this.radio}::${this.trainRunlevel}::${forver}`;
|
||||
// } else {
|
||||
// val = `${this.radio}::01::${forver}`;
|
||||
// }
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.StationStand.setRunLevel.menu.operation,
|
||||
|
@ -1,73 +1,80 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-detail" :title="title" :visible.sync="show" width="380px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<span>车站</span>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>站台</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input style="padding: 0 3px;" v-model="standName" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>停站时间</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>扣车</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>跳停</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="18">
|
||||
<span style="opacity: 0;">1</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="380px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<span>车站</span>
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<span>站台</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="header">
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="standName" style="padding: 0 3px;" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>停站时间</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.stopTime" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>运行等级</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.runLevel" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>扣车</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.detainCar" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="content">
|
||||
<el-col :span="6">
|
||||
<span>跳停</span>
|
||||
</el-col>
|
||||
<el-col :span="18">
|
||||
<el-input v-model="modelData.jumpStop" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="18">
|
||||
<span style="opacity: 0;">1</span>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
// import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
@ -131,22 +138,22 @@ export default {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
|
||||
const stationList = this.stationList.slice();
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
}
|
||||
// const stationList = this.stationList.slice();
|
||||
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
// let stationStand, station;
|
||||
// if (selected.direction == '01') { // 下行
|
||||
// // 下行时,此站不是最后一站
|
||||
// if (index != 0) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// } else {
|
||||
// // 上行时,此站不是最后一站
|
||||
// if (index != this.stationList.length - 1) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// }
|
||||
this.modelData = {
|
||||
stopTime: selected.parkingTime ? selected.parkingTime : '自动',
|
||||
runLevel: this.runLevelList[selected.runLevelTime],
|
||||
@ -181,7 +188,7 @@ export default {
|
||||
commit() {
|
||||
const operate = {
|
||||
// over: true,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
// cmdType: CMD.Stand.CMD_STAND_VIEW_STATUS
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-train ref="confirmTrain" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -99,7 +99,7 @@ import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmTrain from './childDialog/confirmTrain';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainControl',
|
||||
|
@ -26,14 +26,14 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -145,7 +145,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
@ -165,7 +165,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -24,7 +24,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -34,122 +34,122 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import { getPublishMapTrainNos } from '@/api/runplan';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
name: 'TrainDelete',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
groupNumber: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除列车识别号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
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');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
rules: {
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
operation: null,
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'map'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '删除列车识别号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(map) {
|
||||
if (map) {
|
||||
// getPublishMapTrainNos(map.skinCode).then(response => {
|
||||
// this.trainNoList = response.data;
|
||||
// }).catch(() => {
|
||||
// this.$messageBox(`获取列车车组号失败`);
|
||||
// });
|
||||
}
|
||||
},
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
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');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
};
|
||||
operation: OperationEvent.Train.delTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -140,7 +140,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
@ -160,7 +160,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,364 +1,371 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form size="small" label-width="80px" :model="addModel" ref="form" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth"></el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="480px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="el-dialog-div">
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tab-pane :id="domIdBasicInfo" label="基本信息" name="first">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="groupNumber">
|
||||
<span slot="label">车组号</span>
|
||||
<el-input v-model="addModel.groupNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="type">
|
||||
<span slot="label">服务类型</span>
|
||||
<el-input v-model="addModel.type" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="serviceNumber">
|
||||
<span slot="label">服务号</span>
|
||||
<el-input v-model="addModel.serviceNumber" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="trainCode">
|
||||
<span slot="label">序列号</span>
|
||||
<el-input v-model="addModel.trainCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="driverCode">
|
||||
<span slot="label">司机号</span>
|
||||
<el-input v-model="addModel.driverCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetCode">
|
||||
<span slot="label">目的地号</span>
|
||||
<el-input v-model="addModel.targetCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stationName">
|
||||
<span slot="label">车站</span>
|
||||
<el-input v-model="addModel.stationName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="sectionCode">
|
||||
<span slot="label">轨道</span>
|
||||
<el-input v-model="addModel.sectionCode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="nextStation">
|
||||
<span slot="label">下一站</span>
|
||||
<el-input v-model="addModel.nextStation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="targetName">
|
||||
<span slot="label">目的地</span>
|
||||
<el-input v-model="addModel.targetName" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trackingMode">
|
||||
<span slot="label">跟踪模式</span>
|
||||
<el-input v-model="addModel.trackingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="runStatus">
|
||||
<span slot="label">运行状态</span>
|
||||
<el-input v-model="addModel.runStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="departureTime">
|
||||
<span slot="label">出发时刻</span>
|
||||
<el-input v-model="addModel.departureTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="arrivedTime">
|
||||
<span slot="label">到达时刻</span>
|
||||
<el-input v-model="addModel.arrivedTime" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="planDeviation">
|
||||
<span slot="label">计划偏离</span>
|
||||
<el-input v-model="addModel.planDeviation" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdMarshalInfo" label="编组信息" name="second">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="marshallingNo">
|
||||
<span slot="label">编组号</span>
|
||||
<el-input v-model="addModel.marshallingNo" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="carNo1">
|
||||
<span slot="label">车头号1</span>
|
||||
<el-input v-model="addModel.carNo1" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="carNo2">
|
||||
<span slot="label">车头号2</span>
|
||||
<el-input v-model="addModel.carNo2" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" style="width: 100%" height="250">
|
||||
<el-table-column prop="carriage" label="车厢" width="80" />
|
||||
<el-table-column prop="carriageNumber" label="车厢号" width="80" />
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdAtpInfo" label="ATP信息" name="third">
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" label-position="left">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="trainId">
|
||||
<span slot="label">车载ID</span>
|
||||
<el-input v-model="addModel.trainId" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="directionType">
|
||||
<span slot="label">运行方向</span>
|
||||
<el-input v-model="addModel.directionType" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="drivingMode">
|
||||
<span slot="label">驾驶模式</span>
|
||||
<el-input v-model="addModel.drivingMode" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="speed">
|
||||
<span slot="label">速度</span>
|
||||
<el-input v-model="addModel.speed" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="stopQuasiState">
|
||||
<span slot="label">停准状态</span>
|
||||
<el-input v-model="addModel.stopQuasiState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="doorStatus">
|
||||
<span slot="label">车门状态</span>
|
||||
<el-input v-model="addModel.doorStatus" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="runLevel">
|
||||
<span slot="label">运行等级</span>
|
||||
<el-input v-model="addModel.runLevel" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="stopState">
|
||||
<span slot="label">停跳状态</span>
|
||||
<el-input v-model="addModel.stopState" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="position">
|
||||
<span slot="label">车头位置</span>
|
||||
<el-input v-model="addModel.position" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="1">
|
||||
<el-form-item prop="loadingRate">
|
||||
<span slot="label">载重率</span>
|
||||
<el-input v-model="addModel.loadingRate" :disabled="true" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :id="domIdCarAlarm" label="车辆报警" name="fourth" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="4" :offset="19">
|
||||
<el-button :id="domIdCancel" @click="cancel">退出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
export default {
|
||||
name: 'TrainDetailInfo',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
trainList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:''
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1', carriageNumber:'101'},
|
||||
{carriage:'2', carriageNumber:'102'},
|
||||
{carriage:'3', carriageNumber:'103'},
|
||||
{carriage:'4', carriageNumber:'104'},
|
||||
{carriage:'5', carriageNumber:'105'},
|
||||
{carriage:'6', carriageNumber:'106'}
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel = {
|
||||
stationName:'',
|
||||
groupNumber:'',
|
||||
type:'',
|
||||
serviceNumber:'',
|
||||
trainCode:'',
|
||||
driverCode:'',
|
||||
targetCode:'',
|
||||
sectionCode:'',
|
||||
nextStation:'',
|
||||
targetName:'',
|
||||
trackingMode:'',
|
||||
runStatus:'',
|
||||
departureTime:'',
|
||||
arrivedTime:'',
|
||||
planDeviation:'',
|
||||
marshallingNo:'',
|
||||
carNo1:'',
|
||||
carNo2:'',
|
||||
trainId:'',
|
||||
directionType:'',
|
||||
drivingMode:'',
|
||||
speed:'',
|
||||
stopQuasiState:'',
|
||||
doorStatus:'',
|
||||
runLevel:'',
|
||||
stopState:'',
|
||||
position:'',
|
||||
loadingRate:'',
|
||||
},
|
||||
activeName:'first',
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
tableData:[
|
||||
{carriage:'1',carriageNumber:'101'},
|
||||
{carriage:'2',carriageNumber:'102'},
|
||||
{carriage:'3',carriageNumber:'103'},
|
||||
{carriage:'4',carriageNumber:'104'},
|
||||
{carriage:'5',carriageNumber:'105'},
|
||||
{carriage:'6',carriageNumber:'106'},
|
||||
]
|
||||
tripNumber: '',
|
||||
groupNumber:''
|
||||
};
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdCarAlarm() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.carAlarm.domId : '';
|
||||
},
|
||||
domIdBasicInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.basicInfo.domId : '';
|
||||
},
|
||||
domIdMarshalInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.marshalInfo.domId : '';
|
||||
},
|
||||
domIdAtpInfo() {
|
||||
return this.dialogShow ? OperationEvent.Train.detailTrainInfo.atpInfo.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '列车信息显示'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
this.addModel ={
|
||||
stationName:'',
|
||||
tripNumber: '',
|
||||
groupNumber:'',
|
||||
}
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
handleClick() {
|
||||
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -1,183 +1,197 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="640px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form">
|
||||
<div style="width: 46%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;">
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;">
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option v-for="item in stationStandList" :key="item.code" :label="item.name"
|
||||
:value="item.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm stand-stop-time"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="640px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
|
||||
<div style="width: 46%;">
|
||||
<el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
|
||||
<el-input v-model="addModel.tripNumber" disabled />
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div style="overflow: hidden;">
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px; margin-right: 4%;"
|
||||
>
|
||||
<span class="base-label">源车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandSource">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandSource" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainSource">
|
||||
<el-input v-model="addModel.trainSource" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="width: 48%; float: left; padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 120px;"
|
||||
>
|
||||
<span class="base-label">目的车次窗</span>
|
||||
<div style="position: relative; top:-10px;">
|
||||
<el-form-item prop="stationStandGoal">
|
||||
<span slot="label">车  站:</span>
|
||||
<el-select v-model="addModel.stationStandGoal" filterable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in stationStandList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="车 次 窗:" prop="trainGoal">
|
||||
<el-input v-model="addModel.trainGoal" />
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: '',
|
||||
},
|
||||
export default {
|
||||
name: 'TrainMove',
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
trainNoList: [],
|
||||
selected: null,
|
||||
addModel: {
|
||||
tripNumber: '',
|
||||
trainSource: '',
|
||||
stationStandSource: '',
|
||||
trainGoal: '',
|
||||
stationStandGoal: ''
|
||||
},
|
||||
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
}
|
||||
rules: {
|
||||
tripNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
],
|
||||
trainSource: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandSource: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
],
|
||||
trainGoal: [
|
||||
{ required: true, message: '请输入车次号', trigger: 'blur' }
|
||||
],
|
||||
stationStandGoal: [
|
||||
{ required: true, message: '请选择车站', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
dialogShow: false,
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationStandList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '移动列车识别号'
|
||||
}
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
//如果不是断点激活,则需要对初始值进行初始化
|
||||
if (!this.dialogShow) {
|
||||
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
title() {
|
||||
return '移动列车识别号';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
// 如果不是断点激活,则需要对初始值进行初始化
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
let operate = {
|
||||
send: true,
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
const operate = {
|
||||
send: true,
|
||||
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation,
|
||||
}
|
||||
operation: OperationEvent.Train.moveTrainId.menu.operation
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation,
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.chengdou-03__systerm .el-dialog .base-label {
|
||||
|
@ -157,7 +157,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
// this.$refs.noticeInfo.doShow(operate);
|
||||
@ -177,7 +177,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => { this.doClose(); });
|
||||
}).catch(() => { this.doClose(); });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -65,7 +65,7 @@
|
||||
<station-control-convert ref="stationControlConvert" />
|
||||
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
|
||||
<view-name ref="viewName" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-add ref="trainAdd" />
|
||||
<train-transtalet ref="trainTranstalet" />
|
||||
<train-delete ref="trainDelete" />
|
||||
@ -89,7 +89,7 @@ import ViewName from './menuDialog/viewName';
|
||||
import ManageUser from './menuDialog/manageUser';
|
||||
import HelpAbout from './menuDialog/helpAbout';
|
||||
import SetLimitSpeed from './menuDialog/setLimitSpeed';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
|
@ -104,7 +104,7 @@
|
||||
</span>
|
||||
</button>
|
||||
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="checkCancel" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -116,7 +116,7 @@ import { getAutoReentryBySignalCode } from '@/utils/mapList';
|
||||
import PasswordBox from './dialog/childDialog/passwordInputBox.vue';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'MapButtonMenu',
|
||||
|
@ -1,128 +1,138 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm two-confirmation" title="二次确认" :visible.sync="show" width="360px"
|
||||
:before-close="doClose" :showClose="false" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
append-to-body v-dialogDrag>
|
||||
<div class="context">
|
||||
<template v-for="message in messages">
|
||||
<span> {{message}}</span><br>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm two-confirmation"
|
||||
title="二次确认"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:show-close="false"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<span :key="index">{{ message }}</span>
|
||||
</template>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="show? domIdConfirm: ''" :loading="loading" @click="commit">确认</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../../dialog/childDialog/childDialog/noticeInfo'
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
export default {
|
||||
name: 'TwoConfirmation',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: '',
|
||||
timer: null,
|
||||
domIdConfirm: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
||||
},
|
||||
messages() {
|
||||
if (this.operate) {
|
||||
return this.operate.messages;
|
||||
}
|
||||
return []
|
||||
return [];
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.domIdConfirm = '';
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
this.domIdConfirm = '';
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.forcedStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestStationControl.confirm.domId;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
this.domIdConfirm = OperationEvent.StationControl.requestCentralControl.confirm.domId;
|
||||
}
|
||||
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation,
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.confirm.operation
|
||||
};
|
||||
|
||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
if (this.operate && this.operate.selection) {
|
||||
let operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
selection: this.operate.selection
|
||||
}
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.$emit('setOperate', { selection: this.operate.selection, cancel: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch((error) => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
if (this.operate && this.operate.selection) {
|
||||
const operate = {
|
||||
send: true,
|
||||
type: this.operate.type,
|
||||
val: this.operate.val,
|
||||
selection: this.operate.selection
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestStationControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestStationControl.confirm.operation;
|
||||
} else if (OperationHandler.checkOperationIsCurrentOperate(this.operate.operation, OperationEvent.StationControl.requestCentralControl)) {
|
||||
operate.operation = OperationEvent.StationControl.requestCentralControl.confirm.operation;
|
||||
}
|
||||
|
||||
this.loading = true;
|
||||
this.doClose();
|
||||
this.$emit('setOperate', { selection: this.operate.selection, commit: true });
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
|
||||
if (valid) {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
}, 1000).catch(() => {
|
||||
this.loading = true;
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -1,187 +1,193 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm password-box" title="密码框" :visible.sync="show" width="320px"
|
||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
||||
<div class="context" style="overflow:hidden">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-form-item prop="username">
|
||||
<span slot="label">用户名:</span>
|
||||
<el-input v-model="model.username" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span slot="label">密 码:</span>
|
||||
<el-input type="password" v-model="model.password"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="operate">
|
||||
<el-button-group class="left" v-model="key" size="mini">
|
||||
<el-button size="mini" @click="click(1)">1</el-button>
|
||||
<el-button size="mini" @click="click(2)">2</el-button>
|
||||
<el-button size="mini" @click="click(3)">3</el-button>
|
||||
<el-button size="mini" @click="click(4)">4</el-button>
|
||||
<el-button size="mini" @click="click(5)">5</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group class="right" v-model="key" size="mini">
|
||||
<el-button @click="esc">回退</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group class="left" v-model="key" size="mini">
|
||||
<el-button size="mini" @click="click(6)">6</el-button>
|
||||
<el-button size="mini" @click="click(7)">7</el-button>
|
||||
<el-button size="mini" @click="click(8)">8</el-button>
|
||||
<el-button size="mini" @click="click(9)">9</el-button>
|
||||
<el-button size="mini" @click="click(0)">0</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group class="right" v-model="key" size="mini">
|
||||
<el-button @click="clr">清空</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm password-box"
|
||||
title="密码框"
|
||||
:visible.sync="show"
|
||||
width="320px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<div class="context" style="overflow:hidden">
|
||||
<el-form label-width="80px" size="mini">
|
||||
<el-form-item prop="username">
|
||||
<span slot="label">用户名:</span>
|
||||
<el-input v-model="model.username" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<span slot="label">密 码:</span>
|
||||
<el-input v-model="model.password" type="password" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="operate">
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(1)">1</el-button>
|
||||
<el-button size="mini" @click="click(2)">2</el-button>
|
||||
<el-button size="mini" @click="click(3)">3</el-button>
|
||||
<el-button size="mini" @click="click(4)">4</el-button>
|
||||
<el-button size="mini" @click="click(5)">5</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="esc">回退</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="left" size="mini">
|
||||
<el-button size="mini" @click="click(6)">6</el-button>
|
||||
<el-button size="mini" @click="click(7)">7</el-button>
|
||||
<el-button size="mini" @click="click(8)">8</el-button>
|
||||
<el-button size="mini" @click="click(9)">9</el-button>
|
||||
<el-button size="mini" @click="click(0)">0</el-button>
|
||||
</el-button-group>
|
||||
<el-button-group v-model="key" class="right" size="mini">
|
||||
<el-button @click="clr">清空</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: null,
|
||||
model: {
|
||||
username: '',
|
||||
password: '',
|
||||
},
|
||||
key: ''
|
||||
export default {
|
||||
name: 'PasswordBox',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
operate: null,
|
||||
operation: null,
|
||||
model: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
key: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadInitData(operate) {
|
||||
this.model.username = '';
|
||||
this.model.password = '';
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.model.username = this.$store.state.user.name;
|
||||
},
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.password.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
if (this.dialogShow) {
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
return OperationEvent.StationControl.forcedStationControl.passwordConfirm.domId;
|
||||
}
|
||||
}
|
||||
doShow(operate) {
|
||||
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
|
||||
if (!this.dialogShow) {
|
||||
this.loadInitData(operate);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
loadInitData(operate) {
|
||||
this.model.username = '';
|
||||
this.model.password = '';
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
this.model.username = this.$store.state.user.name;
|
||||
},
|
||||
doShow(operate) {
|
||||
/** 如果不是断点激活,而是第一次显示需要初始化数据*/
|
||||
if (!this.dialogShow) {
|
||||
this.loadInitData(operate);
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation,
|
||||
}
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: this.operate.type,
|
||||
operation: OperationEvent.Command.close.password.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
type: this.operate.type
|
||||
};
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation;
|
||||
}
|
||||
|
||||
if (this.model.password == '123456') {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
})
|
||||
},
|
||||
commit() {
|
||||
let operate = {
|
||||
type: this.operate.type,
|
||||
}
|
||||
|
||||
if (OperationHandler.checkOperationIsCurrentOperate(this.operation, OperationEvent.StationControl.forcedStationControl)) {
|
||||
/** 强制站控*/
|
||||
operate.operation = OperationEvent.StationControl.forcedStationControl.passwordConfirm.operation
|
||||
}
|
||||
|
||||
if (this.model.password == '123456') {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
if (valid) {
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: valid
|
||||
});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: false
|
||||
success: valid
|
||||
});
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$emit('setLoginResult', {
|
||||
operation: operate.operation,
|
||||
success: false
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate, ['密码输入错误!']);
|
||||
}
|
||||
},
|
||||
click(key) {
|
||||
if (!this.model.password) {
|
||||
this.model.password = '';
|
||||
}
|
||||
this.model.password += key;
|
||||
},
|
||||
esc() {
|
||||
if (this.model.password) {
|
||||
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
|
||||
}
|
||||
},
|
||||
clr() {
|
||||
});
|
||||
} else {
|
||||
this.$refs.noticeInfo.doShow(operate, ['密码输入错误!']);
|
||||
}
|
||||
},
|
||||
click(key) {
|
||||
if (!this.model.password) {
|
||||
this.model.password = '';
|
||||
}
|
||||
|
||||
this.model.password += key;
|
||||
},
|
||||
esc() {
|
||||
if (this.model.password) {
|
||||
this.model.password = this.model.password.substring(0, this.model.password.length - 1);
|
||||
}
|
||||
},
|
||||
clr() {
|
||||
this.model.password = '';
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
|
||||
|
||||
.password-box .el-form {
|
||||
margin-top: 10px !important;
|
||||
margin-right: 20px !important;
|
||||
|
@ -68,13 +68,13 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'ViewName',
|
||||
|
@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<train-create ref="trainCreate" />
|
||||
<section-detail ref="sectionDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SectionDetail from './dialog/sectionDetail';
|
||||
import TrainCreate from './dialog/trainCreate';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
@ -46,21 +46,18 @@ export default {
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK,
|
||||
auth: { station: true, center: false }
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
}
|
||||
],
|
||||
Center: [
|
||||
{
|
||||
label: '区故解',
|
||||
handler: this.fault,
|
||||
auth: { station: false, center: true },
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
{
|
||||
label: '属性',
|
||||
handler: this.detail,
|
||||
auth: { station: false, center: true },
|
||||
cmdType: CMD.Section.CMD_SECTION_DETAILS
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
<route-detail ref="routeDetail" />
|
||||
<route-guide ref="routeGuide" />
|
||||
<route-hand-control ref="routeHandControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<password-box ref="passwordBox" :pop-class="'chengdou-03__systerm'" @checkOver="passWordCommit" />
|
||||
</div>
|
||||
</template>
|
||||
@ -18,7 +18,7 @@ import RouteSelection from './dialog/routeSelection';
|
||||
import RouteDetail from './dialog/routeDetail';
|
||||
import RouteHandControl from './dialog/routeHandControl';
|
||||
import RouteGuide from './dialog/routeGuide';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
|
@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
|
@ -3,7 +3,7 @@
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<stand-control ref="standControl" />
|
||||
<stand-detail ref="standDetail" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import StandControl from './dialog/standControl';
|
||||
import StandDetail from './dialog/standDetail';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
|
@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<section-control ref="sectionControl" />
|
||||
<section-control ref="sectionControl" pop-class="chengdou-03__systerm" />
|
||||
<switch-control ref="switchControl" pop-class="chengdou-03__systerm" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import SectionControl from './dialog/sectionControl';
|
||||
import SectionControl from '@/jmapNew/theme/components/menus/dialog/sectionControl';
|
||||
import SwitchControl from '@/jmapNew/theme/components/menus/dialog/switchControl';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import CancelMouseState from '@/mixin/CancelMouseState';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pop-menu ref="popMenu" :menu="menu" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
<train-control ref="trainControl" />
|
||||
<train-edit-number ref="trainEditNumber" />
|
||||
<train-create-number ref="trainCreateNumber" />
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
<script>
|
||||
import PopMenu from '@/components/PopMenu';
|
||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
||||
import { MenuDisabledState } from './utils/menuItemStatus';
|
||||
@ -38,7 +38,7 @@ export default {
|
||||
TrainMoveNumber,
|
||||
TrainCreateNumber,
|
||||
TrainDeleteNumber,
|
||||
TrainDetailInfo,
|
||||
TrainDetailInfo
|
||||
},
|
||||
mixins: [
|
||||
CancelMouseState
|
||||
|
@ -1,280 +1,299 @@
|
||||
<template>
|
||||
<el-dialog class="chengdou-03__systerm passive-control" title="控制模式请求" :visible.sync="show" width="700px"
|
||||
:before-close="doClose" :showClose="true" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
||||
v-dialogDrag>
|
||||
<span class="control-label">{{`${requestInfo}请求如下区域的控制模式`}}</span>
|
||||
<el-table ref="multipleTable" :data="tableData" border row-key="code" style="width: 100%" height="250" center
|
||||
size="mini" highlight-current-row>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.operate}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.control.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{scope.row.target.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled"></el-checkbox>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{count}}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo"></notice-info>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="chengdou-03__systerm passive-control"
|
||||
title="控制模式请求"
|
||||
:visible.sync="show"
|
||||
width="700px"
|
||||
:before-close="doClose"
|
||||
:show-close="true"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<span class="control-label">{{ `${requestInfo}请求如下区域的控制模式` }}</span>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
border
|
||||
row-key="code"
|
||||
style="width: 100%"
|
||||
height="250"
|
||||
center
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
>
|
||||
<el-table-column prop="operate" label="操作区域">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.operate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="control" label="当前控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.control.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="target" label="请求控制模式" width="120">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.target.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agree" label="是否同意" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox ref="agree" v-model="scope.row.agree" :disabled="scope.row.disabled" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span class="control-label">距离对话还有{{ count }}秒,请应答。</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="10" :offset="3">
|
||||
<el-button :id="domAgree" :disabled="disabledAgree" @click="agree">同意
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="6" :offset="4">
|
||||
<el-button :id="domIdRefuse" :disabled="disabledRefuse" @click="refuse">拒绝</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||
// import { mapGetters } from 'vuex';
|
||||
// import { TrainingMode } from '@/scripts/ConstDic';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
export default {
|
||||
name: 'RequestControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
disabledAgree: false,
|
||||
disabledRefuse: false,
|
||||
requestInfo: '调度员1工作站',
|
||||
controlProps: {
|
||||
'01': '中控',
|
||||
'02': '站控'
|
||||
},
|
||||
selection: [],
|
||||
tableData: [],
|
||||
timer: null,
|
||||
timeout: 61,
|
||||
count: 0,
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000);
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
targetStatus() {
|
||||
if (this.$store.state.training.prdType == '01') {
|
||||
return '01';
|
||||
}
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
return '02'
|
||||
}
|
||||
},
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdChoose() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.choose.domId : '';
|
||||
},
|
||||
domAgree() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.agree.domId : '';
|
||||
},
|
||||
domIdRefuse() {
|
||||
return this.dialogShow ? OperationEvent.StationControl.controlResponse.refuse.domId : '';
|
||||
checkTableDataSelction(data) {
|
||||
const selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.disabledSend = !selection.length;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
tableData: {
|
||||
handler(val, oldVal) {
|
||||
this.checkTableDataSelction(val);
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.socket.msgHead': function (elem) {
|
||||
if (elem && !elem.hasOwnProperty('success') && !elem.hasOwnProperty('timeout')) {
|
||||
if (elem.stationControlCode) {
|
||||
this.doShow(elem);
|
||||
}
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
|
||||
const model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false
|
||||
};
|
||||
|
||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
const control = (device || {}).state;
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
},
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
})
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
const operate = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
createTimer() {
|
||||
this.count = this.timeout;
|
||||
this.timer = setInterval(() => {
|
||||
if (this.count <= 0) {
|
||||
this.doClose();
|
||||
return;
|
||||
}
|
||||
this.count = this.count - 1;
|
||||
}, 1000)
|
||||
},
|
||||
clearTimer() {
|
||||
if (this.timer) {
|
||||
clearInterval(this.timer);
|
||||
this.timer = null;
|
||||
}
|
||||
},
|
||||
checkTableDataSelction(data) {
|
||||
let selection = [];
|
||||
if (data && data.length > 0) {
|
||||
data.forEach(row => {
|
||||
if (row.agree && !row.disabled) {
|
||||
selection.push(row);
|
||||
}
|
||||
})
|
||||
}
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.disabledSend = selection.length ? false : true;
|
||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||
this.handleChooseChange(selection);
|
||||
this.selection = selection;
|
||||
this.disabledAgree = this.selection.length <= 0;
|
||||
}
|
||||
},
|
||||
updateTableData(code) {
|
||||
this.tableData = [];
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
const codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
});
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
const operate = {
|
||||
|
||||
let model = {
|
||||
code: code,
|
||||
operate: '',
|
||||
control: { code: '', name: '' },
|
||||
target: { code: '', name: '' },
|
||||
agree: false,
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
let device = this.$store.getters['map/getDeviceByCode'](code);
|
||||
if (device) {
|
||||
let control = (device || {}).state
|
||||
if (control) {
|
||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
||||
}
|
||||
|
||||
let station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
|
||||
if (station) {
|
||||
model.operate = station.name || '';
|
||||
}
|
||||
}
|
||||
|
||||
this.tableData.push(model);
|
||||
},
|
||||
doShow(msgHead) {
|
||||
this.dialogShow = true;
|
||||
this.disabledAgree = true;
|
||||
this.createTimer();
|
||||
this.updateTableData(msgHead.stationControlCode);
|
||||
|
||||
let operate = {
|
||||
start: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.menu.operation,
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::')
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
doClose() {
|
||||
this.disabledAgree = false;
|
||||
if (this.dialogShow) {
|
||||
this.$store.dispatch('socket/shiftMsgQueue');
|
||||
}
|
||||
|
||||
this.count = 0;
|
||||
this.dialogShow = false;
|
||||
this.clearTimer();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$refs.multipleTable.setCurrentRow();
|
||||
},
|
||||
serializeCodeListWithSeparator(sep) {
|
||||
let codeList = [];
|
||||
if (this.selection && this.selection.length) {
|
||||
this.selection.forEach(elem => {
|
||||
codeList.push(elem.code);
|
||||
})
|
||||
}
|
||||
return codeList.join(sep);
|
||||
},
|
||||
handleChooseChange(selection) {
|
||||
this.selection = selection;
|
||||
if (selection && selection.length) {
|
||||
let operate = {
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.choose.operation,
|
||||
val: this.serializeCodeListWithSeparator('::'),
|
||||
}
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
}
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
},
|
||||
refuse() {
|
||||
let operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
}
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
})
|
||||
} else if (!selection) {
|
||||
this.$messageBox('请选择一条数据');
|
||||
}
|
||||
},
|
||||
agree() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||
val: this.selection[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
refuse() {
|
||||
const operate = {
|
||||
send: true,
|
||||
over: true,
|
||||
|
||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||
val: this.tableData[0].code,
|
||||
prdType: this.$store.state.training.prdType
|
||||
};
|
||||
|
||||
this.clearTimer();
|
||||
this.disabledAgree = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -156,7 +156,7 @@ export default {
|
||||
signalClose() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
operation: OperationEvent.Signal.signalClose.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL
|
||||
};
|
||||
this.sendCommand(operate);
|
||||
@ -185,7 +185,7 @@ export default {
|
||||
reopenSignal() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
operation: OperationEvent.Signal.reopenSignal.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
|
||||
};
|
||||
|
||||
@ -195,7 +195,7 @@ export default {
|
||||
cancelTrainRoute() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
||||
};
|
||||
|
||||
|
@ -104,8 +104,8 @@ export default {
|
||||
return this.$t('menu.menuSignal.cancelInterlockAutoTrigger'); // 取消联锁自动触发
|
||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||
return '信号解封';
|
||||
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||
return '信号关灯';
|
||||
} else if (this.operation == OperationEvent.Signal.lock.menu.operation) {
|
||||
return '信号封锁';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -183,16 +183,24 @@ export default {
|
||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||
break;
|
||||
case 'fuzhou-01__systerm':
|
||||
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
|
||||
operate['messages'] = [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')];
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
});
|
||||
if (this.$store.state.training.prdType === '01') {
|
||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||
} else if (this.$store.state.training.prdType === '02') {
|
||||
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
|
||||
operate['messages'] = [this.$t('tip.signalModeToManualModeTipPrefix') + this.signalName + this.$t('tip.signalModeToManualModeTipSuffix')];
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 'xian-01__systerm':
|
||||
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
|
||||
operate['messages'] = `取消以信号机${this.selected.name}为始端的进路,该进路即将由自动信号模式转为人工模式!`;
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
});
|
||||
if (this.$store.state.training.prdType === '01') {
|
||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||
} else if (this.$store.state.training.prdType === '02') {
|
||||
this.sendCommandNext(menuOperate.Signal.cancelTrainRoute).then(operate => {
|
||||
operate['messages'] = `取消以信号机${this.selected.name}为始端的进路,该进路即将由自动信号模式转为人工模式!`;
|
||||
this.$refs.confirmControl.doShow(operate);
|
||||
});
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this.sendCommand(menuOperate.Signal.cancelTrainRoute);
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm route-detail"
|
||||
:class="systemName+' route-detail'"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
@ -39,7 +39,7 @@
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制状态" width="180">
|
||||
<el-table-column prop="status" label="控制状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</template>
|
||||
@ -54,7 +54,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" :pop-class="systemName" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -62,14 +62,20 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props:{
|
||||
systemName:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -116,7 +122,13 @@ export default {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
const routeList = JSON.parse(JSON.stringify(tempData || []));
|
||||
this.tempData = routeList;
|
||||
this.tempData.forEach(route => {
|
||||
if (route.turnBack) {
|
||||
route.name = `${route.name}(Z)`;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
@ -128,7 +140,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
// mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="beijing-01__systerm route-hand-control"
|
||||
:class="systemName+' route-hand-control'"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
@ -69,7 +69,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" :pop-class="systemName" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -78,15 +78,21 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
// import { mouseCancelState } from '../utils/menuItemStatus';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
props:{
|
||||
systemName:{
|
||||
type:String,
|
||||
required:true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
@ -182,8 +188,13 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
const routeList = JSON.parse(JSON.stringify(tempData || []));
|
||||
this.tempData = routeList;
|
||||
this.tempData.forEach(route => {
|
||||
if (route.turnBack) {
|
||||
route.name = `${route.name}(Z)`;
|
||||
}
|
||||
});
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
@ -196,7 +207,7 @@ export default {
|
||||
this.dialogShow = false;
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
mouseCancelState(this.selected);
|
||||
// mouseCancelState(this.selected);
|
||||
},
|
||||
changeCheck(check, code) {
|
||||
if (check) {
|
||||
@ -294,7 +305,8 @@ export default {
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
const val = this.systemName === 'xian-01__systerm' || this.systemName === 'fuzhou-01__systerm' ? `${this.selection[0]}` : '';
|
||||
commitOperate(menuOperate.Signal.humanControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
@ -308,7 +320,8 @@ export default {
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2).then(({valid})=>{
|
||||
const val = this.systemName === 'xian-01__systerm' || this.systemName === 'fuzhou-01__systerm' ? `${this.selection[0]}` : '';
|
||||
commitOperate(menuOperate.Signal.atsAutoControl, {routeCodeList:this.selection}, 2, val).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="ningbo-01__systerm section-control"
|
||||
class="section-control"
|
||||
:class="popClass"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
@ -22,7 +23,7 @@
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="isShow" style="margin-top: 10px;">
|
||||
<el-row v-if="isShow && (popClass == 'ningbo-01__systerm' || popClass == 'foshan-01__systerm' || popClass == 'beijing-01__systerm')" style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||
激活</el-radio>
|
||||
@ -40,20 +41,29 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" :pop-class="popClass" />
|
||||
<password-box ref="passwordBox" :pop-class="popClass" @checkOver="passWordCommit" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import {menuOperate, commitOperate} from '../utils/menuOperate';
|
||||
import NoticeInfo from '../childDialog/noticeInfo';
|
||||
import PasswordBox from '../childDialog/passwordInputBox';
|
||||
import {menuOperate, commitOperate} from '../../utils/menuOperate';
|
||||
|
||||
export default {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
NoticeInfo,
|
||||
PasswordBox
|
||||
},
|
||||
props: {
|
||||
popClass: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -84,6 +94,10 @@ export default {
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
return '区故解';
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
return '计轴复位';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
@ -136,14 +150,15 @@ export default {
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.lock.menu.operation) {
|
||||
/** 区段封锁*/
|
||||
this.lock();
|
||||
this.lock(); // 区段封锁
|
||||
} else if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
/** 轨道区段切除*/
|
||||
this.split();
|
||||
this.split(); // 轨道区段切除
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
/** 轨道区段激活*/
|
||||
this.active();
|
||||
this.active(); // 轨道区段激活
|
||||
} else if (this.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
this.fault(); // 区故解
|
||||
} else if (this.operation == OperationEvent.Section.axlePreReset.menu.operation) {
|
||||
this.axlePreReset(); // 计轴预复位
|
||||
}
|
||||
},
|
||||
// 区段封锁
|
||||
@ -158,6 +173,33 @@ export default {
|
||||
active() {
|
||||
this.sendCommand(menuOperate.Section.active);
|
||||
},
|
||||
// 计轴预复位
|
||||
axlePreReset() {
|
||||
this.sendCommand(menuOperate.Section.axlePreReset);
|
||||
},
|
||||
// 区故解
|
||||
fault() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Section.fault.menu.operation
|
||||
};
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$refs.passwordBox.doShow(operate);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
||||
});
|
||||
},
|
||||
passWordCommit(data) {
|
||||
if (data.operation == OperationEvent.Section.fault.menu.operation) {
|
||||
this.sendCommand(menuOperate.Section.fault);
|
||||
}
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
commitOperate(operate, {}, 2).then(({valid})=>{
|
||||
@ -165,7 +207,7 @@ export default {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow();
|
@ -121,7 +121,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" :pop-class="systemName" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -97,7 +97,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" :system-name="systemName" />
|
||||
<notice-info ref="noticeInfo" :pop-class="systemName" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="check" label="一直有效">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" :true-label="1" :false-label="0" @change="checkChange" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -62,7 +62,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<confirm-control ref="confirmControl" :pop-class="systemName" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -264,7 +264,7 @@ export default {
|
||||
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
||||
val: `${row.level}`
|
||||
};
|
||||
|
||||
this.time = row.time = this.timeList[row.level][0].value;
|
||||
this.isSelect = false;
|
||||
this.isConfirm = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
@ -294,7 +294,7 @@ export default {
|
||||
commit() {
|
||||
if (this.isConfirm) {
|
||||
this.loading = true;
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: this.time, runLevelTimeForever: this.tempData[0].check}, 2).then(({valid})=>{
|
||||
commitOperate(menuOperate.StationStand.setRunLevel, {runLevelTime: Number(this.time), runLevelTimeForever: !!this.tempData[0].check}, 2).then(({valid})=>{
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
|
@ -63,7 +63,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" :pop-class="systemName" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -5,21 +5,25 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
// 操作
|
||||
export const menuOperate = {
|
||||
Section:{
|
||||
lock: { // 区段封锁
|
||||
operation: OperationEvent.Section.lock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_BLOCK
|
||||
},
|
||||
active:{
|
||||
// 区段激活
|
||||
operation: OperationEvent.Section.active.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
split:{
|
||||
// 区段切除
|
||||
operation: OperationEvent.Section.split.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
},
|
||||
alxeEffective:{
|
||||
// 确认计轴有效
|
||||
operation: OperationEvent.Section.alxeEffective.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_COMFIRMATION_AXLE
|
||||
},
|
||||
setSpeed:{
|
||||
// 设置速度
|
||||
operation: OperationEvent.Section.setSpeed.menu.operation,
|
||||
@ -34,6 +38,26 @@ export const menuOperate = {
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Section.fault.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
|
||||
},
|
||||
alxeFailure:{
|
||||
// 设置计轴失效
|
||||
operation: OperationEvent.Section.alxeFailure.menu.operation,
|
||||
// cmdType 值有问题
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
unlock:{
|
||||
// 区段解锁
|
||||
operation: OperationEvent.Section.unlock.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_UNBLOCK
|
||||
},
|
||||
setFault: { // 设置故障
|
||||
operation: OperationEvent.Section.stoppage.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ADD_FAULT
|
||||
},
|
||||
cancelSpeed: {
|
||||
// 取消限速
|
||||
operation: OperationEvent.Section.cancelSpeed.menu.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED
|
||||
}
|
||||
},
|
||||
Signal:{
|
||||
@ -92,6 +116,22 @@ export const menuOperate = {
|
||||
detail:{
|
||||
// 查询进路状态
|
||||
operation: OperationEvent.Signal.detail.menu.operation
|
||||
},
|
||||
guide:{ // 进路引导
|
||||
operation: OperationEvent.Signal.guide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
|
||||
},
|
||||
cancelGuide:{ // 人工解锁进路(信号机取消引导)
|
||||
operation: OperationEvent.Signal.cancelGuide.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_GUIDE
|
||||
},
|
||||
setAutoTurnBack:{ // 设置自动折返
|
||||
operation: OperationEvent.AutoTurnBack.SetAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK
|
||||
},
|
||||
cancelAutoTurnBack:{ // 取消自动折返
|
||||
operation: OperationEvent.AutoTurnBack.CancelAutoTurnBackButton.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_AUTO_TURN_BACK
|
||||
}
|
||||
},
|
||||
Switch:{
|
||||
@ -158,6 +198,16 @@ export const menuOperate = {
|
||||
// 区段故障解锁
|
||||
operation: OperationEvent.Switch.fault.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK
|
||||
},
|
||||
cancelSpeed: {
|
||||
// 取消临时限速
|
||||
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
|
||||
cmdType:CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED
|
||||
},
|
||||
axlePreReset:{
|
||||
// 计轴预复位
|
||||
operation: OperationEvent.Switch.axlePreReset.menu.operation,
|
||||
cmdType: CMD.Switch.CMD_SWITCH_AXIS_PRE_RESET
|
||||
}
|
||||
},
|
||||
StationStand:{
|
||||
@ -214,6 +264,26 @@ export const menuOperate = {
|
||||
detail:{
|
||||
// 查询站台状态
|
||||
operation: OperationEvent.StationStand.detail.menu.operation
|
||||
},
|
||||
cancelDetainTrainAll:{
|
||||
// 全线取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
cancelDetainTrainForce: {
|
||||
// 强制取消扣车
|
||||
operation: OperationEvent.StationStand.cancelDetainTrainForce.menu.operation,
|
||||
cmdType: CMD.Stand.CMD_STAND_FORCE_CANCEL_HOLD_TRAIN
|
||||
},
|
||||
setBulkBuckleTrain:{
|
||||
// 批量扣车
|
||||
operation: OperationEvent.StationStand.setBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_SET_HOLD_TRAIN_ALL
|
||||
},
|
||||
cancelBulkBuckleTrain:{
|
||||
// 批量取消扣车
|
||||
operation: OperationEvent.StationStand.cancelBulkBuckleTrain.menu.operation,
|
||||
cmdType:CMD.Stand.CMD_STAND_CANCEL_HOLD_TRAIN_ALL
|
||||
}
|
||||
},
|
||||
StationControl:{
|
||||
@ -231,6 +301,39 @@ export const menuOperate = {
|
||||
// 紧急站控
|
||||
operation: OperationEvent.StationControl.emergencyStationControl.menu.operation,
|
||||
cmdType:CMD.ControlConvertMenu.CMD_CM_EMERGENCY_STATION_CONTROL
|
||||
},
|
||||
setBackStrategy:{
|
||||
// 设置折返策略
|
||||
operation: OperationEvent.Station.setBackStrategy.menu.operation,
|
||||
cmdType: CMD.Station.CMD_STATION_SET_TURN_BACK_STRATEGY
|
||||
}
|
||||
},
|
||||
TrainWindow: {
|
||||
editTrainId: {
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
|
||||
},
|
||||
addTrainId: {
|
||||
operation: OperationEvent.Train.addTrainId.menu.operation,
|
||||
cmdType: ''
|
||||
},
|
||||
destinationTrainId: {
|
||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_HEAD
|
||||
},
|
||||
setPlanTrainId: {
|
||||
operation: OperationEvent.Train.setPlanTrainId.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_PLAN
|
||||
},
|
||||
artificialTrainId: {
|
||||
operation: OperationEvent.Train.artificialTrainId.menu.operation,
|
||||
cmdType: CMD.TrainWindow.CMD_TRAIN_SET_MANUAL
|
||||
}
|
||||
},
|
||||
LimitControl: {
|
||||
cancelSpeed: {
|
||||
operation: OperationEvent.LimitControl.CancelAllLimit.menu.operation,
|
||||
cmdType: CMD.Fault.CMD_CANCEL_ALL_LIMIT_SPEED
|
||||
}
|
||||
},
|
||||
Common: {
|
||||
@ -245,12 +348,13 @@ export const menuOperate = {
|
||||
}
|
||||
};
|
||||
|
||||
export function commitOperate(operate, paramList, over) {
|
||||
export function commitOperate(operate, paramList, over, val) {
|
||||
const step = {
|
||||
start: true,
|
||||
operation: operate.operation,
|
||||
param:{}
|
||||
};
|
||||
if (val) { step.val = val; }
|
||||
step.param = paramList;
|
||||
// over 0为首次操作,1为中间操作,2为最后操作,3为直接一次性操作
|
||||
if (over == 0 || over == 3) {
|
||||
|
@ -1,87 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm notice-info"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="360px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<div class="context">
|
||||
<template v-for="(message, index) in messages">
|
||||
<div :key="index">{{ message }}</div>
|
||||
</template>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="8">
|
||||
<el-button :id="domIdSure" type="primary" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'NoticeInfo',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
messages: ['命令下达失败'],
|
||||
operate: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
title() {
|
||||
return '提示';
|
||||
},
|
||||
domIdSure() {
|
||||
return this.dialogShow ? OperationEvent.Command.close.notice.domId : '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, messages) {
|
||||
this.operate = operate || {};
|
||||
this.dialogShow = true;
|
||||
this.messages = ['命令下达失败'];
|
||||
|
||||
if (messages && messages != 'null' && messages != 'undefined') {
|
||||
this.messages.push(messages);
|
||||
}
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
this.doClose();
|
||||
},
|
||||
cancel() {
|
||||
this.doClose();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.notice-info .context {
|
||||
padding-bottom: 40px !important;
|
||||
border: 1px solid lightgray;
|
||||
}
|
||||
</style>
|
@ -24,13 +24,13 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -1,168 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm route-detail"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="340px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="10"><span>车站</span></el-col>
|
||||
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<span>进路列表</span>
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column label="进路">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="控制状态" width="180">
|
||||
<template slot-scope="scope">
|
||||
<!-- <span v-if="scope.row.controlType == '01'">自动(不进行冲突检测)</span>
|
||||
<span v-else>人工</span> -->
|
||||
{{ scope.row.atsControl == '0' ? '人工' : '自动' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
stationName: '',
|
||||
signalName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
|
||||
},
|
||||
title() {
|
||||
return '查询进路状态';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
// 如果不是因为断点激活则需要,初始化菜单初始值
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
this.tempData = tempData || [];
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.detail.menu.operation,
|
||||
};
|
||||
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
type: MapDeviceType.Signal.type,
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,341 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm route-hand-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="signalName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="table">
|
||||
<el-table
|
||||
ref="tempTable"
|
||||
:data="tempData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
:height="140"
|
||||
>
|
||||
<el-table-column prop="name" label="选择" width="55" style="margin-left:50px; text-align: right;">
|
||||
<template slot-scope="scope">
|
||||
<el-checkbox
|
||||
v-model="changeList[scope.$index]"
|
||||
style="text-align: center; display: block;"
|
||||
:disabled="scope.row.disabled"
|
||||
@change="changeCheck(changeList[scope.$index],scope.row.code)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :id="domIdChoose" prop="name" label="进路" style="margin-left:30px">
|
||||
<template slot-scope="scope">
|
||||
<span :style="{color: scope.row.disabled ? '#CBCBCB':'unset'}">{{ scope.row.name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<el-checkbox v-model="allSelect" size="small" @change="allSelectChange">全选</el-checkbox>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button
|
||||
:id="domIdConfirm"
|
||||
type="primary"
|
||||
:disabled="commitDisabled"
|
||||
:loading="loading"
|
||||
@click="commit"
|
||||
>确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import Vue from 'vue';
|
||||
|
||||
export default {
|
||||
name: 'RouteHandControl',
|
||||
components: {
|
||||
ConfirmControl,
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
tempData: [],
|
||||
operation: null,
|
||||
selection: [],
|
||||
stationName: '',
|
||||
signalName: '',
|
||||
allSelect: false,
|
||||
changeList:[],
|
||||
commitDisabled: true,
|
||||
disabledLength: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'signalList'
|
||||
]),
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdChoose() {
|
||||
if (this.dialogShow) {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return OperationEvent.Signal.humanControl.choose.domId;
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return OperationEvent.Signal.atsAutoControl.choose.domId;
|
||||
}
|
||||
}
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
return '进路交人工控';
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
return '进路交自动控';
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected, tempData) {
|
||||
this.selected = selected;
|
||||
this.allSelect = false;
|
||||
this.changeList = [];
|
||||
this.commitDisabled = true;
|
||||
this.selection = [];
|
||||
this.disabledLength = 0;
|
||||
// 如果不是断点激活,而是第一次显示则初始化
|
||||
if (!this.dialogShow) {
|
||||
this.signalName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
|
||||
this.signalName = selected.name;
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
|
||||
if (tempData && tempData.length > 0) {
|
||||
tempData.forEach(elem => {
|
||||
this.changeList.push(false);
|
||||
elem.disabled = false;
|
||||
// 设置禁用状态
|
||||
if (operate.operation == OperationEvent.Signal.humanControl.menu.operation && elem.atsControl == 0) {
|
||||
elem.disabled = true;
|
||||
this.disabledLength++;
|
||||
} if (operate.operation == OperationEvent.Signal.atsAutoControl.menu.operation && elem.atsControl == 1) {
|
||||
elem.disabled = true;
|
||||
this.disabledLength++;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.tempData = tempData || [];
|
||||
this.operation = operate.operation;
|
||||
}
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$refs.tempTable.setCurrentRow();
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
changeCheck(check, code) {
|
||||
if (check) {
|
||||
this.selection.push(code);
|
||||
} else {
|
||||
this.selection.splice(this.selection.indexOf(code), 1);
|
||||
}
|
||||
if (this.selection.length >= (this.tempData.length - this.disabledLength) ) {
|
||||
this.allSelect = true;
|
||||
} else {
|
||||
this.allSelect = false;
|
||||
}
|
||||
if (this.selection.length > 0) {
|
||||
this.commitDisabled = false;
|
||||
} else {
|
||||
this.commitDisabled = true;
|
||||
}
|
||||
},
|
||||
allSelectChange() {
|
||||
this.changeList = [];
|
||||
if (this.allSelect) {
|
||||
this.tempData.forEach((item, index)=> {
|
||||
if (!item.disabled) {
|
||||
this.changeList.push(true);
|
||||
this.selection.push(item.code);
|
||||
} else {
|
||||
this.changeList.push('');
|
||||
}
|
||||
});
|
||||
this.allSelect = true;
|
||||
if (this.selection.length > 0) {
|
||||
this.commitDisabled = false;
|
||||
}
|
||||
} else {
|
||||
this.tempData.forEach((item, index) => {
|
||||
if (!item.disabled) {
|
||||
this.changeList.push(false);
|
||||
this.selection.splice(this.selection.indexOf(item.code), 1);
|
||||
} else {
|
||||
this.changeList = [];
|
||||
}
|
||||
});
|
||||
this.allSelect = false;
|
||||
this.commitDisabled = true;
|
||||
}
|
||||
},
|
||||
// serializeCodeListWithSeparator(sep) {
|
||||
// const codeList = [];
|
||||
// if (this.selection && this.selection.length) {
|
||||
// this.selection.forEach(elem => {
|
||||
// codeList.push(elem.code);
|
||||
// });
|
||||
// }
|
||||
// return codeList.join(sep);
|
||||
// },
|
||||
// handleChooseChange(selection) {
|
||||
// this.selection = selection;
|
||||
// if (selection && selection.length) {
|
||||
// const operate = {
|
||||
// repeat: true,
|
||||
// type: MapDeviceType.Signal.type,
|
||||
// operation: '',
|
||||
// val: this.serializeCodeListWithSeparator('::'),
|
||||
// selection: selection
|
||||
// };
|
||||
|
||||
// if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
// /** 进路交人工控*/
|
||||
// operate.operation = OperationEvent.Signal.humanControl.choose.operation;
|
||||
// } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
// /** 进路交自动控*/
|
||||
// operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
|
||||
// }
|
||||
|
||||
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
// if (valid) {
|
||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
// }
|
||||
// });
|
||||
// } else if (!selection) {
|
||||
// this.$messageBox(`请选择一条数据`);
|
||||
// }
|
||||
// },
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||
/** 进路交人工控*/
|
||||
this.humanControl();
|
||||
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
|
||||
/** 进路交自动控*/
|
||||
this.atsAutoControl();
|
||||
}
|
||||
},
|
||||
// 进路交人工控
|
||||
humanControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.humanControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList: this.selection
|
||||
}
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 进路交自动控
|
||||
atsAutoControl() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
|
||||
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING,
|
||||
param:{
|
||||
routeCodeList: this.selection
|
||||
}
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -46,14 +46,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
|
@ -33,13 +33,13 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
@ -15,11 +15,11 @@
|
||||
<div style="overflow: hidden;">
|
||||
<div>操作设备</div>
|
||||
<el-col :span="11">
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||
<el-input :value="messageText1" placeholder="" size="mini" disabled />
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||
</el-button>
|
||||
<el-button :id="confirmId1" class="status_btn" :disabled="disabledConfirm1" @click="confirm1">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
</div>
|
||||
</div>
|
||||
@ -28,14 +28,14 @@
|
||||
<div style="overflow: hidden;">
|
||||
<div>操作设备</div>
|
||||
<el-col :span="11">
|
||||
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
||||
<el-option v-for="option in signalList" :key="option.code" :label="option.name" :value="option.name" />
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-select :id="domIdChoose" v-model="messageText2" filterable size="mini" :disabled="disabledConfirm2" @change="SelectChange">
|
||||
<el-option v-for="option in signalList" :key="option.code" :label="option.name" :value="option.name" />
|
||||
el-select>
|
||||
</el-select></el-col>
|
||||
<el-col :span="8" :offset="1">
|
||||
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-button :id="confirmId2" class="status_btn" :disabled="disabledConfirm2" @click="confirm2">确认
|
||||
el-button>
|
||||
</el-button></el-col>
|
||||
</div>
|
||||
</div>
|
||||
<div class="body_cont">
|
||||
@ -53,13 +53,13 @@
|
||||
</div>
|
||||
|
||||
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
@ -189,11 +189,11 @@ export default {
|
||||
commit() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation,
|
||||
operation: OperationEvent.Signal.unlock.confirm.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.doClose();
|
||||
}).catch((error) => {
|
||||
this.doClose();
|
||||
|
@ -22,14 +22,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
import { mapGetters } from 'vuex';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
export default {
|
||||
|
@ -1,188 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
v-dialogDrag
|
||||
class="foshan-01__systerm section-control"
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
width="300px"
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-row class="header">
|
||||
<el-col :span="11"><span>集中站</span></el-col>
|
||||
<el-col :span="11" :offset="2"><span>区段名</span></el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-input v-model="sectionName" size="small" disabled />
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-top: 10px;">
|
||||
<el-col :span="11">
|
||||
<el-radio v-model="radio" label="1" :disabled="radio == 2" style="display: block; text-align: center;">
|
||||
激活</el-radio>
|
||||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-radio v-model="radio" label="2" :disabled="radio == 1" style="display: block; text-align: center;">
|
||||
切除</el-radio>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row justify="center" class="button-group">
|
||||
<el-col :span="10" :offset="2">
|
||||
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="4">
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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 {
|
||||
name: 'SectionControl',
|
||||
components: {
|
||||
NoticeInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
selected: null,
|
||||
operation: '',
|
||||
stationName: '',
|
||||
sectionName: '',
|
||||
radio: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
show() {
|
||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||
},
|
||||
domIdCancel() {
|
||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||
},
|
||||
domIdConfirm() {
|
||||
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||
},
|
||||
title() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
return '区段控制';
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
return '区段控制';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$nextTick(() => {
|
||||
this.$store.dispatch('training/tipReload');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(operate, selected) {
|
||||
this.selected = selected;
|
||||
if (!this.dialogShow) {
|
||||
this.sectionName = '';
|
||||
this.stationName = '';
|
||||
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) {
|
||||
if (selected.type === '02') {
|
||||
const section = this.$store.getters['map/getDeviceByCode'](selected.parentCode);
|
||||
if (section) {
|
||||
this.sectionName += section.name;
|
||||
}
|
||||
}
|
||||
this.sectionName += `${selected.name}`;
|
||||
|
||||
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||
if (station) {
|
||||
this.stationName = station.name;
|
||||
}
|
||||
}
|
||||
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.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
},
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.mouseCancelState(this.selected);
|
||||
},
|
||||
commit() {
|
||||
if (this.operation == OperationEvent.Section.split.menu.operation) {
|
||||
/** 轨道区段切除*/
|
||||
this.split();
|
||||
} else if (this.operation == OperationEvent.Section.active.menu.operation) {
|
||||
/** 轨道区段激活*/
|
||||
this.active();
|
||||
}
|
||||
},
|
||||
// 轨道区段切除
|
||||
split() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
// 轨道区段激活
|
||||
active() {
|
||||
const operate = {
|
||||
over: true,
|
||||
operation: this.operation,
|
||||
cmdType: CMD.Section.CMD_SECTION_ACTIVE
|
||||
};
|
||||
|
||||
this.sendCommand(operate);
|
||||
},
|
||||
sendCommand(operate) {
|
||||
this.loading = true;
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
this.loading = false;
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.doClose();
|
||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
const operate = {
|
||||
operation: OperationEvent.Command.cancel.menu.operation
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.doClose();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.doClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -53,13 +53,13 @@
|
||||
</div>
|
||||
|
||||
<el-button :id="domIdConfirm" class="close_btn" type="primary" @click="commit">关闭</el-button>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
|
||||
|
@ -1,74 +1,89 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog v-dialogDrag :z-index="2000" class="foshan-01__systerm section-cmd-speed" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :modal="false" :close-on-click-modal="false">
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option v-for="option in typeList" :key="option.code" :label="option.name"
|
||||
:value="option.code">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-select v-model="speed" :id="domIdChoose" size="small" :disabled="spdDisabled"
|
||||
@change="speedSelectChange">
|
||||
<el-option v-for="item in speedList" :key="item.value" :label="item.name"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table class="table" ref="table" :data="tableData" border style="width: 100%" size="mini"
|
||||
highlight-current-row height="200">
|
||||
<el-table-column prop="order" :width="50" label="序号">
|
||||
</el-table-column>
|
||||
<el-table-column prop="date" :width="160" label="时间">
|
||||
</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>
|
||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||
<span class="base-label">命令信息</span>
|
||||
<el-form label-position="center" size="mini">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="类型" label-width="40px">
|
||||
<el-select v-model="operation" size="small" disabled>
|
||||
<el-option
|
||||
v-for="option in typeList"
|
||||
:key="option.code"
|
||||
:label="option.name"
|
||||
:value="option.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="车站名称" label-width="80px">
|
||||
<el-input v-model="stationName" size="small" disabled />
|
||||
</el-form-item>
|
||||
</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 :span="6">
|
||||
<el-form-item :label="nameLabel" label-width="80px">
|
||||
<el-input v-model="name" size="small" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="限速值" label-width="80px">
|
||||
<el-select
|
||||
:id="domIdChoose"
|
||||
v-model="speed"
|
||||
size="small"
|
||||
:disabled="spdDisabled"
|
||||
@change="speedSelectChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in speedList"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
class="table"
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%"
|
||||
size="mini"
|
||||
highlight-current-row
|
||||
height="200"
|
||||
>
|
||||
<el-table-column prop="order" :width="50" label="序号" />
|
||||
<el-table-column prop="date" :width="160" label="时间" />
|
||||
<el-table-column prop="context" :width="180" label="执行过程" />
|
||||
<el-table-column prop="result" label="执行结果" />
|
||||
</el-table>
|
||||
<span class="notice">{{ message }}</span>
|
||||
<el-row class="button-group">
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span v-show="timeCountCommand>0">({{ timeCountCommand }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span v-show="timeCountConfirm>0">({{ timeCountConfirm }})</span></el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
|
||||
</el-col>
|
||||
<el-col :span="2" :offset="2">
|
||||
<el-button :id="domIdClose" @click="close">关闭</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate"></confirm-control-speed>
|
||||
<confirm-control-speed ref="confirmControlSpeed" @setOperate="getOperate" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -43,13 +43,13 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<confirm-control ref="confirmControl" />
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ConfirmControl from './childDialog/confirmControl';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import { mapGetters } from 'vuex';
|
||||
|
||||
@ -120,7 +120,7 @@ export default {
|
||||
methods: {
|
||||
loadInitData(selected, opts) {
|
||||
this.tempData = [];
|
||||
const stationList = [...this.stationList];
|
||||
// const stationList = [...this.stationList];
|
||||
const station = this.stationList.find(n => n.code == selected.stationCode);
|
||||
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy });
|
||||
this.$nextTick(() => {
|
||||
|
@ -58,14 +58,14 @@
|
||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<notice-info ref="noticeInfo" />
|
||||
<notice-info ref="noticeInfo" pop-class="foshan-01__systerm" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
|
||||
|
||||
export default {
|
||||
name: 'StandDetail',
|
||||
@ -173,21 +173,21 @@ export default {
|
||||
loadInitData(selected) {
|
||||
this.tempData = [];
|
||||
|
||||
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
let stationStand, station;
|
||||
if (selected.direction == '01') { // 下行
|
||||
// 下行时,此站不是最后一站
|
||||
if (index != 0) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
} else {
|
||||
// 上行时,此站不是最后一站
|
||||
if (index != this.stationList.length - 1) {
|
||||
stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
}
|
||||
}
|
||||
// const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||
// let stationStand, station;
|
||||
// if (selected.direction == '01') { // 下行
|
||||
// // 下行时,此站不是最后一站
|
||||
// if (index != 0) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index - 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// } else {
|
||||
// // 上行时,此站不是最后一站
|
||||
// if (index != this.stationList.length - 1) {
|
||||
// stationStand = this.$store.getters['map/getDeviceByCode'](this.stationList[index + 1].code);
|
||||
// station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||
// }
|
||||
// }
|
||||
// 中心扣车
|
||||
this.treeData[1].children[0].value = selected.centerHoldTrain ? '已设置' : '未设置';
|
||||
// 车站扣车
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user