Quellcode durchsuchen

1、修改路由文件

赖云浩 vor 4 Jahren
Ursprung
Commit
7ffb32bd2b

+ 1 - 1
config/dev.env.js

@@ -39,4 +39,4 @@ module.exports = merge(prodEnv, {
             target: "http://10.11.1.142:8861" // 易长安
         }
     })
-});
+});

+ 3 - 3
src/api/application.js

@@ -20,9 +20,9 @@ export function select(data) {
 
 // 获取资源
 export function getRemoteRource(data) {
-    return axios.post(`/applicationManagement/resource/getResourceRemote`, data)
+    return axios.post(`/applicationManagement/resource/getResourceRemote`, data);
 }
 // 同步资源
 export function syncRource() {
-    return axios.get(`/applicationManagement/resource/sync`)
-}
+    return axios.get(`/applicationManagement/resource/sync`);
+}

+ 23 - 20
src/pages/application-manage/app-manage/index.vue

@@ -120,21 +120,20 @@
 <script>
 import Tree from "@/pages/common/tree";
 import Table from "@/pages/common/table";
-import { appRestApi, select,getRemoteRource,syncRource } from "@/api/application";
+import { appRestApi, select, getRemoteRource, syncRource } from "@/api/application";
 import Editor from "./editor";
 import Detail from "./detail";
 const editorArea = ["960px", "680px"];
 
-import {mapGetters} from "vuex";
+import { mapGetters } from "vuex";
 
 export default {
     name: "appMSG",
     components: { Tree, Table },
-    computed:{
-        ...mapGetters(['user'])
-    },
-    mounted(){
+    computed: {
+        ...mapGetters(["user"])
     },
+    mounted() {},
     data() {
         const that = this;
         return {
@@ -308,24 +307,28 @@ export default {
         },
 
         // 获取资源
-        handleRemoteRource(){
+        handleRemoteRource() {
             const that = this;
             const queryParams = {
-                listingAll:true
-            }
-            getRemoteRource(queryParams).then(res => {
-                that.$message.success("资源获取成功!");
-            }).catch(err => {
-                that.$message.error(err);
-            })
+                listingAll: true
+            };
+            getRemoteRource(queryParams)
+                .then(res => {
+                    that.$message.success("资源获取成功!");
+                })
+                .catch(err => {
+                    that.$message.error(err);
+                });
         },
-        handleSyncRource(){
+        handleSyncRource() {
             const that = this;
-            syncRource().then(res => {
-                 that.$message.success("资源同步成功!");
-            }).catch(err => {
-                that.$message.error(err);
-            })
+            syncRource()
+                .then(res => {
+                    that.$message.success("资源同步成功!");
+                })
+                .catch(err => {
+                    that.$message.error(err);
+                });
         }
     },
     created() {

+ 12 - 12
src/pages/authorization-manage/author-role-manage.vue

@@ -305,7 +305,7 @@ export default {
                 })
             ) {
                 if (row.children) {
-                    loopRowChild(row.children,true);
+                    loopRowChild(row.children, true);
                     // row.children.map(j => {
                     //     this.toggleSelection(j, true);
                     // });
@@ -315,17 +315,17 @@ export default {
                     // row.children.map(j => {
                     //     this.toggleSelection(j, false);
                     // });
-                    loopRowChild(row.children,false);
+                    loopRowChild(row.children, false);
                 }
             }
 
-            function loopRowChild(rows,flag){
+            function loopRowChild(rows, flag) {
                 rows.map(item => {
-                    if(item.children){
-                        loopRowChild(item.children,flag)
+                    if (item.children) {
+                        loopRowChild(item.children, flag);
                     }
                     that.toggleSelection(item, flag);
-                })
+                });
             }
         },
         selectAll(selection) {
@@ -341,13 +341,13 @@ export default {
                 return selectIds.includes(el.id);
             });
 
-            function loopRowChild(rows,flag){
+            function loopRowChild(rows, flag) {
                 rows.map(item => {
-                    if(item.children){
-                        loopRowChild(item.children,flag)
+                    if (item.children) {
+                        loopRowChild(item.children, flag);
                     }
                     that.toggleSelection(item, flag);
-                })
+                });
             }
             if (isSelect) {
                 selection.map(el => {
@@ -355,7 +355,7 @@ export default {
                         // el.children.map(j => {
                         //     this.toggleSelection(j, true);
                         // });
-                        loopRowChild(el.children,true)
+                        loopRowChild(el.children, true);
                     }
                 });
             }
@@ -365,7 +365,7 @@ export default {
                         // el.children.map(j => {
                         //     this.toggleSelection(j, false);
                         // });
-                        loopRowChild(el.children,false)
+                        loopRowChild(el.children, false);
                     }
                 });
             }

+ 32 - 36
src/router/index.js

