zxr 2 年之前
父節點
當前提交
ae968f4e97

+ 6 - 11
src/layout/components/AppMain.vue

@@ -109,7 +109,7 @@ export default {
       open4: false,
       title3: "",
       title4: "",
-      n:0
+      n: 0
     };
   },
   created() {
@@ -121,12 +121,11 @@ export default {
       return this.$store.state.tagsView.cachedViews;
     },
     key() {
-     
       return this.$route.path;
     }
   },
-  mounted(){
-     // window.location.reload()
+  mounted() {
+    // window.location.reload()
     //  this.$forceUpdate();
   },
   methods: {
@@ -135,28 +134,24 @@ export default {
       printTriggerClear().then(res => {
         // console.log(res)
       });
-      
     },
     showfun2() {
-       this.open2 = false;
+      this.open2 = false;
       printTriggerClear().then(res => {
         // console.log(res)
       });
-     
     },
     showfun3() {
       this.open3 = false;
       printTriggerClear().then(res => {
         // console.log(res)
       });
-      
     },
     showfun4() {
-      this.open4=false;
+      this.open4 = false;
       printTriggerClear().then(res => {
         // console.log(res)
       });
-      
     },
     quchulifun() {
       printTriggerClear().then(res => {
@@ -394,7 +389,7 @@ export default {
   // box-shadow:5px 5px 10px black;
   border-bottom: 1px solid #15324e;
 }
- .scroll-container .el-scrollbar__wrap .el-scrollbar__view {
+.scroll-container .el-scrollbar__wrap .el-scrollbar__view {
   background-color: #114a80;
 }
 .app-breadcrumb.el-breadcrumb .no-redirect {

+ 11 - 14
src/layout/components/Sidebar/SidebarItem.vue

@@ -21,7 +21,7 @@
         <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
       </template>
       <sidebar-item
-        v-for="child in item.children" 
+        v-for="child in item.children"
         :key="child.path"
         :is-nest="true"
         :item="child"
@@ -40,9 +40,7 @@ import { isExternal } from "@/utils/validate";
 import Item from "./Item";
 import AppLink from "./Link";
 import FixiOSBug from "./FixiOSBug";
-import {
-  listCamera,
-} from "@/api/monitoring/camera";
+import { listCamera } from "@/api/monitoring/camera";
 export default {
   name: "SidebarItem",
   components: { Item, AppLink },
@@ -65,17 +63,15 @@ export default {
   data() {
     this.onlyOneChild = null;
     return {
-      form:{},
-      cameraList:[]
+      form: {},
+      cameraList: []
     };
   },
-  mounted() {
-    
-  },
+  mounted() {},
   methods: {
-    a(indent){
-      this.form=indent
-       this.$bus.$emit("Click", this.form)
+    a(indent) {
+      this.form = indent;
+      this.$bus.$emit("Click", this.form);
     },
     hasOneShowingChild(children = [], parent) {
       if (!children) {
@@ -106,7 +102,7 @@ export default {
     },
     resolvePath(routePath, routeQuery) {
       // console.log(this.$route.path.lastIndexOf('/'))
-    //  let name=this.$route.path.slice(this.$route.path.lastIndexOf('/')+1,this.$route.path.length);
+      //  let name=this.$route.path.slice(this.$route.path.lastIndexOf('/')+1,this.$route.path.length);
       // console.log(routePath)
       if (isExternal(routePath)) {
         return routePath;
@@ -125,7 +121,8 @@ export default {
 </script>
 <style scoped>
 /* 左侧文字多余部分不隐藏 */
-#app .sidebar-container .el-menu-item, #app .sidebar-container .el-submenu__title{
+#app .sidebar-container .el-menu-item,
+#app .sidebar-container .el-submenu__title {
   text-overflow: clip !important;
 }
 </style>

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

@@ -25,8 +25,8 @@
         :unique-opened="true"
         :active-text-color="settings.theme"
         :collapse-transition="false"
-        :default-openeds="defaultpath"
         mode="vertical"
+        :default-openeds="defaultpath"
         :default-active="$route.path"
       >
         <!-- @click.native="a(route,index)" -->
@@ -53,7 +53,7 @@ export default {
     return {
       routs: [],
       p: null,
-      defaultpath: null,
+      defaultpath: null
     };
   },
   components: { SidebarItem, Logo },
@@ -77,7 +77,7 @@ export default {
     },
     isCollapse() {
       return !this.sidebar.opened;
-    },
+    }
   },
   created() {
     if (this.$route.query.name) {
@@ -91,7 +91,7 @@ export default {
   methods: {
     a(route, index) {},
     sidebarRoutersfun() {
-      this.sidebarRouters.map((item) => {
+      this.sidebarRouters.map(item => {
         // console.log(this.$route.query.name);
         if (item.path == this.$route.query.name) {
           // console.log(item);
@@ -125,13 +125,13 @@ export default {
           .push({
             name: "pt",
             params: {
-              name: "您暂无权限访问",
-            },
+              name: "您暂无权限访问"
+            }
           })
           .catch(() => {});
       }
-    },
-  },
+    }
+  }
 };
 </script>