增加点击事件取消选中状态为全局混入,删除多余线路utils配置

This commit is contained in:
zyy 2020-01-13 14:40:24 +08:00
parent d295fb72a5
commit dcead8d707
43 changed files with 4158 additions and 4050 deletions

View File

@ -90,7 +90,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PopupAlarm from './childDialog/popupAlarm'; import PopupAlarm from './childDialog/popupAlarm';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -283,7 +282,7 @@ export default {
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
waitSelectEvent() { waitSelectEvent() {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {

View File

@ -83,7 +83,6 @@
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmTip from './childDialog/confirmTip'; import ConfirmTip from './childDialog/confirmTip';
export default { export default {
@ -164,7 +163,7 @@ export default {
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
handleMessage(message) { handleMessage(message) {
if (message == 'open') { if (message == 'open') {

View File

@ -74,366 +74,365 @@
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock'; import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default { export default {
name: 'RouteCmdControl', name: 'RouteCmdControl',
components: { components: {
ConfirmSignalUnlock ConfirmSignalUnlock
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
backOperate: '', backOperate: '',
selected: '', selected: '',
order: 0, order: 0,
row: null, row: null,
timer: null, timer: null,
operation: '', operation: '',
cmdDisabled: [true, true, true], cmdDisabled: [true, true, true],
stpDisabled: true, stpDisabled: true,
tempData: [], tempData: [],
message: '', message: '',
timeCountCommand: -1, timeCountCommand: -1,
timeCountConfirm: -1, timeCountConfirm: -1,
stationName: '', stationName: '',
signalName: '' signalName: ''
}; };
}, },
computed: { computed: {
typeList() { typeList() {
return [ return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' }, { code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' } { code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
]; ];
}, },
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCommand() { domIdCommand() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.order.domId; return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId; return OperationEvent.Signal.guide.order.domId;
} }
} }
}, },
domIdConfirm1() { domIdConfirm1() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId; return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId; return OperationEvent.Signal.guide.confirm1.domId;
} }
} }
}, },
domIdConfirm2() { domIdConfirm2() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId; return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId; return OperationEvent.Signal.guide.confirm2.domId;
} }
} }
}, },
domIdStop() { domIdStop() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId; return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId; return OperationEvent.Signal.guide.stop.domId;
} }
} }
}, },
domIdClose() { domIdClose() {
if (this.dialogShow) { if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId; return OperationEvent.Command.close.menu.domId;
} }
}, },
title() { title() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封'; return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路'; return '办理引导进路';
} }
} }
} }
}, },
watch: { watch: {
cmdDisabled: { cmdDisabled: {
handler(val, oldVal) { handler(val, oldVal) {
this.stpDisabled = true; this.stpDisabled = true;
val.forEach((elem, index) => { val.forEach((elem, index) => {
// 1 // 1
if (elem == false && index >= 1 && index <= 2) { if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false; this.stpDisabled = false;
} }
}); });
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); });
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) { if (this.timeCountCommand > 0) {
this.timeCountCommand--; this.timeCountCommand--;
} else if (this.timeCountCommand == 0) { } else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1; this.timeCountCommand = -1;
} }
if (this.timeCountConfirm > 0) { if (this.timeCountConfirm > 0) {
this.timeCountConfirm--; this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { } else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
} }
} }
}, 1000); }, 1000);
}, },
beforeDestroy() { beforeDestroy() {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
}, },
methods: { methods: {
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name; this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
this.order = 0; this.order = 0;
this.operation = operate.operation; this.operation = operate.operation;
this.tempData = []; this.tempData = [];
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true]; this.cmdDisabled = [false, true, true];
} }
this.dialogShow = true; this.dialogShow = true;
this.stpDisabled = true; this.stpDisabled = true;
this.setMessage('请点击“下达”按钮,下达命令!'); this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
command() { command() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/ /** 第一步带弹框处理*/
this.commandHasPopUp(); this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/ /** 第一步不带弹框处理*/
this.commandNoPopUp(); this.commandNoPopUp();
} }
}, },
commandHasPopUp() { commandHasPopUp() {
const operate = { const operate = {
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
}; };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation; operate.operation = OperationEvent.Signal.unlock.order.operation;
} }
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected); this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
} }
} }
}); });
}, },
commandNoPopUp() { commandNoPopUp() {
const operate = { const operate = {
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
}; };
if (this.operation == OperationEvent.Signal.guide.menu.operation) { if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation; operate.operation = OperationEvent.Signal.guide.order.operation;
} }
this.setMessage('请点击“确认1”按钮确认命令'); this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 }); this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
}); });
}, },
confirm1() { confirm1() {
const operate = { const operate = {
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
}; };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation; operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation; operate.operation = OperationEvent.Signal.guide.confirm1.operation;
} }
this.setMessage('请点击“确认2”按钮确认命令'); this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = 10; this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 }); this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
} }
}).catch(() => { }).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
}); });
}, },
confirm2() { confirm2() {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
}; };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation; operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation; operate.operation = OperationEvent.Signal.guide.confirm2.operation;
} }
this.setMessage(''); this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
} }
}).catch(() => { }).catch(() => {
this.timeCountCommand = -1; this.timeCountCommand = -1;
this.timeCountConfirm = -1; this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 }); this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
}); });
}, },
stop() { stop() {
const operate = { const operate = {
type: MapDeviceType.Signal.type type: MapDeviceType.Signal.type
}; };
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation; operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) { } else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/ /** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation; operate.operation = OperationEvent.Signal.guide.stop.operation;
} }
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' }); this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 }); this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' }); this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' }); this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
} }
}).catch(error => { }).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' }); this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
}); });
}, },
close() { close() {
const operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation operation: OperationEvent.Command.close.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(error => {
this.doClose(); this.doClose();
}); });
}, },
getOperate(operate) { getOperate(operate) {
/** 弹框返回值处理*/ /** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) { if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/ /** 信号解封*/
this.backOperate = operate; this.backOperate = operate;
this.setButtonEnable(operate); this.setButtonEnable(operate);
if (operate.success) { if (operate.success) {
this.timeCountCommand = 30; this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
} else { } else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' }); this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
} }
} }
}, },
setButtonEnable(param) { setButtonEnable(param) {
this.cmdDisabled = [true, true, true]; this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) { if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false; this.cmdDisabled[param.step] = false;
} }
}, },
setMessage(message) { setMessage(message) {
this.message = message; this.message = message;
}, },
writeRecord(param) { writeRecord(param) {
this.tempData.push(param); this.tempData.push(param);
}, },
editRecord(param) { editRecord(param) {
this.tempData.forEach(elem => { this.tempData.forEach(elem => {
if (elem.order == param.order) { if (elem.order == param.order) {
for (var prop in param) { for (var prop in param) {
elem[prop] = param[prop]; elem[prop] = param[prop];
} }
} }
}); });
} }
} }
}; };
</script> </script>

View File

