修改菜单处理

This commit is contained in:
ival 2019-07-29 17:57:00 +08:00
parent cdccd7b41f
commit c4a6b076da
50 changed files with 724 additions and 970 deletions

View File

@ -16,7 +16,7 @@ class TrainWindow extends Group {
this.setState(state);
}
_create(model) {
const prdType = '02';// store.state.map.prdType;
const prdType = '02';// store.state.training.prdType;
if (prdType !== '01') {
this.createTrainWindow();
this.setTrainWindowEventShow(model.trainWindowShow);

View File

@ -134,10 +134,10 @@
},
//
cancelTrainRoute() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.map.prdType == '02') {
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}

View File

@ -68,7 +68,7 @@
return this.$route.params.mode == 'dp'
},
isShowMenu() {
return this.$store.state.map.prdType != '';
return this.$store.state.training.prdType != '';
}
},
data() {

View File

@ -438,7 +438,7 @@
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.map.prdType': function () {
'$store.state.training.prdType': function () {
this.initMenu();
}
},
@ -447,7 +447,7 @@
},
methods: {
initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.clickEvent();
this.closeMenu(true);
},

View File

@ -87,7 +87,7 @@
if (elem.visible) {
let next = elem;
while (!next.centralized) {
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
next = (this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode) || {}).model;
}
if (station.code == next.code) {

View File

@ -113,46 +113,48 @@
})
},
setDeviceDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
elem.borderBorderShow = show;
deviceList.push(elem);
});
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
// elem.borderBorderShow = show;
// elem.type = deviceType.Section;
// deviceList.push(elem);
// });
// }
//
let trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
elem.trainWindowShow = show;
deviceList.push(elem);
});
}
// //
// let trainWindowList = this.$store.getters['map/trainWindowList'];
// if (trainWindowList && trainWindowList.length > 0) {
// trainWindowList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
// elem.type = deviceType.Section;
// elem.trainWindowShow = show;
// deviceList.push(elem);
// });
// }
//ATS
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
//
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
elem.linkageAutoRouteShow = show;
//ATS
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
elem.atsAutoTriggerShow = show;
deviceList.push(elem);
})
}
// //ATS
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
// elem.linkageAutoRouteShow = show;
// //ATS
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
// elem.atsAutoTriggerShow = show;
// deviceList.push(elem);
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -147,115 +147,115 @@
})
},
setNameDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
elem.nameShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// elem.nameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
// //
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
//
let switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
//
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
elem.nameShow = show;
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.switchSectionNameShow = show;
deviceList.push(elem);
})
}
// //
// let switchList = this.$store.getters['map/switchList'];
// if (switchList && switchList.length > 0) {
// switchList.forEach(elem => {
// //
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
// elem.nameShow = show;
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.switchSectionNameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
let control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
elem.indicatorShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
// let control = this.$store.getters['map/stationControlList'];
// if (control && control.length > 0) {
// control.forEach(elem => {
// //
// elem.indicatorShow = show;
// deviceList.push(elem);
// })
// }
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
if (elem.isSwitchSection && elem.parentCode) {
//
elem.nameShow = false;
} else {
if (elem.type === '01') {
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '02') {
//
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '03') {
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.nameShow = show;
}
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// if (elem.isSwitchSection && elem.parentCode) {
// //
// elem.nameShow = false;
// } else {
// if (elem.type === '01') {
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '02') {
// //
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '03') {
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.nameShow = show;
// }
// }
//
if (elem.isStandTrack) {
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
elem.standTrackNameShow = show;
}
// //
// if (elem.isStandTrack) {
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
// elem.standTrackNameShow = show;
// }
//
if (elem.isReentryTrack) {
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
elem.reentryTrackNameShow = show;
}
// //
// if (elem.isReentryTrack) {
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
// elem.reentryTrackNameShow = show;
// }
//
if (elem.isTransferTrack) {
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
elem.transferTrackNameShow = show;
}
// //
// if (elem.isTransferTrack) {
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
// elem.transferTrackNameShow = show;
// }
deviceList.push(elem);
})
}
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
let stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
//
elem.destCodeShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
// let stopPointList = this.$store.getters['map/stopPointList'];
// if (stopPointList && stopPointList.length > 0) {
// stopPointList.forEach(elem => {
// //
// elem.destCodeShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
let stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
//
elem.kmPostShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
// let stationList = this.$store.getters['map/stationList'];
// if (stationList && stationList.length > 0) {
// stationList.forEach(elem => {
// //
// elem.kmPostShow = show;
// deviceList.push(elem);
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -155,17 +155,17 @@
})
},
setTrainDispaly() {
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let planFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
trainList.forEach(elem => {
elem.nameFormat = planFormat;
elem.nameFontSize = nameFontSize;
});
// let trainList = this.$store.getters['training/viewTrainList'];
// if (trainList && trainList.length > 0) {
// let planFormat = this.trainNameFormatBy(this.planMode);
// let nameFontSize = this.fontSize;
// trainList.forEach(elem => {
// elem.nameFormat = planFormat;
// elem.nameFontSize = nameFontSize;
// });
this.$store.dispatch('map/updateMapView', trainList);
}
// this.$store.dispatch('map/updateMapDevices', trainList);
// }
},
trainNameFormatBy(mode) {
switch (mode.toString()) {

View File

@ -69,10 +69,10 @@
},
computed: {
targetStatus() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.map.prdType == '02') {
if (this.$store.state.training.prdType == '02') {
return '02'
}
},
@ -237,7 +237,7 @@
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
val: this.selection[0].code,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();
@ -258,7 +258,7 @@
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
val: this.tableData[0].code,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();

View File

@ -474,18 +474,19 @@ export function menuFiltration(menuObj) {
var selected = store.getters['menuOperation/selected'];
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
}
if (control) {
var controlStatus = (control || {}).state;
if (store.state.map.prdType != '') {
var type = SystemType[store.state.map.prdType];
var status = StationControlType[controlStatus.status];
if (store.state.training.prdType != '') {
var type = SystemType[store.state.training.prdType];
var status = StationControlType[control.state.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -508,8 +509,8 @@ export function menuFiltration(menuObj) {
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.map.prdType != '') {
var type = SystemType[store.state.map.prdType];
if (store.state.training.prdType != '') {
var type = SystemType[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {

View File

@ -114,10 +114,10 @@
},
//
cancelTrainRoute() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.map.prdType == '02') {
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}

View File

@ -75,7 +75,7 @@
this.$route.params.mode !== 'plan'
},
isShowBar() {
return this.$store.state.map.prdType != '';
return this.$store.state.training.prdType != '';
},
},

View File

@ -698,7 +698,7 @@
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.map.prdType': function () {
'$store.state.training.prdType': function () {
this.initMenu();
}
},
@ -730,7 +730,7 @@
return list;
},
initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.menu[2].children = this.initStationList();
this.clickEvent();
this.closeMenu(true);

View File

@ -229,7 +229,7 @@
return OperationEvent.Signal;
},
isShowBtn() {
return this.$store.state.map.prdType == '01';
return this.$store.state.training.prdType == '01';
}
},
watch: {

View File

@ -114,46 +114,46 @@
})
},
setDeviceDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
elem.borderBorderShow = show;
deviceList.push(elem);
});
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
// elem.borderBorderShow = show;
// deviceList.push(elem);
// });
// }
//
let trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
elem.trainWindowShow = show;
deviceList.push(elem);
});
}
// //
// let trainWindowList = this.$store.getters['map/trainWindowList'];
// if (trainWindowList && trainWindowList.length > 0) {
// trainWindowList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
// elem.trainWindowShow = show;
// deviceList.push(elem);
// });
// }
//ATS
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
//
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
elem.linkageAutoRouteShow = show;
//ATS
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
elem.atsAutoTriggerShow = show;
deviceList.push(elem);
})
}
// //ATS
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
// elem.linkageAutoRouteShow = show;
// //ATS
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
// elem.atsAutoTriggerShow = show;
// deviceList.push(elem);
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -147,116 +147,116 @@
})
},
setNameDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
elem.nameShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// elem.nameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
// //
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
//
let switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
//
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
elem.nameShow = show;
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.switchSectionNameShow = show;
deviceList.push(elem);
})
}
// //
// let switchList = this.$store.getters['map/switchList'];
// if (switchList && switchList.length > 0) {
// switchList.forEach(elem => {
// //
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
// elem.nameShow = show;
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.switchSectionNameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
let control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
elem.indicatorShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
// let control = this.$store.getters['map/stationControlList'];
// if (control && control.length > 0) {
// control.forEach(elem => {
// //
// elem.indicatorShow = show;
// deviceList.push(elem);
// })
// }
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
if (elem.isSwitchSection && elem.parentCode) {
//
elem.nameShow = false;
} else {
if (elem.type === '01') {
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '02') {
//
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '03') {
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.nameShow = show;
}
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// if (elem.isSwitchSection && elem.parentCode) {
// //
// elem.nameShow = false;
// } else {
// if (elem.type === '01') {
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '02') {
// //
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '03') {
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.nameShow = show;
// }
// }
//
if (elem.isStandTrack) {
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
elem.standTrackNameShow = show;
}
// //
// if (elem.isStandTrack) {
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
// elem.standTrackNameShow = show;
// }
//
if (elem.isReentryTrack) {
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
elem.reentryTrackNameShow = show;
}
// //
// if (elem.isReentryTrack) {
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
// elem.reentryTrackNameShow = show;
// }
//
if (elem.isTransferTrack) {
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
elem.transferTrackNameShow = show;
}
// //
// if (elem.isTransferTrack) {
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
// elem.transferTrackNameShow = show;
// }
deviceList.push(elem);
})
}
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
let stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
//
elem.destCodeShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
// let stopPointList = this.$store.getters['map/stopPointList'];
// if (stopPointList && stopPointList.length > 0) {
// stopPointList.forEach(elem => {
// //
// elem.destCodeShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
let stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
//
elem.kmPostShow = show;
deviceList.push(elem);
// //
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
// let stationList = this.$store.getters['map/stationList'];
// if (stationList && stationList.length > 0) {
// stationList.forEach(elem => {
// //
// elem.kmPostShow = show;
// deviceList.push(elem);
})
}
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -155,17 +155,17 @@
})
},
setTrainDispaly() {
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let planFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
trainList.forEach(elem => {
elem.nameFormat = planFormat;
elem.nameFontSize = nameFontSize;
});
// let trainList = this.$store.getters['training/viewTrainList'];
// if (trainList && trainList.length > 0) {
// let planFormat = this.trainNameFormatBy(this.planMode);
// let nameFontSize = this.fontSize;
// trainList.forEach(elem => {
// elem.nameFormat = planFormat;
// elem.nameFontSize = nameFontSize;
// });
this.$store.dispatch('map/updateMapView', trainList);
}
// this.$store.dispatch('map/updateMapDevices', trainList);
// }
},
trainNameFormatBy(mode) {
switch (mode.toString()) {

View File

@ -69,10 +69,10 @@
},
computed: {
targetStatus() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.map.prdType == '02') {
if (this.$store.state.training.prdType == '02') {
return '02'
}
},
@ -237,7 +237,7 @@
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
val: this.selection[0].code,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();
@ -258,7 +258,7 @@
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
val: this.tableData[0].code,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();

View File

@ -494,20 +494,19 @@ export function menuFiltration(menuObj) {
var selected = store.getters['menuOperation/selected'];
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
} else if (selected._type == 'LimitControl') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
}
if (control) {
const controlStatus = getStatusObject(control);
if (store.state.map.prdType != '') {
const type = SystemType[store.state.map.prdType];
const status = StationControlType[controlStatus.status];
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
const status = StationControlType[control.state.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -518,7 +517,7 @@ export function menuFiltration(menuObj) {
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
elem.defaultDisabled = !elem.auth[status];
@ -535,8 +534,8 @@ export function menuFiltration(menuObj) {
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.map.prdType != '') {
const type = SystemType[store.state.map.prdType];
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -547,7 +546,7 @@ export function trainMenuFiltration(menuObj) {
if (elem.auth.constructor === Object) {
elem.show = true;
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
if (!elem.auth['station'] && !elem.auth['center']) { // 控制不显示
elem.show = false;
}
}

View File

@ -82,7 +82,7 @@
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['skinStyle'] = this.$store.state.map.map.skinStyle;
params['skinStyle'] = this.$store.getters['map/skinStyle'];
}
return runPlanTemplateList(params);
},

View File

@ -86,7 +86,7 @@
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['skinStyle'] = this.$store.state.map.map.skinStyle;
params['skinStyle'] = this.$store.getters['map/skinStyle'];
}
return runPlanTemplateList(params);
},

View File

@ -140,10 +140,10 @@
},
//
cancelTrainRoute() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.map.prdType == '02') {
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}

