This commit is contained in:
zyy 2020-03-19 10:52:54 +08:00
commit 6570028b95
17 changed files with 168 additions and 1973 deletions

View File

@ -451,7 +451,8 @@ class SkinCode extends defaultStyle {
stroke: '#FFFFFF', // 框的颜色
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightColor: '#FFFF00' // 控制灯亮颜色
}
};
this[deviceType.AutomaticRoute] = {
@ -465,7 +466,8 @@ class SkinCode extends defaultStyle {
lamp: {
fill: 'rgba(0,0,0,0)', // 填充色
radiusR: 6, // 控制灯大小
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
lightColor: '#FFFF00' // 控制灯亮颜色
}
};
this[deviceType.AutoTurnBack] = {

View File

@ -331,6 +331,13 @@ class Jlmap {
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态
store.dispatch('map/updateRouteState', elem);
const route = this.routeData[code];
if (route.automaticRouteCode) {
const automaticRoute = this.mapDevice[route.automaticRouteCode];
const automaticRouteStatus = {fleetMode: elem.fleetMode};
if (this.hookHandle(automaticRoute, automaticRouteStatus)) {
this.$painter.update(automaticRoute);
}
}
const signalDevice = this.mapDevice[route.startSignalCode];
const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode};
if (this.hookHandle(signalDevice, signalStatus)) {
@ -346,7 +353,6 @@ class Jlmap {
// }
}
}
});
// 状态后处理

View File