@ -42,7 +42,6 @@
<script> <script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -121,7 +120,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
changeRadio() { changeRadio() {

View File

@ -1,153 +1,168 @@
<template> <template>
<div> <div>
<el-dialog class="ningbo-01__systerm route-detail" :title="title" :visible.sync="show" width="340px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row class="header"> class="ningbo-01__systerm route-detail"
<el-col :span="10"><span>车站</span></el-col> :title="title"
<el-col :span="10" :offset="2"><span>始端信号机</span></el-col> :visible.sync="show"
</el-row> width="340px"
<el-row> :before-close="doClose"
<el-col :span="10"> :z-index="2000"
<el-input v-model="stationName" size="small" disabled></el-input> :modal="false"
</el-col> :close-on-click-modal="false"
<el-col :span="10" :offset="2"> >
<el-input v-model="signalName" size="small" disabled></el-input> <el-row class="header">
</el-col> <el-col :span="10"><span>车站</span></el-col>
</el-row> <el-col :span="10" :offset="2"><span>始端信号机</span></el-col>
<div class="table"> </el-row>
<span>进路列表</span> <el-row>
<el-table ref="tempTable" :data="tempData" border style="width: 100%" size="mini" highlight-current-row <el-col :span="10">
:height="140"> <el-input v-model="stationName" size="small" disabled />
<el-table-column label="进路"> </el-col>
<template slot-scope="scope"> <el-col :span="10" :offset="2">
<span>{{scope.row.name}}</span> <el-input v-model="signalName" size="small" disabled />
</template> </el-col>
</el-table-column> </el-row>
<el-table-column prop="status" label="控制状态" width="180"> <div class="table">
<template slot-scope="scope"> <span>进路列表</span>
<span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span> <el-table
<span v-else>人工</span> ref="tempTable"
</template> :data="tempData"
</el-table-column> border
</el-table> style="width: 100%"
</div> size="mini"
<el-row justify="center" class="button-group"> highlight-current-row
<el-col :span="10" :offset="2"> :height="140"
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> >
</el-col> <el-table-column label="进路">
<el-col :span="8" :offset="4"> <template slot-scope="scope">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <span>{{ scope.row.name }}</span>
</el-col> </template>
</el-row> </el-table-column>
<notice-info ref="noticeInfo"></notice-info> <el-table-column prop="status" label="控制状态" width="180">
</el-dialog> <template slot-scope="scope">
</div> <span v-if="scope.row.controlType == '01'">自动不进行冲突检测</span>
<span v-else>人工</span>
</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> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'RouteDetail', name: 'RouteDetail',
components: { components: {
NoticeInfo 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;
}, },
data() { domIdCancel() {
return { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
dialogShow: false,
loading: false,
selected: null,
tempData: [],
stationName: '',
signalName: '',
}
}, },
computed: { domIdConfirm() {
...mapGetters('map', [ return this.dialogShow ? OperationEvent.Signal.detail.menu.domId : '';
'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() { title() {
this.$nextTick(() => { return '查询进路状态';
this.$store.dispatch('training/tipReload'); }
}) },
}, mounted() {
methods: { this.$nextTick(() => {
doShow(operate, selected, tempData) { this.$store.dispatch('training/tipReload');
this.selected = selected; });
// },
if (!this.dialogShow) { methods: {
this.signalName = ''; doShow(operate, selected, tempData) {
this.stationName = ''; this.selected = selected;
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { //
this.signalName = selected.name if (!this.dialogShow) {
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); this.signalName = '';
if (station) { this.stationName = '';
this.stationName = station.name; 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.tempData = tempData || [];
}
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); });
}, },
commit() { doClose() {
let operate = { this.loading = false;
send: true, this.dialogShow = false;
type: MapDeviceType.Signal.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Signal.detail.menu.operation this.mouseCancelState(this.selected);
} },
commit() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.detail.menu.operation
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
} }
}).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/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose(); this.doClose();
}); }
} }).catch(() => {
this.doClose();
});
} }
} }
</script> };
</script>

View File

@ -78,265 +78,264 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'RouteHandControl', name: 'RouteHandControl',
components: { components: {
ConfirmControl, ConfirmControl,
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
selected: null, selected: null,
tempData: [], tempData: [],
operation: null, operation: null,
selection: [], selection: [],
stationName: '', stationName: '',
signalName: '', signalName: '',
allSelect: false allSelect: false
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'signalList' 'signalList'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdChoose() { domIdChoose() {
if (this.dialogShow) { if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return OperationEvent.Signal.humanControl.choose.domId; return OperationEvent.Signal.humanControl.choose.domId;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return OperationEvent.Signal.atsAutoControl.choose.domId; return OperationEvent.Signal.atsAutoControl.choose.domId;
} }
} }
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : ''; return this.dialogShow ? getDomIdByOperation(this.operation) : '';
}, },
title() { title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控'; return '进路交人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控'; return '进路交自动控';
} }
}, },
commitDisabled() { commitDisabled() {
let disabled = true; let disabled = true;
if (this.selection && this.selection.length) { if (this.selection && this.selection.length) {
disabled = false; disabled = false;
} }
return disabled; return disabled;
} }
}, },
watch: { watch: {
// //
tempData: { tempData: {
handler(val, oldVal) { handler(val, oldVal) {
this.checkTableDataSelction(val); this.checkTableDataSelction(val);
}, },
deep: true deep: true
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); });
}, },
methods: { methods: {
doShow(operate, selected, tempData) { doShow(operate, selected, tempData) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.signalName = ''; this.signalName = '';
this.stationName = ''; this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) { if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name; this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode); const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) { if (station) {
this.stationName = station.name; this.stationName = station.name;
} }
} }
if (tempData && tempData.length > 0) { if (tempData && tempData.length > 0) {
tempData.forEach(elem => { tempData.forEach(elem => {
elem.check = false; elem.check = false;
elem.disabled = false; elem.disabled = false;
// //
if (operate.operation === OperationEvent.Signal.humanControl.menu.operation && if (operate.operation === OperationEvent.Signal.humanControl.menu.operation &&
elem.controlType != '01') { elem.controlType != '01') {
elem.disabled = true; elem.disabled = true;
} if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation && } if (operate.operation === OperationEvent.Signal.atsAutoControl.menu.operation &&
elem.controlType == '01') { elem.controlType == '01') {
elem.disabled = true; elem.disabled = true;
} }
}); });
} }
this.tempData = tempData || []; this.tempData = tempData || [];
this.operation = operate.operation; this.operation = operate.operation;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$refs.tempTable.setCurrentRow(); this.$refs.tempTable.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
checkTableDataSelction(data) { checkTableDataSelction(data) {
const selection = []; const selection = [];
if (data && data.length > 0) { if (data && data.length > 0) {
data.forEach(row => { data.forEach(row => {
if (row.check && !row.disabled) { if (row.check && !row.disabled) {
selection.push(row); selection.push(row);
} }
}); });
} }
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) { if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.handleChooseChange(selection); this.handleChooseChange(selection);
this.selection = selection; this.selection = selection;
} }
let num = 0; let num = 0;
this.allSelect = false; this.allSelect = false;
this.tempData.forEach(item => { this.tempData.forEach(item => {
if (item.check) { if (item.check) {
num++; num++;
if (num == this.tempData.length) { if (num == this.tempData.length) {
this.allSelect = true; this.allSelect = true;
} }
} }
}); });
}, },
allSelectChange() { allSelectChange() {
if (this.allSelect) { if (this.allSelect) {
this.tempData.forEach(item => { this.tempData.forEach(item => {
if (!item.disabled) { if (!item.disabled) {
item.check = true; item.check = true;
} }
}); });
} else { } else {
this.tempData.forEach(item => { this.tempData.forEach(item => {
if (!item.disabled) { if (!item.disabled) {
item.check = false; item.check = false;
} }
}); });
} }
}, },
serializeCodeListWithSeparator(sep) { serializeCodeListWithSeparator(sep) {
const codeList = []; const codeList = [];
if (this.selection && this.selection.length) { if (this.selection && this.selection.length) {
this.selection.forEach(elem => { this.selection.forEach(elem => {
codeList.push(elem.code); codeList.push(elem.code);
}); });
} }
return codeList.join(sep); return codeList.join(sep);
}, },
handleChooseChange(selection) { handleChooseChange(selection) {
this.selection = selection; this.selection = selection;
if (selection && selection.length) { if (selection && selection.length) {
const operate = { const operate = {
repeat: true, repeat: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: '', operation: '',
val: this.serializeCodeListWithSeparator('::'), val: this.serializeCodeListWithSeparator('::'),
selection: selection selection: selection
}; };
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/ /** 进路交人工控*/
operate.operation = OperationEvent.Signal.humanControl.choose.operation; operate.operation = OperationEvent.Signal.humanControl.choose.operation;
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/ /** 进路交自动控*/
operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation; operate.operation = OperationEvent.Signal.atsAutoControl.choose.operation;
} }
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}); });
} else if (!selection) { } else if (!selection) {
this.$messageBox(`请选择一条数据`); this.$messageBox(`请选择一条数据`);
} }
}, },
commit() { commit() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) { if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/ /** 进路交人工控*/
this.humanControl(); this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) { } else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/ /** 进路交自动控*/
this.atsAutoControl(); this.atsAutoControl();
} }
}, },
// //
humanControl() { humanControl() {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation operation: OperationEvent.Signal.humanControl.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
// //
atsAutoControl() { atsAutoControl() {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation operation: OperationEvent.Signal.atsAutoControl.menu.operation
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(error => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Signal.type, type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(error => {
this.doClose(); this.doClose();
}); });
} }
} }
}; };
</script> </script>

View File

