This commit is contained in:
@@ -1,74 +1,37 @@
|
||||
import type {FormSchemaGetter} from '#/adapter/form';
|
||||
import type {VxeGridProps} from '#/adapter/vxe-table';
|
||||
import {getDictOptions} from "#/utils/dict";
|
||||
import type { FormSchemaGetter } from '#/adapter/form';
|
||||
import type { VxeGridProps } from '#/adapter/vxe-table';
|
||||
|
||||
export const querySchema: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Select',
|
||||
fieldName: 'floorCode',
|
||||
label: '所属社区',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
fieldName: 'floorCode1',
|
||||
label: '所属建筑',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
fieldName: 'floorCode2',
|
||||
label: '所属单元',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
fieldName: 'floorCode3',
|
||||
label: '所属楼层',
|
||||
component: 'Input',
|
||||
fieldName: 'communityName',
|
||||
label: '社区',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'roomNumber',
|
||||
label: '房间号',
|
||||
fieldName: 'orientation',
|
||||
label: '朝向',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'roomCode',
|
||||
label: '房间编码',
|
||||
fieldName: 'isForSale',
|
||||
label: '是否可售',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('room_type'),
|
||||
},
|
||||
fieldName: 'roomType',
|
||||
label: '房间类型',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_fjzt'),
|
||||
},
|
||||
componentProps: {},
|
||||
fieldName: 'status',
|
||||
label: '房间状态',
|
||||
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: '所属楼层',
|
||||
field: 'floorCode',
|
||||
},
|
||||
{
|
||||
title: '房间编码',
|
||||
field: 'roomCode',
|
||||
title: '所属楼层ID',
|
||||
field: 'floorId',
|
||||
},
|
||||
{
|
||||
title: '房间号',
|
||||
@@ -79,7 +42,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'roomType',
|
||||
},
|
||||
{
|
||||
title: '面积(㎡)',
|
||||
title: '面积(平方米)',
|
||||
field: 'area',
|
||||
},
|
||||
{
|
||||
@@ -95,7 +58,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
field: 'isForSale',
|
||||
},
|
||||
{
|
||||
title: '房间状态',
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
},
|
||||
{
|
||||
@@ -109,7 +72,7 @@ export const columns: VxeGridProps['columns'] = [
|
||||
|
||||
export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '主键',
|
||||
label: '',
|
||||
fieldName: 'id',
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
@@ -118,51 +81,25 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '所属社区',
|
||||
fieldName: 'floorCode',
|
||||
label: '所属楼层ID',
|
||||
fieldName: 'floorId',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '所属建筑',
|
||||
fieldName: 'floorCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '所属单元',
|
||||
fieldName: 'floorCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '所属楼层',
|
||||
fieldName: 'floorCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '房间号',
|
||||
label: '房间号(如101,202)',
|
||||
fieldName: 'roomNumber',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '房间编码',
|
||||
fieldName: 'roomCode',
|
||||
component: 'Input',
|
||||
rules: 'required',
|
||||
},
|
||||
{
|
||||
label: '房间类型',
|
||||
fieldName: 'roomType',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('room_type'),
|
||||
},
|
||||
componentProps: {},
|
||||
},
|
||||
{
|
||||
label: '面积(㎡)',
|
||||
label: '面积(平方米)',
|
||||
fieldName: 'area',
|
||||
component: 'Input',
|
||||
},
|
||||
@@ -174,22 +111,17 @@ export const modalSchema: FormSchemaGetter = () => [
|
||||
{
|
||||
label: '朝向',
|
||||
fieldName: 'orientation',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('direction_towards'),
|
||||
},
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '是否可售',
|
||||
fieldName: 'isForSale',
|
||||
component: 'Select',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '房间状态',
|
||||
label: '状态',
|
||||
fieldName: 'status',
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
options: getDictOptions('wy_fjzt'),
|
||||
},
|
||||
componentProps: {},
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user