1
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
15683799673
2025-06-28 02:41:09 +08:00
parent 81a89bb4dc
commit acd63bc96e
23 changed files with 670 additions and 1046 deletions

View File

@@ -1,56 +1,41 @@
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: 'communityName',
label: '小区名称',
},
{
component: 'Input',
fieldName: 'communityCode',
label: '小区编码',
label: '社区',
},
{
component: 'Select',
componentProps: {
options: getDictOptions('wy_sqlx'),
},
componentProps: {},
fieldName: 'communityType',
label: '区类型',
}
label: '区类型',
},
{
component: 'Input',
fieldName: 'propertyCompany',
label: '物业公司',
},
{
component: 'Input',
fieldName: 'contactPhone',
label: '联系电话',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: '序号',
field: 'id',
slots: {
default: ({ rowIndex }) => {
return (rowIndex + 1).toString();
},
},
},
{
title: '小区名称',
title: '社区名称',
field: 'communityName',
},
{
title: '小区编码',
field: 'communityCode',
},
{
title: '小区类型',
title: '社区类型',
field: 'communityType',
slots: {
default: ({ row }) => {
return renderDict(row.communityType, 'wy_sqlx');
},
},
},
{
title: '省',
@@ -77,12 +62,28 @@ export const columns: VxeGridProps['columns'] = [
field: 'lat',
},
{
title: '小图图片',
field: 'img',
title: '占地面积(平方米)',
field: 'area',
},
{
title: '修改时间',
field: 'modifyTime',
title: '',
field: 'builtYear',
},
{
title: '物业公司',
field: 'propertyCompany',
},
{
title: '联系电话',
field: 'contactPhone',
},
{
title: '社区描述',
field: 'description',
},
{
title: '小图图片',
field: 'img',
},
{
field: 'action',
@@ -95,7 +96,7 @@ export const columns: VxeGridProps['columns'] = [
export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
label: '',
fieldName: 'id',
component: 'Input',
dependencies: {
@@ -104,24 +105,16 @@ export const modalSchema: FormSchemaGetter = () => [
},
},
{
label: '区名称',
label: '区名称',
fieldName: 'communityName',
component: 'Input',
rules: 'required',
},
{
label: '小区编码',
fieldName: 'communityCode',
component: 'Input',
rules: 'required',
},
{
label: '小区类型',
label: '社区类型',
fieldName: 'communityType',
component: 'Select',
componentProps: {
options: getDictOptions('wy_sqlx'),
},
componentProps: {},
rules: 'selectRequired',
},
{
@@ -160,11 +153,39 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input',
rules: 'required',
},
{
label: '占地面积(平方米)',
fieldName: 'area',
component: 'Input',
},
{
label: '',
fieldName: 'builtYear',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
},
{
label: '物业公司',
fieldName: 'propertyCompany',
component: 'Input',
},
{
label: '联系电话',
fieldName: 'contactPhone',
component: 'Input',
},
{
label: '社区描述',
fieldName: 'description',
component: 'Textarea',
},
{
label: '小图图片',
fieldName: 'img',
component: 'ImageUpload',
componentProps: {
},
}
component: 'Input',
},
];