See999 4 anni fa
parent
commit
d6287d8c51

+ 3 - 3
src/router/modules/stock.js Vedi File

@@ -13,7 +13,7 @@ export default {
13 13
   },
14 14
   children: [
15 15
     {
16
-      path: "/stock/a",
16
+      path: "/stock/",
17 17
       component: Layout,
18 18
       redirect: "noredirect",
19 19
       name: "warehouseReceipt",
@@ -23,7 +23,7 @@ export default {
23 23
       },
24 24
       children: [
25 25
         {
26
-          path: "/stock/a/in",
26
+          path: "/stock/in",
27 27
           component: () => import("@/xt_pages/stock/stockInOrder"),
28 28
           name: "stockInOrder",
29 29
           meta: { title: "stockInOrder", noCache: true }
@@ -49,7 +49,7 @@ export default {
49 49
       ]
50 50
     },
51 51
     {
52
-      path: "/stock/",
52
+      path: "stock/",
53 53
       component: Layout,
54 54
       redirect: "noredirect",
55 55
       name: "warehouseReceiptOther",

+ 1 - 1
src/styles/sidebar.scss Vedi File

@@ -13,7 +13,7 @@
13 13
     height: 100%;
14 14
     position: fixed;
15 15
     font-size: 0px;
16
-    top: 60px;
16
+    // top: 60px;
17 17
     bottom: 0;
18 18
     left: 0;
19 19
     z-index: 1001;

+ 6 - 7
src/views/layout/components/AppMain.vue Vedi File

@@ -10,16 +10,16 @@
10 10
 
11 11
 <script>
12 12
 export default {
13
-  name: 'AppMain',
13
+  name: "AppMain",
14 14
   computed: {
15 15
     cachedViews() {
16
-      return this.$store.state.tagsView.cachedViews
16
+      return this.$store.state.tagsView.cachedViews;
17 17
     },
18 18
     key() {
19
-      return this.$route.fullPath
19
+      return this.$route.fullPath;
20 20
     }
21 21
   }
22
-}
22
+};
23 23
 </script>
24 24
 
25 25
 <style scoped>
@@ -28,9 +28,8 @@ export default {
28 28
   min-height: calc(100vh - 120px);
29 29
   position: relative;
30 30
   overflow: hidden;
31
-  margin-top: 50px;
32
-   background: #f6f8f9;
33
-  
31
+  margin-top: 40px;
32
+  background: #f6f8f9;
34 33
 }
35 34
 </style>
36 35
 

+ 294 - 173
src/views/layout/components/Navbar.vue Vedi File

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div class="top-nav">
3
-    <div class="nav-logo">
3
+    <!-- <div class="nav-logo">
4 4
       <img :src="require(`../../../assets/logo/logo.png`)" alt="">
5 5
     </div>
6 6
     <el-menu class="navbar" mode="horizontal">
@@ -47,119 +47,236 @@
47 47
           <el-dropdown-menu slot="dropdown">
48 48
             <el-dropdown-item command="modifyUserInfoAction">
49 49
               修改个人信息
50
-              <!-- <span @click="modifyUserInfoAction">修改个人信息</span> -->
51 50
             </el-dropdown-item>
52 51
             <el-dropdown-item command="modifyOrgInfoAction">
53 52
               机构信息
54 53
             </el-dropdown-item>
55
-            <!-- <el-dropdown-item divided>
56
-              <span @click="myServe">我的服务</span>
57
-            </el-dropdown-item> -->
58 54
             <el-dropdown-item divided command="logout">
59 55
               {{$t('navbar.logOut')}}
60
-              <!-- <span @click="logout" style="display:block;">{{$t('navbar.logOut')}}</span> -->
56
+              
61 57
             </el-dropdown-item>
62 58
           </el-dropdown-menu>
63 59
         </el-dropdown>
64 60
 
65
-        <!-- <screenfull class="screenfull right-menu-item"></screenfull> -->
66 61
         <modify-user-info-dialog ref="modify_user_info_dialog"></modify-user-info-dialog>
67 62
         <modify-org-info-dialog ref="modify_org_info_dialog"></modify-org-info-dialog>
68 63
 
69 64
       </div>
70
-    </el-menu>
65
+    </el-menu>-->
66
+    <div class="dropdownBox">
67
+      <el-dropdown trigger="click">
68
+        <span class="el-dropdown-link">
69
+          {{this.$store.getters.xt_user.org.org_name}}
70
+          <i class="el-icon-arrow-down el-icon--right"></i>
71
+        </span>
72
+        <el-dropdown-menu slot="dropdown">
73
+          <el-dropdown-item icon="el-icon-plus">黄金糕</el-dropdown-item>
74
+          <el-dropdown-item icon="el-icon-circle-plus">狮子头</el-dropdown-item>
75
+          <el-dropdown-item icon="el-icon-circle-plus-outline">螺蛳粉</el-dropdown-item>
76
+          <el-dropdown-item icon="el-icon-check">双皮奶</el-dropdown-item>
77
+          <el-dropdown-item icon="el-icon-circle-check">蚵仔煎</el-dropdown-item>
78
+        </el-dropdown-menu>
79
+      </el-dropdown>
80
+    </div>
81
+    <div class="navRight">
82
+      <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
83
+      <div style="color: #b2b2b3;">通知中心</div>
84
+      <div class="right-menu">
85
+        <el-dropdown
86
+          class="avatar-container right-menu-item"
87
+          trigger="click"
88
+          @command="handleCommand"
89
+        >
90
+          <div class="avatar-wrapper">
91
+            <img class="user-avatar" :src="avater" />
92
+            <span class="user-title">{{ this.$store.getters.xt_user.user.user_name }}</span>
93
+            <i class="el-icon-caret-bottom"></i>
94
+          </div>
95
+          <el-dropdown-menu slot="dropdown">
96
+            <el-dropdown-item command="modifyUserInfoAction">修改个人信息</el-dropdown-item>
97
+            <el-dropdown-item command="modifyOrgInfoAction">机构信息</el-dropdown-item>
98
+            <el-dropdown-item divided command="logout">{{$t('navbar.logOut')}}</el-dropdown-item>
99
+          </el-dropdown-menu>
100
+        </el-dropdown>
101
+
102
+        <modify-user-info-dialog ref="modify_user_info_dialog"></modify-user-info-dialog>
103
+        <modify-org-info-dialog ref="modify_org_info_dialog"></modify-org-info-dialog>
104
+      </div>
105
+      <div>
106
+        <i class="el-icon-question"></i>
107
+        <span>帮助中心</span>
108
+      </div>
109
+    </div>
71 110
   </div>
72 111
 </template>
73 112
 
74 113
 <script>
75
-  import { mapGetters } from 'vuex'
76
-  // import Breadcrumb from "@/components/Breadcrumb";
77
-  // import Hamburger from "@/components/Hamburger";
78
-  import Screenfull from '@/components/Screenfull'
79
-  import ModifyUserInfoDialog from '@/xt_pages/home/modify_user_info_dialog'
80
-  import ModifyOrgInfoDialog from '@/xt_pages/home/modifyOrgInfoDialog'
81
-
82
-  export default {
83
-    data() {
84
-      return {
85
-        // scrm_role_exist: $store.getters.xt_user.scrm_role_exist
114
+import { mapGetters } from "vuex";
115
+// import Breadcrumb from "@/components/Breadcrumb";
116
+// import Hamburger from "@/components/Hamburger";
117
+import Screenfull from "@/components/Screenfull";
118
+import ModifyUserInfoDialog from "@/xt_pages/home/modify_user_info_dialog";
119
+import ModifyOrgInfoDialog from "@/xt_pages/home/modifyOrgInfoDialog";
120
+
121
+export default {
122
+  data() {
123
+    return {
124
+      // scrm_role_exist: $store.getters.xt_user.scrm_role_exist
125
+    };
126
+  },
127
+  components: {
128
+    // Breadcrumb,
129
+    // Hamburger,
130
+    Screenfull,
131
+    ModifyUserInfoDialog,
132
+    ModifyOrgInfoDialog
133
+  },
134
+  computed: {
135
+    ...mapGetters(["sidebar"]),
136
+    avater: function() {
137
+      var avatar = this.$store.getters.xt_user.user.avatar;
138
+      return avatar.length > 0
139
+        ? avatar
140
+        : require("../../../assets/home/userData.png");
141
+    }
142
+  },
143
+  methods: {
144
+    // toggleSideBar() {
145
+    //   this.$store.dispatch("toggleSideBar");
146
+    // },
147
+    handleCommand(command) {
148
+      switch (command) {
149
+        case "modifyUserInfoAction":
150
+          this.modifyUserInfoAction();
151
+          break;
152
+        case "modifyOrgInfoAction":
153
+          this.modifyOrgInfoAction();
154
+          break;
155
+        case "logout":
156
+          this.logout();
157
+          break;
86 158
       }
87 159
     },
88
-    components: {
89
-      // Breadcrumb,
90
-      // Hamburger,
91
-      Screenfull,
92
-      ModifyUserInfoDialog,
93
-      ModifyOrgInfoDialog,
160
+    logout() {
161
+      this.$store.dispatch("FrontendLogout");
162
+      window.location.href = process.env.BASE_API + "/logout";
94 163
     },
95
-    computed: {
96
-      ...mapGetters(['sidebar']),
97
-      avater: function() {
98
-        var avatar = this.$store.getters.xt_user.user.avatar
99
-        return avatar.length > 0
100
-          ? avatar
101
-          : require('../../../assets/home/userData.png')
102
-      }
164
+    modifyOrgInfoAction() {
165
+      // this.$refs.modify_org_info_dialog.show()
166
+      this.$router.push("/orginfo");
167
+      return false;
103 168
     },
104
-    methods: {
105
-      // toggleSideBar() {
106
-      //   this.$store.dispatch("toggleSideBar");
107
-      // },
108
-      handleCommand(command){
109
-        switch (command) {
110
-          case 'modifyUserInfoAction':
111
-            this.modifyUserInfoAction();
112
-            break;
113
-          case 'modifyOrgInfoAction':
114
-            this.modifyOrgInfoAction();
115
-            break;
116
-          case 'logout':
117
-            this.logout();
118
-            break;
119
-        }
120
-      },
121
-      logout() {
122
-        this.$store.dispatch('FrontendLogout')
123
-        window.location.href = process.env.BASE_API + '/logout'
124
-      },
125
-      modifyOrgInfoAction() {
126
-        // this.$refs.modify_org_info_dialog.show()
127
-        this.$router.push('/orginfo')
128
-        return false
129
-      },
130
-      modifyUserInfoAction() {
131
-        this.$refs.modify_user_info_dialog.show()
132
-      },
133
-      myServe() {
134
-        this.$router.push('/service')
135
-        return false
136
-      },
137
-      SCRMWebsit() {
138
-        return process.env.SRCM_HOST
139
-      },
140
-      MircoMallWebsit() {
141
-        return process.env.MIRCO_MALL_HOST
142
-      },
143
-      CDMWebsit() {
144
-        return process.env.CDM_HOST
145
-      },
146
-      APPManageWebsit() {
147
-        return process.env.SSO_HOST + '/org/admin/apps?org=' + this.$store.getters.xt_user.org_id
148
-      }
169
+    modifyUserInfoAction() {
170
+      this.$refs.modify_user_info_dialog.show();
171
+    },
172
+    myServe() {
173
+      this.$router.push("/service");
174
+      return false;
175
+    },
176
+    SCRMWebsit() {
177
+      return process.env.SRCM_HOST;
149 178
     },
150
-    created() {
179
+    MircoMallWebsit() {
180
+      return process.env.MIRCO_MALL_HOST;
181
+    },
182
+    CDMWebsit() {
183
+      return process.env.CDM_HOST;
184
+    },
185
+    APPManageWebsit() {
186
+      return (
187
+        process.env.SSO_HOST +
188
+        "/org/admin/apps?org=" +
189
+        this.$store.getters.xt_user.org_id
190
+      );
151 191
     }
152
-  }
192
+  },
193
+  created() {}
194
+};
153 195
 </script>
154 196
 
155 197
 <style rel="stylesheet/scss" lang="scss" scoped>
156 198
 .top-nav {
157
-  background: #409eff;
199
+  background: #fff;
158 200
   position: fixed;
159 201
   top: 0;
160
-  left: 0;
202
+  left: 150px;
161 203
   right: 0;
162 204
   z-index: 1000;
205
+  height: 50px;
206
+  display: flex;
207
+  align-items: center;
208
+  justify-content: space-between;
209
+  .dropdownBox {
210
+    margin-left: 10px;
211
+  }
212
+  .navRight {
213
+    display: flex;
214
+    align-items: center;
215
+    justify-content: space-between;
216
+    width: 540px;
217
+    margin-right: 10px;
218
+    .right-menu {
219
+      float: right;
220
+      height: 100%;
221
+      z-index: 99999;
222
+      color: #606266;
223
+      & :focus {
224
+        outline: none;
225
+      }
226
+
227
+      .right-menu-item {
228
+        display: inline-block;
229
+        margin: 0 8px;
230
+
231
+        .iconfont {
232
+          font-size: 18px;
233
+        }
234
+      }
235
+      .screenfull {
236
+        height: 20px;
237
+      }
238
+
239
+      .international {
240
+        vertical-align: top;
241
+      }
242
+
243
+      .theme-switch {
244
+        vertical-align: 15px;
245
+      }
246
+
247
+      .avatar-container {
248
+        margin-right: 10px;
249
+
250
+        .avatar-wrapper {
251
+          cursor: pointer;
252
+          margin-top: 3px;
253
+          display: flex;
254
+          align-items: center;
255
+          justify-content: center;
256
+
257
+          .user-avatar {
258
+            width: 40px;
259
+            height: 40px;
260
+            border-radius: 50%;
261
+            object-fit: cover;
262
+            object-position: center;
263
+          }
264
+
265
+          .user-title {
266
+            margin: 0 8px;
267
+            font-size: 14px;
268
+            color: #b2b2b3;
269
+          }
270
+
271
+          .el-icon-caret-bottom {
272
+            font-size: 12px;
273
+            color: #b2b2b3;
274
+          }
275
+        }
276
+      }
277
+    }
278
+  }
279
+
163 280
   .nav-logo {
164 281
     width: 162px;
165 282
     display: flex;
@@ -171,11 +288,10 @@
171 288
     box-sizing: border-box;
172 289
     float: left;
173 290
 
174
-  img {
175
-    display: inline-block;
176
-    width: 100px;
177
-  }
178
-
291
+    img {
292
+      display: inline-block;
293
+      width: 100px;
294
+    }
179 295
   }
180 296
   .navbar {
181 297
     border-radius: 0px !important;
@@ -188,102 +304,96 @@
188 304
     background: #409eff;
189 305
     float: left;
190 306
 
191
-  .breadcrumb-container {
192
-    float: left;
193
-  }
194
-
195
-  .errLog-container {
196
-    display: inline-block;
197
-    vertical-align: top;
198
-  }
307
+    .breadcrumb-container {
308
+      float: left;
309
+    }
199 310
 
200
-  .right-menu {
201
-    float: right;
202
-    height: 100%;
203
-    z-index: 99999;
311
+    .errLog-container {
312
+      display: inline-block;
313
+      vertical-align: top;
314
+    }
204 315
 
205
-  &
206
-  :focus {
207
-    outline: none;
208
-  }
316
+    .right-menu {
317
+      float: right;
318
+      height: 100%;
319
+      z-index: 99999;
209 320
 
210
-  .right-menu-item {
211
-    display: inline-block;
212
-    margin: 0 8px;
321
+      & :focus {
322
+        outline: none;
323
+      }
213 324
 
214
-  .iconfont {
215
-    font-size: 18px;
216
-  }
325
+      .right-menu-item {
326
+        display: inline-block;
327
+        margin: 0 8px;
217 328
 
218
-  }
219
-  .screenfull {
220
-    height: 20px;
221
-  }
329
+        .iconfont {
330
+          font-size: 18px;
331
+        }
332
+      }
333
+      .screenfull {
334
+        height: 20px;
335
+      }
222 336
 
223
-  .international {
224
-    vertical-align: top;
225
-  }
337
+      .international {
338
+        vertical-align: top;
339
+      }
226 340
 
227
-  .theme-switch {
228
-    vertical-align: 15px;
229
-  }
341
+      .theme-switch {
342
+        vertical-align: 15px;
343
+      }
230 344
 
231
-  .avatar-container {
232
-    margin-right: 10px;
345
+      .avatar-container {
346
+        margin-right: 10px;
233 347
 
234
-  .avatar-wrapper {
235
-    cursor: pointer;
236
-    margin-top: 3px;
237
-    display: flex;
238
-    align-items: center;
239
-    justify-content: center;
348
+        .avatar-wrapper {
349
+          cursor: pointer;
350
+          margin-top: 3px;
351
+          display: flex;
352
+          align-items: center;
353
+          justify-content: center;
240 354
 
241
-  .user-avatar {
242
-    width: 40px;
243
-    height: 40px;
244
-    border-radius: 50%;
245
-    object-fit: cover;
246
-    object-position: center;
247
-  }
355
+          .user-avatar {
356
+            width: 40px;
357
+            height: 40px;
358
+            border-radius: 50%;
359
+            object-fit: cover;
360
+            object-position: center;
361
+          }
248 362
 
249
-  .user-title {
250
-    margin: 0 8px;
251
-    font-size: 14px;
252
-    color: #fff;
253
-  }
363
+          .user-title {
364
+            margin: 0 8px;
365
+            font-size: 14px;
366
+            color: #fff;
367
+          }
254 368
 
255
-  .el-icon-caret-bottom {
256
-    font-size: 12px;
257
-    color: #fff;
258
-  }
259
-
260
-  }
261
-  }
262
-  }
369
+          .el-icon-caret-bottom {
370
+            font-size: 12px;
371
+            color: #fff;
372
+          }
373
+        }
374
+      }
375
+    }
263 376
   }
264 377
   .system-nav {
378
+    .system-nav-menu {
379
+      float: left;
380
+      height: 60px;
381
+      line-height: 60px;
382
+      padding: 0 25px;
265 383
 
266
-  .system-nav-menu {
267
-    float: left;
268
-    height: 60px;
269
-    line-height: 60px;
270
-    padding: 0 25px;
271
-
272
-  a {
273
-    font-size: 15px;
274
-
275
-  .iconfont {
276
-    font-size: 18px;
277
-  }
278
-
279
-  }
280
-  }
281
-  .active {
282
-    background: #3090eb;
283
-    border-left: 1px #5fabf7 solid;
284
-    border-right: 1px #5fabf7 solid;
285
-  }
384
+      a {
385
+        font-size: 15px;
286 386
 
387
+        .iconfont {
388
+          font-size: 18px;
389
+        }
390
+      }
391
+    }
392
+    .active {
393
+      background: #3090eb;
394
+      border-left: 1px #5fabf7 solid;
395
+      border-right: 1px #5fabf7 solid;
396
+    }
287 397
   }
288 398
   .el-menu::after,
289 399
   .el-menu::before {
@@ -293,13 +403,24 @@
293 403
     top: 0;
294 404
     left: 0;
295 405
   }
406
+}
407
+.el-dropdown-menu {
408
+  z-index: 9999 !important;
409
+}
296 410
 
297
-  }
298
-  .el-dropdown-menu {
299
-    z-index: 9999 !important;
300
-  }
411
+.v-modal {
412
+  z-index: 9999 !important;
413
+}
414
+</style>
301 415
 
302
-  .v-modal {
303
-    z-index: 9999 !important;
416
+<style lang="scss">
417
+.navRight {
418
+  .el-input {
419
+    width: 250px;
420
+  }
421
+  .el-input__inner {
422
+    border-radius: 30px;
423
+    background: #f5f7fa;
304 424
   }
425
+}
305 426
 </style>

+ 24 - 37
src/views/layout/components/Sidebar/SidebarItem.vue Vedi File

@@ -20,26 +20,20 @@
20 20
           <span
21 21
             v-if="onlyOneChild.meta && onlyOneChild.meta.title"
22 22
             slot="title"
23
-            >{{ generateTitle(onlyOneChild.meta.title) }}</span
24
-          >
23
+          >{{ generateTitle(onlyOneChild.meta.title) }}</span>
25 24
         </el-menu-item>
26 25
       </router-link>
27 26
     </div>
28 27
 
29 28
     <div v-else>
30
-      <el-submenu
31
-        v-if="item.meta.isChild"
32
-        id="mySubmenu"
33
-        :index="item.name || item.path"
34
-      >
29
+      <el-submenu v-if="item.meta.isChild" id="mySubmenu" :index="item.name || item.path">
35 30
         <template slot="title">
36
-          <svg-icon
37
-            v-if="item.meta && item.meta.icon"
38
-            :icon-class="item.meta.icon"
39
-          ></svg-icon>
40
-          <span v-if="item.meta && item.meta.title" slot="title">{{
31
+          <svg-icon v-if="item.meta && item.meta.icon" :icon-class="item.meta.icon"></svg-icon>
32
+          <span v-if="item.meta && item.meta.title" slot="title">
33
+            {{
41 34
             generateTitle(item.meta.title)
42
-          }}</span>
35
+            }}
36
+          </span>
43 37
         </template>
44 38
         <template v-for="child in item.children" v-if="!child.hidden">
45 39
           <router-link
@@ -48,29 +42,23 @@
48 42
             :key="child.name"
49 43
           >
50 44
             <el-menu-item :index="resolvePath(child.path)">
51
-              <svg-icon
52
-                v-if="child.meta && child.meta.icon"
53
-                :icon-class="child.meta.icon"
54
-              ></svg-icon>
55
-              <span v-if="child.meta && child.meta.title" slot="title">{{
45
+              <svg-icon v-if="child.meta && child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
46
+              <span v-if="child.meta && child.meta.title" slot="title">
47
+                {{
56 48
                 generateTitle(child.meta.title)
57
-              }}</span>
49
+                }}
50
+              </span>
58 51
             </el-menu-item>
59 52
           </router-link>
60 53
 
61
-          <router-link
62
-            v-else
63
-            :to="resolvePath(child.children[0].path)"
64
-            :key="child.name"
65
-          >
54
+          <router-link v-else :to="child.children[0].path" :key="child.name">
66 55
             <el-menu-item :index="resolvePath(child.path)">
67
-              <svg-icon
68
-                v-if="child.meta && child.meta.icon"
69
-                :icon-class="child.meta.icon"
70
-              ></svg-icon>
71
-              <span v-if="child.meta && child.meta.title" slot="title">{{
56
+              <svg-icon v-if="child.meta && child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
57
+              <span v-if="child.meta && child.meta.title" slot="title">
58
+                {{
72 59
                 generateTitle(child.meta.title)
73
-              }}</span>
60
+                }}
61
+              </span>
74 62
             </el-menu-item>
75 63
           </router-link>
76 64
         </template>
@@ -79,13 +67,12 @@
79 67
         <router-link :to="resolvePath(item.children[0].path)">
80 68
           <el-menu-item :index="item.name || item.path">
81 69
             <template slot="title">
82
-              <svg-icon
83
-                v-if="item.meta && item.meta.icon"
84
-                :icon-class="item.meta.icon"
85
-              ></svg-icon>
86
-              <span v-if="item.meta && item.meta.title" slot="title">{{
70
+              <svg-icon v-if="item.meta && item.meta.icon" :icon-class="item.meta.icon"></svg-icon>
71
+              <span v-if="item.meta && item.meta.title" slot="title">
72
+                {{
87 73
                 generateTitle(item.meta.title)
88
-              }}</span>
74
+                }}
75
+              </span>
89 76
             </template>
90 77
 
91 78
             <!-- <template v-for="child in item.children" v-if="!child.hidden">
@@ -109,7 +96,7 @@
109 96
             }}</span>
110 97
           </el-menu-item>
111 98
         </router-link>
112
-      </template> -->
99
+            </template>-->
113 100
           </el-menu-item>
114 101
         </router-link>
115 102
       </div>

+ 24 - 13
src/views/layout/components/Sidebar/index.vue Vedi File

@@ -6,7 +6,7 @@
6 6
         :toggleClick="toggleSideBar"
7 7
         :isActive="sidebar.opened"
8 8
       ></hamburger>
9
-    </div> -->
9
+    </div>-->
10 10
     <!-- <el-menu
11 11
       mode="vertical"
12 12
       :unique-opened="uniqueOpened"
@@ -16,7 +16,10 @@
16 16
       background-color="#304156"
17 17
       text-color="#bfcbd9"
18 18
       active-text-color="#409EFF"
19
-    > -->
19
+    >-->
20
+    <div class="logo">
21
+      <img src="/static/img/logo.8dbb9fd.png" alt />
22
+    </div>
20 23
     <el-menu
21 24
       mode="vertical"
22 25
       :unique-opened="uniqueOpened"
@@ -70,7 +73,7 @@
70 73
         </div>
71 74
       </div>
72 75
     </div>
73
-  </div> -->
76
+  </div>-->
74 77
 </template>
75 78
 
76 79
 <script>
@@ -124,16 +127,7 @@ export default {
124 127
   height: 100%;
125 128
   overflow-y: auto;
126 129
   background: #304155;
127
-  .logo {
128
-    width: 100px;
129
-    height: 32px;
130
-    margin: 20px auto 0;
131
-    img {
132
-      width: 100%;
133
-      height: 100%;
134
-      display: block;
135
-    }
136
-  }
130
+
137 131
   .navBox {
138 132
     display: flex;
139 133
     flex-wrap: wrap;
@@ -160,6 +154,17 @@ export default {
160 154
   }
161 155
 }
162 156
 
157
+.logo {
158
+  width: 100px;
159
+  height: 32px;
160
+  margin: 20px auto 0;
161
+  img {
162
+    width: 100%;
163
+    height: 100%;
164
+    display: block;
165
+  }
166
+}
167
+
163 168
 .sideColumn {
164 169
   background-color: rgb(48, 65, 86);
165 170
   .head {
@@ -196,3 +201,9 @@ export default {
196 201
   }
197 202
 }
198 203
 </style>
204
+
205
+<style lang="scss">
206
+.scrollbar-wrapper {
207
+  background-color: rgb(48, 65, 86);
208
+}
209
+</style>

+ 5 - 11
src/views/layout/components/TagsView.vue Vedi File

@@ -25,7 +25,7 @@
25 25
       <li @click="closeSelectedTag(selectedTag)">{{ $t("tagsView.close") }}</li>
26 26
       <li @click="closeOthersTags">{{ $t("tagsView.closeOthers") }}</li>
27 27
       <li @click="closeAllTags">{{ $t("tagsView.closeAll") }}</li>
28
-    </ul> -->
28
+    </ul>-->
29 29
     <div class="tags-view-wrapper">
30 30
       <div class="tagsBox">
31 31
         <div
@@ -39,19 +39,13 @@
39 39
               class="newTags"
40 40
               :class="activeClass == i ? 'active' : ''"
41 41
               @click="onClick(i)"
42
-            >
43
-              {{ generateTitle(item.meta.title) }}
44
-            </p>
42
+            >{{ generateTitle(item.meta.title) }}</p>
45 43
           </router-link>
46 44
         </div>
47 45
         <div v-else class="tagsOne">
48
-          <p
49
-            class="newTags"
50
-            :class="activeClass == i ? 'active' : ''"
51
-            @click="onClick(i)"
52
-          >
46
+          <p class="newTags" :class="activeClass == i ? 'active' : ''" @click="onClick(i)">
53 47
             {{
54
-              generateTitle(permission_routers[newIndex].children[0].meta.title)
48
+            generateTitle(permission_routers[newIndex].children[0].meta.title)
55 49
             }}
56 50
           </p>
57 51
         </div>
@@ -185,7 +179,7 @@ export default {
185 179
     box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04);
186 180
     position: fixed;
187 181
     z-index: 1000;
188
-    top: 60px;
182
+    top: 50px;
189 183
     overflow-x: scroll;
190 184
     white-space: normal;
191 185
     // right: 0;

+ 202 - 162
src/xt_pages/role/components/AdminInfoForm.vue Vedi File

@@ -1,47 +1,71 @@
1 1
 <template>
2
-    <el-dialog :title="formTitle" :visible.sync="dialogFormVisible">
3
-        <el-form :model="form" ref="form" :rules="rules" label-width="60px">
4
-                <el-form-item label="账号 : " prop="mobile">
5
-                    <el-input v-model="form.mobile" placeholder="用户手机号" :disabled="form.id !==  0"></el-input>
6
-                </el-form-item>
2
+  <el-dialog :title="formTitle" :visible.sync="dialogFormVisible">
3
+    <el-form :model="form" ref="form" :rules="rules" label-width="60px">
4
+      <el-form-item label="账号 : " prop="mobile">
5
+        <el-input v-model="form.mobile" placeholder="用户手机号" :disabled="form.id !==  0"></el-input>
6
+      </el-form-item>
7 7
 
8
-                <el-form-item label="姓名 : " prop="name">
9
-                    <el-input v-model="form.name" placeholder="用户姓名"></el-input>
10
-                </el-form-item>
8
+      <el-form-item label="姓名 : " prop="name">
9
+        <el-input v-model="form.name" placeholder="用户姓名"></el-input>
10
+      </el-form-item>
11 11
 
12
-                <el-form-item label="职称 : ">
13
-                    <el-select v-model="form.user_type" placeholder="用户类型">
14
-                        <el-option v-for="item in user_types" :label="item.name" :value="item.index" :key="item.index"></el-option>
15
-                    </el-select>
12
+      <el-form-item label="角色 : " prop="role">
13
+        <el-checkbox-group v-model="checkList">
14
+          <el-checkbox label="复选框 A"></el-checkbox>
15
+          <el-checkbox label="复选框 B"></el-checkbox>
16
+          <el-checkbox label="复选框 C"></el-checkbox>
17
+          <el-checkbox label="复选框 C"></el-checkbox>
18
+          <el-checkbox label="复选框 C"></el-checkbox>
19
+          <el-checkbox label="禁用"></el-checkbox>
20
+          <el-checkbox label="选中且禁用"></el-checkbox>
21
+        </el-checkbox-group>
22
+      </el-form-item>
16 23
 
17
-                    <el-select v-model="form.user_title" placeholder="用户职称">
18
-                        <el-option v-for="item in user_titles" :label="item.name" :value="item.index" :key="item.index"></el-option>
19
-                    </el-select>
20
-                </el-form-item>
24
+      <el-form-item label="职称 : ">
25
+        <el-select v-model="form.user_type" placeholder="用户类型">
26
+          <el-option
27
+            v-for="item in user_types"
28
+            :label="item.name"
29
+            :value="item.index"
30
+            :key="item.index"
31
+          ></el-option>
32
+        </el-select>
21 33
 
22
-                <el-form-item label="角色 : " prop="role">
23
-                    <el-select v-model="form.role" placeholder="角色">
24
-                        <el-option v-for="(item,index) in roles" :key="index" :label="item.name" :value="item.id"></el-option>
25
-                    </el-select>
26
-                </el-form-item>
34
+        <el-select v-model="form.user_title" placeholder="用户职称">
35
+          <el-option
36
+            v-for="item in user_titles"
37
+            :label="item.name"
38
+            :value="item.index"
39
+            :key="item.index"
40
+          ></el-option>
41
+        </el-select>
42
+      </el-form-item>
27 43
 
28
-                <el-form-item label="介绍 : ">
29
-                    <Tinymce :height=400 menubar='' ref="editor" v-model="form.intro" :show_upload_img="false" />
30
-                </el-form-item>
44
+      <el-form-item label="职位 : " prop="name">
45
+        <el-input v-model="form.name" placeholder="输入职位"></el-input>
46
+      </el-form-item>
31 47
 
32
-            </el-form>
33
-        <div slot="footer" class="dialog-footer">
34
-            <el-button @click="dialogFormVisible = false">取 消</el-button>
35
-            <el-button type="primary" @click="submitAction">保 存</el-button>
36
-        </div>
37
-    </el-dialog>
48
+      <el-form-item label="介绍 : ">
49
+        <Tinymce :height="400" menubar ref="editor" v-model="form.intro" :show_upload_img="false" />
50
+      </el-form-item>
51
+    </el-form>
52
+    <div slot="footer" class="dialog-footer">
53
+      <el-button @click="dialogFormVisible = false">取 消</el-button>
54
+      <el-button type="primary" @click="submitAction">保 存</el-button>
55
+    </div>
56
+  </el-dialog>
38 57
 </template>
39 58
 
40 59
 <script>
41
-import Tinymce from '@/components/Tinymce'
42
-import { getAddAdminInitData, addAdmin, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
60
+import Tinymce from "@/components/Tinymce";
61
+import {
62
+  getAddAdminInitData,
63
+  addAdmin,
64
+  getModifyAdminInitData,
65
+  modifyAdmin
66
+} from "@/api/role/admin";
43 67
 export default {
44
-  name: 'AdminInfoForm',
68
+  name: "AdminInfoForm",
45 69
   components: {
46 70
     Tinymce
47 71
   },
@@ -54,180 +78,196 @@ export default {
54 78
   data() {
55 79
     var checkMobile = (rule, value, callback) => {
56 80
       if (!value || value.length == 0) {
57
-        return callback(new Error('手机号不能为空'))
81
+        return callback(new Error("手机号不能为空"));
58 82
       }
59 83
       if (/^1\d{10}$/.test(value) == false) {
60
-        return callback(new Error('手机号格式错误'))
84
+        return callback(new Error("手机号格式错误"));
61 85
       } else {
62
-        callback()
86
+        callback();
63 87
       }
64
-    }
88
+    };
65 89
     var checkName = (rule, value, callback) => {
66 90
       if (!value || value.length == 0) {
67
-        return callback(new Error('姓名不能为空'))
91
+        return callback(new Error("姓名不能为空"));
68 92
       } else {
69
-        callback()
93
+        callback();
70 94
       }
71
-    }
95
+    };
72 96
     return {
97
+      checkList: [],
73 98
       admin_id: 0,
74 99
       dialogFormVisible: false,
75 100
 
76 101
       user_types: [
77
-        { index: 2, name: '医生' },
78
-        { index: 3, name: '护士' }
102
+        { index: 2, name: "医生" },
103
+        { index: 3, name: "护士" }
79 104
       ],
80 105
       user_titles: [
81
-        { index: 1, name: '医士' },
82
-        { index: 2, name: '医师' },
83
-        { index: 3, name: '住院医师' },
84
-        { index: 4, name: '主治医师' },
85
-        { index: 5, name: '副主任医师' },
86
-        { index: 6, name: '主任医师' },
87
-        { index: 7, name: '护士' },
88
-        { index: 8, name: '护师' },
89
-        { index: 9, name: '主管护师' },
90
-        { index: 10, name: '副主任护师' },
91
-        { index: 11, name: '主任护师' },
92
-        { index: 12, name: '运营专员' },
93
-        { index: 13, name: '运营主管' }
106
+        { index: 1, name: "医士" },
107
+        { index: 2, name: "医师" },
108
+        { index: 3, name: "住院医师" },
109
+        { index: 4, name: "主治医师" },
110
+        { index: 5, name: "副主任医师" },
111
+        { index: 6, name: "主任医师" },
112
+        { index: 7, name: "护士" },
113
+        { index: 8, name: "护师" },
114
+        { index: 9, name: "主管护师" },
115
+        { index: 10, name: "副主任护师" },
116
+        { index: 11, name: "主任护师" },
117
+        { index: 12, name: "运营专员" },
118
+        { index: 13, name: "运营主管" }
94 119
       ],
95 120
       roles: [], // [{id, name, intro, status}]
96 121
       loading: true,
97
-      qntoken: '',
98
-      formTitle: '',
122
+      qntoken: "",
123
+      formTitle: "",
99 124
       form: {
100 125
         id: 0,
101
-        mobile: '',
102
-        name: '',
103
-        user_type: '',
104
-        user_title: '',
105
-        role: '', // 其实应该是 int 类型
106
-        intro: ''
126
+        mobile: "",
127
+        name: "",
128
+        user_type: "",
129
+        user_title: "",
130
+        role: "", // 其实应该是 int 类型
131
+        intro: ""
107 132
       },
108 133
       rules: {
109
-        mobile: [
110
-          { required: true,validator: checkMobile, trigger: 'blur' }
111
-        ],
112
-        name: [
113
-          {required: true, validator: checkName, trigger: 'blur' }
114
-        ],
115
-        role: [
116
-          { required: true, message: '请选择角色', trigger: 'change' }
117
-        ],
134
+        mobile: [{ required: true, validator: checkMobile, trigger: "blur" }],
135
+        name: [{ required: true, validator: checkName, trigger: "blur" }],
136
+        role: [{ required: true, message: "请选择角色", trigger: "change" }]
118 137
       }
119
-    }
138
+    };
120 139
   },
121 140
   methods: {
122 141
     open: function(adminId) {
123
-      this.admin_id = adminId
142
+      this.admin_id = adminId;
124 143
       if (this.admin_id < 0) {
125
-        this.$message.error('参数错误')
126
-        this.loading = false
127
-        return
144
+        this.$message.error("参数错误");
145
+        this.loading = false;
146
+        return;
128 147
       }
129 148
 
130
-      this.form.id = this.admin_id
149
+      this.form.id = this.admin_id;
131 150
       if (this.admin_id === 0) {
132
-        this.formTitle = '新增用户'
133
-        this.form.user_type = this.user_types[0].index
134
-        this.form.user_title = this.user_titles[0].index
135
-        getAddAdminInitData().then(rs => {
136
-          this.loading = false
137
-          var resp = rs.data
138
-          if (resp.state === 1) {
139
-            // this.roles.push(...resp.data.roles)
140
-            this.roles =  resp.data.roles
141
-            this.qntoken = resp.data.qntoken
142
-            // if (this.roles.length > 0) {
143
-            //   this.form.role = this.roles[0].id;
144
-            //   console.log("国庆快乐",this.form.role)
145
-            // }
146
-          } else {
147
-            this.$message.error(resp.msg)
148
-          }
149
-        }).catch(err => {
150
-          this.loading = false
151
-          this.$message.error(err)
152
-        })
151
+        this.formTitle = "新增员工";
152
+        this.form.user_type = this.user_types[0].index;
153
+        this.form.user_title = this.user_titles[0].index;
154
+        getAddAdminInitData()
155
+          .then(rs => {
156
+            this.loading = false;
157
+            var resp = rs.data;
158
+            if (resp.state === 1) {
159
+              // this.roles.push(...resp.data.roles)
160
+              this.roles = resp.data.roles;
161
+              this.qntoken = resp.data.qntoken;
162
+              // if (this.roles.length > 0) {
163
+              //   this.form.role = this.roles[0].id;
164
+              //   console.log("国庆快乐",this.form.role)
165
+              // }
166
+            } else {
167
+              this.$message.error(resp.msg);
168
+            }
169
+          })
170
+          .catch(err => {
171
+            this.loading = false;
172
+            this.$message.error(err);
173
+          });
153 174
       } else {
154
-        this.formTitle = '编辑用户'
155
-        getModifyAdminInitData(this.form.id).then(rs => {
156
-          this.loading = false
157
-          var resp = rs.data
158
-          if (resp.state === 1) {
159
-            this.roles.push(...resp.data.roles)
160
-            this.qntoken = resp.data.qntoken
175
+        this.formTitle = "编辑用户";
176
+        getModifyAdminInitData(this.form.id)
177
+          .then(rs => {
178
+            this.loading = false;
179
+            var resp = rs.data;
180
+            if (resp.state === 1) {
181
+              this.roles.push(...resp.data.roles);
182
+              this.qntoken = resp.data.qntoken;
161 183
 
162
-            var admin = resp.data.admin
163
-            this.form.name = admin.user_name
164
-            this.form.mobile = admin.mobile
165
-            this.form.user_type = admin.user_type
166
-            this.form.user_title = admin.user_title
167
-            this.form.role = admin.role_id
168
-            this.form.intro = admin.intro
169
-          } else {
170
-            this.$message.error("该用户不存在")
171
-          }
172
-        }).catch(err => {
173
-          this.loading = false
174
-          this.$message.error("该用户不存在")
175
-        })
184
+              var admin = resp.data.admin;
185
+              this.form.name = admin.user_name;
186
+              this.form.mobile = admin.mobile;
187
+              this.form.user_type = admin.user_type;
188
+              this.form.user_title = admin.user_title;
189
+              this.form.role = admin.role_id;
190
+              this.form.intro = admin.intro;
191
+            } else {
192
+              this.$message.error("该用户不存在");
193
+            }
194
+          })
195
+          .catch(err => {
196
+            this.loading = false;
197
+            this.$message.error("该用户不存在");
198
+          });
176 199
       }
177 200
 
178
-      this.dialogFormVisible = true
201
+      this.dialogFormVisible = true;
179 202
     },
180 203
     submitAction: function() {
181 204
       if (this.admin_id < 0) {
182
-        return
205
+        return;
183 206
       }
184
-      this.$refs.form.validate((valid) => {
207
+      this.$refs.form.validate(valid => {
185 208
         if (valid) {
186
-          this.loading = true
209
+          this.loading = true;
187 210
           if (this.form.id === 0) {
188
-            addAdmin(this.form.mobile, this.form.name, this.form.user_type, this.form.user_title, this.form.role, this.form.intro).then(rs => {
189
-              this.loading = false
190
-              var resp = rs.data
191
-              if (resp.state === 1) {
192
-                this.$store.dispatch('DidChangeAdmins')
193
-                var _this = this
194
-                setTimeout(() => {
195
-                  _this.$store.dispatch('RecoverAdminsChangeState')
196
-                }, 500)
197
-                this.dialogFormVisible = false
198
-              } else {
199
-                this.$message.error(resp.msg)
200
-              }
201
-            }).catch(err => {
202
-              this.loading = false
203
-              this.$message.error(err)
204
-            })
211
+            addAdmin(
212
+              this.form.mobile,
213
+              this.form.name,
214
+              this.form.user_type,
215
+              this.form.user_title,
216
+              this.form.role,
217
+              this.form.intro
218
+            )
219
+              .then(rs => {
220
+                this.loading = false;
221
+                var resp = rs.data;
222
+                if (resp.state === 1) {
223
+                  this.$store.dispatch("DidChangeAdmins");
224
+                  var _this = this;
225
+                  setTimeout(() => {
226
+                    _this.$store.dispatch("RecoverAdminsChangeState");
227
+                  }, 500);
228
+                  this.dialogFormVisible = false;
229
+                } else {
230
+                  this.$message.error(resp.msg);
231
+                }
232
+              })
233
+              .catch(err => {
234
+                this.loading = false;
235
+                this.$message.error(err);
236
+              });
205 237
           } else {
206
-            modifyAdmin(this.form.id, this.form.name, this.form.user_type, this.form.user_title, this.form.role, this.form.intro).then(rs => {
207
-              this.loading = false
208
-              var resp = rs.data
209
-              if (resp.state === 1) {
210
-                this.$store.dispatch('DidChangeAdmins')
211
-                var _this = this
212
-                setTimeout(() => {
213
-                  _this.$store.dispatch('RecoverAdminsChangeState')
214
-                }, 500)
238
+            modifyAdmin(
239
+              this.form.id,
240
+              this.form.name,
241
+              this.form.user_type,
242
+              this.form.user_title,
243
+              this.form.role,
244
+              this.form.intro
245
+            )
246
+              .then(rs => {
247
+                this.loading = false;
248
+                var resp = rs.data;
249
+                if (resp.state === 1) {
250
+                  this.$store.dispatch("DidChangeAdmins");
251
+                  var _this = this;
252
+                  setTimeout(() => {
253
+                    _this.$store.dispatch("RecoverAdminsChangeState");
254
+                  }, 500);
215 255
 
216
-                this.dialogFormVisible = false
217
-              } else {
218
-                this.$message.error(resp.msg)
219
-              }
220
-            }).catch(err => {
221
-              this.loading = false
222
-              this.$message.error(err)
223
-            })
256
+                  this.dialogFormVisible = false;
257
+                } else {
258
+                  this.$message.error(resp.msg);
259
+                }
260
+              })
261
+              .catch(err => {
262
+                this.loading = false;
263
+                this.$message.error(err);
264
+              });
224 265
           }
225 266
         } else {
226
-          return false
267
+          return false;
227 268
         }
228
-      })
269
+      });
229 270
     }
230 271
   }
231
-
232
-}
272
+};
233 273
 </script>