Explorar el Código

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

XMLWAN hace 5 años
padre
commit
139be2ecb2

+ 2 - 2
config/dev.env.js Ver fichero

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://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"',
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"',

+ 2 - 2
config/index.js Ver fichero

19
 
19
 
20
     // host: 'xt.test.sgjyun.com',
20
     // host: 'xt.test.sgjyun.com',
21
     // host: 'xt.kuyicloud.com',
21
     // host: 'xt.kuyicloud.com',
22
-    host: 'xt.test.sgjyun.com',
23
-    // host:'localhost',
22
+    // host: 'xt.test.sgjyun.com',
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,

+ 41 - 22
src/api/advice.js Ver fichero

14
   })
14
   })
15
 }
15
 }
16
 
16
 
17
-export function CreateDoctorAdvice(id, advice) {
17
+export function CreateDoctorAdvice(id, advice,mode) {
18
   return request({
18
   return request({
19
-    url: '/api/patients/advice/create?id=' + id,
19
+    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
20
     method: 'post',
20
     method: 'post',
21
-    data: advice
21
+    data: advice,
22
+    headers:{"Permission":3},
23
+
22
   })
24
   })
23
 }
25
 }
24
 
26
 
25
-export function EditDoctorAdvice(patient, id, advice) {
27
+export function EditDoctorAdvice(patient, id, advice,mode) {
26
   return request({
28
   return request({
27
-    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient,
29
+    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient+"&mode="+mode,
28
     method: 'Put',
30
     method: 'Put',
29
-    data: advice
31
+    data: advice,
32
+    headers:{"Permission":2},
33
+
30
   })
34
   })
31
 }
35
 }
32
 
36
 
40
   return request({
44
   return request({
41
     url: '/api/patients/advice/exec',
45
     url: '/api/patients/advice/exec',
42
     method: 'Post',
46
     method: 'Post',
43
-    params: params
47
+    params: params,
48
+    headers:{"Permission":2},
49
+
44
   })
50
   })
45
 }
51
 }
46
 export function CheckDoctorAdvice(patient, id,mode) {
52
 export function CheckDoctorAdvice(patient, id,mode) {
53
   return request({
59
   return request({
54
     url: '/api/patients/advice/check',
60
     url: '/api/patients/advice/check',
55
     method: 'Post',
61
     method: 'Post',
56
-    params: params
62
+    params: params,
63
+    headers:{"Permission":2},
64
+
57
   })
65
   })
58
 }
66
 }
59
-export function CheckGroupAdvice(groupno) {
67
+export function CheckGroupAdvice(groupno,mode) {
60
   var params = {
68
   var params = {
61
-    groupno: groupno
69
+    groupno: groupno,
70
+    mode: mode,
62
   }
71
   }
63
   return request({
72
   return request({
64
     url: '/api/patients/advice/checkgroup',
73
     url: '/api/patients/advice/checkgroup',
65
     method: 'Post',
74
     method: 'Post',
66
-    params: params
75
+    params: params,
76
+    headers:{"Permission":2},
77
+
67
   })
78
   })
68
 }
79
 }
69
 
80
 
98
   })
109
   })
99
 }
110
 }
100
 
111
 
101
-export function DeleteDoctorAdvice(id) {
112
+export function DeleteDoctorAdvice(id,mode) {
102
   return request({
113
   return request({
103
-    url: '/api/patients/advice/delete?id=' + id,
104
-    method: 'Delete'
114
+    url: '/api/patients/advice/delete?id=' + id+"&mode="+mode,
115
+    method: 'Delete',
116
+    headers:{"Permission":2},
117
+
105
   })
118
   })
106
 }
119
 }
107
 
120
 
199
   })
212
   })
200
 }
213
 }
201
 
214
 
202
-export function CreateGroupAdvice(id, groupno, advices) {
215
+export function CreateGroupAdvice(id, groupno, advices,mode) {
203
   if (advices.remind > 0) {
216
   if (advices.remind > 0) {
204
     return request({
217
     return request({
205
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
218
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
206
       method: 'post',
219
       method: 'post',
207
-      data: advices
220
+      data: advices,
221
+      headers:{"Permission":2},
222
+
208
     })
223
     })
209
   } else {
224
   } else {
210
     return request({
225
     return request({
211
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno,
226
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
212
       method: 'post',
227
       method: 'post',
213
-      data: advices
228
+      data: advices,
229
+      headers:{"Permission":2},
230
+
214
     })
231
     })
215
   }
232
   }
216
 }
233
 }
217
-export function DeleteGroupAdvice(groupno) {
234
+export function DeleteGroupAdvice(groupno,mode) {
218
   return request({
235
   return request({
219
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno,
220
-    method: 'delete'
236
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno+"&mode="+mode,
237
+    method: 'delete',
238
+    headers:{"Permission":3},
239
+
221
   })
240
   })
222
 }
241
 }
223
 
242
 

+ 12 - 0
src/api/role/role.js Ver fichero

101
   })
101
   })
102
 }
102
 }
103
 
103
 
104
+
105
+
106
+export function getRoleInfo(params) {
107
+  return request({
108
+    url: '/api/role',
109
+    method: 'get',
110
+    params:params
111
+  })
112
+}
113
+
114
+
115
+

+ 39 - 44
src/store/modules/xt_user.js Ver fichero

1
-import {
2
-  verifyToken,
3
-  modifyAdminInfo
4
-} from '@/api/login/login'
1
+import { modifyAdminInfo, verifyToken } from '@/api/login/login'
5
 // import { mapGetters } from 'vuex'
2
 // import { mapGetters } from 'vuex'
6
 // import { getToken, setToken, removeToken } from '@/utils/auth'
3
 // import { getToken, setToken, removeToken } from '@/utils/auth'
7
-import {
8
-  getAdminUserInfoCache,
9
-  cacheAdminUserInfo,
10
-  removeAdminUserInfoCache
11
-} from '@/utils/admin_info_cache'
4
+import { cacheAdminUserInfo, getAdminUserInfoCache, removeAdminUserInfoCache } from '@/utils/admin_info_cache'
12
 import { getFiledConfigList, setFiledConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
5
 import { getFiledConfigList, setFiledConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
13
 
6
 
14
 const xt_user = {
7
 const xt_user = {
26
       user_type: 0, // 用户类型(1.管理员;2.医生;3.护士;4.运营)
19
       user_type: 0, // 用户类型(1.管理员;2.医生;3.护士;4.运营)
27
       user_title: 0 // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管)
20
       user_title: 0 // 用户职称(1.医士;2.医师;3.住院医师;4.主治医师;5.副主任医师;6.主任医师;7.护士;8.护师;9.主管护师;10.副主任护师;11.主任护师;12.运营专员;13.运营主管)
28
     },
21
     },
29
-    template_info:{
22
+    template_info: {
30
       id: 0,
23
       id: 0,
31
-      org_id:0,
32
-      template_id:0,
24
+      org_id: 0,
25
+      template_id: 0
33
     },
26
     },
34
 
27
 
35
     org: {
28
     org: {
57
 
50
 
58
     // 示例: ['', '',]
51
     // 示例: ['', '',]
59
     urlfors: [],
52
     urlfors: [],
60
-    fileds:[],
53
+    fileds: []
61
   },
54
   },
62
 
55
 
63
   mutations: {
56
   mutations: {
102
       state.cdm_role_exist = cur_info.cdm_role_exist
95
       state.cdm_role_exist = cur_info.cdm_role_exist
103
       state.mall_role_exist = cur_info.mall_role_exist
96
       state.mall_role_exist = cur_info.mall_role_exist
104
 
97
 
105
-
106
       state.template_info.id = cur_info.template_info.id
98
       state.template_info.id = cur_info.template_info.id
107
       state.template_info.org_id = cur_info.template_info.org_id
99
       state.template_info.org_id = cur_info.template_info.org_id
108
       state.template_info.template_id = cur_info.template_info.template_id
100
       state.template_info.template_id = cur_info.template_info.template_id
109
 
101
 
110
-
111
     },
102
     },
112
 
103
 
113
     SET_FILEDS: (state, payload) => {
104
     SET_FILEDS: (state, payload) => {
114
       state.fileds = payload.fileds
105
       state.fileds = payload.fileds
115
     },
106
     },
116
 
107
 
117
-
118
     SET_URLFORS: (state, payload) => {
108
     SET_URLFORS: (state, payload) => {
119
       state.urlfors = payload.urlfors
109
       state.urlfors = payload.urlfors
120
     },
110
     },
123
       state.user.user_name = payload.user_name
113
       state.user.user_name = payload.user_name
124
       state.user.avatar = payload.avatar
114
       state.user.avatar = payload.avatar
125
     },
115
     },
126
-    MODIFY_ORG_INFO:(state, payload) => {
116
+    MODIFY_ORG_INFO: (state, payload) => {
127
       state.org.org_name = payload.org_name
117
       state.org.org_name = payload.org_name
128
       state.org.org_short_name = payload.org_short_name
118
       state.org.org_short_name = payload.org_short_name
129
     },
119
     },
180
   },
170
   },
181
 
171
 
