From 82aeb6b52268c9dba477f58437efbe3331939d5e Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Thu, 2 Nov 2023 10:47:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E5=85=B3=E4=BA=8E=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=9A=84=E6=A0=87?= =?UTF-8?q?=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../account/Center/components/Subscribe/index.vue | 10 +++++++--- src/views/account/Center/components/data.ts | 5 ++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/views/account/Center/components/Subscribe/index.vue b/src/views/account/Center/components/Subscribe/index.vue index 2d4a3801..84accb4d 100644 --- a/src/views/account/Center/components/Subscribe/index.vue +++ b/src/views/account/Center/components/Subscribe/index.vue @@ -63,7 +63,7 @@ const subscribe = ref([]); const dataSource = ref([]); const activeKey = ref(); const loading = ref(false) -let initData:any[] +let initData:any[] const handleSearch = () => { loading.value = true getAllNotice().then((resp: any) => { @@ -106,7 +106,11 @@ const handleSearch = () => { }; onMounted(() => { - activeKey.value = menuStore.hasMenu('code') ? ['alarm', 'system-monitor', 'system-business','workflow-notification'] : ['alarm', 'system-monitor', 'system-business'] + const keys = ['alarm', 'system-monitor', 'system-business'] + if (menuStore.hasMenu('workflow')) { + keys.push('workflow-notification') + } + activeKey.value = keys initData = getInitData() handleSearch(); }); @@ -142,4 +146,4 @@ onMounted(() => { } } } - \ No newline at end of file + diff --git a/src/views/account/Center/components/data.ts b/src/views/account/Center/components/data.ts index 3637b0bc..7919ce9c 100644 --- a/src/views/account/Center/components/data.ts +++ b/src/views/account/Center/components/data.ts @@ -72,6 +72,5 @@ const workflowNotice = [ }, ] export const getInitData = () =>{ - let initData:any[] - return initData = menuStore.hasMenu('code') ? [...systemNotice,...workflowNotice] : [...systemNotice] -} \ No newline at end of file + return menuStore.hasMenu('workflow') ? [...systemNotice,...workflowNotice] : [...systemNotice] +}