Browse Source

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

See999 5 years ago
parent
commit
b2a729584f

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

@@ -6,8 +6,9 @@
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"',
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 10
   // BASE_API:'"http://localhost:9531"',
11
+  BASE_API: '"http://api.xt.test.sgjyun.com"',
11 12
   SSO_HOST: '"http://testsso.sgjyun.com"',
12 13
   SRCM_HOST: '"http://test1.sgjyun.com"',
13 14
   XT_HOST: '"http://xt.test.sgjyun.com"',

+ 2 - 3
config/sit.env.js View File

@@ -2,10 +2,9 @@ module.exports = {
2 2
   NODE_ENV: '"production"',
3 3
   ENV_CONFIG: '"sit"',
4 4
   BASE_API: '"http://new_mobile.xt.api.sgjyun.com"',
5
-
6 5
   SSO_HOST: '"https://testsso.sgjyun.com"',
7 6
   SRCM_HOST: '"http://test1.sgjyun.com"',
8 7
   XT_HOST: '"http://xt.test.sgjyun.com"',
9 8
   MIRCO_MALL_HOST: '"https://mall.test.sgjyun.com"',
10
-  CDM_HOST: '"http://cdm.test.sgjyun.com"',
11
-}
9
+  CDM_HOST: '"http://cdm.test.sgjyun.com"'
10
+};

+ 96 - 75
src/api/advice.js View File

@@ -14,58 +14,65 @@ export function getAllAdviceConfig() {
14 14
   })
15 15
 }
16 16
 