182
   actions: {
172
   actions: {
183
-    SetScheduleTypeSelected({commit }, schedule_type_selected) {
173
+    SetScheduleTypeSelected({ commit }, schedule_type_selected) {
184
       commit('SET_SCHEDULE_TYPE_SELECTED', schedule_type_selected)
174
       commit('SET_SCHEDULE_TYPE_SELECTED', schedule_type_selected)
185
     },
175
     },
186
     SetZoneSelected({ commit }, zone_selected) {
176
     SetZoneSelected({ commit }, zone_selected) {
187
       commit('SET_ZONE_SELECTED', zone_selected)
177
       commit('SET_ZONE_SELECTED', zone_selected)
188
     },
178
     },
189
     SetSubscibePatients({
179
     SetSubscibePatients({
190
-      commit,
191
-      state
192
-    }) {
180
+                          commit,
181
+                          state
182
+                        }) {
193
       commit('SET_SUBSCIBE_PATIENT')
183
       commit('SET_SUBSCIBE_PATIENT')
194
     },
184
     },
195
 
185
 
196
     VerifyToken({
186
     VerifyToken({
197
-      commit,
198
-      state
199
-    }, token) {
187
+                  commit,
188
+                  state
189
+                }, token) {
200
 
190
 
201
       // console.log('验证 token 之前:token = ' + token)
191
       // console.log('验证 token 之前:token = ' + token)
202
       return new Promise((resolve, reject) => {
192
       return new Promise((resolve, reject) => {
218
             cur_app_id: infoJSON.current_app_id,
208
             cur_app_id: infoJSON.current_app_id,
219
             org: infoJSON.org,
209
             org: infoJSON.org,
220
             subscibe: infoJSON.subscibe,
210
             subscibe: infoJSON.subscibe,
221
-            template_info:infoJSON.template_info,
211
+            template_info: infoJSON.template_info,
222
             scrm_role_exist: infoJSON.scrm_role_exist,
212
             scrm_role_exist: infoJSON.scrm_role_exist,
223
             cdm_role_exist: infoJSON.cdm_role_exist,
213
             cdm_role_exist: infoJSON.cdm_role_exist,
224
             mall_role_exist: infoJSON.mall_role_exist
214
             mall_role_exist: infoJSON.mall_role_exist
228
             urlfors: infoJSON.urlfors
218
             urlfors: infoJSON.urlfors
229
           })
219
           })
230
 
220
 
231
-
232
           resolve(infoJSON.user.user_id)
221
           resolve(infoJSON.user.user_id)
233
         } else {
222
         } else {
234
           verifyToken(token).then(response => {
223
           verifyToken(token).then(response => {
242
                 cur_app_id: data.current_app_id,
231
                 cur_app_id: data.current_app_id,
243
                 org: data.org,
232
                 org: data.org,
244
                 subscibe: data.subscibe,
233
                 subscibe: data.subscibe,
245
-                template_info:data.template_info,
234
+                template_info: data.template_info,
246
                 scrm_role_exist: data.scrm_role_exist,
235
                 scrm_role_exist: data.scrm_role_exist,
247
                 cdm_role_exist: data.cdm_role_exist,
236
                 cdm_role_exist: data.cdm_role_exist,
248
-                mall_role_exist: data.mall_role_exist,
237
+                mall_role_exist: data.mall_role_exist
249
               })
238
               })
250
 
239
 
251
               this.commit('SET_URLFORS', {
240
               this.commit('SET_URLFORS', {
271
       })
260
       })
272
     },
261
     },
273
     ModifyAdminUserInfo({
262
     ModifyAdminUserInfo({
274
-      commit,
275
-      state
276
-    }, params) {
263
+                          commit,
264
+                          state
265
+                        }, params) {
277
       commit('MODIFY_USER_INFO', {
266
       commit('MODIFY_USER_INFO', {
278
         user_name: params.user_name,
267
         user_name: params.user_name,
279
         avatar: params.avatar
268
         avatar: params.avatar
286
           current_app_id: state.app_id,
275
           current_app_id: state.app_id,
287
           urlfors: state.urlfors,
276
           urlfors: state.urlfors,
288
           subscibe: state.subscibe,
277
           subscibe: state.subscibe,
289
-          template_info:state.template_info,
278
+          template_info: state.template_info,
290
           scrm_role_exist: state.scrm_role_exist,
279
           scrm_role_exist: state.scrm_role_exist,
291
           cdm_role_exist: state.cdm_role_exist,
280
           cdm_role_exist: state.cdm_role_exist,
292
-          mall_role_exist: state.mall_role_exist,
281
+          mall_role_exist: state.mall_role_exist
293
         })
282
         })
294
       )
283
       )
295
     },
284
     },
