赛总指示调整

This commit is contained in:
fan 2023-07-21 09:43:52 +08:00
parent 837bf3a870
commit cc1a9817ab

View File

@ -62,6 +62,12 @@ export default {
}, },
domIdConfirm() { domIdConfirm() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : ''; return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
mapData() {
return this.$store.state.map.map;
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
} }
}, },
mounted() { mounted() {
@ -102,24 +108,6 @@ export default {
commit() { commit() {
this.setNameDisplay(); this.setNameDisplay();
this.doClose(); this.doClose();
// const operate = {
// over: true,
// type: this.operate.type,
// operation: OperationEvent.Command.close.confirm.operation,
// val: this.nameLevels.sort().join('::')
// };
//
// this.loading = true;
// this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
// this.loading = false;
// if (valid) {
// this.doClose();
// this.setNameDisplay();
// }
// }).catch((e) => {
// console.log(e, '------------');
// this.loading = false;
// });
}, },
setNameDisplay() { setNameDisplay() {
const deviceList = []; const deviceList = [];
@ -129,7 +117,10 @@ export default {
const signalList = this.$store.getters['map/signalList']; const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) { if (signalList && signalList.length > 0) {
signalList.forEach(elem => { signalList.forEach(elem => {
const signal = this.$store.getters['map/getDeviceByCode'](elem.code);
if (signal.instance) {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow }));
}
}); });
} }
@ -142,18 +133,21 @@ export default {
const switchList = this.$store.getters['map/switchList']; const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) { if (switchList && switchList.length > 0) {
switchList.forEach(elem => { switchList.forEach(elem => {
const switchD = this.$store.getters['map/getDeviceByCode'](elem.code);
if (switchD.instance) {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, switchSectionNameShow }));
}
}); });
} }
// // //
const indicatorShow = this.nameLevels.includes(8); // const indicatorShow = this.nameLevels.includes(8);
const control = this.$store.getters['map/stationControlList']; // const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) { // if (control && control.length > 0) {
control.forEach(elem => { // control.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); // // deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //
}); // });
} // }
// //
nameShow = false; nameShow = false;
@ -193,31 +187,34 @@ export default {
if (elem.transferTrack) { if (elem.transferTrack) {
transferTrackNameShow = this.nameLevels.includes(6); transferTrackNameShow = this.nameLevels.includes(6);
} }
const section = this.$store.getters['map/getDeviceByCode'](elem.code);
if (section.instance) {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow })); deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { nameShow, standTrackNameShow, reentryTrackNameShow, transferTrackNameShow }));
}
}); });
} }
// //
const destCodeShow = this.nameLevels.includes(10); // const destCodeShow = this.nameLevels.includes(10);
const stopPointList = this.$store.getters['map/stopPointList']; // const stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) { // if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => { // stopPointList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow })); // deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
}); // });
} // }
// //
const kmPostShow = this.nameLevels.includes(12); // const kmPostShow = this.nameLevels.includes(12);
const stationList = this.$store.getters['map/stationList']; // const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) { // if (stationList && stationList.length > 0) {
stationList.forEach(elem => { // stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); // // deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
}); // });
// }
this.$store.dispatch('map/updateMapDevices', deviceList);
} }
this.$store.dispatch('map/updateMapDevices', deviceList);
}
} }
}; };
</script> </script>