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" >