Files
admin-vben5/apps/web-antd/src/views/property/building/data.ts
FLL 8ecf6b03aa
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled
小区,建筑,楼层
2025-06-26 17:59:00 +08:00

304 lines
5.5 KiB
TypeScript

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: 'communityCode',
label: '园区编码',
},
{
component: 'Input',
fieldName: 'buildingCode',
label: '建筑编码',
},
{
component: 'Input',
fieldName: 'buildingName',
label: '建筑名称',
},
{
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
options: getDictOptions('wy_cqxz'),
},
fieldName: 'cqxz',
label: '产权性质',
},
{
component: 'Input',
fieldName: 'dataState',
label: '数据状态',
}
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '园区编码',
field: 'communityCode',
width: 'auto'
},
{
title: '建筑编码',
field: 'buildingCode',
width: 'auto'
},
{
title: '建筑名称',
field: 'buildingName',
width: 'auto'
},
{
title: '地址',
field: 'addr',
width: 'auto'
},
{
title: '产权性质',
field: 'cqxz',
width: 'auto',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
return renderDict(row.cqxz, 'wy_cqxz');
},
},
},
{
title: '不动产编号',
field: 'bdcbh',
width: 'auto'
},
{
title: '产权编号',
field: 'cqbh',
width: 'auto'
},
{
title: '土地编号',
field: 'tdbh',
width: 'auto'
},
{
title: '建筑面积',
field: 'jzmj',
width: 'auto'
},
{
title: '产权面积',
field: 'cqmj',
width: 'auto'
},
{
title: '可租面积',
field: 'kzmj',
width: 'auto'
},
{
title: '自用面积',
field: 'zymj',
width: 'auto'
},
{
title: '配套面积',
field: 'ptmj',
width: 'auto'
},
{
title: '车位面积',
field: 'cwmj',
width: 'auto'
},
{
title: '标准层高',
field: 'bzcg',
width: 'auto'
},
{
title: '数据状态',
field: 'dataState',
width: 'auto'
},
{
title: '修改时间',
field: 'modifyTime',
width: 'auto'
},
{
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: 'communityCode',
component: 'Input',
rules: 'required',
},
{
label: '建筑编码',
fieldName: 'buildingCode',
component: 'Input',
rules: 'required',
},
{
label: '建筑名称',
fieldName: 'buildingName',
component: 'Input',
rules: 'required',
},
{
label: '组织编码',
fieldName: 'orgCode',
component: 'Input',
rules: 'required',
},
{
label: '省',
fieldName: 'province',
component: 'Input',
rules: 'required',
},
{
label: '市',
fieldName: 'city',
component: 'Input',
rules: 'required',
},
{
label: '区',
fieldName: 'district',
component: 'Input',
rules: 'required',
},
{
label: '地址',
fieldName: 'addr',
component: 'Input',
rules: 'required',
},
{
label: '经度',
fieldName: 'lon',
component: 'Input',
rules: 'required',
},
{
label: '维度',
fieldName: 'lat',
component: 'Input',
rules: 'required',
},
{
label: '产权性质',
fieldName: 'cqxz',
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
options: getDictOptions('wy_cqxz'),
},
rules: 'selectRequired',
},
{
label: '不动产编号',
fieldName: 'bdcbh',
component: 'Input',
rules: 'required',
},
{
label: '产权编号',
fieldName: 'cqbh',
component: 'Input',
rules: 'required',
},
{
label: '图地编号',
fieldName: 'tdbh',
component: 'Input',
rules: 'required',
},
{
label: '建筑面积',
fieldName: 'jzmj',
component: 'Input',
rules: 'required',
},
{
label: '产权面积',
fieldName: 'cqmj',
component: 'Input',
rules: 'required',
},
{
label: '可租面积',
fieldName: 'kzmj',
component: 'Input',
rules: 'required',
},
{
label: '自用面积',
fieldName: 'zymj',
component: 'Input',
rules: 'required',
},
{
label: '配套面积',
fieldName: 'ptmj',
component: 'Input',
rules: 'required',
},
{
label: '车位面积',
fieldName: 'cwmj',
component: 'Input',
rules: 'required',
},
{
label: '标准层高',
fieldName: 'bzcg',
component: 'Input',
rules: 'required',
},
{
label: '排序字段',
fieldName: 'sort',
component: 'Input',
},
{
label: '数据状态',
fieldName: 'dataState',
component: 'Input',
},
{
label: '修改时间',
fieldName: 'modifyTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
}
];