|
@@ -266,7 +266,7 @@ export default defineComponent({
|
|
|
flag = true
|
|
|
if (f.get('featureType') === 'qy') { // 企业
|
|
|
// 恢复上一个要素的样式
|
|
|
- if (f.getId() !== state.qyParams.tempFeature?.getId() || state.qyParams.overlay.getPosition() === undefined) {
|
|
|
+ if (f.getId() !== state.qyParams.tempFeature?.getId()) {
|
|
|
state.qyParams.tempFeature?.get('resetStyle')?.()
|
|
|
state.qyParams.analysisSource?.clear()
|
|
|
// 新的要素
|
|
@@ -281,7 +281,11 @@ export default defineComponent({
|
|
|
state.qyParams.tempFeature = f
|
|
|
state.qyParams.overlay.setPosition(f.getGeometry().getCoordinates())
|
|
|
} else {
|
|
|
- state.qyParams.overlay.setPosition(undefined)
|
|
|
+ if (state.qyParams.overlay.getPosition() === undefined) {
|
|
|
+ state.qyParams.overlay.setPosition(f.getGeometry().getCoordinates())
|
|
|
+ } else {
|
|
|
+ state.qyParams.overlay.setPosition(undefined)
|
|
|
+ }
|
|
|
}
|
|
|
} else if (f.get('featureType') === 'sb') { // 设备
|
|
|
// 恢复上一个要素的样式
|