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

276 lines
4.7 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';
2025-06-18 16:50:58 +08:00
import { getDictOptions } from '#/utils/dict';
import { renderDict } from '#/utils/render';
2025-06-18 11:03:42 +08:00
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',
2025-06-27 15:16:06 +08:00
fieldName: 'buildingName',
label: '建筑名称',
2025-06-18 11:03:42 +08:00
},
{
component: 'Input',
2025-06-27 15:16:06 +08:00
fieldName: 'buildingCode',
label: '建筑编码',
2025-06-18 11:03:42 +08:00
},
{
2025-06-18 16:50:58 +08:00
component: 'Select',
componentProps: {
options: getDictOptions('wy_cqxz'),
},
2025-06-18 11:03:42 +08:00
fieldName: 'cqxz',
2025-06-26 17:59:00 +08:00
label: '产权性质',
2025-06-19 09:50:46 +08:00
},
2025-06-18 11:03:42 +08:00
];
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();
},
},
2025-06-18 11:03:42 +08:00
},
{
2025-06-27 15:16:06 +08:00
title: '小区/园区',
field: 'communityCode',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '建筑名称',
field: 'buildingName',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
2025-06-27 15:16:06 +08:00
{
title: '建筑编码',
field: 'buildingCode',
width: 'auto'
},
2025-06-18 11:03:42 +08:00
{
title: '地址',
field: 'addr',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
2025-06-26 17:59:00 +08:00
title: '产权性质',
2025-06-18 11:03:42 +08:00
field: 'cqxz',
2025-06-26 17:59:00 +08:00
width: 'auto',
2025-06-18 16:50:58 +08:00
slots: {
default: ({ row }) => {
return renderDict(row.cqxz, 'wy_cqxz');
},
},
2025-06-18 11:03:42 +08:00
},
{
title: '不动产编号',
field: 'bdcbh',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '产权编号',
field: 'cqbh',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
2025-06-26 17:59:00 +08:00
title: '土地编号',
2025-06-18 11:03:42 +08:00
field: 'tdbh',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '建筑面积',
field: 'jzmj',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '产权面积',
field: 'cqmj',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '可租面积',
field: 'kzmj',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '自用面积',
field: 'zymj',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '配套面积',
field: 'ptmj',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '车位面积',
field: 'cwmj',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
{
title: '标准层高',
field: 'bzcg',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-18 11:03:42 +08:00
},
2025-06-19 09:50:46 +08:00
{
title: '修改时间',
field: 'modifyTime',
2025-06-26 17:59:00 +08:00
width: 'auto'
2025-06-19 09:50:46 +08:00
},
2025-06-18 11:03:42 +08:00
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
2025-06-19 09:50:46 +08:00
label: '',
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: 'buildingName',
component: 'Input',
rules: 'required',
},
2025-06-26 17:59:00 +08:00
{
2025-06-27 15:16:06 +08:00
label: '建筑编码',
fieldName: 'buildingCode',
2025-06-26 17:59:00 +08:00
component: 'Input',
rules: 'required',
},
2025-06-18 11:03:42 +08:00
{
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',
},
{
2025-06-26 17:59:00 +08:00
label: '产权性质',
2025-06-18 11:03:42 +08:00
fieldName: 'cqxz',
2025-06-18 16:50:58 +08:00
component: 'Select',
componentProps: {
options: getDictOptions('wy_cqxz'),
},
rules: 'selectRequired',
2025-06-18 11:03:42 +08:00
},
{
label: '不动产编号',
fieldName: 'bdcbh',
component: 'Input',
rules: 'required',
},
{
label: '产权编号',
fieldName: 'cqbh',
component: 'Input',
rules: 'required',
},
{
2025-06-27 15:16:06 +08:00
label: '土地编号',
2025-06-18 11:03:42 +08:00
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: '排序字段',
2025-06-19 09:50:46 +08:00
fieldName: 'sort',
2025-06-18 11:03:42 +08:00
component: 'Input',
2025-06-26 17:59:00 +08:00
}
2025-06-18 11:03:42 +08:00
];