@ -1,157 +1,170 @@
<template> <template>
<div> <div>
<el-dialog class="ningbo-01__systerm route-lock" :title="title" :visible.sync="show" width="340px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row class="header"> class="ningbo-01__systerm route-lock"
<el-col :span="10"><span>车站名称</span></el-col> :title="title"
<el-col :span="10" :offset="2"><span>信号机名称</span></el-col> :visible.sync="show"
</el-row> width="340px"
<el-row> :before-close="doClose"
<el-col :span="10"> :z-index="2000"
<el-input v-model="stationName" size="small" disabled></el-input> :modal="false"
</el-col> :close-on-click-modal="false"
<el-col :span="10" :offset="2"> >
<el-input v-model="signalName" size="small" disabled></el-input> <el-row class="header">
</el-col> <el-col :span="10"><span>车站名称</span></el-col>
</el-row> <el-col :span="10" :offset="2"><span>信号机名称</span></el-col>
<div class="table"> </el-row>
<span>信号按钮列表</span> <el-row>
<el-table ref="table" :data="tempData" border style="width: 100%" size="mini" highlight-current-row <el-col :span="10">
:height="140"> <el-input v-model="stationName" size="small" disabled />
<el-table-column prop="name" label="按钮名称"> </el-col>
</el-table-column> <el-col :span="10" :offset="2">
<el-table-column prop="status" label="按钮状态"> <el-input v-model="signalName" size="small" disabled />
</el-table-column> </el-col>
</el-table> </el-row>
</div> <div class="table">
<el-row justify="center" class="button-group"> <span>信号按钮列表</span>
<el-col :span="10" :offset="2"> <el-table
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> ref="table"
</el-col> :data="tempData"
<el-col :span="8" :offset="4"> border
<el-button :id="domIdCancel" @click="cancel"> </el-button> style="width: 100%"
</el-col> size="mini"
</el-row> highlight-current-row
<notice-info ref="noticeInfo"></notice-info> :height="140"
</el-dialog> >
</div> <el-table-column prop="name" label="按钮名称" />
<el-table-column prop="status" label="按钮状态" />
</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> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'RouteLock', name: 'RouteLock',
components: { components: {
NoticeInfo NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
selected: null,
tempData: [],
operate: null,
stationName: '',
signalName: ''
};
},
computed: {
...mapGetters('map', [
'signalList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
data() { domIdCancel() {
return { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
dialogShow: false, },
loading: false, domIdConfirm() {
selected: null, return this.dialogShow ? OperationEvent.Signal.lock.menu.domId : '';
tempData: [], },
operate: null, title() {
stationName: '', return '封锁信号按钮';
signalName: '' }
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name;
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
/** status 04:封锁*/
const signal = (selected || {}).state;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }];
const timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
clearInterval(timer);
}
}, 300);
} }
},
computed: { this.dialogShow = true;
...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.lock.menu.domId : '';
},
title() {
return '封锁信号按钮'
}
},
mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
this.signalName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'Signal'.toUpperCase()) {
this.signalName = selected.name
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
}
/** status 04:封锁*/
let signal = (selected || {}).state;
this.tempData = [{ code: selected.code, name: selected.name, status: signal.status != '04' ? '未封锁' : '封锁' }]
let timer = setInterval(() => {
if (this.$refs.table) {
this.$refs.table.setCurrentRow(this.tempData[0]);
clearInterval(timer);
}
}, 300);
}
this.dialogShow = true;
this.$nextTick(() => {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected); });
}, },
commit() { doClose() {
let operate = { this.loading = false;
send: true, this.dialogShow = false;
type: MapDeviceType.Signal.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Signal.lock.menu.operation this.mouseCancelState(this.selected);
} },
commit() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation,
} }
}).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/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose(); this.doClose();
}); }
} }).catch(() => {
this.doClose();
});
} }
} }
</script> };
</script>

View File