View File

@ -73,7 +73,7 @@
this.$route.params.mode !== 'plan'
},
isShowBar() {
return this.$store.state.map.prdType != '';
return this.$store.state.training.prdType != '';
}
},
data() {

View File

@ -698,7 +698,7 @@
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.map.prdType': function () {
'$store.state.training.prdType': function () {
this.initMenu();
}
},
@ -730,7 +730,7 @@
return list;
},
initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.menu[2].children = this.initStationList();
this.clickEvent();
this.closeMenu(true);

View File

@ -114,46 +114,46 @@
})
},
setDeviceDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
elem.borderBorderShow = show;
deviceList.push(elem);
});
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
// elem.borderBorderShow = show;
// deviceList.push(elem);
// });
// }
//
let trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
elem.trainWindowShow = show;
deviceList.push(elem);
});
}
// //
// let trainWindowList = this.$store.getters['map/trainWindowList'];
// if (trainWindowList && trainWindowList.length > 0) {
// trainWindowList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
// elem.trainWindowShow = show;
// deviceList.push(elem);
// });
// }
//ATS
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
//
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
elem.linkageAutoRouteShow = show;
//ATS
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
elem.atsAutoTriggerShow = show;
deviceList.push(elem);
})
}
// //ATS
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
// elem.linkageAutoRouteShow = show;
// //ATS
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
// elem.atsAutoTriggerShow = show;
// deviceList.push(elem);
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -147,116 +147,116 @@
})
},
setNameDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
elem.nameShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// elem.nameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
// //
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
//
let switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
//
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
elem.nameShow = show;
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.switchSectionNameShow = show;
deviceList.push(elem);
})
}
// //
// let switchList = this.$store.getters['map/switchList'];
// if (switchList && switchList.length > 0) {
// switchList.forEach(elem => {
// //
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
// elem.nameShow = show;
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.switchSectionNameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
let control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
elem.indicatorShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
// let control = this.$store.getters['map/stationControlList'];
// if (control && control.length > 0) {
// control.forEach(elem => {
// //
// elem.indicatorShow = show;
// deviceList.push(elem);
// })
// }
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
if (elem.isSwitchSection && elem.parentCode) {
//
elem.nameShow = false;
} else {
if (elem.type === '01') {
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '02') {
//
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '03') {
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.nameShow = show;
}
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// if (elem.isSwitchSection && elem.parentCode) {
// //
// elem.nameShow = false;
// } else {
// if (elem.type === '01') {
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '02') {
// //
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '03') {
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.nameShow = show;
// }
// }
//
if (elem.isStandTrack) {
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
elem.standTrackNameShow = show;
}
// //
// if (elem.isStandTrack) {
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
// elem.standTrackNameShow = show;
// }
//
if (elem.isReentryTrack) {
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
elem.reentryTrackNameShow = show;
}
// //
// if (elem.isReentryTrack) {
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
// elem.reentryTrackNameShow = show;
// }
//
if (elem.isTransferTrack) {
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
elem.transferTrackNameShow = show;
}
// //
// if (elem.isTransferTrack) {
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
// elem.transferTrackNameShow = show;
// }
deviceList.push(elem);
})
}
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
let stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
//
elem.destCodeShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
// let stopPointList = this.$store.getters['map/stopPointList'];
// if (stopPointList && stopPointList.length > 0) {
// stopPointList.forEach(elem => {
// //
// elem.destCodeShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
let stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
//
elem.kmPostShow = show;
deviceList.push(elem);
// //
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
// let stationList = this.$store.getters['map/stationList'];
// if (stationList && stationList.length > 0) {
// stationList.forEach(elem => {
// //
// elem.kmPostShow = show;
// deviceList.push(elem);
})
}
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -155,17 +155,17 @@
})
},
setTrainDispaly() {
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let planFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
trainList.forEach(elem => {
elem.nameFormat = planFormat;
elem.nameFontSize = nameFontSize;
});
// let trainList = this.$store.getters['training/viewTrainList'];
// if (trainList && trainList.length > 0) {
// let planFormat = this.trainNameFormatBy(this.planMode);
// let nameFontSize = this.fontSize;
// trainList.forEach(elem => {
// elem.nameFormat = planFormat;
// elem.nameFontSize = nameFontSize;
// });
this.$store.dispatch('map/updateMapView', trainList);
}
// this.$store.dispatch('map/updateMapDevices', trainList);
// }
},
trainNameFormatBy(mode) {
switch (mode.toString()) {

View File

@ -69,10 +69,10 @@
},
computed: {
targetStatus() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.map.prdType == '02') {
if (this.$store.state.training.prdType == '02') {
return '02'
}
},
@ -237,7 +237,7 @@
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
val: this.selection[0].code,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();
@ -258,7 +258,7 @@
type: MapDeviceType.StationControl.type,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
val: this.tableData[0].code,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();

View File

@ -514,20 +514,19 @@ export function menuFiltration(menuObj) {
var selected = store.getters['menuOperation/selected'];
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
} else if (selected._type == 'LimitControl') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
}
if (control) {
const controlStatus = (control || {}).state;
if (store.state.map.prdType != '') {
const type = SystemType[store.state.map.prdType];
const status = StationControlType[controlStatus.status];
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
const status = StationControlType[control.state.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -555,8 +554,8 @@ export function menuFiltration(menuObj) {
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.map.prdType != '') {
var type = SystemType[store.state.map.prdType];
if (store.state.training.prdType != '') {
var type = SystemType[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {

View File

@ -82,7 +82,7 @@
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['skinStyle'] = this.$store.state.map.map.skinStyle;
params['skinStyle'] = this.$store.getters['map/skinStyle'];
}
return runPlanTemplateList(params);
},

View File

@ -86,7 +86,7 @@
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['skinStyle'] = this.$store.state.map.map.skinStyle;
params['skinStyle'] = this.$store.getters['map/skinStyle'];
}
return runPlanTemplateList(params);
},

View File

@ -132,10 +132,10 @@
},
//
cancelTrainRoute() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
/** 现地工作站*/
this.cancelTrainRouteByLocal();
} else if (this.$store.state.map.prdType == '02') {
} else if (this.$store.state.training.prdType == '02') {
/** 行调工作站*/
this.cancelTrainRouteByCentral();
}

View File

@ -3,9 +3,6 @@
<menu-cancel ref="menuCancel"></menu-cancel>
<template v-if="isShowAll">
<menu-bar ref="menuBar" v-show="isShowBar" :selected="selected"></menu-bar>
<!-- <menu-tool ref="menuTool" :selected="selected"></menu-tool> -->
<!-- <status-bar ref="statusBar" :selected="selected"></status-bar> -->
<menu-station-control ref="menuStationControl" :selected="selected"></menu-station-control>
<menu-station-stand ref="menuStationStand" :selected="selected"></menu-station-stand>
<menu-switch ref="menuSwitch" :selected="selected"></menu-switch>
@ -31,8 +28,6 @@
import MenuTrain from './menuTrain';
import MenuStation from './menuStation';
import MenuBar from './menuBar';
// import MenuTool from './menuTool';
// import StatusBar from './statusBar';
import PassiveAlarm from './passiveDialog/alarm';
import PassiveContorl from './passiveDialog/control';
import PassiveTimeout from './passiveDialog/timeout';
@ -41,8 +36,6 @@
name: 'Menus',
components: {
MenuBar,
// MenuTool,
// StatusBar,
MenuCancel,
MenuSignal,
MenuSwitch,
@ -69,7 +62,7 @@
this.$route.params.mode !== 'plan'
},
isShowBar() {
return this.$store.state.map.prdType != '';
return this.$store.state.training.prdType != '';
}
},
data() {

View File

@ -410,7 +410,7 @@
'$store.state.training.started': function (val) {
this.closeMenu(true);
},
'$store.state.map.prdType': function () {
'$store.state.training.prdType': function () {
this.initMenu();
}
},
@ -419,7 +419,7 @@
},
methods: {
initMenu(menu) {
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.map.prdType]], this.$store.state.training.operatemode);
this.menu = menuBarConvert(this.menuNormal[SystemType[this.$store.state.training.prdType]], this.$store.state.training.operatemode);
this.clickEvent();
this.closeMenu(true);
},

