From 8c18fdda27926b26cec7ba2dfd8bcfd8d26786f1 Mon Sep 17 00:00:00 2001 From: xxm Date: Sat, 24 Dec 2022 23:26:52 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E8=A1=8C=E6=94=BF=E5=8C=BA=E5=88=92?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 +-- src/api/common/ChinaRegion.api.ts | 44 +++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 src/api/common/ChinaRegion.api.ts 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[] +}