This commit is contained in:
2025-06-18 16:50:58 +08:00
parent 1262d4c745
commit 06a0e3649d
46 changed files with 3048 additions and 545 deletions

View File

@@ -1,6 +1,8 @@
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 = () => [
{
@@ -49,7 +51,11 @@ export const querySchema: FormSchemaGetter = () => [
label: '维度',
},
{
component: 'Input',
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
options: getDictOptions('wy_cqxz'),
},
fieldName: 'cqxz',
label: '产权性质(1:自持2承租3自持+承租,4政府免费使用)',
},
@@ -63,11 +69,6 @@ export const querySchema: FormSchemaGetter = () => [
fieldName: 'cqbh',
label: '产权编号',
},
{
component: 'Input',
fieldName: 'orgCode',
label: '组织编码',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
@@ -117,6 +118,12 @@ export const columns: VxeGridProps['columns'] = [
{
title: '产权性质(1:自持2承租3自持+承租,4政府免费使用)',
field: 'cqxz',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
return renderDict(row.cqxz, 'wy_cqxz');
},
},
},
{
title: '不动产编号',
@@ -166,10 +173,6 @@ export const columns: VxeGridProps['columns'] = [
title: '组织编码',
field: 'orgCode',
},
{
title: '数据状态1有效0无效',
field: 'dataState',
},
{
field: 'action',
fixed: 'right',
@@ -246,8 +249,12 @@ export const modalSchema: FormSchemaGetter = () => [
{
label: '产权性质(1:自持2承租3自持+承租,4政府免费使用)',
fieldName: 'cqxz',
component: 'Input',
rules: 'required',
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_CQXZ 便于维护
options: getDictOptions('wy_cqxz'),
},
rules: 'selectRequired',
},
{
label: '不动产编号',
@@ -321,9 +328,4 @@ export const modalSchema: FormSchemaGetter = () => [
component: 'Input',
rules: 'required',
},
{
label: '数据状态1有效0无效',
fieldName: 'dataState',
component: 'Input',
},
];