@ -90,6 +90,11 @@ export default class AutomacticRoute extends Group {
// 设置状态
setState(model) {
if (!this.isShowShape) return;
if (this.model.fleetMode) {
this.control && this.control.setStyle('fill', this.style.AutomaticRoute.lamp.lightColor);
} else {
this.control && this.control.setStyle('fill', this.style.AutomaticRoute.lamp.controlColor);
}
}
createMouseEvent() {

View File

@ -13,7 +13,7 @@
>
<div class="context">
<template v-for="message in messages">
<span>{{ message }}</span>
<span :key="message">{{ message }}</span>
</template>
</div>
<el-row justify="center" class="button-group">
@ -29,7 +29,7 @@
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from './childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -52,24 +52,8 @@ export default {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
return '进路设置';
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
return '信号重开';
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
return '取消进路';
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
return '进路交人工控';
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交ATS自动控';
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
return '设置运行等级';
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
return '停站时间';
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
return '设置折返策略';
} else {
return '';
}
@ -79,36 +63,14 @@ export default {
},
domIdConfirm() {
if (this.dialogShow) {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
return OperationEvent.Signal.arrangementRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
return OperationEvent.Signal.signalClose.confirm.domId;
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
return OperationEvent.Signal.reopenSignal.confirm.domId;
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
return OperationEvent.Signal.cancelTrainRoute.confirm.domId;
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
return OperationEvent.Signal.humanControl.confirm.domId;
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
return OperationEvent.Signal.atsAutoControl.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
return OperationEvent.StationStand.setRunLevel.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 设置停战时间*/
return OperationEvent.StationStand.setStopTime.confirm.domId;
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
return OperationEvent.StationStand.setBackStrategy.confirm.domId;
} else {
return '';
}
} else {
return '';
}
}
},
@ -137,55 +99,11 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
/** 进路设置*/
this.routeSetting();
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
} else if (this.operation === OperationEvent.Signal.reopenSignal.menu.operation) {
/** 信号重开*/
this.reopenSignal();
} else if (this.operation === OperationEvent.Signal.cancelTrainRoute.menu.operation) {
/** 取消进路*/
this.cancelTrainRoute();
} else if (this.operation === OperationEvent.Signal.humanControl.menu.operation) {
/** 进路交人工控*/
this.humanControl();
} else if (this.operation === OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交ATS自动控*/
this.atsAutoControl();
} else if (this.operation === OperationEvent.StationStand.setRunLevel.menu.operation) {
/** 设置运行等级*/
this.setRunLevel();
} else if (this.operation === OperationEvent.StationStand.setStopTime.menu.operation) {
/** 停站时间*/
this.setStopTime();
} else if (this.operation === OperationEvent.StationStand.setBackStrategy.menu.operation) {
/** 设置折返策略*/
this.setBackStrategy();
}
},
//
routeSetting() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.arrangementRoute.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
signalClose() {
const operate = {
@ -206,149 +124,6 @@ export default {
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
reopenSignal() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.reopenSignal.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
cancelTrainRoute() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
humanControl() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
// ATS
atsAutoControl() {
const operate = {
send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
setRunLevel() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setRunLevel.confirm.operation,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
setStopTime() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setStopTime.confirm.operation,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
//
setBackStrategy() {
const operate = {
send: true,
type: this.operate.type,
operation: OperationEvent.StationStand.setBackStrategy.confirm.operation,
val: this.operate.val
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate, [error.message]);
});
},
cancel() {
const operate = {
type: this.operate.type,

View File

@ -1,439 +0,0 @@
<template>
<div>
<el-dialog v-dialogDrag class="beijing-01__systerm route-cmd-control" :title="title" :visible.sync="show" width="800px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<span class="base-label">命令信息</span>
<el-form label-position="center" size="mini">
<el-row>
<el-col :span="8">
<el-form-item label="类型" label-width="40px">
<el-select v-model="operation" size="small" disabled>
<el-option
v-for="option in typeList"
:key="option.code"
:label="option.name"
:value="option.code"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车站名称" label-width="80px">
<el-input v-model="stationName" size="small" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="信号机名称" label-width="100px">
<el-input v-model="signalName" size="small" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
ref="tempData"
class="table"
:data="tempData"
border
style="width: 100%"
size="mini"
highlight-current-row
height="200"
>
<el-table-column prop="order" :width="50" label="序号" />
<el-table-column prop="date" :width="160" label="时间" />
<el-table-column prop="context" :width="180" label="执行过程" />
<el-table-column prop="result" label="执行结果" />
</el-table>
<span class="notice">{{ message }}</span>
<el-row class="button-group">
<el-col :span="2" :offset="2">
<el-button :id="domIdCommand" type="primary" :disabled="cmdDisabled[0]" @click="command">下达<span
v-show="timeCountCommand>0"
>({{ timeCountCommand }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm1" type="primary" :disabled="cmdDisabled[1]" @click="confirm1">确认1
</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdConfirm2" type="primary" :disabled="cmdDisabled[2]" @click="confirm2">确认2<span
v-show="timeCountConfirm>0"
>({{ timeCountConfirm }})</span></el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdStop" type="primary" :disabled="stpDisabled" @click="stop">中止</el-button>
</el-col>
<el-col :span="2" :offset="2">
<el-button :id="domIdClose" @click="close">关闭</el-button>
</el-col>
</el-row>
</el-dialog>
<confirm-signal-unlock ref="confirmSignalUnlock" @setOperate="getOperate" />
</div>
</template>
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { now } from '@/utils/date';
import ConfirmSignalUnlock from './childDialog/confirmSignalUnlock';
export default {
name: 'RouteCmdControl',
components: {
ConfirmSignalUnlock
},
data() {
return {
dialogShow: false,
backOperate: '',
selected: '',
order: 0,
row: null,
timer: null,
operation: '',
cmdDisabled: [true, true, true],
stpDisabled: true,
tempData: [],
message: '',
timeCountCommand: -1,
timeCountConfirm: -1,
stationName: '',
signalName: ''
};
},
computed: {
typeList() {
return [
{ code: OperationEvent.Signal.unlock.menu.operation, name: '信号解封' },
{ code: OperationEvent.Signal.guide.menu.operation, name: '办理引导进路' }
];
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCommand() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.order.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.order.domId;
}
}
},
domIdConfirm1() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm1.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm1.domId;
}
}
},
domIdConfirm2() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.confirm2.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.confirm2.domId;
}
}
},
domIdStop() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
return OperationEvent.Signal.unlock.stop.domId;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
return OperationEvent.Signal.guide.stop.domId;
}
}
},
domIdClose() {
if (this.dialogShow) {
return OperationEvent.Command.close.menu.domId;
}
},
title() {
if (this.dialogShow) {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
return '办理引导进路';
}
}
}
},
watch: {
cmdDisabled: {
handler(val, oldVal) {
this.stpDisabled = true;
val.forEach((elem, index) => {
// 1
if (elem == false && index >= 1 && index <= 2) {
this.stpDisabled = false;
}
});
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.timer = setInterval(() => {
if (!this.$store.state.menuOperation.break) {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) {
this.setButtonEnable({ step: 0 });
this.timeCountConfirm = -1;
}
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
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;
}
}
this.order = 0;
this.operation = operate.operation;
this.tempData = [];
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.cmdDisabled = [false, true, true];
}
this.dialogShow = true;
this.stpDisabled = true;
this.setMessage('请点击“下达”按钮,下达命令!');
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
command() {
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 第一步带弹框处理*/
this.commandHasPopUp();
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 第一步不带弹框处理*/
this.commandNoPopUp();
}
},
commandHasPopUp() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
this.$refs.confirmSignalUnlock.doShow(operate, this.selected);
}
}
});
},
commandNoPopUp() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.order.operation;
}
this.setMessage('请点击“确认1”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击下达命令', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 1 });
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '执行异常' });
});
},
confirm1() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm1.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm1.operation;
}
this.setMessage('请点击“确认2”按钮确认命令');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认1', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountCommand = -1;
this.timeCountConfirm = 10;
this.setButtonEnable({ step: 2 });
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行失败' });
}
}).catch(() => {
this.editRecord({ order: this.order, date: now(), context: '点击确认1', result: '执行异常' });
});
},
confirm2() {
const operate = {
send: true,
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.confirm2.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.confirm2.operation;
}
this.setMessage('');
this.writeRecord({ order: ++this.order, date: now(), context: '点击确认2', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行失败' });
}
}).catch(() => {
this.timeCountCommand = -1;
this.timeCountConfirm = -1;
this.setButtonEnable({ step: -1 });
this.editRecord({ order: this.order, date: now(), context: '点击确认2', result: '执行异常' });
});
},
stop() {
const operate = {
type: MapDeviceType.Signal.type
};
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
operate.operation = OperationEvent.Signal.unlock.stop.operation;
} else if (this.operation == OperationEvent.Signal.guide.menu.operation) {
/** 办理引导进路*/
operate.operation = OperationEvent.Signal.guide.stop.operation;
}
this.writeRecord({ order: ++this.order, date: now(), context: '点击终止', result: '' });
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.setButtonEnable({ step: 0 });
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行失败' });
}
}).catch(error => {
this.editRecord({ order: this.order, date: now(), context: '点击终止', result: '执行异常' });
});
},
close() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
},
getOperate(operate) {
/** 弹框返回值处理*/
if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.backOperate = operate;
this.setButtonEnable(operate);
if (operate.success) {
this.timeCountCommand = 30;
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '确认成功' });
} else {
this.editRecord({ order: this.order, date: now(), context: '点击下达命令', result: '取消成功' });
}
}
},
setButtonEnable(param) {
this.cmdDisabled = [true, true, true];
if (param && param.step >= 0) {
this.cmdDisabled[param.step] = false;
}
},
setMessage(message) {
this.message = message;
},
writeRecord(param) {
this.tempData.push(param);
},
editRecord(param) {
this.tempData.forEach(elem => {
if (elem.order == param.order) {
for (var prop in param) {
elem[prop] = param[prop];
}
}
});
}
}
};
</script>

