Browse Source

Merge branch 'master' of http://git.shengws.com/csx/Vue_New

csx 5 years ago
parent
commit
70bdb82af1

+ 2 - 2
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.xt.test.sgjyun.com"',// //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
-  //BASE_API:'"http://localhost:9529"',
9
+  BASE_API:  '"http://new_mobile.xt.api.sgjyun.com"',// //http://api.xt.test.sgjyun.com http://112.74.16.180:9527,////'"http://localhost:9529"',
10
+  // BASE_API:'"http://localhost:9531"',
11
   SSO_HOST: '"http://testsso.sgjyun.com"',
11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12
   SRCM_HOST: '"http://test1.sgjyun.com"',
12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13
   XT_HOST: '"http://xt.test.sgjyun.com"',
13
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 1 - 1
config/index.js View File

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

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

1
 module.exports = {
1
 module.exports = {
2
   NODE_ENV: '"production"',
2
   NODE_ENV: '"production"',
3
   ENV_CONFIG: '"sit"',
3
   ENV_CONFIG: '"sit"',
4
-  BASE_API: '"http://api.xt.test.sgjyun.com"',
4
+  BASE_API: '"http://new_mobile.xt.api.sgjyun.com"',
5
 
5
 
6
   SSO_HOST: '"https://testsso.sgjyun.com"',
6
   SSO_HOST: '"https://testsso.sgjyun.com"',
7
   SRCM_HOST: '"https://test1.sgjyun.com"',
7
   SRCM_HOST: '"https://test1.sgjyun.com"',

+ 20 - 0
src/api/config.js View File

90
 }
90
 }
91
 
91
 
92
 
92
 
93
+export function getOrgs() {
94
+  return request({
95
+    url: '/api/public/orgs',
96
+    method: 'get',
97
+  })
98
+}
99
+
100
+
101
+
102
+export function changeOrg(params) {
103
+  return request({
104
+    url: '/api/org/change',
105
+    method: 'post',
106
+    params:params,
107
+  })
108
+}
109
+
110
+
111
+
112
+
93
 
113
 
94
 
114
 

+ 62 - 65
src/api/role/role.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function getRoles(page) {
3
 export function getRoles(page) {
4
-    const params = {
5
-        page: page,
6
-    }
7
-    return request({
8
-        url: '/api/roles',
9
-        method: 'get',
10
-        params: params,
11
-    })
4
+  const params = {
5
+    page: page
6
+  }
7
+  return request({
8
+    url: '/api/roles',
9
+    method: 'get',
10
+    params: params
11
+  })
12
 }
12
 }
13
 
13
 
14
 export function addRole(name, intro) {
14
 export function addRole(name, intro) {
15
-    const params = {
16
-        name: name,
17
-        intro: intro
18
-    }
19
-    return request({
20
-        url: '/api/role/create',
21
-        method: 'post',
22
-        params: params,
23
-    })
15
+  const params = {
16
+    name: name,
17
+    intro: intro
18
+  }
19
+  return request({
20
+    url: '/api/role/create',
21
+    method: 'post',
22
+    params: params
23
+  })
24
 }
24
 }
25
 
25
 
26
 export function modifyRole(role_id, name, intro) {
26
 export function modifyRole(role_id, name, intro) {
27
-    const params = {
28
-        role_id: role_id,
29
-        name: name,
30
-        intro: intro
31
-    }
32
-    return request({
33
-        url: '/api/role/modify',
34
-        method: 'post',
35
-        params: params,
36
-    })
27
+  const params = {
28
+    role_id: role_id,
29
+    name: name,
30
+    intro: intro
31
+  }
32
+  return request({
33
+    url: '/api/role/modify',
34
+    method: 'post',
35
+    params: params
36
+  })
37
 }
37
 }
38
 
38
 
39
 export function setRoleStatus(role_id, enable) {
39
 export function setRoleStatus(role_id, enable) {
40
-    const params = {
41
-        role_id: role_id,
42
-        enable: enable,
43
-    }
44
-    return request({
45
-        url: '/api/role/setstatus',
46
-        method: 'post',
47
-        params: params,
48
-    })
40
+  const params = {
41
+    role_id: role_id,
42
+    enable: enable
43
+  }
44
+  return request({
45
+    url: '/api/role/setstatus',
46
+    method: 'post',
47
+    params: params
48
+  })
49
 }
49
 }
50
 
50
 
51
 export function getEditPurviewInitData(role_id) {
51
 export function getEditPurviewInitData(role_id) {
52
-    const params = {
53
-        role_id: role_id,
54
-    }
55
-    return request({
56
-        url: '/role/purview/editinit',
57
-        method: 'get',
58
-        params: params,
59
-    })
52
+  const params = {
53
+    role_id: role_id
54
+  }
55
+  return request({
56
+    url: '/role/purview/editinit',
57
+    method: 'get',
58
+    params: params
59
+  })
60
 }
60
 }
61
 
61
 
62
-export function editPurview(role_id, purview_ids) {
63
-    const params = {
64
-        role_id: role_id,
65
-        purview_ids: purview_ids,
66
-    }
67
-    return request({
68
-        url: '/role/purview/edit',
69
-        method: 'post',
70
-        params: params,
71
-    })
62
+export function editPurview(role_id, purview_ids, func_purview_ids) {
63
+  const params = {
64
+    role_id: role_id,
65
+    purview_ids: purview_ids,
66
+    func_purview_ids: func_purview_ids
67
+  }
68
+  return request({
69
+    url: '/role/purview/edit',
70
+    method: 'post',
71
+    params: params
72
+  })
72
 }
73
 }
73
 
74
 
74
-
75
 export function getRolesList() {
75
 export function getRolesList() {
76
   return request({
76
   return request({
77
     url: '/api/roles/list',
77
     url: '/api/roles/list',
78
-    method: 'get',
78
+    method: 'get'
79
   })
79
   })
80
 }
80
 }
81
 
81
 
82
 export function getStaffsList() {
82
 export function getStaffsList() {
83
   return request({
83
   return request({
84
     url: '/api/staff',
84
     url: '/api/staff',
85
-    method: 'get',
85
+    method: 'get'
86
   })
86
   })
87
 }
87
 }
