|
@@ -424,6 +424,10 @@ export default defineComponent({
|
|
|
state.qyParams.overlay.setPosition(feat.getGeometry().getCoordinates())
|
|
|
store.dispatch('gis/LOAD_ACTIVE_QY_ID', v.id)
|
|
|
})
|
|
|
+ feat.set('reset', () => {
|
|
|
+ onCloseQy()
|
|
|
+ onCloseSb()
|
|
|
+ })
|
|
|
features.push(feat)
|
|
|
} catch (e) {
|
|
|
console.error('异常企业:', v)
|
|
@@ -469,16 +473,16 @@ export default defineComponent({
|
|
|
})
|
|
|
}
|
|
|
const onCloseQy = () => {
|
|
|
- state.qyParams.overlay.setPosition(undefined)
|
|
|
- state.qyParams.tempFeature.get('resetStyle')()
|
|
|
+ state.qyParams.overlay?.setPosition(undefined)
|
|
|
+ state.qyParams.tempFeature?.get('resetStyle')()
|
|
|
state.qyParams.tempFeature = null
|
|
|
state.qyParams.qyInfo = {}
|
|
|
state.qyParams.analysisSource?.clear()
|
|
|
store.dispatch('gis/LOAD_ACTIVE_QY_ID', null)
|
|
|
}
|
|
|
const onCloseSb = () => {
|
|
|
- state.qyParams.sbOverlay.setPosition(undefined)
|
|
|
- state.qyParams.tempSbFeature.get('resetStyle')()
|
|
|
+ state.qyParams.sbOverlay?.setPosition(undefined)
|
|
|
+ state.qyParams.tempSbFeature?.get('resetStyle')()
|
|
|
state.qyParams.tempSbFeature = null
|
|
|
}
|
|
|
const handleRangeBlur = () => {
|