From 6452e72e67910560f175a4f7dc106a2e35eddd3a Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Mon, 8 Sep 2025 16:28:31 +0800 Subject: [PATCH] feat --- .../customerService/activity/index.ts | 61 ++++++ .../customerService/activity/model.d.ts | 154 ++++++++++++++ .../activity/activity-detail.vue | 70 +++++++ .../activity/activity-modal.vue | 101 +++++++++ .../property/customerService/activity/data.ts | 112 ++++++++++ .../customerService/activity/index.vue | 195 ++++++++++++++++++ 6 files changed, 693 insertions(+) create mode 100644 apps/web-antd/src/api/property/customerService/activity/index.ts create mode 100644 apps/web-antd/src/api/property/customerService/activity/model.d.ts create mode 100644 apps/web-antd/src/views/property/customerService/activity/activity-detail.vue create mode 100644 apps/web-antd/src/views/property/customerService/activity/activity-modal.vue create mode 100644 apps/web-antd/src/views/property/customerService/activity/data.ts create mode 100644 apps/web-antd/src/views/property/customerService/activity/index.vue diff --git a/apps/web-antd/src/api/property/customerService/activity/index.ts b/apps/web-antd/src/api/property/customerService/activity/index.ts new file mode 100644 index 00000000..1caa165f --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/activity/index.ts @@ -0,0 +1,61 @@ +import type { ActivityVO, ActivityForm, ActivityQuery } 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 activityList(params?: ActivityQuery) { + return requestClient.get>('/property/activity/list', { params }); +} + +/** + * 导出客户服务-活动列表 + * @param params + * @returns 客户服务-活动列表 + */ +export function activityExport(params?: ActivityQuery) { + return commonExport('/property/activity/export', params ?? {}); +} + +/** + * 查询客户服务-活动详情 + * @param id id + * @returns 客户服务-活动详情 + */ +export function activityInfo(id: ID) { + return requestClient.get(`/property/activity/${id}`); +} + +/** + * 新增客户服务-活动 + * @param data + * @returns void + */ +export function activityAdd(data: ActivityForm) { + return requestClient.postWithMsg('/property/activity', data); +} + +/** + * 更新客户服务-活动 + * @param data + * @returns void + */ +export function activityUpdate(data: ActivityForm) { + return requestClient.putWithMsg('/property/activity', data); +} + +/** + * 删除客户服务-活动 + * @param id id + * @returns void + */ +export function activityRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/activity/${id}`); +} diff --git a/apps/web-antd/src/api/property/customerService/activity/model.d.ts b/apps/web-antd/src/api/property/customerService/activity/model.d.ts new file mode 100644 index 00000000..4370dd31 --- /dev/null +++ b/apps/web-antd/src/api/property/customerService/activity/model.d.ts @@ -0,0 +1,154 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface ActivityVO { + /** + * 主键 + */ + id: string | number; + + /** + * 标题 + */ + title: string; + + /** + * 状态(1待进行2进行中3已完成) + */ + status: string; + + /** + * 活动图片 + */ + activityImgUrl: string; + + /** + * 开始时间 + */ + startTime: string; + + /** + * 结束时间 + */ + endTime: string; + + /** + * 活动内容 + */ + activityContent: string; + + /** + * 备注 + */ + remark: string; + + /** + * 发布人 + */ + issuers: number; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface ActivityForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 标题 + */ + title?: string; + + /** + * 状态(1待进行2进行中3已完成) + */ + status?: string; + + /** + * 活动图片 + */ + activityImgUrl?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 活动内容 + */ + activityContent?: string; + + /** + * 备注 + */ + remark?: string; + + /** + * 发布人 + */ + issuers?: number; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface ActivityQuery extends PageQuery { + /** + * 标题 + */ + title?: string; + + /** + * 状态(1待进行2进行中3已完成) + */ + status?: string; + + /** + * 活动图片 + */ + activityImgUrl?: string; + + /** + * 开始时间 + */ + startTime?: string; + + /** + * 结束时间 + */ + endTime?: string; + + /** + * 活动内容 + */ + activityContent?: string; + + /** + * 发布人 + */ + issuers?: number; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/customerService/activity/activity-detail.vue b/apps/web-antd/src/views/property/customerService/activity/activity-detail.vue new file mode 100644 index 00000000..ed0f841b --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activity/activity-detail.vue @@ -0,0 +1,70 @@ + + + diff --git a/apps/web-antd/src/views/property/customerService/activity/activity-modal.vue b/apps/web-antd/src/views/property/customerService/activity/activity-modal.vue new file mode 100644 index 00000000..a682a710 --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activity/activity-modal.vue @@ -0,0 +1,101 @@ + + + + diff --git a/apps/web-antd/src/views/property/customerService/activity/data.ts b/apps/web-antd/src/views/property/customerService/activity/data.ts new file mode 100644 index 00000000..70dba5ed --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activity/data.ts @@ -0,0 +1,112 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import { renderDict } from '#/utils/render'; + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'title', + label: '标题', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '活动ID', + field: 'id', + }, + { + title: '标题', + field: 'title', + }, + { + title: '开始时间', + field: 'startTime', + }, + { + title: '结束时间', + field: 'endTime', + }, + { + title: '发布状态', + field: 'status', + slots: { + default: ({ row }) => { + return renderDict(row.status, 'pro_release_status'); + }, + }, + }, + { + title: '发布人', + field: 'issuersText', + }, + { + 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: 'activityImgUrl', + component: 'ImageUpload', + componentProps: { + maxCount: 1, + }, + // 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: 'activityContent', + component: 'RichTextarea', + componentProps: { + // disabled: false, // 是否只读 + // height: 400 // 高度 默认400 + }, + rules: 'required', + }, +]; diff --git a/apps/web-antd/src/views/property/customerService/activity/index.vue b/apps/web-antd/src/views/property/customerService/activity/index.vue new file mode 100644 index 00000000..485625f2 --- /dev/null +++ b/apps/web-antd/src/views/property/customerService/activity/index.vue @@ -0,0 +1,195 @@ + + +