Files
admin-vben5/apps/web-antd/src/views/property/floor/data.ts
2025-06-27 15:16:06 +08:00

119 lines
2.1 KiB
TypeScript

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