diff --git a/src/layouts/default/header/components/notify/data.ts b/src/layouts/default/header/components/notify/data.ts index 2319a55..3c933b2 100644 --- a/src/layouts/default/header/components/notify/data.ts +++ b/src/layouts/default/header/components/notify/data.ts @@ -51,14 +51,14 @@ export const tabListData: TabItem[] = [ // unreadNum: 0, // }, { - key: '4', + key: '3', name: t('工作流'), list: [], read: [], unreadNum: 0, }, { - key: '5', + key: '4', name: t('系统通知'), list: [], unreadNum: 0, diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue index 47fd531..4bc7c70 100644 --- a/src/layouts/default/header/components/notify/index.vue +++ b/src/layouts/default/header/components/notify/index.vue @@ -12,8 +12,8 @@ {{ item.name }} ({{ item.unreadNum }}) - -
+ +
{{ t('流程审批') }} @@ -65,7 +65,7 @@
-
+
{ + (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); diff --git a/src/views/approve/Appro/components/createForm.vue b/src/views/approve/Appro/components/createForm.vue index 753b70c..09ab155 100644 --- a/src/views/approve/Appro/components/createForm.vue +++ b/src/views/approve/Appro/components/createForm.vue @@ -1,8 +1,9 @@