See999 5 years ago
parent
commit
5ffb3cd01d

+ 1 - 1
config/dev.env.js View File

6
 module.exports = {
6
 module.exports = {
7
   NODE_ENV: '"development"',
7
   NODE_ENV: '"development"',
8
   ENV_CONFIG: '"dev"',
8
   ENV_CONFIG: '"dev"',
9
-  BASE_API: '"http://api.mall.test.sgjyun.com"',//'"http://localhost:9529"', // //http://api.mall.test.sgjyun.com http://112.74.16.180:9527
9
+  BASE_API: '"http://localhost:9529"',//'"http://localhost:9529"', // //http://api.mall.test.sgjyun.com http://112.74.16.180:9527
10
 
10
 
11
   
11
   
12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SSO_HOST: '"http://testsso.sgjyun.com"',

+ 2 - 1
config/index.js View File

19
 
19
 
20
     // host: 'xt.test.sgjyun.com',
20
     // host: 'xt.test.sgjyun.com',
21
     // host: 'xt.kuyicloud.com',
21
     // host: 'xt.kuyicloud.com',
22
-    host: 'mall.test.sgjyun.com',
22
+    // host: 'mall.test.sgjyun.com',
23
+    host: 'localhost',
23
     port:9530, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24
     port:9530, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
24
     autoOpenBrowser: true,
25
     autoOpenBrowser: true,
25
     errorOverlay: true,
26
     errorOverlay: true,

+ 9 - 4
package-lock.json View File

4730
         "ansi-regex": {
4730
         "ansi-regex": {
4731
           "version": "2.1.1",
4731
           "version": "2.1.1",
4732
           "bundled": true,
4732
           "bundled": true,
4733
-          "dev": true
4733
+          "dev": true,
4734
+          "optional": true
4734
         },
4735
         },
4735
         "aproba": {
4736
         "aproba": {
4736
           "version": "1.2.0",
4737
           "version": "1.2.0",
5145
         "safe-buffer": {
5146
         "safe-buffer": {
5146
           "version": "5.1.2",
5147
           "version": "5.1.2",
5147
           "bundled": true,
5148
           "bundled": true,
5148
-          "dev": true
5149
+          "dev": true,
5150
+          "optional": true
5149
         },
5151
         },
5150
         "safer-buffer": {
5152
         "safer-buffer": {
5151
           "version": "2.1.2",
5153
           "version": "2.1.2",
5201
           "version": "3.0.1",
5203
           "version": "3.0.1",
5202
           "bundled": true,
5204
           "bundled": true,
5203
           "dev": true,
5205
           "dev": true,
5206
+          "optional": true,
5204
           "requires": {
5207
           "requires": {
5205
             "ansi-regex": "^2.0.0"
5208
             "ansi-regex": "^2.0.0"
5206
           }
5209
           }
5244
         "wrappy": {
5247
         "wrappy": {
5245
           "version": "1.0.2",
5248
           "version": "1.0.2",
5246
           "bundled": true,
5249
           "bundled": true,
5247
-          "dev": true
5250
+          "dev": true,
5251
+          "optional": true
5248
         },
5252
         },
5249
         "yallist": {
5253
         "yallist": {
5250
           "version": "3.0.3",
5254
           "version": "3.0.3",
5251
           "bundled": true,
5255
           "bundled": true,
5252
-          "dev": true
5256
+          "dev": true,
5257
+          "optional": true
5253
         }
5258
         }
5254
       }
5259
       }
5255
     },
5260
     },

BIN
src/assets/logo/logo1.png View File


+ 39 - 39
src/styles/sidebar.scss View File

13
     height: 100%;
13
     height: 100%;
14
     position: fixed;
14
     position: fixed;
15
     font-size: 0px;
15
     font-size: 0px;
16
-    top: 60px;
16
+    // top: 60px;
17
     bottom: 0;
17
     bottom: 0;
18
     left: 0;
18
     left: 0;
19
     z-index: 1001;
19
     z-index: 1001;
47
     }
47
     }
