From 3e4feedc3590a5f66b84a28a27d6fc64b05c1ad6 Mon Sep 17 00:00:00 2001 From: zzy Date: Mon, 20 Apr 2026 14:57:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E5=8C=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/community/community/index.ts | 57 +-- src/api/community/house/index.ts | 1 - .../community/community/CommunityForm.vue | 265 +++----------- .../components/CommunityTreeSelect/index.vue | 117 ------ src/views/community/community/index.vue | 345 ++++++++---------- 5 files changed, 216 insertions(+), 569 deletions(-) delete mode 100644 src/views/community/community/components/CommunityTreeSelect/index.vue diff --git a/src/api/community/community/index.ts b/src/api/community/community/index.ts index 92b6f11..6844d87 100644 --- a/src/api/community/community/index.ts +++ b/src/api/community/community/index.ts @@ -1,76 +1,49 @@ import request from '@/config/axios' -/** 小区信息主表(comm_community)信息 */ export interface Community { - id: number; // 主键ID,和部门id一致 - communityName?: string; // 小区名称 - areaType?: number; // 区域类型:0=街道,1=社区,2=小区 - streetId?: number; // 所属街道ID - districtId?: number; // 所属社区ID - communityAddress?: string; // 小区详细地址 - longitude: number; // 小区经度坐标 - houseNum: number; // 房屋数 - latitude: number; // 小区纬度坐标 - residentNum: number; // 常驻人口数 - propertyCompany: string; // 小区物业名称 - floatingNum: number; // 流动人口数 - visitAudit?: boolean; // 来访审核配置:1需要审核,0无需审核 - propertyNum: number; // 物业人数 - gateAudit?: boolean; // 道闸申请配置:1需要审核,0无需审核 - committeeNum: number; // 业委会人数 - } - -/** 街道社区树形结构 */ -export interface CommunityTree { - id: number; // 节点ID - name: string; // 节点名称 - areaType: number; // 区域类型:0=街道,1=社区,2=小区 - parentId: number; // 父节点ID - children?: CommunityTree[]; // 子节点列表 + id: number + communityName?: string + streetName?: string + districtName?: string + communityAddress?: string + longitude?: number + latitude?: number + propertyCompany?: string + visitAudit?: boolean + gateAudit?: boolean + houseNum?: number + residentNum?: number + floatingNum?: number + propertyNum?: number + committeeNum?: number } -// 小区信息主表(comm_community) API export const CommunityApi = { - // 查询小区信息主表(comm_community)分页 getCommunityPage: async (params: any) => { return await request.get({ url: `/community/community/page`, params }) }, - // 查询小区信息主表(comm_community)详情 getCommunity: async (id: number) => { return await request.get({ url: `/community/community/get?id=` + id }) }, - // 新增小区信息主表(comm_community) createCommunity: async (data: Community) => { return await request.post({ url: `/community/community/create`, data }) }, - // 修改小区信息主表(comm_community) updateCommunity: async (data: Community) => { return await request.put({ url: `/community/community/update`, data }) }, - // 删除小区信息主表(comm_community) deleteCommunity: async (id: number) => { return await request.delete({ url: `/community/community/delete?id=` + id }) }, - /** 批量删除小区信息主表(comm_community) */ deleteCommunityList: async (ids: number[]) => { return await request.delete({ url: `/community/community/delete-list?ids=${ids.join(',')}` }) }, - // 导出小区信息主表(comm_community) Excel exportCommunity: async (params) => { return await request.download({ url: `/community/community/export-excel`, params }) - }, - - // 获取街道和社区树形结构 - getStreetCommunityTree: async (streetId?: number) => { - return await request.get({ - url: `/community/community/street-community-tree`, - params: streetId ? { streetId } : {} - }) } } diff --git a/src/api/community/house/index.ts b/src/api/community/house/index.ts index 87adc94..1ad9322 100644 --- a/src/api/community/house/index.ts +++ b/src/api/community/house/index.ts @@ -1,5 +1,4 @@ import request from '@/config/axios' -import type {Dayjs} from 'dayjs'; /** 房屋信息主信息 */ export interface House { diff --git a/src/views/community/community/CommunityForm.vue b/src/views/community/community/CommunityForm.vue index 5352663..36c8c50 100644 --- a/src/views/community/community/CommunityForm.vue +++ b/src/views/community/community/CommunityForm.vue @@ -8,74 +8,46 @@ v-loading="formLoading" >
- - - - + + - - + + - - - - - + + - - - - - - - - + - - + - - + - - + - -
+ +
+ + + + + + + +
+ +
diff --git a/src/views/community/community/components/CommunityTreeSelect/index.vue b/src/views/community/community/components/CommunityTreeSelect/index.vue deleted file mode 100644 index cba5662..0000000 --- a/src/views/community/community/components/CommunityTreeSelect/index.vue +++ /dev/null @@ -1,117 +0,0 @@ - - - - diff --git a/src/views/community/community/index.vue b/src/views/community/community/index.vue index 660491e..3c9f8d9 100644 --- a/src/views/community/community/index.vue +++ b/src/views/community/community/index.vue @@ -1,136 +1,147 @@