From ce1260d561b0e5671cf3fc645940203e579b8ffb Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Tue, 7 Nov 2023 14:22:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=2019361=E3=80=8119656?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Layout/components/Notice.vue | 14 ++++++++--- .../Layout/components/NoticeInfo.vue | 3 ++- .../components/NotificationRecord/index.vue | 2 +- .../Center/components/Subscribe/index.vue | 2 +- src/views/account/Center/components/data.ts | 23 +++++++++++++------ src/views/system/NoticeRule/index.vue | 23 +++++++++++++------ 6 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/components/Layout/components/Notice.vue b/src/components/Layout/components/Notice.vue index f5a78142..516b32a6 100644 --- a/src/components/Layout/components/Notice.vue +++ b/src/components/Layout/components/Notice.vue @@ -175,11 +175,11 @@ watch(updateCount, () => getList()); const tabs = ref([]); -const queryTypeList = async () => { +const queryTypeList = async (_tab: any[]) => { const resp: any = await getAllNotice(); if (resp.status === 200) { const provider = resp.result.map((i: any) => i.provider) || []; - const arr = tab.filter((item: any) => { + const arr = _tab.filter((item: any) => { return item.type.some((i: any) => provider.includes(i)) }); tabs.value = arr; @@ -191,7 +191,15 @@ const queryTypeList = async () => { }; onMounted(() => { - queryTypeList() + const _list: any[] = [...tab] + if(menuStory.hasMenu('process')){ + _list.push({ + key: 'workflow-notification', + tab: '工作流通知', + type: ['workflow-task-todo', 'workflow-task-reject', 'workflow-task-cc', 'workflow-process-finish', 'workflow-process-repealed'], + }) + } + queryTypeList(_list) }) diff --git a/src/components/Layout/components/NoticeInfo.vue b/src/components/Layout/components/NoticeInfo.vue index 758cb396..e0f0fd54 100644 --- a/src/components/Layout/components/NoticeInfo.vue +++ b/src/components/Layout/components/NoticeInfo.vue @@ -64,12 +64,13 @@ import NoticeTab from './NoticeTab.vue'; const emits = defineEmits(['action']); -type DataType = 'alarm' | 'system-monitor' | 'system-business'; +type DataType = 'alarm' | 'system-monitor' | 'system-business' | 'workflow-notification'; const refreshObj = ref({ 'alarm': true, 'system-monitor': true, 'system-business': true, + 'workflow-notification': true }); const props = defineProps({ diff --git a/src/views/account/Center/components/StationMessage/components/NotificationRecord/index.vue b/src/views/account/Center/components/StationMessage/components/NotificationRecord/index.vue index ee3495e4..060d15fe 100644 --- a/src/views/account/Center/components/StationMessage/components/NotificationRecord/index.vue +++ b/src/views/account/Center/components/StationMessage/components/NotificationRecord/index.vue @@ -108,7 +108,7 @@ const getType = computed(() => { } else if (props.type === 'system-monitor') { return ['system-event']; } else if(props.type === 'workflow-notification'){ - return ['workflow-task-cc','workflow-task-todo','workflow-task-completed'] + return ['workflow-task-cc','workflow-task-todo','workflow-task-reject', 'workflow-process-finish', 'workflow-process-repealed'] } else { return [ diff --git a/src/views/account/Center/components/Subscribe/index.vue b/src/views/account/Center/components/Subscribe/index.vue index 84accb4d..71fd5053 100644 --- a/src/views/account/Center/components/Subscribe/index.vue +++ b/src/views/account/Center/components/Subscribe/index.vue @@ -107,7 +107,7 @@ const handleSearch = () => { onMounted(() => { const keys = ['alarm', 'system-monitor', 'system-business'] - if (menuStore.hasMenu('workflow')) { + if (menuStore.hasMenu('process')) { keys.push('workflow-notification') } activeKey.value = keys diff --git a/src/views/account/Center/components/data.ts b/src/views/account/Center/components/data.ts index 7919ce9c..d79b38e3 100644 --- a/src/views/account/Center/components/data.ts +++ b/src/views/account/Center/components/data.ts @@ -57,20 +57,29 @@ const workflowNotice = [ provider: 'workflow-notification', name: '工作流通知', children: [ + { + provider: 'workflow-task-todo', + name: '待办通知', + }, + { + provider: 'workflow-task-reject', + name: '驳回通知', + }, { provider: 'workflow-task-cc', name: '抄送通知', }, { - provider: 'workflow-task-todo', - name: '待办通知' - },{ - provider: 'workflow-task-completed', - name: '完成通知' - } + provider: 'workflow-process-finish', + name: '办结通知', + }, + { + provider: 'workflow-process-repealed', + name: '关闭通知', + }, ], }, ] export const getInitData = () =>{ - return menuStore.hasMenu('workflow') ? [...systemNotice,...workflowNotice] : [...systemNotice] + return menuStore.hasMenu('process') ? [...systemNotice,...workflowNotice] : [...systemNotice] } diff --git a/src/views/system/NoticeRule/index.vue b/src/views/system/NoticeRule/index.vue index 85c850f0..4c57bc94 100644 --- a/src/views/system/NoticeRule/index.vue +++ b/src/views/system/NoticeRule/index.vue @@ -106,17 +106,26 @@ const lowCodeNotice = [ provider: 'workflow-notification', name: '工作流通知', children: [ + { + provider: 'workflow-task-todo', + name: '待办通知', + }, + { + provider: 'workflow-task-reject', + name: '驳回通知', + }, { provider: 'workflow-task-cc', name: '抄送通知', }, { - provider: 'workflow-task-todo', - name: '待办通知' - },{ - provider: 'workflow-task-completed', - name: '完成通知' - } + provider: 'workflow-process-finish', + name: '办结通知', + }, + { + provider: 'workflow-process-repealed', + name: '关闭通知', + }, ], }, ] @@ -181,7 +190,7 @@ onMounted(() => { // data.value = Array.from(dataMap).map((item) => { // return item?.[1]; // }); - if(menuStore.hasMenu('code')){ + if(menuStore.hasMenu('process')){ dataSource = [...systemNotice,...lowCodeNotice] activeKey.value = ['alarm', 'system-monitor', 'system-business','workflow-notification'] }else{