diff --git a/.env.development b/.env.development index c022f39..051bbe9 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,7 @@ # 页面标题 -VITE_APP_TITLE = -VITE_APP_LOGO_TITLE = RuoYi-Vue-Plus +VITE_APP_TITLE = 智慧物业后台管理系统 + +VITE_APP_LOGO_TITLE = 智慧物业后台管理系统 # 开发环境配置 VITE_APP_ENV = 'development' @@ -17,7 +18,7 @@ VITE_APP_MONITOR_ADMIN = 'http://192.168.0.222/admin/applications' # SnailJob 控制台地址 VITE_APP_SNAILJOB_ADMIN = 'http://192.168.0.222/snail-job' -VITE_APP_PORT = 80 +VITE_APP_PORT = 5173 # 接口加密功能开关(如需关闭 后端也必须对应关闭) VITE_APP_ENCRYPT = true diff --git a/package.json b/package.json index 59666e4..5b35286 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "axios": "1.13.6", "crypto-js": "4.2.0", "echarts": "6.0.0", + "element-china-area-data": "^6.1.0", "element-plus": "2.13.5", "file-saver": "2.0.5", "highlight.js": "11.11.1", diff --git a/src/api/system/community/index.ts b/src/api/system/community/index.ts new file mode 100644 index 0000000..0950a35 --- /dev/null +++ b/src/api/system/community/index.ts @@ -0,0 +1,59 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { communitylist_rows_type } from './type'; + +// 查询小区列表 +export function getCommunitylistAPI(): AxiosPromise { + return request({ + url: '/village/list', + method: 'get' + }); +} +/** 通过小区id获取小区信息 */ +export function getVillageByIdAPI(id: string): AxiosPromise { + return request({ + url: `/village/${id}`, + method: 'get' + }); +} +/** 删除小区 */ +export function deleteVillageByIdAPI(id: number): AxiosPromise { + return request({ + url: `/village/${id}`, + method: 'delete' + }); +} +/** 上传小区图片 */ +export function uploadVillageImageAPI(formdata: FormData): AxiosPromise<{ fileName: string; url: string; ossId: string }[]> { + return request({ + url: `/village/uploadImages`, + method: 'post', + headers: { + 'Content-Type': 'multipart/form-data' + }, + data: formdata + }); +} +/** 添加小区 */ +export function addVillageAPI(data: T) { + return request({ + url: `/village`, + method: 'post', + data: data + }); +} +/** 添加小区 */ +export function editVillageAPI(data: T) { + return request({ + url: `/village`, + method: 'put', + data: data + }); +} +/**切换小区 */ +export function switchVillageAPI(villageId: number) { + return request({ + url: `/village/switchVillage/${villageId}`, + method: 'POST' + }); +} diff --git a/src/api/system/community/type.ts b/src/api/system/community/type.ts new file mode 100644 index 0000000..4dd09fe --- /dev/null +++ b/src/api/system/community/type.ts @@ -0,0 +1,20 @@ +export interface communitylist_rows_type { + villageId?: number; + villageName: string; + villageCode: string; + address: string; + houseUse: number | null; + villageArea: number; + remark: string; + parkingSpaceCount: number; + villageImageUrl: string; + city: string | string[]; + status: '0' | '1'; + manageName: string; + managePhone: string; + manageVx: string; + manageEmail: string; + manageQq: string; + completDate: string; + choiceStatus: 0 | 1; +} diff --git a/src/api/system/house/index.ts b/src/api/system/house/index.ts new file mode 100644 index 0000000..0d79577 --- /dev/null +++ b/src/api/system/house/index.ts @@ -0,0 +1,24 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { BuildingUnit, BuildingVo } from './type'; + +// 楼栋--------------------------------------------------------------------------------------- +// 根据 小区id 和 类型 查询楼栋信息 +export function getBuildinglistAPI(villageId: number, buildingUse: number): AxiosPromise { + return request({ + url: '/building/byVillage', + method: 'get', + params: { + villageId: villageId, + buildingUse: buildingUse + } + }); +} + +// 房屋---------------------------------------------------------------------------------------------- +export function getHouselistAPI(buildingId: number): AxiosPromise { + return request({ + url: `/house/groupByUnitTree/${buildingId}`, + method: 'get' + }); +} diff --git a/src/api/system/house/type.ts b/src/api/system/house/type.ts new file mode 100644 index 0000000..58f7ff7 --- /dev/null +++ b/src/api/system/house/type.ts @@ -0,0 +1,65 @@ +export interface BuildingVo { + /** + * 楼栋名称/编号 + */ + buildingName: string; + /** + * 0住宅 1办公 2商用 3公寓 + */ + buildingUse: number; + /** + * 楼栋结构 + */ + buildStructure?: string; + /** + * 楼高 + */ + buildTall?: string; + /** + * 楼栋朝向 + */ + buildToward?: string; + /** + * 层数 + */ + floorCount?: number; + /** + * 楼栋ID + */ + id: number; + /** + * 备注 + */ + remark?: string; + /** + * 单元数 + */ + unitCount?: number; + /** + * 所属小区ID + */ + villageId?: number; + villageName?: string; +} + +// 楼栋 +export interface BuildingUnit { + actualFloorCount: number; + buildingFloorCount: number; + buildingId: number; + buildingName: string; + totalHouses: number; + unitNo: string; + floors: string; + floors_Json?: FloorsType[]; +} +// 楼层 +export interface FloorsType { + floorNo: string; + houses: HouseType[]; +} +// 房间 +export interface HouseType { + houseId: number; + houseNo: string; +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 72c6fd8..200a7a4 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -17,15 +17,6 @@ body { background: var(--el-bg-color-page); font-family: 'MiSans', 'HarmonyOS Sans SC', 'PingFang SC', 'Source Han Sans SC', 'Noto Sans SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; } -/* 图片统一初始化 */ -img { - border: none; - vertical-align: middle; - max-width: 100%; - height: auto; - -webkit-user-drag: none; - user-select: none; -} label { font-weight: 600; } diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index f21effd..c454020 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -38,7 +38,6 @@ const getBreadcrumb = () => { matched = [{ path: '/index', meta: { title: '首页' } }].concat(matched); } levelList.value = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false); - console.log(levelList.value); }; const findPathNum = (str, char = '/') => { if (typeof str !== 'string' || str.length === 0) return 0; diff --git a/src/components/ContextMenu/index.vue b/src/components/ContextMenu/index.vue index 7387ae7..e0efd67 100644 --- a/src/components/ContextMenu/index.vue +++ b/src/components/ContextMenu/index.vue @@ -45,7 +45,6 @@ const open = async (e: MouseEvent, value: any) => { if (left + rect.width > window.innerWidth) { left = window.innerWidth - rect.width - 8; } - console.log('window', window.innerWidth); // 下边界碰撞 if (top + rect.height > window.innerHeight) { @@ -69,7 +68,6 @@ const open = async (e: MouseEvent, value: any) => { // 关闭 const close = () => { show.value = false; - console.log('close'); document.removeEventListener('click', close); document.removeEventListener('contextmenu', close); }; diff --git a/src/components/Pageheader/index.vue b/src/components/Pageheader/index.vue index 918708f..ed01728 100644 --- a/src/components/Pageheader/index.vue +++ b/src/components/Pageheader/index.vue @@ -14,8 +14,6 @@