296
     ModifyOrgInfo({
285
     ModifyOrgInfo({
297
-      commit,
298
-      state
299
-    }, params) {
286
+                    commit,
287
+                    state
288
+                  }, params) {
300
       commit('MODIFY_ORG_INFO', {
289
       commit('MODIFY_ORG_INFO', {
301
         org_name: params.org_name,
290
         org_name: params.org_name,
302
         org_short_name: params.org_short_name
291
         org_short_name: params.org_short_name
309
           current_app_id: state.app_id,
298
           current_app_id: state.app_id,
310
           urlfors: state.urlfors,
299
           urlfors: state.urlfors,
311
           subscibe: state.subscibe,
300
           subscibe: state.subscibe,
312
-          template_info:state.template_info,
301
+          template_info: state.template_info,
313
           scrm_role_exist: state.scrm_role_exist,
302
           scrm_role_exist: state.scrm_role_exist,
314
           cdm_role_exist: state.cdm_role_exist,
303
           cdm_role_exist: state.cdm_role_exist,
315
           mall_role_exist: state.mall_role_exist
304
           mall_role_exist: state.mall_role_exist
337
     // }
326
     // }
338
     // 登出
327
     // 登出
339
     FrontendLogout({
328
     FrontendLogout({
340
-      commit
341
-    }) {
329
+                     commit
330
+                   }) {
342
       commit('CLEAR_USER_INFO')
331
       commit('CLEAR_USER_INFO')
343
       removeAdminUserInfoCache()
332
       removeAdminUserInfoCache()
344
     }, updateFiledConfigList({ commit }, object) {
333
     }, updateFiledConfigList({ commit }, object) {
346
       var oldFiledList = getFiledConfigList()
335
       var oldFiledList = getFiledConfigList()
347
       var infoJSON = JSON.parse(oldFiledList)
336
       var infoJSON = JSON.parse(oldFiledList)
348
       console.log(object)
337
       console.log(object)
349
-      return new Promise((resolve, reject) =>{
350
-        for (let i = 0; i < infoJSON.length; i++){
351
-          if(infoJSON[i].id == object.id){
338
+      return new Promise((resolve, reject) => {
339
+        for (let i = 0; i < infoJSON.length; i++) {
340
+          if (infoJSON[i].id == object.id) {
352
             infoJSON[i].is_show = object.is_show
341
             infoJSON[i].is_show = object.is_show
353
           }
342
           }
354
         }
343
         }
357
         commit('SET_FILEDS_LIST', infoJSON)
346
         commit('SET_FILEDS_LIST', infoJSON)
358
         resolve()
347
         resolve()
359
       })
348
       })
360
-    },updateAllFiledConfigList({ commit }, object) {
349
+    }, updateAllFiledConfigList({ commit }, object) {
361
       var oldFiledList = getFiledConfigList()
350
       var oldFiledList = getFiledConfigList()
362
       var infoJSON = JSON.parse(oldFiledList)
351
       var infoJSON = JSON.parse(oldFiledList)
363
 
352
 
364
-      return new Promise((resolve, reject) =>{
353
+      return new Promise((resolve, reject) => {
365
         infoJSON = object
354
         infoJSON = object
366
         setFiledConfigList(JSON.stringify(infoJSON))
355
         setFiledConfigList(JSON.stringify(infoJSON))
367
         commit('SET_FILEDS_LIST', infoJSON)
356
         commit('SET_FILEDS_LIST', infoJSON)
368
         resolve()
357
         resolve()
369
       })
358
       })
359
+    }, ModifyAdminUserOrgInfo({ commit, state }, obj) {
360
+        this.commit('SET_CURRENT_INFO',obj)
361
+    },ModifyUrlInfo({ commit, state }, obj) {
362
+      this.commit('SET_URLFORS', obj)
363
+    },ModifyFiled({ commit, state }, obj) {
364
+      commit('SET_FILEDS', obj)
370
     }
365
     }
371
   }
366
   }
372
 }
367
 }

+ 32 - 12
src/views/layout/components/Navbar.vue Ver fichero

64
       </div>
64
       </div>
65
     </el-menu>-->
65
     </el-menu>-->
66
     <div class="dropdownBox">
66
     <div class="dropdownBox">
67
-      <el-dropdown trigger="click" @command="handleOrgCommand">
67
+      <!--<el-dropdown trigger="click" @command="handleOrgCommand">-->
68
         <span class="el-dropdown-link">
68
         <span class="el-dropdown-link">
69
           {{ 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">
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>
74
-        </el-dropdown-menu>
75
-      </el-dropdown>
72
+        <!--<el-dropdown-menu slot="dropdown">-->
73
+          <!--&lt;!&ndash;<el-dropdown-item   icon="el-icon-plus">{{item.org_name}}</el-dropdown-item>&ndash;&gt;-->
74
+
75
+          <!--<el-dropdown-item   icon="el-icon-plus" v-for="(item,index) in orgs" :key="index"  :command="item.id">{{item.org_name}}</el-dropdown-item>-->
76
+        <!--</el-dropdown-menu>-->
77
+      <!--</el-dropdown>-->
76
     </div>
78
     </div>
77
     <div class="navRight">
79
     <div class="navRight">
78
       <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
80
       <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
165
       }
167
       }
166
       changeOrg(params).then(response => {
168
       changeOrg(params).then(response => {
167
         if (response.data.state === 1) {
169
         if (response.data.state === 1) {
168
-          window.location.reload()
170
+          // window.location.reload()
169
 
171
 
170
           this.$message.success('切换成功')
172
           this.$message.success('切换成功')
171
           let data = response.data.data
173
           let data = response.data.data
172
           this.org_id = data.org.id
174
           this.org_id = data.org.id
173
           this.org_name = data.org.org_name
175
           this.org_name = data.org.org_name
174
 
176
 
175
-          this.commit('SET_CURRENT_INFO', {
177
+          this.$store.dispatch("ModifyAdminUserOrgInfo", {
176
             user: data.user,
178
             user: data.user,
177
             cur_org_id: data.current_org_id,
179
             cur_org_id: data.current_org_id,
178
             cur_app_id: data.current_app_id,
180
             cur_app_id: data.current_app_id,
179
             org: data.org,
181
             org: data.org,
180
             subscibe: data.subscibe,
182
             subscibe: data.subscibe,
181
             template_info:data.template_info,
183
             template_info:data.template_info,
182
-          })
184
+          });
183
 
185
 
184
-          this.commit('SET_URLFORS', {
186
+          this.$store.dispatch("ModifyUrlInfo", {
185
             urlfors: data.urlfors
187
             urlfors: data.urlfors
186
-          })
187
 
188
 
188
-          this.commit('SET_FILEDS', {
189
+          });
190
+
191
+          this.$store.dispatch("ModifyFiled", {
189
             fileds: data.fileds
192
             fileds: data.fileds
190
-          })
193
+
194
+
195
+          });
196
+
197
+
198
+
199
+
191
           setFiledConfigList(JSON.stringify(data.fileds))
200
           setFiledConfigList(JSON.stringify(data.fileds))
192
           cacheAdminUserInfo(JSON.stringify(data))
201
           cacheAdminUserInfo(JSON.stringify(data))
193
 
202
 
194
 
203
 
204
+          this.$store.dispatch('xt_GenerateRoutes', this.$store.getters.current_role_urls).then(() => {
205
+            this.$store.dispatch('VerifyConfigList').then(() => {
206
+              // alert('token 验证成功')
207
+              // console.log(this.$store.getters.xt_permission.addRouters)
208
+              this.$router.addRoutes(this.$store.getters.xt_permission.addRouters) // 动态添加可访问路由表
209
+              //        next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
210
+              this.$router.replace({ path: '/' })
211
+            })
212
+          })
213
+
214
+
195
         }else{
215
         }else{
196
           this.$message.success(response.data.msg)
216
           this.$message.success(response.data.msg)
197
         }
217
         }

+ 28 - 21
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue Ver fichero

9
     >
9
     >
10
       <div class="txsj" v-show="showAdvicePanel">
10
       <div class="txsj" v-show="showAdvicePanel">
11
         <el-button round @click="openGroupFrom" :loading="deleLoading"
11
         <el-button round @click="openGroupFrom" :loading="deleLoading"
12
-                   v-if="this.$store.getters.xt_user.user.user_type == 1 || this.$store.getters.xt_user.user.user_type == 2">
12
+                   >
13
           新增医嘱
13
           新增医嘱
14
         </el-button>
14
         </el-button>
15
         <el-button round @click="openGroupFrom" :loading="deleLoading"
15
         <el-button round @click="openGroupFrom" :loading="deleLoading"
16
-                   v-if="this.$store.getters.xt_user.user.user_type == 3" disabled>新增医嘱
16
+                   disabled>新增医嘱
17
         </el-button>
17
         </el-button>
18
 
18
 
19
 
19
 
20
-        <el-button v-if="currentRow != null && this.$store.getters.xt_user.user.user_type == 3" round
20
+        <el-button v-if="currentRow != null" round
21
                    @click="execAdvice" :loading="deleLoading">执行医嘱
21
                    @click="execAdvice" :loading="deleLoading">执行医嘱
22
         </el-button>
22
         </el-button>
23
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
23
         <el-button v-else disabled round @click="execAdvice" :loading="deleLoading">执行医嘱</el-button>
24
 
24
 
25
-        <el-button v-if="currentRow != null && this.$store.getters.xt_user.user.user_type == 3" round
25
+        <el-button v-if="currentRow != null" round
26
                    @click="checkAdvice" :loading="deleLoading">医嘱核对
26
                    @click="checkAdvice" :loading="deleLoading">医嘱核对
27
         </el-button>
27
         </el-button>
28
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
28
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
29
 
29
 
30
         <el-button
30
         <el-button
31
-          v-if="groupSelectRow != null&& (this.$store.getters.xt_user.user.user_type == 1  || this.$store.getters.xt_user.user.user_type == 2)"
31
+          v-if="groupSelectRow != null"
32
           round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱
32
           round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱
33
         </el-button>
33
         </el-button>
34
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
34
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
35
 
35
 
36
 
36
 
37
         <el-button
37
         <el-button
38
-          v-if="groupSelectRow != null&& (this.$store.getters.xt_user.user.user_type == 1  || this.$store.getters.xt_user.user.user_type == 2)"
38
+          v-if="groupSelectRow != null"
39
           round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱
39
           round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱
40
         </el-button>
40
         </el-button>
41
         <el-button v-else disabled round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱</el-button>
41
         <el-button v-else disabled round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱</el-button>
61
 
61
 
62
         </el-table-column>
62
         </el-table-column>
63
         <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"
63
         <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"
64
-                         v-if="(this.$store.getters.xt_user.user.user_type == 1 || this.$store.getters.xt_user.user.user_type == 2)">
64
+                         >
65
           <template slot-scope="scope">
65
           <template slot-scope="scope">
66
 
66
 
67
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0 ">
67
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0 ">
89
           </template>
89
           </template>
90
         </el-table-column>
90
         </el-table-column>
91
 
91
 
92
-        <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"
93
-                         v-else>
94
-          <template slot-scope="scope">
95
-            <span v-if="scope.row.parent_id == 0 " class="el-dropdown-link">{{getAdviceContent(scope.row,1)}}</span>
96
-            <span v-if="scope.row.parent_id > 0 "
97
-                  class="el-dropdown-link">&emsp;{{getAdviceContent(scope.row,2)}}</span>
98
-          </template>
99
-        </el-table-column>
92
+        <!--<el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center"-->
93
+                         <!--v-else>-->
94
+          <!--<template slot-scope="scope">-->
95
+            <!--<span v-if="scope.row.parent_id == 0 " class="el-dropdown-link">{{getAdviceContent(scope.row,1)}}</span>-->
96
+            <!--<span v-if="scope.row.parent_id > 0 "-->
97
+                  <!--class="el-dropdown-link">&emsp;{{getAdviceContent(scope.row,2)}}</span>-->
98
+          <!--</template>-->
99
+        <!--</el-table-column>-->
100
 
100
 
101
         <el-table-column prop="execution_time" align="center" min-width="30px" label="执行时间">
101
         <el-table-column prop="execution_time" align="center" min-width="30px" label="执行时间">
102
           <template slot-scope="scope">
102
           <template slot-scope="scope">
436
           this.$message.error('没有选择患者')
436
           this.$message.error('没有选择患者')
437
           return false
437
           return false
438
         }
438
         }
439
-        EditDoctorAdvice(this.patient.id, this.form.id, this.form).then(response => {
439
+        console.log(this.form)
440
+        let mode = 2
441
+        EditDoctorAdvice(this.patient.id, this.form.id, this.form,mode).then(response => {
440
           if (response.data.state == 0) {
442
           if (response.data.state == 0) {
441
             this.$message.error(response.data.msg)
443
             this.$message.error(response.data.msg)
442
             return false
444
             return false
668
           return false
670
           return false
669
         }
671
         }
670
         this.exceLoading = true
672
         this.exceLoading = true
673
+        let mode = "6"
671
 
674
 
672
-        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime).then(response => {
675
+        ExecDoctorAdvice(this.patient.id, this.currentRow.id, this.execTime,mode).then(response => {
673
           if (response.data.state == 0) {
676
           if (response.data.state == 0) {
674
             this.$message.error('执行失败!')
677
             this.$message.error('执行失败!')
675
             this.exceLoading = false
678
             this.exceLoading = false
722
           this.$message.error('没有选择患者')
725
           this.$message.error('没有选择患者')
723
           return false
726
           return false
724
         }
727
         }
728
+        let mode ="1"
725
 
729
 
726
-        CreateDoctorAdvice(this.patient.id, this.form).then(response => {
730
+        CreateDoctorAdvice(this.patient.id, this.form,mode).then(response => {
727
           this.loading = false
731
           this.loading = false
728
           if (response.data.state == 0) {
732
           if (response.data.state == 0) {
729
             this.$message.error(response.data.msg)
733
             this.$message.error(response.data.msg)
1021
           cancelButtonText: '取消',
1025
           cancelButtonText: '取消',
1022
           type: 'warning'
1026
           type: 'warning'
1023
         }).then(() => {
1027
         }).then(() => {
1024
-          DeleteGroupAdvice(groupno).then(response => {
1028
+          let mode ="4"
1029
+          DeleteGroupAdvice(groupno,mode).then(response => {
1025
             if (response.data.state == 0) {
1030
             if (response.data.state == 0) {
1026
               this.$message.error(response.data.msg)
1031
               this.$message.error(response.data.msg)
1027
               return false
1032
               return false
1054
           type: 'warning'
1059
           type: 'warning'
1055
         }).then(() => {
1060
         }).then(() => {
1056
           this.deleLoading = true
1061
           this.deleLoading = true
1057
-          DeleteDoctorAdvice(this.currentRow.id).then(response => {
1062
+          let mode = "4"
1063
+          DeleteDoctorAdvice(this.currentRow.id,mode).then(response => {
1058
             this.deleLoading = false
1064
             this.deleLoading = false
1059
             if (response.data.state == 0) {
1065
             if (response.data.state == 0) {
1060
               this.$message.error(response.data.msg)
1066
               this.$message.error(response.data.msg)
1087
           type: 'warning'
1093
           type: 'warning'
1088
         }).then(() => {
1094
         }).then(() => {
1089
           this.deleLoading = true
1095
           this.deleLoading = true
1090
-          DeleteDoctorAdvice(this.currentRow.id).then(response => {
1096
+          let mode ="4"
1097
+          DeleteDoctorAdvice(this.currentRow.id,mode).then(response => {
1091
             this.deleLoading = false
1098
             this.deleLoading = false
1092
             if (response.data.state == 0) {
1099
             if (response.data.state == 0) {
1093
               this.$message.error(response.data.msg)
1100
               this.$message.error(response.data.msg)

+ 3 - 1
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue Ver fichero

674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
675
           }
675
           }
676
           submitForm.adviceNames = adviceNames;
676
           submitForm.adviceNames = adviceNames;
677
-          CreateGroupAdvice(this.patientID, 0, submitForm).then(response => {
677
+          let mode = "1"
678
+
679
+          CreateGroupAdvice(this.patientID, 0, submitForm,mode).then(response => {
678
             if (response.data.state == 0) {
680
             if (response.data.state == 0) {
679
               this.$message.error(response.data.msg);
681
               this.$message.error(response.data.msg);
680
               return false;
682
               return false;

+ 17 - 6
src/xt_pages/dialysis/details/dialog/adviceDialog/EditGroupAdvice.vue Ver fichero

594
         }
594
         }
595
         console.log(this.groupSelectRow)
595
         console.log(this.groupSelectRow)
596
         var content = ''
596
         var content = ''
597
+
597
         if (this.groupSelectRow.children.length > 0) {
598
         if (this.groupSelectRow.children.length > 0) {
598
           content = '确认删除此医嘱内容,包括它的子药?'
599
           content = '确认删除此医嘱内容,包括它的子药?'
599
         } else {
600
         } else {
607
           cancelButtonText: '取消',
608
           cancelButtonText: '取消',
608
           type: 'warning'
609
           type: 'warning'
609
         }).then(() => {
610
         }).then(() => {
610
-          DeleteDoctorAdvice(this.groupSelectRow.id).then(response => {
611
+          let mode = "4"
612
+          DeleteDoctorAdvice(this.groupSelectRow.id,mode).then(response => {
611
             if (response.data.state == 0) {
613
             if (response.data.state == 0) {
612
               this.$message.error(response.data.msg)
614
               this.$message.error(response.data.msg)
613
               return false
615
               return false
700
                 parent_id: _this.groupSelectRow.parent_id,
702
                 parent_id: _this.groupSelectRow.parent_id,
701
                 groupno: _this.groupForm.groupno
703
                 groupno: _this.groupForm.groupno
702
               }
704
               }
703
-              EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm).then(response => {
705
+              let mode = "2"
706
+
707
+              EditDoctorAdvice(this.patientID, this.groupSelectRow.id, submitForm,mode).then(response => {
704
                 if (response.data.state == 0) {
708
                 if (response.data.state == 0) {
705
                   this.$message.error(response.data.msg)
709
                   this.$message.error(response.data.msg)
706
                   return false
710
                   return false
799
                   parent_id: _this.groupSelectRow.id,
803
                   parent_id: _this.groupSelectRow.id,
800
                   groupno: _this.groupForm.groupno
804
                   groupno: _this.groupForm.groupno
801
                 }
805
                 }
806
+                let mode = "1"
802
 
807
 
803
-                CreateDoctorAdvice(this.patientID, submitForm).then(response => {
808
+                CreateDoctorAdvice(this.patientID, submitForm,mode).then(response => {
804
                   if (response.data.state == 0) {
809
                   if (response.data.state == 0) {
805
                     this.$message.error(response.data.msg)
810
                     this.$message.error(response.data.msg)
806
                     return false
811
                     return false
871
                   remark: _this.groupForm.remark,
876
                   remark: _this.groupForm.remark,
872
                   parent_id: 0
877
                   parent_id: 0
873
                 }
878
                 }
874
-                CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
879
+                let mode = "1"
880
+
881
+                CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm, mode).then(response => {
875
                   if (response.data.state == 0) {
882
                   if (response.data.state == 0) {
876
                     _this.$message.error(response.data.msg)
883
                     _this.$message.error(response.data.msg)
877
                     return false
884
                     return false
1371
           }
1378
           }
1372
           this.submitGroupForm.adviceNames.unshift(item)
1379
           this.submitGroupForm.adviceNames.unshift(item)
1373
         }
1380
         }
1381
+        let mode = "1"
1374
 
1382
 
1375
-        CreateGroupAdvice(this.patientID, this.groupForm.groupno, this.submitGroupForm).then(response => {
1383
+
1384
+        CreateGroupAdvice(this.patientID, this.groupForm.groupno, this.submitGroupForm,mode).then(response => {
1376
           if (response.data.state == 0) {
1385
           if (response.data.state == 0) {
1377
             this.$message.error(response.data.msg)
1386
             this.$message.error(response.data.msg)
1378
             return false
1387
             return false
1537
 
1546
 
1538
                 _this.submitGroupForm.adviceNames.push(item)
1547
                 _this.submitGroupForm.adviceNames.push(item)
1539
               }
1548
               }
1549
+              let mode = "1"
1550
+
1540
 
1551
 
1541
-              CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm).then(response => {
1552
+              CreateGroupAdvice(_this.patientID, _this.groupForm.groupno, _this.submitGroupForm,mode).then(response => {
1542
                 if (response.data.state == 0) {
1553
                 if (response.data.state == 0) {
1543
                   _this.$message.error(response.data.msg)
1554
                   _this.$message.error(response.data.msg)
1544
                   return false
1555
                   return false

+ 1 - 0
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue Ver fichero

801
           dry_weight: this.weight_adjust.weight,
801
           dry_weight: this.weight_adjust.weight,
802
           remark: this.weight_adjust.remark,
802
           remark: this.weight_adjust.remark,
803
           doctor_id: this.weight_adjust.doctor,
803
           doctor_id: this.weight_adjust.doctor,
804
+          mode : "1",
804
         };
805
         };
805
         CreateDryWeight(params).then(response => {
806
         CreateDryWeight(params).then(response => {
806
           if (response.data.state == 0) {
807
           if (response.data.state == 0) {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1810 - 2288
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue


+ 5 - 0
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue Ver fichero

1052
         type: "warning"
1052
         type: "warning"
1053
       })
1053
       })
1054
         .then(() => {
1054
         .then(() => {
1055
+          let mode = "4"
1056
+          // if(this.table_current_row)
1057
+
1058
+
1055
           const params = {
1059
           const params = {
1056
             patient_id: this.patient_id,
1060
             patient_id: this.patient_id,
1057
             record_id: this.table_current_row.id
1061
             record_id: this.table_current_row.id
1062
+
1058
           };
1063
           };
1059
 
1064
 
1060
           postDelMonitorInfo(params).then(response => {
1065
           postDelMonitorInfo(params).then(response => {

+ 0 - 1
src/xt_pages/role/admin.vue Ver fichero

176
   },
176
   },
177
   created: function() {
177
   created: function() {
178
     this.local_user_id = this.$store.getters.xt_user.user.id
178
     this.local_user_id = this.$store.getters.xt_user.user.id
179
-    this.local_user_id = 597
180
     let page = 1
179
     let page = 1
181
     this.getRoles(page)
180
     this.getRoles(page)
182
     adminMainView()
181
     adminMainView()

+ 16 - 17
src/xt_pages/role/components/AdminInfoForm.vue Ver fichero

177
                   }
177
                   }
178
                 }
178
                 }
179
 
179
 
180
-
181
-
182
-
183
-
184
-
185
-
186
-                // if (this.roles.length > 0) {
187
-                //   this.form.role = this.roles[0].id;
188
-                //   console.log("国庆快乐",this.form.role)
189
-                // }
190
               } else {
180
               } else {
191
                 this.$message.error(resp.msg)
181
                 this.$message.error(resp.msg)
192
               }
182
               }
228
                 this.form.intro = admin.intro
218
                 this.form.intro = admin.intro
229
                 this.form.user_title_name = admin.user_title_name
219
                 this.form.user_title_name = admin.user_title_name
230
 
220
 
231
-
221
+                this.isSubSuperAdmin = resp.data.isSubSuperAdmin
222
+                this.org = resp.data.org
232
 
223
 
233
                 //如果当前用户是超级管理员而且编辑自己的信息
224
                 //如果当前用户是超级管理员而且编辑自己的信息
234
-                if(this.isSubSuperAdmin || this.admin_id == org.creator){
235
-                  for (let i =0 ; i < this.roles.length; i++){
236
-                    if(this.roles[i].is_system == 1 && this.roles[i].role_name == "子管理员"){
225
+
226
+                if(!this.isSubSuperAdmin) {
227
+                  if (this.form.id == org.creator) {
228
+                    for (let i = 0; i < this.roles.length; i++) {
229
+                      if (this.roles[i].is_system == 1 && this.roles[i].name == "子管理员") {
230
+                        this.roles.splice(i, 1)
231
+                        i--
232
+                      }
233
+                    }
234
+                  }
235
+                }else{
236
+                  for (let i = 0; i < this.roles.length; i++) {
237
+                    if (this.roles[i].is_system == 1 && this.roles[i].name == "子管理员") {
237
                       this.roles.splice(i, 1)
238
                       this.roles.splice(i, 1)
238
                       i--
239
                       i--
239
                     }
240
                     }
240
                   }
241
                   }
241
-                }
242
-
243
-
244
 
242
 
243
+                }
245
 
244
 
246
               } else {
245
               } else {
247
                 this.$message.error('该用户不存在')
246
                 this.$message.error('该用户不存在')

+ 2 - 2
src/xt_pages/role/components/AdminRoleInfoForm.vue Ver fichero

129
           return
129
           return
130
         }
130
         }
131
         let local_user_id = this.$store.getters.xt_user.user.id
131
         let local_user_id = this.$store.getters.xt_user.user.id
132
-        local_user_id = 597
133
         this.form.id = this.admin_id
132
         this.form.id = this.admin_id
134
         this.formTitle = '编辑用户'
133
         this.formTitle = '编辑用户'
135
         getModifyAdminInitData(this.form.id)
134
         getModifyAdminInitData(this.form.id)
206
                     }, 500)
205
                     }, 500)
207
 
206
 
208
                     this.$emit('did-edit-admin')
207
                     this.$emit('did-edit-admin')
208
+                    this.$refs.form.resetFields();
209
 
209
 
210
                   } else {
210
                   } else {
211
                     this.$message.error(resp.msg)
211
                     this.$message.error(resp.msg)
231
                   this.loading = false
231
                   this.loading = false
232
                   var resp = rs.data
232
                   var resp = rs.data
233
                   if (resp.state === 1) {
233
                   if (resp.state === 1) {
234
-                   console.log("11111111")
235
                     this.$emit('did-edit-admin')
234
                     this.$emit('did-edit-admin')
235
+                    this.$refs.form.resetFields();
236
 
236
 
237
                   } else {
237
                   } else {
238
                     this.$message.error(resp.msg)
238
                     this.$message.error(resp.msg)

+ 60 - 14
src/xt_pages/role/components/EditRole.vue Ver fichero

121
 </template>
121
 </template>
122
 
122
 
123
 <script>
123
 <script>
124
-  import { addRole, AddUserRole, getStaffsList, modifyRole } from '@/api/role/role'
124
+  import { addRole, AddUserRole, getStaffsList, modifyRole,getRoleInfo } from '@/api/role/role'
125
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
125
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
126
 
126
 
127
   export default {
127
   export default {
146
       }
146
       }
147
 
147
 
148
       return {
148
       return {
149
+        org:null,
149
         submitLoading:false,
150
         submitLoading:false,
150
         loading:true,
151
         loading:true,
152
+        local_user_id:0,
151
         form: {
153
         form: {
152
           id: 0,
154
           id: 0,
153
           name: '',
155
           name: '',
253
 
255
 
254
       },
256
       },
255
       change(val) {
257
       change(val) {
256
-
257
         if (this.checkedCities.length == this.admin_user.length) {
258
         if (this.checkedCities.length == this.admin_user.length) {
258
-
259
           this.checkAll = true
259
           this.checkAll = true
260
         } else {
260
         } else {
261
           this.checkAll = false
261
           this.checkAll = false
262
-
263
         }
262
         }
264
-
265
-      }
266
-
267
-      ,
263
+      },
268
       GetAllStaff: function() {
264
       GetAllStaff: function() {
269
         getStaffsList()
265
         getStaffsList()
270
           .then(rs => {
266
           .then(rs => {
271
             var resp = rs.data
267
             var resp = rs.data
272
             if (resp.state === 1) {
268
             if (resp.state === 1) {
273
               this.admin_user = resp.data.admins
269
               this.admin_user = resp.data.admins
270
+              this.org = resp.data.org
271
+              this.isSubSuperAdmin = resp.data.isSubSuperAdmin;
272
+
274
               for (let i = 0; i < this.admin_user.length; i++) {
273
               for (let i = 0; i < this.admin_user.length; i++) {
275
                 if (this.admin_user[i].role_ids.length > 0) {
274
                 if (this.admin_user[i].role_ids.length > 0) {
276
                   let isExist = -1
275
                   let isExist = -1
283
                   }
282
                   }
284
                 }
283
                 }
285
               }
284
               }
285
+              console.log(this.admin_user)
286
+
287
+
286
               for (let i = 0; i < this.admin_user.length; i++) {
288
               for (let i = 0; i < this.admin_user.length; i++) {
287
-                if (this.admin_user[i].user_id == resp.data.org.creator) {
289
+                if (this.isSubSuperAdmin) { //如果当前用户是子管理员,则将管理员剔除到待添加员工列表
290
+                  console.log(this.admin_user[i].user_id)
291
+                  console.log(this.org.creator)
288
 
292
 
289
-                  this.admin_user.splice(i, 1)
290
-                  i = i - 1
293
+                  if (this.admin_user[i].user_id == this.org.creator) {
294
+                    this.admin_user.splice(i, 1);
295
+                    i = i - 1;
296
+                  } else {
297
+                    if (this.admin_user[i].is_sub_admin && this.admin_user[i].user_id != this.local_user_id) {
298
+                      this.admin_user.splice(i, 1);
299
+                      i = i - 1;
300
+                    }
301
+                  }
302
+                } else { //如果当前用户是超级管理员,而且当前编辑角色是子管理员的话,需要将超级管理员剔除到待添加员工列表
303
+                  if (this.role.name == "子管理员" && this.role.is_system == 1) {
304
+                    if (this.admin_user[i].user_id == this.org.creator) {
305
+                      this.admin_user.splice(i, 1);
306
+                      i = i - 1;
307
+                    }
308
+                  }
291
                 }
309
                 }
292
               }
310
               }
311
+
312
+
313
+
293
               this.loading = false
314
               this.loading = false
294
 
315
 
295
             } else {
316
             } else {
321
         this.admin_user = []
342
         this.admin_user = []
322
         this.is_check_admin_user = []
343
         this.is_check_admin_user = []
323
         this.checkedCities = []
344
         this.checkedCities = []
324
-        this.GetAllStaff()
325
-      },
326
-      hide() {
345
+        this.local_user_id = this.$store.getters.xt_user.user.id
346
+
347
+        this.getRoleInfo(role_id)
348
+      },getRoleInfo(id){
349
+        let params = {
350
+          role_id: id
351
+        }
352
+        getRoleInfo(params)
353
+          .then(rs => {
354
+            var resp = rs.data
355
+            if (resp.state === 1) {
356
+              this.role = resp.data.role
357
+              this.loading = true
358
+              this.GetAllStaff()
359
+
360
+
361
+            } else {
362
+              this.$message.error(resp.msg)
363
+
364
+            }
365
+          })
366
+          .catch(err => {
367
+            this.$message.error(err)
368
+          })
369
+
370
+
371
+
372
+      }, hide() {
327
         this.clear()
373
         this.clear()
328
         this.visible = false
374
         this.visible = false
329
       },
375
       },

+ 44 - 4
src/xt_pages/role/components/UserManagement.vue Ver fichero

38
           <template slot-scope="scope" style="text-align: center">
38
           <template slot-scope="scope" style="text-align: center">
39
             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
39
             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
40
               <el-button  type="primary" icon="el-icon-edit-outline" size="small"
40
               <el-button  type="primary" icon="el-icon-edit-outline" size="small"
41
-                         v-if="org.creator != scope.row.user_id && (scope.row.user_id != local_user_id) && !scope.row.is_sub_super_admin"
41
+                         v-if="isShow(scope.row.is_sub_super_admin,scope.row.user_id)"
42
                          @click="openForm(scope.row.user_id, role_id)" ></el-button>
42
                          @click="openForm(scope.row.user_id, role_id)" ></el-button>
43
             </el-tooltip>
43
             </el-tooltip>
44
 
44
 
52
                 type="danger"
52
                 type="danger"
53
                 size="small"
53
                 size="small"
54
                 icon="el-icon-delete"
54
                 icon="el-icon-delete"
55
-                v-if="scope.row.status == 1 && org.creator != scope.row.user_id && (scope.row.user_id != local_user_id) && !scope.row.is_sub_super_admin"
55
+                v-if="scope.row.status == 1 && isShowDel(scope.row.is_sub_super_admin, scope.row.user_id) "
56
                 @click="disableAdminAction(scope.row)"
56
                 @click="disableAdminAction(scope.row)"
57
               ></el-button>
57
               ></el-button>
58
             </el-tooltip>
58
             </el-tooltip>
67
                 size="small"
67
                 size="small"
68
                 type="info"
68
                 type="info"
69
                 icon="el-icon-refresh"
69
                 icon="el-icon-refresh"
70
-                v-if="scope.row.status == 0 && org.creator != scope.row.user_id  && (scope.row.user_id != local_user_id ) && !scope.row.is_sub_super_admin"
70
+                v-if="scope.row.status == 0 && isShowDel(scope.row.is_sub_super_admin, scope.row.user_id)"
71
                 @click="recoverAdminAction(scope.row)"
71
                 @click="recoverAdminAction(scope.row)"
72
               ></el-button>
72
               ></el-button>
73
             </el-tooltip>
73
             </el-tooltip>
100
         local_user_id: 0,
100
         local_user_id: 0,
101
         org:null,
101
         org:null,
102
         loading:false,
102
         loading:false,
103
+        isSubSuperAdmin:false,
103
 
104
 
104
       }
105
       }
105
     },
106
     },
106
     methods: {
107
     methods: {
108
+      isShowDel:function(is_sub_admin,user_id){
109
+        if(this.isSubSuperAdmin){ //子管理员
110
+          if(is_sub_admin){ //当前操作的用户是否为子管理员
111
+            return false
112
+          }else{
113
+            if(this.org.creator != user_id){
114
+              return true
115
+            }else{
116
+              return false
117
+            }
118
+          }
119
+        }else{ //超级管理员
120
+          if(this.org.creator == user_id){
121
+            return false
122
+          }else{
123
+            return true
124
+          }
125
+        }
126
+      },
127
+      isShow:function(is_sub_admin,user_id){
128
+        if (!this.isSubSuperAdmin){
129
+          return true
130
+        }else {
131
+          if (is_sub_admin) {
132
+            if (user_id == this.local_user_id) {
133
+              return true
134
+            }else{
135
+              return false
136
+            }
137
+          } else {
138
+            if (user_id != this.org.creator) {
139
+              return true
140
+            } else {
141
+              return false
142
+            }
143
+          }
144
+        }
145
+      },
146
+
107
       didModifyAdmin(){
147
       didModifyAdmin(){
108
         this.GetAllStaff()
148
         this.GetAllStaff()
109
         this.$refs["admininfoform"].close();
149
         this.$refs["admininfoform"].close();
184
           if (response.data.state === 1) {
224
           if (response.data.state === 1) {
185
             this.admin_user = response.data.data.admins
225
             this.admin_user = response.data.data.admins
186
             this.org = response.data.data.org
226
             this.org = response.data.data.org
227
+            this.isSubSuperAdmin = response.data.data.isSubSuperAdmin
187
 
228
 
188
             for (let i = 0; i < this.admin_user.length; i++) {
229
             for (let i = 0; i < this.admin_user.length; i++) {
189
               if (this.admin_user[i].role_ids.length > 0) {
230
               if (this.admin_user[i].role_ids.length > 0) {
213
         this.role_id = role_id
254
         this.role_id = role_id
214
         this.admin_user = []
255
         this.admin_user = []
215
         this.local_user_id = this.$store.getters.xt_user.user.id
256
         this.local_user_id = this.$store.getters.xt_user.user.id
216
-        this.local_user_id = 597
217
         this.GetAllStaff()
257
         this.GetAllStaff()
218
       }
258
       }
219
     }
259
     }

+ 161 - 172
src/xt_pages/user/dialysisSolution.vue Ver fichero

1
 <template>
1
 <template>
2
   <div class="patient-container">
2
   <div class="patient-container">
3
-   <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
4
-   <div class="patient-app-container app-container">
5
-    <div class="Total">
6
-      <!-- <div class="plan" >透析计划</div> -->
7
-      <!-- <table-title title="长期透析处方"></table-title> -->
8
-      <div class="sum">
9
-        <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
10
-        <el-button type="primary" size="small" icon="el-icon-plus"  @click="openNew" :disabled="$store.getters.xt_user.subscibe.state==3?true:false">新增透析处方</el-button>
3
+    <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
4
+    <div class="patient-app-container app-container">
5
+      <div class="Total">
6
+        <!-- <div class="plan" >透析计划</div> -->
7
+        <!-- <table-title title="长期透析处方"></table-title> -->
8
+        <div class="sum">
9
+          <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
10
+          <el-button type="primary" size="small" icon="el-icon-plus" @click="openNew"
11
+                     :disabled="$store.getters.xt_user.subscibe.state==3?true:false">新增透析处方
12
+          </el-button>
13
+        </div>
11
       </div>
14
       </div>
12
-    </div>
13
-    <el-table ref="solutionTable" :data="tableData" border fit highlight-current-row
14
-     @current-change="tableCurrentChange" :header-cell-style="{
15
+      <el-table ref="solutionTable" :data="tableData" border fit highlight-current-row
16
+                @current-change="tableCurrentChange" :header-cell-style="{
15
                   backgroundColor: 'rgb(245, 247, 250)',
17
                   backgroundColor: 'rgb(245, 247, 250)',
16
                   color: '#606266'
18
                   color: '#606266'
17
                 }"
19
                 }"
18
                 :row-style="{ color: '#303133' }"
20
                 :row-style="{ color: '#303133' }"
19
-     style="width: 100%">
20
-      <el-table-column
21
-        type="index"
22
-        align="center"
23
-        label="序号"
24
-        width="60">
25
-      </el-table-column>
26
-       <el-table-column
27
-        prop="mode_name"
28
-        align="center"
29
-        label="透析模式"
30
-        min-width="50">
31
-        <template slot-scope="scope" >
32
-          {{modeOptions[scope.row.mode_id].name}}
33
-        </template>
34
-      </el-table-column>
35
-       <el-table-column
36
-        prop="dialysis_duration"
37
-        align="center"
38
-        label="透析时长"
39
-        min-width="50">
40
-        <template slot-scope="scope" >
41
-          {{scope.row.dialysis_duration_hour}} 小时 {{scope.row.dialysis_duration_minute}} 分钟
42
-        </template>
43
-      </el-table-column>
44
-      <!-- <el-table-column
45
-        prop="period"
46
-        label="频率"
47
-        align="center"
48
-        min-width="50">
49
-        <template slot-scope="scope" >
50
-            <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
51
-            <span v-else >--</span>
52
-        </template>
53
-      </el-table-column> -->
54
-      <!-- <el-table-column
55
-        prop="name"
56
-        label="处方名"
57
-        align="center"
58
-        min-width="50">
59
-        <template slot-scope="scope" >
60
-            <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
61
-        </template>
62
-      </el-table-column> -->
63
-      <el-table-column
64
-        prop="doctor"
65
-        label="医生"
66
-        align="center"
67
-        min-width="110">
68
-        <template slot-scope="scope" >
69
-            <span >{{getAdminUserName(scope.row.registrars_id)}}</span>
70
-        </template>
71
-
72
-     </el-table-column>
21
+                style="width: 100%">
22
+        <el-table-column
23
+          type="index"
24
+          align="center"
25
+          label="序号"
26
+          width="60">
27
+        </el-table-column>
28
+        <el-table-column
29
+          prop="mode_name"
30
+          align="center"
31
+          label="透析模式"
32
+          min-width="50">
33
+          <template slot-scope="scope">
34
+            {{modeOptions[scope.row.mode_id].name}}
35
+          </template>
36
+        </el-table-column>
37
+        <el-table-column
38
+          prop="dialysis_duration"
39
+          align="center"
40
+          label="透析时长"
41
+          min-width="50">
42
+          <template slot-scope="scope">
43
+            {{scope.row.dialysis_duration_hour}} 小时 {{scope.row.dialysis_duration_minute}} 分钟
44
+          </template>
45
+        </el-table-column>
46
+        <!-- <el-table-column
47
+          prop="period"
48
+          label="频率"
49
+          align="center"
50
+          min-width="50">
51
+          <template slot-scope="scope" >
52
+              <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
53
+              <span v-else >--</span>
54
+          </template>
55
+        </el-table-column> -->
56
+        <!-- <el-table-column
57
+          prop="name"
58
+          label="处方名"
59
+          align="center"
60
+          min-width="50">
61
+          <template slot-scope="scope" >
62
+              <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
63
+          </template>
64
+        </el-table-column> -->
65
+        <el-table-column
66
+          prop="doctor"
67
+          label="医生"
68
+          align="center"
69
+          min-width="110">
70
+          <template slot-scope="scope">
71
+            <span>{{getAdminUserName(scope.row.registrars_id)}}</span>
72
+          </template>
73
+
74
+        </el-table-column>
73
 
75
 
74
         <el-table-column
76
         <el-table-column
75
           prop="updated_time"
77
           prop="updated_time"
189
             </el-form-item>
191
             </el-form-item>
190
           </el-col>
192
           </el-col>
191
           <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id == 6">-->
193
           <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id == 6">-->
192
-            <!--<el-form-item label="目标超滤量(ml) : ">-->
193
-              <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
194
-            <!--</el-form-item>-->
194
+          <!--<el-form-item label="目标超滤量(ml) : ">-->
195
+          <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
196
+          <!--</el-form-item>-->
195
           <!--</el-col>-->
197
           <!--</el-col>-->
196
 
198
 
197
           <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id != 6">-->
199
           <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id != 6">-->
198
-            <!--<el-form-item label="目标超滤量(L) : ">-->
199
-              <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
200
-            <!--</el-form-item>-->
200
+          <!--<el-form-item label="目标超滤量(L) : ">-->
201
+          <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
202
+          <!--</el-form-item>-->
201
           <!--</el-col>-->
203
           <!--</el-col>-->
202
 
204
 
203
 
205
 
204
           <el-col :span="8" v-if="isShows('透析液配方')">
206
           <el-col :span="8" v-if="isShows('透析液配方')">
205
-            <el-form-item label="透析液配方:" >
207
+            <el-form-item label="透析液配方:">
206
               <el-select v-model="addPlan.dialysate_formulation">
208
               <el-select v-model="addPlan.dialysate_formulation">
207
                 <el-option v-for="item in dialysate_formulation" :label="item.name" :key="item.id"
209
                 <el-option v-for="item in dialysate_formulation" :label="item.name" :key="item.id"
208
                            :value="item.id"></el-option>
210
                            :value="item.id"></el-option>
259
             </el-form-item>
261
             </el-form-item>
260
           </el-col>
262
           </el-col>
261
           <el-col :span="8" v-if="anticoagulant.gaijiliang != -1&&isShows('钙剂量')">
263
           <el-col :span="8" v-if="anticoagulant.gaijiliang != -1&&isShows('钙剂量')">
262
-            <el-form-item  :label="'钙剂量('+anticoagulant.gaimingcheng_unit+'): '"  prop="anticoagulant_gaijiliang">
264
+            <el-form-item :label="'钙剂量('+anticoagulant.gaimingcheng_unit+'): '" prop="anticoagulant_gaijiliang">
263
               <el-input v-model="addPlan.anticoagulant_gaijiliang" :disabled="anticoagulant.gaijiliang==1?false:true"
265
               <el-input v-model="addPlan.anticoagulant_gaijiliang" :disabled="anticoagulant.gaijiliang==1?false:true"
264
                         placeholder="钙剂量"></el-input>
266
                         placeholder="钙剂量"></el-input>
265
             </el-form-item>
267
             </el-form-item>
359
 
361
 
360
 
362
 
361
           <el-col :span="8">
363
           <el-col :span="8">
362
-            <el-form-item label="置换液:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6">
364
+            <el-form-item label="置换液:"
365
+                          v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id != 6">
363
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
366
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
364
                 <el-option :key="0" label="请选择" :value="0"></el-option>
367
                 <el-option :key="0" label="请选择" :value="0"></el-option>
365
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
368
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
368
             </el-form-item>
371
             </el-form-item>
369
 
372
 
370
 
373
 
371
-            <el-form-item label="置换方式:" v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id == 6">
374
+            <el-form-item label="置换方式:"
375
+                          v-if="isShows('置换液')&&this.$store.getters.xt_user.template_info.template_id == 6">
372
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
376
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
373
                 <el-option :key="0" label="请选择" :value="0"></el-option>
377
                 <el-option :key="0" label="请选择" :value="0"></el-option>
374
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
378
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
454
     fetchPatientDialysisSolutions
458
     fetchPatientDialysisSolutions
455
   } from '@/api/patient'
459
   } from '@/api/patient'
456
 
460
 
457
-  import {
458
-    getSystemPrescription,
459
-  } from '@/api/config'
460
-
461
-
462
-
461
+  import { getSystemPrescription } from '@/api/config'
463
 
462
 
464
   import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
463
   import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
465
   import store from '@/store'
464
   import store from '@/store'
537
           id: 0,
536
           id: 0,
538
           mode: '',
537
           mode: '',
539
           mode_name: '',
538
           mode_name: '',
539
+          registrars_id: 0,
540
           dialyzer: '',
540
           dialyzer: '',
541
           dialysis_duration: '',
541
           dialysis_duration: '',
542
           dialysis_duration_hour: '',
542
           dialysis_duration_hour: '',
564
           dialysate_temperature: '',
564
           dialysate_temperature: '',
565
           conductivity: '',
565
           conductivity: '',
566
           doctor: '',
566
           doctor: '',
567
-          dialysate_formulation:'',
567
+          dialysate_formulation: '',
568
           remark: '',
568
           remark: '',
569
-          target_ktv:'',
570
-          target_ultrafiltration:'',
569
+          target_ktv: '',
570
+          target_ultrafiltration: '',
571
           dialyzer_perfusion_apparatus: '',
571
           dialyzer_perfusion_apparatus: '',
572
           body_fluid: '',
572
           body_fluid: '',
573
           body_fluid_other: '',
573
           body_fluid_other: '',
576
           displace_liqui_part: '',
576
           displace_liqui_part: '',
577
           displace_liqui_value: '',
577
           displace_liqui_value: '',
578
           ultrafiltration: '',
578
           ultrafiltration: '',
579
-          blood_access: '',
579
+          blood_access: ''
580
         },
580
         },
581
         childPlan: {
581
         childPlan: {
582
           mode: '',
582
           mode: '',
701
       }
701
       }
702
     },
702
     },
703
     watch: {
703
     watch: {
704
-      "addPlan.dialysis_duration":function(){
705
-        this.addPlan.anticoagulant_zongliang=calculateAnticoagulantZL(1,
704
+      'addPlan.dialysis_duration': function() {
705
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
706
           this.addPlan.anticoagulant_shouji,
706
           this.addPlan.anticoagulant_shouji,
707
           this.addPlan.dialysis_duration,
707
           this.addPlan.dialysis_duration,
708
           this.addPlan.anticoagulant_weichi
708
           this.addPlan.anticoagulant_weichi
709
-        );
709
+        )
710
       },
710
       },
711
-      "addPlan.anticoagulant_shouji":function(){
712
-        this.addPlan.anticoagulant_zongliang=calculateAnticoagulantZL(1,
711
+      'addPlan.anticoagulant_shouji': function() {
712
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
713
           this.addPlan.anticoagulant_shouji,
713
           this.addPlan.anticoagulant_shouji,
714
           this.addPlan.dialysis_duration,
714
           this.addPlan.dialysis_duration,
715
           this.addPlan.anticoagulant_weichi
715
           this.addPlan.anticoagulant_weichi
716
-        );
716
+        )
717
       },
717
       },
718
-      "addPlan.anticoagulant_weichi":function(){
719
-        this.addPlan.anticoagulant_zongliang=calculateAnticoagulantZL(1,
718
+      'addPlan.anticoagulant_weichi': function() {
719
+        this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
720
           this.addPlan.anticoagulant_shouji,
720
           this.addPlan.anticoagulant_shouji,
721
           this.addPlan.dialysis_duration,
721
           this.addPlan.dialysis_duration,
722
           this.addPlan.anticoagulant_weichi
722
           this.addPlan.anticoagulant_weichi
723
-        );
723
+        )
724
       }
724
       }
725
     },
725
     },
726
     components: {
726
     components: {
966
       submitEditSolution(formName) {
966
       submitEditSolution(formName) {
967
         this.$refs[formName].validate(valid => {
967
         this.$refs[formName].validate(valid => {
968
           if (valid) {
968
           if (valid) {
969
-            editPatientDialysisSolution(this.patientID, this.addPlan.id, this.addPlan).then(response => {
969
+
970
+            let mode = '2'
971
+
972
+            if (this.addPlan.registrars_id != this.$store.getters.xt_user.user.id) {
973
+              mode = '3'
974
+            }
975
+
976
+            editPatientDialysisSolution(this.patientID, this.addPlan.id, this.addPlan, mode).then(response => {
970
               if (response.data.state == 0) {
977
               if (response.data.state == 0) {
971
                 this.$message.error(response.data.msg)
978
                 this.$message.error(response.data.msg)
972
                 return false
979
                 return false
1002
         this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
1009
         this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
1003
         this.$refs[formName].validate(valid => {
1010
         this.$refs[formName].validate(valid => {
1004
           if (valid) {
1011
           if (valid) {
1005
-            createPatientDialysisSolution(this.patientID, this.addPlan).then(response => {
1012
+            let mode = '1'
1013
+            createPatientDialysisSolution(this.patientID, this.addPlan, mode).then(response => {
1006
               if (response.data.state == 0) {
1014
               if (response.data.state == 0) {
1007
                 this.$message.error(response.data.msg)
1015
                 this.$message.error(response.data.msg)
1008
                 return false
1016
                 return false
1050
         this.addPlan.dialysis_duration = '' + row.dialysis_duration
1058
         this.addPlan.dialysis_duration = '' + row.dialysis_duration
1051
         this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
1059
         this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
1052
         this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
1060
         this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
1053
-        this.addPlan.hemodialysis_machine = row.hemodialysis_machine + '';
1054
-        this.addPlan.perfusion_apparatus = row.perfusion_apparatus + '';
1055
-        this.addPlan.blood_flow_volume = row.blood_flow_volume.toString();
1056
-        this.addPlan.anticoagulant = row.anticoagulant;
1057
-        this.addPlan.replacement_total = row.replacement_total;
1058
-
1059
-        this.addPlan.target_ktv = row.target_ktv.toString();
1060
-        this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString();
1061
-
1062
-
1063
-        this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString();
1064
-        this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString();
1065
-        this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString();
1066
-        this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString();
1067
-        this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString();
1068
-        this.addPlan.kalium = row.kalium.toString();
1069
-        this.addPlan.sodium = row.sodium.toString();
1070
-        this.addPlan.calcium = row.calcium.toString();
1071
-        this.addPlan.bicarbonate = row.bicarbonate.toString();
1072
-        this.addPlan.glucose = row.glucose.toString();
1073
-        this.addPlan.dialysate_flow = row.dialysate_flow.toString();
1074
-        this.addPlan.dialysate_temperature = row.dialysate_temperature.toString();
1075
-        this.addPlan.conductivity = row.conductivity.toString();
1076
-        this.addPlan.remark = row.remark;
1077
-
1078
-
1079
-        this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString();
1061
+        this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
1062
+        this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
1063
+        this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
1064
+        this.addPlan.anticoagulant = row.anticoagulant
1065
+        this.addPlan.replacement_total = row.replacement_total
1066
+
1067
+        this.addPlan.target_ktv = row.target_ktv.toString()
1068
+        this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
1069
+
1070
+        this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
1071
+        this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
1072
+        this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
1073
+        this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
1074
+        this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
1075
+        this.addPlan.kalium = row.kalium.toString()
1076
+        this.addPlan.sodium = row.sodium.toString()
1077
+        this.addPlan.calcium = row.calcium.toString()
1078
+        this.addPlan.bicarbonate = row.bicarbonate.toString()
1079
+        this.addPlan.glucose = row.glucose.toString()
1080
+        this.addPlan.dialysate_flow = row.dialysate_flow.toString()
1081
+        this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
1082
+        this.addPlan.conductivity = row.conductivity.toString()
1083
+        this.addPlan.remark = row.remark
1084
+
1085
+        this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
1080
         this.addPlan.body_fluid = row.body_fluid
1086
         this.addPlan.body_fluid = row.body_fluid
1081
-        this.addPlan.body_fluid_other = row.body_fluid_other.toString();
1082
-        this.addPlan.special_medicine = row.special_medicine;
1083
-        this.addPlan.special_medicine_other = row.special_medicine_other.toString();
1084
-        this.addPlan.displace_liqui_part = row.displace_liqui_part;
1085
-        this.addPlan.displace_liqui_value = row.displace_liqui_value.toString();
1086
-        this.addPlan.ultrafiltration = row.ultrafiltration.toString();
1087
-        this.addPlan.blood_access = row.blood_access;
1087
+        this.addPlan.body_fluid_other = row.body_fluid_other.toString()
1088
+        this.addPlan.special_medicine = row.special_medicine
1089
+        this.addPlan.special_medicine_other = row.special_medicine_other.toString()
1090
+        this.addPlan.displace_liqui_part = row.displace_liqui_part
1091
+        this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
1092
+        this.addPlan.ultrafiltration = row.ultrafiltration.toString()
1093
+        this.addPlan.blood_access = row.blood_access
1088
 
1094
 
1095
+        this.addPlan.registrars_id = row.registrars_id
1089
 
1096
 
1090
         this.dialogVisible = true
1097
         this.dialogVisible = true
1091
         this.isEdit = true
1098
         this.isEdit = true
1115
           doctor: '',
1122
           doctor: '',
1116
           first_dialysis: '',
1123
           first_dialysis: '',
1117
 
1124
 
1118
-
1119
-
1120
           dialyzer: '',
1125
           dialyzer: '',
1121
-          dialysate_formulation:'',
1126
+          dialysate_formulation: '',
1122
           hemodialysis_machine: '',
1127
           hemodialysis_machine: '',
1123
           perfusion_apparatus: '',
1128
           perfusion_apparatus: '',
1124
           blood_flow_volume: '',
1129
           blood_flow_volume: '',
1142
           dialysate_temperature: '',
1147
           dialysate_temperature: '',
1143
           conductivity: '',
1148
           conductivity: '',
1144
           remark: '',
1149
           remark: '',
1145
-          target_ktv:'',
1146
-          target_ultrafiltration:'',
1150
+          target_ktv: '',
1151
+          target_ultrafiltration: '',
1147
           dialyzer_perfusion_apparatus: '',
1152
           dialyzer_perfusion_apparatus: '',
1148
           body_fluid: '',
1153
           body_fluid: '',
1149
           body_fluid_other: '',
1154
           body_fluid_other: '',
1154
           ultrafiltration: '',
1159
           ultrafiltration: '',
1155
           blood_access: '',
1160
           blood_access: '',
1156
 
1161
 
1157
-
1158
-
1159
-
1160
-
1161
-
1162
-
1163
-
1164
-
1165
           dialysis_duration: '3.30',
1162
           dialysis_duration: '3.30',
1166
           dialysis_duration_hour: '3',
1163
           dialysis_duration_hour: '3',
1167
           dialysis_duration_minute: '30'
1164
           dialysis_duration_minute: '30'
1258
           id: thismode
1255
           id: thismode
1259
         }
1256
         }
1260
 
1257
 
1261
-
1262
-
1263
         getSystemPrescription(params).then(response => {
1258
         getSystemPrescription(params).then(response => {
1264
           if (response.data.state == 1) {
1259
           if (response.data.state == 1) {
1265
-            if(response.data.data.prescription.id > 0) {
1260
+            if (response.data.data.prescription.id > 0) {
1266
               for (const key in  response.data.data.prescription) {
1261
               for (const key in  response.data.data.prescription) {
1267
                 //因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
1262
                 //因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
1268
                 this.$set(this.addPlan, key, response.data.data.prescription[key].toString())
1263
                 this.$set(this.addPlan, key, response.data.data.prescription[key].toString())
1269
               }
1264
               }
1270
 
1265
 
1271
               //因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
1266
               //因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
1272
-              this.$set(this.addPlan, "dialysate_formulation", response.data.data.prescription['dialysate_formulation'])
1273
-              this.$set(this.addPlan, "anticoagulant", response.data.data.prescription['anticoagulant'])
1274
-              this.$set(this.addPlan, "body_fluid", response.data.data.prescription['body_fluid'])
1275
-              this.$set(this.addPlan, "special_medicine", response.data.data.prescription['special_medicine'])
1276
-              this.$set(this.addPlan, "displace_liqui_part", response.data.data.prescription['displace_liqui_part'])
1277
-              this.$set(this.addPlan, "blood_access", response.data.data.prescription['blood_access'])
1278
-
1279
-
1267
+              this.$set(this.addPlan, 'dialysate_formulation', response.data.data.prescription['dialysate_formulation'])
1268
+              this.$set(this.addPlan, 'anticoagulant', response.data.data.prescription['anticoagulant'])
1269
+              this.$set(this.addPlan, 'body_fluid', response.data.data.prescription['body_fluid'])
1270
+              this.$set(this.addPlan, 'special_medicine', response.data.data.prescription['special_medicine'])
1271
+              this.$set(this.addPlan, 'displace_liqui_part', response.data.data.prescription['displace_liqui_part'])
1272
+              this.$set(this.addPlan, 'blood_access', response.data.data.prescription['blood_access'])
1280
 
1273
 
1281
               this.dialysisTimeShow = new Date(2018, 1, 1, this.addPlan.dialysis_duration_hour, this.addPlan.dialysis_duration_minute)
1274
               this.dialysisTimeShow = new Date(2018, 1, 1, this.addPlan.dialysis_duration_hour, this.addPlan.dialysis_duration_minute)
1282
 
1275
 
1283
-            }else{
1276
+            } else {
1284
               var tempAddPlan = {
1277
               var tempAddPlan = {
1285
                 id: 0,
1278
                 id: 0,
1286
                 dialyzer: '',
1279
                 dialyzer: '',
1288
                 dialysis_duration_hour: '',
1281
                 dialysis_duration_hour: '',
1289
                 dialysis_duration_minute: '',
1282
                 dialysis_duration_minute: '',
1290
                 hemodialysis_machine: '',
1283
                 hemodialysis_machine: '',
1291
-                dialysate_formulation:'',
1284
+                dialysate_formulation: '',
1292
                 perfusion_apparatus: '',
1285
                 perfusion_apparatus: '',
1293
                 blood_flow_volume: '',
1286
                 blood_flow_volume: '',
1294
                 dewater: '',
1287
                 dewater: '',
1329
                 this.addPlan[key] = tempAddPlan[key]
1322
                 this.addPlan[key] = tempAddPlan[key]
1330
               }
1323
               }
1331
 
1324
 
1332
-
1333
             }
1325
             }
1334
           }
1326
           }
1335
         })
1327
         })
1385
     },
1377
     },
1386
     created() {
1378
     created() {
1387
 
1379
 
1388
-
1389
-
1390
       const id = this.$route.params && this.$route.params.id
1380
       const id = this.$route.params && this.$route.params.id
1391
       this.patientID = parseInt(id)
1381
       this.patientID = parseInt(id)
1392
       if (isNaN(this.patientID) || this.patientID <= 0) {
1382
       if (isNaN(this.patientID) || this.patientID <= 0) {
1413
       this.displace_liqui_part_option = this.$store.getters.displace_liqui
1403
       this.displace_liqui_part_option = this.$store.getters.displace_liqui
1414
       this.blood_access_option = this.$store.getters.blood_access
1404
       this.blood_access_option = this.$store.getters.blood_access
1415
 
1405
 
1416
-
1417
-
1418
       this.queryParams.id = this.patientID
1406
       this.queryParams.id = this.patientID
1419
       // this.fetchAllDoctorAndNurse();
1407
       // this.fetchAllDoctorAndNurse();
1420
       this.fetchAllAdminUsers()
1408
       this.fetchAllAdminUsers()
1475
   }
1463
   }
1476
 </style>
1464
 </style>
1477
 <style>
1465
 <style>
1478
-.el-table td,
1479
-.el-table th.is-leaf,
1480
-.el-table--border,
1481
-.el-table--group {
1482
-  border-color: #d0d3da;
1483
-}
1484
-.el-table--border::after,
1485
-.el-table--group::after,
1486
-.el-table::before {
1487
-  background-color: #d0d3da;
1488
-}
1466
+  .el-table td,
1467
+  .el-table th.is-leaf,
1468
+  .el-table--border,
1469
+  .el-table--group {
1470
+    border-color: #d0d3da;
1471
+  }
1472
+
1473
+  .el-table--border::after,
1474
+  .el-table--group::after,
1475
+  .el-table::before {
1476
+    background-color: #d0d3da;
1477
+  }
1489
 </style>
1478
 </style>

+ 13 - 13
src/xt_permission.js Ver fichero

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();