调整:信号机接近区段中信号机选中变为黄色

This commit is contained in:
fan 2019-12-25 09:18:28 +08:00
parent 6d82f466a6
commit 9331180684

View File

@ -121,6 +121,14 @@ export default {
if (val && val.length) {
this.changeSectionSelected(val, true, 'signalNearSection');
}
},
'addModel.signalCode': function (val, old) {
if (old) {
this.changeSignalSelected(old, false, 'routeSignal');
}
if (val) {
this.changeSignalSelected(val, true, 'routeSignal');
}
}
},
mounted() {
@ -195,6 +203,11 @@ export default {
},
signalNearSectionListFocus(flag) {
this.changeSectionSelected(this.addModel.routeSectionList, flag, 'signalNearSection');
this.changeSignalSelected(this.addModel.signalCode, flag, 'routeSignal');
},
changeSignalSelected(val, flag, type) {
const signal = this.$store.getters['map/getDeviceByCode'](val);
signal && signal.instance.drawBatchSelected(flag, flag ? type : '');
},
changeSectionSelected(list, flag, type) {
list && list.forEach((item) => {