大铁项目 调度台 运行图 消息订阅 和返回的数据 代码调整
This commit is contained in:
parent
73bf18ad86
commit
fa1004067e
@ -3,10 +3,15 @@
|
||||
<div class="dispatcherLogerButton">
|
||||
<div class="dispatcherLogerLine" />
|
||||
<div class="dispatcherLogerBtnGroup">
|
||||
<div id="addRunplan" class="dispatcherLogerClickBtn" @click="addRunplan">添加</div>
|
||||
<div id="deleteRunplan" class="dispatcherLogerClickBtn" @click="deleteRunplan">删除</div>
|
||||
<div id="sendRunplan" class="dispatcherLogerClickBtn" @click="sendRunplan">发送计划</div>
|
||||
</div>
|
||||
<div class="closeDL">
|
||||
<i class="el-icon-close close_icon" @click.stop="doClose" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="runplanContent">
|
||||
<div class="dispatcherLogerContent">
|
||||
<el-table
|
||||
id="runplanContentTable"
|
||||
ref="runplanContentTable"
|
||||
@ -15,8 +20,9 @@
|
||||
height="695"
|
||||
highlight-current-row
|
||||
style="width: 100%;border:1px #ccc solid"
|
||||
@cell-click="selectedTripNumber"
|
||||
>
|
||||
<!-- @cell-click="selectedTripNumber" -->
|
||||
<!-- -->
|
||||
<!-- @current-change="handleCurrentChange" -->
|
||||
<el-table-column
|
||||
prop="tripNumber"
|
||||
@ -27,54 +33,90 @@
|
||||
<div>{{ scope.row.tripNumber }} {{ scope.row.delete?'(删)':'' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="arriveSectionCode" label="到达股道">
|
||||
<el-table-column width="155" prop="arriveTripNumber" label="到达车次" />
|
||||
<el-table-column width="155" prop="departTripNumber" label="发车车次" />
|
||||
|
||||
<!-- runPlanCode:"", stationCode:"", tripNumber:"", groupNumber:"",
|
||||
trackSectionCode:"", arriveSectionCode:"", departSectionCode:"",
|
||||
arriveTime:"", departTime:"", arrivePlanTime:"", departPlanTime:"",
|
||||
arriveTripNumber:"", departTripNumber:"",
|
||||
|
||||
startRunPlan: null/false/true,endRunPlan: null/false/true,
|
||||
electrical: null/false/true,passenger: null/false/true,
|
||||
keyTrains: null/false/true,military: null/false/true,
|
||||
trackDiscordant:null/false/true, entryOutDiscordant: null/false/true,
|
||||
transfinite: NO/TRANSFINITE_SUPER/TRANSFINITE_ONE_LEVEL/TRANSFINITE_TWO_LEVEL -->
|
||||
|
||||
<el-table-column width="155" prop="arriveDirectionCode" label="到达口">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
<div v-if="scope.row.arriveDirectionCode" class="accessName" :title="scope.row.arriveDirectionCode">
|
||||
{{ scope.row.arriveDirectionCode }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="departDirectionCode" label="发车口">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.departDirectionCode" class="accessName" :title="scope.row.departDirectionCode">
|
||||
{{ scope.row.departDirectionCode }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="arriveSectionCode" label="接车股道">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-select
|
||||
v-model="tableData[scope.$index].arriveSectionCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
popper-class="stationSelect"
|
||||
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
|
||||
>
|
||||
<!-- @focus="focusArriveRunPlan($event,scope.row)" -->
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <div v-if="scope.row.arriveSectionCode" class="accessName" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div> -->
|
||||
</el-select> -->
|
||||
<div v-if="scope.row.arriveSectionCode" class="accessName">
|
||||
{{ scope.row.arriveSectionCode }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="departSectionCode" label="发车股道">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
<!-- <el-select
|
||||
v-model="tableData[scope.$index].departSectionCode"
|
||||
placeholder=""
|
||||
size="mini"
|
||||
popper-class="stationSelect"
|
||||
@change="changeArriveRunPlan($event,scope.row,scope.$index)"
|
||||
>
|
||||
<!-- @focus="focusArriveRunPlan($event,scope.row)" -->
|
||||
<el-option
|
||||
v-for="item in filterSectionList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <div v-if="scope.row.departSectionCode" class="accessName" :title="scope.row.departRunPlan.accessName">{{ scope.row.departRunPlan.accessName }}</div> -->
|
||||
</el-select> -->
|
||||
<div v-if="scope.row.departSectionCode" class="accessName">
|
||||
{{ scope.row.departSectionCode }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="arrivePlanTime" label="到达时间">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.arrivePlanTime" class="accessName">
|
||||
{{ scope.row.arrivePlanTime }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="155" prop="departPlanTime" label="出发时间">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.departPlanTime" class="accessName">
|
||||
{{ scope.row.departPlanTime }}
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- arriveSectionCode // 到达股道
|
||||
departSectionCode // 发车股道
|
||||
arrivePlanTime // 到达计划时间
|
||||
departPlanTime // 发车计划时间
|
||||
arriveTripNumber // 到达车次
|
||||
departTripNumber // 发车车次
|
||||
arriveStationCode // 到达车站
|
||||
departStationCode // 发车车站 -->
|
||||
</el-table>
|
||||
</div>
|
||||
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
|
||||
@ -93,7 +135,8 @@ export default {
|
||||
return {
|
||||
isShow:false,
|
||||
filterSectionList:[],
|
||||
tableData:[]
|
||||
tableData:[],
|
||||
currentRow:null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -101,8 +144,16 @@ export default {
|
||||
'sectionList'
|
||||
])
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.railwaySimulationRpChange': function (val) {
|
||||
this.loadData();
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
loadData() {
|
||||
this.tableData = [];
|
||||
const railwaySimulationRpMsg = copyAssign({}, this.$store.state.socket.railwaySimulationRpMsg);
|
||||
this.tableData = Object.values(railwaySimulationRpMsg);
|
||||
},
|
||||
doShow() {
|
||||
this.filterSectionList = [];
|
||||
@ -110,6 +161,7 @@ export default {
|
||||
return section.standTrack && section.belongStation == this.$store.state.training.roleDeviceCode;
|
||||
});
|
||||
this.tableData = [];
|
||||
this.loadData();
|
||||
this.isShow = true;
|
||||
},
|
||||
changeArriveRunPlan(event, row, index) {
|
||||
@ -121,6 +173,14 @@ export default {
|
||||
},
|
||||
sendRunplan() {
|
||||
|
||||
},
|
||||
deleteRunplan() {
|
||||
|
||||
},
|
||||
addRunplan() {
|
||||
|
||||
},
|
||||
selectedTripNumber(row, column, cell, event) {
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -134,4 +194,60 @@ export default {
|
||||
left: 0;
|
||||
background: #fff;
|
||||
}
|
||||
.dispatcherLogerButton{
|
||||
height: 37px;
|
||||
background: #f0f0f0;
|
||||
border: 1px #a5a5a5 solid;
|
||||
margin-top: 1px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
margin-left:10px;
|
||||
}
|
||||
.dispatcherLogerLine{
|
||||
margin-top: 1px;
|
||||
height: 31px;
|
||||
width: 4px;
|
||||
border: 1px #b3b3b2 solid;
|
||||
margin-left: 2px;
|
||||
background: #f7f7f7;
|
||||
}
|
||||
.dispatcherLogerBtnGroup{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
margin-left: 45px;
|
||||
}
|
||||
.dispatcherLogerClickBtn{
|
||||
background: #f0f0f0;
|
||||
font-size: 13px;
|
||||
border-top: 2px #e0e0e0 solid;
|
||||
border-left: 2px #e0e0e0 solid;
|
||||
border-bottom: 2px #4c4c4c solid;
|
||||
border-right: 2px #4c4c4c solid;
|
||||
padding: 6px 15px;
|
||||
margin-top: 2px;
|
||||
cursor:pointer;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.dispatcherLogerContent{
|
||||
height: calc(100% - 37px);
|
||||
width: 100%;
|
||||
background:#fff;
|
||||
border-top: 3px #818181 solid;
|
||||
border-left: 3px #818181 solid;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
}
|
||||
.close_icon{
|
||||
|
||||
}
|
||||
.closeDL{
|
||||
position: absolute;
|
||||
right:10px;
|
||||
top:5px;
|
||||
padding:5px;;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
@ -258,15 +258,30 @@ function handle(state, data) {
|
||||
});
|
||||
state.railCtcStationManageRpChange++;
|
||||
break;
|
||||
// // 大铁项目 ctc 车务管理端 覆盖消息
|
||||
// case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_COVER':
|
||||
// state.railCtcStationManageRpMsg = {};
|
||||
// msg.forEach(element => {
|
||||
// const code = element.stationCode + '' + element.tripNumber;
|
||||
// state.railCtcStationManageRpMsg[code] = element;
|
||||
// });
|
||||
// state.railCtcStationManageRpChange++;
|
||||
// break;
|
||||
// 大铁项目 调度台 运行图信息 初始化消息
|
||||
case 'SIMULATION_RAILWAY_RUN_PLAN_INIT':
|
||||
state.railwaySimulationRpMsg = {};
|
||||
msg.forEach(element => {
|
||||
const code = element.stationCode + '' + element.runPlanCode;
|
||||
state.railwaySimulationRpMsg[code] = element;
|
||||
});
|
||||
break;
|
||||
// 大铁项目 调度台 运行图信息 修改/增加消息
|
||||
case 'SIMULATION_RAILWAY_RUN_PLAN_CHANGE':
|
||||
msg.forEach(element => {
|
||||
const code = element.stationCode + '' + element.runPlanCode;
|
||||
state.railwaySimulationRpMsg[code] = copyAssign(state.railwaySimulationRpMsg[code] || {}, element);
|
||||
});
|
||||
state.railwaySimulationRpChange++;
|
||||
break;
|
||||
// 大铁项目 调度台 运行图信息 移除消息
|
||||
case 'SIMULATION_RAILWAY_RUN_PLAN_REMOVE':
|
||||
msg.forEach(element => {
|
||||
const code = element.stationCode + '' + element.runPlanCode;
|
||||
delete state.railwaySimulationRpMsg[code];
|
||||
});
|
||||
state.railwaySimulationRpChange++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -421,7 +436,9 @@ const socket = {
|
||||
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
|
||||
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
|
||||
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
|
||||
railCtcStationManageRpChange:0 // 大铁项目 ctc 车务管理 运行图信息变化
|
||||
railCtcStationManageRpChange:0, // 大铁项目 ctc 车务管理 运行图信息变化
|
||||
railwaySimulationRpMsg:{}, // 大铁项目 调度台 调度台
|
||||
railwaySimulationRpChange:0 // 大铁项目 调度台 运行图信息变化
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
@ -34,6 +34,9 @@ export function getTopic(type, group, stationCode) {
|
||||
case 'CTC':
|
||||
topic = `/user/queue/simulation/${group}/ctc`;
|
||||
break;
|
||||
case 'CTC_RAILWAY':
|
||||
topic = `/queue/simulation/${group}/railway`;
|
||||
break;
|
||||
case 'CTC_MANAGE':
|
||||
// topic = `/user/queue/simulation/${group}/ctc/manage`;
|
||||
topic = `/user/queue/simulation/${group}/ctcManage`;
|
||||
|
@ -123,6 +123,9 @@ export default {
|
||||
if (this.$route.query.ctc == 'true') {
|
||||
creatSubscribe(getTopic('CTC', this.$route.query.group), header);
|
||||
}
|
||||
if (this.$route.query.dispatcherStation == 'true') {
|
||||
creatSubscribe(getTopic('CTC_RAILWAY', this.$route.query.group), header);
|
||||
}
|
||||
await this.$store.dispatch('training/setHasSubscribed');
|
||||
},
|
||||
async subscribeNew() {
|
||||
@ -144,6 +147,9 @@ export default {
|
||||
if (this.$route.query.ctc == 'true') {
|
||||
clearSubscribe(getTopic('CTC', this.groupModel));
|
||||
}
|
||||
if (this.$route.query.dispatcherStation == 'true') {
|
||||
clearSubscribe(getTopic('CTC_RAILWAY', this.groupModel));
|
||||
}
|
||||
},
|
||||
setCenter(code) {
|
||||
this.$refs.mapCommon && this.$refs.mapCommon.setCenter(code);
|
||||
|
Loading…
Reference in New Issue
Block a user