Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
Conflicts: src/views/newMap/displayNew/menuSchema.vue
This commit is contained in:
commit
00fd8a168b
@ -534,11 +534,6 @@ export const menuOperate = {
|
||||
operation: OperationEvent.CTCCommand.autoTrigger.menu.operation,
|
||||
cmdType: CMD.CTC.CTC_AUTO_TRIGGER
|
||||
},
|
||||
// 修改股道
|
||||
modifyTrackSection:{
|
||||
operation: OperationEvent.CTCCommand.modifyTrackSection.menu.operation,
|
||||
cmdType: CMD.CTC.CTC_MODIFY_TRACK_SECTION
|
||||
},
|
||||
// 批量修改股道
|
||||
batchModifyTrackSection:{
|
||||
operation: OperationEvent.CTCCommand.batchModifyTrackSection.menu.operation,
|
||||
|
@ -114,8 +114,8 @@ export default {
|
||||
doShow(row) {
|
||||
this.model.stationCode = row.stationCode;
|
||||
this.model.runPlanCode = row.code;
|
||||
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.arriveTripNumber) || '';
|
||||
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.departTripNumber) || '';
|
||||
this.oldArriveTripNumber = (row.arriveRunPlan && row.arriveRunPlan.tripNumber) || '';
|
||||
this.oldDepartTripNumber = (row.departRunPlan && row.departRunPlan.tripNumber) || '';
|
||||
this.dialogShow = true;
|
||||
this.$nextTick(function () {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -124,6 +124,12 @@ export default {
|
||||
doClose() {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.model = {
|
||||
stationCode:'', // 车站编码
|
||||
runPlanCode:'', // 运行编码
|
||||
arriveTripNumber:'', // 到达车次
|
||||
departTripNumber:'' // 发车车次
|
||||
};
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() {
|
||||
|
@ -389,7 +389,6 @@ export default {
|
||||
CTC_ASSIST_PRESS_BLOCK:{value: 'ASSIST_PRESS_BLOCK', label: '阻塞'},
|
||||
CTC_ASSIST_PRESS_RESTORE:{value: 'ASSIST_PRESS_RESTORE', label: '复原'},
|
||||
CTC_ASSIST_PRESS_ACCIDENT:{value: 'ASSIST_PRESS_ACCIDENT', label: '事故'},
|
||||
CTC_MODIFY_TRACK_SECTION:{value: 'CTC_MODIFY_TRACK_SECTION', label: '修改股道'},
|
||||
CTC_BATCH_MODIFY_RUN_PLAN:{value: 'CTC_BATCH_MODIFY_RUN_PLAN', label: '批量修改股道'},
|
||||
CTC_REMOVE_RUN_PLAN:{value: 'CTC_REMOVE_RUN_PLAN', label: '移除行车日志'},
|
||||
CTC_MODIFY_ADJACENT_STATION:{value: 'CTC_MODIFY_ADJACENT_STATION', label: '修改邻站信息'},
|
||||
|
@ -3667,13 +3667,6 @@ export const OperationEvent = {
|
||||
domId: '_Tips-CTC-AssistPressAccident-Menu{TOP}'
|
||||
}
|
||||
},
|
||||
// 修改股道
|
||||
modifyTrackSection:{
|
||||
menu: {
|
||||
operation: '1110',
|
||||
domId: '_Tips-CTC-modifyTrackSection-Menu{TOP}'
|
||||
}
|
||||
},
|
||||
// 批量修改股道
|
||||
batchModifyTrackSection:{
|
||||
menu: {
|
||||
|
@ -212,12 +212,51 @@ function handle(state, data) {
|
||||
state.railCtcRunplanInitMsg[element.code] = element;
|
||||
});
|
||||
break;
|
||||
// 大铁项目 ctc 运行图改变信息
|
||||
case 'SIMULATION_CTC_RUN_PLAN_CHANGE':
|
||||
msg.forEach(element => {
|
||||
const tripNumberDe = element.departRunPlan && element.departRunPlan.tripNumber;
|
||||
const tripNumberAr = element.arriveRunPlan && element.arriveRunPlan.tripNumber;
|
||||
element.departRunPlan.up = '';
|
||||
element.departRunPlan.down = '';
|
||||
if (tripNumberDe) { parseInt(tripNumberDe[tripNumberDe.length - 1]) % 2 == 0 ? element.departRunPlan.up = tripNumberDe : element.departRunPlan.down = tripNumberDe; }
|
||||
if (tripNumberAr) { parseInt(tripNumberAr[tripNumberAr.length - 1]) % 2 == 0 ? element.arriveRunPlan.up = tripNumberAr : element.arriveRunPlan.down = tripNumberAr; }
|
||||
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 +409,9 @@ const socket = {
|
||||
loggedOutMsg: '',
|
||||
railCtcStatusMsg: {}, // 占线板信息
|
||||
railCtcRunplanInitMsg:{}, // 大铁项目 ctc 运行图初始化信息
|
||||
railCtcRunplanChange:0 // 大铁项目 ctc 运行图信息变化
|
||||
railCtcRunplanChange:0, // 大铁项目 ctc 运行图信息变化
|
||||
railCtcStationManageRpMsg:{}, // 大铁项目 ctc 车务管理 端运行图信息
|
||||
railCtcStationManageRpChange:0 // 大铁项目 ctc 车务管理 运行图信息变化
|
||||
},
|
||||
getters: {
|
||||
},
|
||||
|
@ -34,7 +34,11 @@ export function getTopic(type, group, stationCode) {
|
||||
case 'CTC':
|
||||
topic = `/queue/simulation/${group}/ctc`;
|
||||
break;
|
||||
case 'CTC_MANAGE':
|
||||
topic = `/queue/simulation/ctc/manage/${group}`;
|
||||
break;
|
||||
}
|
||||
|
||||
return topic;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="BTRp">
|
||||
<div class="BTRpMenuBarOut">
|
||||
<div class="BTRpMenuBar">
|
||||
<div class="eachBTRpMenuBar" @click="addTab('StationTrack')">车站股道</div>
|
||||
@ -32,27 +32,45 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import StationTrack from './stationTrack';
|
||||
import TrainFixedPath from './trainFixedPath';
|
||||
import { loadMapDataById } from '@/utils/loaddata';
|
||||
import { creatSubscribe, clearSubscribe, getTopic } from '@/utils/stomp';
|
||||
export default {
|
||||
name:'BigTrainRunplanManage',
|
||||
data() {
|
||||
return {
|
||||
activeTab:'StationTrack',
|
||||
stationCode:'',
|
||||
groupModel: '',
|
||||
currentTabs: [
|
||||
{
|
||||
title: '车站股道',
|
||||
name: 'StationTrack',
|
||||
component:StationTrack
|
||||
},
|
||||
{
|
||||
title: '列车固定径路',
|
||||
name: 'TrainFixedPath',
|
||||
component:TrainFixedPath
|
||||
}
|
||||
// {
|
||||
// title: '车站股道',
|
||||
// name: 'StationTrack',
|
||||
// component:StationTrack
|
||||
// },
|
||||
// {
|
||||
// title: '列车固定径路',
|
||||
// name: 'TrainFixedPath',
|
||||
// component:TrainFixedPath
|
||||
// }
|
||||
]
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
'$store.state.map.mapDataLoadedCount': function (val) { // 地图数据加载完成
|
||||
this.subscribe();
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.clearSubscribe();
|
||||
},
|
||||
async mounted() {
|
||||
this.groupModel = this.$route.query.group;
|
||||
this.stationCode = this.$route.query.stationCode;
|
||||
this.initLoadData();
|
||||
},
|
||||
methods:{
|
||||
removeTab(targetName) {
|
||||
const tabs = this.currentTabs;
|
||||
@ -79,19 +97,26 @@ export default {
|
||||
this.currentTabs.push(Object.assign( {name:name}, nameMap[name]));
|
||||
}
|
||||
this.activeTab = name;
|
||||
this.$nextTick(()=>{
|
||||
this.$refs[this.activeTab][0].loadStation();
|
||||
});
|
||||
},
|
||||
quit() {
|
||||
window.close();
|
||||
},
|
||||
initLoadData() {
|
||||
loadMapDataById(this.$route.query.mapId, 'parse');
|
||||
},
|
||||
async subscribe() {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.$route.query.group || '', 'X-Token': getToken() };
|
||||
// creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||
creatSubscribe(getTopic('CTC_MANAGE', this.$route.query.group), header);
|
||||
// await this.$store.dispatch('training/setHasSubscribed');
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(getTopic('CTC_MANAGE', this.groupModel));
|
||||
}
|
||||
// addTab(targetName) {
|
||||
// let newTabName = ++this.tabIndex + '';
|
||||
// this.editableTabs.push({
|
||||
// title: 'New Tab',
|
||||
// name: newTabName,
|
||||
// content: 'New Tab content'
|
||||
// });
|
||||
// this.editableTabsValue = newTabName;
|
||||
// },
|
||||
// '车站股道'
|
||||
// 列车固定路径
|
||||
}
|
||||
@ -99,12 +124,17 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.BTRp{height:100%;width:100%;padding-top:30px}
|
||||
.BTRpMenuBarOut{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left:0;
|
||||
top:0;
|
||||
background: #bad8fb;
|
||||
border-bottom: 1px #8fb2dd solid;
|
||||
height: 29px;
|
||||
}
|
||||
.BTRpTabs{height:100%;background: #cccccd;}
|
||||
.BTRpMenuBar{
|
||||
display: inline-block;
|
||||
background: #d2e0f3;
|
||||
|
@ -107,6 +107,13 @@ export default {
|
||||
sewageEquip:'无', military:'否' }
|
||||
]
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
loadStation() {
|
||||
this.$refs.terminalStationList.loadStation();
|
||||
},
|
||||
loadStationData(stationCode) {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -148,6 +155,9 @@ export default {
|
||||
padding: 5px 10px;
|
||||
border: 1px #737373 solid;
|
||||
}
|
||||
.stationTrackButton:hover{
|
||||
background-image: linear-gradient(#efffff,#a8daf3);
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
#stationTrackTableIn.el-table td, #stationTrackTableIn.el-table th{
|
||||
|
@ -12,18 +12,30 @@
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="terminalStationListB">
|
||||
<el-tree :data="treeList" :props="defaultProps" :default-expanded-keys="[1]" node-key="id" style="color:#000" @node-click="handleNodeClick" />
|
||||
<el-tree
|
||||
id="terminalStationTree"
|
||||
ref="terminalStationTree"
|
||||
:data="treeList"
|
||||
:props="defaultProps"
|
||||
:default-expanded-keys="['allStation']"
|
||||
:highlight-current="true"
|
||||
:check-on-click-node="true"
|
||||
node-key="id"
|
||||
style="color:#000"
|
||||
@current-change="handleChange"
|
||||
/>
|
||||
<!-- @node-click="handleNodeClick" -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
name:'TerminalStationList',
|
||||
data() {
|
||||
return {
|
||||
treeList:[{
|
||||
id:1,
|
||||
id:'allStation',
|
||||
label: '车站列表',
|
||||
children: []
|
||||
}],
|
||||
@ -38,28 +50,42 @@ export default {
|
||||
}]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('map', [
|
||||
'stationList'
|
||||
])
|
||||
},
|
||||
watch: {
|
||||
// '$store.state.map.mapDataLoadedCount': function (val) { // 地图数据加载完成
|
||||
// this.stationList.forEach(station => {
|
||||
// if (!station.depot) {
|
||||
// this.treeList[0].children.push({id:station.code, label:station.name});
|
||||
// }
|
||||
// });
|
||||
// this.$nextTick(()=>{
|
||||
// const currentKey = this.treeList[0].children[0].id;
|
||||
// this.$refs.terminalStationTree.setCurrentKey(currentKey);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
async mounted() {
|
||||
const res = await getByGroupStationList(this.$route.query.group);
|
||||
if (res.code == 200) {
|
||||
this.treeList[0].children = [];
|
||||
res.data.forEach(station => {
|
||||
},
|
||||
methods:{
|
||||
handleChange(data, node) {
|
||||
this.$emit('loadStationData', data.id);
|
||||
},
|
||||
loadStation() {
|
||||
this.stationList.forEach(station => {
|
||||
if (!station.depot) {
|
||||
this.treeList[0].children.push({id:station.code, label:station.name});
|
||||
}
|
||||
});
|
||||
}
|
||||
// const covertedStationList = this.stationList.map(station=>{
|
||||
// const newStation = {};
|
||||
// newStation.label = station.name;
|
||||
// newStation.id = station.code;
|
||||
// return newStation;
|
||||
// });
|
||||
// debugger;
|
||||
// this.treeList[0].children = [...covertedStationList];
|
||||
},
|
||||
methods:{
|
||||
handleNodeClick(data) {
|
||||
console.log(data);
|
||||
this.$nextTick(()=>{
|
||||
const currentKey = this.treeList[0].children[0].id;
|
||||
this.$refs.terminalStationTree.setCurrentKey(currentKey);
|
||||
this.$emit('loadStationData', currentKey);
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -75,5 +101,12 @@ export default {
|
||||
.terminalStationListB{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
#terminalStationTree.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content{
|
||||
background: #fff;
|
||||
color: #2525ff;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="trainFixedPath" :style="{ height: height+'px' }">
|
||||
<!-- {{ '列车固定径路' }} -->
|
||||
<div class="trainFixedPathL">
|
||||
{{ 111 }}
|
||||
<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"
|
||||
@ -232,16 +231,51 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import TerminalStationList from './terminalStationList';
|
||||
import { copyAssign } from '@/utils/index';
|
||||
export default {
|
||||
name:'TrainFixedPath',
|
||||
components: {
|
||||
TerminalStationList
|
||||
},
|
||||
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 出发车站
|
||||
//
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -282,6 +316,9 @@ export default {
|
||||
padding: 5px 10px;
|
||||
border: 1px #737373 solid;
|
||||
}
|
||||
.trainFixedPathButton:hover{
|
||||
background-image: linear-gradient(#efffff,#a8daf3);
|
||||
}
|
||||
.trainFixedPathRTable{background:#a9a9a9;border-left: 1px #707070 solid;}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
|
@ -239,21 +239,17 @@ export default {
|
||||
},
|
||||
goRpManage() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/bigTrainRunplanManage',
|
||||
query:{
|
||||
lineCode:this.$route.query.lineCode,
|
||||
group: this.$route.query.group,
|
||||
// prdType: this.$route.query.prdType,
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
newApi: this.$route.query.newApi,
|
||||
// ctc: true,
|
||||
// try: this.$route.query.try,
|
||||
token:getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
path:'/bigTrainRunplanManage',
|
||||
query:{
|
||||
group: this.$route.query.group,
|
||||
mapId:this.$route.query.mapId,
|
||||
project: this.project,
|
||||
// stationCode:this.$store.state.training.roleDeviceCode,
|
||||
// token:getToken(),
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank');
|
||||
},
|
||||
changeOperateMode() {
|
||||
this.faultMode = !this.faultMode;
|
||||
|
Loading…
Reference in New Issue
Block a user