Browse Source

优化页面

xinsuixindong 1 year ago
parent
commit
c7788e8d43

+ 9 - 8
src/components/Breadcrumb/index.vue

@@ -1,5 +1,9 @@
 <template>
-  <el-breadcrumb class="app-breadcrumb" separator-class="el-icon-arrow-right" v-if="isDashborad">
+  <el-breadcrumb
+    class="app-breadcrumb"
+    separator-class="el-icon-arrow-right"
+    v-if="isDashborad"
+  >
     <transition-group name="breadcrumb">
       <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
         <span
@@ -45,9 +49,9 @@ export default {
       const first = matched[0];
 
       if (this.isDashboard(first)) {
-        this.isDashborad = false
-      }else{
-         this.isDashborad = true
+        this.isDashborad = false;
+      } else {
+        this.isDashborad = true;
       }
 
       this.levelList = matched.filter(
@@ -59,9 +63,7 @@ export default {
       if (!name) {
         return false;
       }
-      return (
-        name.trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase()
-      );
+      return name.trim().toLocaleLowerCase() === "HomePage".toLocaleLowerCase();
     },
     pathCompile(path) {
       // To solve this problem https://github.com/PanJiaChen/vue-element-admin/issues/561
@@ -82,5 +84,4 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-
 </style>

+ 0 - 3
src/components/TopNav/index.vue

@@ -252,7 +252,4 @@ export default {
   color: #{"var(--theme)"} !important;
   background: #f6f7fc;
 }
-#app .hideSidebar .el-submenu > .el-submenu__title {
-  padding: 0 15px !important;
-}
 </style>

+ 0 - 60
src/icons/svg/系统管理.svg

@@ -1,60 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg width="128" height="128" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 488.4 488.4" style="enable-background:new 0 0 488.4 488.4;" xml:space="preserve">
-<g>
-	<g>
-		<path d="M451.2,190.8h-15.5c-4.3-15.5-10.4-30.3-18.4-44.3l10.9-10.9c14.5-14.5,14.5-38.1,0-52.6l-22.8-22.8
-			c-14.5-14.5-38.1-14.5-52.6,0l-94.1,94c-7,7-7,18.4,0,25.5c2.3,2.3,5,3.8,7.9,4.6c0.5,0.2,0.9,0.5,1.4,0.7
-			c18.6,7.5,32.4,22.9,37.7,42.2c4.6,16.4,2.5,33.7-5.9,48.6c-8.4,14.9-22.1,25.6-38.5,30.1c-16.4,4.6-33.7,2.5-48.6-5.9
-			c-14.9-8.4-25.6-22.1-30.1-38.5c-6.7-24.1,1.4-50,20.5-66.1c7.6-6.4,8.6-17.7,2.2-25.4c-6.4-7.6-17.7-8.6-25.4-2.2
-			c-29.9,25.1-42.5,65.7-32,103.3c7.1,25.7,23.9,47.1,47.1,60.2c15.2,8.6,32,13,49,13c9,0,18-1.2,26.9-3.7
-			c25.7-7.1,47.1-23.9,60.2-47.1c13.1-23.2,16.4-50.2,9.3-75.9c-6.3-22.8-20.1-42-38.9-55.1l76.7-76.7c0.5-0.5,1.2-0.5,1.7,0
-			l22.8,22.8c0.5,0.5,0.5,1.2,0,1.7l-31.4,31.4l8.2,12.3c11.9,17.8,20.1,37.5,24.2,58.5l2.9,14.5h44.6c0.7,0,1.2,0.5,1.2,1.2v32.3
-			c0,0.7-0.5,1.2-1.2,1.2h-44.4l-2.9,14.5c-4.2,21-12.3,40.6-24.2,58.5l-8.2,12.3l31.4,31.4c0.5,0.5,0.5,1.2,0,1.7l-22.8,22.8
-			c-0.5,0.5-1.2,0.5-1.7,0L347,371.5l-12.3,8.2c-17.8,11.9-37.5,20.1-58.5,24.2l-14.5,2.9v44.4c0,0.7-0.5,1.2-1.2,1.2h-32.3
-			c-0.7,0-1.2-0.5-1.2-1.2v-44.4l-14.5-2.9c-21-4.2-40.6-12.3-58.5-24.2l-12.3-8.2l-31.4,31.4c-0.5,0.5-1.2,0.5-1.7,0l-22.8-22.8
-			c-0.5-0.5-0.5-1.2,0-1.7l31.4-31.4l-8.2-12.3c-11.9-17.8-20.1-37.5-24.2-58.5l-2.9-14.5H37.2c-0.7,0-1.2-0.5-1.2-1.2v-32.3
-			c0-0.7,0.5-1.2,1.2-1.2h44.4l2.9-14.5c4.2-21,12.3-40.6,24.2-58.5l8.2-12.3l-31.4-31.4c-0.5-0.5-0.5-1.2,0-1.7l22.8-22.8
-			c0.5-0.5,1.2-0.5,1.7,0l31.4,31.4l12.3-8.2c17.8-11.9,37.5-20.1,58.5-24.2l14.5-2.9V37.2c0-0.7,0.5-1.2,1.2-1.2h32.3
-			c0.7,0,1.2,0.5,1.2,1.2v29.7c0,9.9,8.1,18,18,18c9.9,0,18-8.1,18-18V37.2c0-20.5-16.7-37.2-37.2-37.2h-32.3
-			c-20.5,0-37.2,16.7-37.2,37.2v15.5c-15.5,4.3-30.3,10.4-44.3,18.4l-10.9-10.9c-14.5-14.5-38.1-14.5-52.6,0L60.1,83
-			c-14.5,14.5-14.5,38.1,0,52.6L71,146.5c-7.9,14-14.1,28.8-18.4,44.3H37.2C16.7,190.8,0,207.5,0,228v32.3
-			c0,20.5,16.7,37.2,37.2,37.2h15.5c4.3,15.5,10.4,30.3,18.4,44.3l-10.9,10.9c-14.5,14.5-14.5,38.1,0,52.6L83,428.1
-			c14.5,14.5,38.1,14.5,52.6,0l10.9-10.9c14,7.9,28.8,14.1,44.3,18.4v15.6c0,20.5,16.7,37.2,37.2,37.2h32.3
-			c20.5,0,37.2-16.7,37.2-37.2v-15.5c15.5-4.3,30.3-10.4,44.3-18.4l10.9,10.9c14.5,14.5,38.1,14.5,52.6,0l22.8-22.8
-			c14.5-14.5,14.5-38.1,0-52.6l-10.9-10.9c7.9-14,14.1-28.8,18.4-44.3h15.6c20.5,0,37.2-16.7,37.2-37.2V228
-			C488.4,207.5,471.7,190.8,451.2,190.8z"/>
-	</g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-<g>
-</g>
-</svg>

+ 25 - 27
src/layout/components/AppMain.vue

@@ -1,13 +1,23 @@
 <template>
-  <section class="app-main">
+  <section
+    :class="
+      $route.path.substr($route.path.length - 10) === '/dashboard'
+        ? 'app-main2'
+        : 'app-main1'
+    "
+  >
     <!-- <el-scrollbar
       style="height: 100%"  
     > -->
-      <transition name="fade-transform" mode="out-in"  v-if="$route.path.substr($route.path.length - 10) !== '/dashboard'">
-        <keep-alive :include="cachedViews">
-          <router-view :key="key" ref="main" style="height: 100%" />
-        </keep-alive>
-      </transition>
+    <transition
+      name="fade-transform"
+      mode="out-in"
+      v-if="$route.path.substr($route.path.length - 10) !== '/dashboard'"
+    >
+      <keep-alive :include="cachedViews">
+        <router-view :key="key" ref="main" style="height: 100%" />
+      </keep-alive>
+    </transition>
     <!-- </el-scrollbar> -->
     <transition
       name="fade-transform"
@@ -37,31 +47,25 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.app-main {
+.app-main1 {
   height: calc(100vh - 90px);
-  // height: 100%;
   width: 100%;
   position: relative;
   overflow: hidden;
   padding: 0 20px;
-  // .el-scrollbar {
-  //   // background: #fff;
-  // }
+}
+
+.app-main2 {
+  height: calc(100vh - 50px);
+  width: 100%;
+  position: relative;
+  overflow: hidden;
+  padding: 0 20px;
 }
 
 .fixed-header + .app-main {
   padding-top: 90px;
 }
-
-// .hasTagsView {
-//   .app-main {
-//     height: calc(100vh - 84px);
-//   }
-
-//   .fixed-header + .app-main {
-//     padding-top: 84px;
-//   }
-// }
 </style>
 
 <style lang="scss">
@@ -71,9 +75,3 @@ export default {
   }
 }
 </style>
-<style lang="scss" scoped>
-// ::v-deep .el-scrollbar__wrap {
-//   overflow-x: hidden !important;
-//   height: 100%;
-// }
-</style>

+ 1 - 1
src/layout/components/Sidebar/index.vue

@@ -62,7 +62,7 @@ export default {
       this.show = false;
       setTimeout(() => {
         this.show = true;
-      }, 100);
+      }, 500);
     }
   }
 };