View File

@ -84,7 +84,7 @@
if (elem.visible) {
let next = elem;
while (next.code != next.concentrateStationCode || !next.concentrateStationCode) {
next = this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode);
next = (this.$store.getters['map/getDeviceByCode'](next.concentrateStationCode) || {}).model;
}
if (station.code == next.code) {

View File

@ -4,7 +4,7 @@
append-to-body v-dialogDrag>
<div class="context">
<template v-for="message in messages">
<span> {{message}}</span><br>
<span>{{message}}</span><br>
</template>
</div>
<el-row class="button-group">

View File

@ -228,7 +228,7 @@
loadTableData() {
this.tableData = [];
this.stationControlList.forEach(control => {
let station = this.$store.getters['map/getDeviceByCode'](control.stationCode);
let station = (this.$store.getters['map/getDeviceByCode'](control.stationCode) || {}).model;
this.tableData.push({
code: control.code,
operate: station.name || '',

View File

@ -114,46 +114,46 @@
})
},
setDeviceDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
//
show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
elem.borderBorderShow = show;
deviceList.push(elem);
});
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(2) !== -1 ? true : false;
// elem.borderBorderShow = show;
// deviceList.push(elem);
// });
// }
//
let trainWindowList = this.$store.getters['map/trainWindowList'];
if (trainWindowList && trainWindowList.length > 0) {
trainWindowList.forEach(elem => {
//
show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
elem.trainWindowShow = show;
deviceList.push(elem);
});
}
// //
// let trainWindowList = this.$store.getters['map/trainWindowList'];
// if (trainWindowList && trainWindowList.length > 0) {
// trainWindowList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(1) !== -1 ? true : false;
// elem.trainWindowShow = show;
// deviceList.push(elem);
// });
// }
//ATS
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
//
show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
elem.linkageAutoRouteShow = show;
//ATS
show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
elem.atsAutoTriggerShow = show;
deviceList.push(elem);
})
}
// //ATS
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// //
// show = this.deviceLevels.indexOf(3) !== -1 ? true : false;
// elem.linkageAutoRouteShow = show;
// //ATS
// show = this.deviceLevels.indexOf(4) !== -1 ? true : false;
// elem.atsAutoTriggerShow = show;
// deviceList.push(elem);
// })
// }
this.$store.dispatch('map/updateMapView', deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -147,117 +147,118 @@
})
},
setNameDisplay() {
let show = false;
let deviceList = [];
// let show = false;
// let deviceList = [];
//
show = this.nameLevels.indexOf(1) !== -1 ? true : false;
let signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
signalList.forEach(elem => {
elem.nameShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(1) !== -1 ? true : false;
// let signalList = this.$store.getters['map/signalList'];
// if (signalList && signalList.length > 0) {
// signalList.forEach(elem => {
// elem.nameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(3) !== -1 ? true : false;
// //
// show = this.nameLevels.indexOf(3) !== -1 ? true : false;
//
let switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
switchList.forEach(elem => {
//
show = this.nameLevels.indexOf(7) !== -1 ? true : false;
elem.nameShow = show;
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.switchSectionNameShow = show;
deviceList.push(elem);
})
}
// //
// let switchList = this.$store.getters['map/switchList'];
// if (switchList && switchList.length > 0) {
// switchList.forEach(elem => {
// //
// show = this.nameLevels.indexOf(7) !== -1 ? true : false;
// elem.nameShow = show;
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.switchSectionNameShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(8) !== -1 ? true : false;
let control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
//
elem.indicatorShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(8) !== -1 ? true : false;
// let control = this.$store.getters['map/stationControlList'];
// if (control && control.length > 0) {
// control.forEach(elem => {
// //
// elem.indicatorShow = show;
// deviceList.push(elem);
// })
// }
//
let sectionList = this.$store.getters['map/sectionList'];
if (sectionList && sectionList.length > 0) {
sectionList.forEach(elem => {
if (elem.isSwitchSection && elem.parentCode) {
//
elem.nameShow = false;
} else {
if (elem.type === '01') {
//
show = this.nameLevels.indexOf(11) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '02') {
//
show = this.nameLevels.indexOf(5) !== -1 ? true : false;
elem.nameShow = show;
} else if (elem.type === '03') {
//
show = this.nameLevels.indexOf(9) !== -1 ? true : false;
elem.nameShow = show;
}
}
// //
// let sectionList = this.$store.getters['map/sectionList'];
// if (sectionList && sectionList.length > 0) {
// sectionList.forEach(elem => {
// if (elem.isSwitchSection && elem.parentCode) {
// //
// elem.nameShow = false;
// } else {
// if (elem.type === '01') {
// //
// show = this.nameLevels.indexOf(11) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '02') {
// //
// show = this.nameLevels.indexOf(5) !== -1 ? true : false;
// elem.nameShow = show;
// } else if (elem.type === '03') {
// //
// show = this.nameLevels.indexOf(9) !== -1 ? true : false;
// elem.nameShow = show;
// }
// }
//
if (elem.isStandTrack) {
show = this.nameLevels.indexOf(2) !== -1 ? true : false;
elem.standTrackNameShow = show;
}
// //
// if (elem.isStandTrack) {
// show = this.nameLevels.indexOf(2) !== -1 ? true : false;
// elem.standTrackNameShow = show;
// }
//
if (elem.isReentryTrack) {
show = this.nameLevels.indexOf(4) !== -1 ? true : false;
elem.reentryTrackNameShow = show;
}
// //
// if (elem.isReentryTrack) {
// show = this.nameLevels.indexOf(4) !== -1 ? true : false;
// elem.reentryTrackNameShow = show;
// }
//
if (elem.isTransferTrack) {
show = this.nameLevels.indexOf(6) !== -1 ? true : false;
elem.transferTrackNameShow = show;
}
// //
// if (elem.isTransferTrack) {
// show = this.nameLevels.indexOf(6) !== -1 ? true : false;
// elem.transferTrackNameShow = show;
// }
deviceList.push(elem);
})
}
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(10) !== -1 ? true : false;
let stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
//
elem.destCodeShow = show;
deviceList.push(elem);
})
}
// //
// show = this.nameLevels.indexOf(10) !== -1 ? true : false;
// let stopPointList = this.$store.getters['map/stopPointList'];
// if (stopPointList && stopPointList.length > 0) {
// stopPointList.forEach(elem => {
// //
// elem.destCodeShow = show;
// deviceList.push(elem);
// })
// }
//
show = this.nameLevels.indexOf(12) !== -1 ? true : false;
let stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
//
elem.kmPostShow = show;
deviceList.push(elem);
// //
// show = this.nameLevels.indexOf(12) !== -1 ? true : false;
// let stationList = this.$store.getters['map/stationList'];
// if (stationList && stationList.length > 0) {
// stationList.forEach(elem => {
// //
// elem.kmPostShow = show;
// deviceList.push(elem);
})
}
// })
// }
this.$store.dispatch('map/updateMapView', parseDevices);
// console.log(deviceList);
// this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
}

