Files
admin-vben5/apps/web-antd/src/views/property/conference/data.ts

341 lines
6.4 KiB
TypeScript
Raw Normal View History

2025-06-18 11:03:42 +08:00
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
export const querySchema: FormSchemaGetter = () => [
{
component: 'Input',
fieldName: 'roomName',
label: '会议室名称',
},
{
component: 'Input',
fieldName: 'roomNo',
label: '会议室编号',
},
{
component: 'Input',
fieldName: 'roomLocation',
label: '会议室位置',
},
{
component: 'Input',
fieldName: 'roomArea',
label: '会议室面积',
},
{
component: 'Select',
componentProps: {
},
fieldName: 'roomType',
label: '会议室类型',
},
{
component: 'Input',
fieldName: 'roomNumber',
label: '会议室容纳人数',
},
{
component: 'Input',
fieldName: 'roomFacilities',
label: '会议室配套设施',
},
{
component: 'Select',
componentProps: {
},
fieldName: 'feeType',
label: '会议室价格类型',
},
{
component: 'Input',
fieldName: 'feePrice',
label: '费用金额',
},
{
component: 'Input',
fieldName: 'responsiblePerson',
label: '负责人',
},
{
component: 'Input',
fieldName: 'contactNumber',
label: '联系电话',
},
{
component: 'Input',
fieldName: 'pictures',
label: '会议室照片',
},
{
component: 'Input',
fieldName: 'description',
label: '会议室描述',
},
{
component: 'Input',
fieldName: 'review',
label: '是否需要审核',
},
{
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
},
fieldName: 'enabledStatus',
label: '启用状态',
},
{
component: 'Input',
fieldName: 'openingWeek',
label: '开放星期',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'openingBeginTime',
label: '开放开始时间',
},
{
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
fieldName: 'openingEndTime',
label: '开放结束时间',
},
];
// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: 'id',
field: 'id',
},
{
title: '会议室名称',
field: 'roomName',
},
{
title: '会议室编号',
field: 'roomNo',
},
{
title: '会议室位置',
field: 'roomLocation',
},
{
title: '会议室面积',
field: 'roomArea',
},
{
title: '会议室类型',
field: 'roomType',
},
{
title: '会议室容纳人数',
field: 'roomNumber',
},
{
title: '会议室配套设施',
field: 'roomFacilities',
},
{
title: '会议室价格类型',
field: 'feeType',
},
{
title: '费用金额',
field: 'feePrice',
},
{
title: '负责人',
field: 'responsiblePerson',
},
{
title: '联系电话',
field: 'contactNumber',
},
{
title: '会议室照片',
field: 'pictures',
},
{
title: '会议室描述',
field: 'description',
},
{
title: '是否需要审核',
field: 'review',
},
{
title: '启用状态',
field: 'enabledStatus',
},
{
title: '开放星期',
field: 'openingWeek',
},
{
title: '开放开始时间',
field: 'openingBeginTime',
},
{
title: '开放结束时间',
field: 'openingEndTime',
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
title: '操作',
width: 180,
},
];
export const modalSchema: FormSchemaGetter = () => [
{
label: 'id',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '会议室名称',
fieldName: 'roomName',
component: 'Input',
rules: 'required',
},
{
label: '会议室编号',
fieldName: 'roomNo',
component: 'Input',
rules: 'required',
},
{
label: '会议室位置',
fieldName: 'roomLocation',
component: 'Input',
rules: 'required',
},
{
label: '会议室面积',
fieldName: 'roomArea',
component: 'Input',
rules: 'required',
},
{
label: '会议室类型',
fieldName: 'roomType',
component: 'Select',
componentProps: {
},
rules: 'selectRequired',
},
{
label: '会议室容纳人数',
fieldName: 'roomNumber',
component: 'Input',
rules: 'required',
},
{
label: '会议室配套设施',
fieldName: 'roomFacilities',
component: 'Input',
rules: 'required',
},
{
label: '会议室价格类型',
fieldName: 'feeType',
component: 'Select',
componentProps: {
},
rules: 'selectRequired',
},
{
label: '费用金额',
fieldName: 'feePrice',
component: 'Input',
rules: 'required',
},
{
label: '负责人',
fieldName: 'responsiblePerson',
component: 'Input',
rules: 'required',
},
{
label: '联系电话',
fieldName: 'contactNumber',
component: 'Input',
rules: 'required',
},
{
label: '会议室照片',
fieldName: 'pictures',
component: 'Input',
},
{
label: '会议室描述',
fieldName: 'description',
component: 'Input',
rules: 'required',
},
{
label: '是否需要审核',
fieldName: 'review',
component: 'Input',
rules: 'required',
},
{
label: '启用状态',
fieldName: 'enabledStatus',
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
optionType: 'button',
},
rules: 'selectRequired',
},
{
label: '开放星期',
fieldName: 'openingWeek',
component: 'Input',
rules: 'required',
},
{
label: '开放开始时间',
fieldName: 'openingBeginTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
{
label: '开放结束时间',
fieldName: 'openingEndTime',
component: 'DatePicker',
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss',
},
rules: 'required',
},
];