+ 6 - 6
src/utils/button/systemButton.js

@@ -1,10 +1,10 @@
 const systemButObj = [
     //用户管理
-    // {
-    //     id: 'system:users:add',
-    //     menuType: "BUTTON",
-    //     remark: "用户新增",
-    //     parentId: "user",
-    // },
+    {
+        id: 'system:users:add',
+        menuType: "BUTTON",
+        remark: "用户新增",
+        parentId: "user",
+    },
 ]
 export default systemButObj

+ 3 - 3
src/utils/menu/systemMenu.js

@@ -5,7 +5,7 @@ const systemMenuObj = [
     icon: "",
     id: "homePage",
     menuType: "MENU",
-    name: "homePage",
+    name: "HomePage",
     parentId: "0",
     redirect: "/homePage/dashboard",
     remark: "首页",
@@ -14,10 +14,10 @@ const systemMenuObj = [
   },
   {
     component: "/dashboard/index",
-    icon: "el-icon-setting",
+    icon: "dashboard",
     id: "dashboard",
     menuType: "MENU",
-    name: "dashboard",
+    name: "Dashboard",
     parentId: "homePage",
     redirect: "",
     remark: "首页",

+ 8 - 8
src/views/dashboard/index.vue

@@ -370,7 +370,7 @@ export default {
               barWidth: "50%",
               itemStyle: {
                 normal: {
-                  color: "#4A9BF7"
+                  color: "#3C64DC"
                 }
               }
             }
@@ -427,7 +427,7 @@ export default {
               barWidth: "50%",
               itemStyle: {
                 normal: {
-                  color: "#4A9BF7"
+                  color: "#3C64DC"
                 }
               }
             }
@@ -487,7 +487,7 @@ export default {
               barWidth: "50%",
               itemStyle: {
                 normal: {
-                  color: "#4A9BF7"
+                  color: "#3C64DC"
                 }
               }
             }
@@ -544,7 +544,7 @@ export default {
               barWidth: "50%",
               itemStyle: {
                 normal: {
-                  color: "#4A9BF7"
+                  color: "#3C64DC"
                 }
               }
             }
@@ -601,7 +601,7 @@ export default {
               barWidth: "50%",
               itemStyle: {
                 normal: {
-                  color: "#4A9BF7"
+                  color: "#3C64DC"
                 }
               }
             }
@@ -661,7 +661,7 @@ export default {
               barWidth: "50%",
               itemStyle: {
                 normal: {
-                  color: "#4A9BF7"
+                  color: "#3C64DC"
                 }
               }
             }
@@ -830,7 +830,7 @@ export default {
           display: inline-block;
           width: 5px;
           height: 14px;
-          background: #4a9bf7;
+          background: #3C64DC;
           margin-right: 5px;
         }
       }
@@ -842,7 +842,7 @@ export default {
   }
 }
 .back {
-  height: calc(100vh - 104px);
+  height: calc(100vh - 90px);
 }
 .box-card {
   height: 100%;

+ 1 - 0
src/views/page/system/users/index.vue

@@ -43,6 +43,7 @@
       </el-form-item>
       <el-form-item>
         <el-button
+          v-if="hasPerm('system:users:add')"
           class="lake-Blue"
           type="primary"
           icon="el-icon-plus"

BIN
src/views/redirect/touxiang.png