公告通知
This commit is contained in:
@ -12,8 +12,8 @@
|
||||
{{ item.name }}
|
||||
<span v-if="item.unreadNum !== 0">({{ item.unreadNum }})</span>
|
||||
</template>
|
||||
|
||||
<div v-if="item.key === '4'" class="min-h-88">
|
||||
<!--工作流程-->
|
||||
<div v-if="item.key === '3'" class="min-h-88">
|
||||
<div>
|
||||
<div class="list-item">
|
||||
<span class="header-title">{{ t('流程审批') }}</span>
|
||||
@ -65,7 +65,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!--系统通知消息-->
|
||||
<div v-else-if="item.key === '5'" class="h-88">
|
||||
<div v-else-if="item.key === '4'" class="h-88">
|
||||
<div v-if="item.list.length > 0" class="h-82">
|
||||
<div
|
||||
class="list-item readed-mark"
|
||||
@ -214,7 +214,7 @@
|
||||
try {
|
||||
if (import.meta.env.VITE_GLOB_DISABLE_NEWS !== 'true') {
|
||||
let res = await getOaNews(1);
|
||||
res.list.forEach((o) => {
|
||||
(res || []).forEach((o) => {
|
||||
if (!o.readId) listData.value[0].unreadNum += 1;
|
||||
listData.value[0].list.push({
|
||||
id: o.id,
|
||||
@ -228,7 +228,7 @@
|
||||
});
|
||||
});
|
||||
let res1 = await getOaNews(2);
|
||||
res1.list.forEach((o) => {
|
||||
(res1 || []).forEach((o) => {
|
||||
if (!o.readId) listData.value[1].unreadNum += 1;
|
||||
listData.value[1].list.push({
|
||||
id: o.id,
|
||||
@ -244,21 +244,23 @@
|
||||
let res2 = await getOaMessage();
|
||||
res2.forEach((o) => {
|
||||
if (o.messageType === 0) {
|
||||
// 日程
|
||||
// if (!o.isRead) listData.value[2].unreadNum += 1;
|
||||
// listData.value[2].list.push({
|
||||
// id: o.id,
|
||||
// avatar: '',
|
||||
// title: o.messageContent,
|
||||
// description: '',
|
||||
// datetime: o.sendTime,
|
||||
// timeFormat: o.timeFormat,
|
||||
// color: '',
|
||||
// type: '3',
|
||||
// read: o.isRead
|
||||
// });
|
||||
} else if (o.messageType == 1) {
|
||||
// 工作流 listData.value[3]
|
||||
if (!o.isRead) listData.value[2].unreadNum += 1;
|
||||
listData.value[2].list.push({
|
||||
id: o.id,
|
||||
avatar: '',
|
||||
title: o.messageContent,
|
||||
description: '',
|
||||
datetime: o.sendTime,
|
||||
timeFormat: o.timeFormat,
|
||||
color: '',
|
||||
type: '3',
|
||||
read: o.isRead
|
||||
});
|
||||
} else if (o.messageType == 1) {
|
||||
if (!o.isRead) listData.value[3].unreadNum += 1;
|
||||
listData.value[3].list.push({
|
||||
id: o.id,
|
||||
avatar: '',
|
||||
title: o.messageContent,
|
||||
@ -273,8 +275,9 @@
|
||||
read: o.isRead
|
||||
});
|
||||
} else if (o.messageType == 2) {
|
||||
if (!o.isRead) listData.value[3].unreadNum += 1;
|
||||
listData.value[3].read?.push({
|
||||
//工作流 listData.value[3]
|
||||
if (!o.isRead) listData.value[2].unreadNum += 1;
|
||||
listData.value[2].read?.push({
|
||||
id: o.id,
|
||||
avatar: '',
|
||||
title: o.messageContent,
|
||||
@ -292,14 +295,16 @@
|
||||
|
||||
//系统消息
|
||||
let res4 = import.meta.env.VITE_DISABLE_NOTE === 'true' ? { list: [] } : await queryLoginUserNotices({ limit: 1, size: 10 });
|
||||
listData.value[4].list = res4.list;
|
||||
listData.value[4].unreadNum = res4.list.filter((item) => item.isRead == 0).length;
|
||||
//listData.value[4]
|
||||
listData.value[3].list = res4.list;
|
||||
listData.value[3].unreadNum = res4.list.filter((item) => item.isRead == 0).length;
|
||||
}
|
||||
|
||||
let res3 = await getScheduleMsg();
|
||||
res3.list.forEach((item) => (item.read = item.isRead));
|
||||
listData.value[2].unreadNum = res3.list.filter((x) => !x.isRead).length;
|
||||
listData.value[2].list.push(...res3.list);
|
||||
// 日程
|
||||
// listData.value[2].unreadNum = res3.list.filter((x) => !x.isRead).length;
|
||||
// listData.value[2].list.push(...res3.list);
|
||||
console.log('message', listData.value);
|
||||
} catch (error) {
|
||||
console.error('message error', error);
|
||||
|
||||
Reference in New Issue
Block a user