See999 4 years ago
parent
commit
dd8352b85b
65 changed files with 15224 additions and 5643 deletions
  1. 55 12
      src/api/common/common.js
  2. 69 0
      src/api/common/statistics.js
  3. 3 13
      src/api/patient.js
  4. 0 5
      src/api/signandweigh.js
  5. 1 1
      src/router/index_路由未分离前.js
  6. 103 91
      src/router/modules/dialysis.js
  7. 139 129
      src/router/modules/qcd.js
  8. 19 3
      src/store/modules/globalConfig.js
  9. 1497 0
      src/xt_pages/dialysis/batch_print/batch_print_order_fifteen.vue
  10. 12 0
      src/xt_pages/dialysis/bloodPresssWatch.vue
  11. 1 1
      src/xt_pages/dialysis/details/acceptsAssessment.vue
  12. 3 0
      src/xt_pages/dialysis/details/assessmentAfter.vue
  13. 1913 1913
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  14. 41 1
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  15. 1579 0
      src/xt_pages/dialysis/template/DialysisPrintOrderEighteen.vue
  16. 1279 1256
      src/xt_pages/dialysis/template/DialysisPrintOrderFifteen.vue
  17. 2227 0
      src/xt_pages/dialysis/template/DialysisPrintOrderSeventeen.vue
  18. 1811 0
      src/xt_pages/dialysis/template/DialysisPrintOrderSixteen.vue
  19. 109 126
      src/xt_pages/qcd/basicInformationAnalysis.vue
  20. 1 1
      src/xt_pages/qcd/checkStatistical.vue
  21. 1 1
      src/xt_pages/qcd/components/LineChart.vue
  22. 1 1
      src/xt_pages/qcd/dialysisTotal.vue
  23. 3 4
      src/xt_pages/qcd/indicatorControlAnalysis/analysis.vue
  24. 1 1
      src/xt_pages/qcd/indicatorControlAnalysis/analysisDetails.vue
  25. 60 15
      src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue
  26. 255 175
      src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue
  27. 1 1
      src/xt_pages/qcd/indicatorControlAnalysis/components/NewNav.vue
  28. 446 255
      src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue
  29. 561 268
      src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue
  30. 29 21
      src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue
  31. 599 0
      src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue
  32. 130 79
      src/xt_pages/qcd/indicatorControlAnalysis/process.vue
  33. 55 15
      src/xt_pages/qcd/indicatorControlAnalysis/weight.vue
  34. 278 198
      src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue
  35. 47 77
      src/xt_pages/qcd/officesControlAnalysis/project.vue
  36. 231 106
      src/xt_pages/qcd/officesControlAnalysis/time.vue
  37. 1 1
      src/xt_pages/qcd/outcomeIndicators/control.vue
  38. 1 1
      src/xt_pages/qcd/patientAnalysis/bloodPressure.vue
  39. 1 1
      src/xt_pages/qcd/patientAnalysis/complication.vue
  40. 1 1
      src/xt_pages/qcd/patientAnalysis/dialysisAge.vue
  41. 1 1
      src/xt_pages/qcd/patientAnalysis/infectiousDiseases.vue
  42. 1 1
      src/xt_pages/qcd/patientAnalysis/lapseto.vue
  43. 1 1
      src/xt_pages/qcd/patientAnalysis/person/bloodPressure.vue
  44. 1 1
      src/xt_pages/qcd/patientAnalysis/person/lapseto.vue
  45. 1 1
      src/xt_pages/qcd/patientAnalysis/person/oralMedicine.vue
  46. 1 1
      src/xt_pages/qcd/patientAnalysis/person/weight.vue
  47. 1 1
      src/xt_pages/qcd/patientAnalysis/weight.vue
  48. 252 78
      src/xt_pages/qcd/patientComplianceDetails.vue
  49. 405 111
      src/xt_pages/qcd/patientControlAnalysis.vue
  50. 1 1
      src/xt_pages/qcd/processIndicators.vue
  51. 52 22
      src/xt_pages/qcd/statisticalConfiguration.vue
  52. 1 1
      src/xt_pages/qcd/treatmentControlAnalysis.vue
  53. 1 4
      src/xt_pages/qcd/treatmentControlAnalysis/check.vue
  54. 76 37
      src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue
  55. 74 27
      src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue
  56. 66 38
      src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue
  57. 44 89
      src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue
  58. 1 4
      src/xt_pages/qcd/treatmentControlAnalysis/time.vue
  59. 236 147
      src/xt_pages/qcd/workAnalysis/doctor.vue
  60. 372 236
      src/xt_pages/qcd/workAnalysis/nurse.vue
  61. 4 17
      src/xt_pages/sign/index.vue
  62. 1 1
      src/xt_pages/statistics/index.vue
  63. 5 1
      src/xt_pages/user/components/PatientForm.vue
  64. 32 19
      src/xt_pages/user/patients.vue
  65. 30 30
      src/xt_permission.js

+ 55 - 12
src/api/common/common.js View File

149
     startime: startime,
149
     startime: startime,
150
     endtime: endtime
150
     endtime: endtime
151
   }
151
   }
152
+
152
   return request({
153
   return request({
153
     url: '/com/api/gettotallapsecount',
154
     url: '/com/api/gettotallapsecount',
154
     method: 'get',
155
     method: 'get',
257
   })
258
   })
258
 }
259
 }
259
 
260
 
260
-export function getPrescriptionByName(keyword, startime, endtime, limit, page) {
261
+export function getPrescriptionByName(patientid, startime, endtime, limit, page) {
261
   const params = {
262
   const params = {
262
-    keyword: keyword,
263
+    patientid: patientid,
263
     startime: startime,
264
     startime: startime,
264
     endtime: endtime,
265
     endtime: endtime,
265
     limit: limit,
266
     limit: limit,
266
     page: page
267
     page: page
267
   }
268
   }
269
+  console.log('params', params)
268
   return request({
270
   return request({
269
     url: '/com/api/getprescriptionbyname',
271
     url: '/com/api/getprescriptionbyname',
270
     method: 'Get',
272
     method: 'Get',
298
     startime: startime,
300
     startime: startime,
299
     endtime: endtime
301
     endtime: endtime
300
   }
302
   }
301
-  console.log('startime', params)
302
   return request({
303
   return request({
303
     url: '/com/api/getinspectionDetailById',
304
     url: '/com/api/getinspectionDetailById',
304
     method: 'get',
305
     method: 'get',
306
   })
307
   })
307
 }
308
 }
308
 
309
 
309
-export function getSearchPatientInfo(keyword, startime, endtime) {
310
+export function getSearchPatientInfo(patientid, startime, endtime) {
310
   const params = {
311
   const params = {
311
-    keyword: keyword,
312
+    patientid: patientid,
312
     startime: startime,
313
     startime: startime,
313
     endtime: endtime
314
     endtime: endtime
314
   }
315
   }
376
   })
377
   })
377
 }
378
 }
378
 
379
 
379
-export function getFirstQuarter(lapseto, startime, endtime) {
380
-  const params = {
381
-    lapseto: lapseto,
382
-    startime: startime,
383
-    endtime: endtime
384
-  }
380
+export function getFirstQuarter(params) {
385
   console.log('params', params)
381
   console.log('params', params)
386
   return request({
382
   return request({
387
     url: '/com/api/getfirstquarter',
383
     url: '/com/api/getfirstquarter',
391
 }
387
 }
392
 
388
 
393
 export function getProjectList(params) {
389
 export function getProjectList(params) {
394
-  console.log('params', params)
395
   return request({
390
   return request({
396
     url: '/com/api/getprojectlist',
391
     url: '/com/api/getprojectlist',
397
     method: 'get',
392
     method: 'get',
423
   })
418
   })
424
 }
419
 }
425
 
420
 
421
+export function getCartogramlist(lapsetor, startime, endtime, limit, page) {
422
+  const params = {
423
+    lapsetor: lapsetor,
424
+    startime: startime,
425
+    endtime: endtime,
426
+    limit: limit,
427
+    page: page
428
+  }
429
+
430
+  return request({
431
+    url: '/com/api/getcartogramlist',
432
+    method: 'Get',
433
+    params: params
434
+  })
435
+}
436
+
437
+export function getPatientContorlAnalysis(params) {
438
+  return request({
439
+    url: '/com/api/getpatientcontor',
440
+    method: 'get',
441
+    params: params
442
+  })
443
+}
444
+
445
+export function GetQualityControl(params) {
446
+  console.log('params', params)
447
+  return request({
448
+    url: '/com/api/getqualitycontrol',
449
+    method: 'Get',
450
+    params: params
451
+  })
452
+}
453
+
454
+export function getTreatlist(params) {
455
+  return request({
456
+    url: '/com/api/gettreatlist',
457
+    method: 'get',
458
+    params: params
459
+  })
460
+}
461
+
462
+export function getPatientComplianceDetail(params) {
463
+  return request({
464
+    url: '/com/api/getpatientcompliancedetal',
465
+    method: 'Get',
466
+    params: params
467
+  })
468
+}

+ 69 - 0
src/api/common/statistics.js View File

153
 
153
 
154
 
154
 
155
 
155
 
156
+export function GetInspectionIndexInit() {
157
+  return request({
158
+    url: '/api/inspectionindex/init',
159
+    method: 'get',
160
+  })
161
+}
162
+
163
+
164
+export function GetRangeValue(params) {
165
+  return request({
166
+    url: '/api/rangevalue/get',
167
+    method: 'get',
168
+    params:params,
169
+
170
+  })
171
+}
172
+
173
+
174
+
175
+export function GetInspectionIndexChart(params) {
176
+  return request({
177
+    url: '/api/inspectionindex/chart',
178
+    method: 'get',
179
+    params:params,
180
+
181
+  })
182
+}
183
+
184
+export function GetInspectionIndexTable(params) {
185
+  return request({
186
+    url: '/api/inspectionindex/table',
187
+    method: 'get',
188
+    params:params,
189
+
190
+  })
191
+}
192
+
193
+export function GetPatientInspectionIndexChart(params) {
194
+  return request({
195
+    url: '/api/patientinspectionindex/chart',
196
+    method: 'get',
197
+    params:params,
198
+
199
+  })
200
+}
201
+
202
+export function GetPatientInspectionIndexBarChart(params) {
203
+  return request({
204
+    url: '/api/patientinspectionindex/barchart',
205
+    method: 'get',
206
+    params:params,
207
+
208
+  })
209
+}
210
+
211
+
212
+
213
+export function GetDefaultPatient() {
214
+  return request({
215
+    url: '/api/defalutpatient/get',
216
+    method: 'get',
217
+
218
+  })
219
+}
220
+
221
+
222
+
223
+
224
+
156
 
225
 
157
 
226
 

+ 3 - 13
src/api/patient.js View File

36
   })
36
   })
37
 }
37
 }
38
 export function editPatient(id, patient) {
38
 export function editPatient(id, patient) {
39
-  console.log('patient', patient)
40
   return request({
39
   return request({
41
     url: '/api/patients/edit?id=' + id + '&record_date=' + patient.record_date + '&is_infectious=' + patient.is_infectious + '&remind_cycle=' + patient.remind_cycle,
40
     url: '/api/patients/edit?id=' + id + '&record_date=' + patient.record_date + '&is_infectious=' + patient.is_infectious + '&remind_cycle=' + patient.remind_cycle,
42
     method: 'put',
41
     method: 'put',
238
 }
237
 }
239
 
238
 
240
 export function EditLapseto(patient_id, data) {
239
 export function EditLapseto(patient_id, data) {
240
+  console.log('data', data)
241
   return request({
241
   return request({
242
     url: '/api/patients/lapseto/edit?id=' + patient_id,
242
     url: '/api/patients/lapseto/edit?id=' + patient_id,
243
     method: 'post',
243
     method: 'post',
345
   })
345
   })
346
 }
346
 }
347
 
347
 
348
-
349
 export function postExportPatients(params) {
348
 export function postExportPatients(params) {
350
   return request({
349
   return request({
351
     url: '/api/patients/export',
350
     url: '/api/patients/export',
352
     method: 'Post',
351
     method: 'Post',
353
-    data: params,
352
+    data: params
354
   })
353
   })
355
 }
354
 }
356
 
355
 
357
-
358
-
359
 export function getMaxDialysisNo() {
356
 export function getMaxDialysisNo() {
360
   return request({
357
   return request({
361
     url: '/api/patients/dialysis_no',
358
     url: '/api/patients/dialysis_no',
362
-    method: 'Get',
359
+    method: 'Get'
363
   })
360
   })
364
 }
361
 }
365
 
362
 
366
-
367
-
368
-
369
-
370
-
371
-
372
-

+ 0 - 5
src/api/signandweigh.js View File

1
 import request from '@/utils/request'
1
 import request from '@/utils/request'
2
 
2
 
3
 export function fetchSignPatients(params) {
3
 export function fetchSignPatients(params) {
4
-  console.log('bbbbbbbbbbbbbbb号码')
5
-  console.log(params)
6
   return request({
4
   return request({
7
     url: '/api/sign/patients',
5
     url: '/api/sign/patients',
8
     method: 'Get',
6
     method: 'Get',
64
 }
62
 }
65
 
63
 
66
 export function sighdata(params) {
64
 export function sighdata(params) {
67
-  console.log('好还哦')
68
-  console.log(params)
69
   return request({
65
   return request({
70
     url: '/api/sigh/sighdata',
66
     url: '/api/sigh/sighdata',
71
     params: params,
67
     params: params,
74
 }
70
 }
75
 
71
 
76
 export function updateSignweight(params) {
72
 export function updateSignweight(params) {
77
-  console.log('params是什么', params)
78
   return request({
73
   return request({
79
     url: '/api/sign/updateSignweight',
74
     url: '/api/sign/updateSignweight',
80
     params: params,
75
     params: params,

+ 1 - 1
src/router/index_路由未分离前.js View File

895
     redirect: '/qcd/dialysistotal',
895
     redirect: '/qcd/dialysistotal',
896
     name: 'qcd',
896
     name: 'qcd',
897
     alwaysShow: true,
897
     alwaysShow: true,
898
-    meta: { title: '科室质控', icon: 'table' },
898
+    meta: { title: '质控管理', icon: 'table' },
899
     children: [
899
     children: [
900
       { path: '/statistics/index', component: () => import('@/xt_pages/statistics/index'), name: 'statistics', meta: { title: 'statistics' }},
900
       { path: '/statistics/index', component: () => import('@/xt_pages/statistics/index'), name: 'statistics', meta: { title: 'statistics' }},
901
       { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},
901
       { path: '/qcd/dialysistotal', component: () => import('@/xt_pages/qcd/dialysisTotal'), name: 'dialysistotal', meta: { title: '透析总量' }},

+ 103 - 91
src/router/modules/dialysis.js View File

1
-import Layout from "@/views/layout/Layout";
1
+import Layout from '@/views/layout/Layout'
2
 
2
 
3
 export default {
3
 export default {
4
-  path: "/dialysis/",
4
+  path: '/dialysis/',
5
   component: Layout,
5
   component: Layout,
6
-  redirect: "noredirect",
7
-  name: "dialysis",
6
+  redirect: 'noredirect',
7
+  name: 'dialysis',
8
   alwaysShow: true,
8
   alwaysShow: true,
9
   meta: {
9
   meta: {
10
-    title: "dialysis",
11
-    icon: "touxi"
10
+    title: 'dialysis',
11
+    icon: 'touxi'
12
   },
12
   },
13
   children: [
13
   children: [
14
     {
14
     {
15
-      path: "/dialysis/dialysisrecord",
16
-      component: () => import("@/xt_pages/dialysis/schedualPatient"),
17
-      name: "透析记录",
15
+      path: '/dialysis/dialysisrecord',
16
+      component: () => import('@/xt_pages/dialysis/schedualPatient'),
17
+      name: '透析记录',
18
       meta: {
18
       meta: {
19
-        title: "透析记录",
19
+        title: '透析记录',
20
         noCache: true
20
         noCache: true
21
       }
21
       }
22
     },
22
     },
23
     {
23
     {
24
-      path: "/dialysis/watch",
25
-      component: () => import("@/xt_pages/dialysis/bloodPresssWatch"),
26
-      name: "watch",
24
+      path: '/dialysis/watch',
25
+      component: () => import('@/xt_pages/dialysis/bloodPresssWatch'),
26
+      name: 'watch',
27
       meta: {
27
       meta: {
28
-        title: "watch",
28
+        title: 'watch',
29
         noCache: true
29
         noCache: true
30
       }
30
       }
31
     },
31
     },
32
     {
32
     {
33
-      path: "/dialysis/board",
34
-      component: () => import("@/xt_pages/dialysis/bulletinBoard"),
35
-      name: "数据看板",
33
+      path: '/dialysis/board',
34
+      component: () => import('@/xt_pages/dialysis/bulletinBoard'),
35
+      name: '数据看板',
36
       meta: {
36
       meta: {
37
-        title: "数据看板",
37
+        title: '数据看板',
38
         noCache: true
38
         noCache: true
39
       }
39
       }
40
     },
40
     },
41
     {
41
     {
42
-      path: "/dialysis/record/:id",
43
-      component: () => import("@/xt_pages/dialysis/dialysisPage"),
42
+      path: '/dialysis/record/:id',
43
+      component: () => import('@/xt_pages/dialysis/dialysisPage'),
44
       hidden: true,
44
       hidden: true,
45
       is_menu: false,
45
       is_menu: false,
46
-      name: "paper",
46
+      name: 'paper',
47
       meta: {
47
       meta: {
48
-        title: "paper",
48
+        title: 'paper',
49
         noCache: true
49
         noCache: true
50
       }
50
       }
51
     },
51
     },
52
     {
52
     {
53
-      path: "/dialysis/print",
54
-      component: () => import("@/xt_pages/dialysis/dialysisPrintOrder"),
53
+      path: '/dialysis/print',
54
+      component: () => import('@/xt_pages/dialysis/dialysisPrintOrder'),
55
       hidden: true,
55
       hidden: true,
56
       is_menu: false,
56
       is_menu: false,
57
-      name: "dialysisPrintOrder",
57
+      name: 'dialysisPrintOrder',
58
       meta: {
58
       meta: {
59
-        title: "dialysisPrintOrder",
59
+        title: 'dialysisPrintOrder',
60
         noCache: true
60
         noCache: true
61
       }
61
       }
62
     },
62
     },
65
     // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
65
     // { path: 'prepare', component: () => import('@/xt_pages/dialysis/dialysisPrepare'), name: 'prepare', meta: { title: 'prepare' }},
66
 
66
 
67
     {
67
     {
68
-      path: "/dialysis/details",
69
-      component: () => import("@/xt_pages/dialysis/details"),
70
-      name: "details",
68
+      path: '/dialysis/details',
69
+      component: () => import('@/xt_pages/dialysis/details'),
70
+      name: 'details',
71
       meta: {
71
       meta: {
72
-        title: "details"
72
+        title: 'details'
73
       },
73
       },
74
       hidden: true,
74
       hidden: true,
75
       is_menu: false,
75
       is_menu: false,
76
       noCache: true
76
       noCache: true
77
     },
77
     },
78
     {
78
     {
79
-      path: "/dialysis/print/batch",
79
+      path: '/dialysis/print/batch',
80
       component: () =>
80
       component: () =>
81
-        import("@/xt_pages/dialysis/batch_print/batch_print_order"),
81
+        import('@/xt_pages/dialysis/batch_print/batch_print_order'),
82
       hidden: true,
82
       hidden: true,
83
       is_menu: false,
83
       is_menu: false,
84
-      name: "dialysis_batch_print",
84
+      name: 'dialysis_batch_print',
85
       meta: {
85
       meta: {
86
-        title: "批量打印",
86
+        title: '批量打印',
87
         noCache: true
87
         noCache: true
88
       }
88
       }
89
     },
89
     },
90
     {
90
     {
91
-      path: "/dialysis/print/batch/other",
91
+      path: '/dialysis/print/batch/other',
92
       component: () =>
92
       component: () =>
93
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_other"),
93
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_other'),
94
       hidden: true,
94
       hidden: true,
95
       is_menu: false,
95
       is_menu: false,
96
-      name: "dialysis_batch_print_two",
96
+      name: 'dialysis_batch_print_two',
97
       meta: {
97
       meta: {
98
-        title: "批量打印",
98
+        title: '批量打印',
99
         noCache: true
99
         noCache: true
100
       }
100
       }
101
     },
101
     },
102
     {
102
     {
103
-      path: "/dialysis/print/batch/three",
103
+      path: '/dialysis/print/batch/three',
104
       component: () =>
104
       component: () =>
105
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_three"),
105
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_three'),
106
       hidden: true,
106
       hidden: true,
107
       is_menu: false,
107
       is_menu: false,
108
-      name: "dialysis_batch_print_two_one",
108
+      name: 'dialysis_batch_print_two_one',
109
       meta: {
109
       meta: {
110
-        title: "批量打印",
110
+        title: '批量打印',
111
         noCache: true
111
         noCache: true
112
       }
112
       }
113
     },
113
     },
114
     {
114
     {
115
-      path: "/dialysis/print/batch/four",
115
+      path: '/dialysis/print/batch/four',
116
       component: () =>
116
       component: () =>
117
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_four"),
117
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_four'),
118
       hidden: true,
118
       hidden: true,
119
       is_menu: false,
119
       is_menu: false,
120
-      name: "dialysis_batch_print_two_one",
120
+      name: 'dialysis_batch_print_two_one',
121
       meta: {
121
       meta: {
122
-        title: "批量打印",
122
+        title: '批量打印',
123
         noCache: true
123
         noCache: true
124
       }
124
       }
125
     },
125
     },
126
     {
126
     {
127
-      path: "/dialysis/print/batch/five",
127
+      path: '/dialysis/print/batch/five',
128
       component: () =>
128
       component: () =>
129
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_five"),
129
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_five'),
130
       hidden: true,
130
       hidden: true,
131
       is_menu: false,
131
       is_menu: false,
132
-      name: "dialysis_batch_print_two_one",
132
+      name: 'dialysis_batch_print_two_one',
133
       meta: {
133
       meta: {
134
-        title: "批量打印",
134
+        title: '批量打印',
135
         noCache: true
135
         noCache: true
136
       }
136
       }
137
     },
137
     },
138
     {
138
     {
139
-      path: "/dialysis/print/batch/six",
139
+      path: '/dialysis/print/batch/six',
140
       component: () =>
140
       component: () =>
141
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_six"),
141
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_six'),
142
       hidden: true,
142
       hidden: true,
143
       is_menu: false,
143
       is_menu: false,
144
-      name: "dialysis_batch_six",
144
+      name: 'dialysis_batch_six',
145
       meta: {
145
       meta: {
146
-        title: "批量打印",
146
+        title: '批量打印',
147
         noCache: true
147
         noCache: true
148
       }
148
       }
149
     },
149
     },
150
     {
150
     {
151
-      path: "/dialysis/print/batch/seven",
151
+      path: '/dialysis/print/batch/seven',
152
       component: () =>
152
       component: () =>
153
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_seven"),
153
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_seven'),
154
       hidden: true,
154
       hidden: true,
155
       is_menu: false,
155
       is_menu: false,
156
-      name: "dialysis_batch_seven",
156
+      name: 'dialysis_batch_seven',
157
       meta: {
157
       meta: {
158
-        title: "批量打印",
158
+        title: '批量打印',
159
         noCache: true
159
         noCache: true
160
       }
160
       }
161
     },
161
     },
162
     {
162
     {
163
-      path: "/dialysis/print/batch/eight",
163
+      path: '/dialysis/print/batch/eight',
164
       component: () =>
164
       component: () =>
165
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_eight"),
165
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_eight'),
166
       hidden: true,
166
       hidden: true,
167
       is_menu: false,
167
       is_menu: false,
168
-      name: "dialysis_batch_eight",
168
+      name: 'dialysis_batch_eight',
169
       meta: {
169
       meta: {
170
-        title: "批量打印",
170
+        title: '批量打印',
171
         noCache: true
171
         noCache: true
172
       }
172
       }
173
     },
173
     },
174
     {
174
     {
175
-      path: "/dialysis/print/batch/nine",
175
+      path: '/dialysis/print/batch/nine',
176
       component: () =>
176
       component: () =>
177
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_nine"),
177
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_nine'),
178
       hidden: true,
178
       hidden: true,
179
       is_menu: false,
179
       is_menu: false,
180
-      name: "dialysis_batch_nine",
180
+      name: 'dialysis_batch_nine',
181
       meta: {
181
       meta: {
182
-        title: "批量打印",
182
+        title: '批量打印',
183
         noCache: true
183
         noCache: true
184
       }
184
       }
185
     },
185
     },
186
     {
186
     {
187
-      path: "/dialysis/print/batch/twelve",
187
+      path: '/dialysis/print/batch/twelve',
188
       component: () =>
188
       component: () =>
189
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_twelve"),
189
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_twelve'),
190
       hidden: true,
190
       hidden: true,
191
       is_menu: false,
191
       is_menu: false,
192
-      name: "dialysis_batch_twelve",
192
+      name: 'dialysis_batch_twelve',
193
       meta: {
193
       meta: {
194
-        title: "批量打印",
194
+        title: '批量打印',
195
         noCache: true
195
         noCache: true
196
       }
196
       }
197
     },
197
     },
198
     {
198
     {
199
-      path: "/dialysis/print/batch/thirteen",
199
+      path: '/dialysis/print/batch/thirteen',
200
       component: () =>
200
       component: () =>
201
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_thirteen"),
201
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_thirteen'),
202
       hidden: true,
202
       hidden: true,
203
       is_menu: false,
203
       is_menu: false,
204
-      name: "dialysis_batch_thirteen",
204
+      name: 'dialysis_batch_thirteen',
205
       meta: {
205
       meta: {
206
-        title: "批量打印",
206
+        title: '批量打印',
207
         noCache: true
207
         noCache: true
208
       }
208
       }
209
     },
209
     },
210
     {
210
     {
211
-      path: "/dialysis/print/batch/otherone",
211
+      path: '/dialysis/print/batch/fifteen',
212
       component: () =>
212
       component: () =>
213
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_other_one"),
213
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_fifteen'),
214
       hidden: true,
214
       hidden: true,
215
       is_menu: false,
215
       is_menu: false,
216
-      name: "dialysis_batch_print_two_one",
216
+      name: 'dialysis_batch_fifteen',
217
       meta: {
217
       meta: {
218
-        title: "批量打印",
218
+        title: '批量打印',
219
         noCache: true
219
         noCache: true
220
       }
220
       }
221
     },
221
     },
222
     {
222
     {
223
-      path: "/dialysis/print/batch/othertwo",
223
+      path: '/dialysis/print/batch/otherone',
224
       component: () =>
224
       component: () =>
225
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_other_two"),
225
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_other_one'),
226
       hidden: true,
226
       hidden: true,
227
       is_menu: false,
227
       is_menu: false,
228
-      name: "dialysis_batch_print_two_two",
228
+      name: 'dialysis_batch_print_two_one',
229
       meta: {
229
       meta: {
230
-        title: "批量打印",
230
+        title: '批量打印',
231
         noCache: true
231
         noCache: true
232
       }
232
       }
233
     },
233
     },
234
     {
234
     {
235
-      path: "/dialysis/print/batch/fiveone",
235
+      path: '/dialysis/print/batch/othertwo',
236
       component: () =>
236
       component: () =>
237
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_five_one"),
237
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_other_two'),
238
       hidden: true,
238
       hidden: true,
239
       is_menu: false,
239
       is_menu: false,
240
-      name: "dialysis_batch_print_two_two",
240
+      name: 'dialysis_batch_print_two_two',
241
       meta: {
241
       meta: {
242
-        title: "批量打印",
242
+        title: '批量打印',
243
         noCache: true
243
         noCache: true
244
       }
244
       }
245
     },
245
     },
246
     {
246
     {
247
-      path: "/dialysis/print/batch/fivetwo",
247
+      path: '/dialysis/print/batch/fiveone',
248
       component: () =>
248
       component: () =>
249
-        import("@/xt_pages/dialysis/batch_print/batch_print_order_five_two"),
249
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_five_one'),
250
       hidden: true,
250
       hidden: true,
251
       is_menu: false,
251
       is_menu: false,
252
-      name: "dialysis_batch_print_two_two",
252
+      name: 'dialysis_batch_print_two_two',
253
       meta: {
253
       meta: {
254
-        title: "批量打印",
254
+        title: '批量打印',
255
+        noCache: true
256
+      }
257
+    },
258
+    {
259
+      path: '/dialysis/print/batch/fivetwo',
260
+      component: () =>
261
+        import('@/xt_pages/dialysis/batch_print/batch_print_order_five_two'),
262
+      hidden: true,
263
+      is_menu: false,
264
+      name: 'dialysis_batch_print_two_two',
265
+      meta: {
266
+        title: '批量打印',
255
         noCache: true
267
         noCache: true
256
       }
268
       }
257
     }
269
     }
258
   ]
270
   ]
259
-};
271
+}

+ 139 - 129
src/router/modules/qcd.js View File

1
-import Layout from "@/views/layout/Layout";
1
+import Layout from '@/views/layout/Layout'
2
 
2
 
3
 export default {
3
 export default {
4
-  path: "/qcd",
4
+  path: '/qcd',
5
   component: Layout,
5
   component: Layout,
6
-  redirect: "/qcd/dialysistotal",
7
-  name: "qcd",
6
+  redirect: '/qcd/dialysistotal',
7
+  name: 'qcd',
8
   alwaysShow: true,
8
   alwaysShow: true,
9
   meta: {
9
   meta: {
10
-    title: "质控管理",
11
-    icon: "statistics"
10
+    title: '质控管理',
11
+    icon: 'statistics'
12
   },
12
   },
13
   children: [
13
   children: [
14
     // {
14
     // {
68
     //   }
68
     //   }
69
     // },
69
     // },
70
     {
70
     {
71
-      path: "/qcd/patientanalysis/statisticalConfig",
72
-      component: () => import("@/xt_pages/qcd/statisticalConfiguration"),
73
-      name: "statisticalConfig",
71
+      path: '/qcd/patientanalysis/statisticalConfig',
72
+      component: () => import('@/xt_pages/qcd/statisticalConfiguration'),
73
+      name: 'statisticalConfig',
74
       meta: {
74
       meta: {
75
-        title: "统计配置",
75
+        title: '统计配置',
76
         noCache: true
76
         noCache: true
77
       }
77
       }
78
     },
78
     },
79
     {
79
     {
80
-      path: "/qcd/basicInformationAnalysis",
81
-      component: () => import("@/xt_pages/qcd/basicInformationAnalysis"),
82
-      name: "basicInformationAnalysis",
80
+      path: '/qcd/basicInformationAnalysis',
81
+      component: () => import('@/xt_pages/qcd/basicInformationAnalysis'),
82
+      name: 'basicInformationAnalysis',
83
       meta: {
83
       meta: {
84
-        title: "基本信息统计",
84
+        title: '基本信息统计',
85
         noCache: true
85
         noCache: true
86
       }
86
       }
87
     },
87
     },
88
     {
88
     {
89
-      path: "/qcd/officesControlAnalysis/time",
90
-      component: () => import("@/xt_pages/qcd/officesControlAnalysis/time"),
91
-      name: "officesControlAnalysis",
89
+      path: '/qcd/officesControlAnalysis/time',
90
+      component: () => import('@/xt_pages/qcd/officesControlAnalysis/time'),
91
+      name: 'officesControlAnalysis',
92
       meta: {
92
       meta: {
93
-        title: "科室质控达标统计",
93
+        title: '科室质控达标统计',
94
         noCache: true
94
         noCache: true
95
       }
95
       }
96
     },
96
     },
97
     {
97
     {
98
-      path: "/qcd/officesControlAnalysis/project",
98
+      path: '/qcd/officesControlAnalysis/project',
99
       hidden: true,
99
       hidden: true,
100
       is_menu: false,
100
       is_menu: false,
101
-      component: () => import("@/xt_pages/qcd/officesControlAnalysis/project"),
102
-      name: "patientControlAnalysisProject",
101
+      component: () => import('@/xt_pages/qcd/officesControlAnalysis/project'),
102
+      name: 'patientControlAnalysisProject',
103
       meta: {
103
       meta: {
104
-        title: "科室质控达标统计按项目",
104
+        title: '科室质控达标统计按项目',
105
         noCache: true
105
         noCache: true
106
       }
106
       }
107
     },
107
     },
108
     {
108
     {
109
-      path: "/qcd/patientControlAnalysis",
110
-      component: () => import("@/xt_pages/qcd/patientControlAnalysis"),
111
-      name: "patientControlAnalysisTime",
109
+      path: '/qcd/patientControlAnalysis',
110
+      component: () => import('@/xt_pages/qcd/patientControlAnalysis'),
111
+      name: 'patientControlAnalysisTime',
112
       meta: {
112
       meta: {
113
-        title: "患者质控达标统计",
113
+        title: '患者质控达标统计',
114
         noCache: true
114
         noCache: true
115
       }
115
       }
116
     },
116
     },
117
     {
117
     {
118
-      path: "/qcd/patientComplianceDetails",
118
+      path: '/qcd/patientComplianceDetails',
119
       hidden: true,
119
       hidden: true,
120
       is_menu: false,
120
       is_menu: false,
121
-      component: () => import("@/xt_pages/qcd/patientComplianceDetails"),
122
-      name: "patientComplianceDetails",
121
+      component: () => import('@/xt_pages/qcd/patientComplianceDetails'),
122
+      name: 'patientComplianceDetails',
123
       meta: {
123
       meta: {
124
-        title: "患者质控达标统计详情",
124
+        title: '患者质控达标统计详情',
125
         noCache: true
125
         noCache: true
126
       }
126
       }
127
     },
127
     },
128
 
128
 
129
     {
129
     {
130
-      path: "/qcd/treatmentControlAnalysis/time",
131
-      component: () => import("@/xt_pages/qcd/treatmentControlAnalysis/time"),
132
-      name: "treatmentControlAnalysis",
130
+      path: '/qcd/treatmentControlAnalysis/time',
131
+      component: () => import('@/xt_pages/qcd/treatmentControlAnalysis/time'),
132
+      name: 'treatmentControlAnalysis',
133
       meta: {
133
       meta: {
134
-        title: "治疗信息统计",
134
+        title: '治疗信息统计',
135
         noCache: true
135
         noCache: true
136
       }
136
       }
137
     },
137
     },
138
     {
138
     {
139
-      path: "/qcd/treatmentControlAnalysis/check",
139
+      path: '/qcd/treatmentControlAnalysis/check',
140
       hidden: true,
140
       hidden: true,
141
       is_menu: false,
141
       is_menu: false,
142
-      component: () => import("@/xt_pages/qcd/treatmentControlAnalysis/check"),
143
-      name: "treatmentControlAnalysisCheck",
142
+      component: () => import('@/xt_pages/qcd/treatmentControlAnalysis/check'),
143
+      name: 'treatmentControlAnalysisCheck',
144
       meta: {
144
       meta: {
145
-        title: "治疗信息统计检验检查",
145
+        title: '治疗信息统计检验检查',
146
         noCache: true
146
         noCache: true
147
       }
147
       }
148
     },
148
     },
149
     {
149
     {
150
-      path: "/qcd/indicatorControlAnalysis/analysis",
150
+      path: '/qcd/indicatorControlAnalysis/analysis',
151
       component: () =>
151
       component: () =>
152
-        import("@/xt_pages/qcd/indicatorControlAnalysis/analysis"),
153
-      name: "indicatorControlAnalysis",
152
+        import('@/xt_pages/qcd/indicatorControlAnalysis/analysis'),
153
+      name: 'indicatorControlAnalysis',
154
       meta: {
154
       meta: {
155
-        title: "指标评估统计",
155
+        title: '指标评估统计',
156
         noCache: true
156
         noCache: true
157
       }
157
       }
158
     },
158
     },
159
     {
159
     {
160
-      path: "/qcd/indicatorControlAnalysis/process",
160
+      path: '/qcd/indicatorControlAnalysis/process',
161
       hidden: true,
161
       hidden: true,
162
       is_menu: false,
162
       is_menu: false,
163
       component: () =>
163
       component: () =>
164
-        import("@/xt_pages/qcd/indicatorControlAnalysis/process"),
165
-      name: "process",
164
+        import('@/xt_pages/qcd/indicatorControlAnalysis/process'),
165
+      name: 'process',
166
       meta: {
166
       meta: {
167
-        title: "指标评估统计透析过程",
167
+        title: '指标评估统计透析过程',
168
         noCache: true
168
         noCache: true
169
       }
169
       }
170
     },
170
     },
171
     {
171
     {
172
-      path: "/qcd/indicatorControlAnalysis/monitor",
172
+      path: '/qcd/indicatorControlAnalysis/monitor',
173
       hidden: true,
173
       hidden: true,
174
       is_menu: false,
174
       is_menu: false,
175
       component: () =>
175
       component: () =>
176
-        import("@/xt_pages/qcd/indicatorControlAnalysis/monitor"),
177
-      name: "monitor",
176
+        import('@/xt_pages/qcd/indicatorControlAnalysis/monitor'),
177
+      name: 'monitor',
178
       meta: {
178
       meta: {
179
-        title: "指标评估统计透析监测",
179
+        title: '指标评估统计透析监测',
180
         noCache: true
180
         noCache: true
181
       }
181
       }
182
     },
182
     },
183
     {
183
     {
184
-      path: "/qcd/indicatorControlAnalysis/bloodPressure",
184
+      path: '/qcd/indicatorControlAnalysis/bloodPressure',
185
       hidden: true,
185
       hidden: true,
186
       is_menu: false,
186
       is_menu: false,
187
       component: () =>
187
       component: () =>
188
-        import("@/xt_pages/qcd/indicatorControlAnalysis/bloodPressure"),
189
-      name: "bloodPressure",
188
+        import('@/xt_pages/qcd/indicatorControlAnalysis/bloodPressure'),
189
+      name: 'bloodPressure',
190
       meta: {
190
       meta: {
191
-        title: "指标评估统计血压",
191
+        title: '指标评估统计血压',
192
         noCache: true
192
         noCache: true
193
       }
193
       }
194
     },
194
     },
195
     {
195
     {
196
-      path: "/qcd/indicatorControlAnalysis/bloodPressureDetails",
196
+      path: '/qcd/indicatorControlAnalysis/bloodPressureDetails',
197
       hidden: true,
197
       hidden: true,
198
       is_menu: false,
198
       is_menu: false,
199
       component: () =>
199
       component: () =>
200
-        import("@/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails"),
201
-      name: "bloodPressureDetails",
200
+        import('@/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails'),
201
+      name: 'bloodPressureDetails',
202
       meta: {
202
       meta: {
203
-        title: "指标评估统计血压详情",
203
+        title: '指标评估统计血压详情',
204
         noCache: true
204
         noCache: true
205
       }
205
       }
206
     },
206
     },
207
     {
207
     {
208
-      path: "/qcd/indicatorControlAnalysis/weight",
208
+      path: '/qcd/indicatorControlAnalysis/weight',
209
       hidden: true,
209
       hidden: true,
210
       is_menu: false,
210
       is_menu: false,
211
-      component: () => import("@/xt_pages/qcd/indicatorControlAnalysis/weight"),
212
-      name: "weight",
211
+      component: () => import('@/xt_pages/qcd/indicatorControlAnalysis/weight'),
212
+      name: 'weight',
213
       meta: {
213
       meta: {
214
-        title: "指标评估体重",
214
+        title: '指标评估体重',
215
         noCache: true
215
         noCache: true
216
       }
216
       }
217
     },
217
     },
218
     {
218
     {
219
-      path: "/qcd/indicatorControlAnalysis/weightDetails",
219
+      path: '/qcd/indicatorControlAnalysis/weightDetails',
220
       hidden: true,
220
       hidden: true,
221
       is_menu: false,
221
       is_menu: false,
222
       component: () =>
222
       component: () =>
223
-        import("@/xt_pages/qcd/indicatorControlAnalysis/weightDetails"),
224
-      name: "weightDetails",
223
+        import('@/xt_pages/qcd/indicatorControlAnalysis/weightDetails'),
224
+      name: 'weightDetails',
225
       meta: {
225
       meta: {
226
-        title: "指标评估体重详情",
227
-        noCache: true
226
+        title: '指标评估体重详情',
227
+
228
       }
228
       }
229
     },
229
     },
230
     {
230
     {
231
-      path: "/qcd/analysisDetails",
231
+      path: '/qcd/analysisDetails',
232
       hidden: true,
232
       hidden: true,
233
       is_menu: false,
233
       is_menu: false,
234
       component: () =>
234
       component: () =>
235
-        import("@/xt_pages/qcd/indicatorControlAnalysis/analysisDetails"),
236
-      name: "analysisDetails",
235
+        import('@/xt_pages/qcd/indicatorControlAnalysis/analysisDetails'),
236
+      name: 'analysisDetails',
237
       meta: {
237
       meta: {
238
-        title: "化验指标评估统计详情",
238
+        title: '化验指标评估统计详情',
239
         noCache: true
239
         noCache: true
240
       }
240
       }
241
     },
241
     },
242
     {
242
     {
243
-      path: "/qcd/workAnalysis/doctor",
244
-      component: () => import("@/xt_pages/qcd/workAnalysis/doctor"),
245
-      name: "workAnalysisDoctor",
243
+      path: '/qcd/workAnalysis/doctor',
244
+      component: () => import('@/xt_pages/qcd/workAnalysis/doctor'),
245
+      name: 'workAnalysisDoctor',
246
       meta: {
246
       meta: {
247
-        title: "工作量分析统计",
247
+        title: '工作量分析统计',
248
         noCache: true
248
         noCache: true
249
       }
249
       }
250
     },
250
     },
251
     {
251
     {
252
-      path: "/qcd/workAnalysis/nurse",
252
+      path: '/qcd/workAnalysis/nurse',
253
       hidden: true,
253
       hidden: true,
254
       is_menu: false,
254
       is_menu: false,
255
-      component: () => import("@/xt_pages/qcd/workAnalysis/nurse"),
256
-      name: "workAnalysisNurse",
255
+      component: () => import('@/xt_pages/qcd/workAnalysis/nurse'),
256
+      name: 'workAnalysisNurse',
257
       meta: {
257
       meta: {
258
-        title: "工作量分析统计护士",
258
+        title: '工作量分析统计护士',
259
         noCache: true
259
         noCache: true
260
       }
260
       }
261
     },
261
     },
262
-
263
     {
262
     {
264
-      path: "/qcd/patientanalysis/checkStatistical",
263
+      path: '/qcd/patientanalysis/checkStatistical',
265
       hidden: true,
264
       hidden: true,
266
       is_menu: false,
265
       is_menu: false,
267
-      component: () => import("@/xt_pages/qcd/checkStatistical"),
268
-      name: "checkStatistical",
266
+      component: () => import('@/xt_pages/qcd/checkStatistical'),
267
+      name: 'checkStatistical',
269
       meta: {
268
       meta: {
270
-        title: "检验检查统计配置",
269
+        title: '检验检查统计配置',
271
         noCache: true
270
         noCache: true
272
       }
271
       }
273
     },
272
     },
274
     {
273
     {
275
-      path: "/qcd/patientanalysis/weight",
274
+      path: '/qcd/patientanalysis/weight',
276
       hidden: true,
275
       hidden: true,
277
       is_menu: false,
276
       is_menu: false,
278
-      component: () => import("@/xt_pages/qcd/patientAnalysis/weight"),
279
-      name: "patientAnalysisWeight",
277
+      component: () => import('@/xt_pages/qcd/patientAnalysis/weight'),
278
+      name: 'patientAnalysisWeight',
280
       meta: {
279
       meta: {
281
-        title: "体重分析",
280
+        title: '体重分析',
282
         noCache: true
281
         noCache: true
283
       }
282
       }
284
     },
283
     },
285
     {
284
     {
286
-      path: "/qcd/patientanalysis/bloodpressure",
285
+      path: '/qcd/patientanalysis/bloodpressure',
287
       hidden: true,
286
       hidden: true,
288
       is_menu: false,
287
       is_menu: false,
289
-      component: () => import("@/xt_pages/qcd/patientAnalysis/bloodPressure"),
290
-      name: "patientAnalysisBloodPressure",
288
+      component: () => import('@/xt_pages/qcd/patientAnalysis/bloodPressure'),
289
+      name: 'patientAnalysisBloodPressure',
291
       meta: {
290
       meta: {
292
-        title: "血压分析",
291
+        title: '血压分析',
293
         noCache: true
292
         noCache: true
294
       }
293
       }
295
     },
294
     },
296
     {
295
     {
297
-      path: "/qcd/patientanalysis/dialysisage",
296
+      path: '/qcd/patientanalysis/dialysisage',
298
       hidden: true,
297
       hidden: true,
299
       is_menu: false,
298
       is_menu: false,
300
-      component: () => import("@/xt_pages/qcd/patientAnalysis/dialysisAge"),
301
-      name: "patientAnalysisDialysisAge",
299
+      component: () => import('@/xt_pages/qcd/patientAnalysis/dialysisAge'),
300
+      name: 'patientAnalysisDialysisAge',
302
       meta: {
301
       meta: {
303
-        title: "透析龄分析",
302
+        title: '透析龄分析',
304
         noCache: true
303
         noCache: true
305
       }
304
       }
306
     },
305
     },
307
     {
306
     {
308
-      path: "/qcd/patientanalysis/lapseto",
307
+      path: '/qcd/patientanalysis/lapseto',
309
       hidden: true,
308
       hidden: true,
310
       is_menu: false,
309
       is_menu: false,
311
-      component: () => import("@/xt_pages/qcd/patientAnalysis/lapseto"),
312
-      name: "patientAnalysisLapseto",
310
+      component: () => import('@/xt_pages/qcd/patientAnalysis/lapseto'),
311
+      name: 'patientAnalysisLapseto',
313
       meta: {
312
       meta: {
314
-        title: "转归分析",
313
+        title: '转归分析',
315
         noCache: true
314
         noCache: true
316
       }
315
       }
317
     },
316
     },
318
     {
317
     {
319
-      path: "/qcd/patientanalysis/complication",
318
+      path: '/qcd/patientanalysis/complication',
320
       hidden: true,
319
       hidden: true,
321
       is_menu: false,
320
       is_menu: false,
322
-      component: () => import("@/xt_pages/qcd/patientAnalysis/complication"),
323
-      name: "patientAnalysisComplication",
321
+      component: () => import('@/xt_pages/qcd/patientAnalysis/complication'),
322
+      name: 'patientAnalysisComplication',
324
       meta: {
323
       meta: {
325
-        title: "并发症分析",
324
+        title: '并发症分析',
326
         noCache: true
325
         noCache: true
327
       }
326
       }
328
     },
327
     },
329
     {
328
     {
330
-      path: "/qcd/patientanalysis/infectiousdiseases",
329
+      path: '/qcd/patientanalysis/infectiousdiseases',
331
       hidden: true,
330
       hidden: true,
332
       is_menu: false,
331
       is_menu: false,
333
       component: () =>
332
       component: () =>
334
-        import("@/xt_pages/qcd/patientAnalysis/infectiousDiseases"),
335
-      name: "patientAnalysisInfectiousDiseases",
333
+        import('@/xt_pages/qcd/patientAnalysis/infectiousDiseases'),
334
+      name: 'patientAnalysisInfectiousDiseases',
336
       meta: {
335
       meta: {
337
-        title: "传染病分析",
336
+        title: '传染病分析',
338
         noCache: true
337
         noCache: true
339
       }
338
       }
340
     },
339
     },
341
     {
340
     {
342
-      path: "/qcd/pa/person/lapseto",
341
+      path: '/qcd/pa/person/lapseto',
343
       hidden: true,
342
       hidden: true,
344
       is_menu: false,
343
       is_menu: false,
345
-      component: () => import("@/xt_pages/qcd/patientAnalysis/person/lapseto"),
346
-      name: "paPersonLapseto",
344
+      component: () => import('@/xt_pages/qcd/patientAnalysis/person/lapseto'),
345
+      name: 'paPersonLapseto',
347
       meta: {
346
       meta: {
348
-        title: "转归",
347
+        title: '转归',
349
         noCache: true
348
         noCache: true
350
       }
349
       }
351
     },
350
     },
352
     {
351
     {
353
-      path: "/qcd/pa/person/weight",
352
+      path: '/qcd/pa/person/weight',
354
       hidden: true,
353
       hidden: true,
355
       is_menu: false,
354
       is_menu: false,
356
-      component: () => import("@/xt_pages/qcd/patientAnalysis/person/weight"),
357
-      name: "paPersonWeight",
355
+      component: () => import('@/xt_pages/qcd/patientAnalysis/person/weight'),
356
+      name: 'paPersonWeight',
358
       meta: {
357
       meta: {
359
-        title: "体重",
358
+        title: '体重',
360
         noCache: true
359
         noCache: true
361
       }
360
       }
362
     },
361
     },
363
     {
362
     {
364
-      path: "/qcd/pa/person/bloodpressure",
363
+      path: '/qcd/pa/person/bloodpressure',
365
       hidden: true,
364
       hidden: true,
366
       is_menu: false,
365
       is_menu: false,
367
       component: () =>
366
       component: () =>
368
-        import("@/xt_pages/qcd/patientAnalysis/person/bloodPressure"),
369
-      name: "paPersonBloodPressure",
367
+        import('@/xt_pages/qcd/patientAnalysis/person/bloodPressure'),
368
+      name: 'paPersonBloodPressure',
370
       meta: {
369
       meta: {
371
-        title: "血压",
370
+        title: '血压',
372
         noCache: true
371
         noCache: true
373
       }
372
       }
374
     },
373
     },
375
     {
374
     {
376
-      path: "/qcd/pa/person/indicators",
375
+      path: '/qcd/pa/person/indicators',
377
       hidden: true,
376
       hidden: true,
378
       is_menu: false,
377
       is_menu: false,
379
       component: () =>
378
       component: () =>
380
-        import("@/xt_pages/qcd/patientAnalysis/person/indicators"),
381
-      name: "paPersonIndicators",
379
+        import('@/xt_pages/qcd/patientAnalysis/person/indicators'),
380
+      name: 'paPersonIndicators',
382
       meta: {
381
       meta: {
383
-        title: "指标控制",
382
+        title: '指标控制',
384
         noCache: true
383
         noCache: true
385
       }
384
       }
386
     },
385
     },
387
     {
386
     {
388
-      path: "/qcd/pa/person/oralmedicine",
387
+      path: '/qcd/pa/person/oralmedicine',
388
+      hidden: true,
389
+      is_menu: false,
390
+      component: () =>
391
+        import('@/xt_pages/qcd/patientAnalysis/person/oralMedicine'),
392
+      name: 'paPersonOralMedicine',
393
+      meta: {
394
+        title: '口服药',
395
+        noCache: true
396
+      }
397
+    }, {
398
+      path: '/qcd/inspection/detail',
389
       hidden: true,
399
       hidden: true,
390
       is_menu: false,
400
       is_menu: false,
391
       component: () =>
401
       component: () =>
392
-        import("@/xt_pages/qcd/patientAnalysis/person/oralMedicine"),
393
-      name: "paPersonOralMedicine",
402
+        import('@/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail'),
403
+      name: 'patientInspectionDetail',
394
       meta: {
404
       meta: {
395
-        title: "口服药",
405
+        title: '化验指标详情',
396
         noCache: true
406
         noCache: true
397
       }
407
       }
398
     }
408
     }
399
   ]
409
   ]
400
-};
410
+}

+ 19 - 3
src/store/modules/globalConfig.js View File

528
         gaimingcheng_unit: '',
528
         gaimingcheng_unit: '',
529
         gaijiliang_unit: ''
529
         gaijiliang_unit: ''
530
       },
530
       },
531
+      3: {
532
+        id: 7,
533
+        name: '低分子肝素',
534
+        type: 1,
535
+        shouji: 1,
536
+        weichi: 1,
537
+        zongliang: 1,
538
+        gaimingcheng: -1,
539
+        gaijiliang: -1,
540
+        shouji_unit: 'iu',
541
+        weichi_unit: 'iu/h',
542
+        zongliang_unit: 'iu',
543
+        gaimingcheng_unit: '',
544
+        gaijiliang_unit: ''
545
+      },
531
       4: {
546
       4: {
532
         id: 4,
547
         id: 4,
533
         name: '阿加曲班',
548
         name: '阿加曲班',
1268
     {
1283
     {
1269
       id: 3,
1284
       id: 3,
1270
       name: '住院'
1285
       name: '住院'
1286
+    }, {
1287
+      id: 4,
1288
+      name: '门诊'
1271
     }
1289
     }
1272
     ],
1290
     ],
1273
     observation_content: [{
1291
     observation_content: [{
2178
       state.patient_types = patientTypes
2196
       state.patient_types = patientTypes
2179
     }
2197
     }
2180
   },
2198
   },
2181
-  action: {
2182
-
2183
-  }
2199
+  action: {}
2184
 }
2200
 }
2185
 
2201
 
2186
 export default global_config
2202
 export default global_config

File diff suppressed because it is too large
+ 1497 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_fifteen.vue


+ 12 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue View File

150
           >批量打印</el-button
150
           >批量打印</el-button
151
         >
151
         >
152
       </template>
152
       </template>
153
+      <template v-if="this.template_id == 15">
154
+        <el-button
155
+          size="small"
156
+          icon="el-icon-printer"
157
+          :disabled="selecting_schs.length == 0"
158
+          @click="batchPrintAction"
159
+          type="primary"
160
+          >批量打印</el-button
161
+        >
162
+      </template>
153
     </div>
163
     </div>
154
     <div class="app-container">
164
     <div class="app-container">
155
       <!-- <div class="filter-container">
165
       <!-- <div class="filter-container">
655
         this.$router.push({ path: "/dialysis/print/batch/twelve" });
665
         this.$router.push({ path: "/dialysis/print/batch/twelve" });
656
       } else if (this.template_id == 13) {
666
       } else if (this.template_id == 13) {
657
         this.$router.push({ path: "/dialysis/print/batch/thirteen" });
667
         this.$router.push({ path: "/dialysis/print/batch/thirteen" });
668
+      }else if (this.template_id == 15) {
669
+        this.$router.push({ path: "/dialysis/print/batch/fifteen" });
658
       }
670
       }
659
     },
671
     },
660
     batchPrintActionOne: function() {
672
     batchPrintActionOne: function() {

+ 1 - 1
src/xt_pages/dialysis/details/acceptsAssessment.vue View File

321
       this.postures = getDataConfig('hemodialysis', 'posture')
321
       this.postures = getDataConfig('hemodialysis', 'posture')
322
       this.sick_condition = getDataConfig('hemodialysis', 'sick_condition')
322
       this.sick_condition = getDataConfig('hemodialysis', 'sick_condition')
323
       this.precautions = getDataConfig('hemodialysis', 'precaution')
323
       this.precautions = getDataConfig('hemodialysis', 'precaution')
324
-      console.log("跌倒预防措施",this.precautions)
324
+      //console.log("跌倒预防措施",this.precautions)
325
       this.intake = getDataConfig('hemodialysis', 'intake')
325
       this.intake = getDataConfig('hemodialysis', 'intake')
326
       this.nutrition = getDataConfig('hemodialysis', 'nutrition')
326
       this.nutrition = getDataConfig('hemodialysis', 'nutrition')
327
       console.log(this.ways)
327
       console.log(this.ways)

+ 3 - 0
src/xt_pages/dialysis/details/assessmentAfter.vue View File

433
         case 3:
433
         case 3:
434
           return "住院";
434
           return "住院";
435
           break;
435
           break;
436
+        case 4:
437
+          return "门诊";
438
+          break;
436
 
439
 
437
         default:
440
         default:
438
           return "-";
441
           return "-";

File diff suppressed because it is too large
+ 1913 - 1913
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue


+ 41 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue View File

170
           >打印</el-button
170
           >打印</el-button
171
         >
171
         >
172
       </template>
172
       </template>
173
+
174
+      
173
     </div>
175
     </div>
174
     <div class="app-container ">
176
     <div class="app-container ">
175
       <!--<div class="order-print-btn"-->
177
       <!--<div class="order-print-btn"-->
259
         v-bind:childResponse="childResponse"
261
         v-bind:childResponse="childResponse"
260
         v-if="org_template_info.template_id == 15"
262
         v-if="org_template_info.template_id == 15"
261
       ></DialysisPrintOrderFifteen>
263
       ></DialysisPrintOrderFifteen>
264
+      <DialysisPrintOrderSixteen
265
+        v-bind:childResponse="childResponse"
266
+        v-if="org_template_info.template_id == 16"
267
+      ></DialysisPrintOrderSixteen>
268
+      <DialysisPrintOrderSeventeen
269
+         v-bind:childResponse="childResponse"
270
+         v-if="org_template_info.template_id == 17"
271
+      ></DialysisPrintOrderSeventeen>
272
+      <DialysisPrintOrderEighteen
273
+            v-bind:childResponse="childResponse"
274
+            v-if="org_template_info.template_id == 18"
275
+      ></DialysisPrintOrderEighteen>
262
     </div>
276
     </div>
263
   </div>
277
   </div>
264
 </template>
278
 </template>
284
 import DialysisPrintOrderTwelve from "./template/DialysisPrintOrderTwelve";
298
 import DialysisPrintOrderTwelve from "./template/DialysisPrintOrderTwelve";
285
 import DialysisPrintOrderThirteen from "./template/DialysisPrintOrderThirteen";
299
 import DialysisPrintOrderThirteen from "./template/DialysisPrintOrderThirteen";
286
 import DialysisPrintOrderFifteen from "./template/DialysisPrintOrderFifteen";
300
 import DialysisPrintOrderFifteen from "./template/DialysisPrintOrderFifteen";
287
-
301
+import DialysisPrintOrderSixteen from "./template/DialysisPrintOrderSixteen";
302
+import DialysisPrintOrderSeventeen from "./template/DialysisPrintOrderSeventeen";
303
+import DialysisPrintOrderEighteen from "./template/DialysisPrintOrderEighteen";
288
 export default {
304
 export default {
289
   name: "dialysisPrintOrder",
305
   name: "dialysisPrintOrder",
290
   components: {
306
   components: {
302
     DialysisPrintOrderSeven,
318
     DialysisPrintOrderSeven,
303
     DialysisPrintOrderEight,
319
     DialysisPrintOrderEight,
304
     DialysisPrintOrderNine,
320
     DialysisPrintOrderNine,
321
+    DialysisPrintOrderSixteen,
322
+    DialysisPrintOrderSeventeen,
323
+    DialysisPrintOrderEighteen,
305
     LabelBox,
324
     LabelBox,
306
     BreadCrumb
325
     BreadCrumb
307
   },
326
   },
531
           style: style,
550
           style: style,
532
           scanStyles: false
551
           scanStyles: false
533
         });
552
         });
553
+      }else if (this.org_template_info.template_id == 16){
554
+        printJS({
555
+          printable: "dialysis-print-box",
556
+          type: "html",
557
+          style: style,
558
+          scanStyles: false
559
+        });
560
+      }else if (this.org_template_info.template_id == 17) {
561
+        printJS({
562
+          printable: "dialysis-print-box",
563
+          type: "html",
564
+          style: style,
565
+          scanStyles: false
566
+        });
567
+      }else if (this.org_template_info.template_id == 18) {
568
+        printJS({
569
+          printable: "dialysis-print-box",
570
+          type: "html",
571
+          style: style,
572
+          scanStyles: false
573
+        });
534
       }
574
       }
535
     },
575
     },
536
     printThisOnePage() {
576
     printThisOnePage() {

File diff suppressed because it is too large
+ 1579 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderEighteen.vue


File diff suppressed because it is too large
+ 1279 - 1256
src/xt_pages/dialysis/template/DialysisPrintOrderFifteen.vue


File diff suppressed because it is too large
+ 2227 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSeventeen.vue


File diff suppressed because it is too large
+ 1811 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSixteen.vue


+ 109 - 126
src/xt_pages/qcd/basicInformationAnalysis.vue View File

18
             >{{ item.label }}</li>
18
             >{{ item.label }}</li>
19
           </ul>
19
           </ul>
20
         </div>
20
         </div>
21
-        <label class="title">
22
-          <span class="name">日期查询</span> :
23
-        </label>
24
         <el-date-picker
21
         <el-date-picker
25
           v-model="listQuery.start_time"
22
           v-model="listQuery.start_time"
26
           prefix-icon="el-icon-date"
23
           prefix-icon="el-icon-date"
32
           align="right"
29
           align="right"
33
           format="yyyy-MM-dd"
30
           format="yyyy-MM-dd"
34
           value-format="yyyy-MM-dd"
31
           value-format="yyyy-MM-dd"
32
+          :picker-options="pickerOptions"
35
         ></el-date-picker>
33
         ></el-date-picker>
36
         <span class>-</span>
34
         <span class>-</span>
37
         <el-date-picker
35
         <el-date-picker
45
           align="right"
43
           align="right"
46
           format="yyyy-MM-dd"
44
           format="yyyy-MM-dd"
47
           value-format="yyyy-MM-dd"
45
           value-format="yyyy-MM-dd"
46
+          :picker-options="pickerOptions"
48
         ></el-date-picker>
47
         ></el-date-picker>
49
       </div>
48
       </div>
50
       <div class="cell clearfix" style="align-items:normal">
49
       <div class="cell clearfix" style="align-items:normal">
114
                       <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
113
                       <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
115
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
114
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
116
                   </span>
115
                   </span>
116
+                   <span v-if="item.mode_id == 15">
117
+                      <p>HD前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
118
+                      <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
119
+                   </span>
120
+                    <span v-if="item.mode_id == 16">
121
+                      <p>HD后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
122
+                      <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
123
+                   </span>
124
+                    <span v-if="item.mode_id == 17">
125
+                      <p>HDF前置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
126
+                      <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
127
+                   </span>
128
+                    <span v-if="item.mode_id == 18">
129
+                      <p>HDF后置换:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
130
+                      <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
131
+                   </span>
117
                    <span v-if="item.mode_id == 19">
132
                    <span v-if="item.mode_id == 19">
118
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
133
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
119
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
134
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
149
                       <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
164
                       <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
150
                   </span>
165
                   </span>
151
                     <span v-if="item.disease_id == 1">
166
                     <span v-if="item.disease_id == 1">
152
-                      <p>其他:{{item.count + otherTotal}}人({{((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)}}%)</p>
153
-                      <el-progress :percentage="((item.count+otherTotal)/InfectiousTotal*100).toFixed(1)"></el-progress>
167
+                      <p>其他:{{item.count}}人({{((item.count)/InfectiousTotal*100).toFixed(1)}}%)</p>
168
+                      <el-progress :percentage="((item.count)/InfectiousTotal*100).toFixed(1)"></el-progress>
154
                   </span>
169
                   </span>
155
                 </div>
170
                 </div>
156
               </div>
171
               </div>
165
                 <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
180
                 <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
166
               </div>
181
               </div>
167
               <div class="borderBox1">
182
               <div class="borderBox1">
168
-                <p>留治:{{RetentionCount}}人({{(RetentionCount/patientCount*100).toFixed(1)}}%)</p>
169
-                <el-progress :percentage="(RetentionCount/patientCount*100).toFixed(1)"></el-progress>
170
-                <p>转出:{{rollOut}}人({{(rollOut/patientCount*100).toFixed(1)}}%)</p>
171
-                <el-progress :percentage="(rollOut/patientCount*100).toFixed(1)"></el-progress>
183
+                <p>留治:{{rollOutTotal}}人({{(rollOutTotal/patientCount*100).toFixed(1)}}%)</p>
184
+                <el-progress :percentage="(rollOutTotal/patientCount*100).toFixed(1)"></el-progress>
185
+                <p>转出:{{outTotal}}人({{(outTotal/patientCount*100).toFixed(1)}}%)</p>
186
+                <el-progress :percentage="(outTotal/patientCount*100).toFixed(1)"></el-progress>
172
               </div>
187
               </div>
173
             </div>
188
             </div>
174
             <div class="infoOne">
189
             <div class="infoOne">
219
                 <p class="infoTitle">透龄统计</p>
234
                 <p class="infoTitle">透龄统计</p>
220
               </div>
235
               </div>
221
               <div class="borderBox1">
236
               <div class="borderBox1">
222
-                <p>透析龄≤12:{{totalone}}人({{(totalone/patientCount*100).toFixed(1)}}%)</p>
223
-                <el-progress :percentage="(totalone/patientCount*100).toFixed(1)"></el-progress>
224
-                <p>12&lt;透析龄≤36:{{totaltwo}}人({{(totaltwo/patientCount*100).toFixed(1)}}%)</p>
225
-                <el-progress :percentage="(totaltwo/patientCount*100).toFixed(1)"></el-progress>
226
-                <p>36≤透析龄≤60:{{totalthree}}/人({{(totalthree/patientCount*100).toFixed(1)}}%)</p>
227
-                <el-progress :percentage="(totalthree/patientCount*100).toFixed(1)"></el-progress>
228
-                <p>透析龄 ≥60:{{patientCount-totalone-totaltwo-totalthree}}人({{((patientCount-totalone-totaltwo-totalthree)/patientCount*100).toFixed(1)}}%)</p>
229
-                <el-progress :percentage="((patientCount-totalone-totaltwo-totalthree)/patientCount*100).toFixed(1)"></el-progress>
237
+                <div v-for="(item,index) in dialysisAge" :key="index">
238
+                 <span v-if="item.age== 1">
239
+                  <p>透析龄≤12:{{item.count}}人({{(item.count/patientCount*100).toFixed(1)}}%)</p>
240
+                  <el-progress :percentage="(item.count/patientCount*100).toFixed(1)"></el-progress>
241
+                </span>
242
+                <span v-if="item.age == 2">
243
+                  <p>12&lt;透析龄≤36:{{item.count}}人({{(item.count/patientCount*100).toFixed(1)}}%)</p>
244
+                 <el-progress :percentage="(item.count/patientCount*100).toFixed(1)"></el-progress>
245
+                </span>
246
+                <span v-if="item.age == 3">
247
+                   <p>36≤透析龄≤60:{{item.count}}/人({{(item.count/patientCount*100).toFixed(1)}}%)</p>
248
+                   <el-progress :percentage="(item.count/patientCount*100).toFixed(1)"></el-progress>
249
+                </span>
250
+                <span v-if="item.age == 4">
251
+                   透析龄 ≥60:{{item.count}}人({{((item.count)/patientCount*100).toFixed(1)}}%)
252
+                   <el-progress :percentage="((item.count)/patientCount*100).toFixed(1)"></el-progress>
253
+                </span>
254
+               </div>
230
               </div>
255
               </div>
231
             </div>
256
             </div>
232
           </div>
257
           </div>
253
   },
278
   },
254
   data() {
279
   data() {
255
     return {
280
     return {
281
+       pickerOptions: {
282
+        disabledDate(time) {
283
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
284
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
285
+        }
286
+      }, 
256
       crumbs: [
287
       crumbs: [
257
-        { path: false, name: "科室质控" },
288
+        { path: false, name: "质控管理" },
258
         { path: false, name: "基本信息统计" }
289
         { path: false, name: "基本信息统计" }
259
       ],
290
       ],
260
       listQuery: {
291
       listQuery: {
268
         { value: 0, label: "本月", state: 0 },
299
         { value: 0, label: "本月", state: 0 },
269
         { value: 1, label: "近三个月", state: 1 },
300
         { value: 1, label: "近三个月", state: 1 },
270
         { value: 2, label: "近半年", state: 2 },
301
         { value: 2, label: "近半年", state: 2 },
271
-        { value: 3, label: "近一年", state: 3 }
302
+        { value: 3, label: "近一年", state: 3 },
303
+        { value:4,label:"自定义",state:4}
272
       ],
304
       ],
273
       modetype:[],
305
       modetype:[],
274
       total:0,
306
       total:0,
286
       totalone:0,
318
       totalone:0,
287
       totaltwo:0,
319
       totaltwo:0,
288
       totalthree:0,
320
       totalthree:0,
321
+      rollOutTotal:0,
322
+      outTotal:0,
323
+      dialysisAge:[],
289
     };
324
     };
290
   },
325
   },
291
   methods: {
326
   methods: {
294
       return new Date(time).getTime() / 1000;
329
       return new Date(time).getTime() / 1000;
295
     },
330
     },
296
     changeTime(val) {
331
     changeTime(val) {
332
+       this.stateType = 4
297
        var timeStar=Date.parse(val)/1000
333
        var timeStar=Date.parse(val)/1000
298
        var timeEnd =Date.parse(this.listQuery.end_time)/1000
334
        var timeEnd =Date.parse(this.listQuery.end_time)/1000
299
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
335
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
316
       }
352
       }
317
     },
353
     },
318
     changeEndTime(val) {
354
     changeEndTime(val) {
355
+       this.stateType = 4
319
        var timeEnd=Date.parse(val)/1000
356
        var timeEnd=Date.parse(val)/1000
320
        var timeStar =Date.parse(this.listQuery.start_time)/1000
357
        var timeStar =Date.parse(this.listQuery.start_time)/1000
321
       var time =
358
       var time =
343
       this.listQuery.state = state;
380
       this.listQuery.state = state;
344
       //获取本月当前机构的透析模式
381
       //获取本月当前机构的透析模式
345
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
382
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
346
-      console.log("开始时间",startDate)
383
+    //  console.log("开始时间",startDate)
347
       const endDate = moment(new Date()).format('YYYY-MM-DD')
384
       const endDate = moment(new Date()).format('YYYY-MM-DD')
348
      // console.log("结束时间",endDate)
385
      // console.log("结束时间",endDate)
349
       var now = new Date()
386
       var now = new Date()
443
         //统计透析年龄
480
         //统计透析年龄
444
         this.getTotalDialysisCount(startunitx,endunitx)
481
         this.getTotalDialysisCount(startunitx,endunitx)
445
      }
482
      }
483
+   
484
+ 
446
 
485
 
447
     },
486
     },
448
     getDialysisModeType(startDate,endDate){
487
     getDialysisModeType(startDate,endDate){
449
       getDialysisModeType(startDate,endDate).then(response=>{
488
       getDialysisModeType(startDate,endDate).then(response=>{
450
          if(response.data.state == 1){
489
          if(response.data.state == 1){
451
           var modetype =  response.data.data.modetype
490
           var modetype =  response.data.data.modetype
452
-          console.log("mode---",modetype)
453
             var total =  response.data.data.total
491
             var total =  response.data.data.total
454
             console.log("total",total)
492
             console.log("total",total)
455
             this.total = total
493
             this.total = total
456
-           // for(let i=0;i<modetype.length;i++){
457
-           //   if(modetype[i].mode_id == 1){
458
-           //     modetype[i].mode_id = "HD"
459
-           //   }
460
-           //   if(modetype[i].mode_id == 2){
461
-           //     modetype[i].mode_id = "HDF"
462
-           //   }
463
-           //   if(modetype[i].mode_id == 3){
464
-           //     modetype[i].mode_id = "HD+HP"
465
-           //   }
466
-           //    if(modetype[i].mode_id == 4){
467
-           //     modetype[i].mode_id = "HP"
468
-           //   }
469
-           //    if(modetype[i].mode_id == 5){
470
-           //     modetype[i].mode_id = "HF"
471
-           //   }
472
-           //   if(modetype[i].mode_id == 6){
473
-           //     modetype[i].mode_id = "SCUF"
474
-           //   }
475
-           //   if(modetype[i].mode_id == 7){
476
-           //     modetype[i].mode_id = "IUF"
477
-           //   }
478
-           //    if(modetype[i].mode_id == 8){
479
-           //     modetype[i].mode_id = "HFHD"
480
-           //   }
481
-           //   if(modetype[i].mode_id == 9){
482
-           //     modetype[i].mode_id = "HFHD+HP"
483
-           //   }
484
-           //   if(modetype[i].mode_id == 10){
485
-           //     modetype[i].mode_id = "PHF"
486
-           //   }
487
-           //   if(modetype[i].mode_id == 11){
488
-           //     modetype[i].mode_id = "HFR"
489
-           //   }
490
-           //  if(modetype[i].mode_id == 12){
491
-           //     modetype[i].mode_id = "HDF+HP"
492
-           //   }
493
-           //    if(modetype[i].mode_id == 13){
494
-           //     modetype[i].mode_id = "HFHD+HP"
495
-           //   }
496
-           //    if(modetype[i].mode_id == 14){
497
-           //     modetype[i].mode_id = "腹水回输"
498
-           //   }
499
-           //  if(modetype[i].mode_id == 19){
500
-           //     modetype[i].mode_id = "IUF+HD"
501
-           //   }
502
-           //}
503
            this.modetype = modetype
494
            this.modetype = modetype
504
            console.log("modetype",modetype)
495
            console.log("modetype",modetype)
505
 
496
 
511
       getTotalLapseCount(startDate,endDate).then(response=>{
502
       getTotalLapseCount(startDate,endDate).then(response=>{
512
          if(response.data.state == 1){
503
          if(response.data.state == 1){
513
           var patients =  response.data.data.patients
504
           var patients =  response.data.data.patients
514
-          var total = response.data.data.total
515
-          this.rollOut = total
505
+          this.rollOutTotal = patients.length
506
+          console.log("留治病人长度",patients.length)
507
+          var patienttwo = response.data.data.patienttwo
508
+          this.outTotal = patienttwo.length
509
+            console.log("转出长度", this.outTotal)
516
           var count = response.data.data.count
510
           var count = response.data.data.count
517
           this.patientCount = count
511
           this.patientCount = count
518
-          this.RetentionCount = count-total
519
          }
512
          }
520
       })
513
       })
521
     },
514
     },
539
        getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
532
        getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
540
            if(response.data.state === 1){
533
            if(response.data.state === 1){
541
              this.InfectiousTotal = response.data.data.total
534
              this.InfectiousTotal = response.data.data.total
535
+             console.log("===",this.InfectiousTotal)
542
              var infectious = response.data.data.count
536
              var infectious = response.data.data.count
543
-             this.InfectiousList = infectious
544
-           // for(let i=0;i<infectious.length;i++){
545
-           //   if(infectious[i].disease_id == 1){
546
-           //      infectious[i].disease_id = "其他"
547
-            //   }
548
-            //   if(infectious[i].disease_id == 2){
549
-            //     infectious[i].disease_id = "乙肝"
550
-            //   }
551
-           //    if(infectious[i].disease_id == 3){
552
-            //     infectious[i].disease_id = "丙肝"
553
-           //    }
554
-            //   if(infectious[i].disease_id == 4){
555
-            //     infectious[i].disease_id = "艾滋病"
556
-            //   }
557
-            //   if(infectious[i].disease_id == 5){
558
-            //     infectious[i].disease_id = "肺结核"
559
-            //   }
560
-            //   if(infectious[i].disease_id == 6){
561
-            //     infectious[i].disease_id = "梅毒"
562
-            //   }
563
-
564
-            // }
537
+             console.log("infectious",infectious)
565
              var otherTotal = response.data.data.otherTotal
538
              var otherTotal = response.data.data.otherTotal
539
+             console.log("otherTotal",otherTotal)
566
              this.otherTotal = otherTotal
540
              this.otherTotal = otherTotal
567
-             // console.log("infectious-----------",otherTotal)
541
+              var arr = [
542
+                {count:0,disease_id:2},
543
+                {count:0,disease_id:3},
544
+                {count:0,disease_id:4},
545
+                {count:0,disease_id:5},
546
+                {count:0,disease_id:6},
547
+              ]
548
+             if(infectious.length == 0){
549
+                this.InfectiousList = arr
550
+                return false
551
+                
552
+             }
553
+             this.InfectiousList = infectious
554
+            
568
            }
555
            }
569
        })
556
        })
570
     },
557
     },
572
       getTotalAgeCount(timeStar,timeEnd).then(response=>{
559
       getTotalAgeCount(timeStar,timeEnd).then(response=>{
573
          if(response.data.state == 1){
560
          if(response.data.state == 1){
574
           var ageCount =  response.data.data.ageCount
561
           var ageCount =  response.data.data.ageCount
575
-          this.ageCount = ageCount
576
-        //  console.log("ageCount",ageCount)
562
+          console.log("ageCount",ageCount)
563
+          var arr = []
564
+          arr =  ageCount.sort(this.compare('age'))
565
+          this.ageCount = arr
577
           this.ageTotal =  response.data.data.total
566
           this.ageTotal =  response.data.data.total
578
-         // var two = response.data.data.two
579
-        //  console.log("two",two)
580
 
567
 
581
          }
568
          }
582
       })
569
       })
583
     },
570
     },
571
+     compare:function (k) {
572
+          return function (a, b) {
573
+              var M = a[k];
574
+              var N = b[k];
575
+              return M - N;      // 从低向高排
576
+              // return N - M;   // 从高向低排
577
+          }
578
+      },
584
     //统计透析年龄
579
     //统计透析年龄
585
     getTotalDialysisCount(timeStar,timeEnd){
580
     getTotalDialysisCount(timeStar,timeEnd){
581
+      //  const endDate = moment(new Date()).format('YYYY-MM-DD')
582
+      //  console.log("结束时间",endDate)
583
+      //  var end = Date.parse(endDate)/1000
584
+      //  console.log("end",end)
585
+      //  const startDate = moment().subtract('month', 144).format('YYYY-MM-DD')
586
+      //  var twStart = Date.parse(startDate)/1000
587
+      //  console.log("12年前",twStart)
588
+      // const start = moment().subtract('month', 432).format('YYYY-MM-DD')
589
+      // console.log("start",start)
590
+      //  var sixStart = Date.parse(start)/1000
591
+      //  console.log("36年前",sixStart)
592
+      //  const sevnstart = moment().subtract('month', 720).format('YYYY-MM-DD')
593
+      //  var sevenStart = Date.parse(sevnstart)/1000
594
+      //  console.log("60年前",sevenStart)
586
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
595
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
587
          if(response.data.state == 1){
596
          if(response.data.state == 1){
588
            var dataage =  response.data.data.dataage
597
            var dataage =  response.data.data.dataage
589
            console.log("dataage",dataage)
598
            console.log("dataage",dataage)
590
-           var nowtime =  response.data.data.nowtime
591
-           console.log("nowtime",nowtime)
592
-           var patients = response.data.data.patients
593
-           var arr =[]
594
-           var arrtwo = []
595
-           var arrthree = []
596
-           for(let i=0;i<patients.length;i++){
597
-             if(nowtime - patients[i].first_dialysis_date <= 378691200){
598
-                arr.push(patients[i].first_dialysis_date)
599
-             }
600
-             if((nowtime-patients[i].first_dialysis_date)>378691200 && (nowtime-patients[i].first_dialysis_date)<=1136073600){
601
-               arrtwo.push(patients[i].first_dialysis_date)
602
-             }
603
-             if((nowtime-patients[i].first_dialysis_date)>1136073600 && (nowtime-patients[i].first_dialysis_date)<=1893456000){
604
-               arrthree.push(patients[i].first_dialysis_date)
605
-             }
606
-           }
607
-           this.totalone = arr.length
608
-           this.totaltwo = arrtwo.length
609
-           this.totalthree = arrthree.length
610
-           console.log("长度",arr.length)
611
-           console.log("长度2",arrtwo.length)
612
-           console.log("长度3",arrthree.length)
613
-           console.log("patients",patients)
614
-
615
-            var date =  new Date(1212508800)
616
-          console.log("date",date)
599
+           this.dialysisAge = dataage
617
 
600
 
618
          }
601
          }
619
       })
602
       })
620
     }
603
     }
621
   },
604
   },
622
   created() {
605
   created() {
623
-     //获取本月当前机构的透析模式
606
+        //获取本月当前机构的透析模式
624
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
607
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
625
       console.log("开始时间",startDate)
608
       console.log("开始时间",startDate)
626
       const endDate = moment(new Date()).format('YYYY-MM-DD')
609
       const endDate = moment(new Date()).format('YYYY-MM-DD')

+ 1 - 1
src/xt_pages/qcd/checkStatistical.vue View File

114
   data() {
114
   data() {
115
     return {
115
     return {
116
       crumbs: [
116
       crumbs: [
117
-        { path: false, name: "科室质控" },
117
+        { path: false, name: "质控管理" },
118
         { path: false, name: "统计配置" },
118
         { path: false, name: "统计配置" },
119
         { path: false, name: "检验检查统计配置" }
119
         { path: false, name: "检验检查统计配置" }
120
       ],
120
       ],

+ 1 - 1
src/xt_pages/qcd/components/LineChart.vue View File

176
             interval: 0,
176
             interval: 0,
177
             formatter: function(value) {
177
             formatter: function(value) {
178
               var ret = ""; //拼接加\n返回的类目项
178
               var ret = ""; //拼接加\n返回的类目项
179
-              var maxLength = 8; //每项显示文字个数
179
+              var maxLength = 10; //每项显示文字个数
180
               var valLength = value.length; //X轴类目项的文字个数
180
               var valLength = value.length; //X轴类目项的文字个数
181
               var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
181
               var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
182
               if (rowN > 1) {
182
               if (rowN > 1) {

+ 1 - 1
src/xt_pages/qcd/dialysisTotal.vue View File

167
   data() {
167
   data() {
168
     return {
168
     return {
169
       crumbs: [
169
       crumbs: [
170
-        { path: false, name: "科室质控" },
170
+        { path: false, name: "质控管理" },
171
         { path: false, name: "透析总量" }
171
         { path: false, name: "透析总量" }
172
       ],
172
       ],
173
       total: 0,
173
       total: 0,

+ 3 - 4
src/xt_pages/qcd/indicatorControlAnalysis/analysis.vue View File

7
       <div class="page_analysis">
7
       <div class="page_analysis">
8
         <new-nav activeName="analysis"></new-nav>
8
         <new-nav activeName="analysis"></new-nav>
9
         <div class="cell clearfix">
9
         <div class="cell clearfix">
10
-          <label class="title">
11
-            <span class="name">转归状态</span> :
12
-          </label>
10
+          <!--<label class="title">-->
11
+          <!--</label>-->
13
           <div class="time">
12
           <div class="time">
14
             <ul class>
13
             <ul class>
15
               <li
14
               <li
50
   data() {
49
   data() {
51
     return {
50
     return {
52
       crumbs: [
51
       crumbs: [
53
-        { path: false, name: "科室质控" },
52
+        { path: false, name: "质控管理" },
54
         { path: false, name: "指标评估统计" },
53
         { path: false, name: "指标评估统计" },
55
         { path: false, name: "化验指标统计" }
54
         { path: false, name: "化验指标统计" }
56
       ],
55
       ],

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/analysisDetails.vue View File

88
   data() {
88
   data() {
89
     return {
89
     return {
90
       crumbs: [
90
       crumbs: [
91
-        { path: false, name: "科室质控" },
91
+        { path: false, name: "质控管理" },
92
         { path: false, name: "指标评估统计" },
92
         { path: false, name: "指标评估统计" },
93
         { path: false, name: "化验指标统计详情" }
93
         { path: false, name: "化验指标统计详情" }
94
       ],
94
       ],

+ 60 - 15
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue View File

69
         <el-container>
69
         <el-container>
70
           <div style="width:150px">
70
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
71
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
72
+            <el-table :data="patientsData" ref="table" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
74
                       highlight-current-row
75
                       @current-change="handleChange">
75
                       @current-change="handleChange">
175
   import { getCurrentOrgPatients } from "@/api/common/common";
175
   import { getCurrentOrgPatients } from "@/api/common/common";
176
 
176
 
177
 
177
 
178
-  import {GetDialysisBloodPressureChartData,GetDialysisBloodPressureTableData} from "@/api/common/statistics"
178
+  import {GetDialysisBloodPressureChartData,GetDialysisBloodPressureTableData,GetDefalutPatient} from "@/api/common/statistics"
179
 
179
 
180
   import {
180
   import {
181
     PostSearch
181
     PostSearch
192
     },
192
     },
193
     data() {
193
     data() {
194
       return {
194
       return {
195
+        percent:[],
196
+
195
         pickerOptions: {
197
         pickerOptions: {
196
           disabledDate(time) {
198
           disabledDate(time) {
197
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
199
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
203
         ],
205
         ],
204
         loading: false,
206
         loading: false,
205
         search_value: '',
207
         search_value: '',
206
-        total: '',
208
+        total: 0,
207
         query: {
209
         query: {
208
           patient_id: '',
210
           patient_id: '',
209
           statistics_type: 1,
211
           statistics_type: 1,
251
                 normal: {
253
                 normal: {
252
                   show: true,
254
                   show: true,
253
                   position: 'top',
255
                   position: 'top',
254
-                  formatter: '{c}'
256
+                  formatter: (params) => {
257
+                    if(this.percent.length > 0){
258
+                      let str = ''
259
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
260
+                      return str
261
+                    }else{
262
+                      let str = ''
263
+                      str = params.data
264
+                      return str
265
+                    }
266
+                  }
255
                 }
267
                 }
256
               },
268
               },
257
               //配置样式
269
               //配置样式
320
                 normal: {
332
                 normal: {
321
                   show: true,
333
                   show: true,
322
                   position: 'top',
334
                   position: 'top',
323
-                  formatter: '{c}次'
335
+                  formatter: (params) => {
336
+                    if(this.percent.length > 0){
337
+                      let str = ''
338
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
339
+                      return str
340
+                    }else{
341
+                      let str = ''
342
+                      str = params.data
343
+                      return str
344
+                    }
345
+                  }
324
                 }
346
                 }
325
               },
347
               },
326
               //配置样式
348
               //配置样式
364
       }
386
       }
365
     },
387
     },
366
     methods: {
388
     methods: {
389
+      jumpDetail(patient_id){
390
+        this.$router.push("/qcd/indicatorControlAnalysis/bloodPressureDetails?id="+patient_id)
391
+
392
+      },
367
       changeProject(val){
393
       changeProject(val){
368
         this.query.statistics_type = val
394
         this.query.statistics_type = val
369
         this.query.page = 1
395
         this.query.page = 1
374
         this.query.patient_id = val.id
400
         this.query.patient_id = val.id
375
         this.query.page = 1
401
         this.query.page = 1
376
         this.GetDialysisBloodPressureTableData(this.query)
402
         this.GetDialysisBloodPressureTableData(this.query)
377
-        this.GetDialysisBloodPressureChartData(this.query)
403
+        // this.GetDialysisBloodPressureChartData(this.query)
378
       },
404
       },
379
       handleSizeChange(limit) {
405
       handleSizeChange(limit) {
380
         this.query.limit = limit;
406
         this.query.limit = limit;
407
+        this.GetDialysisBloodPressureTableData(this.query)
408
+
381
 
409
 
382
       },
410
       },
383
       handleCurrentChange(page) {
411
       handleCurrentChange(page) {
384
         this.query.page = page;
412
         this.query.page = page;
413
+        this.GetDialysisBloodPressureTableData(this.query)
385
 
414
 
386
       },
415
       },
387
       changeTime(val) {
416
       changeTime(val) {
442
       },
471
       },
443
       getModeName(mode_id){
472
       getModeName(mode_id){
444
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
473
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
445
-      },
446
-      changeTime() {
447
-
448
-      }, changeEndTime() {
449
-
450
-
451
       }, GetDialysisBloodPressureTableData(params) {
474
       }, GetDialysisBloodPressureTableData(params) {
452
         this.loading = true
475
         this.loading = true
453
         this.tableData = []
476
         this.tableData = []
460
               for (let i = 0; i < resp.data.data.length; i++) {
483
               for (let i = 0; i < resp.data.data.length; i++) {
461
                 this.tableData.push(resp.data.data[i])
484
                 this.tableData.push(resp.data.data[i])
462
               }
485
               }
486
+              this.total = resp.data.total
463
             } else {
487
             } else {
464
               this.loading = false
488
               this.loading = false
465
             }
489
             }
471
       GetDialysisBloodPressureChartData(params) {
495
       GetDialysisBloodPressureChartData(params) {
472
         this.bar.xAxis.data = []
496
         this.bar.xAxis.data = []
473
         this.bar.series[0].data = []
497
         this.bar.series[0].data = []
498
+        this.percent = []
499
+
474
         GetDialysisBloodPressureChartData(params)
500
         GetDialysisBloodPressureChartData(params)
475
           .then(rs => {
501
           .then(rs => {
476
             var resp = rs.data
502
             var resp = rs.data
478
                 for (let i = 0; i < resp.data.data.length; i++) {
504
                 for (let i = 0; i < resp.data.data.length; i++) {
479
                   this.bar.xAxis.data.push(resp.data.data[i].name)
505
                   this.bar.xAxis.data.push(resp.data.data[i].name)
480
                   this.bar.series[0].data.push(resp.data.data[i].total)
506
                   this.bar.series[0].data.push(resp.data.data[i].total)
481
-              }
507
+                  this.percent.push(resp.data.data[i].ratio)
508
+
509
+                }
482
             } else {
510
             } else {
483
             }
511
             }
484
           })
512
           })
490
         this.query.page = 1
518
         this.query.page = 1
491
         this.GetDialysisBloodPressureChartData(this.query)
519
         this.GetDialysisBloodPressureChartData(this.query)
492
         this.GetDialysisBloodPressureTableData(this.query)
520
         this.GetDialysisBloodPressureTableData(this.query)
521
+        for (let i = 0;i < this.patientsData.length; i++){
522
+          if (this.patientsData[i].id == val.id){
523
+            this.$refs.table.setCurrentRow(this.patientsData[i])
524
+          }
525
+        }
493
 
526
 
494
       },
527
       },
495
       querySearchAsync(keyword, cb) {
528
       querySearchAsync(keyword, cb) {
514
           if(response.data.state == 1){
547
           if(response.data.state == 1){
515
             var patients = response.data.data.patients
548
             var patients = response.data.data.patients
516
             this.patientsData = patients
549
             this.patientsData = patients
550
+            // this.GetDefaultPatient()
517
           }
551
           }
518
         })
552
         })
519
-      },
553
+      },GetDefaultPatient() {
554
+        GetDefalutPatient().then(response => {
555
+          if (response.data.state == 1) {
556
+            var patient = response.data.data.patient
557
+            for (let i = 0;i < this.patientsData.length; i++){
558
+              if (this.patientsData[i].id == patient.id){
559
+                this.$refs.table.setCurrentRow(this.patientsData[i])
560
+              }
561
+            }
562
+          }
563
+        })
564
+      }
520
     }, created() {
565
     }, created() {
521
       var date = new Date()
566
       var date = new Date()
522
       var year = date.getFullYear() //获取完整的年份(4位)
567
       var year = date.getFullYear() //获取完整的年份(4位)
523
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
568
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
524
-      var day = date.getDate() < 0 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
569
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
525
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
570
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
526
       this.query.patient_id = 0
571
       this.query.patient_id = 0
527
       this.query.end_time = year + '-' + month + '-' + day
572
       this.query.end_time = year + '-' + month + '-' + day

+ 255 - 175
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue View File

8
         <div class="cell clearfix" style="margin:0">
8
         <div class="cell clearfix" style="margin:0">
9
           <el-form :inline="true" :model="listQuery">
9
           <el-form :inline="true" :model="listQuery">
10
             <el-form-item label>
10
             <el-form-item label>
11
-              <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
12
-              <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
11
+              <el-autocomplete
12
+                class="checkSearch"
13
+                popper-class="my-autocomplete"
14
+                v-model="search_value"
15
+                :fetch-suggestions="querySearchAsync"
16
+                :trigger-on-focus="false"
17
+                placeholder="请输入病人名字"
18
+                @select="handleSelect"
19
+              >
20
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
21
+                <template slot-scope="{ item }">
22
+                  <div class="name">{{ item.name }}</div>
23
+                </template>
24
+              </el-autocomplete>
13
             </el-form-item>
25
             </el-form-item>
14
           </el-form>
26
           </el-form>
15
         </div>
27
         </div>
16
         <el-container>
28
         <el-container>
17
           <div style="width:150px">
29
           <div style="width:150px">
18
             <div class="tableTitle">患者列表</div>
30
             <div class="tableTitle">患者列表</div>
19
-            <el-table :data="tableData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
20
-              <el-table-column prop="date" label="日期" width="70"></el-table-column>
21
-              <el-table-column prop="name" label="姓名" width="80"></el-table-column>
31
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
32
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
33
+                      highlight-current-row
34
+                      @current-change="handleChange">
35
+              <el-table-column prop="dialysis_no" label="透析号" width="80">
36
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
37
+              </el-table-column>
38
+              <el-table-column prop="name" label="姓名" width="80">
39
+                <template slot-scope="scope">{{ scope.row.name }}</template>
40
+              </el-table-column>
22
             </el-table>
41
             </el-table>
42
+
23
           </div>
43
           </div>
24
           <div class="containerRight" style="flex:1;overflow: hidden">
44
           <div class="containerRight" style="flex:1;overflow: hidden">
25
             <div class="cell clearfix">
45
             <div class="cell clearfix">
26
               <label class="title" style="text-align:left">
46
               <label class="title" style="text-align:left">
27
                 <span class="name">血压阶段</span> :
47
                 <span class="name">血压阶段</span> :
28
               </label>
48
               </label>
29
-              <el-select
30
-                v-model="value"
31
-                placeholder="请选择"
32
-                @change="chooseType"
33
-                style="width:110px;margin-right:10px"
34
-              >
49
+              <el-select v-model="query.statistics_type" placeholder="请选择" style="width:110px;margin-right:10px" @change="changeProject">
35
                 <el-option
50
                 <el-option
36
                   v-for="item in options"
51
                   v-for="item in options"
37
                   :key="item.value"
52
                   :key="item.value"
38
-                  :label="item.label"
53
+                  :label="item.name"
39
                   :value="item.value"
54
                   :value="item.value"
55
+
40
                 ></el-option>
56
                 ></el-option>
41
               </el-select>
57
               </el-select>
42
               <label class="title">
58
               <label class="title">
43
                 <span class="name">日期查询</span> :
59
                 <span class="name">日期查询</span> :
44
               </label>
60
               </label>
45
               <el-date-picker
61
               <el-date-picker
46
-                v-model="listQuery.start_time"
62
+                v-model="query.start_time"
47
                 prefix-icon="el-icon-date"
63
                 prefix-icon="el-icon-date"
48
                 @change="changeTime"
64
                 @change="changeTime"
49
                 :editable="false"
65
                 :editable="false"
66
+                style="width: 150px;"
50
                 type="date"
67
                 type="date"
51
-                style="max-width:160px"
68
+                :picker-options="pickerOptions"
52
                 placeholder="选择日期时间"
69
                 placeholder="选择日期时间"
53
                 align="right"
70
                 align="right"
54
                 format="yyyy-MM-dd"
71
                 format="yyyy-MM-dd"
56
               ></el-date-picker>
73
               ></el-date-picker>
57
               <span class>-</span>
74
               <span class>-</span>
58
               <el-date-picker
75
               <el-date-picker
59
-                v-model="listQuery.end_time"
76
+                v-model="query.end_time"
60
                 prefix-icon="el-icon-date"
77
                 prefix-icon="el-icon-date"
61
                 @change="changeEndTime"
78
                 @change="changeEndTime"
62
                 :editable="false"
79
                 :editable="false"
80
+                :picker-options="pickerOptions"
81
+                style="width: 150px;"
63
                 type="date"
82
                 type="date"
64
-                style="max-width:160px"
65
                 placeholder="选择日期时间"
83
                 placeholder="选择日期时间"
66
                 align="right"
84
                 align="right"
67
                 format="yyyy-MM-dd"
85
                 format="yyyy-MM-dd"
74
             </div>
92
             </div>
75
             <div class="tableTitle">统计表</div>
93
             <div class="tableTitle">统计表</div>
76
             <div>
94
             <div>
77
-              <el-table :data="tableData1" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
78
-                <el-table-column fixed prop="date" label="日期"></el-table-column>
79
-                <el-table-column prop="name" label="姓名"></el-table-column>
80
-                <el-table-column prop="province" label="省份"></el-table-column>
81
-                <el-table-column prop="city" label="市区"></el-table-column>
95
+              <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
96
+                <el-table-column fixed label="日期" align="center">
97
+                  <template slot-scope="scope">
98
+                    {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
99
+                  </template>
100
+                </el-table-column>
101
+
102
+                <el-table-column label="透前血压" align="center">
103
+                  <template slot-scope="scope">
104
+                    <div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>
105
+                  </template>
106
+                </el-table-column>
107
+
108
+                <el-table-column label="透析中最低血压" align="center">
109
+                  <template slot-scope="scope">
110
+                    <div v-if="scope.row.min_monitor.systolic_blood_pressure">{{ scope.row.min_monitor.systolic_blood_pressure}} /{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>
111
+                  </template>
112
+                </el-table-column>
113
+
114
+                <el-table-column label="透析中最高血压" align="center">
115
+                  <template slot-scope="scope">
116
+                    <div v-if="scope.row.max_monitor.systolic_blood_pressure">{{ scope.row.max_monitor.systolic_blood_pressure}} /{{ scope.row.max_monitor.diastolic_blood_pressure}}</div>
117
+
118
+
119
+                  </template>
120
+                </el-table-column>
121
+
122
+                <el-table-column label="透后血压" align="center">
123
+                  <template slot-scope="scope">
124
+                    <div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>
125
+                  </template>
126
+                </el-table-column>
127
+
128
+
82
               </el-table>
129
               </el-table>
83
 
130
 
131
+
84
               <el-pagination
132
               <el-pagination
85
                 align="right"
133
                 align="right"
86
                 @size-change="handleSizeChange"
134
                 @size-change="handleSizeChange"
87
                 @current-change="handleCurrentChange"
135
                 @current-change="handleCurrentChange"
88
-                :current-page="listQuery.page"
136
+                :current-page="query.page"
89
                 :page-sizes="[10, 20, 50, 100]"
137
                 :page-sizes="[10, 20, 50, 100]"
90
                 :page-size="10"
138
                 :page-size="10"
91
                 background
139
                 background
105
 import echarts from "echarts";
153
 import echarts from "echarts";
106
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
154
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
107
 import LineChart from "../../qcd/components/LineChart";
155
 import LineChart from "../../qcd/components/LineChart";
156
+import { getCurrentOrgPatients } from "@/api/common/common";
157
+import {GetDialysisPatientBloodPressureChartData,GetDialysisBloodPressureTableData} from "@/api/common/statistics"
158
+import { PostSearch } from '@/api/patient'
159
+import { uParseTime } from "@/utils/tools";
160
+
108
 export default {
161
 export default {
109
   components: {
162
   components: {
110
     LineChart,
163
     LineChart,
112
   },
165
   },
113
   data() {
166
   data() {
114
     return {
167
     return {
115
-      crumbs: [
116
-        { path: false, name: "科室质控" },
117
-        { path: false, name: "患者血压详情" }
118
-      ],
119
-      tableData: [
120
-        {
121
-          date: "2016",
122
-          name: "王小虎"
123
-        },
124
-        {
125
-          date: "2016",
126
-          name: "王小虎"
127
-        },
128
-        {
129
-          date: "2016",
130
-          name: "王小虎"
131
-        },
132
-        {
133
-          date: "2016",
134
-          name: "王小虎"
135
-        },
136
-        {
137
-          date: "2016",
138
-          name: "王小虎"
139
-        },
140
-        {
141
-          date: "2016",
142
-          name: "王小虎"
143
-        },
144
-        {
145
-          date: "2016",
146
-          name: "王小虎"
147
-        },
148
-        {
149
-          date: "2016",
150
-          name: "王小虎"
151
-        },
152
-        {
153
-          date: "2016",
154
-          name: "王小虎"
155
-        },
156
-        {
157
-          date: "2016",
158
-          name: "王小虎"
159
-        },
160
-        {
161
-          date: "2016",
162
-          name: "王小虎"
163
-        },
164
-        {
165
-          date: "2016",
166
-          name: "王小虎"
168
+      pickerOptions: {
169
+        disabledDate(time) {
170
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
171
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
167
         }
172
         }
173
+      },
174
+      patientsData:[],
175
+      tableData: [
168
       ],
176
       ],
169
-      listQuery: {
170
-        start_time: "",
171
-        end_time: "",
172
-        page: 1,
173
-        limit: 10
177
+      loading: false,
178
+      search_value: '',
179
+      total: 0,
180
+      query: {
181
+        patient_id: '',
182
+        statistics_type: 1,
183
+        start_time: '',
184
+        end_time: '',
185
+        limit: 10,
186
+        page: 1
174
       },
187
       },
188
+      options: [
189
+        { value: 1, name: '透前血压' },
190
+        { value: 2, name: '透后血压' },
191
+      ],
192
+
193
+      crumbs: [
194
+        { path: false, name: "质控管理" },
195
+        { path: false, name: "患者血压详情" }
196
+      ],
197
+
175
       chart: {
198
       chart: {
176
         title: {
199
         title: {
177
           text: "ECharts 入门示例"
200
           text: "ECharts 入门示例"
178
         },
201
         },
179
         tooltip: {},
202
         tooltip: {},
180
         legend: {
203
         legend: {
181
-          data: ["收缩压", "舒张压"],
204
+          data: [],
182
           left: 0
205
           left: 0
183
         },
206
         },
184
         xAxis: {
207
         xAxis: {
185
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
208
+          data: []
186
         },
209
         },
187
         yAxis: {
210
         yAxis: {
188
           axisLabel: {
211
           axisLabel: {
195
             name: "收缩压",
218
             name: "收缩压",
196
             type: "line",
219
             type: "line",
197
             data: [
220
             data: [
198
-              "78.57",
199
-              "50",
200
-              "80",
201
-              "93.33",
202
-              "92.86",
203
-              "100",
204
-              "12",
205
-              "77",
206
-              "37"
221
+
207
             ],
222
             ],
208
             barWidth: 30,
223
             barWidth: 30,
209
             label: {
224
             label: {
210
               normal: {
225
               normal: {
211
                 show: true,
226
                 show: true,
212
                 position: "top",
227
                 position: "top",
213
-                formatter: "{c}"
228
+                formatter: "{c}"
214
               }
229
               }
215
             },
230
             },
216
             //配置样式
231
             //配置样式
226
           {
241
           {
227
             name: "舒张压",
242
             name: "舒张压",
228
             type: "line",
243
             type: "line",
229
-            data: ["10", "20", "30", "53.33", "42.86", "100", "60", "27", "97"],
244
+            data: [],
230
             barWidth: 30,
245
             barWidth: 30,
231
             label: {
246
             label: {
232
               normal: {
247
               normal: {
233
                 show: true,
248
                 show: true,
234
                 position: "top",
249
                 position: "top",
235
-                formatter: "{c}"
250
+                formatter: "{c}"
236
               }
251
               }
237
             },
252
             },
238
             //配置样式
253
             //配置样式
247
           }
262
           }
248
         ]
263
         ]
249
       },
264
       },
250
-      tableData1: [
251
-        {
252
-          date: "2016-05-03",
253
-          name: "王小虎",
254
-          province: "上海",
255
-          city: "普陀区",
256
-          address: "上海市普陀区金沙江路 1518 弄",
257
-          zip: 200333
258
-        },
259
-        {
260
-          date: "2016-05-02",
261
-          name: "王小虎",
262
-          province: "上海",
263
-          city: "普陀区",
264
-          address: "上海市普陀区金沙江路 1518 弄",
265
-          zip: 200333
266
-        },
267
-        {
268
-          date: "2016-05-04",
269
-          name: "王小虎",
270
-          province: "上海",
271
-          city: "普陀区",
272
-          address: "上海市普陀区金沙江路 1518 弄",
273
-          zip: 200333
274
-        },
275
-        {
276
-          date: "2016-05-01",
277
-          name: "王小虎",
278
-          province: "上海",
279
-          city: "普陀区",
280
-          address: "上海市普陀区金沙江路 1518 弄",
281
-          zip: 200333
282
-        },
283
-        {
284
-          date: "2016-05-08",
285
-          name: "王小虎",
286
-          province: "上海",
287
-          city: "普陀区",
288
-          address: "上海市普陀区金沙江路 1518 弄",
289
-          zip: 200333
290
-        },
291
-        {
292
-          date: "2016-05-06",
293
-          name: "王小虎",
294
-          province: "上海",
295
-          city: "普陀区",
296
-          address: "上海市普陀区金沙江路 1518 弄",
297
-          zip: 200333
298
-        },
299
-        {
300
-          date: "2016-05-07",
301
-          name: "王小虎",
302
-          province: "上海",
303
-          city: "普陀区",
304
-          address: "上海市普陀区金沙江路 1518 弄",
305
-          zip: 200333
306
-        },
307
-        {
308
-          date: "2016-05-08",
309
-          name: "王小虎",
310
-          province: "上海",
311
-          city: "普陀区",
312
-          address: "上海市普陀区金沙江路 1518 弄",
313
-          zip: 200333
314
-        },
315
-        {
316
-          date: "2016-05-06",
317
-          name: "王小虎",
318
-          province: "上海",
319
-          city: "普陀区",
320
-          address: "上海市普陀区金沙江路 1518 弄",
321
-          zip: 200333
322
-        },
323
-        {
324
-          date: "2016-05-07",
325
-          name: "王小虎",
326
-          province: "上海",
327
-          city: "普陀区",
328
-          address: "上海市普陀区金沙江路 1518 弄",
329
-          zip: 200333
330
-        }
331
-      ]
332
     };
265
     };
333
   },
266
   },
334
   methods: {
267
   methods: {
268
+    GetDialysisBloodPressureTableData(params) {
269
+      this.loading = true
270
+      this.tableData = []
271
+      GetDialysisBloodPressureTableData(params)
272
+        .then(rs => {
273
+          var resp = rs.data
274
+          if (resp.state == 1) {
275
+            this.loading = false
276
+
277
+            for (let i = 0; i < resp.data.data.length; i++) {
278
+              this.tableData.push(resp.data.data[i])
279
+            }
280
+            this.total = resp.data.total
281
+          } else {
282
+            this.loading = false
283
+          }
284
+        })
285
+        .catch(error => {
286
+
287
+        })
288
+    },
289
+    changeProject(val){
290
+      this.query.statistics_type = val
291
+      this.query.page = 1
292
+      this.GetDialysisPatientBloodPressureChartData(this.query)
293
+
294
+    },
295
+    handleChange(val){
296
+      this.query.patient_id = val.id
297
+      this.query.page = 1
298
+      this.GetDialysisBloodPressureTableData(this.query)
299
+      this.GetDialysisPatientBloodPressureChartData(this.query)
300
+    },
301
+    handleSizeChange(limit) {
302
+      this.query.limit = limit;
303
+      this.GetDialysisBloodPressureTableData(this.query)
304
+
305
+
306
+    },
307
+    handleCurrentChange(page) {
308
+      this.query.page = page;
309
+      this.GetDialysisBloodPressureTableData(this.query)
310
+
311
+
312
+    },changeTime(val) {
313
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
314
+      if (time > 0) {
315
+        this.$message.error("结束时间不能小于开始时间");
316
+        this.query.start_time = "";
317
+      } else {
318
+        // this.getDialysisList()
319
+        this.query.page = 1;
320
+        this.GetDialysisBloodPressureChartData(this.query)
321
+        this.GetDialysisBloodPressureTableData(this.query)
322
+
323
+      }
324
+
325
+    },
326
+    changeEndTime(val) {
327
+      var time =
328
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
329
+      if (time < 0) {
330
+        this.$message.error("结束时间不能小于开始时间");
331
+        this.query.end_time = "";
332
+      } else {
333
+        this.query.page = 1;
334
+        this.GetDialysisBloodPressureChartData(this.query)
335
+        this.GetDialysisBloodPressureTableData(this.query)
336
+
337
+      }
338
+    },  getTimestamp(time) {
339
+      // 把时间日期转成时间戳
340
+      return new Date(time).getTime() / 1000;
341
+    },GetDialysisPatientBloodPressureChartData(params) {
342
+
343
+      this.chart.xAxis.data = []
344
+      this.chart.series[0].data = []
345
+      this.chart.series[1].data = []
346
+      GetDialysisPatientBloodPressureChartData(params)
347
+        .then(rs => {
348
+          var resp = rs.data
349
+          if (resp.state == 1) {
350
+            for (let i = 0; i < resp.data.data.length; i++) {
351
+              this.chart.xAxis.data.push(resp.data.data[i].date)
352
+              this.chart.series[0].data.push(resp.data.data[i].systolic_blood_pressure)
353
+              this.chart.series[1].data.push(resp.data.data[i].diastolic_blood_pressure)
354
+            }
355
+          } else {
356
+          }
357
+        })
358
+        .catch(error => {
359
+        })
360
+    }, handleSelect(val) {
361
+      this.query.patient_id = val.id
362
+      this.query.page = 1
363
+      this.GetDialysisPatientBloodPressureChartData(this.query)
364
+      this.GetDialysisBloodPressureTableData(this.query)
365
+
366
+      for (let i = 0;i < this.patientsData.length; i++){
367
+        if (this.patientsData[i].id == val.id){
368
+          this.$refs.table.setCurrentRow(this.patientsData[i])
369
+        }
370
+      }
371
+
372
+    },  querySearchAsync(keyword, cb) {
373
+      let key = ''
374
+      if (keyword != undefined) {
375
+        key = keyword
376
+      }
377
+      let searchArray = []
378
+      PostSearch(key).then(response => {
379
+        if (response.data.state == 1) {
380
+          searchArray = response.data.data.patient
381
+          cb(searchArray)
382
+        } else {
383
+          cb([])
384
+        }
385
+      })
386
+    },getCurrentOrgPatients(){
387
+      getCurrentOrgPatients().then(response=>{
388
+        if(response.data.state == 1){
389
+          var patients = response.data.data.patients
390
+          this.patientsData = patients
391
+
392
+          for (let i = 0;i < this.patientsData.length; i++){
393
+            if (this.patientsData[i].id == this.query.patient_id){
394
+              this.$refs.table.setCurrentRow(this.patientsData[i])
395
+            }
396
+          }
397
+        }
398
+      })
399
+    },
400
+
335
     chooseMonth(month) {
401
     chooseMonth(month) {
336
       this.monthType = month;
402
       this.monthType = month;
337
     },
403
     },
338
     clickQuality(index) {
404
     clickQuality(index) {
339
       this.quality = index;
405
       this.quality = index;
340
     }
406
     }
407
+  },created() {
408
+    var date = new Date()
409
+    var year = date.getFullYear() //获取完整的年份(4位)
410
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
411
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
412
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
413
+    this.query.patient_id = this.$route.query.id
414
+    this.query.end_time = year + '-' + month + '-' + day
415
+    this.query.start_time = year + '-' + last_month + '-' + day
416
+    this.query.statistics_type = 1
417
+    this.GetDialysisPatientBloodPressureChartData(this.query)
418
+    this.GetDialysisBloodPressureTableData(this.query)
419
+    this.getCurrentOrgPatients()
420
+
341
   }
421
   }
342
 };
422
 };
343
 </script>
423
 </script>

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/components/NewNav.vue View File

2
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
2
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
3
     <el-tab-pane label="化验指标统计" name="analysis"></el-tab-pane>
3
     <el-tab-pane label="化验指标统计" name="analysis"></el-tab-pane>
4
     <el-tab-pane label="透析过程指标统计" name="process"></el-tab-pane>
4
     <el-tab-pane label="透析过程指标统计" name="process"></el-tab-pane>
5
-    <el-tab-pane label="透析监测信息统计" name="monitor"></el-tab-pane>
5
+    <el-tab-pane label="透析监测指标统计" name="monitor"></el-tab-pane>
6
     <el-tab-pane label="患者血压统计" name="bloodPressure"></el-tab-pane>
6
     <el-tab-pane label="患者血压统计" name="bloodPressure"></el-tab-pane>
7
     <el-tab-pane label="患者体重统计" name="weight"></el-tab-pane>
7
     <el-tab-pane label="患者体重统计" name="weight"></el-tab-pane>
8
   </el-tabs>
8
   </el-tabs>

+ 446 - 255
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue View File

1
 <template>
1
 <template>
2
   <div class="page_office">
2
   <div class="page_office">
3
     <div class="cell clearfix">
3
     <div class="cell clearfix">
4
-      <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
4
+      <el-select v-model="query.project_id" placeholder="请选择" style="width:120px;margin-right:20px"
5
+                 @change="changeProject">
5
         <el-option
6
         <el-option
6
-          v-for="item in options"
7
-          :key="item.value"
8
-          :label="item.label"
9
-          :value="item.value"
7
+          v-for="item in project_columns"
8
+          :key="item.project_id"
9
+          :label="item.project_name"
10
+          :value="item.project_id"
10
         ></el-option>
11
         ></el-option>
11
       </el-select>
12
       </el-select>
13
+
12
       <el-select
14
       <el-select
13
-        v-model="value"
15
+        v-model="query.item_id"
14
         placeholder="请选择"
16
         placeholder="请选择"
15
-        @change="chooseType"
16
         style="width:120px;margin-right:20px"
17
         style="width:120px;margin-right:20px"
18
+        @change="changeItem"
17
       >
19
       >
18
         <el-option
20
         <el-option
19
-          v-for="item in options"
20
-          :key="item.value"
21
-          :label="item.label"
22
-          :value="item.value"
21
+          v-for="item in item_columns"
22
+          :key="item.id"
23
+          :label="item.item_name"
24
+          :value="item.id"
23
         ></el-option>
25
         ></el-option>
24
       </el-select>
26
       </el-select>
25
-      <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
26
-        <el-option
27
-          v-for="item in options"
28
-          :key="item.value"
29
-          :label="item.label"
30
-          :value="item.value"
31
-        ></el-option>
32
-      </el-select>
33
-      <el-select
34
-        v-model="value"
35
-        placeholder="请选择"
36
-        @change="chooseType"
37
-        style="width:120px;margin-right:20px"
38
-      >
27
+
28
+      <el-select v-model="query.range_value" placeholder="请选择" style="width:120px;margin-right:20px"
29
+                 @change="changeRangeValue">
39
         <el-option
30
         <el-option
40
-          v-for="item in options"
41
-          :key="item.value"
42
-          :label="item.label"
43
-          :value="item.value"
31
+          v-for="item in range_value_columns"
32
+          :key="item"
33
+          :label="item"
34
+          :value="item"
44
         ></el-option>
35
         ></el-option>
45
       </el-select>
36
       </el-select>
37
+
46
       <label class="title">
38
       <label class="title">
47
         <span class="name">日期查询</span> :
39
         <span class="name">日期查询</span> :
48
       </label>
40
       </label>
49
       <el-date-picker
41
       <el-date-picker
50
-        v-model="listQuery.start_time"
42
+        v-model="query.start_time"
51
         prefix-icon="el-icon-date"
43
         prefix-icon="el-icon-date"
52
         @change="changeTime"
44
         @change="changeTime"
53
         :editable="false"
45
         :editable="false"
54
-        style="width: 196px;"
46
+        style="width: 150px;"
55
         type="date"
47
         type="date"
48
+        :picker-options="pickerOptions"
56
         placeholder="选择日期时间"
49
         placeholder="选择日期时间"
57
         align="right"
50
         align="right"
58
         format="yyyy-MM-dd"
51
         format="yyyy-MM-dd"
60
       ></el-date-picker>
53
       ></el-date-picker>
61
       <span class>-</span>
54
       <span class>-</span>
62
       <el-date-picker
55
       <el-date-picker
63
-        v-model="listQuery.end_time"
56
+        v-model="query.end_time"
64
         prefix-icon="el-icon-date"
57
         prefix-icon="el-icon-date"
65
         @change="changeEndTime"
58
         @change="changeEndTime"
66
         :editable="false"
59
         :editable="false"
67
-        style="width: 196px;"
60
+        :picker-options="pickerOptions"
61
+        style="width: 150px;"
68
         type="date"
62
         type="date"
69
         placeholder="选择日期时间"
63
         placeholder="选择日期时间"
70
         align="right"
64
         align="right"
74
     </div>
68
     </div>
75
     <div class="tableTitle">统计图</div>
69
     <div class="tableTitle">统计图</div>
76
     <div>
70
     <div>
77
-      <line-chart :options="chart"></line-chart>
71
+      <line-chart :options="options"></line-chart>
78
     </div>
72
     </div>
79
     <div class="tableTitle">统计表</div>
73
     <div class="tableTitle">统计表</div>
80
     <div>
74
     <div>
81
-      <el-table :data="tableData" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
82
-        <el-table-column fixed prop="date" label="日期"></el-table-column>
83
-        <el-table-column prop="name" label="姓名"></el-table-column>
84
-        <el-table-column prop="province" label="省份"></el-table-column>
85
-        <el-table-column prop="city" label="市区"></el-table-column>
86
-        <el-table-column prop="address" label="地址"></el-table-column>
87
-        <el-table-column prop="zip" label="邮编"></el-table-column>
88
-        <el-table-column label="操作">
75
+      <el-table :data="tableData" style="width: 100%" :height="tableHeight">
76
+
77
+
78
+        <el-table-column fixed label="姓名" align="center">
79
+          <template slot-scope="scope">
80
+            {{scope.row.patient.name}}
81
+          </template>
82
+        </el-table-column>
83
+
84
+        <el-table-column  label="检查日期" align="center">
89
           <template slot-scope="scope">
85
           <template slot-scope="scope">
90
-            <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
86
+            <!--{{getTime(scope.row.inspect_date)}}-->
87
+            {{scope.row.inspect_date | parseTime('{y}-{m}-{d}') }}
88
+
91
           </template>
89
           </template>
92
         </el-table-column>
90
         </el-table-column>
91
+
92
+
93
+        <el-table-column :label="item_name" align="center">
94
+          <template slot-scope="scope">
95
+            {{getValue(scope.row)}}
96
+
97
+          </template>
98
+        </el-table-column>
99
+
100
+        <el-table-column fixed="right" label="趋势" align="center">
101
+          <template slot-scope="scope">
102
+            <el-button
103
+              @click.native.prevent="jumpDetail(scope.row)"
104
+              type="text"
105
+              size="small"
106
+            >详情
107
+            </el-button>
108
+          </template>
109
+        </el-table-column>
110
+
93
       </el-table>
111
       </el-table>
94
 
112
 
95
-      <el-pagination
96
-        align="right"
97
-        @size-change="handleSizeChange"
98
-        @current-change="handleCurrentChange"
99
-        :current-page="listQuery.page"
100
-        :page-sizes="[10, 20, 50, 100]"
101
-        :page-size="10"
102
-        background
103
-        style="margin-top:20px;"
104
-        layout="total, sizes, prev, pager, next, jumper"
105
-        :total="total"
106
-      ></el-pagination>
113
+      <!--<el-pagination-->
114
+        <!--align="right"-->
115
+        <!--@size-change="handleSizeChange"-->
116
+        <!--@current-change="handleCurrentChange"-->
117
+        <!--:current-page="query.page"-->
118
+        <!--:page-sizes="[10, 20, 50, 100]"-->
119
+        <!--:page-size="10"-->
120
+        <!--background-->
121
+        <!--style="margin-top:20px;"-->
122
+        <!--layout="total, sizes, prev, pager, next, jumper"-->
123
+        <!--:total="total"-->
124
+      <!--&gt;</el-pagination>-->
107
     </div>
125
     </div>
108
   </div>
126
   </div>
109
 </template>
127
 </template>
110
 
128
 
111
 
129
 
112
 <script>
130
 <script>
113
-import echarts from "echarts";
114
-import LineChart from "../../components/LineChart";
115
-export default {
116
-  components: {
117
-    LineChart
118
-  },
119
-  data() {
120
-    return {
121
-      listQuery: {
122
-        start_time: "",
123
-        end_time: "",
124
-        page: 1,
125
-        limit: 10
126
-      },
127
-      options: [
128
-        {
129
-          value: "选项1",
130
-          label: "黄金糕"
131
-        },
132
-        {
133
-          value: "选项2",
134
-          label: "双皮奶"
135
-        },
136
-        {
137
-          value: "选项3",
138
-          label: "蚵仔煎"
139
-        },
140
-        {
141
-          value: "选项4",
142
-          label: "龙须面"
143
-        },
144
-        {
145
-          value: "选项5",
146
-          label: "北京烤鸭"
147
-        }
148
-      ],
149
-      value: "请选项",
150
-      tableData: [
151
-        {
152
-          date: "2016-05-03",
153
-          name: "王小虎",
154
-          province: "上海",
155
-          city: "普陀区",
156
-          address: "上海市普陀区金沙江路 1518 弄",
157
-          zip: 200333
158
-        },
159
-        {
160
-          date: "2016-05-02",
161
-          name: "王小虎",
162
-          province: "上海",
163
-          city: "普陀区",
164
-          address: "上海市普陀区金沙江路 1518 弄",
165
-          zip: 200333
166
-        },
167
-        {
168
-          date: "2016-05-04",
169
-          name: "王小虎",
170
-          province: "上海",
171
-          city: "普陀区",
172
-          address: "上海市普陀区金沙江路 1518 弄",
173
-          zip: 200333
174
-        },
175
-        {
176
-          date: "2016-05-01",
177
-          name: "王小虎",
178
-          province: "上海",
179
-          city: "普陀区",
180
-          address: "上海市普陀区金沙江路 1518 弄",
181
-          zip: 200333
182
-        },
183
-        {
184
-          date: "2016-05-08",
185
-          name: "王小虎",
186
-          province: "上海",
187
-          city: "普陀区",
188
-          address: "上海市普陀区金沙江路 1518 弄",
189
-          zip: 200333
190
-        },
191
-        {
192
-          date: "2016-05-06",
193
-          name: "王小虎",
194
-          province: "上海",
195
-          city: "普陀区",
196
-          address: "上海市普陀区金沙江路 1518 弄",
197
-          zip: 200333
198
-        },
199
-        {
200
-          date: "2016-05-07",
201
-          name: "王小虎",
202
-          province: "上海",
203
-          city: "普陀区",
204
-          address: "上海市普陀区金沙江路 1518 弄",
205
-          zip: 200333
206
-        },
207
-        {
208
-          date: "2016-05-08",
209
-          name: "王小虎",
210
-          province: "上海",
211
-          city: "普陀区",
212
-          address: "上海市普陀区金沙江路 1518 弄",
213
-          zip: 200333
214
-        },
215
-        {
216
-          date: "2016-05-06",
217
-          name: "王小虎",
218
-          province: "上海",
219
-          city: "普陀区",
220
-          address: "上海市普陀区金沙江路 1518 弄",
221
-          zip: 200333
222
-        },
223
-        {
224
-          date: "2016-05-07",
225
-          name: "王小虎",
226
-          province: "上海",
227
-          city: "普陀区",
228
-          address: "上海市普陀区金沙江路 1518 弄",
229
-          zip: 200333
230
-        }
231
-      ],
232
-      chart: {
233
-        title: {
234
-          text: "ECharts 入门示例"
235
-        },
236
-        tooltip: {},
237
-        legend: {
238
-          data: ["次数"],
239
-          left: 0
131
+  import echarts from 'echarts'
132
+  import LineChart from '../../components/LineChart'
133
+  import {
134
+    GetInspectionIndexChart,
135
+    GetInspectionIndexInit,
136
+    GetInspectionIndexTable,
137
+    GetPatientInspectionIndexBarChart,
138
+    GetPatientInspectionIndexChart,
139
+    GetRangeValue
140
+  } from '@/api/common/statistics'
141
+  import { uParseTime } from '@/utils/tools'
142
+
143
+  export default {
144
+    components: {
145
+      LineChart
146
+    },
147
+    data() {
148
+      return {
149
+        percent:[],
150
+
151
+        pickerOptions: {
152
+          disabledDate(time) {
153
+            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
154
+            return time.getTime() > Date.now() || time.getTime() < threeMonths
155
+
156
+          }
240
         },
157
         },
241
-        xAxis: {
242
-          data: ["达标", "未达标"]
158
+        total:0,
159
+        item_name: '',
160
+        query: {
161
+          patient_id: '',
162
+          start_time: '',
163
+          end_time: '',
164
+          limit: 20,
165
+          page: 1,
166
+          project_id: '',
167
+          item_id: '',
168
+          range_type: '',
169
+          range_value: ''
243
         },
170
         },
244
-        yAxis: {
245
-          axisLabel: {
246
-            formatter: "{value} %"
171
+        project_columns: [],
172
+        item_columns: [],
173
+        range_value_columns: [],
174
+
175
+        all_inspection_reference: [],
176
+
177
+        value: '请选项',
178
+        tableData: [],
179
+        options: {
180
+          title: {
181
+            text: 'ECharts 入门示例'
247
           },
182
           },
248
-          show: false
249
-        },
250
-        series: [
251
-          {
252
-            name: "次数",
253
-            type: "bar",
254
-            data: ["78.57", "50"],
255
-            barWidth: 30,
256
-            label: {
257
-              normal: {
258
-                show: true,
259
-                position: "top",
260
-                formatter: "{c}次"
261
-              }
183
+          tooltip: {},
184
+          legend: {
185
+            data: [''],
186
+            left: 0
187
+          },
188
+          xAxis: {
189
+            data: ['达标', '未达标']
190
+          },
191
+          yAxis: {
192
+            axisLabel: {
193
+              formatter: '{value} %'
262
             },
194
             },
263
-            //配置样式
264
-            itemStyle: {
265
-              //通常情况下:
266
-
267
-              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
268
-              normal: {
269
-                color: function(params) {
270
-                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
271
-                  var colorList = [
272
-                    ["#A9E0F3", "#9FBDFC"],
273
-
274
-                    ["#FFD7C0", "#FF9994"]
275
-                  ];
276
-
277
-                  var index = params.dataIndex;
278
-                  if (params.dataIndex >= colorList.length) {
279
-                    index = params.dataIndex % colorList.length;
195
+            show: false
196
+          },
197
+
198
+          series: [
199
+            {
200
+              name: '',
201
+              type: 'bar',
202
+              data: ['78.57', '50'],
203
+              barWidth: 30,
204
+              label: {
205
+                normal: {
206
+                  show: true,
207
+                  position: 'top',
208
+                  formatter: (params) => {
209
+                    if(this.percent.length > 0){
210
+                      let str = ''
211
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
212
+                      return str
213
+                    }else{
214
+                      let str = ''
215
+                      str = params.data
216
+                      return str
217
+                    }
280
                   }
218
                   }
219
+                }
220
+              },
221
+              //配置样式
222
+              itemStyle: {
223
+                //通常情况下:
224
+
225
+                //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
226
+                normal: {
227
+                  color: function(params) {
228
+                    //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
229
+                    var colorList = ['#A9E0F3', '#9FBDFC']
281
 
230
 
282
-                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
283
-                    { offset: 0, color: colorList[index][0] },
284
-                    // { offset: 0.5, color: colorList[index][1] },
285
-                    { offset: 1, color: colorList[index][1] }
286
-                  ]);
231
+                    // var index = params.dataIndex;
232
+                    // if (params.dataIndex >= colorList.length) {
233
+                    //   index = params.dataIndex % colorList.length;
234
+                    // }
235
+
236
+                    return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
237
+                      { offset: 0, color: colorList[0] },
238
+                      // { offset: 0.5, color: colorList[index][1] },
239
+                      { offset: 1, color: colorList[1] }
240
+                    ])
241
+                  },
242
+                  barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
287
                 },
243
                 },
288
-                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
289
-              },
290
 
244
 
291
-              //鼠标悬停时:
292
-              emphasis: {
293
-                shadowBlur: 10,
294
-                shadowOffsetX: 0,
295
-                shadowColor: "rgba(0, 0, 0, 0.5)"
245
+                //鼠标悬停时:
246
+                emphasis: {
247
+                  shadowBlur: 10,
248
+                  shadowOffsetX: 0,
249
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
250
+                }
296
               }
251
               }
297
             }
252
             }
298
-          }
299
-        ]
253
+          ]
254
+        }
300
       }
255
       }
301
-    };
302
-  },
303
-  methods: {
304
-    changeTime() {},
305
-    changeEndTime(val) {
306
-      var time =
307
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
308
-      if (time < 0) {
309
-        this.$message.error("结束时间不能小于开始时间");
310
-        this.listQuery.end_time = "";
311
-      } else {
256
+    },
257
+    methods: {
258
+      getValue(row) {
259
+        if (this.query.range_type == 1 ) {
260
+          if(row.inspect_value != "") {
261
+            let min_range_value = this.range_value_columns[2]
262
+            let arr = min_range_value.split("~")
263
+            if (parseFloat(row.inspect_value) > arr[1]) {
264
+              return row.inspect_value + "↑"
265
+            } else if (parseFloat(row.inspect_value) < arr[0]) {
266
+              return row.inspect_value + "↓"
267
+            } else {
268
+              return row.inspect_value
269
+            }
270
+          }else{
271
+            return row.inspect_value
272
+          }
273
+
274
+        } else if (this.query.range_type == 2) {
275
+          return row.inspect_value
276
+        }
277
+      },
278
+      getTimestamp(time) {
279
+        // 把时间日期转成时间戳
280
+        return new Date(time).getTime() / 1000;
281
+      },
282
+      jumpDetail(row){
283
+        // this.$router.push("/qcd/indicatorControlAnalysis/bloodPressureDetails?id="+patient_id)
284
+        this.$router.push("/qcd/inspection/detail?project_id="+row.project_id+"&item_id="+row.item_id+"&range_type="+row.inspect_type+"&patient_id="+row.patient.id)
285
+      },
286
+      handleSizeChange(limit) {
287
+        this.query.limit = limit
288
+        this.GetInspectionIndexTable(this.query)
289
+
290
+      },
291
+      handleCurrentChange(page) {
292
+        this.query.page = page
293
+        this.GetInspectionIndexTable(this.query)
294
+
295
+      },
296
+      changeProject(val) {
297
+        this.query.page = 1
298
+        let item_inspection_reference = []
299
+        for (let i = 0; i < this.all_inspection_reference.length; i++) {
300
+          if (this.all_inspection_reference[i].project_id == val) {
301
+            item_inspection_reference.push(this.all_inspection_reference[i])
302
+          }
303
+        }
304
+        this.item_columns = item_inspection_reference
305
+        var projectInfo = this.getPojectInfo(this.item_columns[0].project_id, this.item_columns[0].id)
306
+        console.log("projectInfo",projectInfo)
307
+        this.query.project_id = projectInfo.project_id
308
+        this.query.item_id = projectInfo.id
309
+        this.item_name = projectInfo.item_name
310
+        this.query.range_type = projectInfo.range_type
311
+        this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.id)
312
+
313
+      }, changeItem(val) {
314
+        this.query.page = 1
315
+        this.query.item_id = val
316
+        var projectInfo = this.getPojectInfo(this.query.project_id, val)
317
+        console.log(projectInfo)
318
+        this.item_name = projectInfo.item_name
319
+
320
+        this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.id)
321
+
322
+      }, changeRangeValue(val) {
323
+        this.query.range_value = val
324
+        this.query.page = 1
325
+        this.GetInspectionIndexTable(this.query)
326
+
327
+      },
328
+      GetInspectionIndexInit() {
329
+        GetInspectionIndexInit()
330
+          .then(rs => {
331
+            var resp = rs.data
332
+            if (resp.state == 1) {
333
+              let project = []
334
+              let item = []
335
+              this.all_inspection_reference = resp.data.references
336
+               console.log("====",this.all_inspection_reference)
337
+              for (let i = 0; i < this.all_inspection_reference.length; i++) {
338
+                project.push(this.all_inspection_reference[i])
339
+              }
340
+              var obj = {}
341
+              //去重复
342
+              project = project.reduce((cur, next) => {
343
+                obj[next.project_id] ? '' : (obj[next.project_id] = true && cur.push(next))
344
+                return cur
345
+              }, [])
346
+
347
+              this.project_columns = project
348
+
349
+              for (let i = 0; i < this.all_inspection_reference.length; i++) {
350
+                if (this.all_inspection_reference[i].project_id == this.project_columns[0].project_id) {
351
+                  item.push(this.all_inspection_reference[i])
352
+                }
353
+              }
354
+             console.log("item",item)
355
+              this.item_columns = item
356
+              this.item_name = item[0].item_name
357
+
358
+              var projectInfo = this.getPojectInfo(this.project_columns[0].project_id, this.item_columns[0].id)
359
+              this.query.project_id = projectInfo.project_id
360
+              this.query.item_id = projectInfo.id
361
+              this.query.range_type = projectInfo.range_type
362
+              this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.id)
363
+            } else {
364
+              this.$message.error(resp.msg)
365
+
366
+            }
367
+          })
368
+          .catch(error => {
369
+
370
+          })
371
+
372
+      },
373
+      getPojectInfo(project_id, item_id) {
374
+        for (let i = 0; i < this.all_inspection_reference.length; i++) {
375
+          if (this.all_inspection_reference[i].project_id == project_id && this.all_inspection_reference[i].id == item_id) {
376
+            return this.all_inspection_reference[i]
377
+          }
378
+        }
379
+        return null
380
+      },
381
+      changeTime(val) {
382
+        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
383
+        if (time > 0) {
384
+          this.$message.error('结束时间不能小于开始时间')
385
+        } else {
386
+          // this.getDialysisList()
387
+          this.query.page = 1
388
+          this.GetInspectionIndexChart(this.query)
389
+          this.GetInspectionIndexTable(this.query)
390
+
391
+        }
392
+
393
+      },
394
+      changeEndTime(val) {
395
+        var time =
396
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
397
+        if (time < 0) {
398
+          this.$message.error('结束时间不能小于开始时间')
399
+        } else {
400
+          this.query.page = 1
401
+          this.GetInspectionIndexChart(this.query)
402
+          this.GetInspectionIndexTable(this.query)
403
+
404
+        }
405
+      },
406
+      handleClick(row) {
407
+        console.log(row)
408
+        this.$router.push({ path: '/qcd/analysisDetails' })
409
+      },
410
+      GetRangeValue(range_type, project_id, id) {
411
+        let params = {
412
+          range_type: range_type,
413
+          project_id: project_id,
414
+          item_id: id
415
+        }
416
+        GetRangeValue(params)
417
+          .then(rs => {
418
+              var resp = rs.data
419
+              if (resp.state == 1) {
420
+                if (range_type == 1) {
421
+                  this.range_value_columns = []
422
+                  this.range_value_columns.push('全部')
423
+                  this.range_value_columns.push('小于' + resp.data.range_vaule[0])
424
+                  this.range_value_columns.push(resp.data.range_vaule[0] + '~' + resp.data.range_vaule[1])
425
+                  this.range_value_columns.push('大于' + resp.data.range_vaule[1])
426
+                  this.query.range_value = '全部'
427
+
428
+                } else {
429
+                  this.range_value_columns = []
430
+                  this.range_value_columns.push('全部')
431
+                  for (let i = 0; i < resp.data.range_vaule.length; i++) {
432
+                    this.range_value_columns.push(resp.data.range_vaule[i])
433
+                  }
434
+                  this.query.range_value = '全部'
435
+                }
436
+                this.GetInspectionIndexChart(this.query)
437
+                this.GetInspectionIndexTable(this.query)
438
+              } else {
439
+                this.$message.error(resp.msg)
440
+
441
+              }
442
+            }
443
+          )
444
+          .catch(error => {
445
+
446
+          })
447
+      },
448
+      GetInspectionIndexChart(params) {
449
+        this.options.xAxis.data = []
450
+        this.options.series[0].data = []
451
+        this.percent = []
452
+        GetInspectionIndexChart(params)
453
+          .then(rs => {
454
+            var resp = rs.data
455
+            if (resp.state == 1) {
456
+              for (let i = 0; i < resp.data.data.length; i++) {
457
+                this.options.xAxis.data.push(resp.data.data[i].name)
458
+                this.options.series[0].data.push(resp.data.data[i].total)
459
+                this.percent.push(resp.data.data[i].ratio)
460
+              }
461
+            } else {
462
+              this.$message.error(resp.msg)
463
+            }
464
+          })
465
+          .catch(error => {
466
+
467
+          })
468
+      },
469
+      GetInspectionIndexTable(params) {
470
+        GetInspectionIndexTable(params)
471
+          .then(rs => {
472
+            var resp = rs.data
473
+            console.log("resp",resp)
474
+            if (resp.state == 1) {
475
+              this.tableData = []
476
+              for (let i = 0; i < resp.data.data.length; i++) {
477
+                this.tableData.push(resp.data.data[i])
478
+              }
479
+              this.total = resp.data.total
480
+
481
+            } else {
482
+              this.$toast({
483
+                message: resp.msg
484
+              })
485
+            }
486
+          })
487
+          .catch(error => {
488
+
489
+          })
490
+
312
       }
491
       }
313
     },
492
     },
314
-    handleClick(row) {
315
-      console.log(row);
316
-      this.$router.push({ path: "/qcd/analysisDetails" });
493
+    created() {
494
+      this.tableHeight = (document.documentElement.clientHeight - 44) + 'px'
495
+      var date = new Date()
496
+      var year = date.getFullYear() //获取完整的年份(4位)
497
+      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
498
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
499
+      var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
500
+      this.query.end_time = year + '-' + month + '-' + day
501
+      this.query.start_time = year + '-' + last_month + '-' + day
502
+      this.GetInspectionIndexInit()
503
+      // this.GetDialysisBloodPressureTableData(this.query)
504
+
317
     }
505
     }
506
+
318
   }
507
   }
319
-};
508
+
320
 </script>
509
 </script>
321
 
510
 
322
 
511
 
323
 <style lang="scss" scoped>
512
 <style lang="scss" scoped>
324
-.tableTitle {
325
-  font-size: 16px;
326
-  color: #000;
327
-  font-weight: bold;
328
-  margin-bottom: 10px;
329
-}
513
+  .tableTitle {
514
+    font-size: 16px;
515
+    color: #000;
516
+    font-weight: bold;
517
+    margin-bottom: 10px;
518
+  }
330
 </style>
519
 </style>
331
 <style lang="scss">
520
 <style lang="scss">
332
-.page_office {
521
+  .page_office {
522
+
333
   .cell {
523
   .cell {
334
     text-align: center;
524
     text-align: center;
335
   }
525
   }
336
-}
526
+
527
+  }
337
 </style>
528
 </style>

+ 561 - 268
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue View File

1
 <template>
1
 <template>
2
   <div class="page_personal">
2
   <div class="page_personal">
3
     <div class="cell clearfix">
3
     <div class="cell clearfix">
4
-      <el-form :inline="true" :model="listQuery">
4
+      <el-form :inline="true">
5
         <el-form-item label>
5
         <el-form-item label>
6
-          <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:110px"></el-input>
7
-          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
6
+          <el-autocomplete
7
+            class="checkSearch"
8
+            popper-class="my-autocomplete"
9
+            v-model="search_value"
10
+            :fetch-suggestions="querySearchAsync"
11
+            :trigger-on-focus="false"
12
+            placeholder="请输入病人名字"
13
+            @select="handleSelect"
14
+          >
15
+            <i class="el-icon-search el-input__icon" slot="suffix"></i>
16
+            <template slot-scope="{ item }">
17
+              <div class="name">{{ item.name }}</div>
18
+            </template>
19
+          </el-autocomplete>
20
+
8
         </el-form-item>
21
         </el-form-item>
9
       </el-form>
22
       </el-form>
10
-      <el-select v-model="value" placeholder="请选择" style="width:110px;margin-right:10px">
11
-        <el-option
12
-          v-for="item in options"
13
-          :key="item.value"
14
-          :label="item.label"
15
-          :value="item.value"
16
-        ></el-option>
17
-      </el-select>
18
-      <el-select
19
-        v-model="value"
20
-        placeholder="请选择"
21
-        @change="chooseType"
22
-        style="width:110px;margin-right:10px"
23
-      >
24
-        <el-option
25
-          v-for="item in options"
26
-          :key="item.value"
27
-          :label="item.label"
28
-          :value="item.value"
29
-        ></el-option>
30
-      </el-select>
31
-      <el-select v-model="value" placeholder="请选择" style="width:110px;margin-right:10px">
23
+      <el-select v-model="query.project_id" placeholder="请选择" style="width:120px;margin-right:20px"
24
+                 @change="changeProject">
32
         <el-option
25
         <el-option
33
-          v-for="item in options"
34
-          :key="item.value"
35
-          :label="item.label"
36
-          :value="item.value"
26
+          v-for="item in project_columns"
27
+          :key="item.project_id"
28
+          :label="item.project_name"
29
+          :value="item.project_id"
37
         ></el-option>
30
         ></el-option>
38
       </el-select>
31
       </el-select>
32
+
39
       <el-select
33
       <el-select
40
-        v-model="value"
34
+        v-model="query.item_id"
41
         placeholder="请选择"
35
         placeholder="请选择"
42
-        @change="chooseType"
43
-        style="width:110px;margin-right:10px"
36
+        style="width:120px;margin-right:20px"
37
+        @change="changeItem"
44
       >
38
       >
45
         <el-option
39
         <el-option
46
-          v-for="item in options"
47
-          :key="item.value"
48
-          :label="item.label"
49
-          :value="item.value"
40
+          v-for="item in item_columns"
41
+          :key="item.id"
42
+          :label="item.item_name"
43
+          :value="item.id"
50
         ></el-option>
44
         ></el-option>
51
       </el-select>
45
       </el-select>
46
+
47
+      <!--<el-select v-model="query.range_value" placeholder="请选择" style="width:120px;margin-right:20px"-->
48
+                 <!--@change="changeRangeValue">-->
49
+        <!--<el-option-->
50
+          <!--v-for="item in range_value_columns"-->
51
+          <!--:key="item"-->
52
+          <!--:label="item"-->
53
+          <!--:value="item"-->
54
+        <!--&gt;</el-option>-->
55
+      <!--</el-select>-->
56
+
52
       <label class="title">
57
       <label class="title">
53
         <span class="name">日期查询</span> :
58
         <span class="name">日期查询</span> :
54
       </label>
59
       </label>
55
       <el-date-picker
60
       <el-date-picker
56
-        v-model="listQuery.start_time"
61
+        v-model="query.start_time"
57
         prefix-icon="el-icon-date"
62
         prefix-icon="el-icon-date"
58
         @change="changeTime"
63
         @change="changeTime"
59
         :editable="false"
64
         :editable="false"
60
         style="width: 150px;"
65
         style="width: 150px;"
61
         type="date"
66
         type="date"
67
+        :picker-options="pickerOptions"
62
         placeholder="选择日期时间"
68
         placeholder="选择日期时间"
63
         align="right"
69
         align="right"
64
         format="yyyy-MM-dd"
70
         format="yyyy-MM-dd"
66
       ></el-date-picker>
72
       ></el-date-picker>
67
       <span class>-</span>
73
       <span class>-</span>
68
       <el-date-picker
74
       <el-date-picker
69
-        v-model="listQuery.end_time"
75
+        v-model="query.end_time"
70
         prefix-icon="el-icon-date"
76
         prefix-icon="el-icon-date"
71
         @change="changeEndTime"
77
         @change="changeEndTime"
72
         :editable="false"
78
         :editable="false"
79
+        :picker-options="pickerOptions"
73
         style="width: 150px;"
80
         style="width: 150px;"
74
         type="date"
81
         type="date"
75
         placeholder="选择日期时间"
82
         placeholder="选择日期时间"
81
     <el-container>
88
     <el-container>
82
       <div style="width:150px">
89
       <div style="width:150px">
83
         <div class="tableTitle">患者列表</div>
90
         <div class="tableTitle">患者列表</div>
84
-        <el-table :data="tableData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
85
-          <el-table-column prop="date" label="日期" width="70"></el-table-column>
86
-          <el-table-column prop="name" label="姓名" width="80"></el-table-column>
91
+        <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
92
+                  :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
93
+                  highlight-current-row
94
+                  @current-change="handleChange">
95
+          <el-table-column prop="dialysis_no" label="透析号" width="80">
96
+            <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
97
+          </el-table-column>
98
+          <el-table-column prop="name" label="姓名" width="80">
99
+            <template slot-scope="scope">{{ scope.row.name }}</template>
100
+          </el-table-column>
87
         </el-table>
101
         </el-table>
88
       </div>
102
       </div>
89
       <div style="padding-left:10px;flex:1">
103
       <div style="padding-left:10px;flex:1">
90
         <div class="tableTitle">统计图</div>
104
         <div class="tableTitle">统计图</div>
91
         <div>
105
         <div>
92
-          <line-chart :options="chart"></line-chart>
106
+          <line-chart :options="options"></line-chart>
93
         </div>
107
         </div>
94
         <div class="tableTitle">指标趋势</div>
108
         <div class="tableTitle">指标趋势</div>
95
         <div>
109
         <div>
96
           <div>
110
           <div>
97
-            <line-chart :options="chart1"></line-chart>
111
+            <line-chart :options="options2"></line-chart>
98
           </div>
112
           </div>
99
         </div>
113
         </div>
100
         <div></div>
114
         <div></div>
105
 
119
 
106
 
120
 
107
 <script>
121
 <script>
108
-import echarts from "echarts";
109
-import LineChart from "../../components/LineChart";
110
-export default {
111
-  components: {
112
-    LineChart
113
-  },
114
-  data() {
115
-    return {
116
-      listQuery: {
117
-        start_time: "",
118
-        end_time: "",
119
-        page: 1,
120
-        limit: 10
121
-      },
122
-      options: [
123
-        {
124
-          value: "选项1",
125
-          label: "黄金糕"
126
-        },
127
-        {
128
-          value: "选项2",
129
-          label: "双皮奶"
130
-        },
131
-        {
132
-          value: "选项3",
133
-          label: "蚵仔煎"
134
-        },
135
-        {
136
-          value: "选项4",
137
-          label: "龙须面"
138
-        },
139
-        {
140
-          value: "选项5",
141
-          label: "北京烤鸭"
142
-        }
143
-      ],
144
-      value: "请选项",
145
-      tableData: [
146
-        {
147
-          date: "2016",
148
-          name: "王小虎"
149
-        },
150
-        {
151
-          date: "2016",
152
-          name: "王小虎"
153
-        },
154
-        {
155
-          date: "2016",
156
-          name: "王小虎"
157
-        },
158
-        {
159
-          date: "2016",
160
-          name: "王小虎"
161
-        },
162
-        {
163
-          date: "2016",
164
-          name: "王小虎"
165
-        },
166
-        {
167
-          date: "2016",
168
-          name: "王小虎"
169
-        },
170
-        {
171
-          date: "2016",
172
-          name: "王小虎"
173
-        },
174
-        {
175
-          date: "2016",
176
-          name: "王小虎"
177
-        },
178
-        {
179
-          date: "2016",
180
-          name: "王小虎"
181
-        },
182
-        {
183
-          date: "2016",
184
-          name: "王小虎"
185
-        },
186
-        {
187
-          date: "2016",
188
-          name: "王小虎"
189
-        },
190
-        {
191
-          date: "2016",
192
-          name: "王小虎"
193
-        }
194
-      ],
195
-      chart: {
196
-        title: {
197
-          text: "ECharts 入门示例"
198
-        },
199
-        tooltip: {},
200
-        legend: {
201
-          data: ["次数"],
202
-          left: 0
122
+  import echarts from 'echarts'
123
+  import LineChart from '../../components/LineChart'
124
+  import {
125
+    GetInspectionIndexChart,
126
+    GetInspectionIndexInit,
127
+    GetInspectionIndexTable,
128
+    GetPatientInspectionIndexBarChart,
129
+    GetPatientInspectionIndexChart,
130
+    GetRangeValue,
131
+    GetDefalutPatient
132
+  } from '@/api/common/statistics'
133
+  import { uParseTime } from '@/utils/tools'
134
+  import { getCurrentOrgPatients } from '@/api/common/common'
135
+
136
+  import { PostSearch } from '@/api/patient'
137
+
138
+  export default {
139
+    components: {
140
+      LineChart
141
+    },
142
+    data() {
143
+      return {
144
+        percent:[],
145
+
146
+        pickerOptions: {
147
+          disabledDate(time) {
148
+            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
149
+            return time.getTime() > Date.now() || time.getTime() < threeMonths
150
+
151
+          }
203
         },
152
         },
204
-        xAxis: {
205
-          data: ["达标", "未达标"]
153
+        item_name: '',
154
+        search_value: '',
155
+        query: {
156
+          patient_id: '',
157
+          start_time: '',
158
+          end_time: '',
159
+          limit: 20,
160
+          page: 1,
161
+          project_id: '',
162
+          item_id: '',
163
+          range_type: '',
164
+          range_value: ''
206
         },
165
         },
207
-        yAxis: {
208
-          axisLabel: {
209
-            formatter: "{value} %"
166
+        project_columns: [],
167
+        item_columns: [],
168
+        range_value_columns: [],
169
+
170
+        all_inspection_reference: [],
171
+        patientsData: [],
172
+        value: '请选项',
173
+        tableData: [],
174
+        options: {
175
+          title: {
176
+            text: 'ECharts 入门示例'
210
           },
177
           },
211
-          show: false
212
-        },
213
-        series: [
214
-          {
215
-            name: "次数",
216
-            type: "bar",
217
-            data: ["78.57", "50"],
218
-            barWidth: 30,
219
-            label: {
220
-              normal: {
221
-                show: true,
222
-                position: "top",
223
-                formatter: "{c}次"
224
-              }
178
+          tooltip: {},
179
+          legend: {
180
+            data: [''],
181
+            left: 0
182
+          },
183
+          xAxis: {
184
+            data: []
185
+          },
186
+          yAxis: {
187
+            axisLabel: {
188
+              formatter: '{value} %'
225
             },
189
             },
226
-            //配置样式
227
-            itemStyle: {
228
-              //通常情况下:
229
-
230
-              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
231
-              normal: {
232
-                color: function(params) {
233
-                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
234
-                  var colorList = [
235
-                    ["#A9E0F3", "#9FBDFC"],
236
-
237
-                    ["#FFD7C0", "#FF9994"]
238
-                  ];
239
-
240
-                  var index = params.dataIndex;
241
-                  if (params.dataIndex >= colorList.length) {
242
-                    index = params.dataIndex % colorList.length;
190
+            show: false
191
+          },
192
+          series: [
193
+            {
194
+              name: '',
195
+              type: 'bar',
196
+              data: [],
197
+              barWidth: 30,
198
+              label: {
199
+                normal: {
200
+                  show: true,
201
+                  position: 'top',
202
+                  formatter: (params) => {
203
+                    if(this.percent.length > 0){
204
+                      let str = ''
205
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
206
+                      return str
207
+                    }else{
208
+                      let str = ''
209
+                      str = params.data
210
+                      return str
211
+                    }
243
                   }
212
                   }
213
+                }
214
+              },
215
+              //配置样式
216
+              itemStyle: {
217
+                //通常情况下:
218
+
219
+                //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
220
+                normal: {
221
+                  color: function(params) {
222
+                    //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
223
+                    var colorList = [
224
+                      ['#A9E0F3', '#9FBDFC'],
225
+
226
+                      ['#FFD7C0', '#FF9994']
227
+                    ]
244
 
228
 
245
-                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
246
-                    { offset: 0, color: colorList[index][0] },
247
-                    // { offset: 0.5, color: colorList[index][1] },
248
-                    { offset: 1, color: colorList[index][1] }
249
-                  ]);
229
+                    var index = params.dataIndex
230
+                    if (params.dataIndex >= colorList.length) {
231
+                      index = params.dataIndex % colorList.length
232
+                    }
233
+
234
+                    return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
235
+                      { offset: 0, color: colorList[index][0] },
236
+                      // { offset: 0.5, color: colorList[index][1] },
237
+                      { offset: 1, color: colorList[index][1] }
238
+                    ])
239
+                  },
240
+                  barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
250
                 },
241
                 },
251
-                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
252
-              },
253
 
242
 
254
-              //鼠标悬停时:
255
-              emphasis: {
256
-                shadowBlur: 10,
257
-                shadowOffsetX: 0,
258
-                shadowColor: "rgba(0, 0, 0, 0.5)"
243
+                //鼠标悬停时:
244
+                emphasis: {
245
+                  shadowBlur: 10,
246
+                  shadowOffsetX: 0,
247
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
248
+                }
259
               }
249
               }
260
             }
250
             }
261
-          }
262
-        ]
263
-      },
264
-      chart1: {
265
-        title: {
266
-          text: "ECharts 入门示例"
267
-        },
268
-        tooltip: {},
269
-        legend: {
270
-          data: ["次数"],
271
-          left: 0
251
+          ]
272
         },
252
         },
273
-        xAxis: {
274
-          data: ["达标", "未达标"]
275
-        },
276
-        yAxis: {
277
-          axisLabel: {
278
-            formatter: "{value} %"
253
+        options2: {
254
+          title: {
255
+            text: 'ECharts 入门示例'
279
           },
256
           },
280
-          show: false
281
-        },
282
-        series: [
283
-          {
284
-            name: "次数",
285
-            type: "line",
286
-            data: ["78.57", "50"],
287
-            barWidth: 30,
288
-            label: {
289
-              normal: {
290
-                show: true,
291
-                position: "top",
292
-                formatter: "{c}次"
257
+          tooltip: {},
258
+          legend: {
259
+            data: ['次数'],
260
+            left: 0
261
+          },
262
+          xAxis: {
263
+            data: [],
264
+            axisLine: {
265
+              lineStyle: {
266
+                color: '#FF0000',
267
+                width: 8 //这里是为了突出显示加上的
293
               }
268
               }
294
             },
269
             },
295
-            //配置样式
296
-            itemStyle: {
297
-              //通常情况下:
298
-
299
-              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
300
-              normal: {
301
-                color: function(params) {
302
-                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
303
-                  var colorList = [
304
-                    ["#A9E0F3", "#9FBDFC"],
305
-
306
-                    ["#FFD7C0", "#FF9994"]
307
-                  ];
308
-
309
-                  var index = params.dataIndex;
310
-                  if (params.dataIndex >= colorList.length) {
311
-                    index = params.dataIndex % colorList.length;
270
+            axisLabel: {
271
+              interval: 0,
272
+              formatter: function(value) {
273
+                var ret = '' //拼接加\n返回的类目项
274
+                var maxLength = 8 //每项显示文字个数
275
+                var valLength = value.length //X轴类目项的文字个数
276
+                var rowN = Math.ceil(valLength / maxLength) //类目项需要换行的行数
277
+                if (rowN > 1) {
278
+                  //如果类目项的文字大于3,
279
+                  for (var i = 0; i < rowN; i++) {
280
+                    var temp = '' //每次截取的字符串
281
+                    var start = i * maxLength //开始截取的位置
282
+                    var end = start + maxLength //结束截取的位置
283
+                    //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
284
+                    temp = value.substring(start, end) + '\n'
285
+                    ret += temp //凭借最终的字符串
312
                   }
286
                   }
287
+                  return ret
288
+                } else {
289
+                  return value
290
+                }
291
+              }
292
+            }
293
+          },
294
+          yAxis: {
295
+            axisLabel: {
296
+              formatter: '{value} %'
297
+            },
298
+            show: false,
299
+            axisLine: {
300
+              lineStyle: {
301
+                color: '#00FF00',
302
+                width: 8 //这里是为了突出显示加上的
303
+              }
304
+            }
305
+          },
306
+          series: [
307
+            {
308
+              name: '',
309
+              type: 'line',
310
+              data: [],
311
+              barWidth: 30,
312
+              label: {
313
+                normal: {
314
+                  show: true,
315
+                  position: 'top',
316
+                  formatter: '{c}'
317
+                }
318
+              },
319
+              //配置样式
320
+              itemStyle: {
321
+                //通常情况下:
313
 
322
 
314
-                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
315
-                    { offset: 0, color: colorList[index][0] },
316
-                    // { offset: 0.5, color: colorList[index][1] },
317
-                    { offset: 1, color: colorList[index][1] }
318
-                  ]);
323
+                //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
324
+                normal: {
325
+                  color: function(params) {
326
+                    //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
327
+                    var colorList = [
328
+                      ['#A9E0F3', '#9FBDFC'],
329
+
330
+                      ['#FFD7C0', '#FF9994']
331
+                    ]
332
+
333
+                    var index = params.dataIndex
334
+                    if (params.dataIndex >= colorList.length) {
335
+                      index = params.dataIndex % colorList.length
336
+                    }
337
+
338
+                    return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
339
+                      { offset: 0, color: colorList[index][0] },
340
+                      // { offset: 0.5, color: colorList[index][1] },
341
+                      { offset: 1, color: colorList[index][1] }
342
+                    ])
343
+                  },
344
+                  barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
319
                 },
345
                 },
320
-                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
321
-              },
322
 
346
 
323
-              //鼠标悬停时:
324
-              emphasis: {
325
-                shadowBlur: 10,
326
-                shadowOffsetX: 0,
327
-                shadowColor: "rgba(0, 0, 0, 0.5)"
347
+                //鼠标悬停时:
348
+                emphasis: {
349
+                  shadowBlur: 10,
350
+                  shadowOffsetX: 0,
351
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
352
+                }
328
               }
353
               }
329
             }
354
             }
330
-          }
331
-        ]
332
-      }
333
-    };
334
-  },
335
-  methods: {
336
-    changeTime() {},
337
-    changeEndTime(val) {
338
-      var time =
339
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
340
-      if (time < 0) {
341
-        this.$message.error("结束时间不能小于开始时间");
342
-        this.listQuery.end_time = "";
343
-      } else {
355
+          ]
356
+        }
357
+
344
       }
358
       }
359
+    },
360
+    methods: {
361
+      handleChange(val){
362
+        this.query.patient_id = val.id
363
+        this.query.page = 1
364
+        this.GetPatientInspectionIndexBarChart(this.query)
365
+        this.GetPatientInspectionIndexChart(this.query)
366
+      },
367
+      handleSelect(val) {
368
+        this.query.patient_id = val.id
369
+        this.query.page = 1
370
+        this.GetPatientInspectionIndexBarChart(this.query)
371
+        this.GetPatientInspectionIndexChart(this.query)
372
+
373
+        for (let i = 0; i< this.patientsData.length; i++){
374
+          if(this.patientsData[i].id == val.id){
375
+            this.$refs.table.setCurrentRow(this.patientsData[i])
376
+          }
377
+        }
378
+
379
+      },
380
+      querySearchAsync(keyword, cb) {
381
+        let key = ''
382
+        if (keyword != undefined) {
383
+          key = keyword
384
+        }
385
+        let searchArray = []
386
+        PostSearch(key).then(response => {
387
+          if (response.data.state == 1) {
388
+            searchArray = response.data.data.patient
389
+            cb(searchArray)
390
+          } else {
391
+            cb([])
392
+          }
393
+        })
394
+      },
395
+
396
+      getCurrentOrgPatients() {
397
+        getCurrentOrgPatients().then(response => {
398
+          if (response.data.state == 1) {
399
+            var patients = response.data.data.patients
400
+            this.patientsData = patients
401
+
402
+            GetDefalutPatient()
403
+              .then(rs => {
404
+                var resp = rs.data
405
+                if (resp.state == 1) {
406
+                  this.query.patient_id =resp.data.patient.id
407
+                  this.patient_name  = resp.data.patient.name
408
+
409
+                  for (let i = 0; i< this.patientsData.length; i++){
410
+                    if(this.patientsData[i].id == resp.data.patient.id){
411
+                      this.$refs.table.setCurrentRow(this.patientsData[i])
412
+                    }
413
+                  }
414
+
415
+
416
+                  this.GetInspectionIndexInit()
417
+                } else {
418
+
419
+                }
420
+              })
421
+              .catch(error => {
422
+
423
+              })
424
+
425
+          }
426
+        })
427
+      },
428
+      changeProject(val) {
429
+        this.query.page = 1
430
+        let item_inspection_reference = []
431
+        for (let i = 0; i < this.all_inspection_reference.length; i++) {
432
+          if (this.all_inspection_reference[i].project_id == val) {
433
+            item_inspection_reference.push(this.all_inspection_reference[i])
434
+          }
435
+        }
436
+        this.item_columns = item_inspection_reference
437
+        var projectInfo = this.getPojectInfo(this.item_columns[0].project_id, this.item_columns[0].id)
438
+        this.query.project_id = projectInfo.project_id
439
+        this.query.item_id = projectInfo.id
440
+        this.item_name = projectInfo.item_name
441
+        this.query.range_type = projectInfo.range_type
442
+        this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.id)
443
+
444
+      }, changeItem(val) {
445
+        this.query.page = 1
446
+        this.query.item_id = val
447
+        var projectInfo = this.getPojectInfo(this.query.project_id, val)
448
+        this.item_name = projectInfo.item_name
449
+        this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.id)
450
+
451
+      }, changeRangeValue(val) {
452
+        this.query.range_value = val
453
+        this.query.page = 1
454
+        // this.GetInspectionIndexTable(this.query)
455
+
456
+
457
+
458
+      }, GetInspectionIndexInit() {
459
+        GetInspectionIndexInit()
460
+          .then(rs => {
461
+            var resp = rs.data
462
+            if (resp.state == 1) {
463
+              let project = []
464
+              let item = []
465
+              this.all_inspection_reference = resp.data.references
466
+
467
+              for (let i = 0; i < this.all_inspection_reference.length; i++) {
468
+                project.push(this.all_inspection_reference[i])
469
+              }
470
+              var obj = {}
471
+              //去重复
472
+              project = project.reduce((cur, next) => {
473
+                obj[next.project_id] ? '' : (obj[next.project_id] = true && cur.push(next))
474
+                return cur
475
+              }, [])
476
+
477
+              this.project_columns = project
478
+
479
+              for (let i = 0; i < this.all_inspection_reference.length; i++) {
480
+                if (this.all_inspection_reference[i].project_id == this.project_columns[0].project_id) {
481
+                  item.push(this.all_inspection_reference[i])
482
+                }
483
+              }
484
+              this.item_columns = item
485
+              this.item_name = item[0].item_name
486
+
487
+              var projectInfo = this.getPojectInfo(this.project_columns[0].project_id, this.item_columns[0].id)
488
+              this.query.project_id = projectInfo.project_id
489
+              this.query.item_id = projectInfo.id
490
+              this.query.range_type = projectInfo.range_type
491
+              this.GetRangeValue(projectInfo.range_type, projectInfo.project_id, projectInfo.id)
492
+            } else {
493
+              this.$message.error(resp.msg)
494
+
495
+            }
496
+          })
497
+          .catch(error => {
498
+
499
+          })
500
+
501
+      },
502
+      getPojectInfo(project_id, item_id) {
503
+        for (let i = 0; i < this.all_inspection_reference.length; i++) {
504
+          if (this.all_inspection_reference[i].project_id == project_id && this.all_inspection_reference[i].id == item_id) {
505
+            return this.all_inspection_reference[i]
506
+          }
507
+        }
508
+        return null
509
+      }, changeTime(val) {
510
+        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
511
+        if (time > 0) {
512
+          this.$message.error('结束时间不能小于开始时间')
513
+        } else {
514
+          // this.getDialysisList()
515
+          this.query.page = 1
516
+          this.GetInspectionIndexChart(this.query)
517
+          this.GetInspectionIndexTable(this.query)
518
+
519
+        }
520
+
521
+      },
522
+      changeEndTime(val) {
523
+        var time =
524
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
525
+        if (time < 0) {
526
+          this.$message.error('结束时间不能小于开始时间')
527
+        } else {
528
+          this.query.page = 1
529
+          this.GetInspectionIndexChart(this.query)
530
+          this.GetInspectionIndexTable(this.query)
531
+
532
+        }
533
+      }, GetRangeValue(range_type, project_id, id) {
534
+        let params = {
535
+          range_type: range_type,
536
+          project_id: project_id,
537
+          item_id: id
538
+        }
539
+        GetRangeValue(params)
540
+          .then(rs => {
541
+              var resp = rs.data
542
+              if (resp.state == 1) {
543
+                if (range_type == 1) {
544
+                  this.range_value_columns = []
545
+                  this.range_value_columns.push('全部')
546
+                  this.range_value_columns.push('小于' + resp.data.range_vaule[0])
547
+                  this.range_value_columns.push(resp.data.range_vaule[0] + '~' + resp.data.range_vaule[1])
548
+                  this.range_value_columns.push('大于' + resp.data.range_vaule[1])
549
+                  this.query.range_value = '全部'
550
+
551
+                } else {
552
+                  this.range_value_columns = []
553
+                  this.range_value_columns.push('全部')
554
+                  for (let i = 0; i < resp.data.range_vaule.length; i++) {
555
+                    this.range_value_columns.push(resp.data.range_vaule[i])
556
+                  }
557
+                  this.query.range_value = '全部'
558
+                }
559
+
560
+                this.GetPatientInspectionIndexBarChart(this.query)
561
+                this.GetPatientInspectionIndexChart(this.query)
562
+
563
+              } else {
564
+                this.$message.error(resp.msg)
565
+
566
+              }
567
+            }
568
+          )
569
+          .catch(error => {
570
+
571
+          })
572
+      },
573
+      GetPatientInspectionIndexBarChart(params) {
574
+        this.options.xAxis.data = []
575
+        this.options.series[0].data = []
576
+        GetPatientInspectionIndexBarChart(params)
577
+          .then(rs => {
578
+            var resp = rs.data
579
+            if (resp.state == 1) {
580
+              for (let i = 0; i < resp.data.data.length; i++) {
581
+                this.options.xAxis.data.push(resp.data.data[i].name)
582
+                this.options.series[0].data.push(resp.data.data[i].total)
583
+                this.percent.push(resp.data.data[i].ratio)
584
+
585
+              }
586
+
587
+            } else {
588
+              this.$toast({
589
+                message: resp.msg
590
+              })
591
+            }
592
+          })
593
+          .catch(error => {
594
+
595
+          })
596
+
597
+      },
598
+      GetPatientInspectionIndexChart(params) {
599
+        this.options2.xAxis.data = []
600
+        this.options2.series[0].data = []
601
+        GetPatientInspectionIndexChart(params)
602
+          .then(rs => {
603
+            var resp = rs.data
604
+            if (resp.state == 1) {
605
+              for (let i = 0; i < resp.data.data.length; i++) {
606
+                this.options2.xAxis.data.push(resp.data.data[i].date)
607
+                this.options2.series[0].data.push(resp.data.data[i].value)
608
+              }
609
+
610
+            } else {
611
+
612
+            }
613
+          })
614
+          .catch(error => {
615
+
616
+          })
617
+
618
+      },   getTimestamp(time) {
619
+        // 把时间日期转成时间戳
620
+        return new Date(time).getTime() / 1000;
621
+      },
622
+
623
+    }, created() {
624
+      var date = new Date()
625
+      var year = date.getFullYear() //获取完整的年份(4位)
626
+      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
627
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
628
+      var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
629
+      this.query.end_time = year + '-' + month + '-' + day
630
+      this.query.start_time = year + '-' + last_month + '-' + day
631
+
632
+
633
+      this.getCurrentOrgPatients()
634
+
345
     }
635
     }
346
   }
636
   }
347
-};
348
 </script>
637
 </script>
349
 
638
 
350
 
639
 
351
 <style lang="scss" scoped>
640
 <style lang="scss" scoped>
352
-.tableTitle {
353
-  font-size: 16px;
354
-  color: #000;
355
-  font-weight: bold;
356
-  margin-bottom: 10px;
357
-}
641
+  .tableTitle {
642
+    font-size: 16px;
643
+    color: #000;
644
+    font-weight: bold;
645
+    margin-bottom: 10px;
646
+  }
358
 </style>
647
 </style>
359
 <style lang="scss">
648
 <style lang="scss">
360
-.page_personal {
649
+  .page_personal {
650
+
361
   .cell {
651
   .cell {
362
     text-align: center;
652
     text-align: center;
363
   }
653
   }
654
+
364
   .el-button--medium {
655
   .el-button--medium {
365
     padding: 10px 8px;
656
     padding: 10px 8px;
366
   }
657
   }
658
+
367
   .el-form-item {
659
   .el-form-item {
368
     margin-bottom: 0;
660
     margin-bottom: 0;
369
   }
661
   }
370
-}
662
+
663
+  }
371
 </style>
664
 </style>

+ 29 - 21
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue View File

69
         <el-container>
69
         <el-container>
70
           <div style="width:150px">
70
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
71
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
72
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
74
                       highlight-current-row
75
                       @current-change="handleChange">
75
                       @current-change="handleChange">
88
             </div>
88
             </div>
89
             <div class="tableTitle">统计表</div>
89
             <div class="tableTitle">统计表</div>
90
             <div>
90
             <div>
91
-              <el-table :data="tableData" style="width: 100%" :height="tableHeight" v-loading="loading">
91
+              <el-table :data="tableData" style="width: 100%"  v-loading="loading">
92
                 <el-table-column fixed label="监测时间" align="center">
92
                 <el-table-column fixed label="监测时间" align="center">
93
                   <template slot-scope="scope">
93
                   <template slot-scope="scope">
94
                     <!--{{getTime(scope.row.operate_time)}}-->
94
                     <!--{{getTime(scope.row.operate_time)}}-->
229
           }
229
           }
230
         },
230
         },
231
         patientsData:[],
231
         patientsData:[],
232
-        tableData: [
233
-        ],
234
         loading: false,
232
         loading: false,
235
         search_value: '',
233
         search_value: '',
236
-        total: '',
234
+        total: 0,
237
         query: {
235
         query: {
238
           patient_id: '',
236
           patient_id: '',
239
           statistics_type: 1,
237
           statistics_type: 1,
257
           { value: 12, name: '超滤量' },
255
           { value: 12, name: '超滤量' },
258
         ],
256
         ],
259
         crumbs: [
257
         crumbs: [
260
-          { path: false, name: '科室质控' },
258
+          { path: false, name: '质控管理' },
261
           { path: false, name: '指标评估统计' },
259
           { path: false, name: '指标评估统计' },
262
           { path: false, name: '透析过程指标统计' }
260
           { path: false, name: '透析过程指标统计' }
263
         ],
261
         ],
418
       },
416
       },
419
       handleSizeChange(limit) {
417
       handleSizeChange(limit) {
420
         this.query.limit = limit;
418
         this.query.limit = limit;
419
+        this.GetDialysisWatchTableData(this.query)
420
+
421
 
421
 
422
       },
422
       },
423
       handleCurrentChange(page) {
423
       handleCurrentChange(page) {
424
         this.query.page = page;
424
         this.query.page = page;
425
+        this.GetDialysisWatchTableData(this.query)
426
+
425
 
427
 
426
       },
428
       },
427
       changeTime(val) {
429
       changeTime(val) {
482
       },
484
       },
483
       getModeName(mode_id){
485
       getModeName(mode_id){
484
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
486
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
485
-      },
486
-      changeTime() {
487
-
488
-      }, changeEndTime() {
489
-
490
-
491
       }, GetDialysisWatchTableData(params) {
487
       }, GetDialysisWatchTableData(params) {
492
         this.loading = true
488
         this.loading = true
493
         this.tableData = []
489
         this.tableData = []
499
               for (let i = 0; i < resp.data.data.length; i++) {
495
               for (let i = 0; i < resp.data.data.length; i++) {
500
                 this.tableData.push(resp.data.data[i])
496
                 this.tableData.push(resp.data.data[i])
501
               }
497
               }
498
+              this.total = resp.data.total
499
+
502
             } else {
500
             } else {
503
               this.loading = false
501
               this.loading = false
504
             }
502
             }
515
           .then(rs => {
513
           .then(rs => {
516
             var resp = rs.data
514
             var resp = rs.data
517
             if (resp.state == 1) {
515
             if (resp.state == 1) {
518
-              if (this.query.statistics_type != 9 && this.query.statistics_type != 10) {
519
                 for (let i = 0; i < resp.data.data.length; i++) {
516
                 for (let i = 0; i < resp.data.data.length; i++) {
520
                   this.chart.xAxis.data.push(resp.data.data[i].date)
517
                   this.chart.xAxis.data.push(resp.data.data[i].date)
521
                   this.chart.series[0].data.push(resp.data.data[i].value)
518
                   this.chart.series[0].data.push(resp.data.data[i].value)
522
                 }
519
                 }
523
-              } else {
524
-                for (let i = 0; i < resp.data.data.length; i++) {
525
-                  this.bar.xAxis.data.push(resp.data.data[i].name)
526
-                  this.bar.series[0].data.push(resp.data.data[i].total)
527
-                }
528
-              }
529
             } else {
520
             } else {
530
             }
521
             }
531
           })
522
           })
537
         this.query.page = 1
528
         this.query.page = 1
538
         this.GetDialysisWatchTableData(this.query)
529
         this.GetDialysisWatchTableData(this.query)
539
         this.GetDialysisWatchChartData(this.query)
530
         this.GetDialysisWatchChartData(this.query)
531
+        for (let i = 0;i < this.patientsData.length; i++){
532
+          if (this.patientsData[i].id == val.id){
533
+            this.$refs.table.setCurrentRow(this.patientsData[i])
534
+          }
535
+        }
540
 
536
 
541
       },
537
       },
542
       querySearchAsync(keyword, cb) {
538
       querySearchAsync(keyword, cb) {
561
           if(response.data.state == 1){
557
           if(response.data.state == 1){
562
             var patients = response.data.data.patients
558
             var patients = response.data.data.patients
563
             this.patientsData = patients
559
             this.patientsData = patients
560
+            this.GetDefaultPatient()
564
           }
561
           }
565
         })
562
         })
566
-      },
563
+      }, GetDefaultPatient() {
564
+        GetDefalutPatient().then(response => {
565
+          if (response.data.state == 1) {
566
+            var patient = response.data.data.patient
567
+            for (let i = 0;i < this.patientsData.length; i++){
568
+              if (this.patientsData[i].id == patient.id){
569
+                this.$refs.table.setCurrentRow(this.patientsData[i])
570
+              }
571
+            }
572
+          }
573
+        })
574
+      }
567
     }, created() {
575
     }, created() {
568
       var date = new Date()
576
       var date = new Date()
569
       var year = date.getFullYear() //获取完整的年份(4位)
577
       var year = date.getFullYear() //获取完整的年份(4位)
570
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
578
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
571
-      var day = date.getDate() < 0 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
579
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
572
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
580
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
573
       this.query.patient_id = 0
581
       this.query.patient_id = 0
574
       this.query.end_time = year + '-' + month + '-' + day
582
       this.query.end_time = year + '-' + month + '-' + day

+ 599 - 0
src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue View File

1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+    </div>
6
+    <div class="app-container">
7
+      <div class="cell clearfix">
8
+        <label class="title">
9
+          <span class="name">日期</span> :
10
+        </label>
11
+        <div class="time">
12
+          <ul class>
13
+            <li
14
+              :class="item.state == stateType ? 'active' : ''"
15
+              @click="selectStateType(item.state)"
16
+              v-for="item in month"
17
+              :key="item.value"
18
+            >{{ item.label }}
19
+            </li>
20
+          </ul>
21
+        </div>
22
+        <el-date-picker
23
+          v-if="stateType == 5"
24
+          v-model="query.start_time"
25
+          prefix-icon="el-icon-date"
26
+          @change="changeTime"
27
+          :editable="false"
28
+          style="width: 196px;"
29
+          type="date"
30
+          placeholder="选择日期时间"
31
+          align="right"
32
+          format="yyyy-MM-dd"
33
+          value-format="yyyy-MM-dd"
34
+          :picker-options="pickerOptions"
35
+        ></el-date-picker>
36
+        <span v-if="stateType == 5"
37
+              class>-</span>
38
+        <el-date-picker
39
+          v-if="stateType == 5"
40
+          v-model="query.end_time"
41
+          prefix-icon="el-icon-date"
42
+          @change="changeEndTime"
43
+          :editable="false"
44
+          style="width: 196px;"
45
+          type="date"
46
+          placeholder="选择日期时间"
47
+          align="right"
48
+          format="yyyy-MM-dd"
49
+          value-format="yyyy-MM-dd"
50
+          :picker-options="pickerOptions"
51
+        ></el-date-picker>
52
+      </div>
53
+      <el-container>
54
+        <div style="width:150px">
55
+          <div class="tableTitle">患者列表</div>
56
+          <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
57
+                    :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
58
+                    highlight-current-row
59
+                    @current-change="handleChange">
60
+            <el-table-column prop="dialysis_no" label="透析号" width="80">
61
+              <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
62
+            </el-table-column>
63
+            <el-table-column prop="name" label="姓名" width="80">
64
+              <template slot-scope="scope">{{ scope.row.name }}</template>
65
+            </el-table-column>
66
+          </el-table>
67
+
68
+        </div>
69
+        <div style="padding-left:10px;flex:1">
70
+          <div class="tableTitle">统计图</div>
71
+          <div>
72
+            <!--<line-chart :options="options2"></line-chart>-->
73
+            <line-chart :options="options2"></line-chart>
74
+
75
+          </div>
76
+        </div>
77
+      </el-container>
78
+    </div>
79
+  </div>
80
+</template>
81
+
82
+
83
+<script>
84
+
85
+  const moment = require('moment')
86
+  import echarts from 'echarts'
87
+  import LineChart from '../../qcd/components/LineChart'
88
+  import { uParseTime } from '@/utils/tools'
89
+  import BreadCrumb from '@/xt_pages/components/bread-crumb'
90
+  import { getCurrentOrgPatients } from '@/api/common/common'
91
+  import {
92
+    GetDefalutPatient,
93
+    GetInspectionIndexChart,
94
+    GetInspectionIndexInit,
95
+    GetInspectionIndexTable,
96
+    GetPatientInspectionIndexBarChart,
97
+    GetPatientInspectionIndexChart,
98
+    GetRangeValue
99
+  } from '@/api/common/statistics'
100
+
101
+  export default {
102
+    name: 'dialysisTotal',
103
+    components: {
104
+      LineChart,
105
+      BreadCrumb
106
+    },
107
+    data() {
108
+      return {
109
+        custom_chart_data_color: [],
110
+        options2: {
111
+          title: {
112
+            text: 'ECharts 入门示例'
113
+          },
114
+          tooltip: {},
115
+          legend: {
116
+            data: ['次数'],
117
+            left: 0
118
+          },
119
+          xAxis: {
120
+            data: [],
121
+            axisLine: {
122
+              lineStyle: {
123
+                color: '#FF0000',
124
+                width: 8 //这里是为了突出显示加上的
125
+              }
126
+            },
127
+            axisLabel: {
128
+              interval: 0,
129
+              formatter: function(value) {
130
+                var ret = '' //拼接加\n返回的类目项
131
+                var maxLength = 8 //每项显示文字个数
132
+                var valLength = value.length //X轴类目项的文字个数
133
+                var rowN = Math.ceil(valLength / maxLength) //类目项需要换行的行数
134
+                if (rowN > 1) {
135
+                  //如果类目项的文字大于3,
136
+                  for (var i = 0; i < rowN; i++) {
137
+                    var temp = '' //每次截取的字符串
138
+                    var start = i * maxLength //开始截取的位置
139
+                    var end = start + maxLength //结束截取的位置
140
+                    //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
141
+                    temp = value.substring(start, end) + '\n'
142
+                    ret += temp //凭借最终的字符串
143
+                  }
144
+                  return ret
145
+                } else {
146
+                  return value
147
+                }
148
+              }
149
+            }
150
+          },
151
+          yAxis: {
152
+            axisLabel: {
153
+              formatter: '{value} %'
154
+            },
155
+            show: false,
156
+            axisLine: {
157
+              lineStyle: {
158
+                color: '#00FF00',
159
+                width: 8 //这里是为了突出显示加上的
160
+              }
161
+            }
162
+          },
163
+          series: [
164
+            {
165
+              name: '',
166
+              type: 'line',
167
+              data: [],
168
+              barWidth: 30,
169
+              label: {
170
+                normal: {
171
+                  show: true,
172
+                  position: 'top',
173
+                  formatter: '{c}'
174
+                }
175
+              },
176
+              //配置样式
177
+              itemStyle: {
178
+                //通常情况下:
179
+
180
+                //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
181
+                normal: {
182
+                  color: function(params) {
183
+                    //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
184
+                    var colorList = [
185
+                      ['#A9E0F3', '#9FBDFC'],
186
+
187
+                      ['#FFD7C0', '#FF9994']
188
+                    ]
189
+
190
+                    var index = params.dataIndex
191
+                    if (params.dataIndex >= colorList.length) {
192
+                      index = params.dataIndex % colorList.length
193
+                    }
194
+
195
+                    return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
196
+                      { offset: 0, color: colorList[index][0] },
197
+                      // { offset: 0.5, color: colorList[index][1] },
198
+                      { offset: 1, color: colorList[index][1] }
199
+                    ])
200
+                  },
201
+                  barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
202
+                },
203
+
204
+                //鼠标悬停时:
205
+                emphasis: {
206
+                  shadowBlur: 10,
207
+                  shadowOffsetX: 0,
208
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
209
+                }
210
+              }
211
+            }
212
+          ]
213
+        },
214
+        query: {
215
+          patient_id: this.$route.query.patient_id,
216
+          start_time: '',
217
+          end_time: '',
218
+          limit: 20,
219
+          page: 1,
220
+          project_id: this.$route.query.project_id,
221
+          item_id: this.$route.query.item_id,
222
+          range_type: this.$route.query.range_type,
223
+          range_value: ''
224
+        },
225
+        patientsData: [],
226
+
227
+        pickerOptions: {
228
+          disabledDate(time) {
229
+            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
230
+            return time.getTime() > Date.now() || time.getTime() < threeMonths
231
+
232
+          }
233
+        },
234
+        crumbs: [
235
+          { path: false, name: '质控管理' },
236
+          { path: false, name: '基本信息统计' }
237
+        ],
238
+        listQuery: {
239
+          start_time: '',
240
+          end_time: '',
241
+          page: 1,
242
+          limit: 10
243
+        },
244
+        stateType: 1,
245
+        month: [
246
+          { value: 1, label: '本月', state: 1 },
247
+          { value: 2, label: '近三个月', state: 2 },
248
+          { value: 3, label: '近半年', state: 3 },
249
+          { value: 4, label: '近一年', state: 4 },
250
+          { value: 5, label: '自定义', state: 5 }
251
+        ]
252
+      }
253
+    },
254
+    methods: {
255
+      selectStateType(val) {
256
+        this.stateType = val
257
+        switch (val) {
258
+          case 1: //本月
259
+
260
+            this.query.start_time = moment().subtract('month', 1).format('YYYY-MM-DD')
261
+            // 本月的结束时间
262
+            this.query.end_time = moment(new Date()).format('YYYY-MM-DD')
263
+            this.query.patient_id = this.$route.query.patient_id
264
+            this.query.project_id = this.$route.query.project_id
265
+            this.query.item_id = this.$route.query.item_id
266
+            this.query.range_type = this.$route.query.range_type
267
+            this.GetPatientInspectionIndexChart(this.query)
268
+
269
+            break
270
+          case 2: //近3个月
271
+            const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
272
+            this.query.start_time = startDate
273
+            const endDate = moment(new Date()).format('YYYY-MM-DD')
274
+            this.query.patient_id = this.$route.query.patient_id
275
+            this.query.project_id = this.$route.query.project_id
276
+            this.query.item_id = this.$route.query.item_id
277
+            this.query.range_type = this.$route.query.range_type
278
+
279
+            this.GetPatientInspectionIndexChart(this.query)
280
+
281
+            break
282
+          case 3: //近半年
283
+            this.query.start_time = moment().subtract('month', 6).format('YYYY-MM-DD')
284
+            this.query.end_time = moment(new Date()).format('YYYY-MM-DD')
285
+            this.query.patient_id = this.$route.query.patient_id
286
+            this.query.project_id = this.$route.query.project_id
287
+            this.query.item_id = this.$route.query.item_id
288
+            this.query.range_type = this.$route.query.range_type
289
+
290
+            this.GetPatientInspectionIndexChart(this.query)
291
+            break
292
+          case 4: //近一年
293
+            this.query.start_time = moment().subtract('month', 12).format('YYYY-MM-DD')
294
+            this.query.end_time = moment(new Date()).format('YYYY-MM-DD')
295
+            this.query.patient_id = this.$route.query.patient_id
296
+            this.query.project_id = this.$route.query.project_id
297
+            this.query.item_id = this.$route.query.item_id
298
+            this.query.range_type = this.$route.query.range_type
299
+            this.GetPatientInspectionIndexChart(this.query)
300
+            break
301
+          case 5: //自定义
302
+            this.query.start_time = moment().subtract('month', 1).format('YYYY-MM-DD')
303
+            // 本月的结束时间
304
+            this.query.end_time = moment(new Date()).format('YYYY-MM-DD')
305
+            this.query.patient_id = this.$route.query.patient_id
306
+            this.query.project_id = this.$route.query.project_id
307
+            this.query.item_id = this.$route.query.item_id
308
+            this.query.range_type = this.$route.query.range_type
309
+            this.GetPatientInspectionIndexChart(this.query)
310
+            break
311
+        }
312
+
313
+      },
314
+      getCurrentOrgPatients() {
315
+        getCurrentOrgPatients().then(response => {
316
+          if (response.data.state == 1) {
317
+            var patients = response.data.data.patients
318
+            this.patientsData = patients
319
+
320
+
321
+            for (let i = 0;i < this.patientsData.length; i++){
322
+              if (this.patientsData[i].id == this.query.patient_id){
323
+                this.$refs.table.setCurrentRow(this.patientsData[i])
324
+              }
325
+            }
326
+
327
+          }
328
+        })
329
+      }, handleChange(val) {
330
+        this.query.patient_id = val.id
331
+        this.query.page = 1
332
+        this.GetPatientInspectionIndexChart(this.query)
333
+      }, changeTime(val) {
334
+        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
335
+        if (time > 0) {
336
+          this.$message.error('结束时间不能小于开始时间')
337
+        } else {
338
+          console.log(this.query)
339
+          this.GetPatientInspectionIndexChart(this.query)
340
+        }
341
+      },
342
+      changeEndTime(val) {
343
+        var time =
344
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
345
+        if (time < 0) {
346
+          this.$message.error('结束时间不能小于开始时间')
347
+        } else {
348
+          console.log(this.query)
349
+          this.GetPatientInspectionIndexChart(this.query)
350
+
351
+        }
352
+      },
353
+      GetPatientInspectionIndexChart(params) {
354
+        this.options2.xAxis.data = []
355
+        this.options2.series[0].data = []
356
+        GetPatientInspectionIndexChart(params)
357
+          .then(rs => {
358
+            var resp = rs.data
359
+            if (resp.state == 1) {
360
+
361
+              let tempData = []
362
+              let otherData = []
363
+
364
+              for (let i = 0; i < resp.data.data.length; i++) {
365
+                this.options2.xAxis.data.push(resp.data.data[i].date)
366
+
367
+                if (this.query.range_type == 1) {
368
+                  this.options2.series[0].data.push(resp.data.data[i].value)
369
+                } else {
370
+                  this.options2.series[0].data.push('1')
371
+                  tempData.push(resp.data.data[i].value)
372
+                  otherData.push(resp.data.data[i].value)
373
+                }
374
+              }
375
+
376
+              //获取无法确定选项的颜色
377
+              if (this.query.range_type == 2) {
378
+                //去重复
379
+                let obj = {}
380
+                tempData = tempData.reduce((cur, next) => {
381
+                  obj[next] ? '' : (obj[next] = true && cur.push(next))
382
+                  return cur
383
+                }, [])
384
+
385
+                //随机获取颜色值
386
+                let newObj = {}
387
+                for (let i = 0; i < tempData.length; i++) {
388
+                  newObj[tempData[i]] = this.getColor()
389
+                }
390
+
391
+                //匹配对应的颜色值
392
+                for (let i = 0; i < otherData.length; i++) {
393
+                  for (let key in newObj) {
394
+                    if (otherData[i] === key) {
395
+                      this.custom_chart_data_color.push(newObj[key])
396
+                    }
397
+                  }
398
+                }
399
+              }
400
+
401
+            } else {
402
+            }
403
+          })
404
+          .catch(error => {
405
+
406
+          })
407
+
408
+      },  getTimestamp(time) {
409
+        // 把时间日期转成时间戳
410
+        return new Date(time).getTime() / 1000;
411
+      },
412
+
413
+    },
414
+    created() {
415
+
416
+      this.getCurrentOrgPatients()
417
+      this.query.start_time = moment().subtract('month', 1).format('YYYY-MM-DD')
418
+      this.query.end_time = moment(new Date()).format('YYYY-MM-DD')
419
+      this.query.patient_id = this.$route.query.patient_id
420
+      this.query.project_id = this.$route.query.project_id
421
+      this.query.item_id = this.$route.query.item_id
422
+      this.query.range_type = this.$route.query.range_type
423
+      this.GetPatientInspectionIndexChart(this.query)
424
+    }
425
+  }
426
+</script>
427
+
428
+<style rel="stylesheet/scss" lang="scss" scoped>
429
+  .tableTitle {
430
+    font-size: 16px;
431
+    color: #000;
432
+    font-weight: bold;
433
+    margin-bottom: 10px;
434
+  }
435
+
436
+  .infoBox {
437
+    display: flex;
438
+    flex-wrap: wrap;
439
+
440
+  .infoOne {
441
+    margin-right: 30px;
442
+    margin-top: 30px;
443
+
444
+  .titleBox {
445
+    display: flex;
446
+    align-items: center;
447
+  }
448
+
449
+  .point {
450
+    display: inline-block;
451
+    width: 7px;
452
+    height: 7px;
453
+    background: linear-gradient(
454
+      90deg,
455
+      rgba(169, 224, 243, 1),
456
+      rgba(159, 189, 252, 1)
457
+    );
458
+    border-radius: 50%;
459
+  }
460
+
461
+  .point1 {
462
+    width: 7px;
463
+    height: 7px;
464
+    background: linear-gradient(
465
+      90deg,
466
+      rgba(255, 215, 192, 1),
467
+      rgba(255, 153, 148, 1)
468
+    );
469
+    border-radius: 50%;
470
+  }
471
+
472
+  .point2 {
473
+    width: 7px;
474
+    height: 7px;
475
+    background: linear-gradient(
476
+      90deg,
477
+      rgba(215, 195, 253, 1),
478
+      rgba(179, 168, 247, 1)
479
+    );
480
+    border-radius: 50%;
481
+  }
482
+
483
+  .infoTitle {
484
+    font-size: 16px;
485
+    font-weight: bold;
486
+    margin-left: 5px;
487
+    color: #000;
488
+  }
489
+
490
+  .borderBox {
491
+    width: 340px;
492
+    min-height: 140px;
493
+    background: rgba(255, 255, 255, 1);
494
+    border: 1px solid rgba(229, 229, 229, 1);
495
+    border-radius: 10px;
496
+    padding: 0 14px 20px;
497
+    margin-top: 10px;
498
+
499
+  p {
500
+    font-size: 14px;
501
+    color: #000;
502
+    margin: 10px 0 3px;
503
+  }
504
+
505
+  }
506
+  .borderBox1 {
507
+    width: 340px;
508
+    min-height: 140px;
509
+    background: rgba(255, 255, 255, 1);
510
+    border: 1px solid rgba(229, 229, 229, 1);
511
+    border-radius: 10px;
512
+    padding: 0 14px 20px;
513
+    margin-top: 10px;
514
+
515
+  p {
516
+    font-size: 14px;
517
+    color: #000;
518
+    margin: 10px 0 3px;
519
+  }
520
+
521
+  }
522
+  .borderBox2 {
523
+    width: 340px;
524
+    min-height: 140px;
525
+    background: rgba(255, 255, 255, 1);
526
+    border: 1px solid rgba(229, 229, 229, 1);
527
+    border-radius: 10px;
528
+    padding: 0 14px 20px;
529
+    margin-top: 10px;
530
+
531
+  p {
532
+    font-size: 14px;
533
+    color: #000;
534
+    margin: 10px 0 3px;
535
+  }
536
+
537
+  }
538
+  }
539
+  }
540
+</style>
541
+
542
+<style lang="scss">
543
+  .infoBox {
544
+
545
+  .infoOne {
546
+
547
+  .borderBox {
548
+
549
+  .el-progress-bar__inner {
550
+    background: linear-gradient(
551
+      90deg,
552
+      rgba(169, 224, 243, 1),
553
+      rgba(159, 189, 252, 1)
554
+    );
555
+  }
556
+
557
+  .el-progress-bar {
558
+    margin-right: -59px;
559
+    padding-right: 60px;
560
+  }
561
+
562
+  }
563
+  .borderBox1 {
564
+
565
+  .el-progress-bar__inner {
566
+    background: linear-gradient(
567
+      90deg,
568
+      rgba(255, 215, 192, 1),
569
+      rgba(255, 153, 148, 1)
570
+    );
571
+  }
572
+
573
+  .el-progress-bar {
574
+    margin-right: -59px;
575
+    padding-right: 60px;
576
+  }
577
+
578
+  }
579
+  .borderBox2 {
580
+
581
+  .el-progress-bar__inner {
582
+    background: linear-gradient(
583
+      90deg,
584
+      rgba(215, 195, 253, 1),
585
+      rgba(179, 168, 247, 1)
586
+    );
587
+  }
588
+
589
+  .el-progress-bar {
590
+    margin-right: -59px;
591
+    padding-right: 60px;
592
+  }
593
+
594
+  }
595
+  }
596
+  }
597
+</style>
598
+
599
+

+ 130 - 79
src/xt_pages/qcd/indicatorControlAnalysis/process.vue View File

26
 
26
 
27
             </el-form-item>
27
             </el-form-item>
28
           </el-form>
28
           </el-form>
29
-          <el-select v-model="query.statistics_type" placeholder="请选择" style="width:110px;margin-right:10px" @change="changeProject">
29
+          <el-select v-model="query.statistics_type" placeholder="请选择" style="width:110px;margin-right:10px"
30
+                     @change="changeProject">
30
             <el-option
31
             <el-option
31
               v-for="item in options"
32
               v-for="item in options"
32
               :key="item.value"
33
               :key="item.value"
69
         <el-container>
70
         <el-container>
70
           <div style="width:150px">
71
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
72
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
74
+                      :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
75
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
76
                       highlight-current-row
75
                       @current-change="handleChange">
77
                       @current-change="handleChange">
84
           <div style="padding-left:10px;flex:1">
86
           <div style="padding-left:10px;flex:1">
85
             <div class="tableTitle">指标趋势</div>
87
             <div class="tableTitle">指标趋势</div>
86
             <div>
88
             <div>
87
-              <line-chart :options="chart" v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
89
+              <line-chart :options="chart"
90
+                          v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
88
               <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
91
               <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
89
 
92
 
90
             </div>
93
             </div>
91
             <div class="tableTitle">统计表</div>
94
             <div class="tableTitle">统计表</div>
92
             <div>
95
             <div>
93
-              <el-table :data="tableData"  :height="tableHeight"   v-loading="loading">
94
-                <el-table-column  fixed label="透析日期" align="center">
96
+              <el-table :data="tableData" v-loading="loading">
97
+                <el-table-column fixed label="透析日期" align="center">
95
                   <template slot-scope="scope">
98
                   <template slot-scope="scope">
96
-                    {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
99
+                    {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
97
                     <!--{{getTime(scope.row.schedule_date)}}-->
100
                     <!--{{getTime(scope.row.schedule_date)}}-->
98
                   </template>
101
                   </template>
99
                 </el-table-column>
102
                 </el-table-column>
118
 
121
 
119
                 <el-table-column label="透前体重" align="center">
122
                 <el-table-column label="透前体重" align="center">
120
                   <template slot-scope="scope">
123
                   <template slot-scope="scope">
121
-                    {{ scope.row.predialysis_evaluation.weight_before?scope.row.predialysis_evaluation.weight_before:''}}
124
+                    {{
125
+                    scope.row.predialysis_evaluation.weight_before?scope.row.predialysis_evaluation.weight_before:''}}
122
 
126
 
123
                   </template>
127
                   </template>
124
                 </el-table-column>
128
                 </el-table-column>
125
 
129
 
126
                 <el-table-column label="透后体重" align="center">
130
                 <el-table-column label="透后体重" align="center">
127
                   <template slot-scope="scope">
131
                   <template slot-scope="scope">
128
-                    {{ scope.row.assessment_after_dislysis.weight_after ? scope.row.assessment_after_dislysis.weight_after :''}}
132
+                    {{ scope.row.assessment_after_dislysis.weight_after ?
133
+                    scope.row.assessment_after_dislysis.weight_after :''}}
129
 
134
 
130
                   </template>
135
                   </template>
131
                 </el-table-column>
136
                 </el-table-column>
132
 
137
 
133
                 <el-table-column label="目标超滤量" align="center">
138
                 <el-table-column label="目标超滤量" align="center">
134
                   <template slot-scope="scope">
139
                   <template slot-scope="scope">
135
-                    {{ scope.row.prescription.target_ultrafiltration ? scope.row.prescription.target_ultrafiltration : ''}}
140
+                    {{ scope.row.prescription.target_ultrafiltration ? scope.row.prescription.target_ultrafiltration :
141
+                    ''}}
136
 
142
 
137
                   </template>
143
                   </template>
138
                 </el-table-column>
144
                 </el-table-column>
139
 
145
 
140
                 <el-table-column label="实际超滤量" align="center">
146
                 <el-table-column label="实际超滤量" align="center">
141
                   <template slot-scope="scope">
147
                   <template slot-scope="scope">
142
-                    {{ scope.row.assessment_after_dislysis.actual_ultrafiltration ?  scope.row.assessment_after_dislysis.actual_ultrafiltration :''}}
148
+                    {{ scope.row.assessment_after_dislysis.actual_ultrafiltration ?
149
+                    scope.row.assessment_after_dislysis.actual_ultrafiltration :''}}
143
 
150
 
144
                   </template>
151
                   </template>
145
                 </el-table-column>
152
                 </el-table-column>
147
 
154
 
148
                 <el-table-column label="透前血压" align="center">
155
                 <el-table-column label="透前血压" align="center">
149
                   <template slot-scope="scope">
156
                   <template slot-scope="scope">
150
-                    <div v-if="scope.row.predialysis_evaluation.systolic_blood_pressure && scope.row.predialysis_evaluation.diastolic_blood_pressure">{{ scope.row.predialysis_evaluation.systolic_blood_pressure}} / {{ scope.row.predialysis_evaluation.diastolic_blood_pressure}}</div>
157
+                    <div
158
+                      v-if="scope.row.predialysis_evaluation.systolic_blood_pressure && scope.row.predialysis_evaluation.diastolic_blood_pressure">
159
+                      {{ scope.row.predialysis_evaluation.systolic_blood_pressure}} / {{
160
+                      scope.row.predialysis_evaluation.diastolic_blood_pressure}}
161
+                    </div>
151
 
162
 
152
 
163
 
153
                   </template>
164
                   </template>
155
 
166
 
156
                 <el-table-column label="透后血压" align="center">
167
                 <el-table-column label="透后血压" align="center">
157
                   <template slot-scope="scope">
168
                   <template slot-scope="scope">
158
-                    <div v-if="scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure">{{ scope.row.assessment_after_dislysis.systolic_blood_pressure}} / {{ scope.row.assessment_after_dislysis.diastolic_blood_pressure}}</div>
169
+                    <div
170
+                      v-if="scope.row.assessment_after_dislysis.systolic_blood_pressure&&scope.row.assessment_after_dislysis.diastolic_blood_pressure">
171
+                      {{ scope.row.assessment_after_dislysis.systolic_blood_pressure}} / {{
172
+                      scope.row.assessment_after_dislysis.diastolic_blood_pressure}}
173
+                    </div>
159
 
174
 
160
 
175
 
161
                   </template>
176
                   </template>
164
 
179
 
165
                 <el-table-column label="透前脉率" align="center">
180
                 <el-table-column label="透前脉率" align="center">
166
                   <template slot-scope="scope">
181
                   <template slot-scope="scope">
167
-                    {{ scope.row.predialysis_evaluation.pulse_frequency?scope.row.predialysis_evaluation.pulse_frequency:''}}
182
+                    {{
183
+                    scope.row.predialysis_evaluation.pulse_frequency?scope.row.predialysis_evaluation.pulse_frequency:''}}
168
 
184
 
169
                   </template>
185
                   </template>
170
                 </el-table-column>
186
                 </el-table-column>
171
 
187
 
172
                 <el-table-column label="透后脉率" align="center">
188
                 <el-table-column label="透后脉率" align="center">
173
                   <template slot-scope="scope">
189
                   <template slot-scope="scope">
174
-                    {{ scope.row.assessment_after_dislysis.pulse_frequency?scope.row.assessment_after_dislysis.pulse_frequency:''}}
190
+                    {{
191
+                    scope.row.assessment_after_dislysis.pulse_frequency?scope.row.assessment_after_dislysis.pulse_frequency:''}}
175
 
192
 
176
                   </template>
193
                   </template>
177
                 </el-table-column>
194
                 </el-table-column>
193
 
210
 
194
                 <el-table-column label="钾" align="center">
211
                 <el-table-column label="钾" align="center">
195
                   <template slot-scope="scope">
212
                   <template slot-scope="scope">
196
-                    {{ scope.row.prescription.kalium?scope.row.prescription.kalium:""}}
213
+                    {{ scope.row.prescription.kalium?scope.row.prescription.kalium:''}}
197
 
214
 
198
                   </template>
215
                   </template>
199
                 </el-table-column>
216
                 </el-table-column>
200
 
217
 
201
 
218
 
202
-
203
                 <el-table-column label="钠" align="center">
219
                 <el-table-column label="钠" align="center">
204
                   <template slot-scope="scope">
220
                   <template slot-scope="scope">
205
-                    {{ scope.row.prescription.sodium?scope.row.prescription.sodium:""}}
221
+                    {{ scope.row.prescription.sodium?scope.row.prescription.sodium:''}}
206
 
222
 
207
                   </template>
223
                   </template>
208
                 </el-table-column>
224
                 </el-table-column>
210
 
226
 
211
                 <el-table-column label="钙" align="center">
227
                 <el-table-column label="钙" align="center">
212
                   <template slot-scope="scope">
228
                   <template slot-scope="scope">
213
-                    {{ scope.row.prescription.calcium?scope.row.prescription.calcium:""}}
229
+                    {{ scope.row.prescription.calcium?scope.row.prescription.calcium:''}}
214
 
230
 
215
                   </template>
231
                   </template>
216
                 </el-table-column>
232
                 </el-table-column>
218
 
234
 
219
                 <el-table-column label="透析时长" align="center">
235
                 <el-table-column label="透析时长" align="center">
220
                   <template slot-scope="scope">
236
                   <template slot-scope="scope">
221
-                    {{ scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':""}}
222
-                    {{ scope.row.prescription.dialysis_duration_minute?scope.row.prescription.dialysis_duration_minute+'分钟':''}}
237
+                    {{
238
+                    scope.row.prescription.dialysis_duration_hour?scope.row.prescription.dialysis_duration_hour+'小时':''}}
239
+                    {{
240
+                    scope.row.prescription.dialysis_duration_minute?scope.row.prescription.dialysis_duration_minute+'分钟':''}}
223
                   </template>
241
                   </template>
224
 
242
 
225
                 </el-table-column>
243
                 </el-table-column>
265
   import NewNav from '../indicatorControlAnalysis/components/NewNav'
283
   import NewNav from '../indicatorControlAnalysis/components/NewNav'
266
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
284
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
267
   import LineChart from '../../qcd/components/LineChart'
285
   import LineChart from '../../qcd/components/LineChart'
268
-  import { getCurrentOrgPatients } from "@/api/common/common";
286
+  import { getCurrentOrgPatients } from '@/api/common/common'
269
   import {
287
   import {
270
-    GetDefalutPatient,
288
+    GetDefaultPatient,
271
     GetDialysisProcessIndexChartData,
289
     GetDialysisProcessIndexChartData,
272
     GetDialysisProcessIndexTableData
290
     GetDialysisProcessIndexTableData
273
   } from '@/api/common/statistics'
291
   } from '@/api/common/statistics'
274
 
292
 
293
+  import { PostSearch } from '@/api/patient'
275
 
294
 
276
-
277
-  import {
278
-    PostSearch
279
-  } from '@/api/patient'
280
-
281
-  import { uParseTime } from "@/utils/tools";
282
-  import { getDataConfig } from "@/utils/data";
295
+  import { uParseTime } from '@/utils/tools'
296
+  import { getDataConfig } from '@/utils/data'
283
 
297
 
284
   export default {
298
   export default {
285
     components: {
299
     components: {
291
       return {
305
       return {
292
         pickerOptions: {
306
         pickerOptions: {
293
           disabledDate(time) {
307
           disabledDate(time) {
294
-            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
295
-            return time.getTime() > Date.now() || time.getTime() < threeMonths;;
308
+            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
309
+            return time.getTime() > Date.now() || time.getTime() < threeMonths
310
+
296
           }
311
           }
297
         },
312
         },
298
-        patientsData:[],
299
-        tableData: [
300
-        ],
313
+        percent:[],
314
+        patientsData: [],
315
+        tableData: [],
301
         loading: false,
316
         loading: false,
302
         search_value: '',
317
         search_value: '',
303
-        total: '',
318
+        total: 0,
304
         query: {
319
         query: {
305
           patient_id: '',
320
           patient_id: '',
306
           statistics_type: 1,
321
           statistics_type: 1,
326
           { path: false, name: '指标评估统计' },
341
           { path: false, name: '指标评估统计' },
327
           { path: false, name: '透析过程指标统计' }
342
           { path: false, name: '透析过程指标统计' }
328
         ],
343
         ],
329
-        tableData: [],
330
         tableData1: [],
344
         tableData1: [],
331
         chart: {
345
         chart: {
332
           title: {
346
           title: {
356
                 normal: {
370
                 normal: {
357
                   show: true,
371
                   show: true,
358
                   position: 'top',
372
                   position: 'top',
359
-                  formatter: '{c}'
373
+                  formatter: (params) => {
374
+                    if(this.percent.length > 0){
375
+                      let str = ''
376
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
377
+                      return str
378
+                    }else{
379
+                      let str = ''
380
+                      str = params.data
381
+                      return str
382
+                    }
383
+                  }
360
                 }
384
                 }
361
               },
385
               },
362
               //配置样式
386
               //配置样式
425
                 normal: {
449
                 normal: {
426
                   show: true,
450
                   show: true,
427
                   position: 'top',
451
                   position: 'top',
428
-                  formatter: '{c}次'
452
+                  formatter: (params) => {
453
+                    if(this.percent.length > 0){
454
+                      let str = ''
455
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
456
+                      return str
457
+                    }else{
458
+                      let str = ''
459
+                      str = params.data
460
+                      return str
461
+                    }
462
+                  }
429
                 }
463
                 }
430
               },
464
               },
431
               //配置样式
465
               //配置样式
469
       }
503
       }
470
     },
504
     },
471
     methods: {
505
     methods: {
472
-      jumpDetail(patient_id){
473
-        this.$router.push("/dqc/bloodpressure/detail?id="+patient_id)
474
 
506
 
475
-      },
476
-      changeProject(val){
507
+      changeProject(val) {
477
         this.query.statistics_type = val
508
         this.query.statistics_type = val
478
         this.query.page = 1
509
         this.query.page = 1
479
         this.GetDialysisProcessIndexChartData(this.query)
510
         this.GetDialysisProcessIndexChartData(this.query)
480
         // this.GetDialysisProcessIndexTableData(this.query)
511
         // this.GetDialysisProcessIndexTableData(this.query)
481
 
512
 
482
       },
513
       },
483
-      handleChange(val){
514
+      handleChange(val) {
484
         this.query.patient_id = val.id
515
         this.query.patient_id = val.id
485
         this.query.page = 1
516
         this.query.page = 1
486
         this.GetDialysisProcessIndexTableData(this.query)
517
         this.GetDialysisProcessIndexTableData(this.query)
487
         this.GetDialysisProcessIndexChartData(this.query)
518
         this.GetDialysisProcessIndexChartData(this.query)
488
       },
519
       },
489
       handleSizeChange(limit) {
520
       handleSizeChange(limit) {
490
-        this.query.limit = limit;
521
+        this.query.limit = limit
522
+        this.GetDialysisProcessIndexTableData(this.query)
491
 
523
 
492
       },
524
       },
493
       handleCurrentChange(page) {
525
       handleCurrentChange(page) {
494
-        this.query.page = page;
526
+        this.query.page = page
527
+        this.GetDialysisProcessIndexTableData(this.query)
528
+
495
 
529
 
496
       },
530
       },
497
       changeTime(val) {
531
       changeTime(val) {
498
-        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
532
+        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
499
         if (time > 0) {
533
         if (time > 0) {
500
-          this.$message.error("结束时间不能小于开始时间");
501
-          this.query.start_time = "";
534
+          this.$message.error('结束时间不能小于开始时间')
535
+          this.query.start_time = ''
502
         } else {
536
         } else {
503
           // this.getDialysisList()
537
           // this.getDialysisList()
504
-          this.query.page = 1;
538
+          this.query.page = 1
505
           this.GetDialysisProcessIndexChartData(this.query)
539
           this.GetDialysisProcessIndexChartData(this.query)
506
           this.GetDialysisProcessIndexTableData(this.query)
540
           this.GetDialysisProcessIndexTableData(this.query)
507
 
541
 
510
       },
544
       },
511
       changeEndTime(val) {
545
       changeEndTime(val) {
512
         var time =
546
         var time =
513
-          this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
547
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
514
         if (time < 0) {
548
         if (time < 0) {
515
-          this.$message.error("结束时间不能小于开始时间");
516
-          this.query.end_time = "";
549
+          this.$message.error('结束时间不能小于开始时间')
550
+          this.query.end_time = ''
517
         } else {
551
         } else {
518
-          this.query.page = 1;
552
+          this.query.page = 1
519
           this.GetDialysisProcessIndexChartData(this.query)
553
           this.GetDialysisProcessIndexChartData(this.query)
520
           this.GetDialysisProcessIndexTableData(this.query)
554
           this.GetDialysisProcessIndexTableData(this.query)
521
 
555
 
523
       },
557
       },
524
       getTimestamp(time) {
558
       getTimestamp(time) {
525
         // 把时间日期转成时间戳
559
         // 把时间日期转成时间戳
526
-        return new Date(time).getTime() / 1000;
560
+        return new Date(time).getTime() / 1000
527
       },
561
       },
528
       QueryOperaById: function(val) {
562
       QueryOperaById: function(val) {
529
-        let vascular_access_desc_name = "";
563
+        let vascular_access_desc_name = ''
530
         let vascular_access_desc = getDataConfig(
564
         let vascular_access_desc = getDataConfig(
531
-          "hemodialysis",
532
-          "vascular_access_desc"
533
-        );
565
+          'hemodialysis',
566
+          'vascular_access_desc'
567
+        )
534
         for (let i = 0; i < vascular_access_desc.length; i++) {
568
         for (let i = 0; i < vascular_access_desc.length; i++) {
535
           if (vascular_access_desc[i].id == val) {
569
           if (vascular_access_desc[i].id == val) {
536
-            vascular_access_desc_name = vascular_access_desc[i].name;
570
+            vascular_access_desc_name = vascular_access_desc[i].name
537
           }
571
           }
538
         }
572
         }
539
 
573
 
540
-        return vascular_access_desc_name;
574
+        return vascular_access_desc_name
541
       },
575
       },
542
-      GetAnticoagulantById: function (val) {
576
+      GetAnticoagulantById: function(val) {
543
         let anticoagulan_name = ''
577
         let anticoagulan_name = ''
544
         var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
578
         var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
545
         let anticoagulant = anticoagulantsConfitTwo
579
         let anticoagulant = anticoagulantsConfitTwo
550
         }
584
         }
551
         return anticoagulan_name
585
         return anticoagulan_name
552
       },
586
       },
553
-      getModeName(mode_id){
554
-        return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
555
-      },
556
-      changeTime() {
557
-
558
-      }, changeEndTime() {
559
-
560
-
587
+      getModeName(mode_id) {
588
+        return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
561
       }, GetDialysisProcessIndexTableData(params) {
589
       }, GetDialysisProcessIndexTableData(params) {
562
         this.loading = true
590
         this.loading = true
563
-        this.tableData = []
564
         GetDialysisProcessIndexTableData(params)
591
         GetDialysisProcessIndexTableData(params)
565
           .then(rs => {
592
           .then(rs => {
566
             var resp = rs.data
593
             var resp = rs.data
567
             if (resp.state == 1) {
594
             if (resp.state == 1) {
568
               this.loading = false
595
               this.loading = false
569
-
596
+              this.tableData = []
570
               for (let i = 0; i < resp.data.data.length; i++) {
597
               for (let i = 0; i < resp.data.data.length; i++) {
571
                 this.tableData.push(resp.data.data[i])
598
                 this.tableData.push(resp.data.data[i])
572
               }
599
               }
600
+              this.total = resp.data.total
601
+
573
             } else {
602
             } else {
574
               this.loading = false
603
               this.loading = false
575
             }
604
             }
583
         this.chart.series[0].data = []
612
         this.chart.series[0].data = []
584
         this.bar.xAxis.data = []
613
         this.bar.xAxis.data = []
585
         this.bar.series[0].data = []
614
         this.bar.series[0].data = []
586
-        GetDialysisProcessIndexChartData(params)
615
+        this.percent = []
616
+
617
+          GetDialysisProcessIndexChartData(params)
587
           .then(rs => {
618
           .then(rs => {
588
             var resp = rs.data
619
             var resp = rs.data
589
             if (resp.state == 1) {
620
             if (resp.state == 1) {
593
                   this.chart.series[0].data.push(resp.data.data[i].value)
624
                   this.chart.series[0].data.push(resp.data.data[i].value)
594
                 }
625
                 }
595
               } else {
626
               } else {
596
-                console.log("1111111")
597
-                console.log(this.query.statistics_type)
598
 
627
 
599
                 for (let i = 0; i < resp.data.data.length; i++) {
628
                 for (let i = 0; i < resp.data.data.length; i++) {
600
                   this.bar.xAxis.data.push(resp.data.data[i].name)
629
                   this.bar.xAxis.data.push(resp.data.data[i].name)
601
                   this.bar.series[0].data.push(resp.data.data[i].total)
630
                   this.bar.series[0].data.push(resp.data.data[i].total)
631
+                  this.percent.push(resp.data.data[i].ratio)
632
+
602
                 }
633
                 }
603
               }
634
               }
604
             } else {
635
             } else {
613
         this.GetDialysisProcessIndexChartData(this.query)
644
         this.GetDialysisProcessIndexChartData(this.query)
614
         this.GetDialysisProcessIndexTableData(this.query)
645
         this.GetDialysisProcessIndexTableData(this.query)
615
 
646
 
647
+        for (let i = 0;i < this.patientsData.length; i++){
648
+          if (this.patientsData[i].id == val.id){
649
+            this.$refs.table.setCurrentRow(this.patientsData[i])
650
+          }
651
+        }
652
+
653
+
616
       },
654
       },
617
       querySearchAsync(keyword, cb) {
655
       querySearchAsync(keyword, cb) {
618
         let key = ''
656
         let key = ''
631
       },
669
       },
632
       chooseWay(way) {
670
       chooseWay(way) {
633
         this.wayType = way
671
         this.wayType = way
634
-      }, getCurrentOrgPatients(){
635
-        getCurrentOrgPatients().then(response=>{
636
-          if(response.data.state == 1){
672
+      }, getCurrentOrgPatients() {
673
+        getCurrentOrgPatients().then(response => {
674
+          if (response.data.state == 1) {
637
             var patients = response.data.data.patients
675
             var patients = response.data.data.patients
638
             this.patientsData = patients
676
             this.patientsData = patients
677
+            this.GetDefaultPatient()
639
           }
678
           }
640
         })
679
         })
641
-      },
680
+      }, GetDefaultPatient() {
681
+        GetDefaultPatient().then(response => {
682
+          if (response.data.state == 1) {
683
+            var patient = response.data.data.patient
684
+            for (let i = 0;i < this.patientsData.length; i++){
685
+              if (this.patientsData[i].id == patient.id){
686
+                this.$refs.table.setCurrentRow(this.patientsData[i])
687
+              }
688
+            }
689
+          }
690
+        })
691
+
692
+      }
642
     }, created() {
693
     }, created() {
643
       var date = new Date()
694
       var date = new Date()
644
       var year = date.getFullYear() //获取完整的年份(4位)
695
       var year = date.getFullYear() //获取完整的年份(4位)
645
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
696
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
646
-      var day = date.getDate() < 0 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
697
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
647
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
698
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
648
       this.query.patient_id = 0
699
       this.query.patient_id = 0
649
       this.query.end_time = year + '-' + month + '-' + day
700
       this.query.end_time = year + '-' + month + '-' + day

+ 55 - 15
src/xt_pages/qcd/indicatorControlAnalysis/weight.vue View File

69
         <el-container>
69
         <el-container>
70
           <div style="width:150px">
70
           <div style="width:150px">
71
             <div class="tableTitle">患者列表</div>
71
             <div class="tableTitle">患者列表</div>
72
-            <el-table :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
72
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74
                       highlight-current-row
74
                       highlight-current-row
75
                       @current-change="handleChange">
75
                       @current-change="handleChange">
138
 
138
 
139
                 <el-table-column label="体重增加" align="center">
139
                 <el-table-column label="体重增加" align="center">
140
                   <template slot-scope="scope">
140
                   <template slot-scope="scope">
141
-                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{scope.row.weight_before - scope.row.last_after_weight}}</div>
141
+                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{(scope.row.weight_before - scope.row.last_after_weight).toFixed(1)}}</div>
142
 
142
 
143
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
143
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
144
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
144
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
184
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
184
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
185
   import LineChart from '../../qcd/components/LineChart'
185
   import LineChart from '../../qcd/components/LineChart'
186
   import { getCurrentOrgPatients } from "@/api/common/common";
186
   import { getCurrentOrgPatients } from "@/api/common/common";
187
-  import {GetDialysisWeightChartData,GetDialysisWeightTableData} from "@/api/common/statistics"
187
+  import {GetDialysisWeightChartData,GetDialysisWeightTableData,GetDefalutPatient} from "@/api/common/statistics"
188
 
188
 
189
   import {
189
   import {
190
     PostSearch
190
     PostSearch
201
     },
201
     },
202
     data() {
202
     data() {
203
       return {
203
       return {
204
+        percent:[],
204
         pickerOptions: {
205
         pickerOptions: {
205
           disabledDate(time) {
206
           disabledDate(time) {
206
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
207
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
212
         ],
213
         ],
213
         loading: false,
214
         loading: false,
214
         search_value: '',
215
         search_value: '',
215
-        total: '',
216
+        total: 0,
216
         query: {
217
         query: {
217
           patient_id: '',
218
           patient_id: '',
218
           statistics_type: 1,
219
           statistics_type: 1,
228
           { value: 4, name: '透后体重' },
229
           { value: 4, name: '透后体重' },
229
         ],
230
         ],
230
         crumbs: [
231
         crumbs: [
231
-          { path: false, name: '科室质控' },
232
+          { path: false, name: '质控管理' },
232
           { path: false, name: '指标评估统计' },
233
           { path: false, name: '指标评估统计' },
233
           { path: false, name: '透析过程指标统计' }
234
           { path: false, name: '透析过程指标统计' }
234
         ],
235
         ],
261
                 normal: {
262
                 normal: {
262
                   show: true,
263
                   show: true,
263
                   position: 'top',
264
                   position: 'top',
264
-                  formatter: '{c}'
265
+                  formatter: (params) => {
266
+                    if(this.percent.length > 0){
267
+                      let str = ''
268
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
269
+                      return str
270
+                    }else{
271
+                      let str = ''
272
+                      str = params.data
273
+                      return str
274
+                    }
275
+                  }
265
                 }
276
                 }
266
               },
277
               },
267
               //配置样式
278
               //配置样式
330
                 normal: {
341
                 normal: {
331
                   show: true,
342
                   show: true,
332
                   position: 'top',
343
                   position: 'top',
333
-                  formatter: '{c}次'
344
+                  formatter: (params) => {
345
+                    if(this.percent.length > 0){
346
+                      let str = ''
347
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
348
+                      return str
349
+                    }else{
350
+                      let str = ''
351
+                      str = params.data
352
+                      return str
353
+                    }
354
+                  }
334
                 }
355
                 }
335
               },
356
               },
336
               //配置样式
357
               //配置样式
375
       }
396
       }
376
     },
397
     },
377
     methods: {
398
     methods: {
399
+      jumpDetail(patient_id){
400
+        this.$router.push("/qcd/indicatorControlAnalysis/weightDetails?id="+patient_id)
401
+
402
+      },
378
       changeProject(val){
403
       changeProject(val){
379
         this.query.statistics_type = val
404
         this.query.statistics_type = val
380
         this.query.page = 1
405
         this.query.page = 1
389
       },
414
       },
390
       handleSizeChange(limit) {
415
       handleSizeChange(limit) {
391
         this.query.limit = limit;
416
         this.query.limit = limit;
417
+        this.GetDialysisWeightTableData(this.query)
392
 
418
 
393
       },
419
       },
394
       handleCurrentChange(page) {
420
       handleCurrentChange(page) {
395
         this.query.page = page;
421
         this.query.page = page;
422
+        this.GetDialysisWeightTableData(this.query)
396
 
423
 
397
       },
424
       },
398
       changeTime(val) {
425
       changeTime(val) {
453
       },
480
       },
454
       getModeName(mode_id){
481
       getModeName(mode_id){
455
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
482
         return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
456
-      },
457
-      changeTime() {
458
-
459
-      }, changeEndTime() {
460
-
461
-
462
       }, GetDialysisWeightTableData(params) {
483
       }, GetDialysisWeightTableData(params) {
463
         this.loading = true
484
         this.loading = true
464
         this.tableData = []
485
         this.tableData = []
471
               for (let i = 0; i < resp.data.data.length; i++) {
492
               for (let i = 0; i < resp.data.data.length; i++) {
472
                 this.tableData.push(resp.data.data[i])
493
                 this.tableData.push(resp.data.data[i])
473
               }
494
               }
495
+              this.total = resp.data.total
496
+
474
             } else {
497
             } else {
475
               this.loading = false
498
               this.loading = false
476
             }
499
             }
482
       GetDialysisWeightChartData(params) {
505
       GetDialysisWeightChartData(params) {
483
         this.bar.xAxis.data = []
506
         this.bar.xAxis.data = []
484
         this.bar.series[0].data = []
507
         this.bar.series[0].data = []
508
+        this.percent = []
509
+
485
         GetDialysisWeightChartData(params)
510
         GetDialysisWeightChartData(params)
486
           .then(rs => {
511
           .then(rs => {
487
             var resp = rs.data
512
             var resp = rs.data
489
               for (let i = 0; i < resp.data.data.length; i++) {
514
               for (let i = 0; i < resp.data.data.length; i++) {
490
                 this.bar.xAxis.data.push(resp.data.data[i].name)
515
                 this.bar.xAxis.data.push(resp.data.data[i].name)
491
                 this.bar.series[0].data.push(resp.data.data[i].total)
516
                 this.bar.series[0].data.push(resp.data.data[i].total)
517
+                this.percent.push(resp.data.data[i].ratio)
518
+
519
+
492
               }
520
               }
493
             } else {
521
             } else {
494
             }
522
             }
501
         this.query.page = 1
529
         this.query.page = 1
502
         this.GetDialysisWeightChartData(this.query)
530
         this.GetDialysisWeightChartData(this.query)
503
         this.GetDialysisWeightTableData(this.query)
531
         this.GetDialysisWeightTableData(this.query)
532
+        for (let i = 0;i < this.patientsData.length; i++){
533
+          if (this.patientsData[i].id == val.id){
534
+            this.$refs.table.setCurrentRow(this.patientsData[i])
535
+          }
536
+        }
504
 
537
 
505
       },
538
       },
506
       querySearchAsync(keyword, cb) {
539
       querySearchAsync(keyword, cb) {
525
           if(response.data.state == 1){
558
           if(response.data.state == 1){
526
             var patients = response.data.data.patients
559
             var patients = response.data.data.patients
527
             this.patientsData = patients
560
             this.patientsData = patients
561
+
528
           }
562
           }
529
         })
563
         })
530
-      },
564
+      },GetDefaultPatient() {
565
+        GetDefalutPatient().then(response => {
566
+          if (response.data.state == 1) {
567
+            var patient = response.data.data.patient
568
+          }
569
+        })
570
+      }
531
     }, created() {
571
     }, created() {
532
       var date = new Date()
572
       var date = new Date()
533
       var year = date.getFullYear() //获取完整的年份(4位)
573
       var year = date.getFullYear() //获取完整的年份(4位)
534
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
574
       var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
535
-      var day = date.getDate() < 0 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
575
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
536
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
576
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
537
       this.query.patient_id = 0
577
       this.query.patient_id = 0
538
       this.query.end_time = year + '-' + month + '-' + day
578
       this.query.end_time = year + '-' + month + '-' + day

+ 278 - 198
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue View File

8
         <div class="cell clearfix" style="margin:0">
8
         <div class="cell clearfix" style="margin:0">
9
           <el-form :inline="true" :model="listQuery">
9
           <el-form :inline="true" :model="listQuery">
10
             <el-form-item label>
10
             <el-form-item label>
11
-              <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
12
-              <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
11
+              <el-autocomplete
12
+                class="checkSearch"
13
+                popper-class="my-autocomplete"
14
+                v-model="search_value"
15
+                :fetch-suggestions="querySearchAsync"
16
+                :trigger-on-focus="false"
17
+                placeholder="请输入病人名字"
18
+                @select="handleSelect"
19
+              >
20
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
21
+                <template slot-scope="{ item }">
22
+                  <div class="name">{{ item.name }}</div>
23
+                </template>
24
+              </el-autocomplete>
25
+
13
             </el-form-item>
26
             </el-form-item>
14
           </el-form>
27
           </el-form>
15
         </div>
28
         </div>
16
         <el-container>
29
         <el-container>
17
           <div style="width:150px">
30
           <div style="width:150px">
18
             <div class="tableTitle">患者列表</div>
31
             <div class="tableTitle">患者列表</div>
19
-            <el-table :data="tableData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
20
-              <el-table-column prop="date" label="日期" width="70"></el-table-column>
21
-              <el-table-column prop="name" label="姓名" width="80"></el-table-column>
32
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500" :row-style="{ color: '#303133' }"
33
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
34
+                      highlight-current-row
35
+                      @current-change="handleChange">
36
+              <el-table-column prop="dialysis_no" label="透析号" width="80">
37
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
38
+              </el-table-column>
39
+              <el-table-column prop="name" label="姓名" width="80">
40
+                <template slot-scope="scope">{{ scope.row.name }}</template>
41
+              </el-table-column>
22
             </el-table>
42
             </el-table>
43
+
44
+
23
           </div>
45
           </div>
24
           <div class="containerRight" style="flex:1;overflow: hidden">
46
           <div class="containerRight" style="flex:1;overflow: hidden">
25
             <div class="cell clearfix">
47
             <div class="cell clearfix">
26
               <label class="title" style="text-align:left">
48
               <label class="title" style="text-align:left">
27
-                <span class="name">血压阶段</span> :
49
+                <span class="name">体重类型</span> :
28
               </label>
50
               </label>
29
-              <el-select
30
-                v-model="value"
31
-                placeholder="请选择"
32
-                @change="chooseType"
33
-                style="width:110px;margin-right:10px"
34
-              >
51
+              <el-select v-model="query.statistics_type" placeholder="请选择" style="width:110px;margin-right:10px" @change="changeProject">
35
                 <el-option
52
                 <el-option
36
                   v-for="item in options"
53
                   v-for="item in options"
37
                   :key="item.value"
54
                   :key="item.value"
38
-                  :label="item.label"
55
+                  :label="item.name"
39
                   :value="item.value"
56
                   :value="item.value"
57
+
40
                 ></el-option>
58
                 ></el-option>
41
               </el-select>
59
               </el-select>
42
               <label class="title">
60
               <label class="title">
43
                 <span class="name">日期查询</span> :
61
                 <span class="name">日期查询</span> :
44
               </label>
62
               </label>
45
               <el-date-picker
63
               <el-date-picker
46
-                v-model="listQuery.start_time"
64
+                v-model="query.start_time"
47
                 prefix-icon="el-icon-date"
65
                 prefix-icon="el-icon-date"
48
                 @change="changeTime"
66
                 @change="changeTime"
49
                 :editable="false"
67
                 :editable="false"
68
+                style="width: 150px;"
50
                 type="date"
69
                 type="date"
51
-                style="max-width:160px"
70
+                :picker-options="pickerOptions"
52
                 placeholder="选择日期时间"
71
                 placeholder="选择日期时间"
53
                 align="right"
72
                 align="right"
54
                 format="yyyy-MM-dd"
73
                 format="yyyy-MM-dd"
56
               ></el-date-picker>
75
               ></el-date-picker>
57
               <span class>-</span>
76
               <span class>-</span>
58
               <el-date-picker
77
               <el-date-picker
59
-                v-model="listQuery.end_time"
78
+                v-model="query.end_time"
60
                 prefix-icon="el-icon-date"
79
                 prefix-icon="el-icon-date"
61
                 @change="changeEndTime"
80
                 @change="changeEndTime"
62
                 :editable="false"
81
                 :editable="false"
82
+                :picker-options="pickerOptions"
83
+                style="width: 150px;"
63
                 type="date"
84
                 type="date"
64
-                style="max-width:160px"
65
                 placeholder="选择日期时间"
85
                 placeholder="选择日期时间"
66
                 align="right"
86
                 align="right"
67
                 format="yyyy-MM-dd"
87
                 format="yyyy-MM-dd"
74
             </div>
94
             </div>
75
             <div class="tableTitle">统计表</div>
95
             <div class="tableTitle">统计表</div>
76
             <div>
96
             <div>
77
-              <el-table :data="tableData1" style="width: 100%" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
78
-                <el-table-column fixed prop="date" label="日期"></el-table-column>
79
-                <el-table-column prop="name" label="姓名"></el-table-column>
80
-                <el-table-column prop="province" label="省份"></el-table-column>
81
-                <el-table-column prop="city" label="市区"></el-table-column>
97
+              <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
98
+                <el-table-column fixed label="日期" align="center">
99
+                  <template slot-scope="scope">
100
+                    {{scope.row.assessment_date | parseTime("{y}-{m}-{d}") }}
101
+                  </template>
102
+                </el-table-column>
103
+
104
+                <el-table-column label="姓名" align="center">
105
+                  <template slot-scope="scope">
106
+                    {{scope.row.patient.name}}
107
+                  </template>
108
+                </el-table-column>
109
+
110
+                <el-table-column label="干体重" align="center">
111
+                  <template slot-scope="scope">
112
+                    {{scope.row.dry_weight?scope.row.dry_weight:''}}
113
+
114
+                    <!--{{// scope.row.patient.lapseto == 1 ? '留治':'转出'}}-->
115
+                  </template>
116
+                </el-table-column>
117
+
118
+                <el-table-column label="前次透后体重" align="center">
119
+                  <template slot-scope="scope">
120
+                    {{scope.row.last_after_weight?scope.row.last_after_weight:''}}
121
+
122
+                    <!--<div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>-->
123
+                  </template>
124
+                </el-table-column>
125
+
126
+                <el-table-column label="透前体重" align="center">
127
+                  <template slot-scope="scope">
128
+                    {{scope.row.weight_before?scope.row.weight_before:''}}
129
+
130
+                    <!--<div v-if="scope.row.min_monitor.systolic_blood_pressure">{{ scope.row.min_monitor.systolic_blood_pressure}} /{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>-->
131
+                  </template>
132
+                </el-table-column>
133
+
134
+                <el-table-column label="透后体重" align="center">
135
+                  <template slot-scope="scope">
136
+                    <!--<div v-if="scope.row.max_monitor.systolic_blood_pressure">{{ scope.row.max_monitor.systolic_blood_pressure}} /{{ scope.row.max_monitor.diastolic_blood_pressure}}</div>-->
137
+                    {{scope.row.after.weight_after?scope.row.after.weight_after:''}}
138
+
139
+
140
+                  </template>
141
+                </el-table-column>
142
+
143
+                <el-table-column label="体重增加" align="center">
144
+                  <template slot-scope="scope">
145
+                    <div v-if="scope.row.weight_before && scope.row.last_after_weight">{{(scope.row.weight_before - scope.row.last_after_weight).toFixed(1)}}</div>
146
+
147
+                    <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
148
+                    <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
149
+                  </template>
150
+                </el-table-column>
151
+
82
               </el-table>
152
               </el-table>
83
 
153
 
84
               <el-pagination
154
               <el-pagination
85
                 align="right"
155
                 align="right"
86
                 @size-change="handleSizeChange"
156
                 @size-change="handleSizeChange"
87
                 @current-change="handleCurrentChange"
157
                 @current-change="handleCurrentChange"
88
-                :current-page="listQuery.page"
158
+                :current-page="query.page"
89
                 :page-sizes="[10, 20, 50, 100]"
159
                 :page-sizes="[10, 20, 50, 100]"
90
                 :page-size="10"
160
                 :page-size="10"
91
                 background
161
                 background
105
 import echarts from "echarts";
175
 import echarts from "echarts";
106
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
176
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
107
 import LineChart from "../../qcd/components/LineChart";
177
 import LineChart from "../../qcd/components/LineChart";
178
+
179
+import { getCurrentOrgPatients } from "@/api/common/common";
180
+import {GetDialysisPatientWeightChartData,GetDialysisWeightTableData} from "@/api/common/statistics"
181
+import { PostSearch } from '@/api/patient'
182
+import { uParseTime } from "@/utils/tools";
183
+
184
+
108
 export default {
185
 export default {
109
   components: {
186
   components: {
110
     LineChart,
187
     LineChart,
112
   },
189
   },
113
   data() {
190
   data() {
114
     return {
191
     return {
192
+      pickerOptions: {
193
+        disabledDate(time) {
194
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
195
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
196
+        }
197
+      },
198
+      patientsData:[],
199
+      tableData: [],
200
+      loading: false,
201
+      search_value: '',
202
+      total: 0,
203
+      query: {
204
+        patient_id: '',
205
+        statistics_type: 1,
206
+        start_time: '',
207
+        end_time: '',
208
+        limit: 10,
209
+        page: 1
210
+      },
211
+      options: [
212
+        { value: 1, name: '干体重' },
213
+        { value: 2, name: '透前体重' },
214
+        { value: 3, name: '体重增加' },
215
+        { value: 4, name: '透后体重' },
216
+      ],
217
+
115
       crumbs: [
218
       crumbs: [
116
-        { path: false, name: "科室质控" },
219
+        { path: false, name: "质控管理" },
117
         { path: false, name: "患者血压详情" }
220
         { path: false, name: "患者血压详情" }
118
       ],
221
       ],
119
-      tableData: [
120
-        {
121
-          date: "2016",
122
-          name: "王小虎"
123
-        },
124
-        {
125
-          date: "2016",
126
-          name: "王小虎"
127
-        },
128
-        {
129
-          date: "2016",
130
-          name: "王小虎"
131
-        },
132
-        {
133
-          date: "2016",
134
-          name: "王小虎"
135
-        },
136
-        {
137
-          date: "2016",
138
-          name: "王小虎"
139
-        },
140
-        {
141
-          date: "2016",
142
-          name: "王小虎"
143
-        },
144
-        {
145
-          date: "2016",
146
-          name: "王小虎"
147
-        },
148
-        {
149
-          date: "2016",
150
-          name: "王小虎"
151
-        },
152
-        {
153
-          date: "2016",
154
-          name: "王小虎"
155
-        },
156
-        {
157
-          date: "2016",
158
-          name: "王小虎"
159
-        },
160
-        {
161
-          date: "2016",
162
-          name: "王小虎"
163
-        },
164
-        {
165
-          date: "2016",
166
-          name: "王小虎"
167
-        }
168
-      ],
169
-      listQuery: {
170
-        start_time: "",
171
-        end_time: "",
172
-        page: 1,
173
-        limit: 10
174
-      },
222
+
175
       chart: {
223
       chart: {
176
         title: {
224
         title: {
177
           text: "ECharts 入门示例"
225
           text: "ECharts 入门示例"
178
         },
226
         },
179
         tooltip: {},
227
         tooltip: {},
180
         legend: {
228
         legend: {
181
-          data: ["透前体重", "透后体重"],
229
+          data: [],
182
           left: 0
230
           left: 0
183
         },
231
         },
184
         xAxis: {
232
         xAxis: {
185
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
233
+          data: []
186
         },
234
         },
187
         yAxis: {
235
         yAxis: {
188
           axisLabel: {
236
           axisLabel: {
192
         },
240
         },
193
         series: [
241
         series: [
194
           {
242
           {
195
-            name: "透前体重",
243
+            name: "",
196
             type: "line",
244
             type: "line",
197
             data: [
245
             data: [
198
-              "78.57",
199
-              "50",
200
-              "80",
201
-              "93.33",
202
-              "92.86",
203
-              "100",
204
-              "12",
205
-              "77",
206
-              "37"
246
+
207
             ],
247
             ],
208
             barWidth: 30,
248
             barWidth: 30,
209
             label: {
249
             label: {
210
               normal: {
250
               normal: {
211
                 show: true,
251
                 show: true,
212
                 position: "top",
252
                 position: "top",
213
-                formatter: "{c}"
253
+                formatter: "{c}"
214
               }
254
               }
215
             },
255
             },
216
             //配置样式
256
             //配置样式
223
               }
263
               }
224
             }
264
             }
225
           },
265
           },
226
-          {
227
-            name: "透后体重",
228
-            type: "line",
229
-            data: ["10", "20", "30", "53.33", "42.86", "100", "60", "27", "97"],
230
-            barWidth: 30,
231
-            label: {
232
-              normal: {
233
-                show: true,
234
-                position: "top",
235
-                formatter: "{c}次"
236
-              }
237
-            },
238
-            //配置样式
239
-            itemStyle: {
240
-              normal: {
241
-                color: "#dd7383", //折点颜色
242
-                lineStyle: {
243
-                  color: "#dd7383" //折线颜色
244
-                }
245
-              }
246
-            }
247
-          }
248
         ]
266
         ]
249
       },
267
       },
250
-      tableData1: [
251
-        {
252
-          date: "2016-05-03",
253
-          name: "王小虎",
254
-          province: "上海",
255
-          city: "普陀区",
256
-          address: "上海市普陀区金沙江路 1518 弄",
257
-          zip: 200333
258
-        },
259
-        {
260
-          date: "2016-05-02",
261
-          name: "王小虎",
262
-          province: "上海",
263
-          city: "普陀区",
264
-          address: "上海市普陀区金沙江路 1518 弄",
265
-          zip: 200333
266
-        },
267
-        {
268
-          date: "2016-05-04",
269
-          name: "王小虎",
270
-          province: "上海",
271
-          city: "普陀区",
272
-          address: "上海市普陀区金沙江路 1518 弄",
273
-          zip: 200333
274
-        },
275
-        {
276
-          date: "2016-05-01",
277
-          name: "王小虎",
278
-          province: "上海",
279
-          city: "普陀区",
280
-          address: "上海市普陀区金沙江路 1518 弄",
281
-          zip: 200333
282
-        },
283
-        {
284
-          date: "2016-05-08",
285
-          name: "王小虎",
286
-          province: "上海",
287
-          city: "普陀区",
288
-          address: "上海市普陀区金沙江路 1518 弄",
289
-          zip: 200333
290
-        },
291
-        {
292
-          date: "2016-05-06",
293
-          name: "王小虎",
294
-          province: "上海",
295
-          city: "普陀区",
296
-          address: "上海市普陀区金沙江路 1518 弄",
297
-          zip: 200333
298
-        },
299
-        {
300
-          date: "2016-05-07",
301
-          name: "王小虎",
302
-          province: "上海",
303
-          city: "普陀区",
304
-          address: "上海市普陀区金沙江路 1518 弄",
305
-          zip: 200333
306
-        },
307
-        {
308
-          date: "2016-05-08",
309
-          name: "王小虎",
310
-          province: "上海",
311
-          city: "普陀区",
312
-          address: "上海市普陀区金沙江路 1518 弄",
313
-          zip: 200333
314
-        },
315
-        {
316
-          date: "2016-05-06",
317
-          name: "王小虎",
318
-          province: "上海",
319
-          city: "普陀区",
320
-          address: "上海市普陀区金沙江路 1518 弄",
321
-          zip: 200333
322
-        },
323
-        {
324
-          date: "2016-05-07",
325
-          name: "王小虎",
326
-          province: "上海",
327
-          city: "普陀区",
328
-          address: "上海市普陀区金沙江路 1518 弄",
329
-          zip: 200333
330
-        }
331
-      ]
332
     };
268
     };
333
   },
269
   },
334
   methods: {
270
   methods: {
337
     },
273
     },
338
     clickQuality(index) {
274
     clickQuality(index) {
339
       this.quality = index;
275
       this.quality = index;
340
-    }
276
+    },  changeProject(val){
277
+      this.query.statistics_type = val
278
+      this.query.page = 1
279
+      this.GetDialysisPatientWeightChartData(this.query)
280
+
281
+    },
282
+    handleChange(val){
283
+      this.query.patient_id = val.id
284
+      this.query.page = 1
285
+      this.GetDialysisWeightTableData(this.query)
286
+      this.GetDialysisPatientWeightChartData(this.query)
287
+    },
288
+    handleSizeChange(limit) {
289
+      this.query.limit = limit;
290
+      this.GetDialysisWeightTableData(this.query)
291
+
292
+
293
+    },
294
+    handleCurrentChange(page) {
295
+      this.query.page = page;
296
+      this.GetDialysisWeightTableData(this.query)
297
+
298
+
299
+    },
300
+    changeTime(val) {
301
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
302
+      if (time > 0) {
303
+        this.$message.error("结束时间不能小于开始时间");
304
+        this.query.start_time = "";
305
+      } else {
306
+        // this.getDialysisList()
307
+        this.query.page = 1;
308
+        this.GetDialysisPatientWeightChartData(this.query)
309
+        this.GetDialysisWeightTableData(this.query)
310
+
311
+      }
312
+
313
+    },
314
+    changeEndTime(val) {
315
+      var time =
316
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
317
+      if (time < 0) {
318
+        this.$message.error("结束时间不能小于开始时间");
319
+        this.query.end_time = "";
320
+      } else {
321
+        this.query.page = 1;
322
+        this.GetDialysisPatientWeightChartData(this.query)
323
+        this.GetDialysisWeightTableData(this.query)
324
+
325
+      }
326
+    },
327
+    getTimestamp(time) {
328
+      // 把时间日期转成时间戳
329
+      return new Date(time).getTime() / 1000;
330
+    },GetDialysisWeightTableData(params) {
331
+      this.loading = true
332
+      GetDialysisWeightTableData(params)
333
+        .then(rs => {
334
+          var resp = rs.data
335
+          if (resp.state == 1) {
336
+            this.loading = false
337
+            this.tableData = []
338
+            for (let i = 0; i < resp.data.data.length; i++) {
339
+              this.tableData.push(resp.data.data[i])
340
+            }
341
+            this.total = resp.data.total
342
+          } else {
343
+            this.loading = false
344
+          }
345
+        })
346
+        .catch(error => {
347
+
348
+        })
349
+    },
350
+    GetDialysisPatientWeightChartData(params) {
351
+      this.chart.xAxis.data = []
352
+      this.chart.series[0].data = []
353
+      GetDialysisPatientWeightChartData(params)
354
+        .then(rs => {
355
+          var resp = rs.data
356
+          if (resp.state == 1) {
357
+            for (let i = 0; i < resp.data.data.length; i++) {
358
+              this.chart.xAxis.data.push(resp.data.data[i].date)
359
+              this.chart.series[0].data.push(parseFloat(resp.data.data[i].value).toFixed(1))
360
+            }
361
+          } else {
362
+          }
363
+        })
364
+        .catch(error => {
365
+        })
366
+    },
367
+    handleSelect(val) {
368
+      this.query.patient_id = val.id
369
+      this.query.page = 1
370
+      this.GetDialysisPatientWeightChartData(this.query)
371
+      this.GetDialysisWeightTableData(this.query)
372
+      for (let i = 0;i < this.patientsData.length; i++){
373
+        if (this.patientsData[i].id == val.id){
374
+          this.$refs.table.setCurrentRow(this.patientsData[i])
375
+        }
376
+      }
377
+
378
+    },
379
+    querySearchAsync(keyword, cb) {
380
+      let key = ''
381
+      if (keyword != undefined) {
382
+        key = keyword
383
+      }
384
+      let searchArray = []
385
+      PostSearch(key).then(response => {
386
+        if (response.data.state == 1) {
387
+          searchArray = response.data.data.patient
388
+          cb(searchArray)
389
+        } else {
390
+          cb([])
391
+        }
392
+      })
393
+    }, getCurrentOrgPatients(){
394
+      getCurrentOrgPatients().then(response=>{
395
+        if(response.data.state == 1){
396
+          var patients = response.data.data.patients
397
+          this.patientsData = patients
398
+          for (let i = 0;i < this.patientsData.length; i++){
399
+            if (this.patientsData[i].id == this.query.patient_id){
400
+              this.$refs.table.setCurrentRow(this.patientsData[i])
401
+            }
402
+          }
403
+
404
+        }
405
+      })
406
+    },
407
+  },created() {
408
+    var date = new Date()
409
+    var year = date.getFullYear() //获取完整的年份(4位)
410
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
411
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
412
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
413
+    this.query.patient_id = this.$route.query.id
414
+    this.query.end_time = year + '-' + month + '-' + day
415
+    this.query.start_time = year + '-' + last_month + '-' + day
416
+    this.query.statistics_type = 1
417
+    this.GetDialysisPatientWeightChartData(this.query)
418
+    this.GetDialysisWeightTableData(this.query)
419
+    this.getCurrentOrgPatients()
420
+
341
   }
421
   }
342
 };
422
 };
343
 </script>
423
 </script>

+ 47 - 77
src/xt_pages/qcd/officesControlAnalysis/project.vue View File

95
       options1: [
95
       options1: [
96
         {
96
         {
97
           value: 1,
97
           value: 1,
98
-          label: "按季度对比统计"
98
+          label: "按季度统计对比"
99
         },
99
         },
100
         {
100
         {
101
           value: 2,
101
           value: 2,
102
-          label: "按月份对比统计"
102
+          label: "按月份统计对比"
103
         },
103
         },
104
       ],
104
       ],
105
       value: "请选项",
105
       value: "请选项",
202
     },
202
     },
203
     chooseType(val) {
203
     chooseType(val) {
204
       this.type = val;
204
       this.type = val;
205
-      console.log("val",val)
206
       //按季度
205
       //按季度
207
       if(val == 1){
206
       if(val == 1){
208
         this.getlist()
207
         this.getlist()
214
      
213
      
215
     },
214
     },
216
     changeOptions(val){
215
     changeOptions(val){
216
+      
217
+     
218
+     if(this.type == 1){
219
+        this.lapseto = val
220
+        this.getlist()
221
+        return false
222
+     }
223
+
217
      if(this.type == 2){
224
      if(this.type == 2){
225
+        this.lapseto = val
218
         this.getMonthList()
226
         this.getMonthList()
219
         return false
227
         return false
220
       }
228
       }
221
-      this.lapseto = val
222
-      this.getlist()
229
+      
230
+ 
223
        
231
        
224
     },
232
     },
225
     getNormData(){
233
     getNormData(){
226
         getNormData().then(response=>{
234
         getNormData().then(response=>{
227
             var normdata = response.data.data.normdata
235
             var normdata = response.data.data.normdata
228
-            console.log("normdata",normdata)
229
             for(let i=0;i<normdata.length;i++){
236
             for(let i=0;i<normdata.length;i++){
230
              this.mode_type = normdata[0].inspection_minor
237
              this.mode_type = normdata[0].inspection_minor
231
             }
238
             }
232
             this.normdata = normdata
239
             this.normdata = normdata
233
             this.getlist()
240
             this.getlist()
234
-           // this.getMonthList()
235
         })
241
         })
236
     },
242
     },
237
     handleModeType(val){
243
     handleModeType(val){
238
-       console.log("触发了额",this.type)
239
        if(this.type == 2){
244
        if(this.type == 2){
240
         this.getMonthList()
245
         this.getMonthList()
241
         return false
246
         return false
250
          this.modesData.series = []
255
          this.modesData.series = []
251
          this.modesData.xAxis = []
256
          this.modesData.xAxis = []
252
         const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
257
         const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
253
-       // console.log("本月开始时间",firstQuarterStart)
254
         const firstQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
258
         const firstQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
255
-       // console.log("本月结束时间",firstQuarterEnd)
259
+  
256
 
260
 
257
         //第一季度
261
         //第一季度
258
         const first_quarter_start =  moment().startOf('year').format('YYYY-MM-DD')
262
         const first_quarter_start =  moment().startOf('year').format('YYYY-MM-DD')
259
-       // console.log("第一季度",first_quarter_start)
260
         const first_qurter_end = moment().month(2).endOf('month').format("YYYY-MM-DD")
263
         const first_qurter_end = moment().month(2).endOf('month').format("YYYY-MM-DD")
261
-      // console.log("第一季度",first_qurter_end)
264
+    
262
         //第二季度
265
         //第二季度
263
         const second_qurter_start = moment().month(3).startOf('month').format("YYYY-MM-DD")
266
         const second_qurter_start = moment().month(3).startOf('month').format("YYYY-MM-DD")
264
-      //  console.log("第二季度",second_qurter_start)
265
         const second_qurter_end = moment().month(5).endOf('month').format("YYYY-MM-DD")
267
         const second_qurter_end = moment().month(5).endOf('month').format("YYYY-MM-DD")
266
-      //  console.log("第二季度",second_qurter_end)
268
+   
267
         //第三季度
269
         //第三季度
268
         const three_qurter_start = moment().month(6).startOf('month').format("YYYY-MM-DD")
270
         const three_qurter_start = moment().month(6).startOf('month').format("YYYY-MM-DD")
269
-      //  console.log("第三季度",three_qurter_start)
270
         const three_qurter_end = moment().month(8).endOf('month').format("YYYY-MM-DD")
271
         const three_qurter_end = moment().month(8).endOf('month').format("YYYY-MM-DD")
271
-      //  console.log("第三季度",three_qurter_end)
272
+  
272
         //第四季度
273
         //第四季度
273
          const four_qurter_start = moment().month(9).startOf('month').format("YYYY-MM-DD")
274
          const four_qurter_start = moment().month(9).startOf('month').format("YYYY-MM-DD")
274
-      //  console.log("第四季度",four_qurter_start)
275
-        const four_qurter_end = moment().month(11).endOf('month').format("YYYY-MM-DD")
276
-      //  console.log("第四季度",four_qurter_end)
275
+         const four_qurter_end = moment().month(11).endOf('month').format("YYYY-MM-DD")
276
+ 
277
      
277
      
278
          const params = {
278
          const params = {
279
            lapseto:this.lapseto,
279
            lapseto:this.lapseto,
290
            four_qurter_start:four_qurter_start,
290
            four_qurter_start:four_qurter_start,
291
            four_qurter_end:four_qurter_end,
291
            four_qurter_end:four_qurter_end,
292
          }
292
          }
293
-         console.log("params",params)
294
       getProjectList(params).then(response=>{
293
       getProjectList(params).then(response=>{
295
         if(response.data.state === 1){
294
         if(response.data.state === 1){
296
           var list = response.data.data.list
295
           var list = response.data.data.list
297
-         // console.log("数据源",list)
296
+      
298
           var standList =  response.data.data.standList
297
           var standList =  response.data.data.standList
299
-         // console.log("standList",standList)
298
+         
300
           var newArr = [
299
           var newArr = [
301
             {Total:"第一季度",Count:1,NoCount: 0},
300
             {Total:"第一季度",Count:1,NoCount: 0},
302
             {Total:"第二季度",Count:1,NoCount: 0},
301
             {Total:"第二季度",Count:1,NoCount: 0},
310
         arrTwo.map(item => {
309
         arrTwo.map(item => {
311
               list.push(item)
310
               list.push(item)
312
            })
311
            })
313
-        //  console.log("list",list)
312
+     
314
          
313
          
315
          for(let i=0;i<list.length;i++){
314
          for(let i=0;i<list.length;i++){
316
             if(list[i].Total == "第一季度"){
315
             if(list[i].Total == "第一季度"){
355
           standArr.map(item=>{
354
           standArr.map(item=>{
356
             standList.push(item)
355
             standList.push(item)
357
           })
356
           })
358
-         //  console.log("standList",standList)
359
-
360
-        
361
-       //  console.log("list-----",list)
362
          var arrFive = []
357
          var arrFive = []
363
           for(let i=0;i<list.length;i++){
358
           for(let i=0;i<list.length;i++){
364
              for(let j=0;j<standList.length;j++){
359
              for(let j=0;j<standList.length;j++){
369
              }
364
              }
370
           }
365
           }
371
         
366
         
372
-       // console.log("arrFive",arrFive)
367
+      
373
         
368
         
374
         for(const key in arrFive){
369
         for(const key in arrFive){
375
             this.modesData.xAxis.push(arrFive[key].Total);
370
             this.modesData.xAxis.push(arrFive[key].Total);
379
 
374
 
380
           this.chart.series[0].data = this.modesData.series
375
           this.chart.series[0].data = this.modesData.series
381
           this.chart.xAxis.data = this.modesData.xAxis
376
           this.chart.xAxis.data = this.modesData.xAxis
382
-        //  console.log("222000",this.modesData)
377
+       
383
         }
378
         }
384
       })
379
       })
385
     },
380
     },
386
      arrayDate(array1,array2){
381
      arrayDate(array1,array2){
387
-      //  console.log("array1",array1)
388
-      //  console.log("array2",array2)
389
         var array1 = array1;
382
         var array1 = array1;
390
         var array2 = array2;
383
         var array2 = array2;
391
         var result = [];
384
         var result = [];
405
                 result.push(obj);
398
                 result.push(obj);
406
             }
399
             }
407
         }
400
         }
408
-      //  console.log("result",result)
409
         return result;
401
         return result;
410
     },
402
     },
411
     arrayDateTwo(array1,array2){
403
     arrayDateTwo(array1,array2){
412
-      //   console.log("array1",array1)
413
-      //   console.log("array2",array2)
414
         var array1 = array1;
404
         var array1 = array1;
415
         var array2 = array2;
405
         var array2 = array2;
416
         var result = [];
406
         var result = [];
430
                 result.push(obj);
420
                 result.push(obj);
431
             }
421
             }
432
         }
422
         }
433
-      //  console.log("resultTwo",result)
434
         return result;
423
         return result;
435
     },
424
     },
436
      arrayDateThree(array1,array2){
425
      arrayDateThree(array1,array2){
437
-        // console.log("array1",array1)
438
-        // console.log("array2",array2)
439
         var array1 = array1;
426
         var array1 = array1;
440
         var array2 = array2;
427
         var array2 = array2;
441
         var result = [];
428
         var result = [];
455
                 result.push(obj);
442
                 result.push(obj);
456
             }
443
             }
457
         }
444
         }
458
-       console.log("resultThree",result)
459
         return result;
445
         return result;
460
     },
446
     },
461
     arrayDateFour(array1,array2){
447
     arrayDateFour(array1,array2){
462
-      //   console.log("array1",array1)
463
-      //   console.log("array2",array2)
464
         var array1 = array1;
448
         var array1 = array1;
465
         var array2 = array2;
449
         var array2 = array2;
466
         var result = [];
450
         var result = [];
480
                 result.push(obj);
464
                 result.push(obj);
481
             }
465
             }
482
         }
466
         }
483
-      //  console.log("resultTwo",result)
484
         return result;
467
         return result;
485
     },
468
     },
486
      compare(property){
469
      compare(property){
495
     getMonthList(){
478
     getMonthList(){
496
          this.modesData.series = []
479
          this.modesData.series = []
497
          this.modesData.xAxis = []
480
          this.modesData.xAxis = []
498
-        const januaryStart = moment().month(0).startOf('month').format("YYYY-MM-DD")
499
-        console.log("一月始",januaryStart)
500
-        const januaryEnd = moment().month(0).endOf('month').format("YYYY-MM-DD")
501
-        console.log("一月末",januaryEnd)
481
+         const januaryStart = moment().month(0).startOf('month').format("YYYY-MM-DD")
482
+         const januaryEnd = moment().month(0).endOf('month').format("YYYY-MM-DD")
483
+       
502
 
484
 
503
         const  febStart = moment().month(1).startOf('month').format("YYYY-MM-DD")
485
         const  febStart = moment().month(1).startOf('month').format("YYYY-MM-DD")
504
-        console.log("二月始",febStart)
505
         const febEnd = moment().month(1).endOf('month').format("YYYY-MM-DD")
486
         const febEnd = moment().month(1).endOf('month').format("YYYY-MM-DD")
506
-        console.log("二月末",febEnd)
487
+       
507
 
488
 
508
         const  marchStart = moment().month(2).startOf('month').format("YYYY-MM-DD")
489
         const  marchStart = moment().month(2).startOf('month').format("YYYY-MM-DD")
509
-        console.log("三月始",marchStart)
510
         const marchEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
490
         const marchEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
511
-        console.log("三月末",marchEnd)
491
+  
512
 
492
 
513
         const  aprStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
493
         const  aprStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
514
-        console.log("四月始",aprStart)
515
         const aprEnd = moment().month(3).endOf('month').format("YYYY-MM-DD")
494
         const aprEnd = moment().month(3).endOf('month').format("YYYY-MM-DD")
516
-        console.log("四月末",aprEnd)
495
+   
517
 
496
 
518
         const  mayStart = moment().month(4).startOf('month').format("YYYY-MM-DD")
497
         const  mayStart = moment().month(4).startOf('month').format("YYYY-MM-DD")
519
-        console.log("五月始",mayStart)
520
         const mayEnd = moment().month(4).endOf('month').format("YYYY-MM-DD")
498
         const mayEnd = moment().month(4).endOf('month').format("YYYY-MM-DD")
521
-        console.log("五月末",mayEnd)
499
+        
522
 
500
 
523
         const  junStart = moment().month(5).startOf('month').format("YYYY-MM-DD")
501
         const  junStart = moment().month(5).startOf('month').format("YYYY-MM-DD")
524
-        console.log("六月始",junStart)
525
         const junEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
502
         const junEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
526
-        console.log("六月末",junEnd)
503
+     
527
 
504
 
528
         const  julStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
505
         const  julStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
529
-        console.log("7月始",julStart)
530
         const julEnd = moment().month(6).endOf('month').format("YYYY-MM-DD")
506
         const julEnd = moment().month(6).endOf('month').format("YYYY-MM-DD")
531
-        console.log("7月末",julEnd)
507
+     
532
 
508
 
533
         const  augStart = moment().month(7).startOf('month').format("YYYY-MM-DD")
509
         const  augStart = moment().month(7).startOf('month').format("YYYY-MM-DD")
534
-        console.log("8月始",augStart)
535
         const augEnd = moment().month(7).endOf('month').format("YYYY-MM-DD")
510
         const augEnd = moment().month(7).endOf('month').format("YYYY-MM-DD")
536
-        console.log("8月末",augEnd)
511
+
537
 
512
 
538
         const  sepStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
513
         const  sepStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
539
-        console.log("9月始",sepStart)
540
         const sepEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
514
         const sepEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
541
-        console.log("9月末",sepEnd)
515
+     
542
 
516
 
543
         const  octStart = moment().month(9).startOf('month').format("YYYY-MM-DD")
517
         const  octStart = moment().month(9).startOf('month').format("YYYY-MM-DD")
544
-        console.log("10月始",octStart)
545
         const octEnd = moment().month(9).endOf('month').format("YYYY-MM-DD")
518
         const octEnd = moment().month(9).endOf('month').format("YYYY-MM-DD")
546
-        console.log("10月末",octEnd)
519
+
547
 
520
 
548
         const  novStart = moment().month(10).startOf('month').format("YYYY-MM-DD")
521
         const  novStart = moment().month(10).startOf('month').format("YYYY-MM-DD")
549
-        console.log("11月始",novStart)
550
         const novEnd = moment().month(10).endOf('month').format("YYYY-MM-DD")
522
         const novEnd = moment().month(10).endOf('month').format("YYYY-MM-DD")
551
-        console.log("11月末",novEnd)
523
+   
552
         
524
         
553
         const  decStart = moment().month(11).startOf('month').format("YYYY-MM-DD")
525
         const  decStart = moment().month(11).startOf('month').format("YYYY-MM-DD")
554
-        console.log("12月始",decStart)
555
         const decEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
526
         const decEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
556
-        console.log("12月末",decEnd)
527
+  
557
         
528
         
558
         const params = {
529
         const params = {
559
           lapseto:this.lapseto,
530
           lapseto:this.lapseto,
584
           decStart:decStart,
555
           decStart:decStart,
585
           decEnd:decEnd,    
556
           decEnd:decEnd,    
586
         }
557
         }
587
-       console.log("params222222",params)
558
+    
588
        getMonthProjectList(params).then(response=>{
559
        getMonthProjectList(params).then(response=>{
589
         if(response.data.state === 1){
560
         if(response.data.state === 1){
590
             var monthlist = response.data.data.monthlist
561
             var monthlist = response.data.data.monthlist
591
-            console.log("monthlist++++++",monthlist)
562
+     
592
             var newArr = [
563
             var newArr = [
593
               {Total:"一月",Count:1,NoCount: 0},
564
               {Total:"一月",Count:1,NoCount: 0},
594
               {Total:"二月",Count:1,NoCount: 0},
565
               {Total:"二月",Count:1,NoCount: 0},
621
            
592
            
622
              //获取2个数组不同的部分
593
              //获取2个数组不同的部分
623
             var standArr = this.arrayDateThree(monthlist,newArr)  
594
             var standArr = this.arrayDateThree(monthlist,newArr)  
624
-            console.log("standArr",standArr)
595
+          
625
             standArr.map(item=>{
596
             standArr.map(item=>{
626
                 monthlist.push(item)
597
                 monthlist.push(item)
627
               }) 
598
               }) 
707
                   monthlist[i].Total = "十二月"
678
                   monthlist[i].Total = "十二月"
708
                 }
679
                 }
709
              }
680
              }
710
-              console.log("monthlist-------------------------",monthlist)
711
-             var monthNolist = response.data.data.monthNolist
712
-             console.log("monthNolist",monthNolist)
713
              
681
              
714
-            var standArrTwo = this.arrayDateThree(monthNolist,newArrTwo)  
715
-             console.log("standArrTwo",standArrTwo)
716
-
682
+             var monthNolist = response.data.data.monthNolist
683
+            
684
+           
685
+             var standArrTwo = this.arrayDateThree(monthNolist,newArrTwo)  
686
+           
717
              standArrTwo.map(item=>{
687
              standArrTwo.map(item=>{
718
                 monthNolist.push(item)
688
                 monthNolist.push(item)
719
               }) 
689
               }) 
729
                  }
699
                  }
730
                }
700
                }
731
              }
701
              }
732
-             console.log("arrOne",arrOne)
702
+          
733
               
703
               
734
             for(const key in arrOne){
704
             for(const key in arrOne){
735
               this.modesData.xAxis.push(arrOne[key].Total);
705
               this.modesData.xAxis.push(arrOne[key].Total);

+ 231 - 106
src/xt_pages/qcd/officesControlAnalysis/time.vue View File

40
             align="right"
40
             align="right"
41
             format="yyyy-MM-dd"
41
             format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
42
             value-format="yyyy-MM-dd"
43
+            :picker-options="pickerOptions"
43
           ></el-date-picker>
44
           ></el-date-picker>
44
           <span class>-</span>
45
           <span class>-</span>
45
           <el-date-picker
46
           <el-date-picker
53
             align="right"
54
             align="right"
54
             format="yyyy-MM-dd"
55
             format="yyyy-MM-dd"
55
             value-format="yyyy-MM-dd"
56
             value-format="yyyy-MM-dd"
57
+            :picker-options="pickerOptions"
56
           ></el-date-picker>
58
           ></el-date-picker>
57
         </div>
59
         </div>
58
       </div>
60
       </div>
59
       <div class="cell clearfix">
61
       <div class="cell clearfix">
60
-        <div class="time newLi" v-if="type == '按季度对比统计'">
62
+        <div class="time newLi" v-if="type == '按季度统计对比'">
61
           <ul class>
63
           <ul class>
62
             <li
64
             <li
63
               :class="item.state == quarterType ? 'active' : ''"
65
               :class="item.state == quarterType ? 'active' : ''"
67
             >{{ item.label }}</li>
69
             >{{ item.label }}</li>
68
           </ul>
70
           </ul>
69
         </div>
71
         </div>
70
-        <div class="time newLi" v-if="type == '按月份对比统计'">
72
+        <div class="time newLi" v-if="type == '按月份统计对比'">
71
           <ul class>
73
           <ul class>
72
             <li
74
             <li
73
               :class="item.state == monthType ? 'active' : ''"
75
               :class="item.state == monthType ? 'active' : ''"
110
   },
112
   },
111
   data() {
113
   data() {
112
     return {
114
     return {
115
+      pickerOptions: {
116
+        disabledDate(time) {
117
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
118
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
119
+        }
120
+      },  
121
+      modetype:0,
122
+      startime:"",
123
+      endtime:"",
113
       activeName: "first",
124
       activeName: "first",
114
       modesData: {
125
       modesData: {
115
         xAxis: [],
126
         xAxis: [],
116
         series: []
127
         series: []
117
        },
128
        },
118
       crumbs: [
129
       crumbs: [
119
-        { path: false, name: "科室质控" },
130
+        { path: false, name: "质控管理" },
120
         { path: false, name: "科室质控达标统计" },
131
         { path: false, name: "科室质控达标统计" },
121
         { path: false, name: "按时间分组" }
132
         { path: false, name: "按时间分组" }
122
       ],
133
       ],
145
       value: "请选项",
156
       value: "请选项",
146
       options1: [
157
       options1: [
147
         {
158
         {
148
-          value: "按季度对比统计",
149
-          label: "按季度对比统计"
159
+          value: "按季度统计对比",
160
+          label: "按季度统计对比"
150
         },
161
         },
151
         {
162
         {
152
-          value: "按月份对比统计",
153
-          label: "按月份对比统计"
163
+          value: "按月份统计对比",
164
+          label: "按月份统计对比"
154
         },
165
         },
155
         {
166
         {
156
           value: "自定义",
167
           value: "自定义",
157
           label: "自定义"
168
           label: "自定义"
158
         }
169
         }
159
       ],
170
       ],
160
-      type: "按季度对比统计",
171
+      type: "按季度统计对比",
161
       quarter: [
172
       quarter: [
162
         { value: 0, label: "第一季度", state: 0 },
173
         { value: 0, label: "第一季度", state: 0 },
163
         { value: 1, label: "第二季度", state: 1 },
174
         { value: 1, label: "第二季度", state: 1 },
190
           left: 0
201
           left: 0
191
         },
202
         },
192
         xAxis: {
203
         xAxis: {
193
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
204
+          data: []
194
         },
205
         },
195
         yAxis: {
206
         yAxis: {
196
           axisLabel: {
207
           axisLabel: {
202
           {
213
           {
203
             name: "次数",
214
             name: "次数",
204
             type: "bar",
215
             type: "bar",
205
-            data: [
206
-              "78.57",
207
-              "50",
208
-              "80",
209
-              "93.33",
210
-              "92.86",
211
-              "100",
212
-              "12",
213
-              "77",
214
-              "37"
215
-            ],
216
+            data: [],
216
             barWidth: 30,
217
             barWidth: 30,
217
             label: {
218
             label: {
218
               normal: {
219
               normal: {
274
         this.$router.push({ path: "/qcd/officesControlAnalysis/project" });
275
         this.$router.push({ path: "/qcd/officesControlAnalysis/project" });
275
       }
276
       }
276
     },
277
     },
277
-    changeTime() {},
278
+    changeTime(val) {
279
+      var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
280
+      if (time > 0) {
281
+        this.$message.error("结束时间不能小于开始时间");
282
+        this.listQuery.start_time = "";
283
+      } else {
284
+        this.getlist()
285
+      }
286
+
287
+    },
278
     changeLapseto(val){
288
     changeLapseto(val){
279
-      console.log("val",val)
280
-      this.lapseto = val
281
-      const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
282
-      const firstQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
283
-      this.getFirstQuarter(val,firstQuarterStart,firstQuarterEnd)
289
+      if(val == 0){
290
+        this.lapseto = 0
291
+        this.getlist()
292
+      }
293
+      if(val == 1){
294
+       this.lapseto =1
295
+       this.getlist()
296
+      }
297
+      if(val == 2){
298
+        this.lapseto = 2
299
+        this.getlist()
300
+      }
284
     },
301
     },
285
      
302
      
286
     changeEndTime(val) {
303
     changeEndTime(val) {
290
         this.$message.error("结束时间不能小于开始时间");
307
         this.$message.error("结束时间不能小于开始时间");
291
         this.listQuery.end_time = "";
308
         this.listQuery.end_time = "";
292
       } else {
309
       } else {
310
+        this.getlist()
293
       }
311
       }
312
+    },
313
+     getTimestamp(time) {
314
+      // 把时间日期转成时间戳
315
+      return new Date(time).getTime() / 1000;
294
     },
316
     },
295
     selectLapseTo(state) {
317
     selectLapseTo(state) {
296
       this.stateType = state;
318
       this.stateType = state;
297
       this.listQuery.state = state;
319
       this.listQuery.state = state;
298
     },
320
     },
299
     chooseType(val) {
321
     chooseType(val) {
300
-      console.log(val);
301
       this.type = val;
322
       this.type = val;
323
+      if(val == "按月份统计对比"){
324
+         this.modetype = 0
325
+        
326
+      }
327
+       if(val == "按季度统计对比"){
328
+         this.modetype = 1
329
+         
330
+      }
331
+      if(val == "自定义"){
332
+        this.modetype = 2
333
+      }
334
+     
302
     },
335
     },
303
     chooseQuarter(quarter) {
336
     chooseQuarter(quarter) {
304
       this.quarterType = quarter;
337
       this.quarterType = quarter;
305
       //第一季度
338
       //第一季度
306
       if(quarter === 0){
339
       if(quarter === 0){
307
-        //本月的开始时间
308
-        const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
309
-        const firstQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
310
-        this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
340
+         this.modetype = 0
341
+        this.getlist()
342
+        return false
311
       }
343
       }
312
 
344
 
313
       //第二季度
345
       //第二季度
314
       if(quarter === 1){
346
       if(quarter === 1){
315
-        const febQuarterStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
316
-        const fedQuarterEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
317
-        this.getFirstQuarter(this.lapseto,febQuarterStart,fedQuarterEnd)
347
+         this.modetype = 0
348
+         this.getlist()
349
+         return false
318
       }
350
       }
319
 
351
 
320
       //第三季度
352
       //第三季度
321
       if(quarter === 2){
353
       if(quarter === 2){
322
-        const threeQuarterStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
323
-        const threeQuarterEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
324
-        this.getFirstQuarter(this.lapseto,threeQuarterStart,threeQuarterEnd)
354
+        this.modetype = 0
355
+        this.getlist()
356
+        return false
325
       }
357
       }
326
 
358
 
327
       //第四季度
359
       //第四季度
328
       if(quarter === 3){
360
       if(quarter === 3){
329
-        const fourQuarterStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
330
-        const fourQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
331
-        this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
361
+       this.modetype = 0
362
+        this.getlist()
363
+        return false
332
       }
364
       }
333
 
365
 
334
       
366
       
335
     },
367
     },
336
-    chooseMonth(month) {
337
-      this.monthType = month;
338
-    
368
+    chooseMonth(month) {  
339
       //1月
369
       //1月
340
       if(month == 0){
370
       if(month == 0){
341
-          const fourQuarterStart = moment().month(0).startOf('month').format("YYYY-MM-DD")
342
-          console.log("fourQuarterStart",fourQuarterStart)
343
-          const fourQuarterEnd = moment().month(0).endOf('month').format("YYYY-MM-DD")
344
-           this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
345
-
371
+        this.modetype = 1
372
+         this.monthType = month;
373
+        this.getlist()
374
+         return false
346
       }
375
       }
347
       //2月
376
       //2月
348
       if(month == 1){
377
       if(month == 1){
349
-         const fourQuarterStart = moment().month(1).startOf('month').format("YYYY-MM-DD")
350
-         console.log("fourQuarterStart",fourQuarterStart)
351
-         const fourQuarterEnd = moment().month(1).endOf('month').format("YYYY-MM-DD")
352
-        this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
378
+         this.modetype = 1
379
+          this.monthType = month;
380
+        this.getlist()
381
+        return false
353
       }
382
       }
354
       //
383
       //
355
      //3月
384
      //3月
356
       if(month == 2){
385
       if(month == 2){
357
-         const fourQuarterStart = moment().month(2).startOf('month').format("YYYY-MM-DD")
358
-         console.log("fourQuarterStart",fourQuarterStart)
359
-         const fourQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
360
-         this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
386
+       this.modetype = 1
387
+        this.monthType = month;
388
+       this.getlist()
389
+       return false
361
       }
390
       }
362
       //4月
391
       //4月
363
        if(month == 3){
392
        if(month == 3){
364
-         const fourQuarterStart = moment().month(3).startOf('month').format("YYYY-MM-DD")
365
-         console.log("fourQuarterStart",fourQuarterStart)
366
-         const fourQuarterEnd = moment().month(3).endOf('month').format("YYYY-MM-DD")
367
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
393
+         this.modetype = 1
394
+          this.monthType = month;
395
+         this.getlist()
396
+         return false
368
       }
397
       }
369
       //5月
398
       //5月
370
        if(month == 4){
399
        if(month == 4){
371
-         const fourQuarterStart = moment().month(4).startOf('month').format("YYYY-MM-DD")
372
-         console.log("fourQuarterStart",fourQuarterStart)
373
-         const fourQuarterEnd = moment().month(4).endOf('month').format("YYYY-MM-DD")
374
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
400
+        this.modetype = 1
401
+         this.monthType = month;
402
+         this.getlist()
403
+         return false
375
       }
404
       }
376
       //6月
405
       //6月
377
        if(month == 5){
406
        if(month == 5){
378
-         const fourQuarterStart = moment().month(5).startOf('month').format("YYYY-MM-DD")
379
-         console.log("fourQuarterStart",fourQuarterStart)
380
-         const fourQuarterEnd = moment().month(5).endOf('month').format("YYYY-MM-DD")
381
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
407
+         this.modetype = 1
408
+          this.monthType = month;
409
+        this.getlist()
410
+        return false
382
       }
411
       }
383
       //7月
412
       //7月
384
        if(month == 6){
413
        if(month == 6){
385
-         const fourQuarterStart = moment().month(6).startOf('month').format("YYYY-MM-DD")
386
-         console.log("fourQuarterStart",fourQuarterStart)
387
-         const fourQuarterEnd = moment().month(6).endOf('month').format("YYYY-MM-DD")
388
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
414
+        this.monthType = month;
415
+       this.modetype = 1
416
+        this.getlist()
417
+        return false
389
       }
418
       }
390
       //8月
419
       //8月
391
        if(month == 7){
420
        if(month == 7){
392
-         const fourQuarterStart = moment().month(7).startOf('month').format("YYYY-MM-DD")
393
-         console.log("fourQuarterStart",fourQuarterStart)
394
-         const fourQuarterEnd = moment().month(7).endOf('month').format("YYYY-MM-DD")
395
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
421
+        this.monthType = month;
422
+        this.modetype = 1
423
+        this.getlist()
424
+        return false
396
       }
425
       }
397
       //9月
426
       //9月
398
        if(month == 8){
427
        if(month == 8){
399
-         const fourQuarterStart = moment().month(8).startOf('month').format("YYYY-MM-DD")
400
-         console.log("fourQuarterStart",fourQuarterStart)
401
-         const fourQuarterEnd = moment().month(8).endOf('month').format("YYYY-MM-DD")
402
-         this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
428
+        this.monthType = month;
429
+        this.modetype = 1
430
+        this.getlist()
431
+        return false
403
       }
432
       }
404
       //10月
433
       //10月
405
        if(month == 9){
434
        if(month == 9){
406
-         const fourQuarterStart = moment().month(9).startOf('month').format("YYYY-MM-DD")
407
-         console.log("fourQuarterStart",fourQuarterStart)
408
-         const fourQuarterEnd = moment().month(9).endOf('month').format("YYYY-MM-DD")
409
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
435
+        this.monthType = month;
436
+        this.modetype = 1
437
+        this.getlist()
438
+        return false
410
       }
439
       }
411
       //11月
440
       //11月
412
        if(month == 10){
441
        if(month == 10){
413
-         const fourQuarterStart = moment().month(10).startOf('month').format("YYYY-MM-DD")
414
-         console.log("fourQuarterStart",fourQuarterStart)
415
-         const fourQuarterEnd = moment().month(10).endOf('month').format("YYYY-MM-DD")
416
-         this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
442
+        this.monthType = month;
443
+        this.modetype = 1
444
+        this.getlist()
445
+        return false
417
       }
446
       }
418
        //12月
447
        //12月
419
        if(month == 11){
448
        if(month == 11){
420
-         const fourQuarterStart = moment().month(11).startOf('month').format("YYYY-MM-DD")
421
-         console.log("fourQuarterStart",fourQuarterStart)
422
-         const fourQuarterEnd = moment().month(11).endOf('month').format("YYYY-MM-DD")
423
-          this.getFirstQuarter(this.lapseto,fourQuarterStart,fourQuarterEnd)
449
+        this.monthType = month;
450
+        this.modetype = 1
451
+         this.getlist()
452
+         return false
424
       }
453
       }
425
     },
454
     },
426
     getNormData(){
455
     getNormData(){
427
       getNormData().then(response=>{
456
       getNormData().then(response=>{
428
          if(response.data.state === 1){
457
          if(response.data.state === 1){
429
            var normdata = response.data.data.normdata
458
            var normdata = response.data.data.normdata
430
-           console.log("normdata",normdata)
431
            this.normData = normdata
459
            this.normData = normdata
460
+           this.getlist()
432
          }
461
          }
433
       })
462
       })
434
     },
463
     },
435
     //第一季度
464
     //第一季度
436
-    getFirstQuarter(val,startime,endtime){
465
+    getlist(){
437
        this.modesData.series = []
466
        this.modesData.series = []
438
        this.modesData.xAxis = []
467
        this.modesData.xAxis = []
439
-      getFirstQuarter(val,startime,endtime).then(response=>{
468
+         //本月的开始时间
469
+         //第一季度
470
+         if(this.modetype == 0 && this.quarterType == 0){
471
+            
472
+             this.startime =  moment().startOf('year').format('YYYY-MM-DD')
473
+             this.endtime = moment().month(2).endOf('month').format("YYYY-MM-DD")
474
+             
475
+         }
476
+         //第二季度
477
+         if(this.modetype ==0 && this.quarterType == 1){
478
+             this.startime = moment().month(3).startOf('month').format("YYYY-MM-DD")   
479
+             this.endtime = moment().month(5).endOf('month').format("YYYY-MM-DD")
480
+         }
481
+         //第三季度
482
+         if( this.modetype ==0 && this.quarterType == 2){
483
+           this.startime = moment().month(6).startOf('month').format("YYYY-MM-DD")
484
+           this.endtime = moment().month(8).endOf('month').format("YYYY-MM-DD")
485
+         }
486
+         //第四季度
487
+         if( this.modetype ==0 && this.quarterType == 3){
488
+             this.startime = moment().month(8).startOf('month').format("YYYY-MM-DD")
489
+             this.endtime = moment().month(11).endOf('month').format("YYYY-MM-DD")
490
+         }
491
+         
492
+         //1月
493
+         if(this.modetype == 1 && this.monthType == 0){
494
+          this.startime = moment().month(0).startOf('month').format("YYYY-MM-DD")
495
+          this.endtime = moment().month(0).endOf('month').format("YYYY-MM-DD")
496
+         
497
+         }
498
+         //2 月
499
+         if( this.modetype == 1 && this.monthType == 1){
500
+            this.startime = moment().month(1).startOf('month').format("YYYY-MM-DD")
501
+            this.endtime = moment().month(1).endOf('month').format("YYYY-MM-DD")
502
+         }
503
+          //3 月
504
+         if(this.modetype == 1 && this.monthType == 2){
505
+           this.startime = moment().month(2).startOf('month').format("YYYY-MM-DD") 
506
+           this.endtime = moment().month(2).endOf('month').format("YYYY-MM-DD")
507
+          
508
+         }
509
+          //4月
510
+         if(this.modetype == 1 && this.monthType == 3){
511
+           this.startime = moment().month(3).startOf('month').format("YYYY-MM-DD")
512
+           this.endtime = moment().month(3).endOf('month').format("YYYY-MM-DD")
513
+         }
514
+           //5月
515
+         if(this.modetype == 1 && this.monthType == 4){
516
+          this.startime = moment().month(4).startOf('month').format("YYYY-MM-DD")
517
+          this.endtime= moment().month(4).endOf('month').format("YYYY-MM-DD")
518
+          }
519
+            //6月
520
+         if(this.modetype == 1 && this.monthType == 5){
521
+           this.startime = moment().month(5).startOf('month').format("YYYY-MM-DD")
522
+          this.endtime = moment().month(5).endOf('month').format("YYYY-MM-DD")
523
+           
524
+         }
525
+            //7月
526
+         if(this.modetype == 1 && this.monthType == 6){
527
+          this.startime = moment().month(6).startOf('month').format("YYYY-MM-DD")
528
+          this.endtime = moment().month(6).endOf('month').format("YYYY-MM-DD")
529
+         }
530
+            //8月
531
+         if(this.modetype==1 && this.monthType == 7){
532
+            this.startime = moment().month(7).startOf('month').format("YYYY-MM-DD")
533
+            this.endtime = moment().month(7).endOf('month').format("YYYY-MM-DD")
534
+         }
535
+         //9月
536
+          if(this.modetype == 1 && this.monthType == 8){
537
+             this.startime = moment().month(8).startOf('month').format("YYYY-MM-DD")
538
+            this.endtime = moment().month(8).endOf('month').format("YYYY-MM-DD")
539
+            
540
+         }
541
+          //10月
542
+          if(this.modetype == 1 && this.monthType == 9){
543
+           this.startime = moment().month(9).startOf('month').format("YYYY-MM-DD")
544
+           this.endtime = moment().month(9).endOf('month').format("YYYY-MM-DD")
545
+            
546
+         }
547
+         //11月
548
+         if(this.modetype == 1 && this.monthType == 10){
549
+            this.startime = moment().month(10).startOf('month').format("YYYY-MM-DD")       
550
+            this.endtime = moment().month(10).endOf('month').format("YYYY-MM-DD")
551
+         }
552
+          //12月
553
+         if(this.modetype == 1 && this.monthType == 11){
554
+          
555
+           this.startime = moment().month(11).startOf('month').format("YYYY-MM-DD")
556
+           this.endtime = moment().month(11).endOf('month').format("YYYY-MM-DD")
557
+         }
558
+
559
+         if(this.modetype == 2){
560
+            this.startime = this.listQuery.start_time
561
+            this.endtime = this.listQuery.end_time
562
+         }
563
+        const params = {
564
+          lapseto:this.lapseto,
565
+          startime:this.startime,
566
+          endtime:this.endtime
567
+        }
568
+      getFirstQuarter(params).then(response=>{
440
          if(response.data.state === 1){
569
          if(response.data.state === 1){
441
             var count =  response.data.data.count
570
             var count =  response.data.data.count
442
-            console.log("count",count)
571
+            console.log("count",count)  
572
+            //获取已经配置的数据 
443
             var arr=[]
573
             var arr=[]
444
             for(let i=0;i<count.length;i++){  
574
             for(let i=0;i<count.length;i++){  
445
                for(let j=0;j<this.normData.length;j++){
575
                for(let j=0;j<this.normData.length;j++){
448
                 }
578
                 }
449
               }
579
               }
450
             }
580
             }
451
-            console.log("arr",arr)
581
+           console.log("arr",arr )
582
+           
452
             var arrtwo =  this.arrayDate(count,this.normData)
583
             var arrtwo =  this.arrayDate(count,this.normData)
453
             for(let i=0;i<arrtwo.length;i++){
584
             for(let i=0;i<arrtwo.length;i++){
454
                 this.$set(arrtwo[i], 'Count', 0)
585
                 this.$set(arrtwo[i], 'Count', 0)
459
             arrtwo.map(item => {
590
             arrtwo.map(item => {
460
               arr.push(item)
591
               arr.push(item)
461
             })
592
             })
462
-            arr.sort(this.compare('sort'))    
593
+            // arr.sort(this.compare('sort'))    
463
             for(const key in this.normData ){
594
             for(const key in this.normData ){
464
                this.modesData.xAxis.push(this.normData[key].item_name);
595
                this.modesData.xAxis.push(this.normData[key].item_name);
465
                 if(key in arr){
596
                 if(key in arr){
470
             }
601
             }
471
             this.chart.series[0].data = this.modesData.series
602
             this.chart.series[0].data = this.modesData.series
472
             this.chart.xAxis.data = this.modesData.xAxis
603
             this.chart.xAxis.data = this.modesData.xAxis
473
-            console.log(2222,this.modesData)
604
+    
474
 
605
 
475
           
606
           
476
          }
607
          }
503
                 result.push(obj);
634
                 result.push(obj);
504
             }
635
             }
505
         }
636
         }
506
-        console.log("result",result)
507
         return result;
637
         return result;
508
     },
638
     },
509
   },
639
   },
510
   created(){
640
   created(){
511
-       //本月的开始时间
512
-      const firstQuarterStart =  moment().startOf('year').format('YYYY-MM-DD')
513
-    
514
-      const firstQuarterEnd = moment().month(2).endOf('month').format("YYYY-MM-DD")
515
-     
516
      //获取指标正常范围值
641
      //获取指标正常范围值
517
      this.getNormData()
642
      this.getNormData()
518
-     this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
643
+    // this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
519
   }
644
   }
520
 };
645
 };
521
 </script>
646
 </script>

+ 1 - 1
src/xt_pages/qcd/outcomeIndicators/control.vue View File

204
   data() {
204
   data() {
205
     return {
205
     return {
206
       crumbs: [
206
       crumbs: [
207
-        { path: false, name: "科室质控" },
207
+        { path: false, name: "质控管理" },
208
         { path: false, name: "结果指标" },
208
         { path: false, name: "结果指标" },
209
         { path: false, name: "指标控制" }
209
         { path: false, name: "指标控制" }
210
       ],
210
       ],

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/bloodPressure.vue View File

159
   data() {
159
   data() {
160
     return {
160
     return {
161
       crumbs:[
161
       crumbs:[
162
-        {path:false, name:'科室质控'},
162
+        {path:false, name:'质控管理'},
163
         {path:false, name:'患者分析'},
163
         {path:false, name:'患者分析'},
164
         {path:false, name:'总量分析'},
164
         {path:false, name:'总量分析'},
165
       ],
165
       ],

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/complication.vue View File

142
   data() {
142
   data() {
143
     return {
143
     return {
144
       crumbs:[
144
       crumbs:[
145
-        {path:false, name:'科室质控'},
145
+        {path:false, name:'质控管理'},
146
         {path:false, name:'患者分析'},
146
         {path:false, name:'患者分析'},
147
         {path:false, name:'并发症分析'},
147
         {path:false, name:'并发症分析'},
148
       ],
148
       ],

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/dialysisAge.vue View File

162
   data() {
162
   data() {
163
     return {
163
     return {
164
       crumbs:[
164
       crumbs:[
165
-        {path:false, name:'科室质控'},
165
+        {path:false, name:'质控管理'},
166
         {path:false, name:'患者分析'},
166
         {path:false, name:'患者分析'},
167
         {path:false, name:'透析龄分析'},
167
         {path:false, name:'透析龄分析'},
168
       ],
168
       ],

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/infectiousDiseases.vue View File

171
   data() {
171
   data() {
172
     return {
172
     return {
173
       crumbs:[
173
       crumbs:[
174
-        {path:false, name:'科室质控'},
174
+        {path:false, name:'质控管理'},
175
         {path:false, name:'患者分析'},
175
         {path:false, name:'患者分析'},
176
         {path:false, name:'并发症分析'},
176
         {path:false, name:'并发症分析'},
177
       ],
177
       ],

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/lapseto.vue View File

156
   data() {
156
   data() {
157
     return {
157
     return {
158
       crumbs:[
158
       crumbs:[
159
-        {path:false, name:'科室质控'},
159
+        {path:false, name:'质控管理'},
160
         {path:false, name:'患者分析'},
160
         {path:false, name:'患者分析'},
161
         {path:false, name:'转归分析'},
161
         {path:false, name:'转归分析'},
162
       ],
162
       ],

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/bloodPressure.vue View File

125
   data() {
125
   data() {
126
     return {
126
     return {
127
       crumbs:[
127
       crumbs:[
128
-        {path:false, name:'科室质控'},
128
+        {path:false, name:'质控管理'},
129
         {path:false, name:'患者分析'},
129
         {path:false, name:'患者分析'},
130
         {path:false, name:'统计'},
130
         {path:false, name:'统计'},
131
         {path:false, name:'血压'},
131
         {path:false, name:'血压'},

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/lapseto.vue View File

57
   data() {
57
   data() {
58
     return {
58
     return {
59
       crumbs:[
59
       crumbs:[
60
-        {path:false, name:'科室质控'},
60
+        {path:false, name:'质控管理'},
61
         {path:false, name:'患者分析'},
61
         {path:false, name:'患者分析'},
62
         {path:false, name:'统计'},
62
         {path:false, name:'统计'},
63
         {path:false, name:'转归'},
63
         {path:false, name:'转归'},

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/oralMedicine.vue View File

162
   data() {
162
   data() {
163
     return {
163
     return {
164
       crumbs:[
164
       crumbs:[
165
-        {path:false, name:'科室质控'},
165
+        {path:false, name:'质控管理'},
166
         {path:false, name:'患者分析'},
166
         {path:false, name:'患者分析'},
167
         {path:false, name:'统计'},
167
         {path:false, name:'统计'},
168
         {path:false, name:'口服药'},
168
         {path:false, name:'口服药'},

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/weight.vue View File

125
   data() {
125
   data() {
126
     return {
126
     return {
127
       crumbs:[
127
       crumbs:[
128
-        {path:false, name:'科室质控'},
128
+        {path:false, name:'质控管理'},
129
         {path:false, name:'患者分析'},
129
         {path:false, name:'患者分析'},
130
         {path:false, name:'统计'},
130
         {path:false, name:'统计'},
131
         {path:false, name:'体重'},
131
         {path:false, name:'体重'},

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/weight.vue View File

169
   data() {
169
   data() {
170
     return {
170
     return {
171
       crumbs:[
171
       crumbs:[
172
-        {path:false, name:'科室质控'},
172
+        {path:false, name:'质控管理'},
173
         {path:false, name:'患者分析'},
173
         {path:false, name:'患者分析'},
174
         {path:false, name:'体重分析'},
174
         {path:false, name:'体重分析'},
175
       ],
175
       ],

+ 252 - 78
src/xt_pages/qcd/patientComplianceDetails.vue View File

7
       <div class="page_patientComplianceDetails">
7
       <div class="page_patientComplianceDetails">
8
         <div class="cell clearfix" style="margin:0">
8
         <div class="cell clearfix" style="margin:0">
9
           <el-form :inline="true" :model="listQuery">
9
           <el-form :inline="true" :model="listQuery">
10
-            <el-form-item label>
11
-              <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
12
-              <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
13
-            </el-form-item>
14
           </el-form>
10
           </el-form>
15
         </div>
11
         </div>
16
         <el-container>
12
         <el-container>
17
           <div style="width:150px">
13
           <div style="width:150px">
18
             <div class="tableTitle">患者列表</div>
14
             <div class="tableTitle">患者列表</div>
19
-            <el-table :data="tableData" border style="width: 100%;" height="500">
20
-              <el-table-column prop="date" label="日期" width="70"></el-table-column>
21
-              <el-table-column prop="name" label="姓名" width="80"></el-table-column>
15
+            <el-table :data="patientsData" border style="width: 100%;" height="500"  highlight-current-row @current-change="handleChange">
16
+              <el-table-column prop="name" label="透析号" width="80">
17
+                 <template slot-scope="scope">
18
+                    {{scope.row.dialysis_no}}
19
+                 </template>
20
+              </el-table-column>
21
+              <el-table-column prop="date" label="透析号" width="70">
22
+                 <template slot-scope="scope">
23
+                    {{scope.row.name }}
24
+                 </template>
25
+              </el-table-column>
22
             </el-table>
26
             </el-table>
23
           </div>
27
           </div>
24
           <div class="containerRight" style="flex:1;overflow: hidden">
28
           <div class="containerRight" style="flex:1;overflow: hidden">
50
                 align="right"
54
                 align="right"
51
                 format="yyyy-MM-dd"
55
                 format="yyyy-MM-dd"
52
                 value-format="yyyy-MM-dd"
56
                 value-format="yyyy-MM-dd"
57
+                :picker-options="pickerOptions"
53
               ></el-date-picker>
58
               ></el-date-picker>
54
               <span class>-</span>
59
               <span class>-</span>
55
               <el-date-picker
60
               <el-date-picker
63
                 align="right"
68
                 align="right"
64
                 format="yyyy-MM-dd"
69
                 format="yyyy-MM-dd"
65
                 value-format="yyyy-MM-dd"
70
                 value-format="yyyy-MM-dd"
71
+                :picker-options="pickerOptions"
66
               ></el-date-picker>
72
               ></el-date-picker>
67
             </div>
73
             </div>
68
             <div class="tableTitle">指标监控</div>
74
             <div class="tableTitle">指标监控</div>
70
               <div class="qualityBox">
76
               <div class="qualityBox">
71
                 <div
77
                 <div
72
                   class="qualityOne"
78
                   class="qualityOne"
73
-                  v-for="(item,index) in arr"
79
+                  v-for="(item,index) in normData"
74
                   :key="index"
80
                   :key="index"
75
                   :class="quality == index ? 'active' : ''"
81
                   :class="quality == index ? 'active' : ''"
76
-                  @click="clickQuality(index)"
82
+                  @click="clickQuality(index,item.inspection_minor)"
77
                 >
83
                 >
78
-                  <p>{{ item }}</p>
79
-                  <i class="iconfont icon-gantanhao gth" v-if="index % 2 == 0"></i>
80
-                  <i class="iconfont icon-gou gou" v-else></i>
84
+                  <p>{{ item.item_name }}</p>
85
+                   <span v-if="isTrue == 1"><i class="iconfont icon-gou gou"></i></span>
86
+                   <span v-if="isTrue == 0"><i class="iconfont icon-gantanhao gth"></i></span>
81
                 </div>
87
                 </div>
82
               </div>
88
               </div>
83
             </div>
89
             </div>
93
 </template>
99
 </template>
94
 
100
 
95
 <script>
101
 <script>
102
+const moment = require('moment')
96
 import echarts from "echarts";
103
 import echarts from "echarts";
97
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
104
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
98
 import LineChart from "../qcd/components/LineChart";
105
 import LineChart from "../qcd/components/LineChart";
99
 import { uParseTime } from "@/utils/tools";
106
 import { uParseTime } from "@/utils/tools";
107
+import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail } from "@/api/common/common"
100
 export default {
108
 export default {
101
   components: {
109
   components: {
102
     LineChart,
110
     LineChart,
104
   },
112
   },
105
   data() {
113
   data() {
106
     return {
114
     return {
115
+     isTrue:0,
107
       crumbs: [
116
       crumbs: [
108
-        { path: false, name: "科室质控" },
117
+        { path: false, name: "质控管理" },
109
         { path: false, name: "患者达标详情" }
118
         { path: false, name: "患者达标详情" }
110
       ],
119
       ],
111
-      tableData: [
112
-        {
113
-          date: "2016",
114
-          name: "王小虎"
115
-        },
116
-        {
117
-          date: "2016",
118
-          name: "王小虎"
119
-        },
120
-        {
121
-          date: "2016",
122
-          name: "王小虎"
123
-        },
124
-        {
125
-          date: "2016",
126
-          name: "王小虎"
127
-        },
128
-        {
129
-          date: "2016",
130
-          name: "王小虎"
131
-        },
132
-        {
133
-          date: "2016",
134
-          name: "王小虎"
135
-        },
136
-        {
137
-          date: "2016",
138
-          name: "王小虎"
139
-        },
140
-        {
141
-          date: "2016",
142
-          name: "王小虎"
143
-        },
144
-        {
145
-          date: "2016",
146
-          name: "王小虎"
147
-        },
148
-        {
149
-          date: "2016",
150
-          name: "王小虎"
151
-        },
152
-        {
153
-          date: "2016",
154
-          name: "王小虎"
155
-        },
156
-        {
157
-          date: "2016",
158
-          name: "王小虎"
159
-        }
160
-      ],
120
+      patientsData:[],
121
+      normData:[],
122
+      startime:0,
123
+      endtime:0,
161
       listQuery: {
124
       listQuery: {
162
         start_time: "",
125
         start_time: "",
163
         end_time: "",
126
         end_time: "",
164
         page: 1,
127
         page: 1,
165
         limit: 10
128
         limit: 10
166
       },
129
       },
130
+      item_id:0,
167
       month: [
131
       month: [
168
         { value: 0, label: "本月", state: 0 },
132
         { value: 0, label: "本月", state: 0 },
169
         { value: 1, label: "近三个月", state: 1 },
133
         { value: 1, label: "近三个月", state: 1 },
170
         { value: 2, label: "近半年", state: 2 },
134
         { value: 2, label: "近半年", state: 2 },
171
         { value: 3, label: "近一年", state: 3 }
135
         { value: 3, label: "近一年", state: 3 }
172
       ],
136
       ],
137
+     modesData: {
138
+        xAxis: [],
139
+        series: []
140
+      },
141
+      pickerOptions: {
142
+        disabledDate(time) {
143
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
144
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
145
+        }
146
+      },
147
+      patientid:0,
173
       monthType: 0,
148
       monthType: 0,
174
       arr: ["钙", "磷", "钙萨达撒所多", "磷", "钙", "磷", "钙", "磷"],
149
       arr: ["钙", "磷", "钙萨达撒所多", "磷", "钙", "磷", "钙", "磷"],
175
       quality: 0,
150
       quality: 0,
183
           left: 0
158
           left: 0
184
         },
159
         },
185
         xAxis: {
160
         xAxis: {
186
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
161
+          data: []
187
         },
162
         },
188
         yAxis: {
163
         yAxis: {
189
           axisLabel: {
164
           axisLabel: {
195
           {
170
           {
196
             name: "次数",
171
             name: "次数",
197
             type: "line",
172
             type: "line",
198
-            data: [
199
-              "78.57",
200
-              "50",
201
-              "80",
202
-              "93.33",
203
-              "92.86",
204
-              "100",
205
-              "12",
206
-              "77",
207
-              "37"
208
-            ],
173
+            data: [],
209
             barWidth: 30,
174
             barWidth: 30,
210
             label: {
175
             label: {
211
               normal: {
176
               normal: {
212
                 show: true,
177
                 show: true,
213
                 position: "top",
178
                 position: "top",
214
-                formatter: "{c}"
179
+                formatter: "{c}g/L"
215
               }
180
               }
216
             },
181
             },
217
             //配置样式
182
             //配置样式
258
             }
223
             }
259
           }
224
           }
260
         ]
225
         ]
261
-      }
226
+      },
227
+      inspect_date:0,
228
+      monthActive:0,
262
     };
229
     };
263
   },
230
   },
264
   methods: {
231
   methods: {
265
     chooseMonth(month) {
232
     chooseMonth(month) {
233
+      //一月
234
+      if(month == 0){
235
+         this.monthActive = 0
236
+        const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
237
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
238
+        var now = new Date()
239
+        var nowMonth = now.getMonth(); //当前月
240
+        var nowYear = now.getFullYear(); //当前年
241
+        //本月的开始时间
242
+        var monthStartDate = new Date(nowYear, nowMonth, 1);
243
+        this.startime=Date.parse(monthStartDate)/1000;//s
244
+
245
+        //本月的结束时间
246
+        var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
247
+        this.endtime =Date.parse(monthEndDate)/1000-1;//s
248
+         this.getlistDetail()
249
+      }
250
+
251
+      //近三月
252
+      if(month == 1){
253
+         this.monthActive = 1
254
+        const startDate = moment().subtract('month', 3).format('YYYY-MM-DD')
255
+    
256
+        this.startime = Date.parse(startDate)/1000
257
+       
258
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
259
+      
260
+        this.endtime = Date.parse(endDate)/1000
261
+    
262
+        this.getlistDetail()
263
+      }
264
+    
265
+
266
+       //近半年
267
+      if(month == 2){
268
+        this.monthActive = 2
269
+        const startDate = moment().subtract('month', 6).format('YYYY-MM-DD')
270
+        
271
+        this.startime = Date.parse(startDate)/1000
272
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
273
+        this.endtime = Date.parse(endDate)/1000
274
+        this.getlistDetail()
275
+      }
276
+
277
+      //近一年
278
+      if(month == 3){
279
+        this.monthActive = 3
280
+        const startDate = moment().subtract('month', 12).format('YYYY-MM-DD')
281
+        this.startime = Date.parse(startDate)/1000
282
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
283
+        this.endtime = Date.parse(endDate)/1000
284
+        this.getlistDetail()
285
+      }
286
+
287
+
266
       this.monthType = month;
288
       this.monthType = month;
267
     },
289
     },
268
-    clickQuality(index) {
290
+    clickQuality(index,itemid) {
269
       this.quality = index;
291
       this.quality = index;
292
+      this.item_id = itemid
293
+      this.getlistDetail()
270
     },
294
     },
271
     handleSizeChange(limit) {
295
     handleSizeChange(limit) {
272
       //this.limit = limit;
296
       //this.limit = limit;
279
     getTime(time) {
303
     getTime(time) {
280
       return uParseTime(time, "{y}-{m}-{d}");
304
       return uParseTime(time, "{y}-{m}-{d}");
281
     },
305
     },
306
+    onSearch(){
307
+    },
308
+    changeTime(val){
309
+       var time = this.getTimestamp(val) - this.getTimestamp(this.listQuery.end_time);
310
+      if (time > 0) {
311
+        this.$message.error("结束时间不能小于开始时间");
312
+        this.listQuery.start_time = "";
313
+      } else {
314
+         this.startime = Date.parse(val)/1000;//s
315
+        this.getlistDetail()
316
+      }
317
+
318
+    },
319
+    changeEndTime(val){
320
+      var time =
321
+          this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
322
+        if (time < 0) {
323
+          this.$message.error("结束时间不能小于开始时间");
324
+          this.listQuery.end_time = "";
325
+        } else {
326
+          this.endtime = Date.parse(val)/1000;//s
327
+          this.getlistDetail()
328
+        }
329
+
330
+    },
331
+     getTimestamp(time) {
332
+      // 把时间日期转成时间戳
333
+      return new Date(time).getTime() / 1000;
334
+    },
335
+    handleChange(val){
336
+     this.patientid = val.id
337
+      this.getlistDetail()
338
+    },
339
+   getCurrentOrgPatients(){
340
+      getCurrentOrgPatients().then(response=>{
341
+          if(response.data.state == 1){
342
+            var patients = response.data.data.patients
343
+            this.patientsData = patients
344
+          }
345
+      })
346
+    },
347
+    getNormData(){
348
+      getNormData().then(response=>{
349
+         var normdata = response.data.data.normdata
350
+          for(let i=0;i<normdata.length;i++){
351
+            this.item_id = normdata[0].inspection_minor
352
+          }
353
+          this.normData = normdata
354
+          this.getlist()
355
+      })
356
+    },
357
+    getlist(){
358
+        this.modesData.series = []
359
+        this.modesData.xAxis = []
360
+        const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
361
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
362
+        var now = new Date()
363
+        var nowMonth = now.getMonth(); //当前月
364
+        var nowYear = now.getFullYear(); //当前年
365
+        //本月的开始时间
366
+        var monthStartDate = new Date(nowYear, nowMonth, 1);
367
+        this.startime=Date.parse(monthStartDate)/1000;//s
368
+        //本月的结束时间
369
+         var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
370
+         this.endtime =Date.parse(monthEndDate)/1000-1;//s
371
+
372
+          const params = {
373
+            patientid:this.patientid,
374
+            startime:this.startime,
375
+            endtime:this.endtime,
376
+            itemid:this.item_id,
377
+            inspectdate:this.inspect_date,
378
+          }
379
+       GetQualityControl(params).then(response=>{
380
+          if(response.data.state == 1){
381
+            var list = response.data.data.list
382
+            for(let i=0;i<list.length;i++){
383
+              if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
384
+                    this.isTrue = 1  
385
+               }
386
+               if(parseInt(list[i].inspect_value)< parseInt(list[i].range_min) || parseInt(list[i].inspect_value) > parseInt(list[i].range_max)){
387
+                    this.isTrue =0
388
+               }
389
+              this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
390
+               this.modesData.series.push(list[i].inspect_value)
391
+            
392
+            }
393
+            this.chart.series[0].data = this.modesData.series
394
+            this.chart.xAxis.data = this.modesData.xAxis
395
+       
396
+          }
397
+
398
+       })
399
+    },
400
+
401
+    getlistDetail(){
402
+       this.modesData.series = []
403
+        this.modesData.xAxis = []
404
+        const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
405
+        const endDate = moment(new Date()).format('YYYY-MM-DD')
406
+
407
+       if(this.monthActive == 0){
408
+          var now = new Date()
409
+          var nowMonth = now.getMonth(); //当前月
410
+          var nowYear = now.getFullYear(); //当前年
411
+          //本月的开始时间
412
+          var monthStartDate = new Date(nowYear, nowMonth, 1);
413
+          this.startime=Date.parse(monthStartDate)/1000;//s
414
+          //本月的结束时间
415
+          var monthEndDate = moment().endOf('month').format('YYYY-MM-DD HH:mm:ss');
416
+          this.endtime =Date.parse(monthEndDate)/1000-1;//s
417
+        }
418
+     
419
+          const params = {
420
+            patientid:this.patientid,
421
+            startime:this.startime,
422
+            endtime:this.endtime,
423
+            itemid:this.item_id,
424
+          }
425
+        console.log("params",params)
426
+       getPatientComplianceDetail(params).then(response=>{
427
+            if(response.data.state == 1){
428
+              var list =  response.data.data.list
429
+              for(let i=0;i<list.length;i++){
430
+                if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
431
+                      this.isTrue = 1  
432
+                }
433
+                if(parseInt(list[i].inspect_value)< parseInt(list[i].range_min) || parseInt(list[i].inspect_value) > parseInt(list[i].range_max)){
434
+                      this.isTrue =0
435
+                }
436
+                this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
437
+                this.modesData.series.push(list[i].inspect_value)
438
+            
439
+            }
440
+              this.chart.series[0].data = this.modesData.series
441
+              this.chart.xAxis.data = this.modesData.xAxis
442
+            }
443
+       })
444
+    }
445
+  },
446
+
447
+   created(){
448
+     this.patientid =  this.$route.query.patientid
449
+     this.inspect_date = this.$route.query.date
450
+     //获取指标项
451
+      this.getNormData()
452
+     //获取该机构下的所有患者
453
+      this.getCurrentOrgPatients()
454
+
455
+
282
   }
456
   }
283
 };
457
 };
284
 </script>
458
 </script>

+ 405 - 111
src/xt_pages/qcd/patientControlAnalysis.vue View File

8
         <div class="cell clearfix">
8
         <div class="cell clearfix">
9
           <el-form :inline="true" :model="listQuery">
9
           <el-form :inline="true" :model="listQuery">
10
             <el-form-item label>
10
             <el-form-item label>
11
-              <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width: 200px;"></el-input>
12
-              <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
11
+               <el-autocomplete
12
+                class="checkSearch"
13
+                popper-class="my-autocomplete"
14
+                v-model.trim="listQuery.search"
15
+                :fetch-suggestions="querySearchAsync"
16
+                :trigger-on-focus="false"
17
+                placeholder="输入病人透析号/姓名"
18
+                @select="handleSelect"
19
+              >
20
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
21
+                <template slot-scope="{ item }">
22
+                  <div class="name">{{ item.name }}</div>
23
+                </template>
24
+              </el-autocomplete>
25
+
13
             </el-form-item>
26
             </el-form-item>
14
           </el-form>
27
           </el-form>
15
           <el-select v-model="lapstor" placeholder="请选择" style="margin-right:20px;width:100px">
28
           <el-select v-model="lapstor" placeholder="请选择" style="margin-right:20px;width:100px">
77
               :key="index"
90
               :key="index"
78
             >
91
             >
79
             <template slot-scope="scope">
92
             <template slot-scope="scope">
80
-              {{ scope.row.data[index].inspect_value}}
93
+                 <span v-if="scope.row.data[modeItem.item_name].inspect_value == ''">0</span>
94
+                 <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) < parseInt(scope.row.data[modeItem.item_name].range_min))">{{scope.row.data[modeItem.item_name].inspect_value}}↓</span>
95
+                <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) > parseInt(scope.row.data[modeItem.item_name].range_max))">{{scope.row.data[modeItem.item_name].inspect_value}}↑</span>
96
+                <span v-if="scope.row.data[modeItem.item_name].inspect_value !=''&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) >= parseInt(scope.row.data[modeItem.item_name].range_min))&& (parseInt(scope.row.data[modeItem.item_name].inspect_value) <= parseInt(scope.row.data[modeItem.item_name].range_max)) ">{{scope.row.data[modeItem.item_name].inspect_value}}</span>
81
             </template>
97
             </template>
82
         </el-table-column>
98
         </el-table-column>
83
             <el-table-column fixed="right" label="操作" width="100">
99
             <el-table-column fixed="right" label="操作" width="100">
84
               <template slot-scope="scope">
100
               <template slot-scope="scope">
85
-                <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
101
+                <el-button @click="handleClick(scope.row.patient_id,scope.row.inspect_date)" type="text" size="small">查看</el-button>
86
               </template>
102
               </template>
87
             </el-table-column>
103
             </el-table-column>
88
           </el-table>
104
           </el-table>
106
 </template>
122
 </template>
107
 
123
 
108
 <script>
124
 <script>
125
+import { PostSearch} from '@/api/patient'
109
 import echarts from "echarts";
126
 import echarts from "echarts";
110
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
127
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111
 import LineChart from "../qcd/components/LineChart";
128
 import LineChart from "../qcd/components/LineChart";
112
-import { getNormData,getPatientsControl } from "@/api/common/common"
129
+import { getNormData,getPatientsControl,getCartogramlist,getPatientContorlAnalysis,getCurrentOrgPatients } from "@/api/common/common"
113
 export default {
130
 export default {
114
   components: {
131
   components: {
115
     LineChart,
132
     LineChart,
124
         }
141
         }
125
       },
142
       },
126
       crumbs: [
143
       crumbs: [
127
-        { path: false, name: "科室质控" },
144
+        { path: false, name: "质控管理" },
128
         { path: false, name: "患者质控达标统计" }
145
         { path: false, name: "患者质控达标统计" }
129
       ],
146
       ],
130
       listQuery: {
147
       listQuery: {
131
         start_time: "",
148
         start_time: "",
132
         end_time: "",
149
         end_time: "",
133
         page: 1,
150
         page: 1,
134
-        limit: 10
151
+        limit: 20
135
       },
152
       },
136
       total:0,
153
       total:0,
137
       lapstor:0,
154
       lapstor:0,
150
         },
167
         },
151
       ],
168
       ],
152
       value: "",
169
       value: "",
170
+      modesData: {
171
+        xAxis: [],
172
+        series: []
173
+      },
153
       chart: {
174
       chart: {
154
         title: {
175
         title: {
155
           text: "ECharts 入门示例"
176
           text: "ECharts 入门示例"
178
               normal: {
199
               normal: {
179
                 show: true,
200
                 show: true,
180
                 position: "top",
201
                 position: "top",
181
-                formatter: "{c}次"
202
+                formatter: (params) => {
203
+                  if(this.obj.length > 0){
204
+                      let str = ''
205
+                      str = '('+ this.obj[params.dataIndex] +'人'+',' + params.data +'%' +')'
206
+                    return str
207
+                  }else{
208
+                    let str = ''
209
+                    str = params.data+'%'
210
+                    return str
211
+                  }
212
+                }
182
               }
213
               }
183
             },
214
             },
184
             //配置样式
215
             //配置样式
219
           }
250
           }
220
         ]
251
         ]
221
       },
252
       },
253
+      patientsArr:[],
222
       tableData: [],
254
       tableData: [],
223
       normData:[],
255
       normData:[],
224
       paitents:[],
256
       paitents:[],
225
       tableName:[],
257
       tableName:[],
226
       total:0,
258
       total:0,
259
+       obj:[],
227
       ObjectData:{},
260
       ObjectData:{},
228
       tablePatients:[],
261
       tablePatients:[],
229
       tableSort:[],
262
       tableSort:[],
263
+      dataName:[
264
+        {id:0,name:"达标"},
265
+        {id:1,name:"未达标"},
266
+      ],
267
+      dataCount:[
268
+         {id:0,count:0},
269
+         {id:1,count:0}
270
+      ],
271
+      patient_id:0,
230
     };
272
     };
231
   },
273
   },
232
   methods: {
274
   methods: {
256
         this.$message.error("结束时间不能小于开始时间");
298
         this.$message.error("结束时间不能小于开始时间");
257
         this.listQuery.end_time = "";
299
         this.listQuery.end_time = "";
258
       } else {
300
       } else {
301
+
259
       }
302
       }
260
     },
303
     },
261
-  getTimestamp(time) {
304
+    getTimestamp(time) {
262
       // 把时间日期转成时间戳
305
       // 把时间日期转成时间戳
263
       return new Date(time).getTime() / 1000;
306
       return new Date(time).getTime() / 1000;
264
     },
307
     },
265
-    handleClick(row) {
266
-      this.$router.push({ path: "/qcd/patientComplianceDetails" });
308
+    handleClick(patientid,inspectdate) {
309
+      // var id = 0
310
+      // var dialysis_no = 0
311
+      // for(let i=0;i<this.tablePatients.length;i++){
312
+      //    if(name == this.tablePatients[i].name){
313
+      //       id = this.tablePatients[i].patient_id
314
+      //       dialysis_no = this.tablePatients[i].dialysis_no
315
+      //    }
316
+      // }
317
+      this.$router.push({ path: "/qcd/patientComplianceDetails?patientid="+patientid+"&date="+inspectdate});
267
     },
318
     },
268
     getDialysisNo(name){
319
     getDialysisNo(name){
269
         for(let i=0;i<this.tablePatients.length;i++){
320
         for(let i=0;i<this.tablePatients.length;i++){
276
       getNormData().then(response=>{
327
       getNormData().then(response=>{
277
          if(response.data.state == 1){
328
          if(response.data.state == 1){
278
            var normdata = response.data.data.normdata
329
            var normdata = response.data.data.normdata
279
-          // console.log("normdata",normdata)
330
+        //  console.log("normdata",normdata)
280
           this.normData = normdata
331
           this.normData = normdata
281
            var a=[];
332
            var a=[];
282
            for(let i=0;i<normdata.length;i++){
333
            for(let i=0;i<normdata.length;i++){
285
           // console.log("a",a)
336
           // console.log("a",a)
286
            this.newArr = a
337
            this.newArr = a
287
            var arr = this.arrayToObj(a)
338
            var arr = this.arrayToObj(a)
288
-
289
-         // console.log("娃哈哈",arr)
290
            this.ObjectData = arr
339
            this.ObjectData = arr
291
 
340
 
292
 
341
 
294
       })
343
       })
295
     },
344
     },
296
     onSearch(){
345
     onSearch(){
346
+         const params = {
347
+            lapstor:this.lapstor,
348
+            patientid:this.patient_id,
349
+            startime:this.listQuery.start_time,
350
+            endtime:this.listQuery.end_time,
351
+
352
+         }
353
+       getPatientContorlAnalysis(params).then(response=>{
354
+           if(response.data.state == 1){
355
+              var control = response.data.data.patientcontorDetail
356
+              console.log("control",control)
357
+              let dataInfo = {}
358
+              control.forEach((item, index) => {
359
+                let { inspect_date } = item
360
+                if (!dataInfo[inspect_date]) {
361
+                  dataInfo[inspect_date] = {
362
+                    inspect_date,
363
+                    name: item.name,
364
+                    child: [],
365
+                    patient_id: item.patient_id
366
+
367
+                  }
368
+                }
369
+              })
370
+              let list = Object.values(dataInfo)
371
+              console.log("list",list)
372
+              list.map(item => {
373
+                for (let i = 0; i < control.length; i++) {
374
+                  if (item.inspect_date == control[i].inspect_date && item.patient_id == control[i].patient_id) {
375
+                    item.child.push(control[i])
376
+                  }
377
+                }
378
+              })
379
+                var newarrtwo = []
380
+                list.map(item => {
381
+                  item.child.map(it => {
382
+                    newarrtwo.push(it)
383
+                  })
384
+                })
385
+
386
+                // 配置的才显示
387
+                var arrthree = []
388
+                for (let i = 0; i < newarrtwo.length; i++) {
389
+                  for (let j = 0; j < this.normData.length; j++) {
390
+                    if (newarrtwo[i].item_id == this.normData[j].inspection_minor) {
391
+                      arrthree.push(newarrtwo[i])
392
+                    }
393
+                  }
394
+                }
395
+                console.log("arrthree",arrthree)
396
+                var arrfour = this.arrayDate(arrthree, newarrtwo)
397
+                arrfour.map(item => {
398
+                  item.item_name = ''
399
+                  arrthree.push(item)
400
+                })
401
+
402
+                var dd = {}
403
+                for (const index in arrthree) {
404
+                  if (!(arrthree[index].inspect_date in dd)) {
405
+                    dd[arrthree[index].inspect_date] = {}
406
+                  }
407
+                  if (!(arrthree[index].item_name in dd[arrthree[index].inspect_date]) && arrthree[index].item_name != 0) {
408
+                    dd[arrthree[index].inspect_date][arrthree[index].item_name] = arrthree[index]
409
+                  }
410
+                }
411
+
412
+                this.tableData = []
413
+
414
+                for (const key in dd) {
415
+                  for (const mkey in this.ObjectData) {
416
+                    if (!(this.ObjectData[mkey].item_name in dd[key])) {
417
+                      dd[key][this.ObjectData[mkey].item_name] = {
418
+                        item_name: this.ObjectData[mkey].item_name,
419
+                        name: mkey,
420
+                        inspect_value: 0
421
+                      }
422
+                    }
423
+                  }
424
+                  this.tableData.push({ name: key, data: dd[key]})
425
+                }
426
+              let dataInfotwo = {}
427
+              control.forEach((item, index) => {
428
+                let { inspect_date } = item
429
+                if (!dataInfotwo[inspect_date]) {
430
+                  dataInfotwo[inspect_date] = {
431
+                    inspect_date,
432
+                    name: item.name,
433
+                  }
434
+                }
435
+              })
436
+              let listtwo = Object.values(dataInfotwo)
437
+                listtwo.map(item=>{
438
+                  this.tableData.map(it=>{
439
+                    if(item.inspect_date == parseInt(it.name)){
440
+                      it.name = item.name
441
+                    }
442
+                  })
443
+                })
444
+                //   let projectArr = []
445
+                //   this.newArr.map(item => {
446
+                //     projectArr.push(item.item_name)
447
+                //   })
448
+
449
+                //   this.tableData.map(item => {
450
+                //     let newarr = Object.values(item.data)
451
+                //     newarr.sort((a, b) => {
452
+                //       return projectArr.indexOf(a.item_name) - projectArr.indexOf(b.item_name)
453
+                //     })
454
+                //     item.data = newarr
455
+                //   })
456
+
457
+                  // for (let i = 0; i < this.patientsArr.length; i++) {
458
+                  //   for (let j = 0; j < this.tableData.length; j++) {
459
+                  //     if (this.patientsArr[i].name == this.tableData[j].name) {
460
+                  //       this.tableData[j].dialysis_no = this.patientsArr[i].dialysis_no
461
+                  //       this.tableData[j].patient_id = this.patientsArr[i].id
462
+                  //     }
463
+                  //   }
464
+                  // }
465
+
466
+                }
467
+          })
297
     },
468
     },
298
     getlist(){
469
     getlist(){
299
       getPatientsControl(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
470
       getPatientsControl(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
300
          if(response.data.state == 1){
471
          if(response.data.state == 1){
301
            var patients = response.data.data.patients
472
            var patients = response.data.data.patients
302
-          // console.log("paitents",patients)
303
-          this.tablePatients = patients
304
-           var total =  response.data.data.total
305
-          // console.log("total",total)
306
-           this.total = total
307
-           var control = response.data.data.control
308
-         // console.log("control",control)
309
-          var newArr = []
310
-           //分页
311
-           for(let i=0;i<control.length;i++){
312
-             for(let j=0;j<patients.length;j++){
313
-                if(control[i].patient_id == patients[j].patient_id){
314
-                   newArr.push(control[i])
473
+            // console.log("patients",patients)
474
+            this.tablePatients = patients
475
+            var total = response.data.data.total
476
+            this.total = total
477
+            var control = response.data.data.control
478
+            // console.log("control",control)
479
+            var newArr = []
480
+            // 分页
481
+            for (let i = 0; i < control.length; i++) {
482
+              for (let j = 0; j < patients.length; j++) {
483
+                if (control[i].inspect_date == patients[j].inspect_date) {
484
+                  newArr.push(control[i])
315
                 }
485
                 }
316
-             }
317
-           }
318
-        // console.log("newArr",newArr)
486
+              }
487
+            }
488
+          // console.log("newArr",newArr)
319
           let dataInfo = {}
489
           let dataInfo = {}
320
           newArr.forEach((item, index) => {
490
           newArr.forEach((item, index) => {
321
-            let { patient_id } = item
322
-            if (!dataInfo[patient_id]) {
323
-              dataInfo[patient_id] = {
324
-                patient_id,
325
-                name:item.name,
491
+            let { inspect_date } = item
492
+            if (!dataInfo[inspect_date]) {
493
+              dataInfo[inspect_date] = {
494
+                inspect_date,
495
+                name: item.name,
326
                 child: [],
496
                 child: [],
327
-                inspect_date:item.inspect_date
328
-
497
+                patient_id: item.patient_id
329
               }
498
               }
330
             }
499
             }
331
           })
500
           })
501
+        let list = Object.values(dataInfo)
332
 
502
 
333
-          let list = Object.values(dataInfo)
334
-          list.map(item => {
503
+
504
+         list.map(item => {
335
             for (let i = 0; i < newArr.length; i++) {
505
             for (let i = 0; i < newArr.length; i++) {
336
-               if (item.inspect_date == newArr[i].inspect_date && item.patient_id == newArr[i].patient_id) {
337
-                   item.child.push(newArr[i])
338
-                }
506
+              if (item.inspect_date == newArr[i].inspect_date) {
507
+                item.child.push(newArr[i])
339
               }
508
               }
509
+            }
510
+          })
511
+        //  console.log("list",list)
512
+         var newarrtwo = []
513
+          list.map(item => {
514
+            item.child.map(it => {
515
+              newarrtwo.push(it)
340
             })
516
             })
341
-          //console.log("list",list)
342
-
343
-          var  newarrtwo = []
344
-          list.map(item=>{
345
-              item.child.map(it=>{
346
-                 newarrtwo.push(it)
347
-              })
348
           })
517
           })
349
-       // console.log("多少条",newarrtwo)
518
+        //  console.log("newarrtwo",newarrtwo)
519
+          // 配置的才显示
520
+         var arrthree = []
521
+          for (let i = 0; i < newarrtwo.length; i++) {
522
+            for (let j = 0; j < this.normData.length; j++) {
523
+              if (newarrtwo[i].item_id == this.normData[j].inspection_minor) {
524
+                arrthree.push(newarrtwo[i])
525
+              }
526
+            }
527
+          }
350
 
528
 
351
-        //配置的才显示
529
+          var arrfour = this.arrayDate(arrthree, newarrtwo)
530
+          arrfour.map(item => {
531
+            item.item_name = ''
532
+            arrthree.push(item)
533
+          })
534
+          // console.log('arrthree', arrthree)
535
+          var dd = {}
536
+           for (const index in arrthree) {
537
+             if (!(arrthree[index].inspect_date in dd)) {
538
+               dd[arrthree[index].inspect_date] = {}
539
+             }
540
+             if (!(arrthree[index].item_name in dd[arrthree[index].inspect_date]) && arrthree[index].item_name != 0) {
541
+               dd[arrthree[index].inspect_date][arrthree[index].item_name] = arrthree[index]
352
 
542
 
353
-        var arrthree = []
354
-        for(let i=0;i<newarrtwo.length;i++){
355
-           for(let j=0;j<this.normData.length;j++){
356
-              if(newarrtwo[i].item_id == this.normData[j].inspection_minor){
357
-                 arrthree.push(newarrtwo[i])
358
-              }
543
+             }
359
            }
544
            }
360
-        }
361
-        // console.log("arrthree",arrthree)
362
 
545
 
363
-       var arrfour =  this.arrayDate(arrthree,newarrtwo)
364
-       // console.log("arrfour",arrfour)
365
-         arrfour.map(item=>{
366
-           item.item_name = ""
367
-           arrthree.push(item)
368
-         })
369
-
370
-          var dd = {};
371
-           for (const index in arrthree) {
372
-           if (!(arrthree[index].name in dd)) {
373
-              dd[arrthree[index].name] = {};
374
-            }
375
-             if (!(arrthree[index].item_name in dd[arrthree[index].name]) && arrthree[index].item_name != 0) {
376
-               dd[arrthree[index].name][arrthree[index].item_name] = arrthree[index];
546
+           let dataInfotwo = {}
547
+          newArr.forEach((item, index) => {
548
+            let { inspect_date } = item
549
+            if (!dataInfotwo[inspect_date]) {
550
+              dataInfotwo[inspect_date] = {
551
+                inspect_date,
552
+                name: item.name,
553
+                inspect_value:item.inspect_value,
554
+                id:item.id,
555
+                inspect_date:item.inspect_date
556
+              }
377
             }
557
             }
378
-          }
379
-        console.log("ddd",dd)
380
-         console.log("obj",this.ObjectData)
381
-          this.tableData= []
382
-
383
-          for(const key in dd){
384
-              for(const mkey in this.ObjectData){
385
-                 if (!(this.ObjectData[mkey].item_name in dd[key])) {
386
-                   dd[key][this.ObjectData[mkey].item_name] = {
387
-                   item_name: this.ObjectData[mkey].item_name,
388
-                   name: mkey,
389
-                   inspect_value:0
390
-                  };
558
+          })
559
+        let listtwo = Object.values(dataInfotwo)
560
+        console.log("listtwo",listtwo)
561
+          for (const key in dd) {
562
+            for (const mkey in this.ObjectData) {
563
+              if (!(this.ObjectData[mkey].item_name in dd[key])) {
564
+                dd[key][this.ObjectData[mkey].item_name] = {
565
+                  item_name: this.ObjectData[mkey].item_name,
566
+                  name: mkey,
567
+                  inspect_value: 0
391
                 }
568
                 }
392
               }
569
               }
393
-              this.tableData.push({ name: key, data: dd[key]});
394
-             }
570
+            }
571
+            this.tableData.push({ name: key, data: dd[key]})
572
+          }
395
 
573
 
396
-           
397
-            let projectArr = []
398
-            this.newArr.map(item => {
399
-              projectArr.push(item.item_name)
400
-            })
401
-            console.log("projectArr",projectArr)
402
-
403
-            this.tableData.map(item => {
404
-            // console.log("item---",item.data)
405
-              let newarr = Object.values(item.data);
406
-              // console.log("arr",newarr)
407
-              newarr.sort((a,b)=>{
408
-                // console.log(1111,a)
409
-                // console.log(2222,b)
410
-                return projectArr.indexOf(a.item_name)-projectArr.indexOf(b.item_name);
411
-              });
412
-              item.data = newarr
574
+          listtwo.map(item=>{
575
+            this.tableData.map(it=>{
576
+              if(item.inspect_date == parseInt(it.name)){
577
+                 it.name = item.name
578
+                 it.id = item.id
579
+                 it.inspect_date = item.inspect_date
580
+              }
413
             })
581
             })
414
-              console.log("表",this.tableData)
582
+          })
583
+          for(let i=0;i<this.patientsArr.length;i++){
584
+             for(let j=0;j<this.tableData.length;j++){
585
+               if(this.patientsArr[i].name == this.tableData[j].name){
586
+                   this.tableData[j].dialysis_no = this.patientsArr[i].dialysis_no
587
+                   this.tableData[j].patient_id = this.patientsArr[i].id
588
+               }
589
+             }
590
+          }
591
+         console.log("表哥123",this.tableData)
415
          }
592
          }
416
       })
593
       })
417
     },
594
     },
425
         var result = [];
602
         var result = [];
426
         for(var i = 0; i < array2.length; i++){
603
         for(var i = 0; i < array2.length; i++){
427
             var obj = array2[i];
604
             var obj = array2[i];
428
-            var num = obj.patient_id;   //staff_id   就是要对比的key
605
+            var num = obj.item_id;   //staff_id   就是要对比的key
429
             var isExist = false;
606
             var isExist = false;
430
             for(var j = 0; j < array1.length; j++){
607
             for(var j = 0; j < array1.length; j++){
431
                 var aj = array1[j];
608
                 var aj = array1[j];
432
-                var n = aj.patient_id;
609
+                var n = aj.item_id;
433
                 if(n == num){
610
                 if(n == num){
434
                     isExist = true;
611
                     isExist = true;
435
                     break;
612
                     break;
439
                 result.push(obj);
616
                 result.push(obj);
440
             }
617
             }
441
         }
618
         }
442
-        console.log("result",result)
443
         return result;
619
         return result;
444
     },
620
     },
621
+
622
+    getCartogramlist(){
623
+       getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
624
+           if(response.data.state == 1){
625
+              var cartogramlist =  response.data.data.cartogramlist
626
+            //  console.log("cartogramlist",cartogramlist)
627
+              var totaltwo =  response.data.data.total
628
+              // console.log("totaltwo",totaltwo)
629
+               var cart = []
630
+               for(let i=0;i<cartogramlist.length;i++){
631
+                  if(cartogramlist[i].inspect_value != ''){
632
+                    cart.push(cartogramlist[i])
633
+                  }
634
+               }
635
+              // console.log("cart",cart)
636
+               let dataInfo = {}
637
+                cart.forEach((item, index) => {
638
+                  let { inspect_date } = item
639
+                  if (!dataInfo[inspect_date]) {
640
+                    dataInfo[inspect_date] = {
641
+                      inspect_date,
642
+                      name:item.name,
643
+                      child: [],
644
+                      patient_id:item.patient_id,
645
+                      total:0,
646
+                      count:0,
647
+                    }
648
+                  }
649
+                })
650
+              let list = Object.values(dataInfo)
651
+              console.log("list",list)
652
+
653
+              var arr = []
654
+              list.map(item=>{
655
+                 for(let i=0;i<cart.length;i++){
656
+                    if(item.inspect_date == cart[i].inspect_date && item.patient_id == cart[i].patient_id){
657
+                        item.child.push(cart[i])
658
+                    }
659
+                 }
660
+              })
661
+
662
+
663
+
664
+             list.map(item=>{
665
+                item.child.map(it=>{
666
+                   if(parseInt(it.range_min)<=parseInt(it.inspect_value) && parseInt(it.inspect_value)<=parseInt(it.range_max)){
667
+                       item.total ++
668
+                   }
669
+                })
670
+             })
671
+             var standardTotal = 0
672
+
673
+             list.map(item=>{
674
+               if(item.total == item.child.length){
675
+                  item.count ++
676
+               }
677
+             })
678
+             list.map(item=>{
679
+               standardTotal += item.count
680
+             })
681
+             var totalCount = list.length
682
+            //  console.log("arr",list)
683
+            //  console.log("合格",standardTotal)
684
+            //  console.log("总人数",totalCount)
685
+             for(let i=0;i<this.dataCount.length;i++){
686
+                this.dataCount[0].count = standardTotal
687
+                this.dataCount[1].count =  totalCount - standardTotal
688
+               this.obj.push(this.dataCount[i].count)
689
+             }
690
+            // console.log("dataCount",this.dataCount)
691
+         for (let i = 0; i < this.dataName.length; i++) {
692
+            this.modesData.xAxis.push(this.dataName[i].name)
693
+
694
+          }
695
+          for (let i = 0; i < this.dataCount.length; i++) {
696
+              this.modesData.series.push(((this.dataCount[i].count / totalCount) * 100).toFixed(1))
697
+            }
698
+            this.chart.series[0].data = this.modesData.series
699
+            this.chart.xAxis.data = this.modesData.xAxis
700
+            //  console.log("this",this.modesData)
701
+           }
702
+       })
703
+    },
704
+     getCurrentOrgPatients(){
705
+       getCurrentOrgPatients().then(response=>{
706
+          if(response.data.state == 1){
707
+            this.patientsArr =  response.data.data.patients
708
+            // console.log("病人",this.patientsArr)
709
+            //获取列表数据
710
+            this.getlist()
711
+          }
712
+       })
713
+     },
714
+    querySearchAsync(keyword, cb) {
715
+        let key = ''
716
+        if (keyword != undefined) {
717
+          key = keyword
718
+        }
719
+        let searchArray = []
720
+        PostSearch(key).then(response => {
721
+          if (response.data.state == 1) {
722
+             searchArray = response.data.data.patient
723
+            cb(searchArray)
724
+          } else {
725
+            cb([])
726
+          }
727
+        })
728
+      },
729
+   handleSelect(val) {
730
+        this.listQuery.search = val.name
731
+        this.patient_id = val.id
732
+        this.onSearch()
733
+     },
445
   },
734
   },
446
   created(){
735
   created(){
447
     var nowDate = new Date();
736
     var nowDate = new Date();
465
       "-" +
754
       "-" +
466
       (nowDay < 10 ? "0" + nowDay : nowDay);
755
       (nowDay < 10 ? "0" + nowDay : nowDay);
467
 
756
 
757
+
758
+
759
+    this.getCurrentOrgPatients()
468
     //获取系统指标
760
     //获取系统指标
469
     this.getNormData()
761
     this.getNormData()
470
-    //获取列表数据
471
-    this.getlist()
762
+    //获取统计图数据
763
+    this.getCartogramlist()
764
+
765
+
472
   }
766
   }
473
 };
767
 };
474
 </script>
768
 </script>

+ 1 - 1
src/xt_pages/qcd/processIndicators.vue View File

179
   data() {
179
   data() {
180
     return {
180
     return {
181
       crumbs: [
181
       crumbs: [
182
-        { path: false, name: "科室质控" },
182
+        { path: false, name: "质控管理" },
183
         { path: "/qcd/processindicators", name: "过程指标" }
183
         { path: "/qcd/processindicators", name: "过程指标" }
184
       ],
184
       ],
185
       total: 0,
185
       total: 0,

+ 52 - 22
src/xt_pages/qcd/statisticalConfiguration.vue View File

74
                 </el-option>
74
                 </el-option>
75
             </el-select>
75
             </el-select>
76
           </el-form-item>
76
           </el-form-item>
77
-          <el-form-item label="指控范围" :label-width="formLabelWidth" required prop="large_range">
77
+
78
+          <!-- <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="large_range">
78
             <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
79
             <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
79
             -
80
             -
80
             <el-input style="width:200px" v-model="form.large_range"></el-input>
81
             <el-input style="width:200px" v-model="form.large_range"></el-input>
81
-          </el-form-item>
82
+          </el-form-item> -->
83
+          <div style="display:flex;">
84
+            <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
85
+                <el-input style="width:200px" v-model="form.min_range"></el-input>
86
+            </el-form-item>
87
+            <span style="margin-top:10px">-</span>
88
+            <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
89
+                <el-input style="width:200px" v-model="form.large_range"></el-input>
90
+            </el-form-item>
91
+          </div>
82
           <el-form-item label="排序" :label-width="formLabelWidth">
92
           <el-form-item label="排序" :label-width="formLabelWidth">
83
             <el-input style="width:200px" v-model="form.sort"></el-input>
93
             <el-input style="width:200px" v-model="form.sort"></el-input>
84
           </el-form-item>
94
           </el-form-item>
115
                 </el-option>
125
                 </el-option>
116
             </el-select>
126
             </el-select>
117
           </el-form-item>
127
           </el-form-item>
118
-          <el-form-item label="指控范围" :label-width="formLabelWidth" required prop="large_range">
128
+          <!-- <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="large_range">
119
             <el-input style="width:200px" v-model="editform.min_range"></el-input>&nbsp;
129
             <el-input style="width:200px" v-model="editform.min_range"></el-input>&nbsp;
120
             -
130
             -
121
             <el-input style="width:200px" v-model="editform.large_range"></el-input>
131
             <el-input style="width:200px" v-model="editform.large_range"></el-input>
122
-          </el-form-item>
132
+          </el-form-item> -->
133
+           <div style="display:flex;">
134
+            <el-form-item label="质控范围" :label-width="formLabelWidth" required prop="min_range">
135
+                <el-input style="width:200px" v-model="editform.min_range"></el-input>
136
+            </el-form-item>
137
+            <span style="margin-top:10px">-</span>
138
+            <el-form-item class='newFormItem' :label-width="formLabelWidth" required prop="large_range">
139
+                <el-input style="width:200px" v-model="editform.large_range"></el-input>
140
+            </el-form-item>
141
+          </div>
123
           <el-form-item label="排序" :label-width="formLabelWidth">
142
           <el-form-item label="排序" :label-width="formLabelWidth">
124
             <el-input style="width:200px" v-model="editform.sort"></el-input>
143
             <el-input style="width:200px" v-model="editform.sort"></el-input>
125
           </el-form-item>
144
           </el-form-item>
146
   data() {
165
   data() {
147
     return {
166
     return {
148
       crumbs: [
167
       crumbs: [
149
-        { path: false, name: "科室质控" },
168
+        { path: false, name: "质控管理" },
150
         { path: false, name: "统计配置" },
169
         { path: false, name: "统计配置" },
151
         { path: false, name: "质控达标统计配置" }
170
         { path: false, name: "质控达标统计配置" }
152
       ],
171
       ],
176
       rules: {
195
       rules: {
177
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
196
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
178
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
197
         inspectionMinor: [{ required: true, message: "检查小项不能为空" }],
179
-        large_range:[{required:true,message:"指控范围不能为空"}]
198
+        large_range:[{required:true,message:"质控范围不能为空"}],
199
+        min_range:[{required:true,message:"质控范围不能为空"}]
180
       },
200
       },
181
       page:1,
201
       page:1,
182
       limit:10,
202
       limit:10,
196
       getConfigurationDetail(id).then(response=>{
216
       getConfigurationDetail(id).then(response=>{
197
          if(response.data.state == 1){
217
          if(response.data.state == 1){
198
            var configurationdetail = response.data.data.configurationdetail
218
            var configurationdetail = response.data.data.configurationdetail
199
-          // console.log("详情",configurationdetail)
219
+          console.log("详情",configurationdetail)
200
            this.editform.id = configurationdetail.id
220
            this.editform.id = configurationdetail.id
201
            this.editform.inspectionMajor = configurationdetail.inspection_major
221
            this.editform.inspectionMajor = configurationdetail.inspection_major
202
            this.editform.inspectionMinor = configurationdetail.inspection_minor
222
            this.editform.inspectionMinor = configurationdetail.inspection_minor
216
       getInspectionMajor().then(response=>{
236
       getInspectionMajor().then(response=>{
217
         if(response.data.state == 1){
237
         if(response.data.state == 1){
218
           var inspection =  response.data.data.inspection
238
           var inspection =  response.data.data.inspection
219
-          //console.log("大项",inspection)
239
+          console.log("大项",inspection)
220
           this.InspectionMajor = inspection
240
           this.InspectionMajor = inspection
221
          
241
          
222
         }
242
         }
227
       getInspectionMinor(id).then(response=>{
247
       getInspectionMinor(id).then(response=>{
228
         if(response.data.state == 1){
248
         if(response.data.state == 1){
229
          var inspection =  response.data.data.inspection
249
          var inspection =  response.data.data.inspection
230
-        // console.log("小项",inspection)
250
+         console.log("小项",inspection)
231
          this.InspectionMinor = inspection
251
          this.InspectionMinor = inspection
232
         }
252
         }
233
       })
253
       })
234
     },
254
     },
235
     changeInspectionTwo(id){
255
     changeInspectionTwo(id){
236
       this.InspectionMinorTwo = []
256
       this.InspectionMinorTwo = []
257
+      this.editform.inspectionMinor = ""
237
        getInspectionMinor(id).then(response=>{
258
        getInspectionMinor(id).then(response=>{
238
         if(response.data.state == 1){
259
         if(response.data.state == 1){
239
          var inspection =  response.data.data.inspection
260
          var inspection =  response.data.data.inspection
242
         }
263
         }
243
       })
264
       })
244
     },
265
     },
245
-    // 获取控范围
266
+    // 获取控范围
246
     changeInspectionMonior(id){
267
     changeInspectionMonior(id){
247
        getInspectionRange(id).then(response=>{
268
        getInspectionRange(id).then(response=>{
248
          if(response.data.state == 1){
269
          if(response.data.state == 1){
249
            var inspectionRange =  response.data.data.inspectionRange
270
            var inspectionRange =  response.data.data.inspectionRange
250
-          // console.log("inspectionRange",inspectionRange)
271
+          console.log("inspectionRange",inspectionRange)
251
            this.form.min_range = inspectionRange.range_min
272
            this.form.min_range = inspectionRange.range_min
252
            this.form.large_range = inspectionRange.range_max
273
            this.form.large_range = inspectionRange.range_max
253
          }
274
          }
293
               configurationlist[i].sort = ""
314
               configurationlist[i].sort = ""
294
             }
315
             }
295
           }
316
           }
296
-          //console.log("列表",configurationlist)
317
+          console.log("列表",configurationlist)
297
           this.configuraData = configurationlist
318
           this.configuraData = configurationlist
298
           var total = response.data.data.total
319
           var total = response.data.data.total
299
          // console.log("total",total)
320
          // console.log("total",total)
320
         var sort = parseInt(sorts)
341
         var sort = parseInt(sorts)
321
         this.editform.sort = sort
342
         this.editform.sort = sort
322
        }
343
        }
323
-     
324
-      UpdateConfiguration(this.editform.id,this.editform).then(response=>{
325
-        if(response.data.state == 1){
326
-         var standard =  response.data.data.standard
327
-        // console.log("standard",standard)
328
-         this.$message.success("保存成功")
329
-         this.editDialog = false
330
-         this.getConfigurationList()
331
-        }else{
332
-         this.$message.error("检查小项已存在")
344
+      this.$refs[formName].validate(valid=>{
345
+        if(valid){
346
+         UpdateConfiguration(this.editform.id,this.editform).then(response=>{
347
+            if(response.data.state == 1){
348
+            var standard =  response.data.data.standard
349
+            // console.log("standard",standard)
350
+            this.$message.success("保存成功")
351
+            this.editDialog = false
352
+            this.getConfigurationList()
353
+            this.getAllInspectionMinor()
354
+            }else{
355
+            this.$message.error("检查小项已存在")
356
+            }
357
+          })
333
         }
358
         }
334
       })
359
       })
335
     },
360
     },
390
     text-align: center;
415
     text-align: center;
391
   }
416
   }
392
 }
417
 }
418
+.newFormItem{
419
+  .el-form-item__content{
420
+    margin-left:0 !important;
421
+  }
422
+}
393
 </style>
423
 </style>
394
 
424
 
395
  <style rel="stylesheet/scss" lang="scss" scoped>
425
  <style rel="stylesheet/scss" lang="scss" scoped>

+ 1 - 1
src/xt_pages/qcd/treatmentControlAnalysis.vue View File

18
   data() {
18
   data() {
19
     return {
19
     return {
20
       crumbs: [
20
       crumbs: [
21
-        { path: false, name: "科室质控" },
21
+        { path: false, name: "质控管理" },
22
         { path: false, name: "患者质控达标统计" }
22
         { path: false, name: "患者质控达标统计" }
23
       ]
23
       ]
24
     };
24
     };

+ 1 - 4
src/xt_pages/qcd/treatmentControlAnalysis/check.vue View File

10
           <el-tab-pane label="患者检验检查统计" name="second"></el-tab-pane>
10
           <el-tab-pane label="患者检验检查统计" name="second"></el-tab-pane>
11
         </el-tabs>
11
         </el-tabs>
12
         <div class="cell clearfix">
12
         <div class="cell clearfix">
13
-          <label class="title">
14
-            <span class="name">转归状态</span> :
15
-          </label>
16
           <div class="time">
13
           <div class="time">
17
             <ul class>
14
             <ul class>
18
               <li
15
               <li
50
   data() {
47
   data() {
51
     return {
48
     return {
52
       crumbs: [
49
       crumbs: [
53
-        { path: false, name: "科室质控" },
50
+        { path: false, name: "质控管理" },
54
         { path: false, name: "治疗信息统计" },
51
         { path: false, name: "治疗信息统计" },
55
         { path: false, name: "患者透析次数统计" }
52
         { path: false, name: "患者透析次数统计" }
56
       ],
53
       ],

+ 76 - 37
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue View File

3
     <div class="cell clearfix">
3
     <div class="cell clearfix">
4
       <el-form :inline="true" :model="listQuery">
4
       <el-form :inline="true" :model="listQuery">
5
         <el-form-item label>
5
         <el-form-item label>
6
-          <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
7
-          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
6
+          <!-- <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
7
+          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button> -->
8
+           <el-autocomplete
9
+             class="checkSearch"
10
+             popper-class="my-autocomplete"
11
+             v-model.trim="listQuery.search"
12
+             :fetch-suggestions="querySearchAsync"
13
+             :trigger-on-focus="false"
14
+             placeholder="输入病人透析号/姓名"
15
+             @select="handleSelect"
16
+              >
17
+             <i class="el-icon-search el-input__icon" slot="suffix"></i>
18
+               <template slot-scope="{ item }">
19
+                  <div class="name">{{ item.name }}</div>
20
+              </template>
21
+          </el-autocomplete>
8
         </el-form-item>
22
         </el-form-item>
9
       </el-form>
23
       </el-form>
10
       <label class="title">
24
       <label class="title">
90
 
104
 
91
 
105
 
92
 <script>
106
 <script>
107
+  import { PostSearch} from '@/api/patient'
93
   import {getCurrentOrgPatients,getAllMajorInspection,getPatientList,getPatientDetailCheck,SearchDetailCheck } from "@/api/common/common"
108
   import {getCurrentOrgPatients,getAllMajorInspection,getPatientList,getPatientDetailCheck,SearchDetailCheck } from "@/api/common/common"
94
 export default {
109
 export default {
95
   data() {
110
   data() {
106
       total:0,
121
       total:0,
107
       tableName:[],
122
       tableName:[],
108
       ObjectData:{},
123
       ObjectData:{},
124
+      patient_id:0,
125
+      patient_name:"",
109
     };
126
     };
110
   },
127
   },
111
   methods: {
128
   methods: {
122
       }
139
       }
123
     },
140
     },
124
     onSearch(){
141
     onSearch(){
125
-      SearchDetailCheck(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
142
+     getPatientDetailCheck(this.patient_id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
126
           if(response.data.state === 1){
143
           if(response.data.state === 1){
127
-           var  checkDetail =  response.data.data.checkDetail
128
-             var arr = []
144
+            var checkDetail =  response.data.data.checkDetail
145
+        
146
+            var arr = []
129
             for(let i=0;i<checkDetail.length;i++){
147
             for(let i=0;i<checkDetail.length;i++){
130
               for(let j=0;j<this.tableName.length;j++){
148
               for(let j=0;j<this.tableName.length;j++){
131
                  if(checkDetail[i].ProjectId == this.tableName[j].inspection_major){
149
                  if(checkDetail[i].ProjectId == this.tableName[j].inspection_major){
133
                  }
151
                  }
134
               }
152
               }
135
             }
153
             }
136
-            // let projectArr = []
137
-            // this.newArr.map(item => {
138
-            //   projectArr.push(item.project_name)
139
-            // })
140
-            // console.log("projectArr",projectArr)
141
-            // projectArr.forEach((item,index) => {
142
-            //   if(!(arr[index] && item == arr[index].ProjectName)){
143
-            //     arr.splice(index,0,{Count:0, ProjectName: item,name: val.name})
144
-            //   }
145
-            // })
146
-            // this.tableData = []
147
-            // let obj = {}
148
-            // obj.name = val.name
149
-            // obj.data = arr
150
-            // this.tableData.push(obj)
151
-            console.log("arr",arr)
154
+
155
+            let projectArr = []
156
+            this.newArr.map(item => {
157
+              projectArr.push(item.project_name)
158
+            })
159
+            projectArr.forEach((item,index) => {
160
+              if(!(arr[index] && item == arr[index].ProjectName)){
161
+                arr.splice(index,0,{Count:0, ProjectName: item,name: this.listQuery.search})
162
+              }
163
+            })
164
+            this.tableData = []
165
+            let obj = {}
166
+            obj.name = this.listQuery.search
167
+            obj.data = arr
168
+            this.tableData.push(obj)
169
+            this.total = 1
170
+           
152
           }
171
           }
153
       })
172
       })
154
     },
173
     },
184
       getAllMajorInspection().then(response=>{
203
       getAllMajorInspection().then(response=>{
185
         if(response.data.state === 1){
204
         if(response.data.state === 1){
186
            var inspection = response.data.data.inspection
205
            var inspection = response.data.data.inspection
187
-           console.log("inspection",inspection)
206
+        
188
            var a=[];
207
            var a=[];
189
            for(let i=0;i<inspection.length;i++){
208
            for(let i=0;i<inspection.length;i++){
190
              a.push(inspection[i])
209
              a.push(inspection[i])
191
            }
210
            }
192
-           console.log("a",a)
211
+
193
            this.newArr = a
212
            this.newArr = a
194
            var arr = this.arrayToObj(a)
213
            var arr = this.arrayToObj(a)
195
            
214
            
196
-           console.log("arr",arr)
215
+      
197
            this.ObjectData = arr
216
            this.ObjectData = arr
198
            this.tableName = inspection
217
            this.tableName = inspection
199
         }
218
         }
203
       getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
222
       getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
204
          if(response.data.state === 1){
223
          if(response.data.state === 1){
205
            var patientInfo = response.data.data.patientInfo
224
            var patientInfo = response.data.data.patientInfo
206
-           console.log("列表数据2",patientInfo)
225
+          
207
 
226
 
208
            var total = response.data.data.total
227
            var total = response.data.data.total
209
-           console.log("total",total)
228
+        
210
            this.total = total
229
            this.total = total
211
           var list = response.data.data.list
230
           var list = response.data.data.list
212
-          console.log("list",list)
231
+       
213
           var dtd = []
232
           var dtd = []
214
           for(let i=0;i<list.length;i++){
233
           for(let i=0;i<list.length;i++){
215
               for(let j=0;j<this.tableName.length;j++){
234
               for(let j=0;j<this.tableName.length;j++){
218
                   }
237
                   }
219
               }
238
               }
220
           }
239
           }
221
-          console.log("dtd",dtd)
240
+   
222
           var dd = {};
241
           var dd = {};
223
            for (const index in dtd) {
242
            for (const index in dtd) {
224
             if (!(dtd[index].name in dd)) {
243
             if (!(dtd[index].name in dd)) {
228
               dd[dtd[index].name][dtd[index].ProjectName] = dtd[index];
247
               dd[dtd[index].name][dtd[index].ProjectName] = dtd[index];
229
             }
248
             }
230
           }
249
           }
231
-          console.log("ddd",dd)
232
-           console.log("this.ObjectData",this.ObjectData)
250
+       
233
            
251
            
234
             for(const key in dd){
252
             for(const key in dd){
235
               for(const mkey in this.ObjectData){
253
               for(const mkey in this.ObjectData){
243
               }
261
               }
244
               this.tableData.push({ name: key, data: dd[key]});
262
               this.tableData.push({ name: key, data: dd[key]});
245
             }
263
             }
246
-            console.log("表",this.tableData)
264
+       
247
             let projectArr = []
265
             let projectArr = []
248
           
266
           
249
             this.newArr.map(item => {
267
             this.newArr.map(item => {
250
               projectArr.push(item.project_name)
268
               projectArr.push(item.project_name)
251
             })
269
             })
252
-            console.log("projectArr",projectArr)
270
+      
253
             this.tableData.map(item => {
271
             this.tableData.map(item => {
254
               let arr = Object.values(item.data);
272
               let arr = Object.values(item.data);
255
-             console.log("arr",arr)
273
+       
256
               arr.sort((a,b)=>{
274
               arr.sort((a,b)=>{
257
                 return projectArr.indexOf(a.ProjectName)-projectArr.indexOf(b.ProjectName);
275
                 return projectArr.indexOf(a.ProjectName)-projectArr.indexOf(b.ProjectName);
258
               });
276
               });
265
       getPatientDetailCheck(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
283
       getPatientDetailCheck(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
266
           if(response.data.state === 1){
284
           if(response.data.state === 1){
267
             var checkDetail =  response.data.data.checkDetail
285
             var checkDetail =  response.data.data.checkDetail
268
-            console.log("checkDetail",checkDetail)
286
+        
269
             var arr = []
287
             var arr = []
270
             for(let i=0;i<checkDetail.length;i++){
288
             for(let i=0;i<checkDetail.length;i++){
271
               for(let j=0;j<this.tableName.length;j++){
289
               for(let j=0;j<this.tableName.length;j++){
274
                  }
292
                  }
275
               }
293
               }
276
             }
294
             }
295
+
277
             let projectArr = []
296
             let projectArr = []
278
             this.newArr.map(item => {
297
             this.newArr.map(item => {
279
               projectArr.push(item.project_name)
298
               projectArr.push(item.project_name)
280
             })
299
             })
281
-            console.log("projectArr",projectArr)
282
             projectArr.forEach((item,index) => {
300
             projectArr.forEach((item,index) => {
283
               if(!(arr[index] && item == arr[index].ProjectName)){
301
               if(!(arr[index] && item == arr[index].ProjectName)){
284
                 arr.splice(index,0,{Count:0, ProjectName: item,name: val.name})
302
                 arr.splice(index,0,{Count:0, ProjectName: item,name: val.name})
290
             obj.data = arr
308
             obj.data = arr
291
             this.tableData.push(obj)
309
             this.tableData.push(obj)
292
             this.total = 1
310
             this.total = 1
293
-            console.log("arr",this.tableData)
311
+           
294
           }
312
           }
295
       })
313
       })
296
     },
314
     },
297
    arrayToObj(arr){
315
    arrayToObj(arr){
298
       return Object.assign({},arr);
316
       return Object.assign({},arr);
299
-    }
317
+    },
318
+  querySearchAsync(keyword, cb) {
319
+        let key = ''
320
+        if (keyword != undefined) {
321
+          key = keyword
322
+        }
323
+        let searchArray = []
324
+        PostSearch(key).then(response => {
325
+          if (response.data.state == 1) {
326
+             searchArray = response.data.data.patient
327
+             console.log("searchArray",searchArray)
328
+            cb(searchArray)
329
+          } else {
330
+            cb([])
331
+          }
332
+        })
333
+      },
334
+   handleSelect(val) {
335
+        this.listQuery.search = val.name
336
+        this.patient_id = val.id
337
+        this.onSearch()
338
+      },
300
   },
339
   },
301
   created(){
340
   created(){
302
      var nowDate = new Date();
341
      var nowDate = new Date();

+ 74 - 27
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue View File

3
     <div class="cell clearfix">
3
     <div class="cell clearfix">
4
       <el-form :inline="true" :model="listQuery">
4
       <el-form :inline="true" :model="listQuery">
5
         <el-form-item label>
5
         <el-form-item label>
6
-          <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
7
-          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
6
+          <!-- <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
7
+          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button> -->
8
+          <el-autocomplete
9
+             class="checkSearch"
10
+             popper-class="my-autocomplete"
11
+             v-model.trim="listQuery.search"
12
+             :fetch-suggestions="querySearchAsync"
13
+             :trigger-on-focus="false"
14
+             placeholder="输入病人透析号/姓名"
15
+             @select="handleSelect"
16
+              >
17
+             <i class="el-icon-search el-input__icon" slot="suffix"></i>
18
+               <template slot-scope="{ item }">
19
+                  <div class="name">{{ item.name }}</div>
20
+              </template>
21
+          </el-autocomplete>
8
         </el-form-item>
22
         </el-form-item>
9
       </el-form>
23
       </el-form>
10
       <label class="title">
24
       <label class="title">
67
 
81
 
68
 
82
 
69
 <script>
83
 <script>
84
+import { PostSearch} from '@/api/patient'
70
 import echarts from "echarts";
85
 import echarts from "echarts";
71
 import LineChart from "../../components/LineChart";
86
 import LineChart from "../../components/LineChart";
72
 import { getCurrentOrgPatients,getInspectionTotalCount,getInspectionDetailById,getSearchPatientInfo } from "@/api/common/common";
87
 import { getCurrentOrgPatients,getInspectionTotalCount,getInspectionDetailById,getSearchPatientInfo } from "@/api/common/common";
178
         xAxis: [],
193
         xAxis: [],
179
         series: []
194
         series: []
180
       },
195
       },
181
-      obj:[]
196
+      obj:[],
197
+      patient_id:0,
182
     };
198
     };
183
   },
199
   },
184
   methods: {
200
   methods: {
216
       getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
232
       getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
217
           if(response.data.state === 1){
233
           if(response.data.state === 1){
218
             var Inspection = response.data.data.Inspection
234
             var Inspection = response.data.data.Inspection
219
-            console.log("Inspection",Inspection)
235
+     
220
             this.tableData = Inspection
236
             this.tableData = Inspection
221
           
237
           
222
             var counts = response.data.data.counts
238
             var counts = response.data.data.counts
223
-            console.log("counts",counts)
239
+         
224
             var arr = []
240
             var arr = []
225
             for(let i=0;i<Inspection.length;i++){
241
             for(let i=0;i<Inspection.length;i++){
226
                for(let j=0;j<counts.length;j++){
242
                for(let j=0;j<counts.length;j++){
229
                  }
245
                  }
230
                }
246
                }
231
             }
247
             }
232
-             console.log("arr",arr)
233
-             var arrtwo =  this.arrayDate(counts,this.normData)
234
-             console.log("arrtwo",arrtwo)
248
+          
249
+           var arrtwo =  this.arrayDate(counts,this.normData)
250
+            
235
             var hash = {};
251
             var hash = {};
236
             var i = 0;
252
             var i = 0;
237
             var res = [];
253
             var res = [];
248
             res.map(item => {
264
             res.map(item => {
249
              item.Count = eval(item.Count.join('+'))
265
              item.Count = eval(item.Count.join('+'))
250
             })
266
             })
251
-            console.log(11111,res)
267
+           
252
             let arr1 = []
268
             let arr1 = []
253
             this.tableData.map(it => {
269
             this.tableData.map(it => {
254
               arr1.push(it.project_name)
270
               arr1.push(it.project_name)
262
             res.map(item => {
278
             res.map(item => {
263
               this.modesData.series.push(parseInt(item.Count));
279
               this.modesData.series.push(parseInt(item.Count));
264
             })
280
             })
265
-
266
-
281
+             console.log("this=====",this.tableData)
267
             for (const key in this.tableData) {
282
             for (const key in this.tableData) {
268
               this.modesData.xAxis.push(this.tableData[key].project_name);
283
               this.modesData.xAxis.push(this.tableData[key].project_name);
269
-              // if (key in res) {
270
-                
271
-              //   this.modesData.series.push(parseInt(res[key].Count));
272
-              //   // batotal += parseInt(res[key].Count);
273
-              // } else {
274
-              //   this.modesData.series.push(0);
275
-              // }
284
+               let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
285
+               let day = parseInt(time / (1000 * 60 * 60 * 24))
286
+              this.obj.push(Math.round(day / this.tableData[key].inspection_frequency))
276
             }
287
             }
277
-
278
-
279
             
288
             
280
             this.chart.series[0].data = this.modesData.series
289
             this.chart.series[0].data = this.modesData.series
281
             this.chart.xAxis.data = this.modesData.xAxis
290
             this.chart.xAxis.data = this.modesData.xAxis
282
-            console.log(2222,this.modesData)
283
           }
291
           }
284
       })
292
       })
285
     },
293
     },
300
                  }
308
                  }
301
               }
309
               }
302
             }
310
             }
303
-            console.log("arr",arr)
311
+            
304
            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
312
            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
305
            let day = parseInt(time / (1000 * 60 * 60 * 24))
313
            let day = parseInt(time / (1000 * 60 * 60 * 24))
306
-           console.log("time",parseInt(time / (1000 * 60 * 60 * 24)))
314
+           console.log("arr",arr)
315
+           console.log("tabledata",this.tableData)
307
             for (const key in this.tableData) {
316
             for (const key in this.tableData) {
308
               this.modesData.xAxis.push(this.tableData[key].project_name);
317
               this.modesData.xAxis.push(this.tableData[key].project_name);
309
               if (key in arr) {
318
               if (key in arr) {
323
 
332
 
324
     //搜索功能
333
     //搜索功能
325
     onSearch(){
334
     onSearch(){
326
-      getSearchPatientInfo(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
335
+       this.modesData.series = []
336
+       this.modesData.xAxis = []
337
+      getSearchPatientInfo(this.patient_id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
327
          if(response.data.state  === 1){
338
          if(response.data.state  === 1){
328
            var PatientsInfo = response.data.data.PatientsInfo
339
            var PatientsInfo = response.data.data.PatientsInfo
329
-           console.log("PatientsInfo",PatientsInfo)
340
+           console.log("patientsInfo",PatientsInfo)
330
            var arr = []
341
            var arr = []
331
            for(let i=0;i<this.tableData.length;i++){
342
            for(let i=0;i<this.tableData.length;i++){
332
              for(let j=0;j<PatientsInfo.length;j++){
343
              for(let j=0;j<PatientsInfo.length;j++){
335
                  }
346
                  }
336
              }
347
              }
337
            }
348
            }
338
-           console.log("arr",arr)
349
+           let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
350
+           let day = parseInt(time / (1000 * 60 * 60 * 24))
351
+       
352
+            for (const key in this.tableData) {
353
+              this.modesData.xAxis.push(this.tableData[key].project_name);
354
+              if (key in arr) {
355
+                this.modesData.series.push(parseInt(arr[key].Count));
356
+                this.obj.push(Math.round(day / arr[key].InspectionFrequency))
357
+                // batotal += parseInt(res[key].Count);
358
+              } else {
359
+                this.modesData.series.push(0);
360
+                this.obj.push(0)
361
+              }
362
+            }
363
+            this.chart.series[0].data = this.modesData.series
364
+            this.chart.xAxis.data = this.modesData.xAxis
339
          }
365
          }
340
       })
366
       })
341
     },
367
     },
359
                 result.push(obj);
385
                 result.push(obj);
360
             }
386
             }
361
         }
387
         }
362
-        console.log("result",result)
363
         return result;
388
         return result;
364
     },
389
     },
390
+     querySearchAsync(keyword, cb) {
391
+        let key = ''
392
+        if (keyword != undefined) {
393
+          key = keyword
394
+        }
395
+        let searchArray = []
396
+        PostSearch(key).then(response => {
397
+          if (response.data.state == 1) {
398
+             searchArray = response.data.data.patient
399
+             console.log("searchArray",searchArray)
400
+            cb(searchArray)
401
+          } else {
402
+            cb([])
403
+          }
404
+        })
405
+      },
406
+   handleSelect(val) {
407
+        console.log("val",val)
408
+        this.listQuery.search = val.name
409
+        this.patient_id = val.id
410
+        this.onSearch()
411
+      },
365
   },
412
   },
366
   created(){
413
   created(){
367
     var nowDate = new Date();
414
     var nowDate = new Date();

+ 66 - 38
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue View File

101
 <script>
101
 <script>
102
 import echarts from "echarts";
102
 import echarts from "echarts";
103
 import LineChart from "../../components/LineChart";
103
 import LineChart from "../../components/LineChart";
104
-import {geStatistics} from "@/api/common/common"
104
+import {geStatistics,getTreatlist} from "@/api/common/common"
105
 export default {
105
 export default {
106
   components: {
106
   components: {
107
     LineChart
107
     LineChart
247
       this.geStatistics();
247
       this.geStatistics();
248
     },
248
     },
249
     handleCurrentChange(page) {
249
     handleCurrentChange(page) {
250
+      this.tableData = []
250
       this.listQuery.page = page;
251
       this.listQuery.page = page;
251
       this.geStatistics();
252
       this.geStatistics();
252
     },
253
     },
253
    selectChange(val){
254
    selectChange(val){
255
+     this.tableData=[]
254
      this.listQuery.value =val
256
      this.listQuery.value =val
255
      this.geStatistics()
257
      this.geStatistics()
258
+     this.getlist()
256
    },
259
    },
257
-    geStatistics(){
260
+   getlist(){
258
       this.modesData.series = []
261
       this.modesData.series = []
259
       this.modesData.xAxis = []
262
       this.modesData.xAxis = []
263
+     getTreatlist(this.listQuery).then(response=>{
264
+        if(response.data.state == 1){
265
+          var ttd =  response.data.data.list
266
+            var modeMap = {};
267
+            var batotal = 0;
268
+            for (const index in ttd) {
269
+              if (ttd[index].mode_id == "0") {
270
+                continue;
271
+              }
272
+              modeMap[ttd[index].mode_id] = ttd[index];
273
+            }
274
+            for (const key in this.modeOptions) {
275
+              this.modesData.xAxis.push(this.modeOptions[key].name);
276
+              if (key in modeMap) {
277
+                this.modesData.series.push(parseInt(modeMap[key].number));
278
+                batotal += parseInt(modeMap[key].number);
279
+              } else {
280
+                this.modesData.series.push(0);
281
+              }
282
+            }
283
+
284
+          this.chart.series[0].data = this.modesData.series
285
+          this.chart.xAxis.data = this.modesData.xAxis
286
+         }
287
+     })
288
+   },
289
+    geStatistics(){
260
       geStatistics(this.listQuery).then(response=>{
290
       geStatistics(this.listQuery).then(response=>{
261
         if(response.data.state === 1){
291
         if(response.data.state === 1){
262
-          var dtd =  response.data.data.statistics
263
-        //  console.log("dtd",dtd)
292
+          var statistics =  response.data.data.statistics
293
+          var treatinfo = response.data.data.treatinfo
294
+          this.total =  response.data.data.total
295
+          let dataInfo = {}
296
+           treatinfo.forEach((item, index) => {
297
+             let { date } = item
298
+             if (!dataInfo[date]) {
299
+                dataInfo[date] = {
300
+                   date,
301
+                   child: [],
302
+                 }
303
+                }
304
+            })
305
+         let list = Object.values(dataInfo)
306
+      
307
+         list.map(item=>{
308
+           for(let i=0;i<statistics.length;i++){
309
+             if(item.date == statistics[i].date){
310
+                item.child.push(statistics[i])
311
+             }
312
+           }
313
+         })
314
+         var dtd = []
315
+         list.map(item=>{
316
+           item.child.map(it=>{
317
+              dtd.push(it)
318
+           })
319
+         })
264
           var dd = {};
320
           var dd = {};
265
           for (const index in dtd) {
321
           for (const index in dtd) {
266
             if (!(dtd[index].date in dd)) {
322
             if (!(dtd[index].date in dd)) {
270
               dd[dtd[index].date][dtd[index].mode_id] = dtd[index];
326
               dd[dtd[index].date][dtd[index].mode_id] = dtd[index];
271
             }
327
             }
272
           }
328
           }
273
-          console.log("ddd",dd)
329
+          console.log("dd",dd)
274
           for (const key in dd) {
330
           for (const key in dd) {
275
             var total = 0;
331
             var total = 0;
276
             for (const mkey in this.modeOptions) {
332
             for (const mkey in this.modeOptions) {
277
               if (mkey in dd[key]) {
333
               if (mkey in dd[key]) {
334
+                console.log("=====",mkey)
335
+                console.log(this.modeOptions[mkey].name)
278
                 dd[key][mkey].mode = this.modeOptions[mkey].name;
336
                 dd[key][mkey].mode = this.modeOptions[mkey].name;
279
                 var number = parseInt(dd[key][mkey].number);
337
                 var number = parseInt(dd[key][mkey].number);
280
                 if (isNaN(number) || number == 0) {
338
                 if (isNaN(number) || number == 0) {
292
             }
350
             }
293
             this.tableData.push({ date: key, data: dd[key], total: total });
351
             this.tableData.push({ date: key, data: dd[key], total: total });
294
           }
352
           }
295
-          console.log("tabledata",this.tableData)
296
-          var ttd = response.data.data.ttd
297
-         // console.log("ttd",ttd)
298
-          var modeMap = {};
299
-          var batotal = 0;
300
-          for (const index in ttd) {
301
-            if (ttd[index].mode_id == "0") {
302
-              continue;
303
-            }
304
-            modeMap[ttd[index].mode_id] = ttd[index];
305
-          }
306
-         // console.log(111,modeMap)
307
-          for (const key in this.modeOptions) {
308
-            this.modesData.xAxis.push(this.modeOptions[key].name);
309
-            if (key in modeMap) {
310
-              this.modesData.series.push(parseInt(modeMap[key].number));
311
-              batotal += parseInt(modeMap[key].number);
312
-            } else {
313
-              this.modesData.series.push(0);
314
-            }
315
-          }
316
-
317
-          this.chart.series[0].data = this.modesData.series
318
-          this.chart.xAxis.data = this.modesData.xAxis
319
-         // console.log(this.chart.series[0].data)
320
-         // console.log(this.chart.xAxis.data)
321
-
322
-          this.total =  response.data.data.total
323
-         // console.log("total",this.total)
324
-
325
         }
353
         }
326
-      })
354
+       })
327
     },
355
     },
328
  
356
  
329
   },
357
   },
330
   created(){
358
   created(){
331
     this.modeOptions = this.$store.getters.treatment_mode;
359
     this.modeOptions = this.$store.getters.treatment_mode;
332
-    console.log("-----",this.modeOptions)
333
     var nowDate = new Date();
360
     var nowDate = new Date();
334
     var nowYear = nowDate.getFullYear();
361
     var nowYear = nowDate.getFullYear();
335
     var nowMonth = nowDate.getMonth() + 1;
362
     var nowMonth = nowDate.getMonth() + 1;
350
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
377
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
351
       "-" +
378
       "-" +
352
       (nowDay < 10 ? "0" + nowDay : nowDay);
379
       (nowDay < 10 ? "0" + nowDay : nowDay);
380
+      //获取柱状图数据
381
+      this.getlist()
353
       //获取统计列表数据
382
       //获取统计列表数据
354
       this.geStatistics()
383
       this.geStatistics()
355
-      console.log("activeModes",this.activeModes)
356
   },
384
   },
357
   computed: {
385
   computed: {
358
     activeModes: function() {
386
     activeModes: function() {

+ 44 - 89
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue View File

3
     <div class="cell clearfix">
3
     <div class="cell clearfix">
4
       <el-form :inline="true" :model="listQuery">
4
       <el-form :inline="true" :model="listQuery">
5
         <el-form-item label>
5
         <el-form-item label>
6
-          <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
7
-          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button>
6
+          <!-- <el-input v-model.trim="listQuery.search" placeholder="姓名/透析号" style="width:150px"></el-input>
7
+          <el-button type="primary" @click="onSearch" icon="el-icon-search">搜索</el-button> -->
8
+           <el-autocomplete
9
+             class="checkSearch"
10
+             popper-class="my-autocomplete"
11
+             v-model.trim="listQuery.search"
12
+             :fetch-suggestions="querySearchAsync"
13
+             :trigger-on-focus="false"
14
+             placeholder="输入病人透析号/姓名"
15
+             @select="handleSelect"
16
+              >
17
+             <i class="el-icon-search el-input__icon" slot="suffix"></i>
18
+               <template slot-scope="{ item }">
19
+                  <div class="name">{{ item.name }}</div>
20
+              </template>
21
+          </el-autocomplete>
8
         </el-form-item>
22
         </el-form-item>
9
       </el-form>
23
       </el-form>
10
       <label class="title">
24
       <label class="title">
98
 
112
 
99
 
113
 
100
 <script>
114
 <script>
115
+ import { PostSearch} from '@/api/patient'
101
  import { getCurrentOrgPatients,getDialysisList,getDialysisDetailById,getPrescriptionByName } from "@/api/common/common";
116
  import { getCurrentOrgPatients,getDialysisList,getDialysisDetailById,getPrescriptionByName } from "@/api/common/common";
102
  import { uParseTime } from "@/utils/tools";
117
  import { uParseTime } from "@/utils/tools";
103
 export default {
118
 export default {
124
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
139
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
125
         }
140
         }
126
       }, 
141
       }, 
142
+      patient_id:0,
127
     };
143
     };
128
   },
144
   },
129
   methods: {
145
   methods: {
173
     getDialysisList(){
189
     getDialysisList(){
174
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
190
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
175
          if(response.data.state === 1){
191
          if(response.data.state === 1){
176
-          //  var  dialysislist =  response.data.data.dialysislist
177
-          //  for(let i=0;i<dialysislist.length;i++){
178
-          //     if(dialysislist[i].mode_id == 1){
179
-          //       dialysislist[i].mode_id = "HD"
180
-          //     }
181
-          //      if(dialysislist[i].mode_id == 2){
182
-          //       dialysislist[i].mode_id = "HDF"
183
-          //     }
184
-          //      if(dialysislist[i].mode_id == 3){
185
-          //       dialysislist[i].mode_id = "HD+HP"
186
-          //     }
187
-          //      if(dialysislist[i].mode_id == 4){
188
-          //       dialysislist[i].mode_id = "HP"
189
-          //     }
190
-          //      if(dialysislist[i].mode_id == 5){
191
-          //       dialysislist[i].mode_id = "HF"
192
-          //     }
193
-          //      if(dialysislist[i].mode_id == 6){
194
-          //       dialysislist[i].mode_id = "SCUF"
195
-          //     }
196
-          //      if(dialysislist[i].mode_id == 7){
197
-          //       dialysislist[i].mode_id = "IUF"
198
-          //     }
199
-          //      if(dialysislist[i].mode_id == 8){
200
-          //       dialysislist[i].mode_id = "HFHD"
201
-          //     }
202
-          //      if(dialysislist[i].mode_id == 9){
203
-          //       dialysislist[i].mode_id = "HFHD+HP"
204
-          //     }
205
-          //      if(dialysislist[i].mode_id == 10){
206
-          //       dialysislist[i].mode_id = "PHF"
207
-          //     }
208
-          //      if(dialysislist[i].mode_id == 11){
209
-          //       dialysislist[i].mode_id = "HFR"
210
-          //     }
211
-          //     if(dialysislist[i].mode_id == 12){
212
-          //       dialysislist[i].mode_id = "HDF+HP"
213
-          //     }
214
-          //     if(dialysislist[i].mode_id == 13){
215
-          //       dialysislist[i].mode_id = "CRRT"
216
-          //     }
217
-          //    if(dialysislist[i].mode_id == 14){
218
-          //       dialysislist[i].mode_id = "腹水回输"
219
-          //     }
220
-          //     if(dialysislist[i].mode_id == 19){
221
-          //       dialysislist[i].mode_id = "IUF+HD"
222
-          //     }
223
-          //  }
224
-          //  console.log("dialysislist",dialysislist)
225
-          //  var hash = {};
226
-          //  var i = 0;
227
-          //  var res = [];
228
-          //  dialysislist.forEach(function(item) {
229
-          //   var patient_id = item.patient_id;
230
-          //   hash[patient_id] ? res[hash[patient_id] - 1].mode_id.push(item.mode_id) : hash[patient_id] = ++i && res.push({
231
-          //       mode_id: [item.mode_id],
232
-          //       patient_id: patient_id,
233
-          //       dialysis_no: item.dialysis_no,
234
-          //       name:item.name,
235
-          //       age:item.id_card_no,
236
-          //       total_dialysis:item.total_dialysis,
237
-          //       user_sys_before_count:item.user_sys_before_count,
238
-          //   })
239
-          //  });
240
-          //  res.map(item => {
241
-          //    item.age = this.getAge(item.age)
242
-          //  })
243
-          //  console.log(res)
244
-          //  //this.DialysisData = res
245
- 
246
-          //   var total = response.data.data.total
247
-          //   console.log("total",total) 
248
-          //  // this.total = total
249
-
250
-            
251
           var list = response.data.data.list
192
           var list = response.data.data.list
252
-          //console.log("list",list)
193
+          console.log("list",list)
253
           var totallist  =  response.data.data.totallist
194
           var totallist  =  response.data.data.totallist
254
-         // console.log("totallist",totallist)
195
+           console.log("totallist",totallist)
255
           this.total = totallist  
196
           this.total = totallist  
256
           var prescriptionList = response.data.data.prescriptionList
197
           var prescriptionList = response.data.data.prescriptionList
257
           this.getModeId(prescriptionList)
198
           this.getModeId(prescriptionList)
258
           
199
           
259
-         // console.log("prescriptionList",prescriptionList)
260
-          // for(let i=0;i<this.prescriptionList.length;i++){
261
-          //   for(let j=0;j<list.length;j++){
262
-          //     if(this.prescriptionList[i].patient_id == list[j].patient_id){
263
-          //       arr.push(this.prescriptionList[i])
264
-          //     }
265
-          //   }
266
-          // }
267
           let dataInfo = {}
200
           let dataInfo = {}
268
           list.forEach((item, index) => {
201
           list.forEach((item, index) => {
269
             let { patient_id } = item
202
             let { patient_id } = item
311
          this.getDialysisList()
244
          this.getDialysisList()
312
          return false
245
          return false
313
       }else{
246
       }else{
314
-       getPrescriptionByName(this.listQuery.search,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
247
+       getPrescriptionByName(this.patient_id,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
315
          if(response.data.state === 1){
248
          if(response.data.state === 1){
316
            var patients =  response.data.data.patient
249
            var patients =  response.data.data.patient
317
            this.getModeId(patients)
250
            this.getModeId(patients)
416
           patients[i].mode_id = "IUF+HD"
349
           patients[i].mode_id = "IUF+HD"
417
         }
350
         }
418
       }
351
       }
419
-    }
352
+    },
353
+     querySearchAsync(keyword, cb) {
354
+        let key = ''
355
+        if (keyword != undefined) {
356
+          key = keyword
357
+        }
358
+        let searchArray = []
359
+        PostSearch(key).then(response => {
360
+          if (response.data.state == 1) {
361
+             searchArray = response.data.data.patient
362
+             console.log("searchArray",searchArray)
363
+            cb(searchArray)
364
+          } else {
365
+            cb([])
366
+          }
367
+        })
368
+      },
369
+   handleSelect(val) {
370
+        console.log("val",val)
371
+        this.listQuery.search = val.name
372
+        this.patient_id = val.id
373
+        this.onSearch()
374
+      },
420
   },
375
   },
421
   created(){
376
   created(){
422
     var nowDate = new Date();
377
     var nowDate = new Date();

+ 1 - 4
src/xt_pages/qcd/treatmentControlAnalysis/time.vue View File

10
           <el-tab-pane label="患者检验检查统计" name="second"></el-tab-pane>
10
           <el-tab-pane label="患者检验检查统计" name="second"></el-tab-pane>
11
         </el-tabs>
11
         </el-tabs>
12
         <div class="cell clearfix">
12
         <div class="cell clearfix">
13
-          <label class="title">
14
-            <span class="name">转归状态</span> :
15
-          </label>
16
           <div class="time">
13
           <div class="time">
17
             <ul class>
14
             <ul class>
18
               <li
15
               <li
50
   data() {
47
   data() {
51
     return {
48
     return {
52
       crumbs: [
49
       crumbs: [
53
-        { path: false, name: "科室质控" },
50
+        { path: false, name: "质控管理" },
54
         { path: false, name: "治疗信息统计" },
51
         { path: false, name: "治疗信息统计" },
55
         { path: false, name: "患者透析次数统计" }
52
         { path: false, name: "患者透析次数统计" }
56
       ],
53
       ],

+ 236 - 147
src/xt_pages/qcd/workAnalysis/doctor.vue View File

10
           <el-tab-pane label="护士" name="second"></el-tab-pane>
10
           <el-tab-pane label="护士" name="second"></el-tab-pane>
11
         </el-tabs>
11
         </el-tabs>
12
         <div class="cell clearfix">
12
         <div class="cell clearfix">
13
-          <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
13
+          <el-select v-model="query.admin_user_id" placeholder="请选择" style="width:120px;margin-right:20px"               @change="changeDoctor"
14
+          >
14
             <el-option
15
             <el-option
15
-              v-for="item in options"
16
-              :key="item.value"
17
-              :label="item.label"
18
-              :value="item.value"
16
+              v-for="item in doctor_options"
17
+              :key="item.id"
18
+              :label="item.user_name"
19
+              :value="item.admin_user_id"
19
             ></el-option>
20
             ></el-option>
20
           </el-select>
21
           </el-select>
21
           <el-select
22
           <el-select
22
-            v-model="value"
23
+            v-model="query.statistics_type"
23
             placeholder="请选择"
24
             placeholder="请选择"
24
-            @change="chooseType"
25
+            @change="changeProject"
25
             style="width:120px;margin-right:20px"
26
             style="width:120px;margin-right:20px"
26
           >
27
           >
27
             <el-option
28
             <el-option
28
-              v-for="item in options"
29
+              v-for="item in project_options"
29
               :key="item.value"
30
               :key="item.value"
30
-              :label="item.label"
31
+              :label="item.name"
31
               :value="item.value"
32
               :value="item.value"
32
             ></el-option>
33
             ></el-option>
33
           </el-select>
34
           </el-select>
35
             <span class="name">日期查询</span> :
36
             <span class="name">日期查询</span> :
36
           </label>
37
           </label>
37
           <el-date-picker
38
           <el-date-picker
38
-            v-model="listQuery.start_time"
39
+            v-model="query.start_time"
39
             prefix-icon="el-icon-date"
40
             prefix-icon="el-icon-date"
40
             @change="changeTime"
41
             @change="changeTime"
41
             :editable="false"
42
             :editable="false"
42
-            style="width: 196px;"
43
+            style="width: 150px;"
43
             type="date"
44
             type="date"
45
+            :picker-options="pickerOptions"
44
             placeholder="选择日期时间"
46
             placeholder="选择日期时间"
45
             align="right"
47
             align="right"
46
             format="yyyy-MM-dd"
48
             format="yyyy-MM-dd"
48
           ></el-date-picker>
50
           ></el-date-picker>
49
           <span class>-</span>
51
           <span class>-</span>
50
           <el-date-picker
52
           <el-date-picker
51
-            v-model="listQuery.end_time"
53
+            v-model="query.end_time"
52
             prefix-icon="el-icon-date"
54
             prefix-icon="el-icon-date"
53
             @change="changeEndTime"
55
             @change="changeEndTime"
54
             :editable="false"
56
             :editable="false"
55
-            style="width: 196px;"
57
+            :picker-options="pickerOptions"
58
+            style="width: 150px;"
56
             type="date"
59
             type="date"
57
             placeholder="选择日期时间"
60
             placeholder="选择日期时间"
58
             align="right"
61
             align="right"
62
         </div>
65
         </div>
63
         <div class="tableTitle">统计图</div>
66
         <div class="tableTitle">统计图</div>
64
         <div>
67
         <div>
65
-          <line-chart :options="chart"></line-chart>
68
+          <line-chart :options="bar"></line-chart>
66
         </div>
69
         </div>
67
         <div class="tableTitle">统计表</div>
70
         <div class="tableTitle">统计表</div>
68
         <div>
71
         <div>
69
-          <el-table :data="tableData" style="width: 100%" border show-summary :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
70
-            <el-table-column fixed prop="date" label="日期"></el-table-column>
71
-            <el-table-column prop="name" label="姓名"></el-table-column>
72
-            <el-table-column prop="province" label="省份"></el-table-column>
73
-            <el-table-column prop="city" label="市区"></el-table-column>
74
-            <el-table-column prop="address" label="地址"></el-table-column>
75
-            <el-table-column prop="zip" label="邮编"></el-table-column>
72
+          <el-table :data="tableData" style="width: 100%" :height="tableHeight">
73
+            <el-table-column fixed label="姓名" align="center">
74
+              <template slot-scope="scope">
75
+                {{scope.row.user_name}}
76
+
77
+              </template>
78
+            </el-table-column>
79
+
80
+            <el-table-column label="治疗人次" align="center">
81
+              <template slot-scope="scope">
82
+                {{scope.row.p_count?scope.row.p_count:''}}
83
+
84
+              </template>
85
+            </el-table-column>
86
+
87
+            <el-table-column label="病程记录" align="center">
88
+              <template slot-scope="scope">
89
+                {{scope.row.course_count?scope.row.course_count:''}}
90
+
91
+                <!--{{// scope.row.patient.lapseto == 1 ? '留治':'转出'}}-->
92
+              </template>
93
+            </el-table-column>
94
+
95
+            <el-table-column label="抢救记录" align="center">
96
+              <template slot-scope="scope">
97
+                {{scope.row.rescue_count?scope.row.rescue_count:''}}
98
+
99
+                <!--{{scope.row.last_after_weight?scope.row.last_after_weight:''}}-->
100
+
101
+                <!--<div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>-->
102
+              </template>
103
+            </el-table-column>
104
+
105
+            <el-table-column label="合计" align="center">
106
+              <template slot-scope="scope">
107
+                {{scope.row.p_count + scope.row.course_count + scope.row.rescue_count?scope.row.p_count + scope.row.course_count + scope.row.rescue_count:''}}
108
+
109
+                <!--<div v-if="scope.row.min_monitor.systolic_blood_pressure">{{ scope.row.min_monitor.systolic_blood_pressure}} /{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>-->
110
+              </template>
111
+            </el-table-column>
112
+
76
           </el-table>
113
           </el-table>
77
 
114
 
78
-          <el-pagination
79
-            align="right"
80
-            @size-change="handleSizeChange"
81
-            @current-change="handleCurrentChange"
82
-            :current-page="listQuery.page"
83
-            :page-sizes="[10, 20, 50, 100]"
84
-            :page-size="10"
85
-            background
86
-            style="margin-top:20px;"
87
-            layout="total, sizes, prev, pager, next, jumper"
88
-            :total="total"
89
-          ></el-pagination>
90
         </div>
115
         </div>
91
       </div>
116
       </div>
92
     </div>
117
     </div>
97
 import echarts from "echarts";
122
 import echarts from "echarts";
98
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
123
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
99
 import LineChart from "../../qcd/components/LineChart";
124
 import LineChart from "../../qcd/components/LineChart";
125
+
126
+import {GetDoctorWorkloadChartData,GetDoctorWorkloadTableData,GetAllAdminUser} from "@/api/common/statistics";
127
+
100
 export default {
128
 export default {
101
   components: {
129
   components: {
102
     BreadCrumb,
130
     BreadCrumb,
104
   },
132
   },
105
   data() {
133
   data() {
106
     return {
134
     return {
135
+      percent:[],
136
+
137
+      pickerOptions: {
138
+        disabledDate(time) {
139
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
140
+          return time.getTime() > Date.now() || time.getTime() < threeMonths;;
141
+        }
142
+      },
143
+      tableData: [
144
+      ],
145
+      loading: false,
146
+      total: '',
147
+      query: {
148
+        admin_user_id: "",
149
+        statistics_type: 1,
150
+        start_time: "",
151
+        end_time: "",
152
+        limit:20,
153
+        page:1,
154
+      },
155
+
156
+
157
+      doctor_options:[],
158
+      project_options:[
159
+        {value:1, name:"治疗"},
160
+        {value:2, name:"病程记录"},
161
+        {value:3, name:"抢救记录"}
162
+      ],
107
       crumbs: [
163
       crumbs: [
108
-        { path: false, name: "科室质控" },
164
+        { path: false, name: "质控管理" },
109
         { path: false, name: "工作量分析统计" },
165
         { path: false, name: "工作量分析统计" },
110
         { path: false, name: "医生" }
166
         { path: false, name: "医生" }
111
       ],
167
       ],
116
         page: 1,
172
         page: 1,
117
         limit: 10
173
         limit: 10
118
       },
174
       },
119
-      options: [
120
-        {
121
-          value: "选项1",
122
-          label: "黄金糕"
123
-        },
124
-        {
125
-          value: "选项2",
126
-          label: "双皮奶"
127
-        },
128
-        {
129
-          value: "选项3",
130
-          label: "蚵仔煎"
131
-        },
132
-        {
133
-          value: "选项4",
134
-          label: "龙须面"
135
-        },
136
-        {
137
-          value: "选项5",
138
-          label: "北京烤鸭"
139
-        }
140
-      ],
175
+
141
       value: "请选项",
176
       value: "请选项",
142
-      tableData: [
143
-        {
144
-          date: "2016-05-03",
145
-          name: "王小虎",
146
-          province: "上海",
147
-          city: "普陀区",
148
-          address: "上海市普陀区金沙江路 1518 弄",
149
-          zip: 200333
150
-        },
151
-        {
152
-          date: "2016-05-02",
153
-          name: "王小虎",
154
-          province: "上海",
155
-          city: "普陀区",
156
-          address: "上海市普陀区金沙江路 1518 弄",
157
-          zip: 200333
158
-        },
159
-        {
160
-          date: "2016-05-04",
161
-          name: "王小虎",
162
-          province: "上海",
163
-          city: "普陀区",
164
-          address: "上海市普陀区金沙江路 1518 弄",
165
-          zip: 200333
166
-        },
167
-        {
168
-          date: "2016-05-01",
169
-          name: "王小虎",
170
-          province: "上海",
171
-          city: "普陀区",
172
-          address: "上海市普陀区金沙江路 1518 弄",
173
-          zip: 200333
174
-        },
175
-        {
176
-          date: "2016-05-08",
177
-          name: "王小虎",
178
-          province: "上海",
179
-          city: "普陀区",
180
-          address: "上海市普陀区金沙江路 1518 弄",
181
-          zip: 200333
182
-        },
183
-        {
184
-          date: "2016-05-06",
185
-          name: "王小虎",
186
-          province: "上海",
187
-          city: "普陀区",
188
-          address: "上海市普陀区金沙江路 1518 弄",
189
-          zip: 200333
190
-        },
191
-        {
192
-          date: "2016-05-07",
193
-          name: "王小虎",
194
-          province: "上海",
195
-          city: "普陀区",
196
-          address: "上海市普陀区金沙江路 1518 弄",
197
-          zip: 200333
198
-        },
199
-        {
200
-          date: "2016-05-08",
201
-          name: "王小虎",
202
-          province: "上海",
203
-          city: "普陀区",
204
-          address: "上海市普陀区金沙江路 1518 弄",
205
-          zip: 200333
206
-        },
207
-        {
208
-          date: "2016-05-06",
209
-          name: "王小虎",
210
-          province: "上海",
211
-          city: "普陀区",
212
-          address: "上海市普陀区金沙江路 1518 弄",
213
-          zip: 200333
214
-        },
215
-        {
216
-          date: "2016-05-07",
217
-          name: "王小虎",
218
-          province: "上海",
219
-          city: "普陀区",
220
-          address: "上海市普陀区金沙江路 1518 弄",
221
-          zip: 200333
222
-        }
223
-      ],
224
-      chart: {
177
+      bar: {
225
         title: {
178
         title: {
226
           text: "ECharts 入门示例"
179
           text: "ECharts 入门示例"
227
         },
180
         },
228
         tooltip: {},
181
         tooltip: {},
229
         legend: {
182
         legend: {
230
-          data: ["次数"],
183
+          data: [],
231
           left: 0
184
           left: 0
232
         },
185
         },
233
         xAxis: {
186
         xAxis: {
234
-          data: ["达标", "未达标"]
187
+          data: []
235
         },
188
         },
236
         yAxis: {
189
         yAxis: {
237
           axisLabel: {
190
           axisLabel: {
241
         },
194
         },
242
         series: [
195
         series: [
243
           {
196
           {
244
-            name: "次数",
197
+            name: "",
245
             type: "bar",
198
             type: "bar",
246
-            data: ["78.57", "50"],
199
+            data: [],
247
             barWidth: 30,
200
             barWidth: 30,
248
             label: {
201
             label: {
249
               normal: {
202
               normal: {
250
                 show: true,
203
                 show: true,
251
                 position: "top",
204
                 position: "top",
252
-                formatter: "{c}次"
205
+                formatter: (params) => {
206
+                  if(this.percent.length > 0){
207
+                    let str = ''
208
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
209
+                    return str
210
+                  }else{
211
+                    let str = ''
212
+                    str = params.data
213
+                    return str
214
+                  }
215
+                }
253
               }
216
               }
254
             },
217
             },
255
             //配置样式
218
             //配置样式
293
     };
256
     };
294
   },
257
   },
295
   methods: {
258
   methods: {
296
-    changeTime() {},
259
+    changeDoctor(val){
260
+      this.query.admin_user_id = val
261
+      this.query.page = 1
262
+      this.GetDoctorWorkloadTableData(this.query)
263
+
264
+    },
265
+    GetAllDoctor(){
266
+      GetAllAdminUser().then(response => {
267
+        if (response.data.state == 1) {
268
+          var adminUser = response.data.data.admin
269
+          this.admin_user  = adminUser
270
+          for (let i = 0; i < adminUser.length; i++){
271
+            if(adminUser[i].user_type == 2){
272
+              this.doctor_options.push(adminUser[i])
273
+            }
274
+          }
275
+        } else {
276
+          this.$message.error('请求数据失败')
277
+          return false
278
+        }
279
+      })
280
+
281
+    },
282
+    changeProject(val){
283
+      this.query.statistics_type = val
284
+      this.query.page = 1
285
+      this.GetDoctorWorkloadChartData(this.query)
286
+      // this.GetDialysisProcessIndexTableData(this.query)
287
+
288
+    },
289
+    handleSizeChange(limit) {
290
+      this.query.limit = limit;
291
+      this.GetDoctorWorkloadTableData(this.query)
292
+    },
293
+    handleCurrentChange(page) {
294
+      this.query.page = page;
295
+      this.GetDoctorWorkloadTableData(this.query)
296
+    },GetDoctorWorkloadTableData(params) {
297
+      this.loading = true
298
+      this.tableData = []
299
+      GetDoctorWorkloadTableData(params)
300
+        .then(rs => {
301
+          var resp = rs.data
302
+          if (resp.state == 1) {
303
+            this.loading = false
304
+            for (let i = 0; i < resp.data.data.length; i++) {
305
+              this.tableData.push(resp.data.data[i])
306
+            }
307
+          } else {
308
+            this.loading = false
309
+          }
310
+        })
311
+        .catch(error => {
312
+
313
+        })
314
+    },
315
+    getTimestamp(time) {
316
+      // 把时间日期转成时间戳
317
+      return new Date(time).getTime() / 1000;
318
+    },
319
+    changeTime(val) {
320
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
321
+      if (time > 0) {
322
+        this.$message.error("结束时间不能小于开始时间");
323
+        this.query.start_time = "";
324
+      } else {
325
+        // this.getDialysisList()
326
+        this.query.page = 1;
327
+        this.GetDoctorWorkloadChartData(this.query)
328
+        this.GetDoctorWorkloadTableData(this.query)
329
+
330
+      }
331
+
332
+    },  GetDoctorWorkloadChartData(params) {
333
+
334
+      this.bar.xAxis.data = []
335
+      this.bar.series[0].data = []
336
+      GetDoctorWorkloadChartData(params)
337
+        .then(rs => {
338
+          var resp = rs.data
339
+          if (resp.state == 1) {
340
+
341
+            for (let i = 0;  i < resp.data.data.length;i++){
342
+              this.bar.xAxis.data.push(resp.data.data[i].user_name)
343
+              if(this.query.statistics_type == 1){
344
+
345
+                this.bar.series[0].data.push(resp.data.data[i].p_count)
346
+                this.percent.push(resp.data.data[i].p_ratio)
347
+
348
+
349
+              }else if(this.query.statistics_type == 2){
350
+                this.bar.series[0].data.push(resp.data.data[i].course_count)
351
+                this.percent.push(resp.data.data[i].course_ratio)
352
+
353
+
354
+              }else if(this.query.statistics_type == 3){
355
+                this.bar.series[0].data.push(resp.data.data[i].rescue_count)
356
+                this.percent.push(resp.data.data[i].rescue_ratio)
357
+
358
+
359
+              }
360
+            }
361
+          } else {
362
+          }
363
+        })
364
+        .catch(error => {
365
+        })
366
+    },
297
     changeEndTime(val) {
367
     changeEndTime(val) {
298
       var time =
368
       var time =
299
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
369
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
300
       if (time < 0) {
370
       if (time < 0) {
301
         this.$message.error("结束时间不能小于开始时间");
371
         this.$message.error("结束时间不能小于开始时间");
302
-        this.listQuery.end_time = "";
372
+        this.query.end_time = "";
303
       } else {
373
       } else {
374
+        this.query.page = 1;
375
+        this.GetDoctorWorkloadChartData(this.query)
376
+        this.GetDoctorWorkloadTableData(this.query)
377
+
304
       }
378
       }
305
     },
379
     },
306
     handleClick() {
380
     handleClick() {
308
         this.$router.push({ path: "/qcd/workAnalysis/nurse" });
382
         this.$router.push({ path: "/qcd/workAnalysis/nurse" });
309
       }
383
       }
310
     }
384
     }
385
+  },created(){
386
+    var date = new Date()
387
+    var year = date.getFullYear() //获取完整的年份(4位)
388
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
389
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
390
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
391
+    this.query.patient_id = 0
392
+    this.query.end_time = year + '-' + month + '-' + day
393
+    this.query.start_time = year + '-' + last_month + '-' + day
394
+    this.query.statistics_type = 1
395
+    this.GetAllDoctor()
396
+    this.GetDoctorWorkloadChartData(this.query)
397
+    this.GetDoctorWorkloadTableData(this.query)
398
+
399
+
311
   }
400
   }
312
 };
401
 };
313
 </script>
402
 </script>

+ 372 - 236
src/xt_pages/qcd/workAnalysis/nurse.vue View File

10
           <el-tab-pane label="护士" name="second"></el-tab-pane>
10
           <el-tab-pane label="护士" name="second"></el-tab-pane>
11
         </el-tabs>
11
         </el-tabs>
12
         <div class="cell clearfix">
12
         <div class="cell clearfix">
13
-          <el-select v-model="value" placeholder="请选择" style="width:120px;margin-right:20px">
13
+          <el-select v-model="query.admin_user_id" placeholder="请选择" style="width:120px;margin-right:20px"               @change="changeNurse"
14
+          >
14
             <el-option
15
             <el-option
15
-              v-for="item in options"
16
-              :key="item.value"
17
-              :label="item.label"
18
-              :value="item.value"
16
+              v-for="item in nurse_options"
17
+              :key="item.id"
18
+              :label="item.user_name"
19
+              :value="item.admin_user_id"
19
             ></el-option>
20
             ></el-option>
20
           </el-select>
21
           </el-select>
21
           <el-select
22
           <el-select
22
-            v-model="value"
23
+            v-model="query.statistics_type"
23
             placeholder="请选择"
24
             placeholder="请选择"
24
-            @change="chooseType"
25
+            @change="changeProject"
25
             style="width:120px;margin-right:20px"
26
             style="width:120px;margin-right:20px"
26
           >
27
           >
27
             <el-option
28
             <el-option
28
-              v-for="item in options"
29
+              v-for="item in project_options"
29
               :key="item.value"
30
               :key="item.value"
30
-              :label="item.label"
31
+              :label="item.name"
31
               :value="item.value"
32
               :value="item.value"
32
             ></el-option>
33
             ></el-option>
33
           </el-select>
34
           </el-select>
35
             <span class="name">日期查询</span> :
36
             <span class="name">日期查询</span> :
36
           </label>
37
           </label>
37
           <el-date-picker
38
           <el-date-picker
38
-            v-model="listQuery.start_time"
39
+            v-model="query.start_time"
39
             prefix-icon="el-icon-date"
40
             prefix-icon="el-icon-date"
40
             @change="changeTime"
41
             @change="changeTime"
41
             :editable="false"
42
             :editable="false"
42
-            style="width: 196px;"
43
+            style="width: 150px;"
43
             type="date"
44
             type="date"
45
+            :picker-options="pickerOptions"
44
             placeholder="选择日期时间"
46
             placeholder="选择日期时间"
45
             align="right"
47
             align="right"
46
             format="yyyy-MM-dd"
48
             format="yyyy-MM-dd"
48
           ></el-date-picker>
50
           ></el-date-picker>
49
           <span class>-</span>
51
           <span class>-</span>
50
           <el-date-picker
52
           <el-date-picker
51
-            v-model="listQuery.end_time"
53
+            v-model="query.end_time"
52
             prefix-icon="el-icon-date"
54
             prefix-icon="el-icon-date"
53
             @change="changeEndTime"
55
             @change="changeEndTime"
54
             :editable="false"
56
             :editable="false"
55
-            style="width: 196px;"
57
+            :picker-options="pickerOptions"
58
+            style="width: 150px;"
56
             type="date"
59
             type="date"
57
             placeholder="选择日期时间"
60
             placeholder="选择日期时间"
58
             align="right"
61
             align="right"
62
         </div>
65
         </div>
63
         <div class="tableTitle">统计图</div>
66
         <div class="tableTitle">统计图</div>
64
         <div>
67
         <div>
65
-          <line-chart :options="chart"></line-chart>
68
+          <line-chart :options="bar"></line-chart>
66
         </div>
69
         </div>
67
         <div class="tableTitle">统计表</div>
70
         <div class="tableTitle">统计表</div>
68
         <div>
71
         <div>
69
-          <el-table :data="tableData" style="width: 100%" border show-summary :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
70
-            <el-table-column fixed prop="date" label="日期"></el-table-column>
71
-            <el-table-column prop="name" label="姓名"></el-table-column>
72
-            <el-table-column prop="province" label="省份"></el-table-column>
73
-            <el-table-column prop="city" label="市区"></el-table-column>
74
-            <el-table-column prop="address" label="地址"></el-table-column>
75
-            <el-table-column prop="zip" label="邮编"></el-table-column>
72
+          <!--<el-table :data="tableData" style="width: 100%" :height="tableHeight">-->
73
+            <!--<el-table-column fixed label="姓名" align="center">-->
74
+              <!--<template slot-scope="scope">-->
75
+                <!--{{scope.row.user_name}}-->
76
+
77
+              <!--</template>-->
78
+            <!--</el-table-column>-->
79
+
80
+            <!--<el-table-column label="治疗人次" align="center">-->
81
+              <!--<template slot-scope="scope">-->
82
+                <!--{{scope.row.p_count?scope.row.p_count:''}}-->
83
+
84
+              <!--</template>-->
85
+            <!--</el-table-column>-->
86
+
87
+            <!--<el-table-column label="病程记录" align="center">-->
88
+              <!--<template slot-scope="scope">-->
89
+                <!--{{scope.row.course_count?scope.row.course_count:''}}-->
90
+
91
+                <!--&lt;!&ndash;{{// scope.row.patient.lapseto == 1 ? '留治':'转出'}}&ndash;&gt;-->
92
+              <!--</template>-->
93
+            <!--</el-table-column>-->
94
+
95
+            <!--<el-table-column label="抢救记录" align="center">-->
96
+              <!--<template slot-scope="scope">-->
97
+                <!--{{scope.row.rescue_count?scope.row.rescue_count:''}}-->
98
+
99
+                <!--&lt;!&ndash;{{scope.row.last_after_weight?scope.row.last_after_weight:''}}&ndash;&gt;-->
100
+
101
+                <!--&lt;!&ndash;<div v-if="scope.row.before.systolic_blood_pressure">{{scope.row.before.systolic_blood_pressure}} / {{scope.row.before.diastolic_blood_pressure}}</div>&ndash;&gt;-->
102
+              <!--</template>-->
103
+            <!--</el-table-column>-->
104
+
105
+            <!--<el-table-column label="合计" align="center">-->
106
+              <!--<template slot-scope="scope">-->
107
+                <!--{{scope.row.p_count + scope.row.course_count + scope.row.rescue_count?scope.row.p_count + scope.row.course_count + scope.row.rescue_count:''}}-->
108
+
109
+                <!--&lt;!&ndash;<div v-if="scope.row.min_monitor.systolic_blood_pressure">{{ scope.row.min_monitor.systolic_blood_pressure}} /{{ scope.row.min_monitor.diastolic_blood_pressure}}</div>&ndash;&gt;-->
110
+              <!--</template>-->
111
+            <!--</el-table-column>-->
112
+
113
+
114
+          <!--</el-table>-->
115
+          <el-table :data="tableData" style="width: 100%" :height="tableHeight" >
116
+            <el-table-column fixed label="姓名" align="center">
117
+              <template slot-scope="scope">
118
+                {{scope.row.user_name}}
119
+
120
+              </template>
121
+            </el-table-column>
122
+
123
+            <el-table-column label="穿刺" align="center">
124
+              <template slot-scope="scope">
125
+                {{scope.row.puncture_count?scope.row.puncture_count:''}}
126
+
127
+              </template>
128
+            </el-table-column>
129
+
130
+            <el-table-column label="换药" align="center">
131
+              <template slot-scope="scope">
132
+                {{scope.row.change_medicine_count?scope.row.change_medicine_count:''}}
133
+
134
+                <!--{{// scope.row.patient.lapseto == 1 ? '留治':'转出'}}-->
135
+              </template>
136
+            </el-table-column>
137
+
138
+            <el-table-column label="治疗" align="center">
139
+              <template slot-scope="scope">
140
+                {{scope.row.cure_count?scope.row.cure_count:''}}
141
+
142
+              </template>
143
+            </el-table-column>
144
+
145
+
146
+            <el-table-column label="宣教/小结" align="center">
147
+              <template slot-scope="scope">
148
+                {{scope.row.mission_count?scope.row.mission_count:''}}
149
+              </template>
150
+            </el-table-column>
151
+
152
+            <el-table-column label="合计" align="center">
153
+              <template slot-scope="scope">
154
+                {{scope.row.puncture_count + scope.row.change_medicine_count + scope.row.cure_count + scope.row.mission_count ?scope.row.puncture_count + scope.row.change_medicine_count + scope.row.cure_count + scope.row.mission_count:''}}
155
+              </template>
156
+            </el-table-column>
76
           </el-table>
157
           </el-table>
77
 
158
 
78
-          <el-pagination
79
-            align="right"
80
-            @size-change="handleSizeChange"
81
-            @current-change="handleCurrentChange"
82
-            :current-page="listQuery.page"
83
-            :page-sizes="[10, 20, 50, 100]"
84
-            :page-size="10"
85
-            background
86
-            style="margin-top:20px;"
87
-            layout="total, sizes, prev, pager, next, jumper"
88
-            :total="total"
89
-          ></el-pagination>
90
         </div>
159
         </div>
91
       </div>
160
       </div>
92
     </div>
161
     </div>
93
   </div>
162
   </div>
94
 </template>
163
 </template>
95
-
96
 <script>
164
 <script>
97
-import echarts from "echarts";
98
-import BreadCrumb from "@/xt_pages/components/bread-crumb";
99
-import LineChart from "../../qcd/components/LineChart";
100
-export default {
101
-  components: {
102
-    BreadCrumb,
103
-    LineChart
104
-  },
105
-  data() {
106
-    return {
107
-      crumbs: [
108
-        { path: false, name: "科室质控" },
109
-        { path: false, name: "工作量分析统计" },
110
-        { path: false, name: "护士" }
111
-      ],
112
-      activeName: "second",
113
-      listQuery: {
114
-        start_time: "",
115
-        end_time: "",
116
-        page: 1,
117
-        limit: 10
118
-      },
119
-      options: [
120
-        {
121
-          value: "选项1",
122
-          label: "黄金糕"
123
-        },
124
-        {
125
-          value: "选项2",
126
-          label: "双皮奶"
127
-        },
128
-        {
129
-          value: "选项3",
130
-          label: "蚵仔煎"
131
-        },
132
-        {
133
-          value: "选项4",
134
-          label: "龙须面"
135
-        },
136
-        {
137
-          value: "选项5",
138
-          label: "北京烤鸭"
139
-        }
140
-      ],
141
-      value: "请选项",
142
-      tableData: [
143
-        {
144
-          date: "2016-05-03",
145
-          name: "王小虎",
146
-          province: "上海",
147
-          city: "普陀区",
148
-          address: "上海市普陀区金沙江路 1518 弄",
149
-          zip: 200333
150
-        },
151
-        {
152
-          date: "2016-05-02",
153
-          name: "王小虎",
154
-          province: "上海",
155
-          city: "普陀区",
156
-          address: "上海市普陀区金沙江路 1518 弄",
157
-          zip: 200333
158
-        },
159
-        {
160
-          date: "2016-05-04",
161
-          name: "王小虎",
162
-          province: "上海",
163
-          city: "普陀区",
164
-          address: "上海市普陀区金沙江路 1518 弄",
165
-          zip: 200333
166
-        },
167
-        {
168
-          date: "2016-05-01",
169
-          name: "王小虎",
170
-          province: "上海",
171
-          city: "普陀区",
172
-          address: "上海市普陀区金沙江路 1518 弄",
173
-          zip: 200333
174
-        },
175
-        {
176
-          date: "2016-05-08",
177
-          name: "王小虎",
178
-          province: "上海",
179
-          city: "普陀区",
180
-          address: "上海市普陀区金沙江路 1518 弄",
181
-          zip: 200333
182
-        },
183
-        {
184
-          date: "2016-05-06",
185
-          name: "王小虎",
186
-          province: "上海",
187
-          city: "普陀区",
188
-          address: "上海市普陀区金沙江路 1518 弄",
189
-          zip: 200333
190
-        },
191
-        {
192
-          date: "2016-05-07",
193
-          name: "王小虎",
194
-          province: "上海",
195
-          city: "普陀区",
196
-          address: "上海市普陀区金沙江路 1518 弄",
197
-          zip: 200333
198
-        },
199
-        {
200
-          date: "2016-05-08",
201
-          name: "王小虎",
202
-          province: "上海",
203
-          city: "普陀区",
204
-          address: "上海市普陀区金沙江路 1518 弄",
205
-          zip: 200333
206
-        },
207
-        {
208
-          date: "2016-05-06",
209
-          name: "王小虎",
210
-          province: "上海",
211
-          city: "普陀区",
212
-          address: "上海市普陀区金沙江路 1518 弄",
213
-          zip: 200333
214
-        },
215
-        {
216
-          date: "2016-05-07",
217
-          name: "王小虎",
218
-          province: "上海",
219
-          city: "普陀区",
220
-          address: "上海市普陀区金沙江路 1518 弄",
221
-          zip: 200333
222
-        }
223
-      ],
224
-      chart: {
225
-        title: {
226
-          text: "ECharts 入门示例"
165
+  import echarts from "echarts";
166
+  import BreadCrumb from "@/xt_pages/components/bread-crumb";
167
+  import LineChart from "../../qcd/components/LineChart";
168
+
169
+  import {GetNurseWorkloadChartData,GetNurseWorkloadTableData,GetAllAdminUser} from "@/api/common/statistics";
170
+
171
+  export default {
172
+    components: {
173
+      BreadCrumb,
174
+      LineChart
175
+    },
176
+    data() {
177
+      return {
178
+        percent:[],
179
+        pickerOptions: {
180
+          disabledDate(time) {
181
+            let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
182
+            return time.getTime() > Date.now() || time.getTime() < threeMonths;;
183
+          }
227
         },
184
         },
228
-        tooltip: {},
229
-        legend: {
230
-          data: ["次数"],
231
-          left: 0
185
+        tableData: [
186
+        ],
187
+        loading: false,
188
+        total: '',
189
+        query: {
190
+          admin_user_id: "",
191
+          statistics_type: 1,
192
+          start_time: "",
193
+          end_time: "",
194
+          limit:20,
195
+          page:1,
232
         },
196
         },
233
-        xAxis: {
234
-          data: ["达标", "未达标"]
197
+
198
+
199
+        nurse_options:[],
200
+        project_options:[
201
+          {value:1, name:"治疗"},
202
+          {value:2, name:"穿刺"},
203
+          {value:3, name:"换药"},
204
+          {value:4, name:"宣教/小结"},
205
+        ],
206
+        crumbs: [
207
+          { path: false, name: "质控管理" },
208
+          { path: false, name: "工作量分析统计" },
209
+          { path: false, name: "医生" }
210
+        ],
211
+        activeName: "second",
212
+        listQuery: {
213
+          start_time: "",
214
+          end_time: "",
215
+          page: 1,
216
+          limit: 10
235
         },
217
         },
236
-        yAxis: {
237
-          axisLabel: {
238
-            formatter: "{value} %"
218
+
219
+        value: "请选项",
220
+        bar: {
221
+          title: {
222
+            text: "ECharts 入门示例"
239
           },
223
           },
240
-          show: false
241
-        },
242
-        series: [
243
-          {
244
-            name: "次数",
245
-            type: "bar",
246
-            data: ["78.57", "50"],
247
-            barWidth: 30,
248
-            label: {
249
-              normal: {
250
-                show: true,
251
-                position: "top",
252
-                formatter: "{c}次"
253
-              }
224
+          tooltip: {},
225
+          legend: {
226
+            data: [],
227
+            left: 0
228
+          },
229
+          xAxis: {
230
+            data: []
231
+          },
232
+          yAxis: {
233
+            axisLabel: {
234
+              formatter: "{value} %"
254
             },
235
             },
255
-            //配置样式
256
-            itemStyle: {
257
-              //通常情况下:
258
-
259
-              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
260
-              normal: {
261
-                color: function(params) {
262
-                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
263
-                  var colorList = [
264
-                    ["#A9E0F3", "#9FBDFC"],
265
-
266
-                    ["#FFD7C0", "#FF9994"]
267
-                  ];
268
-
269
-                  var index = params.dataIndex;
270
-                  if (params.dataIndex >= colorList.length) {
271
-                    index = params.dataIndex % colorList.length;
236
+            show: false
237
+          },
238
+          series: [
239
+            {
240
+              name: "",
241
+              type: "bar",
242
+              data: [],
243
+              barWidth: 30,
244
+              label: {
245
+                normal: {
246
+                  show: true,
247
+                  position: "top",
248
+                  formatter: (params) => {
249
+                    if(this.percent.length > 0){
250
+                      let str = ''
251
+                      str = params.data + '('+ this.percent[params.dataIndex] +'%)'
252
+                      return str
253
+                    }else{
254
+                      let str = ''
255
+                      str = params.data
256
+                      return str
257
+                    }
272
                   }
258
                   }
259
+                }
260
+              },
261
+              //配置样式
262
+              itemStyle: {
263
+                //通常情况下:
264
+
265
+                //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
266
+                normal: {
267
+                  color: function(params) {
268
+                    //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
269
+                    var colorList = [
270
+                      ["#A9E0F3", "#9FBDFC"],
271
+
272
+                      ["#FFD7C0", "#FF9994"]
273
+                    ];
273
 
274
 
274
-                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
275
-                    { offset: 0, color: colorList[index][0] },
276
-                    // { offset: 0.5, color: colorList[index][1] },
277
-                    { offset: 1, color: colorList[index][1] }
278
-                  ]);
275
+                    var index = params.dataIndex;
276
+                    if (params.dataIndex >= colorList.length) {
277
+                      index = params.dataIndex % colorList.length;
278
+                    }
279
+
280
+                    return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
281
+                      { offset: 0, color: colorList[index][0] },
282
+                      // { offset: 0.5, color: colorList[index][1] },
283
+                      { offset: 1, color: colorList[index][1] }
284
+                    ]);
285
+                  },
286
+                  barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
279
                 },
287
                 },
280
-                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
281
-              },
282
 
288
 
283
-              //鼠标悬停时:
284
-              emphasis: {
285
-                shadowBlur: 10,
286
-                shadowOffsetX: 0,
287
-                shadowColor: "rgba(0, 0, 0, 0.5)"
289
+                //鼠标悬停时:
290
+                emphasis: {
291
+                  shadowBlur: 10,
292
+                  shadowOffsetX: 0,
293
+                  shadowColor: "rgba(0, 0, 0, 0.5)"
294
+                }
288
               }
295
               }
289
             }
296
             }
290
-          }
291
-        ]
292
-      }
293
-    };
294
-  },
295
-  methods: {
296
-    changeTime() {},
297
-    changeEndTime(val) {
298
-      var time =
299
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
300
-      if (time < 0) {
301
-        this.$message.error("结束时间不能小于开始时间");
302
-        this.listQuery.end_time = "";
303
-      } else {
304
-      }
297
+          ]
298
+        }
299
+      };
305
     },
300
     },
306
-    handleClick() {
307
-      if (this.activeName == "first") {
308
-        this.$router.push({ path: "/qcd/workAnalysis/doctor" });
301
+    methods: {
302
+      changeNurse(val){
303
+        this.query.admin_user_id = val
304
+        this.query.page = 1
305
+        this.GetNurseWorkloadTableData(this.query)
306
+
307
+      },
308
+      GetAllNurse(){
309
+        GetAllAdminUser().then(response => {
310
+          if (response.data.state == 1) {
311
+            var adminUser = response.data.data.admin
312
+            this.admin_user  = adminUser
313
+            for (let i = 0; i < adminUser.length; i++){
314
+              if(adminUser[i].user_type == 3){
315
+                this.nurse_options.push(adminUser[i])
316
+              }
317
+            }
318
+          } else {
319
+            this.$message.error('请求数据失败')
320
+            return false
321
+          }
322
+        })
323
+
324
+      },
325
+      changeProject(val){
326
+        this.query.statistics_type = val
327
+        this.query.page = 1
328
+        this.GetNurseWorkloadChartData(this.query)
329
+        // this.GetDialysisProcessIndexTableData(this.query)
330
+
331
+      },
332
+      handleSizeChange(limit) {
333
+        this.query.limit = limit;
334
+        this.GetNurseWorkloadTableData(this.query)
335
+      },
336
+      handleCurrentChange(page) {
337
+        this.query.page = page;
338
+        this.GetNurseWorkloadTableData(this.query)
339
+      },GetNurseWorkloadTableData(params) {
340
+        this.loading = true
341
+        this.tableData = []
342
+        GetNurseWorkloadTableData(params)
343
+          .then(rs => {
344
+            var resp = rs.data
345
+            if (resp.state == 1) {
346
+              this.loading = false
347
+              for (let i = 0; i < resp.data.data.length; i++) {
348
+                this.tableData.push(resp.data.data[i])
349
+              }
350
+            } else {
351
+              this.loading = false
352
+            }
353
+          })
354
+          .catch(error => {
355
+
356
+          })
357
+      },
358
+      getTimestamp(time) {
359
+        // 把时间日期转成时间戳
360
+        return new Date(time).getTime() / 1000;
361
+      },
362
+      changeTime(val) {
363
+        var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time);
364
+        if (time > 0) {
365
+          this.$message.error("结束时间不能小于开始时间");
366
+          this.query.start_time = "";
367
+        } else {
368
+          // this.getDialysisList()
369
+          this.query.page = 1;
370
+          this.GetNurseWorkloadChartData(this.query)
371
+          this.GetNurseWorkloadTableData(this.query)
372
+
373
+        }
374
+
375
+      },  GetNurseWorkloadChartData(params) {
376
+
377
+        this.bar.xAxis.data = []
378
+        this.bar.series[0].data = []
379
+        GetNurseWorkloadChartData(params)
380
+          .then(rs => {
381
+            var resp = rs.data
382
+            if (resp.state == 1) {
383
+
384
+              for (let i = 0;  i < resp.data.data.length;i++){
385
+                this.bar.xAxis.data.push(resp.data.data[i].user_name)
386
+                if(this.query.statistics_type == 1){
387
+
388
+                  this.bar.series[0].data.push(resp.data.data[i].puncture_count)
389
+                  this.percent.push(resp.data.data[i].puncture_ratio)
390
+
391
+                }else if(this.query.statistics_type == 2){
392
+
393
+                  this.bar.series[0].data.push(resp.data.data[i].change_medicine_count)
394
+                  this.percent.push(resp.data.data[i].change_medicine_ratio)
395
+
396
+
397
+                }else if(this.query.statistics_type == 3){
398
+                  this.bar.series[0].data.push(resp.data.data[i].cure_count)
399
+                  this.percent.push(resp.data.data[i].cure_ratio)
400
+
401
+                }else if(this.query.statistics_type == 4){
402
+                  this.bar.series[0].data.push(resp.data.data[i].mission_count)
403
+                  this.percent.push(resp.data.data[i].mission_ratio)
404
+
405
+                }
406
+              }
407
+
408
+            } else {
409
+            }
410
+          })
411
+          .catch(error => {
412
+          })
413
+      },
414
+      changeEndTime(val) {
415
+        var time =
416
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
417
+        if (time < 0) {
418
+          this.$message.error("结束时间不能小于开始时间");
419
+          this.query.end_time = "";
420
+        } else {
421
+          this.query.page = 1;
422
+          this.GetNurseWorkloadChartData(this.query)
423
+          this.GetNurseWorkloadTableData(this.query)
424
+
425
+        }
426
+      },
427
+      handleClick() {
428
+        if (this.activeName == "first") {
429
+          this.$router.push({ path: "/qcd/workAnalysis/doctor" });
430
+        }
309
       }
431
       }
432
+    },created(){
433
+      var date = new Date()
434
+      var year = date.getFullYear() //获取完整的年份(4位)
435
+      var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
436
+      var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
437
+      var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
438
+      this.query.patient_id = 0
439
+      this.query.end_time = year + '-' + month + '-' + day
440
+      this.query.start_time = year + '-' + last_month + '-' + day
441
+      this.query.statistics_type = 1
442
+      this.GetAllNurse()
443
+      this.GetNurseWorkloadChartData(this.query)
444
+      this.GetNurseWorkloadTableData(this.query)
445
+
446
+
310
     }
447
     }
311
-  }
312
-};
448
+  };
313
 </script>
449
 </script>
314
 
450
 
315
 <style lang="scss" scoped>
451
 <style lang="scss" scoped>

+ 4 - 17
src/xt_pages/sign/index.vue View File

209
         this.patients = []
209
         this.patients = []
210
         if (response.data.state === 1) {
210
         if (response.data.state === 1) {
211
           this.patients = response.data.data.patients
211
           this.patients = response.data.data.patients
212
-          // console.log('病人信息', this.patients[0].schedule)
213
-          console.log('病人信息:', this.patients)
214
           // 将没有排班的信息排除
212
           // 将没有排班的信息排除
215
           for (let i = this.patients.length - 1; i >= 0; i--) {
213
           for (let i = this.patients.length - 1; i >= 0; i--) {
216
             if (this.patients[i].schedule.id === 0) {
214
             if (this.patients[i].schedule.id === 0) {
224
             var panel = response.data.data.panel
222
             var panel = response.data.data.panel
225
             for (let index = 0; index < sl; index++) {
223
             for (let index = 0; index < sl; index++) {
226
               if (this.schedules[index].type in response.data.data.panel) {
224
               if (this.schedules[index].type in response.data.data.panel) {
227
-                console.log(this.schedules[index].type)
228
-                console.log(response.data.data.panel[this.schedules[index].type].schedule)
229
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
225
                 this.schedules[index].arrange = response.data.data.panel[this.schedules[index].type].schedule
230
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
226
                 this.schedules[index].sign = response.data.data.panel[this.schedules[index].type].sign
231
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
227
                 this.schedules[index].before = response.data.data.panel[this.schedules[index].type].before
241
         if (response.data.state === 1) {
237
         if (response.data.state === 1) {
242
           if (response.data.data.sign != null) {
238
           if (response.data.data.sign != null) {
243
             var sign = response.data.data.sign
239
             var sign = response.data.data.sign
244
-            console.log('sign是什么', sign)
245
             this.weigh_form.dry_weight = sign.dry_weight
240
             this.weigh_form.dry_weight = sign.dry_weight
246
             this.weigh_form.clothes_weight = sign.clothes_weight
241
             this.weigh_form.clothes_weight = sign.clothes_weight
247
             // 透前
242
             // 透前
281
       this.weigh_form.patient_id = row.id
276
       this.weigh_form.patient_id = row.id
282
       this.querySignParams.patient_id = row.id
277
       this.querySignParams.patient_id = row.id
283
       this.dialysis_stege = row.dialysis_order.stage
278
       this.dialysis_stege = row.dialysis_order.stage
284
-      console.log('呵呵呵', this.dialysis_stege)
285
       this.getDialysisInforInfomation(row.id)
279
       this.getDialysisInforInfomation(row.id)
286
       this.getDialysisAfterInfomation(row.id)
280
       this.getDialysisAfterInfomation(row.id)
287
       this.weigh_list.id = row.signin.id
281
       this.weigh_list.id = row.signin.id
292
       getDialysisInforInfomation(id).then(response => {
286
       getDialysisInforInfomation(id).then(response => {
293
         if (response.data.data.patientlist != null) {
287
         if (response.data.data.patientlist != null) {
294
           var patientlist = response.data.data.patientlist
288
           var patientlist = response.data.data.patientlist
295
-          console.log('patientlist是什么?', patientlist)
296
           this.weigh_list.id = patientlist.id
289
           this.weigh_list.id = patientlist.id
297
-          console.log(this.weigh_list.id)
298
           this.weigh_list.dry_weight = patientlist.dry_weight
290
           this.weigh_list.dry_weight = patientlist.dry_weight
299
-          console.log('干体重:' + this.weigh_list.dry_weight)
300
           if (this.weigh_list.dry_weight === 0) {
291
           if (this.weigh_list.dry_weight === 0) {
301
             this.weigh_list.dry_weight = ''
292
             this.weigh_list.dry_weight = ''
302
           }
293
           }
332
       getDialysisAfterInfomation(id).then(response => {
323
       getDialysisAfterInfomation(id).then(response => {
333
         if (response.data.data.patientinfor != null) {
324
         if (response.data.data.patientinfor != null) {
334
           var patientinfor = response.data.data.patientinfor
325
           var patientinfor = response.data.data.patientinfor
335
-          console.log('patientInfor', patientinfor)
326
+
336
           this.weigh_infor.dry_weight = patientinfor.dry_weight
327
           this.weigh_infor.dry_weight = patientinfor.dry_weight
337
           if (this.weigh_infor.dry_weight === 0) {
328
           if (this.weigh_infor.dry_weight === 0) {
338
             this.weigh_infor.dry_weight = ''
329
             this.weigh_infor.dry_weight = ''
391
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
382
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
392
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
383
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
393
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
384
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
394
-
385
+      console.log("params",params)
395
       updateSignweight(params).then(response => {
386
       updateSignweight(params).then(response => {
396
         if (response.data.state === 1) {
387
         if (response.data.state === 1) {
397
           var signs = response.data.data.signs
388
           var signs = response.data.data.signs
403
           // })
394
           // })
404
         }
395
         }
405
       })
396
       })
406
-      console.log('params数据', params)
407
     },
397
     },
408
     hide() {
398
     hide() {
409
       this.show = false
399
       this.show = false
413
       // 透前数据
403
       // 透前数据
414
       var params = new Object()
404
       var params = new Object()
415
       var data_time = this.querySignParams.date_time
405
       var data_time = this.querySignParams.date_time
416
-      console.log('data_time', data_time)
417
       params.date_time = data_time
406
       params.date_time = data_time
418
       params.patient_id = this.weigh_form.patient_id
407
       params.patient_id = this.weigh_form.patient_id
419
       params.dry_weight = this.weigh_list.dry_weight
408
       params.dry_weight = this.weigh_list.dry_weight
430
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
419
       params.pulse_frequencyafter = this.weigh_infor.pulse_frequency
431
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
420
       params.systolic_blood_pressureafter = this.weigh_infor.systolic_blood_pressure
432
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
421
       params.diastolic_blood_pressureafter = this.weigh_infor.diastolic_blood_pressure
433
-      console.log('params是什么?', params)
434
       sighdata(params).then(response => {
422
       sighdata(params).then(response => {
435
         var signs = response.data.data.signs
423
         var signs = response.data.data.signs
436
-        console.log('signs是什么?', signs)
437
         if (response.data.state === 1) {
424
         if (response.data.state === 1) {
438
           // this.$message({
425
           // this.$message({
439
           //   type: 'success',
426
           //   type: 'success',
444
           for (let index = 0; index < tlen; index++) {
431
           for (let index = 0; index < tlen; index++) {
445
             if (this.patients[index].id === params.patient_id) {
432
             if (this.patients[index].id === params.patient_id) {
446
               var signin = this.patients[index].signin
433
               var signin = this.patients[index].signin
447
-              console.log('signin是什么', signin)
434
+    
448
               var sings = response.data.data.signs
435
               var sings = response.data.data.signs
449
-              console.log('signs', signs)
436
+         
450
 
437
 
451
               this.patients[index].signin = response.data.data.signs
438
               this.patients[index].signin = response.data.data.signs
452
 
439
 

+ 1 - 1
src/xt_pages/statistics/index.vue View File

125
   data() {
125
   data() {
126
     return {
126
     return {
127
       crumbs: [
127
       crumbs: [
128
-        { path: false, name: "科室质控" },
128
+        { path: false, name: "质控管理" },
129
         { path: false, name: "统计分析" }
129
         { path: false, name: "统计分析" }
130
       ],
130
       ],
131
       pageLoad: true,
131
       pageLoad: true,

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

280
                   </el-radio-group>
280
                   </el-radio-group>
281
                 </el-form-item>
281
                 </el-form-item>
282
               </el-col>
282
               </el-col>
283
-              <el-col :span="8" :style="isEdit ? 'width:360px' : ''">
283
+              <el-col :span="8" :style="isEdit ? 'width:360px' : ''" v-show="showLapseto">
284
                 <el-form-item
284
                 <el-form-item
285
                   label="治疗状态(转归) : "
285
                   label="治疗状态(转归) : "
286
                   class="is-required"
286
                   class="is-required"
1225
       ],
1225
       ],
1226
 
1226
 
1227
       subscibe: {},
1227
       subscibe: {},
1228
+      showLapseto:true,
1228
       rules: {
1229
       rules: {
1229
         contagions: [
1230
         contagions: [
1230
           {
1231
           {
1275
     }
1276
     }
1276
   },
1277
   },
1277
   created() {
1278
   created() {
1279
+    if(this.isEdit == true){
1280
+       this.showLapseto = false
1281
+    }
1278
     // this.styleOptions = this.$store.getters.patient_types;
1282
     // this.styleOptions = this.$store.getters.patient_types;
1279
     // this.partitionOptions = this.$store.getters.partitions;
1283
     // this.partitionOptions = this.$store.getters.partitions;
1280
     this.maritalOptions = getDataConfig("patient", "marital_options");
1284
     this.maritalOptions = getDataConfig("patient", "marital_options");

+ 32 - 19
src/xt_pages/user/patients.vue View File

476
           ref="lapsetoForm"
476
           ref="lapsetoForm"
477
           label-width="140px"
477
           label-width="140px"
478
         >
478
         >
479
-          <el-form-item label="治疗状态(转归):" prop="lapseto_type" required>
479
+          <!-- <el-form-item label="治疗状态(转归):" prop="lapseto_type" required>
480
             <el-radio-group v-model="lapsetoForm.lapseto_type">
480
             <el-radio-group v-model="lapsetoForm.lapseto_type">
481
               <el-radio
481
               <el-radio
482
                 v-for="item in lapsetoOptions"
482
                 v-for="item in lapsetoOptions"
487
               </el-radio
487
               </el-radio
488
               >
488
               >
489
             </el-radio-group>
489
             </el-radio-group>
490
+          </el-form-item> -->
491
+          <el-form-item label="治疗状态(转归):" prop="lapseto_type" required>
492
+              <el-radio v-model="lapsetoForm.lapseto_type" :label="lapsetoForm.lapseto_type">{{lapeseto}}</el-radio>
490
           </el-form-item>
493
           </el-form-item>
491
           <el-form-item label="转归时间 :" prop="lapseto_time" required>
494
           <el-form-item label="转归时间 :" prop="lapseto_time" required>
492
             <el-date-picker
495
             <el-date-picker
692
         phone: '',
695
         phone: '',
693
         healthcareno: '',
696
         healthcareno: '',
694
         startTime: '',
697
         startTime: '',
695
-        export_date: []
698
+        export_date: [],
699
+        lapeseto:"",
696
       }
700
       }
697
     },
701
     },
698
     created() {
702
     created() {
760
 
764
 
761
       },
765
       },
762
       handleSuccess({ results, header }) {
766
       handleSuccess({ results, header }) {
763
-        console.log(results)
764
-        console.log(header)
765
-
766
         if (header != undefined && header.length > 0) {
767
         if (header != undefined && header.length > 0) {
767
           var isHasName = header.includes('*姓名')
768
           var isHasName = header.includes('*姓名')
768
           var isHasGender = header.includes('*性别')
769
           var isHasGender = header.includes('*性别')
949
                       obj['diagnose'] = results[i][key]
950
                       obj['diagnose'] = results[i][key]
950
                     }
951
                     }
951
                   }
952
                   }
952
-                  console.log(obj)
953
+                  // console.log(obj)
953
 
954
 
954
                   if (results[i]['透析号'] === undefined) {
955
                   if (results[i]['透析号'] === undefined) {
955
                     obj['dialysis_no'] = ''
956
                     obj['dialysis_no'] = ''
959
                     }
960
                     }
960
                   }
961
                   }
961
 
962
 
962
-                  console.log(obj)
963
+                  // console.log(obj)
963
 
964
 
964
                   if (results[i]['干体重(kg)'] === undefined) {
965
                   if (results[i]['干体重(kg)'] === undefined) {
965
                     obj['dry_weight'] = ''
966
                     obj['dry_weight'] = ''
969
                     }
970
                     }
970
                   }
971
                   }
971
 
972
 
972
-                  console.log(obj)
973
+                  // console.log(obj)
973
 
974
 
974
                   if (results[i]['身高(cm)'] === undefined) {
975
                   if (results[i]['身高(cm)'] === undefined) {
975
                     obj['height'] = ''
976
                     obj['height'] = ''
979
                     }
980
                     }
980
                   }
981
                   }
981
 
982
 
982
-                  console.log(obj)
983
+                  // console.log(obj)
983
 
984
 
984
                   if (results[i]['家庭住址'] === undefined) {
985
                   if (results[i]['家庭住址'] === undefined) {
985
                     obj['home_address'] = ''
986
                     obj['home_address'] = ''
998
               for (let i = 0; i < this.export_date.length; i++) {
999
               for (let i = 0; i < this.export_date.length; i++) {
999
                 if (this.export_date[i].dialysis_no == '') {
1000
                 if (this.export_date[i].dialysis_no == '') {
1000
                   let new_dialysis_no = this.max_dialysis_no + index
1001
                   let new_dialysis_no = this.max_dialysis_no + index
1001
-                  console.log(new_dialysis_no)
1002
+                  // console.log(new_dialysis_no)
1002
                   index++
1003
                   index++
1003
                   let no = new_dialysis_no.toString()
1004
                   let no = new_dialysis_no.toString()
1004
-                  console.log(no)
1005
+                  // console.log(no)
1005
                   let rep = 3 - no.length
1006
                   let rep = 3 - no.length
1006
-                  console.log(rep)
1007
+                  // console.log(rep)
1007
                   let tempNo = ""
1008
                   let tempNo = ""
1008
                   if (rep == 1){
1009
                   if (rep == 1){
1009
                     tempNo = "0"
1010
                     tempNo = "0"
1014
                   }
1015
                   }
1015
 
1016
 
1016
 
1017
 
1017
-                  console.log(tempNo)
1018
+                  // console.log(tempNo)
1018
                   if (rep > 0) {
1019
                   if (rep > 0) {
1019
                     no = tempNo + no
1020
                     no = tempNo + no
1020
                   }
1021
                   }
1023
               }
1024
               }
1024
 
1025
 
1025
 
1026
 
1026
-              console.log(this.export_date)
1027
+              // console.log(this.export_date)
1027
 
1028
 
1028
               var tempExportDate = this.export_date
1029
               var tempExportDate = this.export_date
1029
               var tempExportDateOne = this.export_date
1030
               var tempExportDateOne = this.export_date
1110
           this.$message.error('请选择时间')
1111
           this.$message.error('请选择时间')
1111
           return
1112
           return
1112
         }
1113
         }
1114
+         if(this.lapeseto == "留治"){
1115
+           this.lapsetoForm.lapseto_type = 1
1116
+         }
1117
+         if(this.lapeseto == "转出"){
1118
+           this.lapsetoForm.lapseto_type = 2
1119
+         }
1113
         EditLapseto(this.lapsetoForm.patient_id, this.lapsetoForm).then(
1120
         EditLapseto(this.lapsetoForm.patient_id, this.lapsetoForm).then(
1114
           response => {
1121
           response => {
1115
             if (response.data.state === 1) {
1122
             if (response.data.state === 1) {
1131
         )
1138
         )
1132
       },
1139
       },
1133
       OpenSetLapseto(row, index) {
1140
       OpenSetLapseto(row, index) {
1141
+        if(row.lapseto == 1){
1142
+          this.lapeseto = "转出"
1143
+        }
1144
+        if(row.lapseto == 2){
1145
+          this.lapeseto = "留治"
1146
+        }
1134
         this.patient = row
1147
         this.patient = row
1135
         this.currentIndex = index
1148
         this.currentIndex = index
1136
         this.lapsetoForm.lapseto_time = ''
1149
         this.lapsetoForm.lapseto_time = ''
1154
         this.bindWechatDialog = true
1167
         this.bindWechatDialog = true
1155
       },
1168
       },
1156
       handleCheckAllChange(val) {
1169
       handleCheckAllChange(val) {
1157
-        console.log(val)
1158
-        console.log(this.checkAll)
1159
-        console.log(this.isIndeterminate)
1170
+        // console.log(val)
1171
+        // console.log(this.checkAll)
1172
+        // console.log(this.isIndeterminate)
1160
       },
1173
       },
1161
       handleSelectionChange(val) {
1174
       handleSelectionChange(val) {
1162
         this.multipleSelection = val
1175
         this.multipleSelection = val
1239
             return false
1252
             return false
1240
           } else {
1253
           } else {
1241
             this.tableData = response.data.data.patients
1254
             this.tableData = response.data.data.patients
1242
-             console.log('病人是', this.tableData)
1255
+            //  console.log('病人是', this.tableData)
1243
             this.pageTotal = this.tableData.length
1256
             this.pageTotal = this.tableData.length
1244
             this.total = response.data.data.total
1257
             this.total = response.data.data.total
1245
           }
1258
           }
1256
             return false
1269
             return false
1257
           } else {
1270
           } else {
1258
             var patient = response.data.data.patient
1271
             var patient = response.data.data.patient
1259
-            console.log('二维码病人信息', patient)
1272
+            // console.log('二维码病人信息', patient)
1260
             this.id = patient.id
1273
             this.id = patient.id
1261
             this.name = patient.name
1274
             this.name = patient.name
1262
             this.gender = patient.gender
1275
             this.gender = patient.gender

+ 30 - 30
src/xt_permission.js View File

1
-import router from "./router";
2
-import store from "./store";
3
-import NProgress from "nprogress"; // progress bar
4
-import "nprogress/nprogress.css"; // progress bar style
1
+import router from './router'
2
+import store from './store'
3
+import NProgress from 'nprogress' // progress bar
4
+import 'nprogress/nprogress.css' // progress bar style
5
 
5
 
6
 NProgress.configure({
6
 NProgress.configure({
7
   showSpinner: false
7
   showSpinner: false
8
-}); // NProgress Configuration
8
+}) // NProgress Configuration
9
 
9
 
10
-const loginWhiteList = ["/token/verify", "/401", "/404"]; // 登录验证白名单
11
-const permissionWhiteList = loginWhiteList.concat(["/"]); // 权限验证白名单
10
+const loginWhiteList = ['/token/verify', '/401', '/404'] // 登录验证白名单
11
+const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名单
12
 
12
 
13
 router.beforeEach((to, from, next) => {
13
 router.beforeEach((to, from, next) => {
14
   // 线上注释
14
   // 线上注释
15
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-  //  store.dispatch('VerifyConfigList', []).then(() => {
17
-  //    next()
18
-  // })
19
-  // }
20
-  // if (store.getters.permission_routers === undefined) {
21
-  //  store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-  //    next()
23
-  //  })
24
-  // } else {
25
-  //   next()
26
-  // }
27
-  // return
15
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+    store.dispatch('VerifyConfigList', []).then(() => {
17
+      next()
18
+    })
19
+  }
20
+  if (store.getters.permission_routers === undefined) {
21
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+      next()
23
+    })
24
+  } else {
25
+    next()
26
+  }
27
+  return
28
   // 线上注释
28
   // 线上注释
29
 
29
 
30
-  NProgress.start();
30
+  NProgress.start()
31
   // console.log(store.getters.current_role_urls.indexOf(to.path))
31
   // console.log(store.getters.current_role_urls.indexOf(to.path))
32
   // alert('path:' + to.path)
32
   // alert('path:' + to.path)
33
   // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
33
   // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
34
   if (to.query.lt != null && to.query.lt.length > 0) {
34
   if (to.query.lt != null && to.query.lt.length > 0) {
35
     // alert('will go to verify token: ' + to.query.lt)
35
     // alert('will go to verify token: ' + to.query.lt)
36
     next({
36
     next({
37
-      path: "/token/verify",
37
+      path: '/token/verify',
38
       query: {
38
       query: {
39
         token: to.query.lt
39
         token: to.query.lt
40
       }
40
       }
41
-    });
41
+    })
42
 
42
 
43
     // 否则 如果没有 user 信息,则前往 sso 登录
43
     // 否则 如果没有 user 信息,则前往 sso 登录
44
   } else if (store.getters.xt_user.user.id === 0) {
44
   } else if (store.getters.xt_user.user.id === 0) {
45
     if (loginWhiteList.indexOf(to.path) !== -1) {
45
     if (loginWhiteList.indexOf(to.path) !== -1) {
46
       // alert('登录白名单内,跳过登录')
46
       // alert('登录白名单内,跳过登录')
47
-      next();
47
+      next()
48
     } else {
48
     } else {
49
       // alert('前往登录')
49
       // alert('前往登录')
50
-      window.location.href = process.env.BASE_API + "/login"; // sso 地址
50
+      window.location.href = process.env.BASE_API + '/login' // sso 地址
51
     }
51
     }
52
 
52
 
53
     // 否则 如果当前 url 不需要验证访问权限,则通过
53
     // 否则 如果当前 url 不需要验证访问权限,则通过
54
   } else if (permissionWhiteList.indexOf(to.path) !== -1) {
54
   } else if (permissionWhiteList.indexOf(to.path) !== -1) {
55
     // alert('权限验证白名单内,直接进入')
55
     // alert('权限验证白名单内,直接进入')
56
-    next();
56
+    next()
57
 
57
 
58
     // 否则 如果拥有当前 url 的权限,则通过
58
     // 否则 如果拥有当前 url 的权限,则通过
59
     // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
59
     // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
65
     // console.log(store.getters.current_role_urls)
65
     // console.log(store.getters.current_role_urls)
66
     // console.log(store.getters.current_role_urls.indexOf(to.path))
66
     // console.log(store.getters.current_role_urls.indexOf(to.path))
67
     // alert('401')
67
     // alert('401')
68
-    next();
68
+    next()
69
     // next({ path: '/404' })
69
     // next({ path: '/404' })
70
   }
70
   }
71
-});
71
+})
72
 
72
 
73
 router.afterEach(() => {
73
 router.afterEach(() => {
74
-  NProgress.done();
75
-});
74
+  NProgress.done()
75
+})