48
     .el-menu {
48
     .el-menu {
49
       border: none;
49
       border: none;
50
-      min-height: 100%;
50
+      // min-height: 100%;
51
       width: 100% !important;
51
       width: 100% !important;
52
     }
52
     }
53
   }
53
   }
54
-  .hideSidebar {
55
-    .sidebar-container {
56
-      width: 36px !important;
57
-    }
58
-    .main-container {
59
-      margin-left: 36px;
60
-    }
61
-    .submenu-title-noDropdown {
62
-      padding-left: 10px !important;
63
-      position: relative;
64
-      .el-tooltip {
65
-        padding: 0 10px !important;
66
-      }
67
-    }
68
-    .el-submenu {
69
-      overflow: hidden;
70
-      &>.el-submenu__title {
71
-        padding-left: 10px !important;
54
+  // .hideSidebar {
55
+  //   .sidebar-container {
56
+  //     width: 36px !important;
57
+  //   }
58
+  //   .main-container {
59
+  //     margin-left: 36px;
60
+  //   }
61
+  //   .submenu-title-noDropdown {
62
+  //     padding-left: 10px !important;
63
+  //     position: relative;
64
+  //     .el-tooltip {
65
+  //       padding: 0 10px !important;
66
+  //     }
67
+  //   }
68
+  //   .el-submenu {
69
+  //     overflow: hidden;
70
+  //     &>.el-submenu__title {
71
+  //       padding-left: 10px !important;
72
         
72
         
73
-        .el-submenu__icon-arrow {
74
-          display: none;
75
-        }
76
-      }
77
-    }
78
-    .el-menu--collapse {
79
-      .el-submenu {
80
-        &>.el-submenu__title {
81
-          &>span {
82
-            height: 0;
83
-            width: 0;
84
-            overflow: hidden;
85
-            visibility: hidden;
86
-            display: inline-block;
87
-          }
88
-        }
89
-      }
90
-    }
91
-  }
73
+  //       .el-submenu__icon-arrow {
74
+  //         display: none;
75
+  //       }
76
+  //     }
77
+  //   }
78
+  //   .el-menu--collapse {
79
+  //     .el-submenu {
80
+  //       &>.el-submenu__title {
81
+  //         &>span {
82
+  //           height: 0;
83
+  //           width: 0;
84
+  //           overflow: hidden;
85
+  //           visibility: hidden;
86
+  //           display: inline-block;
87
+  //         }
88
+  //       }
89
+  //     }
90
+  //   }
91
+  // }
92
   .sidebar-container .nest-menu .el-submenu>.el-submenu__title,
92
   .sidebar-container .nest-menu .el-submenu>.el-submenu__title,
93
   .sidebar-container .el-submenu .el-menu-item {
93
   .sidebar-container .el-submenu .el-menu-item {
94
     // min-width: 180px !important;
94
     // min-width: 180px !important;

+ 11 - 2
src/views/layout/Layout.vue View File

4
       <navbar></navbar>
4
       <navbar></navbar>
5
     
5
     
6
     <div class="Header-container">
6
     <div class="Header-container">
7
-    <sidebar class="sidebar-container"></sidebar>
7
+    <sidebar class="sidebar-container" @callBackIndex="handleIndex"></sidebar>
8
     <div class="main-container">
8
     <div class="main-container">
9
-      <tags-view></tags-view>
9
+      <tags-view :index="index"></tags-view>
10
       <app-main></app-main>
10
       <app-main></app-main>
11
     </div>
11
     </div>
12
    </div>
12
    </div>
42
       }
42
       }
43
     }
43
     }
44
   },
44
   },
45
+  data(){
46
+    return{
47
+      index: 0,
48
+    }
49
+  },
45
   methods: {
50
   methods: {
46
     handleClickOutside() {
51
     handleClickOutside() {
47
       this.$store.dispatch('closeSideBar', { withoutAnimation: false })
52
       this.$store.dispatch('closeSideBar', { withoutAnimation: false })
53
+    },
54
+    handleIndex(data) {
55
+      // console.log({ prop: data });
56
+      this.index = data;
48
     }
57
     }
49
   }
58
   }
