Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
6570028b95
@ -451,7 +451,8 @@ class SkinCode extends defaultStyle {
|
|||||||
stroke: '#FFFFFF', // 框的颜色
|
stroke: '#FFFFFF', // 框的颜色
|
||||||
fill: 'rgba(0,0,0,0)', // 填充色
|
fill: 'rgba(0,0,0,0)', // 填充色
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||||
|
lightColor: '#FFFF00' // 控制灯亮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.AutomaticRoute] = {
|
this[deviceType.AutomaticRoute] = {
|
||||||
@ -465,7 +466,8 @@ class SkinCode extends defaultStyle {
|
|||||||
lamp: {
|
lamp: {
|
||||||
fill: 'rgba(0,0,0,0)', // 填充色
|
fill: 'rgba(0,0,0,0)', // 填充色
|
||||||
radiusR: 6, // 控制灯大小
|
radiusR: 6, // 控制灯大小
|
||||||
controlColor: '#b5b3b3' // 控制灯颜色 (灰色)
|
controlColor: '#b5b3b3', // 控制灯颜色 (灰色)
|
||||||
|
lightColor: '#FFFF00' // 控制灯亮颜色
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this[deviceType.AutoTurnBack] = {
|
this[deviceType.AutoTurnBack] = {
|
||||||
|
@ -331,6 +331,13 @@ class Jlmap {
|
|||||||
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态
|
if (elem.deviceType === 'ROUTE') { // 处理进路数据状态
|
||||||
store.dispatch('map/updateRouteState', elem);
|
store.dispatch('map/updateRouteState', elem);
|
||||||
const route = this.routeData[code];
|
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 signalDevice = this.mapDevice[route.startSignalCode];
|
||||||
const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode};
|
const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode};
|
||||||
if (this.hookHandle(signalDevice, signalStatus)) {
|
if (this.hookHandle(signalDevice, signalStatus)) {
|
||||||
@ -346,7 +353,6 @@ class Jlmap {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 状态后处理
|
// 状态后处理
|
||||||
|
@ -90,6 +90,11 @@ export default class AutomacticRoute extends Group {
|
|||||||
// 设置状态
|
// 设置状态
|
||||||
setState(model) {
|
setState(model) {
|
||||||
if (!this.isShowShape) return;
|
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() {
|
createMouseEvent() {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
>
|
>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<template v-for="message in messages">
|
<template v-for="message in messages">
|
||||||
<span>{{ message }}</span>
|
<span :key="message">{{ message }}</span>
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -29,7 +29,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from './childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
|
||||||
@ -52,24 +52,8 @@ export default {
|
|||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '进路设置';
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
return '信号关灯';
|
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 {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@ -79,36 +63,14 @@ export default {
|
|||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 进路设置*/
|
|
||||||
return OperationEvent.Signal.arrangementRoute.confirm.domId;
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
return OperationEvent.Signal.signalClose.confirm.domId;
|
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 {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -137,55 +99,11 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
if (this.operation === OperationEvent.Signal.arrangementRoute.menu.operation) {
|
if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 进路设置*/
|
|
||||||
this.routeSetting();
|
|
||||||
} else if (this.operation === OperationEvent.Signal.signalClose.menu.operation) {
|
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
this.signalClose();
|
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() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -206,149 +124,6 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate, [error.message]);
|
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() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: this.operate.type,
|
type: this.operate.type,
|
||||||
|
@ -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>
|
|
@ -36,7 +36,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { 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';
|
||||||
@ -66,7 +68,7 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.close.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
if (this.operation == OperationEvent.Signal.cancelTrainRoute.menu.operation) {
|
||||||
@ -126,13 +128,6 @@ export default {
|
|||||||
// 取消列车进路
|
// 取消列车进路
|
||||||
cancelTrainRoute() {
|
cancelTrainRoute() {
|
||||||
this.cancelTrainRouteFunc();
|
this.cancelTrainRouteFunc();
|
||||||
// if (this.$store.state.training.prdType == '01') {
|
|
||||||
// /** 现地工作站*/
|
|
||||||
// this.cancelTrainRouteFunc();
|
|
||||||
// } else if (this.$store.state.training.prdType == '02') {
|
|
||||||
// /** 行调工作站*/
|
|
||||||
// this.cancelTrainRouteFunc();
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
cancelTrainRouteFunc() {
|
cancelTrainRouteFunc() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -195,10 +190,8 @@ export default {
|
|||||||
// 取消
|
// 取消
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.close.menu.operation
|
operation: OperationEvent.Command.close.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -69,7 +69,6 @@
|
|||||||
<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" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@ -77,8 +76,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent, getDomIdByOperation } from '@/scripts/ConstDic';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import ConfirmControl from './childDialog/confirmControl';
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -86,7 +85,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
export default {
|
export default {
|
||||||
name: 'RouteHandControl',
|
name: 'RouteHandControl',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -124,10 +122,12 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operation) : '';
|
return this.dialogShow ? OperationHandler.getDomIdByOperation(this.operation) : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
|
||||||
@ -241,23 +241,12 @@ export default {
|
|||||||
this.commitDisabled = true;
|
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) {
|
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,
|
|
||||||
operation: '',
|
operation: '',
|
||||||
val: this.serializeCodeListWithSeparator('::'),
|
|
||||||
selection: selection
|
selection: selection
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -334,7 +323,6 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
|
||||||
operation: OperationEvent.Command.cancel.menu.operation
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@
|
|||||||
<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> -->
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -64,7 +63,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
// import ConfirmControl from './childDialog/confirmControl';
|
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
import { deepAssign } from '@/utils/index';
|
import { deepAssign } from '@/utils/index';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -72,7 +70,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
export default {
|
export default {
|
||||||
name: 'RouteSelection',
|
name: 'RouteSelection',
|
||||||
components: {
|
components: {
|
||||||
// ConfirmControl,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
@ -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>
|
|
@ -1,47 +1,69 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="beijing-01__systerm stand-run-level" :title="title" :visible.sync="show" width="500px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
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-row class="header">
|
||||||
<el-col :span="10"><span>集中站</span></el-col>
|
<el-col :span="10"><span>集中站</span></el-col>
|
||||||
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
<el-col :span="10" :offset="2"><span>站台</span></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-input v-model="stationName" size="small" disabled></el-input>
|
<el-input v-model="stationName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" :offset="2">
|
<el-col :span="10" :offset="2">
|
||||||
<el-input v-model="standName" size="small" disabled></el-input>
|
<el-input v-model="standName" size="small" disabled />
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>站台状态</span>
|
<span>站台状态</span>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
<el-table ref="tempData" :data="tempData" border style="width: 100%; height: 170px;" size="mini">
|
||||||
<el-table-column prop="name" :width="180" label="下一站台">
|
<el-table-column prop="name" :width="180" label="下一站台" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="level" label="运行等级">
|
<el-table-column prop="level" label="运行等级">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.level" size="mini" @change="levelSelectChange(scope.row)"
|
<el-select
|
||||||
:id='chooseLevelId'>
|
:id="chooseLevelId"
|
||||||
<el-option v-for="item in levelList" :key="item.value" :label="item.label"
|
v-model="scope.row.level"
|
||||||
:value="item.value">
|
size="mini"
|
||||||
</el-option>
|
@change="levelSelectChange(scope.row)"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in levelList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="time" label="区间运行时间">
|
<el-table-column prop="time" label="区间运行时间">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-select v-model="scope.row.time" size="mini" @change="timeSelectChange"
|
<el-select
|
||||||
:disabled="scope.row.level == 0" :id='domIdChoose'>
|
:id="domIdChoose"
|
||||||
<el-option v-for="item in timeList[scope.row.level]" :key="item.value" :label="item.label"
|
v-model="scope.row.time"
|
||||||
:value="item.value">
|
size="mini"
|
||||||
</el-option>
|
:disabled="scope.row.level == 0"
|
||||||
|
@change="timeSelectChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in timeList[scope.row.level]"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="check" label="一直有效">
|
<el-table-column prop="check" label="一直有效">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox ref="check" v-model="scope.row.check" @change="checkChange" :id='domIdCheck'>
|
<el-checkbox :id="domIdCheck" ref="check" v-model="scope.row.check" @change="checkChange" />
|
||||||
</el-checkbox>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -59,22 +81,21 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl"></confirm-control>
|
<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 { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
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';
|
||||||
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandRunLevel',
|
name: 'StandRunLevel',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -89,29 +110,29 @@ export default {
|
|||||||
levelList: [
|
levelList: [
|
||||||
{
|
{
|
||||||
value: '0',
|
value: '0',
|
||||||
label: '自动',
|
label: '自动'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
label: '1',
|
label: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
label: '2',
|
label: '2'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: '3',
|
label: '3'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '4',
|
value: '4',
|
||||||
label: '4',
|
label: '4'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
isSelect: true,
|
isSelect: true,
|
||||||
isConfirm: false,
|
isConfirm: false,
|
||||||
time: ''
|
time: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// 深度数据状态
|
// 深度数据状态
|
||||||
@ -149,24 +170,24 @@ export default {
|
|||||||
return '设置运行等级';
|
return '设置运行等级';
|
||||||
},
|
},
|
||||||
timeList() {
|
timeList() {
|
||||||
let list = {
|
const list = {
|
||||||
'0': [{ value: 0, label: '0' }],
|
'0': [{ value: 0, label: '0' }],
|
||||||
'1': [], // 120 - 110
|
'1': [], // 120 - 110
|
||||||
'2': [], // 100 - 90
|
'2': [], // 100 - 90
|
||||||
'3': [], // 80 - 70
|
'3': [], // 80 - 70
|
||||||
'4': [], // 60 - 50
|
'4': [] // 60 - 50
|
||||||
}
|
};
|
||||||
for (var i = 110; i <= 120; i++) {
|
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++) {
|
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++) {
|
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++) {
|
for (var i = 50; i <= 60; i++) {
|
||||||
list['4'].push({ value: i, label: `${i}` })
|
list['4'].push({ value: i, label: `${i}` });
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -174,7 +195,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getLevelByTime(time) {
|
getLevelByTime(time) {
|
||||||
@ -186,20 +207,20 @@ export default {
|
|||||||
},
|
},
|
||||||
loadInitData(selected, opts) {
|
loadInitData(selected, opts) {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
let stationList = this.stationList.slice();
|
const stationList = this.stationList.slice();
|
||||||
let index = this.stationList.findIndex(n => n.code == selected.stationCode)
|
const index = this.stationList.findIndex(n => n.code == selected.stationCode);
|
||||||
if (selected.direction == '01') { // 下行
|
if (selected.direction == '01') { // 下行
|
||||||
// 下行时,此站不是最后一站
|
// 下行时,此站不是最后一站
|
||||||
if (index != 0) {
|
if (index != 0) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 上行时,此站不是最后一站
|
// 上行时,此站不是最后一站
|
||||||
if (index != this.stationList.length) {
|
if (index != this.stationList.length) {
|
||||||
let stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
const stationStand = this.$store.getters['map/getDeviceByCode'](this.stationStandList[index + 1].code);
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stationStand.stationCode);
|
||||||
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
this.tempData.push({ name: `${stationStand.name}(${station.name})`, level: this.getLevelByTime(opts.intervalRunTime), time: opts.intervalRunTime ? opts.intervalRunTime : 0, check: opts.intervalRunTimeValidStatus });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -212,7 +233,7 @@ export default {
|
|||||||
this.stationName = '';
|
this.stationName = '';
|
||||||
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
if (selected && selected._type.toUpperCase() === 'StationStand'.toUpperCase()) {
|
||||||
this.standName = selected.name;
|
this.standName = selected.name;
|
||||||
let station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](selected.stationCode);
|
||||||
if (station) {
|
if (station) {
|
||||||
this.stationName = station.name;
|
this.stationName = station.name;
|
||||||
}
|
}
|
||||||
@ -226,16 +247,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkTableDataSelction(data) {
|
checkTableDataSelction(data) {
|
||||||
let selection = [];
|
const selection = [];
|
||||||
if (data && data.length > 0) {
|
if (data && data.length > 0) {
|
||||||
data.forEach(row => {
|
data.forEach(row => {
|
||||||
if (row.check && !row.disabled) {
|
if (row.check && !row.disabled) {
|
||||||
selection.push(row);
|
selection.push(row);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.disabledSend = selection.length ? false : true;
|
this.disabledSend = !selection.length;
|
||||||
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
if (JSON.stringify(selection) !== JSON.stringify(this.selection)) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
}
|
}
|
||||||
@ -243,7 +264,7 @@ export default {
|
|||||||
timeSelectChange(time) {
|
timeSelectChange(time) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
operation: OperationEvent.StationStand.setRunLevel.choose.operation,
|
||||||
val: time.toString(),
|
val: time.toString()
|
||||||
};
|
};
|
||||||
|
|
||||||
this.time = time.toString();
|
this.time = time.toString();
|
||||||
@ -253,13 +274,13 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
levelSelectChange(row) {
|
levelSelectChange(row) {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.StationStand.setRunLevel.chooseLevel.operation,
|
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.time = row.time = this.timeList[row.level][0].value;
|
||||||
this.isSelect = false;
|
this.isSelect = false;
|
||||||
@ -305,8 +326,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -319,7 +339,7 @@ export default {
|
|||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
const operate = {
|
const operate = {
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
@ -331,5 +351,5 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -61,14 +61,12 @@
|
|||||||
<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" />
|
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
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';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
@ -76,7 +74,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
|||||||
export default {
|
export default {
|
||||||
name: 'StandStopTime',
|
name: 'StandStopTime',
|
||||||
components: {
|
components: {
|
||||||
ConfirmControl,
|
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -229,8 +226,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
// this.$refs.confirmControl.doShow(operate);
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -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>
|
|
@ -3,8 +3,6 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
|
||||||
<train-create ref="trainCreate" />
|
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</div>
|
</div>
|
||||||
@ -13,9 +11,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from './dialog/sectionControl';
|
import SectionControl from './dialog/sectionControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
import SpeedLimitControl from './dialog/speedLimitControl';
|
||||||
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';
|
||||||
@ -31,8 +27,6 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
SectionControl,
|
SectionControl,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
SpeedCmdControl,
|
|
||||||
TrainCreate,
|
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
@ -49,31 +43,6 @@ export default {
|
|||||||
menu: [],
|
menu: [],
|
||||||
menuNormal: {
|
menuNormal: {
|
||||||
Local: [
|
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: [
|
Center: [
|
||||||
{
|
{
|
||||||
@ -101,13 +70,6 @@ export default {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
menuTrain: [
|
|
||||||
{
|
|
||||||
label: '新建列车',
|
|
||||||
handler: this.newTrain
|
|
||||||
// disabledCallback: MenuDisabledState.Section.newTrain
|
|
||||||
}
|
|
||||||
],
|
|
||||||
menuForce: [
|
menuForce: [
|
||||||
// {
|
// {
|
||||||
// label: '设置计轴失效',
|
// label: '设置计轴失效',
|
||||||
@ -333,41 +295,6 @@ export default {
|
|||||||
this.$refs.speedLimitControl.doShow(operate, this.selected);
|
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<route-selection ref="routeSelection" />
|
<route-selection ref="routeSelection" />
|
||||||
<route-control ref="routeControl" />
|
<route-control ref="routeControl" />
|
||||||
<route-cmd-control ref="routeCmdControl" />
|
|
||||||
<route-hand-control ref="routeHandControl" />
|
<route-hand-control ref="routeHandControl" />
|
||||||
<route-detail ref="routeDetail" />
|
<route-detail ref="routeDetail" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -15,7 +14,6 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import RouteControl from './dialog/routeControl';
|
import RouteControl from './dialog/routeControl';
|
||||||
import RouteSelection from './dialog/routeSelection';
|
import RouteSelection from './dialog/routeSelection';
|
||||||
import RouteCmdControl from './dialog/routeCmdControl';
|
|
||||||
import RouteHandControl from './dialog/routeHandControl';
|
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';
|
||||||
@ -34,7 +32,6 @@ export default {
|
|||||||
PopMenu,
|
PopMenu,
|
||||||
RouteControl,
|
RouteControl,
|
||||||
RouteSelection,
|
RouteSelection,
|
||||||
RouteCmdControl,
|
|
||||||
RouteHandControl,
|
RouteHandControl,
|
||||||
RouteDetail,
|
RouteDetail,
|
||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<pop-menu ref="popMenu" :menu="menu" />
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<section-control ref="sectionControl" />
|
<section-control ref="sectionControl" />
|
||||||
<switch-control ref="switchControl" />
|
<switch-control ref="switchControl" />
|
||||||
<speed-cmd-control ref="speedCmdControl" />
|
|
||||||
<speed-limit-control ref="speedLimitControl" />
|
<speed-limit-control ref="speedLimitControl" />
|
||||||
<alxe-effective ref="alxeEffective" />
|
<alxe-effective ref="alxeEffective" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
@ -14,7 +13,6 @@
|
|||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import SectionControl from './dialog/sectionControl';
|
import SectionControl from './dialog/sectionControl';
|
||||||
import SwitchControl from './dialog/switchControl';
|
import SwitchControl from './dialog/switchControl';
|
||||||
import SpeedCmdControl from './dialog/speedCmdControl';
|
|
||||||
import SpeedLimitControl from './dialog/speedLimitControl';
|
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';
|
||||||
@ -33,7 +31,6 @@ export default {
|
|||||||
SectionControl,
|
SectionControl,
|
||||||
SwitchControl,
|
SwitchControl,
|
||||||
SpeedLimitControl,
|
SpeedLimitControl,
|
||||||
SpeedCmdControl,
|
|
||||||
AlxeEffective,
|
AlxeEffective,
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
},
|
},
|
||||||
@ -334,25 +331,6 @@ export default {
|
|||||||
this.$refs.noticeInfo.doShow(operate, error.message);
|
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() {
|
split() {
|
||||||
|
@ -513,18 +513,18 @@ export default {
|
|||||||
cmdType: '',
|
cmdType: '',
|
||||||
param: {}
|
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.cmdType = CMD.Switch.CMD_SWITCH_BLOCK;
|
||||||
operate.param = {SwitchCode: model.code};
|
operate.param = {switchCode: model.code};
|
||||||
} else if (model.type === 'Switch' && buttonOperation === this.MixinCommand.unblock.button.operation) {
|
} else if (model._type === 'Switch' && buttonOperation === this.MixinCommand.unblock.button.operation) {
|
||||||
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
operate.cmdType = CMD.Switch.CMD_SWITCH_UNBLOCK;
|
||||||
operate.param = {SwitchCode: model.code};
|
operate.param = {switchCode: model.code};
|
||||||
} else if (model.type === 'Signal' && buttonOperation === this.MixinCommand.block.button.operation) {
|
} else if (model._type === 'Signal' && buttonOperation === this.MixinCommand.block.button.operation) {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_BLOCK;
|
||||||
operate.param = {SignalCode: model.code};
|
operate.param = {signalCode: model.code};
|
||||||
} else if (model.type === 'Signal' && buttonOperation === this.MixinCommand.unblock.button.operation) {
|
} else if (model._type === 'Signal' && buttonOperation === this.MixinCommand.unblock.button.operation) {
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_UNBLOCK;
|
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.$store.dispatch('training/nextNew', operate).then(({valid, response}) => {}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
|
@ -667,6 +667,9 @@ const map = {
|
|||||||
routeDataList.forEach(data => {
|
routeDataList.forEach(data => {
|
||||||
state.routeData[data.code] = data;
|
state.routeData[data.code] = data;
|
||||||
});
|
});
|
||||||
|
state.map.automaticRouteButtonList.forEach(item => {
|
||||||
|
state.routeData[item.automaticRouteCode].automaticRouteCode = item.code;
|
||||||
|
});
|
||||||
state.routeList = routeDataList;
|
state.routeList = routeDataList;
|
||||||
},
|
},
|
||||||
setAutoReentryData: (state, autoReentryList) => {
|
setAutoReentryData: (state, autoReentryList) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user