提交 | 用户 | 时间
|
314507
|
1 |
<template> |
H |
2 |
<Dialog v-model="dialogVisible" :max-height="500" :scroll="true" title="详情"> |
|
3 |
<el-descriptions :column="1" border> |
|
4 |
<el-descriptions-item label="编号" min-width="120"> |
|
5 |
{{ detailData.id }} |
|
6 |
</el-descriptions-item> |
|
7 |
<el-descriptions-item label="用户类型"> |
|
8 |
<dict-tag :type="DICT_TYPE.USER_TYPE" :value="detailData.userType" /> |
|
9 |
</el-descriptions-item> |
|
10 |
<el-descriptions-item label="用户编号"> |
|
11 |
{{ detailData.userId }} |
|
12 |
</el-descriptions-item> |
|
13 |
<el-descriptions-item label="模版编号"> |
|
14 |
{{ detailData.templateId }} |
|
15 |
</el-descriptions-item> |
|
16 |
<el-descriptions-item label="模板编码"> |
|
17 |
{{ detailData.templateCode }} |
|
18 |
</el-descriptions-item> |
|
19 |
<el-descriptions-item label="发送人名称"> |
|
20 |
{{ detailData.templateNickname }} |
|
21 |
</el-descriptions-item> |
|
22 |
<el-descriptions-item label="模版内容"> |
|
23 |
{{ detailData.templateContent }} |
|
24 |
</el-descriptions-item> |
|
25 |
<el-descriptions-item label="模版参数"> |
|
26 |
{{ detailData.templateParams }} |
|
27 |
</el-descriptions-item> |
|
28 |
<el-descriptions-item label="模版类型"> |
|
29 |
<dict-tag :type="DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE" :value="detailData.templateType" /> |
|
30 |
</el-descriptions-item> |
|
31 |
<el-descriptions-item label="是否已读"> |
|
32 |
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="detailData.readStatus" /> |
|
33 |
</el-descriptions-item> |
|
34 |
<el-descriptions-item label="阅读时间"> |
|
35 |
{{ formatDate(detailData.readTime) }} |
|
36 |
</el-descriptions-item> |
|
37 |
<el-descriptions-item label="创建时间"> |
|
38 |
{{ formatDate(detailData.createTime) }} |
|
39 |
</el-descriptions-item> |
|
40 |
</el-descriptions> |
|
41 |
</Dialog> |
|
42 |
</template> |
|
43 |
<script lang="ts" setup> |
|
44 |
import { DICT_TYPE } from '@/utils/dict' |
|
45 |
import { formatDate } from '@/utils/formatTime' |
|
46 |
import * as NotifyMessageApi from '@/api/system/notify/message' |
|
47 |
|
|
48 |
defineOptions({ name: 'SystemNotifyMessageDetail' }) |
|
49 |
|
|
50 |
const dialogVisible = ref(false) // 弹窗的是否展示 |
|
51 |
const detailLoading = ref(false) // 表单的加载中 |
|
52 |
const detailData = ref({} as NotifyMessageApi.NotifyMessageVO) // 详情数据 |
|
53 |
|
|
54 |
/** 打开弹窗 */ |
|
55 |
const open = async (data: NotifyMessageApi.NotifyMessageVO) => { |
|
56 |
dialogVisible.value = true |
|
57 |
// 设置数据 |
|
58 |
detailLoading.value = true |
|
59 |
try { |
|
60 |
detailData.value = data |
|
61 |
} finally { |
|
62 |
detailLoading.value = false |
|
63 |
} |
|
64 |
} |
|
65 |
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
66 |
</script> |