diff --git a/apps/web-antd/src/views/property/resident/unit/components/room-tree.vue b/apps/web-antd/src/views/property/resident/unit/components/room-tree.vue new file mode 100644 index 00000000..1dca356c --- /dev/null +++ b/apps/web-antd/src/views/property/resident/unit/components/room-tree.vue @@ -0,0 +1,141 @@ + + + diff --git a/apps/web-antd/src/views/property/resident/unit/data.ts b/apps/web-antd/src/views/property/resident/unit/data.ts index 7e7358f9..ad305334 100644 --- a/apps/web-antd/src/views/property/resident/unit/data.ts +++ b/apps/web-antd/src/views/property/resident/unit/data.ts @@ -47,12 +47,12 @@ export const columns: VxeGridProps['columns'] = [ return row.id } }, - width: 100 + width: 180 }, { title: '单位名称', field: 'name', - width: 100 + minWidth: 180 }, { title: '单位类型', @@ -72,7 +72,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '联系电话', field: 'phone', - width: 100 + width: 120 }, // { // title: '入驻位置', @@ -82,7 +82,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '入驻时间', field: 'time', - width: 100, + width: 180, }, { title: '状态', @@ -98,19 +98,22 @@ export const columns: VxeGridProps['columns'] = [ { title: '备注', field: 'remark', - width: 100, + width: 180, + slots: { default: ({ row }) => { + return row.remark || '-' + }, }, }, { title: '创建时间', field: 'createTime', - width: 100, + width: 180, }, { field: 'action', fixed: 'right', slots: { default: 'action' }, title: '操作', - minWidth: 180, + width: 180, }, ] @@ -155,13 +158,13 @@ export const modalSchema: FormSchemaGetter = () => [ z.number().int().min(1000000000).max(19999999999, { message: '手机号格式错误' }) ]).transform(val => val.toString()), }, - { - label: '入驻位置', - fieldName: 'locations', - component: 'TreeSelect', - rules: 'selectRequired', - formItemClass: 'col-span-2' - }, + // { + // label: '入驻位置', + // fieldName: 'locations', + // component: 'TreeSelect', + // rules: 'selectRequired', + // formItemClass: 'col-span-2' + // }, { label: '入驻时间', fieldName: 'time', @@ -173,11 +176,6 @@ export const modalSchema: FormSchemaGetter = () => [ }, rules: 'required', }, - { - label: '', - fieldName: 'Placeholder', - component: '' - }, { label: '授权期限', fieldName: 'authTime', @@ -188,6 +186,7 @@ export const modalSchema: FormSchemaGetter = () => [ valueFormat: 'YYYY-MM-DD HH:mm:ss', }, rules: 'required', + formItemClass: 'col-span-1' }, { label: '通行权限组', diff --git a/apps/web-antd/src/views/property/resident/unit/unit-detail.vue b/apps/web-antd/src/views/property/resident/unit/unit-detail.vue index a04f2bf8..0d02a285 100644 --- a/apps/web-antd/src/views/property/resident/unit/unit-detail.vue +++ b/apps/web-antd/src/views/property/resident/unit/unit-detail.vue @@ -12,6 +12,7 @@ import relativeTime from 'dayjs/plugin/relativeTime'; import {resident_unitInfo, authGroupList} from '#/api/property/resident/unit'; import {renderDict} from "#/utils/render"; +import RoomTree from "./components/room-tree.vue"; dayjs.extend(duration); dayjs.extend(relativeTime); @@ -39,55 +40,68 @@ async function handleOpenChange(open: boolean) { authGroupName.value = authGroup.find(item => item.id === authGroupId)?.name; // 赋值 unitDetail.value = response; + if(response.location){ + selectRoomId.value=response.location.split(','); + } modalApi.modalLoading(false); } +const selectRoomId = ref([]); + 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 0d5d78a7..7a92e6bf 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 @@ -1,20 +1,21 @@