50
 }
59
 }

+ 1 - 1
src/views/layout/components/AppMain.vue View File

28
   min-height: calc(100vh - 120px);
28
   min-height: calc(100vh - 120px);
29
   position: relative;
29
   position: relative;
30
   overflow: hidden;
30
   overflow: hidden;
31
-  margin-top: 50px;
31
+  margin-top: 40px;
32
    background: #f3f3f3;
32
    background: #f3f3f3;
33
   
33
   
34
 }
34
 }

+ 3 - 4
src/views/layout/components/Navbar.vue View File

11
         </span>
11
         </span>
12
         <!-- </el-dropdown> -->
12
         <!-- </el-dropdown> -->
13
       </div>
13
       </div>
14
-      <div class="system-nav" v-if="this.$store.getters.xt_user.xt_role_exist">
14
+      <!-- <div class="system-nav" v-if="this.$store.getters.xt_user.xt_role_exist">
15
         <div class="system-nav-menu ">
15
         <div class="system-nav-menu ">
16
           <a :href="XTWebsit()">
16
           <a :href="XTWebsit()">
17
             <span><i class="icon iconfont icon-jiankangshuidi"></i> 血透管理</span>
17
             <span><i class="icon iconfont icon-jiankangshuidi"></i> 血透管理</span>
19
         </div>
19
         </div>
20
         <div class="system-nav-menu" v-if="this.$store.getters.xt_user.cdm_role_exist">
20
         <div class="system-nav-menu" v-if="this.$store.getters.xt_user.cdm_role_exist">
21
           <a :href="CDMWebsit()">
21
           <a :href="CDMWebsit()">
22
-          <!-- <a href=" http://cdm.test.sgjyun.com/"> -->
23
             <span><i class="icon iconfont icon-manbing-xuanzhong"></i> 慢病管理</span>
22
             <span><i class="icon iconfont icon-manbing-xuanzhong"></i> 慢病管理</span>
24
           </a>
23
           </a>
25
         </div>
24
         </div>
38
             <span><i class="icon iconfont icon-suoyou"></i> 应用</span>
37
             <span><i class="icon iconfont icon-suoyou"></i> 应用</span>
39
           </a>
38
           </a>
40
         </div>
39
         </div>
41
-      </div>
40
+      </div> -->
42
 
41
 
43
       <div class="right-menu">
42
       <div class="right-menu">
44
         <el-dropdown class="avatar-container right-menu-item" trigger="click"   @command="handleCommand">
43
         <el-dropdown class="avatar-container right-menu-item" trigger="click"   @command="handleCommand">
168
     width: 162px;
167
     width: 162px;
169
     display: flex;
168
     display: flex;
170
     align-items: center;
169
     align-items: center;
171
-    height: 60px;
170
+    height: 50px;
172
     text-align: center;
171
     text-align: center;
173
     justify-content: center;
172
     justify-content: center;
174
     padding: 10px 0;
173
     padding: 10px 0;

+ 80 - 3
src/views/layout/components/Sidebar/SidebarItem.vue View File

1
 <template>
1
 <template>
2
   <div v-if="!item.hidden&&item.children" class="menu-wrapper">
2
   <div v-if="!item.hidden&&item.children" class="menu-wrapper">
3
 
3
 
4
-      <router-link v-if="hasOneShowingChild(item.children) && !onlyOneChild.children&&!item.alwaysShow" :to="resolvePath(onlyOneChild.path)">
4
+      <!-- <router-link v-if="hasOneShowingChild(item.children) && !onlyOneChild.children&&!item.alwaysShow" :to="resolvePath(onlyOneChild.path)">
5
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
5
         <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
6
           <svg-icon v-if="onlyOneChild.meta&&onlyOneChild.meta.icon" :icon-class="onlyOneChild.meta.icon"></svg-icon>
6
           <svg-icon v-if="onlyOneChild.meta&&onlyOneChild.meta.icon" :icon-class="onlyOneChild.meta.icon"></svg-icon>
