See999 hace 4 años
padre
commit
dd8352b85b
Se han modificado 65 ficheros con 15224 adiciones y 5643 borrados
  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 Ver fichero

@@ -149,6 +149,7 @@ export function getTotalLapseCount(startime, endtime) {
149 149
     startime: startime,
150 150
     endtime: endtime
151 151
   }
152
+
152 153
   return request({
153 154
     url: '/com/api/gettotallapsecount',
154 155
     method: 'get',
@@ -257,14 +258,15 @@ export function getDialysisDetailById(id, startime, endtime, limit, page) {
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 262
   const params = {
262
-    keyword: keyword,
263
+    patientid: patientid,
263 264
     startime: startime,
264 265
     endtime: endtime,
265 266
     limit: limit,
266 267
     page: page
267 268
   }
269
+  console.log('params', params)
268 270
   return request({
269 271
     url: '/com/api/getprescriptionbyname',
270 272
     method: 'Get',
@@ -298,7 +300,6 @@ export function getInspectionDetailById(id, startime, endtime) {
298 300
     startime: startime,
299 301
     endtime: endtime
300 302
   }
301
-  console.log('startime', params)
302 303
   return request({
303 304
     url: '/com/api/getinspectionDetailById',
304 305
     method: 'get',
@@ -306,9 +307,9 @@ export function getInspectionDetailById(id, startime, endtime) {
306 307
   })
307 308
 }
308 309
 
309
-export function getSearchPatientInfo(keyword, startime, endtime) {
310
+export function getSearchPatientInfo(patientid, startime, endtime) {
310 311
   const params = {
311
-    keyword: keyword,
312
+    patientid: patientid,
312 313
     startime: startime,
313 314
     endtime: endtime
314 315
   }
@@ -376,12 +377,7 @@ export function getNormData(params) {
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 381
   console.log('params', params)
386 382
   return request({
387 383
     url: '/com/api/getfirstquarter',
@@ -391,7 +387,6 @@ export function getFirstQuarter(lapseto, startime, endtime) {
391 387
 }
392 388
 
393 389
 export function getProjectList(params) {
394
-  console.log('params', params)
395 390
   return request({
396 391
     url: '/com/api/getprojectlist',
397 392
     method: 'get',
@@ -423,3 +418,51 @@ export function getPatientsControl(lapstor, startime, endtime, page, limit) {
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 Ver fichero

@@ -153,5 +153,74 @@ export function GetDefalutPatient() {
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 Ver fichero

@@ -36,7 +36,6 @@ export function createPatient(patient) {
36 36
   })
37 37
 }
38 38
 export function editPatient(id, patient) {
39
-  console.log('patient', patient)
40 39
   return request({
41 40
     url: '/api/patients/edit?id=' + id + '&record_date=' + patient.record_date + '&is_infectious=' + patient.is_infectious + '&remind_cycle=' + patient.remind_cycle,
42 41
     method: 'put',
@@ -238,6 +237,7 @@ export function deleteRescueRecords(patient_id, ids_str) {
238 237
 }
239 238
 
240 239
 export function EditLapseto(patient_id, data) {
240
+  console.log('data', data)
241 241
   return request({
242 242
     url: '/api/patients/lapseto/edit?id=' + patient_id,
243 243
     method: 'post',
@@ -345,28 +345,18 @@ export function getAllData(id, page, limit) {
345 345
   })
346 346
 }
347 347
 
348
-
349 348
 export function postExportPatients(params) {
350 349
   return request({
351 350
     url: '/api/patients/export',
352 351
     method: 'Post',
353
-    data: params,
352
+    data: params
354 353
   })
355 354
 }
356 355
 
357
-
358
-
359 356
 export function getMaxDialysisNo() {
360 357
   return request({
361 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 Ver fichero

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

+ 1 - 1
src/router/index_路由未分离前.js Ver fichero

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

+ 103 - 91
src/router/modules/dialysis.js Ver fichero

@@ -1,62 +1,62 @@
1
-import Layout from "@/views/layout/Layout";
1
+import Layout from '@/views/layout/Layout'
2 2
 
3 3
 export default {
4
-  path: "/dialysis/",
4
+  path: '/dialysis/',
5 5
   component: Layout,
6
-  redirect: "noredirect",
7
-  name: "dialysis",
6
+  redirect: 'noredirect',
7
+  name: 'dialysis',
8 8
   alwaysShow: true,
9 9
   meta: {
10
-    title: "dialysis",
11
-    icon: "touxi"
10
+    title: 'dialysis',
11
+    icon: 'touxi'
12 12
   },
13 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 18
       meta: {
19
-        title: "透析记录",
19
+        title: '透析记录',
20 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 27
       meta: {
28
-        title: "watch",
28
+        title: 'watch',
29 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 36
       meta: {
37
-        title: "数据看板",
37
+        title: '数据看板',
38 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 44
       hidden: true,
45 45
       is_menu: false,
46
-      name: "paper",
46
+      name: 'paper',
47 47
       meta: {
48
-        title: "paper",
48
+        title: 'paper',
49 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 55
       hidden: true,
56 56
       is_menu: false,
57
-      name: "dialysisPrintOrder",
57
+      name: 'dialysisPrintOrder',
58 58
       meta: {
59
-        title: "dialysisPrintOrder",
59
+        title: 'dialysisPrintOrder',
60 60
         noCache: true
61 61
       }
62 62
     },
@@ -65,195 +65,207 @@ export default {
65 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 71
       meta: {
72
-        title: "details"
72
+        title: 'details'
73 73
       },
74 74
       hidden: true,
75 75
       is_menu: false,
76 76
       noCache: true
77 77
     },
78 78
     {
79
-      path: "/dialysis/print/batch",
79
+      path: '/dialysis/print/batch',
80 80
       component: () =>
81
-        import("@/xt_pages/dialysis/batch_print/batch_print_order"),
81
+        import('@/xt_pages/dialysis/batch_print/batch_print_order'),
82 82
       hidden: true,
83 83
       is_menu: false,
84
-      name: "dialysis_batch_print",
84
+      name: 'dialysis_batch_print',
85 85
       meta: {
86
-        title: "批量打印",
86
+        title: '批量打印',
87 87
         noCache: true
88 88
       }
89 89
     },
90 90
     {
91
-      path: "/dialysis/print/batch/other",
91
+      path: '/dialysis/print/batch/other',
92 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 94
       hidden: true,
95 95
       is_menu: false,
96
-      name: "dialysis_batch_print_two",
96
+      name: 'dialysis_batch_print_two',
97 97
       meta: {
98
-        title: "批量打印",
98
+        title: '批量打印',
99 99
         noCache: true
100 100
       }
101 101
     },
102 102
     {
103
-      path: "/dialysis/print/batch/three",
103
+      path: '/dialysis/print/batch/three',
104 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 106
       hidden: true,
107 107
       is_menu: false,
108
-      name: "dialysis_batch_print_two_one",
108
+      name: 'dialysis_batch_print_two_one',
109 109
       meta: {
110
-        title: "批量打印",
110
+        title: '批量打印',
111 111
         noCache: true
112 112
       }
113 113
     },
114 114
     {
115
-      path: "/dialysis/print/batch/four",
115
+      path: '/dialysis/print/batch/four',
116 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 118
       hidden: true,
119 119
       is_menu: false,
120
-      name: "dialysis_batch_print_two_one",
120
+      name: 'dialysis_batch_print_two_one',
121 121
       meta: {
122
-        title: "批量打印",
122
+        title: '批量打印',
123 123
         noCache: true
124 124
       }
125 125
     },
126 126
     {
127
-      path: "/dialysis/print/batch/five",
127
+      path: '/dialysis/print/batch/five',
128 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 130
       hidden: true,
131 131
       is_menu: false,
132
-      name: "dialysis_batch_print_two_one",
132
+      name: 'dialysis_batch_print_two_one',
133 133
       meta: {
134
-        title: "批量打印",
134
+        title: '批量打印',
135 135
         noCache: true
136 136
       }
137 137
     },
138 138
     {
139
-      path: "/dialysis/print/batch/six",
139
+      path: '/dialysis/print/batch/six',
140 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 142
       hidden: true,
143 143
       is_menu: false,
144
-      name: "dialysis_batch_six",
144
+      name: 'dialysis_batch_six',
145 145
       meta: {
146
-        title: "批量打印",
146
+        title: '批量打印',
147 147
         noCache: true
148 148
       }
149 149
     },
150 150
     {
151
-      path: "/dialysis/print/batch/seven",
151
+      path: '/dialysis/print/batch/seven',
152 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 154
       hidden: true,
155 155
       is_menu: false,
156
-      name: "dialysis_batch_seven",
156
+      name: 'dialysis_batch_seven',
157 157
       meta: {
158
-        title: "批量打印",
158
+        title: '批量打印',
159 159
         noCache: true
160 160
       }
161 161
     },
162 162
     {
163
-      path: "/dialysis/print/batch/eight",
163
+      path: '/dialysis/print/batch/eight',
164 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 166
       hidden: true,
167 167
       is_menu: false,
168
-      name: "dialysis_batch_eight",
168
+      name: 'dialysis_batch_eight',
169 169
       meta: {
170
-        title: "批量打印",
170
+        title: '批量打印',
171 171
         noCache: true
172 172
       }
173 173
     },
174 174
     {
175
-      path: "/dialysis/print/batch/nine",
175
+      path: '/dialysis/print/batch/nine',
176 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 178
       hidden: true,
179 179
       is_menu: false,
180
-      name: "dialysis_batch_nine",
180
+      name: 'dialysis_batch_nine',
181 181
       meta: {
182
-        title: "批量打印",
182
+        title: '批量打印',
183 183
         noCache: true
184 184
       }
185 185
     },
186 186
     {
187
-      path: "/dialysis/print/batch/twelve",
187
+      path: '/dialysis/print/batch/twelve',
188 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 190
       hidden: true,
191 191
       is_menu: false,
192
-      name: "dialysis_batch_twelve",
192
+      name: 'dialysis_batch_twelve',
193 193
       meta: {
194
-        title: "批量打印",
194
+        title: '批量打印',
195 195
         noCache: true
196 196
       }
197 197
     },
198 198
     {
199
-      path: "/dialysis/print/batch/thirteen",
199
+      path: '/dialysis/print/batch/thirteen',
200 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 202
       hidden: true,
203 203
       is_menu: false,
204
-      name: "dialysis_batch_thirteen",
204
+      name: 'dialysis_batch_thirteen',
205 205
       meta: {
206
-        title: "批量打印",
206
+        title: '批量打印',
207 207
         noCache: true
208 208
       }
209 209
     },
210 210
     {
211
-      path: "/dialysis/print/batch/otherone",
211
+      path: '/dialysis/print/batch/fifteen',
212 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 214
       hidden: true,
215 215
       is_menu: false,
216
-      name: "dialysis_batch_print_two_one",
216
+      name: 'dialysis_batch_fifteen',
217 217
       meta: {
218
-        title: "批量打印",
218
+        title: '批量打印',
219 219
         noCache: true
220 220
       }
221 221
     },
222 222
     {
223
-      path: "/dialysis/print/batch/othertwo",
223
+      path: '/dialysis/print/batch/otherone',
224 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 226
       hidden: true,
227 227
       is_menu: false,
228
-      name: "dialysis_batch_print_two_two",
228
+      name: 'dialysis_batch_print_two_one',
229 229
       meta: {
230
-        title: "批量打印",
230
+        title: '批量打印',
231 231
         noCache: true
232 232
       }
233 233
     },
234 234
     {
235
-      path: "/dialysis/print/batch/fiveone",
235
+      path: '/dialysis/print/batch/othertwo',
236 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 238
       hidden: true,
239 239
       is_menu: false,
240
-      name: "dialysis_batch_print_two_two",
240
+      name: 'dialysis_batch_print_two_two',
241 241
       meta: {
242
-        title: "批量打印",
242
+        title: '批量打印',
243 243
         noCache: true
244 244
       }
245 245
     },
246 246
     {
247
-      path: "/dialysis/print/batch/fivetwo",
247
+      path: '/dialysis/print/batch/fiveone',
248 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 250
       hidden: true,
251 251
       is_menu: false,
252
-      name: "dialysis_batch_print_two_two",
252
+      name: 'dialysis_batch_print_two_two',
253 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 267
         noCache: true
256 268
       }
257 269
     }
258 270
   ]
259
-};
271
+}

+ 139 - 129
src/router/modules/qcd.js Ver fichero

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

+ 19 - 3
src/store/modules/globalConfig.js Ver fichero

@@ -528,6 +528,21 @@ const global_config = {
528 528
         gaimingcheng_unit: '',
529 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 546
       4: {
532 547
         id: 4,
533 548
         name: '阿加曲班',
@@ -1268,6 +1283,9 @@ const global_config = {
1268 1283
     {
1269 1284
       id: 3,
1270 1285
       name: '住院'
1286
+    }, {
1287
+      id: 4,
1288
+      name: '门诊'
1271 1289
     }
1272 1290
     ],
1273 1291
     observation_content: [{
@@ -2178,9 +2196,7 @@ const global_config = {
2178 2196
       state.patient_types = patientTypes
2179 2197
     }
2180 2198
   },
2181
-  action: {
2182
-
2183
-  }
2199
+  action: {}
2184 2200
 }
2185 2201
 
2186 2202
 export default global_config

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1497 - 0
src/xt_pages/dialysis/batch_print/batch_print_order_fifteen.vue


+ 12 - 0
src/xt_pages/dialysis/bloodPresssWatch.vue Ver fichero

@@ -150,6 +150,16 @@
150 150
           >批量打印</el-button
151 151
         >
152 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 163
     </div>
154 164
     <div class="app-container">
155 165
       <!-- <div class="filter-container">
@@ -655,6 +665,8 @@ export default {
655 665
         this.$router.push({ path: "/dialysis/print/batch/twelve" });
656 666
       } else if (this.template_id == 13) {
657 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 672
     batchPrintActionOne: function() {

+ 1 - 1
src/xt_pages/dialysis/details/acceptsAssessment.vue Ver fichero

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

+ 3 - 0
src/xt_pages/dialysis/details/assessmentAfter.vue Ver fichero

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

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


+ 41 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue Ver fichero

@@ -170,6 +170,8 @@
170 170
           >打印</el-button
171 171
         >
172 172
       </template>
173
+
174
+      
173 175
     </div>
174 176
     <div class="app-container ">
175 177
       <!--<div class="order-print-btn"-->
@@ -259,6 +261,18 @@
259 261
         v-bind:childResponse="childResponse"
260 262
         v-if="org_template_info.template_id == 15"
261 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 276
     </div>
263 277
   </div>
264 278
 </template>
@@ -284,7 +298,9 @@ import DialysisPrintOrderEleven from "./template/DialysisPrintOrderEleven";
284 298
 import DialysisPrintOrderTwelve from "./template/DialysisPrintOrderTwelve";
285 299
 import DialysisPrintOrderThirteen from "./template/DialysisPrintOrderThirteen";
286 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 304
 export default {
289 305
   name: "dialysisPrintOrder",
290 306
   components: {
@@ -302,6 +318,9 @@ export default {
302 318
     DialysisPrintOrderSeven,
303 319
     DialysisPrintOrderEight,
304 320
     DialysisPrintOrderNine,
321
+    DialysisPrintOrderSixteen,
322
+    DialysisPrintOrderSeventeen,
323
+    DialysisPrintOrderEighteen,
305 324
     LabelBox,
306 325
     BreadCrumb
307 326
   },
@@ -531,6 +550,27 @@ export default {
531 550
           style: style,
532 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 576
     printThisOnePage() {

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1579 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderEighteen.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1279 - 1256
src/xt_pages/dialysis/template/DialysisPrintOrderFifteen.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2227 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSeventeen.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1811 - 0
src/xt_pages/dialysis/template/DialysisPrintOrderSixteen.vue


+ 109 - 126
src/xt_pages/qcd/basicInformationAnalysis.vue Ver fichero

@@ -18,9 +18,6 @@
18 18
             >{{ item.label }}</li>
19 19
           </ul>
20 20
         </div>
21
-        <label class="title">
22
-          <span class="name">日期查询</span> :
23
-        </label>
24 21
         <el-date-picker
25 22
           v-model="listQuery.start_time"
26 23
           prefix-icon="el-icon-date"
@@ -32,6 +29,7 @@
32 29
           align="right"
33 30
           format="yyyy-MM-dd"
34 31
           value-format="yyyy-MM-dd"
32
+          :picker-options="pickerOptions"
35 33
         ></el-date-picker>
36 34
         <span class>-</span>
37 35
         <el-date-picker
@@ -45,6 +43,7 @@
45 43
           align="right"
46 44
           format="yyyy-MM-dd"
47 45
           value-format="yyyy-MM-dd"
46
+          :picker-options="pickerOptions"
48 47
         ></el-date-picker>
49 48
       </div>
50 49
       <div class="cell clearfix" style="align-items:normal">
@@ -114,6 +113,22 @@
114 113
                       <p>腹水回输:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
115 114
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
116 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 132
                    <span v-if="item.mode_id == 19">
118 133
                       <p>IUF+HD:{{item.count}}次({{(item.count/total*100).toFixed(1)}}%)</p>
119 134
                       <el-progress :percentage="(item.count/total*100).toFixed(1)"></el-progress>
@@ -149,8 +164,8 @@
149 164
                       <el-progress :percentage="(item.count/InfectiousTotal*100).toFixed(1)"></el-progress>
150 165
                   </span>
151 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 169
                   </span>
155 170
                 </div>
156 171
               </div>
@@ -165,10 +180,10 @@
165 180
                 <p class="infoTitle">转归统计(总人数{{patientCount}}人)</p>
166 181
               </div>
167 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 187
               </div>
173 188
             </div>
174 189
             <div class="infoOne">
@@ -219,14 +234,24 @@
219 234
                 <p class="infoTitle">透龄统计</p>
220 235
               </div>
221 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 255
               </div>
231 256
             </div>
232 257
           </div>
@@ -253,8 +278,14 @@ export default {
253 278
   },
254 279
   data() {
255 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 287
       crumbs: [
257
-        { path: false, name: "科室质控" },
288
+        { path: false, name: "质控管理" },
258 289
         { path: false, name: "基本信息统计" }
259 290
       ],
260 291
       listQuery: {
@@ -268,7 +299,8 @@ export default {
268 299
         { value: 0, label: "本月", state: 0 },
269 300
         { value: 1, label: "近三个月", state: 1 },
270 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 305
       modetype:[],
274 306
       total:0,
@@ -286,6 +318,9 @@ export default {
286 318
       totalone:0,
287 319
       totaltwo:0,
288 320
       totalthree:0,
321
+      rollOutTotal:0,
322
+      outTotal:0,
323
+      dialysisAge:[],
289 324
     };
290 325
   },
291 326
   methods: {
@@ -294,6 +329,7 @@ export default {
294 329
       return new Date(time).getTime() / 1000;
295 330
     },
296 331
     changeTime(val) {
332
+       this.stateType = 4
297 333
        var timeStar=Date.parse(val)/1000
298 334
        var timeEnd =Date.parse(this.listQuery.end_time)/1000
299 335
       var time = this.getTimestamp(val) - this.getTimestamp(this.end_time);
@@ -316,6 +352,7 @@ export default {
316 352
       }
317 353
     },
318 354
     changeEndTime(val) {
355
+       this.stateType = 4
319 356
        var timeEnd=Date.parse(val)/1000
320 357
        var timeStar =Date.parse(this.listQuery.start_time)/1000
321 358
       var time =
@@ -343,7 +380,7 @@ export default {
343 380
       this.listQuery.state = state;
344 381
       //获取本月当前机构的透析模式
345 382
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
346
-      console.log("开始时间",startDate)
383
+    //  console.log("开始时间",startDate)
347 384
       const endDate = moment(new Date()).format('YYYY-MM-DD')
348 385
      // console.log("结束时间",endDate)
349 386
       var now = new Date()
@@ -443,63 +480,17 @@ export default {
443 480
         //统计透析年龄
444 481
         this.getTotalDialysisCount(startunitx,endunitx)
445 482
      }
483
+   
484
+ 
446 485
 
447 486
     },
448 487
     getDialysisModeType(startDate,endDate){
449 488
       getDialysisModeType(startDate,endDate).then(response=>{
450 489
          if(response.data.state == 1){
451 490
           var modetype =  response.data.data.modetype
452
-          console.log("mode---",modetype)
453 491
             var total =  response.data.data.total
454 492
             console.log("total",total)
455 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 494
            this.modetype = modetype
504 495
            console.log("modetype",modetype)
505 496
 
@@ -511,11 +502,13 @@ export default {
511 502
       getTotalLapseCount(startDate,endDate).then(response=>{
512 503
          if(response.data.state == 1){
513 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 510
           var count = response.data.data.count
517 511
           this.patientCount = count
518
-          this.RetentionCount = count-total
519 512
          }
520 513
       })
521 514
     },
@@ -539,32 +532,26 @@ export default {
539 532
        getTotalInfectiousCount(timeStar,timeEnd).then(response=>{
540 533
            if(response.data.state === 1){
541 534
              this.InfectiousTotal = response.data.data.total
535
+             console.log("===",this.InfectiousTotal)
542 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 538
              var otherTotal = response.data.data.otherTotal
539
+             console.log("otherTotal",otherTotal)
566 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,55 +559,51 @@ export default {
572 559
       getTotalAgeCount(timeStar,timeEnd).then(response=>{
573 560
          if(response.data.state == 1){
574 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 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 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 595
       getTotalDialysisCount(timeStar,timeEnd).then(response=>{
587 596
          if(response.data.state == 1){
588 597
            var dataage =  response.data.data.dataage
589 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 605
   created() {
623
-     //获取本月当前机构的透析模式
606
+        //获取本月当前机构的透析模式
624 607
       const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
625 608
       console.log("开始时间",startDate)
626 609
       const endDate = moment(new Date()).format('YYYY-MM-DD')

+ 1 - 1
src/xt_pages/qcd/checkStatistical.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/components/LineChart.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/dialysisTotal.vue Ver fichero

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

+ 3 - 4
src/xt_pages/qcd/indicatorControlAnalysis/analysis.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/analysisDetails.vue Ver fichero

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

+ 60 - 15
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressure.vue Ver fichero

@@ -69,7 +69,7 @@
69 69
         <el-container>
70 70
           <div style="width:150px">
71 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 73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 74
                       highlight-current-row
75 75
                       @current-change="handleChange">
@@ -175,7 +175,7 @@
175 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 180
   import {
181 181
     PostSearch
@@ -192,6 +192,8 @@
192 192
     },
193 193
     data() {
194 194
       return {
195
+        percent:[],
196
+
195 197
         pickerOptions: {
196 198
           disabledDate(time) {
197 199
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
@@ -203,7 +205,7 @@
203 205
         ],
204 206
         loading: false,
205 207
         search_value: '',
206
-        total: '',
208
+        total: 0,
207 209
         query: {
208 210
           patient_id: '',
209 211
           statistics_type: 1,
@@ -251,7 +253,17 @@
251 253
                 normal: {
252 254
                   show: true,
253 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,7 +332,17 @@
320 332
                 normal: {
321 333
                   show: true,
322 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,6 +386,10 @@
364 386
       }
365 387
     },
366 388
     methods: {
389
+      jumpDetail(patient_id){
390
+        this.$router.push("/qcd/indicatorControlAnalysis/bloodPressureDetails?id="+patient_id)
391
+
392
+      },
367 393
       changeProject(val){
368 394
         this.query.statistics_type = val
369 395
         this.query.page = 1
@@ -374,14 +400,17 @@
374 400
         this.query.patient_id = val.id
375 401
         this.query.page = 1
376 402
         this.GetDialysisBloodPressureTableData(this.query)
377
-        this.GetDialysisBloodPressureChartData(this.query)
403
+        // this.GetDialysisBloodPressureChartData(this.query)
378 404
       },
379 405
       handleSizeChange(limit) {
380 406
         this.query.limit = limit;
407
+        this.GetDialysisBloodPressureTableData(this.query)
408
+
381 409
 
382 410
       },
383 411
       handleCurrentChange(page) {
384 412
         this.query.page = page;
413
+        this.GetDialysisBloodPressureTableData(this.query)
385 414
 
386 415
       },
387 416
       changeTime(val) {
@@ -442,12 +471,6 @@
442 471
       },
443 472
       getModeName(mode_id){
444 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 474
       }, GetDialysisBloodPressureTableData(params) {
452 475
         this.loading = true
453 476
         this.tableData = []
@@ -460,6 +483,7 @@
460 483
               for (let i = 0; i < resp.data.data.length; i++) {
461 484
                 this.tableData.push(resp.data.data[i])
462 485
               }
486
+              this.total = resp.data.total
463 487
             } else {
464 488
               this.loading = false
465 489
             }
@@ -471,6 +495,8 @@
471 495
       GetDialysisBloodPressureChartData(params) {
472 496
         this.bar.xAxis.data = []
473 497
         this.bar.series[0].data = []
498
+        this.percent = []
499
+
474 500
         GetDialysisBloodPressureChartData(params)
475 501
           .then(rs => {
476 502
             var resp = rs.data
@@ -478,7 +504,9 @@
478 504
                 for (let i = 0; i < resp.data.data.length; i++) {
479 505
                   this.bar.xAxis.data.push(resp.data.data[i].name)
480 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 510
             } else {
483 511
             }
484 512
           })
@@ -490,6 +518,11 @@
490 518
         this.query.page = 1
491 519
         this.GetDialysisBloodPressureChartData(this.query)
492 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 528
       querySearchAsync(keyword, cb) {
@@ -514,14 +547,26 @@
514 547
           if(response.data.state == 1){
515 548
             var patients = response.data.data.patients
516 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 565
     }, created() {
521 566
       var date = new Date()
522 567
       var year = date.getFullYear() //获取完整的年份(4位)
523 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 570
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
526 571
       this.query.patient_id = 0
527 572
       this.query.end_time = year + '-' + month + '-' + day

+ 255 - 175
src/xt_pages/qcd/indicatorControlAnalysis/bloodPressureDetails.vue Ver fichero

@@ -8,47 +8,64 @@
8 8
         <div class="cell clearfix" style="margin:0">
9 9
           <el-form :inline="true" :model="listQuery">
10 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 25
             </el-form-item>
14 26
           </el-form>
15 27
         </div>
16 28
         <el-container>
17 29
           <div style="width:150px">
18 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 41
             </el-table>
42
+
23 43
           </div>
24 44
           <div class="containerRight" style="flex:1;overflow: hidden">
25 45
             <div class="cell clearfix">
26 46
               <label class="title" style="text-align:left">
27 47
                 <span class="name">血压阶段</span> :
28 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 50
                 <el-option
36 51
                   v-for="item in options"
37 52
                   :key="item.value"
38
-                  :label="item.label"
53
+                  :label="item.name"
39 54
                   :value="item.value"
55
+
40 56
                 ></el-option>
41 57
               </el-select>
42 58
               <label class="title">
43 59
                 <span class="name">日期查询</span> :
44 60
               </label>
45 61
               <el-date-picker
46
-                v-model="listQuery.start_time"
62
+                v-model="query.start_time"
47 63
                 prefix-icon="el-icon-date"
48 64
                 @change="changeTime"
49 65
                 :editable="false"
66
+                style="width: 150px;"
50 67
                 type="date"
51
-                style="max-width:160px"
68
+                :picker-options="pickerOptions"
52 69
                 placeholder="选择日期时间"
53 70
                 align="right"
54 71
                 format="yyyy-MM-dd"
@@ -56,12 +73,13 @@
56 73
               ></el-date-picker>
57 74
               <span class>-</span>
58 75
               <el-date-picker
59
-                v-model="listQuery.end_time"
76
+                v-model="query.end_time"
60 77
                 prefix-icon="el-icon-date"
61 78
                 @change="changeEndTime"
62 79
                 :editable="false"
80
+                :picker-options="pickerOptions"
81
+                style="width: 150px;"
63 82
                 type="date"
64
-                style="max-width:160px"
65 83
                 placeholder="选择日期时间"
66 84
                 align="right"
67 85
                 format="yyyy-MM-dd"
@@ -74,18 +92,48 @@
74 92
             </div>
75 93
             <div class="tableTitle">统计表</div>
76 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 129
               </el-table>
83 130
 
131
+
84 132
               <el-pagination
85 133
                 align="right"
86 134
                 @size-change="handleSizeChange"
87 135
                 @current-change="handleCurrentChange"
88
-                :current-page="listQuery.page"
136
+                :current-page="query.page"
89 137
                 :page-sizes="[10, 20, 50, 100]"
90 138
                 :page-size="10"
91 139
                 background
@@ -105,6 +153,11 @@
105 153
 import echarts from "echarts";
106 154
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
107 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 161
 export default {
109 162
   components: {
110 163
     LineChart,
@@ -112,77 +165,47 @@ export default {
112 165
   },
113 166
   data() {
114 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 198
       chart: {
176 199
         title: {
177 200
           text: "ECharts 入门示例"
178 201
         },
179 202
         tooltip: {},
180 203
         legend: {
181
-          data: ["收缩压", "舒张压"],
204
+          data: [],
182 205
           left: 0
183 206
         },
184 207
         xAxis: {
185
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
208
+          data: []
186 209
         },
187 210
         yAxis: {
188 211
           axisLabel: {
@@ -195,22 +218,14 @@ export default {
195 218
             name: "收缩压",
196 219
             type: "line",
197 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 223
             barWidth: 30,
209 224
             label: {
210 225
               normal: {
211 226
                 show: true,
212 227
                 position: "top",
213
-                formatter: "{c}"
228
+                formatter: "{c}"
214 229
               }
215 230
             },
216 231
             //配置样式
@@ -226,13 +241,13 @@ export default {
226 241
           {
227 242
             name: "舒张压",
228 243
             type: "line",
229
-            data: ["10", "20", "30", "53.33", "42.86", "100", "60", "27", "97"],
244
+            data: [],
230 245
             barWidth: 30,
231 246
             label: {
232 247
               normal: {
233 248
                 show: true,
234 249
                 position: "top",
235
-                formatter: "{c}"
250
+                formatter: "{c}"
236 251
               }
237 252
             },
238 253
             //配置样式
@@ -247,97 +262,162 @@ export default {
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 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 401
     chooseMonth(month) {
336 402
       this.monthType = month;
337 403
     },
338 404
     clickQuality(index) {
339 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 423
 </script>

+ 1 - 1
src/xt_pages/qcd/indicatorControlAnalysis/components/NewNav.vue Ver fichero

@@ -2,7 +2,7 @@
2 2
   <el-tabs v-model="tabActiveName" @tab-click="handleTabClick" style="margin-bottom:10px">
3 3
     <el-tab-pane label="化验指标统计" name="analysis"></el-tab-pane>
4 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 6
     <el-tab-pane label="患者血压统计" name="bloodPressure"></el-tab-pane>
7 7
     <el-tab-pane label="患者体重统计" name="weight"></el-tab-pane>
8 8
   </el-tabs>

+ 446 - 255
src/xt_pages/qcd/indicatorControlAnalysis/components/office.vue Ver fichero

@@ -1,58 +1,51 @@
1 1
 <template>
2 2
   <div class="page_office">
3 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 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 11
         ></el-option>
11 12
       </el-select>
13
+
12 14
       <el-select
13
-        v-model="value"
15
+        v-model="query.item_id"
14 16
         placeholder="请选择"
15
-        @change="chooseType"
16 17
         style="width:120px;margin-right:20px"
18
+        @change="changeItem"
17 19
       >
18 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 25
         ></el-option>
24 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 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 35
         ></el-option>
45 36
       </el-select>
37
+
46 38
       <label class="title">
47 39
         <span class="name">日期查询</span> :
48 40
       </label>
49 41
       <el-date-picker
50
-        v-model="listQuery.start_time"
42
+        v-model="query.start_time"
51 43
         prefix-icon="el-icon-date"
52 44
         @change="changeTime"
53 45
         :editable="false"
54
-        style="width: 196px;"
46
+        style="width: 150px;"
55 47
         type="date"
48
+        :picker-options="pickerOptions"
56 49
         placeholder="选择日期时间"
57 50
         align="right"
58 51
         format="yyyy-MM-dd"
@@ -60,11 +53,12 @@
60 53
       ></el-date-picker>
61 54
       <span class>-</span>
62 55
       <el-date-picker
63
-        v-model="listQuery.end_time"
56
+        v-model="query.end_time"
64 57
         prefix-icon="el-icon-date"
65 58
         @change="changeEndTime"
66 59
         :editable="false"
67
-        style="width: 196px;"
60
+        :picker-options="pickerOptions"
61
+        style="width: 150px;"
68 62
         type="date"
69 63
         placeholder="选择日期时间"
70 64
         align="right"
@@ -74,264 +68,461 @@
74 68
     </div>
75 69
     <div class="tableTitle">统计图</div>
76 70
     <div>
77
-      <line-chart :options="chart"></line-chart>
71
+      <line-chart :options="options"></line-chart>
78 72
     </div>
79 73
     <div class="tableTitle">统计表</div>
80 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 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 89
           </template>
92 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 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 125
     </div>
108 126
   </div>
109 127
 </template>
110 128
 
111 129
 
112 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 509
 </script>
321 510
 
322 511
 
323 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 519
 </style>
331 520
 <style lang="scss">
332
-.page_office {
521
+  .page_office {
522
+
333 523
   .cell {
334 524
     text-align: center;
335 525
   }
336
-}
526
+
527
+  }
337 528
 </style>

+ 561 - 268
src/xt_pages/qcd/indicatorControlAnalysis/components/personal.vue Ver fichero

@@ -1,64 +1,70 @@
1 1
 <template>
2 2
   <div class="page_personal">
3 3
     <div class="cell clearfix">
4
-      <el-form :inline="true" :model="listQuery">
4
+      <el-form :inline="true">
5 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 21
         </el-form-item>
9 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 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 30
         ></el-option>
38 31
       </el-select>
32
+
39 33
       <el-select
40
-        v-model="value"
34
+        v-model="query.item_id"
41 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 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 44
         ></el-option>
51 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 57
       <label class="title">
53 58
         <span class="name">日期查询</span> :
54 59
       </label>
55 60
       <el-date-picker
56
-        v-model="listQuery.start_time"
61
+        v-model="query.start_time"
57 62
         prefix-icon="el-icon-date"
58 63
         @change="changeTime"
59 64
         :editable="false"
60 65
         style="width: 150px;"
61 66
         type="date"
67
+        :picker-options="pickerOptions"
62 68
         placeholder="选择日期时间"
63 69
         align="right"
64 70
         format="yyyy-MM-dd"
@@ -66,10 +72,11 @@
66 72
       ></el-date-picker>
67 73
       <span class>-</span>
68 74
       <el-date-picker
69
-        v-model="listQuery.end_time"
75
+        v-model="query.end_time"
70 76
         prefix-icon="el-icon-date"
71 77
         @change="changeEndTime"
72 78
         :editable="false"
79
+        :picker-options="pickerOptions"
73 80
         style="width: 150px;"
74 81
         type="date"
75 82
         placeholder="选择日期时间"
@@ -81,20 +88,27 @@
81 88
     <el-container>
82 89
       <div style="width:150px">
83 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 101
         </el-table>
88 102
       </div>
89 103
       <div style="padding-left:10px;flex:1">
90 104
         <div class="tableTitle">统计图</div>
91 105
         <div>
92
-          <line-chart :options="chart"></line-chart>
106
+          <line-chart :options="options"></line-chart>
93 107
         </div>
94 108
         <div class="tableTitle">指标趋势</div>
95 109
         <div>
96 110
           <div>
97
-            <line-chart :options="chart1"></line-chart>
111
+            <line-chart :options="options2"></line-chart>
98 112
           </div>
99 113
         </div>
100 114
         <div></div>
@@ -105,267 +119,546 @@
105 119
 
106 120
 
107 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 637
 </script>
349 638
 
350 639
 
351 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 647
 </style>
359 648
 <style lang="scss">
360
-.page_personal {
649
+  .page_personal {
650
+
361 651
   .cell {
362 652
     text-align: center;
363 653
   }
654
+
364 655
   .el-button--medium {
365 656
     padding: 10px 8px;
366 657
   }
658
+
367 659
   .el-form-item {
368 660
     margin-bottom: 0;
369 661
   }
370
-}
662
+
663
+  }
371 664
 </style>

+ 29 - 21
src/xt_pages/qcd/indicatorControlAnalysis/monitor.vue Ver fichero

@@ -69,7 +69,7 @@
69 69
         <el-container>
70 70
           <div style="width:150px">
71 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 73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 74
                       highlight-current-row
75 75
                       @current-change="handleChange">
@@ -88,7 +88,7 @@
88 88
             </div>
89 89
             <div class="tableTitle">统计表</div>
90 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 92
                 <el-table-column fixed label="监测时间" align="center">
93 93
                   <template slot-scope="scope">
94 94
                     <!--{{getTime(scope.row.operate_time)}}-->
@@ -229,11 +229,9 @@
229 229
           }
230 230
         },
231 231
         patientsData:[],
232
-        tableData: [
233
-        ],
234 232
         loading: false,
235 233
         search_value: '',
236
-        total: '',
234
+        total: 0,
237 235
         query: {
238 236
           patient_id: '',
239 237
           statistics_type: 1,
@@ -257,7 +255,7 @@
257 255
           { value: 12, name: '超滤量' },
258 256
         ],
259 257
         crumbs: [
260
-          { path: false, name: '科室质控' },
258
+          { path: false, name: '质控管理' },
261 259
           { path: false, name: '指标评估统计' },
262 260
           { path: false, name: '透析过程指标统计' }
263 261
         ],
@@ -418,10 +416,14 @@
418 416
       },
419 417
       handleSizeChange(limit) {
420 418
         this.query.limit = limit;
419
+        this.GetDialysisWatchTableData(this.query)
420
+
421 421
 
422 422
       },
423 423
       handleCurrentChange(page) {
424 424
         this.query.page = page;
425
+        this.GetDialysisWatchTableData(this.query)
426
+
425 427
 
426 428
       },
427 429
       changeTime(val) {
@@ -482,12 +484,6 @@
482 484
       },
483 485
       getModeName(mode_id){
484 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 487
       }, GetDialysisWatchTableData(params) {
492 488
         this.loading = true
493 489
         this.tableData = []
@@ -499,6 +495,8 @@
499 495
               for (let i = 0; i < resp.data.data.length; i++) {
500 496
                 this.tableData.push(resp.data.data[i])
501 497
               }
498
+              this.total = resp.data.total
499
+
502 500
             } else {
503 501
               this.loading = false
504 502
             }
@@ -515,17 +513,10 @@
515 513
           .then(rs => {
516 514
             var resp = rs.data
517 515
             if (resp.state == 1) {
518
-              if (this.query.statistics_type != 9 && this.query.statistics_type != 10) {
519 516
                 for (let i = 0; i < resp.data.data.length; i++) {
520 517
                   this.chart.xAxis.data.push(resp.data.data[i].date)
521 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 520
             } else {
530 521
             }
531 522
           })
@@ -537,6 +528,11 @@
537 528
         this.query.page = 1
538 529
         this.GetDialysisWatchTableData(this.query)
539 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 538
       querySearchAsync(keyword, cb) {
@@ -561,14 +557,26 @@
561 557
           if(response.data.state == 1){
562 558
             var patients = response.data.data.patients
563 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 575
     }, created() {
568 576
       var date = new Date()
569 577
       var year = date.getFullYear() //获取完整的年份(4位)
570 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 580
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
573 581
       this.query.patient_id = 0
574 582
       this.query.end_time = year + '-' + month + '-' + day

+ 599 - 0
src/xt_pages/qcd/indicatorControlAnalysis/patientInspectionDetail.vue Ver fichero

@@ -0,0 +1,599 @@
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 Ver fichero

@@ -26,7 +26,8 @@
26 26
 
27 27
             </el-form-item>
28 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 31
             <el-option
31 32
               v-for="item in options"
32 33
               :key="item.value"
@@ -69,7 +70,8 @@
69 70
         <el-container>
70 71
           <div style="width:150px">
71 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 75
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 76
                       highlight-current-row
75 77
                       @current-change="handleChange">
@@ -84,16 +86,17 @@
84 86
           <div style="padding-left:10px;flex:1">
85 87
             <div class="tableTitle">指标趋势</div>
86 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 91
               <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
89 92
 
90 93
             </div>
91 94
             <div class="tableTitle">统计表</div>
92 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 98
                   <template slot-scope="scope">
96
-                    {{scope.row.schedule_date | parseTime("{y}-{m}-{d}") }}
99
+                    {{scope.row.schedule_date | parseTime('{y}-{m}-{d}') }}
97 100
                     <!--{{getTime(scope.row.schedule_date)}}-->
98 101
                   </template>
99 102
                 </el-table-column>
@@ -118,28 +121,32 @@
118 121
 
119 122
                 <el-table-column label="透前体重" align="center">
120 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 127
                   </template>
124 128
                 </el-table-column>
125 129
 
126 130
                 <el-table-column label="透后体重" align="center">
127 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 135
                   </template>
131 136
                 </el-table-column>
132 137
 
133 138
                 <el-table-column label="目标超滤量" align="center">
134 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 143
                   </template>
138 144
                 </el-table-column>
139 145
 
140 146
                 <el-table-column label="实际超滤量" align="center">
141 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 151
                   </template>
145 152
                 </el-table-column>
@@ -147,7 +154,11 @@
147 154
 
148 155
                 <el-table-column label="透前血压" align="center">
149 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 164
                   </template>
@@ -155,7 +166,11 @@
155 166
 
156 167
                 <el-table-column label="透后血压" align="center">
157 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 176
                   </template>
@@ -164,14 +179,16 @@
164 179
 
165 180
                 <el-table-column label="透前脉率" align="center">
166 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 185
                   </template>
170 186
                 </el-table-column>
171 187
 
172 188
                 <el-table-column label="透后脉率" align="center">
173 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 193
                   </template>
177 194
                 </el-table-column>
@@ -193,16 +210,15 @@
193 210
 
194 211
                 <el-table-column label="钾" align="center">
195 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 215
                   </template>
199 216
                 </el-table-column>
200 217
 
201 218
 
202
-
203 219
                 <el-table-column label="钠" align="center">
204 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 223
                   </template>
208 224
                 </el-table-column>
@@ -210,7 +226,7 @@
210 226
 
211 227
                 <el-table-column label="钙" align="center">
212 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 231
                   </template>
216 232
                 </el-table-column>
@@ -218,8 +234,10 @@
218 234
 
219 235
                 <el-table-column label="透析时长" align="center">
220 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 241
                   </template>
224 242
 
225 243
                 </el-table-column>
@@ -265,21 +283,17 @@
265 283
   import NewNav from '../indicatorControlAnalysis/components/NewNav'
266 284
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
267 285
   import LineChart from '../../qcd/components/LineChart'
268
-  import { getCurrentOrgPatients } from "@/api/common/common";
286
+  import { getCurrentOrgPatients } from '@/api/common/common'
269 287
   import {
270
-    GetDefalutPatient,
288
+    GetDefaultPatient,
271 289
     GetDialysisProcessIndexChartData,
272 290
     GetDialysisProcessIndexTableData
273 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 298
   export default {
285 299
     components: {
@@ -291,16 +305,17 @@
291 305
       return {
292 306
         pickerOptions: {
293 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 316
         loading: false,
302 317
         search_value: '',
303
-        total: '',
318
+        total: 0,
304 319
         query: {
305 320
           patient_id: '',
306 321
           statistics_type: 1,
@@ -326,7 +341,6 @@
326 341
           { path: false, name: '指标评估统计' },
327 342
           { path: false, name: '透析过程指标统计' }
328 343
         ],
329
-        tableData: [],
330 344
         tableData1: [],
331 345
         chart: {
332 346
           title: {
@@ -356,7 +370,17 @@
356 370
                 normal: {
357 371
                   show: true,
358 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,7 +449,17 @@
425 449
                 normal: {
426 450
                   show: true,
427 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,39 +503,39 @@
469 503
       }
470 504
     },
471 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 508
         this.query.statistics_type = val
478 509
         this.query.page = 1
479 510
         this.GetDialysisProcessIndexChartData(this.query)
480 511
         // this.GetDialysisProcessIndexTableData(this.query)
481 512
 
482 513
       },
483
-      handleChange(val){
514
+      handleChange(val) {
484 515
         this.query.patient_id = val.id
485 516
         this.query.page = 1
486 517
         this.GetDialysisProcessIndexTableData(this.query)
487 518
         this.GetDialysisProcessIndexChartData(this.query)
488 519
       },
489 520
       handleSizeChange(limit) {
490
-        this.query.limit = limit;
521
+        this.query.limit = limit
522
+        this.GetDialysisProcessIndexTableData(this.query)
491 523
 
492 524
       },
493 525
       handleCurrentChange(page) {
494
-        this.query.page = page;
526
+        this.query.page = page
527
+        this.GetDialysisProcessIndexTableData(this.query)
528
+
495 529
 
496 530
       },
497 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 533
         if (time > 0) {
500
-          this.$message.error("结束时间不能小于开始时间");
501
-          this.query.start_time = "";
534
+          this.$message.error('结束时间不能小于开始时间')
535
+          this.query.start_time = ''
502 536
         } else {
503 537
           // this.getDialysisList()
504
-          this.query.page = 1;
538
+          this.query.page = 1
505 539
           this.GetDialysisProcessIndexChartData(this.query)
506 540
           this.GetDialysisProcessIndexTableData(this.query)
507 541
 
@@ -510,12 +544,12 @@
510 544
       },
511 545
       changeEndTime(val) {
512 546
         var time =
513
-          this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
547
+          this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
514 548
         if (time < 0) {
515
-          this.$message.error("结束时间不能小于开始时间");
516
-          this.query.end_time = "";
549
+          this.$message.error('结束时间不能小于开始时间')
550
+          this.query.end_time = ''
517 551
         } else {
518
-          this.query.page = 1;
552
+          this.query.page = 1
519 553
           this.GetDialysisProcessIndexChartData(this.query)
520 554
           this.GetDialysisProcessIndexTableData(this.query)
521 555
 
@@ -523,23 +557,23 @@
523 557
       },
524 558
       getTimestamp(time) {
525 559
         // 把时间日期转成时间戳
526
-        return new Date(time).getTime() / 1000;
560
+        return new Date(time).getTime() / 1000
527 561
       },
528 562
       QueryOperaById: function(val) {
529
-        let vascular_access_desc_name = "";
563
+        let vascular_access_desc_name = ''
530 564
         let vascular_access_desc = getDataConfig(
531
-          "hemodialysis",
532
-          "vascular_access_desc"
533
-        );
565
+          'hemodialysis',
566
+          'vascular_access_desc'
567
+        )
534 568
         for (let i = 0; i < vascular_access_desc.length; i++) {
535 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 577
         let anticoagulan_name = ''
544 578
         var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
545 579
         let anticoagulant = anticoagulantsConfitTwo
@@ -550,26 +584,21 @@
550 584
         }
551 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 589
       }, GetDialysisProcessIndexTableData(params) {
562 590
         this.loading = true
563
-        this.tableData = []
564 591
         GetDialysisProcessIndexTableData(params)
565 592
           .then(rs => {
566 593
             var resp = rs.data
567 594
             if (resp.state == 1) {
568 595
               this.loading = false
569
-
596
+              this.tableData = []
570 597
               for (let i = 0; i < resp.data.data.length; i++) {
571 598
                 this.tableData.push(resp.data.data[i])
572 599
               }
600
+              this.total = resp.data.total
601
+
573 602
             } else {
574 603
               this.loading = false
575 604
             }
@@ -583,7 +612,9 @@
583 612
         this.chart.series[0].data = []
584 613
         this.bar.xAxis.data = []
585 614
         this.bar.series[0].data = []
586
-        GetDialysisProcessIndexChartData(params)
615
+        this.percent = []
616
+
617
+          GetDialysisProcessIndexChartData(params)
587 618
           .then(rs => {
588 619
             var resp = rs.data
589 620
             if (resp.state == 1) {
@@ -593,12 +624,12 @@
593 624
                   this.chart.series[0].data.push(resp.data.data[i].value)
594 625
                 }
595 626
               } else {
596
-                console.log("1111111")
597
-                console.log(this.query.statistics_type)
598 627
 
599 628
                 for (let i = 0; i < resp.data.data.length; i++) {
600 629
                   this.bar.xAxis.data.push(resp.data.data[i].name)
601 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 635
             } else {
@@ -613,6 +644,13 @@
613 644
         this.GetDialysisProcessIndexChartData(this.query)
614 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 655
       querySearchAsync(keyword, cb) {
618 656
         let key = ''
@@ -631,19 +669,32 @@
631 669
       },
632 670
       chooseWay(way) {
633 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 675
             var patients = response.data.data.patients
638 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 693
     }, created() {
643 694
       var date = new Date()
644 695
       var year = date.getFullYear() //获取完整的年份(4位)
645 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 698
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
648 699
       this.query.patient_id = 0
649 700
       this.query.end_time = year + '-' + month + '-' + day

+ 55 - 15
src/xt_pages/qcd/indicatorControlAnalysis/weight.vue Ver fichero

@@ -69,7 +69,7 @@
69 69
         <el-container>
70 70
           <div style="width:150px">
71 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 73
                       :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
74 74
                       highlight-current-row
75 75
                       @current-change="handleChange">
@@ -138,7 +138,7 @@
138 138
 
139 139
                 <el-table-column label="体重增加" align="center">
140 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 143
                     <!--{{scope.row.weight_before - scope.row.last_after_weight}}-->
144 144
                     <!--<div v-if="scope.row.after.systolic_blood_pressure"> {{ scope.row.after.systolic_blood_pressure}} /{{scope.row.after.diastolic_blood_pressure}}</div>-->
@@ -184,7 +184,7 @@
184 184
   import BreadCrumb from '@/xt_pages/components/bread-crumb'
185 185
   import LineChart from '../../qcd/components/LineChart'
186 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 189
   import {
190 190
     PostSearch
@@ -201,6 +201,7 @@
201 201
     },
202 202
     data() {
203 203
       return {
204
+        percent:[],
204 205
         pickerOptions: {
205 206
           disabledDate(time) {
206 207
             let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear()-1)).getTime() - 24 * 3600 * 1000;
@@ -212,7 +213,7 @@
212 213
         ],
213 214
         loading: false,
214 215
         search_value: '',
215
-        total: '',
216
+        total: 0,
216 217
         query: {
217 218
           patient_id: '',
218 219
           statistics_type: 1,
@@ -228,7 +229,7 @@
228 229
           { value: 4, name: '透后体重' },
229 230
         ],
230 231
         crumbs: [
231
-          { path: false, name: '科室质控' },
232
+          { path: false, name: '质控管理' },
232 233
           { path: false, name: '指标评估统计' },
233 234
           { path: false, name: '透析过程指标统计' }
234 235
         ],
@@ -261,7 +262,17 @@
261 262
                 normal: {
262 263
                   show: true,
263 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,7 +341,17 @@
330 341
                 normal: {
331 342
                   show: true,
332 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,6 +396,10 @@
375 396
       }
376 397
     },
377 398
     methods: {
399
+      jumpDetail(patient_id){
400
+        this.$router.push("/qcd/indicatorControlAnalysis/weightDetails?id="+patient_id)
401
+
402
+      },
378 403
       changeProject(val){
379 404
         this.query.statistics_type = val
380 405
         this.query.page = 1
@@ -389,10 +414,12 @@
389 414
       },
390 415
       handleSizeChange(limit) {
391 416
         this.query.limit = limit;
417
+        this.GetDialysisWeightTableData(this.query)
392 418
 
393 419
       },
394 420
       handleCurrentChange(page) {
395 421
         this.query.page = page;
422
+        this.GetDialysisWeightTableData(this.query)
396 423
 
397 424
       },
398 425
       changeTime(val) {
@@ -453,12 +480,6 @@
453 480
       },
454 481
       getModeName(mode_id){
455 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 483
       }, GetDialysisWeightTableData(params) {
463 484
         this.loading = true
464 485
         this.tableData = []
@@ -471,6 +492,8 @@
471 492
               for (let i = 0; i < resp.data.data.length; i++) {
472 493
                 this.tableData.push(resp.data.data[i])
473 494
               }
495
+              this.total = resp.data.total
496
+
474 497
             } else {
475 498
               this.loading = false
476 499
             }
@@ -482,6 +505,8 @@
482 505
       GetDialysisWeightChartData(params) {
483 506
         this.bar.xAxis.data = []
484 507
         this.bar.series[0].data = []
508
+        this.percent = []
509
+
485 510
         GetDialysisWeightChartData(params)
486 511
           .then(rs => {
487 512
             var resp = rs.data
@@ -489,6 +514,9 @@
489 514
               for (let i = 0; i < resp.data.data.length; i++) {
490 515
                 this.bar.xAxis.data.push(resp.data.data[i].name)
491 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 521
             } else {
494 522
             }
@@ -501,6 +529,11 @@
501 529
         this.query.page = 1
502 530
         this.GetDialysisWeightChartData(this.query)
503 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 539
       querySearchAsync(keyword, cb) {
@@ -525,14 +558,21 @@
525 558
           if(response.data.state == 1){
526 559
             var patients = response.data.data.patients
527 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 571
     }, created() {
532 572
       var date = new Date()
533 573
       var year = date.getFullYear() //获取完整的年份(4位)
534 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 576
       var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
537 577
       this.query.patient_id = 0
538 578
       this.query.end_time = year + '-' + month + '-' + day

+ 278 - 198
src/xt_pages/qcd/indicatorControlAnalysis/weightDetails.vue Ver fichero

@@ -8,47 +8,66 @@
8 8
         <div class="cell clearfix" style="margin:0">
9 9
           <el-form :inline="true" :model="listQuery">
10 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 26
             </el-form-item>
14 27
           </el-form>
15 28
         </div>
16 29
         <el-container>
17 30
           <div style="width:150px">
18 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 42
             </el-table>
43
+
44
+
23 45
           </div>
24 46
           <div class="containerRight" style="flex:1;overflow: hidden">
25 47
             <div class="cell clearfix">
26 48
               <label class="title" style="text-align:left">
27
-                <span class="name">血压阶段</span> :
49
+                <span class="name">体重类型</span> :
28 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 52
                 <el-option
36 53
                   v-for="item in options"
37 54
                   :key="item.value"
38
-                  :label="item.label"
55
+                  :label="item.name"
39 56
                   :value="item.value"
57
+
40 58
                 ></el-option>
41 59
               </el-select>
42 60
               <label class="title">
43 61
                 <span class="name">日期查询</span> :
44 62
               </label>
45 63
               <el-date-picker
46
-                v-model="listQuery.start_time"
64
+                v-model="query.start_time"
47 65
                 prefix-icon="el-icon-date"
48 66
                 @change="changeTime"
49 67
                 :editable="false"
68
+                style="width: 150px;"
50 69
                 type="date"
51
-                style="max-width:160px"
70
+                :picker-options="pickerOptions"
52 71
                 placeholder="选择日期时间"
53 72
                 align="right"
54 73
                 format="yyyy-MM-dd"
@@ -56,12 +75,13 @@
56 75
               ></el-date-picker>
57 76
               <span class>-</span>
58 77
               <el-date-picker
59
-                v-model="listQuery.end_time"
78
+                v-model="query.end_time"
60 79
                 prefix-icon="el-icon-date"
61 80
                 @change="changeEndTime"
62 81
                 :editable="false"
82
+                :picker-options="pickerOptions"
83
+                style="width: 150px;"
63 84
                 type="date"
64
-                style="max-width:160px"
65 85
                 placeholder="选择日期时间"
66 86
                 align="right"
67 87
                 format="yyyy-MM-dd"
@@ -74,18 +94,68 @@
74 94
             </div>
75 95
             <div class="tableTitle">统计表</div>
76 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 152
               </el-table>
83 153
 
84 154
               <el-pagination
85 155
                 align="right"
86 156
                 @size-change="handleSizeChange"
87 157
                 @current-change="handleCurrentChange"
88
-                :current-page="listQuery.page"
158
+                :current-page="query.page"
89 159
                 :page-sizes="[10, 20, 50, 100]"
90 160
                 :page-size="10"
91 161
                 background
@@ -105,6 +175,13 @@
105 175
 import echarts from "echarts";
106 176
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
107 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 185
 export default {
109 186
   components: {
110 187
     LineChart,
@@ -112,77 +189,48 @@ export default {
112 189
   },
113 190
   data() {
114 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 218
       crumbs: [
116
-        { path: false, name: "科室质控" },
219
+        { path: false, name: "质控管理" },
117 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 223
       chart: {
176 224
         title: {
177 225
           text: "ECharts 入门示例"
178 226
         },
179 227
         tooltip: {},
180 228
         legend: {
181
-          data: ["透前体重", "透后体重"],
229
+          data: [],
182 230
           left: 0
183 231
         },
184 232
         xAxis: {
185
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
233
+          data: []
186 234
         },
187 235
         yAxis: {
188 236
           axisLabel: {
@@ -192,25 +240,17 @@ export default {
192 240
         },
193 241
         series: [
194 242
           {
195
-            name: "透前体重",
243
+            name: "",
196 244
             type: "line",
197 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 248
             barWidth: 30,
209 249
             label: {
210 250
               normal: {
211 251
                 show: true,
212 252
                 position: "top",
213
-                formatter: "{c}"
253
+                formatter: "{c}"
214 254
               }
215 255
             },
216 256
             //配置样式
@@ -223,112 +263,8 @@ export default {
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 270
   methods: {
@@ -337,7 +273,151 @@ export default {
337 273
     },
338 274
     clickQuality(index) {
339 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 423
 </script>

+ 47 - 77
src/xt_pages/qcd/officesControlAnalysis/project.vue Ver fichero

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

+ 231 - 106
src/xt_pages/qcd/officesControlAnalysis/time.vue Ver fichero

@@ -40,6 +40,7 @@
40 40
             align="right"
41 41
             format="yyyy-MM-dd"
42 42
             value-format="yyyy-MM-dd"
43
+            :picker-options="pickerOptions"
43 44
           ></el-date-picker>
44 45
           <span class>-</span>
45 46
           <el-date-picker
@@ -53,11 +54,12 @@
53 54
             align="right"
54 55
             format="yyyy-MM-dd"
55 56
             value-format="yyyy-MM-dd"
57
+            :picker-options="pickerOptions"
56 58
           ></el-date-picker>
57 59
         </div>
58 60
       </div>
59 61
       <div class="cell clearfix">
60
-        <div class="time newLi" v-if="type == '按季度对比统计'">
62
+        <div class="time newLi" v-if="type == '按季度统计对比'">
61 63
           <ul class>
62 64
             <li
63 65
               :class="item.state == quarterType ? 'active' : ''"
@@ -67,7 +69,7 @@
67 69
             >{{ item.label }}</li>
68 70
           </ul>
69 71
         </div>
70
-        <div class="time newLi" v-if="type == '按月份对比统计'">
72
+        <div class="time newLi" v-if="type == '按月份统计对比'">
71 73
           <ul class>
72 74
             <li
73 75
               :class="item.state == monthType ? 'active' : ''"
@@ -110,13 +112,22 @@ export default {
110 112
   },
111 113
   data() {
112 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 124
       activeName: "first",
114 125
       modesData: {
115 126
         xAxis: [],
116 127
         series: []
117 128
        },
118 129
       crumbs: [
119
-        { path: false, name: "科室质控" },
130
+        { path: false, name: "质控管理" },
120 131
         { path: false, name: "科室质控达标统计" },
121 132
         { path: false, name: "按时间分组" }
122 133
       ],
@@ -145,19 +156,19 @@ export default {
145 156
       value: "请选项",
146 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 167
           value: "自定义",
157 168
           label: "自定义"
158 169
         }
159 170
       ],
160
-      type: "按季度对比统计",
171
+      type: "按季度统计对比",
161 172
       quarter: [
162 173
         { value: 0, label: "第一季度", state: 0 },
163 174
         { value: 1, label: "第二季度", state: 1 },
@@ -190,7 +201,7 @@ export default {
190 201
           left: 0
191 202
         },
192 203
         xAxis: {
193
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
204
+          data: []
194 205
         },
195 206
         yAxis: {
196 207
           axisLabel: {
@@ -202,17 +213,7 @@ export default {
202 213
           {
203 214
             name: "次数",
204 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 217
             barWidth: 30,
217 218
             label: {
218 219
               normal: {
@@ -274,13 +275,29 @@ export default {
274 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 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 303
     changeEndTime(val) {
@@ -290,156 +307,269 @@ export default {
290 307
         this.$message.error("结束时间不能小于开始时间");
291 308
         this.listQuery.end_time = "";
292 309
       } else {
310
+        this.getlist()
293 311
       }
312
+    },
313
+     getTimestamp(time) {
314
+      // 把时间日期转成时间戳
315
+      return new Date(time).getTime() / 1000;
294 316
     },
295 317
     selectLapseTo(state) {
296 318
       this.stateType = state;
297 319
       this.listQuery.state = state;
298 320
     },
299 321
     chooseType(val) {
300
-      console.log(val);
301 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 336
     chooseQuarter(quarter) {
304 337
       this.quarterType = quarter;
305 338
       //第一季度
306 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 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 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 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 369
       //1月
340 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 376
       //2月
348 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 384
      //3月
356 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 391
       //4月
363 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 398
       //5月
370 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 405
       //6月
377 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 412
       //7月
384 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 419
       //8月
391 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 426
       //9月
398 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 433
       //10月
405 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 440
       //11月
412 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 447
        //12月
419 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 455
     getNormData(){
427 456
       getNormData().then(response=>{
428 457
          if(response.data.state === 1){
429 458
            var normdata = response.data.data.normdata
430
-           console.log("normdata",normdata)
431 459
            this.normData = normdata
460
+           this.getlist()
432 461
          }
433 462
       })
434 463
     },
435 464
     //第一季度
436
-    getFirstQuarter(val,startime,endtime){
465
+    getlist(){
437 466
        this.modesData.series = []
438 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 569
          if(response.data.state === 1){
441 570
             var count =  response.data.data.count
442
-            console.log("count",count)
571
+            console.log("count",count)  
572
+            //获取已经配置的数据 
443 573
             var arr=[]
444 574
             for(let i=0;i<count.length;i++){  
445 575
                for(let j=0;j<this.normData.length;j++){
@@ -448,7 +578,8 @@ export default {
448 578
                 }
449 579
               }
450 580
             }
451
-            console.log("arr",arr)
581
+           console.log("arr",arr )
582
+           
452 583
             var arrtwo =  this.arrayDate(count,this.normData)
453 584
             for(let i=0;i<arrtwo.length;i++){
454 585
                 this.$set(arrtwo[i], 'Count', 0)
@@ -459,7 +590,7 @@ export default {
459 590
             arrtwo.map(item => {
460 591
               arr.push(item)
461 592
             })
462
-            arr.sort(this.compare('sort'))    
593
+            // arr.sort(this.compare('sort'))    
463 594
             for(const key in this.normData ){
464 595
                this.modesData.xAxis.push(this.normData[key].item_name);
465 596
                 if(key in arr){
@@ -470,7 +601,7 @@ export default {
470 601
             }
471 602
             this.chart.series[0].data = this.modesData.series
472 603
             this.chart.xAxis.data = this.modesData.xAxis
473
-            console.log(2222,this.modesData)
604
+    
474 605
 
475 606
           
476 607
          }
@@ -503,19 +634,13 @@ export default {
503 634
                 result.push(obj);
504 635
             }
505 636
         }
506
-        console.log("result",result)
507 637
         return result;
508 638
     },
509 639
   },
510 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 642
      this.getNormData()
518
-     this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
643
+    // this.getFirstQuarter(this.lapseto,firstQuarterStart,firstQuarterEnd)
519 644
   }
520 645
 };
521 646
 </script>

+ 1 - 1
src/xt_pages/qcd/outcomeIndicators/control.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/bloodPressure.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/complication.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/dialysisAge.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/infectiousDiseases.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/lapseto.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/bloodPressure.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/lapseto.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/oralMedicine.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/person/weight.vue Ver fichero

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

+ 1 - 1
src/xt_pages/qcd/patientAnalysis/weight.vue Ver fichero

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

+ 252 - 78
src/xt_pages/qcd/patientComplianceDetails.vue Ver fichero

@@ -7,18 +7,22 @@
7 7
       <div class="page_patientComplianceDetails">
8 8
         <div class="cell clearfix" style="margin:0">
9 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 10
           </el-form>
15 11
         </div>
16 12
         <el-container>
17 13
           <div style="width:150px">
18 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 26
             </el-table>
23 27
           </div>
24 28
           <div class="containerRight" style="flex:1;overflow: hidden">
@@ -50,6 +54,7 @@
50 54
                 align="right"
51 55
                 format="yyyy-MM-dd"
52 56
                 value-format="yyyy-MM-dd"
57
+                :picker-options="pickerOptions"
53 58
               ></el-date-picker>
54 59
               <span class>-</span>
55 60
               <el-date-picker
@@ -63,6 +68,7 @@
63 68
                 align="right"
64 69
                 format="yyyy-MM-dd"
65 70
                 value-format="yyyy-MM-dd"
71
+                :picker-options="pickerOptions"
66 72
               ></el-date-picker>
67 73
             </div>
68 74
             <div class="tableTitle">指标监控</div>
@@ -70,14 +76,14 @@
70 76
               <div class="qualityBox">
71 77
                 <div
72 78
                   class="qualityOne"
73
-                  v-for="(item,index) in arr"
79
+                  v-for="(item,index) in normData"
74 80
                   :key="index"
75 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 87
                 </div>
82 88
               </div>
83 89
             </div>
@@ -93,10 +99,12 @@
93 99
 </template>
94 100
 
95 101
 <script>
102
+const moment = require('moment')
96 103
 import echarts from "echarts";
97 104
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
98 105
 import LineChart from "../qcd/components/LineChart";
99 106
 import { uParseTime } from "@/utils/tools";
107
+import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail } from "@/api/common/common"
100 108
 export default {
101 109
   components: {
102 110
     LineChart,
@@ -104,72 +112,39 @@ export default {
104 112
   },
105 113
   data() {
106 114
     return {
115
+     isTrue:0,
107 116
       crumbs: [
108
-        { path: false, name: "科室质控" },
117
+        { path: false, name: "质控管理" },
109 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 124
       listQuery: {
162 125
         start_time: "",
163 126
         end_time: "",
164 127
         page: 1,
165 128
         limit: 10
166 129
       },
130
+      item_id:0,
167 131
       month: [
168 132
         { value: 0, label: "本月", state: 0 },
169 133
         { value: 1, label: "近三个月", state: 1 },
170 134
         { value: 2, label: "近半年", state: 2 },
171 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 148
       monthType: 0,
174 149
       arr: ["钙", "磷", "钙萨达撒所多", "磷", "钙", "磷", "钙", "磷"],
175 150
       quality: 0,
@@ -183,7 +158,7 @@ export default {
183 158
           left: 0
184 159
         },
185 160
         xAxis: {
186
-          data: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]
161
+          data: []
187 162
         },
188 163
         yAxis: {
189 164
           axisLabel: {
@@ -195,23 +170,13 @@ export default {
195 170
           {
196 171
             name: "次数",
197 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 174
             barWidth: 30,
210 175
             label: {
211 176
               normal: {
212 177
                 show: true,
213 178
                 position: "top",
214
-                formatter: "{c}"
179
+                formatter: "{c}g/L"
215 180
               }
216 181
             },
217 182
             //配置样式
@@ -258,15 +223,74 @@ export default {
258 223
             }
259 224
           }
260 225
         ]
261
-      }
226
+      },
227
+      inspect_date:0,
228
+      monthActive:0,
262 229
     };
263 230
   },
264 231
   methods: {
265 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 288
       this.monthType = month;
267 289
     },
268
-    clickQuality(index) {
290
+    clickQuality(index,itemid) {
269 291
       this.quality = index;
292
+      this.item_id = itemid
293
+      this.getlistDetail()
270 294
     },
271 295
     handleSizeChange(limit) {
272 296
       //this.limit = limit;
@@ -279,6 +303,156 @@ export default {
279 303
     getTime(time) {
280 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 458
 </script>

+ 405 - 111
src/xt_pages/qcd/patientControlAnalysis.vue Ver fichero

@@ -8,8 +8,21 @@
8 8
         <div class="cell clearfix">
9 9
           <el-form :inline="true" :model="listQuery">
10 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 26
             </el-form-item>
14 27
           </el-form>
15 28
           <el-select v-model="lapstor" placeholder="请选择" style="margin-right:20px;width:100px">
@@ -77,12 +90,15 @@
77 90
               :key="index"
78 91
             >
79 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 97
             </template>
82 98
         </el-table-column>
83 99
             <el-table-column fixed="right" label="操作" width="100">
84 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 102
               </template>
87 103
             </el-table-column>
88 104
           </el-table>
@@ -106,10 +122,11 @@
106 122
 </template>
107 123
 
108 124
 <script>
125
+import { PostSearch} from '@/api/patient'
109 126
 import echarts from "echarts";
110 127
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
111 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 130
 export default {
114 131
   components: {
115 132
     LineChart,
@@ -124,14 +141,14 @@ export default {
124 141
         }
125 142
       },
126 143
       crumbs: [
127
-        { path: false, name: "科室质控" },
144
+        { path: false, name: "质控管理" },
128 145
         { path: false, name: "患者质控达标统计" }
129 146
       ],
130 147
       listQuery: {
131 148
         start_time: "",
132 149
         end_time: "",
133 150
         page: 1,
134
-        limit: 10
151
+        limit: 20
135 152
       },
136 153
       total:0,
137 154
       lapstor:0,
@@ -150,6 +167,10 @@ export default {
150 167
         },
151 168
       ],
152 169
       value: "",
170
+      modesData: {
171
+        xAxis: [],
172
+        series: []
173
+      },
153 174
       chart: {
154 175
         title: {
155 176
           text: "ECharts 入门示例"
@@ -178,7 +199,17 @@ export default {
178 199
               normal: {
179 200
                 show: true,
180 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,14 +250,25 @@ export default {
219 250
           }
220 251
         ]
221 252
       },
253
+      patientsArr:[],
222 254
       tableData: [],
223 255
       normData:[],
224 256
       paitents:[],
225 257
       tableName:[],
226 258
       total:0,
259
+       obj:[],
227 260
       ObjectData:{},
228 261
       tablePatients:[],
229 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 274
   methods: {
@@ -256,14 +298,23 @@ export default {
256 298
         this.$message.error("结束时间不能小于开始时间");
257 299
         this.listQuery.end_time = "";
258 300
       } else {
301
+
259 302
       }
260 303
     },
261
-  getTimestamp(time) {
304
+    getTimestamp(time) {
262 305
       // 把时间日期转成时间戳
263 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 319
     getDialysisNo(name){
269 320
         for(let i=0;i<this.tablePatients.length;i++){
@@ -276,7 +327,7 @@ export default {
276 327
       getNormData().then(response=>{
277 328
          if(response.data.state == 1){
278 329
            var normdata = response.data.data.normdata
279
-          // console.log("normdata",normdata)
330
+        //  console.log("normdata",normdata)
280 331
           this.normData = normdata
281 332
            var a=[];
282 333
            for(let i=0;i<normdata.length;i++){
@@ -285,8 +336,6 @@ export default {
285 336
           // console.log("a",a)
286 337
            this.newArr = a
287 338
            var arr = this.arrayToObj(a)
288
-
289
-         // console.log("娃哈哈",arr)
290 339
            this.ObjectData = arr
291 340
 
292 341
 
@@ -294,124 +343,252 @@ export default {
294 343
       })
295 344
     },
296 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 469
     getlist(){
299 470
       getPatientsControl(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
300 471
          if(response.data.state == 1){
301 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 489
           let dataInfo = {}
320 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 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 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,11 +602,11 @@ export default {
425 602
         var result = [];
426 603
         for(var i = 0; i < array2.length; i++){
427 604
             var obj = array2[i];
428
-            var num = obj.patient_id;   //staff_id   就是要对比的key
605
+            var num = obj.item_id;   //staff_id   就是要对比的key
429 606
             var isExist = false;
430 607
             for(var j = 0; j < array1.length; j++){
431 608
                 var aj = array1[j];
432
-                var n = aj.patient_id;
609
+                var n = aj.item_id;
433 610
                 if(n == num){
434 611
                     isExist = true;
435 612
                     break;
@@ -439,9 +616,121 @@ export default {
439 616
                 result.push(obj);
440 617
             }
441 618
         }
442
-        console.log("result",result)
443 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 735
   created(){
447 736
     var nowDate = new Date();
@@ -465,10 +754,15 @@ export default {
465 754
       "-" +
466 755
       (nowDay < 10 ? "0" + nowDay : nowDay);
467 756
 
757
+
758
+
759
+    this.getCurrentOrgPatients()
468 760
     //获取系统指标
469 761
     this.getNormData()
470
-    //获取列表数据
471
-    this.getlist()
762
+    //获取统计图数据
763
+    this.getCartogramlist()
764
+
765
+
472 766
   }
473 767
 };
474 768
 </script>

+ 1 - 1
src/xt_pages/qcd/processIndicators.vue Ver fichero

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

+ 52 - 22
src/xt_pages/qcd/statisticalConfiguration.vue Ver fichero

@@ -74,11 +74,21 @@
74 74
                 </el-option>
75 75
             </el-select>
76 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 79
             <el-input style="width:200px" v-model="form.min_range"></el-input>&nbsp;
79 80
             -
80 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 92
           <el-form-item label="排序" :label-width="formLabelWidth">
83 93
             <el-input style="width:200px" v-model="form.sort"></el-input>
84 94
           </el-form-item>
@@ -115,11 +125,20 @@
115 125
                 </el-option>
116 126
             </el-select>
117 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 129
             <el-input style="width:200px" v-model="editform.min_range"></el-input>&nbsp;
120 130
             -
121 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 142
           <el-form-item label="排序" :label-width="formLabelWidth">
124 143
             <el-input style="width:200px" v-model="editform.sort"></el-input>
125 144
           </el-form-item>
@@ -146,7 +165,7 @@ export default {
146 165
   data() {
147 166
     return {
148 167
       crumbs: [
149
-        { path: false, name: "科室质控" },
168
+        { path: false, name: "质控管理" },
150 169
         { path: false, name: "统计配置" },
151 170
         { path: false, name: "质控达标统计配置" }
152 171
       ],
@@ -176,7 +195,8 @@ export default {
176 195
       rules: {
177 196
         inspectionMajor: [{ required: true, message: "检查大项不能为空" }],
178 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 201
       page:1,
182 202
       limit:10,
@@ -196,7 +216,7 @@ export default {
196 216
       getConfigurationDetail(id).then(response=>{
197 217
          if(response.data.state == 1){
198 218
            var configurationdetail = response.data.data.configurationdetail
199
-          // console.log("详情",configurationdetail)
219
+          console.log("详情",configurationdetail)
200 220
            this.editform.id = configurationdetail.id
201 221
            this.editform.inspectionMajor = configurationdetail.inspection_major
202 222
            this.editform.inspectionMinor = configurationdetail.inspection_minor
@@ -216,7 +236,7 @@ export default {
216 236
       getInspectionMajor().then(response=>{
217 237
         if(response.data.state == 1){
218 238
           var inspection =  response.data.data.inspection
219
-          //console.log("大项",inspection)
239
+          console.log("大项",inspection)
220 240
           this.InspectionMajor = inspection
221 241
          
222 242
         }
@@ -227,13 +247,14 @@ export default {
227 247
       getInspectionMinor(id).then(response=>{
228 248
         if(response.data.state == 1){
229 249
          var inspection =  response.data.data.inspection
230
-        // console.log("小项",inspection)
250
+         console.log("小项",inspection)
231 251
          this.InspectionMinor = inspection
232 252
         }
233 253
       })
234 254
     },
235 255
     changeInspectionTwo(id){
236 256
       this.InspectionMinorTwo = []
257
+      this.editform.inspectionMinor = ""
237 258
        getInspectionMinor(id).then(response=>{
238 259
         if(response.data.state == 1){
239 260
          var inspection =  response.data.data.inspection
@@ -242,12 +263,12 @@ export default {
242 263
         }
243 264
       })
244 265
     },
245
-    // 获取控范围
266
+    // 获取控范围
246 267
     changeInspectionMonior(id){
247 268
        getInspectionRange(id).then(response=>{
248 269
          if(response.data.state == 1){
249 270
            var inspectionRange =  response.data.data.inspectionRange
250
-          // console.log("inspectionRange",inspectionRange)
271
+          console.log("inspectionRange",inspectionRange)
251 272
            this.form.min_range = inspectionRange.range_min
252 273
            this.form.large_range = inspectionRange.range_max
253 274
          }
@@ -293,7 +314,7 @@ export default {
293 314
               configurationlist[i].sort = ""
294 315
             }
295 316
           }
296
-          //console.log("列表",configurationlist)
317
+          console.log("列表",configurationlist)
297 318
           this.configuraData = configurationlist
298 319
           var total = response.data.data.total
299 320
          // console.log("total",total)
@@ -320,16 +341,20 @@ export default {
320 341
         var sort = parseInt(sorts)
321 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,6 +415,11 @@ export default {
390 415
     text-align: center;
391 416
   }
392 417
 }
418
+.newFormItem{
419
+  .el-form-item__content{
420
+    margin-left:0 !important;
421
+  }
422
+}
393 423
 </style>
394 424
 
395 425
  <style rel="stylesheet/scss" lang="scss" scoped>

+ 1 - 1
src/xt_pages/qcd/treatmentControlAnalysis.vue Ver fichero

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

+ 1 - 4
src/xt_pages/qcd/treatmentControlAnalysis/check.vue Ver fichero

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

+ 76 - 37
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue Ver fichero

@@ -3,8 +3,22 @@
3 3
     <div class="cell clearfix">
4 4
       <el-form :inline="true" :model="listQuery">
5 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 22
         </el-form-item>
9 23
       </el-form>
10 24
       <label class="title">
@@ -90,6 +104,7 @@
90 104
 
91 105
 
92 106
 <script>
107
+  import { PostSearch} from '@/api/patient'
93 108
   import {getCurrentOrgPatients,getAllMajorInspection,getPatientList,getPatientDetailCheck,SearchDetailCheck } from "@/api/common/common"
94 109
 export default {
95 110
   data() {
@@ -106,6 +121,8 @@ export default {
106 121
       total:0,
107 122
       tableName:[],
108 123
       ObjectData:{},
124
+      patient_id:0,
125
+      patient_name:"",
109 126
     };
110 127
   },
111 128
   methods: {
@@ -122,10 +139,11 @@ export default {
122 139
       }
123 140
     },
124 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 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 147
             for(let i=0;i<checkDetail.length;i++){
130 148
               for(let j=0;j<this.tableName.length;j++){
131 149
                  if(checkDetail[i].ProjectId == this.tableName[j].inspection_major){
@@ -133,22 +151,23 @@ export default {
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,16 +203,16 @@ export default {
184 203
       getAllMajorInspection().then(response=>{
185 204
         if(response.data.state === 1){
186 205
            var inspection = response.data.data.inspection
187
-           console.log("inspection",inspection)
206
+        
188 207
            var a=[];
189 208
            for(let i=0;i<inspection.length;i++){
190 209
              a.push(inspection[i])
191 210
            }
192
-           console.log("a",a)
211
+
193 212
            this.newArr = a
194 213
            var arr = this.arrayToObj(a)
195 214
            
196
-           console.log("arr",arr)
215
+      
197 216
            this.ObjectData = arr
198 217
            this.tableName = inspection
199 218
         }
@@ -203,13 +222,13 @@ export default {
203 222
       getPatientList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.limit,this.listQuery.page).then(response=>{
204 223
          if(response.data.state === 1){
205 224
            var patientInfo = response.data.data.patientInfo
206
-           console.log("列表数据2",patientInfo)
225
+          
207 226
 
208 227
            var total = response.data.data.total
209
-           console.log("total",total)
228
+        
210 229
            this.total = total
211 230
           var list = response.data.data.list
212
-          console.log("list",list)
231
+       
213 232
           var dtd = []
214 233
           for(let i=0;i<list.length;i++){
215 234
               for(let j=0;j<this.tableName.length;j++){
@@ -218,7 +237,7 @@ export default {
218 237
                   }
219 238
               }
220 239
           }
221
-          console.log("dtd",dtd)
240
+   
222 241
           var dd = {};
223 242
            for (const index in dtd) {
224 243
             if (!(dtd[index].name in dd)) {
@@ -228,8 +247,7 @@ export default {
228 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 252
             for(const key in dd){
235 253
               for(const mkey in this.ObjectData){
@@ -243,16 +261,16 @@ export default {
243 261
               }
244 262
               this.tableData.push({ name: key, data: dd[key]});
245 263
             }
246
-            console.log("表",this.tableData)
264
+       
247 265
             let projectArr = []
248 266
           
249 267
             this.newArr.map(item => {
250 268
               projectArr.push(item.project_name)
251 269
             })
252
-            console.log("projectArr",projectArr)
270
+      
253 271
             this.tableData.map(item => {
254 272
               let arr = Object.values(item.data);
255
-             console.log("arr",arr)
273
+       
256 274
               arr.sort((a,b)=>{
257 275
                 return projectArr.indexOf(a.ProjectName)-projectArr.indexOf(b.ProjectName);
258 276
               });
@@ -265,7 +283,7 @@ export default {
265 283
       getPatientDetailCheck(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
266 284
           if(response.data.state === 1){
267 285
             var checkDetail =  response.data.data.checkDetail
268
-            console.log("checkDetail",checkDetail)
286
+        
269 287
             var arr = []
270 288
             for(let i=0;i<checkDetail.length;i++){
271 289
               for(let j=0;j<this.tableName.length;j++){
@@ -274,11 +292,11 @@ export default {
274 292
                  }
275 293
               }
276 294
             }
295
+
277 296
             let projectArr = []
278 297
             this.newArr.map(item => {
279 298
               projectArr.push(item.project_name)
280 299
             })
281
-            console.log("projectArr",projectArr)
282 300
             projectArr.forEach((item,index) => {
283 301
               if(!(arr[index] && item == arr[index].ProjectName)){
284 302
                 arr.splice(index,0,{Count:0, ProjectName: item,name: val.name})
@@ -290,13 +308,34 @@ export default {
290 308
             obj.data = arr
291 309
             this.tableData.push(obj)
292 310
             this.total = 1
293
-            console.log("arr",this.tableData)
311
+           
294 312
           }
295 313
       })
296 314
     },
297 315
    arrayToObj(arr){
298 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 340
   created(){
302 341
      var nowDate = new Date();

+ 74 - 27
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue Ver fichero

@@ -3,8 +3,22 @@
3 3
     <div class="cell clearfix">
4 4
       <el-form :inline="true" :model="listQuery">
5 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 22
         </el-form-item>
9 23
       </el-form>
10 24
       <label class="title">
@@ -67,6 +81,7 @@
67 81
 
68 82
 
69 83
 <script>
84
+import { PostSearch} from '@/api/patient'
70 85
 import echarts from "echarts";
71 86
 import LineChart from "../../components/LineChart";
72 87
 import { getCurrentOrgPatients,getInspectionTotalCount,getInspectionDetailById,getSearchPatientInfo } from "@/api/common/common";
@@ -178,7 +193,8 @@ export default {
178 193
         xAxis: [],
179 194
         series: []
180 195
       },
181
-      obj:[]
196
+      obj:[],
197
+      patient_id:0,
182 198
     };
183 199
   },
184 200
   methods: {
@@ -216,11 +232,11 @@ export default {
216 232
       getInspectionTotalCount(this.listQuery.start_time,this.listQuery.end_time).then(response=>{
217 233
           if(response.data.state === 1){
218 234
             var Inspection = response.data.data.Inspection
219
-            console.log("Inspection",Inspection)
235
+     
220 236
             this.tableData = Inspection
221 237
           
222 238
             var counts = response.data.data.counts
223
-            console.log("counts",counts)
239
+         
224 240
             var arr = []
225 241
             for(let i=0;i<Inspection.length;i++){
226 242
                for(let j=0;j<counts.length;j++){
@@ -229,9 +245,9 @@ export default {
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 251
             var hash = {};
236 252
             var i = 0;
237 253
             var res = [];
@@ -248,7 +264,7 @@ export default {
248 264
             res.map(item => {
249 265
              item.Count = eval(item.Count.join('+'))
250 266
             })
251
-            console.log(11111,res)
267
+           
252 268
             let arr1 = []
253 269
             this.tableData.map(it => {
254 270
               arr1.push(it.project_name)
@@ -262,24 +278,16 @@ export default {
262 278
             res.map(item => {
263 279
               this.modesData.series.push(parseInt(item.Count));
264 280
             })
265
-
266
-
281
+             console.log("this=====",this.tableData)
267 282
             for (const key in this.tableData) {
268 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 289
             this.chart.series[0].data = this.modesData.series
281 290
             this.chart.xAxis.data = this.modesData.xAxis
282
-            console.log(2222,this.modesData)
283 291
           }
284 292
       })
285 293
     },
@@ -300,10 +308,11 @@ export default {
300 308
                  }
301 309
               }
302 310
             }
303
-            console.log("arr",arr)
311
+            
304 312
            let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
305 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 316
             for (const key in this.tableData) {
308 317
               this.modesData.xAxis.push(this.tableData[key].project_name);
309 318
               if (key in arr) {
@@ -323,10 +332,12 @@ export default {
323 332
 
324 333
     //搜索功能
325 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 338
          if(response.data.state  === 1){
328 339
            var PatientsInfo = response.data.data.PatientsInfo
329
-           console.log("PatientsInfo",PatientsInfo)
340
+           console.log("patientsInfo",PatientsInfo)
330 341
            var arr = []
331 342
            for(let i=0;i<this.tableData.length;i++){
332 343
              for(let j=0;j<PatientsInfo.length;j++){
@@ -335,7 +346,22 @@ export default {
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,9 +385,30 @@ export default {
359 385
                 result.push(obj);
360 386
             }
361 387
         }
362
-        console.log("result",result)
363 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 413
   created(){
367 414
     var nowDate = new Date();

+ 66 - 38
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue Ver fichero

@@ -101,7 +101,7 @@
101 101
 <script>
102 102
 import echarts from "echarts";
103 103
 import LineChart from "../../components/LineChart";
104
-import {geStatistics} from "@/api/common/common"
104
+import {geStatistics,getTreatlist} from "@/api/common/common"
105 105
 export default {
106 106
   components: {
107 107
     LineChart
@@ -247,20 +247,76 @@ export default {
247 247
       this.geStatistics();
248 248
     },
249 249
     handleCurrentChange(page) {
250
+      this.tableData = []
250 251
       this.listQuery.page = page;
251 252
       this.geStatistics();
252 253
     },
253 254
    selectChange(val){
255
+     this.tableData=[]
254 256
      this.listQuery.value =val
255 257
      this.geStatistics()
258
+     this.getlist()
256 259
    },
257
-    geStatistics(){
260
+   getlist(){
258 261
       this.modesData.series = []
259 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 290
       geStatistics(this.listQuery).then(response=>{
261 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 320
           var dd = {};
265 321
           for (const index in dtd) {
266 322
             if (!(dtd[index].date in dd)) {
@@ -270,11 +326,13 @@ export default {
270 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 330
           for (const key in dd) {
275 331
             var total = 0;
276 332
             for (const mkey in this.modeOptions) {
277 333
               if (mkey in dd[key]) {
334
+                console.log("=====",mkey)
335
+                console.log(this.modeOptions[mkey].name)
278 336
                 dd[key][mkey].mode = this.modeOptions[mkey].name;
279 337
                 var number = parseInt(dd[key][mkey].number);
280 338
                 if (isNaN(number) || number == 0) {
@@ -292,44 +350,13 @@ export default {
292 350
             }
293 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 358
   created(){
331 359
     this.modeOptions = this.$store.getters.treatment_mode;
332
-    console.log("-----",this.modeOptions)
333 360
     var nowDate = new Date();
334 361
     var nowYear = nowDate.getFullYear();
335 362
     var nowMonth = nowDate.getMonth() + 1;
@@ -350,9 +377,10 @@ export default {
350 377
       (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
351 378
       "-" +
352 379
       (nowDay < 10 ? "0" + nowDay : nowDay);
380
+      //获取柱状图数据
381
+      this.getlist()
353 382
       //获取统计列表数据
354 383
       this.geStatistics()
355
-      console.log("activeModes",this.activeModes)
356 384
   },
357 385
   computed: {
358 386
     activeModes: function() {

+ 44 - 89
src/xt_pages/qcd/treatmentControlAnalysis/components/TimePersonal.vue Ver fichero

@@ -3,8 +3,22 @@
3 3
     <div class="cell clearfix">
4 4
       <el-form :inline="true" :model="listQuery">
5 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 22
         </el-form-item>
9 23
       </el-form>
10 24
       <label class="title">
@@ -98,6 +112,7 @@
98 112
 
99 113
 
100 114
 <script>
115
+ import { PostSearch} from '@/api/patient'
101 116
  import { getCurrentOrgPatients,getDialysisList,getDialysisDetailById,getPrescriptionByName } from "@/api/common/common";
102 117
  import { uParseTime } from "@/utils/tools";
103 118
 export default {
@@ -124,6 +139,7 @@ export default {
124 139
           return time.getTime() > Date.now() || time.getTime() < threeMonths;;
125 140
         }
126 141
       }, 
142
+      patient_id:0,
127 143
     };
128 144
   },
129 145
   methods: {
@@ -173,97 +189,14 @@ export default {
173 189
     getDialysisList(){
174 190
       getDialysisList(this.listQuery.start_time,this.listQuery.end_time,this.listQuery.page,this.listQuery.limit).then(response=>{
175 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 192
           var list = response.data.data.list
252
-          //console.log("list",list)
193
+          console.log("list",list)
253 194
           var totallist  =  response.data.data.totallist
254
-         // console.log("totallist",totallist)
195
+           console.log("totallist",totallist)
255 196
           this.total = totallist  
256 197
           var prescriptionList = response.data.data.prescriptionList
257 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 200
           let dataInfo = {}
268 201
           list.forEach((item, index) => {
269 202
             let { patient_id } = item
@@ -311,7 +244,7 @@ export default {
311 244
          this.getDialysisList()
312 245
          return false
313 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 248
          if(response.data.state === 1){
316 249
            var patients =  response.data.data.patient
317 250
            this.getModeId(patients)
@@ -416,7 +349,29 @@ export default {
416 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 376
   created(){
422 377
     var nowDate = new Date();

+ 1 - 4
src/xt_pages/qcd/treatmentControlAnalysis/time.vue Ver fichero

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

+ 236 - 147
src/xt_pages/qcd/workAnalysis/doctor.vue Ver fichero

@@ -10,24 +10,25 @@
10 10
           <el-tab-pane label="护士" name="second"></el-tab-pane>
11 11
         </el-tabs>
12 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 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 20
             ></el-option>
20 21
           </el-select>
21 22
           <el-select
22
-            v-model="value"
23
+            v-model="query.statistics_type"
23 24
             placeholder="请选择"
24
-            @change="chooseType"
25
+            @change="changeProject"
25 26
             style="width:120px;margin-right:20px"
26 27
           >
27 28
             <el-option
28
-              v-for="item in options"
29
+              v-for="item in project_options"
29 30
               :key="item.value"
30
-              :label="item.label"
31
+              :label="item.name"
31 32
               :value="item.value"
32 33
             ></el-option>
33 34
           </el-select>
@@ -35,12 +36,13 @@
35 36
             <span class="name">日期查询</span> :
36 37
           </label>
37 38
           <el-date-picker
38
-            v-model="listQuery.start_time"
39
+            v-model="query.start_time"
39 40
             prefix-icon="el-icon-date"
40 41
             @change="changeTime"
41 42
             :editable="false"
42
-            style="width: 196px;"
43
+            style="width: 150px;"
43 44
             type="date"
45
+            :picker-options="pickerOptions"
44 46
             placeholder="选择日期时间"
45 47
             align="right"
46 48
             format="yyyy-MM-dd"
@@ -48,11 +50,12 @@
48 50
           ></el-date-picker>
49 51
           <span class>-</span>
50 52
           <el-date-picker
51
-            v-model="listQuery.end_time"
53
+            v-model="query.end_time"
52 54
             prefix-icon="el-icon-date"
53 55
             @change="changeEndTime"
54 56
             :editable="false"
55
-            style="width: 196px;"
57
+            :picker-options="pickerOptions"
58
+            style="width: 150px;"
56 59
             type="date"
57 60
             placeholder="选择日期时间"
58 61
             align="right"
@@ -62,31 +65,53 @@
62 65
         </div>
63 66
         <div class="tableTitle">统计图</div>
64 67
         <div>
65
-          <line-chart :options="chart"></line-chart>
68
+          <line-chart :options="bar"></line-chart>
66 69
         </div>
67 70
         <div class="tableTitle">统计表</div>
68 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 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 115
         </div>
91 116
       </div>
92 117
     </div>
@@ -97,6 +122,9 @@
97 122
 import echarts from "echarts";
98 123
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
99 124
 import LineChart from "../../qcd/components/LineChart";
125
+
126
+import {GetDoctorWorkloadChartData,GetDoctorWorkloadTableData,GetAllAdminUser} from "@/api/common/statistics";
127
+
100 128
 export default {
101 129
   components: {
102 130
     BreadCrumb,
@@ -104,8 +132,36 @@ export default {
104 132
   },
105 133
   data() {
106 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 163
       crumbs: [
108
-        { path: false, name: "科室质控" },
164
+        { path: false, name: "质控管理" },
109 165
         { path: false, name: "工作量分析统计" },
110 166
         { path: false, name: "医生" }
111 167
       ],
@@ -116,122 +172,19 @@ export default {
116 172
         page: 1,
117 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 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 178
         title: {
226 179
           text: "ECharts 入门示例"
227 180
         },
228 181
         tooltip: {},
229 182
         legend: {
230
-          data: ["次数"],
183
+          data: [],
231 184
           left: 0
232 185
         },
233 186
         xAxis: {
234
-          data: ["达标", "未达标"]
187
+          data: []
235 188
         },
236 189
         yAxis: {
237 190
           axisLabel: {
@@ -241,15 +194,25 @@ export default {
241 194
         },
242 195
         series: [
243 196
           {
244
-            name: "次数",
197
+            name: "",
245 198
             type: "bar",
246
-            data: ["78.57", "50"],
199
+            data: [],
247 200
             barWidth: 30,
248 201
             label: {
249 202
               normal: {
250 203
                 show: true,
251 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,14 +256,125 @@ export default {
293 256
     };
294 257
   },
295 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 367
     changeEndTime(val) {
298 368
       var time =
299
-        this.getTimestamp(val) - this.getTimestamp(this.listQuery.start_time);
369
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time);
300 370
       if (time < 0) {
301 371
         this.$message.error("结束时间不能小于开始时间");
302
-        this.listQuery.end_time = "";
372
+        this.query.end_time = "";
303 373
       } else {
374
+        this.query.page = 1;
375
+        this.GetDoctorWorkloadChartData(this.query)
376
+        this.GetDoctorWorkloadTableData(this.query)
377
+
304 378
       }
305 379
     },
306 380
     handleClick() {
@@ -308,6 +382,21 @@ export default {
308 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 402
 </script>

+ 372 - 236
src/xt_pages/qcd/workAnalysis/nurse.vue Ver fichero

@@ -10,24 +10,25 @@
10 10
           <el-tab-pane label="护士" name="second"></el-tab-pane>
11 11
         </el-tabs>
12 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 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 20
             ></el-option>
20 21
           </el-select>
21 22
           <el-select
22
-            v-model="value"
23
+            v-model="query.statistics_type"
23 24
             placeholder="请选择"
24
-            @change="chooseType"
25
+            @change="changeProject"
25 26
             style="width:120px;margin-right:20px"
26 27
           >
27 28
             <el-option
28
-              v-for="item in options"
29
+              v-for="item in project_options"
29 30
               :key="item.value"
30
-              :label="item.label"
31
+              :label="item.name"
31 32
               :value="item.value"
32 33
             ></el-option>
33 34
           </el-select>
@@ -35,12 +36,13 @@
35 36
             <span class="name">日期查询</span> :
36 37
           </label>
37 38
           <el-date-picker
38
-            v-model="listQuery.start_time"
39
+            v-model="query.start_time"
39 40
             prefix-icon="el-icon-date"
40 41
             @change="changeTime"
41 42
             :editable="false"
42
-            style="width: 196px;"
43
+            style="width: 150px;"
43 44
             type="date"
45
+            :picker-options="pickerOptions"
44 46
             placeholder="选择日期时间"
45 47
             align="right"
46 48
             format="yyyy-MM-dd"
@@ -48,11 +50,12 @@
48 50
           ></el-date-picker>
49 51
           <span class>-</span>
50 52
           <el-date-picker
51
-            v-model="listQuery.end_time"
53
+            v-model="query.end_time"
52 54
             prefix-icon="el-icon-date"
53 55
             @change="changeEndTime"
54 56
             :editable="false"
55
-            style="width: 196px;"
57
+            :picker-options="pickerOptions"
58
+            style="width: 150px;"
56 59
             type="date"
57 60
             placeholder="选择日期时间"
58 61
             align="right"
@@ -62,254 +65,387 @@
62 65
         </div>
63 66
         <div class="tableTitle">统计图</div>
64 67
         <div>
65
-          <line-chart :options="chart"></line-chart>
68
+          <line-chart :options="bar"></line-chart>
66 69
         </div>
67 70
         <div class="tableTitle">统计表</div>
68 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 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 159
         </div>
91 160
       </div>
92 161
     </div>
93 162
   </div>
94 163
 </template>
95
-
96 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 449
 </script>
314 450
 
315 451
 <style lang="scss" scoped>

+ 4 - 17
src/xt_pages/sign/index.vue Ver fichero

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

+ 1 - 1
src/xt_pages/statistics/index.vue Ver fichero

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

+ 5 - 1
src/xt_pages/user/components/PatientForm.vue Ver fichero

@@ -280,7 +280,7 @@
280 280
                   </el-radio-group>
281 281
                 </el-form-item>
282 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 284
                 <el-form-item
285 285
                   label="治疗状态(转归) : "
286 286
                   class="is-required"
@@ -1225,6 +1225,7 @@ export default {
1225 1225
       ],
1226 1226
 
1227 1227
       subscibe: {},
1228
+      showLapseto:true,
1228 1229
       rules: {
1229 1230
         contagions: [
1230 1231
           {
@@ -1275,6 +1276,9 @@ export default {
1275 1276
     }
1276 1277
   },
1277 1278
   created() {
1279
+    if(this.isEdit == true){
1280
+       this.showLapseto = false
1281
+    }
1278 1282
     // this.styleOptions = this.$store.getters.patient_types;
1279 1283
     // this.partitionOptions = this.$store.getters.partitions;
1280 1284
     this.maritalOptions = getDataConfig("patient", "marital_options");

+ 32 - 19
src/xt_pages/user/patients.vue Ver fichero

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

+ 30 - 30
src/xt_permission.js Ver fichero

@@ -1,59 +1,59 @@
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 6
 NProgress.configure({
7 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 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 31
   // console.log(store.getters.current_role_urls.indexOf(to.path))
32 32
   // alert('path:' + to.path)
33 33
   // 如果 url 带有 lt (login_token)参数,则跳转到验证 token 时等待的页面
34 34
   if (to.query.lt != null && to.query.lt.length > 0) {
35 35
     // alert('will go to verify token: ' + to.query.lt)
36 36
     next({
37
-      path: "/token/verify",
37
+      path: '/token/verify',
38 38
       query: {
39 39
         token: to.query.lt
40 40
       }
41
-    });
41
+    })
42 42
 
43 43
     // 否则 如果没有 user 信息,则前往 sso 登录
44 44
   } else if (store.getters.xt_user.user.id === 0) {
45 45
     if (loginWhiteList.indexOf(to.path) !== -1) {
46 46
       // alert('登录白名单内,跳过登录')
47
-      next();
47
+      next()
48 48
     } else {
49 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 53
     // 否则 如果当前 url 不需要验证访问权限,则通过
54 54
   } else if (permissionWhiteList.indexOf(to.path) !== -1) {
55 55
     // alert('权限验证白名单内,直接进入')
56
-    next();
56
+    next()
57 57
 
58 58
     // 否则 如果拥有当前 url 的权限,则通过
59 59
     // } else if (store.getters.current_role_urls.indexOf(to.path) !== -1) {
@@ -65,11 +65,11 @@ router.beforeEach((to, from, next) => {
65 65
     // console.log(store.getters.current_role_urls)
66 66
     // console.log(store.getters.current_role_urls.indexOf(to.path))
67 67
     // alert('401')
68
-    next();
68
+    next()
69 69
     // next({ path: '/404' })
70 70
   }
71
-});
71
+})
72 72
 
73 73
 router.afterEach(() => {
74
-  NProgress.done();
75
-});
74
+  NProgress.done()
75
+})