大铁项目 ctc 车务管理端 消息处理代码调整

This commit is contained in:
joylink_cuiweidong 2022-06-14 16:36:40 +08:00
parent 949e3c3feb
commit 389a700798
3 changed files with 78 additions and 22 deletions

View File

@ -212,12 +212,45 @@ function handle(state, data) {
state.railCtcRunplanInitMsg[element.code] = element; state.railCtcRunplanInitMsg[element.code] = element;
}); });
break; break;
// 大铁项目 ctc 运行图改变信息
case 'SIMULATION_CTC_RUN_PLAN_CHANGE': case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
msg.forEach(element => { msg.forEach(element => {
state.railCtcRunplanInitMsg[element.code] = copyAssign(state.railCtcRunplanInitMsg[element.code], element); state.railCtcRunplanInitMsg[element.code] = copyAssign(state.railCtcRunplanInitMsg[element.code], element);
}); });
state.railCtcRunplanChange++; state.railCtcRunplanChange++;
break; break;
// 大铁项目 ctc 车务管理端 初始化消息
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_INIT':
msg.forEach(element => {
const code = element.stationCode + '' + element.tripNumber;
state.railCtcStationManageRpMsg[code] = element;
});
break;
// 大铁项目 ctc 车务管理端 修改/增加消息
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_CHANGE':
msg.forEach(element => {
const code = element.stationCode + '' + element.tripNumber;
state.railCtcStationManageRpMsg[code] = copyAssign(state.railCtcStationManageRpMsg[code], element);
});
state.railCtcStationManageRpChange++;
break;
// 大铁项目 ctc 车务管理端 移除消息
case 'SIMULATION_CTC_MANAGER_RUN_PLAN_EDIT_REMOVE':
msg.forEach(element => {
const code = element.stationCode + '' + element.tripNumber;
delete state.railCtcStationManageRpMsg[code];
});
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;
} }
} }
@ -370,7 +403,9 @@ const socket = {
loggedOutMsg: '', loggedOutMsg: '',
railCtcStatusMsg: {}, // 占线板信息 railCtcStatusMsg: {}, // 占线板信息
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息 railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
railCtcRunplanChange:0 // 大铁项目 ctc 运行图信息变化 railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
railCtcStationManageRpChange:0 // 大铁项目 ctc 车务管理 运行图信息变化
}, },
getters: { getters: {
}, },

View File

@ -113,7 +113,6 @@ export default {
this.$refs.terminalStationList.loadStation(); this.$refs.terminalStationList.loadStation();
}, },
loadStationData(stationCode) { loadStationData(stationCode) {
} }
} }
}; };

View File

@ -2,7 +2,7 @@
<div class="trainFixedPath" :style="{ height: height+'px' }"> <div class="trainFixedPath" :style="{ height: height+'px' }">
<!-- {{ '列车固定径路' }} --> <!-- {{ '列车固定径路' }} -->
<div class="trainFixedPathL"> <div class="trainFixedPathL">
<terminal-station-list ref="terminalStationList" /> <terminal-station-list ref="terminalStationList" @loadStationData="loadStationData" />
</div> </div>
<div class="trainFixedPathR"> <div class="trainFixedPathR">
<div class="trainFixedPathRMenu"> <div class="trainFixedPathRMenu">
@ -45,12 +45,12 @@
width="50" width="50"
/> />
<el-table-column <el-table-column
prop="station" prop="stationCode"
label="车站" label="车站"
width="100" width="100"
/> />
<el-table-column <el-table-column
prop="arriveTrip" prop="arriveTripNumber"
label="到达车次" label="到达车次"
width="90" width="90"
/> />
@ -60,40 +60,39 @@
width="80" width="80"
/> />
<el-table-column <el-table-column
prop="departureTrip" prop="departTripNumber"
label="出发车次" label="出发车次"
width="90" width="90"
/> />
<el-table-column <el-table-column
prop="departureTime" prop="departTime"
label="出发时间" label="出发时间"
width="80" width="80"
/> />
<el-table-column <el-table-column
prop="track" prop="trackSectionCode"
label="股道" label="股道"
width="85" width="85"
/> />
<el-table-column <el-table-column
prop="RVType" prop="departStationCode"
label="后方车站" label="后方车站"
width="100" width="110"
/> />
<el-table-column <el-table-column
prop="RVType" prop="arriveDirectionCode"
label="入口" label="入口"
width="150" width="130"
/> />
<el-table-column <el-table-column
prop="RVType" prop="departDirectionCode"
label="出口" label="出口"
width="150" width="130"
/> />
<el-table-column <el-table-column
prop="RVType" prop="arriveStationCode"
label="前方车站" label="前方车站"
width="100" width="110"
/> />
<el-table-column <el-table-column
prop="RVType" prop="RVType"
@ -233,6 +232,7 @@
</template> </template>
<script> <script>
import TerminalStationList from './terminalStationList'; import TerminalStationList from './terminalStationList';
import { copyAssign } from '@/utils/index';
export default { export default {
name:'TrainFixedPath', name:'TrainFixedPath',
components: { components: {
@ -241,18 +241,40 @@ export default {
data() { data() {
return { return {
height: this.$store.state.app.height - 61, height: this.$store.state.app.height - 61,
tableData:[ currentStationCode:'',
// {station:'', arriveTrip:'111', arriveTime:'00:00', departureTrip:'111', departureTime:'00:00', track:'IIG' }, tableData:[]
// {station:'', arriveTrip:'x7023', arriveTime:'10:20', departureTrip:'x7023', departureTime:'10:22', track:'IIG' }
]
}; };
}, },
watch:{
'$store.state.socket.railCtcStationManageRpChange': function (val) {
this.handleData();
}
},
methods:{ methods:{
loadStation() { loadStation() {
this.$refs.terminalStationList.loadStation(); this.$refs.terminalStationList.loadStation();
}, },
loadStationData(stationCode) { loadStationData(stationCode) {
this.currentStationCode = stationCode;
this.handleData();
},
handleData() {
this.tableData = [];
const railCtcStationManageRpMsg = copyAssign({}, this.$store.state.socket.railCtcStationManageRpMsg);
this.tableData = Object.values(railCtcStationManageRpMsg).filter(data=>{
return data.stationCode == this.currentStationCode;
});
// stationCode
// trackSectionCode
// arriveTripNumber
// departTripNumber
// arriveTime
// departTime
// arriveDirectionCode
// departDirectionCode
// arriveStationCode
// departStationCode
//
} }
} }
}; };