7
           <span v-if="onlyOneChild.meta&&onlyOneChild.meta.title" slot="title">{{generateTitle(onlyOneChild.meta.title)}}</span>
7
           <span v-if="onlyOneChild.meta&&onlyOneChild.meta.title" slot="title">{{generateTitle(onlyOneChild.meta.title)}}</span>
24
             </el-menu-item>
24
             </el-menu-item>
25
           </router-link>
25
           </router-link>
26
         </template>
26
         </template>
27
-      </el-submenu>
27
+      </el-submenu> -->
28
+
29
+      <div v-if="hasOneShowingChild(item.children) && !onlyOneChild.children && !item.alwaysShow" @click="onClick(item)">
30
+        <router-link :to="resolvePath(onlyOneChild.path)">
31
+          <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{ 'submenu-title-noDropdown': !isNest }">
32
+            <svg-icon v-if="onlyOneChild.meta && onlyOneChild.meta.icon" :icon-class="onlyOneChild.meta.icon"></svg-icon>
33
+            <span v-if="onlyOneChild.meta && onlyOneChild.meta.title" slot="title">{{ generateTitle(onlyOneChild.meta.title) }}</span>
34
+          </el-menu-item>
35
+        </router-link>
36
+        
37
+      </div>
38
+
39
+        <div v-else @click="onClick(item)">
40
+          <router-link :to="resolvePath(item.children[0].path)">
41
+            <el-menu-item :index="item.path">
42
+              <template slot="title">
43
+                <svg-icon v-if="item.meta && item.meta.icon" :icon-class="item.meta.icon"></svg-icon>
44
+                <span v-if="item.meta && item.meta.title" slot="title">
45
+                  {{ generateTitle(item.meta.title) }}
46
+                </span>
47
+              </template>
48
+            </el-menu-item>
49
+          </router-link>
50
+        </div>
28
 
51
 
29
   </div>
52
   </div>
30
 </template>
53
 </template>
33
 import path from 'path'
56
 import path from 'path'
34
 import { generateTitle } from '@/utils/i18n'
57
 import { generateTitle } from '@/utils/i18n'
35
 
58
 
59
+import { mapGetters } from "vuex";
60
+
36
 export default {
61
 export default {
37
   name: 'SidebarItem',
62
   name: 'SidebarItem',
38
   props: {
63
   props: {
49
       type: String,
74
       type: String,
50
       default: ''
75
       default: ''
51
     }
76
     }
77
+  },
78
+   computed: {
79
+    ...mapGetters(["permission_routers"])
52
   },
80
   },
53
   data() {
81
   data() {
54
     return {
82
     return {
74
     resolvePath(...paths) {
102
     resolvePath(...paths) {
75
       return path.resolve(this.basePath, ...paths)
103
       return path.resolve(this.basePath, ...paths)
76
     },
104
     },
77
-    generateTitle
105
+    generateTitle,
106
+    onClick(index) {
107
+      this.permission_routers.map((item, i) => {
108
+        if (this.isObjectValueEqual(item, index)) {
109
+          this.$emit("a", i);
110
+        }
111
+      });
112
+    },
113
+    isObjectValueEqual(a, b) {
114
+      var aProps = Object.getOwnPropertyNames(a);
115
+      var bProps = Object.getOwnPropertyNames(b);
116
+
117
+      if (aProps.length != bProps.length) {
118
+        return false;
119
+      }
120
+
121
+      for (var i = 0; i < aProps.length; i++) {
122
+        var propName = aProps[i];
123
+
124
+        if (a[propName] !== b[propName]) {
125
+          return false;
126
+        }
127
+      }
128
+
129
+      return true;
130
+    }
78
   }
131
   }
79
 }
132
 }
80
 </script>
133
 </script>
81
 
134
 
