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();
|
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',
|
viewDraft: 'draft',
|
||||||
autoSaveTask: null,
|
autoSaveTask: null,
|
||||||
selected: null,
|
selected: null,
|
||||||
|
oldSelected: null,
|
||||||
mapInfo: { name: this.$t('map.pleaseSelectMap') },
|
mapInfo: { name: this.$t('map.pleaseSelectMap') },
|
||||||
timeDemon: null
|
timeDemon: null
|
||||||
};
|
};
|
||||||
@ -158,9 +159,9 @@ export default {
|
|||||||
this.autoSaveTask = null;
|
this.autoSaveTask = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectControlPage (model) {
|
handleSelectControlPage (model, oldModel) {
|
||||||
if (this.$refs.mapOperate) {
|
if (this.$refs.mapOperate) {
|
||||||
this.$refs.mapOperate.handleSelectControlPage(model);
|
this.$refs.mapOperate.handleSelectControlPage(model, oldModel);
|
||||||
this.$store.dispatch('menuOperation/setMapDrawSelectCount');
|
this.$store.dispatch('menuOperation/setMapDrawSelectCount');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -185,8 +186,11 @@ export default {
|
|||||||
return device;
|
return device;
|
||||||
},
|
},
|
||||||
onSelect(device) {
|
onSelect(device) {
|
||||||
|
if (this.selected) {
|
||||||
|
this.oldSelected = this.selected;
|
||||||
|
}
|
||||||
this.selected = device || null;
|
this.selected = device || null;
|
||||||
this.selected && this.handleSelectControlPage(device);
|
this.selected && this.handleSelectControlPage(device, this.oldSelected);
|
||||||
},
|
},
|
||||||
onContextmenu(em) {
|
onContextmenu(em) {
|
||||||
this.point = {
|
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;
|
const type = device._type;
|
||||||
if (this.stationType) {
|
if (this.stationType) {
|
||||||
this.enabledTab = 'Station';
|
this.enabledTab = 'Station';
|
||||||
@ -290,6 +291,12 @@ export default {
|
|||||||
this.enabledTab = 'Section';
|
this.enabledTab = 'Section';
|
||||||
} else {
|
} else {
|
||||||
this.enabledTab = type;
|
this.enabledTab = type;
|
||||||
|
if (type === 'Section' && device ) {
|
||||||
|
device.instance.drawSelected(true);
|
||||||
|
}
|
||||||
|
if ( oldDevice && oldDevice._type === 'Section') {
|
||||||
|
oldDevice.instance.drawSelected(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
stationEnabledTab(type) {
|
stationEnabledTab(type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user