Files
admin-vben5/apps/web-antd/src/views/property/floor/data.ts

119 lines
2.1 KiB
TypeScript
Raw Normal View History

2025-06-18 11:03:42 +08:00
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'communityCode',
2025-06-27 15:16:06 +08:00
label: '小区/园区',
2025-06-18 11:03:42 +08:00
},
{
component: 'Input',
fieldName: 'buildingCode',
label: '建筑名称',
},
{
component: 'Input',
2025-06-27 15:16:06 +08:00
fieldName: 'floorName',
label: '楼层名称',
2025-06-18 11:03:42 +08:00
},
{
component: 'Input',
2025-06-27 15:16:06 +08:00
fieldName: 'floorCode',
label: '楼层编码',
2025-06-18 11:03:42 +08:00
},
{
component: 'Input',
fieldName: 'orgCode',
label: '组织编码',
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
2025-06-27 15:16:06 +08:00
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{
title: '小区/园区',
2025-06-18 11:03:42 +08:00
field: 'communityCode',
},
{
title: '建筑名称',
field: 'buildingCode',
},
{
2025-06-27 15:16:06 +08:00
title: '楼层名称',
field: 'floorName',
2025-06-18 11:03:42 +08:00
},
{
2025-06-27 15:16:06 +08:00
title: '楼层编码',
field: 'floorCode',
2025-06-18 11:03:42 +08:00
},
{
title: '组织编码',
field: 'orgCode',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
2025-06-19 09:50:46 +08:00
label: 'ID',
2025-06-18 11:03:42 +08:00
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
2025-06-27 15:16:06 +08:00
label: '小区/园区',
2025-06-18 11:03:42 +08:00
fieldName: 'communityCode',
component: 'Input',
rules: 'required',
},
{
label: '建筑名称',
fieldName: 'buildingCode',
component: 'Input',
rules: 'required',
},
{
2025-06-27 15:16:06 +08:00
label: '单元名称',
fieldName: 'buildingCode',
2025-06-18 11:03:42 +08:00
component: 'Input',
rules: 'required',
},
{
2025-06-27 15:16:06 +08:00
label: '楼层名称',
2025-06-18 11:03:42 +08:00
fieldName: 'floorName',
component: 'Input',
rules: 'required',
},
2025-06-27 15:16:06 +08:00
{
label: '楼层编码',
fieldName: 'floorCode',
component: 'Input',
rules: 'required',
},
2025-06-18 11:03:42 +08:00
{
label: '组织编码',
fieldName: 'orgCode',
component: 'Input',
rules: 'required',
},
];