调整点击计轴区段显示高亮,调整区段高亮颜色

This commit is contained in:
zyy 2019-12-26 16:38:44 +08:00
parent 9123a794f0
commit 6c37fe6bdf
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);
}