View File

@ -36,7 +36,9 @@
</template>
<script>
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
// import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
@ -66,7 +68,7 @@ export default {
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
@ -126,13 +128,6 @@ export default {
//
cancelTrainRoute() {
this.cancelTrainRouteFunc();
// if (this.$store.state.training.prdType == '01') {
// /** */
// this.cancelTrainRouteFunc();
// } else if (this.$store.state.training.prdType == '02') {
// /** */
// this.cancelTrainRouteFunc();
// }
},
cancelTrainRouteFunc() {
const operate = {
@ -195,10 +190,8 @@ export default {
//
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.close.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();

View File

@ -69,7 +69,6 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</div>
@ -77,8 +76,8 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
import ConfirmControl from './childDialog/confirmControl';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -86,7 +85,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteHandControl',
components: {
ConfirmControl,
NoticeInfo
},
data() {
@ -124,10 +122,12 @@ export default {
} else {
return '';
}
} else {
return '';
}
},
domIdConfirm() {
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
},
title() {
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
@ -241,23 +241,12 @@ export default {
this.commitDisabled = true;
}
},
serializeCodeListWithSeparator(sep) {
const codeList = [];
if (this.selection && this.selection.length) {
this.selection.forEach(elem => {
codeList.push(elem.code);
});
}
return codeList.join(sep);
},
handleChooseChange(selection) {
this.selection = selection;
if (selection && selection.length) {
const operate = {
repeat: true,
type: MapDeviceType.Signal.type,
operation: '',
val: this.serializeCodeListWithSeparator('::'),
selection: selection
};
@ -334,7 +323,6 @@ export default {
},
cancel() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Command.cancel.menu.operation
};

View File

@ -56,7 +56,6 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<!-- <confirm-control ref="confirmControl"></confirm-control> -->
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -64,7 +63,6 @@
<script>
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
// import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { deepAssign } from '@/utils/index';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -72,7 +70,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'RouteSelection',
components: {
// ConfirmControl,
NoticeInfo
},
data() {

View File

@ -1,898 +0,0 @@
<template>
<div>
<el-dialog
v-dialogDrag
class="beijing-01__systerm section-cmd-speed"
:title="title"
:visible.sync="show"
width="800px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px 2px; margin-bottom: 25px; border: 1px solid lightgray;">
<span class="base-label">会话管理</span>
<el-form label-position="center" size="mini" style="margin-top: -15px;">
<el-row>
<el-col :span="3">
<el-button type="primary" style="width: 110px; line-height: 26px;" @click="commit">查询会话状态
</el-button>
</el-col>
<el-col :span="11" :offset="1">
<el-input v-model="dialogueStatus" size="mini" disabled />
</el-col>
<el-col :span="3" :offset="1">
<el-button
:id="openConversationId"
type="primary"
style="width: 110px; line-height: 26px;"
:disabled="!isOpenMessage"
@click="openMessage('open')"
>打开会话
</el-button>
</el-col>
<el-col :span="3" :offset="1">
<el-button
:id="closeConversationId"
type="primary"
style="width: 110px; line-height: 26px;"
:disabled="isOpenMessage"
@click="openMessage('close')"
>关闭会话
</el-button>
</el-col>
</el-row>
</el-form>
</div>
<div style="margin-bottom: 15px;">
<el-row>
<el-col :span="15">
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
<div style="float: left; width: 20%; padding: 25px 8px 0;">
<div style="margin-bottom: 5px;">限速数值</div>
<el-select
:id="firstLimitSpeedId"
v-model="firstScetion.speed"
size="mini"
:disabled="spdDisabled"
placeholder=""
@change="changeSelect(firstScetion.speed, '1')"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">起点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="firstStartSectionId"
v-model="firstScetion.startSection"
size="mini"
:disabled="spdDisabled"
placeholder=""
@change="changeSelect(firstScetion.startSection, '2')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
<el-input
:id="firstStartvalueId"
v-model="firstScetion.startValue"
:min="0"
size="mini"
:disabled="spdDisabled"
@blur="changeSelect(firstScetion.startValue, '3')"
/>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">终点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="firstEndSectionId"
v-model="firstScetion.endSection"
size="mini"
:disabled="spdDisabled"
placeholder=""
@change="changeSelect(firstScetion.endSection, '4')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
<el-input
:id="firstEndvalueId"
v-model="firstScetion.endValue"
:min="0"
size="mini"
:disabled="spdDisabled"
@blur="changeSelect(firstScetion.endValue, '5')"
/>
</div>
<div style="float: left; width: 20%; padding:8px;">
<el-button
:id="firstCheckId"
type="primary"
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
:disabled="spdDisabled"
@click="CheckEquipment"
>查看设备
</el-button>
<el-button
:id="firstComfirmId"
type="primary"
style="width: 90px; margin: 0; line-height: 26px;"
:disabled="firstDisabled"
@click="Confirmed"
>首次确认
</el-button>
</div>
</div>
</el-col>
<el-col :span="9">
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表</span>
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
<div v-for="(item,i) in equipmentText" :key="i">
{{ item.name }}: {{ item.text }}
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<div style="margin-bottom: 15px;">
<el-row>
<el-col :span="15">
<div style="padding: 12px 8px 8px; height: 170px; border: 1px solid lightgray;">
<div style="float: left; width: 20%; padding: 25px 8px 0;">
<div style="margin-bottom: 5px;">限速数值</div>
<el-select
:id="secondLimitSpeedId"
v-model="secondScetion.speed"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.speed, '6')"
>
<el-option
v-for="item in speedList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">起点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="secondStartSectionId"
v-model="secondScetion.startSection"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.startSection, '7')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px;margin-top: 5px;">公里标数值(m)</div>
<el-select
:id="secondStartvalueId"
v-model="secondScetion.startValue"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.startValue, '8')"
>
<el-option
v-for="item in startSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div
style="float: left; width: 29%; margin-left: 1%; border: 1px solid lightgray; padding:8px;"
>
<span class="base-label" style="left: 0px;">终点</span>
<div style="margin-bottom: 5px;">区间选择</div>
<el-select
:id="secondEndSectionId"
v-model="secondScetion.endSection"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.endSection, '9')"
>
<el-option
v-for="item in regionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<div style="margin-bottom: 5px; margin-top: 5px;">公里标数值(m)</div>
<el-select
:id="secondEndvalueId"
v-model="secondScetion.endValue"
size="mini"
:disabled="stpDisabled"
placeholder=""
@change="changeSelect(secondScetion.endValue, '10')"
>
<el-option
v-for="item in endSectionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
<div style="float: left; width: 20%; padding:8px;">
<el-button
:id="secondCheckId"
type="primary"
style="width: 90px; margin: 18px 0 20px; line-height: 26px;"
@click="CheckSecondEquipment"
>查看设备
</el-button>
<el-button
:id="secondComfirmId"
type="primary"
style="width: 90px; margin: 0; line-height: 26px;"
:disabled="secondDisabled"
@click="confirm"
>确认发送
</el-button>
</div>
</div>
</el-col>
<el-col :span="9">
<div style="padding: 8px; height: 170px; border: 1px solid lightgray; margin-left: 10px;">
<span class="base-label" style="left: 4px; background: #f0f0f0;">设备列表</span>
<div style="height: 100%; margin-top: -14px; border: 2px inset #E9E9E9; overflow-y: auto">
<div v-for="(item,i) in equipmentText1" :key="i">
{{ item.name }}: {{ item.text }}
</div>
</div>
</div>
</el-col>
</el-row>
</div>
<el-row>
<el-col :span="5">
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">操作倒计时</div>
<div style="border: 2px inset #E9E9E9; height: 30px; width: 45px;float: left;">
{{ timeCountConfirm == -1 ? '' : timeCountConfirm }}</div>
</el-col>
<el-col :span="19">
<div style="float: left; height: 30px; line-height: 30px; margin-right:10px;">状态</div>
<div style="border: 2px inset #E9E9E9; height: 30px; width: calc(100% - 38px);float: left;">
{{ messageStatus }}</div>
</el-col>
</el-row>
<el-row class="button-group">
<el-button :id="domIdClose" style="margin: 0px auto; display: block;" @click="close">关闭</el-button>
</el-row>
</el-dialog>
<confirm-tip ref="ConfirmTip" @close="closeMessage" />
</div>
</template>
<script>
import { OperationEvent } from '@/scripts/ConstDic';
// import { mouseCancelState } from '../utils/menuItemStatus';
// import { now } from '@/utils/date';
import ConfirmTip from './childDialog/confirmTip';
import { sendCommand } from '@/api/jmap/training';
import router from '@/router';
export default {
name: 'SectionCmdSpeed',
components: {
ConfirmTip
},
data() {
return {
dialogShow: false,
selected: '',
order: 0,
code: '',
row: null,
timer: null,
type: '',
operation: '',
spdDisabled: true,
firstDisabled: true,
secondDisabled: true,
stpDisabled: true,
timeCountCommand: -1,
timeCountConfirm: -1,
equipmentText: [],
equipmentText1: [],
maxSpeed: 85,
speedSpace: 5,
stationName: '111',
name: '',
speed: '',
regionList: [],
startSectionList: [],
endSectionList: [],
sectionList: [
{
value: 'up',
name: '上行'
},
{
value: 'down',
name: '下行'
}
],
messageStatus: '请先打开会话!',
dialogueStatus: '会话已关闭',
isOpenMessage: true,
codeText: '',
firstScetion: {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
},
firstShow: false,
copyScetion: {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
},
secondScetion: {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
}
};
},
computed: {
speedList() {
const list = [{ value: -1, name: '无限速' }];
for (var i = 5; i * this.speedSpace <= this.maxSpeed; i++) {
list.push({ value: String(i * this.speedSpace), name: String(i * this.speedSpace) });
}
return list;
},
title() {
return this.dialogShow ? '公里标输入临时限速' : '';
},
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
openConversationId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.openConversation.domId : '';
},
closeConversationId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.closeConversation.domId : '';
},
firstLimitSpeedId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstLimitSpeed.domId : '';
},
firstStartSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartSection.domId : '';
},
firstStartvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstStartvalue.domId : '';
},
firstEndSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndSection.domId : '';
},
firstEndvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstEndvalue.domId : '';
},
firstCheckId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstCheck.domId : '';
},
firstComfirmId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.firstComfirm.domId : '';
},
secondLimitSpeedId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondLimitSpeed.domId : '';
},
secondStartSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartSection.domId : '';
},
secondStartvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondStartvalue.domId : '';
},
secondEndSectionId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndSection.domId : '';
},
secondEndvalueId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondEndvalue.domId : '';
},
secondCheckId() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.secondCheck.domId : '';
},
secondComfirmId() {
return this.dialogShow ? OperationEvent.Section.confirmLimit.menu.domId : '';
},
domIdClose() {
return this.dialogShow ? OperationEvent.Section.setLimitSpeed.domIdClose.domId : '';
}
},
watch: {
'timeCountCommand': function (val) {
if (val <= 0) {
this.dialogueStatus = `会话已关闭`;
// this.openMessage('close');
this.isOpenMessage = true;
this.spdDisabled = true;
this.firstDisabled = true;
this.secondDisabled = true;
this.messageStatus = '请先打开会话!';
this.timeCountCommand = -1;
if (this.speed) {
this.messageStatus = '会话关闭成功';
}
this.equipmentText = [];
this.equipmentText1 = [];
this.firstScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.secondScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
} else {
this.dialogueStatus = `会话打开,剩余时间${val}`;
}
},
firstScetion: {
handler: function (val) {
if (val.speed && val.startSection && val.endSection && val.startValue != '' && val.endValue != '') {
this.firstShow = true;
} else {
this.firstShow = false;
}
},
deep: true
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
this.regionList = this.$ConstSelect.RegionTypeList;
this.timer = setInterval(() => {
if (this.timeCountCommand > 0) {
this.timeCountCommand--;
} else if (this.timeCountCommand == 0) { //
this.isOpenMessage = true;
this.timeCountCommand = -1;
}
if (this.timeCountConfirm > 0) {
this.timeCountConfirm--;
} else if (this.timeCountConfirm == 0) { //
this.timeCountConfirm = -1;
}
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer);
this.timer = null;
},
methods: {
doShow(operate, selected, tempData) {
this.selected = selected;
if (!this.dialogShow) {
this.name = '';
if (selected) {
this.timeCountCommand = -1; //
this.order = 0;
this.type = operate.type;
this.operation = operate.operation;
this.code = operate.code;
}
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.secondScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.firstScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.speed = 0;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
// mouseCancelState(this.selected);
},
openMessage(state) {
if (state == 'open') { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.openConversation.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = false;
this.spdDisabled = false;
this.messageStatus = '会话打开成功';
this.speed = 1;
this.timeCountCommand = 120;
}
}).catch(error => {
console.log(error);
});
} else { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.closeConversation.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.isOpenMessage = true;
this.spdDisabled = true;
this.firstDisabled = true;
this.secondDisabled = true;
this.messageStatus = '请先打开会话!';
this.timeCountCommand = -1;
this.startSectionList = [];
this.endSectionList = [];
if (this.speed) {
this.messageStatus = '会话关闭成功';
}
}
}).catch(error => {
console.log(error);
});
}
},
CheckEquipment() { //
if (this.firstShow) {
const value = `${this.firstScetion.speed}::${this.firstScetion.startSection}::${this.firstScetion.startValue}::${this.firstScetion.endSection}::${this.firstScetion.endValue}`;
const operate = {
send: true,
val: value,
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.firstCheck.operation
};
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.firstDisabled = false; //
this.getEquipmentList(response.data);
this.copyScetion = {
speed: this.firstScetion.speed,
startSection: this.firstScetion.startSection,
endSection: this.firstScetion.endSection,
startValue: this.firstScetion.startValue,
endValue: this.firstScetion.endValue
};
this.startSectionList = [];
this.endSectionList = [];
for (let index = 0; index < 4; index++) {
const starData = {
value: Number(this.firstScetion.startValue) + index,
label: Number(this.firstScetion.startValue) + index
};
this.startSectionList.push(starData);
const endData = {
value: Number(this.firstScetion.endValue) + index,
label: Number(this.firstScetion.endValue) + index
};
this.endSectionList.push(endData);
}
}
}).catch(error => {
console.log(error);
});
}
},
getEquipmentList(list) {
this.equipmentText = [];
const stationStand = [];
const stationText = [];
this.codeText = '';
const arr = [];
list.forEach(ele => {
if (stationStand.indexOf(ele.stationCode) == -1) {
stationStand.push(ele.stationCode);
const text = this.getTextName(ele);
stationText.push(text);
} else {
const index = stationStand.indexOf(ele.stationCode);
const text = this.getTextName(ele);
stationText[index] += text;
}
arr.push(ele.code);
});
this.codeText = arr.join('::');
stationStand.forEach((item, index) => {
const stationStandName = this.$store.getters['map/getDeviceByCode'](item);
const data = {
text: stationText[index],
name: stationStandName.name
};
this.equipmentText.push(data);
});
},
getTextName(ele) {
if (ele.switchSectionType) {
switch (ele.switchSectionType) {
case '01':
return `${ele.name}(主), `;
case '02':
return `${ele.name}(定), `;
case '03':
return `${ele.name}(反), `;
}
} else if (ele.parentName) {
return `${ele.parentName}-${ele.name}, `;
} else {
return `${ele.name}, `;
}
return '';
},
CheckSecondEquipment() { //
if (this.secondScetion.speed == this.copyScetion.speed && this.secondScetion.startSection == this.copyScetion.startSection && this.secondScetion.endSection == this.copyScetion.endSection && this.secondScetion.startValue == this.copyScetion.startValue && this.secondScetion.endValue == this.copyScetion.endValue) {
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.secondCheck.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.equipmentText1 = this.equipmentText;
this.secondDisabled = false; //
}
}).catch(error => {
console.log(error);
});
} else {
this.firstScetion = {
speed: this.copyScetion.speed,
startSection: this.copyScetion.startSection,
endSection: this.copyScetion.endSection,
startValue: this.copyScetion.startValue,
endValue: this.copyScetion.endValue
};
this.firstDisabled = true;
this.secondScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '',
endValue: ''
};
this.spdDisabled = false;
this.equipmentText = [];
this.stpDisabled = true;
this.timeCountConfirm = -1;
const operate = {
message: `两次值不一致`
};
this.$refs.ConfirmTip.doShow(operate);
}
},
changeSelect(value, val) {
const operate = {
type: this.type,
operation: '',
val: value
};
switch (val) {
case '1':
operate.operation = OperationEvent.Section.setLimitSpeed.firstLimitSpeed.operation;
break;
case '2':
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartSection.operation;
break;
case '3':
operate.operation = OperationEvent.Section.setLimitSpeed.firstStartvalue.operation;
break;
case '4':
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndSection.operation;
break;
case '5':
operate.operation = OperationEvent.Section.setLimitSpeed.firstEndvalue.operation;
break;
case '6':
operate.operation = OperationEvent.Section.setLimitSpeed.secondLimitSpeed.operation;
break;
case '7':
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartSection.operation;
break;
case '8':
operate.operation = OperationEvent.Section.setLimitSpeed.secondStartvalue.operation;
break;
case '9':
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndSection.operation;
break;
case '10':
operate.operation = OperationEvent.Section.setLimitSpeed.secondEndvalue.operation;
break;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(error => {
console.log(error);
});
},
Confirmed() { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.firstComfirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.spdDisabled = true;
this.stpDisabled = false;
this.firstDisabled = true;
this.messageStatus = '收到Confirm request消息';
this.timeCountConfirm = 60; //
this.firstScetion = {
speed: '',
startSection: '',
endSection: '',
startValue: '***',
endValue: '***'
};
}
}).catch(error => {
console.log(error);
});
},
confirm() { //
// let value = `${this.secondScetion.speed}::${this.codeText}`;
const value = `${this.secondScetion.speed}::${this.secondScetion.startSection}::${this.secondScetion.startValue}::${this.secondScetion.endSection}::${this.secondScetion.endValue}`;
const operate = {
send: true,
val: value,
type: this.type,
code: this.code,
operation: OperationEvent.Section.confirmLimit.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
const group = router.currentRoute.query.group;
const command = this.handleMenuConfirmLimit(operate);
sendCommand(group, command).then((response) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.timeCountConfirm = -1;
this.stpDisabled = true;
this.messageStatus = '临时限速设置成功';
}).catch(error => {
const operate = {
message: error.message
};
this.$refs.ConfirmTip.doShow(operate);
console.log(error);
});
}
}).catch(error => {
const operate = {
message: error.message
};
this.$refs.ConfirmTip.doShow(operate);
console.log(error);
});
},
close() { //
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.domIdClose.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (this.isOpenMessage) {
this.doClose();
} else {
const operate = {
message: `是否关闭会话,并关闭窗口`,
confirmId: OperationEvent.Section.setLimitSpeed.close.domId
};
this.$refs.ConfirmTip.doShow(operate);
}
}
}).catch(() => {
this.doClose();
});
},
commit() {
},
closeMessage() {
const operate = {
type: this.type,
operation: OperationEvent.Section.setLimitSpeed.close.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.ConfirmTip.doClose();
this.isOpenMessage = true;
this.spdDisabled = true;
this.firstDisabled = true;
this.secondDisabled = true;
this.timeCountCommand = -1;
this.startSectionList = [];
this.endSectionList = [];
this.doClose();
}).catch(error => {
console.log(error);
});
},
//
handleMenuConfirmLimit(operate) {
return {
type: operate.type,
code: operate.code,
over: true,
operation: OperationEvent.Section.confirmLimit.event,
val: operate.val
};
}
}
};
</script>

