This commit is contained in:
fan 2019-12-26 16:54:38 +08:00
commit dafd6d42cd
2 changed files with 14 additions and 2 deletions

View File

@ -855,7 +855,7 @@ export default class Section extends Group {
drawSelected(selected) {
this.selected = selected;
if (selected) {
!this.selectedType && this.section && this.section.setStyle({stroke: 'rgba(0,255,255,0.6)'});
!this.selectedType && this.section && this.section.setStyle({stroke: '#fbfbfb'});
} else {
!this.selectedType && this.section && this.section.setStyle({stroke: this.style.Section.line.spareColor });
}
@ -876,7 +876,7 @@ export default class Section extends Group {
const path = window.location.href;
if (path.includes('/map/draw')) {
this.on('mouseout', () => { !this.selectedType && !this.selected && this.section && this.section.setStyle({stroke: this.style.Section.line.spareColor }); });
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({stroke: 'rgba(0,255,255,0.6)'}); });
this.on('mouseover', () => { !this.selectedType && this.section && this.section.setStyle({stroke: '#fbfbfb'}); });
}
}

View File

@ -333,6 +333,12 @@ export default {
sectionModel.instance.drawSelected(false);
});
this.isSwitchSection = false;
} else if (this.oldDevice._type == 'Section' && this.oldDevice.type == '01' && this.oldDevice.logicSectionCodeList && this.oldDevice.logicSectionCodeList.length) {
this.oldDevice.logicSectionCodeList.forEach(item => {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel.instance.drawSelected(false);
});
this.isSwitchSection = false;
}
}
this.oldDevice.instance.drawSelected(false);
@ -344,6 +350,12 @@ export default {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel.instance.drawSelected(true);
});
} else if (device._type == 'Section' && device.type == '01' && device.logicSectionCodeList && device.logicSectionCodeList.length) {
this.isSwitchSection = true;
device.logicSectionCodeList.forEach(item => {
const sectionModel = this.$store.getters['map/getDeviceByCode'](item);
sectionModel.instance.drawSelected(true);
});
}
device.instance.drawSelected(true);
}