diff --git a/package.json b/package.json index a723577..edcfc80 100644 --- a/package.json +++ b/package.json @@ -35,11 +35,12 @@ "echarts": "6.0.0", "element-china-area-data": "^6.1.0", "element-plus": "2.13.5", - "file-saver": "2.0.5", + "file-saver": "^2.0.5", "highlight.js": "11.11.1", "image-conversion": "2.1.1", "js-cookie": "3.0.5", "jsencrypt": "3.5.4", + "jszip": "^3.10.1", "nprogress": "0.2.0", "pinia": "3.0.4", "pinia-plugin-persistedstate": "^4.7.1", @@ -56,7 +57,7 @@ "devDependencies": { "@iconify/json": "^2.2.448", "@types/crypto-js": "4.2.2", - "@types/file-saver": "2.0.7", + "@types/file-saver": "^2.0.7", "@types/js-cookie": "3.0.6", "@types/node": "^25.4.0", "@types/nprogress": "0.2.3", diff --git a/src/api/system/Banner/index.ts b/src/api/system/Banner/index.ts index 7cbdc5c..c0880a4 100644 --- a/src/api/system/Banner/index.ts +++ b/src/api/system/Banner/index.ts @@ -61,3 +61,18 @@ export const delBanner = (id: string | number | Array) => { method: 'delete' }); }; + +/** + * 改变Banner图管理 状态 + * @param id + */ +export const switchBanner = (id: string, status: string) => { + return request({ + url: '/banner/changeStatus', + method: 'GET', + params: { + id, + status + } + }); +}; diff --git a/src/api/system/Banner/type.ts b/src/api/system/Banner/type.ts index 67d5637..b191614 100644 --- a/src/api/system/Banner/type.ts +++ b/src/api/system/Banner/type.ts @@ -17,9 +17,9 @@ export interface BannerVO { /** * 排序 */ - order: number; url: string; - jump_link: string; + byOrder: number; + link: string; /** * 小区id */ @@ -45,7 +45,8 @@ export interface BannerForm extends BaseEntity { /** * 排序 */ - order?: number; + byOrder?: number; + link: string; /** * 小区id @@ -67,8 +68,8 @@ export interface BannerQuery extends PageQuery { /** * 排序 */ - order?: number; - + byOrder: number; + link: string; /** * 小区id */ diff --git a/src/api/system/InspectionPlan/index.ts b/src/api/system/InspectionPlan/index.ts index 847d85d..2c3aa82 100644 --- a/src/api/system/InspectionPlan/index.ts +++ b/src/api/system/InspectionPlan/index.ts @@ -61,3 +61,15 @@ export const delPlan = (id: string | number | Array) => { method: 'delete' }); }; +/** + * 改变巡检计划状态 + * @param id + * @param status + */ +export const changePlanStatus = (id: string, status: string) => { + return request({ + url: '/inspection/plan/changeStatus', + method: 'put', + data: { id, status } + }); +}; diff --git a/src/api/system/InspectionPoint/index.ts b/src/api/system/InspectionPoint/index.ts index 4a809eb..678e1a8 100644 --- a/src/api/system/InspectionPoint/index.ts +++ b/src/api/system/InspectionPoint/index.ts @@ -61,3 +61,13 @@ export const delPoint = (id: string | number | Array) => { method: 'delete' }); }; +/** + * 修改巡检点状态 + * @param id + */ +export const changePointStatus = (id: string, status: string) => { + return request({ + url: '/inspection/point/changeStatus?id=' + id + '&status=' + status, + method: 'PUT' + }); +}; diff --git a/src/api/system/InspectionRecord/type.ts b/src/api/system/InspectionRecord/type.ts index 9e8c6c2..8423e4b 100644 --- a/src/api/system/InspectionRecord/type.ts +++ b/src/api/system/InspectionRecord/type.ts @@ -1,15 +1,15 @@ export interface RecordVO { - actualEndTime?: null; - actualStartTime?: null; - createByName?: null; + actualEndTime?: string; + actualStartTime?: string; + createByName?: string; createTime?: string; - details?: null; + details?: []; id?: string; inspectorId?: number; inspectorName?: string; planId?: string; planName?: string; - remark?: null; + remark?: string; routeId?: string; routeName?: string; status?: number; diff --git a/src/api/system/InspectionRoute/type.ts b/src/api/system/InspectionRoute/type.ts index 44197ce..808fcf7 100644 --- a/src/api/system/InspectionRoute/type.ts +++ b/src/api/system/InspectionRoute/type.ts @@ -26,6 +26,8 @@ export interface RouteVO { */ estimatedTime: number; + items: { itemName: string }[]; + PointsName: string; /** * 备注 */ diff --git a/src/api/system/NoticePc/type.ts b/src/api/system/NoticePc/type.ts index 4f4ca9f..ba83b1d 100644 --- a/src/api/system/NoticePc/type.ts +++ b/src/api/system/NoticePc/type.ts @@ -22,12 +22,12 @@ export interface NoticeVO { /** * 紧急程度 0=普通 1=紧急 2=非常紧急 */ - urgencyLevel: string; + urgencyLevel: number; /** * 发布状态 0=草稿 1=已发布 */ - publishStatus: string; + publishStatus: number; /** * 发布人 @@ -64,12 +64,12 @@ export interface NoticeForm extends BaseEntity { /** * 紧急程度 0=普通 1=紧急 2=非常紧急 */ - urgencyLevel?: string; + urgencyLevel?: number; /** * 发布状态 0=草稿 1=已发布 */ - publishStatus?: string; + publishStatus?: number; /** * 发布人 @@ -101,12 +101,12 @@ export interface NoticeQuery extends PageQuery { /** * 紧急程度 0=普通 1=紧急 2=非常紧急 */ - urgencyLevel?: string; + urgencyLevel?: number; /** * 发布状态 0=草稿 1=已发布 */ - publishStatus?: string; + publishStatus?: number; /** * 发布人 diff --git a/src/api/system/ParkingCost/type.ts b/src/api/system/ParkingCost/type.ts index e67cebc..79943ba 100644 --- a/src/api/system/ParkingCost/type.ts +++ b/src/api/system/ParkingCost/type.ts @@ -12,7 +12,7 @@ export interface ParkingCostVO { /** * 车位id */ - parkingId: string | number; + parkingId: string; /** * 收费项目 0临时停车 @@ -79,7 +79,7 @@ export interface ParkingCostForm extends BaseEntity { /** * 车位id */ - parkingId?: string | number; + parkingId?: string; /** * 收费项目 0临时停车 @@ -141,7 +141,7 @@ export interface ParkingCostQuery extends PageQuery { /** * 车位id */ - parkingId?: string | number; + parkingId?: string; /** * 收费项目 0临时停车 diff --git a/src/api/system/Questionnaire/type.ts b/src/api/system/Questionnaire/type.ts index a6e6778..b126254 100644 --- a/src/api/system/Questionnaire/type.ts +++ b/src/api/system/Questionnaire/type.ts @@ -37,7 +37,9 @@ export interface QuestionnaireVO { /** * 部分业主串 ”,“号隔开 */ - residents: string | number; + residents: string; + startTime: string; + endTime: string; /** * 备注 @@ -69,7 +71,7 @@ export interface QuestionnaireForm extends BaseEntity { /** * 问卷题目结构(JSON数组) */ - content?: string; + content?: string | QuestionComponentItem[]; /** * 状态:0-草稿 1-已发布 2-已结束 @@ -158,6 +160,6 @@ export interface QuestionComponentItem { export interface QuestionComponentnaireForm { id?: string | number | null; title: string; - description: string; + description?: string; content: QuestionComponentItem[]; } diff --git a/src/api/system/Repair/type.ts b/src/api/system/Repair/type.ts index 468fc2b..b76bdc7 100644 --- a/src/api/system/Repair/type.ts +++ b/src/api/system/Repair/type.ts @@ -57,7 +57,7 @@ export interface RepairVO { /** * 维修人员id */ - repairId: string | number; + repairId: string; /** 名称(小区名-楼栋名-单元号-房间号) */ name?: string; } diff --git a/src/api/system/RepairProject/type.ts b/src/api/system/RepairProject/type.ts index 77da46b..e88deed 100644 --- a/src/api/system/RepairProject/type.ts +++ b/src/api/system/RepairProject/type.ts @@ -2,7 +2,7 @@ export interface RepairProjectVO { /** * 维修项目表id */ - id: string | number; + id: string; /** * 维修项目名 @@ -12,7 +12,7 @@ export interface RepairProjectVO { /** * 父级项目id */ - parentId: string | number; + parentId: string; /** * 项目类型 0公共报修 1个人报修 @@ -23,7 +23,7 @@ export interface RepairProjectVO { * 项目层级 0,1 */ projectLevel: number; - + children?: []; /** * 排序 (数越小越靠前) */ @@ -39,7 +39,7 @@ export interface RepairProjectForm extends BaseEntity { /** * 维修项目表id */ - id?: string | number; + id?: string; /** * 维修项目名 @@ -49,7 +49,7 @@ export interface RepairProjectForm extends BaseEntity { /** * 父级项目id */ - parentId?: string | number; + parentId?: string; /** * 项目类型 0公共报修 1个人报修 @@ -101,7 +101,7 @@ export interface RepairProjectQuery extends PageQuery { /** * 父级项目id */ - parentId?: string | number; + parentId?: string; /** * 项目类型 0公共报修 1个人报修 diff --git a/src/api/system/SdbBill/type.ts b/src/api/system/SdbBill/type.ts index 068c368..5b6a0ad 100644 --- a/src/api/system/SdbBill/type.ts +++ b/src/api/system/SdbBill/type.ts @@ -117,6 +117,8 @@ export interface BillQuery extends PageQuery { */ chargeItemId?: string | number; + // type: string; + /** * 收费范围 0全体业主 1部分业主 */ diff --git a/src/api/system/SdbWaterDevice/index.ts b/src/api/system/SdbWaterDevice/index.ts index 23728df..187d047 100644 --- a/src/api/system/SdbWaterDevice/index.ts +++ b/src/api/system/SdbWaterDevice/index.ts @@ -96,3 +96,14 @@ export const WaterDeviceUpdateBin = (data: { deviceCodes: string[]; urlA: string data: data }); }; + +/** + * 获取设备最新的抄表记录 + * @param deviceCodes + */ +export const latestRecord = (deviceCodes: string) => { + return request({ + url: `/waterDevice/latestRecord/${deviceCodes}`, + method: 'GET' + }); +}; diff --git a/src/api/system/Twarehouse/type.ts b/src/api/system/Twarehouse/type.ts index c37ba87..92206cf 100644 --- a/src/api/system/Twarehouse/type.ts +++ b/src/api/system/Twarehouse/type.ts @@ -2,7 +2,7 @@ export interface WarehouseVO { /** * 仓库ID */ - id: string | number; + id: string; /** * 仓库名称* @@ -12,7 +12,7 @@ export interface WarehouseVO { /** * 仓库归属id*(关联com_village) */ - villageId: number; + villageId: string; /** * 联系人* @@ -44,7 +44,7 @@ export interface WarehouseForm extends BaseEntity { /** * 仓库ID */ - id?: string | number; + id?: string; /** * 仓库名称* diff --git a/src/api/system/cars/type.ts b/src/api/system/cars/type.ts index 188acd0..0fa7767 100644 --- a/src/api/system/cars/type.ts +++ b/src/api/system/cars/type.ts @@ -17,7 +17,7 @@ export interface CarVO { /** * 持有人id(住户表id) */ - residentId: string | number; + residentId: string; /** * 车牌号 diff --git a/src/api/system/equipment/Category/type.ts b/src/api/system/equipment/Category/type.ts index 4d7ea22..83cc39f 100644 --- a/src/api/system/equipment/Category/type.ts +++ b/src/api/system/equipment/Category/type.ts @@ -12,7 +12,7 @@ export interface DeviceCategoryVO { /** * 状态 0正常 1停用 */ - status: string; + status: number; /** * 备注 @@ -34,7 +34,7 @@ export interface DeviceCategoryForm extends BaseEntity { /** * 状态 0正常 1停用 */ - status?: string; + status?: number; /** * 备注 @@ -51,7 +51,7 @@ export interface DeviceCategoryQuery extends PageQuery { /** * 状态 0正常 1停用 */ - status?: string; + status?: number; /** * 日期范围参数 diff --git a/src/api/system/equipment/archive/type.ts b/src/api/system/equipment/archive/type.ts index af79530..7afb7f6 100644 --- a/src/api/system/equipment/archive/type.ts +++ b/src/api/system/equipment/archive/type.ts @@ -1,4 +1,5 @@ export interface DeviceVO { + categoryName: string; /** * 主键ID */ diff --git a/src/api/system/house/index.ts b/src/api/system/house/index.ts index f81ee4e..4753f1f 100644 --- a/src/api/system/house/index.ts +++ b/src/api/system/house/index.ts @@ -46,7 +46,7 @@ export function editBuildingApi(data: addBuildingType & { id: string }) { }); } /** 删除楼栋 */ -export function deleteBuildingApi(id: number) { +export function deleteBuildingApi(id: string) { return request({ url: `/building/${id}`, method: 'DELETE' @@ -55,9 +55,9 @@ export function deleteBuildingApi(id: number) { // 房屋---------------------------------------------------------------------------------------------- /** 根据 楼栋id 查询房屋信息 */ -export function getHouselistAPI(buildingId: string): AxiosPromise { +export function getHouselistAPI(buildingId: string, houseName: string = ''): AxiosPromise { return request({ - url: `/house/groupByUnitTree/${buildingId}`, + url: `/house/groupByUnitTree/${buildingId}?houseName=${houseName}`, method: 'get' }); } diff --git a/src/api/system/houseRental/type.ts b/src/api/system/houseRental/type.ts index fbc8630..30f7dba 100644 --- a/src/api/system/houseRental/type.ts +++ b/src/api/system/houseRental/type.ts @@ -2,7 +2,7 @@ export interface HouseRentalVO { /** * id 房屋租赁表id */ - id?: string | number; + id: string | number; /** * 租户姓名 @@ -109,7 +109,7 @@ export interface HouseRentalForm extends BaseEntity { /** * 0 整租 1 合租 */ - rentalType?: number; + rentalType?: string; /** * 房屋朝向 @@ -171,7 +171,7 @@ export interface HouseRentalQuery extends PageQuery { /** * 房屋用途 */ - houseUse?: number; + houseUse?: string; /** * 租户姓名 */ @@ -185,7 +185,7 @@ export interface HouseRentalQuery extends PageQuery { /** * 0 整租 1 合租 */ - rentalType?: number; + rentalType?: string; /** * 房屋朝向 diff --git a/src/api/system/parking/index.ts b/src/api/system/parking/index.ts index bccf26b..22c9f48 100644 --- a/src/api/system/parking/index.ts +++ b/src/api/system/parking/index.ts @@ -61,3 +61,26 @@ export const delParking = (id: string | number | Array) => { method: 'delete' }); }; +/** + * 改变车位审核装填 + * @param id + */ +export const getParkingReview = (id: string) => { + return request({ + url: '/parkingReview/checkStatus', + method: 'POST' + }); +}; +/** + * 获取车位审核信息 + * @param id + */ +export const getParkingReviewInfo = (id: string) => { + return request({ + url: '/parking/checkInfo', + method: 'POST', + data: { + id + } + }); +}; diff --git a/src/api/system/parking/type.ts b/src/api/system/parking/type.ts index 1e81e7e..a5612bd 100644 --- a/src/api/system/parking/type.ts +++ b/src/api/system/parking/type.ts @@ -32,7 +32,7 @@ export interface ParkingVO { /** * 住户id */ - residentId: string | number; + residentId: string; /** * 添加时间 @@ -88,7 +88,7 @@ export interface ParkingForm extends BaseEntity { /** * 住户id */ - residentId?: string | number; + residentId?: string; /** * 添加时间 @@ -160,7 +160,7 @@ export interface ParkingQuery extends PageQuery { /** * 住户id */ - residentId?: string | number; + residentId?: string; /** * 添加时间 diff --git a/src/api/system/resident/type.ts b/src/api/system/resident/type.ts index efd2a3f..20e6385 100644 --- a/src/api/system/resident/type.ts +++ b/src/api/system/resident/type.ts @@ -22,7 +22,7 @@ export interface ResidentVO { /** * 0 男性 1女性 */ - gender: number; + gender: string; /** * 身份证号 @@ -97,7 +97,7 @@ export interface ResidentForm extends BaseEntity { /** * 0 男性 1女性 */ - gender?: number; + gender?: string; /** * 身份证号 diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 1ac8a4d..5c52ede 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -29,7 +29,7 @@ export interface UserQuery extends PageQuery { * 用户返回对象 */ export interface UserVO extends BaseEntity { - userId: string | number; + userId: string; tenantId: string; deptId: number; userName: string; diff --git a/src/api/workflow/category/types.ts b/src/api/workflow/category/types.ts index 99a53a6..3117e1a 100644 --- a/src/api/workflow/category/types.ts +++ b/src/api/workflow/category/types.ts @@ -1,8 +1,9 @@ export interface CategoryTreeVO { - id: number | string; + id: string; label: string; parentId: number | string; weight: number; + categoryName: string; children: CategoryTreeVO[]; } export interface CategoryVO { diff --git a/src/api/workflow/index.ts b/src/api/workflow/index.ts index 2054b19..bfbfa7f 100644 --- a/src/api/workflow/index.ts +++ b/src/api/workflow/index.ts @@ -12,6 +12,8 @@ export const workSpaceTotalListApi = ( totalResident: number; totalHouse: number; totalParking: number; + totalDevice: number; + totalMaterial: number; totalComplaint: number; }> => { return request({ @@ -22,3 +24,263 @@ export const workSpaceTotalListApi = ( } }); }; +/** + * 查询近一周报修趋势 + * @param query + * @returns {*} + */ +export const workSpaceRepairTrendListApi = ( + villageId: string +): Promise< + { + date: string; + count: number; + }[] +> => { + return request({ + url: '/workSpace/last7DaysRepairCount', + method: 'GET', + params: { + villageId: villageId + } + }); +}; +/** + * 查询近一周收入趋势 + * @param query + * @returns {*} + */ +export const workSpaceIncomeTrendListApi = ( + villageId: string, + type: number +): Promise< + { + date: string; + income: number; + }[] +> => { + return request({ + url: '/workSpace/last7DaysIncomeTrend', + method: 'GET', + params: { + villageId: villageId, + type: type + } + }); +}; +/** + * 查询当日天气 + * @param query + * @returns {*} + */ +export const workSpaceWeatherApi = (city: string): Promise => { + const url = 'https://uapis.cn/api/v1/misc/weather?city=' + city + '&lang=zh'; + return new Promise((resolve, reject) => { + fetch(url, { + method: 'GET' + }) + .then((res) => res.json()) + .then((res) => { + resolve(res); + }) + .catch((err) => { + reject(err); + }); + }); +}; + +type reponseType = { + // 省份 + 'province': string; + // 城市名 + 'city': string; + // 区县或更细一级的行政区名称。自动按 IP 定位时更常见。 + 'district': string; + // 行政区划代码(部分数据源可能为空) + 'adcode': string; + // 天气状况描述。默认返回中文,传 `lang=en` 时返回英文。非固定枚举。 + 'weather': string; + // 天气图标代码。请从[天气图标代码表](#enum-list)中查看所有可能的值。 + 'weather_icon': string; + // 当前温度 °C + 'temperature': number; + // 风向 + 'wind_direction': string; + // 风力等级 + 'wind_power': string; + // 相对湿度 % + 'humidity': number; + // 数据更新时间 + 'report_time': string; + // 体感温度 °C(extended=true 时返回) + 'feels_like': number; + // 能见度 km(extended=true 时返回) + 'visibility': number; + // 气压 hPa(extended=true 时返回) + 'pressure': number; + // 紫外线指数(extended=true 时返回) + 'uv': number; + // 当前降水量 mm(extended=true 时返回) + 'precipitation': number; + // 云量 %(extended=true 时返回) + 'cloud': number; + // 空气质量指数 0-500(extended=true 时返回) + 'aqi': number; + // AQI 等级 1-6(extended=true 时返回) + 'aqi_level': number; + // AQI 等级描述(优/良/轻度污染/中度污染/重度污染/严重污染)(extended=true 时返回) + 'aqi_category': string; + // 主要污染物(如 PM2.5、PM10、O3 等)(extended=true 时返回) + 'aqi_primary': string; + // 空气污染物分项数据(extended=true 时返回,部分数据源可能不返回) + 'air_pollutants': { + // PM2.5 μg/m³ + 'pm25': number; + // PM10 μg/m³ + 'pm10': number; + // 臭氧 μg/m³ + 'o3': number; + // 二氧化氮 μg/m³ + 'no2': number; + // 二氧化硫 μg/m³ + 'so2': number; + // 一氧化碳 mg/m³ + 'co': number; + }; + // 官方气象预警列表(存在有效预警时返回) + 'alerts': { + // 预警标题 + 'title': string; + // 预警类型,如雷电、暴雨 + 'type': string; + // 预警级别,如蓝色、黄色、橙色、红色 + 'level': string; + // 预警正文 + 'text': string; + // 预警发布时间 + 'publish_time': string; + // 发布单位 + 'publisher': string; + // 防御指引列表 + 'guidance': string[]; + }[]; + // 当天最高温 °C(forecast=true 时返回) + 'temp_max': number; + // 当天最低温 °C(forecast=true 时返回) + 'temp_min': number; + // 多天天气预报,最多7天(forecast=true 时返回) + 'forecast': { + // 日期 YYYY-MM-DD + 'date': string; + // 星期几(`lang=en` 时返回英文星期) + 'week': string; + // 最高温度 °C + 'temp_max': number; + // 最低温度 °C + 'temp_min': number; + // 白天天气(`lang=en` 时返回英文) + 'weather_day': string; + // 夜间天气(`lang=en` 时返回英文) + 'weather_night': string; + // 白天风向(可选,`lang=en` 时返回英文) + 'wind_dir_day': string; + // 夜间风向(可选,`lang=en` 时返回英文) + 'wind_dir_night': string; + // 白天风力(可选,`lang=en` 时返回英文) + 'wind_scale_day': string; + // 夜间风力(可选,`lang=en` 时返回英文) + 'wind_scale_night': string; + // 白天风速 km/h(可选) + 'wind_speed_day': number; + // 湿度 %(可选) + 'humidity': number; + // 降水量 mm(可选) + 'precip': number; + // 能见度 km(可选) + 'visibility': number; + // 紫外线指数(可选) + 'uv_index': number; + // 日出时间 HH:MM(可选) + 'sunrise': string; + // 日落时间 HH:MM(可选) + 'sunset': string; + }[]; + // 逐小时预报,最多24小时(hourly=true 时返回) + 'hourly_forecast': { + // 预报时间(ISO8601 或 YYYY-MM-DD HH:MM) + 'time': string; + // 温度 °C + 'temperature': number; + // 天气状况 + 'weather': string; + // 风向(可选) + 'wind_direction': string; + // 风速 km/h(可选) + 'wind_speed': number; + // 风力等级(可选) + 'wind_scale': string; + // 湿度 %(可选) + 'humidity': number; + // 降水量 mm(可选) + 'precip': number; + // 体感温度 °C(可选) + 'feels_like': number; + // 能见度 km(可选) + 'visibility': number; + // 降水概率 %(可选) + 'pop': number; + // 紫外线指数(可选,国内城市通常不返回) + 'uv_index': number; + }[]; + // 分钟级降水预报(minutely=true 时返回,仅国内城市可用,精确到2分钟) + 'minutely_precip': { + // 降水描述 + 'summary': string; + // 更新时间 + 'update_time': string; + // 精确到2分钟的数据点 + 'data': { + // 预报时间 ISO8601 + 'time': string; + // 该时间点的降水量 mm + 'precip': number; + // 降水类型:rain / snow + 'type': string; + }[]; + }; + // 18项生活指数(indices=true 时返回),每项包含 level(等级名称)、brief(简短描述)、advice(详细建议) + 'life_indices': LifeIndices; +}; + +// 1. 定义单个生活指数的基础结构 +type LifeIndexItem = { + level: string; + brief: string; + advice: string; +}; + +// 2. 定义所有可能的键名 +type LifeIndexKeys = + | 'clothing' + | 'uv' + | 'car_wash' + | 'drying' + | 'air_conditioner' + | 'cold_risk' + | 'exercise' + | 'comfort' + | 'travel' + | 'fishing' + | 'allergy' + | 'sunscreen' + | 'mood' + | 'beer' + | 'umbrella' + | 'traffic' + | 'air_purifier' + | 'pollen'; + +// 3. 使用映射类型自动生成完整结构 +type LifeIndices = { + [K in LifeIndexKeys]: LifeIndexItem; +}; diff --git a/src/api/workflow/instance/types.ts b/src/api/workflow/instance/types.ts index 7cb7f97..ea82ef3 100644 --- a/src/api/workflow/instance/types.ts +++ b/src/api/workflow/instance/types.ts @@ -5,7 +5,7 @@ export interface FlowInstanceQuery extends PageQuery { nodeName?: string; flowCode?: string; flowName?: string; - createByIds?: string[] | number[]; + createByIds?: string[]; businessId?: string; } diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 47f7c7b..d2dcb51 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -3,7 +3,7 @@ {{ item.meta?.title }} - {{ item.meta?.title }} + {{ item.meta?.title }} diff --git a/src/components/Holder/house.vue b/src/components/Holder/house.vue index 3a88fc8..4ba34d8 100644 --- a/src/components/Holder/house.vue +++ b/src/components/Holder/house.vue @@ -221,7 +221,7 @@ function resetQuery() { queryParams.value = { pageNum: 1, pageSize: 10, - houseuse: null, + buildingUse: null, buildingId: null, unitNo: null }; diff --git a/src/components/Holder/user.vue b/src/components/Holder/user.vue index 47fe8c3..671aa4a 100644 --- a/src/components/Holder/user.vue +++ b/src/components/Holder/user.vue @@ -81,10 +81,7 @@ const dialog = ref({ const queryParams = ref({ pageNum: 1, - pageSize: 10, - buildingUse: null, - buildingId: null, - unitNo: null + pageSize: 10 }); const multipleTableRef = ref(); @@ -198,10 +195,7 @@ function handleRowClick(row: BillHouse) { function resetQuery() { queryParams.value = { pageNum: 1, - pageSize: 10, - houseuse: null, - buildingId: null, - unitNo: null + pageSize: 10 }; getlist(); } diff --git a/src/components/LicensePlateInput/index.vue b/src/components/LicensePlateInput/index.vue new file mode 100644 index 0000000..dddd25e --- /dev/null +++ b/src/components/LicensePlateInput/index.vue @@ -0,0 +1,288 @@ + + + + + diff --git a/src/components/Process/processMeddle.vue b/src/components/Process/processMeddle.vue index 444bbdc..40b458c 100644 --- a/src/components/Process/processMeddle.vue +++ b/src/components/Process/processMeddle.vue @@ -52,7 +52,7 @@ diff --git a/src/router/index.ts b/src/router/index.ts index 51ce501..e2fa4a2 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -89,33 +89,45 @@ export const constantRoutes: RouteRecordRaw[] = [ { path: '', component: Layout, - redirect: '/index', + // redirect: '/index', + redirect: import.meta.env.VITE_LOGIN_BACK_URL, // redirect: '/equipment/WaterDevice', children: [ - { - path: '/index', - component: () => import('@/views/workbench/index2.vue'), - name: 'Index', - // hidden: true, - meta: { title: '工作台', icon: 'dashboard', affix: true } - } - ] - }, - { - path: '/user', - component: Layout, - hidden: true, - redirect: 'noredirect', - children: [ - { - path: 'profile', - component: () => import('@/views/system/user/profile/index.vue'), - name: 'Profile', - meta: { title: '个人中心', icon: 'user' } - } + // { + // path: '/index', + // component: () => import('@/views/workbench/index2.vue'), + // name: 'Index', + // // hidden: true, + // meta: { title: '工作台', icon: 'dashboard', affix: true } + // } ] } + // { + // path: '/user', + // component: Layout, + // hidden: true, + // redirect: 'noredirect', + // children: [ + // { + // path: 'profile', + // component: () => import('@/views/system/user/profile/index.vue'), + // name: 'Profile', + // meta: { title: '个人中心', icon: 'user' } + // } + // ] + // } ]; +if (import.meta.env.VITE_APP_SHOW_WORK_PLATFORM === 'true') { + const find = constantRoutes.find((item) => item.path === ''); + if (find) { + find.children?.push({ + path: '/index', + component: () => import('@/views/workbench/index2.vue'), + name: 'Index', + meta: { title: '工作台', icon: 'dashboard', affix: true } + }); + } +} // 动态路由,基于用户权限动态去加载 export const dynamicRoutes: RouteRecordRaw[] = []; diff --git a/src/settings.ts b/src/settings.ts index fd3fe2f..c0405e2 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -2,6 +2,7 @@ import { LanguageEnum } from '@/enums/LanguageEnum'; import { NavTypeEnum } from '@/enums/NavTypeEnum'; const setting: DefaultSettings = { + topNav: false, /** * 网页标题 */ diff --git a/src/store/modules/house.ts b/src/store/modules/house.ts index 80aaab3..e6864df 100644 --- a/src/store/modules/house.ts +++ b/src/store/modules/house.ts @@ -163,6 +163,21 @@ export const useHouseStore = defineStore( }); }); }; + // 根据房屋号,查询房屋 + async function getHouseBybuildingNo(houseName: string) { + currentHouseInfoList.value = null; + // 获取当前 楼栋的所有信息 + const res3 = await getHouselistAPI(currentBuildingInfo.value.id, houseName); + currentHouseInfoList.value = res3.data; + floorslist.value = null; + floorslist.value = new Set(); + // 得到所有的有房屋的 楼层 数组 + currentHouseInfoList.value.units.forEach((item) => { + item.floors.forEach((floor) => { + floorslist.value.add(floor.floorNo); + }); + }); + } // 切换楼栋 const switchBuilding = (buildingId: string) => { if (!buildingId) return; @@ -218,9 +233,10 @@ export const useHouseStore = defineStore( // 房屋 树状结构类型 const getCurrentVilageTreeHouse = async () => { + const villageid = localStorage.getItem('villageid'); try { treedata.value = []; - const res = await getVillageTree(currentVilageInfo.value.villageId); + const res = await getVillageTree(villageid); treedata.value = convertBuildingToTree(res.data.buildings || []); return treedata.value; } catch (err) { @@ -239,6 +255,7 @@ export const useHouseStore = defineStore( buildingtype, buildingtypelist, treedata, + getHouseBybuildingNo, updateVilageinfo, updateCureentBuilding, getviliageinfo, diff --git a/src/types/global.d.ts b/src/types/global.d.ts index b0e5caa..bc0e030 100644 --- a/src/types/global.d.ts +++ b/src/types/global.d.ts @@ -17,10 +17,14 @@ declare global { } /** 地图 */ interface Window { + // 高德全局对象 _AMapSecurityConfig?: { securityJsCode: string; }; + // 天地图全局对象 + T: any; } + /** * 弹窗属性 */ @@ -65,7 +69,7 @@ declare global { declare interface DictDataOption { label: string; value: string; - elTagType?: ElTagType; + elTagType?: ElTagType | '' | 'default'; elTagClass?: string; } @@ -95,6 +99,10 @@ declare global { pageSize: number; } declare interface LayoutSetting { + /** + * 是否显示顶部导航 + */ + topNav: boolean; // 新增此字段 /** * 默认布局 */ diff --git a/src/utils/Reg.ts b/src/utils/Reg.ts index 821e976..5da1a48 100644 --- a/src/utils/Reg.ts +++ b/src/utils/Reg.ts @@ -64,3 +64,153 @@ export type RegType = keyof typeof reg; export function validator(value: string | number, regType: RegType): boolean { return reg[regType].test(String(value)); } + +/** + * 车牌验证工具类 + * 支持传统燃油、新能源、军警、武警、使馆、临时、港澳等全量车牌 + */ +export class LicensePlateValidator { + /** + * 省份简称正则片段 + */ + private static readonly PROVINCE = '[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]'; + + /** + * 使领馆前缀 + */ + private static readonly EMBASSY_PREFIX = '[使领]'; + + /** + * 验证传统燃油车牌 (蓝牌/黄牌) + * 格式: 省份 + 字母 + 5位字符 + * 示例: 京A·12345, 粤B·88888 + */ + static isTraditionalPlate(plate: string): boolean { + // 包含普通民用以及使领馆非新能源部分(如果使领馆归为此类,通常使领馆有单独规则,这里仅指普通民用) + // 注意:使领馆车牌通常格式特殊,见 isEmbassyPlate + const reg = new RegExp(`^${this.PROVINCE}[A-HJ-NP-Z][A-HJ-NP-Z0-9]{5}$`); + return reg.test(plate.toUpperCase()); + } + + /** + * 验证新能源车牌 (绿牌) + * 小型: 省份 + 字母 + D/F + 4位数字/字母 或 省份 + 字母 + 5位数字/字母 + D/F + * 大型: 省份 + 字母 + 5位数字/字母 + D/F (通常最后一位是D/F) + * 示例: 京AD12345, 京A12345D, 沪AF12345 + */ + static isNewEnergyPlate(plate: string): boolean { + // 小型新能源:第2位或第7位是D/F + // 大型新能源:最后一位是D/F (且总长8位) + // 综合正则: + // 1. [省份][A-HJ-NP-Z][D-F][0-9A-HJ-NP-Z]{4} (小型,D/F在第2位) + // 2. [省份][A-HJ-NP-Z][0-9A-HJ-NP-Z]{4}[D-F] (小型/大型,D/F在最后) + // 3. [省份][A-HJ-NP-Z][0-9A-HJ-NP-Z][D-F][0-9A-HJ-NP-Z]{3} (较少见,但某些早期试点或特殊编排可能存在,标准通常只认1和2) + + // 更严谨的标准新能源正则 (GA 804-2018): + // 小型: [省份][A-HJ-NP-Z][D-F][0-9A-HJ-NP-Z]{4} | [省份][A-HJ-NP-Z][0-9A-HJ-NP-Z]{4}[D-F] + // 大型: [省份][A-HJ-NP-Z][0-9A-HJ-NP-Z]{5}[D-F] (其实包含在上面第二种情况的子集里,只要保证总长8位) + + const reg = new RegExp(`^${this.PROVINCE}[A-HJ-NP-Z](?:[D-F][0-9A-HJ-NP-Z]{4}|[0-9A-HJ-NP-Z]{5}[D-F])$`); + return reg.test(plate.toUpperCase()); + } + + /** + * 验证警车车牌 + * 格式: 省份 + 字母 + 4位数字 + 警 + * 示例: 京A·1234警 + */ + static isPolicePlate(plate: string): boolean { + const reg = new RegExp(`^${this.PROVINCE}[A-HJ-NP-Z][0-9]{4}警$`); + return reg.test(plate.toUpperCase()); + } + + /** + * 验证教练车牌 + * 格式: 省份 + 字母 + 4位数字 + 学 + * 示例: 京A·1234学 + */ + static isCoachPlate(plate: string): boolean { + const reg = new RegExp(`^${this.PROVINCE}[A-HJ-NP-Z][0-9]{4}学$`); + return reg.test(plate.toUpperCase()); + } + + /** + * 验证武警车牌 (2013式) + * 格式: WJ + 省份/部门简称 + 5位字符 + * 示例: WJ·京12345, WJ·12345X, WJ·B12345 + * 注意:WJ后紧跟的可能是省份简称或部门字母 + */ + static isArmedPolicePlate(plate: string): boolean { + // WJ + (省份简称 | 部门字母) + 5位字符 + // 部门字母包括: 内边消水电林通海等,这里简化处理,允许字母或省份 + const reg = /^WJ(?:[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]|[A-Z])[0-9A-HJ-NP-Z]{5}$/; + return reg.test(plate.toUpperCase()); + } + + /** + * 验证军队车牌 (2012式) + * 格式: 军种字母 + · + 5位字符 (实际输入常不带点) + * 军种: V(军委), K(空军), H(海军), B(北京军区), S(沈阳), L(兰州), J(济南), N(南京), G(广州), C(成都) 等 + * 示例: V·12345, K·A1234 + */ + static isMilitaryPlate(plate: string): boolean { + // 简化版:首字母为大写(排除I,O),后跟5位字符 + // 更严谨应限制首字母为特定军种代号,但考虑到军改变化,此处做通用校验 + // 2012式军牌格式:XY·12345 (X为军种/大区,Y为单位) + // 常见前缀: V, K, H, B, S, L, J, N, G, C, M, P, O, A, E 等 + const reg = /^[VKBHSLJNGCMPEOA][A-HJ-NP-Z0-9][0-9A-HJ-NP-Z]{4}$/; + return reg.test(plate.toUpperCase()); + } + + /** + * 验证使馆/领馆车牌 + * 格式: 使/领 + 3位数字 + 3位数字 (共6位数字,或 使·123456) + * 示例: 使·123456, 领·123456 + */ + static isEmbassyPlate(plate: string): boolean { + const reg = /^[使领][0-9]{6}$/; + return reg.test(plate); + } + + /** + * 验证港澳入出境车 (粤Z牌) + * 格式: 粤Z + 4位字符 + 港/澳 + * 示例: 粤Z·1234港, 粤Z·1234澳 + */ + static isHKMacauPlate(plate: string): boolean { + const reg = /^粤Z[A-HJ-NP-Z0-9]{4}[港澳]$/; + return reg.test(plate.toUpperCase()); + } + + /** + * 验证临时车牌 + * 格式: 省份 + 字母 + 5位字符 + 临 / 超 + * 示例: 京A·12345临, 沪B·12345超 + */ + static isTemporaryPlate(plate: string): boolean { + const reg = new RegExp(`^${this.PROVINCE}[A-HJ-NP-Z][0-9A-HJ-NP-Z]{5}[临超]$`); + return reg.test(plate.toUpperCase()); + } + + /** + * 验证所有合法车牌(全量) + * @param plate 车牌号码 + */ + static isValidPlate(plate: string): boolean { + if (!plate || typeof plate !== 'string') return false; + + const upperPlate = plate.toUpperCase().replace(/[·\s-]/g, ''); // 去除分隔符和空格 + + return ( + this.isTraditionalPlate(upperPlate) || + this.isNewEnergyPlate(upperPlate) || + this.isPolicePlate(upperPlate) || + this.isCoachPlate(upperPlate) || + this.isArmedPolicePlate(upperPlate) || + this.isMilitaryPlate(upperPlate) || + this.isEmbassyPlate(upperPlate) || + this.isHKMacauPlate(upperPlate) || + this.isTemporaryPlate(upperPlate) + ); + } +} diff --git a/src/utils/exportZip.ts b/src/utils/exportZip.ts new file mode 100644 index 0000000..afec8d4 --- /dev/null +++ b/src/utils/exportZip.ts @@ -0,0 +1,117 @@ +import JSZip from 'jszip'; +import { saveAs } from 'file-saver'; +// 假设使用的是 Element Plus,请根据实际 UI 库调整导入 +import { ElMessage } from 'element-plus'; + +/** + * 图片数据接口 + */ +interface ImageItem { + name: string; + url: string; +} + +/** + * 批量导出图片并生成 ZIP + * @param imageList 图片数组 + * @param zipName 压缩包名称 + * @param concurrency 并发请求数,默认 5,避免浏览器请求过多被拦截 + */ +export async function exportImagesToZip(imageList: ImageItem[], zipName: string = 'images', concurrency: number = 5) { + if (!imageList || imageList.length === 0) { + ElMessage.warning('没有可导出的图片'); + return; + } + + const zip = new JSZip(); + + try { + // 使用并发控制处理图片获取 + const tasks = imageList.map((item) => () => processImageItem(item, zip)); + + // 执行并发任务 + await runWithConcurrency(tasks, concurrency); + + ElMessage.success('导出完成'); + + // 生成 ZIP 并下载 + const content = await zip.generateAsync({ + type: 'blob', + compression: 'DEFLATE', + compressionOptions: { level: 6 } + }); + + saveAs(content, `${zipName}.zip`); + } catch (err) { + console.error('ZIP 导出失败:', err); + ElMessage.error('图片导出失败,请重试'); + } +} + +/** + * 处理单个图片项:获取 Blob 并添加到 Zip + */ +async function processImageItem(item: ImageItem, zip: JSZip): Promise { + try { + // 清理文件名,防止非法字符或扩展名缺失 + const safeName = sanitizeFileName(item.name); + const blob = await getImageBlobViaCanvas(item.url); + zip.file(`${safeName}.png`, blob, { binary: true }); + } catch (error) { + console.warn(`图片加载失败: ${item.url}`, error); + throw error; // 抛出错误以便外层统计或处理 + } +} + +/** + * 通过 Canvas 获取图片 Blob (解决 OSS 跨域 fetch 问题) + * 注意:这要求 OSS _bucket_ 配置了 CORS 允许 '*' 或你的域名,且允许 GET 方法。 + * 如果 OSS 完全禁止跨域,此方法也会失败,但通常公共读 OSS 是允许 img 标签跨域显示的。 + */ +async function getImageBlobViaCanvas(url: string): Promise { + const response = await fetch(url); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return response.blob(); +} + +/** + * 简单的并发控制执行器 + */ +async function runWithConcurrency(tasks: (() => Promise)[], limit: number): Promise { + const results: Promise[] = []; + let index = 0; + + async function worker() { + while (index < tasks.length) { + const currentIndex = index++; + const task = tasks[currentIndex]; + try { + await task(); + } catch (e) { + // 这里可以选择忽略单个失败,或者累计错误 + console.error(`Task ${currentIndex} failed`, e); + } + } + } + + // 创建 limit 个工人 + const workers = Array(Math.min(limit, tasks.length)).fill(null).map(worker); + await Promise.all(workers); +} + +/** + * 清理文件名,确保合法且唯一(简单版) + */ +function sanitizeFileName(name: string): string { + // 移除非法字符,保留字母、数字、中文、下划线、点、横杠 + let cleanName = name.replace(/[<>:"/\\|?*]/g, '_'); + + // 如果名字为空或只有扩展名,给一个默认名 + if (!cleanName || cleanName.startsWith('.')) { + cleanName = `image_${Date.now()}_${Math.random().toString(36).substr(2, 9)}${cleanName}`; + } + + return cleanName; +} diff --git a/src/utils/house.ts b/src/utils/house.ts index c1f909b..a8b8933 100644 --- a/src/utils/house.ts +++ b/src/utils/house.ts @@ -58,22 +58,6 @@ export function convertBuildingToTree(buildings: any[]): Tree[] { }); } -// 与业主关系 -export const ownerRelationshiplist = [ - { - label: '业主', - value: 0 - }, - { - label: '亲属', - value: 1 - }, - { - label: '租户', - value: 2 - } -]; - interface Tree { label: string; value: number; @@ -120,8 +104,6 @@ export function getHousePathById(treeData: Tree[], houseId: string | number, res return path; } -export const houseUselist = ['普通住宅', '商业用地', '商住两用', '其他']; - // 对字符串 图片地址,处理 export function splitStringUrl(str: string, splitLabel: string = ',') { const list = str.split(splitLabel); @@ -149,25 +131,3 @@ export function hasFormData(formData: FormData): boolean { } return false; } - -/** 方法渲燃模板数据 */ -type dataType = { - 'label': string; - 'value': string; - 'elTagType': string; - 'elTagClass': string; -}; -/** - * 通用:根据 value 从字典数组中获取 label - * @param dict 字典数组 - * @param value 要匹配的值 - * @returns 匹配到的label,无则返回原value - */ -export function getDictLabel(dict: Ref, value: number): string { - // 空值直接返回 - if (value == null) return '-'; - - // 统一转字符串匹配 - const item = (dict.value || []).find((i) => String(i.value) === String(value)); - return item ? item.label : String(value); -} diff --git a/src/utils/request.ts b/src/utils/request.ts index abba895..5a6cf23 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -34,14 +34,15 @@ const service = axios.create({ clarifyTimeoutError: true } }); - // 不需要小区 ID 的接口白名单(支持 * 通配符) const whiteVillageId = [ '/village', '/village/*', '/waterDevice/generateBarCode', // 水表 条码 '/electricityDevice/generateBarCode', // 电表 条码 - '/payRecordList/payRecordList/list' + '/payRecordList/payRecordList/list', + + '/warehouse/*' // 以后直接在这里加新地址,支持 /xxx/*、/xxx/xxx 写法 ]; @@ -202,9 +203,6 @@ service.interceptors.response.use( useUserStore().logout().then(() => { router.replace({ path: '/login', - query: { - redirect: encodeURIComponent(router.currentRoute.value.fullPath || '/') - } }) }); }).catch(() => { diff --git a/src/utils/weather.ts b/src/utils/weather.ts new file mode 100644 index 0000000..1cf3731 --- /dev/null +++ b/src/utils/weather.ts @@ -0,0 +1,198 @@ +const weatherIcons: Record = { + 100: '☀️', + 101: '⛅', + 102: '🌤️', + 103: '⛅', + 104: '☁️', + 150: '🌙', + 151: '🌙', + 152: '🌙', + 153: '🌙', + 300: '🌦️', + 301: '🌧️', + 302: '⛈️', + 303: '⛈️', + 304: '⛈️', + 305: '🌧️', + 306: '🌧️', + 307: '🌧️', + 308: '🌧️', + 309: '🌧️', + 310: '🌊', + 311: '🌊', + 312: '🌊', + 313: '🧊', + 314: '🌧️', + 315: '🌧️', + 316: '🌊', + 317: '🌊', + 318: '🌊', + 350: '🌙', + 351: '🌙', + 399: '🌧️', + 400: '🌨️', + 401: '🌨️', + 402: '❄️', + 403: '❄️', + 404: '🌨️', + 405: '🌨️', + 406: '🌨️', + 407: '🌨️', + 408: '🌨️', + 409: '❄️', + 410: '❄️', + 456: '🌙', + 457: '🌙', + 499: '❄️', + 500: '🌫️', + 501: '🌫️', + 502: '😶‍🌫️', + 503: '💨', + 504: '💨', + 507: '🏜️', + 508: '🏜️', + 509: '🌫️', + 510: '🌫️', + 511: '😶‍🌫️', + 512: '😶‍🌫️', + 513: '😶‍🌫️', + 514: '🌫️', + 515: '🌫️', + 800: '🌑', + 801: '🌒', + 802: '🌓', + 803: '🌔', + 804: '🌕', + 805: '🌖', + 806: '🌗', + 807: '🌘', + 900: '🥵', + 901: '🥶', + 999: '❓', + 1001: '🌀', + 1002: '🌪️', + 1003: '🌊', + 1004: '❄️', + 1005: '🥶', + 1006: '💨', + 1007: '🏜️', + 1008: '🧊', + 1009: '🌡️', + 1010: '🥵', + 1011: '🌾', + 1012: '💨', + 1013: '🏔️', + 1014: '⚡', + 1015: '🧊', + 1016: '🥶', + 1017: '🌫️', + 1018: '✈️', + 1019: '😶‍🌫️', + 1020: '⛈️', + 1021: '🧊', + 1022: '☀️', + 1023: '🌊', + 1024: '🥵', + 1025: '🔥', + 1026: '🔥', + 1027: '🧊', + 1028: '🛰️', + 1029: '😶‍🌫️', + 1030: '🌨️', + 1031: '⛈️', + 1032: '☀️', + 1033: '❄️', + 1034: '🥶', + 1035: '🌧️', + 1036: '🌊', + 1037: '⛰️', + 1038: '🌧️', + 1039: '🌡️', + 1040: '❄️', + 1041: '🔥', + 1042: '🏥', + 1043: '⛈️', + 1044: '🏫', + 1045: '🏭', + 1046: '🚢', + 1047: '💨', + 1048: '🌡️', + 1049: '🌀', + 1050: '🥶', + 1051: '💨', + 1052: '⛈️', + 1053: '🌫️', + 1054: '⚡', + 1055: '🌀', + 1056: '🌡️', + 1057: '🧊', + 1058: '⛈️', + 1059: '🥶', + 1060: '🌫️', + 1061: '💨', + 1062: '🌊', + 1063: '🌧️', + 1064: '🌧️', + 1065: '🌫️', + 1066: '🥵', + 1067: '😶‍🌫️', + 1068: '⚠️', + 1069: '🏥', + 1071: '🏥', + 1072: '🏥', + 1073: '🌊', + 1074: '😶‍🌫️', + 1075: '🏙️', + 1076: '🌊', + 1077: '🔥', + 1078: '☀️', + 1079: '🌾', + 1080: '💨', + 1081: '🧊', + 1082: '🏥', + 1084: '🔥', + 1085: '⛈️', + 1086: '🧊', + 1087: '🌡️', + 1088: '🌾', + 1089: '🌾', + 1201: '🌊', + 1202: '🏙️', + 1203: '⚠️', + 1204: '⚠️', + 1205: '🧊', + 1206: '🌊', + 1207: '🌊', + 1208: '☀️', + 1209: '🌊', + 1210: '💧', + 1211: '🌊', + 1212: '🌊', + 1213: '🏙️', + 1214: '🌊', + 1215: '☀️', + 1216: '💧', + 1217: '🌿', + 1218: '⚠️', + 1219: '🌊', + 1221: '☀️', + 1241: '⛰️', + 1242: '⛰️', + 1243: '⛰️', + 1244: '⛰️', + 1245: '⛰️', + 1246: '⛰️', + 1247: '🌋', + 1248: '⛰️', + 1249: '⛰️', + 1250: '⛰️', + 1251: '⛰️', + 1271: '😶‍🌫️', + 1272: '😶‍🌫️', + 1273: '😶‍🌫️', + 9999: '⚠️' +}; + +export const getWeatherIcon = (weatherCode: string): string => { + return weatherIcons[weatherCode] || weatherIcons[999]; +}; diff --git a/src/views/error/404.vue b/src/views/error/404.vue index 0b20053..61df960 100644 --- a/src/views/error/404.vue +++ b/src/views/error/404.vue @@ -15,7 +15,7 @@
对不起,您正在寻找的页面不存在。尝试检查URL的错误,然后按浏览器上的刷新按钮或尝试在我们的应用程序中找到其他内容。
- 返回首页 + 返回首页 diff --git a/src/views/monitor/logininfor/index.vue b/src/views/monitor/logininfor/index.vue index c4bbc0e..9ac26e0 100644 --- a/src/views/monitor/logininfor/index.vue +++ b/src/views/monitor/logininfor/index.vue @@ -123,7 +123,7 @@ const single = ref(true); const multiple = ref(true); const selectName = ref>([]); const total = ref(0); -const dateRange = ref<[DateModelType, DateModelType]>(['', '']); +const dateRange = ref<[string, string]>(['', '']); const defaultSort = ref({ prop: 'loginTime', order: 'descending' }); const queryFormRef = ref(); diff --git a/src/views/monitor/operlog/index.vue b/src/views/monitor/operlog/index.vue index 2da052f..eb45c03 100644 --- a/src/views/monitor/operlog/index.vue +++ b/src/views/monitor/operlog/index.vue @@ -143,7 +143,7 @@ const showSearch = ref(true); const ids = ref>([]); const multiple = ref(true); const total = ref(0); -const dateRange = ref<[DateModelType, DateModelType]>(['', '']); +const dateRange = ref<[string, string]>(['', '']); const defaultSort = ref({ prop: 'operTime', order: 'descending' }); const operLogTableRef = ref(); diff --git a/src/views/register.vue b/src/views/register.vue index 45f7a38..f18cf83 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -138,7 +138,7 @@ const handleRegister = () => { if (!err) { const username = registerForm.value.username; await ElMessageBox.alert('' + t('register.registerSuccess', { username }) + '', '系统提示', { - app: undefined, + // app: undefined, dangerouslyUseHTMLString: true, type: 'success' }); diff --git a/src/views/system/Banner/add.vue b/src/views/system/Banner/add.vue index 69901c8..f2c1022 100644 --- a/src/views/system/Banner/add.vue +++ b/src/views/system/Banner/add.vue @@ -28,11 +28,11 @@ - - + + - - + + 提交 @@ -91,8 +91,8 @@ const form = ref({ id: null, name: '', // 分类id、 url: '', // 设备名称 - jump_link: '', // 编号 - order: null // 区域 + link: '', // 编号 + byOrder: 1 // 区域 }); const rules = ref({ name: [{ required: true, message: '请输入Banner图名称', trigger: 'blur' }], @@ -108,8 +108,8 @@ function init() { id: res.data.id, name: res.data.name, // 分类id、 url: res.data.url, // 设备名称 - jump_link: res.data.jump_link, // 编号 - order: res.data.order // 区域 + link: res.data.link, // 编号 + byOrder: res.data.byOrder // 区域 }; }); } diff --git a/src/views/system/Banner/index.vue b/src/views/system/Banner/index.vue index 8f05603..7afe927 100644 --- a/src/views/system/Banner/index.vue +++ b/src/views/system/Banner/index.vue @@ -64,11 +64,17 @@ - - + + + + diff --git a/src/views/system/ParkingCost/addParkingCost.vue b/src/views/system/ParkingCost/addParkingCost.vue index 020d49d..6732313 100644 --- a/src/views/system/ParkingCost/addParkingCost.vue +++ b/src/views/system/ParkingCost/addParkingCost.vue @@ -41,7 +41,8 @@ - + + @@ -108,10 +109,11 @@ diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 96b1f55..e6b7db7 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -60,10 +60,11 @@ --> - + +