View File

@ -1,80 +1,101 @@
<template>
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled></el-input>
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled></el-input>
</el-col>
</el-row>
<div class="table">
<span>站台状态</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="180" label="下一站台">
</el-table-column>
<el-table-column prop="level" label="运行等级">
<template slot-scope="scope">
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)"
:id='chooseLevelId'>
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="time" label="区间运行时间">
<template slot-scope="scope">
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange"
:disabled="scope.row.level == 0" :id='domIdChoose'>
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" label="一直有效">
<template slot-scope="scope">
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
</el-checkbox>
</template>
</el-table-column>
</el-table>
</div>
<!-- <el-row class="button-group">
<el-dialog
v-dialogDrag
class="beijing-01__systerm stand-run-level"
:title="title"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row class="header">
<el-col :span="10"><span>集中站</span></el-col>
<el-col :span="10" :offset="2"><span>站台</span></el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-input v-model="stationName" size="small" disabled />
</el-col>
<el-col :span="10" :offset="2">
<el-input v-model="standName" size="small" disabled />
</el-col>
</el-row>
<div class="table">
<span>站台状态</span>
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
<el-table-column prop="name" :width="180" label="下一站台" />
<el-table-column prop="level" label="运行等级">
<template slot-scope="scope">
<el-select
:id="chooseLevelId"
v-model="scope.row.level"
size="mini"
@change="levelSelectChange(scope.row)"
>
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="time" label="区间运行时间">
<template slot-scope="scope">
<el-select
:id="domIdChoose"
v-model="scope.row.time"
size="mini"
:disabled="scope.row.level == 0"
@change="timeSelectChange"
>
<el-option
v-for="item in timeList[scope.row.level]"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
<el-table-column prop="check" label="一直有效">
<template slot-scope="scope">
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
</template>
</el-table-column>
</el-table>
</div>
<!-- <el-row class="button-group">
<span v-if="isSelect && tempData.length">提示: 未选中要设置运行等级的下一站台</span>
<span v-if="isConfirm && tempData.length">提示: 选中要设置运行等级的下一站台为{{tempData[0].name}}</span>
</el-row> -->
<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"></confirm-control>
</el-dialog>
<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>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
// import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'StandRunLevel',
components: {
ConfirmControl
NoticeInfo
},
data() {
return {
@ -89,32 +110,32 @@ export default {
levelList: [
{
value: '0',
label: '自动',
label: '自动'
},
{
value: '1',
label: '1',
label: '1'
},
{
value: '2',
label: '2',
label: '2'
},
{
value: '3',
label: '3',
label: '3'
},
{
value: '4',
label: '4',
},
label: '4'
}
],
isSelect: true,
isConfirm: false,
time: ''
}
};
},
watch: {
//
//
tempData: {
handler(val, oldVal) {
this.checkTableDataSelction(val);
@ -149,24 +170,24 @@ export default {
return '设置运行等级';
},
timeList() {
let list = {
const list = {
'0': [{ value: 0, label: '0' }],
'1': [], // 120 - 110
'2': [], // 100 - 90
'3': [], // 80 - 70
'4': [], // 60 - 50
}
'1': [], // 120 - 110
'2': [], // 100 - 90
'3': [], // 80 - 70
'4': [] // 60 - 50
};
for (var i = 110; i <= 120; i++) {
list['1'].push({ value: i, label: `${i}` })
list['1'].push({ value: i, label: `${i}` });
}
for (var i = 90; i <= 100; i++) {
list['2'].push({ value: i, label: `${i}` })
list['2'].push({ value: i, label: `${i}` });
}
for (var i = 70; i <= 80; i++) {
list['3'].push({ value: i, label: `${i}` })
list['3'].push({ value: i, label: `${i}` });
}
for (var i = 50; i <= 60; i++) {
list['4'].push({ value: i, label: `${i}` })
list['4'].push({ value: i, label: `${i}` });
}
return list;
}
@ -174,7 +195,7 @@ export default {
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
getLevelByTime(time) {
@ -186,33 +207,33 @@ export default {
},
loadInitData(selected, opts) {
this.tempData = [];
let stationList = this.stationList.slice();
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
if (selected.direction == '01') { //
//
const stationList = this.stationList.slice();
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
if (selected.direction == '01') { //
//
if (index != 0) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
} else {
//
//
if (index != this.stationList.length) {
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
}
}
},
doShow(operate, selected, opts) {
this.selected = selected;
//
//
if (!this.dialogShow) {
this.standName = '';
this.stationName = '';
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
this.standName = selected.name;
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
if (station) {
this.stationName = station.name;
}
@ -226,16 +247,16 @@ export default {
});
},
checkTableDataSelction(data) {
let selection = [];
const selection = [];
if (data && data.length > 0) {
data.forEach(row => {
if (row.check && !row.disabled) {
selection.push(row);
}
})
});
}
this.disabledSend = selection.length ? false : true;
this.disabledSend = !selection.length;
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
this.selection = selection;
}
@ -243,7 +264,7 @@ export default {
timeSelectChange(time) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
val: time.toString(),
val: time.toString()
};
this.time = time.toString();
@ -253,13 +274,13 @@ export default {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
})
});
},
levelSelectChange(row) {
const operate = {
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
val: row.level.toString(),
}
val: row.level.toString()
};
this.time = row.time = this.timeList[row.level][0].value;
this.isSelect = false;
@ -305,8 +326,7 @@ export default {
this.loading = false;
if (valid) {
this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmControl.doShow(operate);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.loading = false;
@ -319,7 +339,7 @@ export default {
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
@ -331,5 +351,5 @@ export default {
});
}
}
}
</script>
};
</script>

