2026-09-02 17:46:05 +08:00

61 lines
1.2 KiB
Vue

<template>
<div>
<el-dialog v-model="dialogVisible" title="消息详情" width="600px" append-to-body :close-on-click-modal="false">
<div class="header">
<div class="title">{{ currentMsg.xkMsgMain.msg_Title || '系统消息' }}</div>
<div class="time"> {{ currentMsg.xkMsgMain.write_Date || '' }} </div>
</div>
<div class="content">
<p>{{ currentMsg.xkMsgDetailList[0].msg_Body || '暂无内容' }}</p>
</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { getMsgInfo } from '@/api/msg'
const dialogVisible = ref(false)
const currentMsg = ref({})
const open = (id) => {
getMsgInfo({ msgId: id }).then(res => {
if (res.code == 0) {
currentMsg.value = res.data
dialogVisible.value = true
}
})
}
defineExpose({
open
})
</script>
<style scoped lang="scss">
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 2px solid #eee;
margin-bottom: 20px;
padding-bottom: 10px;
.title {
font-size: 16px;
font-weight: bold;
}
.time {
color: #333;
font-size: 16px;
}
}
.content {
min-height: 200px;
font-size: 16px;
}
</style>