@@ -4,11 +4,11 @@ import Router from "vue-router";
 Vue.use(Router);
 
 /* Layout */
-// import Layout from "@/pages/layout/layout";
+import Layout from "@/pages/layout/layout";
 const { getSetting } = window.systemParamsUtils;
 let layoutType = getSetting("LAYOUT");
 // let a = "layout"
-const Layout = () => import(`@/pages/${layoutType}/layout`);
+// const Layout = () => import(`@/pages/${layoutType}/layout`);
 
 /* Router Modules */
 import userManage from "./modules/user-manage";
@@ -40,8 +40,7 @@ import empowerManage from "./modules/empower-manage";
  **/
 export const constantRouterMap = [];
 
-export const asyncRouterMap = [
-    {
+export const asyncRouterMap = [{
         path: "/",
         component: Layout,
         redirect: "/home"
@@ -55,17 +54,17 @@ export const asyncRouterMap = [
         path: "/redirect",
         component: Layout,
         hidden: true,
-        children: [
-            {
-                path: "/redirect/:path*",
-                component: () => import("@/pages/common/redirect/index")
-            }
-        ]
+        children: [{
+            path: "/redirect/:path*",
+            component: () =>
+                import ("@/pages/common/redirect/index")
+        }]
     },
     // 登录
     {
         path: "/login",
-        component: () => import("@/pages/common/login/index"),
+        component: () =>
+            import ("@/pages/common/login/index"),
         // component: () => import("@/pages/common/login-page/login-type-1"),
         hidden: true
     },
@@ -76,14 +75,13 @@ export const asyncRouterMap = [
         redirect: "/home/index",
         meta: { title: "我的主页", icon: "el-icon-s-home", noCache: false },
         // hidden: true,
-        children: [
-            {
-                path: "index",
-                component: () => import("@/pages/home"),
-                name: "index",
-                meta: { title: "我的主页", noCache: false }
-            }
-        ]
+        children: [{
+            path: "index",
+            component: () =>
+                import ("@/pages/home"),
+            name: "index",
+            meta: { title: "我的主页", noCache: false }
+        }]
     },
     //用户管理
     // userManage,
@@ -106,14 +104,13 @@ export const asyncRouterMap = [
         redirect: "/dynamic-author-manage",
         alwaysShow: true,
         meta: { title: "动态授权管理", icon: "el-icon-time", noCache: true, permission: ["YHGLPT_DTSQGL"] },
-        children: [
-            {
-                path: "dynamic-manage",
-                component: () => import("@/pages/dynamic-author-manage"),
-                name: "dynamic-author-manage",
-                meta: { title: "动态授权管理", noCache: false, permission: ["YHGLPT_DTSQGL_DTSQGL"] }
-            }
-        ]
+        children: [{
+            path: "dynamic-manage",
+            component: () =>
+                import ("@/pages/dynamic-author-manage"),
+            name: "dynamic-author-manage",
+            meta: { title: "动态授权管理", noCache: false, permission: ["YHGLPT_DTSQGL_DTSQGL"] }
+        }]
     },
     // 服务授权管理
     {
@@ -122,14 +119,13 @@ export const asyncRouterMap = [
         redirect: "/service-delagate",
         alwaysShow: true,
         meta: { title: "服务授权管理", icon: "el-icon-time", noCache: true },
-        children: [
-            {
-                path: "service-delagate",
-                component: () => import("@/pages/service-delegate"),
-                name: "service-delagate",
-                meta: { title: "服务授权", noCache: false }
-            }
-        ]
+        children: [{
+            path: "service-delagate",
+            component: () =>
+                import ("@/pages/service-delegate"),
+            name: "service-delagate",
+            meta: { title: "服务授权", noCache: false }
+        }]
     }
 ];
 
@@ -137,4 +133,4 @@ export default new Router({
     // mode: "history", // require service support
     scrollBehavior: () => ({ y: 0 }),
     routes: constantRouterMap
-});
+});

+ 12 - 13
src/router/modules/admin-manage.js

@@ -4,23 +4,22 @@
  * @Date:   2020-03-17
  * @Project jz
  */
-// import Layout from "@/pages/layout/layout";
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+import Layout from "@/pages/layout/layout";
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentsRouter = {
     path: "/police-manage",
     component: Layout,
     redirect: "/police-manage/admin-manage",
-		alwaysShow:true,
-    meta: { title: "管理员管理", icon: "el-icon-s-custom", noCache: true,permission:['YHGLPT_GLYGL']  },
-    children: [
-        {
-            path: "admin-manage",
-            component: () => import("@/pages/admin-manage"),
-            name: "admin-manage",
-            meta: { title: "授权范围管理", icon: "el-icon-s-custom", noCache: false,permission: ['YHGLPT_YHGL_GLYGL']  }
-        }
-    ]
+    alwaysShow: true,
+    meta: { title: "管理员管理", icon: "el-icon-s-custom", noCache: true, permission: ['YHGLPT_GLYGL'] },
+    children: [{
+        path: "admin-manage",
+        component: () =>
+            import ("@/pages/admin-manage"),
+        name: "admin-manage",
+        meta: { title: "授权范围管理", icon: "el-icon-s-custom", noCache: false, permission: ['YHGLPT_YHGL_GLYGL'] }
+    }]
 };
 
-export default componentsRouter;
+export default componentsRouter;

+ 13 - 10
src/router/modules/application-manage.js

@@ -4,28 +4,31 @@
  * @Date:   2020-03-31
  * @Project jz
  */
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+import Layout from "@/pages/layout/layout";
+
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentsRouter = {
     path: "/application-manage",
     component: Layout,
     redirect: "/application-manage",
-    alwaysShow:true,
-    meta: { title: "应用管理", icon: "el-icon-goods", noCache: true,permission:['YHGLPT_YYGL']  },
-    children: [
-        {
+    alwaysShow: true,
+    meta: { title: "应用管理", icon: "el-icon-goods", noCache: true, permission: ['YHGLPT_YYGL'] },
+    children: [{
             path: "app-manage",
-            component: () => import("@/pages/application-manage/vendor-manage"),
+            component: () =>
+                import ("@/pages/application-manage/vendor-manage"),
             name: "app-manage",
-            meta: { title: "厂商管理", noCache: false,permission:['YHGLPT_YYGL_CSGL']  }
+            meta: { title: "厂商管理", noCache: false, permission: ['YHGLPT_YYGL_CSGL'] }
         },
         {
             path: "vendor-manage",
-            component: () => import("@/pages/application-manage/app-manage"),
+            component: () =>
+                import ("@/pages/application-manage/app-manage"),
             name: "vendor-manage",
-            meta: { title: "应用管理", noCache: false,permission:['YHGLPT_YYGL_YYGL']  }
+            meta: { title: "应用管理", noCache: false, permission: ['YHGLPT_YYGL_YYGL'] }
         }
     ]
 };
 
-export default componentsRouter;
+export default componentsRouter;

+ 16 - 14
src/router/modules/authorization-manage.js

@@ -3,21 +3,23 @@
 	@author:laiyh
 	@Date:2020-07-28
 */
+import Layout from "@/pages/layout/layout";
 
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentRouter = {
-		path:"/author-manage",
-		component:Layout,
-		redirect:"/author-manage",
-		alwaysShow:true,
-		meta: { title: "权限管理", icon: "el-icon-setting", noCache: true,permission:['YHGLPT_QXGL']  },
-		children:[{
-			path:"author-setting",
-			component:()=>import("@/pages/authorization-manage"),
-			name:"author-setting",
-			meta:{title:"权限配置",icon:"",noCache:false,permission: ['YHGLPT_QXGL_QXPZ']}
-		}]
-	};
+    path: "/author-manage",
+    component: Layout,
+    redirect: "/author-manage",
+    alwaysShow: true,
+    meta: { title: "权限管理", icon: "el-icon-setting", noCache: true, permission: ['YHGLPT_QXGL'] },
+    children: [{
+        path: "author-setting",
+        component: () =>
+            import ("@/pages/authorization-manage"),
+        name: "author-setting",
+        meta: { title: "权限配置", icon: "", noCache: false, permission: ['YHGLPT_QXGL_QXPZ'] }
+    }]
+};
 
-export default componentRouter;
+export default componentRouter;

+ 22 - 18
src/router/modules/empower-manage.js

@@ -3,25 +3,29 @@
 	@author:laiyh
 	@Date:2020-07-28
 */
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+import Layout from "@/pages/layout/layout";
+
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentRouter = {
-	path:"/empower-manage",
-	component:Layout,
-	redirect:"/empower-manage",
-	alwaysShow:true,
-	meta:{title:"授权管理",icon:"el-icon-s-operation",noCache:true,permission:['YHGLPT_SQGL']},
-	children:[{
-		path:"institutional-quotas-manage",
-		component:()=>import("@/pages/empower-manage/institutional-quotas-manage"),
-		name:"institutional-quotas-manage",
-		meta:{title:"机构配额管理",noCache:false,permission:['YHGLPT_SQGL_JGPEGL']}
-	},{
-		path:"persional-empower-manage",
-		component:()=>import("@/pages/empower-manage/persional-empower-manage"),
-		name:"persional-empower-manage",
-		meta:{title:"人员授权管理",noCache:false,permission:['YHGLPT_SQGL_RYSQGL']}
-	}]
+    path: "/empower-manage",
+    component: Layout,
+    redirect: "/empower-manage",
+    alwaysShow: true,
+    meta: { title: "授权管理", icon: "el-icon-s-operation", noCache: true, permission: ['YHGLPT_SQGL'] },
+    children: [{
+        path: "institutional-quotas-manage",
+        component: () =>
+            import ("@/pages/empower-manage/institutional-quotas-manage"),
+        name: "institutional-quotas-manage",
+        meta: { title: "机构配额管理", noCache: false, permission: ['YHGLPT_SQGL_JGPEGL'] }
+    }, {
+        path: "persional-empower-manage",
+        component: () =>
+            import ("@/pages/empower-manage/persional-empower-manage"),
+        name: "persional-empower-manage",
+        meta: { title: "人员授权管理", noCache: false, permission: ['YHGLPT_SQGL_RYSQGL'] }
+    }]
 };
 
-export default componentRouter;
+export default componentRouter;

+ 19 - 18
src/router/modules/log-report.js

@@ -4,29 +4,30 @@
  * @Date:   2020-03-30
  * @Project jz
  */
-// import Layout from "@/pages/layout/layout";
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+import Layout from "@/pages/layout/layout";
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentsRouter = {
     path: "/log-report",
     component: Layout,
     redirect: "/log-report",
-		alwaysShow:true,
-    meta: { title: "日志审计管理", icon: "el-icon-document-checked", noCache: true,permission:['YHGLPT_RZSJGL'] },
-    children: [
-				{
-					path: "scope-author-audit",
-					component: () => import("@/pages/log-report/scope-author-audit"),
-					name: "scope-author-audit",
-					meta: { title: "授权范围审计", icon: "el-icon-setting", noCache: false,permission:['YHGLPT_YHGL_GLYSJ'] }
-				},
-				{
-					path: "persionnel-author-audit",
-					component: () => import("@/pages/log-report/persionnel-author-audit"),
-					name: "persionnel-author-audit",
-					meta: { title: "人员权限授权审计", icon: "el-icon-setting", noCache: false,permission:['YHGLPT_RZSJGL_RYQXSQSJ'] }
-				}
+    alwaysShow: true,
+    meta: { title: "日志审计管理", icon: "el-icon-document-checked", noCache: true, permission: ['YHGLPT_RZSJGL'] },
+    children: [{
+            path: "scope-author-audit",
+            component: () =>
+                import ("@/pages/log-report/scope-author-audit"),
+            name: "scope-author-audit",
+            meta: { title: "授权范围审计", icon: "el-icon-setting", noCache: false, permission: ['YHGLPT_YHGL_GLYSJ'] }
+        },
+        {
+            path: "persionnel-author-audit",
+            component: () =>
+                import ("@/pages/log-report/persionnel-author-audit"),
+            name: "persionnel-author-audit",
+            meta: { title: "人员权限授权审计", icon: "el-icon-setting", noCache: false, permission: ['YHGLPT_RZSJGL_RYQXSQSJ'] }
+        }
     ]
 };
 
-export default componentsRouter;
+export default componentsRouter;

+ 13 - 12
src/router/modules/statistics-manage.js

@@ -4,22 +4,23 @@
  * @Date:   2020-03-31
  * @Project jz
  */
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+import Layout from "@/pages/layout/layout";
+
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentsRouter = {
     path: "/statistics-manage",
     component: Layout,
     redirect: "/statistics-manage",
-		alwaysShow:true,
-    meta: { title: "统计报表", icon: "el-icon-document", noCache: true,permission:['YHGLPT_TJBB']  },
-    children: [
-				{
-					path: "role-authorization",
-					component: () => import("@/pages/statistics-manage/role-authorization"),
-					name: "role-authorization",
-					meta: { title: "角色授权情况", noCache: false,permission: ['YHGLPT_TJBB_JSSQQK']  }
-				}
-    ]
+    alwaysShow: true,
+    meta: { title: "统计报表", icon: "el-icon-document", noCache: true, permission: ['YHGLPT_TJBB'] },
+    children: [{
+        path: "role-authorization",
+        component: () =>
+            import ("@/pages/statistics-manage/role-authorization"),
+        name: "role-authorization",
+        meta: { title: "角色授权情况", noCache: false, permission: ['YHGLPT_TJBB_JSSQQK'] }
+    }]
 };
 
-export default componentsRouter;
+export default componentsRouter;

+ 3 - 3
src/router/modules/user-manage.js

@@ -4,8 +4,8 @@
  * @Date:   2020-03-17
  * @Project jz
  */
-// import Layout from "@/pages/layout/layout";
-const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
+import Layout from "@/pages/layout/layout";
+// const Layout = () => import("@/pages/" + process.env.LAYOUT + "/layout");
 
 const componentsRouter = {
     // path: "/user-manage",
@@ -58,4 +58,4 @@ const componentsRouter = {
     // ]
 };
 
-export default componentsRouter;
+export default componentsRouter;