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: 'communityName',
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '社区',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {},
|
|
|
|
fieldName: 'communityType',
|
|
|
|
label: '社区类型',
|
2025-06-18 11:03:42 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
2025-06-28 02:41:09 +08:00
|
|
|
fieldName: 'propertyCompany',
|
|
|
|
label: '物业公司',
|
2025-06-18 11:03:42 +08:00
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
component: 'Input',
|
|
|
|
fieldName: 'contactPhone',
|
|
|
|
label: '联系电话',
|
|
|
|
},
|
2025-06-18 11:03:42 +08:00
|
|
|
];
|
|
|
|
|
2025-06-28 02:41:09 +08:00
|
|
|
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
|
|
|
// export const columns: () => VxeGridProps['columns'] = () => [
|
2025-06-18 11:03:42 +08:00
|
|
|
export const columns: VxeGridProps['columns'] = [
|
|
|
|
{ type: 'checkbox', width: 60 },
|
2025-06-19 09:50:46 +08:00
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '社区名称',
|
2025-06-18 11:03:42 +08:00
|
|
|
field: 'communityName',
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '社区类型',
|
2025-06-18 11:03:42 +08:00
|
|
|
field: 'communityType',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '省',
|
|
|
|
field: 'province',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '市',
|
|
|
|
field: 'city',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '区',
|
|
|
|
field: 'district',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '地址',
|
|
|
|
field: 'addr',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '经度',
|
|
|
|
field: 'lon',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '维度',
|
|
|
|
field: 'lat',
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '占地面积(平方米)',
|
|
|
|
field: 'area',
|
2025-06-18 11:03:42 +08:00
|
|
|
},
|
2025-06-19 09:50:46 +08:00
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
title: '',
|
|
|
|
field: 'builtYear',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '物业公司',
|
|
|
|
field: 'propertyCompany',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '联系电话',
|
|
|
|
field: 'contactPhone',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '社区描述',
|
|
|
|
field: 'description',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '小图图片',
|
|
|
|
field: 'img',
|
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-28 02:41:09 +08:00
|
|
|
label: '',
|
2025-06-18 11:03:42 +08:00
|
|
|
fieldName: 'id',
|
|
|
|
component: 'Input',
|
|
|
|
dependencies: {
|
|
|
|
show: () => false,
|
|
|
|
triggerFields: [''],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '社区名称',
|
2025-06-18 11:03:42 +08:00
|
|
|
fieldName: 'communityName',
|
|
|
|
component: 'Input',
|
|
|
|
rules: 'required',
|
|
|
|
},
|
|
|
|
{
|
2025-06-28 02:41:09 +08:00
|
|
|
label: '社区类型',
|
2025-06-18 11:03:42 +08:00
|
|
|
fieldName: 'communityType',
|
|
|
|
component: 'Select',
|
2025-06-28 02:41:09 +08:00
|
|
|
componentProps: {},
|
2025-06-18 11:03:42 +08:00
|
|
|
rules: 'selectRequired',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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-28 02:41:09 +08:00
|
|
|
label: '占地面积(平方米)',
|
|
|
|
fieldName: 'area',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '',
|
|
|
|
fieldName: 'builtYear',
|
|
|
|
component: 'DatePicker',
|
2025-06-18 16:50:58 +08:00
|
|
|
componentProps: {
|
2025-06-28 02:41:09 +08:00
|
|
|
showTime: true,
|
|
|
|
format: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
2025-06-18 16:50:58 +08:00
|
|
|
},
|
2025-06-28 02:41:09 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '物业公司',
|
|
|
|
fieldName: 'propertyCompany',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '联系电话',
|
|
|
|
fieldName: 'contactPhone',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '社区描述',
|
|
|
|
fieldName: 'description',
|
|
|
|
component: 'Textarea',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '小图图片',
|
|
|
|
fieldName: 'img',
|
|
|
|
component: 'Input',
|
|
|
|
},
|
2025-06-18 11:03:42 +08:00
|
|
|
];
|