😎调整消息通知表格显示

This commit is contained in:
zuohuaijun 2024-07-05 10:31:27 +08:00
parent 19639ccc91
commit 268e0bd072
2 changed files with 16 additions and 10 deletions

View File

@ -29,14 +29,16 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog v-model="state.dialogVisible" draggable overflow width="769px"> <el-dialog v-model="state.dialogVisible" draggable width="769px">
<template #header> <template #header>
<div style="color: #fff"> <div style="color: #fff">
<el-icon size="16" style="margin-right: 10px; display: inline; vertical-align: middle"> <ele-Bell /> </el-icon> <el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Bell /> </el-icon>
<span>消息详情</span> <span> 消息详情 </span>
</div> </div>
</template> </template>
<p v-html="state.content"></p> <div class="w-e-text-container">
<div v-html="state.content" data-slate-editor></div>
</div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="state.dialogVisible = false">确认</el-button> <el-button type="primary" @click="state.dialogVisible = false">确认</el-button>
@ -50,6 +52,7 @@
import { reactive } from 'vue'; import { reactive } from 'vue';
import router from '/@/router'; import router from '/@/router';
import commonFunction from '/@/utils/commonFunction'; import commonFunction from '/@/utils/commonFunction';
import '@wangeditor/editor/dist/css/style.css';
import { getAPI } from '/@/utils/axios-utils'; import { getAPI } from '/@/utils/axios-utils';
import { SysNoticeApi } from '/@/api-services/api'; import { SysNoticeApi } from '/@/api-services/api';

View File

@ -63,17 +63,19 @@
</vxe-grid> </vxe-grid>
</el-card> </el-card>
<el-dialog v-model="state.visible" draggable overflow destroy-on-close width="769px"> <el-dialog v-model="state.isShowDialog" draggable width="769px">
<template #header> <template #header>
<div style="color: #fff"> <div style="color: #fff">
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Bell /> </el-icon> <el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Bell /> </el-icon>
<span>消息详情</span> <span> 消息详情 </span>
</div> </div>
</template> </template>
<p v-html="state.content"></p> <div class="w-e-text-container">
<div v-html="state.content" data-slate-editor></div>
</div>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="state.visible = false">确认</el-button> <el-button type="primary" @click="state.isShowDialog = false">确认</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -83,6 +85,7 @@
<script setup lang="ts" name="notice"> <script setup lang="ts" name="notice">
import { onMounted, reactive, ref } from 'vue'; import { onMounted, reactive, ref } from 'vue';
import commonFunction from '/@/utils/commonFunction'; import commonFunction from '/@/utils/commonFunction';
import '@wangeditor/editor/dist/css/style.css';
import { VxeGridInstance, VxePagerEvents, VxePagerDefines } from 'vxe-table'; import { VxeGridInstance, VxePagerEvents, VxePagerDefines } from 'vxe-table';
import { useVxeTable } from '/@/hooks/vxeTableOptionsHook'; import { useVxeTable } from '/@/hooks/vxeTableOptionsHook';
@ -105,7 +108,7 @@ const state = reactive({
descStr: 'desc', // descStr: 'desc', //
total: 0 as any, total: 0 as any,
}, },
visible: false, isShowDialog: false,
title: '', title: '',
content: '', content: '',
}); });
@ -175,7 +178,7 @@ const sortChange = (options: any) => {
// //
const handleView = async (row: any) => { const handleView = async (row: any) => {
state.content = row.sysNotice.content; state.content = row.sysNotice.content;
state.visible = true; state.isShowDialog = true;
row.readStatus = 1; row.readStatus = 1;
// mittBus.emit('noticeRead', row.sysNotice.id); // mittBus.emit('noticeRead', row.sysNotice.id);
await getAPI(SysNoticeApi).apiSysNoticeSetReadPost({ id: row.sysNotice.id }); await getAPI(SysNoticeApi).apiSysNoticeSetReadPost({ id: row.sysNotice.id });