88
 
88
 
89
-
90
-export function AddUserRole(params){
89
+export function AddUserRole(params) {
91
   return request({
90
   return request({
92
-    url:'/api/role/addStaff',
93
-    method:'post',
94
-    params:params,
91
+    url: '/api/role/addStaff',
92
+    method: 'post',
93
+    params: params
95
   })
94
   })
96
 }
95
 }
97
 
96
 
98
-
99
-
100
 export function getRoleStaff() {
97
 export function getRoleStaff() {
101
   return request({
98
   return request({
102
     url: '/api/role/staff',
99
     url: '/api/role/staff',
103
-    method: 'get',
100
+    method: 'get'
104
   })
101
   })
105
 }
102
 }
106
 
103
 

+ 8 - 8
src/router/modules/systems.js View File

59
     hidden: true,
59
     hidden: true,
60
     is_menu: false
60
     is_menu: false
61
   },
61
   },
62
-  {
63
-    path: '/role/admin/specialpermission',
64
-    component: () => import('@/xt_pages/role/special_permission'),
65
-    name: 'special_permission_manage',
66
-    meta: {
67
-      title: 'special_permission_manage'
68
-    }
69
-  },
62
+  // {
63
+  //   path: '/role/admin/specialpermission',
64
+  //   component: () => import('@/xt_pages/role/special_permission'),
65
+  //   name: 'special_permission_manage',
66
+  //   meta: {
67
+  //     title: 'special_permission_manage'
68
+  //   }
69
+  // },
70
   {
70
   {
71
     path: '/data/dictionary',
71
     path: '/data/dictionary',
72
     component: () => import('@/xt_pages/data/index'),
72
     component: () => import('@/xt_pages/data/index'),

+ 96 - 24
src/views/layout/components/Navbar.vue View File

53
             </el-dropdown-item>
53
             </el-dropdown-item>
54
             <el-dropdown-item divided command="logout">
54
             <el-dropdown-item divided command="logout">
55
               {{$t('navbar.logOut')}}
55
               {{$t('navbar.logOut')}}
56
-              
56
+
57
             </el-dropdown-item>
57
             </el-dropdown-item>
58
           </el-dropdown-menu>
58
           </el-dropdown-menu>
59
         </el-dropdown>
59
         </el-dropdown>
64
       </div>
64
       </div>
65
     </el-menu>-->
65
     </el-menu>-->
66
     <div class="dropdownBox">
66
     <div class="dropdownBox">
67
-      <el-dropdown trigger="click">
67
+      <el-dropdown trigger="click" @command="handleOrgCommand">
68
         <span class="el-dropdown-link">
68
         <span class="el-dropdown-link">
69
-          {{this.$store.getters.xt_user.org.org_name}}
69
+          {{ org_name }}
70
           <i class="el-icon-arrow-down el-icon--right"></i>
70
           <i class="el-icon-arrow-down el-icon--right"></i>
71
         </span>
71
         </span>
72
         <el-dropdown-menu slot="dropdown">
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>
73
+          <el-dropdown-item   icon="el-icon-plus" v-for="(item,index) in orgs" :key="index"  :command="item.id">{{item.org_name}}</el-dropdown-item>
78
         </el-dropdown-menu>
74
         </el-dropdown-menu>
79
       </el-dropdown>
75
       </el-dropdown>
80
     </div>
76
     </div>
81
     <div class="navRight">
77
     <div class="navRight">
82
-      <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
83
-      <div style="color: #b2b2b3;">通知中心</div>
78
+      <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
79
+      <div style="color: #b2b2b3;">通知中心</div> -->
84
       <div class="right-menu">
80
       <div class="right-menu">
85
         <el-dropdown
81
         <el-dropdown
86
           class="avatar-container right-menu-item"
82
           class="avatar-container right-menu-item"
89
         >
85
         >
90
           <div class="avatar-wrapper">
86
           <div class="avatar-wrapper">
91
             <img class="user-avatar" :src="avater" />
87
             <img class="user-avatar" :src="avater" />
92
-            <span class="user-title">{{ this.$store.getters.xt_user.user.user_name }}</span>
88
+            <span class="user-title">{{
89
+              this.$store.getters.xt_user.user.user_name
90
+            }}</span>
93
             <i class="el-icon-caret-bottom"></i>
91
             <i class="el-icon-caret-bottom"></i>
94
           </div>
92
           </div>
95
           <el-dropdown-menu slot="dropdown">
93
           <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>
94
+            <el-dropdown-item command="modifyUserInfoAction"
95
+              >修改个人信息</el-dropdown-item
96
+            >
97
+            <el-dropdown-item command="modifyOrgInfoAction"
98
+              >机构信息</el-dropdown-item
99
+            >
100
+            <el-dropdown-item divided command="logout">{{
101
+              $t("navbar.logOut")
102
+            }}</el-dropdown-item>
99
           </el-dropdown-menu>
103
           </el-dropdown-menu>
100
         </el-dropdown>
104
         </el-dropdown>
101
 
105
 
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>
106
+        <modify-user-info-dialog
107
+          ref="modify_user_info_dialog"
108
+        ></modify-user-info-dialog>
109
+        <modify-org-info-dialog
110
+          ref="modify_org_info_dialog"
111
+        ></modify-org-info-dialog>
104
       </div>
112
       </div>
105
       <div>
113
       <div>
106
         <i class="el-icon-question"></i>
114
         <i class="el-icon-question"></i>
117
 import Screenfull from "@/components/Screenfull";
125
 import Screenfull from "@/components/Screenfull";
118
 import ModifyUserInfoDialog from "@/xt_pages/home/modify_user_info_dialog";
126
 import ModifyUserInfoDialog from "@/xt_pages/home/modify_user_info_dialog";
119
 import ModifyOrgInfoDialog from "@/xt_pages/home/modifyOrgInfoDialog";
127
 import ModifyOrgInfoDialog from "@/xt_pages/home/modifyOrgInfoDialog";
120
-
128
+import { getFiledConfigList, setFiledConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
129
+import {
130
+  getAdminUserInfoCache,
131
+  cacheAdminUserInfo,
132
+  removeAdminUserInfoCache
133
+} from '@/utils/admin_info_cache'
134
+import {
135
+  getOrgs,changeOrg
136
+} from '@/api/config'
121
 export default {
137
 export default {
122
   data() {
138
   data() {
123
     return {
139
     return {
140
+      orgs:[],
141
+      org_id:this.$store.getters.xt_user.org.id,
142
+      org_name:this.$store.getters.xt_user.org.org_name,
143
+
124
       // scrm_role_exist: $store.getters.xt_user.scrm_role_exist
144
       // scrm_role_exist: $store.getters.xt_user.scrm_role_exist
125
     };
145
     };
126
   },
146
   },
127
   components: {
147
   components: {
128
-    // Breadcrumb,
129
-    // Hamburger,
130
     Screenfull,
148
     Screenfull,
131
     ModifyUserInfoDialog,
149
     ModifyUserInfoDialog,
132
     ModifyOrgInfoDialog
150
     ModifyOrgInfoDialog
141
     }
159
     }
142
   },
160
   },
143
   methods: {
161
   methods: {
144
-    // toggleSideBar() {
145
-    //   this.$store.dispatch("toggleSideBar");
146
-    // },
162
+    handleOrgCommand(org_id){
163
+      let params = {
164
+        org_id: org_id
165
+      }
166
+      changeOrg(params).then(response => {
167
+        if (response.data.state === 1) {
168
+          window.location.reload()
169
+
170
+          this.$message.success('切换成功')
171
+          let data = response.data.data
172
+          this.org_id = data.org.id
173
+          this.org_name = data.org.org_name
174
+
175
+          this.commit('SET_CURRENT_INFO', {
176
+            user: data.user,
177
+            cur_org_id: data.current_org_id,
178
+            cur_app_id: data.current_app_id,
179
+            org: data.org,
180
+            subscibe: data.subscibe,
181
+            template_info:data.template_info,
182
+          })
183
+
184
+          this.commit('SET_URLFORS', {
185
+            urlfors: data.urlfors
186
+          })
187
+
188
+          this.commit('SET_FILEDS', {
189
+            fileds: data.fileds
190
+          })
191
+          setFiledConfigList(JSON.stringify(data.fileds))
192
+          cacheAdminUserInfo(JSON.stringify(data))
193
+
194
+
195
+        }else{
196
+          this.$message.success(response.data.msg)
197
+        }
198
+      }).catch(e => {
199
+        // this.$message.success("网络异常")
200
+      });
201
+    },
202
+
147
     handleCommand(command) {
203
     handleCommand(command) {
148
       switch (command) {
204
       switch (command) {
149
         case "modifyUserInfoAction":
205
         case "modifyUserInfoAction":
190
       );
246
       );
191
     }
247
     }
192
   },
248
   },
193
-  created() {}
249
+  created() {
250
+    this.org_id = 12
251
+
252
+    getOrgs().then(response => {
253
+      if (response.data.state === 1) {
254
+          this.orgs = response.data.data.orgs;
255
+          for (let i =0; i < this.orgs.length; i++){
256
+            if (this.orgs[i].id == this.org_id){
257
+              this.org_name = this.orgs[i].org_name
258
+            }
259
+          }
260
+      }
261
+    });
262
+
263
+
264
+
265
+  }
194
 };
266
 };
195
 </script>
267
 </script>
196
 
268
 
213
     display: flex;
285
     display: flex;
214
     align-items: center;
286
     align-items: center;
215
     justify-content: space-between;
287
     justify-content: space-between;
216
-    width: 540px;
288
+    width: 200px;
217
     margin-right: 10px;
289
     margin-right: 10px;
218
     .right-menu {
290
     .right-menu {
219
       float: right;
291
       float: right;

+ 17 - 4
src/xt_pages/role/components/AdminInfoForm.vue View File

138
         }
138
         }
139
          // let localthis.$store.getters.xt_user.user.id
139
          // let localthis.$store.getters.xt_user.user.id
140
         let local_user_id = this.$store.getters.xt_user.user.id
140
         let local_user_id = this.$store.getters.xt_user.user.id
141
-        local_user_id = 597
142
         this.form.id = this.admin_id
141
         this.form.id = this.admin_id
143
         if (this.admin_id === 0) {
142
         if (this.admin_id === 0) {
144
           let tempForm = {
143
           let tempForm = {
171
                 //如果当前用户是子管理员则,则需要将子管理员角色去除,因为子管理员不能添加子管理员
170
                 //如果当前用户是子管理员则,则需要将子管理员角色去除,因为子管理员不能添加子管理员
172
                 if(this.isSubSuperAdmin){
171
                 if(this.isSubSuperAdmin){
173
                   for (let i =0 ; i < this.roles.length; i++){
172
                   for (let i =0 ; i < this.roles.length; i++){
174
-                    if(this.roles[i].is_system == 1 && this.roles[i].role_name != "子管理员"){
173
+                    if(this.roles[i].is_system == 1 && this.roles[i].role_name == "子管理员"){
175
                       this.roles.splice(i, 1)
174
                       this.roles.splice(i, 1)
176
                       i--
175
                       i--
177
                     }
176
                     }
181
 
180
 
182
 
181
 
183
 
182
 
183
+
184
+
185
+
184
                 // if (this.roles.length > 0) {
186
                 // if (this.roles.length > 0) {
185
                 //   this.form.role = this.roles[0].id;
187
                 //   this.form.role = this.roles[0].id;
186
                 //   console.log("国庆快乐",this.form.role)
188
                 //   console.log("国庆快乐",this.form.role)
203
                 this.roles = []
205
                 this.roles = []
204
                 this.roles.push(...resp.data.roles)
206
                 this.roles.push(...resp.data.roles)
205
                 this.qntoken = resp.data.qntoken
207
                 this.qntoken = resp.data.qntoken
208
+                var org = resp.data.org
209
+
206
 
210
 
207
                 var admin = resp.data.admin
211
                 var admin = resp.data.admin
208
                 this.form.name = admin.user_name
212
                 this.form.name = admin.user_name
209
                 this.form.mobile = admin.admin.mobile
213
                 this.form.mobile = admin.admin.mobile
210
                 this.form.user_type = admin.user_type
214
                 this.form.user_type = admin.user_type
215
+                if(admin.user_type == 1){
216
+
217
+                  this.form.user_type = ""
218
+                }
211
                 this.form.user_title = admin.user_title
219
                 this.form.user_title = admin.user_title
212
                 this.form.role = admin.role_ids
220
                 this.form.role = admin.role_ids
213
                 this.form.role_ids = []
221
                 this.form.role_ids = []
223
 
231
 
224
 
232
 
225
                 //如果当前用户是超级管理员而且编辑自己的信息
233
                 //如果当前用户是超级管理员而且编辑自己的信息
226
-                if(!this.isSubSuperAdmin && local_user_id == this.form.id){
234
+                if(this.isSubSuperAdmin || this.admin_id == org.creator){
227
                   for (let i =0 ; i < this.roles.length; i++){
235
                   for (let i =0 ; i < this.roles.length; i++){
228
-                    if(this.roles[i].is_system == 1 && this.roles[i].role_name != "子管理员"){
236
+                    if(this.roles[i].is_system == 1 && this.roles[i].role_name == "子管理员"){
229
                       this.roles.splice(i, 1)
237
                       this.roles.splice(i, 1)
230
                       i--
238
                       i--
231
                     }
239
                     }
253
         }
261
         }
254
         this.$refs.form.validate(valid => {
262
         this.$refs.form.validate(valid => {
255
           if (valid) {
263
           if (valid) {
264
+            if(this.form.user_type == "" || this.form.user_type == 0 ){
265
+              this.$message.error("职称不能为空")
266
+              return
267
+            }
268
+
256
             this.loading = true
269
             this.loading = true
257
             if (this.form.id === 0) {
270
             if (this.form.id === 0) {
258
               this.form.role = this.form.role_ids.join(',')
271
               this.form.role = this.form.role_ids.join(',')

+ 27 - 8
src/xt_pages/role/components/EditRole.vue View File

18
       <el-radio v-model="checked" label="1">从已有员工中选择</el-radio>
18
       <el-radio v-model="checked" label="1">从已有员工中选择</el-radio>
19
       <el-radio v-model="checked" label="2">新增员工</el-radio>
19
       <el-radio v-model="checked" label="2">新增员工</el-radio>
20
     </div>
20
     </div>
21
-    <div v-if="checked == '1'" class="roleContent">
21
+    <div v-if="checked == '1'"   v-loading="loading" class="roleContent">
22
       <div class="roleContentLeft">
22
       <div class="roleContentLeft">
23
         <p style="color:#303133">选择:</p>
23
         <p style="color:#303133">选择:</p>
24
         <div class="chooseBox">
24
         <div class="chooseBox">
49
         </div>
49
         </div>
50
       </div>
50
       </div>
51
 
51
 
52
-      <div class="roleContentRight">
52
+      <div class="roleContentRight" v-loading="loading">
53
         <p style="color:#303133">已选:</p>
53
         <p style="color:#303133">已选:</p>
54
         <div class="chooseBox">
54
         <div class="chooseBox">
55
           <div class="hasChoosedOne" v-for="(item,index) in is_check_admin_user" :key="index">
55
           <div class="hasChoosedOne" v-for="(item,index) in is_check_admin_user" :key="index">
115
     </div>
115
     </div>
116
     <div slot="footer" class="dialog-footer">
116
     <div slot="footer" class="dialog-footer">
117
       <el-button @click="hide">取 消</el-button>
117
       <el-button @click="hide">取 消</el-button>
118
-      <el-button type="primary" @click="submitAction()">保 存</el-button>
118
+      <el-button type="primary" :loading="submitLoading" @click="submitAction()">保 存</el-button>
119
     </div>
119
     </div>
120
   </el-dialog>
120
   </el-dialog>
121
 </template>
121
 </template>
146
       }
146
       }
147
 
147
 
148
       return {
148
       return {
149
+        submitLoading:false,
150
+        loading:true,
149
         form: {
151
         form: {
150
           id: 0,
152
           id: 0,
151
           name: '',
153
           name: '',
268
           .then(rs => {
270
           .then(rs => {
269
             var resp = rs.data
271
             var resp = rs.data
270
             if (resp.state === 1) {
272
             if (resp.state === 1) {
271
-
272
               this.admin_user = resp.data.admins
273
               this.admin_user = resp.data.admins
273
-
274
               for (let i = 0; i < this.admin_user.length; i++) {
274
               for (let i = 0; i < this.admin_user.length; i++) {
275
                 if (this.admin_user[i].role_ids.length > 0) {
275
                 if (this.admin_user[i].role_ids.length > 0) {
276
                   let isExist = -1
276
                   let isExist = -1
279
                   if (isExist >= 0) {
279
                   if (isExist >= 0) {
280
                     this.is_check_admin_user.push(this.admin_user[i])
280
                     this.is_check_admin_user.push(this.admin_user[i])
281
                     this.admin_user.splice(i, 1)
281
                     this.admin_user.splice(i, 1)
282
-
283
                     i = i - 1
282
                     i = i - 1
284
                   }
283
                   }
285
                 }
284
                 }
286
               }
285
               }
287
-
288
               for (let i = 0; i < this.admin_user.length; i++) {
286
               for (let i = 0; i < this.admin_user.length; i++) {
289
                 if (this.admin_user[i].user_id == resp.data.org.creator) {
287
                 if (this.admin_user[i].user_id == resp.data.org.creator) {
290
 
288
 
292
                   i = i - 1
290
                   i = i - 1
293
                 }
291
                 }
294
               }
292
               }
293
+              this.loading = false
294
+
295
             } else {
295
             } else {
296
               this.$message.error(resp.msg)
296
               this.$message.error(resp.msg)
297
+              this.loading = false
298
+
297
             }
299
             }
298
           })
300
           })
299
           .catch(err => {
301
           .catch(err => {
312
       },
314
       },
313
       show(role_id) {
315
       show(role_id) {
314
         this.clear()
316
         this.clear()
317
+        this.loading = true
315
         this.checked = '1'
318
         this.checked = '1'
316
         this.visible = true
319
         this.visible = true
317
         this.role_id = role_id
320
         this.role_id = role_id
340
             id: this.role_id,
343
             id: this.role_id,
341
             ids: this.checkedCities.join(',')
344
             ids: this.checkedCities.join(',')
342
           }
345
           }
346
+          this.submitLoading = true
347
+
343
           AddUserRole(params).then(response => {
348
           AddUserRole(params).then(response => {
344
             if (response.data.state === 1) {
349
             if (response.data.state === 1) {
345
               this.$message.success('添加成功')
350
               this.$message.success('添加成功')
346
               this.$emit('did-edit-role')
351
               this.$emit('did-edit-role')
347
               this.hide()
352
               this.hide()
353
+              this.submitLoading = false
348
 
354
 
349
             } else {
355
             } else {
356
+              this.submitLoading = false
357
+
350
               this.$message.error(response.data.msg)
358
               this.$message.error(response.data.msg)
351
 
359
 
352
             }
360
             }
353
-          })
361
+          }).catch(e => {
362
+            this.submitLoading = false
363
+
364
+
365
+          });
354
         } else {
366
         } else {
355
           this.$refs.form.validate(valid => {
367
           this.$refs.form.validate(valid => {
356
             if (valid) {
368
             if (valid) {
369
+              this.submitLoading = true
357
               if (this.form.id === 0) {
370
               if (this.form.id === 0) {
358
                 this.ruleForm.role = this.role_id
371
                 this.ruleForm.role = this.role_id
359
                 addAdmin(
372
                 addAdmin(
366
                   this.ruleForm.position
379
                   this.ruleForm.position
367
                 )
380
                 )
368
                   .then(rs => {
381
                   .then(rs => {
382
+                    this.submitLoading = false
383
+
369
                     var resp = rs.data
384
                     var resp = rs.data
370
                     if (resp.state === 1) {
385
                     if (resp.state === 1) {
386
+
371
                       this.$store.dispatch('DidChangeAdmins')
387
                       this.$store.dispatch('DidChangeAdmins')
372
                       var _this = this
388
                       var _this = this
373
                       setTimeout(() => {
389
                       setTimeout(() => {
387
                     }
403
                     }
388
                   })
404
                   })
389
                   .catch(err => {
405
                   .catch(err => {
406
+                    this.submitLoading = false
407
+
390
                     this.loading = false
408
                     this.loading = false
391
                     this.$message.error(err)
409
                     this.$message.error(err)
392
                   })
410
                   })
393
               }
411
               }
394
             } else {
412
             } else {
413
+              this.submitLoading = false
395
               return false
414
               return false
396
             }
415
             }
397
           })
416
           })

+ 286 - 146
src/xt_pages/role/components/PermissionSettings.vue View File

4
       <div class="roleName">
4
       <div class="roleName">
5
         <div class="roleNameLeft">
5
         <div class="roleNameLeft">
6
           <p>角色名称</p>
6
           <p>角色名称</p>
7
-          <el-input placeholder="请输入内容" v-model="input" :disabled="true"></el-input>
7
+          <el-input placeholder="请输入内容" v-model="role.name" :disabled="true"></el-input>
8
         </div>
8
         </div>
9
-        <p style="color:#338AFB">删除该角色</p>
9
+        <p style="color:#338AFB" v-if="role.is_system == 0" @click="disableRoleAction(role.id)">删除该角色</p>
10
       </div>
10
       </div>
11
-      <div class="roleMain">
12
-        <div class="roleMainLeft">
11
+      <div class="roleMain" >
12
+        <div class="roleMainLeft" >
13
           <p class="roletitle">选择权限</p>
13
           <p class="roletitle">选择权限</p>
14
           <div class="roleMainLeftBox">
14
           <div class="roleMainLeftBox">
15
             <!--<el-tree-->
15
             <!--<el-tree-->
16
-              <!--:props="defaultProps"-->
17
-              <!--:data="data"-->
18
-              <!--:default-checked-keys="data"-->
19
-              <!--node-key="id"-->
20
-              <!--ref="tree"-->
21
-              <!--default-expand-all-->
22
-              <!--show-checkbox-->
16
+            <!--:props="defaultProps"-->
17
+            <!--:data="data"-->
18
+            <!--:default-checked-keys="data"-->
19
+            <!--node-key="id"-->
20
+            <!--ref="tree"-->
21
+            <!--default-expand-all-->
22
+            <!--show-checkbox-->
23
             <!--&gt;-->
23
             <!--&gt;-->
24
-              <!--&lt;!&ndash; <span class="custom-tree-node" slot-scope="{ node, data }">-->
25
-                                <!--<span>{{ data.name }}</span>-->
26
-              <!--</span>&ndash;&gt;-->
24
+            <!--&lt;!&ndash; <span class="custom-tree-node" slot-scope="{ node, data }">-->
25
+            <!--<span>{{ data.name }}</span>-->
26
+            <!--</span>&ndash;&gt;-->
27
             <!--</el-tree>-->
27
             <!--</el-tree>-->
28
-            <el-tree :props="treeProps" :data="purviews" :default-checked-keys="default_checkeds" node-key="id" ref="tree" default-expand-all show-checkbox>
28
+            <el-tree  v-loading="loading" :props="treeProps" :data="purviews" :default-checked-keys="default_checkeds" node-key="id"
29
+                     ref="tree" default-expand-all show-checkbox>
29
                             <span class="custom-tree-node" slot-scope="{ node, data }">
30
                             <span class="custom-tree-node" slot-scope="{ node, data }">
30
                                 <span>{{ data.name }}</span>
31
                                 <span>{{ data.name }}</span>
31
                             </span>
32
                             </span>
32
             </el-tree>
33
             </el-tree>
33
           </div>
34
           </div>
34
         </div>
35
         </div>
35
-        <div class="roleMainRight">
36
-          <div class="hasChoose">已选择权限</div>
37
-          <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
38
-        </div>
36
+        <!--<div class="roleMainRight">-->
37
+        <!--<div class="hasChoose">已选择权限</div>-->
38
+        <!--<el-tree-->
39
+        <!--:props="treeProps" :data="check_purviews"   node-key="id" ref="tree" default-expand-all-->
40
+
41
+        <!--&gt;</el-tree>-->
42
+        <!--</div>-->
39
       </div>
43
       </div>
40
     </div>
44
     </div>
45
+    <div slot="footer" class="dialog-footer">
46
+      <el-button @click="hide">取 消</el-button>
47
+      <el-button type="primary" @click="submitAction" :loading="submitLoading">保 存</el-button>
48
+    </div>
41
   </el-dialog>
49
   </el-dialog>
42
 </template>
50
 </template>
43
 
51
 
44
-
45
 <script>
52
 <script>
46
-  import {getEditPurviewInitData, editPurview} from '@/api/role/role'
53
+  import { editPurview, getEditPurviewInitData, setRoleStatus } from '@/api/role/role'
47
 
54
 
48
   export default {
55
   export default {
49
-  data() {
50
-    return {
51
-      visible: false,
52
-      role_id: 0,
53
-      purviews: [], // [{id, pid, name, childs}]
54
-      treeProps: {
55
-        label: "name",
56
-        children: "childs"
57
-      },
58
-      // role_purview_ids: '',
59
-      default_checkeds: [],
60
-      data: [
61
-        {
62
-          id: 1,
63
-          label: "一级 2",
64
-          children: [
65
-            {
66
-              id: 3,
67
-              label: "二级 2-1",
68
-              children: [
69
-                {
70
-                  id: 4,
71
-                  label: "三级 3-1-1"
72
-                },
73
-                {
74
-                  id: 5,
75
-                  label: "三级 3-1-2"
76
-                }
77
-              ]
78
-            },
79
-            {
80
-              id: 2,
81
-              label: "二级 2-2",
82
-              children: [
83
-                {
84
-                  id: 6,
85
-                  label: "三级 3-2-1"
86
-                },
87
-                {
88
-                  id: 7,
89
-                  label: "三级 3-2-2"
90
-                }
91
-              ]
92
-            }
93
-          ]
56
+    data() {
57
+      return {
58
+        visible: false,
59
+        loading: true,
60
+        submitLoading:false,
61
+        role_id: 0,
62
+        name: '',
63
+        role: {
64
+          name:"",
65
+        },
66
+        purviews: [],
67
+        treeProps: {
68
+          label: 'name',
69
+          children: 'childs'
70
+        },
71
+        default_checkeds: [],
72
+        check_purviews: [],
73
+        defaultProps: {
74
+          children: 'children',
75
+          label: 'label'
94
         }
76
         }
95
-      ],
96
-      defaultProps: {
97
-        children: "children",
98
-        label: "label"
99
-      }
100
-    };
101
-  },
102
-  methods: {
103
-    show(role_id) {
104
-      this.visible = true;
105
-
106
-      var id = parseInt(role_id)
107
-      if (id <= 0) {
108
-        this.$message.error("参数错误")
109
-        return
110
       }
77
       }
111
-      this.role_id = role_id
112
-      getEditPurviewInitData(this.role_id).then(rs => {
113
-        var resp = rs.data
114
-        if (resp.state === 1) {
115
-          this.purviews.push(...resp.data.purviews)
116
-          // 初始化默认选中项
117
-          var role_purview_ids = resp.data.role_purview_ids
118
-          var checkeds = []
119
-          if (role_purview_ids.length > 0) {
120
-            var ids = role_purview_ids.split(",")
121
-            this.purviews.forEach(purview => {
122
-              if (purview.childs != null && purview.childs.length > 0) {
123
-                purview.childs.forEach(child => {
124
-                  if (ids.indexOf(child.id+"") != -1) {
125
-                    checkeds.push(child.id)
78
+    },
79
+    methods: {
80
+      disableRoleAction: function(id) {
81
+        this.$msgbox({
82
+          title: '提示',
83
+          message: '是否确定要移除该角色',
84
+          showCancelButton: true,
85
+          confirmButtonText: '确定',
86
+          cancelButtonText: '取消',
87
+          type: 'warning',
88
+          beforeClose: (action, instance, done) => {
89
+            if (action === "confirm") {
90
+
91
+              instance.confirmButtonLoading = true;
92
+              instance.confirmButtonText = "移除中...";
93
+              setRoleStatus(id, false)
94
+                .then(rs => {
95
+                  done();
96
+                  instance.confirmButtonLoading = false;
97
+                  const resp = rs.data
98
+                  if (resp.state === 1) {
99
+                    this.$emit('delete')
100
+                  } else {
101
+                    this.$message.error(resp.msg)
102
+                  }
103
+                })
104
+                .catch(err => {
105
+                  done();
106
+                  this.$message.error(err);
107
+                  instance.confirmButtonLoading = false;
108
+                })
109
+            }else{
110
+
111
+              done();
112
+            }
113
+          }
114
+        })
115
+      },
116
+
117
+      submitAction: function() {
118
+
119
+        if (this.role_id <= 0) {
120
+          return
121
+        }
122
+
123
+        var checkeds = this.$refs.tree.getCheckedKeys(true)
124
+
125
+        var ids = []
126
+        var func_ids = []
127
+
128
+        if (checkeds.length > 0) {
129
+          this.purviews.forEach(purview => {
130
+            if (purview.childs != null && purview.childs.length > 0) {
131
+              purview.childs.forEach(childs => {
132
+                if (childs.childs == null) {
133
+                  if (checkeds.indexOf(childs.id) != -1) {
134
+                    if (ids.indexOf(purview.id) == -1) {
135
+                      ids.push(purview.id)
136
+                    }
137
+                    ids.push(childs.id)
138
+
126
                   }
139
                   }
127
-                });
128
-              } else {
129
-                if (ids.indexOf(purview.id+"") != -1) {
130
-                  checkeds.push(purview.id)
140
+                } else {
141
+                  console.log(childs.name)
142
+                  if (childs.name == '透析记录') {
143
+
144
+                    childs.childs.forEach(child => {
145
+                      if (checkeds.indexOf(child.id) != -1) {
146
+                        if (func_ids.indexOf(childs.id) == -1) {
147
+                          func_ids.push(childs.id)
148
+                        }
149
+                        func_ids.push(child.id)
150
+                      }
151
+                    })
152
+                  } else {
153
+                    childs.childs.forEach(child => {
154
+                      if (checkeds.indexOf(child.id) != -1) {
155
+                        if (ids.indexOf(childs.id) == -1) {
156
+                          ids.push(childs.id)
157
+                        }
158
+                        ids.push(child.id)
159
+                      }
160
+                    })
161
+
162
+                  }
163
+
131
                 }
164
                 }
165
+              })
166
+
167
+            } else {
168
+              if (checkeds.indexOf(purview.id) != -1) {
169
+                ids.push(purview.id)
132
               }
170
               }
133
-            });
171
+            }
172
+          })
173
+        }
174
+        var idsStr = ''
175
+        if (ids.length > 0) {
176
+          idsStr = ids.join(',')
177
+        }
178
+
179
+        var funcIdsStr = ''
180
+        if (func_ids.length > 0) {
181
+          funcIdsStr = func_ids.join(',')
182
+        }
183
+        this.submitLoading = true
184
+        editPurview(this.role_id, idsStr, funcIdsStr).then(rs => {
185
+          var resp = rs.data
186
+          this.submitLoading = false
187
+
188
+          if (resp.state === 1) {
189
+            this.hide()
190
+          } else {
191
+            this.$message.error(resp.msg)
134
           }
192
           }
135
-          this.default_checkeds = checkeds
136
-        } else {
137
-          this.$message.error(resp.msg)
193
+        }).catch(err => {
194
+          this.submitLoading = false
195
+          this.$message.error(err)
196
+        })
197
+      },
198
+
199
+      show(role_id) {
200
+        this.loading = true
201
+        this.visible = true
202
+        this.default_checkeds = []
203
+        this.purviews = []
204
+
205
+
206
+
207
+        var id = parseInt(role_id)
208
+        if (id <= 0) {
209
+          this.$message.error('参数错误')
210
+          return
138
         }
211
         }
139
-      }).catch(err => {
140
-        this.$message.error(err)
141
-      })
142
-    }
143
-  },created(){
212
+        this.role_id = role_id
213
+        getEditPurviewInitData(this.role_id).then(rs => {
214
+          var resp = rs.data
215
+          if (resp.state === 1) {
216
+            this.role = resp.data.role
217
+            this.purviews.push(...resp.data.purviews)
218
+            // 初始化默认选中项
219
+            var role_purview_ids = resp.data.role_purview_ids
220
+            var checkeds = []
221
+            if (role_purview_ids.length > 0) {
222
+              var ids = role_purview_ids.split(',')
223
+              this.purviews.forEach(purview => {
224
+                if (purview.childs != null && purview.childs.length > 0) {
225
+                  purview.childs.forEach(childs => {
226
+
227
+                    if (childs.childs != null && childs.childs.length > 0) {
228
+                      childs.childs.forEach(child => {
229
+                        if (ids.indexOf(child.id + '') != -1) {
230
+                          checkeds.push(child.id)
231
+                        }
232
+                      })
233
+
234
+                      }else{
235
+                      if (ids.indexOf(childs.id + '') != -1) {
236
+                        checkeds.push(childs.id)
237
+                      }
238
+                    }
239
+                  })
240
+
241
+                } else {
242
+                  if (ids.indexOf(purview.id + '') != -1) {
243
+                    checkeds.push(purview.id)
244
+                  }
245
+                }
246
+              })
247
+            }
248
+
249
+
250
+
251
+            this.$nextTick(() => {
252
+              this.default_checkeds = checkeds
253
+            })
254
+
255
+            this.loading = false
256
+
257
+          } else {
258
+            this.loading = false
259
+
260
+            this.$message.error(resp.msg)
261
+          }
262
+        }).catch(err => {
263
+          this.loading = false
264
+
265
+          this.$message.error(err)
266
+        })
267
+      },
268
+      hide() {
269
+        this.visible =false
144
 
270
 
271
+      }
272
+
273
+    }, created() {
145
 
274
 
146
-  },
147
-};
275
+    }
276
+  }
148
 </script>
277
 </script>
149
 
278
 
150
 <style lang="scss" scoped>
279
 <style lang="scss" scoped>
151
-.roleSettings {
280
+  .roleSettings {
281
+
152
   .roleName {
282
   .roleName {
153
     display: flex;
283
     display: flex;
154
     align-items: center;
284
     align-items: center;
155
     justify-content: space-between;
285
     justify-content: space-between;
156
   }
286
   }
287
+
157
   .roleNameLeft {
288
   .roleNameLeft {
158
     display: flex;
289
     display: flex;
159
     align-items: center;
290
     align-items: center;
160
-    p {
161
-      width: 100px;
162
-    }
291
+
292
+  p {
293
+    width: 100px;
294
+  }
295
+
163
   }
296
   }
164
   .roleMain {
297
   .roleMain {
165
     display: flex;
298
     display: flex;
166
     justify-content: space-between;
299
     justify-content: space-between;
167
     margin-top: 18px;
300
     margin-top: 18px;
168
-    .roleMainLeft {
169
-      display: flex;
170
-      .roletitle {
171
-        width: 74px;
172
-      }
173
-      .roleMainLeftBox {
174
-        width: 300px;
175
-        height: 706px;
176
-        overflow-y: auto;
177
-        border: 1px solid rgba(234, 238, 240, 1);
178
-        border-radius: 4px;
179
-        padding: 20px 0 0 10px;
180
-      }
181
-    }
182
-    .roleMainRight {
183
-      width: 280px;
184
-      height: 706px;
185
-      overflow-y: auto;
186
-      border: 1px solid rgba(235, 238, 240, 1);
187
-      color: #303133;
188
-      .hasChoose {
189
-        height: 42px;
190
-        line-height: 42px;
191
-        padding-left: 20px;
192
-        background: #f6f8f9;
193
-      }
194
-    }
301
+
302
+  .roleMainLeft {
303
+    display: flex;
304
+
305
+  .roletitle {
306
+    width: 74px;
195
   }
307
   }
196
-}
197
-</style>
198
 
308
 
309
+  .roleMainLeftBox {
310
+    width: 500px;
311
+    height: 706px;
312
+    overflow-y: auto;
313
+    border: 1px solid rgba(234, 238, 240, 1);
314
+    border-radius: 4px;
315
+    padding: 20px 0 0 10px;
316
+  }
317
+
318
+  }
319
+  .roleMainRight {
320
+    width: 280px;
321
+    height: 706px;
322
+    overflow-y: auto;
323
+    border: 1px solid rgba(235, 238, 240, 1);
324
+    color: #303133;
325
+
326
+  .hasChoose {
327
+    height: 42px;
328
+    line-height: 42px;
329
+    padding-left: 20px;
330
+    background: #f6f8f9;
331
+  }
332
+
333
+  }
334
+  }
335
+  }
336
+</style>
199
 
337
 
200
 <style lang="scss">
338
 <style lang="scss">
201
-.settingDialog {
339
+  .settingDialog {
340
+
202
   .el-dialog__body {
341
   .el-dialog__body {
203
     max-height: 600px !important;
342
     max-height: 600px !important;
204
   }
343
   }
205
-}
344
+
345
+  }
206
 </style>
346
 </style>

+ 10 - 1
src/xt_pages/role/components/UserManagement.vue View File

3
   <el-dialog class="userDialog" title="用户管理" width="660px" :visible.sync="visible">
3
   <el-dialog class="userDialog" title="用户管理" width="660px" :visible.sync="visible">
4
     <div class="userManagement">
4
     <div class="userManagement">
5
       <el-table
5
       <el-table
6
+        v-loading="loading"
6
         :row-style="{ color: '#303133' }"
7
         :row-style="{ color: '#303133' }"
7
         :header-cell-style="{
8
         :header-cell-style="{
8
           backgroundColor: 'rgb(245, 247, 250)',
9
           backgroundColor: 'rgb(245, 247, 250)',
98
         admin_user: [],
99
         admin_user: [],
99
         local_user_id: 0,
100
         local_user_id: 0,
100
         org:null,
101
         org:null,
101
-
102
+        loading:false,
102
 
103
 
103
       }
104
       }
104
     },
105
     },
175
         return parseTime(time, format);
176
         return parseTime(time, format);
176
       },
177
       },
177
       GetAllStaff: function() {
178
       GetAllStaff: function() {
179
+        this.loading = true
180
+
178
         getRoleStaff().then(response => {
181
         getRoleStaff().then(response => {
182
+          this.loading = false
183
+
179
           if (response.data.state === 1) {
184
           if (response.data.state === 1) {
180
             this.admin_user = response.data.data.admins
185
             this.admin_user = response.data.data.admins
181
             this.org = response.data.data.org
186
             this.org = response.data.data.org
192
               }
197
               }
193
             }
198
             }
194
           } else {
199
           } else {
200
+
195
             this.$toast({
201
             this.$toast({
196
               message: response.data.msg
202
               message: response.data.msg
197
             })
203
             })
198
           }
204
           }
205
+        }).catch(err => {
206
+          this.loading = false
207
+          this.$message.error(err)
199
         })
208
         })
200
       },
209
       },
201
 
210
 

+ 5 - 2
src/xt_pages/role/role.vue View File

11
         >新增</el-button
11
         >新增</el-button
12
       >
12
       >
13
     </div>
13
     </div>
14
-    <div class="app-container">
14
+    <div class="app-container" v-loading="loading_roles">
15
       <!-- <el-table
15
       <!-- <el-table
16
         :data="roles"
16
         :data="roles"
17
         v-loading="loading_roles"
17
         v-loading="loading_roles"
95
         @did-add-role="didAddRole"
95
         @did-add-role="didAddRole"
96
       ></add-role>
96
       ></add-role>
97
 
97
 
98
-      <permission-settings ref="permission_settings"></permission-settings>
98
+      <permission-settings ref="permission_settings" @delete="deleteRole()"></permission-settings>
99
       <user-management ref="user_management"></user-management>
99
       <user-management ref="user_management"></user-management>
100
 
100
 
101
       <div class="roleTitle">
101
       <div class="roleTitle">
286
     },
286
     },
287
     onClickManagement(role_id) {
287
     onClickManagement(role_id) {
288
       this.$refs.user_management.show(role_id);
288
       this.$refs.user_management.show(role_id);
289
+    },deleteRole(){
290
+      this.$refs.permission_settings.hide();
291
+      this.requestRoleWithPage(1);
289
     }
292
     }
290
   }
293
   }
291
 };
294
 };

+ 13 - 13
src/xt_permission.js View File

10
 
10
 
11
 router.beforeEach((to, from, next) => {
11
 router.beforeEach((to, from, next) => {
12
   // 线上注释
12
   // 线上注释
13
-  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
-    store.dispatch('VerifyConfigList', []).then(() => {
15
-      next()
16
-    })
17
-  }
18
-  if (store.getters.permission_routers === undefined) {
19
-    store.dispatch('xt_GenerateRoutes', []).then(() => {
20
-      next()
21
-    })
22
-  } else {
23
-    next()
24
-  }
25
-  return
13
+  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
14
+  //   store.dispatch('VerifyConfigList', []).then(() => {
15
+  //     next()
16
+  //   })
17
+  // }
18
+  // if (store.getters.permission_routers === undefined) {
19
+  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
20
+  //     next()
21
+  //   })
22
+  // } else {
23
+  //   next()
24
+  // }
25
+  // return
26
   // 线上注释
26
   // 线上注释
27
 
27
 
28
   NProgress.start();
28
   NProgress.start();