赛总指示调整

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() {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
},
mapData() {
return this.$store.state.map.map;
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
}
},
mounted() {
@ -102,24 +108,6 @@ export default {
commit() {
this.setNameDisplay();
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() {
const deviceList = [];
@ -129,7 +117,10 @@ export default {
const signalList = this.$store.getters['map/signalList'];
if (signalList && signalList.length > 0) {
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 }));
}
});
}
@ -142,18 +133,21 @@ export default {
const switchList = this.$store.getters['map/switchList'];
if (switchList && switchList.length > 0) {
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 }));
}
});
}
//
const indicatorShow = this.nameLevels.includes(8);
const control = this.$store.getters['map/stationControlList'];
if (control && control.length > 0) {
control.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //
});
}
// //
// const indicatorShow = this.nameLevels.includes(8);
// const control = this.$store.getters['map/stationControlList'];
// if (control && control.length > 0) {
// control.forEach(elem => {
// deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { indicatorShow })); //
// });
// }
//
nameShow = false;
@ -193,31 +187,34 @@ export default {
if (elem.transferTrack) {
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 }));
}
});
}
//
const destCodeShow = this.nameLevels.includes(10);
const stopPointList = this.$store.getters['map/stopPointList'];
if (stopPointList && stopPointList.length > 0) {
stopPointList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
});
}
// const destCodeShow = this.nameLevels.includes(10);
// const stopPointList = this.$store.getters['map/stopPointList'];
// if (stopPointList && stopPointList.length > 0) {
// stopPointList.forEach(elem => {
// deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { destCodeShow }));
// });
// }
//
const kmPostShow = this.nameLevels.includes(12);
const stationList = this.$store.getters['map/stationList'];
if (stationList && stationList.length > 0) {
stationList.forEach(elem => {
deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
});
// const kmPostShow = this.nameLevels.includes(12);
// const stationList = this.$store.getters['map/stationList'];
// if (stationList && stationList.length > 0) {
// stationList.forEach(elem => {
// deviceList.push(Object.assign(this.$jlmap.getDeviceByCode(elem.code), { kmPostShow })); //
// });
// }
this.$store.dispatch('map/updateMapDevices', deviceList);
}
this.$store.dispatch('map/updateMapDevices', deviceList);
}
}
};
</script>