135
+<style lang="scss">
136
+.menu-wrapper{
137
+  .el-menu-item{
138
+   background-color:#1F2D3D !important;
139
+   color: #fff !important;
140
+  }
141
+  .el-menu{
142
+    background-color:#1F2D3D !important;
143
+  }
144
+  .el-submenu__title{
145
+    background-color:#1F2D3D !important;
146
+    color: #fff !important;
147
+    height: 32px !important;
148
+    line-height: 32px !important;
149
+  }
150
+  .router-link-exact-active{
151
+    color: rgb(64, 158, 255) !important;
152
+    .el-menu-item{
153
+      color: rgb(64, 158, 255) !important;
154
+    }
155
+  }
156
+}
157
+
158
+</style>

+ 86 - 2
src/views/layout/components/Sidebar/index.vue View File

1
 <template>
1
 <template>
2
   <el-scrollbar wrapClass="scrollbar-wrapper">
2
   <el-scrollbar wrapClass="scrollbar-wrapper">
3
-    <div class="sideColumn">
3
+    <!-- <div class="sideColumn">
4
        <hamburger class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger>      
4
        <hamburger class="hamburger-container" :toggleClick="toggleSideBar" :isActive="sidebar.opened"></hamburger>      
5
     </div>
5
     </div>
6
     <el-menu
6
     <el-menu
12
       background-color="#304156"
12
       background-color="#304156"
13
       text-color="#bfcbd9"
13
       text-color="#bfcbd9"
14
       active-text-color="#409EFF"
14
       active-text-color="#409EFF"
15
+    > -->
16
+    <div class="logo">
17
+      <img src="../../../../assets/logo/logo1.png" alt />
18
+    </div>
19
+    <el-menu
20
+      mode="vertical"
21
+      :unique-opened="uniqueOpened"
22
+      :show-timeout="200"
23
+      :default-active="$route.path"
24
+      background-color="#304156"
25
+      text-color="#bfcbd9"
26
+      active-text-color="#409EFF"
15
     >
27
     >
16
-      <sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path"></sidebar-item>
28
+      <sidebar-item v-for="route in permission_routers" :key="route.name" :item="route" :base-path="route.path" @a="b"></sidebar-item>
29
+      <el-menu-item v-if="this.$store.getters.xt_user.xt_role_exist" index="100">
30
+        <a :href="XTWebsit()">
31
+          <i class="icon iconfont icon-manbing-xuanzhong" style="margin-right:4px"></i>
32
+          <span
33
+            slot="title"
34
+          >血透管理</span>
35
+        </a>
36
+      </el-menu-item>
37
+      <el-menu-item v-if="this.$store.getters.xt_user.cdm_role_exist" index="100">
38
+        <a :href="CDMWebsit()">
39
+          <i class="icon iconfont icon-manbing-xuanzhong" style="margin-right:4px"></i>
40
+          <span
41
+            slot="title"
42
+          >慢病管理</span>
43
+        </a>
44
+      </el-menu-item>
45
+      <el-menu-item v-if="this.$store.getters.xt_user.scrm_role_exist" index="102">
46
+        <a :href="SCRMWebsit()">
47
+          <i class="icon iconfont icon-service_fill" style="margin-right:4px"></i>
48
+          <span
49
+            slot="title"
50
+          >SCRM</span>
51
+        </a>
52
+      </el-menu-item>
17
     </el-menu>
53
     </el-menu>
18
   </el-scrollbar>
54
   </el-scrollbar>
19
 </template>
55
 </template>
35
   data(){
71
   data(){
36
     return{
72
     return{
37
       uniqueOpened:true,
73
       uniqueOpened:true,
74
+      activeClass: 0,
75
+      index: 0
38
     }
76
     }
39
   },
77
   },
40
   methods:{
78
   methods:{
41
     toggleSideBar() {
79
     toggleSideBar() {
42
       this.$store.dispatch("toggleSideBar");
80
       this.$store.dispatch("toggleSideBar");
43
     },
81
     },
82
+    b(index) {
83
+      // this.index = index;
84
+      // this.activeClass = index;
85
+      // console.log('b',index)
86
+      this.$emit("callBackIndex", index);
87
+    },
88
+    XTWebsit() {
89
+      return process.env.XT_HOST
90
+    },
91
+    CDMWebsit() {
92
+      return process.env.CDM_HOST;
93
+    },
94
+    SCRMWebsit() {
95
+      return process.env.SRCM_HOST;
96
+    },
97
+    MircoMallWebsit() {
98
+      return process.env.MIRCO_MALL_HOST;
99
+    },
44
   }
100
   }