@ -34,7 +34,6 @@
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -138,7 +137,7 @@ export default {
this.restoreBeforeDevices(); this.restoreBeforeDevices();
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
restoreBeforeDevices() { restoreBeforeDevices() {
// //

View File

@ -60,7 +60,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PopupAlarm from './childDialog/popupAlarm'; import PopupAlarm from './childDialog/popupAlarm';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -223,7 +222,7 @@ export default {
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
waitSelectEvent() { waitSelectEvent() {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {

View File

@ -45,7 +45,6 @@
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
@ -130,7 +129,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
commit() { commit() {
if (this.operation == OperationEvent.Section.lock.menu.operation) { if (this.operation == OperationEvent.Section.lock.menu.operation) {

View File

@ -307,7 +307,6 @@
</template> </template>
<script> <script>
import { OperationEvent } from '@/scripts/ConstDic'; import { OperationEvent } from '@/scripts/ConstDic';
// import { mouseCancelState } from '../utils/menuItemStatus';
// import { now } from '@/utils/date'; // import { now } from '@/utils/date';
import ConfirmTip from './childDialog/confirmTip'; import ConfirmTip from './childDialog/confirmTip';
import { sendCommand } from '@/api/jmap/training'; import { sendCommand } from '@/api/jmap/training';
@ -552,7 +551,7 @@ export default {
this.speed = 0; this.speed = 0;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
openMessage(state) { openMessage(state) {
if (state == 'open') { // if (state == 'open') { //

View File

@ -1,212 +1,229 @@
<template> <template>
<el-dialog class="ningbo-01__systerm stand-run-level" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<div style="font-size: 16px; margin-bottom: 5px;">变通节点</div> class="ningbo-01__systerm stand-run-level"
<div style="margin-bottom: 5px;"> :title="title"
<el-input v-model="stationName" size="mini" disabled></el-input> :visible.sync="show"
</div> width="320px"
<div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div> :before-close="doClose"
<div style="margin-bottom: 5px;"> :z-index="2000"
<el-input v-model="stationStrategy" size="mini" disabled></el-input> :modal="false"
</div> :close-on-click-modal="false"
<div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div> >
<el-table ref="table" :data="strategyList" border :cell-style="tableStyle" style="width: 100%; margin-top:10px" <div style="font-size: 16px; margin-bottom: 5px;">变通节点</div>
size="mini" @row-click="clickEvent" height="120" highlight-current-row :show-header="false"> <div style="margin-bottom: 5px;">
<el-table-column prop="label" :id="domIdChoose" style="margin-left:30px"> <el-input v-model="stationName" size="mini" disabled />
</el-table-column> </div>
</el-table> <div style="font-size: 16px; margin-bottom: 5px;">当前变通策略</div>
<el-row justify="center" class="button-group"> <div style="margin-bottom: 5px;">
<el-col :span="10" :offset="2"> <el-input v-model="stationStrategy" size="mini" disabled />
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit"> </div>
确定</el-button> <div style="font-size: 16px; margin-bottom: 5px;">变通策略选项</div>
</el-col> <el-table
<el-col :span="8" :offset="4"> ref="table"
<el-button :id="domIdCancel" @click="cancel"> </el-button> :data="strategyList"
</el-col> border
</el-row> :cell-style="tableStyle"
<confirm-control ref="confirmControl"></confirm-control> style="width: 100%; margin-top:10px"
<notice-info ref="noticeInfo"></notice-info> size="mini"
</el-dialog> height="120"
highlight-current-row
:show-header="false"
@row-click="clickEvent"
>
<el-table-column :id="domIdChoose" prop="label" style="margin-left:30px" />
</el-table>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="!isConfirm" @click="commit">
确定</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template> </template>
<script> <script>
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo' import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import { mapGetters } from 'vuex';
import { mapGetters } from 'vuex';
export default { export default {
name: 'StandBackStrategy', name: 'StandBackStrategy',
components: { components: {
ConfirmControl, ConfirmControl,
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
tempData: [], tempData: [],
strategyList: [ strategyList: [
{ {
value: '01', value: '01',
label: '无折返' label: '无折返'
}, },
{ {
value: '02', value: '02',
label: '无人折返' label: '无人折返'
}, },
{ {
value: '03', value: '03',
label: '自动换端' label: '自动换端'
}, },
{ {
value: '04', value: '04',
label: '关闭' label: '关闭'
},
],
stationName: '',
stationStrategy: '',
selection: [],
isConfirm: false,
strategy: '',
tableStyle: {
'border-bottom': 'none',
} }
],
stationName: '',
stationStrategy: '',
selection: [],
isConfirm: false,
strategy: '',
tableStyle: {
'border-bottom': 'none'
} }
};
},
computed: {
...mapGetters('map', [
'stationList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
computed: { domIdCancel() {
...mapGetters('map', [ return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
'stationList',
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return '变通策略管理';
}
}, },
mounted() { domIdConfirm() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.StationStand.setBackStrategy.choose.domId : '';
},
title() {
return '变通策略管理';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
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(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$refs.table.setCurrentRow(null);
}) });
}, },
methods: { doShow(operate, selected, opts) {
loadInitData(selected, opts) { this.selected = selected;
this.tempData = []; if (!this.dialogShow) {
let stationList = [...this.stationList]; this.stationName = '';
let station = this.stationList.find(n => n.code == selected.stationCode) this.stationStrategy = '';
this.tempData.push({ name: station.name, station: selected.name, strategy: opts.reentryStrategy }); if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.$nextTick(() => { const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
this.$refs.table.setCurrentRow(null); if (station) {
}) this.stationName = station.name;
}, this.strategyList.forEach(item => {
doShow(operate, selected, opts) { if (item.value == opts.reentryStrategy) {
this.selected = selected; this.stationStrategy = item.label;
if (!this.dialogShow) { }
this.stationName = ''; });
this.stationStrategy = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
this.strategyList.forEach(item => {
if (item.value == opts.reentryStrategy) {
this.stationStrategy = item.label;
}
})
}
} }
this.loadInitData(selected, opts);
} }
this.loadInitData(selected, opts);
}
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
clickEvent(row, column, event) {
let operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
val: `${row.value}`,
}
this.strategy = row.value;
this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
checkTableDataSelction(data) {
let selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
}
this.disabledSend = selection.length ? false : true;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); });
}, },
commit() { clickEvent(row, column, event) {
if (this.isConfirm) { const operate = {
let operate = { type: MapDeviceType.StationStand.type,
send: true, operation: OperationEvent.StationStand.setBackStrategy.choose.operation,
type: MapDeviceType.StationStand.type, val: `${row.value}`
operation: OperationEvent.StationStand.setBackStrategy.menu.operation, };
val: `${this.strategy}` this.strategy = row.value;
} this.isConfirm = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = true; if (valid) {
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
})
} else {
this.doClose();
} }
}, });
cancel() { },
let operate = { checkTableDataSelction(data) {
type: MapDeviceType.StationStand.type, const selection = [];
operation: OperationEvent.Command.cancel.menu.operation, if (data && data.length > 0) {
} data.forEach(row => {
if (row.check && !row.disabled) {
this.$store.dispatch('training/next', operate).then(({ valid }) => { selection.push(row);
if (valid) {
this.doClose();
} }
}).catch(error => {
this.doClose();
}); });
} }
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.mouseCancelState(this.selected);
},
commit() {
if (this.isConfirm) {
const operate = {
send: true,
type: MapDeviceType.StationStand.type,
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
val: `${this.strategy}`
};
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 {
this.doClose();
}
},
cancel() {
const operate = {
type: MapDeviceType.StationStand.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
} }
} }
</script> };
</script>

View File

@ -35,7 +35,6 @@
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
@ -148,7 +147,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.operation = ''; this.operation = '';
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
changeRadio(val) { // changeRadio(val) { //
const operate = { const operate = {

View File

@ -126,7 +126,6 @@
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
@ -258,7 +257,7 @@ export default {
this.dialogShow = false; this.dialogShow = false;
this.operation = ''; this.operation = '';
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
changeRadio(val) { // changeRadio(val) { //
const operate = { const operate = {

View File

@ -65,7 +65,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
@ -237,7 +236,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
commit() { commit() {
const operate = { const operate = {

View File

@ -92,7 +92,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -225,7 +224,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
commit() { commit() {
if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) { if (this.operation == OperationEvent.StationStand.setJumpStop.menu.operation) {

View File

@ -72,7 +72,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -287,7 +286,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
commit() { commit() {
if (this.isConfirm) { if (this.isConfirm) {

View File

@ -1,57 +1,62 @@
<template> <template>
<el-dialog v-dialogDrag :title="title" class="ningbo-01__systerm stand-stop-time" :visible.sync="show" width="340px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false"> <el-dialog v-dialogDrag :title="title" class="ningbo-01__systerm stand-stop-time" :visible.sync="show" width="340px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row class="header"> <el-row class="header">
<el-col :span="11"><span>集中站</span></el-col> <el-col :span="11"><span>集中站</span></el-col>
<el-col :span="11" :offset="2"><span>站台名称</span></el-col> <el-col :span="11" :offset="2"><span>站台名称</span></el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-input v-model="stationName" size="small" disabled></el-input> <el-input v-model="stationName" size="small" disabled />
</el-col> </el-col>
<el-col :span="11" :offset="2"> <el-col :span="11" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input> <el-input v-model="standName" size="small" disabled />
</el-col> </el-col>
</el-row> </el-row>
<div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;"> <div style="padding: 10px 15px; border: 1px double lightgray; margin: 20px 0px; height: 73px;">
<span class="base-label" style="left: -9px;">模式</span> <span class="base-label" style="left: -9px;">模式</span>
<div style=" position: relative; top:-10px;"> <div style=" position: relative; top:-10px;">
<el-radio-group v-model="control" @change='chooseControl' style="width: 40%;float: left;"> <el-radio-group v-model="control" style="width: 40%;float: left;" @change="chooseControl">
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<el-radio label="01" :id="control === '01'? '': domIdChoose1">自动</el-radio> <el-radio :id="control === '01'? '': domIdChoose1" label="01">自动</el-radio>
</div> </div>
<el-radio label="02" :id="control === '02'? '': domIdChoose1">全人工</el-radio> <el-radio :id="control === '02'? '': domIdChoose1" label="02">全人工</el-radio>
</el-radio-group> </el-radio-group>
<el-input-number v-model="time" @change="inputTime" :disabled="disabledInput" :id="domIdInput" <el-input-number
controls-position="right" :min="0" size="mini" :id="domIdInput"
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"> v-model="time"
</el-input-number> :disabled="disabledInput"
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div> controls-position="right"
</div> :min="0"
size="mini"
style="width: 130px; padding-left:30px;display: block; float: left; margin-top: 15px;"
@change="inputTime"
/>
<div style="float: left;margin-top: 22px; margin-left: 5px;"></div>
</div>
</div> </div>
<div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;"> <div style="padding: 10px 15px; border: 1px double lightgray; height: 60px;">
<span class="base-label" style="left: -9px;">有效次数</span> <span class="base-label" style="left: -9px;">有效次数</span>
<div style=" position: relative; top:-10px;"> <div style=" position: relative; top:-10px;">
<el-radio-group v-model="effective" @change="chooseEffective" :disabled="disabledTime"> <el-radio-group v-model="effective" :disabled="disabledTime" @change="chooseEffective">
<el-radio :label="false" :id="effective === false? '': domIdChoose2">一次有效</el-radio> <el-radio :id="effective === false? '': domIdChoose2" :label="false">一次有效</el-radio>
<el-radio :label="true" :id="effective === true? '': domIdChoose2">一直有效</el-radio> <el-radio :id="effective === true? '': domIdChoose2" :label="true">一直有效</el-radio>
</el-radio-group> </el-radio-group>
</div> </div>
</div> </div>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<confirm-control ref="confirmControl"></confirm-control> <confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -152,7 +157,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
chooseControl(control) { chooseControl(control) {
/** 自动时的默认时间*/ /** 自动时的默认时间*/

View File

@ -60,7 +60,6 @@
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date'; import { now } from '@/utils/date';
export default { export default {
@ -217,7 +216,7 @@
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
command() { command() {
if (this.operation == OperationEvent.Station.powerUnLock.menu.operation || if (this.operation == OperationEvent.Station.powerUnLock.menu.operation ||

View File

@ -43,7 +43,6 @@
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -162,7 +161,7 @@ export default {
this.restoreBeforeDevices(); this.restoreBeforeDevices();
this.$refs.table.setCurrentRow(); this.$refs.table.setCurrentRow();
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
restoreBeforeDevices() { restoreBeforeDevices() {
// //

View File

@ -1,113 +1,122 @@
<template> <template>
<el-dialog class="ningbo-01__systerm station-human-control-all" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag> v-dialogDrag
<div class="context"> class="ningbo-01__systerm station-human-control-all"
<span>{{title}}</span> :title="title"
</div> :visible.sync="show"
<el-row justify="center" class="button-group"> width="360px"
<el-col :span="10" :offset="2"> :before-close="doClose"
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> :z-index="2000"
</el-col> :modal="false"
<el-col :span="8" :offset="4"> :close-on-click-modal="false"
<el-button :id="domIdCancel" @click="cancel"> </el-button> append-to-body
</el-col> >
</el-row> <div class="context">
<notice-info ref="noticeInfo"></notice-info> <span>{{ title }}</span>
</el-dialog> </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>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'StationHumanControlAll', name: 'StationHumanControlAll',
data() { components: {
return { NoticeInfo
dialogShow: false, },
loading: false, data() {
selected: null, return {
operation: null dialogShow: false,
} loading: false,
selected: null,
operation: null
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
components: { title() {
NoticeInfo return '全集中站进路交人工控';
}, },
computed: { domIdCancel() {
show() { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
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 : '';
},
}, },
mounted() { domIdConfirm() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Station.humanControlALL.menu.domId : '';
this.$store.dispatch('training/tipReload'); }
}) },
}, mounted() {
methods: { this.$nextTick(() => {
doShow(operate, selected) { this.$store.dispatch('training/tipReload');
this.selected = selected; });
if (!this.dialogShow) { },
this.loading = false; methods: {
this.operation = operate.operation; 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.loading = false;
this.dialogShow = false; this.operation = operate.operation;
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.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 = {
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> </script>
<style> <style>
@ -115,4 +124,4 @@
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>

View File

@ -1,133 +1,141 @@
<template> <template>
<el-dialog class="ningbo-01__systerm station-set-route-control-all" :title="title" :visible.sync="show" <el-dialog
width="320px" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" append-to-body v-dialogDrag
v-dialogDrag> class="ningbo-01__systerm station-set-route-control-all"
<div style="padding: 0px 10px"> :title="title"
<el-form size="small" label-width="90px" label-position="left" ref="form"> :visible.sync="show"
<el-form-item label="集中站名称:" prop="stationName"> width="320px"
<el-input v-model="stationName" size="small" disabled></el-input> :before-close="doClose"
</el-form-item> :z-index="2000"
</el-form> :modal="false"
<el-radio-group v-model="mode"> :close-on-click-modal="false"
<el-row> append-to-body
<el-radio :label="true">检查冲突</el-radio> >
</el-row> <div style="padding: 0px 10px">
<el-row style="margin-top: 20px"> <el-form ref="form" size="small" label-width="90px" label-position="left">
<el-radio :label="false">不检查冲突</el-radio> <el-form-item label="集中站名称:" prop="stationName">
</el-row> <el-input v-model="stationName" size="small" disabled />
</el-radio-group> </el-form-item>
</div> </el-form>
<el-row justify="center" class="button-group"> <el-radio-group v-model="mode">
<el-col :span="10" :offset="2"> <el-row>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-radio :label="true">检查冲突</el-radio>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <el-row style="margin-top: 20px">
</el-dialog> <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" />
</el-dialog>
</template> </template>
<script> <script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'StationSetRouteControlAll', name: 'StationSetRouteControlAll',
data() { components: {
return { NoticeInfo
dialogShow: false, },
loading: false, data() {
selected: null, return {
operation: null, dialogShow: false,
stationName: '', loading: false,
mode: true, selected: null,
} operation: null,
stationName: '',
mode: true
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
components: { title() {
NoticeInfo return '全集中站设置进路控制模式';
}, },
computed: { domIdCancel() {
show() { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
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 : '';
},
}, },
mounted() { domIdConfirm() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Station.atsAutoControlALL.menu.domId : '';
this.$store.dispatch('training/tipReload'); }
}) },
}, mounted() {
methods: { this.$nextTick(() => {
doShow(operate, selected) { this.$store.dispatch('training/tipReload');
this.selected = selected; });
if (!this.dialogShow) { },
this.loading = false; methods: {
this.operation = operate.operation; doShow(operate, selected) {
this.stationName = ''; this.selected = selected;
if (selected) { if (!this.dialogShow) {
this.stationName = selected.name;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.operation = operate.operation;
this.$store.dispatch('training/emitTipFresh'); this.stationName = '';
mouseCancelState(this.selected); if (selected) {
}, this.stationName = selected.name;
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.$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');
this.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> </script>
<style> <style>
@ -135,4 +143,4 @@
padding-bottom: 40px !important; padding-bottom: 40px !important;
border: 1px solid lightgray; border: 1px solid lightgray;
} }
</style> </style>

View File

@ -60,7 +60,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import PopupAlarm from './childDialog/popupAlarm'; import PopupAlarm from './childDialog/popupAlarm';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -208,7 +207,7 @@ export default {
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
waitSelectEvent() { waitSelectEvent() {
if (!this.$store.state.menuOperation.break) { if (!this.$store.state.menuOperation.break) {

View File

@ -65,7 +65,6 @@
</template> </template>
<script> <script>
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler'; import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
@ -167,7 +166,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
commit() { commit() {
if (this.operation == OperationEvent.Switch.lock.menu.operation) { if (this.operation == OperationEvent.Switch.lock.menu.operation) {

View File

@ -1,168 +1,176 @@
<template> <template>
<el-dialog class="ningbo-01__systerm stand-stop-time" :title="title" :visible.sync="show" width="340px" :before-close="doClose" <el-dialog
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form"> class="ningbo-01__systerm stand-stop-time"
<div style="width: 96%;display:flex;flex-dorection:row"> :title="title"
<!-- <el-form-item label="车 组 号:" label-width="95px" prop="tripNumber"> :visible.sync="show"
width="340px"
: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: 96%;display:flex;flex-dorection:row">
<!-- <el-form-item label="车 组 号:" label-width="95px" prop="tripNumber">
<el-input v-model="addModel.tripNumber" disabled></el-input> <el-input v-model="addModel.tripNumber" disabled></el-input>
</el-form-item> --> </el-form-item> -->
<el-form-item label="车 次 号:" label-width="95px" prop="trainSource"> <el-form-item label="车 次 号:" label-width="95px" prop="trainSource">
<el-input v-model="addModel.trainSource" :id="domIdTrainSource" @change="handerTrainSource"></el-input> <el-input :id="domIdTrainSource" v-model="addModel.trainSource" @change="handerTrainSource" />
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<el-row justify="center" class="button-group"> <el-row justify="center" class="button-group">
<el-col :span="10" :offset="2"> <el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="4"> <el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
export default { export default {
// name: 'TrainMove', // name: 'TrainMove',
name: 'TrainAddPlan', name: 'TrainAddPlan',
components: { components: {
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
tripNumber: '', tripNumber: '',
trainSource: '', trainSource: '',
stationStandSource: '', stationStandSource: '',
trainGoal: '', trainGoal: '',
stationStandGoal: '', stationStandGoal: ''
}, },
rules: { rules: {
// tripNumber: [ // tripNumber: [
// { required: true, message: '', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
// ], // ],
trainSource: [ trainSource: [
{ required: true, message: '请输入车次号', trigger: 'blur' } { required: true, message: '请输入车次号', trigger: 'blur' }
], ]
// stationStandSource: [ // stationStandSource: [
// { required: true, message: '', trigger: 'change' } // { required: true, message: '', trigger: 'change' }
// ], // ],
// trainGoal: [ // trainGoal: [
// { required: true, message: '', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
// ], // ],
// stationStandGoal: [ // stationStandGoal: [
// { required: true, message: '', trigger: 'change' } // { required: true, message: '', trigger: 'change' }
// ], // ],
}, },
dialogShow: false, dialogShow: false,
loading: false, loading: false
} };
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
computed: { domIdCancel() {
...mapGetters('map', [ return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
'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 : '';
},
domIdTrainSource() {
// return this.dialogShow ? OperationEvent.Train.trainSource.menu.domId : '';
return this.dialogShow ? OperationEvent.Train.setPlanTrainId.menu.domId : '';
},
title() {
return '添加计划车'
}
}, },
mounted() { domIdConfirm() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.moveTrainId.menu.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdTrainSource() {
doShow(operate, selected) { // return this.dialogShow ? OperationEvent.Train.trainSource.menu.domId : '';
this.selected = selected; return this.dialogShow ? OperationEvent.Train.setPlanTrainId.menu.domId : '';
// },
if (!this.dialogShow) { title() {
return '添加计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
} // }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
commit() { this.loading = false;
this.$refs['form'].validate((valid) => { this.dialogShow = false;
if (valid) { this.$store.dispatch('training/emitTipFresh');
let operate = { this.$store.dispatch('map/setTrainWindowShow', false);
send: true, this.mouseCancelState(this.selected);
type: MapDeviceType.Train.type, },
// operation: OperationEvent.Train.moveTrainId.menu.operation, commit() {
operation: OperationEvent.Train.addPlanTrainId.menu.operation, this.$refs['form'].validate((valid) => {
} if (valid) {
const operate = {
send: true,
type: MapDeviceType.Train.type,
// operation: OperationEvent.Train.moveTrainId.menu.operation,
operation: OperationEvent.Train.addPlanTrainId.menu.operation
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); this.doClose();
// this.$refs.noticeInfo.doShow(operate); }
}) }).catch(() => {
} else { this.loading = false;
return false;
}
});
},
cancel() {
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose(); this.doClose();
} // this.$refs.noticeInfo.doShow(operate);
}).catch(error => { this.doClose(); }); });
}, } else {
handerTrainSource() { return false;
let operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.trainSource.menu.operation,
val: this.addModel.trainSource
} }
});
},
cancel() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.doClose();
} }
}); }).catch(() => { this.doClose(); });
} },
handerTrainSource() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.trainSource.menu.operation,
val: this.addModel.trainSource
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} }
} }
};
</script> </script>
<style scoped> <style scoped>
.ningbo-01__systerm .el-dialog .base-label { .ningbo-01__systerm .el-dialog .base-label {
@ -173,4 +181,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

View File

@ -43,7 +43,6 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
@ -115,7 +114,7 @@ export default {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
commit() { commit() {
const operate = { const operate = {
@ -130,7 +129,7 @@ export default {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);

View File

@ -1,160 +1,168 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-define" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-define"
<el-col :span="12">车站</el-col> :title="title"
<el-col :span="11" :offset="1">车次窗</el-col> :visible.sync="show"
</el-row> width="360px"
<el-row> :before-close="doClose"
<el-col :span="12"> :z-index="2000"
<el-input v-model="addModel.stationName" :disabled="true"></el-input> :modal="false"
</el-col> :close-on-click-modal="false"
<el-col :span="11" :offset="1"> >
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input> <el-row>
</el-col> <el-col :span="12">车站</el-col>
</el-row> <el-col :span="11" :offset="1">车次窗</el-col>
<el-row> </el-row>
<el-col :span="12">新车组号</el-col> <el-row>
</el-row> <el-col :span="12">
<el-row> <el-input v-model="addModel.stationName" :disabled="true" />
<el-col :span="12"> </el-col>
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input> <el-col :span="11" :offset="1">
</el-col> <el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-row> </el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="10"> <el-row>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-col :span="12">新车组号</el-col>
</el-col> </el-row>
<el-col :span="8" :offset="5"> <el-row>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-col :span="12">
</el-col> <el-input :id="domIdInput" v-model="addModel.tripNumber" @change="inputGroupNumber" />
</el-row> </el-col>
<notice-info ref="noticeInfo"></notice-info> </el-row>
</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" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainDefine', name: 'TrainDefine',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
stationName: '', stationName: '',
trainWindowCode: '', trainWindowCode: '',
tripNumber: '', tripNumber: ''
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { dialogShow: false,
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : ''; loading: false
}, };
domIdCancel() { },
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; computed: {
}, ...mapGetters('map', [
domIdConfirm() { 'stationStandList'
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : ''; ]),
}, show() {
title() { return this.dialogShow && !this.$store.state.menuOperation.break;
return '定义车组号'
}
}, },
mounted() { domIdInput() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdCancel() {
doShow(operate, selected) { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
this.selected = selected; },
// domIdConfirm() {
if (!this.dialogShow) { return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); },
if (section) { title() {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode); return '定义车组号';
if (station) { }
this.addModel.stationName = station.name; },
} 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.addModel.trainWindowCode = selected.code;
this.$nextTick(function () { }
this.$store.dispatch('training/emitTipFresh'); this.dialogShow = true;
}); this.$nextTick(function () {
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
inputGroupNumber() { this.loading = false;
let operate = { this.dialogShow = false;
type: MapDeviceType.Train.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Train.addTrainId.input.operation, this.$store.dispatch('map/setTrainWindowShow', false);
val: this.addModel.tripNumber this.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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.tripNumber
} }
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.tripNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style scoped> <style scoped>
/deep/ .el-row { /deep/ .el-row {
@ -169,4 +177,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

View File

@ -32,138 +32,137 @@
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
// import { getPublishMapTrainNos } from '@/api/runplan'; // import { getPublishMapTrainNos } from '@/api/runplan';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl'; import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default { export default {
name: 'TrainDelete', name: 'TrainDelete',
components: { components: {
ConfirmControl, ConfirmControl,
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
groupNumber: '' groupNumber: ''
}, },
rules: { rules: {
groupNumber: [ groupNumber: [
{ required: true, message: '请输入车组号', trigger: 'blur' } { required: true, message: '请输入车组号', trigger: 'blur' }
] ]
}, },
operation: null, operation: null,
dialogShow: false, dialogShow: false,
loading: false loading: false
}; };
}, },
computed: { computed: {
...mapGetters('map', [ ...mapGetters('map', [
'map' 'map'
]), ]),
show() { show() {
return this.dialogShow && !this.$store.state.menuOperation.break; return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { domIdInput() {
return this.dialogShow ? OperationEvent.Train.delTrainId.input.domId : ''; return this.dialogShow ? OperationEvent.Train.delTrainId.input.domId : '';
}, },
domIdCancel() { domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : ''; return this.dialogShow ? OperationEvent.Train.delTrainId.menu.domId : '';
}, },
title() { title() {
return '删除车组号'; return '删除车组号';
} }
}, },
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.$store.dispatch('training/tipReload'); this.$store.dispatch('training/tipReload');
}); });
}, },
methods: { methods: {
loadInitData(map) { loadInitData(map) {
if (map) { if (map) {
// getPublishMapTrainNos(map.skinCode).then(response => { // getPublishMapTrainNos(map.skinCode).then(response => {
// this.trainNoList = response.data; // this.trainNoList = response.data;
// }).catch(() => { // }).catch(() => {
// this.$messageBox(``); // this.$messageBox(``);
// }); // });
} }
}, },
doShow(operate, selected) { doShow(operate, selected) {
this.selected = selected; this.selected = selected;
// //
if (!this.dialogShow) { if (!this.dialogShow) {
this.operation = operate.operation; this.operation = operate.operation;
} }
this.dialogShow = true; this.dialogShow = true;
this.$nextTick(function () { this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
}); });
}, },
doClose() { doClose() {
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
}, },
inputGroupNumber() { inputGroupNumber() {
const operate = { const operate = {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.input.operation, operation: OperationEvent.Train.delTrainId.input.operation,
val: this.addModel.groupNumber val: this.addModel.groupNumber
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} }
}); });
}, },
commit() { commit() {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
const operate = { const operate = {
send: true, send: true,
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Train.delTrainId.menu.operation, operation: OperationEvent.Train.delTrainId.menu.operation,
val: this.addModel.groupNumber val: this.addModel.groupNumber
}; };
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { }).catch(() => {
this.loading = false; this.loading = false;
this.doClose(); this.doClose();
this.$refs.noticeInfo.doShow(operate); this.$refs.noticeInfo.doShow(operate);
}); });
} else { } else {
return false; return false;
} }
}); });
}, },
cancel() { cancel() {
const operate = { const operate = {
type: MapDeviceType.Train.type, type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation operation: OperationEvent.Command.cancel.menu.operation
}; };
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(() => { this.doClose(); }); }).catch(() => { this.doClose(); });
} }
} }
}; };
</script> </script>

View File

@ -1,160 +1,168 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-edit" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-edit"
<el-col :span="12">新车组号</el-col> :title="title"
</el-row> :visible.sync="show"
<el-row> width="360px"
<el-col :span="12"> :before-close="doClose"
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input> :z-index="2000"
</el-col> :modal="false"
</el-row> :close-on-click-modal="false"
<el-row> >
<el-col :span="12">车站</el-col> <el-row>
<el-col :span="11" :offset="1">车次窗</el-col> <el-col :span="12">新车组号</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input> <el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col> </el-col>
<el-col :span="11" :offset="1"> </el-row>
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input> <el-row>
</el-col> <el-col :span="12">车站</el-col>
</el-row> <el-col :span="11" :offset="1">车次窗</el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="10"> <el-row>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-col :span="12">
</el-col> <el-input v-model="addModel.stationName" :disabled="true" />
<el-col :span="8" :offset="5"> </el-col>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-col :span="11" :offset="1">
</el-col> <el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-row> </el-col>
<notice-info ref="noticeInfo"></notice-info> </el-row>
</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" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainEdit', name: 'TrainEdit',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
stationName: '', stationName: '',
trainWindowCode: '', trainWindowCode: '',
groupNumber: '', groupNumber: ''
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { dialogShow: false,
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : ''; loading: false
}, };
domIdCancel() { },
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; computed: {
}, ...mapGetters('map', [
domIdConfirm() { 'stationStandList'
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; ]),
}, show() {
title() { return this.dialogShow && !this.$store.state.menuOperation.break;
return '修改计划车'
}
}, },
mounted() { domIdInput() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdCancel() {
doShow(operate, selected) { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
this.selected = selected; },
// domIdConfirm() {
if (!this.dialogShow) { return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); },
if (section) { title() {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode); return '修改计划车';
if (station) { }
this.addModel.stationName = station.name; },
} 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.addModel.trainWindowCode = selected.code;
this.$nextTick(function () { }
this.$store.dispatch('training/emitTipFresh'); this.dialogShow = true;
}); this.$nextTick(function () {
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
inputGroupNumber() { this.loading = false;
let operate = { this.dialogShow = false;
type: MapDeviceType.Train.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Train.editTrainId.input.operation, this.$store.dispatch('map/setTrainWindowShow', false);
val: this.addModel.groupNumber this.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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
} }
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
@ -169,4 +177,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

View File

@ -1,139 +1,147 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-flag" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-flag"
<el-col :span="12">车组号:</el-col> :title="title"
</el-row> :visible.sync="show"
<el-row> width="320px"
<el-col :span="12"> :before-close="doClose"
<el-input v-model="addModel.groupNumber"></el-input> :z-index="2000"
</el-col> :modal="false"
</el-row> :close-on-click-modal="false"
<el-row style="margin-top: 15px; margin-bottom: 30px"> >
<el-col :span="24"> <el-row>
<el-radio-group v-model="addModel.type" :disabled="true"> <el-col :span="12">车组号:</el-col>
<el-radio label="01">备选项</el-radio> </el-row>
<el-radio label="02">备选项</el-radio> <el-row>
</el-radio-group> <el-col :span="12">
</el-col> <el-input v-model="addModel.groupNumber" />
</el-row> </el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="10"> <el-row style="margin-top: 15px; margin-bottom: 30px">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-col :span="24">
</el-col> <el-radio-group v-model="addModel.type" :disabled="true">
<el-col :span="8" :offset="5"> <el-radio label="01">备选项</el-radio>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-radio label="02">备选项</el-radio>
</el-col> </el-radio-group>
</el-row> </el-col>
<notice-info ref="noticeInfo"></notice-info> </el-row>
</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" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainFlag', name: 'TrainFlag',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
type: '01', type: '01',
groupNumber: '', groupNumber: ''
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdCancel() { dialogShow: false,
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; loading: false
}, };
domIdConfirm() { },
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; computed: {
}, ...mapGetters('map', [
title() { 'stationStandList'
return 'ATP切除功能' ]),
} show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
mounted() { domIdCancel() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdConfirm() {
doShow(operate, selected) { return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
this.selected = selected; },
// title() {
if (!this.dialogShow) { return 'ATP切除功能';
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); }
if (section) { },
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode); mounted() {
if (station) { this.$nextTick(() => {
this.addModel.stationName = station.name; 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.addModel.trainWindowCode = selected.code;
this.$nextTick(function () { }
this.$store.dispatch('training/emitTipFresh'); this.dialogShow = true;
}); this.$nextTick(function () {
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
commit() { this.loading = false;
let operate = { this.dialogShow = false;
send: true, this.$store.dispatch('training/emitTipFresh');
type: MapDeviceType.Train.type, this.$store.dispatch('map/setTrainWindowShow', false);
operation: OperationEvent.Train.editTrainId.menu.operation, this.mouseCancelState(this.selected);
val: this.addModel.tripNumber },
} commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
@ -148,4 +156,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

View File

@ -1,160 +1,168 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-move" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-move"
<el-col :span="12">车组号</el-col> :title="title"
</el-row> :visible.sync="show"
<el-row> width="360px"
<el-col :span="12"> :before-close="doClose"
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input> :z-index="2000"
</el-col> :modal="false"
</el-row> :close-on-click-modal="false"
<el-row> >
<el-col :span="12">车站</el-col> <el-row>
<el-col :span="11" :offset="1">车次窗</el-col> <el-col :span="12">车组号</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-input v-model="addModel.stationName" :disabled="true"></el-input> <el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col> </el-col>
<el-col :span="11" :offset="1"> </el-row>
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input> <el-row>
</el-col> <el-col :span="12">车站</el-col>
</el-row> <el-col :span="11" :offset="1">车次窗</el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="10"> <el-row>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-col :span="12">
</el-col> <el-input v-model="addModel.stationName" :disabled="true" />
<el-col :span="8" :offset="5"> </el-col>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-col :span="11" :offset="1">
</el-col> <el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-row> </el-col>
<notice-info ref="noticeInfo"></notice-info> </el-row>
</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" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainMove', name: 'TrainMove',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
stationName: '', stationName: '',
trainWindowCode: '', trainWindowCode: '',
groupNumber: '', groupNumber: ''
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { dialogShow: false,
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : ''; loading: false
}, };
domIdCancel() { },
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; computed: {
}, ...mapGetters('map', [
domIdConfirm() { 'stationStandList'
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : ''; ]),
}, show() {
title() { return this.dialogShow && !this.$store.state.menuOperation.break;
return '平移车组号'
}
}, },
mounted() { domIdInput() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdCancel() {
doShow(operate, selected) { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
this.selected = selected; },
// domIdConfirm() {
if (!this.dialogShow) { return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); },
if (section) { title() {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode); return '平移车组号';
if (station) { }
this.addModel.stationName = station.name; },
} 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.addModel.trainWindowCode = selected.code;
this.$nextTick(function () { }
this.$store.dispatch('training/emitTipFresh'); this.dialogShow = true;
}); this.$nextTick(function () {
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
inputGroupNumber() { this.loading = false;
let operate = { this.dialogShow = false;
type: MapDeviceType.Train.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Train.addTrainId.input.operation, this.$store.dispatch('map/setTrainWindowShow', false);
val: this.addModel.groupNumber this.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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.groupNumber
} }
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.groupNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {

View File

@ -1,160 +1,168 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-set-head" :title="title" :visible.sync="show" width="360px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-set-head"
<el-col :span="12">车组号</el-col> :title="title"
</el-row> :visible.sync="show"
<el-row> width="360px"
<el-col :span="12"> :before-close="doClose"
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input> :z-index="2000"
</el-col> :modal="false"
</el-row> :close-on-click-modal="false"
<el-row> >
<el-col :span="12">目的地号</el-col> <el-row>
<el-col :span="11" :offset="1">车次号</el-col> <el-col :span="12">车组号</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-input v-model="addModel.targetCode" :disabled="true"></el-input> <el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col> </el-col>
<el-col :span="11" :offset="1"> </el-row>
<el-input v-model="addModel.tripNumber" :disabled="true"></el-input> <el-row>
</el-col> <el-col :span="12">目的地号</el-col>
</el-row> <el-col :span="11" :offset="1">车次号</el-col>
<el-row justify="center" class="button-group"> </el-row>
<el-col :span="10"> <el-row>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-col :span="12">
</el-col> <el-input v-model="addModel.targetCode" :disabled="true" />
<el-col :span="8" :offset="5"> </el-col>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-col :span="11" :offset="1">
</el-col> <el-input v-model="addModel.tripNumber" :disabled="true" />
</el-row> </el-col>
<notice-info ref="noticeInfo"></notice-info> </el-row>
</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" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainSetHead', name: 'TrainSetHead',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
groupNumber: '', groupNumber: '',
targetCode: '', targetCode: '',
tripNumber: '', tripNumber: ''
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { dialogShow: false,
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : ''; loading: false
}, };
domIdCancel() { },
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; computed: {
}, ...mapGetters('map', [
domIdConfirm() { 'stationStandList'
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; ]),
}, show() {
title() { return this.dialogShow && !this.$store.state.menuOperation.break;
return '设置头码车'
}
}, },
mounted() { domIdInput() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdCancel() {
doShow(operate, selected) { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
this.selected = selected; },
// domIdConfirm() {
if (!this.dialogShow) { return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); },
if (section) { title() {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode); return '设置头码车';
if (station) { }
this.addModel.stationName = station.name; },
} 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.addModel.trainWindowCode = selected.code;
this.$nextTick(function () { }
this.$store.dispatch('training/emitTipFresh'); this.dialogShow = true;
}); this.$nextTick(function () {
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
inputGroupNumber() { this.loading = false;
let operate = { this.dialogShow = false;
type: MapDeviceType.Train.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Train.editTrainId.input.operation, this.$store.dispatch('map/setTrainWindowShow', false);
val: this.addModel.groupNumber this.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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
} }
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.groupNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
@ -169,4 +177,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

View File

@ -1,144 +1,152 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-set-plan" :title="title" :visible.sync="show" width="360px" :before-close="doClose" <el-dialog
:zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-set-plan"
<el-col :span="12">车组号</el-col> :title="title"
<el-col :span="11" :offset="1">车次号</el-col> :visible.sync="show"
</el-row> width="360px"
<el-row> :before-close="doClose"
<el-col :span="12"> :z-index="2000"
<el-input v-model="addModel.groupNumber"></el-input> :modal="false"
</el-col> :close-on-click-modal="false"
<el-col :span="11" :offset="1"> >
<el-input v-model="addModel.tripNumber" @change="inputGroupNumber" :id="domIdInput"></el-input> <el-row>
</el-col> <el-col :span="12">车组号</el-col>
</el-row> <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-row justify="center" class="button-group">
<el-col :span="10"> <el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> <el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col> </el-col>
<el-col :span="8" :offset="5"> <el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<notice-info ref="noticeInfo"></notice-info> <notice-info ref="noticeInfo" />
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainSetPlan', name: 'TrainSetPlan',
components: { components: {
NoticeInfo 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() { domIdInput() {
return { return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
trainNoList: [],
selected: null,
addModel: {
groupNumber: '',
tripNumber: '',
},
dialogShow: false,
loading: false,
}
}, },
computed: { domIdCancel() {
...mapGetters('map', [ return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
'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 '设置计划车'
}
}, },
mounted() { domIdConfirm() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { title() {
doShow(operate, selected) { return '设置计划车';
this.selected = selected; }
// },
if (!this.dialogShow) { mounted() {
} this.$nextTick(() => {
this.dialogShow = true; this.$store.dispatch('training/tipReload');
this.$nextTick(function () { });
this.$store.dispatch('training/emitTipFresh'); },
}); methods: {
}, doShow(operate, selected) {
doClose() { this.selected = selected;
this.loading = false; //
this.dialogShow = false; // if (!this.dialogShow) {
// }
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
inputGroupNumber() { this.loading = false;
let operate = { this.dialogShow = false;
type: MapDeviceType.Train.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Train.editTrainId.input.operation, this.$store.dispatch('map/setTrainWindowShow', false);
val: this.addModel.tripNumber this.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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
} }
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
@ -153,4 +161,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

View File

@ -1,144 +1,152 @@
<template> <template>
<el-dialog class="ningbo-01__systerm train-set-work" :title="title" :visible.sync="show" width="320px" <el-dialog
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag> v-dialogDrag
<el-row> class="ningbo-01__systerm train-set-work"
<el-col :span="6">车组号:</el-col> :title="title"
<el-col :span="18"> :visible.sync="show"
<el-input v-model="addModel.groupNumber" @change="inputGroupNumber" :id="domIdInput"></el-input> width="320px"
</el-col> :before-close="doClose"
</el-row> :z-index="2000"
<el-row justify="center" class="button-group"> :modal="false"
<el-col :span="10"> :close-on-click-modal="false"
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button> >
</el-col> <el-row>
<el-col :span="8" :offset="5"> <el-col :span="6">车组号:</el-col>
<el-button :id="domIdCancel" @click="cancel"> </el-button> <el-col :span="18">
</el-col> <el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-row> </el-col>
<notice-info ref="noticeInfo"></notice-info> </el-row>
</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" />
</el-dialog>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus'; import NoticeInfo from './childDialog/childDialog/noticeInfo';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
export default { export default {
name: 'TrainSetWork', name: 'TrainSetWork',
components: { components: {
NoticeInfo NoticeInfo
}, },
data() { data() {
return { return {
trainNoList: [], trainNoList: [],
selected: null, selected: null,
addModel: { addModel: {
groupNumber: '', groupNumber: ''
},
dialogShow: false,
loading: false,
}
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}, },
domIdInput() { dialogShow: false,
return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : ''; loading: false
}, };
domIdCancel() { },
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : ''; computed: {
}, ...mapGetters('map', [
domIdConfirm() { 'stationStandList'
return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : ''; ]),
}, show() {
title() { return this.dialogShow && !this.$store.state.menuOperation.break;
return '设置人工车'
}
}, },
mounted() { domIdInput() {
this.$nextTick(() => { return this.dialogShow ? OperationEvent.Train.editTrainId.input.domId : '';
this.$store.dispatch('training/tipReload');
})
}, },
methods: { domIdCancel() {
doShow(operate, selected) { return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
this.selected = selected; },
// domIdConfirm() {
if (!this.dialogShow) { return this.dialogShow ? OperationEvent.Train.editTrainId.menu.domId : '';
let section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode); },
if (section) { title() {
let station = this.$store.getters['map/getDeviceByCode'](section.stationCode); return '设置人工车';
if (station) { }
this.addModel.stationName = station.name; },
} 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.addModel.trainWindowCode = selected.code;
this.$nextTick(function () { }
this.$store.dispatch('training/emitTipFresh'); this.dialogShow = true;
}); this.$nextTick(function () {
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false); });
mouseCancelState(this.selected); },
}, doClose() {
inputGroupNumber() { this.loading = false;
let operate = { this.dialogShow = false;
type: MapDeviceType.Train.type, this.$store.dispatch('training/emitTipFresh');
operation: OperationEvent.Train.editTrainId.input.operation, this.$store.dispatch('map/setTrainWindowShow', false);
val: this.addModel.tripNumber this.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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
},
commit() {
let operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
} }
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
val: this.addModel.tripNumber
};
this.loading = true; this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false; this.loading = false;
if (valid) { if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose(); 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 }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.doClose(); this.doClose();
} }
}).catch(error => { this.doClose(); }); }).catch(() => { this.doClose(); });
}
} }
} }
};
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row { /deep/ .el-row {
@ -153,4 +161,4 @@
padding: 0 5px; padding: 0 5px;
background-color: #F0F0F0; background-color: #F0F0F0;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -11,7 +11,6 @@ import CancelAllLimit from './dialog/cancelAllLimit';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState } from './utils/menuItemStatus';
export default { export default {
name: 'MenuLimit', name: 'MenuLimit',
@ -40,7 +39,7 @@ export default {
{ {
label: '取消全线临时限速', label: '取消全线临时限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed, disabledCallback: '',
auth: { station: true, center: false } auth: { station: true, center: false }
} }
], ],
@ -48,7 +47,7 @@ export default {
{ {
label: '取消全线临时限速', label: '取消全线临时限速',
handler: this.cancelSpeed, handler: this.cancelSpeed,
disabledCallback: MenuDisabledState.Section.cancelSpeed, disabledCallback: '',
auth: { station: false, center: true } auth: { station: false, center: true }
} }
] ]

View File

@ -21,7 +21,6 @@ import TrainCreate from './dialog/trainCreate';
import AlxeEffective from './dialog/alxeEffective'; import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from './utils/menuItemStatus';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic'; import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
@ -166,7 +165,7 @@ export default {
} }
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -21,7 +21,6 @@ import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail'; import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mouseCancelState } from './utils/menuItemStatus';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler'; import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
@ -216,7 +215,7 @@ export default {
Signal_Code: `${this.selected.code}` Signal_Code: `${this.selected.code}`
} }
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -238,7 +237,7 @@ export default {
Signal_Code: `${this.selected.code}` Signal_Code: `${this.selected.code}`
} }
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -18,7 +18,6 @@ import { mapGetters } from 'vuex';
import { OperateMode } from '@/scripts/ConstDic'; import { OperateMode } from '@/scripts/ConstDic';
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic'; import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus'; import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
import { mouseCancelState } from './utils/menuItemStatus';
export default { export default {
name: 'StationMenu', name: 'StationMenu',
@ -169,7 +168,7 @@ export default {
operation: OperationEvent.Station.stoppage.menu.operation operation: OperationEvent.Station.stoppage.menu.operation
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -191,7 +190,7 @@ export default {
operation: OperationEvent.Station.cancelStoppage.menu.operation operation: OperationEvent.Station.cancelStoppage.menu.operation
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/next', operate).then(({ valid }) => { this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

View File

@ -21,7 +21,6 @@ import SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective'; import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo'; import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { mouseCancelState } from './utils/menuItemStatus';
import CMD from '@/scripts/cmdPlugin/CommandEnum'; import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -177,7 +176,7 @@ export default {
} }
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -199,7 +198,7 @@ export default {
} }
}; };
mouseCancelState(this.selected); this.mouseCancelState(this.selected);
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => { this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) { if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true }); this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,9 @@ import VueI18n from 'vue-i18n';
import store from './store'; import store from './store';
import router from './router'; import router from './router';
import CancelMouseState from '@/mixin/CancelMouseState.js';
Vue.mixin(CancelMouseState);
import '@/icons'; // icon import '@/icons'; // icon
import '@/permission'; // permission control import '@/permission'; // permission control

View File

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