diff --git a/apps/web-antd/src/api/property/roomBooking/participants/index.ts b/apps/web-antd/src/api/property/roomBooking/participants/index.ts new file mode 100644 index 00000000..e69e5d19 --- /dev/null +++ b/apps/web-antd/src/api/property/roomBooking/participants/index.ts @@ -0,0 +1,61 @@ +import type { ParticipantsVO, ParticipantsForm, ParticipantsQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询会议室参会记录列表 +* @param params +* @returns 会议室参会记录列表 +*/ +export function participantsList(params?: ParticipantsQuery) { + return requestClient.get>('/property/participants/list', { params }); +} + +/** + * 导出会议室参会记录列表 + * @param params + * @returns 会议室参会记录列表 + */ +export function participantsExport(params?: ParticipantsQuery) { + return commonExport('/property/participants/export', params ?? {}); +} + +/** + * 查询会议室参会记录详情 + * @param id id + * @returns 会议室参会记录详情 + */ +export function participantsInfo(id: ID) { + return requestClient.get(`/property/participants/${id}`); +} + +/** + * 新增会议室参会记录 + * @param data + * @returns void + */ +export function participantsAdd(data: ParticipantsForm) { + return requestClient.postWithMsg('/property/participants', data); +} + +/** + * 更新会议室参会记录 + * @param data + * @returns void + */ +export function participantsUpdate(data: ParticipantsForm) { + return requestClient.putWithMsg('/property/participants', data); +} + +/** + * 删除会议室参会记录 + * @param id id + * @returns void + */ +export function participantsRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/participants/${id}`); +} diff --git a/apps/web-antd/src/api/property/roomBooking/participants/model.d.ts b/apps/web-antd/src/api/property/roomBooking/participants/model.d.ts new file mode 100644 index 00000000..15bb4773 --- /dev/null +++ b/apps/web-antd/src/api/property/roomBooking/participants/model.d.ts @@ -0,0 +1,54 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface ParticipantsVO { + /** + * 主键id + */ + id: string | number; + + /** + * 会议室id + */ + meetId: string | number; + + /** + * 入驻人员id + */ + residentPersonId: string | number; + +} + +export interface ParticipantsForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 会议室id + */ + meetId?: string | number; + + /** + * 入驻人员id + */ + residentPersonId?: string | number; + +} + +export interface ParticipantsQuery extends PageQuery { + /** + * 会议室id + */ + meetId?: string | number; + + /** + * 入驻人员id + */ + residentPersonId?: string | number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/roomBooking/participants/data.ts b/apps/web-antd/src/views/property/roomBooking/participants/data.ts new file mode 100644 index 00000000..4400d58b --- /dev/null +++ b/apps/web-antd/src/views/property/roomBooking/participants/data.ts @@ -0,0 +1,65 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'meetId', + label: '会议室id', + }, + { + component: 'Input', + fieldName: 'residentPersonId', + label: '入驻人员id', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键id', + field: 'id', + }, + { + title: '会议室id', + field: 'meetId', + }, + { + title: '入驻人员id', + field: 'residentPersonId', + }, + { + 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: '会议室id', + fieldName: 'meetId', + component: 'Input', + rules: 'required', + }, + { + label: '入驻人员id', + fieldName: 'residentPersonId', + component: 'Input', + rules: 'required', + }, +]; diff --git a/apps/web-antd/src/views/property/roomBooking/participants/index.vue b/apps/web-antd/src/views/property/roomBooking/participants/index.vue new file mode 100644 index 00000000..2fbd3def --- /dev/null +++ b/apps/web-antd/src/views/property/roomBooking/participants/index.vue @@ -0,0 +1,178 @@ + + + diff --git a/apps/web-antd/src/views/property/roomBooking/participants/participants-modal.vue b/apps/web-antd/src/views/property/roomBooking/participants/participants-modal.vue new file mode 100644 index 00000000..4972eaa2 --- /dev/null +++ b/apps/web-antd/src/views/property/roomBooking/participants/participants-modal.vue @@ -0,0 +1,101 @@ + + + +