diff --git a/src/views/system/notify/message/MessageInfoModal.vue b/src/views/system/notify/message/MessageInfoModal.vue
new file mode 100644
index 00000000..7dbff81b
--- /dev/null
+++ b/src/views/system/notify/message/MessageInfoModal.vue
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/notify/message/index.vue b/src/views/system/notify/message/index.vue
index e27b9d26..25d48c44 100644
--- a/src/views/system/notify/message/index.vue
+++ b/src/views/system/notify/message/index.vue
@@ -1,15 +1,36 @@
diff --git a/src/views/system/notify/message/message.data.ts b/src/views/system/notify/message/message.data.ts
index f7c7ab04..e241d7e2 100644
--- a/src/views/system/notify/message/message.data.ts
+++ b/src/views/system/notify/message/message.data.ts
@@ -1,5 +1,8 @@
import { BasicColumn, FormSchema, useRender } from '@/components/Table'
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
+import { JsonPreview } from '@/components/CodeEditor'
+import { DescItem } from '@/components/Description/index'
+import { h } from 'vue'
export const columns: BasicColumn[] = [
{
@@ -56,6 +59,9 @@ export const columns: BasicColumn[] = [
dataIndex: 'readTime',
width: 180,
customRender: ({ text }) => {
+ if (!text) {
+ return useRender.renderTag('未阅读')
+ }
return useRender.renderDate(text)
}
},
@@ -104,3 +110,95 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 8 }
}
]
+
+// 站内信详情modal
+export const infoSchema: DescItem[] = [
+ {
+ field: 'id',
+ label: '编号',
+ labelMinWidth: 50
+ },
+ {
+ field: 'readStatus',
+ label: '是否已读',
+ render: (value) => {
+ return useRender.renderDict(value, DICT_TYPE.INFRA_BOOLEAN_STRING)
+ }
+ },
+ {
+ field: 'userType',
+ label: '用户类型',
+ render: (value) => {
+ console.log(value)
+ return useRender.renderDict(value, DICT_TYPE.USER_TYPE)
+ }
+ },
+ {
+ field: 'userType',
+ label: '用户编号'
+ },
+ {
+ field: 'templateId',
+ label: '模板编号'
+ },
+ {
+ field: 'templateCode',
+ label: '模板编码'
+ },
+ {
+ field: 'templateNickname',
+ label: '发送人名称'
+ },
+ {
+ field: 'templateContent',
+ label: '模板内容'
+ },
+ {
+ field: 'templateParams',
+ label: '模板参数',
+ render: (value) => {
+ return h(JsonPreview, { data: value })
+ }
+ },
+ {
+ field: 'templateType',
+ label: '模板类型',
+ render: (value) => {
+ return useRender.renderDict(value, DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE)
+ }
+ },
+ {
+ field: 'readTime',
+ label: '阅读时间',
+ render: (value) => {
+ if (!value) {
+ return useRender.renderTag('未阅读')
+ }
+ return useRender.renderDate(value)
+ }
+ },
+ {
+ field: 'createTime',
+ label: '创建时间',
+ render: (value) => {
+ return useRender.renderDate(value)
+ }
+ }
+]
+
+// 站内信详情
+export interface MessageInfo {
+ userId: number
+ userType: number
+ templateId: number
+ templateCode: string
+ templateNickname: string
+ templateContent: string
+ templateType: number
+ templateParams: { [key: string]: string }
+ readStatus: boolean
+ readTime?: any
+ id: number
+ createTime: number
+ key: string
+}