From 8cdae12b34faab9088f6c15fc0818fd578d7837a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 29 Jan 2023 08:43:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=99=E5=86=85=E4=BF=A1=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=9Avue3=20=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/system/notify/message/index.ts | 33 ++++++ .../src/views/system/notify/message/index.vue | 66 ++++++++++++ .../system/notify/message/message.data.ts | 101 ++++++++++++++++++ 3 files changed, 200 insertions(+) create mode 100644 yudao-ui-admin-vue3/src/api/system/notify/message/index.ts create mode 100644 yudao-ui-admin-vue3/src/views/system/notify/message/index.vue create mode 100644 yudao-ui-admin-vue3/src/views/system/notify/message/message.data.ts diff --git a/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts b/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts new file mode 100644 index 000000000..92068b89d --- /dev/null +++ b/yudao-ui-admin-vue3/src/api/system/notify/message/index.ts @@ -0,0 +1,33 @@ +import request from '@/config/axios' + +export interface NotifyMessageVO { + id: number + userId: number + userType: number + templateId: number + templateCode: string + templateNickname: string + templateContent: string + templateType: number + templateParams: string + readStatus: boolean + readTime: Date +} + +export interface NotifyMessagePageReqVO extends PageParam { + userId?: number + userType?: number + templateCode?: string + templateType?: number + createTime?: Date[] +} + +// 查询站内信消息列表 +export const getNotifyMessagePageApi = async (params: NotifyMessagePageReqVO) => { + return await request.get({ url: '/system/notify-message/page', params }) +} + +// 查询站内信消息详情 +export const getNotifyMessageApi = async (id: number) => { + return await request.get({ url: '/system/notify-message/get?id=' + id }) +} diff --git a/yudao-ui-admin-vue3/src/views/system/notify/message/index.vue b/yudao-ui-admin-vue3/src/views/system/notify/message/index.vue new file mode 100644 index 000000000..cb904d270 --- /dev/null +++ b/yudao-ui-admin-vue3/src/views/system/notify/message/index.vue @@ -0,0 +1,66 @@ + + diff --git a/yudao-ui-admin-vue3/src/views/system/notify/message/message.data.ts b/yudao-ui-admin-vue3/src/views/system/notify/message/message.data.ts new file mode 100644 index 000000000..ff5eb315c --- /dev/null +++ b/yudao-ui-admin-vue3/src/views/system/notify/message/message.data.ts @@ -0,0 +1,101 @@ +import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' + +// CrudSchema +const crudSchemas = reactive({ + primaryKey: 'id', // 默认的主键ID + primaryTitle: '编号', // 默认显示的值 + primaryType: 'seq', // 默认为seq,序号模式 + action: true, + actionWidth: '200', // 3个按钮默认200,如有删减对应增减即可 + columns: [ + { + title: '用户编号', + field: 'userId', + isSearch: true + }, + { + title: '用户类型', + field: 'userType', + dictType: DICT_TYPE.USER_TYPE, + dictClass: 'string', + isSearch: true, + table: { + width: 80 + } + }, + { + title: '模版编号', + field: 'templateId' + }, + { + title: '模板编码', + field: 'templateCode', + isSearch: true, + table: { + width: 80 + } + }, + { + title: '发送人名称', + field: 'templateNickname', + table: { + width: 120 + } + }, + { + title: '模版内容', + field: 'templateContent', + table: { + width: 200 + } + }, + { + title: '模版类型', + field: 'templateType', + dictType: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE, + dictClass: 'number', + isSearch: true, + table: { + width: 80 + } + }, + { + title: '模版参数', + field: 'templateParams', + isTable: false + }, + { + title: '是否已读', + field: 'readStatus', + dictType: DICT_TYPE.INFRA_BOOLEAN_STRING, + dictClass: 'boolean', + table: { + width: 80 + } + }, + { + title: '阅读时间', + field: 'readTime', + formatter: 'formatDate', + table: { + width: 180 + } + }, + { + title: '创建时间', + field: 'createTime', + isForm: false, + formatter: 'formatDate', + search: { + show: true, + itemRender: { + name: 'XDataTimePicker' + } + }, + table: { + width: 180 + } + } + ] +}) +export const { allSchemas } = useVxeCrudSchemas(crudSchemas)