diff --git a/apps/web-antd/src/api/property/customerService/activities/index.ts b/apps/web-antd/src/api/property/customerService/activities/index.ts new file mode 100644 index 00000000..7e997c18 --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/activities/index.ts @@ -0,0 +1,61 @@ +import type { ActivitiesVO, ActivitiesForm, ActivitiesQuery } 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 activitiesList(params?: ActivitiesQuery) { + return requestClient.get>('/property/activities/list', { params }); +} + +/** + * 导出热门活动列表 + * @param params + * @returns 热门活动列表 + */ +export function activitiesExport(params?: ActivitiesQuery) { + return commonExport('/property/activities/export', params ?? {}); +} + +/** + * 查询热门活动详情 + * @param id id + * @returns 热门活动详情 + */ +export function activitiesInfo(id: ID) { + return requestClient.get(`/property/activities/${id}`); +} + +/** + * 新增热门活动 + * @param data + * @returns void + */ +export function activitiesAdd(data: ActivitiesForm) { + return requestClient.postWithMsg('/property/activities', data); +} + +/** + * 更新热门活动 + * @param data + * @returns void + */ +export function activitiesUpdate(data: ActivitiesForm) { + return requestClient.putWithMsg('/property/activities', data); +} + +/** + * 删除热门活动 + * @param id id + * @returns void + */ +export function activitiesRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/activities/${id}`); +} diff --git a/apps/web-antd/src/api/property/customerService/activities/model.d.ts b/apps/web-antd/src/api/property/customerService/activities/model.d.ts new file mode 100644 index 00000000..247cb203 --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/activities/model.d.ts @@ -0,0 +1,129 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface ActivitiesVO { + /** + * 主键 + */ + id: string | number; + + /** + * 标题 + */ + title: string; + + /** + * 头部照片 + */ + headImgUrl: string; + + /** + * 开始时间 + */ + startTime: string; + + /** + * 结束时间 + */ + endTime: string; + + /** + * 活动内容 + */ + activeContent: string; + + /** + * 状态(1.未开始 2.进行中 3.已结束) + */ + status: string; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface ActivitiesForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 标题 + */ + title?: string; + + /** + * 头部照片 + */ + headImgUrl?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 活动内容 + */ + activeContent?: string; + + /** + * 状态(1.未开始 2.进行中 3.已结束) + */ + status?: string; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface ActivitiesQuery extends PageQuery { + /** + * 标题 + */ + title?: string; + + /** + * 头部照片 + */ + headImgUrl?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 活动内容 + */ + activeContent?: string; + + /** + * 状态(1.未开始 2.进行中 3.已结束) + */ + status?: string; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/customerService/activities/activities-modal.vue b/apps/web-antd/src/views/property/customerService/activities/activities-modal.vue new file mode 100644 index 00000000..356e6a59 --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activities/activities-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/customerService/activities/data.ts b/apps/web-antd/src/views/property/customerService/activities/data.ts new file mode 100644 index 00000000..e1944a95 --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activities/data.ts @@ -0,0 +1,128 @@ +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 = () => [ + { + component: 'Input', + fieldName: 'title', + label: '标题', + }, + { + component: 'Select', + componentProps: { + options: getDictOptions('pro_activity_status'), + }, + fieldName: 'status', + label: '状态', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '序号', + field: 'id', + slots: { + default: ({ rowIndex }) => { + return (rowIndex + 1).toString(); + }, + }, + }, + { + title: '标题', + field: 'title', + }, + { + title: '创建人', + field: 'title', + }, + { + title: '开始时间', + field: 'startTime', + }, + { + title: '结束时间', + field: 'endTime', + }, + { + title: '状态', + field: 'status', + slots: { + default: ({ row }) => { + // 可选从DictEnum中获取 DictEnum.PRO_ACTIVITY_STATUS 便于维护 + return renderDict(row.status, 'pro_activity_status'); + }, + }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '标题', + fieldName: 'title', + component: 'Input', + rules: 'required', + }, + { + label: '头部照片', + fieldName: 'headImgUrl', + component: 'ImageUpload', + componentProps: { + maxCount: 1, + }, + formItemClass: 'col-span-2', + rules: 'required', + }, + { + label: '开始时间', + fieldName: 'startTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '结束时间', + fieldName: 'endTime', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '活动内容', + fieldName: 'activeContent', + component: 'RichTextarea', + formItemClass: 'col-span-2', + componentProps: { + // disabled: false, // 是否只读 + // height: 400 // 高度 默认400 + }, + rules: 'required', + }, +]; diff --git a/apps/web-antd/src/views/property/customerService/activities/index.vue b/apps/web-antd/src/views/property/customerService/activities/index.vue new file mode 100644 index 00000000..31207d4a --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activities/index.vue @@ -0,0 +1,182 @@ + + + diff --git a/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts index b4eaa93b..1e9c4c2f 100644 --- a/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts +++ b/apps/web-antd/src/views/property/visitorManagement/visitorInvitation/data.ts @@ -206,13 +206,14 @@ export const modalSchema: FormSchemaGetter = () => [ // triggerFields: ['bookingParkingSpace'], // }, // }, - // { - // label: '人脸图片', - // fieldName: 'facePictures', - // component: 'ImageUpload', - // componentProps: { - // maxCount: 1, - // }, - // formItemClass: 'col-span-2', - // }, + { + label: '人脸图片', + fieldName: 'facePictures', + component: 'ImageUpload', + componentProps: { + maxCount: 1, + }, + formItemClass: 'col-span-2', + rules: 'required', + }, ];