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/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/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/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/machineType/index.vue b/apps/web-antd/src/views/property/equipmentManagement/machineType/index.vue index 6164e9bd..62c866b7 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() { 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, 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(); +} +