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 = () => [
{
@@ -24,9 +26,7 @@ export const querySchema: FormSchemaGetter = () => [
label: '会议室面积',
},
{
component: 'Select',
componentProps: {
},
component: 'Input',
fieldName: 'roomType',
label: '会议室类型',
},
@@ -43,6 +43,8 @@ export const querySchema: FormSchemaGetter = () => [
{
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_HYSJGLX 便于维护
options: getDictOptions('wy_hysjglx'),
},
fieldName: 'feeType',
label: '会议室价格类型',
@@ -73,13 +75,21 @@ export const querySchema: FormSchemaGetter = () => [
label: '会议室描述',
},
{
component: 'Input',
component: 'RadioGroup',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
options: getDictOptions('wy_sf'),
buttonStyle: 'solid',
optionType: 'button',
},
fieldName: 'review',
label: '是否需要审核',
},
{
component: 'RadioGroup',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_KG 便于维护
options: getDictOptions('wy_kg'),
buttonStyle: 'solid',
optionType: 'button',
},
@@ -87,7 +97,11 @@ export const querySchema: FormSchemaGetter = () => [
label: '启用状态',
},
{
component: 'Input',
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_XQ 便于维护
options: getDictOptions('wy_xq'),
},
fieldName: 'openingWeek',
label: '开放星期',
},
@@ -117,10 +131,6 @@ export const querySchema: FormSchemaGetter = () => [
// export const columns: () => VxeGridProps['columns'] = () => [
export const columns: VxeGridProps['columns'] = [
{ type: 'checkbox', width: 60 },
{
title: 'id',
field: 'id',
},
{
title: '会议室名称',
field: 'roomName',
@@ -152,6 +162,12 @@ export const columns: VxeGridProps['columns'] = [
{
title: '会议室价格类型',
field: 'feeType',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_HYSJGLX 便于维护
return renderDict(row.feeType, 'wy_hysjglx');
},
},
},
{
title: '费用金额',
@@ -176,14 +192,32 @@ export const columns: VxeGridProps['columns'] = [
{
title: '是否需要审核',
field: 'review',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
return renderDict(row.review, 'wy_sf');
},
},
},
{
title: '启用状态',
field: 'enabledStatus',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_KG 便于维护
return renderDict(row.enabledStatus, 'wy_kg');
},
},
},
{
title: '开放星期',
field: 'openingWeek',
slots: {
default: ({ row }) => {
// 可选从DictEnum中获取 DictEnum.WY_XQ 便于维护
return renderDict(row.openingWeek, 'wy_xq');
},
},
},
{
title: '开放开始时间',
@@ -239,10 +273,8 @@ export const modalSchema: FormSchemaGetter = () => [
{
label: '会议室类型',
fieldName: 'roomType',
component: 'Select',
componentProps: {
},
rules: 'selectRequired',
component: 'Input',
rules: 'required',
},
{
label: '会议室容纳人数',
@@ -261,6 +293,8 @@ export const modalSchema: FormSchemaGetter = () => [
fieldName: 'feeType',
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_HYSJGLX 便于维护
options: getDictOptions('wy_hysjglx'),
},
rules: 'selectRequired',
},
@@ -296,14 +330,22 @@ export const modalSchema: FormSchemaGetter = () => [
{
label: '是否需要审核',
fieldName: 'review',
component: 'Input',
rules: 'required',
component: 'RadioGroup',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_SF 便于维护
options: getDictOptions('wy_sf'),
buttonStyle: 'solid',
optionType: 'button',
},
rules: 'selectRequired',
},
{
label: '启用状态',
fieldName: 'enabledStatus',
component: 'RadioGroup',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_KG 便于维护
options: getDictOptions('wy_kg'),
buttonStyle: 'solid',
optionType: 'button',
},
@@ -312,8 +354,12 @@ export const modalSchema: FormSchemaGetter = () => [
{
label: '开放星期',
fieldName: 'openingWeek',
component: 'Input',
rules: 'required',
component: 'Select',
componentProps: {
// 可选从DictEnum中获取 DictEnum.WY_XQ 便于维护
options: getDictOptions('wy_xq'),
},
rules: 'selectRequired',
},
{
label: '开放开始时间',