fix: 修改订阅关于工作流的标识

This commit is contained in:
XieYongHong 2023-11-02 10:47:01 +08:00
parent 3fc10962ae
commit 82aeb6b522
2 changed files with 9 additions and 6 deletions

View File

@ -63,7 +63,7 @@ const subscribe = ref<any[]>([]);
const dataSource = ref<any[]>([]);
const activeKey = ref<string[]>();
const loading = ref<boolean>(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(() => {
}
}
}
</style>
</style>

View File

@ -72,6 +72,5 @@ const workflowNotice = [
},
]
export const getInitData = () =>{
let initData:any[]
return initData = menuStore.hasMenu('code') ? [...systemNotice,...workflowNotice] : [...systemNotice]
}
return menuStore.hasMenu('workflow') ? [...systemNotice,...workflowNotice] : [...systemNotice]
}