View File

@ -155,17 +155,17 @@
})
},
setTrainDispaly() {
let trainList = this.$store.getters['training/viewTrainList'];
if (trainList && trainList.length > 0) {
let planFormat = this.trainNameFormatBy(this.planMode);
let nameFontSize = this.fontSize;
trainList.forEach(elem => {
elem.nameFormat = planFormat;
elem.nameFontSize = nameFontSize;
});
// let trainList = this.$store.getters['training/viewTrainList'];
// if (trainList && trainList.length > 0) {
// let planFormat = this.trainNameFormatBy(this.planMode);
// let nameFontSize = this.fontSize;
// trainList.forEach(elem => {
// elem.nameFormat = planFormat;
// elem.nameFontSize = nameFontSize;
// });
this.$store.dispatch('map/updateMapView', trainList);
}
// this.$store.dispatch('map/updateMapDevices', trainList);
// }
},
trainNameFormatBy(mode) {
switch (mode.toString()) {

View File

@ -1,205 +0,0 @@
<template>
<div id="menuTool">
<div class="nav">
<div class="tool" v-for="(item,index) in tools" :key="index">
<img :src="item.src" :alt="item.title" />
</div>
<img class="logo" :src="logoImg" />
<system-time class="time" v-if="isShowSystemTime" :time="time" :zoom="2" :width="180" :height="48" :fine="2"
:top="6"></system-time>
</div>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, TrainingMode, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
import { OperateMode } from '@/scripts/ConstDic';
import { prefixIntrger } from '@/utils/date';
import SystemTime from '@/views/components/systemTime/index';
import logo_ from '@/assets/logo_.png';
export default {
name: 'MenuTool',
props: {
selected: {
type: Object
}
},
components: {
SystemTime
},
data() {
return {
logoImg: logo_,
time: '00:0000',
tools: [
{
title: '服务器1',
operate: '',
src: logo_,
click: this.undeveloped,
},
{
title: '服务器2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '前置机2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '主调',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台1',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台2',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '调度台3',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '大屏',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '维护工作站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '运行图显示人工站',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '跳停',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '扣车',
operate: '',
src: '',
click: this.undeveloped,
},
{
title: '列车报警',
operate: '',
src: logo_,
click: this.undeveloped,
}
]
}
},
watch: {
'$store.state.training.initTime': function (initTime) {
let date = new Date(initTime);
this.time = `${prefixIntrger(date.getHours(), 2)}:${prefixIntrger(date.getMinutes(), 2)}${prefixIntrger(date.getSeconds(), 2)}`
}
},
computed: {
isShowSystemTime() {
return this.$route.params.mode == 'demon' || this.$route.params.mode === 'dp' || !this.$route.params.mode;
}
},
mounted() {
this.initTools();
},
methods: {
initTools() {
this.tools = [];
}
}
}
</script>
<style scoped rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
$top: 30px;
$width: 50px;
$height: 50px;
#menuTool {
z-index: 5;
position: absolute;
top: $top;
width: 100%;
}
.nav {
display: block;
height: $height;
line-height: $height;
color: #0000;
background: #ECE9D8;
border: 1px solid #B6BCCC !important;
border-bottom: 2px solid #B6BCCC !important;
list-style: none;
}
.tool {
background: #808080;
display: flex;
justify-content: center;
cursor: pointer;
position: relative;
float: left;
height: $height - 2;
width: $width + 15;
margin: 1px;
img {
display: block;
text-align: center;
padding-top: 4px;
height: $height - 10;
width: $width - 10;
}
}
.time {
position: relative;
float: right;
text-align: center;
}
.logo {
position: relative;
float: right;
text-align: center;
margin: 1px 10px;
height: $height - 4;
width: $width - 4;
}
</style>

View File

@ -70,10 +70,10 @@
},
computed: {
targetStatus() {
if (this.$store.state.map.prdType == '01') {
if (this.$store.state.training.prdType == '01') {
return '01';
}
if (this.$store.state.map.prdType == '02') {
if (this.$store.state.training.prdType == '02') {
return '02'
}
},
@ -244,7 +244,7 @@
operation: OperationEvent.StationControl.controlResponse.agree.operation,
code: this.selection[0].code,
val: this.commandId,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
this.clearTimer();
@ -266,7 +266,7 @@
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
code: this.selection.length ? this.selection[0].code : '',
val: this.commandId,
prdType: this.$store.state.map.prdType
prdType: this.$store.state.training.prdType
}
if (!operate.code) {
operate.code = this.tableData[0].code;

View File

@ -1,31 +0,0 @@
<template>
<div id="statusBar"></div>
</template>
<script>
export default {
name: 'StatusBar',
props: {
selected: {
type: Object
}
},
data() {
return {
}
},
mounted() {
}
}
</script>
<style>
#statusBar {
z-index: 2000;
position: absolute;
height: $height;
line-height: $height;
border-radius: 0px !important;
top: 0px;
left: 0px;
}
</style>

View File

@ -240,7 +240,7 @@ export const MenuDisabledStatus = {
// 设置扣车
setDetainTrain() {
const device = getCurrentStatusObject();
if (store.state.map.prdType == '02') {
if (store.state.training.prdType == '02') {
if (device && device.holdStatus == deviceState.StationStand.holdStatus.Status03) {
return true;
}
@ -253,7 +253,7 @@ export const MenuDisabledStatus = {
// 取消扣车
cancelDetainTrain() {
const device = getCurrentStatusObject();
if (store.state.map.prdType == '02') {
if (store.state.training.prdType == '02') {
if (device && device.holdStatus == deviceState.StationStand.holdStatus.Status03) {
return true;
}
@ -426,7 +426,7 @@ export const MenuDisabledStatus = {
};
export function checkOperationValidity() {
if (store.state.map.prdType == '02') {
if (store.state.training.prdType == '02') {
return true;
}
}
@ -502,18 +502,19 @@ export function menuFiltration(menuObj) {
var selected = store.getters['menuOperation/selected'];
var control;
var menu = [];
if (selected._type == 'StationStand') {
control = store.getters['map/getStationControlByStationCode'](selected.deviceStationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.deviceStationCode);
} else if (selected._type == 'Station') {
control = store.getters['map/getStationControlByStationCode'](selected.code);
control = store.getters['map/getStationControlByStationCode'](selected.model.code);
} else {
control = store.getters['map/getStationControlByStationCode'](selected.stationCode);
control = store.getters['map/getStationControlByStationCode'](selected.model.stationCode);
}
if (control) {
const controlStatus = (control || {}).state;
if (store.state.map.prdType != '') {
const type = SystemType[store.state.map.prdType];
const status = StationControlType[controlStatus.status];
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
const status = StationControlType[control.state.status];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {
@ -533,6 +534,7 @@ export function menuFiltration(menuObj) {
}
}
}
return menu;
}
@ -541,8 +543,8 @@ export function menuFiltration(menuObj) {
*/
export function trainMenuFiltration(menuObj) {
var menu = [];
if (store.state.map.prdType != '') {
const type = SystemType[store.state.map.prdType];
if (store.state.training.prdType != '') {
const type = SystemType[store.state.training.prdType];
menu = [...menuObj[type]];
if (menu.constructor === Array) {
menu.forEach(elem => {

View File

@ -82,7 +82,7 @@
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['skinStyle'] = this.$store.state.map.map.skinStyle;
params['skinStyle'] = this.$store.getters['map/skinStyle'];
}
return runPlanTemplateList(params);
},

View File

@ -86,7 +86,7 @@
},
queryFunction(params) {
if (this.$store.state.map && this.$store.state.map.map) {
params['skinStyle'] = this.$store.state.map.map.skinStyle;
params['skinStyle'] = this.$store.getters['map/skinStyle'];
}
return runPlanTemplateList(params);
},

View File

@ -7,7 +7,7 @@ import Vue from 'vue';
* @param {Object} device
* @param {Array} effectedDeviceList
*/
function queryEffectedDevices(map, device, effectedDeviceList) {
function queryEffectedModels(map, device, effectedDeviceList) {
if (device && map) {
effectedDeviceList.push(device);
switch (device._type) {
@ -17,7 +17,7 @@ function queryEffectedDevices(map, device, effectedDeviceList) {
if (map.sectionList && map.sectionList.length) {
map.sectionList.forEach(elem => {
if (elem.linkCode === device.code) {
queryEffectedDevices(map, elem, effectedDeviceList);
queryEffectedModels(map, elem, effectedDeviceList);
}
});
}
@ -369,57 +369,52 @@ const map = {
// 查询区段关联的计数器
getCounterBySectionCode: (state) => (code, type) => {
let obj = null;
if (code && type && state.map &&
state.map.sectionList && state.map.sectionList.length &&
state.map.counterList && state.map.counterList.length) {
state.map.sectionList.forEach(section => {
if (section.code === code) {
state.map.counterList.forEach(counter => {
if (counter.stationCode === section.stationCode && type == counter.type) {
obj = counter;
return;
}
});
return;
}
});
let device = null;
if (Vue.prototype.$jlmap) {
var section = Vue.prototype.$jlmap.mapDevice[code];
if (section) {
state.map.counterList.forEach(counter => {
if (counter.stationCode === section.model.stationCode && type == counter.type) {
device = Vue.prototype.$jlmap.mapDevice[counter.code];
return;
}
});
}
}
return obj;
return device;
},
// 查询信号机关联的计数器
getCounterBySingalCode: (state) => (code, type) => {
let obj = null;
if (code && type && state.map &&
state.map.signalList && state.map.signalList.length &&
state.map.counterList && state.map.counterList.length) {
state.map.signalList.forEach(signal => {
if (signal.code === code) {
state.map.counterList.forEach(counter => {
if (counter.stationCode === signal.stationCode && type == counter.type) {
obj = counter;
return;
}
});
return;
}
});
let device = null;
if (Vue.prototype.$jlmap) {
var signal = Vue.prototype.$jlmap.mapDevice[code];
if (signal) {
state.map.counterList.forEach(counter => {
if (counter.stationCode === signal.model.stationCode && type == counter.type) {
device = Vue.prototype.$jlmap.mapDevice[counter.code];
return;
}
});
}
}
return obj;
return device;
},
// 查询所属车站关联的控制模式
getStationControlByStationCode: (state) => (code) => {
let device = null;
if (code && state.map &&
if (Vue.prototype.$jlmap && code &&
state.map &&
state.map.stationControlList && state.map.stationControlList.length) {
state.map.stationControlList.forEach(elem => {
if (elem.stationCode == code) {
device = elem;
device = Vue.prototype.$jlmap.mapDevice[elem.code];
}
});
}
return device;
}
},
@ -431,9 +426,6 @@ const map = {
mapRender: (devices) => {
Vue.prototype.$jlmap && Vue.prototype.$jlmap.render(devices);
},
mapUpdate: (devices) => {
Vue.prototype.$jlmap && Vue.prototype.$jlmap.update(devices);
},
setTrainDetails: (state, details) => {
state.trainDetails = details;
},
@ -492,38 +484,34 @@ const map = {
}
},
updateMapDevices: ({ commit }, devices) => {
updateMapDevices: ({ commit }, models) => {
return new Promise((resolve) => {
if (!(devices instanceof Array)) {
devices = [devices];
if (!(models instanceof Array)) {
models = [models];
}
commit('mapRender', devices);
resolve(devices);
commit('mapRender', models);
resolve(models);
});
},
deleteMapDevices: ({ commit, state }, devices) => {
deleteMapDevices: ({ commit, state }, models) => {
return new Promise((resolve) => {
if (!(devices instanceof Array)) {
devices = [devices];
if (!(models instanceof Array)) {
models = [models];
}
// 查找向上关联需要一起删除的设备
const effectedDeviceList = [];
devices.forEach((device) => {
queryEffectedDevices(state.map, device, effectedDeviceList);
const effectedModelList = [];
models.forEach((device) => {
queryEffectedModels(state.map, device, effectedModelList);
});
commit('mapRender', effectedDeviceList);
resolve(effectedDeviceList);
commit('mapRender', effectedModelList);
resolve(effectedModelList);
});
},
updateMapView: ({ commit }, devices) => {
commit('mapUpdate', devices);
},
saveMapDeviceDefaultConvert({ state }) {
saveMapDeviceDefaultConvert(state);
},

View File

@ -209,7 +209,7 @@ export default {
this.dataZoom.offsetY = dataZoom.offsetY.toFixed(1) + '';
this.dataZoom.scaleRate = dataZoom.scaleRate + '';
const skinStyle = this.$store.state.map.map.skinStyle;
const skinStyle = this.$store.getters['map/skinStyle'];
if (skinStyle) {
const param = {
scaleRate: this.dataZoom.scaleRate,

View File

@ -139,8 +139,10 @@ export default {
Object.assign(this.editModel, this.map);
}
},
'$store.state.map.map.skinStyle': function () {
this.isUpdate = true;
'$store.state.map.mapDataLoadedCount': function () {
if (this.$jlmap.skinStyle) {
this.isUpdate = true;
}
}
},
mounted() {

View File

@ -14,6 +14,7 @@
import JlmapVisual from '@/views/jlmap/index';
import TrainingTips from '@/views/mapsystem/plugin/trainingtip';
import ThemeFactory from '@/jmap/theme/factory';
import { debug } from 'util';
export default {
name: 'LessonCanvas',
@ -46,9 +47,10 @@
}
},
watch: {
'$store.state.map.map.skinStyle': function (code) {
if (code) {
this.menus = ThemeFactory.loadMenusComponent(code);
'$store.state.map.mapDataLoadedCount': function () {
const skinStyle = this.$jlmap.skinStyle;
if (skinStyle) {
this.menus = ThemeFactory.loadMenusComponent(skinStyle);
}
}
},
@ -104,18 +106,19 @@
},
contextmenu(em) {
var menu = null;
var device = { _type: em.deviceType, code: em.deviceCode };
var device = null;
this.point = { x: em.clientX, y: em.clientY };
if (em.subType === 'TrainWindow') {
em = { _type: 'Train', _code: em.deviceCode }
em = { _type: deviceType.Trian, _code: em.deviceCode }
this.$store.dispatch('map/setTrainWindowShow', true);
} else if (em.deviceCode && !this.isScreen) {
device = this.getDeviceByEm(em);
}
if (device) {
this.selected = device = this.getSelectedBySkinStyle(em);
this.selected = device = this.getSelectedBySkinStyle(device);
if (!this.buttonOperation) {
this.$store.dispatch('menuOperation/setSelected', device);
if (!this.checkShouldPop(device)) {