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,8 +6,8 @@
6 6
 module.exports = {
7 7
   NODE_ENV: '"development"',
8 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 11
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 12
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 13
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 2
config/index.js Ver fichero

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

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

@@ -14,19 +14,23 @@ export function getAllAdviceConfig() {
14 14
   })
15 15
 }
16 16
 
17
-export function CreateDoctorAdvice(id, advice) {
17
+export function CreateDoctorAdvice(id, advice,mode) {
18 18
   return request({
19
-    url: '/api/patients/advice/create?id=' + id,
19
+    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
20 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 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 30
     method: 'Put',
29
-    data: advice
31
+    data: advice,
32
+    headers:{"Permission":2},
33
+
30 34
   })
31 35
 }
32 36
 
@@ -40,7 +44,9 @@ export function ExecDoctorAdvice(patient, id, time,mode) {
40 44
   return request({
41 45
     url: '/api/patients/advice/exec',
42 46
     method: 'Post',
43
-    params: params
47
+    params: params,
48
+    headers:{"Permission":2},
49
+
44 50
   })
45 51
 }
46 52
 export function CheckDoctorAdvice(patient, id,mode) {
@@ -53,17 +59,22 @@ export function CheckDoctorAdvice(patient, id,mode) {
53 59
   return request({
54 60
     url: '/api/patients/advice/check',
55 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 68
   var params = {
61
-    groupno: groupno
69
+    groupno: groupno,
70
+    mode: mode,
62 71
   }
63 72
   return request({
64 73
     url: '/api/patients/advice/checkgroup',
65 74
     method: 'Post',
66
-    params: params
75
+    params: params,
76
+    headers:{"Permission":2},
77
+
67 78
   })
68 79
 }
69 80
 
@@ -98,10 +109,12 @@ export function ExecGroupAdvice(groupno, time) {
98 109
   })
99 110
 }
100 111
 
101
-export function DeleteDoctorAdvice(id) {
112
+export function DeleteDoctorAdvice(id,mode) {
102 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,25 +212,31 @@ export function postAdviceTemplate(params, name, advice_type) {
199 212
   })
200 213
 }
201 214
 
202
-export function CreateGroupAdvice(id, groupno, advices) {
215
+export function CreateGroupAdvice(id, groupno, advices,mode) {
203 216
   if (advices.remind > 0) {
204 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 219
       method: 'post',
207
-      data: advices
220
+      data: advices,
221
+      headers:{"Permission":2},
222
+
208 223
     })
209 224
   } else {
210 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 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 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,3 +101,15 @@ export function getRoleStaff() {
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,14 +1,7 @@
1
-import {
2
-  verifyToken,
3
-  modifyAdminInfo
4
-} from '@/api/login/login'
1
+import { modifyAdminInfo, verifyToken } from '@/api/login/login'
5 2
 // import { mapGetters } from 'vuex'
6 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 5
 import { getFiledConfigList, setFiledConfigList } from '@/utils/data_config' // getConfigList from sessionStorage
13 6
 
14 7
 const xt_user = {
@@ -26,10 +19,10 @@ const xt_user = {
26 19
       user_type: 0, // 用户类型(1.管理员;2.医生;3.护士;4.运营)
27 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 23
       id: 0,
31
-      org_id:0,
32
-      template_id:0,
24
+      org_id: 0,
25
+      template_id: 0
33 26
     },
34 27
 
35 28
     org: {
@@ -57,7 +50,7 @@ const xt_user = {
57 50
 
58 51
     // 示例: ['', '',]
59 52
     urlfors: [],
60
-    fileds:[],
53
+    fileds: []
61 54
   },
62 55
 
63 56
   mutations: {
@@ -102,19 +95,16 @@ const xt_user = {
102 95
       state.cdm_role_exist = cur_info.cdm_role_exist
103 96
       state.mall_role_exist = cur_info.mall_role_exist
104 97
 
105
-
106 98
       state.template_info.id = cur_info.template_info.id
107 99
       state.template_info.org_id = cur_info.template_info.org_id
108 100
       state.template_info.template_id = cur_info.template_info.template_id
109 101
 
110
-
111 102
     },
112 103
 
113 104
     SET_FILEDS: (state, payload) => {
114 105
       state.fileds = payload.fileds
115 106
     },
116 107
 
117
-
118 108
     SET_URLFORS: (state, payload) => {
119 109
       state.urlfors = payload.urlfors
120 110
     },
@@ -123,7 +113,7 @@ const xt_user = {
123 113
       state.user.user_name = payload.user_name
124 114
       state.user.avatar = payload.avatar
125 115
     },
126
-    MODIFY_ORG_INFO:(state, payload) => {
116
+    MODIFY_ORG_INFO: (state, payload) => {
127 117
       state.org.org_name = payload.org_name
128 118
       state.org.org_short_name = payload.org_short_name
129 119
     },
@@ -180,23 +170,23 @@ const xt_user = {
180 170
   },
181 171
 
182 172
   actions: {
183
-    SetScheduleTypeSelected({commit }, schedule_type_selected) {
173
+    SetScheduleTypeSelected({ commit }, schedule_type_selected) {
184 174
       commit('SET_SCHEDULE_TYPE_SELECTED', schedule_type_selected)
185 175
     },
186 176
     SetZoneSelected({ commit }, zone_selected) {
187 177
       commit('SET_ZONE_SELECTED', zone_selected)
188 178
     },
189 179
     SetSubscibePatients({
190
-      commit,
191
-      state
192
-    }) {
180
+                          commit,
181
+                          state
182
+                        }) {
193 183
       commit('SET_SUBSCIBE_PATIENT')
194 184
     },
195 185
 
196 186
     VerifyToken({
197
-      commit,
198
-      state
199
-    }, token) {
187
+                  commit,
188
+                  state
189
+                }, token) {
200 190
 
201 191
       // console.log('验证 token 之前:token = ' + token)
202 192
       return new Promise((resolve, reject) => {
@@ -218,7 +208,7 @@ const xt_user = {
218 208
             cur_app_id: infoJSON.current_app_id,
219 209
             org: infoJSON.org,
220 210
             subscibe: infoJSON.subscibe,
221
-            template_info:infoJSON.template_info,
211
+            template_info: infoJSON.template_info,
222 212
             scrm_role_exist: infoJSON.scrm_role_exist,
223 213
             cdm_role_exist: infoJSON.cdm_role_exist,
224 214
             mall_role_exist: infoJSON.mall_role_exist
@@ -228,7 +218,6 @@ const xt_user = {
228 218
             urlfors: infoJSON.urlfors
229 219
           })
230 220
 
231
-
232 221
           resolve(infoJSON.user.user_id)
233 222
         } else {
234 223
           verifyToken(token).then(response => {
@@ -242,10 +231,10 @@ const xt_user = {
242 231
                 cur_app_id: data.current_app_id,
243 232
                 org: data.org,
244 233
                 subscibe: data.subscibe,
245
-                template_info:data.template_info,
234
+                template_info: data.template_info,
246 235
                 scrm_role_exist: data.scrm_role_exist,
247 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 240
               this.commit('SET_URLFORS', {
@@ -271,9 +260,9 @@ const xt_user = {
271 260
       })
272 261
     },
273 262
     ModifyAdminUserInfo({
274
-      commit,
275
-      state
276
-    }, params) {
263
+                          commit,
264
+                          state
265
+                        }, params) {
277 266
       commit('MODIFY_USER_INFO', {
278 267
         user_name: params.user_name,
279 268
         avatar: params.avatar
@@ -286,17 +275,17 @@ const xt_user = {
286 275
           current_app_id: state.app_id,
287 276
           urlfors: state.urlfors,
288 277
           subscibe: state.subscibe,
289
-          template_info:state.template_info,
278
+          template_info: state.template_info,
290 279
           scrm_role_exist: state.scrm_role_exist,
291 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 285
     ModifyOrgInfo({
297
-      commit,
298
-      state
299
-    }, params) {
286
+                    commit,
287
+                    state
288
+                  }, params) {
300 289
       commit('MODIFY_ORG_INFO', {
301 290
         org_name: params.org_name,
302 291
         org_short_name: params.org_short_name
@@ -309,7 +298,7 @@ const xt_user = {
309 298
           current_app_id: state.app_id,
310 299
           urlfors: state.urlfors,
311 300
           subscibe: state.subscibe,
312
-          template_info:state.template_info,
301
+          template_info: state.template_info,
313 302
           scrm_role_exist: state.scrm_role_exist,
314 303
           cdm_role_exist: state.cdm_role_exist,
315 304
           mall_role_exist: state.mall_role_exist
@@ -337,8 +326,8 @@ const xt_user = {
337 326
     // }
338 327
     // 登出
339 328
     FrontendLogout({
340
-      commit
341
-    }) {
329
+                     commit
330
+                   }) {
342 331
       commit('CLEAR_USER_INFO')
343 332
       removeAdminUserInfoCache()
344 333
     }, updateFiledConfigList({ commit }, object) {
@@ -346,9 +335,9 @@ const xt_user = {
346 335
       var oldFiledList = getFiledConfigList()
347 336
       var infoJSON = JSON.parse(oldFiledList)
348 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 341
             infoJSON[i].is_show = object.is_show
353 342
           }
354 343
         }
@@ -357,16 +346,22 @@ const xt_user = {
357 346
         commit('SET_FILEDS_LIST', infoJSON)
358 347
         resolve()
359 348
       })
360
-    },updateAllFiledConfigList({ commit }, object) {
349
+    }, updateAllFiledConfigList({ commit }, object) {
361 350
       var oldFiledList = getFiledConfigList()
362 351
       var infoJSON = JSON.parse(oldFiledList)
363 352
 
364
-      return new Promise((resolve, reject) =>{
353
+      return new Promise((resolve, reject) => {
365 354
         infoJSON = object
366 355
         setFiledConfigList(JSON.stringify(infoJSON))
367 356
         commit('SET_FILEDS_LIST', infoJSON)
368 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,15 +64,17 @@
64 64
       </div>
65 65
     </el-menu>-->
66 66
     <div class="dropdownBox">
67
-      <el-dropdown trigger="click" @command="handleOrgCommand">
67
+      <!--<el-dropdown trigger="click" @command="handleOrgCommand">-->
68 68
         <span class="el-dropdown-link">
69 69
           {{ org_name }}
70 70
           <i class="el-icon-arrow-down el-icon--right"></i>
71 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 78
     </div>
77 79
     <div class="navRight">
78 80
       <!-- <el-input placeholder="搜索患者透析号/姓名/首拼" prefix-icon="el-icon-search" v-model="input2"></el-input>
@@ -165,33 +167,51 @@ export default {
165 167
       }
166 168
       changeOrg(params).then(response => {
167 169
         if (response.data.state === 1) {
168
-          window.location.reload()
170
+          // window.location.reload()
169 171
 
170 172
           this.$message.success('切换成功')
171 173
           let data = response.data.data
172 174
           this.org_id = data.org.id
173 175
           this.org_name = data.org.org_name
174 176
 
175
-          this.commit('SET_CURRENT_INFO', {
177
+          this.$store.dispatch("ModifyAdminUserOrgInfo", {
176 178
             user: data.user,
177 179
             cur_org_id: data.current_org_id,
178 180
             cur_app_id: data.current_app_id,
179 181
             org: data.org,
180 182
             subscibe: data.subscibe,
181 183
             template_info:data.template_info,
182
-          })
184
+          });
183 185
 
184
-          this.commit('SET_URLFORS', {
186
+          this.$store.dispatch("ModifyUrlInfo", {
185 187
             urlfors: data.urlfors
186
-          })
187 188
 
188
-          this.commit('SET_FILEDS', {
189
+          });
190
+
191
+          this.$store.dispatch("ModifyFiled", {
189 192
             fileds: data.fileds
190
-          })
193
+
194
+
195
+          });
196
+
197
+
198
+
199
+
191 200
           setFiledConfigList(JSON.stringify(data.fileds))
192 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 215
         }else{
196 216
           this.$message.success(response.data.msg)
197 217
         }

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

@@ -9,33 +9,33 @@
9 9
     >
10 10
       <div class="txsj" v-show="showAdvicePanel">
11 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 14
         </el-button>
15 15
         <el-button round @click="openGroupFrom" :loading="deleLoading"
16
-                   v-if="this.$store.getters.xt_user.user.user_type == 3" disabled>新增医嘱
16
+                   disabled>新增医嘱
17 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 21
                    @click="execAdvice" :loading="deleLoading">执行医嘱
22 22
         </el-button>
23 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 26
                    @click="checkAdvice" :loading="deleLoading">医嘱核对
27 27
         </el-button>
28 28
         <el-button v-else disabled round @click="checkAdvice" :loading="deleLoading">医嘱核对</el-button>
29 29
 
30 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 32
           round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱
33 33
         </el-button>
34 34
         <el-button v-else disabled round @click="openEditGroupAdvice" :loading="deleLoading">修改医嘱</el-button>
35 35
 
36 36
 
37 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 39
           round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱
40 40
         </el-button>
41 41
         <el-button v-else disabled round @click="openDeleteGroupAdvice" :loading="deleLoading">删除医嘱</el-button>
@@ -61,7 +61,7 @@
61 61
 
62 62
         </el-table-column>
63 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 65
           <template slot-scope="scope">
66 66
 
67 67
             <el-dropdown trigger="click" v-if="scope.row.parent_id == 0 ">
@@ -89,14 +89,14 @@
89 89
           </template>
90 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 101
         <el-table-column prop="execution_time" align="center" min-width="30px" label="执行时间">
102 102
           <template slot-scope="scope">
@@ -436,7 +436,9 @@
436 436
           this.$message.error('没有选择患者')
437 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 442
           if (response.data.state == 0) {
441 443
             this.$message.error(response.data.msg)
442 444
             return false
@@ -668,8 +670,9 @@
668 670
           return false
669 671
         }
670 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 676
           if (response.data.state == 0) {
674 677
             this.$message.error('执行失败!')
675 678
             this.exceLoading = false
@@ -722,8 +725,9 @@
722 725
           this.$message.error('没有选择患者')
723 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 731
           this.loading = false
728 732
           if (response.data.state == 0) {
729 733
             this.$message.error(response.data.msg)
@@ -1021,7 +1025,8 @@
1021 1025
           cancelButtonText: '取消',
1022 1026
           type: 'warning'
1023 1027
         }).then(() => {
1024
-          DeleteGroupAdvice(groupno).then(response => {
1028
+          let mode ="4"
1029
+          DeleteGroupAdvice(groupno,mode).then(response => {
1025 1030
             if (response.data.state == 0) {
1026 1031
               this.$message.error(response.data.msg)
1027 1032
               return false
@@ -1054,7 +1059,8 @@
1054 1059
           type: 'warning'
1055 1060
         }).then(() => {
1056 1061
           this.deleLoading = true
1057
-          DeleteDoctorAdvice(this.currentRow.id).then(response => {
1062
+          let mode = "4"
1063
+          DeleteDoctorAdvice(this.currentRow.id,mode).then(response => {
1058 1064
             this.deleLoading = false
1059 1065
             if (response.data.state == 0) {
1060 1066
               this.$message.error(response.data.msg)
@@ -1087,7 +1093,8 @@
1087 1093
           type: 'warning'
1088 1094
         }).then(() => {
1089 1095
           this.deleLoading = true
1090
-          DeleteDoctorAdvice(this.currentRow.id).then(response => {
1096
+          let mode ="4"
1097
+          DeleteDoctorAdvice(this.currentRow.id,mode).then(response => {
1091 1098
             this.deleLoading = false
1092 1099
             if (response.data.state == 0) {
1093 1100
               this.$message.error(response.data.msg)

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

@@ -674,7 +674,9 @@ export default {
674 674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
675 675
           }
676 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 680
             if (response.data.state == 0) {
679 681
               this.$message.error(response.data.msg);
680 682
               return false;

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

@@ -594,6 +594,7 @@ export default {
594 594
         }
595 595
         console.log(this.groupSelectRow)
596 596
         var content = ''
597
+
597 598
         if (this.groupSelectRow.children.length > 0) {
598 599
           content = '确认删除此医嘱内容,包括它的子药?'
599 600
         } else {
@@ -607,7 +608,8 @@ export default {
607 608
           cancelButtonText: '取消',
608 609
           type: 'warning'
609 610
         }).then(() => {
610
-          DeleteDoctorAdvice(this.groupSelectRow.id).then(response => {
611
+          let mode = "4"
612
+          DeleteDoctorAdvice(this.groupSelectRow.id,mode).then(response => {
611 613
             if (response.data.state == 0) {
612 614
               this.$message.error(response.data.msg)
613 615
               return false
@@ -700,7 +702,9 @@ export default {
700 702
                 parent_id: _this.groupSelectRow.parent_id,
701 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 708
                 if (response.data.state == 0) {
705 709
                   this.$message.error(response.data.msg)
706 710
                   return false
@@ -799,8 +803,9 @@ export default {
799 803
                   parent_id: _this.groupSelectRow.id,
800 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 809
                   if (response.data.state == 0) {
805 810
                     this.$message.error(response.data.msg)
806 811
                     return false
@@ -871,7 +876,9 @@ export default {
871 876
                   remark: _this.groupForm.remark,
872 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 882
                   if (response.data.state == 0) {
876 883
                     _this.$message.error(response.data.msg)
877 884
                     return false
@@ -1371,8 +1378,10 @@ export default {
1371 1378
           }
1372 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 1385
           if (response.data.state == 0) {
1377 1386
             this.$message.error(response.data.msg)
1378 1387
             return false
@@ -1537,8 +1546,10 @@ export default {
1537 1546
 
1538 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 1553
                 if (response.data.state == 0) {
1543 1554
                   _this.$message.error(response.data.msg)
1544 1555
                   return false

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

@@ -801,6 +801,7 @@
801 801
           dry_weight: this.weight_adjust.weight,
802 802
           remark: this.weight_adjust.remark,
803 803
           doctor_id: this.weight_adjust.doctor,
804
+          mode : "1",
804 805
         };
805 806
         CreateDryWeight(params).then(response => {
806 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,9 +1052,14 @@ export default {
1052 1052
         type: "warning"
1053 1053
       })
1054 1054
         .then(() => {
1055
+          let mode = "4"
1056
+          // if(this.table_current_row)
1057
+
1058
+
1055 1059
           const params = {
1056 1060
             patient_id: this.patient_id,
1057 1061
             record_id: this.table_current_row.id
1062
+
1058 1063
           };
1059 1064
 
1060 1065
           postDelMonitorInfo(params).then(response => {

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

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

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

@@ -177,16 +177,6 @@
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 180
               } else {
191 181
                 this.$message.error(resp.msg)
192 182
               }
@@ -228,20 +218,29 @@
228 218
                 this.form.intro = admin.intro
229 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 238
                       this.roles.splice(i, 1)
238 239
                       i--
239 240
                     }
240 241
                   }
241
-                }
242
-
243
-
244 242
 
243
+                }
245 244
 
246 245
               } else {
247 246
                 this.$message.error('该用户不存在')

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

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

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

@@ -121,7 +121,7 @@
121 121
 </template>
122 122
 
123 123
 <script>
124
-  import { addRole, AddUserRole, getStaffsList, modifyRole } from '@/api/role/role'
124
+  import { addRole, AddUserRole, getStaffsList, modifyRole,getRoleInfo } from '@/api/role/role'
125 125
   import { addAdmin, getAddAdminInitData, getModifyAdminInitData, modifyAdmin } from '@/api/role/admin'
126 126
 
127 127
   export default {
@@ -146,8 +146,10 @@
146 146
       }
147 147
 
148 148
       return {
149
+        org:null,
149 150
         submitLoading:false,
150 151
         loading:true,
152
+        local_user_id:0,
151 153
         form: {
152 154
           id: 0,
153 155
           name: '',
@@ -253,24 +255,21 @@
253 255
 
254 256
       },
255 257
       change(val) {
256
-
257 258
         if (this.checkedCities.length == this.admin_user.length) {
258
-
259 259
           this.checkAll = true
260 260
         } else {
261 261
           this.checkAll = false
262
-
263 262
         }
264
-
265
-      }
266
-
267
-      ,
263
+      },
268 264
       GetAllStaff: function() {
269 265
         getStaffsList()
270 266
           .then(rs => {
271 267
             var resp = rs.data
272 268
             if (resp.state === 1) {
273 269
               this.admin_user = resp.data.admins
270
+              this.org = resp.data.org
271
+              this.isSubSuperAdmin = resp.data.isSubSuperAdmin;
272
+
274 273
               for (let i = 0; i < this.admin_user.length; i++) {
275 274
                 if (this.admin_user[i].role_ids.length > 0) {
276 275
                   let isExist = -1
@@ -283,13 +282,35 @@
283 282
                   }
284 283
                 }
285 284
               }
285
+              console.log(this.admin_user)
286
+
287
+
286 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 314
               this.loading = false
294 315
 
295 316
             } else {
@@ -321,9 +342,34 @@
321 342
         this.admin_user = []
322 343
         this.is_check_admin_user = []
323 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 373
         this.clear()
328 374
         this.visible = false
329 375
       },

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

@@ -38,7 +38,7 @@
38 38
           <template slot-scope="scope" style="text-align: center">
39 39
             <el-tooltip class="item" effect="dark" content="编辑" placement="top">
40 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 42
                          @click="openForm(scope.row.user_id, role_id)" ></el-button>
43 43
             </el-tooltip>
44 44
 
@@ -52,7 +52,7 @@
52 52
                 type="danger"
53 53
                 size="small"
54 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 56
                 @click="disableAdminAction(scope.row)"
57 57
               ></el-button>
58 58
             </el-tooltip>
@@ -67,7 +67,7 @@
67 67
                 size="small"
68 68
                 type="info"
69 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 71
                 @click="recoverAdminAction(scope.row)"
72 72
               ></el-button>
73 73
             </el-tooltip>
@@ -100,10 +100,50 @@
100 100
         local_user_id: 0,
101 101
         org:null,
102 102
         loading:false,
103
+        isSubSuperAdmin:false,
103 104
 
104 105
       }
105 106
     },
106 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 147
       didModifyAdmin(){
108 148
         this.GetAllStaff()
109 149
         this.$refs["admininfoform"].close();
@@ -184,6 +224,7 @@
184 224
           if (response.data.state === 1) {
185 225
             this.admin_user = response.data.data.admins
186 226
             this.org = response.data.data.org
227
+            this.isSubSuperAdmin = response.data.data.isSubSuperAdmin
187 228
 
188 229
             for (let i = 0; i < this.admin_user.length; i++) {
189 230
               if (this.admin_user[i].role_ids.length > 0) {
@@ -213,7 +254,6 @@
213 254
         this.role_id = role_id
214 255
         this.admin_user = []
215 256
         this.local_user_id = this.$store.getters.xt_user.user.id
216
-        this.local_user_id = 597
217 257
         this.GetAllStaff()
218 258
       }
219 259
     }

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

@@ -1,75 +1,77 @@
1 1
 <template>
2 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 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 17
                   backgroundColor: 'rgb(245, 247, 250)',
16 18
                   color: '#606266'
17 19
                 }"
18 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 76
         <el-table-column
75 77
           prop="updated_time"
@@ -189,20 +191,20 @@
189 191
             </el-form-item>
190 192
           </el-col>
191 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 197
           <!--</el-col>-->
196 198
 
197 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 203
           <!--</el-col>-->
202 204
 
203 205
 
204 206
           <el-col :span="8" v-if="isShows('透析液配方')">
205
-            <el-form-item label="透析液配方:" >
207
+            <el-form-item label="透析液配方:">
206 208
               <el-select v-model="addPlan.dialysate_formulation">
207 209
                 <el-option v-for="item in dialysate_formulation" :label="item.name" :key="item.id"
208 210
                            :value="item.id"></el-option>
@@ -259,7 +261,7 @@
259 261
             </el-form-item>
260 262
           </el-col>
261 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 265
               <el-input v-model="addPlan.anticoagulant_gaijiliang" :disabled="anticoagulant.gaijiliang==1?false:true"
264 266
                         placeholder="钙剂量"></el-input>
265 267
             </el-form-item>
@@ -359,7 +361,8 @@
359 361
 
360 362
 
361 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 366
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
364 367
                 <el-option :key="0" label="请选择" :value="0"></el-option>
365 368
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
@@ -368,7 +371,8 @@
368 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 376
               <el-select v-model="addPlan.displace_liqui_part" placeholder="请选择">
373 377
                 <el-option :key="0" label="请选择" :value="0"></el-option>
374 378
                 <el-option v-for="(option, index) in displace_liqui_part_option" :key="index"
@@ -454,12 +458,7 @@
454 458
     fetchPatientDialysisSolutions
455 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 463
   import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
465 464
   import store from '@/store'
@@ -537,6 +536,7 @@
537 536
           id: 0,
538 537
           mode: '',
539 538
           mode_name: '',
539
+          registrars_id: 0,
540 540
           dialyzer: '',
541 541
           dialysis_duration: '',
542 542
           dialysis_duration_hour: '',
@@ -564,10 +564,10 @@
564 564
           dialysate_temperature: '',
565 565
           conductivity: '',
566 566
           doctor: '',
567
-          dialysate_formulation:'',
567
+          dialysate_formulation: '',
568 568
           remark: '',
569
-          target_ktv:'',
570
-          target_ultrafiltration:'',
569
+          target_ktv: '',
570
+          target_ultrafiltration: '',
571 571
           dialyzer_perfusion_apparatus: '',
572 572
           body_fluid: '',
573 573
           body_fluid_other: '',
@@ -576,7 +576,7 @@
576 576
           displace_liqui_part: '',
577 577
           displace_liqui_value: '',
578 578
           ultrafiltration: '',
579
-          blood_access: '',
579
+          blood_access: ''
580 580
         },
581 581
         childPlan: {
582 582
           mode: '',
@@ -701,26 +701,26 @@
701 701
       }
702 702
     },
703 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 706
           this.addPlan.anticoagulant_shouji,
707 707
           this.addPlan.dialysis_duration,
708 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 713
           this.addPlan.anticoagulant_shouji,
714 714
           this.addPlan.dialysis_duration,
715 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 720
           this.addPlan.anticoagulant_shouji,
721 721
           this.addPlan.dialysis_duration,
722 722
           this.addPlan.anticoagulant_weichi
723
-        );
723
+        )
724 724
       }
725 725
     },
726 726
     components: {
@@ -966,7 +966,14 @@
966 966
       submitEditSolution(formName) {
967 967
         this.$refs[formName].validate(valid => {
968 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 977
               if (response.data.state == 0) {
971 978
                 this.$message.error(response.data.msg)
972 979
                 return false
@@ -1002,7 +1009,8 @@
1002 1009
         this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
1003 1010
         this.$refs[formName].validate(valid => {
1004 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 1014
               if (response.data.state == 0) {
1007 1015
                 this.$message.error(response.data.msg)
1008 1016
                 return false
@@ -1050,42 +1058,41 @@
1050 1058
         this.addPlan.dialysis_duration = '' + row.dialysis_duration
1051 1059
         this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
1052 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 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 1097
         this.dialogVisible = true
1091 1098
         this.isEdit = true
@@ -1115,10 +1122,8 @@
1115 1122
           doctor: '',
1116 1123
           first_dialysis: '',
1117 1124
 
1118
-
1119
-
1120 1125
           dialyzer: '',
1121
-          dialysate_formulation:'',
1126
+          dialysate_formulation: '',
1122 1127
           hemodialysis_machine: '',
1123 1128
           perfusion_apparatus: '',
1124 1129
           blood_flow_volume: '',
@@ -1142,8 +1147,8 @@
1142 1147
           dialysate_temperature: '',
1143 1148
           conductivity: '',
1144 1149
           remark: '',
1145
-          target_ktv:'',
1146
-          target_ultrafiltration:'',
1150
+          target_ktv: '',
1151
+          target_ultrafiltration: '',
1147 1152
           dialyzer_perfusion_apparatus: '',
1148 1153
           body_fluid: '',
1149 1154
           body_fluid_other: '',
@@ -1154,14 +1159,6 @@
1154 1159
           ultrafiltration: '',
1155 1160
           blood_access: '',
1156 1161
 
1157
-
1158
-
1159
-
1160
-
1161
-
1162
-
1163
-
1164
-
1165 1162
           dialysis_duration: '3.30',
1166 1163
           dialysis_duration_hour: '3',
1167 1164
           dialysis_duration_minute: '30'
@@ -1258,29 +1255,25 @@
1258 1255
           id: thismode
1259 1256
         }
1260 1257
 
1261
-
1262
-
1263 1258
         getSystemPrescription(params).then(response => {
1264 1259
           if (response.data.state == 1) {
1265
-            if(response.data.data.prescription.id > 0) {
1260
+            if (response.data.data.prescription.id > 0) {
1266 1261
               for (const key in  response.data.data.prescription) {
1267 1262
                 //因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
1268 1263
                 this.$set(this.addPlan, key, response.data.data.prescription[key].toString())
1269 1264
               }
1270 1265
 
1271 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 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 1277
               var tempAddPlan = {
1285 1278
                 id: 0,
1286 1279
                 dialyzer: '',
@@ -1288,7 +1281,7 @@
1288 1281
                 dialysis_duration_hour: '',
1289 1282
                 dialysis_duration_minute: '',
1290 1283
                 hemodialysis_machine: '',
1291
-                dialysate_formulation:'',
1284
+                dialysate_formulation: '',
1292 1285
                 perfusion_apparatus: '',
1293 1286
                 blood_flow_volume: '',
1294 1287
                 dewater: '',
@@ -1329,7 +1322,6 @@
1329 1322
                 this.addPlan[key] = tempAddPlan[key]
1330 1323
               }
1331 1324
 
1332
-
1333 1325
             }
1334 1326
           }
1335 1327
         })
@@ -1385,8 +1377,6 @@
1385 1377
     },
1386 1378
     created() {
1387 1379
 
1388
-
1389
-
1390 1380
       const id = this.$route.params && this.$route.params.id
1391 1381
       this.patientID = parseInt(id)
1392 1382
       if (isNaN(this.patientID) || this.patientID <= 0) {
@@ -1413,8 +1403,6 @@
1413 1403
       this.displace_liqui_part_option = this.$store.getters.displace_liqui
1414 1404
       this.blood_access_option = this.$store.getters.blood_access
1415 1405
 
1416
-
1417
-
1418 1406
       this.queryParams.id = this.patientID
1419 1407
       // this.fetchAllDoctorAndNurse();
1420 1408
       this.fetchAllAdminUsers()
@@ -1475,15 +1463,16 @@
1475 1463
   }
1476 1464
 </style>
1477 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 1478
 </style>

+ 13 - 13
src/xt_permission.js Ver fichero

@@ -10,19 +10,19 @@ const permissionWhiteList = loginWhiteList.concat(["/"]); // 权限验证白名
10 10
 
11 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 28
   NProgress.start();