17
-export function CreateDoctorAdvice(id, advice,mode) {
17
+export function CreateDoctorAdvice(id, advice, mode) {
18 18
   return request({
19
-    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
19
+    url: '/api/patients/advice/create?id=' + id + '&mode=' + mode,
20 20
     method: 'post',
21 21
     data: advice,
22
-    headers:{"Permission":3},
22
+    headers: {
23
+      'Permission': 3
24
+    }
23 25
 
24 26
   })
25 27
 }
26 28
 
27
-export function EditDoctorAdvice(patient, id, advice,mode) {
29
+export function EditDoctorAdvice(patient, id, advice, mode) {
28 30
   return request({
29
-    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient+"&mode="+mode,
31
+    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient + '&mode=' + mode,
30 32
     method: 'Put',
31 33
     data: advice,
32
-    headers:{"Permission":2},
34
+    headers: {
35
+      'Permission': 2
36
+    }
33 37
 
34 38
   })
35 39
 }
36 40
 
37
-export function ExecDoctorAdvice(patient, id, time,mode) {
41
+export function ExecDoctorAdvice(patient, id, time, mode) {
38 42
   var params = {
39 43
     id: id,
40 44
     patient: patient,
41 45
     execution_time: time,
42
-    mode:mode
46
+    mode: mode
43 47
   }
44 48
   return request({
45 49
     url: '/api/patients/advice/exec',
46 50
     method: 'Post',
47 51
     params: params,
48
-    headers:{"Permission":2},
52
+    headers: {
53
+      'Permission': 2
54
+    }
49 55
 
50 56
   })
51 57
 }
52
-export function CheckDoctorAdvice(patient, id,mode) {
58
+export function CheckDoctorAdvice(patient, id, mode) {
53 59
   var params = {
54 60
     id: id,
55 61
     patient: patient,
56
-    mode:mode
62
+    mode: mode
57 63
     // execution_time: time,
58 64
   }
59 65
   return request({
60 66
     url: '/api/patients/advice/check',
61 67
     method: 'Post',
62 68
     params: params,
63
-    headers:{"Permission":2},
69
+    headers: {
70
+      'Permission': 2
71
+    }
64 72
 
65 73
   })
66 74
 }
67 75
 
68
-
69 76
 export function getDoctorAdviceList(params) {
70 77
   return request({
71 78
     url: '/api/patients/advices',
@@ -84,23 +91,25 @@ export function getDoctorAdviceList(params) {
84 91
 //   })
85 92
 // }
86 93
 
87
-export function StopGroupAdvice(groupno, reason,mode) {
94
+export function StopGroupAdvice(groupno, reason, mode) {
88 95
   return request({
89
-    url: '/api/patients/advice/stopgroup?groupno=' + groupno+"&mode="+mode,
96
+    url: '/api/patients/advice/stopgroup?groupno=' + groupno + '&mode=' + mode,
90 97
     method: 'Post',
91 98
     data: reason,
92
-    headers:{"Permission":3},
99
+    headers: {
100
+      'Permission': 3
101
+    }
93 102
 
94 103
   })
95 104
 }
96 105
 
97
-
98
-
99
-export function DeleteDoctorAdvice(id,mode) {
106
+export function DeleteDoctorAdvice(id, mode) {
100 107
   return request({
101
-    url: '/api/patients/advice/delete?id=' + id+"&mode="+mode,
108
+    url: '/api/patients/advice/delete?id=' + id + '&mode=' + mode,
102 109
     method: 'Delete',
103
-    headers:{"Permission":2},
110
+    headers: {
111
+      'Permission': 2
112
+    }
104 113
 
105 114
   })
106 115
 }
@@ -199,30 +208,36 @@ export function postAdviceTemplate(params, name, advice_type) {
199 208
   })
200 209
 }
201 210
 
202
-export function CreateGroupAdvice(id, groupno, advices,mode) {
211
+export function CreateGroupAdvice(id, groupno, advices, mode) {
203 212
   if (advices.remind > 0) {
204 213
     return request({
205
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
214
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
206 215
       method: 'post',
207 216
       data: advices,
208
-      headers:{"Permission":2},
217
+      headers: {
218
+        'Permission': 2
219
+      }
209 220
 
210 221
     })
211 222
   } else {
212 223
     return request({
213
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
224
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
214 225
       method: 'post',
215 226
       data: advices,
216
-      headers:{"Permission":2},
227
+      headers: {
228
+        'Permission': 2
229
+      }
217 230
 
218 231
     })
219 232
   }
220 233
 }
221
-export function DeleteGroupAdvice(groupno,mode) {
234
+export function DeleteGroupAdvice(groupno, mode) {
222 235
   return request({
223
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno+"&mode="+mode,
236
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
224 237
     method: 'delete',
225
-    headers:{"Permission":3},
238
+    headers: {
239
+      'Permission': 3
240
+    }
226 241
 
227 242
   })
228 243
 }
@@ -305,114 +320,120 @@ export function getPrintInfo(data) {
305 320
   })
306 321
 }
307 322
 
308
-
309
-
310
-
311
-
312
-export function EditNewDoctorAdvice(patient, id, advice,mode) {
323
+export function EditNewDoctorAdvice(patient, id, advice, mode) {
313 324
   return request({
314
-    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient+"&mode="+mode,
325
+    url: '/api/patients/advice/edit?id=' + id + '&patient=' + patient + '&mode=' + mode,
315 326
     method: 'Put',
316 327
     data: advice,
317
-    headers:{"Permission":2},
328
+    headers: {
329
+      'Permission': 2
330
+    }
318 331
 
319 332
   })
320 333
 }
321 334
 
322
-
323
-
324
-
325
-
326
-export function CreateNewDoctorAdvice(id, advice,mode) {
335
+export function CreateNewDoctorAdvice(id, advice, mode) {
327 336
   return request({
328
-    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
337
+    url: '/api/patients/advice/create?id=' + id + '&mode=' + mode,
329 338
     method: 'post',
330 339
     data: advice,
331
-    headers:{"Permission":2},
340
+    headers: {
341
+      'Permission': 2
342
+    }
332 343
 
333 344
   })
334 345
 }
335 346
 
336
-
337
-
338
-export function CreateNewGroupAdvice(id, groupno, advices,mode) {
347
+export function CreateNewGroupAdvice(id, groupno, advices, mode) {
339 348
   if (advices.remind > 0) {
340 349
     return request({
341
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
350
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
342 351
       method: 'post',
343 352
       data: advices,
344
-      headers:{"Permission":3},
353
+      headers: {
354
+        'Permission': 3
355
+      }
345 356
 
346 357
     })
347 358
   } else {
348 359
     return request({
349
-      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno+"&mode="+mode,
360
+      url: '/api/patients/advice/creategroup?id=' + id + '&groupno=' + groupno + '&mode=' + mode,
350 361
       method: 'post',
351 362
       data: advices,
352
-      headers:{"Permission":3},
363
+      headers: {
364
+        'Permission': 3
365
+      }
353 366
 
354 367
     })
355 368
   }
356 369
 }
357 370
 
358
-
359
-
360
-export function DeleteNewDoctorAdvice(id,mode) {
371
+export function DeleteNewDoctorAdvice(id, mode) {
361 372
   return request({
362
-    url: '/api/patients/advice/delete?id=' + id+"&mode="+mode,
373
+    url: '/api/patients/advice/delete?id=' + id + '&mode=' + mode,
363 374
     method: 'Delete',
364
-    headers:{"Permission":2},
375
+    headers: {
376
+      'Permission': 2
377
+    }
365 378
 
366 379
   })
367 380
 }
368 381
 
369
-
370
-
371
-export function DeleteNewGroupAdvice(groupno,mode) {
382
+export function DeleteNewGroupAdvice(groupno, mode) {
372 383
   return request({
373
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno+"&mode="+mode,
384
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
374 385
     method: 'delete',
375
-    headers:{"Permission":3},
386
+    headers: {
387
+      'Permission': 3
388
+    }
376 389
 
377 390
   })
378 391
 }
379 392
 
380
-
381
-
382
-export function StopDoctorAdvice(id, reason,mode) {
393
+export function StopDoctorAdvice(id, reason, mode) {
383 394
   return request({
384
-    url: '/api/patients/advice/stop?id=' + id+"&mode="+mode,
395
+    url: '/api/patients/advice/stop?id=' + id + '&mode=' + mode,
385 396
     method: 'Post',
386 397
     data: reason,
387
-    headers:{"Permission":2},
398
+    headers: {
399
+      'Permission': 2
400
+    }
388 401
 
389 402
   })
390 403
 }
391 404
 
392
-
393
-
394
-
395
-export function ExecGroupAdvice(groupno, time,mode) {
405
+export function ExecGroupAdvice(groupno, time, mode) {
396 406
   return request({
397
-    url: '/api/patients/advice/execgroup?groupno=' + groupno + '&execution_time=' + time+"&mode="+mode,
407
+    url: '/api/patients/advice/execgroup?groupno=' + groupno + '&execution_time=' + time + '&mode=' + mode,
398 408
     method: 'Post',
399
-    headers:{"Permission":2},
409
+    headers: {
410
+      'Permission': 2
411
+    }
400 412
 
401 413
   })
402 414
 }
403 415
 
404
-
405
-export function CheckGroupAdvice(groupno,mode) {
416
+export function CheckGroupAdvice(groupno, mode) {
406 417
   var params = {
407 418
     groupno: groupno,
408
-    mode: mode,
419
+    mode: mode
409 420
   }
410 421
   return request({
411 422
     url: '/api/patients/advice/checkgroup',
412 423
     method: 'Post',
413 424
     params: params,
414
-    headers:{"Permission":2},
425
+    headers: {
426
+      'Permission': 2
427
+    }
415 428
 
416 429
   })
417 430
 }
418 431
 
432
+export function getPatientSchedules(id, params) {
433
+  console.log('id----', id)
434
+  return request({
435
+    url: '/api/patients/advices/getpatientschedules?id=' + id,
436
+    method: 'get',
437
+    params: params
438
+  })
439
+}

+ 0 - 1
src/api/manage.js View File

@@ -506,7 +506,6 @@ export function UpdateMacheineTwo(data) {
506 506
 }
507 507
 
508 508
 export function getBedForm(id, params) {
509
-  console.log('设备-id', id)
510 509
   return request({
511 510
     url: '/api/manage/getbedform?id=' + id,
512 511
     method: 'get',

+ 2 - 0
src/xt_pages/data/prescription.vue View File

@@ -913,6 +913,7 @@ export default {
913 913
     },
914 914
     changeThisAnticoagulant() {
915 915
       var thismode = parseInt(this.addPlan.anticoagulant);
916
+      console.log("------", thismode);
916 917
       if (isNaN(thismode) || thismode <= 0) {
917 918
         return false;
918 919
       }
@@ -976,6 +977,7 @@ export default {
976 977
     this.anticoagulantsSet = this.$store.getters.anticoagulants_set;
977 978
     this.replacementWays = this.$store.getters.replacement_ways;
978 979
     this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
980
+
979 981
     this.blood_filters = this.$store.getters.blood_filters;
980 982
     this.dialysate_formulation = this.$store.getters.dialysate_formulation;
981 983
     this.body_fluid_option = this.$store.getters.body_fluid;

+ 2 - 1
src/xt_pages/data/printTemplate.vue View File

@@ -222,8 +222,9 @@ export default {
222 222
               this.radio = template_id.toString();
223 223
               this.tempRadio = template_id.toString();
224 224
               // 同步
225
+              console.log(response.data.data.fileds)
225 226
               this.loading = false;
226
-              store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
227
+               store.dispatch("updateAllFiledConfigList", response.data.data.fileds).then(() => {});
227 228
               this.$message({
228 229
                 type: "success",
229 230
                 message: "切换成功"

+ 2 - 2
src/xt_pages/device/zone_main.vue View File

@@ -219,7 +219,7 @@ export default {
219 219
                 this.zones.push(newZone);
220 220
                 this.cancelModifyZone();
221 221
               } else {
222
-                this.$message.error(resp.msg);
222
+                this.$message.error("分区名称已存在!");
223 223
               }
224 224
             });
225 225
           } else {
@@ -240,7 +240,7 @@ export default {
240 240
                 }
241 241
                 this.cancelModifyZone();
242 242
               } else {
243
-                this.$message.error(resp.msg);
243
+                this.$message.error("分区名称已存在!");
244 244
               }
245 245
             });
246 246
           }

+ 128 - 55
src/xt_pages/dialysis/PatientBox.vue View File

@@ -1,34 +1,67 @@
1 1
 <template>
2
-<div>
3
-  <!-- <router-link to="/dialysis/details"> -->
4
-    <div class="patient" v-for="schedule in schedules" v-if="schedule.patient" :class="borderColor(schedule)"  @click="detailAction(schedule)" :key="schedule.id">
5
-        <div class="kehu" >
6
-          <div class="tx">
7
-            <img :src="schedule.patient.avatar.length > 0 ? schedule.patient.avatar : '../../assets/home/analyze.png'" alt="">
8
-            <div class="right">
9
-               <h3 class="name">{{schedule.patient.name}}<span class="yc" v-show="isAbnormal(schedule)">异常</span></h3>
10
-               <span class="num">{{ genderText(schedule) }} | {{ age(schedule) }} 岁</span>
11
-            </div>
12
-          </div>
13
-          <div class="online" v-show="computeState(schedule) != 4" >
14
-            <p :class="stateColor(schedule)">{{stateText(schedule)}}</p>
2
+  <div>
3
+    <!-- <router-link to="/dialysis/details"> -->
4
+    <div
5
+      class="patient"
6
+      v-for="schedule in schedules"
7
+      v-if="schedule.patient"
8
+      :class="borderColor(schedule)"
9
+      @click="detailAction(schedule)"
10
+      :key="schedule.id"
11
+    >
12
+      <div class="kehu">
13
+        <div class="tx">
14
+          <img
15
+            :src="
16
+              schedule.patient.avatar.length > 0
17
+                ? schedule.patient.avatar
18
+                : '../../assets/home/analyze.png'
19
+            "
20
+            alt=""
21
+          />
22
+          <div class="right">
23
+            <h3 class="name">
24
+              {{ schedule.patient.name
25
+              }}<span class="yc" v-show="isAbnormal(schedule)">异常</span>
26
+            </h3>
27
+            <span class="num"
28
+              >{{ genderText(schedule) }} | {{ getAge(schedule) }} 岁</span
29
+            >
15 30
           </div>
16 31
         </div>
17
-      <div class="function" :class="functionColor(schedule)" >
32
+        <div class="online" v-show="computeState(schedule) != 4">
33
+          <p :class="stateColor(schedule)">{{ stateText(schedule) }}</p>
34
+        </div>
35
+      </div>
36
+      <div class="function" :class="functionColor(schedule)">
18 37
         <ul>
19
-          <li><span class="iconfont">&#xe6f5;</span>班次 : {{timeTypeText(schedule)}}</li>
20
-          <li><span class="iconfont">&#xe6de;</span>床位号 : {{schedule.device_number.number}}</li>
21
-          <li><span class="iconfont">&#xe6f6;</span>透析模式 : {{schedule.mode_id&&$store.getters.treatment_mode[schedule.mode_id]?$store.getters.treatment_mode[schedule.mode_id].name:''}}</li>
38
+          <li>
39
+            <span class="iconfont">&#xe6f5;</span>班次 :
40
+            {{ timeTypeText(schedule) }}
41
+          </li>
42
+          <li>
43
+            <span class="iconfont">&#xe6de;</span>床位号 :
44
+            {{ schedule.device_number.number }}
45
+          </li>
46
+          <li>
47
+            <span class="iconfont">&#xe6f6;</span>透析模式 :
48
+            {{
49
+              schedule.mode_id &&
50
+              $store.getters.treatment_mode[schedule.mode_id]
51
+                ? $store.getters.treatment_mode[schedule.mode_id].name
52
+                : ""
53
+            }}
54
+          </li>
22 55
         </ul>
23 56
       </div>
24 57
     </div>
25 58
     <!-- </router-link> -->
26
-</div>
59
+  </div>
27 60
 </template>
28 61
 
29 62
 <script>
30
-import { parseTime } from "@/utils"
31
-import { jsGetAge } from '@/utils/tools'
63
+import { parseTime } from "@/utils";
64
+import { jsGetAge } from "@/utils/tools";
32 65
 
33 66
 export default {
34 67
   name: "PatientBox",
@@ -68,7 +101,7 @@ export default {
68 101
   },
69 102
   props: {
70 103
     schedules: {
71
-      type: Array,
104
+      type: Array
72 105
     }
73 106
   },
74 107
   methods: {
@@ -116,54 +149,71 @@ export default {
116 149
       }
117 150
     },
118 151
     computeState: function(schedual) {
119
-      if (schedual.dialysis_order == null) { // 未上机
120
-        return 4
121
-      } else if (schedual.dialysis_order.stage == 2) { // 已下机
122
-        return 2
123
-      } else if (schedual.dialysis_order.stage == 1 && schedual.monitoring_records != null && schedual.monitoring_records.length > 1) { // 监测中
124
-        return 3
152
+      if (schedual.dialysis_order == null) {
153
+        // 未上机
154
+        return 4;
155
+      } else if (schedual.dialysis_order.stage == 2) {
156
+        // 已下机
157
+        return 2;
158
+      } else if (
159
+        schedual.dialysis_order.stage == 1 &&
160
+        schedual.monitoring_records != null &&
161
+        schedual.monitoring_records.length > 1
162
+      ) {
163
+        // 监测中
164
+        return 3;
125 165
       } else {
126
-        return 1
166
+        return 1;
127 167
       }
128 168
     },
129 169
 
130 170
     orderState: function(schedual) {
131
-      if (schedual.dialysis_order == null) { // 未上机
132
-        return 4
133
-      } else if (schedual.dialysis_order.stage == 2) { // 已下机
134
-        return 2
135
-      } else if (schedual.dialysis_order.stage == 1 && schedual.monitoring_records != null && schedual.monitoring_records.length > 1) { // 监测中
136
-        return 3
171
+      if (schedual.dialysis_order == null) {
172
+        // 未上机
173
+        return 4;
174
+      } else if (schedual.dialysis_order.stage == 2) {
175
+        // 已下机
176
+        return 2;
177
+      } else if (
178
+        schedual.dialysis_order.stage == 1 &&
179
+        schedual.monitoring_records != null &&
180
+        schedual.monitoring_records.length > 1
181
+      ) {
182
+        // 监测中
183
+        return 3;
137 184
       } else {
138
-        return 1
185
+        return 1;
139 186
       }
140 187
     },
141 188
     isAbnormal: function(schedual) {
142
-      return false // schedual.yc;
189
+      return false; // schedual.yc;
143 190
     },
144 191
     timeTypeText: function(schedual) {
145 192
       if (schedual.schedule_type == 1) {
146
-        return "上午"
193
+        return "上午";
147 194
       } else if (schedual.schedule_type == 2) {
148
-        return "下午"
195
+        return "下午";
149 196
       } else {
150
-        return "晚上"
197
+        return "晚上";
151 198
       }
152 199
     },
153 200
     genderText: function(schedual) {
154 201
       if (schedual.patient.gender == 0) {
155
-        return "未知"
202
+        return "未知";
156 203
       } else if (schedual.patient.gender == 1) {
157
-        return "男"
204
+        return "男";
158 205
       } else {
159
-        return "女"
206
+        return "女";
160 207
       }
161 208
     },
162 209
     age: function(schedual) {
163
-      if (schedual.patient.birthday == 0){
164
-        return ''
165
-      }else{
166
-        return jsGetAge(parseTime(schedual.patient.birthday, '{y}-{m}-{d}'), '-')
210
+      if (schedual.patient.birthday == 0) {
211
+        return "";
212
+      } else {
213
+        return jsGetAge(
214
+          parseTime(schedual.patient.birthday, "{y}-{m}-{d}"),
215
+          "-"
216
+        );
167 217
       }
168 218
 
169 219
       // var now = new Date()
@@ -173,10 +223,35 @@ export default {
173 223
       // // console.log(birthdayYear)
174 224
       // return nowYear - birthdayYear
175 225
     },
226
+    getAge: function(val) {
227
+      var thisLen = val.patient.id_card_no.length;
228
+      var birth = "";
229
+      if (thisLen == 15) {
230
+        birth = "19" + val.patient.id_card_no.substr(6, 6);
231
+      } else {
232
+        birth = val.patient.id_card_no.substr(6, 8);
233
+      }
234
+      var birthtwo =
235
+        birth.substr(0, 4) +
236
+        "-" +
237
+        birth.substr(4, 2) +
238
+        "-" +
239
+        birth.substr(6, 2);
240
+
241
+      var age = jsGetAge(birthtwo, "-");
242
+      return age;
243
+    },
176 244
     detailAction: function(schedual) {
177
-      var patient_id = schedual.patient_id
178
-      var date = schedual.schedule_date
179
-      this.$router.push({ path: "/dialysis/details", query: {patient_id: patient_id, date: date, patient_name: schedual.patient.name}})
245
+      var patient_id = schedual.patient_id;
246
+      var date = schedual.schedule_date;
247
+      this.$router.push({
248
+        path: "/dialysis/details",
249
+        query: {
250
+          patient_id: patient_id,
251
+          date: date,
252
+          patient_name: schedual.patient.name
253
+        }
254
+      });
180 255
     }
181 256
   }
182 257
 };
@@ -187,8 +262,8 @@ export default {
187 262
   border: 1px #e5e5ee solid;
188 263
   padding: 9px 0;
189 264
   margin: 0 15px 15px 0;
190
-    float: left;
191
-    width: 360px;
265
+  float: left;
266
+  width: 360px;
192 267
   cursor: pointer;
193 268
   .function {
194 269
     padding: 15px 5px 0 5px;
@@ -255,7 +330,7 @@ export default {
255 330
           }
256 331
         }
257 332
         .num {
258
-          font-size:13px;
333
+          font-size: 13px;
259 334
           color: #7b8a97;
260 335
         }
261 336
       }
@@ -268,7 +343,7 @@ export default {
268 343
       p {
269 344
         background: #c6cdd2;
270 345
         color: #fff;
271
-        width:65px;
346
+        width: 65px;
272 347
         height: 24px;
273 348
         line-height: 24px;
274 349
         border-radius: 4px;
@@ -301,5 +376,3 @@ export default {
301 376
   border: 1px #ff7979 solid;
302 377
 }
303 378
 </style>
304
-
305
-

+ 50 - 48
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue View File

@@ -674,64 +674,66 @@ export default {
674 674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
675 675
           }
676 676
           submitForm.adviceNames = adviceNames;
677
-          let mode = "1"
677
+          let mode = "1";
678 678
 
679
-          CreateGroupAdvice(this.patientID, 0, submitForm,mode).then(response => {
680
-            if (response.data.state == 0) {
681
-              this.$message.error(response.data.msg);
682
-              return false;
683
-            } else {
684
-              this.$notify({
685
-                title: "成功",
686
-                message: "新增成功",
687
-                type: "success",
688
-                duration: 2000
689
-              });
679
+          CreateGroupAdvice(this.patientID, 0, submitForm, mode).then(
680
+            response => {
681
+              if (response.data.state == 0) {
682
+                this.$message.error(response.data.msg);
683
+                return false;
684
+              } else {
685
+                this.$notify({
686
+                  title: "成功",
687
+                  message: "新增成功",
688
+                  type: "success",
689
+                  duration: 2000
690
+                });
690 691
 
691
-              var childMap = {};
692
-              for (const index in response.data.data.advices) {
693
-                if (response.data.data.advices[index].parent_id == 0) {
694
-                  continue;
695
-                }
696
-                if (
697
-                  response.data.data.advices[index].parent_id in childMap ===
698
-                  false
699
-                ) {
700
-                  childMap[response.data.data.advices[index].parent_id] = [];
692
+                var childMap = {};
693
+                for (const index in response.data.data.advices) {
694
+                  if (response.data.data.advices[index].parent_id == 0) {
695
+                    continue;
696
+                  }
697
+                  if (
698
+                    response.data.data.advices[index].parent_id in childMap ===
699
+                    false
700
+                  ) {
701
+                    childMap[response.data.data.advices[index].parent_id] = [];
702
+                  }
703
+                  childMap[response.data.data.advices[index].parent_id].unshift(
704
+                    response.data.data.advices[index]
705
+                  );
701 706
                 }
702
-                childMap[response.data.data.advices[index].parent_id].unshift(
703
-                  response.data.data.advices[index]
704
-                );
705
-              }
706
-              var parentArr = [];
707
-              for (const index in response.data.data.advices) {
708
-                if (response.data.data.advices[index].parent_id > 0) {
709
-                  continue;
707
+                var parentArr = [];
708
+                for (const index in response.data.data.advices) {
709
+                  if (response.data.data.advices[index].parent_id > 0) {
710
+                    continue;
711
+                  }
712
+                  parentArr.push(response.data.data.advices[index]);
710 713
                 }
711
-                parentArr.push(response.data.data.advices[index]);
712
-              }
713 714
 
714
-              for (const index in parentArr) {
715
-                if (parentArr[index].id in childMap) {
716
-                  for (const j in childMap[parentArr[index].id]) {
717
-                    this.adviceTableData.unshift(
718
-                      childMap[parentArr[index].id][j]
719
-                    );
715
+                for (const index in parentArr) {
716
+                  if (parentArr[index].id in childMap) {
717
+                    for (const j in childMap[parentArr[index].id]) {
718
+                      this.adviceTableData.unshift(
719
+                        childMap[parentArr[index].id][j]
720
+                      );
721
+                    }
720 722
                   }
723
+                  this.adviceTableData.unshift(parentArr[index]);
721 724
                 }
722
-                this.adviceTableData.unshift(parentArr[index]);
723
-              }
724 725
 
725
-              // var alen = response.data.data.advices.length
726
-              // for (let index = alen-1; index >=0; index--) {
727
-              //   this.adviceTableData.unshift(response.data.data.advices[index]);
728
-              // }
726
+                // var alen = response.data.data.advices.length
727
+                // for (let index = alen-1; index >=0; index--) {
728
+                //   this.adviceTableData.unshift(response.data.data.advices[index]);
729
+                // }
729 730
 
730
-              this.resetForm(formName);
731
-              this.groupAddFormVisible = false;
732
-              return false;
731
+                this.resetForm(formName);
732
+                this.groupAddFormVisible = false;
733
+                return false;
734
+              }
733 735
             }
734
-          });
736
+          );
735 737
         }
736 738
       });
737 739
     },

+ 20 - 10
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue View File

@@ -236,15 +236,15 @@
236 236
           <el-table-column
237 237
             prop="displacement_quantity"
238 238
             align="center"
239
-            label="SpO₂(%)"
239
+            label="置换量(L)"
240 240
             width="100"
241
-            v-if="isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11"
241
+            v-if="isShow('置换量') && template_id != 6 && template_id != 10 && template_id != 11"
242 242
           >
243 243
             <template slot-scope="scope">
244 244
               {{
245
-                scope.row.blood_oxygen_saturation
246
-                  ? scope.row.blood_oxygen_saturation
247
-                  : ""
245
+              scope.row.displacement_quantity
246
+              ? scope.row.displacement_quantity
247
+              : ""
248 248
               }}
249 249
             </template>
250 250
           </el-table-column>
@@ -252,18 +252,20 @@
252 252
           <el-table-column
253 253
             prop="displacement_quantity"
254 254
             align="center"
255
-            label="置换量(L)"
255
+            label="SpO₂(%)"
256 256
             width="100"
257
-            v-if="isShow('置换量') && template_id != 6 && template_id != 10 || template_id != 11"
257
+            v-if="isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11"
258 258
           >
259 259
             <template slot-scope="scope">
260 260
               {{
261
-                scope.row.displacement_quantity
262
-                  ? scope.row.displacement_quantity
261
+                scope.row.blood_oxygen_saturation
262
+                  ? scope.row.blood_oxygen_saturation
263 263
                   : ""
264 264
               }}
265 265
             </template>
266 266
           </el-table-column>
267
+
268
+
267 269
           <el-table-column
268 270
             prop="displacement_flow_quantity"
269 271
             align="center"
@@ -290,6 +292,14 @@
290 292
               }}
291 293
             </template>
292 294
           </el-table-column>
295
+          <el-table-column
296
+            prop="heparin"
297
+            align="center"
298
+            label="肝素用量余量(ml)"
299
+            width="140"
300
+            v-if="isShow('肝素用量余量')"
301
+          >
302
+          </el-table-column>
293 303
           <el-table-column
294 304
             prop="symptom"
295 305
             align="center"
@@ -471,7 +481,7 @@
471 481
 
472 482
 
473 483
           <el-col :span="8" v-if="isShow('肝素用量余量')">
474
-            <el-form-item label="肝素用量余量(ml)">
484
+            <el-form-item label="肝素用量余量(ml):">
475 485
               <el-input v-model="form.heparin"></el-input>
476 486
             </el-form-item>
477 487
           </el-col>

+ 1 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue View File

@@ -2227,6 +2227,7 @@ export default {
2227 2227
         );
2228 2228
         this.afterdialysis = response.data.data.AssessmentAfterDislysis;
2229 2229
         this.operators = response.data.data.operators;
2230
+        console.log("operators", this.operators);
2230 2231
         this.dialysisOrder =
2231 2232
           response.data.data.dialysisOrder === null
2232 2233
             ? null

File diff suppressed because it is too large
+ 2453 - 2452
src/xt_pages/dialysis/template/dialysisPrintOrderNine.vue


+ 36 - 1
src/xt_pages/management/components/RepairForm.vue View File

@@ -511,7 +511,7 @@ export default {
511 511
       getAllRepair(this.limit, this.page).then(response => {
512 512
         if (response.data.state === 1) {
513 513
           var repair = response.data.data.repair;
514
-          // console.log('repair是', repair)
514
+          console.log("repair是", repair);
515 515
           // eslint-disable-next-line no-unused-vars
516 516
           var total = response.data.data.total;
517 517
           this.total = total;
@@ -737,6 +737,41 @@ export default {
737 737
       ).then(response => {
738 738
         if (response.data.state === 1) {
739 739
           var repair = response.data.data.repair;
740
+          for (let index = 0; index < repair.length; index++) {
741
+            if (repair[index].failure_stage === 0) {
742
+              repair[index].failure_stage = "";
743
+            }
744
+
745
+            if (repair[index].failure_stage === 1) {
746
+              repair[index].failure_stage = "开机启动";
747
+            }
748
+            if (repair[index].failure_stage === 2) {
749
+              repair[index].failure_stage = "自检";
750
+            }
751
+            if (repair[index].failure_stage === 3) {
752
+              repair[index].failure_stage = "准备";
753
+            }
754
+            if (repair[index].failure_stage === 4) {
755
+              repair[index].failure_stage = "治疗";
756
+            }
757
+            if (repair[index].failure_stage === 5) {
758
+              repair[index].failure_stage = "消毒";
759
+            }
760
+
761
+            if (repair[index].exclude === 0) {
762
+              repair[index].exclude = "";
763
+            }
764
+
765
+            if (repair[index].exclude === 1) {
766
+              repair[index].exclude = "是";
767
+            }
768
+            if (repair[index].exclude === 2) {
769
+              repair[index].exclude = "待观察";
770
+            }
771
+            if (repair[index].exclude === 3) {
772
+              repair[index].exclude = "未解决";
773
+            }
774
+          }
740 775
           this.tableData = repair;
741 776
         }
742 777
       });

+ 15 - 18
src/xt_pages/management/components/UserForm.vue View File

@@ -1173,7 +1173,7 @@ export default {
1173 1173
             zone.push({ id: item.id, name: item.name });
1174 1174
           }
1175 1175
           this.zones = zone;
1176
-          //  console.log('zones', zones)
1176
+          //console.log("zones", zones);
1177 1177
           var numbers = response.data.data.numbers;
1178 1178
           var number = [{ id: 0, number: "全部" }];
1179 1179
           for (let index = 0; index < numbers.length; index++) {
@@ -1466,7 +1466,7 @@ export default {
1466 1466
       EditUser(id, patientid).then(response => {
1467 1467
         if (response.data.state === 1) {
1468 1468
           var device = response.data.data.device;
1469
-          console.log("device", device);
1469
+          //console.log("device", device);
1470 1470
           var patients = response.data.data.patients;
1471 1471
           // console.log('patients', patients)
1472 1472
           // eslint-disable-next-line no-sequences
@@ -1477,21 +1477,14 @@ export default {
1477 1477
             ));
1478 1478
           this.userform.patient_id = device.patient_id;
1479 1479
           this.userform.classtype = device.class;
1480
-          this.userform.zone = device.zone_id;
1480
+          this.userform.zone = device.zone;
1481 1481
           this.userform.bed_number = device.bed_number;
1482 1482
           this.userform.contagion = device.contagion;
1483 1483
           this.userform.patient_name = patients.name;
1484 1484
           this.userform.dialysis_mode = device.dialysis_mode;
1485
-          // this.userform.start_time = uParseTime(
1486
-          // device.start_time,
1487
-          //  '{y}-{m}-{d} {h}:{i}'
1488
-          // )
1485
+
1489 1486
           this.userform.start_time = this.updateTimes(device.start_time);
1490 1487
           this.userform.end_time = this.updateTimes(device.end_time);
1491
-          // this.userform.end_time = uParseTime(
1492
-          // device.end_time,
1493
-          // '{y}-{m}-{d} {h}:{i}'
1494
-          // )
1495 1488
 
1496 1489
           this.userform.dialysis_hour = device.dialysis_hour;
1497 1490
           this.userform.hyperfiltratio = device.hyperfiltratio;
@@ -1641,11 +1634,7 @@ export default {
1641 1634
       if (this.userform.clean === false) {
1642 1635
         this.userform.clean = 2;
1643 1636
       }
1644
-      // this.userform.start_time = this.getTimes(this.userform.start_time)
1645
-      // this.userform.end_time = this.getTimes(this.userform.end_time)
1646
-      // this.userform.starttime = this.getTimes(this.userform.starttime)
1647
-      // this.userform.endtime = this.getTimes(this.userform.endtime)
1648
-      // eslint-disable-next-line eqeqeq
1637
+
1649 1638
       if (this.userform.start_time == "") {
1650 1639
         this.userform.start_time = "0";
1651 1640
       }
@@ -1669,6 +1658,14 @@ export default {
1669 1658
       var statu = parseInt(status);
1670 1659
       this.userform.disinfection = statu;
1671 1660
 
1661
+      var hyperfiltratio = this.userform.hyperfiltratio;
1662
+      var hyperfiltratios = parseFloat(hyperfiltratio);
1663
+      this.userform.hyperfiltratio = hyperfiltratios;
1664
+
1665
+      var weightloss = this.userform.weight_loss;
1666
+      var weidht = parseFloat(weightloss);
1667
+      this.userform.weight_loss = weidht;
1668
+
1672 1669
       this.$refs[formName].validate(valid => {
1673 1670
         if (valid) {
1674 1671
           UpdateForm(this.userform).then(response => {
@@ -1694,7 +1691,7 @@ export default {
1694 1691
       ).then(response => {
1695 1692
         if (response.data.state === 1) {
1696 1693
           var information = response.data.data.infor;
1697
-          console.log("information", information);
1694
+          // console.log("information", information);
1698 1695
           for (let index = 0; index < information.length; index++) {
1699 1696
             if (information[index].class === 0) {
1700 1697
               information[index].class = "";
@@ -1982,7 +1979,7 @@ export default {
1982 1979
       getUserForm(id, this.limit, this.page).then(response => {
1983 1980
         if (response.data.state === 1) {
1984 1981
           var information = response.data.data.information;
1985
-          console.log("数据是-------", information);
1982
+          //console.log("数据是-------", information);
1986 1983
           // eslint-disable-next-line no-unused-vars
1987 1984
           var addmacher = response.data.data.addmacher;
1988 1985
           // console.log('addmacher', addmacher)

+ 2 - 2
src/xt_pages/management/home.vue View File

@@ -3797,14 +3797,14 @@ export default {
3797 3797
           this.userform.hyperfiltratio = 0
3798 3798
         }
3799 3799
         var hyperfiltratio = this.userform.hyperfiltratio
3800
-        var hyperfiltratios = parseInt(hyperfiltratio)
3800
+       var hyperfiltratios = parseFloat(hyperfiltratio)
3801 3801
         this.userform.hyperfiltratio = hyperfiltratios
3802 3802
 
3803 3803
         if (this.userform.weight_loss === '') {
3804 3804
           this.userform.weight_loss = 0
3805 3805
         }
3806 3806
         var weightloss = this.userform.weight_loss
3807
-        var weidht = parseInt(weightloss)
3807
+        var weidht = parseFloat(weightloss)
3808 3808
         this.userform.weight_loss = weidht
3809 3809
 
3810 3810
         if (this.userform.user_total === '0') {

+ 12 - 3
src/xt_pages/role/components/PermissionSettings.vue View File

@@ -172,13 +172,22 @@
172 172
           })
173 173
         }
174 174
         var idsStr = ''
175
-        if (ids.length > 0) {
176
-          idsStr = ids.join(',')
177
-        }
178 175
 
179 176
         var funcIdsStr = ''
180 177
         if (func_ids.length > 0) {
181 178
           funcIdsStr = func_ids.join(',')
179
+          ids.push(49)
180
+        }
181
+
182
+        //去重复
183
+        const obj5 = {}
184
+        ids = ids.reduce((cur, next) => {
185
+          obj5[next] ? '' : obj5[next] = true && cur.push(next)
186
+          return cur
187
+        }, [])
188
+
189
+        if (ids.length > 0) {
190
+          idsStr = ids.join(',')
182 191
         }
183 192
         this.submitLoading = true
184 193
         editPurview(this.role_id, idsStr, funcIdsStr).then(rs => {

+ 7 - 0
src/xt_pages/user/components/PatientDetail.vue View File

@@ -391,6 +391,11 @@
391 391
           </el-radio-group>
392 392
         </el-form-item>
393 393
       </el-col>
394
+        <el-col :span="6" >
395
+          <el-form-item label="系统前透析次数 : " prop="first_dialysis_hospital">
396
+            <el-input v-model="form.user_sys_before_count" disabled></el-input>
397
+          </el-form-item>
398
+        </el-col>
394 399
       <el-col :span="6">
395 400
         <el-form-item label="首次诊治日期 : "  >
396 401
             <el-date-picker v-model="form.first_treatment_date" type="date" disabled format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
@@ -812,6 +817,8 @@ export default {
812 817
             // this.form.record_date = patietInfo.is_infectious
813 818
             this.form.response_result = patietInfo.response_result
814 819
             this.form.remind_cycle = patietInfo.remind_cycle
820
+            this.form.user_sys_before_count = patietInfo.user_sys_before_count
821
+
815 822
             this.infections = response.data.data.infections
816 823
             this.form.formItem = this.infections
817 824
             if (this.infections != null) {

+ 11 - 1
src/xt_pages/user/components/PatientForm.vue View File

@@ -587,6 +587,14 @@
587 587
               </el-form-item>
588 588
             </el-col>
589 589
 
590
+
591
+            <el-col :span="6" :style="isEdit?'width:360px':''">
592
+                <el-form-item label="系统前透析次数 : " prop="user_sys_before_count">
593
+                  <el-input v-model="form.user_sys_before_count"></el-input>
594
+              </el-form-item>
595
+            </el-col>
596
+
597
+
590 598
             <el-col :span="6" :style="isEdit?'width:360px':''">
591 599
               <el-form-item label="首次诊治时间 : ">
592 600
                 <el-date-picker
@@ -747,6 +755,7 @@ const defaultForm = {
747 755
   dialysis_age: "",
748 756
   expense_kind: "",
749 757
   contact_name: "",
758
+  user_sys_before_count:"",
750 759
 
751 760
   formItem: [
752 761
     {
@@ -1220,7 +1229,6 @@ export default {
1220 1229
                   this.$refs[formName].resetFields();
1221 1230
                   this.$store.dispatch("SetSubscibePatients");
1222 1231
                   var sub = this.$store.getters.xt_user.subscibe;
1223
-                  console.log(sub);
1224 1232
                   if (action !== "renew") {
1225 1233
                     this.$router.back(-1);
1226 1234
                   }
@@ -1387,6 +1395,8 @@ export default {
1387 1395
             this.form.homeAddress = patietInfo.home_address;
1388 1396
             this.form.work = patietInfo.work_unit;
1389 1397
             this.form.unit_address = patietInfo.unit_address;
1398
+            this.form.user_sys_before_count = patietInfo.user_sys_before_count;
1399
+
1390 1400
 
1391 1401
             if (patietInfo.profession > 0) {
1392 1402
               this.form.profession = patietInfo.profession;

File diff suppressed because it is too large
+ 2588 - 2560
src/xt_pages/user/doctorAdvice.vue


+ 19 - 11
src/xt_pages/user/patient.vue View File

@@ -15,7 +15,7 @@
15 15
 	    <label class="title"><span class="name">日期查询</span> : </label>
16 16
        <el-date-picker size="small" v-model="listQuery.start_time"  prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd" > </el-date-picker>
17 17
        <span class="cellLine"> - </span>
18
-       <el-date-picker size="small" v-model="listQuery.end_time"  prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>       
18
+       <el-date-picker size="small" v-model="listQuery.end_time"  prefix-icon="el-icon-date" @change="changeTime" :editable="false" style="width: 196px;" type="date" placeholder="选择日期时间" align="right"   format="yyyy-MM-dd" value-format="yyyy-MM-dd"> </el-date-picker>
19 19
     </div>
20 20
     <div class="cell clearfix">
21 21
 	    <label class="title"><span class="name">排班班次</span> : </label>
@@ -95,9 +95,9 @@
95 95
         </el-table-column> -->
96 96
         <el-table-column align="center" label="全选" width="60px" type="selection" ></el-table-column>
97 97
         <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
98
-        <el-table-column  label="透析号" min-width="80" property="dialysis_no" align="center"></el-table-column>         
98
+        <el-table-column  label="透析号" min-width="80" property="dialysis_no" align="center"></el-table-column>
99 99
         <el-table-column  label="住院号" min-width="80"  property="admission_number" align="center"> </el-table-column>
100
-        <el-table-column property="name" label="姓名" min-width="80" align="center"> 
100
+        <el-table-column property="name" label="姓名" min-width="80" align="center">
101 101
           <template slot-scope="scope" >
102 102
             <router-link :to="'/patients/edit/'+scope.row.id" style="color:#409eff" >{{scope.row.name}}</router-link>
103 103
           </template>
@@ -116,7 +116,11 @@
116 116
             <span v-else>未知</span>
117 117
           </template>
118 118
         </el-table-column>
119
-        <el-table-column property="total_dialysis" label="透析次数" min-width="94" align="center"> </el-table-column>
119
+        <el-table-column property="total_dialysis" label="透析次数" min-width="94" align="center">
120
+          <template slot-scope="scope" >
121
+            <span>{{getCount(scope.row)}}</span>
122
+          </template>
123
+        </el-table-column>
120 124
         <el-table-column min-width="150" label="二维码" align="center">
121 125
           <template slot-scope="scope"  type="text">
122 126
             <a style="color:#409eff"  v-if="scope.row.binding_state==1" @click="openWechatBindDialog">已绑定</a>
@@ -129,9 +133,9 @@
129 133
         </template>
130 134
         </el-table-column>
131 135
       </el-table>
132
-      
136
+
133 137
       <!-- <pagi-nation title="分页"></pagi-nation> -->
134
-      
138
+
135 139
       <el-pagination
136 140
         @size-change="handleSizeChange"
137 141
         @current-change="handleCurrentChange"
@@ -143,7 +147,7 @@
143 147
         layout="total, sizes, prev, pager, next, jumper"
144 148
         :total="total">
145 149
       </el-pagination>
146
-      
150
+
147 151
 
148 152
       <el-dialog
149 153
       title="微信绑定"
@@ -157,8 +161,8 @@
157 161
       </span>
158 162
     </el-dialog>
159 163
 
160
-    </div> 
161
-    
164
+    </div>
165
+
162 166
 </template>
163 167
 
164 168
 
@@ -282,6 +286,10 @@ export default {
282 286
     this.reimbursement_ways = this.$store.getters.reimbursement_ways;
283 287
   },
284 288
   methods: {
289
+    getCount(row){
290
+      console.log(row)
291
+      return row.total_dialysis + row.user_sys_before_count
292
+    },
285 293
     openWechatBindDialog(){
286 294
       this.bindWechatDialog = true;
287 295
     },
@@ -320,7 +328,7 @@ export default {
320 328
       this.sourceID = sourceID;
321 329
       this.lapsetoType = lapseto;
322 330
       this.listQuery.source = sourceID;
323
-      this.listQuery.lapseto = lapseto; 
331
+      this.listQuery.lapseto = lapseto;
324 332
       this.getList();
325 333
     },
326 334
     changeTime(){
@@ -345,7 +353,7 @@ export default {
345 353
         }
346 354
       });
347 355
     },
348
-    
356
+
349 357
   //  components:{
350 358
   //    pagiNation
351 359
   //  }

+ 7 - 1
src/xt_pages/user/patients.vue View File

@@ -265,11 +265,13 @@
265 265
           </template>
266 266
         </el-table-column>
267 267
         <el-table-column
268
-          property="total_dialysis"
269 268
           label="透析次数"
270 269
           min-width="94"
271 270
           align="center"
272 271
         >
272
+          <template slot-scope="scope" >
273
+            <span>{{getCount(scope.row)}}</span>
274
+          </template>
273 275
         </el-table-column>
274 276
         <!-- <el-table-column min-width="150" label="二维码" align="center">
275 277
         <template slot-scope="scope"  type="text">
@@ -574,6 +576,10 @@ export default {
574 576
   },
575 577
 
576 578
   methods: {
579
+    getCount(row){
580
+      console.log(row)
581
+      return row.total_dialysis + row.user_sys_before_count
582
+    },
577 583
     EditLapseto() {
578 584
       if (this.lapsetoForm.lapseto_time == "") {
579 585
         this.$message.error("请选择时间");

+ 304 - 227
src/xt_pages/workforce/components/tableWeeks.vue View File

@@ -38,7 +38,7 @@
38 38
     >
39 39
       <el-table-column label="姓名" min-width="100" align="center">
40 40
         <template slot-scope="scope">
41
-          {{ scope.row.patient}}
41
+          {{ scope.row.patient }}
42 42
         </template>
43 43
       </el-table-column>
44 44
       <el-table-column label="分区" min-width="70" align="center">
@@ -58,7 +58,11 @@
58 58
       </el-table-column>
59 59
       <el-table-column label="透析模式" min-width="100" align="center">
60 60
         <template slot-scope="scope">
61
-          {{scope.row.mode_id && modeOptions[scope.row.mode_id] ? modeOptions[scope.row.mode_id].name:'' }}
61
+          {{
62
+            scope.row.mode_id && modeOptions[scope.row.mode_id]
63
+              ? modeOptions[scope.row.mode_id].name
64
+              : ""
65
+          }}
62 66
         </template>
63 67
       </el-table-column>
64 68
       <el-table-column label="透析器" min-width="100" align="center">
@@ -68,26 +72,72 @@
68 72
       </el-table-column>
69 73
       <el-table-column label="抗凝剂" min-width="100" align="center">
70 74
         <template slot-scope="scope">
71
-          {{
72
-            scope.row.prescription.anticoagulant
73
-              ? anticoagulants_confit[scope.row.prescription.anticoagulant].name
74
-              : ""
75
-          }}
75
+          <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
76
+          <span v-if="scope.row.prescription.anticoagulant === 2"
77
+            >普通肝素</span
78
+          >
79
+          <span v-if="scope.row.prescription.anticoagulant === 3"
80
+            >低分子肝素</span
81
+          >
82
+          <span v-if="scope.row.prescription.anticoagulant === 4"
83
+            >阿加曲班</span
84
+          >
85
+          <span v-if="scope.row.prescription.anticoagulant === 5"
86
+            >枸橼酸钠</span
87
+          >
88
+          <span v-if="scope.row.prescription.anticoagulant === 6"
89
+            >低分子肝素钙</span
90
+          >
91
+          <span v-if="scope.row.prescription.anticoagulant === 7"
92
+            >低分子肝素钠</span
93
+          >
76 94
         </template>
77 95
       </el-table-column>
78 96
       <el-table-column label="总量" min-width="100" align="center">
79 97
         <template slot-scope="scope">
80
-          <span v-if="scope.row.prescription.anticoagulant == 1">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'mg':''}}</span>
81
-          <span v-if="scope.row.prescription.anticoagulant == 2">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'iu':''}}</span>
82
-          <span v-if="scope.row.prescription.anticoagulant == 3">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'iu':''}}</span>
83
-          <span v-if="scope.row.prescription.anticoagulant == 4">{{scope.row.prescription.anticoagulant_zongliang?scope.row.prescription.anticoagulant_zongliang+'mg':''}}</span>
84
-
98
+          <span v-if="scope.row.prescription.anticoagulant == 1">{{
99
+            scope.row.prescription.anticoagulant_zongliang
100
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
101
+              : ""
102
+          }}</span>
103
+          <span v-if="scope.row.prescription.anticoagulant == 2">{{
104
+            scope.row.prescription.anticoagulant_zongliang
105
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
106
+              : ""
107
+          }}</span>
108
+          <span v-if="scope.row.prescription.anticoagulant == 3">{{
109
+            scope.row.prescription.anticoagulant_zongliang
110
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
111
+              : ""
112
+          }}</span>
113
+          <span v-if="scope.row.prescription.anticoagulant == 4">{{
114
+            scope.row.prescription.anticoagulant_zongliang
115
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
116
+              : ""
117
+          }}</span>
118
+          <span v-if="scope.row.prescription.anticoagulant == 5">{{
119
+            scope.row.prescription.anticoagulant_zongliang
120
+              ? scope.row.prescription.anticoagulant_zongliang + "mg"
121
+              : ""
122
+          }}</span>
123
+          <span v-if="scope.row.prescription.anticoagulant == 6">{{
124
+            scope.row.prescription.anticoagulant_zongliang
125
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
126
+              : ""
127
+          }}</span>
128
+          <span v-if="scope.row.prescription.anticoagulant == 7">{{
129
+            scope.row.prescription.anticoagulant_zongliang
130
+              ? scope.row.prescription.anticoagulant_zongliang + "iu"
131
+              : ""
132
+          }}</span>
85 133
         </template>
86 134
       </el-table-column>
87 135
 
88 136
       <el-table-column label="长期医嘱" min-width="440" align="center">
89 137
         <template slot-scope="scope">
90
-           <span style="white-space: pre">{{getAdvice(scope.row.doctor_advice)}}</span>
138
+          <span style="white-space: pre">{{
139
+            getAdvice(scope.row.doctor_advice)
140
+          }}</span>
91 141
         </template>
92 142
       </el-table-column>
93 143
     </el-table>
@@ -95,241 +145,268 @@
95 145
 </template>
96 146
 
97 147
 <script>
98
-  import { getSchedules, getScheduleWeekDay } from '@/api/schedule'
99
-  import WeekItem from './WeekItem'
148
+import { getSchedules, getScheduleWeekDay } from "@/api/schedule";
149
+import WeekItem from "./WeekItem";
100 150
 
101
-  export default {
102
-    name: 'tableWeeks',
103
-    props: {
104
-      weekTime: {
105
-        type: String,
106
-        default: 'thisWeek'
107
-      }
108
-    },
151
+export default {
152
+  name: "tableWeeks",
153
+  props: {
154
+    weekTime: {
155
+      type: String,
156
+      default: "thisWeek"
157
+    }
158
+  },
109 159
 
110
-    data() {
111
-      return {
112
-        weekArr: [
113
-          { id: 1, name: '周一' },
114
-          { id: 2, name: '周二' },
115
-          { id: 3, name: '周三' },
116
-          { id: 4, name: '周四' },
117
-          { id: 5, name: '周五' },
118
-          { id: 6, name: '周六' },
119
-          { id: 7, name: '周日' }
120
-        ],
121
-        anticoagulants_confit: null,
160
+  data() {
161
+    return {
162
+      weekArr: [
163
+        { id: 1, name: "周一" },
164
+        { id: 2, name: "周二" },
165
+        { id: 3, name: "周三" },
166
+        { id: 4, name: "周四" },
167
+        { id: 5, name: "周五" },
168
+        { id: 6, name: "周六" },
169
+        { id: 7, name: "周日" }
170
+      ],
171
+      anticoagulants_confit: null,
122 172
 
123
-        week_type: '1',
124
-        weekTitle: ['', '', '', '', '', '', ''],
125
-        weekData: {
126
-          Monday: [],
127
-          Tuesday: [],
128
-          Wednesday: [],
129
-          Thursday: [],
130
-          Friday: [],
131
-          Saturday: [],
132
-          Sunday: []
133
-        },
134
-        scheduleData: [],
135
-        modeOptions: null
173
+      week_type: "1",
174
+      weekTitle: ["", "", "", "", "", "", ""],
175
+      weekData: {
176
+        Monday: [],
177
+        Tuesday: [],
178
+        Wednesday: [],
179
+        Thursday: [],
180
+        Friday: [],
181
+        Saturday: [],
182
+        Sunday: []
183
+      },
184
+      scheduleData: [],
185
+      modeOptions: null
186
+    };
187
+  },
188
+  watch: {
189
+    weekTime: function() {
190
+      var theType = this.weekType(this.weekTime);
191
+      this.getSchedules(theType);
192
+    }
193
+  },
194
+
195
+  methods: {
196
+    printAction() {
197
+      this.$router.push({
198
+        path: "/schedule/remind/print?week_type=" + this.week_type
199
+      });
200
+    },
201
+    getScheduleWeekDay(weekType) {
202
+      getScheduleWeekDay(weekType).then(response => {
203
+        this.scheduleData = [];
204
+        if (response.data.state == 1) {
205
+          this.scheduleData = response.data.data.schdules;
206
+          //console.log("排班-----", this.scheduleData);
207
+        } else {
208
+          this.$message.error("网络错误");
209
+          return false;
210
+        }
211
+      });
212
+    },
213
+
214
+    // getSchedules(weekType) {
215
+    //   getSchedules(weekType).then(response => {
216
+    //     this.scheduleData = []
217
+    //     if (response.data.state == 1) {
218
+    //       this.weekTitle = response.data.data.weekTitle
219
+    //       var theSchedules = response.data.data.schdules
220
+    //       var that = this
221
+    //       theSchedules.forEach(function(schedule) {
222
+    //         schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
223
+    //         var weekPath = that.weekPath(schedule.schedule_week)
224
+    //         if (weekPath.length > 0) {
225
+    //           that.weekData[weekPath].push(schedule)
226
+    //         }
227
+    //       })
228
+    //       var rowNum = 0
229
+    //       console.log(that.weekData)
230
+    //       for (var index in that.weekData) {
231
+    //         var thisLen = that.weekData[index].length
232
+    //         rowNum = rowNum >= thisLen ? rowNum : thisLen
233
+    //       }
234
+    //       console.log(rowNum)
235
+    //       for (let index = 0; index < rowNum; index++) {
236
+    //         var dataItem = {}
237
+    //         for (var weekIndex in that.weekData) {
238
+    //           var weekItem = that.weekData[weekIndex].shift()
239
+    //           console.log('weekItem', weekItem)
240
+    //           if (typeof (weekItem) != 'undefined') {
241
+    //             dataItem[weekIndex] = weekItem
242
+    //           }
243
+    //         }
244
+    //         that.scheduleData.push(dataItem)
245
+    //       }
246
+    //
247
+    //       console.log(that.scheduleData)
248
+    //
249
+    //     } else {
250
+    //       this.$message.error('网络错误')
251
+    //       return false
252
+    //     }
253
+    //   })
254
+    // },
255
+    weekType(weekTime) {
256
+      var theType = 2;
257
+      switch (weekTime) {
258
+        case "lastWeek":
259
+          theType = 1;
260
+          break;
261
+        case "thisWeek":
262
+          theType = 2;
263
+          break;
264
+        case "nextWeek":
265
+          theType = 3;
266
+          break;
267
+        case "nextTwoWeek":
268
+          theType = 4;
269
+          break;
270
+        default:
271
+          theType = 2;
272
+          break;
136 273
       }
274
+      return theType;
137 275
     },
138
-    watch: {
139
-      weekTime: function() {
140
-        var theType = this.weekType(this.weekTime)
141
-        this.getSchedules(theType)
276
+    weekPath(week) {
277
+      var weekArr = {
278
+        1: "Monday",
279
+        2: "Tuesday",
280
+        3: "Wednesday",
281
+        4: "Thursday",
282
+        5: "Friday",
283
+        6: "Saturday",
284
+        7: "Sunday"
285
+      };
286
+      if (typeof weekArr[week] == "undefined") {
287
+        return "";
142 288
       }
289
+      return weekArr[week];
143 290
     },
291
+    selectWeekType(type) {
292
+      this.week_type = type;
293
+      let params = {
294
+        week_type: this.week_type
295
+      };
296
+      this.getScheduleWeekDay(params);
297
+    },
298
+    getSchedulesType: function(type) {
299
+      let type_name = "";
300
+      switch (type) {
301
+        case 1:
302
+          type_name = "上午";
303
+          break;
304
+        case 2:
305
+          type_name = "下午";
306
+          break;
307
+        case 3:
308
+          type_name = "晚上";
309
+          break;
310
+      }
311
+      return type_name;
312
+    },
313
+    getAdvice: function(doctor_advice) {
314
+      if (doctor_advice != null) {
315
+        let name = "";
316
+        for (let i = 0; i < doctor_advice.length; i++) {
317
+          let prescribing_number = "";
318
+          let single_dose = "";
319
+          let drug_spec = "";
144 320
 
145
-    methods: {
146
-      printAction(){
147
-        console.log("111111",this.week_type)
148
-        this.$router.push({ path: '/schedule/remind/print?week_type=' + this.week_type })
149
-
150
-      },
151
-      getScheduleWeekDay(weekType) {
152
-        getScheduleWeekDay(weekType).then(response => {
153
-          this.scheduleData = []
154
-          if (response.data.state == 1) {
155
-            this.scheduleData = response.data.data.schdules
156
-            console.log(this.scheduleData)
157
-          } else {
158
-            this.$message.error('网络错误')
159
-            return false
321
+          if (doctor_advice[i].prescribing_number > 0) {
322
+            prescribing_number =
323
+              doctor_advice[i].prescribing_number +
324
+              doctor_advice[i].prescribing_number_unit;
325
+          }
326
+          if (doctor_advice[i].single_dose > 0) {
327
+            single_dose =
328
+              " 单次用量 " +
329
+              doctor_advice[i].single_dose +
330
+              doctor_advice[i].single_dose_unit;
160 331
           }
161
-        })
162
-      },
163
-
164
-      // getSchedules(weekType) {
165
-      //   getSchedules(weekType).then(response => {
166
-      //     this.scheduleData = []
167
-      //     if (response.data.state == 1) {
168
-      //       this.weekTitle = response.data.data.weekTitle
169
-      //       var theSchedules = response.data.data.schdules
170
-      //       var that = this
171
-      //       theSchedules.forEach(function(schedule) {
172
-      //         schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
173
-      //         var weekPath = that.weekPath(schedule.schedule_week)
174
-      //         if (weekPath.length > 0) {
175
-      //           that.weekData[weekPath].push(schedule)
176
-      //         }
177
-      //       })
178
-      //       var rowNum = 0
179
-      //       console.log(that.weekData)
180
-      //       for (var index in that.weekData) {
181
-      //         var thisLen = that.weekData[index].length
182
-      //         rowNum = rowNum >= thisLen ? rowNum : thisLen
183
-      //       }
184
-      //       console.log(rowNum)
185
-      //       for (let index = 0; index < rowNum; index++) {
186
-      //         var dataItem = {}
187
-      //         for (var weekIndex in that.weekData) {
188
-      //           var weekItem = that.weekData[weekIndex].shift()
189
-      //           console.log('weekItem', weekItem)
190
-      //           if (typeof (weekItem) != 'undefined') {
191
-      //             dataItem[weekIndex] = weekItem
192
-      //           }
193
-      //         }
194
-      //         that.scheduleData.push(dataItem)
195
-      //       }
196
-      //
197
-      //       console.log(that.scheduleData)
198
-      //
199
-      //     } else {
200
-      //       this.$message.error('网络错误')
201
-      //       return false
202
-      //     }
203
-      //   })
204
-      // },
205
-      weekType(weekTime) {
206
-        var theType = 2
207
-        switch (weekTime) {
208
-          case 'lastWeek':
209
-            theType = 1
210
-            break
211
-          case 'thisWeek':
212
-            theType = 2
213
-            break
214
-          case 'nextWeek':
215
-            theType = 3
216
-            break
217
-          case 'nextTwoWeek':
218
-            theType = 4
219
-            break
220
-          default:
221
-            theType = 2
222
-            break
223
-        }
224
-        return theType
225
-      },
226
-      weekPath(week) {
227
-        var weekArr = {
228
-          1: 'Monday',
229
-          2: 'Tuesday',
230
-          3: 'Wednesday',
231
-          4: 'Thursday',
232
-          5: 'Friday',
233
-          6: 'Saturday',
234
-          7: 'Sunday'
235
-        }
236
-        if (typeof (weekArr[week]) == 'undefined') {
237
-          return ''
238
-        }
239
-        return weekArr[week]
240
-      }, selectWeekType(type) {
241
-        this.week_type = type
242
-        let params = {
243
-          week_type: this.week_type
244
-        }
245
-        this.getScheduleWeekDay(params)
246
-      }, getSchedulesType: function(type) {
247
-        let type_name = ''
248
-        switch (type) {
249
-          case 1:
250
-            type_name = '上午'
251
-            break
252
-          case 2:
253
-            type_name = '下午'
254
-            break
255
-          case 3:
256
-            type_name = '晚上'
257
-            break
258
-        }
259
-        return type_name
260
-      },
261
-      getAdvice:function(doctor_advice) {
262
-        if (doctor_advice != null) {
263
-          let name = ""
264
-          for (let i = 0; i < doctor_advice.length; i++) {
265
-
266
-            let prescribing_number = ''
267
-            let single_dose = ''
268
-            let drug_spec = ''
269
-
270
-            if (doctor_advice[i].prescribing_number > 0) {
271
-              prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
272
-            }
273
-            if (doctor_advice[i].single_dose > 0) {
274
-              single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
275
-            }
276
-
277
-            if (doctor_advice[i].drug_spec > 0) {
278
-              drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
279
-            }
280
-
281
-            name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
282
-
283
-            if (doctor_advice[i].child.length > 0) {
284 332
 
285
-              for (let a = 0; a < doctor_advice[i].child.length; a++) {
333
+          if (doctor_advice[i].drug_spec > 0) {
334
+            drug_spec =
335
+              doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
336
+          }
286 337
 
287
-                if (doctor_advice[i].child[a].prescribing_number > 0) {
288
-                  doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
289
-                } else {
290
-                  doctor_advice[i].child[a]['presc'] = ''
291
-                }
338
+          name =
339
+            name +
340
+            doctor_advice[i].advice_name +
341
+            " " +
342
+            drug_spec +
343
+            " " +
344
+            prescribing_number +
345
+            " " +
346
+            single_dose +
347
+            " " +
348
+            doctor_advice[i].delivery_way +
349
+            " " +
350
+            doctor_advice[i].execution_frequency +
351
+            " " +
352
+            doctor_advice[i].remark +
353
+            "\n";
292 354
 
293
-                if (doctor_advice[i].child[a].single_dose > 0) {
294
-                  doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
295
-                } else {
296
-                  doctor_advice[i].child[a]['single'] = ''
297
-                }
355
+          if (doctor_advice[i].child.length > 0) {
356
+            for (let a = 0; a < doctor_advice[i].child.length; a++) {
357
+              if (doctor_advice[i].child[a].prescribing_number > 0) {
358
+                doctor_advice[i].child[a]["presc"] =
359
+                  doctor_advice[i].child[a].prescribing_number +
360
+                  doctor_advice[i].child[a].prescribing_number_unit;
361
+              } else {
362
+                doctor_advice[i].child[a]["presc"] = "";
363
+              }
298 364
 
299
-                name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
300
-                  + doctor_advice[i].child[a].advice_desc
301
-                  + doctor_advice[i].child[a].drug_spec_unit
302
-                  + doctor_advice[i].child[a].presc
303
-                  + doctor_advice[i].child[a].single + "\n"
365
+              if (doctor_advice[i].child[a].single_dose > 0) {
366
+                doctor_advice[i].child[a]["single"] =
367
+                  " " +
368
+                  " 单次用量 " +
369
+                  " " +
370
+                  doctor_advice[i].child[a].single_dose +
371
+                  doctor_advice[i].child[a].single_dose_unit;
372
+              } else {
373
+                doctor_advice[i].child[a]["single"] = "";
304 374
               }
305 375
 
376
+              name =
377
+                name +
378
+                "▲" +
379
+                doctor_advice[i].child[a].advice_name +
380
+                "" +
381
+                doctor_advice[i].child[a].advice_desc +
382
+                doctor_advice[i].child[a].drug_spec_unit +
383
+                doctor_advice[i].child[a].presc +
384
+                doctor_advice[i].child[a].single +
385
+                "\n";
306 386
             }
307
-
308 387
           }
309
-          return name
310
-
311 388
         }
389
+        return name;
312 390
       }
313
-    },
314
-    components: {
315
-      WeekItem
316
-    },
317
-    created() {
318
-      this.modeOptions = this.$store.getters.treatment_mode
319
-      this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
320
-
321
-
322
-      this.week_type = new Date().getDay()
323
-      if(this.week_type == 0){
324
-        this.week_type = 7
325
-
326
-      }
327
-      let params = {
328
-        week_type: this.week_type
329
-      }
330
-      this.getScheduleWeekDay(params)
331 391
     }
392
+  },
393
+  components: {
394
+    WeekItem
395
+  },
396
+  created() {
397
+    this.modeOptions = this.$store.getters.treatment_mode;
398
+    this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
399
+    console.log("抗凝机", this.anticoagulants_confit);
400
+    this.week_type = new Date().getDay();
401
+    if (this.week_type == 0) {
402
+      this.week_type = 7;
403
+    }
404
+    let params = {
405
+      week_type: this.week_type
406
+    };
407
+    this.getScheduleWeekDay(params);
332 408
   }
409
+};
333 410
 </script>
334 411
 
335 412
 <style rel="stylesheet/css" lang="scss">