feat: 总览数据联调

This commit is contained in:
王天骄
2026-06-13 06:24:09 +08:00
parent 1d093c9589
commit d68edd52aa
16 changed files with 2460 additions and 243 deletions
+1 -15
View File
@@ -35,9 +35,6 @@
<span>{{ appStore.roleLabel }}</span>
</div>
</div>
<el-select v-model="role" class="role-select" size="small" @change="handleRoleChange">
<el-option v-for="item in roleOptions" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
</aside>
@@ -89,19 +86,13 @@
import { computed, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ArrowDown, Bell, Fold, Moon, QuestionFilled, Search, Sunny } from '@element-plus/icons-vue'
import { roleOptions } from '@/mock/dashboard'
import { getFirstPage, getPagePath, pageTitles, roleMenus } from '@/mock/navigation'
import { getPagePath, pageTitles, roleMenus } from '@/mock/navigation'
import { useAppStore } from '@/stores/app'
import type { RoleKey } from '@/types'
const route = useRoute()
const router = useRouter()
const appStore = useAppStore()
const keyword = ref('')
const role = computed({
get: () => appStore.user.role,
set: value => appStore.switchRole(value)
})
const visibleSections = computed(() => roleMenus[appStore.user.role])
const pageTitle = computed(() => {
@@ -112,11 +103,6 @@ const pageTitle = computed(() => {
return String(route.meta.title || '数据驾驶舱')
})
function handleRoleChange(value: RoleKey) {
appStore.switchRole(value)
router.push(getPagePath(getFirstPage(value)))
}
function handleCommand(command: string) {
if (command === 'logout') {
appStore.logout()