45
 };
101
 };
46
 </script>
102
 </script>
83
   }
139
   }
84
 }
140
 }
85
 }
141
 }
142
+.logo {
143
+  width: 100px;
144
+  height: 32px;
145
+  margin: 20px auto;
146
+  img {
147
+    width: 100%;
148
+    height: 100%;
149
+    display: block;
150
+  }
151
+}
86
 
152
 
87
 </style>
153
 </style>
88
 
154
 
155
+<style lang="scss">
156
+.scrollbar-wrapper {
157
+  background-color: #1F2D3D;
158
+  .el-menu{
159
+    background-color: #1F2D3D !important;
160
+  }
161
+  .el-menu-item{
162
+    height: 32px !important;
163
+    line-height: 32px !important;
164
+    background-color: #1F2D3D !important;
165
+    color: #fff !important;
166
+    i{
167
+      color: #fff;
168
+    }
169
+  }
170
+}
171
+</style>
172
+

+ 85 - 18
src/views/layout/components/TagsView.vue View File

1
 <template>
1
 <template>
2
   <div class="tags-view-container">
2
   <div class="tags-view-container">
3
-    <scroll-pane class='tags-view-wrapper' ref='scrollPane'>
3
+    <!-- <scroll-pane class='tags-view-wrapper' ref='scrollPane'>
4
       <router-link 
4
       <router-link 
5
         ref='tag' 
5
         ref='tag' 
6
         class="tags-view-item" 
6
         class="tags-view-item" 
17
       <li @click="closeSelectedTag(selectedTag)">{{$t('tagsView.close')}}</li>
17
       <li @click="closeSelectedTag(selectedTag)">{{$t('tagsView.close')}}</li>
18
       <li @click="closeOthersTags">{{$t('tagsView.closeOthers')}}</li>
18
       <li @click="closeOthersTags">{{$t('tagsView.closeOthers')}}</li>
19
       <li @click="closeAllTags">{{$t('tagsView.closeAll')}}</li>
19
       <li @click="closeAllTags">{{$t('tagsView.closeAll')}}</li>
20
-    </ul>
20
+    </ul> -->
21
+    <div class="tags-view-wrapper">
22
+        <div class="tagsBox">
23
+          <div class="tagsOne"
24
+            v-if="permission_routers[newIndex].meta"
25
+            v-for="(item, i) in permission_routers[newIndex].children"
26
+            :key="i"
27
+          >
28
+            <router-link :to="item.path" v-if="!item.hidden && !item.is_menu">
29
+              <p
30
+                class="newTags"
31
+                :class="activeClass == i ? 'active' : ''"
32
+                @click="onClick(i)"
33
+              >{{ generateTitle(item.meta.title) }}</p>
34
+            </router-link>
35
+          </div>
36
+          <div v-else class="tagsOne">
37
+            <p class="newTags" :class="activeClass == i ? 'active' : ''" @click="onClick(i)">
38
+              {{
39
+              generateTitle(permission_routers[newIndex].children[0].meta.title)
40
+              }}
41
+            </p>
42
+          </div>
43
+        </div>
44
+      </div>
21
   </div>
45
   </div>
22
 </template>
46
 </template>
23
 
47
 
24
 <script>
48
 <script>
25
 import ScrollPane from '@/components/ScrollPane'
49
 import ScrollPane from '@/components/ScrollPane'
26
 import { generateTitle } from '@/utils/i18n'
50
 import { generateTitle } from '@/utils/i18n'
51
+
52
+import { mapGetters } from "vuex";
27
   
53
   
