瀏覽代碼

Merge branch 'master' of http://gogs.renlianiot.com:4000/zmcoding/smart-tool-ui

likang 2 年之前
父節點
當前提交
6bf0e88568
共有 3 個文件被更改,包括 132 次插入20 次删除
  1. 18 2
      src/config/componentsMap.js
  2. 96 0
      src/layout/index2.vue
  3. 18 18
      src/router/index.js

+ 18 - 2
src/config/componentsMap.js

@@ -4,6 +4,8 @@
 export default {
 export default {
     layout: () =>
     layout: () =>
         import ('@/layout'),
         import ('@/layout'),
+    layout2: () =>
+        import ('@/layout/index2'),
     // 权限管理
     // 权限管理
     users: () =>
     users: () =>
         import ('@/views/permission/users'),
         import ('@/views/permission/users'),
@@ -33,6 +35,20 @@ export default {
     //邮箱管理
     //邮箱管理
     email: () =>
     email: () =>
         import ('@/views/system/email'),
         import ('@/views/system/email'),
+    database: () =>
+        import ('@/views/system/database'),
+    attachment: () =>
+        import ('@/views/system/attachments'),
+    loginLog: () =>
+        import ('@/views/system/log/login'),
+    operateLog: () =>
+        import ('@/views/system/log/operate'),
+    sensitiveWord: () =>
+        import ('@/views/system/sensitiveWord'),
+    develop: () =>
+        import ('@/views/system/develop'),
+    generate: () =>
+        import ('@/views/system/generate'),
     // 配置管理
     // 配置管理
     config: () =>
     config: () =>
         import ('@/views/system/config'),
         import ('@/views/system/config'),
@@ -65,6 +81,8 @@ export default {
     //微信公众号补卡管理
     //微信公众号补卡管理
     wechatUpdateCard: () =>
     wechatUpdateCard: () =>
         import ('@/views/wechat/updatecard'),
         import ('@/views/wechat/updatecard'),
+    routeMap: () =>
+        import ('@/views/map/routeMap.vue'),
     //设备管理
     //设备管理
     hydraulic: () =>
     hydraulic: () =>
         import ('@/views/device/hydraulic'),
         import ('@/views/device/hydraulic'),
@@ -105,11 +123,9 @@ export default {
     // 域名记录
     // 域名记录
     domainRecord: () =>
     domainRecord: () =>
         import ('@/views/domain/record'),
         import ('@/views/domain/record'),
-
     //基础配置
     //基础配置
     basicConfig: () =>
     basicConfig: () =>
         import ('@/views/permission/config'),
         import ('@/views/permission/config'),
-
     //类型字典
     //类型字典
     sysDictType: () =>
     sysDictType: () =>
         import ('@/views/system/sysDictType'),
         import ('@/views/system/sysDictType'),

+ 96 - 0
src/layout/index2.vue

@@ -0,0 +1,96 @@
+<template>
+  <div :class="classObj" class="app-wrapper">
+    
+    
+   
+      <app-main />
+     
+   
+  </div>
+</template>
+
+<script>
+import RightPanel from '@/components/RightPanel'
+import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
+import ResizeMixin from './mixin/ResizeHandler'
+import { mapState } from 'vuex'
+
+export default {
+  name: 'Layout',
+  components: {
+    AppMain,
+    Navbar,
+    RightPanel,
+    Settings,
+    Sidebar,
+    TagsView
+  },
+  mixins: [ResizeMixin],
+  computed: {
+    ...mapState({
+      sidebar: state => state.app.sidebar,
+      device: state => state.app.device,
+      showSettings: state => state.settings.showSettings,
+      needTagsView: state => state.settings.tagsView,
+      fixedHeader: state => state.settings.fixedHeader
+    }),
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened,
+        withoutAnimation: this.sidebar.withoutAnimation,
+        mobile: this.device === 'mobile'
+      }
+    }
+  },
+  methods: {
+    handleClickOutside() {
+      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  @import "~@/styles/mixin.scss";
+  @import "~@/styles/variables.scss";
+
+  .app-wrapper {
+    @include clearfix;
+    position: relative;
+    height: 100%;
+    width: 100%;
+
+    &.mobile.openSidebar {
+      position: fixed;
+      top: 0;
+    }
+  }
+
+  .drawer-bg {
+    background: #000;
+    opacity: 0.3;
+    width: 100%;
+    top: 0;
+    height: 100%;
+    position: absolute;
+    z-index: 999;
+  }
+
+  .fixed-header {
+    position: fixed;
+    top: 0;
+    right: 0;
+    z-index: 9;
+    width: calc(100% - #{$sideBarWidth});
+    transition: width 0.28s;
+  }
+
+  .hideSidebar .fixed-header {
+    width: calc(100% - 54px)
+  }
+
+  .mobile .fixed-header {
+    width: 100%;
+  }
+</style>

+ 18 - 18
src/router/index.js

@@ -15,29 +15,29 @@ export const constantRoutes = [
   {
   {
     path: '/',
     path: '/',
     component: Layout,
     component: Layout,
-    redirect: '/dashboard',
+    redirect: '/screen',
     children: [
     children: [
       {
       {
-        path: 'dashboard',
-        component: () => import('@/views/dashboard/index'),
-        name: 'Dashboard',
-        meta: { title: '首页', icon: 'dashboard', affix: true }
-      }
-    ]
-  },
-  {
-    path: '/maphydraulic',
-    component: Layout,
-    redirect: '/maphydraulic',
-    children: [
-      {
-        path: 'maphydraulic',
-        component: () => import('@/views/map/routeMap.vue'),
-        name: 'Maphydraulic',
-        meta: { title: '泵设备分布图', icon: 'el-icon-location', affix: true }
+        path: 'screen',
+        component: () => import('@/views/screen'),
+        name: 'Screen',
+        meta: { title: '监控大屏', icon: 'dashboard', affix: true }
       }
       }
     ]
     ]
   },
   },
+  // {
+  //   path: '/maphydraulic',
+  //   component: Layout,
+  //   redirect: '/maphydraulic',
+  //   children: [
+  //     {
+  //       path: 'maphydraulic',
+  //       component: () => import('@/views/map/routeMap.vue'),
+  //       name: 'Maphydraulic',
+  //       meta: { title: '泵设备分布图', icon: 'el-icon-location', affix: true }
+  //     }
+  //   ]
+  // },
   
   
   // {
   // {
   //   path: '/Wind',
   //   path: '/Wind',