View File

@ -61,14 +61,12 @@
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mouseCancelState } from '../utils/menuItemStatus';
import ConfirmControl from './childDialog/confirmControl';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
@ -76,7 +74,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
name: 'StandStopTime',
components: {
ConfirmControl,
NoticeInfo
},
data() {
@ -229,8 +226,7 @@ export default {
this.loading = false;
if (valid) {
this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmControl.doShow(operate);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.loading = false;

View File

@ -1,155 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="beijing-01__systerm route-create"
:title="title"
:visible.sync="show"
width="580px"
label-position="top"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item label="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item label="列车方向:" prop="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
</el-form-item>
</el-form>
<el-row>
<el-col style="text-align: right;">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'RouteCreate',
components: {
NoticeInfo
},
data() {
return {
dialogShow: false,
loading: false,
trainList: [],
trainNoList: [],
directionList: [
{
value: '2',
label: '上行'
},
{
value: '1',
label: '下行'
}
],
trainCode: '',
tripNumber: '',
direction: '',
selected: null
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return OperationEvent.Section.newtrain.menu.domId;
},
title() {
return '设置列车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
loadInitData(map) {
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
/** 加载列车数据*/
this.loadInitData(this.map);
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.trainCode = '';
this.direction = '';
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.newtrain.menu.operation,
val: '' + this.direction + '::' + this.trainCode
};
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() {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
this.doClose();
});
}
}
};
</script>

View File

@ -3,8 +3,6 @@
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<speed-limit-control ref="speedLimitControl" />
<speed-cmd-control ref="speedCmdControl" />
<train-create ref="trainCreate" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
</div>
@ -13,9 +11,7 @@
<script>
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import SpeedLimitControl from './dialog/speedLimitControl';
import TrainCreate from './dialog/trainCreate';
import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
@ -31,8 +27,6 @@ export default {
PopMenu,
SectionControl,
SpeedLimitControl,
SpeedCmdControl,
TrainCreate,
AlxeEffective,
NoticeInfo
},
@ -49,31 +43,6 @@ export default {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.faultUnlock,
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
// },
// {
// label: '',
// handler: this.active,
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
// },
// {
// label: '',
// handler: this.split,
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
// },
// {
// label: '',
// handler: this.axlePreReset,
// cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
// },
// {
// label: '',
// handler: this.setSpeed,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
// }
],
Center: [
{
@ -101,13 +70,6 @@ export default {
}
]
},
menuTrain: [
{
label: '新建列车',
handler: this.newTrain
// disabledCallback: MenuDisabledState.Section.newTrain
}
],
menuForce: [
// {
// label: '',
@ -333,41 +295,6 @@ export default {
this.$refs.speedLimitControl.doShow(operate, this.selected);
}
});
},
//
// cancelSpeed() {
// let operate = {
// start: true,
// send: true,
// code: this.selected.code,
// type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.cancelSpeed.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
// if (valid) {
// let tempData = response.data;
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
// }
// });
// },
//
newTrain() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Section.newtrain.menu.operation,
param: {
sectionCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainCreate.doShow(operate, this.selected);
}
});
}
}
};

