大铁项目 ctc 车务管理端 消息处理代码调整
This commit is contained in:
parent
949e3c3feb
commit
389a700798
@ -212,12 +212,45 @@ function handle(state, data) {
|
||||
state.railCtcRunplanInitMsg[element.code] = element;
|
||||
});
|
||||
break;
|
||||
// 大铁项目 ctc 运行图改变信息
|
||||
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
|
||||
msg.forEach(element => {
|
||||
state.railCtcRunplanInitMsg[element.code] = copyAssign(state.railCtcRunplanInitMsg[element.code], element);
|
||||
});
|
||||
state.railCtcRunplanChange++;
|
||||
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: '',
|
||||
railCtcStatusMsg: {}, // 占线板信息
|
||||
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
|
||||
railCtcRunplanChange:0 // 大铁项目 ctc 运行图信息变化
|
||||
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
|
||||
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
|
||||
railCtcStationManageRpChange:0 // 大铁项目 ctc 车务管理 运行图信息变化
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
@ -113,7 +113,6 @@ export default {
|
||||
this.$refs.terminalStationList.loadStation();
|
||||
},
|
||||
loadStationData(stationCode) {
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="trainFixedPath" :style="{ height: height+'px' }">
|
||||
<!-- {{ '列车固定径路' }} -->
|
||||
<div class="trainFixedPathL">
|
||||
<terminal-station-list ref="terminalStationList" />
|
||||
<terminal-station-list ref="terminalStationList" @loadStationData="loadStationData" />
|
||||
</div>
|
||||
<div class="trainFixedPathR">
|
||||
<div class="trainFixedPathRMenu">
|
||||
@ -45,12 +45,12 @@
|
||||
width="50"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="station"
|
||||
prop="stationCode"
|
||||
label="车站"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="arriveTrip"
|
||||
prop="arriveTripNumber"
|
||||
label="到达车次"
|
||||
width="90"
|
||||
/>
|
||||
@ -60,40 +60,39 @@
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="departureTrip"
|
||||
prop="departTripNumber"
|
||||
label="出发车次"
|
||||
width="90"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
prop="departureTime"
|
||||
prop="departTime"
|
||||
label="出发时间"
|
||||
width="80"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="track"
|
||||
prop="trackSectionCode"
|
||||
label="股道"
|
||||
width="85"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RVType"
|
||||
prop="departStationCode"
|
||||
label="后方车站"
|
||||
width="100"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RVType"
|
||||
prop="arriveDirectionCode"
|
||||
label="入口"
|
||||
width="150"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RVType"
|
||||
prop="departDirectionCode"
|
||||
label="出口"
|
||||
width="150"
|
||||
width="130"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RVType"
|
||||
prop="arriveStationCode"
|
||||
label="前方车站"
|
||||
width="100"
|
||||
width="110"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="RVType"
|
||||
@ -233,6 +232,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import TerminalStationList from './terminalStationList';
|
||||
import { copyAssign } from '@/utils/index';
|
||||
export default {
|
||||
name:'TrainFixedPath',
|
||||
components: {
|
||||
@ -241,18 +241,40 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: this.$store.state.app.height - 61,
|
||||
tableData:[
|
||||
// {station:'王岗', arriveTrip:'111', arriveTime:'00:00', departureTrip:'111', departureTime:'00:00', track:'IIG' },
|
||||
// {station:'王岗', arriveTrip:'x7023', arriveTime:'10:20', departureTrip:'x7023', departureTime:'10:22', track:'IIG' }
|
||||
]
|
||||
currentStationCode:'',
|
||||
tableData:[]
|
||||
};
|
||||
},
|
||||
watch:{
|
||||
'$store.state.socket.railCtcStationManageRpChange': function (val) {
|
||||
this.handleData();
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
loadStation() {
|
||||
this.$refs.terminalStationList.loadStation();
|
||||
},
|
||||
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 出发车站
|
||||
//
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user