Compare commits

...

3 Commits

Author SHA1 Message Date
Leo_Ding
65ea48af37 Merge branch 'master' of https://gitlab.guxuan.icu/Leo_Ding/hahaPension_admin 2025-11-10 09:57:25 +08:00
Leo_Ding
f31e60914b 加载效果 2025-11-10 09:57:18 +08:00
Leo_Ding
36f5af21da 加入全局加载效果 2025-11-10 09:56:24 +08:00

View File

@ -1,4 +1,5 @@
<template> <template>
<a-spin :spinning="spinning" tip="Loading..." size="large">
<a-layout class="layout"> <a-layout class="layout">
<template #default> <template #default>
<!-- 上下布局 --> <!-- 上下布局 -->
@ -30,7 +31,8 @@
<template #left> <template #left>
<brand :theme="config.headerTheme"></brand> <brand :theme="config.headerTheme"></brand>
</template> </template>
<basic-menu mode="horizontal" :theme="config.headerTheme" :data-list="topMenuList"></basic-menu> <basic-menu mode="horizontal" :theme="config.headerTheme"
:data-list="topMenuList"></basic-menu>
</basic-header> </basic-header>
<a-layout> <a-layout>
<template v-if="sideMenuList.length"> <template v-if="sideMenuList.length">
@ -104,7 +106,7 @@
</template> </template>
</template> </template>
</a-layout> </a-layout>
</a-spin>
<config-dialog ref="configDialogRef"></config-dialog> <config-dialog ref="configDialogRef"></config-dialog>
</template> </template>
@ -127,15 +129,22 @@ defineOptions({
}) })
useMultiTab() useMultiTab()
const spinning = ref(false)
const appStore = useAppStore() const appStore = useAppStore()
const dicsStore = useDicsStore() const dicsStore = useDicsStore()
initData() initData()
async function initData() { async function initData() {
storage.local.setItem('companyId','C001') try {
spinning.value = true
storage.local.setItem('companyId', 'C001')
await dicsStore.loadProvinces() // await dicsStore.loadProvinces() //
await dicsStore.loadAllDictData() // await dicsStore.loadAllDictData() //
await dicsStore.loadOrgTree() await dicsStore.loadOrgTree()
spinning.value = false
} catch (error) {
spinning.value = false
}
} }
const { sideMenuList, topMenuList } = useMenu() const { sideMenuList, topMenuList } = useMenu()