Browse Source

首页链接改造

1
mo 3 years ago
parent
commit
f3d944902e

+ 1 - 1
src/layout/components/TagsView.vue

@@ -72,7 +72,7 @@ export default {
         for (const key in s.searchs) {
           if (Object.hasOwnProperty.call(s.searchs, key)) {
             const item = s.searchs[key];
-            if (item.bind === this.$route.path&&item.bind!=='/main/main') {
+            if (item.bind === this.$route.path&&item.bind!=='/workbench') {
               keys.push(key);
             }
           }

+ 1 - 1
src/permission.js

@@ -118,7 +118,7 @@ router.beforeEach(async (to, from, next) => {
           // console.log(firstMenu, 'firstMenu', isMenu)
           // 判断是否有菜单
           if(isMenu) {
-            if(to.path == '/main/main') {
+            if(to.path == '/workbench') {
               next({ path: firstMenu, replace: true })
             } else {
               next({ ...to, replace: true })

+ 2 - 14
src/router/index.js

@@ -97,20 +97,8 @@ export const constantRoutes = [
 
   {
     path: '/',
-    component: Layout,
-    hidden: true,
-    children: [{
-      name: '首页',
-      path: '/',
-      component: () => import('@/views/main/index'),
-      hidden: false,
-      belongTopMenu: "/main",
-      activeMenu: '/main/main',
-      meta: {
-        noCache: '1',
-        title: '首页'
-      }
-    }]
+    redirect:'/main',
+    hidden: true
   },
   {
     path: '/redirect',

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

@@ -31,7 +31,7 @@ const tagsView = {
     },
     DEL_VISITED_VIEWS: (state, view) => {
       let firstMenuUrl = localStorage.getItem('firstMenuUrl')
-      let compareUrl = firstMenuUrl || '/main/main'
+      let compareUrl = firstMenuUrl || '/workbench'
       for (const [i, v] of state.visitedViews.entries()) {
 
         if (v.path === view.path) {

+ 1 - 1
src/views/main/abnormal/index.vue

@@ -306,7 +306,7 @@ export default {
         title: "测试发送通知",
         body: "您有一条待处理通知,请及时处理",
         onClick: () => {
-          this.$router.replace("/main/main");
+          this.$router.replace("/workbench");
         },
       });
     },

+ 1 - 1
src/views/main/cloudDate/organDateDetail.vue

@@ -312,7 +312,7 @@ export default {
     },
     goback() {
       this.$store.dispatch("delVisitedViews", this.$route);
-      this.$router.push({ path: "/main/main?tabrouter=cloudDate" });
+      this.$router.push({ path: "/workbench?tabrouter=cloudDate" });
     },
     organDateExport() {
       let params = { ...this.searchForm };

+ 1 - 1
src/views/main/cloudDate/organRankDetail.vue

@@ -436,7 +436,7 @@ export default {
     },
     goback() {
       this.$store.dispatch("delVisitedViews", this.$route);
-      this.$router.push({ path: "/main/main?tabrouter=cloudDate" });
+      this.$router.push({ path: "/workbench?tabrouter=cloudDate" });
     },
     gotoDetail(row) {
       // 跳转到分部数据详情 row.organId

+ 2 - 2
src/views/main/constant.js

@@ -264,7 +264,7 @@ export const errorType = {
     name: '乐团巡查任务未计划',
     isError: true,
     always: true,
-    url: '/main/main',
+    url: '/workbench',
     permission: '/main/main',
     resultKey: 'ids',
     query: {
@@ -286,7 +286,7 @@ export const errorType = {
   STUDENT_VISIT: {
     name: '回访任务未完成',
     isError: true,
-    url: '/main/main',
+    url: '/workbench',
     permission: '/main/main',
     always: true,
     query: {

+ 1 - 1
src/views/main/teamSchedule/scheduleDetail.vue

@@ -224,7 +224,7 @@ export default {
     onCancel() {
         this.$store.dispatch('delVisitedViews', this.$route)
       this.$router.push({
-        path: "/main/main",
+        path: "/workbench",
         query: { tabrouter: "teamSchedule" },
       });
     },