diff --git a/package.json b/package.json index 6c3cf6c4b..55a8eb7a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bootx-platform-vue3", - "version": "1.1.3", + "version": "1.x", "author": { "name": "xxm" }, @@ -46,7 +46,6 @@ "ant-design-vue": "^3.2.15", "axios": "^0.26.1", "bpmn-js": "^10.3.0", - "china-area-data": "^5.0.1", "codemirror": "^5.65.3", "cron-parser": "^4.6.0", "cropperjs": "^1.5.12", diff --git a/src/api/common/ChinaRegion.api.ts b/src/api/common/ChinaRegion.api.ts new file mode 100644 index 000000000..f7d4e2276 --- /dev/null +++ b/src/api/common/ChinaRegion.api.ts @@ -0,0 +1,44 @@ +import { defHttp } from '/@/utils/http/axios' +import { Result } from '/#/axios' + +/** + * 获取一级行政区 + */ +export function findAllProvince() { + return defHttp.get>({ + url: '/china/region/findAllProvince', + }) +} + +/** + * 获取省市二级联动列表 + */ +export function findAllProvinceAndCity() { + return defHttp.get>({ + url: '/china/region/findAllProvinceAndCity', + }) +} + +/** + * 获取省市三级联动列表 + */ +export function findAllProvinceAndCityAndArea() { + return defHttp.get>({ + url: '/china/region/findAllProvinceAndCityAndArea', + }) +} + +/** + * 区域表 + */ +export interface Region { + // 区划id + id?: number + // 区域名称 + name?: string + // 上级区划id + pid?: number + // 区划级别 + level?: 1 | 2 | 3 | 4 + children?: Region[] +}