feat: 首页数据对接
This commit is contained in:
@@ -13,7 +13,7 @@ let arr: CommunityVO[] = [];
|
||||
const communitySelect: VbenFormSchema = {
|
||||
component: 'ApiSelect',
|
||||
fieldName: 'communityId',
|
||||
label: '社区',
|
||||
label: '园区名称',
|
||||
componentProps: {
|
||||
resultField: 'list', // 根据API返回结构调整
|
||||
labelField: 'communityName',
|
||||
@@ -46,11 +46,11 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '社区',
|
||||
title: '园区名称',
|
||||
field: 'communityText',
|
||||
},
|
||||
{
|
||||
title: '建筑',
|
||||
title: '建筑名称',
|
||||
field: 'buildingName',
|
||||
},
|
||||
{
|
||||
@@ -73,10 +73,10 @@ export const columns: VxeGridProps['columns'] = [
|
||||
title: '竣工日期',
|
||||
field: 'completionDate',
|
||||
},
|
||||
{
|
||||
title: '地址',
|
||||
field: 'addr',
|
||||
},
|
||||
// {
|
||||
// title: '地址',
|
||||
// field: 'addr',
|
||||
// },
|
||||
{
|
||||
title: '建筑面积(㎡)',
|
||||
field: 'area',
|
||||
@@ -123,8 +123,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'floorCount',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:1,
|
||||
precision:0,
|
||||
min: 1,
|
||||
precision: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -132,8 +132,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'unitCount',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:1,
|
||||
precision:0,
|
||||
min: 1,
|
||||
precision: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -150,8 +150,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'elevatorCount',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:0,
|
||||
min: 0,
|
||||
precision: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -163,19 +163,19 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
valueFormat: 'YYYY-MM-DD',
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '地址',
|
||||
fieldName: 'addr',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
// {
|
||||
// label: '地址',
|
||||
// fieldName: 'addr',
|
||||
// component: 'Input',
|
||||
// rules: 'required',
|
||||
// },
|
||||
{
|
||||
label: '建筑面积(㎡)',
|
||||
fieldName: 'area',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:2,
|
||||
min: 0,
|
||||
precision: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -183,8 +183,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'insideInArea',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:2,
|
||||
min: 0,
|
||||
precision: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -192,8 +192,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'sharedArea',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:2,
|
||||
min: 0,
|
||||
precision: 2,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@@ -1,19 +1,24 @@
|
||||
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';
|
||||
import {renderDict} from "#/utils/render";
|
||||
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';
|
||||
import { renderDict } from '#/utils/render';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
// {
|
||||
// component: 'Select',
|
||||
// componentProps: {
|
||||
// getPopupContainer,
|
||||
// options: getDictOptions(DictEnum.wy_sqlx),
|
||||
// },
|
||||
// fieldName: 'communityType',
|
||||
// label: '园区类型',
|
||||
// },
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.wy_sqlx),
|
||||
},
|
||||
fieldName: 'communityType',
|
||||
label: '园区类型',
|
||||
component: 'Input',
|
||||
fieldName: 'communityName',
|
||||
label: '园区名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
@@ -25,20 +30,20 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
|
||||
// export const columns: () => VxeGridProps['columns'] = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{type: 'checkbox', width: 60},
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '园区名称',
|
||||
field: 'communityName',
|
||||
},
|
||||
{
|
||||
title: '园区类型',
|
||||
field: 'communityType',
|
||||
slots: {
|
||||
default: ({row}) => {
|
||||
return renderDict(row.communityType, DictEnum.wy_sqlx)
|
||||
}
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '园区类型',
|
||||
// field: 'communityType',
|
||||
// slots: {
|
||||
// default: ({row}) => {
|
||||
// return renderDict(row.communityType, DictEnum.wy_sqlx)
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
{
|
||||
title: '城市',
|
||||
field: 'cityFullName',
|
||||
@@ -78,7 +83,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
field: 'action',
|
||||
fixed: 'right',
|
||||
slots: {default: 'action'},
|
||||
slots: { default: 'action' },
|
||||
title: '操作',
|
||||
width: 180,
|
||||
},
|
||||
@@ -182,7 +187,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
component: 'Textarea',
|
||||
},
|
||||
{
|
||||
label: '社区/园区图片',
|
||||
label: '园区图片',
|
||||
fieldName: 'img',
|
||||
component: 'ImageUpload',
|
||||
componentProps: {
|
||||
|
@@ -5,7 +5,7 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'floorName',
|
||||
label: '楼栋号',
|
||||
label: '楼层名称',
|
||||
},
|
||||
];
|
||||
|
||||
@@ -14,22 +14,22 @@ export const querySchema: FormSchemaGetter = () => [
|
||||
export const columns: VxeGridProps['columns'] = [
|
||||
{ type: 'checkbox', width: 60 },
|
||||
{
|
||||
title: '社区',
|
||||
title: '园区名称',
|
||||
field: 'communityText',
|
||||
},
|
||||
{
|
||||
title: '建筑',
|
||||
title: '建筑名称',
|
||||
field: 'buildingText',
|
||||
},
|
||||
{
|
||||
title: '楼栋号',
|
||||
title: '楼层名称',
|
||||
field: 'floorName',
|
||||
},
|
||||
{
|
||||
title: '楼层号',
|
||||
field: 'floorNumber',
|
||||
},
|
||||
/* {
|
||||
// {
|
||||
// title: '楼层号',
|
||||
// field: 'floorNumber',
|
||||
// },
|
||||
/* {
|
||||
title: '楼层类型',
|
||||
field: 'floorType',
|
||||
},*/
|
||||
@@ -78,33 +78,21 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
defaultValue: undefined,
|
||||
label: '建筑名称',
|
||||
rules: 'selectRequired',
|
||||
formItemClass:'col-span-2',
|
||||
formItemClass: 'col-span-2',
|
||||
},
|
||||
{
|
||||
label: '楼栋号',
|
||||
label: '楼层名称',
|
||||
fieldName: 'floorName',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
// {
|
||||
// label: '楼层号',
|
||||
// fieldName: 'floorNumber',
|
||||
// component: 'Input',
|
||||
// rules: 'required',
|
||||
// },
|
||||
/*{
|
||||
label: '楼层类型',
|
||||
fieldName: 'floorType',
|
||||
component: 'Select',
|
||||
componentProps: {},
|
||||
},*/
|
||||
{
|
||||
label: '房间数量',
|
||||
fieldName: 'roomCount',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:0,
|
||||
min: 0,
|
||||
precision: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -112,8 +100,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'floorHeight',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:0,
|
||||
min: 0,
|
||||
precision: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -121,8 +109,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'area',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:2,
|
||||
min: 0,
|
||||
precision: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -130,8 +118,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'insideInArea',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:2,
|
||||
min: 0,
|
||||
precision: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -139,8 +127,8 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
fieldName: 'sharedArea',
|
||||
component: 'InputNumber',
|
||||
componentProps: {
|
||||
min:0,
|
||||
precision:2,
|
||||
min: 0,
|
||||
precision: 2,
|
||||
},
|
||||
},
|
||||
];
|
||||
|
@@ -5,11 +5,6 @@ import { getDictOptions } from '#/utils/dict';
|
||||
import { DictEnum } from '@vben/constants';
|
||||
import { renderDict } from '#/utils/render';
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'communityName',
|
||||
label: '社区',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
@@ -44,11 +39,11 @@ export const columns: VxeGridProps['columns'] = [
|
||||
{
|
||||
title: '是否重要',
|
||||
field: 'isMatter',
|
||||
slots:{
|
||||
default:({row})=>{
|
||||
return renderDict(row.isMatter,'wy_fjzydj')
|
||||
}
|
||||
}
|
||||
slots: {
|
||||
default: ({ row }) => {
|
||||
return renderDict(row.isMatter, 'wy_fjzydj');
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
@@ -96,25 +91,25 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.wy_room_type),
|
||||
},
|
||||
rules:'selectRequired'
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '建筑面积',
|
||||
fieldName: 'area',
|
||||
component: 'InputNumber',
|
||||
componentProps:{
|
||||
min:0,
|
||||
componentProps: {
|
||||
min: 0,
|
||||
},
|
||||
rules:'required'
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '使用面积',
|
||||
fieldName: 'insideInArea',
|
||||
component: 'InputNumber',
|
||||
componentProps:{
|
||||
min:0,
|
||||
componentProps: {
|
||||
min: 0,
|
||||
},
|
||||
rules:'required'
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '是否重要',
|
||||
@@ -123,7 +118,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_fjzydj'),
|
||||
},
|
||||
rules:'selectRequired'
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '状态',
|
||||
@@ -133,7 +128,7 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
getPopupContainer,
|
||||
options: getDictOptions(DictEnum.wy_fjzt),
|
||||
},
|
||||
rules:'selectRequired'
|
||||
rules: 'selectRequired',
|
||||
},
|
||||
{
|
||||
label: '房间图片',
|
||||
|
Reference in New Issue
Block a user