28
 export default {
54
 export default {
29
   components: { ScrollPane },
55
   components: { ScrollPane },
56
+  props: {
57
+    index: Number,
58
+  },
30
   data() {
59
   data() {
31
     return {
60
     return {
32
       visible: false,
61
       visible: false,
33
       top: 0,
62
       top: 0,
34
       left: 0,
63
       left: 0,
35
-      selectedTag: {}
64
+      selectedTag: {},
65
+      newIndex: 0,
66
+      activeClass: 0,
36
     }
67
     }
37
   },
68
   },
38
   computed: {
69
   computed: {
39
-    visitedViews() {
40
-      return this.$store.state.tagsView.visitedViews
41
-    }
70
+    // visitedViews() {
71
+    //   return this.$store.state.tagsView.visitedViews
72
+    // }
73
+    ...mapGetters(["permission_routers"])
42
   },
74
   },
43
   watch: {
75
   watch: {
44
-    $route() {
45
-      this.addViewTags()
46
-      this.moveToCurrentTag()
76
+    // $route() {
77
+    //   this.addViewTags()
78
+    //   this.moveToCurrentTag()
79
+    // },
80
+    // visible(value) {
81
+    //   if (value) {
82
+    //     document.body.addEventListener('click', this.closeMenu)
83
+    //   } else {
84
+    //     document.body.removeEventListener('click', this.closeMenu)
85
+    //   }
86
+    // }
87
+    index(newVal) {
88
+      // console.log(newVal)
89
+      // if (this.newIndex != newVal) {
90
+      //   this.activeClass = 0;
91
+      // }
92
+      this.newIndex = newVal;
47
     },
93
     },
48
-    visible(value) {
49
-      if (value) {
50
-        document.body.addEventListener('click', this.closeMenu)
51
-      } else {
52
-        document.body.removeEventListener('click', this.closeMenu)
53
-      }
54
-    }
94
+  },
95
+  created(){
96
+    this.newIndex = 3
55
   },
97
   },
56
   mounted() {
98
   mounted() {
57
     this.addViewTags()
99
     this.addViewTags()
116
     },
158
     },
117
     closeMenu() {
159
     closeMenu() {
118
       this.visible = false
160
       this.visible = false
119
-    }
161
+    },
162
+    onClick(index) {
163
+      // console.log(index);
164
+      this.activeClass = index;
165
+    },
120
   }
166
   }
121
 }
167
 }
122
 </script>
168
 </script>
125
 .tags-view-container {
171
 .tags-view-container {
126
   height: 60px;
172
   height: 60px;
127
   .tags-view-wrapper {
173
   .tags-view-wrapper {
174
+    width: 100%;
128
     background: #fff;
175
     background: #fff;
129
     height: 50px;
176
     height: 50px;
130
     border-bottom: 1px solid #d8dce5;
177
     border-bottom: 1px solid #d8dce5;
131
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
178
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
132
     position: fixed;
179
     position: fixed;
133
     z-index: 1000;
180
     z-index: 1000;
134
-    top: 60px;
181
+    top: 50px;
135
     overflow-x: scroll;
182
     overflow-x: scroll;
136
     /* 针对缺省样式 (必须的) */
183
     /* 针对缺省样式 (必须的) */
137
       &::-webkit-scrollbar {
184
       &::-webkit-scrollbar {
222
       }
269
       }
223
     }
270
     }
224
   }
271
   }
272
+  .tagsBox {
273
+    display: flex;
274
+    align-items: center;
275
+    height: 100%;
276
+    .tagsOne {
277
+      .newTags {
278
+        border: 1px solid rgba(235, 238, 240, 1);
279
+        border-radius: 2px;
280
+        padding: 8px 12px;
281
+        margin-left: 10px;
282
+        font-size: 14px;
283
+      }
284
+    }
285
+    .active {
286
+      border: 1px solid rgba(64, 158, 255, 1);
287
+      background: rgba(64, 158, 255, 1);
288
+      border-radius: 2px;
289
+      color: #fff;
290
+    }
291
+  }
225
 }
292
 }
226
 </style>
293
 </style>
227
 
294