Browse Source

添加统一鉴权空界面

tianyabing 2 years ago
parent
commit
f0e42a5137

+ 46 - 0
src/components/auth/auth.vue

@@ -0,0 +1,46 @@
+<template>
+  <div class="iot-work">
+    <ContainerAside></ContainerAside>
+    <div class="pageContainer-body">
+      <Breadcrumb></Breadcrumb>
+
+      <div class="pageContainer-content">
+        <router-view />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { defineAsyncComponent } from "vue";
+
+export default {
+  data() {
+    return {
+    };
+  },
+  components: {
+    ContainerAside: defineAsyncComponent(() =>
+      import("@/components/home/ContainerAside.vue")
+    ),
+    Breadcrumb: defineAsyncComponent(() =>
+      import("@/components/breadcrumb/iotBreadcrumb.vue")
+    ),
+  },
+  watch: {
+  },
+  mounted() {
+
+  },
+  methods: {
+
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.iot-work {
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 3 - 0
src/components/auth/authAction.vue

@@ -0,0 +1,3 @@
+<template>
+  <div>行为权限</div>
+</template>

+ 3 - 0
src/components/auth/authRole.vue

@@ -0,0 +1,3 @@
+<template>
+  <div>角色权限</div>
+</template>

+ 3 - 0
src/components/auth/authView.vue

@@ -0,0 +1,3 @@
+<template>
+  <div>权限查看</div>
+</template>

+ 30 - 8
src/data/json/menuList.json

@@ -2,12 +2,12 @@
   {
     "name": "智能看板",
     "router": "/dashboard",
-    "icon": "function/dashboard.png"
+    "icon": "智能看板.png"
   },
   {
     "name": "智享生活",
     "router": "/life",
-    "icon": "function/life.png",
+    "icon": "智享生活.png",
     "children": [
       {
         "name": "智慧餐厅",
@@ -34,7 +34,7 @@
   {
     "name": "智慧办公",
     "router": "/work",
-    "icon": "function/work.png",
+    "icon": "智慧办公.png",
     "children": [
       {
         "name": "楼层概览",
@@ -61,7 +61,7 @@
   {
     "name": "数智双碳",
     "router": "/doubleCarbon",
-    "icon": "function/carbon.png",
+    "icon": "数智双碳.png",
     "children": [
       {
         "name": "双碳概览",
@@ -88,7 +88,7 @@
   {
     "name": "智慧运营",
     "router": "/business",
-    "icon": "function/operation.png",
+    "icon": "智慧运营.png",
     "children": [
       {
         "name": "资产管理",
@@ -110,7 +110,7 @@
   {
     "name": "智慧安防",
     "router": "/security",
-    "icon": "function/security.png",
+    "icon": "智慧安防.png",
     "children": [
       {
         "name": "安防人员",
@@ -154,7 +154,7 @@
   {
     "name": "智慧场景",
     "router": "/scene",
-    "icon": "function/scene.png",
+    "icon": "智慧场景.png",
     "children": [
       {
         "name": "智•会议",
@@ -222,7 +222,7 @@
   {
     "name": "数据报表",
     "router": "/report",
-    "icon": "function/report.png",
+    "icon": "数据报表.png",
     "children": [
       {
         "name": "报表",
@@ -274,6 +274,28 @@
         ]
       }
     ]
+  },
+  {
+    "name": "统一鉴权",
+    "router": "/auth",
+    "icon": "权限下达.png",
+    "children": [
+      {
+        "name": "角色权限",
+        "router": "/auth/role",
+        "icon": "角色权限.png"
+      },
+      {
+        "name": "行为权限",
+        "router": "/auth/action",
+        "icon": "行为权限.png"
+      },
+      {
+        "name": "权限查看",
+        "router": "/auth/view",
+        "icon": "权限查看.png"
+      }
+    ]
   }
 
 ]

+ 26 - 0
src/router/index.js

@@ -370,6 +370,32 @@ const router = new VueRouter({
             },
           ]
         },
+        {
+          path: '/auth',
+          name: 'auth',
+          meta: {breadcrumb: '统一鉴权'},
+          component: () => import('@/components/auth/auth.vue'),
+          children: [
+            {
+              path: '/auth/role',
+              name: 'authRole',
+              meta: {breadcrumb: '角色权限'},
+              component: () => import('@/components/auth/authRole.vue')
+            },
+            {
+              path: '/auth/action',
+              name: 'authAction',
+              meta: {breadcrumb: '行为权限'},
+              component: () => import('@/components/auth/authAction.vue')
+            },
+            {
+              path: '/auth/view',
+              name: 'authView',
+              meta: {breadcrumb: '权限查看'},
+              component: () => import('@/components/auth/authView.vue')
+            },
+          ]
+        },
 
       ],
     },