1、会议室设置
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 10s

This commit is contained in:
2025-07-07 17:30:51 +08:00
parent 602e8951cc
commit b1265fb00c
10 changed files with 430 additions and 145 deletions

View File

@@ -1,5 +1,5 @@
import type { FormSchemaGetter } from '#/adapter/form';
import type { VxeGridProps } from '#/adapter/vxe-table';
import type {FormSchemaGetter} from '#/adapter/form';
import type {VxeGridProps} from '#/adapter/vxe-table';
import {getDictOptions} from "#/utils/dict";
import {renderDict} from "#/utils/render";
@@ -10,69 +10,70 @@ export const querySchema: FormSchemaGetter = () => [
fieldName: 'name',
label: '会议室名称',
},
{
component: 'InputNumber',
fieldName: 'personNumber',
label: '可容纳人数',
componentProps: {
min: 1,
step: 1,
precision:0,
}
},
{
component: 'Select',
componentProps: {
options: getDictOptions('meeting_room_status'),
},
fieldName: 'attach',
fieldName: 'status',
label: '状态',
},
{
component: 'Input',
fieldName: 'createById',
label: '创建人id',
},
{
component: 'Input',
fieldName: 'updateById',
label: '更新人id',
},
];
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{type: 'checkbox', width: 60},
{
title: '会议室名称',
field: 'name',
minWidth:100,
},
{
title: '会议室地址',
field: 'location',
field: 'locationName',
width:210,
},
{
title: '可容纳人数',
field: 'personNumber',
width:100,
},
{
title: '基础服务',
field: 'baseServiceId',
title: '费用模式',
field: 'expenseType',
slots: {
default: ({row}) => {
return renderDict(row.expenseType, 'wy_fyms');
},
},
width:100,
},
{
title: '基础价格',
field: 'basePrice',
title: '开放时段',
field: 'openHours',
width:100,
},
{
title: '状态',
field: 'attach',
field: 'status',
slots: {
default: ({ row }) => {
return renderDict(row.attach, 'meeting_room_status');
},
default: 'status'
},
},
{
title: '创建人id',
field: 'createById',
},
{
title: '更新人id',
field: 'updateById',
width:100,
},
{
field: 'action',
fixed: 'right',
slots: { default: 'action' },
slots: {default: 'action'},
title: '操作',
width: 180,
},
@@ -93,50 +94,96 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'name',
component: 'Input',
rules: 'required',
},
{
label: '会议室地址',
fieldName: 'location',
component: 'Input',
rules: 'required',
formItemClass: 'col-span-1',
},
{
label: '可容纳人数',
fieldName: 'personNumber',
component: 'Input',
component: 'InputNumber',
rules: 'required',
},
{
label: '基础服务',
fieldName: 'baseServiceId',
component: 'Input',
rules: 'required',
},
{
label: '基础价格',
fieldName: 'basePrice',
component: 'Input',
rules: 'required',
},
{
label: '状态',
fieldName: 'attach',
component: 'Select',
formItemClass: 'col-span-1',
componentProps: {
options: getDictOptions('meeting_room_status'),
},
min: 1,
step: 1,
precision:0,
}
},
{
label: '会议室地址',
fieldName: 'location',
component: 'TreeSelect',
rules: 'selectRequired',
},
{
label: '创建人id',
fieldName: 'createById',
component: 'Input',
label: '配套设备',
fieldName: 'baseService',
component: 'Textarea',
rules: 'required',
},
{
label: '更新人id',
fieldName: 'updateById',
component: 'Input',
label: '负责人',
fieldName: 'principals',
component: 'Select',
rules: 'selectRequired',
},
{
label: '费用模式',
fieldName: 'expenseType',
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
options: getDictOptions('wy_fyms'),
},
formItemClass: 'col-span-1',
rules: 'required',
},
{
label: '付费金额',
fieldName: 'basePrice',
component: 'InputNumber',
componentProps: {
min: 0,
step: 1,
precision:2,
},
formItemClass: 'col-span-1',
dependencies: {
// 仅当 费用模式 为 2付费 时显示
show: (formValues: any) => formValues.expenseType === '2',
triggerFields: ['expenseType'],
},
rules: 'required',
},
{
label: '会议室图片',
fieldName: 'picture',
component: 'ImageUpload',
componentProps: {
maxCount: 10, // 最大上传文件数 默认为1 为1会绑定为string而非string[]类型
},
},
{
label: '预约是否需要审核',
fieldName: 'isCheck',
component: 'RadioGroup',
componentProps: {
buttonStyle: 'solid',
options: getDictOptions('wy_sf'),
},
labelWidth:130,
rules: 'required',
},
{
label: '开放时段',
fieldName: 'openHours',
component: 'Input',
slots: {default: 'openHours'},
formItemClass: 'col-span-1',
rules: 'required',
},
{
label: '会议室描述',
fieldName: 'descs',
component: 'Textarea',
},
];