diff --git a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue index 98a2567..3ecc313 100644 --- a/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue +++ b/src/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue @@ -75,7 +75,6 @@ } }) } -getDict() const $route = useRoute() // 路由参数 @@ -85,10 +84,19 @@ currentTab.value = currentMenu?.name } } + +// 挂载的时候找到之前存过的审批类型 +onMounted(async () => { + await getDict() + currentTab.value = window.sessionStorage.getItem('reportOnCredentialsApproval') || '全部' + currentApprovalStatus.value = approvalStatusReserveMap.value[currentTab.value] +}) + watch(currentTab, (newValue) => { currentApprovalStatus.value = approvalStatusReserveMap.value[newValue] + window.sessionStorage.setItem('reportOnCredentialsApproval', newValue) currentButtons.value = buttonsSet[newValue] -}, { deep: true, immediate: true }) +}, { deep: true })