加载时刻表
This commit is contained in:
parent
666e85dec6
commit
01fdc0ef22
@ -3,7 +3,7 @@
|
||||
<div v-if="isLocal" id="menuButton">
|
||||
<div class="__menuButton">
|
||||
<el-row>
|
||||
<el-col v-if="!trainOperationShow" :span="11">
|
||||
<el-col v-if="operationType === 'cmd'" :span="11">
|
||||
<div v-if="secondConfirm" class="nav-border">
|
||||
<el-row>
|
||||
<div class="nav-border-top">
|
||||
@ -42,7 +42,7 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-if="!trainOperationShow" :span="10">
|
||||
<el-col v-if="operationType === 'cmd'" :span="10">
|
||||
<div class="nav-border">
|
||||
<div class="nav-border-top">
|
||||
<el-button :id="commandId" class="fl" :class="{'disabled': !isLogin||canCommand||secondConfirm}" style="line-height: 18px; margin-top: 4px;" plain :disabled="!isLogin||canCommand||secondConfirm" @click="interceptLogin(command)()">执行</el-button>
|
||||
@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-if="trainOperationShow" :span="10" style="padding: 1px;">
|
||||
<el-col v-if="operationType === 'train'" :span="10" style="padding: 1px;">
|
||||
<div class="nav-border" style="padding: 5px;">
|
||||
<el-row style="height: 25px;">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
@ -79,7 +79,7 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-if="trainOperationShow" :span="5" style="padding: 1px;">
|
||||
<el-col v-if="operationType === 'train'" :span="5" style="padding: 1px;">
|
||||
<div class="nav-border" style="padding: 5px;">
|
||||
<el-row style="display: flex;align-items: center;">
|
||||
<el-col :span="7" style="height: 25px;line-height: 25px;">车次号</el-col>
|
||||
@ -115,7 +115,7 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-if="trainOperationShow" :span="6" style="padding: 1px;">
|
||||
<el-col v-if="operationType === 'train'" :span="6" style="padding: 1px;">
|
||||
<div class="nav-border">
|
||||
<div style="display: flex;justify-content: space-around;width: 100%;height: 45px;align-items: center;border-bottom: 2px solid #FBFBFA;">
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!trainCommitDisabled" @click="trainCommit">执 行</el-button>
|
||||
@ -123,11 +123,41 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-if="operationType === 'run'" :span="15" style="padding: 1px;">
|
||||
<div class="nav-border" style="font-size: 14px;">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<div style="border: 1px solid #c0c0c0;margin: 10px;padding: 0 10px 5px 10px;">
|
||||
<div style="position: relative;top: -8px;left: -5px;background: #fff;width: 81px;">所有时刻表</div>
|
||||
<el-select v-model="newRunPlanId" style="width: 140px;" placeholder="请选择" size="mini">
|
||||
<el-option
|
||||
v-for="item in runPlanList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div style="border: 1px solid #c0c0c0;margin: 10px;padding: 0 10px 5px 10px;">
|
||||
<div style="position: relative;top: -8px;left: -5px;background: #fff;width: 81px;">当前时刻表</div>
|
||||
<div class="moni_input" style="width: 140px;">{{ runPlanName }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-button style="line-height: 18px; width: 100px; margin-left: 20px;" plain :disabled="!newRunPlanId" @click="handleClickLoadRunPlan">加载</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin-right: 20px;" plain @click="changeShowMode('cmd')">退出</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col v-if="operationType === 'run'" :span="6" style="padding: 1px;">
|
||||
<div class="nav-border" style="padding-top: 10px;">
|
||||
<span style="font-size: 14px;color: #000;">{{ `TIP端加载时刻表,内部号为${runPlanName}` }}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div class="nav-border flex-box">
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(false)">联锁操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin">时刻表操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)(true)">ATS操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)('cmd')">联锁操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)('run')">时刻表操作</el-button>
|
||||
<el-button style="line-height: 18px; width: 100px; margin: 0;" plain :disabled="!isLogin" @click="interceptLogin(changeShowMode)('train')">ATS操作</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -248,6 +278,8 @@ import { EventBus } from '@/scripts/event-bus';
|
||||
import * as adapter from '@/jmapNew/utils/adapter';
|
||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||
import BanIcon from '@/assets/ban-heb.png';
|
||||
import { queryRunPlanList } from '@/api/runplan';
|
||||
import { simulationLoadRunPlan } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@ -278,6 +310,8 @@ export default {
|
||||
oldDevice: null, // 上一次点击元素
|
||||
canCommand: true,
|
||||
cr1Confrim: false,
|
||||
runPlanList: [],
|
||||
newRunPlanId: '',
|
||||
operate: '',
|
||||
cmdType: '',
|
||||
securityCommand: '',
|
||||
@ -306,7 +340,7 @@ export default {
|
||||
commandInfo: {},
|
||||
banIcon: BanIcon,
|
||||
timer: null,
|
||||
trainOperationShow: false,
|
||||
operationType: 'cmd',
|
||||
trainModel: {},
|
||||
formModelTripNum: '',
|
||||
formModelSectionName: '',
|
||||
@ -377,6 +411,9 @@ export default {
|
||||
menuPosition() {
|
||||
return this.$store.state.menuOperation.menuPosition;
|
||||
},
|
||||
runPlanName() {
|
||||
return this.$store.state.runPlan.runPlanInfo.name;
|
||||
},
|
||||
trainCommitDisabled() {
|
||||
return (this.trainOperateType === 'create' && this.formModelNewTrip && this.formModelNewTrip.length === 7 && this.formModelNewGroup && this.formModelNewGroup.length === 6) ||
|
||||
(this.trainOperateType === 'update' && this.formModelNewTrip && this.formModelNewTrip.length === 7) || (this.trainOperateType === 'delete') ||
|
||||
@ -385,7 +422,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
'$store.state.training.prdType': function (val) {
|
||||
this.trainOperationShow = false;
|
||||
this.operationType = 'cmd';
|
||||
this.initMenus();
|
||||
},
|
||||
'$store.state.training.started':function (val) {
|
||||
@ -467,6 +504,15 @@ export default {
|
||||
this.param = {};
|
||||
this.initMenus();
|
||||
this.handleBasicMenu();
|
||||
queryRunPlanList(this.$route.query.mapId).then(resp =>{
|
||||
if (resp.data && resp.data.length) {
|
||||
resp.data.forEach(item => {
|
||||
this.runPlanList.push(item);
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('获取地图模板运行图列表失败!');
|
||||
});
|
||||
EventBus.$on('sendMsg', ({message = ''}) => {
|
||||
this.tempData = [{name: message}];
|
||||
});
|
||||
@ -543,7 +589,7 @@ export default {
|
||||
}
|
||||
break;
|
||||
case 'Section':
|
||||
if (this.trainOperationShow) {
|
||||
if (this.operationType === 'train') {
|
||||
this.handleTrainParam();
|
||||
} else {
|
||||
this.handleSectionMenu();
|
||||
@ -561,6 +607,13 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
handleClickLoadRunPlan(row) {
|
||||
simulationLoadRunPlan(this.$route.query.group, this.newRunPlanId).then(response => {
|
||||
this.$message.success('仿真加载指定运行计划成功!');
|
||||
}).catch(() => {
|
||||
this.$message.error('仿真加载指定运行计划失败!');
|
||||
});
|
||||
},
|
||||
handleIbpShow() {
|
||||
if (this.selectedObj._type == 'StationStand' && this.$store.state.menuOperation.subType == 'StationPlatform') {
|
||||
if (!(this.selectedObj.assignSkip || this.selectedObj.allSkip || this.selectedObj.centerHoldTrain || this.selectedObj.stationHoldTrain)) {
|
||||
@ -971,7 +1024,7 @@ export default {
|
||||
},
|
||||
doClose() {
|
||||
this.deviceHighLight(this.oldDevice, false); // 当前选中
|
||||
this.changeShowMode(false);
|
||||
this.changeShowMode('cmd');
|
||||
this.operate = ''; // 清空指令
|
||||
this.cmdType = '';
|
||||
this.securityCommand = '';
|
||||
@ -1020,7 +1073,7 @@ export default {
|
||||
this.tempData.push(el);
|
||||
});
|
||||
},
|
||||
changeShowMode(flag) {
|
||||
changeShowMode(type) {
|
||||
if (this.$store.state.training.prdType === '01') {
|
||||
this.trainModel = {};
|
||||
this.formModelTripNum = '';
|
||||
@ -1028,7 +1081,7 @@ export default {
|
||||
this.formModelNewTrip = '';
|
||||
this.formModelNewGroup = '';
|
||||
this.trainOperateType = '';
|
||||
this.trainOperationShow = flag;
|
||||
this.operationType = type;
|
||||
this.formModelNewSection = '';
|
||||
}
|
||||
},
|
||||
@ -1068,7 +1121,7 @@ export default {
|
||||
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
this.changeShowMode(true);
|
||||
this.changeShowMode('train');
|
||||
}
|
||||
}).catch((error) => {
|
||||
if (error && error.code == '10017') {
|
||||
@ -1533,6 +1586,13 @@ export default {
|
||||
.station_close{
|
||||
float: right;
|
||||
}
|
||||
.moni_input{
|
||||
border-top: 2px solid #585858;
|
||||
border-left: 2px solid #585858;
|
||||
border-right: 2px solid #F9F9F9;
|
||||
border-bottom: 2px solid #F9F9F9;
|
||||
background: #D4D0C8;
|
||||
}
|
||||
.stationButton{
|
||||
font-size: 12px;
|
||||
width: 100px;
|
||||
|
Loading…
Reference in New Issue
Block a user