Commit cd4c9665 authored by 沈翠玲's avatar 沈翠玲

消息中心

parent e681d845
......@@ -16,6 +16,7 @@
>
<div class="w-full px-3 h-full overflow-auto py-4">
<div class=" text-xs text-gray-400">{{currentRow.sendTime}}</div>
<div class=" text-sm pt-1" v-if="currentRow.sendTime">{{currentRow.username}}</div>
<div class=" font-bold text-base pt-1">{{currentRow.title}}</div>
<div v-html="currentRow.content" class="text-base pt-1"></div>
</div>
......@@ -28,6 +29,7 @@
</template>
<script setup name="systemLog" lang="jsx">
import { getUserPage } from '@/api/user';
import { reactive, ref, watch } from 'vue';
import useSocketStore from '@/stores/modules/websocket';
import { ElMessageBox, ElMessage, ElTag } from 'element-plus';
......@@ -39,6 +41,7 @@
const { MessageStatus, SendType, MessageType, ServiceType, AuditStatus, CaseStatus, ReadStatus } = useDict("MessageStatus","ReadStatus","SendType", "MessageType", "ServiceType","AuditStatus", "CaseStatus");
const showModal = ref(false)
const proTable = ref();
const users = ref([]);
const sendNoticeRef = ref()
const currentRow = ref();
const socketStore = useSocketStore();
......@@ -46,6 +49,16 @@
const showContent = (row) => {
showMessage({id: row.id}).then(res => {
if (res.success) {
if (res.result.receiversIds) {
const list = []
res.result.receiversIds.forEach(element => {
const item = users.value?.find(ii => ii.id === element)
if (item) {
list.push(item)
}
});
res.result.username = list.map(v => v.username).join(',')
}
currentRow.value = res.result
showModal.value = true
}
......@@ -69,6 +82,13 @@
}
})
}
setTimeout(() => {
getUserPage({ current: 1, size: 9999999 }).then(res => {
if (res.success) {
users.value = res.result.content
}
})
})
const addNotice = () => {
sendNoticeRef.value?.openModal();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment