From 56440da41b8c428df5c3c22a0076715f6bf139ea Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Wed, 16 Jul 2025 17:32:23 +0800 Subject: [PATCH 1/4] =?UTF-8?q?1=E3=80=81=E8=AE=BE=E5=A4=87=E5=88=97?= =?UTF-8?q?=E8=A1=A8=202=E3=80=81=E4=BF=9D=E5=85=BB=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentManagement/machine/index.ts | 61 +++++ .../equipmentManagement/machine/model.d.ts | 204 ++++++++++++++++ .../equipmentManagement/maintainPlan/index.ts | 61 +++++ .../maintainPlan/model.d.ts | 174 ++++++++++++++ .../equipmentManagement/machine/data.ts | 217 ++++++++++++++++++ .../equipmentManagement/machine/index.vue | 204 ++++++++++++++++ .../machine/machine-detail.vue | 83 +++++++ .../machine/machine-modal.vue | 186 +++++++++++++++ .../equipmentManagement/maintainPlan/data.ts | 209 +++++++++++++++++ .../maintainPlan/index.vue | 197 ++++++++++++++++ .../maintainPlan/maintainPlan-modal.vue | 153 ++++++++++++ .../maintainPlan/plan-detail.vue | 88 +++++++ .../inspectionDetails/data.ts | 8 +- .../property/resident/unit/unit-modal.vue | 3 +- 14 files changed, 1842 insertions(+), 6 deletions(-) create mode 100644 apps/web-antd/src/api/property/equipmentManagement/machine/index.ts create mode 100644 apps/web-antd/src/api/property/equipmentManagement/machine/model.d.ts create mode 100644 apps/web-antd/src/api/property/equipmentManagement/maintainPlan/index.ts create mode 100644 apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts create mode 100644 apps/web-antd/src/views/property/equipmentManagement/machine/data.ts create mode 100644 apps/web-antd/src/views/property/equipmentManagement/machine/index.vue create mode 100644 apps/web-antd/src/views/property/equipmentManagement/machine/machine-detail.vue create mode 100644 apps/web-antd/src/views/property/equipmentManagement/machine/machine-modal.vue create mode 100644 apps/web-antd/src/views/property/equipmentManagement/maintainPlan/data.ts create mode 100644 apps/web-antd/src/views/property/equipmentManagement/maintainPlan/index.vue create mode 100644 apps/web-antd/src/views/property/equipmentManagement/maintainPlan/maintainPlan-modal.vue create mode 100644 apps/web-antd/src/views/property/equipmentManagement/maintainPlan/plan-detail.vue diff --git a/apps/web-antd/src/api/property/equipmentManagement/machine/index.ts b/apps/web-antd/src/api/property/equipmentManagement/machine/index.ts new file mode 100644 index 00000000..ec6e678f --- /dev/null +++ b/apps/web-antd/src/api/property/equipmentManagement/machine/index.ts @@ -0,0 +1,61 @@ +import type { MachineVO, MachineForm, MachineQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询设备列表列表 +* @param params +* @returns 设备列表列表 +*/ +export function machineList(params?: MachineQuery) { + return requestClient.get>('/property/machine/list', { params }); +} + +/** + * 导出设备列表列表 + * @param params + * @returns 设备列表列表 + */ +export function machineExport(params?: MachineQuery) { + return commonExport('/property/machine/export', params ?? {}); +} + +/** + * 查询设备列表详情 + * @param id id + * @returns 设备列表详情 + */ +export function machineInfo(id: ID) { + return requestClient.get(`/property/machine/${id}`); +} + +/** + * 新增设备列表 + * @param data + * @returns void + */ +export function machineAdd(data: MachineForm) { + return requestClient.postWithMsg('/property/machine', data); +} + +/** + * 更新设备列表 + * @param data + * @returns void + */ +export function machineUpdate(data: MachineForm) { + return requestClient.putWithMsg('/property/machine', data); +} + +/** + * 删除设备列表 + * @param id id + * @returns void + */ +export function machineRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/machine/${id}`); +} diff --git a/apps/web-antd/src/api/property/equipmentManagement/machine/model.d.ts b/apps/web-antd/src/api/property/equipmentManagement/machine/model.d.ts new file mode 100644 index 00000000..63cc6f56 --- /dev/null +++ b/apps/web-antd/src/api/property/equipmentManagement/machine/model.d.ts @@ -0,0 +1,204 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface MachineVO { + /** + * 主键 + */ + id: string | number; + + /** + * 设备名称 + */ + machineName: string; + + /** + * 设备编码 + */ + machineCode: string; + + /** + * 设备品牌 + */ + machineBrand: string; + + /** + * 设备类型 + */ + machineTypeId: string | number; + + /** + * 位置详情 + */ + locationId: string | number; + + /** + * 采购价格 + */ + purchasePrice: number; + + /** + * 启用时间 + */ + activationTime: string; + + /** + * 保修截至时间 + */ + deadline: string; + + /** + * 使用年限(年) + */ + serviceLife: number; + + /** + * 保修周期 + */ + maintenanceCycle: string; + + /** + * 使用状态 + */ + state: string; + + /** + * 责任人 + */ + personId: string | number; + +} + +export interface MachineForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 设备名称 + */ + machineName?: string; + + /** + * 设备编码 + */ + machineCode?: string; + + /** + * 设备品牌 + */ + machineBrand?: string; + + /** + * 设备类型 + */ + machineTypeId?: string | number; + + /** + * 位置详情 + */ + locationId?: string | number; + + /** + * 采购价格 + */ + purchasePrice?: number; + + /** + * 启用时间 + */ + activationTime?: string; + + /** + * 保修截至时间 + */ + deadline?: string; + + /** + * 使用年限(年) + */ + serviceLife?: number; + + /** + * 保修周期 + */ + maintenanceCycle?: string; + + /** + * 使用状态 + */ + state?: string; + + /** + * 责任人 + */ + personId?: string | number; + +} + +export interface MachineQuery extends PageQuery { + /** + * 设备名称 + */ + machineName?: string; + + /** + * 设备编码 + */ + machineCode?: string; + + /** + * 设备品牌 + */ + machineBrand?: string; + + /** + * 设备类型 + */ + machineTypeId?: string | number; + + /** + * 位置详情 + */ + locationId?: string | number; + + /** + * 采购价格 + */ + purchasePrice?: number; + + /** + * 启用时间 + */ + activationTime?: string; + + /** + * 保修截至时间 + */ + deadline?: string; + + /** + * 使用年限(年) + */ + serviceLife?: number; + + /** + * 保修周期 + */ + maintenanceCycle?: string; + + /** + * 使用状态 + */ + state?: string; + + /** + * 责任人 + */ + personId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/index.ts b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/index.ts new file mode 100644 index 00000000..6b4ed000 --- /dev/null +++ b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/index.ts @@ -0,0 +1,61 @@ +import type { MaintainPlanVO, MaintainPlanForm, MaintainPlanQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询保养计划列表 +* @param params +* @returns 保养计划列表 +*/ +export function maintainPlanList(params?: MaintainPlanQuery) { + return requestClient.get>('/property/maintainPlan/list', { params }); +} + +/** + * 导出保养计划列表 + * @param params + * @returns 保养计划列表 + */ +export function maintainPlanExport(params?: MaintainPlanQuery) { + return commonExport('/property/maintainPlan/export', params ?? {}); +} + +/** + * 查询保养计划详情 + * @param id id + * @returns 保养计划详情 + */ +export function maintainPlanInfo(id: ID) { + return requestClient.get(`/property/maintainPlan/${id}`); +} + +/** + * 新增保养计划 + * @param data + * @returns void + */ +export function maintainPlanAdd(data: MaintainPlanForm) { + return requestClient.postWithMsg('/property/maintainPlan', data); +} + +/** + * 更新保养计划 + * @param data + * @returns void + */ +export function maintainPlanUpdate(data: MaintainPlanForm) { + return requestClient.putWithMsg('/property/maintainPlan', data); +} + +/** + * 删除保养计划 + * @param id id + * @returns void + */ +export function maintainPlanRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/maintainPlan/${id}`); +} diff --git a/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts new file mode 100644 index 00000000..cfea1a69 --- /dev/null +++ b/apps/web-antd/src/api/property/equipmentManagement/maintainPlan/model.d.ts @@ -0,0 +1,174 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface MaintainPlanVO { + /** + * 主键 + */ + id: string | number; + + /** + * 计划名称 + */ + planName: string; + + /** + * 计划编号 + */ + planNo: string; + + /** + * 保养周期(1月/天2.固定天) + */ + planPeriod: string; + + /** + * 保养设备类型id + */ + machineTypeId: string | number; + + /** + * 保养天 + */ + maintainDay: string; + + /** + * 保养月 + */ + maintainMonth: string; + + /** + * 固定天 + */ + maintainEveryday: string; + + /** + * 开始时间 + */ + startDate: string; + + /** + * 结束时间 + */ + endDate: string; + + /** + * 状态(0启用,1停用) + */ + state: string; + +} + +export interface MaintainPlanForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 计划名称 + */ + planName?: string; + + /** + * 计划编号 + */ + planNo?: string; + + /** + * 保养周期(1月/天2.固定天) + */ + planPeriod?: string; + + /** + * 保养设备类型id + */ + machineTypeId?: string | number; + + /** + * 保养天 + */ + maintainDay?: string; + + /** + * 保养月 + */ + maintainMonth?: string; + + /** + * 固定天 + */ + maintainEveryday?: string; + + /** + * 开始时间 + */ + startDate?: string; + + /** + * 结束时间 + */ + endDate?: string; + + /** + * 状态(0启用,1停用) + */ + state?: string; + +} + +export interface MaintainPlanQuery extends PageQuery { + /** + * 计划名称 + */ + planName?: string; + + /** + * 计划编号 + */ + planNo?: string; + + /** + * 保养周期(1月/天2.固定天) + */ + planPeriod?: string; + + /** + * 保养设备类型id + */ + machineTypeId?: string | number; + + /** + * 保养天 + */ + maintainDay?: string; + + /** + * 保养月 + */ + maintainMonth?: string; + + /** + * 固定天 + */ + maintainEveryday?: string; + + /** + * 开始时间 + */ + startDate?: string; + + /** + * 结束时间 + */ + endDate?: string; + + /** + * 状态(0启用,1停用) + */ + state?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/equipmentManagement/machine/data.ts b/apps/web-antd/src/views/property/equipmentManagement/machine/data.ts new file mode 100644 index 00000000..81762779 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/machine/data.ts @@ -0,0 +1,217 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import {getDictOptions} from "#/utils/dict"; +import {renderDict} from "#/utils/render"; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'machineName', + label: '设备名称', + }, + { + component: 'Input', + fieldName: 'machineCode', + label: '设备编码', + }, + { + component: 'Select', + componentProps:{ + options:getDictOptions('wy_sbsyzt') + }, + fieldName: 'state', + label: '使用状态', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '设备名称', + field: 'machineName', + minWidth:180 + }, + { + title: '设备编码', + field: 'machineCode', + width:100 + }, + { + title: '设备品牌', + field: 'machineBrand', + width:100 + }, + { + title: '设备类型', + field: 'machineTypeId', + width:100 + }, + { + title: '位置详情', + field: 'locationId', + width:100 + }, + { + title: '采购价格', + field: 'purchasePrice', + width:100 + }, + { + title: '启用时间', + field: 'activationTime', + width:100 + }, + { + title: '保修截至时间', + field: 'deadline', + width:100 + }, + { + title: '使用年限', + field: 'serviceLife', + width:100 + }, + { + title: '保修周期', + field: 'maintenanceCycle', + width:100, + slots:{ + default: ({row})=>{ + return renderDict(row.maintenanceCycle,'wy_sbbxzq') + } + } + }, + { + title: '使用状态', + field: 'state', + width:100, + slots:{ + default: ({row})=>{ + return renderDict(row.state,'wy_sbsyzt') + } + } + }, + { + title: '责任人', + field: 'personId', + width:100 + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '设备名称', + fieldName: 'machineName', + component: 'Input', + rules: 'required', + formItemClass: 'col-span-2', + }, + { + label: '设备编码', + fieldName: 'machineCode', + component: 'Input', + rules: 'required', + }, + { + label: '设备品牌', + fieldName: 'machineBrand', + component: 'Input', + rules: 'required', + }, + { + label: '设备类型', + fieldName: 'machineTypeId', + component: 'TreeSelect', + rules: 'selectRequired', + formItemClass: 'col-span-2', + }, + { + label: '位置详情', + fieldName: 'locationId', + component: 'ApiSelect', + rules: 'selectRequired', + formItemClass: 'col-span-2', + }, + { + label: '采购价格', + fieldName: 'purchasePrice', + component: 'InputNumber', + componentProps:{ + min:0, + precision:2 + }, + rules: 'required', + }, + { + label: '启用时间', + fieldName: 'activationTime', + component: 'DatePicker', + componentProps: { + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + }, + rules: 'required', + }, + { + label: '保修截至时间', + fieldName: 'deadline', + component: 'DatePicker', + componentProps: { + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + }, + rules: 'required', + }, + { + label: '使用年限', + fieldName: 'serviceLife', + component: 'InputNumber', + componentProps:{ + min:1, + precision:0 + }, + rules: 'required', + }, + { + label: '保修周期', + fieldName: 'maintenanceCycle', + component: 'Select', + componentProps: { + options:getDictOptions('wy_sbbxzq') + }, + rules: 'selectRequired', + }, + { + label: '使用状态', + fieldName: 'state', + component: 'Select', + componentProps:{ + options:getDictOptions('wy_sbsyzt') + }, + rules: 'selectRequired', + }, + { + label: '责任人', + fieldName: 'personId', + component: 'ApiSelect', + rules: 'selectRequired', + formItemClass: 'col-span-2', + }, +]; diff --git a/apps/web-antd/src/views/property/equipmentManagement/machine/index.vue b/apps/web-antd/src/views/property/equipmentManagement/machine/index.vue new file mode 100644 index 00000000..8e58bef2 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/machine/index.vue @@ -0,0 +1,204 @@ + + + diff --git a/apps/web-antd/src/views/property/equipmentManagement/machine/machine-detail.vue b/apps/web-antd/src/views/property/equipmentManagement/machine/machine-detail.vue new file mode 100644 index 00000000..16a40736 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/machine/machine-detail.vue @@ -0,0 +1,83 @@ + + + diff --git a/apps/web-antd/src/views/property/equipmentManagement/machine/machine-modal.vue b/apps/web-antd/src/views/property/equipmentManagement/machine/machine-modal.vue new file mode 100644 index 00000000..f170ba78 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/machine/machine-modal.vue @@ -0,0 +1,186 @@ + + + + diff --git a/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/data.ts b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/data.ts new file mode 100644 index 00000000..fc09cfd8 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/data.ts @@ -0,0 +1,209 @@ +import type {FormSchemaGetter} from '#/adapter/form'; +import type {VxeGridProps} from '#/adapter/vxe-table'; +import {getDictOptions} from "#/utils/dict"; +import {renderDict} from "#/utils/render"; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'planName', + label: '计划名称', + }, + { + component: 'Select', + fieldName: 'state', + label: '状态', + componentProps: { + options: getDictOptions('wy_state') + }, + }, +]; + +export const columns: VxeGridProps['columns'] = [ + {type: 'checkbox', width: 60}, + { + title: '主键', + field: 'id', + }, + { + title: '计划名称', + field: 'planName', + }, + { + title: '计划编号', + field: 'planNo', + }, + { + title: '设备类型', + field: 'machineTypeId', + }, + { + title: '保养周期', + field: 'planPeriod', + slots: { + default: ({row}) => { + return renderDict(row.planPeriod,'wy_sbbyzq') + } + } + }, + // { + // title: '保养天', + // field: 'maintainDay', + // }, + // { + // title: '保养月', + // field: 'maintainMonth', + // }, + // { + // title: '固定天', + // field: 'maintainEveryday', + // }, + { + title: '开始时间', + field: 'startDate', + }, + { + title: '结束时间', + field: 'endDate', + }, + { + title: '状态', + field: 'state', + slots:{ + default:'state' + } + }, + { + field: 'action', + fixed: 'right', + slots: {default: 'action'}, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '计划名称', + fieldName: 'planName', + component: 'Input', + rules: 'required', + }, + { + label: '计划编号', + fieldName: 'planNo', + component: 'Input', + rules: 'required', + }, + { + label: '保养周期', + fieldName: 'planPeriod', + component: 'Select', + componentProps: { + options: getDictOptions('wy_sbbyzq') + }, + rules: 'selectRequired', + }, + { + label: '设备类型', + fieldName: 'machineTypeId', + component: 'TreeSelect', + rules: 'selectRequired', + }, + { + label: '月', + fieldName: 'maintainMonth', + component: 'CheckboxGroup', + dependencies: { + show: (formValue) => formValue.planPeriod=='1', + triggerFields: ['planPeriod'], + }, + formItemClass: 'col-span-2', + componentProps: { + options: Array.from({ length: 12 }, (_, i) => ({ + label: `${i + 1}月`, + value: (i + 1).toString(), + })), + }, + rules: 'selectRequired', + }, + { + label: '日', + fieldName: 'maintainDay', + component: 'CheckboxGroup', + dependencies: { + show: (formValue) => formValue.planPeriod=='1', + triggerFields: ['planPeriod'], + }, + formItemClass: 'col-span-2', + componentProps: { + options: Array.from({ length: 31 }, (_, i) => ({ + label: `${i + 1}日`, + value: (i + 1).toString(), + })), + }, + rules: 'selectRequired', + }, + { + label: '固定天数', + fieldName: 'maintainEveryday', + component: 'InputNumber', + dependencies: { + show: (formValue) => formValue.planPeriod=='2', + triggerFields: ['planPeriod'], + }, + rules:'required', + componentProps:{ + min:0, + precision:2, + placeholder:'请填写多少天后保养一次', + }, + }, + { + label: '计划日期', + fieldName: 'planDate', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', + }, + rules:'required' + }, + // { + // label: '开始时间', + // fieldName: 'startDate', + // component: 'DatePicker', + // componentProps: { + // showTime: true, + // format: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'YYYY-MM-DD HH:mm:ss', + // }, + // rules:'required' + // }, + // { + // label: '结束时间', + // fieldName: 'endDate', + // component: 'DatePicker', + // componentProps: { + // showTime: true, + // format: 'YYYY-MM-DD HH:mm:ss', + // valueFormat: 'YYYY-MM-DD HH:mm:ss', + // }, + // rules:'required' + // }, + // { + // label: '状态(0启用,1停用)', + // fieldName: 'state', + // component: 'Input', + // }, +]; diff --git a/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/index.vue b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/index.vue new file mode 100644 index 00000000..8b999fd5 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/index.vue @@ -0,0 +1,197 @@ + + + diff --git a/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/maintainPlan-modal.vue b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/maintainPlan-modal.vue new file mode 100644 index 00000000..e5ed2a24 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/maintainPlan-modal.vue @@ -0,0 +1,153 @@ + + + + diff --git a/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/plan-detail.vue b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/plan-detail.vue new file mode 100644 index 00000000..895b6e20 --- /dev/null +++ b/apps/web-antd/src/views/property/equipmentManagement/maintainPlan/plan-detail.vue @@ -0,0 +1,88 @@ + + + diff --git a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts index 679a5ade..ac3cee68 100644 --- a/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts +++ b/apps/web-antd/src/views/property/inspectionManagement/inspectionDetails/data.ts @@ -15,10 +15,10 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Select', componentProps: { - options:getDictOptions('wy_xjqdfs') + options:getDictOptions('wy_xjzt') }, - fieldName: 'taskType', - label: '巡检方式', + fieldName: 'status', + label: '巡检状态', }, ]; @@ -73,7 +73,7 @@ export const columns: VxeGridProps['columns'] = [ width:100, slots: { default: ({ row }) => { - return renderDict(row.taskType, 'wy_xjqdfs'); + return renderDict(row.taskType, 'wy_xjzt'); }, }, }, diff --git a/apps/web-antd/src/views/property/resident/unit/unit-modal.vue b/apps/web-antd/src/views/property/resident/unit/unit-modal.vue index 5c860d9c..c4310ad3 100644 --- a/apps/web-antd/src/views/property/resident/unit/unit-modal.vue +++ b/apps/web-antd/src/views/property/resident/unit/unit-modal.vue @@ -3,7 +3,7 @@ import { computed, ref } from 'vue'; import { useVbenModal } from '@vben/common-ui'; import { $t } from '@vben/locales'; -import {cloneDeep, getPopupContainer, handleNode} from '@vben/utils'; +import {cloneDeep, handleNode} from '@vben/utils'; import { useVbenForm } from '#/adapter/form'; import { resident_unitAdd, resident_unitInfo, resident_unitUpdate } from '#/api/property/resident/unit'; @@ -108,7 +108,6 @@ async function initLocationOptions() { value: 'code', children: 'children', }, - getPopupContainer, placeholder: '请选择入驻位置', showSearch: true, treeData: locationList, From 26ba2029778cbc66ea52cfa5e657c60d31959938 Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Wed, 16 Jul 2025 17:45:30 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=B1=BB=E5=9E=8B=E5=B1=95=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/machine-type-tree.vue | 6 +- .../equipmentManagement/machineType/index.vue | 278 ++++++++++-------- 2 files changed, 153 insertions(+), 131 deletions(-) diff --git a/apps/web-antd/src/views/property/equipmentManagement/components/machine-type-tree.vue b/apps/web-antd/src/views/property/equipmentManagement/components/machine-type-tree.vue index 6a383851..dfecface 100644 --- a/apps/web-antd/src/views/property/equipmentManagement/components/machine-type-tree.vue +++ b/apps/web-antd/src/views/property/equipmentManagement/components/machine-type-tree.vue @@ -45,7 +45,7 @@ const showTreeSkeleton = ref(true); async function loadTree() { showTreeSkeleton.value = true; searchValue.value = ''; - selectDeptId.value = []; + // selectDeptId.value = []; // 移除这行,刷新树时不清空选中 const ret = await getMachineTypeTree(); deptTreeArray.value = convertTreeLabel(ret); showTreeSkeleton.value = false; @@ -55,7 +55,9 @@ async function handleReload() { await loadTree(); emit('reload'); } - +defineExpose({ + handleReload, +}); onMounted(loadTree); diff --git a/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue b/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue index 6164e9bd..6a24bd47 100644 --- a/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue +++ b/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue @@ -1,7 +1,7 @@ @@ -142,27 +157,23 @@ function handleDownloadExcel() { From 637f18438776cadd62d5d66f7ceb03bde3ddf033 Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Wed, 16 Jul 2025 21:58:55 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat(sis):=20=E7=94=B5=E6=A2=AF=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A2=9E=E5=8A=A0=E6=A5=BC=E5=B1=82=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/api/property/floor/index.ts | 8 ++ .../src/api/sis/elevatorInfo/model.d.ts | 5 + .../src/views/sis/elevatorInfo/data.ts | 2 +- .../sis/elevatorInfo/floorAuth-modal.vue | 96 +++++++++++++++++++ .../src/views/sis/elevatorInfo/index.vue | 14 +++ 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 apps/web-antd/src/views/sis/elevatorInfo/floorAuth-modal.vue diff --git a/apps/web-antd/src/api/property/floor/index.ts b/apps/web-antd/src/api/property/floor/index.ts index 8b154ce2..69cee4af 100644 --- a/apps/web-antd/src/api/property/floor/index.ts +++ b/apps/web-antd/src/api/property/floor/index.ts @@ -59,3 +59,11 @@ export function floorUpdate(data: FloorForm) { export function floorRemove(id: ID | IDS) { return requestClient.deleteWithMsg(`/property/floor/${id}`); } + +/** + * 根据单元ID查询楼层 + * @param id id + */ +export function queryByUnitId(id: ID | IDS) { + return requestClient.get(`/property/floor/queryByUnitId/${id}`); +} diff --git a/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts b/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts index f9fe457a..80369b4d 100644 --- a/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts +++ b/apps/web-antd/src/api/sis/elevatorInfo/model.d.ts @@ -194,6 +194,11 @@ export interface ElevatorInfoForm extends BaseEntity { */ controlPwd?: string; + /** + * 单元ID + */ + unitId?: number; + } export interface ElevatorInfoQuery extends PageQuery { diff --git a/apps/web-antd/src/views/sis/elevatorInfo/data.ts b/apps/web-antd/src/views/sis/elevatorInfo/data.ts index 9e94a8fa..4c416af8 100644 --- a/apps/web-antd/src/views/sis/elevatorInfo/data.ts +++ b/apps/web-antd/src/views/sis/elevatorInfo/data.ts @@ -85,7 +85,7 @@ export const columns: VxeGridProps['columns'] = [ fixed: 'right', slots: { default: 'action' }, title: '操作', - width: 180, + width: 240, }, ]; diff --git a/apps/web-antd/src/views/sis/elevatorInfo/floorAuth-modal.vue b/apps/web-antd/src/views/sis/elevatorInfo/floorAuth-modal.vue new file mode 100644 index 00000000..1ceb6d55 --- /dev/null +++ b/apps/web-antd/src/views/sis/elevatorInfo/floorAuth-modal.vue @@ -0,0 +1,96 @@ + + + diff --git a/apps/web-antd/src/views/sis/elevatorInfo/index.vue b/apps/web-antd/src/views/sis/elevatorInfo/index.vue index 721e23db..ae3195ad 100644 --- a/apps/web-antd/src/views/sis/elevatorInfo/index.vue +++ b/apps/web-antd/src/views/sis/elevatorInfo/index.vue @@ -25,6 +25,7 @@ import { commonDownloadExcel } from '#/utils/file/download'; import elevatorInfoModal from './elevatorInfo-modal.vue'; import { columns, querySchema } from './data'; +import floorAuthModal from './floorAuth-modal.vue'; const formOptions: VbenFormProps = { commonConfig: { @@ -88,6 +89,10 @@ const [ElevatorInfoModal, modalApi] = useVbenModal({ connectedComponent: elevatorInfoModal, }); +const [FloorAuthModal, floorAuthModalApi] = useVbenModal({ + connectedComponent: floorAuthModal, +}); + function handleAdd() { modalApi.setData({}); modalApi.open(); @@ -122,6 +127,12 @@ function handleDownloadExcel() { fieldMappingTime: formOptions.fieldMappingTime, }); } + +function handleAuth(row: Required) { + floorAuthModalApi.setData({ unitId: row.unitId, elevatorId: row.elevatorId }); + floorAuthModalApi.open(); +} + From cef7871eba035b4e0419dd2a57057d235012ffd5 Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Thu, 17 Jul 2025 09:39:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=B1=BB=E5=9E=8B=E5=B1=95=E7=A4=BA=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../equipmentManagement/machineType/index.vue | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue b/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue index 6a24bd47..62c866b7 100644 --- a/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue +++ b/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue @@ -194,28 +194,10 @@ function handleDownloadExcel() { - - - {{ detailData.machineTypeName }} - - - {{ detailData.machineTypeCode }} - - - - {{ detailData.isEnable == '1' ? '启用' : '禁用' }} - - - - {{ detailData.remark || '-' }} - - +

类型名称:{{ detailData.machineTypeName }}

+

类型编号:{{ detailData.machineTypeCode }}

+

是否启用:{{ detailData.isEnable == '1' ? '启用' : '禁用' }}

+

备注:{{ detailData.remark || '-' }}