feat(图表): 地图支持自定义区域

This commit is contained in:
wisonic
2024-11-27 11:58:58 +08:00
parent a6847abeb5
commit bc4092ce9a
25 changed files with 1358 additions and 119 deletions

View File

@@ -23,3 +23,31 @@ const isCustomGeo = (id: string) => {
const getBusiGeoCode = (id: string) => {
return id.substring(4)
}
export const listCustomGeoArea = (): Promise<IResponse<CustomGeoArea[]>> => {
return request.get({ url: '/customGeo/geoArea/list' })
}
export const getCustomGeoArea = (id: string): Promise<IResponse<CustomGeoSubArea[]>> => {
return request.get({ url: `/customGeo/geoArea/${id}` })
}
export const deleteCustomGeoArea = (id: string) => {
return request.delete({ url: `/customGeo/geoArea/${id}` })
}
export const saveCustomGeoArea = (area: CustomGeoArea) => {
return request.post({ url: '/customGeo/geoArea/save', data: area })
}
export const deleteCustomGeoSubArea = (id: string) => {
return request.delete({ url: `/customGeo/geoSubArea/${id}` })
}
export const saveCustomGeoSubArea = (area: CustomGeoSubArea) => {
return request.post({ url: '/customGeo/geoSubArea/save', data: area })
}
export const listSubAreaOptions = (): Promise<IResponse<AreaNode[]>> => {
return request.get({ url: '/customGeo/geoSubArea/options' })
}