Merge branch 'dev' of https://git.code.tencent.com/lian-cbtc/jl-client into dev
This commit is contained in:
commit
1f73a54c32
@ -874,4 +874,12 @@ export default class Section extends Group {
|
||||
return super.getBoundingRect();
|
||||
}
|
||||
}
|
||||
|
||||
drawSelected(selected) {
|
||||
if (selected) {
|
||||
this.section.setStyle({stroke: '#CFF'});
|
||||
} else {
|
||||
this.section.setStyle({stroke: this.style.Section.line.spareColor});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,7 @@ export default {
|
||||
viewDraft: 'draft',
|
||||
autoSaveTask: null,
|
||||
selected: null,
|
||||
oldSelected: null,
|
||||
mapInfo: { name: this.$t('map.pleaseSelectMap') },
|
||||
timeDemon: null
|
||||
};
|
||||
@ -158,9 +159,9 @@ export default {
|
||||
this.autoSaveTask = null;
|
||||
}
|
||||
},
|
||||
handleSelectControlPage (model) {
|
||||
handleSelectControlPage (model, oldModel) {
|
||||
if (this.$refs.mapOperate) {
|
||||
this.$refs.mapOperate.handleSelectControlPage(model);
|
||||
this.$refs.mapOperate.handleSelectControlPage(model, oldModel);
|
||||
this.$store.dispatch('menuOperation/setMapDrawSelectCount');
|
||||
}
|
||||
},
|
||||
@ -185,8 +186,11 @@ export default {
|
||||
return device;
|
||||
},
|
||||
onSelect(device) {
|
||||
if (this.selected) {
|
||||
this.oldSelected = this.selected;
|
||||
}
|
||||
this.selected = device || null;
|
||||
this.selected && this.handleSelectControlPage(device);
|
||||
this.selected && this.handleSelectControlPage(device, this.oldSelected);
|
||||
},
|
||||
onContextmenu(em) {
|
||||
this.point = {
|
||||
|
@ -278,7 +278,8 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
handleSelectControlPage(device) {
|
||||
handleSelectControlPage(device, oldDevice) {
|
||||
console.log(device, type, this.feild, device, oldDevice);
|
||||
const type = device._type;
|
||||
if (this.stationType) {
|
||||
this.enabledTab = 'Station';
|
||||
@ -290,6 +291,12 @@ export default {
|
||||
this.enabledTab = 'Section';
|
||||
} else {
|
||||
this.enabledTab = type;
|
||||
if (type === 'Section' && device ) {
|
||||
device.instance.drawSelected(true);
|
||||
}
|
||||
if ( oldDevice && oldDevice._type === 'Section') {
|
||||
oldDevice.instance.drawSelected(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
stationEnabledTab(type) {
|
||||
|
Loading…
Reference in New Issue
Block a user