View File

@ -3,7 +3,6 @@
<pop-menu ref="popMenu" :menu="menu" />
<route-selection ref="routeSelection" />
<route-control ref="routeControl" />
<route-cmd-control ref="routeCmdControl" />
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" />
@ -15,7 +14,6 @@
import PopMenu from '@/components/PopMenu';
import RouteControl from './dialog/routeControl';
import RouteSelection from './dialog/routeSelection';
import RouteCmdControl from './dialog/routeCmdControl';
import RouteHandControl from './dialog/routeHandControl';
import RouteDetail from './dialog/routeDetail';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
@ -34,7 +32,6 @@ export default {
PopMenu,
RouteControl,
RouteSelection,
RouteCmdControl,
RouteHandControl,
RouteDetail,
NoticeInfo,

View File

@ -3,7 +3,6 @@
<pop-menu ref="popMenu" :menu="menu" />
<section-control ref="sectionControl" />
<switch-control ref="switchControl" />
<speed-cmd-control ref="speedCmdControl" />
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
@ -14,7 +13,6 @@
import PopMenu from '@/components/PopMenu';
import SectionControl from './dialog/sectionControl';
import SwitchControl from './dialog/switchControl';
import SpeedCmdControl from './dialog/speedCmdControl';
import SpeedLimitControl from './dialog/speedLimitControl';
import AlxeEffective from './dialog/alxeEffective';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
@ -33,7 +31,6 @@ export default {
SectionControl,
SwitchControl,
SpeedLimitControl,
SpeedCmdControl,
AlxeEffective,
NoticeInfo
},
@ -334,25 +331,6 @@ export default {
this.$refs.noticeInfo.doShow(operate, error.message);
});
},
//
// cancelSpeed() {
// const operate = {
// start: true,
// send: true,
// code: this.selected.code,
// operation: OperationEvent.Switch.cancelSpeed.menu.operation,
// param: {
// switchCode: `${this.selected.code}`
// }
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
// if (valid) {
// const tempData = response.data;
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
// }
// });
// },
//
split() {

View File

@ -513,18 +513,18 @@ export default {
cmdType: '',
param: {}
};
if (model.type === 'Switch' && buttonOperation === this.MixinCommand.block.button.operation) {
if (model._type === 'Switch' && buttonOperation === this.MixinCommand.block.button.operation) {
operate.cmdType = CMD.Switch.CMD_SWITCH_BLOCK;
operate.param = {SwitchCode: model.code};
} else if (model.type === 'Switch' && buttonOperation === this.MixinCommand.unblock.button.operation) {
operate.param = {switchCode: model.code};
} else if (model._type === 'Switch' && buttonOperation === this.MixinCommand.unblock.button.operation) {
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
operate.param = {SwitchCode: model.code};
} else if (model.type === 'Signal' && buttonOperation === this.MixinCommand.block.button.operation) {
operate.param = {switchCode: model.code};
} else if (model._type === 'Signal' && buttonOperation === this.MixinCommand.block.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
operate.param = {SignalCode: model.code};
} else if (model.type === 'Signal' && buttonOperation === this.MixinCommand.unblock.button.operation) {
operate.param = {signalCode: model.code};
} else if (model._type === 'Signal' && buttonOperation === this.MixinCommand.unblock.button.operation) {
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
operate.param = {SignalCode: model.code};
operate.param = {signalCode: model.code};
}
this.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => {
this.$refs.noticeInfo.doShow(operate);

View File

@ -667,6 +667,9 @@ const map = {
routeDataList.forEach(data => {
state.routeData[data.code] = data;
});
state.map.automaticRouteButtonList.forEach(item => {
state.routeData[item.automaticRouteCode].automaticRouteCode = item.code;
});
state.routeList = routeDataList;
},
setAutoReentryData: (state, autoReentryList) => {