diff --git a/.env.production b/.env.production index b6476de..f938400 100644 --- a/.env.production +++ b/.env.production @@ -15,7 +15,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications' VITE_APP_SNAILJOB_ADMIN = '/snail-job' # 生产环境 -VITE_APP_BASE_API = 'http://wuyeapi.bugtc.com' +VITE_APP_BASE_API = 'https://wuyeapi.bugtc.com' # VITE_APP_BASE_API = 'http://192.168.0.222:8080' diff --git a/package.json b/package.json index db4d543..a723577 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "preview:prod": "vite preview --mode production", "lint:eslint": "eslint", "lint:eslint:fix": "eslint --fix", + "type:check": "vue-tsc --noEmit", "prettier": "prettier --write ." }, "repository": { diff --git a/src/api/system/Banner/type.ts b/src/api/system/Banner/type.ts index cfe48ca..67d5637 100644 --- a/src/api/system/Banner/type.ts +++ b/src/api/system/Banner/type.ts @@ -23,14 +23,14 @@ export interface BannerVO { /** * 小区id */ - villageId: string | number; + villageId: string; } export interface BannerForm extends BaseEntity { /** * Banner图管理表id */ - id?: string | number; + id?: string; /** * 名称 @@ -50,7 +50,7 @@ export interface BannerForm extends BaseEntity { /** * 小区id */ - villageId?: string | number; + villageId?: string; } export interface BannerQuery extends PageQuery { @@ -72,7 +72,7 @@ export interface BannerQuery extends PageQuery { /** * 小区id */ - villageId?: string | number; + villageId?: string; /** * 日期范围参数 diff --git a/src/api/system/Decoration/type.ts b/src/api/system/Decoration/type.ts index 68c4d85..2544e24 100644 --- a/src/api/system/Decoration/type.ts +++ b/src/api/system/Decoration/type.ts @@ -7,7 +7,7 @@ export interface DecorationVO { /** * 所属小区id */ - villageId: number; + villageId: string; /** * 所属房屋id @@ -59,7 +59,7 @@ export interface DecorationForm extends BaseEntity { /** * 所属小区id */ - villageId?: number; + villageId?: string; /** * 所属房屋id @@ -106,7 +106,7 @@ export interface DecorationQuery extends PageQuery { /** * 所属小区id */ - villageId?: number; + villageId?: string; /** * 所属房屋id diff --git a/src/api/system/ParkingCost/index.ts b/src/api/system/ParkingCost/index.ts index 49bbaaf..cffef45 100644 --- a/src/api/system/ParkingCost/index.ts +++ b/src/api/system/ParkingCost/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { ParkingCostVO, ParkingCostForm, ParkingCostQuery } from '@/api/system/type'; +import { ParkingCostVO, ParkingCostForm, ParkingCostQuery } from './type'; /** * 查询停车缴费管理列表 diff --git a/src/api/system/ParkingCost/type.ts b/src/api/system/ParkingCost/type.ts index df296de..e67cebc 100644 --- a/src/api/system/ParkingCost/type.ts +++ b/src/api/system/ParkingCost/type.ts @@ -62,7 +62,7 @@ export interface ParkingCostVO { /** * 所属小区id */ - villageId: string | number; + villageId: string; } export interface ParkingCostForm extends BaseEntity { @@ -129,7 +129,7 @@ export interface ParkingCostForm extends BaseEntity { /** * 所属小区id */ - villageId?: string | number; + villageId?: string; } export interface ParkingCostQuery extends PageQuery { @@ -186,7 +186,7 @@ export interface ParkingCostQuery extends PageQuery { /** * 所属小区id */ - villageId?: string | number; + villageId?: string; /** * 日期范围参数 diff --git a/src/api/system/Questionnaire/type.ts b/src/api/system/Questionnaire/type.ts index 9333e4f..a6e6778 100644 --- a/src/api/system/Questionnaire/type.ts +++ b/src/api/system/Questionnaire/type.ts @@ -2,12 +2,12 @@ export interface QuestionnaireVO { /** * 问卷ID */ - id: string | number; + id: string; /** * 所属小区id */ - villageId: string | number; + villageId: string; /** * 问卷标题 @@ -54,7 +54,7 @@ export interface QuestionnaireForm extends BaseEntity { /** * 所属小区id */ - villageId?: string | number; + villageId?: string; /** * 问卷标题 @@ -86,6 +86,8 @@ export interface QuestionnaireForm extends BaseEntity { */ residents?: string; + startTime: string; + endTime: string; /** * 备注 */ @@ -96,7 +98,7 @@ export interface QuestionnaireQuery extends PageQuery { /** * 所属小区id */ - villageId?: string | number; + villageId?: string; /** * 问卷标题 diff --git a/src/api/system/RepairProject/index.ts b/src/api/system/RepairProject/index.ts index 93b00da..92e6a86 100644 --- a/src/api/system/RepairProject/index.ts +++ b/src/api/system/RepairProject/index.ts @@ -1,6 +1,6 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; -import { RepairProjectVO, RepairProjectForm, RepairProjectQuery } from '@/api/repairProject/types'; +import { RepairProjectVO, RepairProjectForm, RepairProjectQuery } from './type'; /** * 查询报修维修项目管理列表 diff --git a/src/api/system/SdbBill/index.ts b/src/api/system/SdbBill/index.ts index c1ca9bb..fa49302 100644 --- a/src/api/system/SdbBill/index.ts +++ b/src/api/system/SdbBill/index.ts @@ -61,3 +61,24 @@ export const delBill = (id: string | number | Array) => { method: 'delete' }); }; + +export interface BillHouse { + 'buildingName': string; + 'houseId': number; + 'unitNo': number; + 'houseNo': string; + 'floorNo': number; + 'villageName': string; + 'villageId': string; + 'buildingId': string; + 'userName': string; + 'userId': string; +} +/** 查询房屋列表 */ +export const listBillHouse = (query: { pageNum: number; pageSize: number }): AxiosPromise => { + return request({ + url: '/bill/getHouseList', + method: 'GET', + params: query + }); +}; diff --git a/src/api/system/SdbBill/type.ts b/src/api/system/SdbBill/type.ts index 0828cb3..068c368 100644 --- a/src/api/system/SdbBill/type.ts +++ b/src/api/system/SdbBill/type.ts @@ -33,11 +33,11 @@ export interface BillVO { * 结束日期 */ endDate: string; - + houseIds: string[]; /** * 小区id */ - villageId: number; + villageId: string; /** * 备注 @@ -60,6 +60,10 @@ export interface BillForm extends BaseEntity { * 账单编号 */ billCode?: string; + /** + * 账单名称 + */ + billName?: string; /** * 收费项目id @@ -89,7 +93,7 @@ export interface BillForm extends BaseEntity { /** * 小区id */ - villageId?: string | number; + villageId?: string; /** * 备注 @@ -136,7 +140,7 @@ export interface BillQuery extends PageQuery { /** * 小区id */ - villageId?: string | number; + villageId?: string; /** * 创建时间 diff --git a/src/api/system/SdbChargeItem/type.ts b/src/api/system/SdbChargeItem/type.ts index b585450..6210a30 100644 --- a/src/api/system/SdbChargeItem/type.ts +++ b/src/api/system/SdbChargeItem/type.ts @@ -51,7 +51,7 @@ export interface ChargeItemVO { /** * 小区id */ - villageId: string | number; + villageId: string; } export interface ChargeItemForm extends BaseEntity { @@ -63,7 +63,7 @@ export interface ChargeItemForm extends BaseEntity { /** * 项目名称 */ - name?: string; + itemName?: string; /** * 计费方式 0单次收费 1周期收费 2仪表收费 @@ -100,17 +100,18 @@ export interface ChargeItemForm extends BaseEntity { */ remark?: string; + status?: string; /** * 小区id */ - villageId?: string | number; + villageId?: string; } export interface ChargeItemQuery extends PageQuery { /** * 项目名称 */ - name?: string; + itemName?: string; /** * 计费方式 0单次收费 1周期收费 2仪表收费 @@ -145,7 +146,7 @@ export interface ChargeItemQuery extends PageQuery { /** * 小区id */ - villageId?: string | number; + villageId?: string; /** * 日期范围参数 diff --git a/src/api/system/SdbWaterDevice/index.ts b/src/api/system/SdbWaterDevice/index.ts index a83719f..23728df 100644 --- a/src/api/system/SdbWaterDevice/index.ts +++ b/src/api/system/SdbWaterDevice/index.ts @@ -85,3 +85,14 @@ export const WaterDeviceMakerQrcode = (data: { deviceCode: string; id: string }[ data: data }); }; +/** + * 更新固件 + * @param id + */ +export const WaterDeviceUpdateBin = (data: { deviceCodes: string[]; urlA: string; urlB: string }) => { + return request({ + url: '/waterDevice/updateBin', + method: 'POST', + data: data + }); +}; diff --git a/src/api/system/Twarehouse/type.ts b/src/api/system/Twarehouse/type.ts index 299599c..c37ba87 100644 --- a/src/api/system/Twarehouse/type.ts +++ b/src/api/system/Twarehouse/type.ts @@ -54,7 +54,7 @@ export interface WarehouseForm extends BaseEntity { /** * 仓库归属id*(关联com_village) */ - villageId?: number; + villageId?: string; /** * 联系人* @@ -91,7 +91,7 @@ export interface WarehouseQuery extends PageQuery { /** * 仓库归属id*(关联com_village) */ - villageId?: number; + villageId?: string; /** * 联系人* diff --git a/src/api/system/community/index.ts b/src/api/system/community/index.ts index 5fd72c5..c69fb54 100644 --- a/src/api/system/community/index.ts +++ b/src/api/system/community/index.ts @@ -10,14 +10,14 @@ export function getCommunitylistAPI(): AxiosPromise { }); } /** 通过小区id获取小区信息 */ -export function getVillageByIdAPI(id: number): AxiosPromise { +export function getVillageByIdAPI(id: string): AxiosPromise { return request({ url: `/village/${id}`, method: 'get' }); } /** 删除小区 */ -export function deleteVillageByIdAPI(id: number): AxiosPromise { +export function deleteVillageByIdAPI(id: string): AxiosPromise { return request({ url: `/village/${id}`, method: 'delete' @@ -60,7 +60,7 @@ export function editVillageAPI(data: T) { }); } /**切换小区 */ -export function switchVillageAPI(villageId: number) { +export function switchVillageAPI(villageId: string) { return request({ url: `/village/switchVillage/${villageId}`, method: 'POST' diff --git a/src/api/system/community/type.ts b/src/api/system/community/type.ts index 59e358f..dc799ab 100644 --- a/src/api/system/community/type.ts +++ b/src/api/system/community/type.ts @@ -1,5 +1,5 @@ export interface communitylist_rows_type { - villageId: number; + villageId: string; villageName: string; villageCode: string; address: string; diff --git a/src/api/system/house/index.ts b/src/api/system/house/index.ts index 3e64645..f81ee4e 100644 --- a/src/api/system/house/index.ts +++ b/src/api/system/house/index.ts @@ -1,17 +1,15 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; import { addBuildingType, addHouseType, BuildingUnit, BuildingVo } from './type'; -import { number } from 'vue-types'; // 楼栋--------------------------------------------------------------------------------------- /** 根据 小区id 和 类型 查询楼栋信息 */ -export function getBuildinglistAPI(villageId: number, buildingUse: number): AxiosPromise { +export function getBuildinglistAPI(buildingUse: string): AxiosPromise { return request({ url: '/building/byVillage', method: 'get', params: { - villageId: villageId, buildingUse: buildingUse } }); @@ -96,7 +94,7 @@ export function EditHouseApi(data: addHouseType) { }); } /** 根据小区id,获取当前小区的树状结构 */ -export function getVillageTree(id: number) { +export function getVillageTree(id: string) { return request({ url: `/house/villageTree/${id}`, method: 'GET' diff --git a/src/api/system/house/type.ts b/src/api/system/house/type.ts index 46e2a85..9d6c56e 100644 --- a/src/api/system/house/type.ts +++ b/src/api/system/house/type.ts @@ -38,7 +38,7 @@ export interface BuildingVo { /** * 所属小区ID */ - villageId?: number; + villageId?: string; villageName?: string; } @@ -68,7 +68,7 @@ export interface HouseType { export interface addBuildingType { buildingName: string; - villageId?: number; + villageId?: string; buildStructure?: string; buildTall?: string; buildToward?: string; @@ -79,7 +79,7 @@ export interface addBuildingType { export interface addHouseType { 'houseId'?: string; 'buildingId'?: string; - 'villageId'?: number; + 'villageId'?: string; 'unitNo': string; 'floorNo': string; 'houseNo': string; diff --git a/src/api/system/resident/type.ts b/src/api/system/resident/type.ts index 6fd41f2..efd2a3f 100644 --- a/src/api/system/resident/type.ts +++ b/src/api/system/resident/type.ts @@ -37,7 +37,7 @@ export interface ResidentVO { /** * 小区id */ - villageId: string | number; + villageId: string; /** * 楼栋id @@ -112,7 +112,7 @@ export interface ResidentForm extends BaseEntity { /** * 小区id */ - villageId?: string | number; + villageId?: string; /** * 楼栋id @@ -163,7 +163,7 @@ export interface ResidentQuery extends PageQuery { status?: string; houseId?: number; - villageId?: number; + villageId?: string; buildingId?: number; unitNo?: number; } diff --git a/src/api/system/user/types.ts b/src/api/system/user/types.ts index 8b6924e..5cd9367 100644 --- a/src/api/system/user/types.ts +++ b/src/api/system/user/types.ts @@ -17,10 +17,12 @@ export interface UserQuery extends PageQuery { userName?: string; nickName?: string; phonenumber?: string; + // villageIds?: string[] | number[]; + villageIds?: string; status?: string; deptId?: string | number; roleId?: string | number; - userIds?: string | number | (string | number)[] | undefined; + userIds?: string | number | (string | number)[] | undefined; } /** @@ -48,6 +50,7 @@ export interface UserVO extends BaseEntity { postIds: any; roleId: any; admin: boolean; + villageIds: string; } /** @@ -59,6 +62,8 @@ export interface UserForm { deptId?: number; userName: string; nickName?: string; + // villageIds: string[] | number[]; + villageIds: string; password: string; phonenumber?: string; email?: string; diff --git a/src/api/workflow/index.ts b/src/api/workflow/index.ts index 4f3c6e0..2054b19 100644 --- a/src/api/workflow/index.ts +++ b/src/api/workflow/index.ts @@ -7,7 +7,7 @@ import { AxiosPromise } from 'axios'; * @returns {*} */ export const workSpaceTotalListApi = ( - villageId: number + villageId: string ): Promise<{ totalResident: number; totalHouse: number; @@ -17,6 +17,8 @@ export const workSpaceTotalListApi = ( return request({ url: '/workSpace/totalList', method: 'get', - params: villageId + params: { + villageId: villageId + } }); }; diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index b54ecc0..47f7c7b 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -16,11 +16,14 @@ import { usePermissionStore } from '@/store/modules/permission'; const route = useRoute(); const router = useRouter(); const permissionStore = usePermissionStore(); -const levelList = ref([]); - +const levelList = ref([]); +type LooseRouteMatched = Partial & { + path: string; // 确保必要字段存在 + meta?: any; +}; const getBreadcrumb = () => { // 1. 先获取原生的 matched - let matched = route.matched.filter((item) => item.meta && item.meta.title); + let matched = route.matched.filter((item) => item.meta && item.meta.title) as LooseRouteMatched[]; // 🔥 关键:如果当前路由有 parentTitle,手动插入虚拟父级 if (route.meta?.parentTitle) { @@ -30,7 +33,7 @@ const getBreadcrumb = () => { // 创建虚拟父级路由对象 const virtualParent = { path: matched[lastIndex].path, - meta: { title: route.meta.parentTitle } + meta: { title: route.meta.parentTitle as string } }; // 插入到倒数第二个位置 @@ -40,8 +43,6 @@ const getBreadcrumb = () => { // 2. 过滤掉设置了 breadcrumb: false 的路由 levelList.value = matched.filter((item) => item.meta && item.meta.title && item.meta.breadcrumb !== false); - - console.log('最终面包屑:', levelList.value); }; const handleLink = (item) => { diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 1767b1b..b4b946b 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -59,7 +59,7 @@ const props = defineProps({ // 大小限制(MB) fileSize: propTypes.number.def(5), // 文件类型, 例如['png', 'jpg', 'jpeg'] - fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'pdf']), + fileType: propTypes.array.def(['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'pdf', 'bin']), // 是否显示提示 isShowTip: propTypes.bool.def(true), // 禁用组件(仅查看文件) diff --git a/src/components/Holder/house.vue b/src/components/Holder/house.vue new file mode 100644 index 0000000..3a88fc8 --- /dev/null +++ b/src/components/Holder/house.vue @@ -0,0 +1,295 @@ + + + + + diff --git a/src/components/Holder/index.vue b/src/components/Holder/index.vue index 5fecfd6..af169f4 100644 --- a/src/components/Holder/index.vue +++ b/src/components/Holder/index.vue @@ -83,7 +83,6 @@ const houseStore = useHouseStore(); const treedata = ref([]); function init() { houseStore.getCurrentVilageTreeHouse().then((res) => { - console.log(res); treedata.value = res; }); } @@ -273,7 +272,6 @@ function confirm() { // ✅ 返回整个对象 emit('change', multipleSelection.value[0]); } else { - console.log(multipleSelection.value[0], returnvalue.value); // 返回指定字段 emit('change', multipleSelection.value[0][returnvalue.value as keyof tableType]); } diff --git a/src/components/Holder/material.vue b/src/components/Holder/material.vue index bd1bee7..7715abb 100644 --- a/src/components/Holder/material.vue +++ b/src/components/Holder/material.vue @@ -157,7 +157,6 @@ function getlist() { // ✅ 新增:处理 selection-change(多选专用) // ============================================== function handleSelectionChange(selection: MaterialVO[]) { - console.log(selection); if (isMultiple.value) { multipleSelection.value = selection; } @@ -228,7 +227,6 @@ function confirm() { // ✅ 返回整个对象 emit('change', multipleSelection.value[0]); } else { - console.log(multipleSelection.value[0], returnvalue.value); // 返回指定字段 emit('change', multipleSelection.value[0][returnvalue.value as keyof MaterialVO]); } diff --git a/src/components/Holder/repairUser.vue b/src/components/Holder/repairUser.vue index 5cfa8f8..c70e49a 100644 --- a/src/components/Holder/repairUser.vue +++ b/src/components/Holder/repairUser.vue @@ -252,7 +252,6 @@ function confirm() { // ✅ 返回整个对象 emit('change', multipleSelection.value[0]); } else { - console.log(multipleSelection.value[0], returnvalue.value); // 返回指定字段 emit('change', multipleSelection.value[0][returnvalue.value as keyof tableType]); } diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index cfd6d7a..9670071 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -42,7 +42,7 @@ dark
- light
-
管理
-
编辑
-
删除
+
编辑
+
删除
-
+
@@ -60,7 +60,7 @@ function getlist() { getCommunitylistAPI().then((res) => { list.value = res.rows; const villageid = localStorage.getItem('villageid'); - const find = list.value.find((item) => item.villageId === Number(villageid)); + const find = list.value.find((item) => item.villageId === villageid); if (find) { currentViliageInfo.value = find; } @@ -95,10 +95,10 @@ function handleEdit(item: communitylist_rows_type) { /** 管理小区 */ function handleclick(item: communitylist_rows_type) { switchVillageAPI(item.villageId).then(() => { - localStorage.setItem('villageid', String(item.villageId)); + localStorage.setItem('villageid', item.villageId); houseStore.getviliageinfo(item.villageId); router.push({ - path: '/index' + path: '/' }); }); } diff --git a/src/views/system/Activity/index.vue b/src/views/system/Activity/index.vue index 1b2b846..042e225 100644 --- a/src/views/system/Activity/index.vue +++ b/src/views/system/Activity/index.vue @@ -21,10 +21,10 @@