Browse Source

医嘱需求

XMLWAN 5 years ago
parent
commit
e5169db953

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

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

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

14
   })
14
   })
15
 }
15
 }
16
 
16
 
17
-export function CreateDoctorAdvice(id, advice,mode) {
17
+export function CreateDoctorAdvice(id, advice, mode) {
18
   return request({
18
   return request({
19
-    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
19
+    url: '/api/patients/advice/create?id=' + id + '&mode=' + mode,
20
     method: 'post',
20
     method: 'post',
21
     data: advice,
21
     data: advice,
22
-    headers:{"Permission":3},
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
   return request({
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
     method: 'Put',
32
     method: 'Put',
31
     data: advice,
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
   var params = {
42
   var params = {
39
     id: id,
43
     id: id,
40
     patient: patient,
44
     patient: patient,
41
     execution_time: time,
45
     execution_time: time,
42
-    mode:mode
46
+    mode: mode
43
   }
47
   }
44
   return request({
48
   return request({
45
     url: '/api/patients/advice/exec',
49
     url: '/api/patients/advice/exec',
46
     method: 'Post',
50
     method: 'Post',
47
     params: params,
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
   var params = {
59
   var params = {
54
     id: id,
60
     id: id,
55
     patient: patient,
61
     patient: patient,
56
-    mode:mode
62
+    mode: mode
57
     // execution_time: time,
63
     // execution_time: time,
58
   }
64
   }
59
   return request({
65
   return request({
60
     url: '/api/patients/advice/check',
66
     url: '/api/patients/advice/check',
61
     method: 'Post',
67
     method: 'Post',
62
     params: params,
68
     params: params,
63
-    headers:{"Permission":2},
69
+    headers: {
70
+      'Permission': 2
71
+    }
64
 
72
 
65
   })
73
   })
66
 }
74
 }
67
 
75
 
68
-
69
 export function getDoctorAdviceList(params) {
76
 export function getDoctorAdviceList(params) {
70
   return request({
77
   return request({
71
     url: '/api/patients/advices',
78
     url: '/api/patients/advices',
84
 //   })
91
 //   })
85
 // }
92
 // }
86
 
93
 
87
-export function StopGroupAdvice(groupno, reason,mode) {
94
+export function StopGroupAdvice(groupno, reason, mode) {
88
   return request({
95
   return request({
89
-    url: '/api/patients/advice/stopgroup?groupno=' + groupno+"&mode="+mode,
96
+    url: '/api/patients/advice/stopgroup?groupno=' + groupno + '&mode=' + mode,
90
     method: 'Post',
97
     method: 'Post',
91
     data: reason,
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
   return request({
107
   return request({
101
-    url: '/api/patients/advice/delete?id=' + id+"&mode="+mode,
108
+    url: '/api/patients/advice/delete?id=' + id + '&mode=' + mode,
102
     method: 'Delete',
109
     method: 'Delete',
103
-    headers:{"Permission":2},
110
+    headers: {
111
+      'Permission': 2
112
+    }
104
 
113
 
105
   })
114
   })
106
 }
115
 }
199
   })
208
   })
200
 }
209
 }
201
 
210
 
202
-export function CreateGroupAdvice(id, groupno, advices,mode) {
211
+export function CreateGroupAdvice(id, groupno, advices, mode) {
203
   if (advices.remind > 0) {
212
   if (advices.remind > 0) {
204
     return request({
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
       method: 'post',
215
       method: 'post',
207
       data: advices,
216
       data: advices,
208
-      headers:{"Permission":2},
217
+      headers: {
218
+        'Permission': 2
219
+      }
209
 
220
 
210
     })
221
     })
211
   } else {
222
   } else {
212
     return request({
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
       method: 'post',
225
       method: 'post',
215
       data: advices,
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
   return request({
235
   return request({
223
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno+"&mode="+mode,
236
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
224
     method: 'delete',
237
     method: 'delete',
225
-    headers:{"Permission":3},
238
+    headers: {
239
+      'Permission': 3
240
+    }
226
 
241
 
227
   })
242
   })
228
 }
243
 }
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
   return request({
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
     method: 'Put',
326
     method: 'Put',
316
     data: advice,
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
   return request({
336
   return request({
328
-    url: '/api/patients/advice/create?id=' + id+"&mode="+mode,
337
+    url: '/api/patients/advice/create?id=' + id + '&mode=' + mode,
329
     method: 'post',
338
     method: 'post',
330
     data: advice,
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
   if (advices.remind > 0) {
348
   if (advices.remind > 0) {
340
     return request({
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
       method: 'post',
351
       method: 'post',
343
       data: advices,
352
       data: advices,
344
-      headers:{"Permission":3},
353
+      headers: {
354
+        'Permission': 3
355
+      }
345
 
356
 
346
     })
357
     })
347
   } else {
358
   } else {
348
     return request({
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
       method: 'post',
361
       method: 'post',
351
       data: advices,
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
   return request({
372
   return request({
362
-    url: '/api/patients/advice/delete?id=' + id+"&mode="+mode,
373
+    url: '/api/patients/advice/delete?id=' + id + '&mode=' + mode,
363
     method: 'Delete',
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
   return request({
383
   return request({
373
-    url: '/api/patients/advice/deletegroup?groupno=' + groupno+"&mode="+mode,
384
+    url: '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
374
     method: 'delete',
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
   return request({
394
   return request({
384
-    url: '/api/patients/advice/stop?id=' + id+"&mode="+mode,
395
+    url: '/api/patients/advice/stop?id=' + id + '&mode=' + mode,
385
     method: 'Post',
396
     method: 'Post',
386
     data: reason,
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
   return request({
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
     method: 'Post',
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
   var params = {
417
   var params = {
407
     groupno: groupno,
418
     groupno: groupno,
408
-    mode: mode,
419
+    mode: mode
409
   }
420
   }
410
   return request({
421
   return request({
411
     url: '/api/patients/advice/checkgroup',
422
     url: '/api/patients/advice/checkgroup',
412
     method: 'Post',
423
     method: 'Post',
413
     params: params,
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
+}

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

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

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

674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
674
             adviceNames.unshift(this.groupForm.adviceNames[index]);
675
           }
675
           }
676
           submitForm.adviceNames = adviceNames;
676
           submitForm.adviceNames = adviceNames;
677
-          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
     },

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