ith5 vor 5 Monaten
Ursprung
Commit
5bb964e222

+ 1 - 1
src/router/homePageRoutes.js

@@ -33,7 +33,7 @@ const homePageRoutes = [
 
 export const homePage = {
   name: 'home',
-  path: '/home',
+  path: '/dashboard',
   meta: { title: '首页', icon: 'icon-home', hidden: false, type: 'M' }
 }
 

+ 1 - 2
src/router/webRouter.js

@@ -6,13 +6,12 @@ const routes = [
     path: '/',
     component: () => import('@/layout/index.vue'),
     redirect: 'dashboard',
-    // children: homePageRoutes,
     children: [
       {
         name: 'dashboard',
         path: '/dashboard',
         meta: {
-          title: '仪表盘',
+          title: '仪表盘2',
           icon: 'icon-dashboard',
           type: 'M',
           affix: true

+ 18 - 14
src/store/modules/tag.js

@@ -1,23 +1,27 @@
 import { defineStore } from 'pinia'
 import tool from '@/utils/tool'
 
-const defaultTag = [ { name: 'dashboard', title: '仪表盘', path: '/dashboard', affix: true } ]
+const defaultTag = [
+  { name: 'dashboard', title: '仪表盘1', path: '/dashboard', affix: true }
+]
 const useTagStore = defineStore('tag', {
   state: () => ({
-    tags: (! tool.local.get('tags') || tool.local.get('tags').length === 0 ) ? defaultTag : tool.local.get('tags')
+    tags:
+      !tool.local.get('tags') || tool.local.get('tags').length === 0
+        ? defaultTag
+        : tool.local.get('tags')
   }),
 
   getters: {
     getState() {
       return { ...this.$state }
-    },
+    }
   },
 
   actions: {
-
     addTag(tag) {
-      const target = this.tags.find( item => item.path === tag.path )
-      if (! target && tag.path ) {
+      const target = this.tags.find((item) => item.path === tag.path)
+      if (!target && tag.path) {
         this.tags.push(tag)
       }
       this.updateTagsToLocal()
@@ -26,10 +30,10 @@ const useTagStore = defineStore('tag', {
     removeTag(tag) {
       let index = 0
       this.tags.map((item, idx) => {
-        if ( item.path === tag.path && ! item.affix ) {
-          if (this.tags[(idx + 1)]) {
+        if (item.path === tag.path && !item.affix) {
+          if (this.tags[idx + 1]) {
             index = idx
-          } else if ( idx > 0) {
+          } else if (idx > 0) {
             index = idx - 1
           }
           this.tags.splice(idx, 1)
@@ -40,7 +44,7 @@ const useTagStore = defineStore('tag', {
     },
 
     updateTag(tag) {
-      this.tags.map(item => {
+      this.tags.map((item) => {
         if (item.path == tag.path) {
           item = Object.assign(item, tag)
         }
@@ -49,7 +53,7 @@ const useTagStore = defineStore('tag', {
     },
 
     updateTagTitle(path, title) {
-      this.tags.map(item => {
+      this.tags.map((item) => {
         if (item.path == path) {
           item.customTitle = title
         }
@@ -64,8 +68,8 @@ const useTagStore = defineStore('tag', {
     clearTags() {
       this.tags = defaultTag
       tool.local.set('tags', defaultTag)
-    },
-  },
+    }
+  }
 })
 
-export default useTagStore
+export default useTagStore

+ 1 - 1
src/store/modules/user.js

@@ -69,7 +69,7 @@ const useUserStore = defineStore('user', {
             this.setInfo(response.data)
             const dictStore = useDictStore()
             await dictStore.initData()
-            homePage.children = webRouter[0].children
+            // homePage.children = webRouter[0].children
             this.setMenu(this.routers)
             this.routers = removeButtonMenu(this.routers)
             this.routers.unshift(homePage)

+ 2 - 2
src/views/system/user/index.vue

@@ -92,12 +92,12 @@
     <edit-form ref="editRef" @success="refresh" />
 
     <!-- 设置首页 -->
-    <a-modal v-model:visible="setHomeVisible" @before-ok="saveHomePage">
+    <!-- <a-modal v-model:visible="setHomeVisible" @before-ok="saveHomePage">
       <template #title>设置用户后台首页</template>
       <a-form-item label="用户首页">
         <sa-select v-model="homePage" placeholder="请选择用户首页" dict="dashboard"></sa-select>
       </a-form-item>
-    </a-modal>
+    </a-modal> -->
     <!-- 设置游戏数据权限 -->
     <Permission ref="permissionRef" @success="refresh" />
     <!-- 设置自然量数据权限 -->