This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
import { DictEnum } from '@vben/constants';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'communityName',
|
||||
label: '社区',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {},
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.wy_sqlx),
|
||||
},
|
||||
fieldName: 'communityType',
|
||||
label: '社区类型',
|
||||
},
|
||||
@@ -18,11 +19,6 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
fieldName: 'propertyCompany',
|
||||
label: '物业公司',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'contactPhone',
|
||||
label: '联系电话',
|
||||
},
|
||||
];
|
||||
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
@@ -36,18 +32,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '社区类型',
|
||||
field: 'communityType',
|
||||
slots: { default: 'communityType' },
|
||||
},
|
||||
{
|
||||
title: '省',
|
||||
field: 'province',
|
||||
},
|
||||
{
|
||||
title: '市',
|
||||
field: 'city',
|
||||
},
|
||||
{
|
||||
title: '区',
|
||||
field: 'district',
|
||||
title: '城市',
|
||||
field: 'cityFullName',
|
||||
},
|
||||
{
|
||||
title: '地址',
|
||||
@@ -62,11 +51,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'lat',
|
||||
},
|
||||
{
|
||||
title: '占地面积(平方米)',
|
||||
title: '占地面积',
|
||||
field: 'area',
|
||||
},
|
||||
{
|
||||
title: '',
|
||||
title: '建成时间',
|
||||
field: 'builtYear',
|
||||
},
|
||||
{
|
||||
@@ -81,10 +70,6 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '社区描述',
|
||||
field: 'description',
|
||||
},
|
||||
{
|
||||
title: '小图图片',
|
||||
field: 'img',
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
@@ -114,10 +99,20 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '社区类型',
|
||||
fieldName: 'communityType',
|
||||
component: 'Select',
|
||||
componentProps: {},
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.wy_sqlx),
|
||||
},
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
component: 'TreeSelect',
|
||||
fieldName: 'cityFullCode',
|
||||
defaultValue: undefined,
|
||||
label: '城市',
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
/*{
|
||||
label: '省',
|
||||
fieldName: 'province',
|
||||
component: 'Input',
|
||||
@@ -134,7 +129,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'district',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
},*/
|
||||
{
|
||||
label: '地址',
|
||||
fieldName: 'addr',
|
||||
@@ -145,27 +140,25 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
label: '经度',
|
||||
fieldName: 'lon',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '维度',
|
||||
fieldName: 'lat',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '占地面积(平方米)',
|
||||
label: '占地面积',
|
||||
fieldName: 'area',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
label: '建成时间',
|
||||
fieldName: 'builtYear',
|
||||
component: 'DatePicker',
|
||||
componentProps: {
|
||||
showTime: true,
|
||||
format: 'YYYY-MM-DD HH:mm:ss',
|
||||
valueFormat: 'YYYY-MM-DD HH:mm:ss',
|
||||
format: 'YYYY-MM-DD',
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -184,8 +177,12 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Textarea',
|
||||
},
|
||||
{
|
||||
label: '小图图片',
|
||||
label: '人像图片',
|
||||
fieldName: 'img',
|
||||
component: 'Input',
|
||||
component: 'ImageUpload',
|
||||
componentProps: {
|
||||
maxCount: 1, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
|
||||
},
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user