调整点击道岔计轴显示道岔区段
This commit is contained in:
parent
206496609d
commit
159a2b4890
@ -261,7 +261,8 @@ export default {
|
||||
mapEditShow: false,
|
||||
mapPaintShow: true
|
||||
},
|
||||
oldDevice: null
|
||||
oldDevice: null,
|
||||
isSwitchSection: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -319,10 +320,26 @@ export default {
|
||||
this.enabledTab = 'Section';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
if ( this.oldDevice && this.oldDevice.instance && typeof this.oldDevice.instance.drawSelected === 'function') {
|
||||
if (this.oldDevice && this.oldDevice.instance && typeof this.oldDevice.instance.drawSelected === 'function') {
|
||||
if (this.isSwitchSection) {
|
||||
if (this.oldDevice._type == 'Section' && this.oldDevice.type == '04') {
|
||||
this.oldDevice.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel.instance.drawSelected(false);
|
||||
});
|
||||
this.isSwitchSection = false;
|
||||
}
|
||||
}
|
||||
this.oldDevice.instance.drawSelected(false);
|
||||
}
|
||||
if ( device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
if (device && device.instance && typeof device.instance.drawSelected === 'function' ) {
|
||||
if (device._type == 'Section' && device.type == '04') {
|
||||
this.isSwitchSection = true;
|
||||
device.relevanceSectionList.forEach(item => {
|
||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
|
||||
sectionModel.instance.drawSelected(true);
|
||||
});
|
||||
}
|
||||
device.instance.drawSelected(true);
|
||||
}
|
||||
this.oldDevice = device;
|
||||
|
Loading…
Reference in New Issue
Block a user