chore: 拆分仪表盘路由为工作台和分析页

This commit is contained in:
2024-10-13 23:32:39 +08:00
parent 84ad0d55b0
commit 2e15cf2d48
19 changed files with 33 additions and 8 deletions

View File

@@ -0,0 +1 @@
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4a1 1 0 011 1v35h35a1 1 0 011 1v2a1 1 0 01-1 1H4V5a1 1 0 011-1h2zm35.727 4.633A1 1 0 0143 9.32V36a1 1 0 01-1 1H12a1 1 0 01-1-1V23l11.324-10.38a1 1 0 011.352 0l6.787 6.22 10.85-10.247a1 1 0 011.414.04zM39 16.28l-8.497 8.024L23 17.426l-8 7.334V33h24V16.28z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 403 B

View File

@@ -0,0 +1 @@
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M31 21a7.003 7.003 0 006.71-5h5.008c.446 0 .607-.046.77-.134a.908.908 0 00.378-.378c.088-.162.134-.324.134-.77v-1.436c0-.446-.046-.607-.134-.77a.908.908 0 00-.378-.378c-.163-.088-.324-.134-.77-.134l-5.008-.001a7.003 7.003 0 00-13.42 0L5.282 12c-.446 0-.607.046-.77.134a.908.908 0 00-.378.378c-.088.162-.134.324-.134.77v1.436c0 .446.046.607.134.77.087.163.215.291.378.378.163.088.324.134.77.134H24.29c.86 2.892 3.539 5 6.71 5zm0-4a3 3 0 110-6 3 3 0 010 6zM17 41a7.003 7.003 0 006.71-5h19.008c.446 0 .607-.046.77-.134a.908.908 0 00.378-.378c.088-.163.134-.324.134-.77v-1.436c0-.446-.046-.607-.134-.77a.908.908 0 00-.378-.378c-.163-.088-.324-.134-.77-.134l-19.008-.001a7.003 7.003 0 00-13.42 0L5.282 32c-.446 0-.607.046-.77.134a.908.908 0 00-.378.378c-.088.163-.134.324-.134.77v1.436c0 .446.046.607.134.77.087.163.215.291.378.378.163.088.324.134.77.134h5.008c.86 2.892 3.539 5 6.71 5zm0-4a3 3 0 110-6 3 3 0 010 6z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -0,0 +1 @@
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 5a1 1 0 011 1v33h36a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V6a1 1 0 011-1h2zm11 17a1 1 0 011 1v12a1 1 0 01-1 1h-2a1 1 0 01-1-1V23a1 1 0 011-1h2zm11-7a1 1 0 011 1v19a1 1 0 01-1 1h-2a1 1 0 01-1-1V16a1 1 0 011-1h2zm11-7a1 1 0 011 1v26a1 1 0 01-1 1h-2a1 1 0 01-1-1V9a1 1 0 011-1h2z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 428 B

View File

@@ -0,0 +1 @@
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 6a1 1 0 011 1v31h35a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V7a1 1 0 011-1h2zm34.527 6.707l1.414 1.414a1 1 0 010 1.415L31.627 26.849a1 1 0 01-1.414 0L28.8 25.435l-.006-.006-5.65-5.65-10.607 10.606a1 1 0 01-1.415 0L9.707 28.97a1 1 0 010-1.415L21.013 16.25l.008-.007.802-.801.612-.614a.996.996 0 01.53-.277l.118-.014h.118c.236.014.468.111.648.291l1.415 1.415h.001l5.656 5.657 9.192-9.193a1 1 0 011.414 0z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 552 B

View File

@@ -0,0 +1 @@
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M24 2c12.15 0 22 9.85 22 22H25a1 1 0 01-1-1V2zm-4 2.4v4.104C13.1 10.28 8 16.544 8 24c0 8.837 7.163 16 16 16 7.456 0 13.72-5.1 15.496-12H43.6c-1.853 9.129-9.924 16-19.6 16-11.046 0-20-8.954-20-20 0-9.676 6.871-17.747 16-19.6zM28 20V6.446A18.026 18.026 0 0141.554 20H28z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 414 B

View File

@@ -0,0 +1 @@
<svg width="24" height="24" viewBox="0 0 48 48" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M13 33a2 2 0 012 2v8a2 2 0 01-2 2H6a2 2 0 01-2-2v-8a2 2 0 012-2h7zm27-13a2 2 0 012 2v21a2 2 0 01-2 2h-7a2 2 0 01-2-2V22a2 2 0 012-2h7zm-13.5 7a2 2 0 012 2v14a2 2 0 01-2 2h-7a2 2 0 01-2-2V29a2 2 0 012-2h7zM11 37H8v4h3v-4zm27-13h-3v17h3V24zm-13.5 7h-3v10h3V31zm7.923-24.908l.117.003 9.278.812a1 1 0 01.647 1.676l-.092.086-18.067 15.16a1 1 0 01-1.329-.037l-.08-.085-3.857-4.597L6.783 29.395a1 1 0 01-1.408-.123L4.089 27.74a1 1 0 01.123-1.41l15.321-12.855a1 1 0 011.409.123l3.857 4.597 9.192-7.714-2.305-2.747a1 1 0 01-.233-.598l.003-.132a1 1 0 01.967-.912z" fill="currentColor"/></svg>

After

Width:  |  Height:  |  Size: 699 B

View File

@@ -25,7 +25,7 @@ let home: RouteLocationMatched | null = null
const getHome = () => {
if (!home) {
const cloneRoutes = JSON.parse(JSON.stringify(routes)) as RouteLocationMatched[]
const obj = findTree(cloneRoutes, (i) => i.path === '/home')
const obj = findTree(cloneRoutes, (i) => i.path === '/dashboard/workplace')
home = obj.item
}
}

View File

@@ -35,15 +35,22 @@ export const constantRoutes: RouteRecordRaw[] = [
},
{
path: '/',
name: 'Dashboard',
component: Layout,
redirect: '/home',
meta: { hidden: false },
redirect: '/dashboard/workplace',
meta: { title: '仪表盘', icon: 'dashboard', hidden: false },
children: [
{
path: '/home',
name: 'Home',
component: () => import('@/views/home/index.vue'),
meta: { title: '首页', icon: 'dashboard', affix: true, hidden: false }
path: '/dashboard/workplace',
name: 'Workplace',
component: () => import('@/views/dashboard/workplace/index.vue'),
meta: { title: '工作台', icon: 'desktop', hidden: false, affix: true }
},
{
path: '/dashboard/analysis',
name: 'Analysis',
component: () => import('@/views/dashboard/analysis/index.vue'),
meta: { title: '分析页', icon: 'insert-chart', hidden: false }
}
]
},

View File

@@ -0,0 +1,12 @@
<template>
<div id="home" class="gi_page home">
分析页面开发中...
</div>
</template>
<script setup lang="ts">
defineOptions({ name: 'Analysis' })
</script>
<style lang="scss" scoped>
</style>

View File

@@ -31,7 +31,7 @@ import FastCard from './components/FastCard.vue'
import NoticeCard from './components/NoticeCard.vue'
import SponsorCard from './components/SponsorCard.vue'
defineOptions({ name: 'Home' })
defineOptions({ name: 'Workplace' })
const open = (url: string) => {
window.open(url, '_blank')