diff --git a/src/api/system/Banner/index.ts b/src/api/system/Banner/index.ts new file mode 100644 index 0000000..7cbdc5c --- /dev/null +++ b/src/api/system/Banner/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { BannerVO, BannerForm, BannerQuery } from './type'; + +/** + * 查询Banner图管理列表 + * @param query + * @returns {*} + */ + +export const listBanner = (query?: BannerQuery): AxiosPromise => { + return request({ + url: '/banner/list', + method: 'get', + params: query + }); +}; + +/** + * 查询Banner图管理详细 + * @param id + */ +export const getBanner = (id: string | number): AxiosPromise => { + return request({ + url: '/banner/' + id, + method: 'get' + }); +}; + +/** + * 新增Banner图管理 + * @param data + */ +export const addBanner = (data: BannerForm) => { + return request({ + url: '/banner', + method: 'post', + data: data + }); +}; + +/** + * 修改Banner图管理 + * @param data + */ +export const updateBanner = (data: BannerForm) => { + return request({ + url: '/banner', + method: 'put', + data: data + }); +}; + +/** + * 删除Banner图管理 + * @param id + */ +export const delBanner = (id: string | number | Array) => { + return request({ + url: '/banner/' + id, + method: 'delete' + }); +}; diff --git a/src/api/system/Banner/type.ts b/src/api/system/Banner/type.ts new file mode 100644 index 0000000..cfe48ca --- /dev/null +++ b/src/api/system/Banner/type.ts @@ -0,0 +1,81 @@ +export interface BannerVO { + /** + * Banner图管理表id + */ + id: string | number; + + /** + * 名称 + */ + name: string; + + /** + * 状态 0启用 1停用 + */ + status: string; + + /** + * 排序 + */ + order: number; + url: string; + jump_link: string; + /** + * 小区id + */ + villageId: string | number; +} + +export interface BannerForm extends BaseEntity { + /** + * Banner图管理表id + */ + id?: string | number; + + /** + * 名称 + */ + name?: string; + + /** + * 状态 0启用 1停用 + */ + status?: string; + + /** + * 排序 + */ + order?: number; + + /** + * 小区id + */ + villageId?: string | number; +} + +export interface BannerQuery extends PageQuery { + /** + * 名称 + */ + name?: string; + + /** + * 状态 0启用 1停用 + */ + status?: string; + + /** + * 排序 + */ + order?: number; + + /** + * 小区id + */ + villageId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/src/api/system/Inspection/index.ts b/src/api/system/Inspection/index.ts index f152454..0b3de09 100644 --- a/src/api/system/Inspection/index.ts +++ b/src/api/system/Inspection/index.ts @@ -2,7 +2,7 @@ import request from '@/utils/request'; import { AxiosPromise } from 'axios'; /** - * 查询巡检数据 + * 查询巡检数据 概况 * @param query * @returns {*} */ @@ -68,14 +68,14 @@ export interface Request { } /** - * 查询业务统计 + * 查询 巡检业务统计 * @param query * @returns {*} */ export const list_statapi = (query?: { taskTimeBegin: string; taskTimeEnd: string }): AxiosPromise => { return request({ - url: '/inspection/data/list', + url: '/inspection/data/role/stat', method: 'get', params: query }); diff --git a/src/api/system/SdbTopupRecord/type.ts b/src/api/system/SdbTopupRecord/type.ts index 23d5806..a7e9724 100644 --- a/src/api/system/SdbTopupRecord/type.ts +++ b/src/api/system/SdbTopupRecord/type.ts @@ -121,7 +121,7 @@ export interface TopupRecordQuery extends PageQuery { /** * 1.电表 2.水表 */ - type?: number; + type?: string; /** * 订单状态(0.未支付 1.已支付 2.支付中,3.支付失败 4.退款) diff --git a/src/api/system/Tmaterial/type.ts b/src/api/system/Tmaterial/type.ts index 41d168c..1f5c33a 100644 --- a/src/api/system/Tmaterial/type.ts +++ b/src/api/system/Tmaterial/type.ts @@ -8,7 +8,7 @@ export interface MaterialVO { * 物料名称* */ materialName: string; - + materialId: string; /** * 品牌* */ diff --git a/src/api/system/equipment/Category/index.ts b/src/api/system/equipment/Category/index.ts index d04c612..bf9493d 100644 --- a/src/api/system/equipment/Category/index.ts +++ b/src/api/system/equipment/Category/index.ts @@ -10,7 +10,7 @@ import { DeviceCategoryVO, DeviceCategoryForm, DeviceCategoryQuery } from './typ export const listDeviceCategory = (query?: DeviceCategoryQuery): AxiosPromise => { return request({ - url: '/system/deviceCategory/list', + url: '/warehouse/deviceCategory/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listDeviceCategory = (query?: DeviceCategoryQuery): AxiosPromise => { return request({ - url: '/system/deviceCategory/' + id, + url: '/warehouse/deviceCategory/' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getDeviceCategory = (id: string | number): AxiosPromise { return request({ - url: '/system/deviceCategory', + url: '/warehouse/deviceCategory', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addDeviceCategory = (data: DeviceCategoryForm) => { */ export const updateDeviceCategory = (data: DeviceCategoryForm) => { return request({ - url: '/system/deviceCategory', + url: '/warehouse/deviceCategory', method: 'put', data: data }); @@ -57,7 +57,7 @@ export const updateDeviceCategory = (data: DeviceCategoryForm) => { */ export const delDeviceCategory = (id: string | number | Array) => { return request({ - url: '/system/deviceCategory/' + id, + url: '/warehouse/deviceCategory/' + id, method: 'delete' }); }; diff --git a/src/api/system/equipment/Category/type.ts b/src/api/system/equipment/Category/type.ts index 83cc39f..4d7ea22 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: number; + status: string; /** * 备注 @@ -34,7 +34,7 @@ export interface DeviceCategoryForm extends BaseEntity { /** * 状态 0正常 1停用 */ - status?: number; + status?: string; /** * 备注 @@ -51,7 +51,7 @@ export interface DeviceCategoryQuery extends PageQuery { /** * 状态 0正常 1停用 */ - status?: number; + status?: string; /** * 日期范围参数 diff --git a/src/api/system/equipment/Repair/index.ts b/src/api/system/equipment/Repair/index.ts index 8a92a68..a938aa0 100644 --- a/src/api/system/equipment/Repair/index.ts +++ b/src/api/system/equipment/Repair/index.ts @@ -10,7 +10,7 @@ import { DeviceRepairVO, DeviceRepairForm, DeviceRepairQuery } from './type'; export const listDeviceRepair = (query?: DeviceRepairQuery): AxiosPromise => { return request({ - url: '/system/deviceRepair/list', + url: '/warehouse/deviceRepair/list', method: 'get', params: query }); @@ -22,7 +22,7 @@ export const listDeviceRepair = (query?: DeviceRepairQuery): AxiosPromise => { return request({ - url: '/system/deviceRepair/' + id, + url: '/warehouse/deviceRepair/' + id, method: 'get' }); }; @@ -33,7 +33,7 @@ export const getDeviceRepair = (id: string | number): AxiosPromise { return request({ - url: '/system/deviceRepair', + url: '/warehouse/deviceRepair', method: 'post', data: data }); @@ -45,7 +45,7 @@ export const addDeviceRepair = (data: DeviceRepairForm) => { */ export const updateDeviceRepair = (data: DeviceRepairForm) => { return request({ - url: '/system/deviceRepair', + url: '/warehouse/deviceRepair', method: 'put', data: data }); @@ -57,7 +57,7 @@ export const updateDeviceRepair = (data: DeviceRepairForm) => { */ export const delDeviceRepair = (id: string | number | Array) => { return request({ - url: '/system/deviceRepair/' + id, + url: '/warehouse/deviceRepair/' + id, method: 'delete' }); }; diff --git a/src/api/system/equipment/Repair/type.ts b/src/api/system/equipment/Repair/type.ts index 3ae79ad..748d2cc 100644 --- a/src/api/system/equipment/Repair/type.ts +++ b/src/api/system/equipment/Repair/type.ts @@ -7,7 +7,7 @@ export interface DeviceRepairVO { /** * 维修设备ID */ - deviceId: string | number; + deviceId: string; /** * 设备名称 @@ -32,23 +32,32 @@ export interface DeviceRepairVO { /** * 维护人员ID,多个用,分隔 */ - maintainUserIds: string | number; + maintainUserIds: string; /** * 故障描述 */ faultDesc: string; + categoryName: string; + createTime: string; /** * 维修结果 0已修复 1未修复 */ - repairResult: number; + repairResult: string; /** * 维修时间 */ repairTime: string; + maintainUserList: { + 'userId': string; + 'userName': string; + 'nickName': string; + 'phonenumber': number; + }[]; + categoryId: string; /** * 备注 */ @@ -59,12 +68,12 @@ export interface DeviceRepairForm extends BaseEntity { /** * 主键ID */ - id?: string | number; + id?: string; /** * 维修设备ID */ - deviceId?: string | number; + deviceId?: string; /** * 设备名称 @@ -89,7 +98,7 @@ export interface DeviceRepairForm extends BaseEntity { /** * 维护人员ID,多个用,分隔 */ - maintainUserIds?: string | number; + maintainUserIds?: string; /** * 故障描述 @@ -99,7 +108,7 @@ export interface DeviceRepairForm extends BaseEntity { /** * 维修结果 0已修复 1未修复 */ - repairResult?: number; + repairResult?: string; /** * 维修时间 @@ -116,7 +125,7 @@ export interface DeviceRepairQuery extends PageQuery { /** * 维修设备ID */ - deviceId?: string | number; + deviceId?: string; /** * 设备名称 @@ -141,7 +150,7 @@ export interface DeviceRepairQuery extends PageQuery { /** * 维护人员ID,多个用,分隔 */ - maintainUserIds?: string | number; + maintainUserIds?: string; /** * 故障描述 @@ -151,7 +160,7 @@ export interface DeviceRepairQuery extends PageQuery { /** * 维修结果 0已修复 1未修复 */ - repairResult?: number; + repairResult?: string; /** * 维修时间 diff --git a/src/api/system/equipment/archive/type.ts b/src/api/system/equipment/archive/type.ts index e326e54..af79530 100644 --- a/src/api/system/equipment/archive/type.ts +++ b/src/api/system/equipment/archive/type.ts @@ -2,12 +2,12 @@ export interface DeviceVO { /** * 主键ID */ - id: string | number; + id: string; /** * 设备分类ID */ - categoryId: string | number; + categoryId: string; /** * 设备名称 @@ -32,7 +32,7 @@ export interface DeviceVO { /** * 维护人员ID,多个用,分隔 */ - maintainUserIds: string | number; + maintainUserIds: string; /** * 设备状态 0正常 1异常 @@ -43,18 +43,27 @@ export interface DeviceVO { * 备注 */ remark: string; + + /** 人员信息 */ + maintainUserList: { + 'userId': string; + 'userName': string; + 'nickName': string; + 'phonenumber': number; + }[]; + createTime?: string; } export interface DeviceForm extends BaseEntity { /** * 主键ID */ - id?: string | number; + id?: string; /** * 设备分类ID */ - categoryId?: string | number; + categoryId?: string; /** * 设备名称 @@ -79,7 +88,7 @@ export interface DeviceForm extends BaseEntity { /** * 维护人员ID,多个用,分隔 */ - maintainUserIds?: string | number; + maintainUserIds?: string; /** * 设备状态 0正常 1异常 @@ -96,7 +105,7 @@ export interface DeviceQuery extends PageQuery { /** * 设备分类ID */ - categoryId?: string | number; + categoryId?: string; /** * 设备名称 diff --git a/src/components/Holder/material.vue b/src/components/Holder/material.vue index 520412d..bd1bee7 100644 --- a/src/components/Holder/material.vue +++ b/src/components/Holder/material.vue @@ -148,9 +148,6 @@ function getlist() { tableData.value = res.rows; total.value = res.total; }) - .catch((error) => { - console.error('获取用户列表失败:', error); - }) .finally(() => { loading.value = false; }); diff --git a/src/components/Holder/repairUser.vue b/src/components/Holder/repairUser.vue index 87144bc..5cfa8f8 100644 --- a/src/components/Holder/repairUser.vue +++ b/src/components/Holder/repairUser.vue @@ -12,6 +12,24 @@ + @@ -21,7 +39,7 @@ - + @@ -51,8 +69,6 @@ import { getUserByRoleKey } from '@/api/system/user'; import { ref, watch, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { com_resident_type } = toRefs(proxy?.useDict('com_resident_type')); -const { com_certification_status } = toRefs(proxy?.useDict('com_certification_status')); const { sys_user_sex } = toRefs(proxy?.useDict('sys_user_sex')); interface tableType extends ResidentVO { @@ -61,7 +77,7 @@ interface tableType extends ResidentVO { const props = defineProps({ userid: { - type: [String, Number], + type: String, default: '' }, returnvalue: { @@ -97,15 +113,8 @@ const dialog = ref({ const queryParams = ref({ pageNum: 1, pageSize: 10, - date: null, - type: null, - status: '', - ownerRelationship: null, - name: null, - houseId: null, - villageId: null, - buildingId: null, - unitNo: null + nickName: null, + phonenumber: null }); const multipleTableRef = ref(); @@ -121,21 +130,31 @@ const isMultiple = computed(() => props.isMultiple ?? false); // 优化 handleUserSelection,避免重复查找 const handleUserSelection = () => { if (!userid.value || !tableData.value.length) return; - const target = tableData.value.find((item) => item.userId == userid.value); - if (target && !multipleSelection.value.some((sel) => sel.id === target.id)) { - multipleSelection.value = [target]; + + multipleSelection.value = []; + if (userid.value.trim() !== '') { + const arr = userid.value.split(','); + arr.forEach((item) => { + const target = tableData.value.find((row) => row.userId == item); + target && multipleSelection.value.push(target); + }); nextTick(() => { - multipleTableRef.value?.setSelection([target]); + if (multipleTableRef.value) { + multipleTableRef.value.clearSelection(); + multipleSelection.value.forEach((item) => { + multipleTableRef.value.toggleRowSelection(item, true); + }); + } }); } }; // 监听 // 监听优化:只在 userid 变化时触发 -watch(userid, handleUserSelection, { immediate: true }); -watch(tableData, () => { - if (userid.value) handleUserSelection(); // 仅在有 userid 时重新处理 -}); +// watch(userid, handleUserSelection, { immediate: true }); +// watch(tableData, () => { +// if (userid.value) handleUserSelection(); // 仅在有 userid 时重新处理 +// }); // ====================== 方法 ====================== // 打开选择框 @@ -172,18 +191,25 @@ function handleSelectionChange(selection: tableType[]) { // ============================================== // 优化 handleRowClick,避免重复 function handleRowClick(row: tableType) { + if (!multipleTableRef.value) return; + if (isMultiple.value) { const index = multipleSelection.value.findIndex((item) => item.id === row.id); if (index > -1) { + // 取消选中 multipleSelection.value.splice(index, 1); multipleTableRef.value?.toggleRowSelection(row, false); } else { + // 选中 multipleSelection.value.push(row); multipleTableRef.value?.toggleRowSelection(row, true); } } else { + // 【单选模式】先清空,再选中当前行 + multipleSelection.value = []; + multipleTableRef.value.clearSelection(); multipleSelection.value = [row]; - multipleTableRef.value?.setSelection([row]); + multipleTableRef.value.toggleRowSelection(row, true); } } // 重置查询 @@ -191,15 +217,8 @@ function resetQuery() { queryParams.value = { pageNum: 1, pageSize: 10, - ownerRelationship: null, - name: null, - date: null, - type: null, - status: '', - houseId: null, - villageId: null, - buildingId: null, - unitNo: null + nickName: null, + phonenumber: null }; getlist(); } @@ -215,31 +234,32 @@ function conback() { // ============================================== function confirm() { dialog.value.dialogVisible = false; - if (multipleSelection.value.length > 0) { - if (isMultiple.value) { - // 多选 - if (returnvalue.value === '*') { - // ✅ 返回整个对象数组 - emit('change', multipleSelection.value); - } else { - // 返回指定字段数组 - emit( - 'change', - multipleSelection.value.map((item) => item[returnvalue.value as keyof tableType]) - ); - } + if (isMultiple.value) { + // 多选 + if (returnvalue.value === '*') { + // ✅ 返回整个对象数组 + emit('change', multipleSelection.value); } else { - // 单选 - if (returnvalue.value === '*') { - // ✅ 返回整个对象 - emit('change', multipleSelection.value[0]); - } else { - console.log(multipleSelection.value[0], returnvalue.value); - // 返回指定字段 - emit('change', multipleSelection.value[0][returnvalue.value as keyof tableType]); - } + // 返回指定字段数组 + emit( + 'change', + multipleSelection.value.map((item) => item[returnvalue.value as keyof tableType]) + ); + } + } else { + // 单选 + if (returnvalue.value === '*') { + // ✅ 返回整个对象 + emit('change', multipleSelection.value[0]); + } else { + console.log(multipleSelection.value[0], returnvalue.value); + // 返回指定字段 + emit('change', multipleSelection.value[0][returnvalue.value as keyof tableType]); } } + + multipleSelection.value = []; + multipleTableRef.value.clearSelection(); } // 初始化 getlist(); @@ -247,6 +267,7 @@ getlist(); defineExpose({ open: () => { dialog.value.dialogVisible = true; + handleUserSelection(); } }); diff --git a/src/views/system/Banner/add.vue b/src/views/system/Banner/add.vue new file mode 100644 index 0000000..e0c9f7e --- /dev/null +++ b/src/views/system/Banner/add.vue @@ -0,0 +1,239 @@ + + + + diff --git a/src/views/system/Banner/index.vue b/src/views/system/Banner/index.vue new file mode 100644 index 0000000..30a1fa4 --- /dev/null +++ b/src/views/system/Banner/index.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/views/system/Sdb/ChargeItem/add.vue b/src/views/system/Sdb/ChargeItem/add.vue index 68b9448..c3b84d2 100644 --- a/src/views/system/Sdb/ChargeItem/add.vue +++ b/src/views/system/Sdb/ChargeItem/add.vue @@ -9,13 +9,14 @@ - + + + 固定单价 + + @@ -26,6 +27,9 @@ + + + @@ -36,18 +40,9 @@ - - - - - - - - {{ item.label }} - - - - + + + @@ -66,11 +61,9 @@ import PageHeader from '@/components/Pageheader/index.vue'; import { getChargeItem, updateChargeItem, addChargeItem } from '@/api/system/SdbChargeItem'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; -const { com_charge_item_method } = toRefs(proxy?.useDict('com_charge_item_method')); const { com_charge_item_unit } = toRefs(proxy?.useDict('com_charge_item_unit')); const { com_charge_item_precision } = toRefs(proxy?.useDict('com_charge_item_precision')); const { com_charge_item_carry_method } = toRefs(proxy?.useDict('com_charge_item_carry_method')); -const { com_charge_item_status } = toRefs(proxy?.useDict('com_charge_item_status')); const { com_charge_item_formula } = toRefs(proxy?.useDict('com_charge_item_formula')); const router = useRouter(); @@ -80,15 +73,13 @@ const formRef = ref(); const form = ref({ 'id': null, 'name': '', - 'billingMethod': '', + 'billingMethod': '0', 'price': null, 'unit': '', 'precision': '', 'carryMethod': '', - 'lateFee': null, 'remark': '', - 'formula': '', - 'status': '0' + 'formula': '' }); const rules = ref({ name: [{ required: true, message: '请输入 项目名称', trigger: 'blur' }], @@ -97,9 +88,7 @@ const rules = ref({ formula: [{ required: true, message: '请选择 计费公式', trigger: 'blur' }], unit: [{ required: true, message: '请选择 计费单位', trigger: 'blur' }], precision: [{ required: true, message: '选择 计算精度', trigger: 'blur' }], - carryMethod: [{ required: true, message: '请选择 进位方式', trigger: 'blur' }], - lateFee: [{ required: true, message: '请输入 滞纳金比例', trigger: 'blur' }], - status: [{ required: true, message: '请选择 状态', trigger: 'blur' }] + carryMethod: [{ required: true, message: '请选择 进位方式', trigger: 'blur' }] }); const userid = ref(null); if (route.query.id) { @@ -113,6 +102,8 @@ if (route.query.id) { } // !== 提交 ============================================================================= // 提交 +// TODO 收费项目提交 + const submitForm = () => { formRef.value?.validate(async (valid: boolean) => { if (valid) { diff --git a/src/views/system/Sdb/ChargeItem/index.vue b/src/views/system/Sdb/ChargeItem/index.vue index fa9a012..d42c19c 100644 --- a/src/views/system/Sdb/ChargeItem/index.vue +++ b/src/views/system/Sdb/ChargeItem/index.vue @@ -45,13 +45,19 @@ - - + + + + + - + @@ -61,17 +67,15 @@ - - - + + + diff --git a/src/views/system/Sdb/SdbBill/add.vue b/src/views/system/Sdb/SdbBill/add.vue new file mode 100644 index 0000000..250f1d1 --- /dev/null +++ b/src/views/system/Sdb/SdbBill/add.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/src/views/system/Sdb/SdbBill/main.vue b/src/views/system/Sdb/SdbBill/main.vue new file mode 100644 index 0000000..dd11c6c --- /dev/null +++ b/src/views/system/Sdb/SdbBill/main.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/src/views/system/Sdb/SdbTopupRecord/index.vue b/src/views/system/Sdb/SdbTopupRecord/index.vue index ff0b51f..455fd76 100644 --- a/src/views/system/Sdb/SdbTopupRecord/index.vue +++ b/src/views/system/Sdb/SdbTopupRecord/index.vue @@ -1,247 +1,84 @@ diff --git a/src/views/system/Sdb/SdbWaterDevice/index.vue b/src/views/system/Sdb/SdbWaterDevice/index.vue index 68a7b58..65288b2 100644 --- a/src/views/system/Sdb/SdbWaterDevice/index.vue +++ b/src/views/system/Sdb/SdbWaterDevice/index.vue @@ -5,7 +5,17 @@
- + + + + + + + + + + + @@ -27,17 +37,12 @@ - - - - + - + - + + + + + + @@ -77,7 +98,7 @@ - + @@ -103,6 +124,7 @@ const huhao = 3096371295; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { com_waterdevice_on_status } = toRefs(proxy?.useDict('com_waterdevice_on_status')); +const { com_water_readrecord_status } = toRefs(proxy?.useDict('com_water_readrecord_status')); const waterDeviceList = ref([]); const buttonLoading = ref(false); @@ -116,27 +138,12 @@ const total = ref(0); const queryFormRef = ref(); const waterDeviceFormRef = ref(); -const splitImages = (url) => { - if (!url) return ''; - const imgUrl = import.meta.env.VITE_IMG_URL + url; - return imgUrl; -}; - const dialog = reactive({ visible: false, title: '' }); -const initFormData: WaterDeviceForm = { - id: undefined, - deviceCode: undefined, - address: undefined, - deleted: undefined, - url: undefined, - openid: undefined -}; -const data = reactive>({ - form: { ...initFormData }, +const data = reactive({ queryParams: { pageNum: 1, pageSize: 10, @@ -144,15 +151,11 @@ const data = reactive>({ address: undefined, deleted: undefined, url: undefined, - openid: undefined, - params: {} - }, - rules: { - id: [{ required: true, message: 'id不能为空', trigger: 'blur' }] + openid: undefined } }); -const { queryParams, form, rules } = toRefs(data); +const { queryParams } = toRefs(data); /** 查询水 设备列表 */ const getList = async () => { @@ -169,10 +172,36 @@ const cancel = () => { dialog.visible = false; }; +const UsedWaterformRef = ref(null); +const UsedWaterform = ref({ + water: 0, + startDate: '', + endDate: '' +}); + +const UploadFileformRef = ref(null); + +const EditHouseformRef = ref(null); +const EditHouseform = ref({ + houseid: '' +}); + /** 表单重置 */ const reset = () => { - form.value = { ...initFormData }; - waterDeviceFormRef.value?.resetFields(); + UsedWaterform.value = { + water: 0, + startDate: '', + endDate: '' + }; + EditHouseform.value = { + houseid: '' + }; + // 上传 清空 + UploadFileformRef.value?.resetFields(); + // 使用水量 清空 + EditHouseformRef.value?.resetFields(); + // 使用水量 清空 + UsedWaterformRef.value?.resetFields(); }; /** 搜索按钮操作 */ @@ -194,21 +223,42 @@ const handleSelectionChange = (selection: WaterDeviceVO[]) => { multiple.value = !selection.length; }; -/** 新增按钮操作 */ -const handleAdd = () => { - reset(); - dialog.visible = true; - dialog.title = '添加水 设备'; +const router = useRouter(); + +/** 充值记录 */ +const handleRecode = (row: WaterDeviceVO) => { + // 1.电表 2.水表 + router.push({ + path: '/Sdb/TopupRecord', + query: { + type: '2', + id: row.id + } + }); +}; +/** 生成二维码 */ +const handleQrCode = (row: WaterDeviceVO) => { + // 1.电表 2.水表 + console.log('qrcode'); }; -/** 修改按钮操作 */ +/** 用水量 更新固件 */ +const handleOpenDialog = (type: 'usedWater' | 'Upload', row: WaterDeviceVO) => { + reset(); + dialog.visible = true; + dialog.title = type === 'usedWater' ? '用水量' : '更新固件'; +}; + +/** 水表 启停*/ +const handleChangeWater = (val: string, row: WaterDeviceVO) => { + console.log(val, row, typeof val); +}; + +/** 编辑房屋 按钮操作 */ const handleUpdate = async (row?: WaterDeviceVO) => { reset(); - const _id = row?.id || ids.value[0]; - const res = await getWaterDevice(_id); - Object.assign(form.value, res.data); dialog.visible = true; - dialog.title = '修改水 设备'; + dialog.title = '编辑房屋'; }; /** 提交按钮 */ @@ -228,28 +278,6 @@ const submitForm = () => { }); }; -/** 删除按钮操作 */ -const handleDelete = async (row?: WaterDeviceVO) => { - const _ids = row?.id || ids.value; - await proxy?.$modal.confirm('是否确认删除水 设备编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false)); - await delWaterDevice(_ids); - proxy?.$modal.msgSuccess('删除成功'); - await getList(); -}; -const handleProject = (row) => { - row.url = 'https://www.bugtc.com/static/dsb/20260107/272d59d5-bff1-49b3-b899-046169c07257.png'; -}; -/** 导出按钮操作 */ -const handleExport = () => { - proxy?.download( - 'system/waterDevice/export', - { - ...queryParams.value - }, - `waterDevice_${new Date().getTime()}.xlsx` - ); -}; - onMounted(() => { getList(); }); diff --git a/src/views/system/equipment/Archive/add.vue b/src/views/system/equipment/Archive/add.vue new file mode 100644 index 0000000..dbdeffb --- /dev/null +++ b/src/views/system/equipment/Archive/add.vue @@ -0,0 +1,245 @@ + + + + + diff --git a/src/views/system/equipment/Archive/index.vue b/src/views/system/equipment/Archive/index.vue index 6af8cf6..ebaa253 100644 --- a/src/views/system/equipment/Archive/index.vue +++ b/src/views/system/equipment/Archive/index.vue @@ -1,12 +1,11 @@