浏览代码

Merge remote-tracking branch 'origin/20230223_pc_vue_new_branch' into 20230223_pc_vue_new_branch

杨青 1年前
父节点
当前提交
2ffc490ca2
共有 100 个文件被更改,包括 21055 次插入8061 次删除
  1. 9 2
      src/api/advice.js
  2. 45 0
      src/api/data.js
  3. 42 0
      src/api/device.js
  4. 8 0
      src/api/dialysis.js
  5. 65 0
      src/api/his/his.js
  6. 25 0
      src/api/inspection.js
  7. 8 0
      src/api/manage.js
  8. 8 0
      src/api/patient.js
  9. 23 0
      src/api/qcd.js
  10. 4 1
      src/lang/en.js
  11. 9 4
      src/lang/zh.js
  12. 4 4
      src/router/index.js
  13. 15 0
      src/router/index_路由未分离前.js
  14. 107 46
      src/router/modules/Dialysisanalysis.js
  15. 20 10
      src/router/modules/device.js
  16. 55 12
      src/router/modules/dialysis.js
  17. 19 0
      src/router/modules/dialysisIndex.js
  18. 2 1
      src/router/modules/dialysisRecord.js
  19. 5 0
      src/router/modules/hospitalRecord.js
  20. 12 0
      src/router/modules/workforce.js
  21. 2 2
      src/utils/data.js
  22. 1 1
      src/views/layout/Layout.vue
  23. 2 2
      src/views/layout/components/Sidebar/index.vue
  24. 9 9
      src/xt_pages/Dialysisanalysis/albumin/albuminall.vue
  25. 627 199
      src/xt_pages/Dialysisanalysis/albumin/albuminalone.vue
  26. 334 227
      src/xt_pages/Dialysisanalysis/bloodPhosphorus/phosphorusall.vue
  27. 627 198
      src/xt_pages/Dialysisanalysis/bloodPhosphorus/phosphorusalone.vue
  28. 333 227
      src/xt_pages/Dialysisanalysis/bloodPotassium/potassiumall.vue
  29. 627 198
      src/xt_pages/Dialysisanalysis/bloodPotassium/potassiumalone.vue
  30. 334 227
      src/xt_pages/Dialysisanalysis/calcium/calciumall.vue
  31. 630 198
      src/xt_pages/Dialysisanalysis/calcium/calciumalone.vue
  32. 125 0
      src/xt_pages/Dialysisanalysis/components/BarChart.vue
  33. 261 0
      src/xt_pages/Dialysisanalysis/components/LineChart.vue
  34. 262 0
      src/xt_pages/Dialysisanalysis/components/LineChart1.vue
  35. 108 0
      src/xt_pages/Dialysisanalysis/components/PieChart.vue
  36. 335 226
      src/xt_pages/Dialysisanalysis/hemoglobin/hemoglobinall.vue
  37. 627 198
      src/xt_pages/Dialysisanalysis/hemoglobin/hemoglobinalone.vue
  38. 22 35
      src/xt_pages/Dialysisanalysis/otherIndicators/otherall.vue
  39. 630 198
      src/xt_pages/Dialysisanalysis/otherIndicators/otheralone.vue
  40. 334 227
      src/xt_pages/Dialysisanalysis/platelets/plateletsall.vue
  41. 627 198
      src/xt_pages/Dialysisanalysis/platelets/plateletsalone.vue
  42. 212 0
      src/xt_pages/Dialysisanalysis/print/print.vue
  43. 630 224
      src/xt_pages/Dialysisanalysis/qualitycontrol/individual.vue
  44. 419 218
      src/xt_pages/Dialysisanalysis/qualitycontrol/totalSstatistics.vue
  45. 19 2
      src/xt_pages/data/components/addProject.vue
  46. 2 1
      src/xt_pages/data/components/editInspection.vue
  47. 23 2
      src/xt_pages/data/components/editProject.vue
  48. 1 1
      src/xt_pages/data/components/inspection.vue
  49. 317 0
      src/xt_pages/data/components/patient_diagnose.vue
  50. 8 2
      src/xt_pages/data/specialDictionary.vue
  51. 1 1
      src/xt_pages/data/template.vue
  52. 36 17
      src/xt_pages/device/airDisinfectTwo.vue
  53. 1014 0
      src/xt_pages/device/objectRegistration.vue
  54. 17 12
      src/xt_pages/device/objectTableDisinfectTwo.vue
  55. 31 9
      src/xt_pages/dialysis/batch_print/batch_print_order_fortyOne.vue
  56. 147 44
      src/xt_pages/dialysis/batch_print/batch_print_order_six.vue
  57. 56 5
      src/xt_pages/dialysis/batch_print/batch_print_order_thirteen.vue
  58. 3 1
      src/xt_pages/dialysis/batch_print/batch_print_order_thirtyTwo.vue
  59. 2 2
      src/xt_pages/dialysis/bloodPresssWatch.vue
  60. 5 0
      src/xt_pages/dialysis/details/DialysisPrescription.vue
  61. 14 5
      src/xt_pages/dialysis/details/NavIgation.vue
  62. 2 2
      src/xt_pages/dialysis/details/assessmentAfter.vue
  63. 7 0
      src/xt_pages/dialysis/details/assessmentBefore.vue
  64. 20 12
      src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue
  65. 35 40
      src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue
  66. 3 3
      src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue
  67. 59 1
      src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue
  68. 206 16
      src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue
  69. 4 5
      src/xt_pages/dialysis/details/dialog/computer_dialog.vue
  70. 99 59
      src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue
  71. 17 16
      src/xt_pages/dialysis/details/dialog/doubleCheckDialog.vue
  72. 4 4
      src/xt_pages/dialysis/details/dialog/finish_dialog.vue
  73. 14 7
      src/xt_pages/dialysis/details/dialog/monitor_dialog.vue
  74. 261 4
      src/xt_pages/dialysis/details/dialog/treatmentSummaryDialog.vue
  75. 4 4
      src/xt_pages/dialysis/details/dialysisMonitoring.vue
  76. 1 0
      src/xt_pages/dialysis/details/index.vue
  77. 40 131
      src/xt_pages/dialysis/dialysisFlow.vue
  78. 3 5
      src/xt_pages/dialysis/dialysisPrintOrder.vue
  79. 687 0
      src/xt_pages/dialysis/doctorLongNewAdvicePrint.vue
  80. 2121 0
      src/xt_pages/dialysis/longDoctorAdvice.vue
  81. 617 0
      src/xt_pages/dialysis/longDoctorAdvicePrint.vue
  82. 632 0
      src/xt_pages/dialysis/longSignPrint.vue
  83. 0 0
      src/xt_pages/dialysis/scheduleIndex.vue
  84. 35 13
      src/xt_pages/dialysis/template/DialysisPrintOrderFortyOne.vue
  85. 68 33
      src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue
  86. 93 49
      src/xt_pages/dialysis/template/DialysisPrintOrderSixtyfour.vue
  87. 48 3
      src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue
  88. 24 3
      src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue
  89. 7 2
      src/xt_pages/home/index.vue
  90. 414 415
      src/xt_pages/hospitalStation/batchStatementTemplate/hospitalBatchPrint.vue
  91. 73 20
      src/xt_pages/hospitalStation/chargeDetailManagement.vue
  92. 13 13
      src/xt_pages/hospitalStation/components/chargeDialog.vue
  93. 12 9
      src/xt_pages/hospitalStation/components/deskPrescription.vue
  94. 1 0
      src/xt_pages/hospitalStation/components/dialysisIndex.vue
  95. 45 3
      src/xt_pages/hospitalStation/components/inquiriesDetail.vue
  96. 419 0
      src/xt_pages/hospitalStation/components/registerDialog9504.vue
  97. 3570 3544
      src/xt_pages/hospitalStation/doctorDesk.vue
  98. 451 449
      src/xt_pages/hospitalStation/hospitalBatchStatementPrint.vue
  99. 647 0
      src/xt_pages/hospitalStation/inHospitalHistory.vue
  100. 0 0
      src/xt_pages/hospitalStation/pastInquiries.vue

+ 9 - 2
src/api/advice.js 查看文件

@@ -260,8 +260,7 @@ export function CreateGroupAdvice(id, groupno, advices, mode) {
260 260
 }
261 261
 export function DeleteGroupAdvice(groupno, mode) {
262 262
   return request({
263
-    url:
264
-      '/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
263
+    url:'/api/patients/advice/deletegroup?groupno=' + groupno + '&mode=' + mode,
265 264
     method: 'delete',
266 265
     headers: {
267 266
       Permission: 3
@@ -577,3 +576,11 @@ export function GetMobileScheduleList(params) {
577 576
     params: params
578 577
   })
579 578
 }
579
+
580
+export function getNewLongSchedualDoctors(params){
581
+  return request({
582
+    url: '/api/schedule/new/long/advices',
583
+    method: 'get',
584
+    params: params
585
+  })
586
+}

+ 45 - 0
src/api/data.js 查看文件

@@ -305,3 +305,48 @@ export function postSearchDrugList(keyword, storehouse_id, params) {
305 305
   })
306 306
 }
307 307
 
308
+export function savePatientDiagnose(data){
309
+  
310
+  return request({
311
+    url:"/api/patient/addpatientdiagnose",
312
+    method:"post",
313
+    data:data,
314
+  })
315
+}
316
+
317
+export function getPatientDiagnose(params){
318
+  
319
+  return request({
320
+    url:"/api/patient/getpatientdiagnose",
321
+    method:"get",
322
+    params:params
323
+  })
324
+}
325
+
326
+export function getPatientDiagnoseDetail(params){
327
+  
328
+  return request({
329
+    url:"/api/patient/getpatientdiagnosedetail",
330
+    method:"Get",
331
+    params:params
332
+  })
333
+}
334
+
335
+
336
+export function updatePatientCase(data){
337
+  
338
+  return request({
339
+    url:"/api/patient/updatepatientcase",
340
+    method:"post",
341
+    data:data,
342
+  })
343
+}
344
+
345
+export function deletePatientDiagnose(params){
346
+  
347
+  return request({
348
+    url:"/api/patient/deletepatientdiagnose",
349
+    method:"Get",
350
+    params:params,
351
+  })
352
+}

+ 42 - 0
src/api/device.js 查看文件

@@ -340,4 +340,46 @@ export function getObjectTableDisinfectLongTime(params){
340 340
     method:"get",
341 341
     params:params,
342 342
   })
343
+}
344
+
345
+export function saveObjectRegistration(data){
346
+  
347
+  return request({
348
+    url:"/api/manage/saveobjectregistration",
349
+    method:"post",
350
+    data:data
351
+  })
352
+}
353
+
354
+export function getRegistrationDisInfectList(params){
355
+  return request({
356
+    url:"/api/manage/getregistrationdisinfectlist",
357
+    method:"get",
358
+    params:params,
359
+  })
360
+}
361
+
362
+export function getObjectRegistrationByIdList(id,params){
363
+  return request({
364
+    url:"/api/manage/getobjectregistrationbyidlist?id="+id,
365
+    method:"Get",
366
+    params:params
367
+  })
368
+}
369
+
370
+export function UpdateObjectRegistration(data){
371
+  return request({
372
+    url:"/api/manage/updateobjectregistration",
373
+    method:"post",
374
+    data:data,
375
+  })
376
+
377
+}
378
+
379
+export function deleteObjectRegistration(id,params){
380
+  return request({
381
+    url:"/api/manage/deleteobjectregistration?id="+id,
382
+    method:"get",
383
+    params:params
384
+  })
343 385
 }

+ 8 - 0
src/api/dialysis.js 查看文件

@@ -404,6 +404,14 @@ export function getDialysisAdviceToday(params) {
404 404
   })
405 405
 }
406 406
 
407
+export function getLongDialysisAdviceToday(params){
408
+  return request({
409
+    url:"/api/patient/getlongdialysisadvicetoday",
410
+    method:"Get",
411
+    params:params,
412
+  })
413
+}
414
+
407 415
 
408 416
 export function SaveDialysisInformationSetting(params) {
409 417
   return request({

+ 65 - 0
src/api/his/his.js 查看文件

@@ -754,6 +754,71 @@ export function getBatchSettleAccount(params) {
754 754
 
755 755
 
756 756
 
757
+export function getHospitalUnChargeList(params) {
758
+  return request({
759
+    url: "/api/his/prescription/list",
760
+    method: "get",
761
+    params:params,
762
+  });
763
+}
764
+
765
+
766
+export function getHospitalUnChargeSummary(params) {
767
+  return request({
768
+    url: "/api/his/prescription/summary",
769
+    method: "get",
770
+    params:params,
771
+  });
772
+}
773
+
774
+export function getInHospitalHistory(params){
775
+  return request({
776
+    url:"/api/hospital/inhopitalcheck/list",
777
+    method:"get",
778
+    params:params
779
+  })
780
+}
781
+
782
+
783
+export function getColorTubeLablePrints(params){
784
+  return request({
785
+    url:"/api/his/inspectionlisttwo/get",
786
+    method:"get",
787
+    params:params
788
+  })
789
+}
790
+
791
+
792
+
793
+export function handleTeamData(params){
794
+  return request({
795
+    url:"/handleTeamData",
796
+    method:"get",
797
+    params:params
798
+  })
799
+}
800
+
801
+
802
+
803
+export function createPrintLable(params){
804
+  return request({
805
+    url:"/api/his/label/create",
806
+    method:"get",
807
+    params:params
808
+  })
809
+}
810
+
811
+
812
+export function getPrintLable(params){
813
+  return request({
814
+    url:"/api/his/label/get",
815
+    method:"get",
816
+    params:params
817
+  })
818
+}
819
+
820
+
821
+
757 822
 
758 823
 
759 824
 

+ 25 - 0
src/api/inspection.js 查看文件

@@ -78,6 +78,31 @@ export function editPatientPICInspection(id, data) {
78 78
 }
79 79
 
80 80
 
81
+export function setRemind(params) {
82
+  return request({
83
+    url: '/api/patient/inspection_remind/set',
84
+    method: 'get',
85
+    params: params
86
+
87
+  })
88
+}
89
+
90
+export function setRemindDialog(id,is_open) {
91
+  return request({
92
+    url: '/api/checkremind/config/commit?is_open='+is_open+"&id="+id,
93
+    method: 'post'
94
+  })
95
+}
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
81 106
 
82 107
 
83 108
 

+ 8 - 0
src/api/manage.js 查看文件

@@ -797,4 +797,12 @@ export function DeleteBatchDialyisWater(data){
797 797
     method:"Delete",
798 798
     data:data,
799 799
   })
800
+}
801
+
802
+export function getInformationManaList(params){
803
+  return request({
804
+    url:"/api/manage/getinformationmanalist",
805
+    method:"get",
806
+    params:params
807
+  })
800 808
 }

+ 8 - 0
src/api/patient.js 查看文件

@@ -744,3 +744,11 @@ export function getSickhistoryCheckRecordsPrint(params) {
744 744
 }
745 745
 
746 746
 
747
+export function getPatientDialysisInfor(params){
748
+  
749
+  return request({
750
+    url:"/api/patient/getpatientdialysisinforlist",
751
+    method:"get",
752
+    params:params
753
+  })
754
+}

+ 23 - 0
src/api/qcd.js 查看文件

@@ -108,3 +108,26 @@ export function GetPersonAdviceData(params) {
108 108
   })
109 109
 }
110 110
 
111
+
112
+export function GetQCStatistisData(params) {
113
+  return request({
114
+    url: '/api/qc/statistiscall/get',
115
+    method: 'get',
116
+    params: params
117
+  })
118
+}
119
+
120
+export function GetPersonQCStatistisData(params) {
121
+  return request({
122
+    url: '/api/qc/statistiscperson/get',
123
+    method: 'get',
124
+    params: params
125
+  })
126
+}
127
+
128
+
129
+
130
+
131
+
132
+
133
+

+ 4 - 1
src/lang/en.js 查看文件

@@ -81,6 +81,8 @@ export default {
81 81
     infor:'infor',
82 82
     weight: 'weight',
83 83
     dialysisRecord: 'dialysisRecord',
84
+    dialysisInfo:'dialysisInfo',
85
+    dialysis_index:'dialysis_index',
84 86
     scheduling: 'scheduling',
85 87
     device: 'Device',
86 88
     deviceManage: 'Device Manage',
@@ -123,7 +125,8 @@ export default {
123 125
     special_permission_manage: 'Special Permission Manage',
124 126
     schedule_print: 'Print Schudule',
125 127
     dialysis_batch_print: 'Batch Print Order',
126
-    user_detail: 'user_detail'
128
+    user_detail: 'user_detail',
129
+    objectRegistration:'objectRegistration',
127 130
   },
128 131
   navbar: {
129 132
     logOut: 'Log Out',

+ 9 - 4
src/lang/zh.js 查看文件

@@ -93,9 +93,9 @@ export default {
93 93
     dialysisSolution: '透析处方',
94 94
     inspection: '检验检查',
95 95
     home: '透析首页',
96
-    infor:'信息归档',
97 96
     weight: '干体重',
98 97
     dialysisRecord: '透析记录',
98
+    dialysisInfo:'透析信息',
99 99
     scheduling: '排班信息',
100 100
     proeducation: '宣教信息',
101 101
     doctorAdvice: '医嘱信息',
@@ -104,7 +104,7 @@ export default {
104 104
     deviceManage: '院感管理',
105 105
     modemanagement: '型号配置',
106 106
     dialysisMachineManage: '设备管理',
107
-    
107
+
108 108
     workforce: '患者排班',
109 109
     appointment: '排班管理',
110 110
     sign: '治疗签到',
@@ -294,7 +294,11 @@ export default {
294 294
     faPiao: '发票设置',
295 295
     chargeDetailManagement: '收费明细',
296 296
     yidiClear: '异地清分',
297
-    zeroSummary: '零用明细汇总'
297
+    zeroSummary: '零用明细汇总',
298
+    hospitalhistory: '住院历史',
299
+    dialysis_index:'信息归档',
300
+    objectRegistration:"医疗器械登记",
301
+    Dialysisanalysis: '专业质控'
298 302
   },
299 303
   navbar: {
300 304
     logOut: '退出登录',
@@ -416,6 +420,7 @@ export default {
416 420
     tentative_diagnosis: '初步诊断',
417 421
     diagnostic_basis: '诊断依据',
418 422
     differential_diagnosis: '鉴别诊断',
419
-    treatment_plan: '诊疗计划'
423
+    treatment_plan: '诊疗计划',
424
+    befor_symptoms: '透前症状',
420 425
   }
421 426
 }

+ 4 - 4
src/router/index.js 查看文件

@@ -8,7 +8,7 @@ import device from './modules/device'
8 8
 import dialysis from './modules/dialysis'
9 9
 import patient from './modules/patient'
10 10
 import qcd from './modules/qcd'
11
-import Dialysisanalysis from './modules/Dialysisanalysis'//
11
+// import Dialysisanalysis from './modules/Dialysisanalysis'//
12 12
 import role from './modules/role'
13 13
 import stock from './modules/stock'
14 14
 import weight_sign from './modules/weight_sign'
@@ -61,7 +61,7 @@ import bedManagement from './modules/bedManagement'
61 61
 import dictionaryManagement from './modules/dictionaryManagement'
62 62
 import templateManagement from './modules/templateManagement'
63 63
 import DepartManage from './modules/DepartManage'
64
-import basicConfig from './modules/basicConfig' 
64
+import basicConfig from './modules/basicConfig'
65 65
 
66 66
 Vue.use(Router)
67 67
 
@@ -173,7 +173,7 @@ var _asy_router_map = [
173 173
 
174 174
   otherManagement,
175 175
   qcd,
176
- 
176
+
177 177
   device,
178 178
   org,
179 179
   data_upload,
@@ -204,7 +204,7 @@ var _asy_router_map = [
204 204
   integration,
205 205
   basicConfig,
206 206
   supply,
207
-  Dialysisanalysis,// 新菜单6.1
207
+  // Dialysisanalysis,// 新菜单6.1
208 208
 ]
209 209
 
210 210
 var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证

+ 15 - 0
src/router/index_路由未分离前.js 查看文件

@@ -744,6 +744,7 @@ export const xt_asyncRouterMap = [
744 744
     },
745 745
     children: [
746 746
       { path: '/dialysis/dialysisrecord', component: () => import('@/xt_pages/dialysis/schedualPatient'), name: '透析记录', meta: { title: '透析记录' }},
747
+    
747 748
       {
748 749
         path: '/dialysis/record/:id',
749 750
         component: () => import('@/xt_pages/dialysis/dialysisPage'),
@@ -963,6 +964,18 @@ export const xt_asyncRouterMap = [
963 964
     ]
964 965
   },
965 966
 
967
+  {
968
+    path: '/dialysisIndex',
969
+    component: Layout,
970
+    redirct: '/dialysisIndex/index',
971
+    children: [{
972
+      path: '/dialysisIndex',
973
+      component: () => import('@/xt_pages/dialysis/scheduleIndex'),
974
+      name: 'dialysisIndex',
975
+      meta: { title: 'dialysisIndex', icon: 'dialysisIndex', noCache: true }
976
+    }]
977
+  },
978
+
966 979
   // /////////////////////////////////////线在end
967 980
   {
968 981
     path: '/role',
@@ -980,4 +993,6 @@ export const xt_asyncRouterMap = [
980 993
       { path: '/role/admin/specialpermission', component: () => import('@/xt_pages/role/special_permission'), name: 'special_permission_manage', meta: { title: 'special_permission_manage' }}
981 994
     ]
982 995
   },
996
+
997
+
983 998
 ]

+ 107 - 46
src/router/modules/Dialysisanalysis.js 查看文件

@@ -3,11 +3,11 @@ import Layout from '@/views/layout/Layout'
3 3
 export default {
4 4
   path: '/Dialysisanalysis',
5 5
   component: Layout,
6
-  redirect: 'noredirect',
6
+  redirect: '/Dialysisanalysis/qualitycontrol/thyroidGland',
7 7
   name: 'Dialysisanalysis',
8 8
   alwaysShow: true,
9 9
   meta: {
10
-    title: '透析分析',
10
+    title: '专业质控',
11 11
     icon: 'statistics'
12 12
   },
13 13
   children: [
@@ -21,88 +21,149 @@ export default {
21 21
       }
22 22
     },
23 23
     {
24
-      path: '/Dialysisanalysis/hemoglobin',
24
+      path: '/Dialysisanalysis/qualitycontrol/hemoglobin',
25 25
       component: () => import('@/xt_pages/Dialysisanalysis/hemoglobin/index'),
26
-      name: 'index',
26
+      name: 'thyroidGland',
27 27
       meta: {
28 28
         title: '血红蛋白',
29 29
         noCache: true
30 30
       }
31 31
     },
32 32
     {
33
-      path: '/Dialysisanalysis/bloodPotassium',
33
+      path: '/Dialysisanalysis/qualitycontrol/bloodPotassium',
34 34
       component: () => import('@/xt_pages/Dialysisanalysis/bloodPotassium/index'),
35
-      name: 'index',
35
+      name: 'thyroidGland',
36 36
       meta: {
37 37
         title: '血钾',
38 38
         noCache: true
39 39
       }
40 40
     },
41 41
     {
42
-      path: '/Dialysisanalysis/albumin',
42
+      path: '/Dialysisanalysis/qualitycontrol/albumin',
43 43
       component: () => import('@/xt_pages/Dialysisanalysis/albumin/index'),
44
-      name: 'index',
44
+      name: 'thyroidGland',
45 45
       meta: {
46 46
         title: '白蛋白',
47 47
         noCache: true
48 48
       }
49 49
     },
50 50
     {
51
-      path: '/Dialysisanalysis/bloodPhosphorus',
51
+      path: '/Dialysisanalysis/qualitycontrol/bloodPhosphorus',
52 52
       component: () => import('@/xt_pages/Dialysisanalysis/bloodPhosphorus/index'),
53
-      name: 'index',
53
+      name: 'thyroidGland',
54 54
       meta: {
55 55
         title: '血磷',
56 56
         noCache: true
57 57
       }
58
-    },
59
-    {
60
-      path: '/Dialysisanalysis/calcium',
58
+    }, {
59
+      path: '/Dialysisanalysis/qualitycontrol/calcium',
61 60
       component: () => import('@/xt_pages/Dialysisanalysis/calcium/index'),
62
-      name: 'index',
61
+      name: 'thyroidGland',
63 62
       meta: {
64 63
         title: '钙',
65 64
         noCache: true
66
-      }
67
-    },
68
-    {
69
-      path: '/Dialysisanalysis/platelets',
65
+      }},{
66
+      path: '/Dialysisanalysis/qualitycontrol/platelets',
70 67
       component: () => import('@/xt_pages/Dialysisanalysis/platelets/index'),
71
-      name: 'index',
68
+      name: 'thyroidGland',
72 69
       meta: {
73 70
         title: '血小板',
74 71
         noCache: true
75 72
       }
76
-    },
77
-    {
78
-      path: '/Dialysisanalysis/otherIndicators',
79
-      component: () => import('@/xt_pages/Dialysisanalysis/otherIndicators/index'),
80
-      name: 'index',
81
-      meta: {
82
-        title: '其他指标',
83
-        noCache: true
84
-      }
85
-    },
86
-    {
87
-      path: '/Dialysisanalysis/nonnumerical',
88
-      component: () => import('@/xt_pages/Dialysisanalysis/nonnumerical'),
89
-      name: 'nonnumerical',
73
+    },{
74
+      path: '/Dialysisanalysis/qualitycontrol/print',
75
+      component: () => import('@/xt_pages/Dialysisanalysis/print/print'),
76
+      name: 'print',
77
+      hidden: true,
78
+      is_menu: false,
90 79
       meta: {
91
-        title: '非数值类的列表展示',
80
+        title: 'print',
92 81
         noCache: true
93 82
       }
94
-    },
95
-    {
96
-      path: '/Dialysisanalysis/dialysis_index',
97
-      component: () => import('@/xt_pages/Dialysisanalysis/dialysis_index'),
98
-      name: 'dialysis_index',
99
-      meta: {
100
-        title: '透析指标详情',
101
-        noCache: true
102
-      }
103
-    },
104
-   
105
-  
83
+    }
84
+    // {
85
+    //   path: '/Dialysisanalysis/hemoglobin',
86
+    //   component: () => import('@/xt_pages/Dialysisanalysis/hemoglobin/index'),
87
+    //   name: 'index',
88
+    //   meta: {
89
+    //     title: '血红蛋白',
90
+    //     noCache: true
91
+    //   }
92
+    // },
93
+    // {
94
+    //   path: '/Dialysisanalysis/bloodPotassium',
95
+    //   component: () => import('@/xt_pages/Dialysisanalysis/bloodPotassium/index'),
96
+    //   name: 'index',
97
+    //   meta: {
98
+    //     title: '血钾',
99
+    //     noCache: true
100
+    //   }
101
+    // },
102
+    // {
103
+    //   path: '/Dialysisanalysis/albumin',
104
+    //   component: () => import('@/xt_pages/Dialysisanalysis/albumin/index'),
105
+    //   name: 'index',
106
+    //   meta: {
107
+    //     title: '白蛋白',
108
+    //     noCache: true
109
+    //   }
110
+    // },
111
+    // {
112
+    //   path: '/Dialysisanalysis/bloodPhosphorus',
113
+    //   component: () => import('@/xt_pages/Dialysisanalysis/bloodPhosphorus/index'),
114
+    //   name: 'index',
115
+    //   meta: {
116
+    //     title: '血磷',
117
+    //     noCache: true
118
+    //   }
119
+    // },
120
+    // {
121
+    //   path: '/Dialysisanalysis/calcium',
122
+    //   component: () => import('@/xt_pages/Dialysisanalysis/calcium/index'),
123
+    //   name: 'index',
124
+    //   meta: {
125
+    //     title: '钙',
126
+    //     noCache: true
127
+    //   }
128
+    // },
129
+    // {
130
+    //   path: '/Dialysisanalysis/platelets',
131
+    //   component: () => import('@/xt_pages/Dialysisanalysis/platelets/index'),
132
+    //   name: 'index',
133
+    //   meta: {
134
+    //     title: '血小板',
135
+    //     noCache: true
136
+    //   }
137
+    // },
138
+    // {
139
+    //   path: '/Dialysisanalysis/otherIndicators',
140
+    //   component: () => import('@/xt_pages/Dialysisanalysis/otherIndicators/index'),
141
+    //   name: 'index',
142
+    //   meta: {
143
+    //     title: '其他指标',
144
+    //     noCache: true
145
+    //   }
146
+    // },
147
+    // {
148
+    //   path: '/Dialysisanalysis/nonnumerical',
149
+    //   component: () => import('@/xt_pages/Dialysisanalysis/nonnumerical'),
150
+    //   name: 'nonnumerical',
151
+    //   meta: {
152
+    //     title: '非数值类的列表展示',
153
+    //     noCache: true
154
+    //   }
155
+    // },
156
+    // {
157
+    //   path: '/Dialysisanalysis/dialysis_index',
158
+    //   component: () => import('@/xt_pages/Dialysisanalysis/dialysis_index'),
159
+    //   name: 'dialysis_index',
160
+    //   meta: {
161
+    //     title: '透析指标详情',
162
+    //     noCache: true
163
+    //   }
164
+    // },
165
+
166
+
106 167
   ]
107 168
 }
108 169
 

+ 20 - 10
src/router/modules/device.js 查看文件

@@ -90,16 +90,16 @@ export default {
90 90
     },
91 91
 
92 92
 
93
-    {
94
-      path: '/infor/index',
95
-      component: () => import('@/xt_pages/infor/index'),
96
-      name: 'infor',
93
+    // {
94
+    //   path: '/infor/index',
95
+    //   component: () => import('@/xt_pages/infor/index'),
96
+    //   name: 'infor',
97 97
      
98
-      meta: {
99
-        title: 'infor',
100
-        noCache: true,
101
-      }
102
-    },
98
+    //   meta: {
99
+    //     title: 'infor',
100
+    //     noCache: true,
101
+    //   }
102
+    // },
103 103
 
104 104
     {
105 105
       path: '/device/waterformprint',
@@ -114,7 +114,17 @@ export default {
114 114
       }
115 115
     },
116 116
 
117
-  
117
+    {
118
+      path: '/device/objectRegistration',
119
+      component: () => import('@/xt_pages/device/objectRegistration'),
120
+      name: 'objectRegistration',
121
+      meta: {
122
+        title: 'objectRegistration',
123
+        noCache: true,
124
+
125
+      }
126
+    },
127
+
118 128
 
119 129
   ]
120 130
 }

+ 55 - 12
src/router/modules/dialysis.js 查看文件

@@ -56,6 +56,26 @@ export default {
56 56
         noCache: true
57 57
       }
58 58
     },
59
+    {
60
+      path: '/dialysis/longDoctorAdvice',
61
+      component: () => import('@/xt_pages/dialysis/longDoctorAdvice'),
62
+      name: '长期医嘱',
63
+      meta: {
64
+        title: '长期医嘱',
65
+        noCache: true
66
+      }
67
+    },
68
+    {
69
+      path: '/dialysis/doctorlongAdvicePrint',
70
+      component: () => import('@/xt_pages/dialysis/longDoctorAdvicePrint'),
71
+      name: '长期医嘱打印',
72
+      hidden: true,
73
+      is_menu: false,
74
+      meta: {
75
+        title: '长期医嘱打印',
76
+        noCache: true
77
+      }
78
+    },
59 79
     {
60 80
       path: '/dialysis/doctorAdvicePrint',
61 81
       component: () => import('@/xt_pages/dialysis/doctorAdvicePrint'),
@@ -103,6 +123,18 @@ export default {
103 123
       }
104 124
     },
105 125
 
126
+    {
127
+      path: '/dialysis/doctorLongNewAdvicePrint',
128
+      component: () => import('@/xt_pages/dialysis/doctorLongNewAdvicePrint'),
129
+      name: '透析医嘱统计打印',
130
+      hidden: true,
131
+      is_menu: false,
132
+      meta: {
133
+        title: '透析医嘱统计打印',
134
+        noCache: true
135
+      }
136
+    },
137
+
106 138
     {
107 139
       path: '/dialysis/signPrint',
108 140
       component: () => import('@/xt_pages/dialysis/signPrint'),
@@ -114,6 +146,17 @@ export default {
114 146
         noCache: true
115 147
       }
116 148
     },
149
+    {
150
+      path: '/dialysis/signLongPrint',
151
+      component: () => import('@/xt_pages/dialysis/longSignPrint'),
152
+      name: '标签打印',
153
+      hidden: true,
154
+      is_menu: false,
155
+      meta: {
156
+        title: '标签打印',
157
+        noCache: true
158
+      }
159
+    },
117 160
     {
118 161
       path: '/dialysis/consumableDrugs',
119 162
       component: () => import('@/xt_pages/dialysis/consumableDrugs'),
@@ -370,18 +413,18 @@ export default {
370 413
         noCache: true
371 414
       }
372 415
     },
373
-    {
374
-      path: '/dialysis/print/batch/sixtyFive',
375
-      component: () =>
376
-        import('@/xt_pages/dialysis/batch_print/batch_print_order_sixtyFive'),
377
-      hidden: true,
378
-      is_menu: false,
379
-      name: 'dialysis_batch_sixtyFive',
380
-      meta: {
381
-        title: '批量打印',
382
-        noCache: true
383
-      }
384
-    },
416
+    // {
417
+    //   path: '/dialysis/print/batch/sixtyFive',
418
+    //   component: () =>
419
+    //     import('@/xt_pages/dialysis/batch_print/batch_print_order_sixtyFive'),
420
+    //   hidden: true,
421
+    //   is_menu: false,
422
+    //   name: 'dialysis_batch_sixtyFive',
423
+    //   meta: {
424
+    //     title: '批量打印',
425
+    //     noCache: true
426
+    //   }
427
+    // },
385 428
     // {
386 429
     //   path: '/dialysis/print/batch/fiftythree',
387 430
     //   component: () =>

+ 19 - 0
src/router/modules/dialysisIndex.js 查看文件

@@ -0,0 +1,19 @@
1
+import Layout from '@/views/layout/Layout'
2
+
3
+export default {
4
+ 
5
+  path: '/dialysis_index',
6
+  component: Layout,
7
+  name:'dialysis_index',
8
+  redirct: '/dialysis/dialysisScheduleIndex',
9
+  children: [{
10
+    path: '/dialysis/dialysisScheduleIndex',
11
+    component: () => import('@/xt_pages/infor/index'),
12
+    name: '信息归档',
13
+    meta: {
14
+      title: '信息归档',
15
+      noCache: true
16
+    }
17
+  },]
18
+ 
19
+}

+ 2 - 1
src/router/modules/dialysisRecord.js 查看文件

@@ -13,5 +13,6 @@ export default {
13 13
       title: '透析记录',
14 14
       noCache: true
15 15
     }
16
-  },]
16
+  },],
17
+  
17 18
 }

+ 5 - 0
src/router/modules/hospitalRecord.js 查看文件

@@ -17,6 +17,11 @@ export default {
17 17
       component: () => import('@/xt_pages/hospitalStation/index'),
18 18
       name: 'hospitalIndex',
19 19
       meta: { title: 'hospitalIndex', noCache: true }
20
+    }, {
21
+      path: '/hospitalRecord/history',
22
+      component: () => import('@/xt_pages/hospitalStation/inHospitalHistory'),
23
+      name: 'hospitalhistory',
24
+      meta: { title: 'hospitalhistory', noCache: true }
20 25
     },
21 26
 
22 27
   ]

+ 12 - 0
src/router/modules/workforce.js 查看文件

@@ -167,6 +167,18 @@ export default {
167 167
       noCache: true
168 168
     }
169 169
   },
170
+
171
+  {
172
+    path: '/scheduleTablePrintThree',
173
+    component: () => import('@/xt_pages/workforce/scheduleTablePrintThree'),
174
+    name: 'scheduleTablePrintThree',
175
+    hidden: true,
176
+    is_menu: false,
177
+    meta: {
178
+      title: 'scheduleTablePrintThree',
179
+      noCache: true
180
+    }
181
+  },
170 182
   // {
171 183
   //   path: '/historyWeekTable',
172 184
   //   component: () => import('@/xt_pages/workforce/historyWeekTable'),

+ 2 - 2
src/utils/data.js 查看文件

@@ -6,7 +6,7 @@ export function getDataConfig(module, field) {
6 6
   if (moduleConfig == undefined) {
7 7
     return false
8 8
   }
9
-  if (module === 'summary' || module === 'education' || module === 'nursing_record' || module === 'special_record' || module == 'dialysis_remark' || module=='catheter_operation') {
9
+  if (module === 'summary' || module === 'education' || module === 'nursing_record' || module === 'special_record' || module == 'dialysis_remark' || module=='catheter_operation' || module=='befor_symptoms') {
10 10
     var Aresult = []
11 11
     for (var j = 0; j < moduleConfig.length; j++) {
12 12
       var Atemp = []
@@ -43,7 +43,7 @@ export function getDictionaryDataConfig(module, field) {
43 43
   if (moduleConfig == undefined) {
44 44
     return false
45 45
   }
46
-  if (module === 'summary' || module === 'education' || module === 'nursing_record' || module === 'special_record') {
46
+  if (module === 'summary' || module === 'education' || module === 'nursing_record' || module === 'special_record'|| module=='befor_symptoms') {
47 47
     var Aresult = []
48 48
     for (var j = 0; j < moduleConfig.length; j++) {
49 49
       var Atemp = []

+ 1 - 1
src/views/layout/Layout.vue 查看文件

@@ -134,7 +134,7 @@ export default {
134 134
   created(){
135 135
     let menzhen = ['hospitalStation',"hospitalRecord","hospitalCharges","DepositManagement","hisTool",'outpatientRegistration','outpatientDoctorStation','outpatientCharges','outpatientPharmacy','outpatientRecord'];
136 136
     let bingli = ['User','createPatient'];
137
-    let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control','Dialysisanalysis'];
137
+    let touxi = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
138 138
     let kucun = ['stockManage','stockDrugs','selfPreparedMedicine','inventoryTransfer','wareHouseManage','otherManagement'];
139 139
     let caigou = ['supplyManage','supplyList'];
140 140
     let peizhi = ['system','roleManage','DepartManage', 'bedManagement', 'dictionaryManagement', 'templateManagement','showconfig','printTemplate','integration_config','basicConfig'];

+ 2 - 2
src/views/layout/components/Sidebar/index.vue 查看文件

@@ -48,7 +48,7 @@ export default {
48 48
   },
49 49
   created(){
50 50
     if(this.navTitle == '透析管理'){
51
-      let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
51
+      let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control','dialysis_index','Dialysisanalysis'];
52 52
       // console.log('permission_routers',this.permission_routers)
53 53
       let routerArr = [];
54 54
       this.permission_routers.map(item => {
@@ -120,7 +120,7 @@ export default {
120 120
             this.$emit('func',a)
121 121
           }
122 122
         }else if(newVal == '透析管理'){
123
-          let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control'];
123
+          let nameArr = ['home','workforce', 'dialysisrecord', 'dialysis', 'medicalScheduling', 'signIndex', 'qcd', 'device', 'quality_control','Dialysisanalysis'];
124 124
           // console.log('permission_routers',this.permission_routers)
125 125
           let routerArr = [];
126 126
           this.permission_routers.map(item => {

+ 9 - 9
src/xt_pages/Dialysisanalysis/albumin/albuminall.vue 查看文件

@@ -27,9 +27,9 @@
27 27
             </div>
28 28
             <el-button type="primary">查询</el-button>
29 29
         </div> -->
30
-        
30
+
31 31
         <el-row :gutter="20">
32
-        <el-col :span="5"> 
32
+        <el-col :span="5">
33 33
           <div class="block">
34 34
             <span>查询时间:</span>
35 35
             <el-date-picker
@@ -63,7 +63,7 @@
63 63
             <el-button type="primary">查询</el-button>
64 64
         </el-col>
65 65
         </el-row>
66
-        
66
+
67 67
         <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68 68
           <p class="chartTitle">统计图</p>
69 69
         </div>
@@ -82,7 +82,7 @@
82 82
                 </el-table-column>
83 83
                 <el-table-column
84 84
                     prop="name"
85
-                    
85
+
86 86
                     label="人数"
87 87
                     >
88 88
                 </el-table-column>
@@ -104,7 +104,7 @@
104 104
 import * as echarts from "echarts";
105 105
 export default{
106 106
     props: {
107
-   
107
+
108 108
     width: {
109 109
       type: String,
110 110
       default: "100%"
@@ -113,7 +113,7 @@ export default{
113 113
       type: String,
114 114
       default: "400px"
115 115
     },
116
-    
116
+
117 117
   },
118 118
     data() {
119 119
         return {
@@ -135,7 +135,7 @@ export default{
135 135
           value: 157,
136 136
           name: "达标值患者"
137 137
         },
138
-            
138
+
139 139
             ],
140 140
             pieName: [],
141 141
             // myChartStyle:{float: "right", width: "100%", height: "400px"},
@@ -181,7 +181,7 @@ export default{
181 181
                     color : "black"
182 182
                 }
183 183
               }
184
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
184
+              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
185 185
             },
186 186
             radius: "65%", //饼图半径
187 187
             data: this.pieData,
@@ -251,4 +251,4 @@ export default{
251 251
     justify-content: space-around;
252 252
     color: #1e5feb;
253 253
 }
254
-</style>
254
+</style>

+ 627 - 199
src/xt_pages/Dialysisanalysis/albumin/albuminalone.vue 查看文件

@@ -1,218 +1,646 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       
52
-       <div >
53
-        <el-row :gutter="20">
54
-            <el-col :span="4">
55
-              <div class="grid-content bg-purple">
56
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
57
-                
58
-                <el-table
59
-                :data="tableData"
60
-                border
61
-                style="width: 100%">
62
-                    <el-table-column
63
-                        align="center"
64
-                        prop="date"
65
-                        label="透析号"
66
-                       >
67
-                    </el-table-column>
68
-                    <el-table-column
69
-                        align="center"
70
-                        prop="name"
71
-                        label="姓名"
72
-                        >
73
-                    </el-table-column>
74
-                </el-table>
75
-              </div>
76
-            </el-col>
77
-            <el-col :span="19">
78
-               <div class="grid-content bg-purple">
79
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
80
-                <el-table
81
-                    :data="tableData"
82
-                    style="width: 100%"
83
-                    border
84
-                    align="center"
85
-                    max-height="250">
86
-                    <el-table-column
87
-                    fixed
88
-                    prop="date"
89
-                    label="姓名"
90
-                   >
91
-                    </el-table-column>
92
-                    <el-table-column
93
-                    prop="name"
94
-                    label="检查日期"
95
-                    >
96
-                    </el-table-column>
97
-                    <el-table-column
98
-                    prop="province"
99
-                    label="白蛋白(g/L)"
100
-                    >
101
-                    </el-table-column>
102
-                    
103
-                </el-table>
104
-               </div>
105
-           </el-col>
106
-        </el-row>
107
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
108 106
 
107
+                <el-table-column width="100" label="白蛋白" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
109 119
     </div>
120
+  </div>
110 121
 </template>
122
+
123
+
111 124
 <script>
112
-  import * as echarts from 'echarts'
113
-export default{
114
-    // props: {
115
-    //     width: {
116
-    //         type: String,
117
-    //         default: "100%"
118
-    //     },
119
-    //     height: {
120
-    //         type: String,
121
-    //         default: "400px"
122
-    //     },
123
-    
124
-    // },
125
-    data() {
126
-        return {
127
-            inputValue:'',
128
-            stat_time:'',
129
-            end_time:'',
130
-            value:'',
131
-            myChart: {},
132
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
133
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
134
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
135
-            tableData:[],
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
136 147
         }
137
-    },
138
-    created(){
139
-        
140
-    },
141
-    mounted() {
142
-        // this.$nextTick(function() {
143
-            this.initEcharts();
144
-		// })  
145
-        // this.myChart = echarts.init(document.getElementById("germychart"));
146
-        //     this.myChart.setOption(option);
147
-            //随着屏幕大小调节图表
148
-            window.addEventListener("resize", () => {
149
-                this.myChart.resize();
150
-            });
151
-    },
152
-    methods:{
153
-        handleSubmit(){
154
-            console.log('asdfa');
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1
163
+      },
164
+      crumbs: [
165
+        { path: false, name: '科室质控' },
166
+        { path: false, name: '指标评估统计' },
167
+        { path: false, name: '透析过程指标统计' }
168
+      ],
169
+      tableData1: [],
170
+      chart: {
171
+        title: {
172
+          text: 'ECharts 入门示例'
155 173
         },
156
-        initEcharts() {
157
-            const option = {
158
-                xAxis: {
159
-                    type: 'category',
160
-                        boundaryGap:true,
161
-                        axisTick:{
162
-                            alignWithLabel:true //保证刻度线和标签对齐
163
-                        },
164
-                    data: this.xData,
165
-                    splitNumber:this.xData.length, //纵坐标数
166
-                    interval:this.xData //强制设置坐标轴分割间隔
167
-                },
168
-                yAxis: {
169
-                    type: 'value',
170
-                    boundaryGap: true,
171
-                    splitNumber:4, //纵坐标数
172
-                    interval:10 //强制设置坐标轴分割间隔
174
+        tooltip: {},
175
+        legend: {
176
+          data: [],
177
+          left: 0
178
+        },
179
+        xAxis: {
180
+          data: []
181
+        },
182
+        yAxis: {
183
+          axisLabel: {
184
+            formatter: '{value} %'
185
+          },
186
+          show: false
187
+        },
188
+        series: [
189
+          {
190
+            name: '',
191
+            type: 'line',
192
+            data: [],
193
+            barWidth: 30,
194
+            label: {
195
+              normal: {
196
+                show: true,
197
+                position: 'top',
198
+                formatter: (params) => {
199
+                  if(this.percent.length > 0){
200
+                    let str = ''
201
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
202
+                    return str
203
+                  }else{
204
+                    let str = ''
205
+                    str = params.data
206
+                    return str
207
+                  }
208
+                }
209
+              }
210
+            },
211
+            //配置样式
212
+            itemStyle: {
213
+              //通常情况下:
214
+
215
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
216
+              normal: {
217
+                color: function(params) {
218
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
219
+                  var colorList = [
220
+                    ['#A9E0F3', '#9FBDFC'],
221
+
222
+                    ['#FFD7C0', '#FF9994']
223
+                  ]
224
+
225
+                  var index = params.dataIndex
226
+                  if (params.dataIndex >= colorList.length) {
227
+                    index = params.dataIndex % colorList.length
228
+                  }
229
+
230
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
231
+                    { offset: 0, color: colorList[index][0] },
232
+                    // { offset: 0.5, color: colorList[index][1] },
233
+                    { offset: 1, color: colorList[index][1] }
234
+                  ])
173 235
                 },
174
-                legend: {
175
-                    show: true,
176
-                    align:'left',//文字在前图标在后
177
-                    left:'15%',
178
-                    top:'5%',
179
-                    data: [{name:'白蛋白g/L'}]
236
+                lineStyle:{
237
+                  color:'#409eff' //改变折线颜色
180 238
                 },
181
-                series: [
182
-                {
183
-                    data: this.opinionData,
184
-                    name:'白蛋白g/L',
185
-                    type: "line",// 类型设置为折线图
186
-                    symbol: 'circle',
187
-                    itemStyle: {
188
-                        normal: {
189
-                            color: '#409eff', //改变折线点的颜色#a80000
190
-                            lineStyle: {
191
-                                color: '#409eff' //改变折线颜色
192
-                            }
193
-                        }
194
-                    },
239
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
240
+              },
195 241
 
196
-                },
197
-                
198
-                ],
199
-                
200
-            };
201
-            this.myChart = echarts.init(document.getElementById("germychart"));
202
-            this.myChart.setOption(option);
203
-            //随着屏幕大小调节图表
204
-            window.addEventListener("resize", () => {
205
-                this.myChart.resize();
206
-            });
242
+              //鼠标悬停时:
243
+              emphasis: {
244
+                shadowBlur: 10,
245
+                shadowOffsetX: 0,
246
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
247
+              }
248
+            }
249
+          }
250
+        ],
251
+        dataZoom: [
252
+          {
253
+            // Y轴固定,让内容滚动
254
+            type: 'slider',
255
+            show: false,
256
+            xAxisIndex: [0],
257
+            start: 1,
258
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
259
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
260
+          },
261
+          {
262
+            type: 'inside',
263
+            xAxisIndex: [0],
264
+            start: 1,
265
+            end: 20,
266
+            zoomLock: true // 锁定区域禁止缩放
267
+          }
268
+        ]
269
+      },
270
+      bar: {
271
+        title: {
272
+          text: 'ECharts 入门示例'
207 273
         },
274
+        tooltip: {},
275
+        legend: {
276
+          data: [],
277
+          left: 0
278
+        },
279
+        xAxis: {
280
+          data: []
281
+        },
282
+        yAxis: {
283
+          axisLabel: {
284
+            formatter: '{value} %'
285
+          },
286
+          show: false
287
+        },
288
+        series: [
289
+          {
290
+            name: '',
291
+            type: 'bar',
292
+            data: [],
293
+            barWidth: 30,
294
+            label: {
295
+              normal: {
296
+                show: true,
297
+                position: 'top',
298
+                formatter: (params) => {
299
+                  if(this.percent.length > 0){
300
+                    let str = ''
301
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
302
+                    return str
303
+                  }else{
304
+                    let str = ''
305
+                    str = params.data
306
+                    return str
307
+                  }
308
+                }
309
+              }
310
+            },
311
+            //配置样式
312
+            itemStyle: {
313
+              //通常情况下:
314
+
315
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
316
+              normal: {
317
+                color: function(params) {
318
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
319
+                  var colorList = [
320
+                    ['#A9E0F3', '#9FBDFC'],
321
+                    ['#FFD7C0', '#FF9994']
322
+                  ]
323
+
324
+                  var index = params.dataIndex
325
+                  if (params.dataIndex >= colorList.length) {
326
+                    index = params.dataIndex % colorList.length
327
+                  }
328
+
329
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
330
+                    { offset: 0, color: colorList[index][0] },
331
+                    // { offset: 0.5, color: colorList[index][1] },
332
+                    { offset: 1, color: colorList[index][1] }
333
+                  ])
334
+                },
335
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
336
+              },
337
+
338
+              //鼠标悬停时:
339
+              emphasis: {
340
+                shadowBlur: 10,
341
+                shadowOffsetX: 0,
342
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
343
+              }
344
+            }
345
+          }
346
+        ]
347
+      }
348
+
349
+    }
350
+  },
351
+  methods: {
352
+    printAction(){
353
+      this.$router.push({
354
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355
+      });
356
+
357
+    },exportAction(){
358
+      let list = []
359
+      for (let i = 0; i < this.tableData.length; i++) {
360
+        let order = this.tableData[i]
361
+        let name = order.name
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
364
+
365
+        let obj = {
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
369
+        }
370
+        list.push(obj)
371
+      }
372
+      import('@/vendor/Export2Excel').then(excel => {
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
375
+        const data = this.formatJson(filterVal, list)
376
+        excel.export_json_to_excel1({
377
+          header: tHeader,
378
+          data,
379
+          filename: '明细',
380
+          ref: this.$refs['table'].$el
381
+        })
382
+      })
383
+    },
384
+    changeProject(val) {
385
+      this.query.statistics_type = val
386
+      this.query.page = 1
387
+      this.GetPersonQCStatistisData(this.query)
388
+      this.GetInspectionCheckIndexTableData(this.query)
389
+
390
+    },
391
+    handleChange(val) {
392
+      this.query.patient_id = val.id
393
+      this.query.page = 1
394
+      this.patient_name = val.name
395
+      this.GetPersonQCStatistisData(this.query)
396
+      this.GetInspectionCheckIndexTableData(this.query)
397
+    },
398
+    handleSizeChange(limit) {
399
+      this.query.limit = limit
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleCurrentChange(page) {
404
+      this.query.page = page
405
+      this.GetPersonQCStatistisData(this.query)
406
+    },formatJson(filterVal, jsonData) {
407
+      return jsonData.map(v => filterVal.map(j => v[j]))
408
+    },
409
+    changeTime(val) {
410
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
411
+      if (time > 0) {
412
+        this.$message.error('结束时间不能小于开始时间')
413
+        this.query.start_time = ''
414
+      } else {
415
+        // this.getDialysisList()
416
+        this.query.page = 1
417
+        this.GetPersonQCStatistisData(this.query)
418
+        this.GetInspectionCheckIndexTableData(this.query)
419
+
420
+      }
421
+
422
+    },
423
+    changeEndTime(val) {
424
+      var time =
425
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
426
+      if (time < 0) {
427
+        this.$message.error('结束时间不能小于开始时间')
428
+        this.query.end_time = ''
429
+      } else {
430
+        this.query.page = 1
431
+        this.GetPersonQCStatistisData(this.query)
432
+        this.GetInspectionCheckIndexTableData(this.query)
433
+
434
+      }
435
+    },
436
+    getTimestamp(time) {
437
+      // 把时间日期转成时间戳
438
+      return new Date(time).getTime() / 1000
439
+    },
440
+    QueryOperaById: function(val) {
441
+      let vascular_access_desc_name = ''
442
+      let vascular_access_desc = getDataConfig(
443
+        'hemodialysis',
444
+        'vascular_access_desc'
445
+      )
446
+      for (let i = 0; i < vascular_access_desc.length; i++) {
447
+        if (vascular_access_desc[i].id == val) {
448
+          vascular_access_desc_name = vascular_access_desc[i].name
449
+        }
450
+      }
451
+
452
+      return vascular_access_desc_name
208 453
     },
209
-    
454
+    GetAnticoagulantById: function(val) {
455
+      let anticoagulan_name = ''
456
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
457
+      let anticoagulant = anticoagulantsConfitTwo
458
+      for (let keys in anticoagulant) {
459
+        if (anticoagulant[keys].id == val) {
460
+          anticoagulan_name = anticoagulant[keys].name
461
+        }
462
+      }
463
+      return anticoagulan_name
464
+    },
465
+    getModeName(mode_id) {
466
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
467
+    },  getTime(val) {
468
+      if(val == "" || val == undefined){
469
+        return ""
470
+      }else {
471
+        return uParseTime(val, '{y}-{m}-{d}')
472
+      }
473
+    },
474
+    GetInspectionCheckIndexTableData(params) {
475
+      this.loading = true
476
+      GetPersonQCStatistisData(params)
477
+        .then(rs => {
478
+          var resp = rs.data
479
+          console.log("resp=====",resp)
480
+          if (resp.state == 1) {
481
+            this.loading = false
482
+            this.tableData = []
483
+            for (let i = 0; i < resp.data.inspections.length; i++) {
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
490
+            }
491
+            this.total = resp.data.total
492
+
493
+          } else {
494
+            this.loading = false
495
+          }
496
+        })
497
+        .catch(error => {
498
+
499
+        })
500
+    },
501
+    GetPersonQCStatistisData(params) {
502
+      this.chart.xAxis.data = []
503
+      this.chart.series[0].data = []
504
+      this.bar.xAxis.data = []
505
+      this.bar.series[0].data = []
506
+      this.percent = []
507
+      GetPersonQCStatistisData(params)
508
+        .then(rs => {
509
+          var resp = rs.data
510
+          if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
512
+            for (let i = 0; i < resp.data.inspections.length; i++) {
513
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+            }
516
+            console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
519
+            this.getArrLength(this.chart.xAxis.data,1)
520
+          } else {
521
+
522
+          }
523
+        })
524
+        .catch(error => {
525
+        })
526
+    },
527
+    handleSelect(val) {
528
+      this.query.patient_id = val.id
529
+      this.query.page = 1
530
+      this.patient_name = val.name
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
+      }
536
+
537
+
538
+    },
539
+    querySearchAsync(keyword, cb) {
540
+      let key = ''
541
+      if (keyword != undefined) {
542
+        key = keyword
543
+      }
544
+      let searchArray = []
545
+      PostSearch(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          searchArray = response.data.data.patient
548
+          cb(searchArray)
549
+        } else {
550
+          cb([])
551
+        }
552
+      })
553
+    },
554
+    chooseWay(way) {
555
+      this.wayType = way
556
+    }, getCurrentOrgPatients() {
557
+      getCurrentOrgPatients().then(response => {
558
+        if (response.data.state == 1) {
559
+          var patients = response.data.data.patients
560
+          this.patientsData = patients
561
+          this.GetDefaultPatient()
562
+        }
563
+      })
564
+    }, GetDefaultPatient() {
565
+      GetDefaultPatient().then(response => {
566
+        if (response.data.state == 1) {
567
+          var patient = response.data.data.patient
568
+          for (let i = 0;i < this.patientsData.length; i++){
569
+            if (this.patientsData[i].id == patient.id){
570
+              this.patient_name = this.patientsData[i].name
571
+              this.$refs.table.setCurrentRow(this.patientsData[i])
572
+            }
573
+          }
574
+          this.query.patient_id = patient.id
575
+          this.GetPersonQCStatistisData(this.query)
576
+
577
+        }
578
+      })
579
+
580
+    },
581
+    getArrLength(result,type){
582
+      if(type == 1){
583
+        if(result.length > 10){
584
+          var dataZoom_end = (10/result.length)*100;
585
+          this.chart.dataZoom[0].end = dataZoom_end
586
+        }else{
587
+          var dataZoom_end = 100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }
590
+      }else if(type == 2){
591
+        if(result.length > 10){
592
+          var dataZoom_end = (10/result.length)*100;
593
+          this.bar.dataZoom[0].end = dataZoom_end
594
+        }else{
595
+          var dataZoom_end = 100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }
598
+      }
599
+
600
+    }
601
+  }, mounted() {
602
+    var date = new Date()
603
+    var year = date.getFullYear() //获取完整的年份(4位)
604
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
605
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
606
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
607
+    this.query.patient_id = 0
608
+    this.query.end_time = year + '-' + month + '-' + day
609
+    this.query.start_time = year + '-' + last_month + '-' + day
610
+    this.query.project_id = 2
611
+    this.query.item_id = 35
612
+    this.getCurrentOrgPatients()
613
+
614
+    // this.GetPersonQCStatistisData()
615
+
616
+
617
+  }
210 618
 }
211 619
 </script>
620
+
212 621
 <style lang="scss" scoped>
213
-.content_top{
214
-    display: flex;
215
-    justify-content: space-around;
216
-    margin-bottom: 20px;
622
+.tableTitle {
623
+  font-size: 16px;
624
+  color: #000;
625
+  font-weight: bold;
626
+  margin-bottom: 10px;
627
+}
628
+</style>
629
+<style lang="scss">
630
+.page_process {
631
+.el-tabs{
632
+  margin-bottom:0 !important;
633
+}
634
+.el-button--medium {
635
+  padding: 10px 8px;
636
+}
637
+
638
+.el-form-item {
639
+  margin-bottom: 0;
640
+}
641
+::-webkit-scrollbar{
642
+  height: 15px !important;
643
+}
644
+
217 645
 }
218
-</style>
646
+</style>

+ 334 - 227
src/xt_pages/Dialysisanalysis/bloodPhosphorus/phosphorusall.vue 查看文件

@@ -1,262 +1,369 @@
1 1
 <template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-        <el-row :gutter="20">
31
-        <el-col :span="5"> 
32
-          <div class="block">
33
-            <span>查询时间:</span>
34
-            <el-date-picker
35
-            v-model="time_month"
36
-            type="month"
37
-            placeholder="选择月">
38
-            </el-date-picker>
39
-          </div>
40
-        </el-col>
41
-        <el-col :span="8">
42
-          <div>
43
-            <el-date-picker
44
-            v-model="stat_time"
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
45 26
             type="date"
27
+
46 28
             placeholder="选择日期">
47
-            </el-date-picker>
48
-            <span>-</span>
49
-            <el-date-picker
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
50 33
             v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
51 36
             type="date"
52 37
             placeholder="选择日期">
53
-            </el-date-picker>
54
-          </div>
55
-        </el-col>
56
-        <el-col :span="3">
57
-          <div style="width: 200px;">
58
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
59
-          </div>
60
-        </el-col>
61
-        <el-col :span="2">
62
-            <el-button type="primary">查询</el-button>
63
-        </el-col>
64
-        </el-row>
65
-        
66
-        
67
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-          <p class="chartTitle">统计图</p>
38
+          </el-date-picker>
69 39
         </div>
70
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-        <div style="width: 80%;margin: auto;">
72
-            <el-table
73
-            :data="tableData"
74
-            :show-summary = true
75
-            border
76
-            style="width: 100%;">
77
-                <el-table-column
78
-                    prop="date"
79
-                    align="center"
80
-                    label="血磷"
81
-                    >
82
-                </el-table-column>
83
-                <el-table-column
84
-                    prop="name"
85
-                    
86
-                    label="人数"
87
-                    >
88
-                </el-table-column>
89
-                <el-table-column
90
-                    prop="address"
91
-                    align="center"
92
-                    label="操作">
93
-                    <template slot-scope="scope">
94
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                                type="text" >查看详情
96
-                        </el-button>
97
-                    </template>
98
-                </el-table-column>
99
-            </el-table>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
100 44
         </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="血磷"
63
+
64
+        >
65
+        </el-table-column>
66
+        <el-table-column
67
+          prop="count"
68
+          label="人数"
69
+        >
70
+        </el-table-column>
71
+<!--        <el-table-column-->
72
+<!--          prop="address"-->
73
+<!--          align="center"-->
74
+<!--          label="操作">-->
75
+<!--          <template slot-scope="scope">-->
76
+<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
77
+<!--                       type="text">查看详情-->
78
+<!--            </el-button>-->
79
+<!--          </template>-->
80
+<!--        </el-table-column>-->
81
+      </el-table>
101 82
     </div>
83
+  </div>
102 84
 </template>
103 85
 <script>
104
-import * as echarts from "echarts";
105
-export default{
106
-    props: {
107
-   
86
+import * as echarts from 'echarts'
87
+import { GetQCStatistisData } from '../../../api/qcd'
88
+
89
+const moment = require('moment')
90
+
91
+export default {
92
+  props: {
93
+
108 94
     width: {
109 95
       type: String,
110
-      default: "100%"
96
+      default: '100%'
111 97
     },
112 98
     height: {
113 99
       type: String,
114
-      default: "400px"
115
-    },
116
-    
100
+      default: '400px'
101
+    }
102
+
117 103
   },
118
-    data() {
119
-        return {
120
-            time_month:'',
121
-            stat_time:'',
122
-            end_time:'',
123
-            input:'',
124
-            myChart: {},
125
-            pieData : [
126
-            {
127
-          value: 463,
128
-          name: "不达标值患者"
129
-        },
130
-        {
131
-          value: 395,
132
-          name: "未检查患者"
133
-        },
134
-        {
135
-          value: 157,
136
-          name: "达标值患者"
137
-        },
138
-        // {
139
-        //   value: 149,
140
-        //   name: "广东"
141
-        // },
142
-        // {
143
-        //   value: 147,
144
-        //   name: "湖南"
145
-        // }
146
-            
147
-            ],
148
-            pieName: [],
149
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
150
-            tableData:[],
151
-        }
152
-    },
153
-    mounted() {
154
-    this.initDate(); //数据初始化
155
-    this.initEcharts();
104
+  data() {
105
+    return {
106
+      time_type: 1,
107
+      times: [
108
+        { value: 1, label: '本月' },
109
+        { value: 2, label: '上月' },
110
+        { value: 3, label: '今年' },
111
+        { value: 4, label: '上一年' },
112
+        { value: 5, label: '第一季度' },
113
+        { value: 6, label: '第二季度' },
114
+        { value: 7, label: '第三季度' },
115
+        { value: 8, label: '第四季度' },
116
+        { value: 9, label: '自定义' }
117
+
118
+      ],
119
+      time_month: '',
120
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
121
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
122
+      input: '',
123
+      myChart: {},
124
+      pieData: [],
125
+      pieName: [],
126
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
127
+      tableData: [],
128
+      reference:{},
129
+    }
130
+  },
131
+  mounted() {
132
+    this.getData()
156 133
   },
157 134
   methods: {
158
-    initDate() {
159
-      for (let i = 0; i < this.pieData.length; i++) {
160
-        this.pieName[i] = this.pieData[i].name;
135
+    getData() {
136
+      if(this.start_time.length == 0){
137
+        this.$message.error("请选择开始时间")
161 138
       }
162
-    },
163
-    initEcharts() {
164
-      // 饼图
165
-      const option = {
166
-        legend: {
167
-          // 图例
168
-          data: this.pieName,
169
-          left: "10%",
170
-          top: "30%",
171
-          orient: "vertical"
172
-        },
173
-        color:['#ff7f9f','#fff67f','#1e5feb'],
174
-        title: {
175
-          // 设置饼图标题,位置设为顶部居中
176
-        //   text: "国内院士前五省份图示",
177
-          top: "0%",
178
-          left: "center"
179
-        },
180
-        series: [
181
-          {
182
-            type: "pie",
183
-            label: {
184
-              normal : {
185
-                formatter: '{b}:{c}: ({d}%)',
186
-                textStyle : {
187
-                    fontWeight : 'normal',
188
-                    fontSize : 15,
189
-                    color : "black"
190
-                }
191
-              }
192
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
139
+      if(this.end_time.length == 0){
140
+        this.$message.error("请选择结束时间")
141
+      }
142
+      let params = {
143
+        start_date: this.start_time,
144
+        end_date: this.end_time,
145
+        project_id: 4,
146
+        item_id: 169
147
+      }
148
+      this.pieData = []
149
+      this.tableData = []
150
+      console.log("~~~~~~~~~~")
151
+      GetQCStatistisData(params).then(response => {
152
+        if (response.data.state == 1) {
153
+          this.reference =  response.data.data.reference
154
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
155
+          let objone = {
156
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
157
+            name: '不达标值患者',
158
+            count:response.data.data.unusual_total,
159
+          }
160
+          this.pieData.push(objone)
161
+          this.tableData.push(objone)
162
+
163
+          let objtwo = {
164
+            value:   response.data.data.normal_total / response.data.data.patient_count,
165
+            name: '达标值患者',
166
+            count:response.data.data.normal_total,
167
+
168
+          }
169
+          this.pieData.push(objtwo)
170
+          this.tableData.push(objtwo)
171
+
172
+          let objthree = {
173
+            value: response.data.data.patient_count / response.data.data.no_check_total,
174
+            name: '未检查患者',
175
+            count:response.data.data.no_check_total,
176
+
177
+          }
178
+          this.pieData.push(objthree)
179
+          this.tableData.push(objthree)
180
+
181
+          let objfour = {
182
+            value: response.data.data.patient_count,
183
+            name: '合计',
184
+            count:response.data.data.patient_count,
185
+          }
186
+          this.tableData.push(objfour)
187
+          for (let i = 0; i < this.pieData.length; i++) {
188
+            this.pieName[i] = this.pieData[i].name
189
+          }
190
+          this.myChart = echarts.init(document.getElementById('mychart'))
191
+          window.addEventListener('resize', () => {
192
+            this.myChart.resize()
193
+          })
194
+          const option = {
195
+            legend: {
196
+              // 图例
197
+              data: this.pieName,
198
+              left: '10%',
199
+              top: '30%',
200
+              orient: 'vertical'
201
+            },
202
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
203
+            title: {
204
+              // 设置饼图标题,位置设为顶部居中
205
+              //   text: "国内院士前五省份图示",
206
+              top: '0%',
207
+              left: 'center'
193 208
             },
194
-            radius: "65%", //饼图半径
195
-            data: this.pieData,
196
-            itemStyle : {
197
-              emphasis: {
198
-                  shadowBlur: 10,
199
-                  shadowOffsetX: 0,
200
-                  shadowColor: 'rgba(0, 0, 0, 0.5)'
209
+            series: [
210
+              {
211
+                type: 'pie',
212
+                label: {
213
+                  show: true,
214
+                  formatter: '{b} : {d}% ({c})'
215
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
216
+                },
217
+                radius: '65%', //饼图半径
218
+                data: this.pieData
201 219
               }
202
-            }
220
+            ]
203 221
           }
204
-        ]
205
-      };
206
-    //   console.log(this.seriesData);
207
-      const optionFree = {
208
-        series: [
209
-          {
210
-            data: this.seriesData,
211
-            type: "line",
212
-            smooth: true
222
+          //   console.log(this.seriesData);
223
+          const optionFree = {
224
+            series: [
225
+              {
226
+                data: this.seriesData,
227
+                type: 'line',
228
+                smooth: true
229
+              }
230
+            ]
213 231
           }
214
-        ]
215
-      };
216
-      this.myChart = echarts.init(document.getElementById("mychart"));
217
-      this.myChart.setOption(option);
218
-      //随着屏幕大小调节图表
219
-      window.addEventListener("resize", () => {
220
-        this.myChart.resize();
221
-      });
232
+          this.myChart = echarts.init(document.getElementById('mychart'))
233
+          this.myChart.setOption(option)
234
+        } else {
235
+          this.$message.error(response.data.msg)
236
+        }
237
+      })
238
+
239
+    },
240
+    changeItem(val) {
241
+      const currentDate = new Date()
242
+      switch (val) {
243
+        case 1:
244
+
245
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
246
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
247
+
248
+          this.start_time = startOfMonth
249
+          this.end_time = endOfMonth
250
+          this.getData()
251
+
252
+          break
253
+        case 2:
254
+          // 上月的起始日期和结束日期
255
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
256
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
257
+
258
+          this.start_time = startOfLastMonth
259
+          this.end_time = endOfLastMonth
260
+          this.getData()
261
+
262
+          break
263
+        case 3:
264
+          // 今年的起始日期和结束日期
265
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
266
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
267
+
268
+          this.start_time = startOfYear
269
+          this.end_time = endOfYear
270
+          this.getData()
271
+
272
+          break
273
+        case 4:
274
+          // 上一年的起始日期和结束日期
275
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
276
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
277
+
278
+          this.start_time = startOfLastYear
279
+          this.end_time = endOfLastYear
280
+          this.getData()
281
+
282
+          break
283
+        case 5:
284
+          // 第一季度的起始日期和结束日期
285
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
286
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
287
+
288
+          this.start_time = startOfFirstQuarter
289
+          this.end_time = endOfFirstQuarter
290
+          this.getData()
291
+
292
+          break
293
+        case 6:
294
+          // 第二季度的起始日期和结束日期
295
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
296
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
297
+
298
+          this.start_time = startOfSecondQuarter
299
+          this.end_time = endOfSecondQuarter
300
+          this.getData()
301
+
302
+          break
303
+        case 7:
304
+          // 第三季度的起始日期和结束日期
305
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
306
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
307
+
308
+          this.start_time = startOfThirdQuarter
309
+          this.end_time = endOfThirdQuarter
310
+          this.getData()
311
+
312
+          break
313
+        case 8:
314
+          // 第四季度的起始日期和结束日期
315
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
316
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
317
+
318
+          this.start_time = startOfFourthQuarter
319
+          this.end_time = endOfFourthQuarter
320
+          this.getData()
321
+          break
322
+        case 9:
323
+          this.start_time = ''
324
+          this.end_time = ''
325
+          break
326
+      }
222 327
     },
328
+
329
+
223 330
     getSummaries(param) {
224
-        const { columns, data } = param;
225
-        const sums = [];
226
-        columns.forEach((column, index) => {
227
-          if (index === 0) {
228
-            sums[index] = '总价';
229
-            return;
230
-          }
231
-          const values = data.map(item => Number(item[column.property]));
232
-          if (!values.every(value => isNaN(value))) {
233
-            sums[index] = values.reduce((prev, curr) => {
234
-              const value = Number(curr);
235
-              if (!isNaN(value)) {
236
-                return prev + curr;
237
-              } else {
238
-                return prev;
239
-              }
240
-            }, 0);
241
-            sums[index] += ' 元';
242
-          } else {
243
-            sums[index] = 'N/A';
244
-          }
245
-        });
331
+      const { columns, data } = param
332
+      const sums = []
333
+      columns.forEach((column, index) => {
334
+        if (index === 0) {
335
+          sums[index] = '总价'
336
+          return
337
+        }
338
+        const values = data.map(item => Number(item[column.property]))
339
+        if (!values.every(value => isNaN(value))) {
340
+          sums[index] = values.reduce((prev, curr) => {
341
+            const value = Number(curr)
342
+            if (!isNaN(value)) {
343
+              return prev + curr
344
+            } else {
345
+              return prev
346
+            }
347
+          }, 0)
348
+          sums[index] += ' 元'
349
+        } else {
350
+          sums[index] = 'N/A'
351
+        }
352
+      })
246 353
 
247
-        return sums;
354
+      return sums
248 355
     },
249
-    handleClick(id){
250
-        console.log(id);
356
+    handleClick(id) {
357
+      console.log(id)
251 358
     }
252 359
   }
253 360
 
254 361
 }
255 362
 </script>
256 363
 <style lang="scss" scoped>
257
-.content_top{
258
-    display: flex;
259
-    justify-content: space-around;
260
-    color: #1e5feb;
364
+.content_top {
365
+  display: flex;
366
+  justify-content: space-around;
367
+  color: #1e5feb;
261 368
 }
262
-</style>
369
+</style>

+ 627 - 198
src/xt_pages/Dialysisanalysis/bloodPhosphorus/phosphorusalone.vue 查看文件

@@ -1,217 +1,646 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="血磷(mmol/L)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
107 106
 
107
+                <el-table-column width="100" label="血磷" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
108 119
     </div>
120
+  </div>
109 121
 </template>
122
+
123
+
110 124
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            myChart: {},
131
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
132
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
133
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
134
-            tableData:[],
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
135 147
         }
136
-    },
137
-    created(){
138
-        
139
-    },
140
-    mounted() {
141
-        // this.$nextTick(function() {
142
-            this.initEcharts();
143
-		// })  
144
-        // this.myChart = echarts.init(document.getElementById("germychart"));
145
-        //     this.myChart.setOption(option);
146
-            //随着屏幕大小调节图表
147
-            window.addEventListener("resize", () => {
148
-                this.myChart.resize();
149
-            });
150
-    },
151
-    methods:{
152
-        handleSubmit(){
153
-            console.log('asdfa');
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1
163
+      },
164
+      crumbs: [
165
+        { path: false, name: '科室质控' },
166
+        { path: false, name: '指标评估统计' },
167
+        { path: false, name: '透析过程指标统计' }
168
+      ],
169
+      tableData1: [],
170
+      chart: {
171
+        title: {
172
+          text: 'ECharts 入门示例'
154 173
         },
155
-        initEcharts() {
156
-            const option = {
157
-                xAxis: {
158
-                    type: 'category',
159
-                        boundaryGap:true,
160
-                        axisTick:{
161
-                            alignWithLabel:true //保证刻度线和标签对齐
162
-                        },
163
-                    data: this.xData,
164
-                    splitNumber:this.xData.length, //纵坐标数
165
-                    interval:this.xData //强制设置坐标轴分割间隔
166
-                },
167
-                yAxis: {
168
-                    type: 'value',
169
-                    boundaryGap: true,
170
-                    splitNumber:4, //纵坐标数
171
-                    interval:10 //强制设置坐标轴分割间隔
174
+        tooltip: {},
175
+        legend: {
176
+          data: [],
177
+          left: 0
178
+        },
179
+        xAxis: {
180
+          data: []
181
+        },
182
+        yAxis: {
183
+          axisLabel: {
184
+            formatter: '{value} %'
185
+          },
186
+          show: false
187
+        },
188
+        series: [
189
+          {
190
+            name: '',
191
+            type: 'line',
192
+            data: [],
193
+            barWidth: 30,
194
+            label: {
195
+              normal: {
196
+                show: true,
197
+                position: 'top',
198
+                formatter: (params) => {
199
+                  if(this.percent.length > 0){
200
+                    let str = ''
201
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
202
+                    return str
203
+                  }else{
204
+                    let str = ''
205
+                    str = params.data
206
+                    return str
207
+                  }
208
+                }
209
+              }
210
+            },
211
+            //配置样式
212
+            itemStyle: {
213
+              //通常情况下:
214
+
215
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
216
+              normal: {
217
+                color: function(params) {
218
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
219
+                  var colorList = [
220
+                    ['#A9E0F3', '#9FBDFC'],
221
+
222
+                    ['#FFD7C0', '#FF9994']
223
+                  ]
224
+
225
+                  var index = params.dataIndex
226
+                  if (params.dataIndex >= colorList.length) {
227
+                    index = params.dataIndex % colorList.length
228
+                  }
229
+
230
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
231
+                    { offset: 0, color: colorList[index][0] },
232
+                    // { offset: 0.5, color: colorList[index][1] },
233
+                    { offset: 1, color: colorList[index][1] }
234
+                  ])
172 235
                 },
173
-                legend: {
174
-                    show: true,
175
-                    align:'left',//文字在前图标在后
176
-                    left:'15%',
177
-                    top:'5%',
178
-                    data: [{name:'血磷mmol/L'}]
236
+                lineStyle:{
237
+                  color:'#409eff' //改变折线颜色
179 238
                 },
180
-                series: [
181
-                {
182
-                    data: this.opinionData,
183
-                    name:'血磷mmol/L',
184
-                    type: "line",// 类型设置为折线图
185
-                    symbol: 'circle',
186
-                    itemStyle: {
187
-                        normal: {
188
-                            color: '#409eff', //改变折线点的颜色#a80000
189
-                            lineStyle: {
190
-                                color: '#409eff' //改变折线颜色
191
-                            }
192
-                        }
193
-                    },
239
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
240
+              },
194 241
 
195
-                },
196
-                
197
-                ],
198
-                
199
-            };
200
-            this.myChart = echarts.init(document.getElementById("germychart"));
201
-            this.myChart.setOption(option);
202
-            //随着屏幕大小调节图表
203
-            window.addEventListener("resize", () => {
204
-                this.myChart.resize();
205
-            });
242
+              //鼠标悬停时:
243
+              emphasis: {
244
+                shadowBlur: 10,
245
+                shadowOffsetX: 0,
246
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
247
+              }
248
+            }
249
+          }
250
+        ],
251
+        dataZoom: [
252
+          {
253
+            // Y轴固定,让内容滚动
254
+            type: 'slider',
255
+            show: false,
256
+            xAxisIndex: [0],
257
+            start: 1,
258
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
259
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
260
+          },
261
+          {
262
+            type: 'inside',
263
+            xAxisIndex: [0],
264
+            start: 1,
265
+            end: 20,
266
+            zoomLock: true // 锁定区域禁止缩放
267
+          }
268
+        ]
269
+      },
270
+      bar: {
271
+        title: {
272
+          text: 'ECharts 入门示例'
206 273
         },
274
+        tooltip: {},
275
+        legend: {
276
+          data: [],
277
+          left: 0
278
+        },
279
+        xAxis: {
280
+          data: []
281
+        },
282
+        yAxis: {
283
+          axisLabel: {
284
+            formatter: '{value} %'
285
+          },
286
+          show: false
287
+        },
288
+        series: [
289
+          {
290
+            name: '',
291
+            type: 'bar',
292
+            data: [],
293
+            barWidth: 30,
294
+            label: {
295
+              normal: {
296
+                show: true,
297
+                position: 'top',
298
+                formatter: (params) => {
299
+                  if(this.percent.length > 0){
300
+                    let str = ''
301
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
302
+                    return str
303
+                  }else{
304
+                    let str = ''
305
+                    str = params.data
306
+                    return str
307
+                  }
308
+                }
309
+              }
310
+            },
311
+            //配置样式
312
+            itemStyle: {
313
+              //通常情况下:
314
+
315
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
316
+              normal: {
317
+                color: function(params) {
318
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
319
+                  var colorList = [
320
+                    ['#A9E0F3', '#9FBDFC'],
321
+                    ['#FFD7C0', '#FF9994']
322
+                  ]
323
+
324
+                  var index = params.dataIndex
325
+                  if (params.dataIndex >= colorList.length) {
326
+                    index = params.dataIndex % colorList.length
327
+                  }
328
+
329
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
330
+                    { offset: 0, color: colorList[index][0] },
331
+                    // { offset: 0.5, color: colorList[index][1] },
332
+                    { offset: 1, color: colorList[index][1] }
333
+                  ])
334
+                },
335
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
336
+              },
337
+
338
+              //鼠标悬停时:
339
+              emphasis: {
340
+                shadowBlur: 10,
341
+                shadowOffsetX: 0,
342
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
343
+              }
344
+            }
345
+          }
346
+        ]
347
+      }
348
+
349
+    }
350
+  },
351
+  methods: {
352
+    printAction(){
353
+      this.$router.push({
354
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355
+      });
356
+
357
+    },exportAction(){
358
+      let list = []
359
+      for (let i = 0; i < this.tableData.length; i++) {
360
+        let order = this.tableData[i]
361
+        let name = order.name
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
364
+
365
+        let obj = {
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
369
+        }
370
+        list.push(obj)
371
+      }
372
+      import('@/vendor/Export2Excel').then(excel => {
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
375
+        const data = this.formatJson(filterVal, list)
376
+        excel.export_json_to_excel1({
377
+          header: tHeader,
378
+          data,
379
+          filename: '明细',
380
+          ref: this.$refs['table'].$el
381
+        })
382
+      })
383
+    },
384
+    changeProject(val) {
385
+      this.query.statistics_type = val
386
+      this.query.page = 1
387
+      this.GetPersonQCStatistisData(this.query)
388
+      this.GetInspectionCheckIndexTableData(this.query)
389
+
390
+    },
391
+    handleChange(val) {
392
+      this.query.patient_id = val.id
393
+      this.query.page = 1
394
+      this.patient_name = val.name
395
+      this.GetPersonQCStatistisData(this.query)
396
+      this.GetInspectionCheckIndexTableData(this.query)
397
+    },
398
+    handleSizeChange(limit) {
399
+      this.query.limit = limit
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleCurrentChange(page) {
404
+      this.query.page = page
405
+      this.GetPersonQCStatistisData(this.query)
406
+    },formatJson(filterVal, jsonData) {
407
+      return jsonData.map(v => filterVal.map(j => v[j]))
408
+    },
409
+    changeTime(val) {
410
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
411
+      if (time > 0) {
412
+        this.$message.error('结束时间不能小于开始时间')
413
+        this.query.start_time = ''
414
+      } else {
415
+        // this.getDialysisList()
416
+        this.query.page = 1
417
+        this.GetPersonQCStatistisData(this.query)
418
+        this.GetInspectionCheckIndexTableData(this.query)
419
+
420
+      }
421
+
422
+    },
423
+    changeEndTime(val) {
424
+      var time =
425
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
426
+      if (time < 0) {
427
+        this.$message.error('结束时间不能小于开始时间')
428
+        this.query.end_time = ''
429
+      } else {
430
+        this.query.page = 1
431
+        this.GetPersonQCStatistisData(this.query)
432
+        this.GetInspectionCheckIndexTableData(this.query)
433
+
434
+      }
435
+    },
436
+    getTimestamp(time) {
437
+      // 把时间日期转成时间戳
438
+      return new Date(time).getTime() / 1000
439
+    },
440
+    QueryOperaById: function(val) {
441
+      let vascular_access_desc_name = ''
442
+      let vascular_access_desc = getDataConfig(
443
+        'hemodialysis',
444
+        'vascular_access_desc'
445
+      )
446
+      for (let i = 0; i < vascular_access_desc.length; i++) {
447
+        if (vascular_access_desc[i].id == val) {
448
+          vascular_access_desc_name = vascular_access_desc[i].name
449
+        }
450
+      }
451
+
452
+      return vascular_access_desc_name
207 453
     },
208
-    
454
+    GetAnticoagulantById: function(val) {
455
+      let anticoagulan_name = ''
456
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
457
+      let anticoagulant = anticoagulantsConfitTwo
458
+      for (let keys in anticoagulant) {
459
+        if (anticoagulant[keys].id == val) {
460
+          anticoagulan_name = anticoagulant[keys].name
461
+        }
462
+      }
463
+      return anticoagulan_name
464
+    },
465
+    getModeName(mode_id) {
466
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
467
+    },  getTime(val) {
468
+      if(val == "" || val == undefined){
469
+        return ""
470
+      }else {
471
+        return uParseTime(val, '{y}-{m}-{d}')
472
+      }
473
+    },
474
+    GetInspectionCheckIndexTableData(params) {
475
+      this.loading = true
476
+      GetPersonQCStatistisData(params)
477
+        .then(rs => {
478
+          var resp = rs.data
479
+          console.log("resp=====",resp)
480
+          if (resp.state == 1) {
481
+            this.loading = false
482
+            this.tableData = []
483
+            for (let i = 0; i < resp.data.inspections.length; i++) {
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
490
+            }
491
+            this.total = resp.data.total
492
+
493
+          } else {
494
+            this.loading = false
495
+          }
496
+        })
497
+        .catch(error => {
498
+
499
+        })
500
+    },
501
+    GetPersonQCStatistisData(params) {
502
+      this.chart.xAxis.data = []
503
+      this.chart.series[0].data = []
504
+      this.bar.xAxis.data = []
505
+      this.bar.series[0].data = []
506
+      this.percent = []
507
+      GetPersonQCStatistisData(params)
508
+        .then(rs => {
509
+          var resp = rs.data
510
+          if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
512
+            for (let i = 0; i < resp.data.inspections.length; i++) {
513
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+            }
516
+            console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
519
+            this.getArrLength(this.chart.xAxis.data,1)
520
+          } else {
521
+
522
+          }
523
+        })
524
+        .catch(error => {
525
+        })
526
+    },
527
+    handleSelect(val) {
528
+      this.query.patient_id = val.id
529
+      this.query.page = 1
530
+      this.patient_name = val.name
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
+      }
536
+
537
+
538
+    },
539
+    querySearchAsync(keyword, cb) {
540
+      let key = ''
541
+      if (keyword != undefined) {
542
+        key = keyword
543
+      }
544
+      let searchArray = []
545
+      PostSearch(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          searchArray = response.data.data.patient
548
+          cb(searchArray)
549
+        } else {
550
+          cb([])
551
+        }
552
+      })
553
+    },
554
+    chooseWay(way) {
555
+      this.wayType = way
556
+    }, getCurrentOrgPatients() {
557
+      getCurrentOrgPatients().then(response => {
558
+        if (response.data.state == 1) {
559
+          var patients = response.data.data.patients
560
+          this.patientsData = patients
561
+          this.GetDefaultPatient()
562
+        }
563
+      })
564
+    }, GetDefaultPatient() {
565
+      GetDefaultPatient().then(response => {
566
+        if (response.data.state == 1) {
567
+          var patient = response.data.data.patient
568
+          for (let i = 0;i < this.patientsData.length; i++){
569
+            if (this.patientsData[i].id == patient.id){
570
+              this.patient_name = this.patientsData[i].name
571
+              this.$refs.table.setCurrentRow(this.patientsData[i])
572
+            }
573
+          }
574
+          this.query.patient_id = patient.id
575
+          this.GetPersonQCStatistisData(this.query)
576
+
577
+        }
578
+      })
579
+
580
+    },
581
+    getArrLength(result,type){
582
+      if(type == 1){
583
+        if(result.length > 10){
584
+          var dataZoom_end = (10/result.length)*100;
585
+          this.chart.dataZoom[0].end = dataZoom_end
586
+        }else{
587
+          var dataZoom_end = 100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }
590
+      }else if(type == 2){
591
+        if(result.length > 10){
592
+          var dataZoom_end = (10/result.length)*100;
593
+          this.bar.dataZoom[0].end = dataZoom_end
594
+        }else{
595
+          var dataZoom_end = 100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }
598
+      }
599
+
600
+    }
601
+  }, mounted() {
602
+    var date = new Date()
603
+    var year = date.getFullYear() //获取完整的年份(4位)
604
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
605
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
606
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
607
+    this.query.patient_id = 0
608
+    this.query.end_time = year + '-' + month + '-' + day
609
+    this.query.start_time = year + '-' + last_month + '-' + day
610
+    this.query.project_id = 4
611
+    this.query.item_id = 169
612
+    this.getCurrentOrgPatients()
613
+
614
+    // this.GetPersonQCStatistisData()
615
+
616
+
617
+  }
209 618
 }
210 619
 </script>
620
+
211 621
 <style lang="scss" scoped>
212
-.content_top{
213
-    display: flex;
214
-    justify-content: space-around;
215
-    margin-bottom: 20px;
622
+.tableTitle {
623
+  font-size: 16px;
624
+  color: #000;
625
+  font-weight: bold;
626
+  margin-bottom: 10px;
627
+}
628
+</style>
629
+<style lang="scss">
630
+.page_process {
631
+.el-tabs{
632
+  margin-bottom:0 !important;
633
+}
634
+.el-button--medium {
635
+  padding: 10px 8px;
636
+}
637
+
638
+.el-form-item {
639
+  margin-bottom: 0;
640
+}
641
+::-webkit-scrollbar{
642
+  height: 15px !important;
643
+}
644
+
216 645
 }
217
-</style>
646
+</style>

+ 333 - 227
src/xt_pages/Dialysisanalysis/bloodPotassium/potassiumall.vue 查看文件

@@ -1,262 +1,368 @@
1 1
 <template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-        
31
-        <el-row :gutter="20">
32
-        <el-col :span="5"> 
33
-          <div class="block">
34
-            <span>查询时间:</span>
35
-            <el-date-picker
36
-            v-model="time_month"
37
-            type="month"
38
-            placeholder="选择月">
39
-            </el-date-picker>
40
-          </div>
41
-        </el-col>
42
-        <el-col :span="8">
43
-          <div>
44
-            <el-date-picker
45
-            v-model="stat_time"
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
46 26
             type="date"
27
+
47 28
             placeholder="选择日期">
48
-            </el-date-picker>
49
-            <span>-</span>
50
-            <el-date-picker
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
51 33
             v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
52 36
             type="date"
53 37
             placeholder="选择日期">
54
-            </el-date-picker>
55
-          </div>
56
-        </el-col>
57
-        <el-col :span="3">
58
-          <div style="width: 200px;">
59
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
60
-          </div>
61
-        </el-col>
62
-        <el-col :span="2">
63
-            <el-button type="primary">查询</el-button>
64
-        </el-col>
65
-        </el-row>
66
-        
67
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-          <p class="chartTitle">统计图</p>
38
+          </el-date-picker>
69 39
         </div>
70
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-        <div style="width: 80%;margin: auto;">
72
-            <el-table
73
-            :data="tableData"
74
-            :show-summary = true
75
-            border
76
-            style="width: 100%;">
77
-                <el-table-column
78
-                    prop="date"
79
-                    align="center"
80
-                    label="血钾"
81
-                    >
82
-                </el-table-column>
83
-                <el-table-column
84
-                    prop="name"
85
-                    
86
-                    label="人数"
87
-                    >
88
-                </el-table-column>
89
-                <el-table-column
90
-                    prop="address"
91
-                    align="center"
92
-                    label="操作">
93
-                    <template slot-scope="scope">
94
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                                type="text" >查看详情
96
-                        </el-button>
97
-                    </template>
98
-                </el-table-column>
99
-            </el-table>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
100 44
         </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="血钾"
63
+        >
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="count"
67
+          label="人数"
68
+        >
69
+        </el-table-column>
70
+<!--        <el-table-column-->
71
+<!--          prop="address"-->
72
+<!--          align="center"-->
73
+<!--          label="操作">-->
74
+<!--          <template slot-scope="scope">-->
75
+<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
76
+<!--                       type="text">查看详情-->
77
+<!--            </el-button>-->
78
+<!--          </template>-->
79
+<!--        </el-table-column>-->
80
+      </el-table>
101 81
     </div>
82
+  </div>
102 83
 </template>
103 84
 <script>
104
-import * as echarts from "echarts";
105
-export default{
106
-    props: {
107
-   
85
+import * as echarts from 'echarts'
86
+import { GetQCStatistisData } from '../../../api/qcd'
87
+
88
+const moment = require('moment')
89
+
90
+export default {
91
+  props: {
92
+
108 93
     width: {
109 94
       type: String,
110
-      default: "100%"
95
+      default: '100%'
111 96
     },
112 97
     height: {
113 98
       type: String,
114
-      default: "400px"
115
-    },
116
-    
99
+      default: '400px'
100
+    }
101
+
117 102
   },
118
-    data() {
119
-        return {
120
-            time_month:'',
121
-            stat_time:'',
122
-            end_time:'',
123
-            input:'',
124
-            myChart: {},
125
-            pieData : [
126
-            {
127
-          value: 463,
128
-          name: "不达标值患者"
129
-        },
130
-        {
131
-          value: 395,
132
-          name: "未检查患者"
133
-        },
134
-        {
135
-          value: 157,
136
-          name: "达标值患者"
137
-        },
138
-        // {
139
-        //   value: 149,
140
-        //   name: "广东"
141
-        // },
142
-        // {
143
-        //   value: 147,
144
-        //   name: "湖南"
145
-        // }
146
-            
147
-            ],
148
-            pieName: [],
149
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
150
-            tableData:[],
151
-        }
152
-    },
153
-    mounted() {
154
-    this.initDate(); //数据初始化
155
-    this.initEcharts();
103
+  data() {
104
+    return {
105
+      time_type: 1,
106
+      times: [
107
+        { value: 1, label: '本月' },
108
+        { value: 2, label: '上月' },
109
+        { value: 3, label: '今年' },
110
+        { value: 4, label: '上一年' },
111
+        { value: 5, label: '第一季度' },
112
+        { value: 6, label: '第二季度' },
113
+        { value: 7, label: '第三季度' },
114
+        { value: 8, label: '第四季度' },
115
+        { value: 9, label: '自定义' }
116
+
117
+      ],
118
+      time_month: '',
119
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
120
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
121
+      input: '',
122
+      myChart: {},
123
+      pieData: [],
124
+      pieName: [],
125
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
126
+      tableData: [],
127
+      reference:{},
128
+    }
129
+  },
130
+  mounted() {
131
+    this.getData()
156 132
   },
157 133
   methods: {
158
-    initDate() {
159
-      for (let i = 0; i < this.pieData.length; i++) {
160
-        this.pieName[i] = this.pieData[i].name;
134
+    getData() {
135
+      if(this.start_time.length == 0){
136
+        this.$message.error("请选择开始时间")
161 137
       }
162
-    },
163
-    initEcharts() {
164
-      // 饼图
165
-      const option = {
166
-        legend: {
167
-          // 图例
168
-          data: this.pieName,
169
-          left: "10%",
170
-          top: "30%",
171
-          orient: "vertical"
172
-        },
173
-        color:['#ff7f9f','#fff67f','#1e5feb'],
174
-        title: {
175
-          // 设置饼图标题,位置设为顶部居中
176
-        //   text: "国内院士前五省份图示",
177
-          top: "0%",
178
-          left: "center"
179
-        },
180
-        series: [
181
-          {
182
-            type: "pie",
183
-            label: {
184
-              normal : {
185
-                formatter: '{b}:{c}: ({d}%)',
186
-                textStyle : {
187
-                    fontWeight : 'normal',
188
-                    fontSize : 15,
189
-                    color : "black"
190
-                }
191
-              }
192
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
138
+      if(this.end_time.length == 0){
139
+        this.$message.error("请选择结束时间")
140
+      }
141
+      let params = {
142
+        start_date: this.start_time,
143
+        end_date: this.end_time,
144
+        project_id: 4,
145
+        item_id: 48
146
+      }
147
+      this.pieData = []
148
+      this.tableData = []
149
+      console.log("~~~~~~~~~~")
150
+      GetQCStatistisData(params).then(response => {
151
+        if (response.data.state == 1) {
152
+          this.reference = response.data.data.reference
153
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
154
+          let objone = {
155
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
156
+            name: '不达标值患者',
157
+            count:response.data.data.unusual_total,
158
+          }
159
+          this.pieData.push(objone)
160
+          this.tableData.push(objone)
161
+
162
+          let objtwo = {
163
+            value:   response.data.data.normal_total / response.data.data.patient_count,
164
+            name: '达标值患者',
165
+            count:response.data.data.normal_total,
166
+
167
+          }
168
+          this.pieData.push(objtwo)
169
+          this.tableData.push(objtwo)
170
+
171
+          let objthree = {
172
+            value: response.data.data.patient_count / response.data.data.no_check_total,
173
+            name: '未检查患者',
174
+            count:response.data.data.no_check_total,
175
+
176
+          }
177
+          this.pieData.push(objthree)
178
+          this.tableData.push(objthree)
179
+
180
+          let objfour = {
181
+            value: response.data.data.patient_count,
182
+            name: '合计',
183
+            count:response.data.data.patient_count,
184
+          }
185
+          this.tableData.push(objfour)
186
+          for (let i = 0; i < this.pieData.length; i++) {
187
+            this.pieName[i] = this.pieData[i].name
188
+          }
189
+          this.myChart = echarts.init(document.getElementById('mychart'))
190
+          window.addEventListener('resize', () => {
191
+            this.myChart.resize()
192
+          })
193
+          const option = {
194
+            legend: {
195
+              // 图例
196
+              data: this.pieName,
197
+              left: '10%',
198
+              top: '30%',
199
+              orient: 'vertical'
200
+            },
201
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
202
+            title: {
203
+              // 设置饼图标题,位置设为顶部居中
204
+              //   text: "国内院士前五省份图示",
205
+              top: '0%',
206
+              left: 'center'
193 207
             },
194
-            radius: "65%", //饼图半径
195
-            data: this.pieData,
196
-            itemStyle : {
197
-              emphasis: {
198
-                shadowBlur: 10,
199
-                shadowOffsetX: 0,
200
-                shadowColor: 'rgba(0, 0, 0, 0.5)'
208
+            series: [
209
+              {
210
+                type: 'pie',
211
+                label: {
212
+                  show: true,
213
+                  formatter: '{b} : {d}% ({c})'
214
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
215
+                },
216
+                radius: '65%', //饼图半径
217
+                data: this.pieData
201 218
               }
202
-            }
219
+            ]
203 220
           }
204
-        ]
205
-      };
206
-    //   console.log(this.seriesData);
207
-      const optionFree = {
208
-        series: [
209
-          {
210
-            data: this.seriesData,
211
-            type: "line",
212
-            smooth: true
221
+          //   console.log(this.seriesData);
222
+          const optionFree = {
223
+            series: [
224
+              {
225
+                data: this.seriesData,
226
+                type: 'line',
227
+                smooth: true
228
+              }
229
+            ]
213 230
           }
214
-        ]
215
-      };
216
-      this.myChart = echarts.init(document.getElementById("mychart"));
217
-      this.myChart.setOption(option);
218
-      //随着屏幕大小调节图表
219
-      window.addEventListener("resize", () => {
220
-        this.myChart.resize();
221
-      });
231
+          this.myChart = echarts.init(document.getElementById('mychart'))
232
+          this.myChart.setOption(option)
233
+        } else {
234
+          this.$message.error(response.data.msg)
235
+        }
236
+      })
237
+
238
+    },
239
+    changeItem(val) {
240
+      const currentDate = new Date()
241
+      switch (val) {
242
+        case 1:
243
+
244
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
245
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
246
+
247
+          this.start_time = startOfMonth
248
+          this.end_time = endOfMonth
249
+          this.getData()
250
+
251
+          break
252
+        case 2:
253
+          // 上月的起始日期和结束日期
254
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
255
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
256
+
257
+          this.start_time = startOfLastMonth
258
+          this.end_time = endOfLastMonth
259
+          this.getData()
260
+
261
+          break
262
+        case 3:
263
+          // 今年的起始日期和结束日期
264
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
265
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
266
+
267
+          this.start_time = startOfYear
268
+          this.end_time = endOfYear
269
+          this.getData()
270
+
271
+          break
272
+        case 4:
273
+          // 上一年的起始日期和结束日期
274
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
275
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
276
+
277
+          this.start_time = startOfLastYear
278
+          this.end_time = endOfLastYear
279
+          this.getData()
280
+
281
+          break
282
+        case 5:
283
+          // 第一季度的起始日期和结束日期
284
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
285
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
286
+
287
+          this.start_time = startOfFirstQuarter
288
+          this.end_time = endOfFirstQuarter
289
+          this.getData()
290
+
291
+          break
292
+        case 6:
293
+          // 第二季度的起始日期和结束日期
294
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
295
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
296
+
297
+          this.start_time = startOfSecondQuarter
298
+          this.end_time = endOfSecondQuarter
299
+          this.getData()
300
+
301
+          break
302
+        case 7:
303
+          // 第三季度的起始日期和结束日期
304
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
305
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
306
+
307
+          this.start_time = startOfThirdQuarter
308
+          this.end_time = endOfThirdQuarter
309
+          this.getData()
310
+
311
+          break
312
+        case 8:
313
+          // 第四季度的起始日期和结束日期
314
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
315
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
316
+
317
+          this.start_time = startOfFourthQuarter
318
+          this.end_time = endOfFourthQuarter
319
+          this.getData()
320
+          break
321
+        case 9:
322
+          this.start_time = ''
323
+          this.end_time = ''
324
+          break
325
+      }
222 326
     },
327
+
328
+
223 329
     getSummaries(param) {
224
-        const { columns, data } = param;
225
-        const sums = [];
226
-        columns.forEach((column, index) => {
227
-          if (index === 0) {
228
-            sums[index] = '总价';
229
-            return;
230
-          }
231
-          const values = data.map(item => Number(item[column.property]));
232
-          if (!values.every(value => isNaN(value))) {
233
-            sums[index] = values.reduce((prev, curr) => {
234
-              const value = Number(curr);
235
-              if (!isNaN(value)) {
236
-                return prev + curr;
237
-              } else {
238
-                return prev;
239
-              }
240
-            }, 0);
241
-            sums[index] += ' 元';
242
-          } else {
243
-            sums[index] = 'N/A';
244
-          }
245
-        });
330
+      const { columns, data } = param
331
+      const sums = []
332
+      columns.forEach((column, index) => {
333
+        if (index === 0) {
334
+          sums[index] = '总价'
335
+          return
336
+        }
337
+        const values = data.map(item => Number(item[column.property]))
338
+        if (!values.every(value => isNaN(value))) {
339
+          sums[index] = values.reduce((prev, curr) => {
340
+            const value = Number(curr)
341
+            if (!isNaN(value)) {
342
+              return prev + curr
343
+            } else {
344
+              return prev
345
+            }
346
+          }, 0)
347
+          sums[index] += ' 元'
348
+        } else {
349
+          sums[index] = 'N/A'
350
+        }
351
+      })
246 352
 
247
-        return sums;
353
+      return sums
248 354
     },
249
-    handleClick(id){
250
-        console.log(id);
355
+    handleClick(id) {
356
+      console.log(id)
251 357
     }
252 358
   }
253 359
 
254 360
 }
255 361
 </script>
256 362
 <style lang="scss" scoped>
257
-.content_top{
258
-    display: flex;
259
-    justify-content: space-around;
260
-    color: #1e5feb;
363
+.content_top {
364
+  display: flex;
365
+  justify-content: space-around;
366
+  color: #1e5feb;
261 367
 }
262
-</style>
368
+</style>

+ 627 - 198
src/xt_pages/Dialysisanalysis/bloodPotassium/potassiumalone.vue 查看文件

@@ -1,217 +1,646 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="血钾(mmol/L)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
107 106
 
107
+                <el-table-column width="100" label="血钾" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
108 119
     </div>
120
+  </div>
109 121
 </template>
122
+
123
+
110 124
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            myChart: {},
131
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
132
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
133
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
134
-            tableData:[],
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
135 147
         }
136
-    },
137
-    created(){
138
-        
139
-    },
140
-    mounted() {
141
-        // this.$nextTick(function() {
142
-            this.initEcharts();
143
-		// })  
144
-        // this.myChart = echarts.init(document.getElementById("germychart"));
145
-        //     this.myChart.setOption(option);
146
-            //随着屏幕大小调节图表
147
-            window.addEventListener("resize", () => {
148
-                this.myChart.resize();
149
-            });
150
-    },
151
-    methods:{
152
-        handleSubmit(){
153
-            console.log('asdfa');
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1
163
+      },
164
+      crumbs: [
165
+        { path: false, name: '科室质控' },
166
+        { path: false, name: '指标评估统计' },
167
+        { path: false, name: '透析过程指标统计' }
168
+      ],
169
+      tableData1: [],
170
+      chart: {
171
+        title: {
172
+          text: 'ECharts 入门示例'
154 173
         },
155
-        initEcharts() {
156
-            const option = {
157
-                xAxis: {
158
-                    type: 'category',
159
-                        boundaryGap:true,
160
-                        axisTick:{
161
-                            alignWithLabel:true //保证刻度线和标签对齐
162
-                        },
163
-                    data: this.xData,
164
-                    splitNumber:this.xData.length, //纵坐标数
165
-                    interval:this.xData //强制设置坐标轴分割间隔
166
-                },
167
-                yAxis: {
168
-                    type: 'value',
169
-                    boundaryGap: true,
170
-                    splitNumber:4, //纵坐标数
171
-                    interval:10 //强制设置坐标轴分割间隔
174
+        tooltip: {},
175
+        legend: {
176
+          data: [],
177
+          left: 0
178
+        },
179
+        xAxis: {
180
+          data: []
181
+        },
182
+        yAxis: {
183
+          axisLabel: {
184
+            formatter: '{value} %'
185
+          },
186
+          show: false
187
+        },
188
+        series: [
189
+          {
190
+            name: '',
191
+            type: 'line',
192
+            data: [],
193
+            barWidth: 30,
194
+            label: {
195
+              normal: {
196
+                show: true,
197
+                position: 'top',
198
+                formatter: (params) => {
199
+                  if(this.percent.length > 0){
200
+                    let str = ''
201
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
202
+                    return str
203
+                  }else{
204
+                    let str = ''
205
+                    str = params.data
206
+                    return str
207
+                  }
208
+                }
209
+              }
210
+            },
211
+            //配置样式
212
+            itemStyle: {
213
+              //通常情况下:
214
+
215
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
216
+              normal: {
217
+                color: function(params) {
218
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
219
+                  var colorList = [
220
+                    ['#A9E0F3', '#9FBDFC'],
221
+
222
+                    ['#FFD7C0', '#FF9994']
223
+                  ]
224
+
225
+                  var index = params.dataIndex
226
+                  if (params.dataIndex >= colorList.length) {
227
+                    index = params.dataIndex % colorList.length
228
+                  }
229
+
230
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
231
+                    { offset: 0, color: colorList[index][0] },
232
+                    // { offset: 0.5, color: colorList[index][1] },
233
+                    { offset: 1, color: colorList[index][1] }
234
+                  ])
172 235
                 },
173
-                legend: {
174
-                    show: true,
175
-                    align:'left',//文字在前图标在后
176
-                    left:'15%',
177
-                    top:'5%',
178
-                    data: [{name:'血钾mmol/L'}]
236
+                lineStyle:{
237
+                  color:'#409eff' //改变折线颜色
179 238
                 },
180
-                series: [
181
-                {
182
-                    data: this.opinionData,
183
-                    name:'血钾mmol/L',
184
-                    type: "line",// 类型设置为折线图
185
-                    symbol: 'circle',
186
-                    itemStyle: {
187
-                        normal: {
188
-                            color: '#409eff', //改变折线点的颜色#a80000
189
-                            lineStyle: {
190
-                                color: '#409eff' //改变折线颜色
191
-                            }
192
-                        }
193
-                    },
239
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
240
+              },
194 241
 
195
-                },
196
-                
197
-                ],
198
-                
199
-            };
200
-            this.myChart = echarts.init(document.getElementById("germychart"));
201
-            this.myChart.setOption(option);
202
-            //随着屏幕大小调节图表
203
-            window.addEventListener("resize", () => {
204
-                this.myChart.resize();
205
-            });
242
+              //鼠标悬停时:
243
+              emphasis: {
244
+                shadowBlur: 10,
245
+                shadowOffsetX: 0,
246
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
247
+              }
248
+            }
249
+          }
250
+        ],
251
+        dataZoom: [
252
+          {
253
+            // Y轴固定,让内容滚动
254
+            type: 'slider',
255
+            show: false,
256
+            xAxisIndex: [0],
257
+            start: 1,
258
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
259
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
260
+          },
261
+          {
262
+            type: 'inside',
263
+            xAxisIndex: [0],
264
+            start: 1,
265
+            end: 20,
266
+            zoomLock: true // 锁定区域禁止缩放
267
+          }
268
+        ]
269
+      },
270
+      bar: {
271
+        title: {
272
+          text: 'ECharts 入门示例'
206 273
         },
274
+        tooltip: {},
275
+        legend: {
276
+          data: [],
277
+          left: 0
278
+        },
279
+        xAxis: {
280
+          data: []
281
+        },
282
+        yAxis: {
283
+          axisLabel: {
284
+            formatter: '{value} %'
285
+          },
286
+          show: false
287
+        },
288
+        series: [
289
+          {
290
+            name: '',
291
+            type: 'bar',
292
+            data: [],
293
+            barWidth: 30,
294
+            label: {
295
+              normal: {
296
+                show: true,
297
+                position: 'top',
298
+                formatter: (params) => {
299
+                  if(this.percent.length > 0){
300
+                    let str = ''
301
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
302
+                    return str
303
+                  }else{
304
+                    let str = ''
305
+                    str = params.data
306
+                    return str
307
+                  }
308
+                }
309
+              }
310
+            },
311
+            //配置样式
312
+            itemStyle: {
313
+              //通常情况下:
314
+
315
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
316
+              normal: {
317
+                color: function(params) {
318
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
319
+                  var colorList = [
320
+                    ['#A9E0F3', '#9FBDFC'],
321
+                    ['#FFD7C0', '#FF9994']
322
+                  ]
323
+
324
+                  var index = params.dataIndex
325
+                  if (params.dataIndex >= colorList.length) {
326
+                    index = params.dataIndex % colorList.length
327
+                  }
328
+
329
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
330
+                    { offset: 0, color: colorList[index][0] },
331
+                    // { offset: 0.5, color: colorList[index][1] },
332
+                    { offset: 1, color: colorList[index][1] }
333
+                  ])
334
+                },
335
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
336
+              },
337
+
338
+              //鼠标悬停时:
339
+              emphasis: {
340
+                shadowBlur: 10,
341
+                shadowOffsetX: 0,
342
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
343
+              }
344
+            }
345
+          }
346
+        ]
347
+      }
348
+
349
+    }
350
+  },
351
+  methods: {
352
+    printAction(){
353
+      this.$router.push({
354
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355
+      });
356
+
357
+    },exportAction(){
358
+      let list = []
359
+      for (let i = 0; i < this.tableData.length; i++) {
360
+        let order = this.tableData[i]
361
+        let name = order.name
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
364
+
365
+        let obj = {
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
369
+        }
370
+        list.push(obj)
371
+      }
372
+      import('@/vendor/Export2Excel').then(excel => {
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
375
+        const data = this.formatJson(filterVal, list)
376
+        excel.export_json_to_excel1({
377
+          header: tHeader,
378
+          data,
379
+          filename: '明细',
380
+          ref: this.$refs['table'].$el
381
+        })
382
+      })
383
+    },
384
+    changeProject(val) {
385
+      this.query.statistics_type = val
386
+      this.query.page = 1
387
+      this.GetPersonQCStatistisData(this.query)
388
+      this.GetInspectionCheckIndexTableData(this.query)
389
+
390
+    },
391
+    handleChange(val) {
392
+      this.query.patient_id = val.id
393
+      this.query.page = 1
394
+      this.patient_name = val.name
395
+      this.GetPersonQCStatistisData(this.query)
396
+      this.GetInspectionCheckIndexTableData(this.query)
397
+    },
398
+    handleSizeChange(limit) {
399
+      this.query.limit = limit
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleCurrentChange(page) {
404
+      this.query.page = page
405
+      this.GetPersonQCStatistisData(this.query)
406
+    },formatJson(filterVal, jsonData) {
407
+      return jsonData.map(v => filterVal.map(j => v[j]))
408
+    },
409
+    changeTime(val) {
410
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
411
+      if (time > 0) {
412
+        this.$message.error('结束时间不能小于开始时间')
413
+        this.query.start_time = ''
414
+      } else {
415
+        // this.getDialysisList()
416
+        this.query.page = 1
417
+        this.GetPersonQCStatistisData(this.query)
418
+        this.GetInspectionCheckIndexTableData(this.query)
419
+
420
+      }
421
+
422
+    },
423
+    changeEndTime(val) {
424
+      var time =
425
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
426
+      if (time < 0) {
427
+        this.$message.error('结束时间不能小于开始时间')
428
+        this.query.end_time = ''
429
+      } else {
430
+        this.query.page = 1
431
+        this.GetPersonQCStatistisData(this.query)
432
+        this.GetInspectionCheckIndexTableData(this.query)
433
+
434
+      }
435
+    },
436
+    getTimestamp(time) {
437
+      // 把时间日期转成时间戳
438
+      return new Date(time).getTime() / 1000
439
+    },
440
+    QueryOperaById: function(val) {
441
+      let vascular_access_desc_name = ''
442
+      let vascular_access_desc = getDataConfig(
443
+        'hemodialysis',
444
+        'vascular_access_desc'
445
+      )
446
+      for (let i = 0; i < vascular_access_desc.length; i++) {
447
+        if (vascular_access_desc[i].id == val) {
448
+          vascular_access_desc_name = vascular_access_desc[i].name
449
+        }
450
+      }
451
+
452
+      return vascular_access_desc_name
207 453
     },
208
-    
454
+    GetAnticoagulantById: function(val) {
455
+      let anticoagulan_name = ''
456
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
457
+      let anticoagulant = anticoagulantsConfitTwo
458
+      for (let keys in anticoagulant) {
459
+        if (anticoagulant[keys].id == val) {
460
+          anticoagulan_name = anticoagulant[keys].name
461
+        }
462
+      }
463
+      return anticoagulan_name
464
+    },
465
+    getModeName(mode_id) {
466
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
467
+    },  getTime(val) {
468
+      if(val == "" || val == undefined){
469
+        return ""
470
+      }else {
471
+        return uParseTime(val, '{y}-{m}-{d}')
472
+      }
473
+    },
474
+    GetInspectionCheckIndexTableData(params) {
475
+      this.loading = true
476
+      GetPersonQCStatistisData(params)
477
+        .then(rs => {
478
+          var resp = rs.data
479
+          console.log("resp=====",resp)
480
+          if (resp.state == 1) {
481
+            this.loading = false
482
+            this.tableData = []
483
+            for (let i = 0; i < resp.data.inspections.length; i++) {
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
490
+            }
491
+            this.total = resp.data.total
492
+
493
+          } else {
494
+            this.loading = false
495
+          }
496
+        })
497
+        .catch(error => {
498
+
499
+        })
500
+    },
501
+    GetPersonQCStatistisData(params) {
502
+      this.chart.xAxis.data = []
503
+      this.chart.series[0].data = []
504
+      this.bar.xAxis.data = []
505
+      this.bar.series[0].data = []
506
+      this.percent = []
507
+      GetPersonQCStatistisData(params)
508
+        .then(rs => {
509
+          var resp = rs.data
510
+          if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
512
+            for (let i = 0; i < resp.data.inspections.length; i++) {
513
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+            }
516
+            console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
519
+            this.getArrLength(this.chart.xAxis.data,1)
520
+          } else {
521
+
522
+          }
523
+        })
524
+        .catch(error => {
525
+        })
526
+    },
527
+    handleSelect(val) {
528
+      this.query.patient_id = val.id
529
+      this.query.page = 1
530
+      this.patient_name = val.name
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
+      }
536
+
537
+
538
+    },
539
+    querySearchAsync(keyword, cb) {
540
+      let key = ''
541
+      if (keyword != undefined) {
542
+        key = keyword
543
+      }
544
+      let searchArray = []
545
+      PostSearch(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          searchArray = response.data.data.patient
548
+          cb(searchArray)
549
+        } else {
550
+          cb([])
551
+        }
552
+      })
553
+    },
554
+    chooseWay(way) {
555
+      this.wayType = way
556
+    }, getCurrentOrgPatients() {
557
+      getCurrentOrgPatients().then(response => {
558
+        if (response.data.state == 1) {
559
+          var patients = response.data.data.patients
560
+          this.patientsData = patients
561
+          this.GetDefaultPatient()
562
+        }
563
+      })
564
+    }, GetDefaultPatient() {
565
+      GetDefaultPatient().then(response => {
566
+        if (response.data.state == 1) {
567
+          var patient = response.data.data.patient
568
+          for (let i = 0;i < this.patientsData.length; i++){
569
+            if (this.patientsData[i].id == patient.id){
570
+              this.patient_name = this.patientsData[i].name
571
+              this.$refs.table.setCurrentRow(this.patientsData[i])
572
+            }
573
+          }
574
+          this.query.patient_id = patient.id
575
+          this.GetPersonQCStatistisData(this.query)
576
+
577
+        }
578
+      })
579
+
580
+    },
581
+    getArrLength(result,type){
582
+      if(type == 1){
583
+        if(result.length > 10){
584
+          var dataZoom_end = (10/result.length)*100;
585
+          this.chart.dataZoom[0].end = dataZoom_end
586
+        }else{
587
+          var dataZoom_end = 100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }
590
+      }else if(type == 2){
591
+        if(result.length > 10){
592
+          var dataZoom_end = (10/result.length)*100;
593
+          this.bar.dataZoom[0].end = dataZoom_end
594
+        }else{
595
+          var dataZoom_end = 100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }
598
+      }
599
+
600
+    }
601
+  }, mounted() {
602
+    var date = new Date()
603
+    var year = date.getFullYear() //获取完整的年份(4位)
604
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
605
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
606
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
607
+    this.query.patient_id = 0
608
+    this.query.end_time = year + '-' + month + '-' + day
609
+    this.query.start_time = year + '-' + last_month + '-' + day
610
+    this.query.project_id = 4
611
+    this.query.item_id = 48
612
+    this.getCurrentOrgPatients()
613
+
614
+    // this.GetPersonQCStatistisData()
615
+
616
+
617
+  }
209 618
 }
210 619
 </script>
620
+
211 621
 <style lang="scss" scoped>
212
-.content_top{
213
-    display: flex;
214
-    justify-content: space-around;
215
-    margin-bottom: 20px;
622
+.tableTitle {
623
+  font-size: 16px;
624
+  color: #000;
625
+  font-weight: bold;
626
+  margin-bottom: 10px;
627
+}
628
+</style>
629
+<style lang="scss">
630
+.page_process {
631
+.el-tabs{
632
+  margin-bottom:0 !important;
633
+}
634
+.el-button--medium {
635
+  padding: 10px 8px;
636
+}
637
+
638
+.el-form-item {
639
+  margin-bottom: 0;
640
+}
641
+::-webkit-scrollbar{
642
+  height: 15px !important;
643
+}
644
+
216 645
 }
217
-</style>
646
+</style>

+ 334 - 227
src/xt_pages/Dialysisanalysis/calcium/calciumall.vue 查看文件

@@ -1,262 +1,369 @@
1 1
 <template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-        
31
-        <el-row :gutter="20">
32
-        <el-col :span="5"> 
33
-          <div class="block">
34
-            <span>查询时间:</span>
35
-            <el-date-picker
36
-            v-model="time_month"
37
-            type="month"
38
-            placeholder="选择月">
39
-            </el-date-picker>
40
-          </div>
41
-        </el-col>
42
-        <el-col :span="8">
43
-          <div>
44
-            <el-date-picker
45
-            v-model="stat_time"
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
46 26
             type="date"
27
+
47 28
             placeholder="选择日期">
48
-            </el-date-picker>
49
-            <span>-</span>
50
-            <el-date-picker
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
51 33
             v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
52 36
             type="date"
53 37
             placeholder="选择日期">
54
-            </el-date-picker>
55
-          </div>
56
-        </el-col>
57
-        <el-col :span="3">
58
-          <div style="width: 200px;">
59
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
60
-          </div>
61
-        </el-col>
62
-        <el-col :span="2">
63
-            <el-button type="primary">查询</el-button>
64
-        </el-col>
65
-        </el-row>
66
-
67
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-          <p class="chartTitle">统计图</p>
38
+          </el-date-picker>
69 39
         </div>
70
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-        <div style="width: 80%;margin: auto;">
72
-            <el-table
73
-            :data="tableData"
74
-            :show-summary = true
75
-            border
76
-            style="width: 100%;">
77
-                <el-table-column
78
-                    prop="date"
79
-                    align="center"
80
-                    label="钙"
81
-                    >
82
-                </el-table-column>
83
-                <el-table-column
84
-                    prop="name"
85
-                    
86
-                    label="人数"
87
-                    >
88
-                </el-table-column>
89
-                <el-table-column
90
-                    prop="address"
91
-                    align="center"
92
-                    label="操作">
93
-                    <template slot-scope="scope">
94
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                                type="text" >查看详情
96
-                        </el-button>
97
-                    </template>
98
-                </el-table-column>
99
-            </el-table>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
100 44
         </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="钙"
63
+        >
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="count"
67
+          label="人数"
68
+        >
69
+        </el-table-column>
70
+<!--        <el-table-column-->
71
+<!--          prop="address"-->
72
+<!--          align="center"-->
73
+<!--          label="操作">-->
74
+<!--          <template slot-scope="scope">-->
75
+<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
76
+<!--                       type="text">查看详情-->
77
+<!--            </el-button>-->
78
+<!--          </template>-->
79
+<!--        </el-table-column>-->
80
+      </el-table>
101 81
     </div>
82
+  </div>
102 83
 </template>
103 84
 <script>
104
-import * as echarts from "echarts";
105
-export default{
106
-    props: {
107
-   
85
+import * as echarts from 'echarts'
86
+import { GetQCStatistisData } from '../../../api/qcd'
87
+
88
+const moment = require('moment')
89
+
90
+export default {
91
+  props: {
92
+
108 93
     width: {
109 94
       type: String,
110
-      default: "100%"
95
+      default: '100%'
111 96
     },
112 97
     height: {
113 98
       type: String,
114
-      default: "400px"
115
-    },
116
-    
99
+      default: '400px'
100
+    }
101
+
117 102
   },
118
-    data() {
119
-        return {
120
-            time_month:'',
121
-            stat_time:'',
122
-            end_time:'',
123
-            input:'',
124
-            myChart: {},
125
-            pieData : [
126
-            {
127
-          value: 463,
128
-          name: "不达标值患者"
129
-        },
130
-        {
131
-          value: 395,
132
-          name: "未检查患者"
133
-        },
134
-        {
135
-          value: 157,
136
-          name: "达标值患者"
137
-        },
138
-        // {
139
-        //   value: 149,
140
-        //   name: "广东"
141
-        // },
142
-        // {
143
-        //   value: 147,
144
-        //   name: "湖南"
145
-        // }
146
-            
147
-            ],
148
-            pieName: [],
149
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
150
-            tableData:[],
151
-        }
152
-    },
153
-    mounted() {
154
-    this.initDate(); //数据初始化
155
-    this.initEcharts();
103
+  data() {
104
+    return {
105
+      time_type: 1,
106
+      times: [
107
+        { value: 1, label: '本月' },
108
+        { value: 2, label: '上月' },
109
+        { value: 3, label: '今年' },
110
+        { value: 4, label: '上一年' },
111
+        { value: 5, label: '第一季度' },
112
+        { value: 6, label: '第二季度' },
113
+        { value: 7, label: '第三季度' },
114
+        { value: 8, label: '第四季度' },
115
+        { value: 9, label: '自定义' }
116
+
117
+      ],
118
+      time_month: '',
119
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
120
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
121
+      input: '',
122
+      myChart: {},
123
+      pieData: [],
124
+      pieName: [],
125
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
126
+      tableData: [],
127
+      reference:{},
128
+    }
129
+  },
130
+  mounted() {
131
+    this.getData()
156 132
   },
157 133
   methods: {
158
-    initDate() {
159
-      for (let i = 0; i < this.pieData.length; i++) {
160
-        this.pieName[i] = this.pieData[i].name;
134
+    getData() {
135
+      if(this.start_time.length == 0){
136
+        this.$message.error("请选择开始时间")
161 137
       }
162
-    },
163
-    initEcharts() {
164
-      // 饼图
165
-      const option = {
166
-        legend: {
167
-          // 图例
168
-          data: this.pieName,
169
-          left: "10%",
170
-          top: "30%",
171
-          orient: "vertical"
172
-        },
173
-        color:['#ff7f9f','#fff67f','#1e5feb'],
174
-        title: {
175
-          // 设置饼图标题,位置设为顶部居中
176
-        //   text: "国内院士前五省份图示",
177
-          top: "0%",
178
-          left: "center"
179
-        },
180
-        series: [
181
-          {
182
-            type: "pie",
183
-            label: {
184
-              normal : {
185
-                formatter: '{b}:{c}: ({d}%)',
186
-                textStyle : {
187
-                    fontWeight : 'normal',
188
-                    fontSize : 15,
189
-                    color : "black"
190
-                }
191
-              }
192
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
138
+      if(this.end_time.length == 0){
139
+        this.$message.error("请选择结束时间")
140
+      }
141
+      let params = {
142
+        start_date: this.start_time,
143
+        end_date: this.end_time,
144
+        project_id: 4,
145
+        item_id: 289
146
+      }
147
+      this.pieData = []
148
+      this.tableData = []
149
+      console.log("~~~~~~~~~~")
150
+      GetQCStatistisData(params).then(response => {
151
+        if (response.data.state == 1) {
152
+          this.reference = response.data.data.reference
153
+
154
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
155
+          let objone = {
156
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
157
+            name: '不达标值患者',
158
+            count:response.data.data.unusual_total,
159
+          }
160
+          this.pieData.push(objone)
161
+          this.tableData.push(objone)
162
+
163
+          let objtwo = {
164
+            value:   response.data.data.normal_total / response.data.data.patient_count,
165
+            name: '达标值患者',
166
+            count:response.data.data.normal_total,
167
+
168
+          }
169
+          this.pieData.push(objtwo)
170
+          this.tableData.push(objtwo)
171
+
172
+          let objthree = {
173
+            value: response.data.data.patient_count / response.data.data.no_check_total,
174
+            name: '未检查患者',
175
+            count:response.data.data.no_check_total,
176
+
177
+          }
178
+          this.pieData.push(objthree)
179
+          this.tableData.push(objthree)
180
+
181
+          let objfour = {
182
+            value: response.data.data.patient_count,
183
+            name: '合计',
184
+            count:response.data.data.patient_count,
185
+          }
186
+          this.tableData.push(objfour)
187
+          for (let i = 0; i < this.pieData.length; i++) {
188
+            this.pieName[i] = this.pieData[i].name
189
+          }
190
+          this.myChart = echarts.init(document.getElementById('mychart'))
191
+          window.addEventListener('resize', () => {
192
+            this.myChart.resize()
193
+          })
194
+          const option = {
195
+            legend: {
196
+              // 图例
197
+              data: this.pieName,
198
+              left: '10%',
199
+              top: '30%',
200
+              orient: 'vertical'
201
+            },
202
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
203
+            title: {
204
+              // 设置饼图标题,位置设为顶部居中
205
+              //   text: "国内院士前五省份图示",
206
+              top: '0%',
207
+              left: 'center'
193 208
             },
194
-            radius: "65%", //饼图半径
195
-            data: this.pieData,
196
-            itemStyle : {
197
-              emphasis: {
198
-                shadowBlur: 10,
199
-                shadowOffsetX: 0,
200
-                shadowColor: 'rgba(0, 0, 0, 0.5)'
209
+            series: [
210
+              {
211
+                type: 'pie',
212
+                label: {
213
+                  show: true,
214
+                  formatter: '{b} : {d}% ({c})'
215
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
216
+                },
217
+                radius: '65%', //饼图半径
218
+                data: this.pieData
201 219
               }
202
-            }
220
+            ]
203 221
           }
204
-        ]
205
-      };
206
-    //   console.log(this.seriesData);
207
-      const optionFree = {
208
-        series: [
209
-          {
210
-            data: this.seriesData,
211
-            type: "line",
212
-            smooth: true
222
+          //   console.log(this.seriesData);
223
+          const optionFree = {
224
+            series: [
225
+              {
226
+                data: this.seriesData,
227
+                type: 'line',
228
+                smooth: true
229
+              }
230
+            ]
213 231
           }
214
-        ]
215
-      };
216
-      this.myChart = echarts.init(document.getElementById("mychart"));
217
-      this.myChart.setOption(option);
218
-      //随着屏幕大小调节图表
219
-      window.addEventListener("resize", () => {
220
-        this.myChart.resize();
221
-      });
232
+          this.myChart = echarts.init(document.getElementById('mychart'))
233
+          this.myChart.setOption(option)
234
+        } else {
235
+          this.$message.error(response.data.msg)
236
+        }
237
+      })
238
+
239
+    },
240
+    changeItem(val) {
241
+      const currentDate = new Date()
242
+      switch (val) {
243
+        case 1:
244
+
245
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
246
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
247
+
248
+          this.start_time = startOfMonth
249
+          this.end_time = endOfMonth
250
+          this.getData()
251
+
252
+          break
253
+        case 2:
254
+          // 上月的起始日期和结束日期
255
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
256
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
257
+
258
+          this.start_time = startOfLastMonth
259
+          this.end_time = endOfLastMonth
260
+          this.getData()
261
+
262
+          break
263
+        case 3:
264
+          // 今年的起始日期和结束日期
265
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
266
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
267
+
268
+          this.start_time = startOfYear
269
+          this.end_time = endOfYear
270
+          this.getData()
271
+
272
+          break
273
+        case 4:
274
+          // 上一年的起始日期和结束日期
275
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
276
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
277
+
278
+          this.start_time = startOfLastYear
279
+          this.end_time = endOfLastYear
280
+          this.getData()
281
+
282
+          break
283
+        case 5:
284
+          // 第一季度的起始日期和结束日期
285
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
286
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
287
+
288
+          this.start_time = startOfFirstQuarter
289
+          this.end_time = endOfFirstQuarter
290
+          this.getData()
291
+
292
+          break
293
+        case 6:
294
+          // 第二季度的起始日期和结束日期
295
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
296
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
297
+
298
+          this.start_time = startOfSecondQuarter
299
+          this.end_time = endOfSecondQuarter
300
+          this.getData()
301
+
302
+          break
303
+        case 7:
304
+          // 第三季度的起始日期和结束日期
305
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
306
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
307
+
308
+          this.start_time = startOfThirdQuarter
309
+          this.end_time = endOfThirdQuarter
310
+          this.getData()
311
+
312
+          break
313
+        case 8:
314
+          // 第四季度的起始日期和结束日期
315
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
316
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
317
+
318
+          this.start_time = startOfFourthQuarter
319
+          this.end_time = endOfFourthQuarter
320
+          this.getData()
321
+          break
322
+        case 9:
323
+          this.start_time = ''
324
+          this.end_time = ''
325
+          break
326
+      }
222 327
     },
328
+
329
+
223 330
     getSummaries(param) {
224
-        const { columns, data } = param;
225
-        const sums = [];
226
-        columns.forEach((column, index) => {
227
-          if (index === 0) {
228
-            sums[index] = '总价';
229
-            return;
230
-          }
231
-          const values = data.map(item => Number(item[column.property]));
232
-          if (!values.every(value => isNaN(value))) {
233
-            sums[index] = values.reduce((prev, curr) => {
234
-              const value = Number(curr);
235
-              if (!isNaN(value)) {
236
-                return prev + curr;
237
-              } else {
238
-                return prev;
239
-              }
240
-            }, 0);
241
-            sums[index] += ' 元';
242
-          } else {
243
-            sums[index] = 'N/A';
244
-          }
245
-        });
331
+      const { columns, data } = param
332
+      const sums = []
333
+      columns.forEach((column, index) => {
334
+        if (index === 0) {
335
+          sums[index] = '总价'
336
+          return
337
+        }
338
+        const values = data.map(item => Number(item[column.property]))
339
+        if (!values.every(value => isNaN(value))) {
340
+          sums[index] = values.reduce((prev, curr) => {
341
+            const value = Number(curr)
342
+            if (!isNaN(value)) {
343
+              return prev + curr
344
+            } else {
345
+              return prev
346
+            }
347
+          }, 0)
348
+          sums[index] += ' 元'
349
+        } else {
350
+          sums[index] = 'N/A'
351
+        }
352
+      })
246 353
 
247
-        return sums;
354
+      return sums
248 355
     },
249
-    handleClick(id){
250
-        console.log(id);
356
+    handleClick(id) {
357
+      console.log(id)
251 358
     }
252 359
   }
253 360
 
254 361
 }
255 362
 </script>
256 363
 <style lang="scss" scoped>
257
-.content_top{
258
-    display: flex;
259
-    justify-content: space-around;
260
-    color: #1e5feb;
364
+.content_top {
365
+  display: flex;
366
+  justify-content: space-around;
367
+  color: #1e5feb;
261 368
 }
262
-</style>
369
+</style>

+ 630 - 198
src/xt_pages/Dialysisanalysis/calcium/calciumalone.vue 查看文件

@@ -1,217 +1,649 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"
87
+                          v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
88
+              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="钙(mmol/L)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                  </template>
97
+                </el-table-column>
98
+
99
+                <el-table-column width="100" label="检查日期" align="center">
100
+                  <template slot-scope="scope">
101
+                  </template>
102
+                </el-table-column>
107 103
 
104
+                <el-table-column width="100" label="钙" align="center">
105
+                  <template slot-scope="scope">
106
+                  </template>
107
+                </el-table-column>
108
+              </el-table>
109
+
110
+              <el-pagination
111
+                align="right"
112
+                @size-change="handleSizeChange"
113
+                @current-change="handleCurrentChange"
114
+                :current-page="query.page"
115
+                :page-sizes="[10, 20, 50, 100]"
116
+                :page-size="10"
117
+                background
118
+                style="margin-top:20px;"
119
+                layout="total, sizes, prev, pager, next, jumper"
120
+                :total="total"
121
+              ></el-pagination>
122
+            </div>
123
+          </div>
124
+        </el-container>
125
+      </div>
108 126
     </div>
127
+  </div>
109 128
 </template>
129
+
130
+
110 131
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            myChart: {},
131
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
132
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
133
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
134
-            tableData:[],
132
+import echarts from 'echarts'
133
+// import LineChart from '../../qcd/components/LineChart'
134
+import {  uParseTime } from '@/utils/tools'
135
+import { getCurrentOrgPatients } from '@/api/common/common'
136
+import {
137
+  GetDefaultPatient,
138
+} from '@/api/common/statistics'
139
+import { PostSearch } from '@/api/patient'
140
+import { getDataConfig } from '@/utils/data'
141
+import { GetPersonQCStatistisData } from '../../../api/qcd'
142
+
143
+export default {
144
+  components: {
145
+  },
146
+  data() {
147
+    return {
148
+      pickerOptions: {
149
+        disabledDate(time) {
150
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
151
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
152
+
135 153
         }
136
-    },
137
-    created(){
138
-        
139
-    },
140
-    mounted() {
141
-        // this.$nextTick(function() {
142
-            this.initEcharts();
143
-		// })  
144
-        // this.myChart = echarts.init(document.getElementById("germychart"));
145
-        //     this.myChart.setOption(option);
146
-            //随着屏幕大小调节图表
147
-            window.addEventListener("resize", () => {
148
-                this.myChart.resize();
149
-            });
150
-    },
151
-    methods:{
152
-        handleSubmit(){
153
-            console.log('asdfa');
154
+      },
155
+      patient_name:'',
156
+      percent:[],
157
+      patientsData: [],
158
+      tableData: [],
159
+      loading: false,
160
+      search_value: '',
161
+      total: 0,
162
+      query: {
163
+        patient_id: '',
164
+        statistics_type: 1,
165
+        start_time: '',
166
+        end_time: '',
167
+        limit: 10,
168
+        page: 1
169
+      },
170
+      crumbs: [
171
+        { path: false, name: '科室质控' },
172
+        { path: false, name: '指标评估统计' },
173
+        { path: false, name: '透析过程指标统计' }
174
+      ],
175
+      tableData1: [],
176
+      chart: {
177
+        title: {
178
+          text: 'ECharts 入门示例'
154 179
         },
155
-        initEcharts() {
156
-            const option = {
157
-                xAxis: {
158
-                    type: 'category',
159
-                        boundaryGap:true,
160
-                        axisTick:{
161
-                            alignWithLabel:true //保证刻度线和标签对齐
162
-                        },
163
-                    data: this.xData,
164
-                    splitNumber:this.xData.length, //纵坐标数
165
-                    interval:this.xData //强制设置坐标轴分割间隔
166
-                },
167
-                yAxis: {
168
-                    type: 'value',
169
-                    boundaryGap: true,
170
-                    splitNumber:4, //纵坐标数
171
-                    interval:10 //强制设置坐标轴分割间隔
180
+        tooltip: {},
181
+        legend: {
182
+          data: [],
183
+          left: 0
184
+        },
185
+        xAxis: {
186
+          data: []
187
+        },
188
+        yAxis: {
189
+          axisLabel: {
190
+            formatter: '{value} %'
191
+          },
192
+          show: false
193
+        },
194
+        series: [
195
+          {
196
+            name: '',
197
+            type: 'line',
198
+            data: [],
199
+            barWidth: 30,
200
+            label: {
201
+              normal: {
202
+                show: true,
203
+                position: 'top',
204
+                formatter: (params) => {
205
+                  if(this.percent.length > 0){
206
+                    let str = ''
207
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
208
+                    return str
209
+                  }else{
210
+                    let str = ''
211
+                    str = params.data
212
+                    return str
213
+                  }
214
+                }
215
+              }
216
+            },
217
+            //配置样式
218
+            itemStyle: {
219
+              //通常情况下:
220
+
221
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
222
+              normal: {
223
+                color: function(params) {
224
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
225
+                  var colorList = [
226
+                    ['#A9E0F3', '#9FBDFC'],
227
+
228
+                    ['#FFD7C0', '#FF9994']
229
+                  ]
230
+
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[index][0] },
238
+                    // { offset: 0.5, color: colorList[index][1] },
239
+                    { offset: 1, color: colorList[index][1] }
240
+                  ])
172 241
                 },
173
-                legend: {
174
-                    show: true,
175
-                    align:'left',//文字在前图标在后
176
-                    left:'15%',
177
-                    top:'5%',
178
-                    data: [{name:'钙mmol/L'}]
242
+                lineStyle:{
243
+                  color:'#409eff' //改变折线颜色
179 244
                 },
180
-                series: [
181
-                {
182
-                    data: this.opinionData,
183
-                    name:'钙mmol/L',
184
-                    type: "line",// 类型设置为折线图
185
-                    symbol: 'circle',
186
-                    itemStyle: {
187
-                        normal: {
188
-                            color: '#409eff', //改变折线点的颜色#a80000
189
-                            lineStyle: {
190
-                                color: '#409eff' //改变折线颜色
191
-                            }
192
-                        }
193
-                    },
245
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
246
+              },
194 247
 
195
-                },
196
-                
197
-                ],
198
-                
199
-            };
200
-            this.myChart = echarts.init(document.getElementById("germychart"));
201
-            this.myChart.setOption(option);
202
-            //随着屏幕大小调节图表
203
-            window.addEventListener("resize", () => {
204
-                this.myChart.resize();
205
-            });
248
+              //鼠标悬停时:
249
+              emphasis: {
250
+                shadowBlur: 10,
251
+                shadowOffsetX: 0,
252
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
253
+              }
254
+            }
255
+          }
256
+        ],
257
+        dataZoom: [
258
+          {
259
+            // Y轴固定,让内容滚动
260
+            type: 'slider',
261
+            show: false,
262
+            xAxisIndex: [0],
263
+            start: 1,
264
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
265
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
266
+          },
267
+          {
268
+            type: 'inside',
269
+            xAxisIndex: [0],
270
+            start: 1,
271
+            end: 20,
272
+            zoomLock: true // 锁定区域禁止缩放
273
+          }
274
+        ]
275
+      },
276
+      bar: {
277
+        title: {
278
+          text: 'ECharts 入门示例'
279
+        },
280
+        tooltip: {},
281
+        legend: {
282
+          data: [],
283
+          left: 0
206 284
         },
285
+        xAxis: {
286
+          data: []
287
+        },
288
+        yAxis: {
289
+          axisLabel: {
290
+            formatter: '{value} %'
291
+          },
292
+          show: false
293
+        },
294
+        series: [
295
+          {
296
+            name: '',
297
+            type: 'bar',
298
+            data: [],
299
+            barWidth: 30,
300
+            label: {
301
+              normal: {
302
+                show: true,
303
+                position: 'top',
304
+                formatter: (params) => {
305
+                  if(this.percent.length > 0){
306
+                    let str = ''
307
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
308
+                    return str
309
+                  }else{
310
+                    let str = ''
311
+                    str = params.data
312
+                    return str
313
+                  }
314
+                }
315
+              }
316
+            },
317
+            //配置样式
318
+            itemStyle: {
319
+              //通常情况下:
320
+
321
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
322
+              normal: {
323
+                color: function(params) {
324
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
325
+                  var colorList = [
326
+                    ['#A9E0F3', '#9FBDFC'],
327
+                    ['#FFD7C0', '#FF9994']
328
+                  ]
329
+
330
+                  var index = params.dataIndex
331
+                  if (params.dataIndex >= colorList.length) {
332
+                    index = params.dataIndex % colorList.length
333
+                  }
334
+
335
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
336
+                    { offset: 0, color: colorList[index][0] },
337
+                    // { offset: 0.5, color: colorList[index][1] },
338
+                    { offset: 1, color: colorList[index][1] }
339
+                  ])
340
+                },
341
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
342
+              },
343
+
344
+              //鼠标悬停时:
345
+              emphasis: {
346
+                shadowBlur: 10,
347
+                shadowOffsetX: 0,
348
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
349
+              }
350
+            }
351
+          }
352
+        ]
353
+      }
354
+
355
+    }
356
+  },
357
+  methods: {
358
+    printAction(){
359
+      this.$router.push({
360
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
361
+      });
362
+
363
+    },exportAction(){
364
+      let list = []
365
+      for (let i = 0; i < this.tableData.length; i++) {
366
+        let order = this.tableData[i]
367
+        let name = order.name
368
+        let item_name = order.item_name
369
+        let count = order.count
370
+        let price = order.price.toFixed(2)
371
+        let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
372
+        let total = order.total.toFixed(2)
373
+
374
+        let obj = {
375
+          '患者姓名': name,
376
+          '项目名称': item_name,
377
+          '数量': count,
378
+          '单价': price,
379
+          '费用': pay_sumamt,
380
+          '费用总额': total
381
+        }
382
+        list.push(obj)
383
+      }
384
+      import('@/vendor/Export2Excel').then(excel => {
385
+        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
386
+        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
387
+        const data = this.formatJson(filterVal, list)
388
+        excel.export_json_to_excel1({
389
+          header: tHeader,
390
+          data,
391
+          filename: '明细',
392
+          ref: this.$refs['table'].$el
393
+        })
394
+      })
395
+    },
396
+    changeProject(val) {
397
+      this.query.statistics_type = val
398
+      this.query.page = 1
399
+      this.GetPersonQCStatistisData(this.query)
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleChange(val) {
404
+      this.query.patient_id = val.id
405
+      this.query.page = 1
406
+      this.patient_name = val.name
407
+      this.GetPersonQCStatistisData(this.query)
408
+      this.GetInspectionCheckIndexTableData(this.query)
409
+    },
410
+    handleSizeChange(limit) {
411
+      this.query.limit = limit
412
+      this.GetInspectionCheckIndexTableData(this.query)
413
+
207 414
     },
208
-    
415
+    handleCurrentChange(page) {
416
+      this.query.page = page
417
+      this.GetPersonQCStatistisData(this.query)
418
+    },formatJson(filterVal, jsonData) {
419
+      return jsonData.map(v => filterVal.map(j => v[j]))
420
+    },
421
+    changeTime(val) {
422
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
423
+      if (time > 0) {
424
+        this.$message.error('结束时间不能小于开始时间')
425
+        this.query.start_time = ''
426
+      } else {
427
+        // this.getDialysisList()
428
+        this.query.page = 1
429
+        this.GetPersonQCStatistisData(this.query)
430
+        this.GetInspectionCheckIndexTableData(this.query)
431
+
432
+      }
433
+
434
+    },
435
+    changeEndTime(val) {
436
+      var time =
437
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
438
+      if (time < 0) {
439
+        this.$message.error('结束时间不能小于开始时间')
440
+        this.query.end_time = ''
441
+      } else {
442
+        this.query.page = 1
443
+        this.GetPersonQCStatistisData(this.query)
444
+        this.GetInspectionCheckIndexTableData(this.query)
445
+
446
+      }
447
+    },
448
+    getTimestamp(time) {
449
+      // 把时间日期转成时间戳
450
+      return new Date(time).getTime() / 1000
451
+    },
452
+    QueryOperaById: function(val) {
453
+      let vascular_access_desc_name = ''
454
+      let vascular_access_desc = getDataConfig(
455
+        'hemodialysis',
456
+        'vascular_access_desc'
457
+      )
458
+      for (let i = 0; i < vascular_access_desc.length; i++) {
459
+        if (vascular_access_desc[i].id == val) {
460
+          vascular_access_desc_name = vascular_access_desc[i].name
461
+        }
462
+      }
463
+
464
+      return vascular_access_desc_name
465
+    },
466
+    GetAnticoagulantById: function(val) {
467
+      let anticoagulan_name = ''
468
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
469
+      let anticoagulant = anticoagulantsConfitTwo
470
+      for (let keys in anticoagulant) {
471
+        if (anticoagulant[keys].id == val) {
472
+          anticoagulan_name = anticoagulant[keys].name
473
+        }
474
+      }
475
+      return anticoagulan_name
476
+    },
477
+    getModeName(mode_id) {
478
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
479
+    },  getTime(val) {
480
+      if(val == "" || val == undefined){
481
+        return ""
482
+      }else {
483
+        return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
484
+      }
485
+    },
486
+    GetInspectionCheckIndexTableData(params) {
487
+      this.loading = true
488
+      GetPersonQCStatistisData(params)
489
+        .then(rs => {
490
+          var resp = rs.data
491
+          console.log("resp=====",resp)
492
+          if (resp.state == 1) {
493
+            this.loading = false
494
+            this.tableData = []
495
+            for (let i = 0; i < resp.data.inspections.length; i++) {
496
+              this.tableData.push(resp.data.inspections[i])
497
+            }
498
+            this.total = resp.data.total
499
+
500
+          } else {
501
+            this.loading = false
502
+          }
503
+        })
504
+        .catch(error => {
505
+
506
+        })
507
+    },
508
+    GetPersonQCStatistisData(params) {
509
+      this.chart.xAxis.data = []
510
+      this.chart.series[0].data = []
511
+      this.bar.xAxis.data = []
512
+      this.bar.series[0].data = []
513
+      this.percent = []
514
+      GetPersonQCStatistisData(params)
515
+        .then(rs => {
516
+          var resp = rs.data
517
+          if (resp.state == 1) {
518
+            for (let i = 0; i < resp.data.inspections.length; i++) {
519
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
520
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
521
+            }
522
+            this.getArrLength(this.chart.xAxis.data,1)
523
+          } else {
524
+
525
+          }
526
+        })
527
+        .catch(error => {
528
+        })
529
+    },
530
+    handleSelect(val) {
531
+      this.query.patient_id = val.id
532
+      this.query.page = 1
533
+      this.patient_name = val.name
534
+      for (let i = 0;i < this.patientsData.length; i++){
535
+        if (this.patientsData[i].id == val.id){
536
+          this.$refs.table.setCurrentRow(this.patientsData[i])
537
+        }
538
+      }
539
+
540
+
541
+    },
542
+    querySearchAsync(keyword, cb) {
543
+      let key = ''
544
+      if (keyword != undefined) {
545
+        key = keyword
546
+      }
547
+      let searchArray = []
548
+      PostSearch(key).then(response => {
549
+        if (response.data.state == 1) {
550
+          searchArray = response.data.data.patient
551
+          cb(searchArray)
552
+        } else {
553
+          cb([])
554
+        }
555
+      })
556
+    },
557
+    chooseWay(way) {
558
+      this.wayType = way
559
+    }, getCurrentOrgPatients() {
560
+      getCurrentOrgPatients().then(response => {
561
+        if (response.data.state == 1) {
562
+          var patients = response.data.data.patients
563
+          this.patientsData = patients
564
+          this.GetDefaultPatient()
565
+        }
566
+      })
567
+    }, GetDefaultPatient() {
568
+      GetDefaultPatient().then(response => {
569
+        if (response.data.state == 1) {
570
+          var patient = response.data.data.patient
571
+          for (let i = 0;i < this.patientsData.length; i++){
572
+            if (this.patientsData[i].id == patient.id){
573
+              this.patient_name = this.patientsData[i].name
574
+              this.$refs.table.setCurrentRow(this.patientsData[i])
575
+            }
576
+          }
577
+          this.query.patient_id = patient.id
578
+          this.GetPersonQCStatistisData(this.query)
579
+
580
+        }
581
+      })
582
+
583
+    },
584
+    getArrLength(result,type){
585
+      if(type == 1){
586
+        if(result.length > 10){
587
+          var dataZoom_end = (10/result.length)*100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }else{
590
+          var dataZoom_end = 100;
591
+          this.chart.dataZoom[0].end = dataZoom_end
592
+        }
593
+      }else if(type == 2){
594
+        if(result.length > 10){
595
+          var dataZoom_end = (10/result.length)*100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }else{
598
+          var dataZoom_end = 100;
599
+          this.bar.dataZoom[0].end = dataZoom_end
600
+        }
601
+      }
602
+
603
+    }
604
+  }, mounted() {
605
+    var date = new Date()
606
+    var year = date.getFullYear() //获取完整的年份(4位)
607
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
608
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
609
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
610
+    this.query.patient_id = 0
611
+    this.query.end_time = year + '-' + month + '-' + day
612
+    this.query.start_time = year + '-' + last_month + '-' + day
613
+    this.query.project_id = 4
614
+    this.query.item_id = 289
615
+    this.getCurrentOrgPatients()
616
+
617
+    // this.GetPersonQCStatistisData()
618
+
619
+
620
+  }
209 621
 }
210 622
 </script>
623
+
211 624
 <style lang="scss" scoped>
212
-.content_top{
213
-    display: flex;
214
-    justify-content: space-around;
215
-    margin-bottom: 20px;
625
+.tableTitle {
626
+  font-size: 16px;
627
+  color: #000;
628
+  font-weight: bold;
629
+  margin-bottom: 10px;
630
+}
631
+</style>
632
+<style lang="scss">
633
+.page_process {
634
+.el-tabs{
635
+  margin-bottom:0 !important;
636
+}
637
+.el-button--medium {
638
+  padding: 10px 8px;
639
+}
640
+
641
+.el-form-item {
642
+  margin-bottom: 0;
643
+}
644
+::-webkit-scrollbar{
645
+  height: 15px !important;
646
+}
647
+
216 648
 }
217
-</style>
649
+</style>

+ 125 - 0
src/xt_pages/Dialysisanalysis/components/BarChart.vue 查看文件

@@ -0,0 +1,125 @@
1
+<template>
2
+  <div :class="className" :style="{height:height,width:width}"></div>
3
+</template>
4
+
5
+<script>
6
+import echarts from "echarts";
7
+require("echarts/theme/macarons"); // echarts theme
8
+import { debounce } from "@/utils";
9
+
10
+const animationDuration = 6000;
11
+
12
+export default {
13
+  props: {
14
+    className: {
15
+      type: String,
16
+      default: "chart"
17
+    },
18
+    width: {
19
+      type: String,
20
+      default: "100%"
21
+    },
22
+    height: {
23
+      type: String,
24
+      default: "380px"
25
+    },
26
+    title: {
27
+      type: String,
28
+      default: "chart"
29
+    },
30
+    options: {
31
+      type: Object,
32
+      default: function() {
33
+        return {};
34
+      }
35
+    }
36
+  },
37
+  data() {
38
+    return {
39
+      chart: null,
40
+      chartOptions: {}
41
+    };
42
+  },
43
+  mounted() {
44
+    this.initChart();
45
+    this.__resizeHanlder = debounce(() => {
46
+      if (this.chart) {
47
+        this.chart.resize();
48
+      }
49
+    }, 100);
50
+    window.addEventListener("resize", this.__resizeHanlder);
51
+  },
52
+  beforeDestroy() {
53
+    if (!this.chart) {
54
+      return;
55
+    }
56
+    window.removeEventListener("resize", this.__resizeHanlder);
57
+    this.chart.dispose();
58
+    this.chart = null;
59
+  },
60
+  created() {},
61
+  watch: {
62
+    options: function() {
63
+      this.chartOptions = this.options;
64
+      this.initChart();
65
+      this.__resizeHanlder = debounce(() => {
66
+        if (this.chart) {
67
+          this.chart.resize();
68
+        }
69
+      }, 100);
70
+      window.addEventListener("resize", this.__resizeHanlder);
71
+    }
72
+  },
73
+  methods: {
74
+    initChart() {
75
+      console.log("this.chartOptions", this.chartOptions);
76
+      this.chart = echarts.init(this.$el, "macarons");
77
+      this.chart.setOption({
78
+        title: {
79
+          text: this.title
80
+        },
81
+        tooltip: {
82
+          trigger: "axis",
83
+          axisPointer: {
84
+            // 坐标轴指示器,坐标轴触发有效
85
+            type: "shadow" // 默认为直线,可选为:'line' | 'shadow'
86
+          }
87
+        },
88
+        grid: {
89
+          left: "2%",
90
+          right: "2%",
91
+          bottom: "3%",
92
+          containLabel: true
93
+        },
94
+        xAxis: [
95
+          {
96
+            type: "category",
97
+            data: this.chartOptions.xAxis,
98
+            axisTick: {
99
+              alignWithLabel: true
100
+            }
101
+          }
102
+        ],
103
+        yAxis: [
104
+          {
105
+            type: "value",
106
+            axisTick: {
107
+              show: false
108
+            }
109
+          }
110
+        ],
111
+        series: [
112
+          {
113
+            name: "",
114
+            type: "bar",
115
+            stack: "vistors",
116
+            barWidth: "60%",
117
+            data: this.chartOptions.series,
118
+            animationDuration
119
+          }
120
+        ]
121
+      });
122
+    }
123
+  }
124
+};
125
+</script>

+ 261 - 0
src/xt_pages/Dialysisanalysis/components/LineChart.vue 查看文件

@@ -0,0 +1,261 @@
1
+<template>
2
+  <div :class="className" :style="{height:height,width:width}"></div>
3
+</template>
4
+
5
+<script>
6
+import echarts from "echarts";
7
+require("echarts/theme/macarons"); // echarts theme
8
+import { debounce } from "@/utils";
9
+
10
+export default {
11
+  props: {
12
+    className: {
13
+      type: String,
14
+      default: "chart"
15
+    },
16
+    width: {
17
+      type: String,
18
+      default: "100%"
19
+    },
20
+    height: {
21
+      type: String,
22
+      default: "230px"
23
+    },
24
+    autoResize: {
25
+      type: Boolean,
26
+      default: true
27
+    },
28
+    chartData: {
29
+      type: Object
30
+    },
31
+    title: {
32
+      type: String,
33
+      default: "chart"
34
+    },
35
+    options: {
36
+      type: Object,
37
+      default: function() {
38
+        return {};
39
+      }
40
+    }
41
+  },
42
+  data() {
43
+    return {
44
+      chart: null,
45
+      chartOptions: {
46
+        xAxis: [],
47
+        legend: [],
48
+        series: []
49
+      }
50
+    };
51
+  },
52
+  mounted() {
53
+    this.initChart();
54
+    if (this.autoResize) {
55
+      this.__resizeHanlder = debounce(() => {
56
+        if (this.chart) {
57
+          this.chart.resize();
58
+        }
59
+      }, 100);
60
+      window.addEventListener("resize", this.__resizeHanlder);
61
+    }
62
+
63
+    // 监听侧边栏的变化
64
+    const sidebarElm = document.getElementsByClassName("sidebar-container")[0];
65
+    sidebarElm.addEventListener("transitionend", this.__resizeHanlder);
66
+  },
67
+  beforeDestroy() {
68
+    if (!this.chart) {
69
+      return;
70
+    }
71
+    if (this.autoResize) {
72
+      window.removeEventListener("resize", this.__resizeHanlder);
73
+    }
74
+
75
+    const sidebarElm = document.getElementsByClassName("sidebar-container")[0];
76
+    sidebarElm.removeEventListener("transitionend", this.__resizeHanlder);
77
+
78
+    this.chart.dispose();
79
+    this.chart = null;
80
+  },
81
+  watch: {
82
+    // options: function(a) {
83
+    //   console.log(a)
84
+    //   this.chartOptions = this.options;
85
+    //   this.initChart();
86
+    //   this.__resizeHanlder = debounce(() => {
87
+    //     if (this.chart) {
88
+    //       this.chart.resize();
89
+    //     }
90
+    //   }, 100);
91
+    //   window.addEventListener("resize", this.__resizeHanlder);
92
+    // },
93
+    options:{
94
+      handler(newValue,oldValue){
95
+        this.getInitChart();
96
+      },
97
+      deep:true
98
+    },
99
+
100
+    chartData: {
101
+      deep: true,
102
+      handler(val) {
103
+        this.setOptions(val);
104
+      }
105
+    }
106
+  },
107
+  created() {
108
+    this.chartOptions = this.options;
109
+    // console.log("this.chartOptions", this.chartOptions, this.options);
110
+  },
111
+  methods: {
112
+    getInitChart() {
113
+      this.chartOptions = this.options;
114
+      this.initChart();
115
+      this.__resizeHanlder = debounce(() => {
116
+        if (this.chart) {
117
+          this.chart.resize();
118
+        }
119
+      }, 100);
120
+      window.addEventListener("resize", this.__resizeHanlder);
121
+    },
122
+    // setOptions({ expectedData, actualData } = {}) {
123
+    //   this.chart.setOption({
124
+    //     title: {
125
+    //         text: this.title,
126
+    //     },
127
+    //     xAxis: {
128
+    //       data: this.chartOptions.xAxis,
129
+    //       boundaryGap: false,
130
+    //       axisTick: {
131
+    //         show: false
132
+    //       }
133
+    //     },
134
+    //     grid: {
135
+    //       left: 50,
136
+    //       right: 50,
137
+    //       bottom: 20,
138
+    //       top: 30,
139
+    //       containLabel: true
140
+    //     },
141
+    //     tooltip: {
142
+    //       trigger: 'axis',
143
+    //       axisPointer: {
144
+    //         type: 'cross'
145
+    //       },
146
+    //       padding: [5, 10]
147
+    //     },
148
+    //     yAxis: {
149
+    //       axisTick: {
150
+    //         show: false
151
+    //       }
152
+    //     },
153
+    //     legend: {
154
+    //       data: this.chartOptions.legend,
155
+    //     },
156
+    //     series: this.chartOptions.series,
157
+    //   })
158
+    // },
159
+    setOptions({ expectedData, actualData } = {}) {
160
+      this.chart.setOption({
161
+        // title: {
162
+        //   text: this.title
163
+        // },
164
+        xAxis: {
165
+          data: this.chartOptions.xAxis.data,
166
+          // boundaryGap: false
167
+          axisTick: {
168
+            show: true
169
+          },
170
+          axisLine: {
171
+            lineStyle: {
172
+              color: "#E5E5E5" //x轴颜色
173
+            }
174
+          },
175
+          axisLabel: {
176
+            interval: 0,
177
+            formatter: function(value) {
178
+              var ret = ""; //拼接加\n返回的类目项
179
+              var maxLength = 10; //每项显示文字个数
180
+              var valLength = value.length; //X轴类目项的文字个数
181
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
182
+              if (rowN > 1) {
183
+                //如果类目项的文字大于3,
184
+                for (var i = 0; i < rowN; i++) {
185
+                  var temp = ""; //每次截取的字符串
186
+                  var start = i * maxLength; //开始截取的位置
187
+                  var end = start + maxLength; //结束截取的位置
188
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
189
+                  temp = value.substring(start, end) + "\n";
190
+                  ret += temp; //凭借最终的字符串
191
+                }
192
+                return ret;
193
+              } else {
194
+                return value;
195
+              }
196
+            },
197
+            textStyle: {
198
+              color:"#2F3133"
199
+            }
200
+          }
201
+        },
202
+        grid: {
203
+          left: 0,
204
+          right: 50,
205
+          bottom: 10,
206
+          top: 30,
207
+          containLabel: true
208
+        },
209
+        tooltip: {
210
+          trigger: "axis",
211
+          axisPointer: {
212
+            type: "cross"
213
+          },
214
+          padding: [5, 10]
215
+        },
216
+        yAxis: {
217
+          axisTick: {
218
+            show: true
219
+          },
220
+          axisLine: {
221
+            lineStyle: {
222
+              color: "#E5E5E5" //y轴颜色
223
+            },
224
+          },
225
+          axisLabel: {
226
+            textStyle: {
227
+              color:"#2F3133"
228
+            }
229
+          }
230
+        },
231
+        // dataZoom: [
232
+        //   {
233
+        //     //Y轴固定,让内容滚动
234
+        //     type: "slider",
235
+        //     show: false,
236
+        //     xAxisIndex: [0],
237
+        //     start: 1,
238
+        //     end: 80, //设置X轴刻度之间的间隔(根据数据量来调整)
239
+        //     zoomLock: true //锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
240
+        //   },
241
+        //   {
242
+        //     type: "inside",
243
+        //     xAxisIndex: [0],
244
+        //     start: 1,
245
+        //     end: 80,
246
+        //     zoomLock: true //锁定区域禁止缩放
247
+        //   }
248
+        // ],
249
+        legend: this.chartOptions.legend,
250
+        series: this.chartOptions.series,
251
+        dataZoom: this.chartOptions.dataZoom,
252
+      });
253
+    },
254
+    initChart() {
255
+      this.chart = echarts.init(this.$el, "macarons");
256
+      this.chart.clear();
257
+      this.setOptions(this.chartData);
258
+    }
259
+  }
260
+};
261
+</script>

+ 262 - 0
src/xt_pages/Dialysisanalysis/components/LineChart1.vue 查看文件

@@ -0,0 +1,262 @@
1
+<template>
2
+  <div :class="className" :style="{height:height,width:width}"></div>
3
+</template>
4
+
5
+<script>
6
+import echarts from "echarts";
7
+require("echarts/theme/macarons"); // echarts theme
8
+import { debounce } from "@/utils";
9
+
10
+export default {
11
+  props: {
12
+    className: {
13
+      type: String,
14
+      default: "chart"
15
+    },
16
+    width: {
17
+      type: String,
18
+      default: "100%"
19
+    },
20
+    height: {
21
+      type: String,
22
+      default: "230px"
23
+    },
24
+    autoResize: {
25
+      type: Boolean,
26
+      default: true
27
+    },
28
+    chartData: {
29
+      type: Object
30
+    },
31
+    title: {
32
+      type: String,
33
+      default: "chart"
34
+    },
35
+    options: {
36
+      type: Object,
37
+      default: function() {
38
+        return {};
39
+      }
40
+    }
41
+  },
42
+  data() {
43
+    return {
44
+      chart: null,
45
+      chartOptions: {
46
+        xAxis: [],
47
+        legend: [],
48
+        series: []
49
+      }
50
+    };
51
+  },
52
+  mounted() {
53
+    this.initChart();
54
+    if (this.autoResize) {
55
+      this.__resizeHanlder = debounce(() => {
56
+        if (this.chart) {
57
+          this.chart.resize();
58
+        }
59
+      }, 100);
60
+      window.addEventListener("resize", this.__resizeHanlder);
61
+    }
62
+
63
+    // 监听侧边栏的变化
64
+    const sidebarElm = document.getElementsByClassName("sidebar-container")[0];
65
+    sidebarElm.addEventListener("transitionend", this.__resizeHanlder);
66
+  },
67
+  beforeDestroy() {
68
+    if (!this.chart) {
69
+      return;
70
+    }
71
+    if (this.autoResize) {
72
+      window.removeEventListener("resize", this.__resizeHanlder);
73
+    }
74
+
75
+    const sidebarElm = document.getElementsByClassName("sidebar-container")[0];
76
+    sidebarElm.removeEventListener("transitionend", this.__resizeHanlder);
77
+
78
+    this.chart.dispose();
79
+    this.chart = null;
80
+  },
81
+  watch: {
82
+    // options: function(a) {
83
+    //   console.log(a)
84
+    //   this.chartOptions = this.options;
85
+    //   this.initChart();
86
+    //   this.__resizeHanlder = debounce(() => {
87
+    //     if (this.chart) {
88
+    //       this.chart.resize();
89
+    //     }
90
+    //   }, 100);
91
+    //   window.addEventListener("resize", this.__resizeHanlder);
92
+    // },
93
+    options:{
94
+      handler(newValue,oldValue){
95
+        this.getInitChart();
96
+      },
97
+      deep:true
98
+    },
99
+
100
+    chartData: {
101
+      deep: true,
102
+      handler(val) {
103
+        this.setOptions(val);
104
+      }
105
+    }
106
+  },
107
+  created() {
108
+    this.chartOptions = this.options;
109
+    // console.log("this.chartOptions", this.chartOptions, this.options);
110
+  },
111
+  methods: {
112
+    getInitChart() {
113
+      this.chartOptions = this.options;
114
+      this.initChart();
115
+      this.__resizeHanlder = debounce(() => {
116
+        if (this.chart) {
117
+          this.chart.resize();
118
+        }
119
+      }, 100);
120
+      window.addEventListener("resize", this.__resizeHanlder);
121
+    },
122
+    // setOptions({ expectedData, actualData } = {}) {
123
+    //   this.chart.setOption({
124
+    //     title: {
125
+    //         text: this.title,
126
+    //     },
127
+    //     xAxis: {
128
+    //       data: this.chartOptions.xAxis,
129
+    //       boundaryGap: false,
130
+    //       axisTick: {
131
+    //         show: false
132
+    //       }
133
+    //     },
134
+    //     grid: {
135
+    //       left: 50,
136
+    //       right: 50,
137
+    //       bottom: 20,
138
+    //       top: 30,
139
+    //       containLabel: true
140
+    //     },
141
+    //     tooltip: {
142
+    //       trigger: 'axis',
143
+    //       axisPointer: {
144
+    //         type: 'cross'
145
+    //       },
146
+    //       padding: [5, 10]
147
+    //     },
148
+    //     yAxis: {
149
+    //       axisTick: {
150
+    //         show: false
151
+    //       }
152
+    //     },
153
+    //     legend: {
154
+    //       data: this.chartOptions.legend,
155
+    //     },
156
+    //     series: this.chartOptions.series,
157
+    //   })
158
+    // },
159
+    setOptions({ expectedData, actualData } = {}) {
160
+      this.chart.setOption({
161
+        // title: {
162
+        //   text: this.title
163
+        // },
164
+        xAxis: {
165
+          data: this.chartOptions.xAxis.data,
166
+          // boundaryGap: false
167
+          axisTick: {
168
+            show: true
169
+          },
170
+          axisLine: {
171
+            lineStyle: {
172
+              color: "#E5E5E5" //x轴颜色
173
+            }
174
+          },
175
+          axisLabel: {
176
+            interval: 0,
177
+            formatter: function(value) {
178
+              var ret = ""; //拼接加\n返回的类目项
179
+              var maxLength = 10; //每项显示文字个数
180
+              var valLength = value.length; //X轴类目项的文字个数
181
+              var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
182
+              if (rowN > 1) {
183
+                //如果类目项的文字大于3,
184
+                for (var i = 0; i < rowN; i++) {
185
+                  var temp = ""; //每次截取的字符串
186
+                  var start = i * maxLength; //开始截取的位置
187
+                  var end = start + maxLength; //结束截取的位置
188
+                  //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
189
+                  temp = value.substring(start, end) + "\n";
190
+                  ret += temp; //凭借最终的字符串
191
+                }
192
+                return ret;
193
+              } else {
194
+                return value;
195
+              }
196
+            },
197
+            textStyle: {
198
+              color:"#2F3133"
199
+            }
200
+          }
201
+        },
202
+        grid: {
203
+          left: 0,
204
+          right: 50,
205
+          bottom: 10,
206
+          top: 30,
207
+          containLabel: true
208
+        },
209
+        tooltip: {
210
+          trigger: "axis",
211
+          axisPointer: {
212
+            type: "cross"
213
+          },
214
+          padding: [5, 10]
215
+        },
216
+        yAxis: {
217
+          axisTick: {
218
+            show: true
219
+          },
220
+          axisLine: {
221
+            lineStyle: {
222
+              color: "#E5E5E5" //y轴颜色
223
+            },
224
+          },
225
+          axisLabel: {
226
+            textStyle: {
227
+              color:"#2F3133"
228
+            }
229
+          },
230
+          max:2
231
+        },
232
+        // dataZoom: [
233
+        //   {
234
+        //     //Y轴固定,让内容滚动
235
+        //     type: "slider",
236
+        //     show: false,
237
+        //     xAxisIndex: [0],
238
+        //     start: 1,
239
+        //     end: 80, //设置X轴刻度之间的间隔(根据数据量来调整)
240
+        //     zoomLock: true //锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
241
+        //   },
242
+        //   {
243
+        //     type: "inside",
244
+        //     xAxisIndex: [0],
245
+        //     start: 1,
246
+        //     end: 80,
247
+        //     zoomLock: true //锁定区域禁止缩放
248
+        //   }
249
+        // ],
250
+        legend: this.chartOptions.legend,
251
+        series: this.chartOptions.series,
252
+        dataZoom: this.chartOptions.dataZoom,
253
+      });
254
+    },
255
+    initChart() {
256
+      this.chart = echarts.init(this.$el, "macarons");
257
+      this.chart.clear();
258
+      this.setOptions(this.chartData);
259
+    }
260
+  }
261
+};
262
+</script>

+ 108 - 0
src/xt_pages/Dialysisanalysis/components/PieChart.vue 查看文件

@@ -0,0 +1,108 @@
1
+<template>
2
+  <div :class="className" :style="{height:height,width:width}"></div>
3
+</template>
4
+
5
+<script>
6
+import echarts from 'echarts'
7
+require('echarts/theme/macarons') // echarts theme
8
+import { debounce } from '@/utils'
9
+
10
+export default {
11
+  props: {
12
+    className: {
13
+      type: String,
14
+      default: 'chart'
15
+    },
16
+    width: {
17
+      type: String,
18
+      default: '100%'
19
+    },
20
+    height: {
21
+      type: String,
22
+      default: '380px'
23
+    },
24
+    title:{
25
+      type: String,
26
+      default: 'chart'
27
+    },
28
+    options:{
29
+      type:Object,
30
+      default:function(){
31
+        return {}
32
+      }
33
+    }
34
+  },
35
+  data() {
36
+    return {
37
+      chart: null,
38
+      chartOptions:{},
39
+    }
40
+  },
41
+  mounted() {
42
+    this.initChart()
43
+    this.__resizeHanlder = debounce(() => {
44
+      if (this.chart) {
45
+        this.chart.resize()
46
+      }
47
+    }, 100)
48
+    window.addEventListener('resize', this.__resizeHanlder)
49
+  },
50
+  beforeDestroy() {
51
+    if (!this.chart) {
52
+      return
53
+    }
54
+    window.removeEventListener('resize', this.__resizeHanlder)
55
+    this.chart.dispose()
56
+    this.chart = null
57
+  },
58
+  created(){
59
+    this.chartOptions = this.options;
60
+  },
61
+  methods: {
62
+    initChart() {
63
+      this.chart = echarts.init(this.$el, 'macarons')
64
+
65
+      this.chart.setOption({
66
+        title: {
67
+            text: this.title,
68
+        },
69
+        tooltip: {
70
+          trigger: 'item',
71
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
72
+        },
73
+        legend: {
74
+          left: 'center',
75
+          bottom: '10',
76
+          data: this.chartOptions.legend,
77
+        },
78
+        calculable: true,
79
+        series: [
80
+          {
81
+            name: '',
82
+            type: 'pie',
83
+            roseType: 'radius',
84
+            radius: [15, 95],
85
+            center: ['50%', '38%'],
86
+            data: this.chartOptions.series,
87
+            animationEasing: 'cubicInOut',
88
+            animationDuration: 2600
89
+          }
90
+        ]
91
+      })
92
+    }
93
+  },
94
+  watch:{
95
+    "options":function(){
96
+      this.chartOptions = this.options;
97
+      this.initChart()
98
+      this.__resizeHanlder = debounce(() => {
99
+        if (this.chart) {
100
+          this.chart.resize() 
101
+        }
102
+      }, 100)
103
+      window.addEventListener('resize', this.__resizeHanlder)
104
+    }
105
+    
106
+  } 
107
+}
108
+</script>

+ 335 - 226
src/xt_pages/Dialysisanalysis/hemoglobin/hemoglobinall.vue 查看文件

@@ -1,261 +1,370 @@
1 1
 <template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-        <el-row :gutter="20">
31
-        <el-col :span="5"> 
32
-          <div class="block">
33
-            <span>查询时间:</span>
34
-            <el-date-picker
35
-            v-model="time_month"
36
-            type="month"
37
-            placeholder="选择月">
38
-            </el-date-picker>
39
-          </div>
40
-        </el-col>
41
-        <el-col :span="8">
42
-          <div>
43
-            <el-date-picker
44
-            v-model="stat_time"
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
45 26
             type="date"
27
+
46 28
             placeholder="选择日期">
47
-            </el-date-picker>
48
-            <span>-</span>
49
-            <el-date-picker
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
50 33
             v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
51 36
             type="date"
52 37
             placeholder="选择日期">
53
-            </el-date-picker>
54
-          </div>
55
-        </el-col>
56
-        <el-col :span="3">
57
-          <div style="width: 200px;">
58
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
59
-          </div>
60
-        </el-col>
61
-        <el-col :span="2">
62
-            <el-button type="primary">查询</el-button>
63
-        </el-col>
64
-        </el-row>
65
-        
66
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
67
-          <p class="chartTitle">统计图</p>
38
+          </el-date-picker>
68 39
         </div>
69
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
70
-        <div style="width: 80%;margin: auto;">
71
-            <el-table
72
-            :data="tableData"
73
-            :show-summary = true
74
-            border
75
-            style="width: 100%;">
76
-                <el-table-column
77
-                    prop="date"
78
-                    align="center"
79
-                    label="血红蛋白"
80
-                    >
81
-                </el-table-column>
82
-                <el-table-column
83
-                    prop="name"
84
-                    
85
-                    label="人数"
86
-                    >
87
-                </el-table-column>
88
-                <el-table-column
89
-                    prop="address"
90
-                    align="center"
91
-                    label="操作">
92
-                    <template slot-scope="scope">
93
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
94
-                                type="text" >查看详情
95
-                        </el-button>
96
-                    </template>
97
-                </el-table-column>
98
-            </el-table>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
99 44
         </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="血红蛋白"
63
+
64
+
65
+        >
66
+        </el-table-column>
67
+        <el-table-column
68
+          prop="count"
69
+          label="人数"
70
+        >
71
+        </el-table-column>
72
+<!--        <el-table-column-->
73
+<!--          prop="address"-->
74
+<!--          align="center"-->
75
+<!--          label="操作">-->
76
+<!--          <template slot-scope="scope">-->
77
+<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
78
+<!--                       type="text">查看详情-->
79
+<!--            </el-button>-->
80
+<!--          </template>-->
81
+<!--        </el-table-column>-->
82
+      </el-table>
100 83
     </div>
84
+  </div>
101 85
 </template>
102 86
 <script>
103
-import * as echarts from "echarts";
104
-export default{
105
-    props: {
106
-   
87
+import * as echarts from 'echarts'
88
+import { GetQCStatistisData } from '../../../api/qcd'
89
+
90
+const moment = require('moment')
91
+
92
+export default {
93
+  props: {
94
+
107 95
     width: {
108 96
       type: String,
109
-      default: "100%"
97
+      default: '100%'
110 98
     },
111 99
     height: {
112 100
       type: String,
113
-      default: "400px"
114
-    },
115
-    
101
+      default: '400px'
102
+    }
103
+
116 104
   },
117
-    data() {
118
-        return {
119
-            time_month:'',
120
-            stat_time:'',
121
-            end_time:'',
122
-            input:'',
123
-            myChart: {},
124
-            pieData : [
125
-            {
126
-          value: 463,
127
-          name: "不达标值患者"
128
-        },
129
-        {
130
-          value: 395,
131
-          name: "未检查患者"
132
-        },
133
-        {
134
-          value: 157,
135
-          name: "达标值患者"
136
-        },
137
-        // {
138
-        //   value: 149,
139
-        //   name: "广东"
140
-        // },
141
-        // {
142
-        //   value: 147,
143
-        //   name: "湖南"
144
-        // }
145
-            
146
-            ],
147
-            pieName: [],
148
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
149
-            tableData:[],
150
-        }
151
-    },
152
-    mounted() {
153
-    this.initDate(); //数据初始化
154
-    this.initEcharts();
105
+  data() {
106
+    return {
107
+      time_type: 1,
108
+      times: [
109
+        { value: 1, label: '本月' },
110
+        { value: 2, label: '上月' },
111
+        { value: 3, label: '今年' },
112
+        { value: 4, label: '上一年' },
113
+        { value: 5, label: '第一季度' },
114
+        { value: 6, label: '第二季度' },
115
+        { value: 7, label: '第三季度' },
116
+        { value: 8, label: '第四季度' },
117
+        { value: 9, label: '自定义' }
118
+
119
+      ],
120
+      reference:{},
121
+      time_month: '',
122
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
123
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
124
+      input: '',
125
+      myChart: {},
126
+      pieData: [],
127
+      pieName: [],
128
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
129
+      tableData: []
130
+    }
131
+  },
132
+  mounted() {
133
+    this.getData()
155 134
   },
156 135
   methods: {
157
-    initDate() {
158
-      for (let i = 0; i < this.pieData.length; i++) {
159
-        this.pieName[i] = this.pieData[i].name;
136
+    getData() {
137
+      if(this.start_time.length == 0){
138
+        this.$message.error("请选择开始时间")
160 139
       }
161
-    },
162
-    initEcharts() {
163
-      // 饼图
164
-      const option = {
165
-        legend: {
166
-          // 图例
167
-          data: this.pieName,
168
-          left: "10%",
169
-          top: "30%",
170
-          orient: "vertical"
171
-        },
172
-        color:['#ff7f9f','#fff67f','#1e5feb'],
173
-        title: {
174
-          // 设置饼图标题,位置设为顶部居中
175
-        //   text: "国内院士前五省份图示",
176
-          top: "0%",
177
-          left: "center"
178
-        },
179
-        series: [
180
-          {
181
-            type: "pie",
182
-            label: {
183
-              normal : {
184
-                formatter: '{b}:{c}: ({d}%)',
185
-                textStyle : {
186
-                    fontWeight : 'normal',
187
-                    fontSize : 15,
188
-                    color : "black"
189
-                }
190
-              }
191
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
140
+      if(this.end_time.length == 0){
141
+        this.$message.error("请选择结束时间")
142
+      }
143
+      let params = {
144
+        start_date: this.start_time,
145
+        end_date: this.end_time,
146
+        project_id: 1,
147
+        item_id: 17
148
+      }
149
+      this.pieData = []
150
+      this.tableData = []
151
+      console.log("~~~~~~~~~~")
152
+      GetQCStatistisData(params).then(response => {
153
+        if (response.data.state == 1) {
154
+          this.reference = response.data.data.reference
155
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
156
+          let objone = {
157
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
158
+            name: '不达标值患者',
159
+            count:response.data.data.unusual_total,
160
+          }
161
+          this.pieData.push(objone)
162
+          this.tableData.push(objone)
163
+
164
+          let objtwo = {
165
+            value:   response.data.data.normal_total / response.data.data.patient_count,
166
+            name: '达标值患者',
167
+            count:response.data.data.normal_total,
168
+
169
+          }
170
+          this.pieData.push(objtwo)
171
+          this.tableData.push(objtwo)
172
+
173
+          let objthree = {
174
+            value: response.data.data.patient_count / response.data.data.no_check_total,
175
+            name: '未检查患者',
176
+            count:response.data.data.no_check_total,
177
+
178
+          }
179
+          this.pieData.push(objthree)
180
+          this.tableData.push(objthree)
181
+
182
+          let objfour = {
183
+            value: response.data.data.patient_count,
184
+            name: '合计',
185
+            count:response.data.data.patient_count,
186
+          }
187
+          this.tableData.push(objfour)
188
+          for (let i = 0; i < this.pieData.length; i++) {
189
+            this.pieName[i] = this.pieData[i].name
190
+          }
191
+          this.myChart = echarts.init(document.getElementById('mychart'))
192
+          window.addEventListener('resize', () => {
193
+            this.myChart.resize()
194
+          })
195
+          const option = {
196
+            legend: {
197
+              // 图例
198
+              data: this.pieName,
199
+              left: '10%',
200
+              top: '30%',
201
+              orient: 'vertical'
192 202
             },
193
-            radius: "65%", //饼图半径
194
-            data: this.pieData,
195
-            itemStyle : {
196
-              emphasis: {
197
-                shadowBlur: 10,
198
-                shadowOffsetX: 0,
199
-                shadowColor: 'rgba(0, 0, 0, 0.5)'
203
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
204
+            title: {
205
+              // 设置饼图标题,位置设为顶部居中
206
+              //   text: "国内院士前五省份图示",
207
+              top: '0%',
208
+              left: 'center'
209
+            },
210
+            series: [
211
+              {
212
+                type: 'pie',
213
+                label: {
214
+                  show: true,
215
+                  formatter: '{b} : {d}% ({c})'
216
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
217
+                },
218
+                radius: '65%', //饼图半径
219
+                data: this.pieData
200 220
               }
201
-            }
221
+            ]
202 222
           }
203
-        ]
204
-      };
205
-    //   console.log(this.seriesData);
206
-      const optionFree = {
207
-        series: [
208
-          {
209
-            data: this.seriesData,
210
-            type: "line",
211
-            smooth: true
223
+          //   console.log(this.seriesData);
224
+          const optionFree = {
225
+            series: [
226
+              {
227
+                data: this.seriesData,
228
+                type: 'line',
229
+                smooth: true
230
+              }
231
+            ]
212 232
           }
213
-        ]
214
-      };
215
-      this.myChart = echarts.init(document.getElementById("mychart"));
216
-      this.myChart.setOption(option);
217
-      //随着屏幕大小调节图表
218
-      window.addEventListener("resize", () => {
219
-        this.myChart.resize();
220
-      });
233
+          this.myChart = echarts.init(document.getElementById('mychart'))
234
+          this.myChart.setOption(option)
235
+        } else {
236
+          this.$message.error(response.data.msg)
237
+        }
238
+      })
239
+
221 240
     },
241
+    changeItem(val) {
242
+      const currentDate = new Date()
243
+      switch (val) {
244
+        case 1:
245
+
246
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
247
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
248
+
249
+          this.start_time = startOfMonth
250
+          this.end_time = endOfMonth
251
+          this.getData()
252
+
253
+          break
254
+        case 2:
255
+          // 上月的起始日期和结束日期
256
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
257
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
258
+
259
+          this.start_time = startOfLastMonth
260
+          this.end_time = endOfLastMonth
261
+          this.getData()
262
+
263
+          break
264
+        case 3:
265
+          // 今年的起始日期和结束日期
266
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
267
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
268
+
269
+          this.start_time = startOfYear
270
+          this.end_time = endOfYear
271
+          this.getData()
272
+
273
+          break
274
+        case 4:
275
+          // 上一年的起始日期和结束日期
276
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
277
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
278
+
279
+          this.start_time = startOfLastYear
280
+          this.end_time = endOfLastYear
281
+          this.getData()
282
+
283
+          break
284
+        case 5:
285
+          // 第一季度的起始日期和结束日期
286
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
287
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
288
+
289
+          this.start_time = startOfFirstQuarter
290
+          this.end_time = endOfFirstQuarter
291
+          this.getData()
292
+
293
+          break
294
+        case 6:
295
+          // 第二季度的起始日期和结束日期
296
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
297
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
298
+
299
+          this.start_time = startOfSecondQuarter
300
+          this.end_time = endOfSecondQuarter
301
+          this.getData()
302
+
303
+          break
304
+        case 7:
305
+          // 第三季度的起始日期和结束日期
306
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
307
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
308
+
309
+          this.start_time = startOfThirdQuarter
310
+          this.end_time = endOfThirdQuarter
311
+          this.getData()
312
+
313
+          break
314
+        case 8:
315
+          // 第四季度的起始日期和结束日期
316
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
317
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
318
+
319
+          this.start_time = startOfFourthQuarter
320
+          this.end_time = endOfFourthQuarter
321
+          this.getData()
322
+          break
323
+        case 9:
324
+          this.start_time = ''
325
+          this.end_time = ''
326
+          break
327
+      }
328
+    },
329
+
330
+
222 331
     getSummaries(param) {
223
-        const { columns, data } = param;
224
-        const sums = [];
225
-        columns.forEach((column, index) => {
226
-          if (index === 0) {
227
-            sums[index] = '总价';
228
-            return;
229
-          }
230
-          const values = data.map(item => Number(item[column.property]));
231
-          if (!values.every(value => isNaN(value))) {
232
-            sums[index] = values.reduce((prev, curr) => {
233
-              const value = Number(curr);
234
-              if (!isNaN(value)) {
235
-                return prev + curr;
236
-              } else {
237
-                return prev;
238
-              }
239
-            }, 0);
240
-            sums[index] += ' 元';
241
-          } else {
242
-            sums[index] = 'N/A';
243
-          }
244
-        });
332
+      const { columns, data } = param
333
+      const sums = []
334
+      columns.forEach((column, index) => {
335
+        if (index === 0) {
336
+          sums[index] = '总价'
337
+          return
338
+        }
339
+        const values = data.map(item => Number(item[column.property]))
340
+        if (!values.every(value => isNaN(value))) {
341
+          sums[index] = values.reduce((prev, curr) => {
342
+            const value = Number(curr)
343
+            if (!isNaN(value)) {
344
+              return prev + curr
345
+            } else {
346
+              return prev
347
+            }
348
+          }, 0)
349
+          sums[index] += ' 元'
350
+        } else {
351
+          sums[index] = 'N/A'
352
+        }
353
+      })
245 354
 
246
-        return sums;
355
+      return sums
247 356
     },
248
-    handleClick(id){
249
-        console.log(id);
357
+    handleClick(id) {
358
+      console.log(id)
250 359
     }
251 360
   }
252 361
 
253 362
 }
254 363
 </script>
255 364
 <style lang="scss" scoped>
256
-.content_top{
257
-    display: flex;
258
-    justify-content: space-around;
259
-    color: #1e5feb;
365
+.content_top {
366
+  display: flex;
367
+  justify-content: space-around;
368
+  color: #1e5feb;
260 369
 }
261
-</style>
370
+</style>

+ 627 - 198
src/xt_pages/Dialysisanalysis/hemoglobin/hemoglobinalone.vue 查看文件

@@ -1,217 +1,646 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="血红蛋白(g/L)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
107 106
 
107
+                <el-table-column width="100" label="血红蛋白" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
108 119
     </div>
120
+  </div>
109 121
 </template>
122
+
123
+
110 124
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            myChart: {},
131
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
132
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
133
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
134
-            tableData:[],
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
135 147
         }
136
-    },
137
-    created(){
138
-        
139
-    },
140
-    mounted() {
141
-        // this.$nextTick(function() {
142
-            this.initEcharts();
143
-		// })  
144
-        // this.myChart = echarts.init(document.getElementById("germychart"));
145
-        //     this.myChart.setOption(option);
146
-            //随着屏幕大小调节图表
147
-            window.addEventListener("resize", () => {
148
-                this.myChart.resize();
149
-            });
150
-    },
151
-    methods:{
152
-        handleSubmit(){
153
-            console.log('asdfa');
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1
163
+      },
164
+      crumbs: [
165
+        { path: false, name: '科室质控' },
166
+        { path: false, name: '指标评估统计' },
167
+        { path: false, name: '透析过程指标统计' }
168
+      ],
169
+      tableData1: [],
170
+      chart: {
171
+        title: {
172
+          text: 'ECharts 入门示例'
154 173
         },
155
-        initEcharts() {
156
-            const option = {
157
-                xAxis: {
158
-                    type: 'category',
159
-                        boundaryGap:true,
160
-                        axisTick:{
161
-                            alignWithLabel:true //保证刻度线和标签对齐
162
-                        },
163
-                    data: this.xData,
164
-                    splitNumber:this.xData.length, //纵坐标数
165
-                    interval:this.xData //强制设置坐标轴分割间隔
166
-                },
167
-                yAxis: {
168
-                    type: 'value',
169
-                    boundaryGap: true,
170
-                    splitNumber:4, //纵坐标数
171
-                    interval:10 //强制设置坐标轴分割间隔
174
+        tooltip: {},
175
+        legend: {
176
+          data: [],
177
+          left: 0
178
+        },
179
+        xAxis: {
180
+          data: []
181
+        },
182
+        yAxis: {
183
+          axisLabel: {
184
+            formatter: '{value} %'
185
+          },
186
+          show: false
187
+        },
188
+        series: [
189
+          {
190
+            name: '',
191
+            type: 'line',
192
+            data: [],
193
+            barWidth: 30,
194
+            label: {
195
+              normal: {
196
+                show: true,
197
+                position: 'top',
198
+                formatter: (params) => {
199
+                  if(this.percent.length > 0){
200
+                    let str = ''
201
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
202
+                    return str
203
+                  }else{
204
+                    let str = ''
205
+                    str = params.data
206
+                    return str
207
+                  }
208
+                }
209
+              }
210
+            },
211
+            //配置样式
212
+            itemStyle: {
213
+              //通常情况下:
214
+
215
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
216
+              normal: {
217
+                color: function(params) {
218
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
219
+                  var colorList = [
220
+                    ['#A9E0F3', '#9FBDFC'],
221
+
222
+                    ['#FFD7C0', '#FF9994']
223
+                  ]
224
+
225
+                  var index = params.dataIndex
226
+                  if (params.dataIndex >= colorList.length) {
227
+                    index = params.dataIndex % colorList.length
228
+                  }
229
+
230
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
231
+                    { offset: 0, color: colorList[index][0] },
232
+                    // { offset: 0.5, color: colorList[index][1] },
233
+                    { offset: 1, color: colorList[index][1] }
234
+                  ])
172 235
                 },
173
-                legend: {
174
-                    show: true,
175
-                    align:'left',//文字在前图标在后
176
-                    left:'15%',
177
-                    top:'5%',
178
-                    data: [{name:'血红蛋白g/L'}]
236
+                lineStyle:{
237
+                  color:'#409eff' //改变折线颜色
179 238
                 },
180
-                series: [
181
-                {
182
-                    data: this.opinionData,
183
-                    name:'血红蛋白g/L',
184
-                    type: "line",// 类型设置为折线图
185
-                    symbol: 'circle',
186
-                    itemStyle: {
187
-                        normal: {
188
-                            color: '#409eff', //改变折线点的颜色#a80000
189
-                            lineStyle: {
190
-                                color: '#409eff' //改变折线颜色
191
-                            }
192
-                        }
193
-                    },
239
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
240
+              },
194 241
 
195
-                },
196
-                
197
-                ],
198
-                
199
-            };
200
-            this.myChart = echarts.init(document.getElementById("germychart"));
201
-            this.myChart.setOption(option);
202
-            //随着屏幕大小调节图表
203
-            window.addEventListener("resize", () => {
204
-                this.myChart.resize();
205
-            });
242
+              //鼠标悬停时:
243
+              emphasis: {
244
+                shadowBlur: 10,
245
+                shadowOffsetX: 0,
246
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
247
+              }
248
+            }
249
+          }
250
+        ],
251
+        dataZoom: [
252
+          {
253
+            // Y轴固定,让内容滚动
254
+            type: 'slider',
255
+            show: false,
256
+            xAxisIndex: [0],
257
+            start: 1,
258
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
259
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
260
+          },
261
+          {
262
+            type: 'inside',
263
+            xAxisIndex: [0],
264
+            start: 1,
265
+            end: 20,
266
+            zoomLock: true // 锁定区域禁止缩放
267
+          }
268
+        ]
269
+      },
270
+      bar: {
271
+        title: {
272
+          text: 'ECharts 入门示例'
206 273
         },
274
+        tooltip: {},
275
+        legend: {
276
+          data: [],
277
+          left: 0
278
+        },
279
+        xAxis: {
280
+          data: []
281
+        },
282
+        yAxis: {
283
+          axisLabel: {
284
+            formatter: '{value} %'
285
+          },
286
+          show: false
287
+        },
288
+        series: [
289
+          {
290
+            name: '',
291
+            type: 'bar',
292
+            data: [],
293
+            barWidth: 30,
294
+            label: {
295
+              normal: {
296
+                show: true,
297
+                position: 'top',
298
+                formatter: (params) => {
299
+                  if(this.percent.length > 0){
300
+                    let str = ''
301
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
302
+                    return str
303
+                  }else{
304
+                    let str = ''
305
+                    str = params.data
306
+                    return str
307
+                  }
308
+                }
309
+              }
310
+            },
311
+            //配置样式
312
+            itemStyle: {
313
+              //通常情况下:
314
+
315
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
316
+              normal: {
317
+                color: function(params) {
318
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
319
+                  var colorList = [
320
+                    ['#A9E0F3', '#9FBDFC'],
321
+                    ['#FFD7C0', '#FF9994']
322
+                  ]
323
+
324
+                  var index = params.dataIndex
325
+                  if (params.dataIndex >= colorList.length) {
326
+                    index = params.dataIndex % colorList.length
327
+                  }
328
+
329
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
330
+                    { offset: 0, color: colorList[index][0] },
331
+                    // { offset: 0.5, color: colorList[index][1] },
332
+                    { offset: 1, color: colorList[index][1] }
333
+                  ])
334
+                },
335
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
336
+              },
337
+
338
+              //鼠标悬停时:
339
+              emphasis: {
340
+                shadowBlur: 10,
341
+                shadowOffsetX: 0,
342
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
343
+              }
344
+            }
345
+          }
346
+        ]
347
+      }
348
+
349
+    }
350
+  },
351
+  methods: {
352
+    printAction(){
353
+      this.$router.push({
354
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355
+      });
356
+
357
+    },exportAction(){
358
+      let list = []
359
+      for (let i = 0; i < this.tableData.length; i++) {
360
+        let order = this.tableData[i]
361
+        let name = order.name
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
364
+
365
+        let obj = {
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
369
+        }
370
+        list.push(obj)
371
+      }
372
+      import('@/vendor/Export2Excel').then(excel => {
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
375
+        const data = this.formatJson(filterVal, list)
376
+        excel.export_json_to_excel1({
377
+          header: tHeader,
378
+          data,
379
+          filename: '明细',
380
+          ref: this.$refs['table'].$el
381
+        })
382
+      })
383
+    },
384
+    changeProject(val) {
385
+      this.query.statistics_type = val
386
+      this.query.page = 1
387
+      this.GetPersonQCStatistisData(this.query)
388
+      this.GetInspectionCheckIndexTableData(this.query)
389
+
390
+    },
391
+    handleChange(val) {
392
+      this.query.patient_id = val.id
393
+      this.query.page = 1
394
+      this.patient_name = val.name
395
+      this.GetPersonQCStatistisData(this.query)
396
+      this.GetInspectionCheckIndexTableData(this.query)
397
+    },
398
+    handleSizeChange(limit) {
399
+      this.query.limit = limit
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleCurrentChange(page) {
404
+      this.query.page = page
405
+      this.GetPersonQCStatistisData(this.query)
406
+    },formatJson(filterVal, jsonData) {
407
+      return jsonData.map(v => filterVal.map(j => v[j]))
408
+    },
409
+    changeTime(val) {
410
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
411
+      if (time > 0) {
412
+        this.$message.error('结束时间不能小于开始时间')
413
+        this.query.start_time = ''
414
+      } else {
415
+        // this.getDialysisList()
416
+        this.query.page = 1
417
+        this.GetPersonQCStatistisData(this.query)
418
+        this.GetInspectionCheckIndexTableData(this.query)
419
+
420
+      }
421
+
422
+    },
423
+    changeEndTime(val) {
424
+      var time =
425
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
426
+      if (time < 0) {
427
+        this.$message.error('结束时间不能小于开始时间')
428
+        this.query.end_time = ''
429
+      } else {
430
+        this.query.page = 1
431
+        this.GetPersonQCStatistisData(this.query)
432
+        this.GetInspectionCheckIndexTableData(this.query)
433
+
434
+      }
435
+    },
436
+    getTimestamp(time) {
437
+      // 把时间日期转成时间戳
438
+      return new Date(time).getTime() / 1000
439
+    },
440
+    QueryOperaById: function(val) {
441
+      let vascular_access_desc_name = ''
442
+      let vascular_access_desc = getDataConfig(
443
+        'hemodialysis',
444
+        'vascular_access_desc'
445
+      )
446
+      for (let i = 0; i < vascular_access_desc.length; i++) {
447
+        if (vascular_access_desc[i].id == val) {
448
+          vascular_access_desc_name = vascular_access_desc[i].name
449
+        }
450
+      }
451
+
452
+      return vascular_access_desc_name
207 453
     },
208
-    
454
+    GetAnticoagulantById: function(val) {
455
+      let anticoagulan_name = ''
456
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
457
+      let anticoagulant = anticoagulantsConfitTwo
458
+      for (let keys in anticoagulant) {
459
+        if (anticoagulant[keys].id == val) {
460
+          anticoagulan_name = anticoagulant[keys].name
461
+        }
462
+      }
463
+      return anticoagulan_name
464
+    },
465
+    getModeName(mode_id) {
466
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
467
+    },  getTime(val) {
468
+      if(val == "" || val == undefined){
469
+        return ""
470
+      }else {
471
+        return uParseTime(val, '{y}-{m}-{d}')
472
+      }
473
+    },
474
+    GetInspectionCheckIndexTableData(params) {
475
+      this.loading = true
476
+      GetPersonQCStatistisData(params)
477
+        .then(rs => {
478
+          var resp = rs.data
479
+          console.log("resp=====",resp)
480
+          if (resp.state == 1) {
481
+            this.loading = false
482
+            this.tableData = []
483
+            for (let i = 0; i < resp.data.inspections.length; i++) {
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
490
+            }
491
+            this.total = resp.data.total
492
+
493
+          } else {
494
+            this.loading = false
495
+          }
496
+        })
497
+        .catch(error => {
498
+
499
+        })
500
+    },
501
+    GetPersonQCStatistisData(params) {
502
+      this.chart.xAxis.data = []
503
+      this.chart.series[0].data = []
504
+      this.bar.xAxis.data = []
505
+      this.bar.series[0].data = []
506
+      this.percent = []
507
+      GetPersonQCStatistisData(params)
508
+        .then(rs => {
509
+          var resp = rs.data
510
+          if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
512
+            for (let i = 0; i < resp.data.inspections.length; i++) {
513
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+            }
516
+            console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
519
+            this.getArrLength(this.chart.xAxis.data,1)
520
+          } else {
521
+
522
+          }
523
+        })
524
+        .catch(error => {
525
+        })
526
+    },
527
+    handleSelect(val) {
528
+      this.query.patient_id = val.id
529
+      this.query.page = 1
530
+      this.patient_name = val.name
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
+      }
536
+
537
+
538
+    },
539
+    querySearchAsync(keyword, cb) {
540
+      let key = ''
541
+      if (keyword != undefined) {
542
+        key = keyword
543
+      }
544
+      let searchArray = []
545
+      PostSearch(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          searchArray = response.data.data.patient
548
+          cb(searchArray)
549
+        } else {
550
+          cb([])
551
+        }
552
+      })
553
+    },
554
+    chooseWay(way) {
555
+      this.wayType = way
556
+    }, getCurrentOrgPatients() {
557
+      getCurrentOrgPatients().then(response => {
558
+        if (response.data.state == 1) {
559
+          var patients = response.data.data.patients
560
+          this.patientsData = patients
561
+          this.GetDefaultPatient()
562
+        }
563
+      })
564
+    }, GetDefaultPatient() {
565
+      GetDefaultPatient().then(response => {
566
+        if (response.data.state == 1) {
567
+          var patient = response.data.data.patient
568
+          for (let i = 0;i < this.patientsData.length; i++){
569
+            if (this.patientsData[i].id == patient.id){
570
+              this.patient_name = this.patientsData[i].name
571
+              this.$refs.table.setCurrentRow(this.patientsData[i])
572
+            }
573
+          }
574
+          this.query.patient_id = patient.id
575
+          this.GetPersonQCStatistisData(this.query)
576
+
577
+        }
578
+      })
579
+
580
+    },
581
+    getArrLength(result,type){
582
+      if(type == 1){
583
+        if(result.length > 10){
584
+          var dataZoom_end = (10/result.length)*100;
585
+          this.chart.dataZoom[0].end = dataZoom_end
586
+        }else{
587
+          var dataZoom_end = 100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }
590
+      }else if(type == 2){
591
+        if(result.length > 10){
592
+          var dataZoom_end = (10/result.length)*100;
593
+          this.bar.dataZoom[0].end = dataZoom_end
594
+        }else{
595
+          var dataZoom_end = 100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }
598
+      }
599
+
600
+    }
601
+  }, mounted() {
602
+    var date = new Date()
603
+    var year = date.getFullYear() //获取完整的年份(4位)
604
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
605
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
606
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
607
+    this.query.patient_id = 0
608
+    this.query.end_time = year + '-' + month + '-' + day
609
+    this.query.start_time = year + '-' + last_month + '-' + day
610
+    this.query.project_id = 1
611
+    this.query.item_id = 17
612
+    this.getCurrentOrgPatients()
613
+
614
+    // this.GetPersonQCStatistisData()
615
+
616
+
617
+  }
209 618
 }
210 619
 </script>
620
+
211 621
 <style lang="scss" scoped>
212
-.content_top{
213
-    display: flex;
214
-    justify-content: space-around;
215
-    margin-bottom: 20px;
622
+.tableTitle {
623
+  font-size: 16px;
624
+  color: #000;
625
+  font-weight: bold;
626
+  margin-bottom: 10px;
627
+}
628
+</style>
629
+<style lang="scss">
630
+.page_process {
631
+.el-tabs{
632
+  margin-bottom:0 !important;
633
+}
634
+.el-button--medium {
635
+  padding: 10px 8px;
636
+}
637
+
638
+.el-form-item {
639
+  margin-bottom: 0;
640
+}
641
+::-webkit-scrollbar{
642
+  height: 15px !important;
643
+}
644
+
216 645
 }
217
-</style>
646
+</style>

+ 22 - 35
src/xt_pages/Dialysisanalysis/otherIndicators/otherall.vue 查看文件

@@ -27,9 +27,9 @@
27 27
             </div>
28 28
             <el-button type="primary">查询</el-button>
29 29
         </div> -->
30
-        
30
+
31 31
         <el-row :gutter="20">
32
-        <el-col :span="5"> 
32
+        <el-col :span="5">
33 33
           <div class="block">
34 34
             <span>查询时间:</span>
35 35
             <el-date-picker
@@ -63,7 +63,7 @@
63 63
             <el-button type="primary">查询</el-button>
64 64
         </el-col>
65 65
         </el-row>
66
-        
66
+
67 67
         <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68 68
           <p class="chartTitle">统计图</p>
69 69
         </div>
@@ -82,20 +82,20 @@
82 82
                 </el-table-column>
83 83
                 <el-table-column
84 84
                     prop="name"
85
-                    
85
+
86 86
                     label="人数"
87 87
                     >
88 88
                 </el-table-column>
89
-                <el-table-column
90
-                    prop="address"
91
-                    align="center"
92
-                    label="操作">
93
-                    <template slot-scope="scope">
94
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                                type="text" >查看详情
96
-                        </el-button>
97
-                    </template>
98
-                </el-table-column>
89
+<!--                <el-table-column-->
90
+<!--                    prop="address"-->
91
+<!--                    align="center"-->
92
+<!--                    label="操作">-->
93
+<!--                    <template slot-scope="scope">-->
94
+<!--                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
95
+<!--                                type="text" >查看详情-->
96
+<!--                        </el-button>-->
97
+<!--                    </template>-->
98
+<!--                </el-table-column>-->
99 99
             </el-table>
100 100
         </div>
101 101
     </div>
@@ -104,7 +104,7 @@
104 104
 import * as echarts from "echarts";
105 105
 export default{
106 106
     props: {
107
-   
107
+
108 108
     width: {
109 109
       type: String,
110 110
       default: "100%"
@@ -113,7 +113,7 @@ export default{
113 113
       type: String,
114 114
       default: "400px"
115 115
     },
116
-    
116
+
117 117
   },
118 118
     data() {
119 119
         return {
@@ -143,7 +143,7 @@ export default{
143 143
         //   value: 147,
144 144
         //   name: "湖南"
145 145
         // }
146
-            
146
+
147 147
             ],
148 148
             pieName: [],
149 149
             // myChartStyle:{float: "right", width: "100%", height: "400px"},
@@ -181,25 +181,12 @@ export default{
181 181
           {
182 182
             type: "pie",
183 183
             label: {
184
-              normal : {
185
-                formatter: '{b}:{c}: ({d}%)',
186
-                textStyle : {
187
-                    fontWeight : 'normal',
188
-                    fontSize : 15,
189
-                    color : "black"
190
-                }
191
-              }
192
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
184
+              show: true,
185
+              formatter:"{b} : {d}% ({c})"
186
+              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
193 187
             },
194 188
             radius: "65%", //饼图半径
195
-            data: this.pieData,
196
-            itemStyle : {
197
-              emphasis: {
198
-                shadowBlur: 10,
199
-                shadowOffsetX: 0,
200
-                shadowColor: 'rgba(0, 0, 0, 0.5)'
201
-              }
202
-            }
189
+            data: this.pieData
203 190
           }
204 191
         ]
205 192
       };
@@ -259,4 +246,4 @@ export default{
259 246
     justify-content: space-around;
260 247
     color: #1e5feb;
261 248
 }
262
-</style>
249
+</style>

+ 630 - 198
src/xt_pages/Dialysisanalysis/otherIndicators/otheralone.vue 查看文件

@@ -1,217 +1,649 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"
87
+                          v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
88
+              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="白蛋白(g/L)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                  </template>
97
+                </el-table-column>
98
+
99
+                <el-table-column width="100" label="检查日期" align="center">
100
+                  <template slot-scope="scope">
101
+                  </template>
102
+                </el-table-column>
107 103
 
104
+                <el-table-column width="100" label="甲状旁腺激素分析" align="center">
105
+                  <template slot-scope="scope">
106
+                  </template>
107
+                </el-table-column>
108
+              </el-table>
109
+
110
+              <el-pagination
111
+                align="right"
112
+                @size-change="handleSizeChange"
113
+                @current-change="handleCurrentChange"
114
+                :current-page="query.page"
115
+                :page-sizes="[10, 20, 50, 100]"
116
+                :page-size="10"
117
+                background
118
+                style="margin-top:20px;"
119
+                layout="total, sizes, prev, pager, next, jumper"
120
+                :total="total"
121
+              ></el-pagination>
122
+            </div>
123
+          </div>
124
+        </el-container>
125
+      </div>
108 126
     </div>
127
+  </div>
109 128
 </template>
129
+
130
+
110 131
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            myChart: {},
131
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
132
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
133
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
134
-            tableData:[],
132
+import echarts from 'echarts'
133
+// import LineChart from '../../qcd/components/LineChart'
134
+import {  uParseTime } from '@/utils/tools'
135
+import { getCurrentOrgPatients } from '@/api/common/common'
136
+import {
137
+  GetDefaultPatient,
138
+} from '@/api/common/statistics'
139
+import { PostSearch } from '@/api/patient'
140
+import { getDataConfig } from '@/utils/data'
141
+import { GetPersonQCStatistisData } from '../../../api/qcd'
142
+
143
+export default {
144
+  components: {
145
+  },
146
+  data() {
147
+    return {
148
+      pickerOptions: {
149
+        disabledDate(time) {
150
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
151
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
152
+
135 153
         }
136
-    },
137
-    created(){
138
-        
139
-    },
140
-    mounted() {
141
-        // this.$nextTick(function() {
142
-            this.initEcharts();
143
-		// })  
144
-        // this.myChart = echarts.init(document.getElementById("germychart"));
145
-        //     this.myChart.setOption(option);
146
-            //随着屏幕大小调节图表
147
-            window.addEventListener("resize", () => {
148
-                this.myChart.resize();
149
-            });
150
-    },
151
-    methods:{
152
-        handleSubmit(){
153
-            console.log('asdfa');
154
+      },
155
+      patient_name:'',
156
+      percent:[],
157
+      patientsData: [],
158
+      tableData: [],
159
+      loading: false,
160
+      search_value: '',
161
+      total: 0,
162
+      query: {
163
+        patient_id: '',
164
+        statistics_type: 1,
165
+        start_time: '',
166
+        end_time: '',
167
+        limit: 10,
168
+        page: 1
169
+      },
170
+      crumbs: [
171
+        { path: false, name: '科室质控' },
172
+        { path: false, name: '指标评估统计' },
173
+        { path: false, name: '透析过程指标统计' }
174
+      ],
175
+      tableData1: [],
176
+      chart: {
177
+        title: {
178
+          text: 'ECharts 入门示例'
154 179
         },
155
-        initEcharts() {
156
-            const option = {
157
-                xAxis: {
158
-                    type: 'category',
159
-                        boundaryGap:true,
160
-                        axisTick:{
161
-                            alignWithLabel:true //保证刻度线和标签对齐
162
-                        },
163
-                    data: this.xData,
164
-                    splitNumber:this.xData.length, //纵坐标数
165
-                    interval:this.xData //强制设置坐标轴分割间隔
166
-                },
167
-                yAxis: {
168
-                    type: 'value',
169
-                    boundaryGap: true,
170
-                    splitNumber:4, //纵坐标数
171
-                    interval:10 //强制设置坐标轴分割间隔
180
+        tooltip: {},
181
+        legend: {
182
+          data: [],
183
+          left: 0
184
+        },
185
+        xAxis: {
186
+          data: []
187
+        },
188
+        yAxis: {
189
+          axisLabel: {
190
+            formatter: '{value} %'
191
+          },
192
+          show: false
193
+        },
194
+        series: [
195
+          {
196
+            name: '',
197
+            type: 'line',
198
+            data: [],
199
+            barWidth: 30,
200
+            label: {
201
+              normal: {
202
+                show: true,
203
+                position: 'top',
204
+                formatter: (params) => {
205
+                  if(this.percent.length > 0){
206
+                    let str = ''
207
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
208
+                    return str
209
+                  }else{
210
+                    let str = ''
211
+                    str = params.data
212
+                    return str
213
+                  }
214
+                }
215
+              }
216
+            },
217
+            //配置样式
218
+            itemStyle: {
219
+              //通常情况下:
220
+
221
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
222
+              normal: {
223
+                color: function(params) {
224
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
225
+                  var colorList = [
226
+                    ['#A9E0F3', '#9FBDFC'],
227
+
228
+                    ['#FFD7C0', '#FF9994']
229
+                  ]
230
+
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[index][0] },
238
+                    // { offset: 0.5, color: colorList[index][1] },
239
+                    { offset: 1, color: colorList[index][1] }
240
+                  ])
172 241
                 },
173
-                legend: {
174
-                    show: true,
175
-                    align:'left',//文字在前图标在后
176
-                    left:'15%',
177
-                    top:'5%',
178
-                    data: [{name:'白蛋白g/L'}]
242
+                lineStyle:{
243
+                  color:'#409eff' //改变折线颜色
179 244
                 },
180
-                series: [
181
-                {
182
-                    data: this.opinionData,
183
-                    name:'白蛋白g/L',
184
-                    type: "line",// 类型设置为折线图
185
-                    symbol: 'circle',
186
-                    itemStyle: {
187
-                        normal: {
188
-                            color: '#409eff', //改变折线点的颜色#a80000
189
-                            lineStyle: {
190
-                                color: '#409eff' //改变折线颜色
191
-                            }
192
-                        }
193
-                    },
245
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
246
+              },
194 247
 
195
-                },
196
-                
197
-                ],
198
-                
199
-            };
200
-            this.myChart = echarts.init(document.getElementById("germychart"));
201
-            this.myChart.setOption(option);
202
-            //随着屏幕大小调节图表
203
-            window.addEventListener("resize", () => {
204
-                this.myChart.resize();
205
-            });
248
+              //鼠标悬停时:
249
+              emphasis: {
250
+                shadowBlur: 10,
251
+                shadowOffsetX: 0,
252
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
253
+              }
254
+            }
255
+          }
256
+        ],
257
+        dataZoom: [
258
+          {
259
+            // Y轴固定,让内容滚动
260
+            type: 'slider',
261
+            show: false,
262
+            xAxisIndex: [0],
263
+            start: 1,
264
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
265
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
266
+          },
267
+          {
268
+            type: 'inside',
269
+            xAxisIndex: [0],
270
+            start: 1,
271
+            end: 20,
272
+            zoomLock: true // 锁定区域禁止缩放
273
+          }
274
+        ]
275
+      },
276
+      bar: {
277
+        title: {
278
+          text: 'ECharts 入门示例'
279
+        },
280
+        tooltip: {},
281
+        legend: {
282
+          data: [],
283
+          left: 0
206 284
         },
285
+        xAxis: {
286
+          data: []
287
+        },
288
+        yAxis: {
289
+          axisLabel: {
290
+            formatter: '{value} %'
291
+          },
292
+          show: false
293
+        },
294
+        series: [
295
+          {
296
+            name: '',
297
+            type: 'bar',
298
+            data: [],
299
+            barWidth: 30,
300
+            label: {
301
+              normal: {
302
+                show: true,
303
+                position: 'top',
304
+                formatter: (params) => {
305
+                  if(this.percent.length > 0){
306
+                    let str = ''
307
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
308
+                    return str
309
+                  }else{
310
+                    let str = ''
311
+                    str = params.data
312
+                    return str
313
+                  }
314
+                }
315
+              }
316
+            },
317
+            //配置样式
318
+            itemStyle: {
319
+              //通常情况下:
320
+
321
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
322
+              normal: {
323
+                color: function(params) {
324
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
325
+                  var colorList = [
326
+                    ['#A9E0F3', '#9FBDFC'],
327
+                    ['#FFD7C0', '#FF9994']
328
+                  ]
329
+
330
+                  var index = params.dataIndex
331
+                  if (params.dataIndex >= colorList.length) {
332
+                    index = params.dataIndex % colorList.length
333
+                  }
334
+
335
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
336
+                    { offset: 0, color: colorList[index][0] },
337
+                    // { offset: 0.5, color: colorList[index][1] },
338
+                    { offset: 1, color: colorList[index][1] }
339
+                  ])
340
+                },
341
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
342
+              },
343
+
344
+              //鼠标悬停时:
345
+              emphasis: {
346
+                shadowBlur: 10,
347
+                shadowOffsetX: 0,
348
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
349
+              }
350
+            }
351
+          }
352
+        ]
353
+      }
354
+
355
+    }
356
+  },
357
+  methods: {
358
+    printAction(){
359
+      this.$router.push({
360
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
361
+      });
362
+
363
+    },exportAction(){
364
+      let list = []
365
+      for (let i = 0; i < this.tableData.length; i++) {
366
+        let order = this.tableData[i]
367
+        let name = order.name
368
+        let item_name = order.item_name
369
+        let count = order.count
370
+        let price = order.price.toFixed(2)
371
+        let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
372
+        let total = order.total.toFixed(2)
373
+
374
+        let obj = {
375
+          '患者姓名': name,
376
+          '项目名称': item_name,
377
+          '数量': count,
378
+          '单价': price,
379
+          '费用': pay_sumamt,
380
+          '费用总额': total
381
+        }
382
+        list.push(obj)
383
+      }
384
+      import('@/vendor/Export2Excel').then(excel => {
385
+        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
386
+        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
387
+        const data = this.formatJson(filterVal, list)
388
+        excel.export_json_to_excel1({
389
+          header: tHeader,
390
+          data,
391
+          filename: '明细',
392
+          ref: this.$refs['table'].$el
393
+        })
394
+      })
395
+    },
396
+    changeProject(val) {
397
+      this.query.statistics_type = val
398
+      this.query.page = 1
399
+      this.GetPersonQCStatistisData(this.query)
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleChange(val) {
404
+      this.query.patient_id = val.id
405
+      this.query.page = 1
406
+      this.patient_name = val.name
407
+      this.GetPersonQCStatistisData(this.query)
408
+      this.GetInspectionCheckIndexTableData(this.query)
409
+    },
410
+    handleSizeChange(limit) {
411
+      this.query.limit = limit
412
+      this.GetInspectionCheckIndexTableData(this.query)
413
+
207 414
     },
208
-    
415
+    handleCurrentChange(page) {
416
+      this.query.page = page
417
+      this.GetPersonQCStatistisData(this.query)
418
+    },formatJson(filterVal, jsonData) {
419
+      return jsonData.map(v => filterVal.map(j => v[j]))
420
+    },
421
+    changeTime(val) {
422
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
423
+      if (time > 0) {
424
+        this.$message.error('结束时间不能小于开始时间')
425
+        this.query.start_time = ''
426
+      } else {
427
+        // this.getDialysisList()
428
+        this.query.page = 1
429
+        this.GetPersonQCStatistisData(this.query)
430
+        this.GetInspectionCheckIndexTableData(this.query)
431
+
432
+      }
433
+
434
+    },
435
+    changeEndTime(val) {
436
+      var time =
437
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
438
+      if (time < 0) {
439
+        this.$message.error('结束时间不能小于开始时间')
440
+        this.query.end_time = ''
441
+      } else {
442
+        this.query.page = 1
443
+        this.GetPersonQCStatistisData(this.query)
444
+        this.GetInspectionCheckIndexTableData(this.query)
445
+
446
+      }
447
+    },
448
+    getTimestamp(time) {
449
+      // 把时间日期转成时间戳
450
+      return new Date(time).getTime() / 1000
451
+    },
452
+    QueryOperaById: function(val) {
453
+      let vascular_access_desc_name = ''
454
+      let vascular_access_desc = getDataConfig(
455
+        'hemodialysis',
456
+        'vascular_access_desc'
457
+      )
458
+      for (let i = 0; i < vascular_access_desc.length; i++) {
459
+        if (vascular_access_desc[i].id == val) {
460
+          vascular_access_desc_name = vascular_access_desc[i].name
461
+        }
462
+      }
463
+
464
+      return vascular_access_desc_name
465
+    },
466
+    GetAnticoagulantById: function(val) {
467
+      let anticoagulan_name = ''
468
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
469
+      let anticoagulant = anticoagulantsConfitTwo
470
+      for (let keys in anticoagulant) {
471
+        if (anticoagulant[keys].id == val) {
472
+          anticoagulan_name = anticoagulant[keys].name
473
+        }
474
+      }
475
+      return anticoagulan_name
476
+    },
477
+    getModeName(mode_id) {
478
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
479
+    },  getTime(val) {
480
+      if(val == "" || val == undefined){
481
+        return ""
482
+      }else {
483
+        return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
484
+      }
485
+    },
486
+    GetInspectionCheckIndexTableData(params) {
487
+      this.loading = true
488
+      GetPersonQCStatistisData(params)
489
+        .then(rs => {
490
+          var resp = rs.data
491
+          console.log("resp=====",resp)
492
+          if (resp.state == 1) {
493
+            this.loading = false
494
+            this.tableData = []
495
+            for (let i = 0; i < resp.data.inspections.length; i++) {
496
+              this.tableData.push(resp.data.inspections[i])
497
+            }
498
+            this.total = resp.data.total
499
+
500
+          } else {
501
+            this.loading = false
502
+          }
503
+        })
504
+        .catch(error => {
505
+
506
+        })
507
+    },
508
+    GetPersonQCStatistisData(params) {
509
+      this.chart.xAxis.data = []
510
+      this.chart.series[0].data = []
511
+      this.bar.xAxis.data = []
512
+      this.bar.series[0].data = []
513
+      this.percent = []
514
+      GetPersonQCStatistisData(params)
515
+        .then(rs => {
516
+          var resp = rs.data
517
+          if (resp.state == 1) {
518
+            for (let i = 0; i < resp.data.inspections.length; i++) {
519
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
520
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
521
+            }
522
+            this.getArrLength(this.chart.xAxis.data,1)
523
+          } else {
524
+
525
+          }
526
+        })
527
+        .catch(error => {
528
+        })
529
+    },
530
+    handleSelect(val) {
531
+      this.query.patient_id = val.id
532
+      this.query.page = 1
533
+      this.patient_name = val.name
534
+      for (let i = 0;i < this.patientsData.length; i++){
535
+        if (this.patientsData[i].id == val.id){
536
+          this.$refs.table.setCurrentRow(this.patientsData[i])
537
+        }
538
+      }
539
+
540
+
541
+    },
542
+    querySearchAsync(keyword, cb) {
543
+      let key = ''
544
+      if (keyword != undefined) {
545
+        key = keyword
546
+      }
547
+      let searchArray = []
548
+      PostSearch(key).then(response => {
549
+        if (response.data.state == 1) {
550
+          searchArray = response.data.data.patient
551
+          cb(searchArray)
552
+        } else {
553
+          cb([])
554
+        }
555
+      })
556
+    },
557
+    chooseWay(way) {
558
+      this.wayType = way
559
+    }, getCurrentOrgPatients() {
560
+      getCurrentOrgPatients().then(response => {
561
+        if (response.data.state == 1) {
562
+          var patients = response.data.data.patients
563
+          this.patientsData = patients
564
+          this.GetDefaultPatient()
565
+        }
566
+      })
567
+    }, GetDefaultPatient() {
568
+      GetDefaultPatient().then(response => {
569
+        if (response.data.state == 1) {
570
+          var patient = response.data.data.patient
571
+          for (let i = 0;i < this.patientsData.length; i++){
572
+            if (this.patientsData[i].id == patient.id){
573
+              this.patient_name = this.patientsData[i].name
574
+              this.$refs.table.setCurrentRow(this.patientsData[i])
575
+            }
576
+          }
577
+          this.query.patient_id = patient.id
578
+          this.GetPersonQCStatistisData(this.query)
579
+
580
+        }
581
+      })
582
+
583
+    },
584
+    getArrLength(result,type){
585
+      if(type == 1){
586
+        if(result.length > 10){
587
+          var dataZoom_end = (10/result.length)*100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }else{
590
+          var dataZoom_end = 100;
591
+          this.chart.dataZoom[0].end = dataZoom_end
592
+        }
593
+      }else if(type == 2){
594
+        if(result.length > 10){
595
+          var dataZoom_end = (10/result.length)*100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }else{
598
+          var dataZoom_end = 100;
599
+          this.bar.dataZoom[0].end = dataZoom_end
600
+        }
601
+      }
602
+
603
+    }
604
+  }, mounted() {
605
+    var date = new Date()
606
+    var year = date.getFullYear() //获取完整的年份(4位)
607
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
608
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
609
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
610
+    this.query.patient_id = 0
611
+    this.query.end_time = year + '-' + month + '-' + day
612
+    this.query.start_time = year + '-' + last_month + '-' + day
613
+    this.query.project_id = 20
614
+    this.query.item_id = 171
615
+    this.getCurrentOrgPatients()
616
+
617
+    // this.GetPersonQCStatistisData()
618
+
619
+
620
+  }
209 621
 }
210 622
 </script>
623
+
211 624
 <style lang="scss" scoped>
212
-.content_top{
213
-    display: flex;
214
-    justify-content: space-around;
215
-    margin-bottom: 20px;
625
+.tableTitle {
626
+  font-size: 16px;
627
+  color: #000;
628
+  font-weight: bold;
629
+  margin-bottom: 10px;
630
+}
631
+</style>
632
+<style lang="scss">
633
+.page_process {
634
+.el-tabs{
635
+  margin-bottom:0 !important;
636
+}
637
+.el-button--medium {
638
+  padding: 10px 8px;
639
+}
640
+
641
+.el-form-item {
642
+  margin-bottom: 0;
643
+}
644
+::-webkit-scrollbar{
645
+  height: 15px !important;
646
+}
647
+
216 648
 }
217
-</style>
649
+</style>

+ 334 - 227
src/xt_pages/Dialysisanalysis/platelets/plateletsall.vue 查看文件

@@ -1,262 +1,369 @@
1 1
 <template>
2
-    <div>
3
-        <!-- <div class="content_top">
4
-            <div class="block">
5
-                <span>查询时间:</span>
6
-                <el-date-picker
7
-                v-model="time_month"
8
-                type="month"
9
-                placeholder="选择月">
10
-                </el-date-picker>
11
-            </div>
12
-            <div>
13
-                <el-date-picker
14
-                v-model="stat_time"
15
-                type="date"
16
-                placeholder="选择日期">
17
-                </el-date-picker>
18
-                <span>-</span>
19
-                <el-date-picker
20
-                v-model="end_time"
21
-                type="date"
22
-                placeholder="选择日期">
23
-                </el-date-picker>
24
-            </div>
25
-            <div style="width: 200px;">
26
-                <el-input v-model="input" placeholder="请输入内容"></el-input>
27
-            </div>
28
-            <el-button type="primary">查询</el-button>
29
-        </div> -->
30
-        
31
-        <el-row :gutter="20">
32
-        <el-col :span="5"> 
33
-          <div class="block">
34
-            <span>查询时间:</span>
35
-            <el-date-picker
36
-            v-model="time_month"
37
-            type="month"
38
-            placeholder="选择月">
39
-            </el-date-picker>
40
-          </div>
41
-        </el-col>
42
-        <el-col :span="8">
43
-          <div>
44
-            <el-date-picker
45
-            v-model="stat_time"
2
+  <div>
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
5
+        <div class="block">
6
+          <span>查询时间:</span>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
16
+        </div>
17
+      </el-col>
18
+      <el-col :span="8">
19
+        <div>
20
+          <el-date-picker
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
46 26
             type="date"
27
+
47 28
             placeholder="选择日期">
48
-            </el-date-picker>
49
-            <span>-</span>
50
-            <el-date-picker
29
+          </el-date-picker>
30
+          <span>-</span>
31
+          <el-date-picker
32
+            style="width: 200px"
51 33
             v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
52 36
             type="date"
53 37
             placeholder="选择日期">
54
-            </el-date-picker>
55
-          </div>
56
-        </el-col>
57
-        <el-col :span="3">
58
-          <div style="width: 200px;">
59
-            <el-input v-model="input" placeholder="请输入内容"></el-input>
60
-          </div>
61
-        </el-col>
62
-        <el-col :span="2">
63
-            <el-button type="primary">查询</el-button>
64
-        </el-col>
65
-        </el-row>
66
-        
67
-        <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-          <p class="chartTitle">统计图</p>
38
+          </el-date-picker>
69 39
         </div>
70
-        <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-        <div style="width: 80%;margin: auto;">
72
-            <el-table
73
-            :data="tableData"
74
-            :show-summary = true
75
-            border
76
-            style="width: 100%;">
77
-                <el-table-column
78
-                    prop="date"
79
-                    align="center"
80
-                    label="血小板"
81
-                    >
82
-                </el-table-column>
83
-                <el-table-column
84
-                    prop="name"
85
-                    
86
-                    label="人数"
87
-                    >
88
-                </el-table-column>
89
-                <el-table-column
90
-                    prop="address"
91
-                    align="center"
92
-                    label="操作">
93
-                    <template slot-scope="scope">
94
-                        <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                                type="text" >查看详情
96
-                        </el-button>
97
-                    </template>
98
-                </el-table-column>
99
-            </el-table>
40
+      </el-col>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
100 44
         </div>
45
+      </el-col>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
48
+      </el-col>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="血小板"
63
+
64
+        >
65
+        </el-table-column>
66
+        <el-table-column
67
+          prop="count"
68
+          label="人数"
69
+        >
70
+        </el-table-column>
71
+<!--        <el-table-column-->
72
+<!--          prop="address"-->
73
+<!--          align="center"-->
74
+<!--          label="操作">-->
75
+<!--          <template slot-scope="scope">-->
76
+<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
77
+<!--                       type="text">查看详情-->
78
+<!--            </el-button>-->
79
+<!--          </template>-->
80
+<!--        </el-table-column>-->
81
+      </el-table>
101 82
     </div>
83
+  </div>
102 84
 </template>
103 85
 <script>
104
-import * as echarts from "echarts";
105
-export default{
106
-    props: {
107
-   
86
+import * as echarts from 'echarts'
87
+import { GetQCStatistisData } from '../../../api/qcd'
88
+
89
+const moment = require('moment')
90
+
91
+export default {
92
+  props: {
93
+
108 94
     width: {
109 95
       type: String,
110
-      default: "100%"
96
+      default: '100%'
111 97
     },
112 98
     height: {
113 99
       type: String,
114
-      default: "400px"
115
-    },
116
-    
100
+      default: '400px'
101
+    }
102
+
117 103
   },
118
-    data() {
119
-        return {
120
-            time_month:'',
121
-            stat_time:'',
122
-            end_time:'',
123
-            input:'',
124
-            myChart: {},
125
-            pieData : [
126
-            {
127
-          value: 463,
128
-          name: "不达标值患者"
129
-        },
130
-        {
131
-          value: 395,
132
-          name: "未检查患者"
133
-        },
134
-        {
135
-          value: 157,
136
-          name: "达标值患者"
137
-        },
138
-        // {
139
-        //   value: 149,
140
-        //   name: "广东"
141
-        // },
142
-        // {
143
-        //   value: 147,
144
-        //   name: "湖南"
145
-        // }
146
-            
147
-            ],
148
-            pieName: [],
149
-            // myChartStyle:{float: "right", width: "100%", height: "400px"},
150
-            tableData:[],
151
-        }
152
-    },
153
-    mounted() {
154
-    this.initDate(); //数据初始化
155
-    this.initEcharts();
104
+  data() {
105
+    return {
106
+      time_type: 1,
107
+      times: [
108
+        { value: 1, label: '本月' },
109
+        { value: 2, label: '上月' },
110
+        { value: 3, label: '今年' },
111
+        { value: 4, label: '上一年' },
112
+        { value: 5, label: '第一季度' },
113
+        { value: 6, label: '第二季度' },
114
+        { value: 7, label: '第三季度' },
115
+        { value: 8, label: '第四季度' },
116
+        { value: 9, label: '自定义' }
117
+
118
+      ],
119
+      time_month: '',
120
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
121
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
122
+      input: '',
123
+      myChart: {},
124
+      pieData: [],
125
+      pieName: [],
126
+      reference:{},
127
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
128
+      tableData: []
129
+    }
130
+  },
131
+  mounted() {
132
+    this.getData()
156 133
   },
157 134
   methods: {
158
-    initDate() {
159
-      for (let i = 0; i < this.pieData.length; i++) {
160
-        this.pieName[i] = this.pieData[i].name;
135
+    getData() {
136
+      if(this.start_time.length == 0){
137
+        this.$message.error("请选择开始时间")
161 138
       }
162
-    },
163
-    initEcharts() {
164
-      // 饼图
165
-      const option = {
166
-        legend: {
167
-          // 图例
168
-          data: this.pieName,
169
-          left: "10%",
170
-          top: "30%",
171
-          orient: "vertical"
172
-        },
173
-        color:['#ff7f9f','#fff67f','#1e5feb'],
174
-        title: {
175
-          // 设置饼图标题,位置设为顶部居中
176
-        //   text: "国内院士前五省份图示",
177
-          top: "0%",
178
-          left: "center"
179
-        },
180
-        series: [
181
-          {
182
-            type: "pie",
183
-            label: {
184
-              normal : {
185
-                formatter: '{b}:{c}: ({d}%)',
186
-                textStyle : {
187
-                    fontWeight : 'normal',
188
-                    fontSize : 15,
189
-                    color : "black"
190
-                }
191
-              }
192
-              // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
139
+      if(this.end_time.length == 0){
140
+        this.$message.error("请选择结束时间")
141
+      }
142
+      let params = {
143
+        start_date: this.start_time,
144
+        end_date: this.end_time,
145
+        project_id: 1,
146
+        item_id: 166
147
+      }
148
+      this.pieData = []
149
+      this.tableData = []
150
+      console.log("~~~~~~~~~~")
151
+      GetQCStatistisData(params).then(response => {
152
+        if (response.data.state == 1) {
153
+          this.reference = response.data.data.reference
154
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
155
+          let objone = {
156
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
157
+            name: '不达标值患者',
158
+            count:response.data.data.unusual_total,
159
+          }
160
+          this.pieData.push(objone)
161
+          this.tableData.push(objone)
162
+
163
+          let objtwo = {
164
+            value:   response.data.data.normal_total / response.data.data.patient_count,
165
+            name: '达标值患者',
166
+            count:response.data.data.normal_total,
167
+
168
+          }
169
+          this.pieData.push(objtwo)
170
+          this.tableData.push(objtwo)
171
+
172
+          let objthree = {
173
+            value: response.data.data.patient_count / response.data.data.no_check_total,
174
+            name: '未检查患者',
175
+            count:response.data.data.no_check_total,
176
+
177
+          }
178
+          this.pieData.push(objthree)
179
+          this.tableData.push(objthree)
180
+
181
+          let objfour = {
182
+            value: response.data.data.patient_count,
183
+            name: '合计',
184
+            count:response.data.data.patient_count,
185
+          }
186
+          this.tableData.push(objfour)
187
+          for (let i = 0; i < this.pieData.length; i++) {
188
+            this.pieName[i] = this.pieData[i].name
189
+          }
190
+          this.myChart = echarts.init(document.getElementById('mychart'))
191
+          window.addEventListener('resize', () => {
192
+            this.myChart.resize()
193
+          })
194
+          const option = {
195
+            legend: {
196
+              // 图例
197
+              data: this.pieName,
198
+              left: '10%',
199
+              top: '30%',
200
+              orient: 'vertical'
201
+            },
202
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
203
+            title: {
204
+              // 设置饼图标题,位置设为顶部居中
205
+              //   text: "国内院士前五省份图示",
206
+              top: '0%',
207
+              left: 'center'
193 208
             },
194
-            radius: "65%", //饼图半径
195
-            data: this.pieData,
196
-            itemStyle : {
197
-              emphasis: {
198
-                shadowBlur: 10,
199
-                shadowOffsetX: 0,
200
-                shadowColor: 'rgba(0, 0, 0, 0.5)'
209
+            series: [
210
+              {
211
+                type: 'pie',
212
+                label: {
213
+                  show: true,
214
+                  formatter: '{b} : {d}% ({c})'
215
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
216
+                },
217
+                radius: '65%', //饼图半径
218
+                data: this.pieData
201 219
               }
202
-            }
220
+            ]
203 221
           }
204
-        ]
205
-      };
206
-    //   console.log(this.seriesData);
207
-      const optionFree = {
208
-        series: [
209
-          {
210
-            data: this.seriesData,
211
-            type: "line",
212
-            smooth: true
222
+          //   console.log(this.seriesData);
223
+          const optionFree = {
224
+            series: [
225
+              {
226
+                data: this.seriesData,
227
+                type: 'line',
228
+                smooth: true
229
+              }
230
+            ]
213 231
           }
214
-        ]
215
-      };
216
-      this.myChart = echarts.init(document.getElementById("mychart"));
217
-      this.myChart.setOption(option);
218
-      //随着屏幕大小调节图表
219
-      window.addEventListener("resize", () => {
220
-        this.myChart.resize();
221
-      });
232
+          this.myChart = echarts.init(document.getElementById('mychart'))
233
+          this.myChart.setOption(option)
234
+        } else {
235
+          this.$message.error(response.data.msg)
236
+        }
237
+      })
238
+
239
+    },
240
+    changeItem(val) {
241
+      const currentDate = new Date()
242
+      switch (val) {
243
+        case 1:
244
+
245
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
246
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
247
+
248
+          this.start_time = startOfMonth
249
+          this.end_time = endOfMonth
250
+          this.getData()
251
+
252
+          break
253
+        case 2:
254
+          // 上月的起始日期和结束日期
255
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
256
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
257
+
258
+          this.start_time = startOfLastMonth
259
+          this.end_time = endOfLastMonth
260
+          this.getData()
261
+
262
+          break
263
+        case 3:
264
+          // 今年的起始日期和结束日期
265
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
266
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
267
+
268
+          this.start_time = startOfYear
269
+          this.end_time = endOfYear
270
+          this.getData()
271
+
272
+          break
273
+        case 4:
274
+          // 上一年的起始日期和结束日期
275
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
276
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
277
+
278
+          this.start_time = startOfLastYear
279
+          this.end_time = endOfLastYear
280
+          this.getData()
281
+
282
+          break
283
+        case 5:
284
+          // 第一季度的起始日期和结束日期
285
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
286
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
287
+
288
+          this.start_time = startOfFirstQuarter
289
+          this.end_time = endOfFirstQuarter
290
+          this.getData()
291
+
292
+          break
293
+        case 6:
294
+          // 第二季度的起始日期和结束日期
295
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
296
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
297
+
298
+          this.start_time = startOfSecondQuarter
299
+          this.end_time = endOfSecondQuarter
300
+          this.getData()
301
+
302
+          break
303
+        case 7:
304
+          // 第三季度的起始日期和结束日期
305
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
306
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
307
+
308
+          this.start_time = startOfThirdQuarter
309
+          this.end_time = endOfThirdQuarter
310
+          this.getData()
311
+
312
+          break
313
+        case 8:
314
+          // 第四季度的起始日期和结束日期
315
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
316
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
317
+
318
+          this.start_time = startOfFourthQuarter
319
+          this.end_time = endOfFourthQuarter
320
+          this.getData()
321
+          break
322
+        case 9:
323
+          this.start_time = ''
324
+          this.end_time = ''
325
+          break
326
+      }
222 327
     },
328
+
329
+
223 330
     getSummaries(param) {
224
-        const { columns, data } = param;
225
-        const sums = [];
226
-        columns.forEach((column, index) => {
227
-          if (index === 0) {
228
-            sums[index] = '总价';
229
-            return;
230
-          }
231
-          const values = data.map(item => Number(item[column.property]));
232
-          if (!values.every(value => isNaN(value))) {
233
-            sums[index] = values.reduce((prev, curr) => {
234
-              const value = Number(curr);
235
-              if (!isNaN(value)) {
236
-                return prev + curr;
237
-              } else {
238
-                return prev;
239
-              }
240
-            }, 0);
241
-            sums[index] += ' 元';
242
-          } else {
243
-            sums[index] = 'N/A';
244
-          }
245
-        });
331
+      const { columns, data } = param
332
+      const sums = []
333
+      columns.forEach((column, index) => {
334
+        if (index === 0) {
335
+          sums[index] = '总价'
336
+          return
337
+        }
338
+        const values = data.map(item => Number(item[column.property]))
339
+        if (!values.every(value => isNaN(value))) {
340
+          sums[index] = values.reduce((prev, curr) => {
341
+            const value = Number(curr)
342
+            if (!isNaN(value)) {
343
+              return prev + curr
344
+            } else {
345
+              return prev
346
+            }
347
+          }, 0)
348
+          sums[index] += ' 元'
349
+        } else {
350
+          sums[index] = 'N/A'
351
+        }
352
+      })
246 353
 
247
-        return sums;
354
+      return sums
248 355
     },
249
-    handleClick(id){
250
-        console.log(id);
356
+    handleClick(id) {
357
+      console.log(id)
251 358
     }
252 359
   }
253 360
 
254 361
 }
255 362
 </script>
256 363
 <style lang="scss" scoped>
257
-.content_top{
258
-    display: flex;
259
-    justify-content: space-around;
260
-    color: #1e5feb;
364
+.content_top {
365
+  display: flex;
366
+  justify-content: space-around;
367
+  color: #1e5feb;
261 368
 }
262
-</style>
369
+</style>

+ 627 - 198
src/xt_pages/Dialysisanalysis/platelets/plateletsalone.vue 查看文件

@@ -1,217 +1,646 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="血小板(/L)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
107 106
 
107
+                <el-table-column width="100" label="血小板" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
108 119
     </div>
120
+  </div>
109 121
 </template>
122
+
123
+
110 124
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            myChart: {},
131
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
132
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
133
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
134
-            tableData:[],
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
135 147
         }
136
-    },
137
-    created(){
138
-        
139
-    },
140
-    mounted() {
141
-        // this.$nextTick(function() {
142
-            this.initEcharts();
143
-		// })  
144
-        // this.myChart = echarts.init(document.getElementById("germychart"));
145
-        //     this.myChart.setOption(option);
146
-            //随着屏幕大小调节图表
147
-            window.addEventListener("resize", () => {
148
-                this.myChart.resize();
149
-            });
150
-    },
151
-    methods:{
152
-        handleSubmit(){
153
-            console.log('asdfa');
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1
163
+      },
164
+      crumbs: [
165
+        { path: false, name: '科室质控' },
166
+        { path: false, name: '指标评估统计' },
167
+        { path: false, name: '透析过程指标统计' }
168
+      ],
169
+      tableData1: [],
170
+      chart: {
171
+        title: {
172
+          text: 'ECharts 入门示例'
154 173
         },
155
-        initEcharts() {
156
-            const option = {
157
-                xAxis: {
158
-                    type: 'category',
159
-                        boundaryGap:true,
160
-                        axisTick:{
161
-                            alignWithLabel:true //保证刻度线和标签对齐
162
-                        },
163
-                    data: this.xData,
164
-                    splitNumber:this.xData.length, //纵坐标数
165
-                    interval:this.xData //强制设置坐标轴分割间隔
166
-                },
167
-                yAxis: {
168
-                    type: 'value',
169
-                    boundaryGap: true,
170
-                    splitNumber:4, //纵坐标数
171
-                    interval:10 //强制设置坐标轴分割间隔
174
+        tooltip: {},
175
+        legend: {
176
+          data: [],
177
+          left: 0
178
+        },
179
+        xAxis: {
180
+          data: []
181
+        },
182
+        yAxis: {
183
+          axisLabel: {
184
+            formatter: '{value} %'
185
+          },
186
+          show: false
187
+        },
188
+        series: [
189
+          {
190
+            name: '',
191
+            type: 'line',
192
+            data: [],
193
+            barWidth: 30,
194
+            label: {
195
+              normal: {
196
+                show: true,
197
+                position: 'top',
198
+                formatter: (params) => {
199
+                  if(this.percent.length > 0){
200
+                    let str = ''
201
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
202
+                    return str
203
+                  }else{
204
+                    let str = ''
205
+                    str = params.data
206
+                    return str
207
+                  }
208
+                }
209
+              }
210
+            },
211
+            //配置样式
212
+            itemStyle: {
213
+              //通常情况下:
214
+
215
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
216
+              normal: {
217
+                color: function(params) {
218
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
219
+                  var colorList = [
220
+                    ['#A9E0F3', '#9FBDFC'],
221
+
222
+                    ['#FFD7C0', '#FF9994']
223
+                  ]
224
+
225
+                  var index = params.dataIndex
226
+                  if (params.dataIndex >= colorList.length) {
227
+                    index = params.dataIndex % colorList.length
228
+                  }
229
+
230
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
231
+                    { offset: 0, color: colorList[index][0] },
232
+                    // { offset: 0.5, color: colorList[index][1] },
233
+                    { offset: 1, color: colorList[index][1] }
234
+                  ])
172 235
                 },
173
-                legend: {
174
-                    show: true,
175
-                    align:'left',//文字在前图标在后
176
-                    left:'15%',
177
-                    top:'5%',
178
-                    data: [{name:'血小板/L'}]
236
+                lineStyle:{
237
+                  color:'#409eff' //改变折线颜色
179 238
                 },
180
-                series: [
181
-                {
182
-                    data: this.opinionData,
183
-                    name:'血小板/L',
184
-                    type: "line",// 类型设置为折线图
185
-                    symbol: 'circle',
186
-                    itemStyle: {
187
-                        normal: {
188
-                            color: '#409eff', //改变折线点的颜色#a80000
189
-                            lineStyle: {
190
-                                color: '#409eff' //改变折线颜色
191
-                            }
192
-                        }
193
-                    },
239
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
240
+              },
194 241
 
195
-                },
196
-                
197
-                ],
198
-                
199
-            };
200
-            this.myChart = echarts.init(document.getElementById("germychart"));
201
-            this.myChart.setOption(option);
202
-            //随着屏幕大小调节图表
203
-            window.addEventListener("resize", () => {
204
-                this.myChart.resize();
205
-            });
242
+              //鼠标悬停时:
243
+              emphasis: {
244
+                shadowBlur: 10,
245
+                shadowOffsetX: 0,
246
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
247
+              }
248
+            }
249
+          }
250
+        ],
251
+        dataZoom: [
252
+          {
253
+            // Y轴固定,让内容滚动
254
+            type: 'slider',
255
+            show: false,
256
+            xAxisIndex: [0],
257
+            start: 1,
258
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
259
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
260
+          },
261
+          {
262
+            type: 'inside',
263
+            xAxisIndex: [0],
264
+            start: 1,
265
+            end: 20,
266
+            zoomLock: true // 锁定区域禁止缩放
267
+          }
268
+        ]
269
+      },
270
+      bar: {
271
+        title: {
272
+          text: 'ECharts 入门示例'
206 273
         },
274
+        tooltip: {},
275
+        legend: {
276
+          data: [],
277
+          left: 0
278
+        },
279
+        xAxis: {
280
+          data: []
281
+        },
282
+        yAxis: {
283
+          axisLabel: {
284
+            formatter: '{value} %'
285
+          },
286
+          show: false
287
+        },
288
+        series: [
289
+          {
290
+            name: '',
291
+            type: 'bar',
292
+            data: [],
293
+            barWidth: 30,
294
+            label: {
295
+              normal: {
296
+                show: true,
297
+                position: 'top',
298
+                formatter: (params) => {
299
+                  if(this.percent.length > 0){
300
+                    let str = ''
301
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
302
+                    return str
303
+                  }else{
304
+                    let str = ''
305
+                    str = params.data
306
+                    return str
307
+                  }
308
+                }
309
+              }
310
+            },
311
+            //配置样式
312
+            itemStyle: {
313
+              //通常情况下:
314
+
315
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
316
+              normal: {
317
+                color: function(params) {
318
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
319
+                  var colorList = [
320
+                    ['#A9E0F3', '#9FBDFC'],
321
+                    ['#FFD7C0', '#FF9994']
322
+                  ]
323
+
324
+                  var index = params.dataIndex
325
+                  if (params.dataIndex >= colorList.length) {
326
+                    index = params.dataIndex % colorList.length
327
+                  }
328
+
329
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
330
+                    { offset: 0, color: colorList[index][0] },
331
+                    // { offset: 0.5, color: colorList[index][1] },
332
+                    { offset: 1, color: colorList[index][1] }
333
+                  ])
334
+                },
335
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
336
+              },
337
+
338
+              //鼠标悬停时:
339
+              emphasis: {
340
+                shadowBlur: 10,
341
+                shadowOffsetX: 0,
342
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
343
+              }
344
+            }
345
+          }
346
+        ]
347
+      }
348
+
349
+    }
350
+  },
351
+  methods: {
352
+    printAction(){
353
+      this.$router.push({
354
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355
+      });
356
+
357
+    },exportAction(){
358
+      let list = []
359
+      for (let i = 0; i < this.tableData.length; i++) {
360
+        let order = this.tableData[i]
361
+        let name = order.name
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
364
+
365
+        let obj = {
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
369
+        }
370
+        list.push(obj)
371
+      }
372
+      import('@/vendor/Export2Excel').then(excel => {
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
375
+        const data = this.formatJson(filterVal, list)
376
+        excel.export_json_to_excel1({
377
+          header: tHeader,
378
+          data,
379
+          filename: '明细',
380
+          ref: this.$refs['table'].$el
381
+        })
382
+      })
383
+    },
384
+    changeProject(val) {
385
+      this.query.statistics_type = val
386
+      this.query.page = 1
387
+      this.GetPersonQCStatistisData(this.query)
388
+      this.GetInspectionCheckIndexTableData(this.query)
389
+
390
+    },
391
+    handleChange(val) {
392
+      this.query.patient_id = val.id
393
+      this.query.page = 1
394
+      this.patient_name = val.name
395
+      this.GetPersonQCStatistisData(this.query)
396
+      this.GetInspectionCheckIndexTableData(this.query)
397
+    },
398
+    handleSizeChange(limit) {
399
+      this.query.limit = limit
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleCurrentChange(page) {
404
+      this.query.page = page
405
+      this.GetPersonQCStatistisData(this.query)
406
+    },formatJson(filterVal, jsonData) {
407
+      return jsonData.map(v => filterVal.map(j => v[j]))
408
+    },
409
+    changeTime(val) {
410
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
411
+      if (time > 0) {
412
+        this.$message.error('结束时间不能小于开始时间')
413
+        this.query.start_time = ''
414
+      } else {
415
+        // this.getDialysisList()
416
+        this.query.page = 1
417
+        this.GetPersonQCStatistisData(this.query)
418
+        this.GetInspectionCheckIndexTableData(this.query)
419
+
420
+      }
421
+
422
+    },
423
+    changeEndTime(val) {
424
+      var time =
425
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
426
+      if (time < 0) {
427
+        this.$message.error('结束时间不能小于开始时间')
428
+        this.query.end_time = ''
429
+      } else {
430
+        this.query.page = 1
431
+        this.GetPersonQCStatistisData(this.query)
432
+        this.GetInspectionCheckIndexTableData(this.query)
433
+
434
+      }
435
+    },
436
+    getTimestamp(time) {
437
+      // 把时间日期转成时间戳
438
+      return new Date(time).getTime() / 1000
439
+    },
440
+    QueryOperaById: function(val) {
441
+      let vascular_access_desc_name = ''
442
+      let vascular_access_desc = getDataConfig(
443
+        'hemodialysis',
444
+        'vascular_access_desc'
445
+      )
446
+      for (let i = 0; i < vascular_access_desc.length; i++) {
447
+        if (vascular_access_desc[i].id == val) {
448
+          vascular_access_desc_name = vascular_access_desc[i].name
449
+        }
450
+      }
451
+
452
+      return vascular_access_desc_name
207 453
     },
208
-    
454
+    GetAnticoagulantById: function(val) {
455
+      let anticoagulan_name = ''
456
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
457
+      let anticoagulant = anticoagulantsConfitTwo
458
+      for (let keys in anticoagulant) {
459
+        if (anticoagulant[keys].id == val) {
460
+          anticoagulan_name = anticoagulant[keys].name
461
+        }
462
+      }
463
+      return anticoagulan_name
464
+    },
465
+    getModeName(mode_id) {
466
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
467
+    },  getTime(val) {
468
+      if(val == "" || val == undefined){
469
+        return ""
470
+      }else {
471
+        return uParseTime(val, '{y}-{m}-{d}')
472
+      }
473
+    },
474
+    GetInspectionCheckIndexTableData(params) {
475
+      this.loading = true
476
+      GetPersonQCStatistisData(params)
477
+        .then(rs => {
478
+          var resp = rs.data
479
+          console.log("resp=====",resp)
480
+          if (resp.state == 1) {
481
+            this.loading = false
482
+            this.tableData = []
483
+            for (let i = 0; i < resp.data.inspections.length; i++) {
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
490
+            }
491
+            this.total = resp.data.total
492
+
493
+          } else {
494
+            this.loading = false
495
+          }
496
+        })
497
+        .catch(error => {
498
+
499
+        })
500
+    },
501
+    GetPersonQCStatistisData(params) {
502
+      this.chart.xAxis.data = []
503
+      this.chart.series[0].data = []
504
+      this.bar.xAxis.data = []
505
+      this.bar.series[0].data = []
506
+      this.percent = []
507
+      GetPersonQCStatistisData(params)
508
+        .then(rs => {
509
+          var resp = rs.data
510
+          if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
512
+            for (let i = 0; i < resp.data.inspections.length; i++) {
513
+              this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+              this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+            }
516
+            console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
519
+            this.getArrLength(this.chart.xAxis.data,1)
520
+          } else {
521
+
522
+          }
523
+        })
524
+        .catch(error => {
525
+        })
526
+    },
527
+    handleSelect(val) {
528
+      this.query.patient_id = val.id
529
+      this.query.page = 1
530
+      this.patient_name = val.name
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
+      }
536
+
537
+
538
+    },
539
+    querySearchAsync(keyword, cb) {
540
+      let key = ''
541
+      if (keyword != undefined) {
542
+        key = keyword
543
+      }
544
+      let searchArray = []
545
+      PostSearch(key).then(response => {
546
+        if (response.data.state == 1) {
547
+          searchArray = response.data.data.patient
548
+          cb(searchArray)
549
+        } else {
550
+          cb([])
551
+        }
552
+      })
553
+    },
554
+    chooseWay(way) {
555
+      this.wayType = way
556
+    }, getCurrentOrgPatients() {
557
+      getCurrentOrgPatients().then(response => {
558
+        if (response.data.state == 1) {
559
+          var patients = response.data.data.patients
560
+          this.patientsData = patients
561
+          this.GetDefaultPatient()
562
+        }
563
+      })
564
+    }, GetDefaultPatient() {
565
+      GetDefaultPatient().then(response => {
566
+        if (response.data.state == 1) {
567
+          var patient = response.data.data.patient
568
+          for (let i = 0;i < this.patientsData.length; i++){
569
+            if (this.patientsData[i].id == patient.id){
570
+              this.patient_name = this.patientsData[i].name
571
+              this.$refs.table.setCurrentRow(this.patientsData[i])
572
+            }
573
+          }
574
+          this.query.patient_id = patient.id
575
+          this.GetPersonQCStatistisData(this.query)
576
+
577
+        }
578
+      })
579
+
580
+    },
581
+    getArrLength(result,type){
582
+      if(type == 1){
583
+        if(result.length > 10){
584
+          var dataZoom_end = (10/result.length)*100;
585
+          this.chart.dataZoom[0].end = dataZoom_end
586
+        }else{
587
+          var dataZoom_end = 100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }
590
+      }else if(type == 2){
591
+        if(result.length > 10){
592
+          var dataZoom_end = (10/result.length)*100;
593
+          this.bar.dataZoom[0].end = dataZoom_end
594
+        }else{
595
+          var dataZoom_end = 100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }
598
+      }
599
+
600
+    }
601
+  }, mounted() {
602
+    var date = new Date()
603
+    var year = date.getFullYear() //获取完整的年份(4位)
604
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
605
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
606
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
607
+    this.query.patient_id = 0
608
+    this.query.end_time = year + '-' + month + '-' + day
609
+    this.query.start_time = year + '-' + last_month + '-' + day
610
+    this.query.project_id = 1
611
+    this.query.item_id = 166
612
+    this.getCurrentOrgPatients()
613
+
614
+    // this.GetPersonQCStatistisData()
615
+
616
+
617
+  }
209 618
 }
210 619
 </script>
620
+
211 621
 <style lang="scss" scoped>
212
-.content_top{
213
-    display: flex;
214
-    justify-content: space-around;
215
-    margin-bottom: 20px;
622
+.tableTitle {
623
+  font-size: 16px;
624
+  color: #000;
625
+  font-weight: bold;
626
+  margin-bottom: 10px;
627
+}
628
+</style>
629
+<style lang="scss">
630
+.page_process {
631
+.el-tabs{
632
+  margin-bottom:0 !important;
633
+}
634
+.el-button--medium {
635
+  padding: 10px 8px;
636
+}
637
+
638
+.el-form-item {
639
+  margin-bottom: 0;
640
+}
641
+::-webkit-scrollbar{
642
+  height: 15px !important;
643
+}
644
+
216 645
 }
217
-</style>
646
+</style>

+ 212 - 0
src/xt_pages/Dialysisanalysis/print/print.vue 查看文件

@@ -0,0 +1,212 @@
1
+<template>
2
+  <div class="main-contain">
3
+    <div class="position">
4
+      <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+      <el-row style="float:right;">
6
+        <el-col :span="24">
7
+          <el-button
8
+            size="small"
9
+            icon="el-icon-printer"
10
+            type="primary"
11
+            @click="printAction"
12
+          >打印</el-button
13
+          >
14
+        </el-col>
15
+      </el-row>
16
+    </div>
17
+    <div class="app-container" style="background-color: white;">
18
+      <div id="print_content">
19
+        <div class="print_main_content">
20
+          <div class="order_title_panl">
21
+            <span class="main_title">{{reference.item_name}}详情</span>
22
+          </div>
23
+          <div class="table_panel">
24
+            <table class="table">
25
+              <thead>
26
+              <tr>
27
+                <td width="50">序号</td>
28
+                <td width="100" >透析号</td>
29
+                <td width="70">患者姓名</td>
30
+                <td width="70">检查日期</td>
31
+                <td width="70" >结果</td>
32
+              </tr>
33
+              </thead>
34
+              <tbody>
35
+              <tr v-for="(item, index) in checkData" :key="index">
36
+                <td :width="td_1_width">{{index + 1}}</td>
37
+                <td :width="td_1_width">
38
+                  <span>{{item.dialysis_no}}</span>
39
+                </td>
40
+                <td :width="td_1_width">{{item.name}}</td>
41
+                <td :width="td_1_width">{{getTime(item.check_date)}}</td>
42
+                <td :width="td_1_width">{{item.result}}</td>
43
+              </tr>
44
+              </tbody>
45
+            </table>
46
+          </div>
47
+        </div>
48
+      </div>
49
+    </div>
50
+  </div>
51
+</template>
52
+
53
+<script>
54
+import { GetPersonQCStatistisData } from '@/api/qcd'
55
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
56
+import print from 'print-js'
57
+import { jsGetAge, uParseTime } from '@/utils/tools'
58
+
59
+export default {
60
+  name: 'SchedulePrint',
61
+  data() {
62
+    return {
63
+      checkData:[],
64
+      crumbs: [
65
+        { path: false, name: '专业质控' },
66
+        { path: false, name: '检验详情打印' }
67
+      ],
68
+      scheduleData:[],
69
+      week_type: 0,
70
+      day:'',
71
+      td_1_width: '10%',
72
+      td_2_width: '10%',
73
+      td_3_width: '25%',
74
+      td_4_width: '45%',
75
+      modeOptions: null,
76
+      anticoagulants_confit:null,
77
+      currentDate:'',
78
+      org_id:0,
79
+      printObj:{},
80
+      week_time:0,
81
+      zone:0,
82
+      reference:null,
83
+    }
84
+  },
85
+  components: {
86
+    BreadCrumb
87
+  },
88
+  created() {
89
+    var patient_id = this.$route.query.patient_id
90
+    var project_id  = this.$route.query.project_id
91
+    var item_id  = this.$route.query.item_id
92
+    var start_time  = this.$route.query.start_time
93
+    var end_time  = this.$route.query.end_time
94
+
95
+    const params = {
96
+      patient_id:patient_id,
97
+      project_id:project_id,
98
+      item_id:item_id,
99
+      start_time: start_time,
100
+      end_time: end_time
101
+    }
102
+    GetPersonQCStatistisData(params).then(response=>{
103
+      if(response.data.state ==1){
104
+        let dialysis_no = response.data.data.patient.dialysis_no
105
+        let name = response.data.data.patient.name
106
+        this.checkData = []
107
+        this.reference = response.data.data.reference
108
+        for(let i = 0; i < response.data.data.inspections.length;i++){
109
+          let obj ={
110
+            dialysis_no:dialysis_no,
111
+            name:name,
112
+            check_date:response.data.data.inspections[i].inspect_date,
113
+            result:response.data.data.inspections[i].inspect_value
114
+          }
115
+          this.checkData.push(obj)
116
+
117
+
118
+        }
119
+
120
+
121
+      }
122
+    })
123
+  },
124
+  methods: {
125
+    getTime(val) {
126
+      if(val == "" || val == undefined){
127
+        return ""
128
+      }else {
129
+        return uParseTime(val, '{y}-{m}-{d}')
130
+      }
131
+    },
132
+    printAction: function() {
133
+      const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
134
+      printJS({
135
+        printable: 'print_content',
136
+        type: 'html',
137
+        documentTitle: '  ',
138
+        style: style,
139
+        scanStyles: false
140
+      })
141
+    },
142
+  },
143
+}
144
+</script>
145
+
146
+<style rel="stylesheet/scss" lang="scss" scoped>
147
+.print_main_content {
148
+  background-color: white;
149
+  max-width: 1500px;
150
+  margin: 0 auto;
151
+  padding: 0 0 20px 0;
152
+
153
+.order_title_panl {
154
+  text-align: center;
155
+
156
+.main_title {
157
+  font-size: 18px;
158
+  line-height: 40px;
159
+  font-weight: 500;
160
+}
161
+}
162
+.table_panel {
163
+.table {
164
+  width: 100%;
165
+  border: 1px solid;
166
+  border-collapse: collapse;
167
+  padding: 2px;
168
+
169
+thead {
170
+tr {
171
+td {
172
+  border: 1px solid;
173
+  text-align: center;
174
+  font-size: 20px;
175
+  padding: 15px 5px;
176
+}
177
+}
178
+}
179
+tbody {
180
+tr {
181
+td {
182
+  border: 1px solid;
183
+  text-align: center;
184
+  font-size: 18px;
185
+  padding: 10px 5px;
186
+
187
+.proj {
188
+  padding: 5px 0;
189
+  text-align: left;
190
+
191
+.proj_title {
192
+  font-size: 16px;
193
+  font-weight: 500;
194
+  line-height: 25px;
195
+}
196
+
197
+.proj_item {
198
+  font-size: 15px;
199
+  line-height: 20px;
200
+
201
+.zone_name {
202
+  font-weight: 500;
203
+}
204
+}
205
+}
206
+}
207
+}
208
+}
209
+}
210
+}
211
+}
212
+</style>

+ 630 - 224
src/xt_pages/Dialysisanalysis/qualitycontrol/individual.vue 查看文件

@@ -1,243 +1,649 @@
1 1
 <template>
2
-    <div>
3
-       <div class="content_top">
4
-            <el-autocomplete
5
-            class="inline-input"
6
-            v-model="inputValue"
7
-            :fetch-suggestions="querySearch"
8
-            :trigger-on-focus="false"
9
-            placeholder="请输入患者名字或透析号"
10
-            @select="handleSubmit"
11
-            ></el-autocomplete>
2
+  <div class="main-contain">
3
+    <div class="app-container">
4
+      <div class="page_process">
5
+        <new-nav activeName="process"></new-nav>
6
+        <div class="cell clearfix">
7
+          <el-form :inline="true">
8
+            <el-form-item label>
9
+              <el-autocomplete
10
+                class="checkSearch"
11
+                popper-class="my-autocomplete"
12
+                v-model="search_value"
13
+                :fetch-suggestions="querySearchAsync"
14
+                :trigger-on-focus="false"
15
+                placeholder="请输入病人名字"
16
+                @select="handleSelect"
17
+                style="width:160px;"
18
+              >
19
+                <i class="el-icon-search el-input__icon" slot="suffix"></i>
20
+                <template slot-scope="{ item }">
21
+                  <div class="name">{{ item.name }}</div>
22
+                </template>
23
+              </el-autocomplete>
24
+
25
+            </el-form-item>
26
+          </el-form>
27
+
28
+          <label class="title">
29
+            <span class="name">日期查询</span> :
30
+          </label>
31
+          <el-date-picker
32
+            v-model="query.start_time"
33
+            prefix-icon="el-icon-date"
34
+            @change="changeTime"
35
+            :editable="false"
36
+            style="width: 150px;"
37
+            type="date"
38
+            placeholder="选择日期时间"
39
+            align="right"
40
+            format="yyyy-MM-dd"
41
+            value-format="yyyy-MM-dd"
42
+          ></el-date-picker>
43
+          <span class>-</span>
44
+          <el-date-picker
45
+            v-model="query.end_time"
46
+            prefix-icon="el-icon-date"
47
+            @change="changeEndTime"
48
+            :editable="false"
49
+            style="width: 150px;"
50
+            type="date"
51
+            placeholder="选择日期时间"
52
+            align="right"
53
+            format="yyyy-MM-dd"
54
+            value-format="yyyy-MM-dd"
55
+          ></el-date-picker>
56
+
57
+          <el-button size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
58
+          </el-button>
59
+          <el-button size="small" icon="el-icon-printer" @click="exportAction" type="primary">导出
60
+
61
+          </el-button>
62
+        </div>
63
+
64
+        <el-container>
65
+          <div style="width:160px">
66
+
67
+            <div class="tableTitle">患者列表</div>
68
+
69
+
70
+            <el-table ref="table" :data="patientsData" border style="width: 100%;" height="500"
71
+                      :row-style="{ color: '#303133' }"
72
+                      :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
73
+                      highlight-current-row
74
+                      @current-change="handleChange">
75
+              <el-table-column prop="dialysis_no" label="透析号" width="70" align="center">
76
+                <template slot-scope="scope">{{scope.row.dialysis_no}}</template>
77
+              </el-table-column>
78
+              <el-table-column prop="name" label="姓名" width="90" align="center">
79
+                <template slot-scope="scope">{{ scope.row.name }}</template>
80
+              </el-table-column>
81
+            </el-table>
82
+          </div>
83
+          <div style="padding-left:10px;flex:1;width:0;">
84
+            <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
12 85
             <div>
13
-                <span>查询时间:</span>
14
-                <el-date-picker
15
-                v-model="stat_time"
16
-                type="date"
17
-                placeholder="选择日期">
18
-                </el-date-picker>
19
-                <span>-</span>
20
-                <el-date-picker
21
-                v-model="end_time"
22
-                type="date"
23
-                placeholder="选择日期">
24
-                </el-date-picker>
25
-                <el-select v-model="value" placeholder="请选择">
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 v-model="value" placeholder="请选择">
34
-                    <el-option
35
-                    v-for="item in options"
36
-                    :key="item.value"
37
-                    :label="item.label"
38
-                    :value="item.value">
39
-                    </el-option>
40
-                </el-select>
41
-                <el-button type="primary">查询</el-button>
86
+              <line-chart :options="chart"></line-chart>
87
+<!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+<!--              <line-chart></line-chart>-->
89
+
42 90
             </div>
91
+            <div class="tableTitle">统计表</div>
43 92
             <div>
44
-                <el-button type="primary">打印</el-button>
45
-                <el-button type="primary">导出</el-button>
46
-            </div>
47
-       </div>
48
-       <div style="margin: 20px 0px;">
49
-        <h2 >患者列表</h2>
50
-       </div>
51
-       <div >
52
-        <el-row :gutter="20">
53
-            <el-col :span="4">
54
-              <div class="grid-content bg-purple">
55
-                <!-- <span style="font-size: 18px;font-weight: bold;display: block;">患者列表</span> -->
56
-                <!-- <h2>患者列表</h2> -->
57
-                <el-table
58
-                :data="tableData"
59
-                border
60
-                style="width: 100%">
61
-                    <el-table-column
62
-                        align="center"
63
-                        prop="date"
64
-                        label="透析号"
65
-                       >
66
-                    </el-table-column>
67
-                    <el-table-column
68
-                        align="center"
69
-                        prop="name"
70
-                        label="姓名"
71
-                        >
72
-                    </el-table-column>
73
-                </el-table>
74
-              </div>
75
-            </el-col>
76
-            <el-col :span="19">
77
-               <div class="grid-content bg-purple">
78
-                <div class="echart" id="germychart" style="width:100%;height:400px"></div>
79
-                <el-table
80
-                    :data="tableData"
81
-                    style="width: 100%"
82
-                    border
83
-                    align="center"
84
-                    max-height="250">
85
-                    <el-table-column
86
-                    fixed
87
-                    prop="date"
88
-                    label="姓名"
89
-                   >
90
-                    </el-table-column>
91
-                    <el-table-column
92
-                    prop="name"
93
-                    label="检查日期"
94
-                    >
95
-                    </el-table-column>
96
-                    <el-table-column
97
-                    prop="province"
98
-                    label="甲状旁腺激素(pg/ml)"
99
-                    >
100
-                    </el-table-column>
101
-                    
102
-                </el-table>
103
-               </div>
104
-           </el-col>
105
-        </el-row>
106
-       </div>
93
+              <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
+                <el-table-column label="姓名" align="center">
95
+                  <template slot-scope="scope">
96
+                    {{scope.row.name}}
97
+                  </template>
98
+                </el-table-column>
99
+
100
+                <el-table-column width="100" label="检查日期" align="center">
101
+                  <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
104
+                  </template>
105
+                </el-table-column>
107 106
 
107
+                <el-table-column width="100" label="甲状旁腺激素分析" align="center">
108
+                  <template slot-scope="scope">
109
+                    {{scope.row.value}}
110
+                  </template>
111
+                </el-table-column>
112
+              </el-table>
113
+
114
+
115
+            </div>
116
+          </div>
117
+        </el-container>
118
+      </div>
108 119
     </div>
120
+  </div>
109 121
 </template>
122
+
123
+
110 124
 <script>
111
-  import * as echarts from 'echarts'
112
-export default{
113
-    // props: {
114
-    //     width: {
115
-    //         type: String,
116
-    //         default: "100%"
117
-    //     },
118
-    //     height: {
119
-    //         type: String,
120
-    //         default: "400px"
121
-    //     },
122
-    
123
-    // },
124
-    data() {
125
-        return {
126
-            inputValue:'',
127
-            stat_time:'',
128
-            end_time:'',
129
-            value:'',
130
-            querySearch:'',
131
-            tableData:[],
132
-            options:[],
133
-            myChartTwo: {},
134
-            xData: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], //横坐标
135
-            opinionData: [23, 24, 18, 25, 27, 28, 25], //人数数据
136
-            // myChartStyle: { float: "left", width: "100%", height: "400px" },//图表样式
137
-            
125
+import echarts from 'echarts'
126
+import {  uParseTime } from '@/utils/tools'
127
+import { getCurrentOrgPatients } from '@/api/common/common'
128
+import {
129
+  GetDefaultPatient,
130
+} from '@/api/common/statistics'
131
+import { PostSearch } from '@/api/patient'
132
+import { getDataConfig } from '@/utils/data'
133
+import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
135
+
136
+export default {
137
+  components: {
138
+    LineChart
139
+  },
140
+  data() {
141
+    return {
142
+      pickerOptions: {
143
+        disabledDate(time) {
144
+          let threeMonths = new Date(new Date().setFullYear(new Date().getFullYear() - 1)).getTime() - 24 * 3600 * 1000
145
+          return time.getTime() > Date.now() || time.getTime() < threeMonths
146
+
138 147
         }
139
-    },
140
-    created(){
141
-        
142
-       
143
-    },
144
-    mounted() {
145
-        // this.$nextTick(function() {
146
-            this.initEcharts();
147
-            // this.myChartTwo = echarts.init(document.getElementById("germychart"));
148
-            // this.myChartTwo.setOption(option);
149
-            // // //随着屏幕大小调节图表
150
-            // window.addEventListener("resize", () => {
151
-            //     console.log('asdfgfdhdgfdghdffgasda');
152
-            //     this.myChartTwo.resize();
153
-            // });
154
-            
155
-            // window.onresize = this.myChartTwo.resize;
156
-		// })  
157
-    },
158
-    // beforeDestroy(){
159
-    //     window.addEventListener("resize", () => {
160
-    //         this.myChartTwo.resize();
161
-    //     });
162
-    //     const quality = document.getElementById("germychart");
163
-    //     quality.addEventListener("transitionend", this.__resizeHanlder);
164
-    // },
165
-    methods:{
166
-        handleSubmit(){
167
-            console.log('asdfa');
168
-            this.querySearch
148
+      },
149
+      patient_name:'',
150
+      percent:[],
151
+      patientsData: [],
152
+      tableData: [],
153
+      loading: false,
154
+      search_value: '',
155
+      total: 0,
156
+      query: {
157
+        patient_id: '',
158
+        statistics_type: 1,
159
+        start_time: '',
160
+        end_time: '',
161
+        limit: 10,
162
+        page: 1
163
+      },
164
+      crumbs: [
165
+        { path: false, name: '科室质控' },
166
+        { path: false, name: '指标评估统计' },
167
+        { path: false, name: '透析过程指标统计' }
168
+      ],
169
+      tableData1: [],
170
+      chart: {
171
+        title: {
172
+          text: 'ECharts 入门示例'
169 173
         },
170
-        initEcharts() {
171
-            this.myChartTwo = echarts.init(document.getElementById("germychart"));
172
-            console.log('zxczvbbnm,m');
173
-            const option = {
174
-                xAxis: {
175
-                    type: 'category',
176
-                        boundaryGap:true,
177
-                        axisTick:{
178
-                            alignWithLabel:true //保证刻度线和标签对齐
179
-                        },
180
-                    data: this.xData,
181
-                    splitNumber:this.xData.length, //纵坐标数
182
-                    interval:this.xData //强制设置坐标轴分割间隔
183
-                },
184
-                yAxis: {
185
-                    type: 'value',
186
-                    boundaryGap: true,
187
-                    splitNumber:4, //纵坐标数
188
-                    interval:10 //强制设置坐标轴分割间隔
189
-                },
190
-                legend: {
191
-                    // show: true,
192
-                    align:'left',//文字在前图标在后
193
-                    left:'15%',
194
-                    top:'5%',
195
-                    data: [{name:'甲状旁腺激素 pg/ml'}]
174
+        tooltip: {},
175
+        legend: {
176
+          data: [],
177
+          left: 0
178
+        },
179
+        xAxis: {
180
+          data: []
181
+        },
182
+        yAxis: {
183
+          axisLabel: {
184
+            formatter: '{value} %'
185
+          },
186
+          show: false
187
+        },
188
+        series: [
189
+          {
190
+            name: '',
191
+            type: 'line',
192
+            data: [],
193
+            barWidth: 30,
194
+            label: {
195
+              normal: {
196
+                show: true,
197
+                position: 'top',
198
+                formatter: (params) => {
199
+                  if(this.percent.length > 0){
200
+                    let str = ''
201
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
202
+                    return str
203
+                  }else{
204
+                    let str = ''
205
+                    str = params.data
206
+                    return str
207
+                  }
208
+                }
209
+              }
210
+            },
211
+            //配置样式
212
+            itemStyle: {
213
+              //通常情况下:
214
+
215
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
216
+              normal: {
217
+                color: function(params) {
218
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
219
+                  var colorList = [
220
+                    ['#A9E0F3', '#9FBDFC'],
221
+
222
+                    ['#FFD7C0', '#FF9994']
223
+                  ]
224
+
225
+                  var index = params.dataIndex
226
+                  if (params.dataIndex >= colorList.length) {
227
+                    index = params.dataIndex % colorList.length
228
+                  }
229
+
230
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
231
+                    { offset: 0, color: colorList[index][0] },
232
+                    // { offset: 0.5, color: colorList[index][1] },
233
+                    { offset: 1, color: colorList[index][1] }
234
+                  ])
196 235
                 },
197
-                grid:{
198
-                    show:true,
199
-                    left: "5%",
200
-                    right: "5%",
201
-                    bottom: "5%"
236
+                lineStyle:{
237
+                  color:'#409eff' //改变折线颜色
202 238
                 },
203
-                series: [
204
-                {
205
-                    data: this.opinionData,
206
-                    name:'甲状旁腺激素 pg/ml',
207
-                    type: "line",// 类型设置为折线图
208
-                    symbol: 'circle',
209
-                    itemStyle: {
210
-                        normal: {
211
-                            color: '#409eff', //改变折线点的颜色#a80000
212
-                            lineStyle: {
213
-                                color: '#409eff' //改变折线颜色
214
-                            }
215
-                        }
216
-                    },
239
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
240
+              },
217 241
 
218
-                },
219
-                
220
-                ],
221
-                
222
-            };
223
-            
224
-            this.myChartTwo.setOption(option);
225
-            // //随着屏幕大小调节图表
226
-            window.addEventListener("resize", () => {
227
-                console.log('123456788');
228
-                this.myChartTwo.resize();
229
-            });
230
-            
231
-            // window.onresize = this.myChartTwo.resize;
242
+              //鼠标悬停时:
243
+              emphasis: {
244
+                shadowBlur: 10,
245
+                shadowOffsetX: 0,
246
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
247
+              }
248
+            }
249
+          }
250
+        ],
251
+        dataZoom: [
252
+          {
253
+            // Y轴固定,让内容滚动
254
+            type: 'slider',
255
+            show: false,
256
+            xAxisIndex: [0],
257
+            start: 1,
258
+            end: 20, // 设置X轴刻度之间的间隔(根据数据量来调整)
259
+            zoomLock: true // 锁定区域禁止缩放(鼠标滚动会缩放,所以禁止)
260
+          },
261
+          {
262
+            type: 'inside',
263
+            xAxisIndex: [0],
264
+            start: 1,
265
+            end: 20,
266
+            zoomLock: true // 锁定区域禁止缩放
267
+          }
268
+        ]
269
+      },
270
+      bar: {
271
+        title: {
272
+          text: 'ECharts 入门示例'
273
+        },
274
+        tooltip: {},
275
+        legend: {
276
+          data: [],
277
+          left: 0
278
+        },
279
+        xAxis: {
280
+          data: []
232 281
         },
282
+        yAxis: {
283
+          axisLabel: {
284
+            formatter: '{value} %'
285
+          },
286
+          show: false
287
+        },
288
+        series: [
289
+          {
290
+            name: '',
291
+            type: 'bar',
292
+            data: [],
293
+            barWidth: 30,
294
+            label: {
295
+              normal: {
296
+                show: true,
297
+                position: 'top',
298
+                formatter: (params) => {
299
+                  if(this.percent.length > 0){
300
+                    let str = ''
301
+                    str = params.data + '('+ this.percent[params.dataIndex] +'%)'
302
+                    return str
303
+                  }else{
304
+                    let str = ''
305
+                    str = params.data
306
+                    return str
307
+                  }
308
+                }
309
+              }
310
+            },
311
+            //配置样式
312
+            itemStyle: {
313
+              //通常情况下:
314
+
315
+              //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
316
+              normal: {
317
+                color: function(params) {
318
+                  //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
319
+                  var colorList = [
320
+                    ['#A9E0F3', '#9FBDFC'],
321
+                    ['#FFD7C0', '#FF9994']
322
+                  ]
323
+
324
+                  var index = params.dataIndex
325
+                  if (params.dataIndex >= colorList.length) {
326
+                    index = params.dataIndex % colorList.length
327
+                  }
328
+
329
+                  return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
330
+                    { offset: 0, color: colorList[index][0] },
331
+                    // { offset: 0.5, color: colorList[index][1] },
332
+                    { offset: 1, color: colorList[index][1] }
333
+                  ])
334
+                },
335
+                barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
336
+              },
337
+
338
+              //鼠标悬停时:
339
+              emphasis: {
340
+                shadowBlur: 10,
341
+                shadowOffsetX: 0,
342
+                shadowColor: 'rgba(0, 0, 0, 0.5)'
343
+              }
344
+            }
345
+          }
346
+        ]
347
+      }
348
+
349
+    }
350
+  },
351
+  methods: {
352
+    printAction(){
353
+      this.$router.push({
354
+        path: "/Dialysisanalysis/qualitycontrol/print?patient_id=" + this.query.patient_id+"&project_id="+this.query.project_id+"&item_id="+this.query.item_id+"&start_time="+this.query.start_time+"&end_time="+this.query.end_time
355
+      });
356
+
357
+    },exportAction(){
358
+      let list = []
359
+      for (let i = 0; i < this.tableData.length; i++) {
360
+        let order = this.tableData[i]
361
+        let name = order.name
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
364
+
365
+        let obj = {
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
369
+        }
370
+        list.push(obj)
371
+      }
372
+      import('@/vendor/Export2Excel').then(excel => {
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
375
+        const data = this.formatJson(filterVal, list)
376
+        excel.export_json_to_excel1({
377
+          header: tHeader,
378
+          data,
379
+          filename: '明细',
380
+          ref: this.$refs['table'].$el
381
+        })
382
+      })
383
+    },
384
+    changeProject(val) {
385
+      this.query.statistics_type = val
386
+      this.query.page = 1
387
+      this.GetPersonQCStatistisData(this.query)
388
+      this.GetInspectionCheckIndexTableData(this.query)
389
+
390
+    },
391
+    handleChange(val) {
392
+      this.query.patient_id = val.id
393
+      this.query.page = 1
394
+      this.patient_name = val.name
395
+      this.GetPersonQCStatistisData(this.query)
396
+      this.GetInspectionCheckIndexTableData(this.query)
397
+    },
398
+    handleSizeChange(limit) {
399
+      this.query.limit = limit
400
+      this.GetInspectionCheckIndexTableData(this.query)
401
+
402
+    },
403
+    handleCurrentChange(page) {
404
+      this.query.page = page
405
+      this.GetPersonQCStatistisData(this.query)
406
+    },formatJson(filterVal, jsonData) {
407
+      return jsonData.map(v => filterVal.map(j => v[j]))
408
+    },
409
+    changeTime(val) {
410
+      var time = this.getTimestamp(val) - this.getTimestamp(this.query.end_time)
411
+      if (time > 0) {
412
+        this.$message.error('结束时间不能小于开始时间')
413
+        this.query.start_time = ''
414
+      } else {
415
+        // this.getDialysisList()
416
+        this.query.page = 1
417
+        this.GetPersonQCStatistisData(this.query)
418
+        this.GetInspectionCheckIndexTableData(this.query)
419
+
420
+      }
421
+
422
+    },
423
+    changeEndTime(val) {
424
+      var time =
425
+        this.getTimestamp(val) - this.getTimestamp(this.query.start_time)
426
+      if (time < 0) {
427
+        this.$message.error('结束时间不能小于开始时间')
428
+        this.query.end_time = ''
429
+      } else {
430
+        this.query.page = 1
431
+        this.GetPersonQCStatistisData(this.query)
432
+        this.GetInspectionCheckIndexTableData(this.query)
433
+
434
+      }
435
+    },
436
+    getTimestamp(time) {
437
+      // 把时间日期转成时间戳
438
+      return new Date(time).getTime() / 1000
439
+    },
440
+    QueryOperaById: function(val) {
441
+      let vascular_access_desc_name = ''
442
+      let vascular_access_desc = getDataConfig(
443
+        'hemodialysis',
444
+        'vascular_access_desc'
445
+      )
446
+      for (let i = 0; i < vascular_access_desc.length; i++) {
447
+        if (vascular_access_desc[i].id == val) {
448
+          vascular_access_desc_name = vascular_access_desc[i].name
449
+        }
450
+      }
451
+
452
+      return vascular_access_desc_name
453
+    },
454
+    GetAnticoagulantById: function(val) {
455
+      let anticoagulan_name = ''
456
+      var anticoagulantsConfitTwo = this.$store.getters.anticoagulants_confit
457
+      let anticoagulant = anticoagulantsConfitTwo
458
+      for (let keys in anticoagulant) {
459
+        if (anticoagulant[keys].id == val) {
460
+          anticoagulan_name = anticoagulant[keys].name
461
+        }
462
+      }
463
+      return anticoagulan_name
464
+    },
465
+    getModeName(mode_id) {
466
+      return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
467
+    },  getTime(val) {
468
+      if(val == "" || val == undefined){
469
+        return ""
470
+      }else {
471
+        return uParseTime(val, '{y}-{m}-{d}')
472
+      }
473
+    },
474
+    GetInspectionCheckIndexTableData(params) {
475
+      this.loading = true
476
+      GetPersonQCStatistisData(params)
477
+        .then(rs => {
478
+          var resp = rs.data
479
+          console.log("resp=====",resp)
480
+          if (resp.state == 1) {
481
+            this.loading = false
482
+            this.tableData = []
483
+            for (let i = 0; i < resp.data.inspections.length; i++) {
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
490
+            }
491
+            this.total = resp.data.total
492
+
493
+          } else {
494
+            this.loading = false
495
+          }
496
+        })
497
+        .catch(error => {
498
+
499
+        })
500
+    },
501
+    GetPersonQCStatistisData(params) {
502
+      this.chart.xAxis.data = []
503
+      this.chart.series[0].data = []
504
+      this.bar.xAxis.data = []
505
+      this.bar.series[0].data = []
506
+      this.percent = []
507
+      GetPersonQCStatistisData(params)
508
+        .then(rs => {
509
+          var resp = rs.data
510
+          if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
512
+              for (let i = 0; i < resp.data.inspections.length; i++) {
513
+                this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
514
+                this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
515
+              }
516
+              console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
519
+              this.getArrLength(this.chart.xAxis.data,1)
520
+          } else {
521
+
522
+          }
523
+        })
524
+        .catch(error => {
525
+        })
526
+    },
527
+    handleSelect(val) {
528
+      this.query.patient_id = val.id
529
+      this.query.page = 1
530
+      this.patient_name = val.name
531
+      for (let i = 0;i < this.patientsData.length; i++){
532
+        console.log(this.patientsData[i].id)
533
+        console.log(val.id)
534
+
535
+        if (this.patientsData[i].id == val.id){
536
+          this.$refs.table.setCurrentRow(this.patientsData[i])
537
+        }
538
+      }
539
+
540
+
541
+    },
542
+    querySearchAsync(keyword, cb) {
543
+      let key = ''
544
+      if (keyword != undefined) {
545
+        key = keyword
546
+      }
547
+      let searchArray = []
548
+      PostSearch(key).then(response => {
549
+        if (response.data.state == 1) {
550
+          searchArray = response.data.data.patient
551
+          cb(searchArray)
552
+        } else {
553
+          cb([])
554
+        }
555
+      })
556
+    },
557
+    chooseWay(way) {
558
+      this.wayType = way
559
+    }, getCurrentOrgPatients() {
560
+      getCurrentOrgPatients().then(response => {
561
+        if (response.data.state == 1) {
562
+          var patients = response.data.data.patients
563
+          this.patientsData = patients
564
+          this.GetDefaultPatient()
565
+        }
566
+      })
567
+    }, GetDefaultPatient() {
568
+      GetDefaultPatient().then(response => {
569
+        if (response.data.state == 1) {
570
+          var patient = response.data.data.patient
571
+          for (let i = 0;i < this.patientsData.length; i++){
572
+            if (this.patientsData[i].id == patient.id){
573
+              this.patient_name = this.patientsData[i].name
574
+              this.$refs.table.setCurrentRow(this.patientsData[i])
575
+            }
576
+          }
577
+          this.query.patient_id = patient.id
578
+          this.GetPersonQCStatistisData(this.query)
579
+
580
+        }
581
+      })
582
+
233 583
     },
234
-    
584
+    getArrLength(result,type){
585
+      if(type == 1){
586
+        if(result.length > 10){
587
+          var dataZoom_end = (10/result.length)*100;
588
+          this.chart.dataZoom[0].end = dataZoom_end
589
+        }else{
590
+          var dataZoom_end = 100;
591
+          this.chart.dataZoom[0].end = dataZoom_end
592
+        }
593
+      }else if(type == 2){
594
+        if(result.length > 10){
595
+          var dataZoom_end = (10/result.length)*100;
596
+          this.bar.dataZoom[0].end = dataZoom_end
597
+        }else{
598
+          var dataZoom_end = 100;
599
+          this.bar.dataZoom[0].end = dataZoom_end
600
+        }
601
+      }
602
+
603
+    }
604
+  }, mounted() {
605
+    var date = new Date()
606
+    var year = date.getFullYear() //获取完整的年份(4位)
607
+    var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1).toString() : date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
608
+    var day = date.getDate() < 10 ? '0' + date.getDate().toString() : date.getDate() //获取当前日(1-31)
609
+    var last_month = date.getMonth() < 10 ? '0' + date.getMonth().toString() : date.getMonth() //获取当前月份(0-11,0代表1月)
610
+    this.query.patient_id = 0
611
+    this.query.end_time = year + '-' + month + '-' + day
612
+    this.query.start_time = year + '-' + last_month + '-' + day
613
+    this.query.project_id = 20
614
+    this.query.item_id = 171
615
+    this.getCurrentOrgPatients()
616
+
617
+    // this.GetPersonQCStatistisData()
618
+
619
+
620
+  }
235 621
 }
236 622
 </script>
623
+
237 624
 <style lang="scss" scoped>
238
-.content_top{
239
-    display: flex;
240
-    justify-content: space-around;
241
-    margin-bottom: 20px;
625
+.tableTitle {
626
+  font-size: 16px;
627
+  color: #000;
628
+  font-weight: bold;
629
+  margin-bottom: 10px;
630
+}
631
+</style>
632
+<style lang="scss">
633
+.page_process {
634
+.el-tabs{
635
+  margin-bottom:0 !important;
636
+}
637
+.el-button--medium {
638
+  padding: 10px 8px;
639
+}
640
+
641
+.el-form-item {
642
+  margin-bottom: 0;
643
+}
644
+::-webkit-scrollbar{
645
+  height: 15px !important;
646
+}
647
+
242 648
 }
243
-</style>
649
+</style>

+ 419 - 218
src/xt_pages/Dialysisanalysis/qualitycontrol/totalSstatistics.vue 查看文件

@@ -1,268 +1,469 @@
1
-
2 1
 <template>
3 2
   <div>
4
-      <!-- <div class="content_top">
5
-          <div class="block">
6
-              <span>查询时间:</span>
7
-              <el-date-picker
8
-              v-model="time_month"
9
-              type="month"
10
-              placeholder="选择月">
11
-              </el-date-picker>
12
-          </div>
13
-          <div>
14
-              <el-date-picker
15
-              v-model="stat_time"
16
-              type="date"
17
-              placeholder="选择日期">
18
-              </el-date-picker>
19
-              <span>-</span>
20
-              <el-date-picker
21
-              v-model="end_time"
22
-              type="date"
23
-              placeholder="选择日期">
24
-              </el-date-picker>
25
-          </div>
26
-          <div style="width: 200px;">
27
-              <el-input v-model="input" placeholder="请输入内容"></el-input>
28
-          </div>
29
-          <el-button type="primary">查询</el-button>
30
-      </div> -->
31
-      <el-row :gutter="20">
32
-      <el-col :span="5"> 
3
+    <el-row :gutter="25">
4
+      <el-col :span="5">
33 5
         <div class="block">
34 6
           <span>查询时间:</span>
35
-          <el-date-picker
36
-          v-model="time_month"
37
-          type="month"
38
-          placeholder="选择月">
39
-          </el-date-picker>
7
+          <el-select size="small" v-model="time_type" placeholder="请选择"
8
+                     style="width:150px;margin-left:10px;" @change="changeItem">
9
+            <el-option
10
+              v-for="item,index in times"
11
+              :key="index"
12
+              :label="item.label"
13
+              :value="item.value">
14
+            </el-option>
15
+          </el-select>
40 16
         </div>
41 17
       </el-col>
42 18
       <el-col :span="8">
43 19
         <div>
44 20
           <el-date-picker
45
-          v-model="stat_time"
46
-          type="date"
47
-          placeholder="选择日期">
21
+            style="width: 200px"
22
+
23
+            v-model="start_time"
24
+            format="yyyy-MM-dd"
25
+            value-format="yyyy-MM-dd"
26
+            type="date"
27
+
28
+            placeholder="选择日期">
48 29
           </el-date-picker>
49 30
           <span>-</span>
50 31
           <el-date-picker
51
-          v-model="end_time"
52
-          type="date"
53
-          placeholder="选择日期">
32
+            style="width: 200px"
33
+            v-model="end_time"
34
+            format="yyyy-MM-dd"
35
+            value-format="yyyy-MM-dd"
36
+            type="date"
37
+            placeholder="选择日期">
54 38
           </el-date-picker>
55 39
         </div>
56 40
       </el-col>
57
-      <el-col :span="3">
58
-        <div style="width: 200px;">
59
-          <el-input v-model="input" placeholder="请输入内容"></el-input>
41
+      <el-col :span="5">
42
+        <div >
43
+          <el-input disabled v-model="input" placeholder="请输入内容"></el-input>
60 44
         </div>
61 45
       </el-col>
62
-      <el-col :span="2">
63
-          <el-button type="primary">查询</el-button>
46
+      <el-col :span="3">
47
+        <el-button type="primary" @click="getData()">查询</el-button>
64 48
       </el-col>
65
-      </el-row>
66
-      
67
-      <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
68
-        <p class="chartTitle">统计图</p>
69
-      </div>
70
-      <div class="echart" id="mychart" :style={width:width,height:height}></div>
71
-      <div style="width: 80%;margin: auto;">
72
-          <el-table
73
-          :data="tableData"
74
-          :show-summary = true
75
-          border
76
-          style="width: 100%;">
77
-              <el-table-column
78
-                  prop="date"
79
-                  align="center"
80
-                  label="甲状旁腺激素"
81
-                  >
82
-              </el-table-column>
83
-              <el-table-column
84
-                  prop="name"
85
-                  
86
-                  label="人数"
87
-                  >
88
-              </el-table-column>
89
-              <el-table-column
90
-                  prop="address"
91
-                  align="center"
92
-                  label="操作">
93
-                  <template slot-scope="scope">
94
-                      <el-button @click="handleClick(scope.row)" style="font-size:16px;"
95
-                              type="text" >查看详情
96
-                      </el-button>
97
-                  </template>
98
-              </el-table-column>
99
-          </el-table>
100
-      </div>
49
+    </el-row>
50
+    <div class="cell clearfix" style="margin: 20px; font-weight: bold;">
51
+      <p class="chartTitle">统计图</p>
52
+    </div>
53
+    <div class="echart" id="mychart" :style={width:width,height:height}></div>
54
+    <div style="width: 80%;margin: auto;">
55
+      <el-table
56
+        :data="tableData"
57
+        border
58
+        style="width: 100%;">
59
+        <el-table-column
60
+          prop="name"
61
+          align="center"
62
+          label="甲状旁腺激素"
63
+        >
64
+        </el-table-column>
65
+        <el-table-column
66
+          prop="count"
67
+          label="人数"
68
+        >
69
+        </el-table-column>
70
+<!--        <el-table-column-->
71
+<!--          prop="address"-->
72
+<!--          align="center"-->
73
+<!--          label="操作">-->
74
+<!--          <template slot-scope="scope">-->
75
+<!--            <el-button @click="handleClick(scope.row)" style="font-size:16px;"-->
76
+<!--                       type="text">查看详情-->
77
+<!--            </el-button>-->
78
+<!--          </template>-->
79
+<!--        </el-table-column>-->
80
+      </el-table>
81
+    </div>
82
+<!--    <el-dialog class="centerDialog"-->
83
+<!--               title="打印"-->
84
+<!--              >-->
85
+<!--      <el-row :gutter="25">-->
86
+<!--        <el-col :span="5">-->
87
+<!--          <div class="block">-->
88
+<!--            <span>查询时间:</span>-->
89
+<!--            <el-select size="small" v-model="time_type" placeholder="请选择"-->
90
+<!--                       style="width:150px;margin-left:10px;" @change="changeItem">-->
91
+<!--              <el-option-->
92
+<!--                v-for="item,index in times"-->
93
+<!--                :key="index"-->
94
+<!--                :label="item.label"-->
95
+<!--                :value="item.value">-->
96
+<!--              </el-option>-->
97
+<!--            </el-select>-->
98
+<!--          </div>-->
99
+<!--        </el-col>-->
100
+<!--        <el-col :span="8">-->
101
+<!--          <div>-->
102
+<!--            <el-date-picker-->
103
+<!--              style="width: 200px"-->
104
+
105
+<!--              v-model="start_time"-->
106
+<!--              format="yyyy-MM-dd"-->
107
+<!--              value-format="yyyy-MM-dd"-->
108
+<!--              type="date"-->
109
+
110
+<!--              placeholder="选择日期">-->
111
+<!--            </el-date-picker>-->
112
+<!--            <span>-</span>-->
113
+<!--            <el-date-picker-->
114
+<!--              style="width: 200px"-->
115
+<!--              v-model="end_time"-->
116
+<!--              format="yyyy-MM-dd"-->
117
+<!--              value-format="yyyy-MM-dd"-->
118
+<!--              type="date"-->
119
+<!--              placeholder="选择日期">-->
120
+<!--            </el-date-picker>-->
121
+<!--          </div>-->
122
+<!--        </el-col>-->
123
+<!--        <el-col :span="5">-->
124
+<!--          <el-select-->
125
+<!--            placeholder="请选择类型"-->
126
+<!--            style="width:95%"-->
127
+<!--          >-->
128
+<!--            <el-option label="不达标患者" value="1"></el-option>-->
129
+<!--            <el-option label="未检查患者" value="2"></el-option>-->
130
+<!--            <el-option label="达标患者" value="3"></el-option>-->
131
+<!--            <el-option label="不限" value="0"></el-option>-->
132
+<!--          </el-select>-->
133
+<!--        </el-col>-->
134
+<!--        <el-col :span="5">-->
135
+<!--          <el-select-->
136
+<!--            placeholder="请选择排序"-->
137
+<!--            style="width:95%"-->
138
+<!--          >-->
139
+<!--            <el-option label="按时间" value="1"></el-option>-->
140
+<!--            <el-option label="按患者" value="2"></el-option>-->
141
+<!--            <el-option label="不限" value="0"></el-option>-->
142
+<!--          </el-select>-->
143
+<!--        </el-col>-->
144
+<!--        <el-col :span="3">-->
145
+<!--          <el-button type="primary" @click="getData()">查询</el-button>-->
146
+<!--          <el-button type="primary" @click="getData()">打印</el-button>-->
147
+<!--          <el-button type="primary" @click="getData()">导出</el-button>-->
148
+
149
+<!--        </el-col>-->
150
+<!--      </el-row>-->
151
+<!--      <div style="width: 80%;margin: auto;">-->
152
+<!--        <el-table-->
153
+<!--          :data="tableData"-->
154
+<!--          border-->
155
+<!--          style="width: 100%;">-->
156
+<!--          <el-table-column-->
157
+<!--            prop="name"-->
158
+<!--            align="center"-->
159
+<!--            label="透析号"-->
160
+<!--          >-->
161
+<!--          </el-table-column>-->
162
+<!--          <el-table-column-->
163
+<!--            prop="count"-->
164
+<!--            label="姓名"-->
165
+<!--          >-->
166
+<!--          </el-table-column>-->
167
+<!--          <el-table-column-->
168
+<!--            prop="address"-->
169
+<!--            align="center"-->
170
+<!--            label="检查日期">-->
171
+
172
+<!--          </el-table-column>-->
173
+<!--          <el-table-column-->
174
+<!--            prop="address"-->
175
+<!--            align="center"-->
176
+<!--            label="结果">-->
177
+
178
+<!--          </el-table-column>-->
179
+<!--        </el-table>-->
180
+<!--      </div>-->
181
+
182
+<!--    </el-dialog>-->
101 183
   </div>
102 184
 </template>
103 185
 <script>
104
-import * as echarts from "echarts";
105
-export default{
186
+import * as echarts from 'echarts'
187
+import { GetQCStatistisData } from '../../../api/qcd'
188
+
189
+const moment = require('moment')
190
+
191
+export default {
106 192
   props: {
107
- 
108
-  width: {
109
-    type: String,
110
-    default: "100%"
111
-  },
112
-  height: {
113
-    type: String,
114
-    default: "400px"
193
+
194
+    width: {
195
+      type: String,
196
+      default: '100%'
197
+    },
198
+    height: {
199
+      type: String,
200
+      default: '400px'
201
+    }
202
+
115 203
   },
116
-  
117
-},
118 204
   data() {
119
-      return {
120
-          time_month:'',
121
-          stat_time:'',
122
-          end_time:'',
123
-          input:'',
124
-          myChart: {},
125
-          pieData : [
126
-          {
127
-        value: 463,
128
-        name: "不达标值患者"
129
-      },
130
-      {
131
-        value: 395,
132
-        name: "未检查患者"
133
-      },
134
-      {
135
-        value: 157,
136
-        name: "达标值患者"
137
-      },
138
-      // {
139
-      //   value: 149,
140
-      //   name: "广东"
141
-      // },
142
-      // {
143
-      //   value: 147,
144
-      //   name: "湖南"
145
-      // }
146
-          
147
-          ],
148
-          pieName: [],
149
-          // myChartStyle:{float: "right", width: "100%", height: "400px"},
150
-          tableData:[],
151
-      }
205
+    return {
206
+      time_type: 1,
207
+      times: [
208
+        { value: 1, label: '本月' },
209
+        { value: 2, label: '上月' },
210
+        { value: 3, label: '今年' },
211
+        { value: 4, label: '上一年' },
212
+        { value: 5, label: '第一季度' },
213
+        { value: 6, label: '第二季度' },
214
+        { value: 7, label: '第三季度' },
215
+        { value: 8, label: '第四季度' },
216
+        { value: 9, label: '自定义' }
217
+
218
+      ],
219
+      time_month: '',
220
+      start_time: new Date(new Date().getFullYear(), new Date().getMonth(), 1).toLocaleDateString('en-CA'),
221
+      end_time: new Date(new Date().getFullYear(), new Date().getMonth() + 1, 0).toLocaleDateString('en-CA'),
222
+      input: '',
223
+      myChart: {},
224
+      pieData: [],
225
+      pieName: [],
226
+      // myChartStyle:{float: "right", width: "100%", height: "400px"},
227
+      tableData: [],
228
+      reference:{},
229
+    }
152 230
   },
153 231
   mounted() {
154
-  this.initDate(); //数据初始化
155
-  this.initEcharts();
156
-},
157
-methods: {
158
-  initDate() {
159
-    for (let i = 0; i < this.pieData.length; i++) {
160
-      this.pieName[i] = this.pieData[i].name;
161
-    }
232
+    this.getData()
162 233
   },
163
-  initEcharts() {
164
-    // 饼图
165
-    this.myChart = echarts.init(document.getElementById("mychart"));
166
-    window.addEventListener("resize", () => {
167
-      console.log('098765adsfghg');
168
-      this.myChart.resize();
169
-    });
170
-    console.log('09876543454676');
171
-    const option = {
172
-      legend: {
173
-        // 图例
174
-        data: this.pieName,
175
-        left: "10%",
176
-        top: "30%",
177
-        orient: "vertical"
178
-      },
179
-      color:['#ff7f9f','#fff67f','#1e5feb'],
180
-      title: {
181
-        // 设置饼图标题,位置设为顶部居中
182
-      //   text: "国内院士前五省份图示",
183
-        top: "0%",
184
-        left: "center"
185
-      },
186
-      series: [
187
-        {
188
-          type: "pie",
189
-          label: {
190
-            normal : {
191
-              formatter: '{b}:{c}: ({d}%)',
192
-              textStyle : {
193
-                  fontWeight : 'normal',
194
-                  fontSize : 15,
195
-                  color : "black"
234
+  methods: {
235
+    getData() {
236
+      if(this.start_time.length == 0){
237
+        this.$message.error("请选择开始时间")
238
+      }
239
+      if(this.end_time.length == 0){
240
+        this.$message.error("请选择结束时间")
241
+      }
242
+      let params = {
243
+        start_date: this.start_time,
244
+        end_date: this.end_time,
245
+        project_id: 20,
246
+        item_id: 171
247
+      }
248
+      this.pieData = []
249
+      this.tableData = []
250
+      console.log("~~~~~~~~~~")
251
+      GetQCStatistisData(params).then(response => {
252
+        if (response.data.state == 1) {
253
+          this.reference = response.data.data.reference
254
+          this.input = response.data.data.reference.range_min + "<=" + response.data.data.reference.item_name + "<=" + response.data.data.reference.range_max
255
+          let objone = {
256
+            value:  response.data.data.unusual_total / response.data.data.patient_count,
257
+            name: '不达标值患者',
258
+            count:response.data.data.unusual_total,
259
+          }
260
+          this.pieData.push(objone)
261
+          this.tableData.push(objone)
262
+
263
+            let objtwo = {
264
+            value:   response.data.data.normal_total / response.data.data.patient_count,
265
+            name: '达标值患者',
266
+            count:response.data.data.normal_total,
267
+
268
+          }
269
+          this.pieData.push(objtwo)
270
+          this.tableData.push(objtwo)
271
+
272
+          let objthree = {
273
+            value: response.data.data.patient_count / response.data.data.no_check_total,
274
+            name: '未检查患者',
275
+            count:response.data.data.no_check_total,
276
+
277
+          }
278
+          this.pieData.push(objthree)
279
+          this.tableData.push(objthree)
280
+
281
+          let objfour = {
282
+            value: response.data.data.patient_count,
283
+            name: '合计',
284
+            count:response.data.data.patient_count,
285
+          }
286
+          this.tableData.push(objfour)
287
+          for (let i = 0; i < this.pieData.length; i++) {
288
+            this.pieName[i] = this.pieData[i].name
289
+          }
290
+          this.myChart = echarts.init(document.getElementById('mychart'))
291
+          window.addEventListener('resize', () => {
292
+            this.myChart.resize()
293
+          })
294
+          const option = {
295
+            legend: {
296
+              // 图例
297
+              data: this.pieName,
298
+              left: '10%',
299
+              top: '30%',
300
+              orient: 'vertical'
301
+            },
302
+            color: ['#ff7f9f', '#fff67f', '#1e5feb'],
303
+            title: {
304
+              // 设置饼图标题,位置设为顶部居中
305
+              //   text: "国内院士前五省份图示",
306
+              top: '0%',
307
+              left: 'center'
308
+            },
309
+            series: [
310
+              {
311
+                type: 'pie',
312
+                label: {
313
+                  show: true,
314
+                  formatter: '{b} : {d}% ({c})'
315
+                  // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})"
316
+                },
317
+                radius: '65%', //饼图半径
318
+                data: this.pieData
196 319
               }
197
-            }
198
-            // b代表名称,c代表对应值,d代表百分比"{b} : {d}% ({c})" 
199
-          },
200
-          radius: "65%", //饼图半径
201
-          data: this.pieData,
202
-          itemStyle : {
203
-            emphasis: {
204
-              shadowBlur: 10,
205
-              shadowOffsetX: 0,
206
-              shadowColor: 'rgba(0, 0, 0, 0.5)'
207
-            }
320
+            ]
208 321
           }
322
+          //   console.log(this.seriesData);
323
+          const optionFree = {
324
+            series: [
325
+              {
326
+                data: this.seriesData,
327
+                type: 'line',
328
+                smooth: true
329
+              }
330
+            ]
331
+          }
332
+          this.myChart = echarts.init(document.getElementById('mychart'))
333
+          this.myChart.setOption(option)
334
+        } else {
335
+          this.$message.error(response.data.msg)
209 336
         }
210
-      ]
211
-    };
212
-  //   console.log(this.seriesData);
213
-    const optionFree = {
214
-      series: [
215
-        {
216
-          data: this.seriesData,
217
-          type: "line",
218
-          smooth: true
219
-        }
220
-      ]
221
-    };
222
-    this.myChart = echarts.init(document.getElementById("mychart"));
223
-    this.myChart.setOption(option);
224
-    //随着屏幕大小调节图表
225
-  //   window.addEventListener("resize", () => {
226
-  //     this.myChart.resize();
227
-  //   });
228
-  },
229
-  getSummaries(param) {
230
-      const { columns, data } = param;
231
-      const sums = [];
337
+      })
338
+
339
+    },
340
+    changeItem(val) {
341
+      const currentDate = new Date()
342
+      switch (val) {
343
+        case 1:
344
+
345
+          const startOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1).toLocaleDateString('en-CA')
346
+          const endOfMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 0).toLocaleDateString('en-CA')
347
+
348
+          this.start_time = startOfMonth
349
+          this.end_time = endOfMonth
350
+          this.getData()
351
+
352
+          break
353
+        case 2:
354
+          // 上月的起始日期和结束日期
355
+          const startOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() - 1, 1).toLocaleDateString('en-CA')
356
+          const endOfLastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0).toLocaleDateString('en-CA')
357
+
358
+          this.start_time = startOfLastMonth
359
+          this.end_time = endOfLastMonth
360
+          this.getData()
361
+
362
+          break
363
+        case 3:
364
+          // 今年的起始日期和结束日期
365
+          const startOfYear = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
366
+          const endOfYear = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
367
+
368
+          this.start_time = startOfYear
369
+          this.end_time = endOfYear
370
+          this.getData()
371
+
372
+          break
373
+        case 4:
374
+          // 上一年的起始日期和结束日期
375
+          const startOfLastYear = new Date(currentDate.getFullYear() - 1, 0, 1).toLocaleDateString('en-CA')
376
+          const endOfLastYear = new Date(currentDate.getFullYear() - 1, 11, 31).toLocaleDateString('en-CA')
377
+
378
+          this.start_time = startOfLastYear
379
+          this.end_time = endOfLastYear
380
+          this.getData()
381
+
382
+          break
383
+        case 5:
384
+          // 第一季度的起始日期和结束日期
385
+          const startOfFirstQuarter = new Date(currentDate.getFullYear(), 0, 1).toLocaleDateString('en-CA')
386
+          const endOfFirstQuarter = new Date(currentDate.getFullYear(), 2, 31).toLocaleDateString('en-CA')
387
+
388
+          this.start_time = startOfFirstQuarter
389
+          this.end_time = endOfFirstQuarter
390
+          this.getData()
391
+
392
+          break
393
+        case 6:
394
+          // 第二季度的起始日期和结束日期
395
+          const startOfSecondQuarter = new Date(currentDate.getFullYear(), 3, 1).toLocaleDateString('en-CA')
396
+          const endOfSecondQuarter = new Date(currentDate.getFullYear(), 5, 30).toLocaleDateString('en-CA')
397
+
398
+          this.start_time = startOfSecondQuarter
399
+          this.end_time = endOfSecondQuarter
400
+          this.getData()
401
+
402
+          break
403
+        case 7:
404
+          // 第三季度的起始日期和结束日期
405
+          const startOfThirdQuarter = new Date(currentDate.getFullYear(), 6, 1).toLocaleDateString('en-CA')
406
+          const endOfThirdQuarter = new Date(currentDate.getFullYear(), 8, 30).toLocaleDateString('en-CA')
407
+
408
+          this.start_time = startOfThirdQuarter
409
+          this.end_time = endOfThirdQuarter
410
+          this.getData()
411
+
412
+          break
413
+        case 8:
414
+          // 第四季度的起始日期和结束日期
415
+          const startOfFourthQuarter = new Date(currentDate.getFullYear(), 9, 1).toLocaleDateString('en-CA')
416
+          const endOfFourthQuarter = new Date(currentDate.getFullYear(), 11, 31).toLocaleDateString('en-CA')
417
+
418
+          this.start_time = startOfFourthQuarter
419
+          this.end_time = endOfFourthQuarter
420
+          this.getData()
421
+          break
422
+        case 9:
423
+          this.start_time = ''
424
+          this.end_time = ''
425
+          break
426
+      }
427
+    },
428
+
429
+
430
+    getSummaries(param) {
431
+      const { columns, data } = param
432
+      const sums = []
232 433
       columns.forEach((column, index) => {
233 434
         if (index === 0) {
234
-          sums[index] = '总价';
235
-          return;
435
+          sums[index] = '总价'
436
+          return
236 437
         }
237
-        const values = data.map(item => Number(item[column.property]));
438
+        const values = data.map(item => Number(item[column.property]))
238 439
         if (!values.every(value => isNaN(value))) {
239 440
           sums[index] = values.reduce((prev, curr) => {
240
-            const value = Number(curr);
441
+            const value = Number(curr)
241 442
             if (!isNaN(value)) {
242
-              return prev + curr;
443
+              return prev + curr
243 444
             } else {
244
-              return prev;
445
+              return prev
245 446
             }
246
-          }, 0);
247
-          sums[index] += ' 元';
447
+          }, 0)
448
+          sums[index] += ' 元'
248 449
         } else {
249
-          sums[index] = 'N/A';
450
+          sums[index] = 'N/A'
250 451
         }
251
-      });
452
+      })
252 453
 
253
-      return sums;
254
-  },
255
-  handleClick(id){
256
-      console.log(id);
454
+      return sums
455
+    },
456
+    handleClick(id) {
457
+      console.log(id)
458
+    }
257 459
   }
258
-}
259 460
 
260 461
 }
261 462
 </script>
262 463
 <style lang="scss" scoped>
263
-.content_top{
464
+.content_top {
264 465
   display: flex;
265 466
   justify-content: space-around;
266 467
   color: #1e5feb;
267 468
 }
268
-</style>
469
+</style>

+ 19 - 2
src/xt_pages/data/components/addProject.vue 查看文件

@@ -231,6 +231,17 @@
231 231
                             </el-option>
232 232
                         </el-select>
233 233
                     </el-form-item>
234
+
235
+                    <el-form-item label="是否打印显示:" prop="is_advice">
236
+                        <el-select v-model="form.is_print" style="width:160px;" placeholder="请选择">
237
+                            <el-option
238
+                            v-for="item in printOptions"
239
+                            :key="item.value"
240
+                            :label="item.label"
241
+                            :value="item.value">
242
+                            </el-option>
243
+                        </el-select>
244
+                    </el-form-item>
234 245
                 </el-form>
235 246
             </el-tab-pane>
236 247
         </el-tabs>
@@ -254,6 +265,10 @@ export default {
254 265
              {value: 1,label: '是'},
255 266
              {value: 2,label: '否'}
256 267
              ],
268
+             printOptions: [
269
+             {value: 1,label: '是'},
270
+             {value: 2,label: '否'}
271
+             ],
257 272
             value: '',
258 273
             radio:'1',
259 274
             form:{
@@ -288,7 +303,8 @@ export default {
288 303
               category:"",
289 304
               specail_project:"",
290 305
               social_security_directory_code:"",
291
-              record_date:""
306
+              record_date:"",
307
+              is_print:"",
292 308
             },
293 309
             rules: {
294 310
                 project_name: [{ required: true, message: '请填写项目名称', trigger: 'blur'  }],
@@ -383,7 +399,8 @@ export default {
383 399
                     category:this.form.category,
384 400
                     specail_project:this.form.specail_project,
385 401
                     social_security_directory_code:this.form.social_security_directory_code,
386
-                    record_date:this.form.record_date
402
+                    record_date:this.form.record_date,
403
+                    is_print:parseInt(this.form.is_print) 
387 404
                }
388 405
              console.log("params222222",params)
389 406
               saveProject(params).then(response=>{

+ 2 - 1
src/xt_pages/data/components/editInspection.vue 查看文件

@@ -421,7 +421,8 @@
421 421
     },
422 422
     created() {
423 423
       this.getlist()
424
-    },watch: {
424
+    },
425
+    watch: {
425 426
       'tableData': function() {
426 427
         let c = 0
427 428
         this.form.price  = 0

+ 23 - 2
src/xt_pages/data/components/editProject.vue 查看文件

@@ -234,6 +234,16 @@
234 234
                             </el-option>
235 235
                         </el-select>
236 236
                     </el-form-item>
237
+                    <el-form-item label="是否打印显示:" prop="is_advice">
238
+                        <el-select v-model="form.is_print" style="width:160px;" placeholder="请选择">
239
+                            <el-option
240
+                            v-for="item in printOptions"
241
+                            :key="item.value"
242
+                            :label="item.label"
243
+                            :value="item.value">
244
+                            </el-option>
245
+                        </el-select>
246
+                    </el-form-item>
237 247
                 </el-form>
238 248
             </el-tab-pane>
239 249
         </el-tabs>
@@ -259,6 +269,10 @@ export default {
259 269
              {value: 1,label: '是'},
260 270
              {value: 2,label: '否'}
261 271
              ],
272
+             printOptions: [
273
+             {value: 1,label: '是'},
274
+             {value: 2,label: '否'}
275
+             ],
262 276
             value: '',
263 277
             radio:'1',
264 278
 
@@ -296,7 +310,7 @@ export default {
296 310
               specail_project:"",
297 311
               social_security_directory_code:"",
298 312
               record_date:"",
299
-
313
+              is_print:"",
300 314
             },
301 315
             rules: {
302 316
                 project_name: [{ required: true, message: '请填写项目名称', trigger: 'blur'  }],
@@ -416,6 +430,12 @@ export default {
416 430
                 this.form.social_security_directory_code = ""
417 431
               }
418 432
               this.form.record_date = this.getTime(projecDetail.record_date)
433
+              if(projecDetail.is_print == 0){
434
+                this.form.is_print = ""
435
+              }else{
436
+                this.form.is_print = projecDetail.is_print
437
+              }
438
+             
419 439
             }
420 440
          })
421 441
        },
@@ -457,7 +477,8 @@ export default {
457 477
                     category:this.form.category,
458 478
                      specail_project:this.form.specail_project,
459 479
                     social_security_directory_code:this.form.social_security_directory_code,
460
-                    record_date:this.form.record_date
480
+                    record_date:this.form.record_date,
481
+                    is_print:parseInt(this.form.is_print)
461 482
                }
462 483
 
463 484
               updatedProject(params).then(response=>{

+ 1 - 1
src/xt_pages/data/components/inspection.vue 查看文件

@@ -99,7 +99,7 @@ export default {
99 99
             },],
100 100
             value: '',
101 101
             tableData: [],
102
-            limit:20,
102
+            limit:10,
103 103
             page:1,
104 104
             total:0
105 105
             

+ 317 - 0
src/xt_pages/data/components/patient_diagnose.vue 查看文件

@@ -0,0 +1,317 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class=" sign-and-weigh-box" style="background: white">
4
+  
5
+
6
+        <el-row :gutter="15">
7
+          <el-col>
8
+            <div>
9
+              <el-button
10
+                size="small"
11
+                icon="el-icon-circle-plus-outline"
12
+                style="float: right;margin-bottom: 15px"
13
+                type="primary"
14
+                @click="showDialog"
15
+              >新增
16
+              </el-button>
17
+            </div>
18
+  
19
+            <el-table
20
+              :row-style="{ color: '#303133' }"
21
+              :header-cell-style="{
22
+                backgroundColor: 'rgb(245, 247, 250)',
23
+                color: '#606266'
24
+              }"
25
+              :data="manufacturerData"
26
+              style="width: 100%"
27
+              border
28
+              v-loading="loading"
29
+            >
30
+             
31
+              <el-table-column label="诊断名称" align="center">
32
+                <template slot-scope="scope">
33
+                   {{scope.row.class_name  }}
34
+                </template>
35
+              </el-table-column>
36
+  
37
+  
38
+              <el-table-column label="排序" align="center">
39
+                <template slot-scope="scope">
40
+                   {{ scope.row.sort }}
41
+                </template>
42
+              </el-table-column>
43
+  
44
+        
45
+  
46
+              <el-table-column label="操作" align="center">
47
+                <template slot-scope="scope">
48
+                  <el-tooltip
49
+                    class="item"
50
+                    effect="dark"
51
+                    content="编辑"
52
+                    placement="top"
53
+                  >
54
+                    <el-button
55
+                      size="small"
56
+                      type="primary"
57
+                      icon="el-icon-edit-outline"
58
+                      @click="handleEdit(scope.$index, scope.row)"
59
+                    >
60
+                    </el-button>
61
+                  </el-tooltip>
62
+                  <el-tooltip
63
+                    class="item"
64
+                    effect="dark"
65
+                    content="删除"
66
+                    placement="top"
67
+                  >
68
+                    <el-button
69
+                      size="small"
70
+                      type="danger"
71
+                      icon="el-icon-delete"
72
+                      @click="handleDelete(scope.$index, scope.row)"
73
+                    >
74
+                    </el-button>
75
+                  </el-tooltip>
76
+  
77
+                </template>
78
+              </el-table-column>
79
+            </el-table>
80
+  
81
+            <el-pagination
82
+              @size-change="handleSizeChange"
83
+              @current-change="handleCurrentChange"
84
+              :page-sizes="[10, 50, 100]"
85
+              :page-size="10"
86
+              background
87
+              align="right"
88
+              style="margin-top:20px;"
89
+              layout="total, sizes, prev, pager, next, jumper"
90
+              :total="total"
91
+            >
92
+            </el-pagination>
93
+          </el-col>
94
+        </el-row>
95
+      </div>
96
+
97
+      <el-dialog
98
+        title="新增"
99
+        :visible.sync="dialogVisible"
100
+        width="50%">
101
+        <span>
102
+          <el-form>
103
+             <el-row>
104
+                <el-col >
105
+                   <el-form-item label="诊断名称:">
106
+                    <el-input v-model="form.class_name"  type="textarea" style="width: 300px;"></el-input>
107
+                   </el-form-item>
108
+                   
109
+                </el-col>
110
+             </el-row>
111
+
112
+             <el-row>
113
+                <el-col >
114
+                   <el-form-item label="排序:">
115
+                    <el-input v-model="form.sort" style="width: 200px;"></el-input>
116
+                   </el-form-item>
117
+                   
118
+                </el-col>
119
+             </el-row>
120
+          </el-form>
121
+        </span>
122
+        <span slot="footer" class="dialog-footer">
123
+            <el-button @click="dialogVisible = false">取 消</el-button>
124
+            <el-button type="primary" @click="savePatientCase">确 定</el-button>
125
+        </span>
126
+      </el-dialog>
127
+
128
+      <el-dialog
129
+        title="新增"
130
+        :visible.sync="editdialogVisible"
131
+        width="50%">
132
+        <span>
133
+          <el-form>
134
+             <el-row>
135
+                <el-col >
136
+                   <el-form-item label="诊断名称:">
137
+                    <el-input v-model="form.class_name"  type="textarea" style="width: 300px;"></el-input>
138
+                   </el-form-item>
139
+                   
140
+                </el-col>
141
+             </el-row>
142
+
143
+             <el-row>
144
+                <el-col >
145
+                   <el-form-item label="排序:">
146
+                    <el-input v-model="form.sort" style="width: 200px;"></el-input>
147
+                   </el-form-item>
148
+                   
149
+                </el-col>
150
+             </el-row>
151
+          </el-form>
152
+        </span>
153
+        <span slot="footer" class="dialog-footer">
154
+            <el-button @click="editdialogVisible = false">取 消</el-button>
155
+            <el-button type="primary" @click="updatePatientCase">确 定</el-button>
156
+        </span>
157
+      </el-dialog>
158
+     
159
+    </div>
160
+  </template>
161
+  
162
+  <script>
163
+    import {
164
+      savePatientDiagnose,
165
+      getPatientDiagnose,
166
+      getPatientDiagnoseDetail,
167
+      updatePatientCase,
168
+      deletePatientDiagnose 
169
+    } from '@/api/data'
170
+    import DiagnoseOtherDialog from "./diagnoseOtherDialog";
171
+  
172
+    export default {
173
+      components: {
174
+        DiagnoseOtherDialog,
175
+      },
176
+      name: 'diagnoseOther',
177
+      data() {
178
+        return {
179
+          signAndWeighBoxPatients: 'sign-and-weigh-box-patients',
180
+          manufacturerData: [],
181
+          total: 0,
182
+          pageTotal: 0,
183
+          pageSelect: 0,
184
+  
185
+          page: 1,
186
+          limit: 10,
187
+          loading: false,
188
+  
189
+          manufacturer_code: '',
190
+          editId: '',
191
+          editIndex: '',
192
+          form:{
193
+            id:0,
194
+            class_name:"",
195
+            sort:"",
196
+          },
197
+          dialogVisible:false,
198
+          editdialogVisible:false,
199
+        }
200
+      },
201
+      methods: {
202
+        savePatientCase(){
203
+            var params= {
204
+                class_name:this.form.class_name,
205
+                sort:parseInt(this.form.sort),
206
+            }
207
+           console.log("param23232323w",params)
208
+          savePatientDiagnose(params).then(response=>{
209
+            if(response.data.state==1){
210
+              var diagnose = response.data.data.diagnose
211
+              this.$message.success("保存成功!")
212
+              this.dialogVisible = false
213
+              this.getList()
214
+            }
215
+          })
216
+        },
217
+        getList(){
218
+            var params = {
219
+               limit:this.limit,
220
+               page:this.page,
221
+            }
222
+          getPatientDiagnose(params).then(response=>{
223
+             if(response.data.state == 1){
224
+                this.manufacturerData = response.data.data.list
225
+
226
+                this.total =  response.data.data.total
227
+             }
228
+          })
229
+        },
230
+        handleEdit(index,row){
231
+           
232
+            var params ={
233
+              id:row.id
234
+            }
235
+         
236
+          getPatientDiagnoseDetail(params).then(response=>{
237
+             if(response.data.state == 1){
238
+              var detail =  response.data.data.detail
239
+              this.editdialogVisible =true
240
+              this.form.class_name =detail.class_name
241
+              this.form.sort = detail.sort
242
+              this.form.id = detail.id
243
+             }
244
+          })
245
+        },
246
+        updatePatientCase(){
247
+              var params = {
248
+                id:this.form.id,
249
+                class_name:this.form.class_name,
250
+                sort:parseInt(this.form.sort),
251
+              }
252
+            updatePatientCase(params).then(response=>{
253
+                if(response.data.state == 1){
254
+                    this.$message.success("保存成功!")
255
+                    this.editdialogVisible = false
256
+                    this.getList()
257
+                }
258
+            })
259
+        },
260
+        handleDelete: function(index, row) {
261
+          this.$confirm('确认删除这条记录?', '删除记录', {
262
+            confirmButtonText: '确定',
263
+            cancelButtonText: '取消',
264
+            type: 'warning'
265
+          })
266
+            .then(() => {
267
+              let params = {
268
+                id: row.id
269
+              }
270
+              deletePatientDiagnose(params).then(response => {
271
+                if (response.data.state == 0) {
272
+                  this.$message.error(response.data.msg)
273
+                  return false
274
+                } else {
275
+                  this.manufacturerData.splice(index, 1)
276
+                  this.$message.success('删除成功')
277
+                }
278
+              })
279
+            })
280
+            .catch(() => {
281
+            })
282
+        },
283
+     
284
+        showDialog: function() {
285
+           this.dialogVisible = true
286
+        },
287
+        handleSizeChange(val) {
288
+          this.limit = val
289
+          this.getList()
290
+        },
291
+        handleCurrentChange(val) {
292
+          this.page = val
293
+          this.getList()
294
+        },
295
+       
296
+      },
297
+      created() {
298
+        this.getList()
299
+      }
300
+    }
301
+  </script>
302
+  
303
+  <style lang="scss">
304
+    .el-table td,
305
+    .el-table th.is-leaf,
306
+    .el-table--border,
307
+    .el-table--group {
308
+      border-color: #d0d3da;
309
+    }
310
+  
311
+    .el-table--border::after,
312
+    .el-table--group::after,
313
+    .el-table::before {
314
+      background-color: #d0d3da;
315
+    }
316
+  </style>
317
+  

+ 8 - 2
src/xt_pages/data/specialDictionary.vue 查看文件

@@ -43,6 +43,11 @@
43 43
           <diagnose-other v-if="activeName == 10"></diagnose-other>
44 44
         </el-tab-pane>
45 45
 
46
+
47
+        <el-tab-pane label="疾病诊断" name="11">
48
+          <patient-diagnose v-if="activeName == 11"></patient-diagnose>
49
+        </el-tab-pane>
50
+
46 51
       </el-tabs>
47 52
     </div>
48 53
   </div>
@@ -62,7 +67,7 @@
62 67
   import Addtion from './components/addtion'
63 68
   import DiagnoseOtherDialog from "./components/diagnoseOtherDialog";
64 69
   import DiagnoseOther from "./components/diagnoseOther";
65
-
70
+  import PatientDiagnose from "./components/patient_diagnose.vue"
66 71
   export default {
67 72
     name: 'specialDictionary',
68 73
     components: {
@@ -77,7 +82,8 @@
77 82
       project,
78 83
       inspection,
79 84
       manufacturer,
80
-      configure
85
+      configure,
86
+      PatientDiagnose
81 87
     },
82 88
     data() {
83 89
       return {

+ 1 - 1
src/xt_pages/data/template.vue 查看文件

@@ -63,7 +63,7 @@ export default {
63 63
         { label: this.$t("data_config.differential_diagnosis"), key:"differential_diagnosis"},
64 64
         { label: this.$t("data_config.treatment_plan"), key:"treatment_plan"},
65 65
         { label: this.$t("data_config.sick_history"), key:"sick_history"},
66
-
66
+        { label: this.$t("data_config.befor_symptoms"), key:"befor_symptoms"},
67 67
       ],
68 68
       activeName: "education",
69 69
       createdTimes: 0

+ 36 - 17
src/xt_pages/device/airDisinfectTwo.vue 查看文件

@@ -24,7 +24,7 @@
24 24
               style="width: 150px;"
25 25
               @change="changeEndtime">
26 26
             </el-date-picker>
27
-            <el-button type="primary" style="margin-left: 10px;">搜索</el-button>
27
+            <el-button type="primary" style="margin-left: 10px;" @click="toSeach">搜索</el-button>
28 28
           </div>
29 29
           <div style="float:right;margin-bottom:10px;">
30 30
             <el-button type="primary" @click="printCard">打印</el-button>
@@ -510,7 +510,7 @@
510 510
                     ></el-date-picker>
511 511
                   </el-form-item>
512 512
                   <el-form-item label="累计时间(h)" label-width="110px">
513
-                      <el-input v-model= "form.first_disinfection_time"  ></el-input>
513
+                      <el-input v-model= "form.first_total_time"  ></el-input>
514 514
                   </el-form-item>
515 515
                   <el-form-item label="检测合格" label-width="110px">
516 516
                       <div>
@@ -943,48 +943,48 @@
943 943
         }
944 944
       },
945 945
       created(){
946
-        console.log("00000000000000000",this.$store.getters.xt_user.user.id)
946
+       
947 947
         this.getAllDoctorList()
948 948
         this.getNewAirDisinfectList()
949 949
         var time=moment(this.form.first_start_time).format("HH:mm");
950
-        console.log('sdfgsdfsdsddf',time,this.form.first_start_time);
950
+        
951 951
 
952 952
       },
953 953
       computed:{
954 954
         firstdisinfection_time (){
955 955
             let firststart= Date.parse(new Date(this.form.first_start_time))
956
-            console.log('开始时间',firststart);
956
+        
957 957
             let firstend= Date.parse(new Date(this.form.first_end_time))
958
-            console.log('结束时间',firstend);
958
+      
959 959
             let time_interval = ((firstend - firststart)/(60*60*1000)).toFixed(1)
960
-            console.log('结束时间',((firstend - firststart)/(60*60*1000)).toFixed(1));
960
+          
961 961
             return time_interval
962 962
         },
963 963
         senconddisinfection_time (){
964 964
             const sencondstart= Date.parse(new Date(this.form.sencond_start_time))
965
-            console.log('开始时间',sencondstart);
965
+          
966 966
             const sencondend= Date.parse(new Date(this.form.sencond_end_time))
967
-            console.log('结束时间',sencondstart);
967
+           
968 968
             const time_interval = ((sencondend - sencondstart)/(60*60*1000)).toFixed(1)
969
-            console.log('结束时间',time_interval);
969
+           
970 970
             return time_interval
971 971
         },
972 972
         thirddisinfection_time (){
973 973
             const thirdstart= Date.parse(new Date(this.form.third_start_time))
974
-            console.log('开始时间',thirdstart);
974
+          
975 975
             const thirdend= Date.parse(new Date(this.form.third_end_time))
976
-            console.log('结束时间',thirdend);
976
+           
977 977
             const time_interval = ((thirdend - thirdstart)/(60*60*1000)).toFixed(1)
978
-            console.log('结束时间',time_interval);
978
+           
979 979
             return time_interval
980 980
         },
981 981
         lastdisinfection_time(){
982 982
             const lasttart= Date.parse(new Date(this.form.last_start_time))
983
-            console.log('开始时间',lasttart);
983
+           
984 984
             const lastend= Date.parse(new Date(this.form.last_end_time))
985
-            console.log('结束时间',lastend);
985
+           
986 986
             const time_interval = ((lastend - lasttart)/(60*60*1000)).toFixed(1)
987
-            console.log('结束时间',time_interval);
987
+           
988 988
             return time_interval    
989 989
         }
990 990
       },
@@ -993,7 +993,7 @@
993 993
         getAirDisinfectLongTime().then(response=>{
994 994
           if(response.data.state == 1){
995 995
             var list = response.data.data.list
996
-            console.log("累计2323322323我",list)
996
+           
997 997
             var first_total_time = 0
998 998
             var sencond_total_time = 0
999 999
             var third_total_time = 0
@@ -1258,7 +1258,23 @@
1258 1258
                 }else{
1259 1259
                     this.form.last_modifications= 0
1260 1260
                 }
1261
+                console.log("23333333333333",this.form.first_total_time)
1262
+                if( this.form.first_total_time > 0){
1263
+                  this.form.first_total_time   = this.form.first_total_time.toString()
1264
+                }
1265
+                if( this.form.sencond_total_time > 0){
1266
+                  this.form.sencond_total_time   = this.form.sencond_total_time.toString()
1267
+                }
1268
+
1269
+                if( this.form.third_total_time > 0){
1270
+                  this.form.third_total_time   = this.form.third_total_time.toString()
1271
+                }
1261 1272
 
1273
+                if(this.form.last_total_time >0){
1274
+                    this.form.last_total_time   = this.form.last_total_time.toString()
1275
+                }
1276
+               
1277
+                console.log("form23333333333333333wo",this.form)
1262 1278
                 updateNewAirDisinfect(this.form).then(response=>{
1263 1279
                 if(response.data.state == 1){
1264 1280
                   var disinfect =  response.data.data.disinfect
@@ -1362,6 +1378,9 @@
1362 1378
           this.form.last_disinfection_time = this.lastdisinfection_time   
1363 1379
 
1364 1380
           this.form.last_total_time = parseFloat(this.last_total_time ) + parseFloat(this.form.last_disinfection_time)
1381
+        },
1382
+        toSeach(){
1383
+          this.getNewAirDisinfectList()   
1365 1384
         }
1366 1385
 
1367 1386
       },

文件差异内容过多而无法显示
+ 1014 - 0
src/xt_pages/device/objectRegistration.vue


+ 17 - 12
src/xt_pages/device/objectTableDisinfectTwo.vue 查看文件

@@ -7,6 +7,7 @@
7 7
           <div style="float: left; margin-bottom: 10px;">
8 8
             <el-date-picker
9 9
               v-model="startvalue"
10
+              value-format="yyyy-MM-dd"
10 11
               type="date"
11 12
               placeholder="选择日期"
12 13
               style="width: 150px;">
@@ -16,9 +17,10 @@
16 17
               v-model="endvalue"
17 18
               type="date"
18 19
               placeholder="选择日期"
19
-              style="width: 150px;">
20
+              style="width: 150px;"
21
+              value-format="yyyy-MM-dd">
20 22
             </el-date-picker>
21
-            <el-button type="primary" style="margin-left: 10px;">搜索</el-button>
23
+            <el-button type="primary" style="margin-left: 10px;" @click="toSeach">搜索</el-button>
22 24
           </div>
23 25
           <div style="float:right;margin-bottom:10px;">
24 26
             <el-button type="primary" @click="printCard">打印</el-button>
@@ -80,7 +82,7 @@
80 82
                     </template>
81 83
                 </el-table-column>
82 84
 
83
-                <el-table-column prop="name" :label="'体温计'+'\n'+'75%酒精擦拭'" align="center" min-width="60">
85
+                <el-table-column prop="name" :label="'体温计'+'\n'+'75%酒精浸泡'" align="center" min-width="60">
84 86
                     <template slot-scope="scope">
85 87
                         <!-- {{scope.row.fourth_total_time?scope.row.fourth_total_time:""}} -->
86 88
                         <!-- {{ scope.row.fourth_disinfection_time }} -->
@@ -990,7 +992,7 @@
990 992
                                 <td>负责人</td>
991 993
                                 <td>医疗垃圾桶<br/>1000mg/l含氯制剂</td>
992 994
                                 <td>负责人</td>
993
-                                <td>体温计<br/>75%酒精<br/>擦拭</td>
995
+                                <td>体温计<br/>75%酒精<br/>浸泡</td>
994 996
                                 <td>负责人</td>
995 997
                                 <td>体温枪<br/>75%酒精<br/>擦拭</td>
996 998
                                 <td>负责人</td>
@@ -1424,15 +1426,15 @@
1424 1426
               this.form.third_modifications = list.third_modifications?list.third_modifications:""
1425 1427
               this.form.third_creator = list.third_creator
1426 1428
 
1427
-              this.form.fourth_disinfection_water = list.third_disinfection_water?list.third_disinfection_water:""
1428
-              this.form.fourth_disinfection_methods = list.third_disinfection_methods?list.third_disinfection_methods:""
1429
+              this.form.fourth_disinfection_water = list.fourth_disinfection_water?list.fourth_disinfection_water:""
1430
+              this.form.fourth_disinfection_methods = list.fourth_disinfection_methods?list.fourth_disinfection_methods:""
1429 1431
               this.form.fourth_disinfection_time = list.fourth_disinfection_time?list.fourth_disinfection_time:""
1430
-              this.form.fourth_start_time  =this.getTimeThree(list.third_start_time)
1431
-              this.form.fourth_end_time = this.getTimeThree(list.third_end_time)
1432
-              this.form.fourth_total_time = list.third_total_time? list.third_total_time:""
1433
-              this.form.fourth_is_check = list.third_is_check.toString()
1434
-              this.form.fourth_modifications = list.third_modifications?list.third_modifications:""
1435
-              this.form.fourth_creator = list.third_creator
1432
+              this.form.fourth_start_time  =this.getTimeThree(list.fourth_start_time)
1433
+              this.form.fourth_end_time = this.getTimeThree(list.fourth_end_time)
1434
+              this.form.fourth_total_time = list.fourth_total_time? list.fourth_total_time:""
1435
+              this.form.fourth_is_check = list.fourth_is_check.toString()
1436
+              this.form.fourth_modifications = list.fourth_modifications?list.fourth_modifications:""
1437
+              this.form.fourth_creator = list.fourth_creator
1436 1438
 
1437 1439
               this.form.last_start_time = this.getTimeThree(list.last_start_time)
1438 1440
               this.form.last_end_time = this.getTimeThree(list.last_end_time)
@@ -1600,6 +1602,9 @@
1600 1602
         this.page = val;
1601 1603
         this.getObjectTableDisInfectList()
1602 1604
       },
1605
+      toSeach(){
1606
+        this.getObjectTableDisInfectList()
1607
+      }
1603 1608
         
1604 1609
       }
1605 1610
     }

+ 31 - 9
src/xt_pages/dialysis/batch_print/batch_print_order_fortyOne.vue 查看文件

@@ -1392,16 +1392,38 @@ export default {
1392 1392
         return record[key] == target_value
1393 1393
       }
1394 1394
     },
1395
+    // getAge: function(val) {
1396
+    //   if (val.age == 0) {
1397
+    //     if (val.birthday == 0) {
1398
+    //       return ''
1399
+    //     }
1400
+    //     return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
1401
+    //   } else {
1402
+    //     return val.age
1403
+    //   }
1404
+    // },
1395 1405
     getAge: function(val) {
1396
-      if (val.age == 0) {
1397
-        if (val.birthday == 0) {
1398
-          return ''
1399
-        }
1400
-        return jsGetAge(uParseTime(val.birthday, '{y}-{m}-{d}'), '-')
1401
-      } else {
1402
-        return val.age
1403
-      }
1404
-    },
1406
+     
1407
+     if (val.id_card_no) {
1408
+       var thisLen = val.id_card_no.length
1409
+
1410
+       var birth = ''
1411
+       if (thisLen == 15) {
1412
+         birth = '19' + val.id_card_no.substr(6, 6)
1413
+       } else {
1414
+         birth = val.id_card_no.substr(6, 8)
1415
+       }
1416
+       var birthtwo =
1417
+         birth.substr(0, 4) +
1418
+         '-' +
1419
+         birth.substr(4, 2) +
1420
+         '-' +
1421
+         birth.substr(6, 2)
1422
+
1423
+       var age = jsGetAge(birthtwo, '-')
1424
+       return age
1425
+     }
1426
+   },
1405 1427
     newAdviceGroupObject: function() {
1406 1428
       return Object.assign(
1407 1429
         {},

+ 147 - 44
src/xt_pages/dialysis/batch_print/batch_print_order_six.vue 查看文件

@@ -69,8 +69,14 @@
69 69
               </div>
70 70
71 71
             </div>
72
-            <div class="inline_block">
73
-              门诊:
72
+            <div class="inline_block" v-if="record.receive_assessment.condition!=1">
73
+                门诊:
74
+                <div class="under_line" style="width: 30px; text-align: center">
75
+                  <check-box :checked="record.patient.source == 1"></check-box>
76
+                </div>
77
+              </div>
78
+            <div class="inline_block" v-if="record.receive_assessment.condition==1">
79
+              住院:
74 80
               <div class="under_line" style="width: 30px; text-align: center">
75 81
                 <check-box :checked="record.patient.source == 1"></check-box>
76 82
               </div>
@@ -1108,6 +1114,30 @@
1108 1114
                           <span v-if="record.prescription.anticoagulant == 7"
1109 1115
                             >&nbsp;低分子肝素钠</span
1110 1116
                           >
1117
+                          <span v-if="record.prescription.anticoagulant == 8"
1118
+                            >&nbsp;依诺肝素</span
1119
+                          >
1120
+                          <span v-if="record.prescription.anticoagulant == 9"
1121
+                            >&nbsp;达肝素</span
1122
+                          >
1123
+                          <span v-if="record.prescription.anticoagulant == 10"
1124
+                            >&nbsp;体外抗凝</span
1125
+                          >
1126
+                          <span v-if="record.prescription.anticoagulant == 11"
1127
+                            >&nbsp;那屈肝素</span
1128
+                          >
1129
+                          <span v-if="record.prescription.anticoagulant == 12"
1130
+                            >&nbsp;无抗凝剂</span
1131
+                          >
1132
+                          <span v-if="record.prescription.anticoagulant == 13"
1133
+                            >&nbsp;那屈肝素钙</span
1134
+                          >
1135
+                          <span v-if="record.prescription.anticoagulant == 14"
1136
+                            >&nbsp;肝素钙注射液</span
1137
+                          >
1138
+                          <span v-if="record.prescription.anticoagulant == 15"
1139
+                            >&nbsp;甲磺酸萘莫司他</span
1140
+                          >
1111 1141
                         </div>
1112 1142
                       </div>
1113 1143
                       <div class="inline_block" style="margin-left: 20px">
@@ -1318,7 +1348,8 @@
1318 1348
                               org_id != 9538 &&
1319 1349
                               org_id != 10121 &&
1320 1350
                               org_id != 9675 &&
1321
-                              org_id != 0
1351
+                              org_id != 0 &&
1352
+                              org_id!=10490
1322 1353
                             "
1323 1354
                           >
1324 1355
                             电导度<br />(ms/cm)
@@ -1334,24 +1365,32 @@
1334 1365
                           <td
1335 1366
                             width="50"
1336 1367
                             v-if="
1337
-                              org_id == 0 || org_id ==  10469
1368
+                              org_id ==  10469
1338 1369
                             "
1339 1370
                           >
1340 1371
                             钠浓度<br />(mmol/L)
1341 1372
                           </td>
1342
-                          <td width="50" v-if="org_id != 0 && org_id != 3877 && org_id != 10449">超滤量<br />(ml)</td>
1343
-                          <td width="50" v-if="org_id ==0 || org_id ==3877 || org_id ==10449">累计超滤量<br />(ml)</td>
1373
+                          <td
1374
+                            width="50"
1375
+                            v-if="
1376
+                              org_id ==  10490 || org_id == 0
1377
+                            "
1378
+                          >
1379
+                          置换液的速度<br />(ml/h)
1380
+                          </td>
1381
+                          <td width="50" v-if="org_id != 3877 && org_id != 10449">超滤量<br />(ml)</td>
1382
+                          <td width="50" v-if="org_id ==3877 || org_id ==10449">累计超滤量<br />(ml)</td>
1344 1383
                           <td
1345 1384
                             v-if="
1346
-                              record.prescription.mode_id == 2 ||
1385
+                             (record.prescription.mode_id == 2 ||
1347 1386
                               record.prescription.mode_id == 5 ||
1348
-                              record.prescription.mode_id == 12
1387
+                              record.prescription.mode_id == 12) && org_id!=0&&org_id!=10478
1349 1388
                             "
1350 1389
                             width="50"
1351 1390
                           >
1352 1391
                             置换量<br />(ml)
1353 1392
                           </td>
1354
-                          <td v-if="org_id == 3877 || org_id == 0 || org_id == 10449" width="50">滤前压(mmHg)</td>
1393
+                          <td v-if="org_id == 3877  || org_id == 10449" width="50">滤前压(mmHg)</td>
1355 1394
                           <td
1356 1395
                             width="50"
1357 1396
                             v-if="
@@ -1372,6 +1411,15 @@
1372 1411
                             血容量<br />(L)
1373 1412
                           </td>
1374 1413
 
1414
+                          <td
1415
+                            width="50"
1416
+                            v-if="
1417
+                              org_id == 10490 || org_id == 0
1418
+                            "
1419
+                          >
1420
+                          碳酸氢钠<br />(ml)
1421
+                          </td>
1422
+
1375 1423
                           <td width="200">病情变化及处理</td>
1376 1424
                         </tr>
1377 1425
 
@@ -1446,15 +1494,13 @@
1446 1494
                             }}
1447 1495
                           </td>
1448 1496
 
1449
-                          <!-- <td v-if="org_id != 10121 && org_id != 9675 && org_id != 0">
1450
-                            {{monitor_record.conductivity? monitor_record.conductivity : ""}}
1451
-                          </td> -->
1497
+                      
1452 1498
                           <td
1453 1499
                             v-if="
1454 1500
                               org_id != 9538 &&
1455 1501
                               org_id != 10121 &&
1456 1502
                               org_id != 9675 && 
1457
-                              org_id!=0
1503
+                              org_id!=0 && org_id!=10490
1458 1504
                              
1459 1505
                             "
1460 1506
                           >
@@ -1479,7 +1525,7 @@
1479 1525
 
1480 1526
                           <td
1481 1527
                             v-if="
1482
-                              org_id == 0 || org_id == 10469 
1528
+                              org_id == 10469 
1483 1529
                             "
1484 1530
                           >
1485 1531
                             {{
@@ -1489,6 +1535,18 @@
1489 1535
                             }}
1490 1536
                           </td>
1491 1537
 
1538
+                          <td
1539
+                            v-if="
1540
+                              org_id == 10490 || org_id == 0 
1541
+                            "
1542
+                          >
1543
+                            {{
1544
+                              monitor_record.replacement_speed
1545
+                                ? monitor_record.replacement_speed
1546
+                                : ""
1547
+                            }}
1548
+                          </td>
1549
+
1492 1550
                           <td v-if="org_id == 9538">
1493 1551
                             {{
1494 1552
                               monitor_record.sodium_concentration
@@ -1516,9 +1574,10 @@
1516 1574
 
1517 1575
                           <td
1518 1576
                             v-if="
1519
-                              record.prescription.mode_id == 2 ||
1577
+                              (record.prescription.mode_id == 2 ||
1520 1578
                               record.prescription.mode_id == 5 ||
1521
-                              record.prescription.mode_id == 12
1579
+                              record.prescription.mode_id == 12)
1580
+                              && org_id!=0&&org_id!=10478
1522 1581
                             "
1523 1582
                             style="width: 50px"
1524 1583
                           >
@@ -1528,7 +1587,7 @@
1528 1587
                                 : ""
1529 1588
                             }}
1530 1589
                           </td>
1531
-                          <td v-if="org_id == 3877 || org_id == 0 || org_id == 10449">
1590
+                          <td v-if="org_id == 3877  || org_id == 10449">
1532 1591
                             {{
1533 1592
                               monitor_record.filter_pressure
1534 1593
                                 ? monitor_record.filter_pressure
@@ -1554,6 +1613,14 @@
1554 1613
                           >
1555 1614
                             {{ monitor_record.accumulated_blood_volume }}
1556 1615
                           </td>
1616
+                          <td
1617
+                            width="50"
1618
+                            v-if="
1619
+                              org_id == 10490 || org_id == 0
1620
+                            "
1621
+                          >
1622
+                           {{ monitor_record.dicarbonate  }}<br />
1623
+                          </td>
1557 1624
 
1558 1625
                           <td style="line-height: 16px; padding: 0px">
1559 1626
                             <div
@@ -1604,22 +1671,30 @@
1604 1671
                           v-for="(monitor_record, s) in record.monitor_records2"
1605 1672
                           :key="s"
1606 1673
                         >
1607
-                          <td></td>
1608
-                          <td></td>
1609
-                          <td></td>
1610
-                          <td></td>
1611
-                          <td></td>
1612
-                          <td></td>
1613
-                          <td></td>
1614
-                          <td></td>
1615
-                          <td></td>
1616
-                          <td></td>
1617
-                          <td
1618
-                            v-if="
1619
-                              org_id == 9919 || org_id == 9538 || org_id == 9675
1620
-                            "
1621
-                          ></td>
1622
-                          <td v-if="org_id == 9538 || org_id == 9675"></td>
1674
+                        <td></td>
1675
+                        <td></td>
1676
+                        <td></td>
1677
+                        <td></td>
1678
+                        <td></td>
1679
+                        <td></td>
1680
+                        <td></td>
1681
+                        <td></td>
1682
+                        <td></td>
1683
+                        <td></td>
1684
+                        <td v-if="org_id == 9671 || org_id == 9919"></td>
1685
+                        <td
1686
+                          v-if="
1687
+                            (prescription.mode_id == 2 ||
1688
+                            prescription.mode_id == 5 ||
1689
+                            prescription.mode_id == 12)
1690
+                            && org_id!=10478
1691
+                          "
1692
+                          width="50"
1693
+                        ></td>
1694
+                        <td v-if="org_id == 9919||org_id == 9538 || org_id == 9671"></td>
1695
+                        <td v-if="org_id == 9538"></td>
1696
+                        <td v-if="org_id == 10490 || org_id == 0"></td>
1697
+                         
1623 1698
                           <td style="line-height: 16px; padding: 0px">
1624 1699
                             <div
1625 1700
                               style="
@@ -1994,12 +2069,18 @@
1994 2069
                 </div>
1995 2070
1996 2071
               </div>
1997
-              <div class="inline_block">
2072
+              <div class="inline_block" v-if="record.receive_assessment.condition!=1">
1998 2073
                 门诊:
1999 2074
                 <div class="under_line" style="width: 30px; text-align: center">
2000 2075
                   <check-box :checked="record.patient.source == 1"></check-box>
2001 2076
                 </div>
2002 2077
               </div>
2078
+              <div class="inline_block" v-if="record.receive_assessment.condition==1">
2079
+                住院:
2080
+                <div class="under_line" style="width: 30px; text-align: center">
2081
+                  <check-box :checked="record.patient.source == 1"></check-box>
2082
+                </div>
2083
+              </div>
2003 2084
               <div class="inline_block">
2004 2085
                 病区:
2005 2086
                 <div class="under_line" style="width: 50px; text-align: center">
@@ -3439,16 +3520,38 @@ export default {
3439 3520
         return record[key] == target_value;
3440 3521
       }
3441 3522
     },
3442
-    getAge: function (val) {
3443
-      if (val.age == 0) {
3444
-        if (val.birthday == 0) {
3445
-          return "";
3446
-        }
3447
-        return jsGetAge(uParseTime(val.birthday, "{y}-{m}-{d}"), "-");
3448
-      } else {
3449
-        return val.age;
3450
-      }
3451
-    },
3523
+    // getAge: function (val) {
3524
+    //   if (val.age == 0) {
3525
+    //     if (val.birthday == 0) {
3526
+    //       return "";
3527
+    //     }
3528
+    //     return jsGetAge(uParseTime(val.birthday, "{y}-{m}-{d}"), "-");
3529
+    //   } else {
3530
+    //     return val.age;
3531
+    //   }
3532
+    // },
3533
+    getAge: function(val) {
3534
+     
3535
+     if (val.id_card_no) {
3536
+       var thisLen = val.id_card_no.length
3537
+
3538
+       var birth = ''
3539
+       if (thisLen == 15) {
3540
+         birth = '19' + val.id_card_no.substr(6, 6)
3541
+       } else {
3542
+         birth = val.id_card_no.substr(6, 8)
3543
+       }
3544
+       var birthtwo =
3545
+         birth.substr(0, 4) +
3546
+         '-' +
3547
+         birth.substr(4, 2) +
3548
+         '-' +
3549
+         birth.substr(6, 2)
3550
+
3551
+       var age = jsGetAge(birthtwo, '-')
3552
+       return age
3553
+     }
3554
+   },
3452 3555
     newAdviceGroupObject: function () {
3453 3556
       return Object.assign(
3454 3557
         {},

+ 56 - 5
src/xt_pages/dialysis/batch_print/batch_print_order_thirteen.vue 查看文件

@@ -200,10 +200,17 @@
200 200
                     </div>
201 201
                     <div class="inline_block" style="margin-right:30px;">
202 202
                         透析液配方
203
-                        <div class="inline_block under_line" style="width:150px;text-align: center;">
203
+                        <div class="inline_block under_line" style="width:100px;text-align: center;">
204 204
                             {{ record.prescription.dialysate_formulation ? dialysateFormulationName(record.prescription.dialysate_formulation) : ''}}
205 205
                         </div>
206 206
                     </div>
207
+                    <div class="inline_block" style="margin-right:30px;">
208
+                      通路形成时间
209
+                      <div class="inline_block under_line" style="width:100px;text-align: left;">
210
+                        {{getTimeOne(record.assessment_before_dislysis.pathway_formation_time) }}
211
+                         
212
+                      </div>
213
+                  </div>
207 214
                 </div>
208 215
                 <div class="row">
209 216
                     血管通路
@@ -236,19 +243,53 @@
236 243
                     </div>
237 244
                 </div>
238 245
                 <div class="row">
239
-                  <div class="inline_block" style="margin-right:30px;">
246
+                  <div class="inline_block" style="margin-right:10px;">
240 247
                       导管
241
-                      <div class="inline_block under_line" style="width:200px;text-align: left;">
248
+                      <div class="inline_block under_line" style="width:900px;text-align: left;">
242 249
                           {{ record.assessment_before_dislysis.catheter ? record.assessment_before_dislysis.catheter : ''}}
243 250
                       </div>
244 251
                   </div>
245
-                  <div class="inline_block" style="margin-right:30px;">
252
+                </div>
253
+                <div class="row">
254
+                 <div class="inline_block" style="margin-right:10px;">
246 255
                       内瘘
247
-                      <div class="inline_block under_line" style="width:200px;text-align: left;">
256
+                      <div class="inline_block under_line" style="width:900px;text-align: left;">
248 257
                           {{ record.assessment_before_dislysis.internal_fistula ? record.assessment_before_dislysis.internal_fistula : ''}}
249 258
                       </div>
250 259
                   </div>
251 260
                 </div>
261
+                <!-- <div class="row"> -->
262
+                  <!-- <div class="inline_block" style="margin-right:30px;">
263
+                    导管评估项目
264
+                      <div class="inline_block under_line" style="width:200px;text-align: left;">
265
+                          {{ record.assessment_before_dislysis.catheter_evaluation_program ? record.assessment_before_dislysis.catheter_evaluation_program : ''}}
266
+                      </div>
267
+                  </div>
268
+                  <div class="inline_block" style="margin-right:30px;">
269
+                    置管部位皮肤
270
+                      <div class="inline_block under_line" style="width:100px;text-align: left;">
271
+                          {{ record.assessment_before_dislysis.skin_site_catheterization ? record.assessment_before_dislysis.skin_site_catheterization : ''}}
272
+                      </div>
273
+                  </div>
274
+
275
+                  <div class="inline_block" style="margin-right:30px;">
276
+                    是否通畅
277
+                      <div class="inline_block under_line" style="width:100px;text-align: left;">
278
+                        <span v-if="record.assessment_before_dislysis.whether_unobstructed ==0"></span>
279
+                         <span v-if="record.assessment_before_dislysis.whether_unobstructed ==1">是</span>
280
+                         <span v-if="record.assessment_before_dislysis.whether_unobstructed ==2">否</span>
281
+                      </div>
282
+                  </div> -->
283
+                  <!-- <div class="inline_block" style="margin-right:30px;">
284
+                    留置必要
285
+                      <div class="inline_block under_line" style="width:100px;text-align: left;">
286
+                        <span v-if="record.assessment_before_dislysis.lien_necessary ==0"></span>
287
+                         <span v-if="record.assessment_before_dislysis.lien_necessary ==1">是</span>
288
+                         <span v-if="record.assessment_before_dislysis.lien_necessary ==2">否</span>
289
+                         
290
+                      </div>
291
+                  </div> -->
292
+                <!-- </div> -->
252 293
                 <div class="row">
253 294
                     抗凝药物
254 295
                     <div class="inline_block under_line" style="width:92%;text-align: left;">
@@ -1010,6 +1051,16 @@ export default {
1010 1051
         )
1011 1052
       }
1012 1053
     },
1054
+    getTimeOne(val) {
1055
+        if(val < 0){
1056
+          return ""
1057
+        }
1058
+        if(val == ""){
1059
+        return ""
1060
+        }else {
1061
+        return uParseTime(val, '{y}-{m}-{d}')
1062
+        }
1063
+     },
1013 1064
     getNewAge(UUserCard) {
1014 1065
       if (UUserCard != null && UUserCard != '') {
1015 1066
         // 获取年龄

+ 3 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_thirtyTwo.vue 查看文件

@@ -72,7 +72,9 @@
72 72
                         <td width="10">第</td>
73 73
                         <td width="50">
74 74
                             <div class="under-line">
75
-                            {{ record.patient.total_dialysis + record.patient.user_sys_before_count }}
75
+                            <!-- {{ record.patient.total_dialysis + record.patient.user_sys_before_count }} -->
76
+
77
+                             {{ record.Count }}
76 78
                             </div>
77 79
                         </td>
78 80
                         <td width="80">次透析</td>

+ 2 - 2
src/xt_pages/dialysis/bloodPresssWatch.vue 查看文件

@@ -328,7 +328,7 @@
328 328
           >批量打印</el-button
329 329
         >
330 330
       </template>
331
-        <template v-if="this.template_id == 47">
331
+        <template v-if="this.template_id == 47 && this.org_id!=10318">
332 332
         <el-button
333 333
           size="small"
334 334
           icon="el-icon-printer"
@@ -2120,7 +2120,7 @@ export default {
2120 2120
         this.$router.push({ path: "/dialysis/print/batch/fortyOne" });
2121 2121
       } else if (this.template_id == 43) {
2122 2122
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
2123
-      } else if (this.template_id == 47) {
2123
+      } else if (this.template_id == 47 && this.org_id!=10318) {
2124 2124
         this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
2125 2125
       } else if (this.template_id == 48) {
2126 2126
         this.$router.push({ path: "/dialysis/print/batch/six" });

+ 5 - 0
src/xt_pages/dialysis/details/DialysisPrescription.vue 查看文件

@@ -606,6 +606,11 @@
606 606
           <span class="content">{{this.prescription.treatment_remark}}</span>
607 607
         </li>
608 608
 
609
+        <li v-if="isShow('加糖')">
610
+          <label>加糖: </label>
611
+          <span class="content">{{this.prescription.chaptalization}}</span>
612
+        </li>
613
+
609 614
        
610 615
       </ul>
611 616
     </div>

+ 14 - 5
src/xt_pages/dialysis/details/NavIgation.vue 查看文件

@@ -131,6 +131,12 @@
131 131
       ref="treatmentSummary"
132 132
       :patient="patient"
133 133
       :treatment_summary="treatment_summary"
134
+      :prescription="prescription"
135
+      :predialysis_evaluation="predialysis_evaluation"
136
+      :doctor_advices="doctor_advices"
137
+      :dialysis_order="dialysis_order"
138
+      :monitors="monitor_records"
139
+      :assessment_after_dislysis="assessment_after_dislysis"
134 140
     ></treatment-summary-dialog>
135 141
 
136 142
     <doctor-advice-dialog
@@ -579,6 +585,9 @@ export default {
579 585
       default:()=>{
580 586
         return [];
581 587
       } 
588
+    },
589
+    record_date:{
590
+      type:String
582 591
     }
583 592
   },
584 593
   methods: {
@@ -668,7 +677,7 @@ export default {
668 677
       this.$refs.assessment_after_dislysis.show(this.assessment_after_dislysis,this.last_assessment_after_dislysis);
669 678
     },
670 679
     showDoctorAdviceDialog: function() {
671
-      console.log("!!!!!!temp_schedual",this.temp_schedual)
680
+      
672 681
       this.$refs.doctor_advice.show(this.his_is_open,this.is_advice_open);
673 682
     },
674 683
     showComputerDialog: function() {
@@ -678,16 +687,16 @@ export default {
678 687
       this.$refs.finish_dialog.show(this.dialysis_order);
679 688
     },
680 689
     showPrescription: function() {
681
-      console.log("prescirpiton+++++++++++",this.prescription)
690
+     
682 691
       this.$refs.prescription.show(this.prescription,this.schedual,this.last_dialysis_prescribe,this.his_is_open,this.is_advice_open,this.admin_users);
683 692
     },
684 693
     showAccepts: function() {
685 694
       this.$refs.accepts.show(this.receiver_treatment_access);
686 695
     },
687 696
     showAssessmentBefore: function() {
688
-      console.log(this.last_predialysis_evaluation)
689
-
690
-      this.$refs.assessmentBefore.show(this.predialysis_evaluation,this.last_dryWeight_dislysis,this.last_predialysis_evaluation,this.lastAssessment);
697
+     
698
+      console.log("透前评估进入23232323我我哦",this.record_date)
699
+      this.$refs.assessmentBefore.show(this.predialysis_evaluation,this.last_dryWeight_dislysis,this.last_predialysis_evaluation,this.lastAssessment,this.record_date);
691 700
     },
692 701
     showDoubleCheck: function() {
693 702
 

+ 2 - 2
src/xt_pages/dialysis/details/assessmentAfter.vue 查看文件

@@ -193,8 +193,8 @@
193 193
         <li v-if="isShow('透析中进食')">
194 194
           <label>透析中进食: </label>
195 195
           <span class="content" >{{ this.record.dialysis_during ? this.record.dialysis_during : ""  }}</span>
196
-          <span class="unit" v-if="this.$store.getters.xt_user.template_info.template_id != 36">{{ this.record.dialysis_during ? "ml" : "" }}</span>
197
-          <span class="unit" v-if="this.$store.getters.xt_user.template_info.template_id == 36">{{ this.record.dialysis_during ? "g" : "" }}</span>
196
+          <span class="unit" v-if="this.$store.getters.xt_user.template_info.template_id != 36 && this.$store.getters.xt_user.template_info.template_id != 6">{{ this.record.dialysis_during ? "ml" : "" }}</span>
197
+          <span class="unit" v-if="this.$store.getters.xt_user.template_info.template_id == 36 || this.$store.getters.xt_user.template_info.template_id == 6">{{ this.record.dialysis_during ? "g" : "" }}</span>
198 198
         </li>
199 199
       </ul>
200 200
       <ul>

+ 7 - 0
src/xt_pages/dialysis/details/assessmentBefore.vue 查看文件

@@ -421,6 +421,13 @@
421 421
           <span class="unit"></span>
422 422
         </li>
423 423
 
424
+        <li v-if="isShow('透前症状')">
425
+          <label>透前症状: </label>
426
+          <span class="content">{{this.record.befor_symptoms}}</span>
427
+          <span class="unit"></span>
428
+        </li>
429
+
430
+
424 431
       </ul>
425 432
     </div>
426 433
     <div class="note">

+ 20 - 12
src/xt_pages/dialysis/details/dialog/AssessmentAfterDislysis.vue 查看文件

@@ -29,7 +29,7 @@
29 29
           <el-col :span="8" v-if="isShow('实际超滤量')">
30 30
             <el-form-item
31 31
               label="实际超滤量(ml): " :prop="isName('实际超滤量')" :rules="isCheckmust('实际超滤量')"
32
-              v-if=" this.template_id == 6 || this.template_id == 9 || this.template_id == 10 || this.template_id == 11  || this.template_id == 17 || this.template_id == 20 || this.template_id == 21 || this.template_id == 22 || this.template_id == 23 || this.template_id == 24 || this.template_id == 26 || this.template_id == 28 || this.template_id == 27 || this.template_id == 29 || this.template_id == 30 || this.template_id == 31 || this.template_id == 32 || this.template_id == 34 || this.template_id == 36 || this.template_id == 38 || this.template_id == 43 || this.template_id == 44 || this.template_id == 47 || this.template_id == 56 || this.template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10307 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 9555 || this.$store.getters.xt_user.template_info.org_id == 10387 || this.$store.getters.xt_user.template_info.org_id == 10430 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10441 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 ||  this.$store.getters.xt_user.template_info.org_id == 10485"  >
32
+              v-if=" this.template_id == 6 || this.template_id == 9 || this.template_id == 10 || this.template_id == 11  || this.template_id == 17 || this.template_id == 20 || this.template_id == 21 || this.template_id == 22 || this.template_id == 23 || this.template_id == 24 || this.template_id == 26 || this.template_id == 28 || this.template_id == 27 || this.template_id == 29 || this.template_id == 30 || this.template_id == 31 || this.template_id == 32 || this.template_id == 34 || this.template_id == 36 || this.template_id == 38 || this.template_id == 43 || this.template_id == 44 || this.template_id == 47 || this.template_id == 56 || this.template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10307 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 9555 || this.$store.getters.xt_user.template_info.org_id == 10387 || this.$store.getters.xt_user.template_info.org_id == 10430 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10441 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410"  >
33 33
               <el-input v-model="form.actual_ultrafiltration"></el-input>
34 34
             </el-form-item>
35 35
             <el-form-item label="实际超滤量(L): " v-else :prop="isName('实际超滤量')" :rules="isCheckmust('实际超滤量')">
@@ -349,12 +349,18 @@
349 349
           </el-form-item>
350 350
         </el-col>
351 351
 
352
-        <el-col :span="8" v-if="isShow('透析中入量')">
352
+        <el-col :span="8" v-if="isShow('透析中入量') && org_id!=10485">
353 353
           <el-form-item label="透析中入量(L): " :prop="isName('透析中入量')" :rules="isCheckmust('透析中入量')">
354 354
             <el-input v-model="form.dialysis_intakes"></el-input>
355 355
           </el-form-item>
356 356
         </el-col>
357 357
 
358
+        <el-col :span="8" v-if="isShow('透析中入量') && org_id==10485">
359
+          <el-form-item label="透析中入量(g): " :prop="isName('透析中入量')" :rules="isCheckmust('透析中入量')">
360
+            <el-input v-model="form.dialysis_intakes"></el-input>
361
+          </el-form-item>
362
+        </el-col>
363
+
358 364
         <el-col :span="8" v-if="isShow('透析中入量单位')">
359 365
           <el-form-item label="透析中入量单位: " :prop="isName('透析中入量单位')" :rules="isCheckmust('透析中入量单位')" >
360 366
             <el-select v-model="form.dialysis_intakes_unit" placeholder='请选择'>
@@ -382,10 +388,10 @@
382 388
         </el-col>
383 389
 
384 390
         <el-col :span="8" v-if="isShow('透析中进食')">
385
-          <el-form-item label="透析中进食(ml): " v-if="template_id != 36" :prop="isName('透析中进食')" :rules="isCheckmust('透析中进食')">
391
+          <el-form-item label="透析中进食(ml): " v-if="template_id != 36 && template_id!=6" :prop="isName('透析中进食')" :rules="isCheckmust('透析中进食')">
386 392
             <el-input v-model="form.dialysis_during"></el-input>
387 393
           </el-form-item>
388
-          <el-form-item label="透析中进食(g): " v-if="template_id == 36" :prop="isName('透析中进食')" :rules="isCheckmust('透析中进食')" >
394
+          <el-form-item label="透析中进食(g): " v-if="template_id == 36 || template_id == 6" :prop="isName('透析中进食')" :rules="isCheckmust('透析中进食')" >
389 395
             <el-input v-model="form.dialysis_during"></el-input>
390 396
           </el-form-item>
391 397
         </el-col>
@@ -854,7 +860,8 @@ export default {
854 860
       machineList:[],
855 861
       infoDialogVisible:false,
856 862
       selected_date:"",
857
-      remark:""
863
+      remark:"",
864
+      org_id:0,
858 865
     }
859 866
   },
860 867
   watch: {
@@ -892,7 +899,7 @@ export default {
892 899
           this.form['internal_fistula_tremor_ac'] = ''
893 900
         }
894 901
         if (this.assessment_after_dislysis['patient_gose'] == 0) {
895
-          this.form['patient_gose'] = ''
902
+          this.form['patient_gose'] = 0
896 903
         }
897 904
         if (this.assessment_after_dislysis['weight_after'] == 0) {
898 905
           this.form['weight_after'] = ''
@@ -1118,7 +1125,7 @@ export default {
1118 1125
           data['puncture_point_oozing_blood'] = this.form.puncture_point_oozing_blood ? parseFloat(this.form.puncture_point_oozing_blood) : 0
1119 1126
           data['puncture_point_haematoma'] = this.form.puncture_point_haematoma ? parseFloat(this.form.puncture_point_haematoma) : 0
1120 1127
           data['internal_fistula_tremor_ac'] = this.form.internal_fistula_tremor_ac ? parseFloat(this.form.internal_fistula_tremor_ac) : 0
1121
-          data['patient_gose'] = this.form.patient_gose ? parseFloat(this.form.patient_gose) : ' '
1128
+          data['patient_gose'] = this.form.patient_gose ? parseFloat(this.form.patient_gose) : 0
1122 1129
           data['inpatient_department'] = this.form.inpatient_department
1123 1130
           data['observation_content'] = this.form.observation_content
1124 1131
           data['observation_content_other'] = this.form.observation_content_other
@@ -1167,6 +1174,7 @@ export default {
1167 1174
           data["after_urea"] = this.form.after_urea
1168 1175
           data["pip_coagulation"] = this.form.pip_coagulation
1169 1176
           data["accumulated_blood_volume"] = this.form.accumulated_blood_volume
1177
+          console.log("Data",data)
1170 1178
           console.log("Paramsquery",data)
1171 1179
 
1172 1180
           postAssessmentAfterDislysis(ParamsQuery, data)
@@ -1175,7 +1183,7 @@ export default {
1175 1183
               if (response.data.state == 0) {
1176 1184
                 this.$message.error(response.data.msg)
1177 1185
                 if(response.data.code == 600000008){
1178
-                  this.infoDialogVisible = false
1186
+                  this.infoDialogVisible = true
1179 1187
                 }
1180 1188
                 return false
1181 1189
               } else {
@@ -1196,8 +1204,7 @@ export default {
1196 1204
                 }
1197 1205
                 this.hide()
1198 1206
               }
1199
-            })
1200
-            .catch(v => {
1207
+            }).catch(v => {
1201 1208
               this.loading = false
1202 1209
             })
1203 1210
         }else {
@@ -1471,13 +1478,13 @@ export default {
1471 1478
           selected_date:this.selected_date,
1472 1479
           patient_id:this.$route.query.patient_id,
1473 1480
           record_date:this.$route.query.date,
1474
-          module:2,
1481
+          module:9,
1475 1482
           remark:this.remark,
1476 1483
         }
1477 1484
         saveInformation(params).then(response=>{
1478 1485
            if(response.data.state == 1){
1479 1486
              var information = response.data.data.information
1480
-             this.$message.success("审核成功!")
1487
+             this.$message.success("提交成功!")
1481 1488
              this.infoDialogVisible = false
1482 1489
            }
1483 1490
         })
@@ -1485,6 +1492,7 @@ export default {
1485 1492
   },
1486 1493
   created() {
1487 1494
     // console.log("this.form", this.form.consciousness);
1495
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
1488 1496
     this.cruorOptions = getDataConfig('hemodialysis', 'cruor')
1489 1497
     this.pip_coagulationOptions = getDataConfig('hemodialysis','pip_coagulation')
1490 1498
     this.symptomsOptions = getDataConfig('hemodialysis', 'symptoms')

+ 35 - 40
src/xt_pages/dialysis/details/dialog/DoctorAdviceDialog.vue 查看文件

@@ -257,6 +257,7 @@
257 257
             <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
258 258
               <span class="el-dropdown-link">
259 259
                 &emsp;{{ getAdviceContent(scope.row, 2)}}
260
+
260 261
                 <i class="el-icon-arrow-down el-icon--right"></i>
261 262
               </span>
262 263
               <el-dropdown-menu slot="dropdown">
@@ -290,7 +291,7 @@
290 291
           </template>
291 292
         </el-table-column>
292 293
         <el-table-column
293
-          v-if="template_id != 6 && org_id!=10223 && org_id!=10445"
294
+          v-if="template_id != 6 && org_id!=10223 && org_id!=10445 && org_id!=0"
294 295
           prop="checker"
295 296
           min-width="30px"
296 297
           align="center"
@@ -359,6 +360,7 @@
359 360
             <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
360 361
               <span class="el-dropdown-link">
361 362
                 &emsp;{{ getAdviceContent(scope.row, 2)}}
363
+
362 364
                 <i class="el-icon-arrow-down el-icon--right"></i>
363 365
               </span>
364 366
               <el-dropdown-menu slot="dropdown">
@@ -606,40 +608,6 @@
606 608
       v-on:add-new-order="addNewOrder"
607 609
       :admin_users="admin_users"
608 610
     ></edit-group-advice>
609
-
610
-
611
-      <el-dialog
612
-          title="提示"
613
-          :visible.sync="infoDialogVisible"
614
-          width="30%">
615
-          <span>
616
-           <el-form>
617
-             <el-row>
618
-               <span>申请日期:</span>
619
-                <span>
620
-                    <el-date-picker
621
-                      type="datetime"
622
-                      format="yyyy-MM-dd HH:mm"
623
-                      value-format="yyyy-MM-dd HH:mm"
624
-                      placeholder="选择时间"
625
-                      v-model="selected_date"
626
-                  ></el-date-picker>
627
-                </span>
628
-             </el-row>
629
-             <el-row>
630
-               <span>备注:</span>
631
-                <span>
632
-                   <el-input v-model="remark" style="width:200px"></el-input>
633
-                </span>
634
-             </el-row>
635
-           </el-form>
636
-
637
-          </span>
638
-          <span slot="footer" class="dialog-footer">
639
-            <el-button @click="infoDialogVisible = false">取 消</el-button>
640
-            <el-button type="primary" @click="saveInformation">确 定</el-button>
641
-          </span>
642
-        </el-dialog>
643 611
   </div>
644 612
 </template>
645 613
 
@@ -660,7 +628,7 @@
660 628
     getPatientSchedule
661 629
   } from '@/api/advice'
662 630
   import { getDataConfig } from '@/utils/data'
663
-
631
+  import { saveInformation } from '@/api/dialysis'
664 632
   import request from '@/utils/request'
665 633
   import { getDialysisScheduleDetail } from '@/api/dialysis_record'
666 634
   import { getSelfMedicalList } from "@/api/drug/drug"
@@ -815,9 +783,7 @@
815 783
         src_type:"",
816 784
         org_id:0,
817 785
         schedulePatient:{},
818
-        infoDialogVisible:false,
819
-        selected_date:"",
820
-        remark:""
786
+        tempArrOne:[],
821 787
       }
822 788
     },
823 789
     watch: {
@@ -832,12 +798,40 @@
832 798
         this.form['dialysis_order_id'] = this.dialysis_order.id
833 799
       },
834 800
 
801
+      'doctor_advices': function() {
802
+
803
+        this.handleSpanTempArrOne();
804
+      },
805
+
835 806
     },
836 807
     methods: {
808
+      handleSpanTempArrOne() {
809
+          this.tempArrOne = [];
810
+
811
+          for (let i = 0; i < this.doctor_advices.length; i++) {
812
+            if (i === 0) {
813
+              this.tempArrOne.push(1);
814
+              this.pos = 0;
815
+            } else {
816
+              // 判断当前元素与上一个元素是否相同
817
+              if (
818
+                this.doctor_advices[i].groupno ===
819
+                this.doctor_advices[i - 1].groupno
820
+              ) {
821
+                this.tempArrOne[this.pos] += 1;
822
+                this.tempArrOne.push(0);
823
+              } else {
824
+                this.tempArrOne.push(1);
825
+                this.pos = i;
826
+              }
827
+            }
828
+          }
829
+      },
837 830
       handleSelectionChange(){
838 831
 
839 832
       },
840 833
 
834
+
841 835
       //调试
842 836
       lili(index,row){
843 837
         // console.log("==index==",index)
@@ -958,6 +952,7 @@
958 952
           return ''
959 953
         }
960 954
       },
955
+
961 956
       submitEditAdvice() {
962 957
         // console.log()
963 958
         console.log("保存22222222222222")
@@ -2670,7 +2665,7 @@
2670 2665
         saveInformation(params).then(response=>{
2671 2666
            if(response.data.state == 1){
2672 2667
              var information = response.data.data.information
2673
-             this.$message.success("审核成功!")
2668
+             this.$message.success("提交成功!")
2674 2669
              this.infoDialogVisible = false
2675 2670
            }
2676 2671
         })

+ 3 - 3
src/xt_pages/dialysis/details/dialog/acceptsTreatmentDialog.vue 查看文件

@@ -501,9 +501,8 @@ export default {
501 501
     },
502 502
     // 复选框跌倒风险措施
503 503
     precautionchange(){
504
-      console.log('12345566',this.precautionTwo.length);
504
+
505 505
       if(this.precautionTwo.length>0){
506
-        console.log('asdfasdfas',this.precautionTwo.length);
507 506
         this.$refs.receiveTreatmentAsses.clearValidate('precautionTwo');
508 507
       }
509 508
     },
@@ -520,7 +519,7 @@ export default {
520 519
         }
521 520
         var obj = this.arr.join(",");
522 521
       }
523
-      
522
+
524 523
       this.receiveTreatmentAsses.precaution = obj;
525 524
 
526 525
       let ParamsQuery = this.receiveTreatmentAsses;
@@ -610,6 +609,7 @@ export default {
610 609
             if(this.precautionTwo.length<=0){
611 610
               this.isrequired=false
612 611
               return [{ required: true, message: `请输入${name}`,trigger: ['blur','change'] }];
612
+
613 613
             }
614 614
             this.precautionchange()
615 615
             this.isrequired=true

+ 59 - 1
src/xt_pages/dialysis/details/dialog/adviceDialog/AddGroupAdvice.vue 查看文件

@@ -556,6 +556,40 @@
556 556
         </el-button>
557 557
       </div>
558 558
     </el-dialog>
559
+
560
+
561
+    <el-dialog
562
+      title="提示"
563
+      :visible.sync="infoDialogVisible"
564
+      width="30%">
565
+      <span>
566
+        <el-form>
567
+          <el-row>
568
+            <span>申请日期:</span>
569
+            <span>
570
+                <el-date-picker
571
+                  type="datetime"
572
+                  format="yyyy-MM-dd HH:mm"
573
+                  value-format="yyyy-MM-dd HH:mm"
574
+                  placeholder="选择时间"
575
+                  v-model="selected_date"
576
+              ></el-date-picker>
577
+            </span>
578
+          </el-row>
579
+          <el-row>
580
+            <span>备注:</span>
581
+            <span>
582
+                <el-input v-model="remark" style="width:200px"></el-input>
583
+            </span>
584
+          </el-row>
585
+        </el-form>
586
+      
587
+      </span>
588
+      <span slot="footer" class="dialog-footer">
589
+        <el-button @click="infoDialogVisible = false">取 消</el-button>
590
+        <el-button type="primary" @click="saveInformation">确 定</el-button>
591
+      </span>
592
+    </el-dialog>
559 593
   </div>
560 594
 </template>
561 595
 
@@ -570,6 +604,7 @@ import {
570 604
   getDoctorAdviceList,
571 605
   StopDoctorAdvice
572 606
 } from "@/api/advice";
607
+import { saveInformation } from "@/api/dialysis";
573 608
 import { getDataConfig } from '@/utils/data'
574 609
 import {getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
575 610
 import { duration } from 'moment';
@@ -655,6 +690,9 @@ export default {
655 690
       src_type:"",
656 691
       private_drug_config:{},
657 692
       units:[],
693
+      infoDialogVisible:false,
694
+      selected_date:"",
695
+      remark:""
658 696
     };
659 697
   },
660 698
   props: {
@@ -770,6 +808,9 @@ export default {
770 808
             response => {
771 809
               if (response.data.state == 0) {
772 810
                 this.$message.error(response.data.msg);
811
+                if(response.data.code == 600000008){
812
+                 this.infoDialogVisible = true
813
+                }
773 814
                 return false;
774 815
               } else {
775 816
                 this.$notify({
@@ -1559,7 +1600,7 @@ export default {
1559 1600
         }
1560 1601
       }
1561 1602
       
1562
-      if(this.$store.getters.xt_user.org.id == 9671 || this.$store.getters.xt_user.org.id == 9675 || this.$store.getters.xt_user.org.id == 10340){
1603
+      if(this.$store.getters.xt_user.org.id == 9671 || this.$store.getters.xt_user.org.id == 9675 || this.$store.getters.xt_user.org.id == 10340 || this.$store.getters.xt_user.org.id == 10517){
1563 1604
          var date = new Date()
1564 1605
           var year = date.getFullYear()
1565 1606
           var month = date.getMonth() + 1
@@ -1905,6 +1946,23 @@ export default {
1905 1946
            }
1906 1947
          }
1907 1948
          return name
1949
+      },
1950
+    
1951
+    saveInformation(){
1952
+        var params = {
1953
+          selected_date:this.selected_date,
1954
+          patient_id:this.$route.query.patient_id,
1955
+          record_date:this.$route.query.date,
1956
+          module:4,
1957
+          remark:this.remark,
1958
+        }
1959
+        saveInformation(params).then(response=>{
1960
+           if(response.data.state == 1){
1961
+             var information = response.data.data.information
1962
+             this.$message.success("提交成功!")
1963
+             this.infoDialogVisible = false
1964
+           }
1965
+        })
1908 1966
       }
1909 1967
   },
1910 1968
   watch: {

+ 206 - 16
src/xt_pages/dialysis/details/dialog/assessmentBeforeDislysisDialog.vue 查看文件

@@ -416,6 +416,8 @@
416 416
             </el-form-item>
417 417
           </el-col>
418 418
 
419
+        
420
+
419 421
           <el-col :span="8">
420 422
             <el-form-item label="前次透析后症状:" :prop="isName('前次透析后症状')"
421 423
               :rules="isCheckmust('前次透析后症状')" v-if="isShow('前次透析后症状')">
@@ -624,19 +626,105 @@
624 626
               <el-input v-model="body_weight_before" readonly></el-input>
625 627
             </el-form-item>
626 628
           </el-col>
629
+
630
+          <el-col :span="8">
631
+          
632
+            <el-form-item label="导管评估项目: " :prop="isName('导管评估项目')"
633
+              :rules="isCheckmust('导管评估项目')" v-if="isShow('导管评估项目')">
634
+              <el-input v-model="assessmentBeforeDislysis.catheter_evaluation_program" readonly
635
+                        @focus="showInnerDialog('22')"></el-input>
636
+            </el-form-item>
637
+          
638
+          </el-col>
639
+
640
+          <el-col :span="8">
641
+            <el-form-item label="置管部位皮肤:" :prop="isName('置管部位皮肤')"
642
+              :rules="isCheckmust('置管部位皮肤')" v-if="isShow('置管部位皮肤')">
643
+           
644
+              <el-input v-model="assessmentBeforeDislysis.skin_site_catheterization" readonly
645
+                        @focus="showInnerDialog('23')"></el-input>
646
+            </el-form-item>
647
+          </el-col>
627 648
          
649
+          <el-col :span="8">
650
+            <el-form-item label="是否通畅:" :prop="isName('是否通畅')"
651
+              :rules="isCheckmust('是否通畅')" v-if="isShow('是否通畅')">
652
+              <el-select v-model="assessmentBeforeDislysis.whether_unobstructed" @change="changeThrombus">
653
+                <el-option :key="0" label="请选择" :value="0"></el-option>
654
+                <el-option label="是" value="1"></el-option>
655
+                <el-option label="否" value="2"></el-option>
656
+              </el-select>
657
+            </el-form-item>
658
+          </el-col>
628 659
         
629
- 
630
-         
631
-          <el-col :span="24">
632
-            <el-form-item label="备注: " :prop="isName('备注')"
633
-              :rules="isCheckmust('备注')">
634
-              <el-input type="textarea" v-model="assessmentBeforeDislysis.remark" :rows="5"></el-input>
660
+          <el-col :span="8">
661
+            <el-form-item label="留置必要:" :prop="isName('留置必要')"
662
+              :rules="isCheckmust('留置必要')" v-if="isShow('留置必要')">
663
+              <el-select v-model="assessmentBeforeDislysis.lien_necessary" @change="changeThrombus">
664
+                <el-option :key="0" label="请选择" :value="0"></el-option>
665
+                <el-option label="是" value="1"></el-option>
666
+                <el-option label="否" value="2"></el-option>
667
+              </el-select>
668
+            </el-form-item>
669
+          </el-col>
670
+
671
+          <el-col :span="8">
672
+            <el-form-item label="通路形成时间:" :prop="isName('通路形成时间')"
673
+              :rules="isCheckmust('通路形成时间')" v-if="isShow('通路形成时间')">
674
+              <el-date-picker
675
+              v-model="assessmentBeforeDislysis.pathway_formation_time"
676
+              type="date"
677
+              style="width:200px"
678
+              format="yyyy-MM-dd"
679
+              value-format="yyyy-MM-dd"
680
+              placeholder="通路形成时间">
681
+              </el-date-picker>
635 682
             </el-form-item>
636 683
           </el-col>
637 684
          
638
-      
685
+        
639 686
         </el-row>
687
+        <el-row :gutter="20">
688
+          <el-col :span="24" v-if="isShow('透前症状')">
689
+              <el-form-item
690
+                label="透前症状:"
691
+                :prop="isName('透前症状')"
692
+                :rules="isCheckmust('透前症状')"
693
+              >
694
+                <el-select @change="dialysisSummarySelectChange" v-model="value2">
695
+                  <el-option
696
+                    v-for="(item, index) in summary"
697
+                    :label="item.text"
698
+                    :value="item.value"
699
+                    :key="index"
700
+                  ></el-option>
701
+                </el-select>
702
+              </el-form-item>
703
+            </el-col>
704
+            <el-col v-if="isShow('透前症状')">
705
+              <el-form-item
706
+                :prop="isName('透前症状')"
707
+                :rules="isCheckmust('透前症状')"
708
+              >
709
+                <el-input
710
+                  type="textarea"
711
+                  v-model="assessmentBeforeDislysis.befor_symptoms"
712
+                  :rows="4"
713
+                ></el-input>
714
+              </el-form-item>
715
+            </el-col>
716
+          
717
+              
718
+            
719
+              <el-col :span="24">
720
+                <el-form-item label="备注: " :prop="isName('备注')"
721
+                  :rules="isCheckmust('备注')">
722
+                  <el-input type="textarea" v-model="assessmentBeforeDislysis.remark" :rows="5"></el-input>
723
+                </el-form-item>
724
+              </el-col>
725
+            
726
+          
727
+            </el-row>
640 728
 
641 729
 
642 730
       </el-form>
@@ -748,7 +836,7 @@
748 836
   import { parseTime } from '@/utils'
749 837
 
750 838
   import request from '@/utils/request'
751
-
839
+  const moment = require('moment')
752 840
   export default {
753 841
     components: {
754 842
       multiSelectBox
@@ -866,7 +954,12 @@
866 954
           age:"",
867 955
           his_department:"",
868 956
           his_bed:"",
869
-          point_puncture:""
957
+          point_puncture:"",
958
+          catheter_evaluation_program:"",
959
+          skin_site_catheterization:"",
960
+          pathway_formation_time:"",
961
+          lien_necessary:"",
962
+          befor_symptoms:"",
870 963
         },
871 964
 
872 965
         InnerDialogProps: {
@@ -887,8 +980,11 @@
887 980
         point_punctures:[],
888 981
         infoDialogVisible:false,
889 982
         selected_date:"",
890
-        remark:""
891
-
983
+        remark:"",
984
+        catheter_evaluation_program_list:[],
985
+        skin_site_catheterization_list:[],
986
+        summary:[],
987
+        value2:""
892 988
       }
893 989
     },
894 990
     props: {
@@ -994,13 +1090,18 @@
994 1090
         return false
995 1091
       },
996 1092
 
997
-      show(assessment, lastDryWeightDislysis,last_predialysis_evaluation) {
1093
+      show(assessment, lastDryWeightDislysis,last_predialysis_evaluation,lastAssessment,record_date) {
998 1094
         console.log("dryWeightList",this.dryWeightList)
999 1095
         console.log("doclist",this.docList)
1000 1096
         let filedList = store.getters.xt_user.fileds;
1001 1097
         console.log(filedList,'filedList')
1002 1098
         this.lastPredialysisEvaluation = last_predialysis_evaluation
1003 1099
         console.log("获取上次数据",this.lastPredialysisEvaluation, this.$store.getters.xt_user.org.id )
1100
+
1101
+        if(record_date!=null && record_date!=undefined){
1102
+           this.record_date = record_date
1103
+        }
1104
+        console.log("日期23333333333我",this.record_date)
1004 1105
         if(this.lastPredialysisEvaluation != null) {
1005 1106
         // if(this.lastPredialysisEvaluation.remark == "" && this.$store.getters.xt_user.org.id == 10307){
1006 1107
         //     console.log("2o2o3232o23o2o3o23")
@@ -1042,6 +1143,24 @@
1042 1143
          
1043 1144
         }
1044 1145
 
1146
+        this.assessmentBeforeDislysis.pathway_formation_time = moment(new Date()).format('YYYY-MM-DD')
1147
+        console.log(" this.assessmentBeforeDislysis.pathway_formation_time", moment(new Date()).format('YYYY-MM-DD'))
1148
+        console.log("hhahhahahah",assessment)
1149
+        if(assessment!=null){
1150
+          this.assessmentBeforeDislysis.pathway_formation_time =  this.getTimeOne(assessment.pathway_formation_time)
1151
+          if(assessment.whether_unobstructed >0){
1152
+            this.assessmentBeforeDislysis.whether_unobstructed = assessment.whether_unobstructed.toString()
1153
+          } 
1154
+          if(assessment.lien_necessary>0){
1155
+            this.assessmentBeforeDislysis.lien_necessary = assessment.lien_necessary.toString()
1156
+          }
1157
+        }
1158
+      
1159
+
1160
+        
1161
+         
1162
+        
1163
+
1045 1164
 
1046 1165
         this.assessment = assessment
1047 1166
         this.getPermission()
@@ -1313,6 +1432,26 @@
1313 1432
             this.InnerDialogProps.isShowTextArea = false
1314 1433
 
1315 1434
             break
1435
+
1436
+            case '22': // 导管评估项目
1437
+
1438
+              this.InnerDialogProps.values = this.catheter_evaluation_program_list
1439
+              this.InnerDialogProps.titles = '导管评估项目'
1440
+              this.InnerDialogProps.type = 'catheter_evaluation_program'
1441
+              this.InnerDialogProps.selected = this.assessmentBeforeDislysis.catheter_evaluation_program
1442
+              this.InnerDialogProps.isShowTextArea = false
1443
+
1444
+            break
1445
+
1446
+            case '23': // 置管部位皮肤
1447
+
1448
+              this.InnerDialogProps.values = this.skin_site_catheterization_list
1449
+              this.InnerDialogProps.titles = '置管部位皮肤'
1450
+              this.InnerDialogProps.type = 'skin_site_catheterization'
1451
+              this.InnerDialogProps.selected = this.assessmentBeforeDislysis.skin_site_catheterization
1452
+              this.InnerDialogProps.isShowTextArea = false
1453
+
1454
+            break
1316 1455
          
1317 1456
         }
1318 1457
       },
@@ -1386,12 +1525,20 @@
1386 1525
            case 'point_puncture':
1387 1526
             this.assessmentBeforeDislysis.point_puncture = val.value.join(',')
1388 1527
             break
1528
+           case 'catheter_evaluation_program':
1529
+            this.assessmentBeforeDislysis.catheter_evaluation_program = val.value.join(',')
1530
+            break
1531
+          case 'skin_site_catheterization':
1532
+            this.assessmentBeforeDislysis.skin_site_catheterization = val.value.join(',')
1533
+            break
1534
+            
1389 1535
         }
1390 1536
       },
1391 1537
       innerDialogCancle: function() {
1392 1538
         this.InnerDialogProps.visibility = false
1393 1539
       }, 
1394 1540
       handleComfirm(formName) {
1541
+        console.log("提交日期",this.record_date)
1395 1542
         var arr = this.assessmentBeforeDislysis
1396 1543
         for (let i = 0; i < this.machineType.length; i++) {
1397 1544
           if (arr.machine_type == this.machineType[i].id) {
@@ -1420,6 +1567,9 @@
1420 1567
           }
1421 1568
         }
1422 1569
          console.log("params",ParamsQuery)
1570
+
1571
+         ParamsQuery.whether_unobstructed = parseInt(ParamsQuery.whether_unobstructed)
1572
+         ParamsQuery.lien_necessary =  parseInt(ParamsQuery.lien_necessary)
1423 1573
          
1424 1574
         postAssessmentBeforeDislysis(ParamsQuery).then(response => {
1425 1575
           
@@ -1569,17 +1719,47 @@
1569 1719
           selected_date:this.selected_date,
1570 1720
           patient_id:this.$route.query.patient_id,
1571 1721
           record_date:this.$route.query.date,
1572
-          module:2,
1722
+          module:3,
1573 1723
           remark:this.remark,
1574 1724
         }
1575 1725
         saveInformation(params).then(response=>{
1576 1726
            if(response.data.state == 1){
1577 1727
              var information = response.data.data.information
1578
-             this.$message.success("审核成功!")
1728
+             this.$message.success("提交成功!")
1579 1729
              this.infoDialogVisible = false
1580 1730
            }
1581 1731
         })
1732
+      },
1733
+      getTimeOne(val) {
1734
+        if(val == ""){
1735
+        return ""
1736
+        }else {
1737
+        return uParseTime(val, '{y}-{m}-{d}')
1738
+        }
1739
+     },
1740
+     dialysisSummarySelectChange: function (values) {
1741
+   
1742
+      if (this.assessmentBeforeDislysis.befor_symptoms == "") {
1743
+        this.assessmentBeforeDislysis.befor_symptoms = values;
1744
+      } else {
1745
+       
1746
+        if (this.assessmentBeforeDislysis.befor_symptoms.indexOf(values) == -1) {
1747
+          if (
1748
+            this.assessmentBeforeDislysis.befor_symptoms
1749
+              .charAt(this.assessmentBeforeDislysis.befor_symptoms.length - 1)
1750
+              .indexOf("。") == -1
1751
+          ) {
1752
+            this.assessmentBeforeDislysis.befor_symptoms =
1753
+            this.assessmentBeforeDislysis.befor_symptoms+ "," + values;
1754
+          } else {
1755
+            this.assessmentBeforeDislysis.befor_symptoms =
1756
+            this.assessmentBeforeDislysis.befor_symptoms+ "," + values;
1757
+            this.assessmentBeforeDislysis.befor_symptoms =
1758
+            this.assessmentBeforeDislysis.befor_symptoms + values;
1759
+          }
1760
+        }
1582 1761
       }
1762
+    },
1583 1763
       
1584 1764
     },
1585 1765
     created() {
@@ -1615,10 +1795,19 @@
1615 1795
       console.log("针眼",this.pinholings)
1616 1796
       this.catheter_maintenancelist = getDataConfig('hemodialysis','catheter_maintenance')
1617 1797
       console.log("导管维护",this.catheter_maintenancelist)
1798
+
1799
+      this.catheter_evaluation_program_list = getDataConfig('hemodialysis','catheter_evaluation_program')
1800
+
1801
+      this.skin_site_catheterization_list = getDataConfig('hemodialysis','skin_site_catheterization')
1618 1802
        
1619 1803
       console.log("predialysis_evaluation2332323323222323",this.predialysis_evaluation)
1620 1804
 
1621 1805
       this.point_punctures = getDataConfig('hemodialysis','point_puncture')
1806
+
1807
+      this.summary = getDataConfig("befor_symptoms", "befor_symptoms");
1808
+      
1809
+      console.log("hhh32h323h23h23h23h23h23h",getDataConfig("befor_symptoms", "befor_symptoms"))
1810
+      
1622 1811
       // this.weight_adjust.weight = this.dry_weight.dry_weight
1623 1812
 
1624 1813
       // if(this.predialysis_evaluation.id == 0){
@@ -1639,12 +1828,12 @@
1639 1828
 
1640 1829
       },
1641 1830
       'predialysis_evaluation.id': function() {
1642
-         
1831
+        console.log("hhahahahhaah",this.predialysis_evaluation)
1643 1832
        if(this.predialysis_evaluation.thromubus_type == 1){
1644 1833
              this.predialysis_evaluation.thromubus_type = this.predialysis_evaluation.thromubus_type.toString()
1645 1834
              this.thrombuShow = true
1646 1835
         }
1647
-
1836
+       
1648 1837
         if (this.predialysis_evaluation.id > 0) {
1649 1838
           for (var index in this.assessmentBeforeDislysis) {
1650 1839
             this.assessmentBeforeDislysis[index] = this.predialysis_evaluation[index]
@@ -1693,6 +1882,7 @@
1693 1882
           if (this.predialysis_evaluation['pulse_frequency'] == 0) {
1694 1883
             this.assessmentBeforeDislysis['pulse_frequency'] = ''
1695 1884
           }
1885
+          
1696 1886
         }
1697 1887
       },
1698 1888
       'assessmentBeforeDislysis.weight_before': {

+ 4 - 5
src/xt_pages/dialysis/details/dialog/computer_dialog.vue 查看文件

@@ -952,8 +952,7 @@ export default {
952 952
       ParamsQuery["puncture_nurse"] = this.form.puncture_nurse_id;
953 953
       ParamsQuery["washpipe_nurse"] = this.form.washpipe_nurse;
954 954
       ParamsQuery["change_nurse"] = this.form.change_nurse;
955
-      ParamsQuery["difficult_puncture_nurse"] =
956
-        this.form.difficult_puncture_nurse;
955
+      ParamsQuery["difficult_puncture_nurse"] =this.form.difficult_puncture_nurse;
957 956
       ParamsQuery["new_fistula_nurse"] = this.form.new_fistula_nurse;
958 957
       ParamsQuery["blood_drawing"] = this.form.blood_drawing;
959 958
       ParamsQuery["quality_nurse"] = this.form.quality_nurse_id;
@@ -984,7 +983,7 @@ export default {
984 983
           }
985 984
         } else {
986 985
           this.$message.error(resp.msg);
987
-          if(response.data.code == 600000008){
986
+          if(resp.code == 600000008){
988 987
             this.infoDialogVisible = true
989 988
           }
990 989
         }
@@ -1146,13 +1145,13 @@ export default {
1146 1145
           selected_date:this.selected_date,
1147 1146
           patient_id:this.$route.query.patient_id,
1148 1147
           record_date:this.$route.query.date,
1149
-          module:2,
1148
+          module:6,
1150 1149
           remark:this.remark,
1151 1150
         }
1152 1151
         saveInformation(params).then(response=>{
1153 1152
            if(response.data.state == 1){
1154 1153
              var information = response.data.data.information
1155
-             this.$message.success("审核成功!")
1154
+             this.$message.success("提交成功!")
1156 1155
              this.infoDialogVisible = false
1157 1156
            }
1158 1157
         })

+ 99 - 59
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue 查看文件

@@ -10,13 +10,16 @@
10 10
         >
11 11
             <el-button style="position: absolute;left: 12%;top: 2%" @click="handlePatientInfo">{{ patient.name }}</el-button>
12 12
             <span style="position: absolute;left: 22%;top: 3%">
13
-              透前体重: --kg
13
+              透前体重:{{predialysis&&predialysis.weight_before?predialysis.weight_before:"" }} kg
14 14
             </span>
15 15
             <span style="position: absolute;left: 35%;top: 3%">
16
-              干体重:--kg
16
+              干体重:{{predialysis&&predialysis.dry_weight?predialysis.dry_weight:""}}kg
17 17
             </span>
18
+            <!-- <span style="position: absolute;left: 48%;top: 3%">
19
+              衣物重:{{predialysis&&predialysis.additional_weight?predialysis.additional_weight:""}}kg
20
+            </span> -->
18 21
             <span style="position: absolute;left: 48%;top: 3%">
19
-              衣物重:--kg
22
+              上次透后体重:{{last_record&&last_record.weight_after?last_record.weight_after:""}}kg
20 23
             </span>
21 24
             <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
22 25
             <el-form
@@ -137,6 +140,14 @@
137 140
                         </el-form-item>
138 141
                     </el-col>
139 142
 
143
+                    <el-col :span="8"
144
+                            v-if="isShows('加糖')">
145
+                        <el-form-item label="加糖:" prop="prescription_water" :rules="isCheckmust('加糖')">
146
+                            <el-input v-model="dialysisPrescription.chaptalization"
147
+                            ></el-input>
148
+                        </el-form-item>
149
+                    </el-col>
150
+
140 151
                    <el-col :span="8" v-if="isShows('带水上机')">
141 152
                         <el-form-item label="带水上机:" prop="water_machine" :rules="isCheckmust('带水上机')">
142 153
                            <el-select v-model="dialysisPrescription.water_machine">
@@ -1661,6 +1672,7 @@
1661 1672
           sodium_bicarbonate_flow:"",
1662 1673
           prescription_water:"",
1663 1674
           dialysis_strainer:"",
1675
+          chaptalization:"",
1664 1676
         },
1665 1677
 
1666 1678
         anticoagulant: {
@@ -1709,7 +1721,9 @@
1709 1721
         zongliang:"",
1710 1722
         educationList:[],
1711 1723
         value:"",
1712
-        infoDialogVisible:false
1724
+        infoDialogVisible:false,
1725
+        selected_date:"",
1726
+        remark:"",
1713 1727
       }
1714 1728
 
1715 1729
     },
@@ -2480,7 +2494,7 @@ mu
2480 2494
           if (minites < 10) {
2481 2495
             minites = '0' + minites
2482 2496
           }
2483
-          if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10121 || this.$store.getters.xt_user.org.id == 4 || this.$store.getters.xt_user.org.id == 10013 || this.$store.getters.xt_user.org.id == 10014 ) {
2497
+          if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10121 || this.$store.getters.xt_user.org.id == 4 || this.$store.getters.xt_user.org.id == 10013 || this.$store.getters.xt_user.org.id == 10014 ||  this.$store.getters.xt_user.org.id == 9970) {
2484 2498
             this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
2485 2499
           }else if(this.$store.getters.xt_user.org.id == 10234 || this.$store.getters.xt_user.org.id == 9990 || this.$store.getters.xt_user.org.id==10432){
2486 2500
             if (schedual.schedule_type == 1) {
@@ -2538,6 +2552,14 @@ mu
2538 2552
             } else if (schedual.schedule_type == 3) {
2539 2553
               this.start_time = year + '-' + month + '-' + day + ' ' + '15:00'
2540 2554
             }
2555
+           }else if(this.$store.getters.xt_user.org.id == 10517){
2556
+              if (schedual.schedule_type == 1) {
2557
+              this.start_time = year + '-' + month + '-' + day + ' ' + '7:00'
2558
+            } else if (schedual.schedule_type == 2) {
2559
+              this.start_time = year + '-' + month + '-' + day + ' ' + '11:00'
2560
+            } else if (schedual.schedule_type == 3) {
2561
+              this.start_time = year + '-' + month + '-' + day + ' ' + '15:00'
2562
+            }
2541 2563
            } else {
2542 2564
             if (schedual.schedule_type == 1) {
2543 2565
               this.start_time = year + '-' + month + '-' + day + ' ' + '07:00'
@@ -2631,6 +2653,7 @@ mu
2631 2653
             this.dialysisPrescription.package = last.package
2632 2654
             this.dialysisPrescription.a_liquid = last.a_liquid
2633 2655
             this.zongliang = last.anticoagulant_zongliang
2656
+            this.dialysisPrescription.chaptalization = last.chaptalization
2634 2657
             if(this.$store.getters.xt_user.template_info.org_id!=10013  && this.$store.getters.xt_user.template_info.org_id!=10014){
2635 2658
               this.remark = last.remark
2636 2659
             }
@@ -2756,24 +2779,24 @@ mu
2756 2779
               this.dialysisPrescription.anticoagulant_shouji = '0'
2757 2780
               this.dialysisPrescription.anticoagulant_zongliang = '0'
2758 2781
             }
2759
-            if (this.$store.getters.xt_user.template_info.template_id == 6) {
2760
-              if (this.dialysisPrescription.mode_id == 2) {
2761
-                if (
2762
-                  this.dialysisPrescription.displace_liqui_part == 0 ||
2763
-                  this.dialysisPrescription.displace_liqui_part == -2 ||
2764
-                  this.dialysisPrescription.displace_liqui_value == 0 ||
2765
-                  this.dialysisPrescription.displace_liqui_value == ''
2766
-                  || this.dialysisPrescription.replacement_total == 0 ||
2767
-                  this.dialysisPrescription.replacement_total == '' ||
2768
-                  this.dialysisPrescription.displace_speed == 0 ||
2769
-                  this.dialysisPrescription.displace_speed == ''
2770
-                ) {
2771
-                  this.$message.error('HDF模式下置换液和置换液总量不能为空!')
2772
-                  return
2773
-                }
2774
-              }
2775
-
2776
-            }
2782
+            // if (this.$store.getters.xt_user.template_info.template_id == 6) {
2783
+            //   if (this.dialysisPrescription.mode_id == 2) {
2784
+            //     if (
2785
+            //       this.dialysisPrescription.displace_liqui_part == 0 ||
2786
+            //       this.dialysisPrescription.displace_liqui_part == -2 ||
2787
+            //       this.dialysisPrescription.displace_liqui_value == 0 ||
2788
+            //       this.dialysisPrescription.displace_liqui_value == ''
2789
+            //       || this.dialysisPrescription.replacement_total == 0 ||
2790
+            //       this.dialysisPrescription.replacement_total == '' ||
2791
+            //       this.dialysisPrescription.displace_speed == 0 ||
2792
+            //       this.dialysisPrescription.displace_speed == ''
2793
+            //     ) {
2794
+            //       this.$message.error('HDF模式下置换液和置换液总量不能为空!')
2795
+            //       return
2796
+            //     }
2797
+            //   }
2798
+
2799
+            // }
2777 2800
             if(this.dialysisPrescription.mode_id!=2 && this.dialysisPrescription.mode_id!=5 && this.dialysisPrescription.mode_id!=12){
2778 2801
               this.dialysisPrescription.displace_liqui_part = 0
2779 2802
               this.dialysisPrescription.displace_liqui_value = 0
@@ -3298,35 +3321,35 @@ mu
3298 3321
                 this.dialysisPrescription.anticoagulant_shouji = '0'
3299 3322
                 this.dialysisPrescription.anticoagulant_zongliang = '0'
3300 3323
               }
3301
-              if (this.$store.getters.xt_user.template_info.template_id == 6) {
3302
-                if (this.dialysisPrescription.mode_id == 2) {
3303
-                  if (
3304
-                    this.dialysisPrescription.displace_liqui_part == 0 ||
3305
-                    this.dialysisPrescription.displace_liqui_part == -2 ||
3306
-                    this.dialysisPrescription.displace_liqui_value == 0 ||
3307
-                    this.dialysisPrescription.displace_liqui_value == ''
3308
-                    || this.dialysisPrescription.replacement_total == 0 ||
3309
-                    this.dialysisPrescription.replacement_total == ''||
3310
-                    this.dialysisPrescription.displace_speed == 0 ||
3311
-                    this.dialysisPrescription.displace_speed == ''
3312
-                  ) {
3313
-                    this.$message.error('HDF模式下置换液和置换液总量不能为空!')
3314
-                    return
3315
-                  }
3316
-                }
3317
-                if(this.dialysisPrescription.mode_id!=2 && this.dialysisPrescription.mode_id!=5 && this.dialysisPrescription.mode_id!=12){
3318
-                  this.dialysisPrescription.displace_liqui_part == 0
3319
-                  this.dialysisPrescription.displace_liqui_value == 0
3320
-                  this.dialysisPrescription.replacement_total == 0
3321
-                  this.dialysisPrescription.displace_speed == 0
3322
-                  console.log('this.dialysisPrescription.displace_liqui_part',this.dialysisPrescription.displace_liqui_part);
3323
-                  console.log('this.dialysisPrescription.replacement_total',this.dialysisPrescription.replacement_total);
3324
-                  // this.dialysisPrescription.displace_liqui_part = 0
3325
-                  // this.dialysisPrescription.displace_liqui_value = 0
3326
-                  // this.dialysisPrescription.replacement_total = 0
3327
-                  // this.dialysisPrescription.displace_speed = 0
3328
-                }
3329
-              }
3324
+              // if (this.$store.getters.xt_user.template_info.template_id == 6) {
3325
+              //   if (this.dialysisPrescription.mode_id == 2) {
3326
+              //     if (
3327
+              //       this.dialysisPrescription.displace_liqui_part == 0 ||
3328
+              //       this.dialysisPrescription.displace_liqui_part == -2 ||
3329
+              //       this.dialysisPrescription.displace_liqui_value == 0 ||
3330
+              //       this.dialysisPrescription.displace_liqui_value == ''
3331
+              //       || this.dialysisPrescription.replacement_total == 0 ||
3332
+              //       this.dialysisPrescription.replacement_total == ''||
3333
+              //       this.dialysisPrescription.displace_speed == 0 ||
3334
+              //       this.dialysisPrescription.displace_speed == ''
3335
+              //     ) {
3336
+              //       this.$message.error('HDF模式下置换液和置换液总量不能为空!')
3337
+              //       return
3338
+              //     }
3339
+              //   }
3340
+              //   if(this.dialysisPrescription.mode_id!=2 && this.dialysisPrescription.mode_id!=5 && this.dialysisPrescription.mode_id!=12){
3341
+              //     this.dialysisPrescription.displace_liqui_part == 0
3342
+              //     this.dialysisPrescription.displace_liqui_value == 0
3343
+              //     this.dialysisPrescription.replacement_total == 0
3344
+              //     this.dialysisPrescription.displace_speed == 0
3345
+              //     console.log('this.dialysisPrescription.displace_liqui_part',this.dialysisPrescription.displace_liqui_part);
3346
+              //     console.log('this.dialysisPrescription.replacement_total',this.dialysisPrescription.replacement_total);
3347
+              //     // this.dialysisPrescription.displace_liqui_part = 0
3348
+              //     // this.dialysisPrescription.displace_liqui_value = 0
3349
+              //     // this.dialysisPrescription.replacement_total = 0
3350
+              //     // this.dialysisPrescription.displace_speed = 0
3351
+              //   }
3352
+              // }
3330 3353
 
3331 3354
           this.is_pre = 2
3332 3355
 
@@ -3711,13 +3734,13 @@ mu
3711 3734
                             advice_doctor: this.waitUploadAdvices[0].advice_doctor,
3712 3735
                             advice_type: this.waitUploadAdvices[0].advice_type,
3713 3736
                             parent_id: this.patient_id,
3714
-                            // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
3715
-                            start_time:
3716
-                              uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
3717
-                              ' ' +
3718
-                              hour +
3719
-                              ':' +
3720
-                              minute,
3737
+                            start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
3738
+                            // start_time:
3739
+                            //   uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
3740
+                            //   ' ' +
3741
+                            //   hour +
3742
+                            //   ':' +
3743
+                            //   minute,
3721 3744
 
3722 3745
                             remark: ''
3723 3746
                           }
@@ -4265,6 +4288,23 @@ mu
4265 4288
       }
4266 4289
     }
4267 4290
     },
4291
+
4292
+    saveInformation(){
4293
+      var params = {
4294
+        selected_date:this.selected_date,
4295
+        patient_id:this.$route.query.patient_id,
4296
+        record_date:this.$route.query.date,
4297
+        module:1,
4298
+        remark:this.remark,
4299
+      }
4300
+      saveInformation(params).then(response=>{
4301
+          if(response.data.state == 1){
4302
+            var information = response.data.data.information
4303
+            this.$message.success("提交成功!")
4304
+            this.infoDialogVisible = false
4305
+          }
4306
+      })
4307
+     }
4268 4308
   },
4269 4309
 
4270 4310
     watch: {

+ 17 - 16
src/xt_pages/dialysis/details/dialog/doubleCheckDialog.vue 查看文件

@@ -1299,6 +1299,22 @@ export default {
1299 1299
         }
1300 1300
       });
1301 1301
     },
1302
+    saveInformation(){
1303
+        var params = {
1304
+          selected_date:this.selected_date,
1305
+          patient_id:this.$route.query.patient_id,
1306
+          record_date:this.$route.query.date,
1307
+          module:5,
1308
+          remark:this.remark,
1309
+        }
1310
+        saveInformation(params).then(response=>{
1311
+           if(response.data.state == 1){
1312
+             var information = response.data.data.information
1313
+             this.$message.success("提交成功!")
1314
+             this.infoDialogVisible = false
1315
+           }
1316
+        })
1317
+      }
1302 1318
   },
1303 1319
 
1304 1320
   props: {
@@ -1889,22 +1905,7 @@ export default {
1889 1905
       }
1890 1906
     },
1891 1907
 
1892
-   saveInformation(){
1893
-        var params = {
1894
-          selected_date:this.selected_date,
1895
-          patient_id:this.$route.query.patient_id,
1896
-          record_date:this.$route.query.date,
1897
-          module:5,
1898
-          remark:this.remark,
1899
-        }
1900
-        saveInformation(params).then(response=>{
1901
-           if(response.data.state == 1){
1902
-             var information = response.data.data.information
1903
-             this.$message.success("审核成功!")
1904
-             this.infoDialogVisible = false
1905
-           }
1906
-        })
1907
-      }
1908
+  
1908 1909
   },
1909 1910
   created() {
1910 1911
     var date = this.$route.query && this.$route.query.date;

+ 4 - 4
src/xt_pages/dialysis/details/dialog/finish_dialog.vue 查看文件

@@ -478,7 +478,7 @@
478 478
 
479 479
               } else {
480 480
                 this.$message.error(resp.msg)
481
-               if(response.data.code == 600000008){
481
+               if(response.code == 600000008){
482 482
                   this.infoDialogVisible = true
483 483
                 }
484 484
               }
@@ -577,14 +577,14 @@
577 577
           selected_date:this.selected_date,
578 578
           patient_id:this.$route.query.patient_id,
579 579
           record_date:this.$route.query.date,
580
-          module:1,
580
+          module:8,
581 581
           remark:this.remark,
582 582
         }
583
-        console.log("params32222222222----",params)
583
+      
584 584
         saveInformation(params).then(response=>{
585 585
            if(response.data.state == 1){
586 586
              var information = response.data.data.information
587
-             this.$message.success("审核成功!")
587
+             this.$message.success("提交成功!")
588 588
              this.infoDialogVisible = false
589 589
            }
590 590
         })

+ 14 - 7
src/xt_pages/dialysis/details/dialog/monitor_dialog.vue 查看文件

@@ -363,7 +363,8 @@
363 363
                 org_id == 10432 ||
364 364
                 org_id == 10445 ||
365 365
                 org_id == 10410 ||
366
-                org_id == 10495)
366
+                org_id == 10495 
367
+                || org_id == 10485)
367 368
                 && org_id!=10387
368 369
             "
369 370
           >
@@ -414,7 +415,8 @@
414 415
               template_id != 60 &&
415 416
               org_id!=10432 &&
416 417
               org_id!=10445 &&
417
-              org_id!=10410 && org_id!=10495) ||
418
+              org_id!=10410 && org_id!=10495
419
+              && org_id!=10485) ||
418 420
               org_id == 10387
419 421
             "
420 422
           >
@@ -536,6 +538,7 @@
536 538
               ((template_id == 6 &&
537 539
                 org_id != 9919 &&
538 540
                 org_id != 10191 &&
541
+                org_id!=10478 &&
539 542
                 template_id != 43 &&
540 543
                 template_id != 47) ||
541 544
                 org_id == 9779 ||
@@ -568,7 +571,7 @@
568 571
             width="100"
569 572
             v-if="
570 573
               isShow('置换量') &&
571
-              (template_id != 6 || org_id == 9919 || org_id == 10191) &&
574
+              (template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478) &&
572 575
               template_id != 9779 &&
573 576
               template_id != 11 &&
574 577
               template_id != 20 &&
@@ -1132,7 +1135,8 @@
1132 1135
                 template_id == 60 ||
1133 1136
                 org_id== 10432 ||
1134 1137
                 org_id== 10445 ||
1135
-                org_id== 10410) &&
1138
+                org_id== 10410 ||
1139
+                org_id == 10485) &&
1136 1140
                 org_id!=10387
1137 1141
             "
1138 1142
           >
@@ -1177,7 +1181,8 @@
1177 1181
               template_id != 60 &&
1178 1182
               org_id!=10432 &&
1179 1183
               org_id!=10445 &&
1180
-              org_id!=10410)
1184
+              org_id!=10410 &&
1185
+              org_id!=10485)
1181 1186
               || org_id == 10387
1182 1187
             "
1183 1188
           >
@@ -2440,6 +2445,8 @@ export default {
2440 2445
         this.form.filter_pressure = monitor.filter_pressure
2441 2446
         ? monitor.filter_pressure
2442 2447
         : "";
2448
+        this.form.replacement_speed = monitor.replacement_speed?monitor.replacement_speed:""
2449
+        this.form.dicarbonate = monitor.dicarbonate?monitor.dicarbonate:""
2443 2450
         // 设置三个下拉框的值,直接调用事件偷懒
2444 2451
         this.symptomTextareaBlur();
2445 2452
         this.disposeTextareaBlur();
@@ -2754,7 +2761,7 @@ export default {
2754 2761
                 : parseFloat(this.form.heparin_amount);
2755 2762
             this.$message.error(resp.msg);
2756 2763
             if(resp.code == 600000008){
2757
-              this.infoDialogVisible = false
2764
+              this.infoDialogVisible = true
2758 2765
             }
2759 2766
           }
2760 2767
         }
@@ -2918,7 +2925,7 @@ export default {
2918 2925
         saveInformation(params).then(response=>{
2919 2926
            if(response.data.state == 1){
2920 2927
              var information = response.data.data.information
2921
-             this.$message.success("审核成功!")
2928
+             this.$message.success("提交成功!")
2922 2929
              this.infoDialogVisible = false
2923 2930
            }
2924 2931
         })

+ 261 - 4
src/xt_pages/dialysis/details/dialog/treatmentSummaryDialog.vue 查看文件

@@ -59,7 +59,9 @@
59 59
           </el-form-item>
60 60
         </el-col>
61 61
       </el-row>
62
+      <el-button type="primary" size="small" @click="autoClick" style="margin-top: 5px;margin-bottom: 5px;" v-if="org_id ==9671 || org_id==10440 || org_id == 10495">自动生成</el-button>
62 63
       <el-row :gutter="20">
64
+
63 65
         <el-col v-if="isShow('透析小结')">
64 66
           <el-form-item
65 67
             :prop="isName('透析小结')"
@@ -219,6 +221,42 @@ export default {
219 221
         return { id: 0 };
220 222
       },
221 223
     },
224
+    prescription:{
225
+      type:Object,
226
+      default: () => {
227
+        return { id: 0 };
228
+      },
229
+    },
230
+    predialysis_evaluation:{
231
+      type:Object,
232
+      default: () => {
233
+        return { id: 0 };
234
+      },
235
+    },
236
+    doctor_advices:{
237
+      type:Array,
238
+      default: () => {
239
+        return { id: 0 };
240
+      },
241
+    },
242
+    dialysis_order:{
243
+      type:Object,
244
+      default: () => {
245
+        return { id: 0 };
246
+      },
247
+    },
248
+    monitors:{
249
+      type:Array,
250
+      default: () => {
251
+        return { id: 0 };
252
+      },
253
+    },
254
+    assessment_after_dislysis:{
255
+      type:Object,
256
+      default: () => {
257
+        return { id: 0 };
258
+      },
259
+    }
222 260
   },
223 261
   data() {
224 262
     return {
@@ -254,7 +292,8 @@ export default {
254 292
           return time.getTime() > Date.now()
255 293
         }
256 294
       },
257
-      remark:""
295
+      remark:"",
296
+      org_id:0,
258 297
     };
259 298
   },
260 299
   methods: {
@@ -486,18 +525,234 @@ export default {
486 525
           selected_date:this.selected_date,
487 526
           patient_id:this.$route.query.patient_id,
488 527
           record_date:this.$route.query.date,
489
-          module:1,
528
+          module:10,
490 529
           remark:this.remark,
491 530
         }
492 531
        
493 532
       saveInformation(params).then(response=>{
494 533
            if(response.data.state == 1){
495 534
              var information = response.data.data.information
496
-             this.$message.success("审核成功!")
535
+             this.$message.success("提交成功!")
497 536
              this.infoDialogVisible = false
498 537
            }
499 538
         })
500
-     }
539
+     },
540
+     autoClick(){
541
+      var str_one = ""
542
+      if(this.dialysis_order!=null){
543
+        if(this.dialysis_order.puncture_nurse_id >0){
544
+          str_one = "护士穿刺成功!"
545
+        }
546
+      }
547
+    
548
+      var total =0 
549
+      if(this.predialysis_evaluation!=null){
550
+        total = (this.predialysis_evaluation.weight_before - this.predialysis_evaluation.dry_weight).toFixed(1)
551
+      }
552
+  
553
+
554
+      var monitor_one =[]
555
+      var monitor_two = []
556
+      var monitor_three = []
557
+
558
+      if(this.monitors!=null && this.monitors.length > 0){
559
+        var monitor_one =  this.monitors.sort(function (a,b) {
560
+     	     return b.systolic_bp - a.systolic_bp
561
+        })
562
+        var monitor_two =  this.monitors.sort(function (a,b) {
563
+           return b.diastolic_bp - a.diastolic_bp
564
+        })
565
+
566
+        var monitor_three = this.monitors.sort(function (a,b) {
567
+              return b.pulse_frequency - a.pulse_frequency
568
+        })
569
+
570
+      }
571
+  
572
+
573
+    
574
+     
575
+     
576
+     var doc_str = ""
577
+      console.log("医嘱2333333333333",this.predialysis_evaluation)
578
+      if(this.doctor_advices!=null && this.doctor_advices.length > 0){
579
+       
580
+        
581
+        for(let i=0;i<this.doctor_advices.length;i++){
582
+          doc_str +=this.doctor_advices[i].advice_name +" "+this.doctor_advices[i].prescribing_number+this.doctor_advices[i].prescribing_number_unit+" "+this.doctor_advices[i].delivery_way
583
+        }
584
+      }
585
+
586
+      if(this.predialysis_evaluation.blood_access_part_id == -2){
587
+        this.predialysis_evaluation.blood_access_part_id = ""
588
+      }
589
+     
590
+       var str = " 患者今日来我科行血液透析治疗,血管通路选择:"+this.predialysis_evaluation.blood_access_part_id+ " "+this.QueryOperaById(this.predialysis_evaluation.blood_access_part_opera_id) +",透析模式:"+this.getModeId(this.prescription.mode_id)+
591
+       ",透前检查:"+this.predialysis_evaluation.internal_fistula +this.predialysis_evaluation.catheter + str_one +" "+ ",透析器:"+this.prescription.dialyzer_perfusion_apparatus + ",抗凝剂:"+this.GetAnticoagulant(this.prescription.anticoagulant) +",总量:"+this.prescription.anticoagulant_zongliang+"iu"+
592
+      ",透前体重:"+this.predialysis_evaluation.weight_before+"kg"+",间期体重增长:"+total +"kg"+",目标脱水量:"+this.prescription.target_ultrafiltration +"ml" +",血流量:"+this.prescription.blood_flow_volume+"ml/min" + ",透析开始时间:"+this.getTime(this.dialysis_order.start_time) +",透析过程中血压波动,"+"最大收缩压:"+monitor_one[0].systolic_blood_pressure+"mmHg"+",最小收缩压:"+monitor_one[monitor_one.length-1].systolic_blood_pressure
593
+      +"mmHg" +",最小舒张压:" +monitor_two[0].diastolic_blood_pressure+"mmHg" + ",最大舒张压:" + monitor_two[monitor_two.length-1].diastolic_blood_pressure +"mmHg" + ",最大脉搏:"+monitor_three[0].pulse_frequency+"次/分"+",最小脉搏:"+monitor_three[monitor_three.length-1].pulse_frequency+"次/分"+",透析结束时间:"+this.getTime(this.dialysis_order.end_time) +
594
+      ",实际治疗时长:"+ this.assessment_after_dislysis.actual_treatment_hour +"时"+this.assessment_after_dislysis.actual_treatment_minute+"分" +",实际超滤量:"+this.assessment_after_dislysis.actual_ultrafiltration+"ml"+",透后体重:"+this.assessment_after_dislysis.weight_after+"kg"+",透析过程顺利,安全下机" + " "
595
+      +",今日使用药品:"+doc_str +",患者下机后测血压,"+"收缩压:"+this.assessment_after_dislysis.systolic_blood_pressure+"mmHg"+",舒张压:"+this.assessment_after_dislysis.diastolic_blood_pressure+"mmHg"+",脉搏:"+this.assessment_after_dislysis.pulse_frequency +"次/分"
596
+
597
+       console.log("str000000000000000000222o2o2",str)
598
+       this.treatmentSummary.dialysis_summary = ""
599
+       this.treatmentSummary.dialysis_summary = str
600
+    },
601
+    QueryOperaById(val){
602
+       var blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
603
+       var name = ""
604
+       for(let i=0;i<blood_access_part_opera.length;i++){
605
+         if(val == blood_access_part_opera[i].id){
606
+            name = blood_access_part_opera[i].name
607
+         }
608
+       }
609
+       return name
610
+    },
611
+    getModeId(mode_id){
612
+      var mode_name = ""
613
+      if(mode_id == 1){
614
+         mode_name ="HD"
615
+      }
616
+      if(mode_id == 2){
617
+         mode_name ="HDF"
618
+      }
619
+      if(mode_id == 3){
620
+         mode_name ="HD+HP"
621
+      }
622
+      if(mode_id == 4){
623
+         mode_name ="HP"
624
+      }
625
+      if(mode_id == 5){
626
+         mode_name ="HF"
627
+      }
628
+      if(mode_id == 6){
629
+         mode_name ="SCUF"
630
+      }
631
+      if(mode_id == 7){
632
+         mode_name ="IUF"
633
+      }
634
+      if(mode_id == 8){
635
+         mode_name ="HFHD"
636
+      }
637
+      if(mode_id == 9){
638
+         mode_name ="HFHD+HP"
639
+      }
640
+      if(mode_id == 10){
641
+         mode_name ="PHF"
642
+      }
643
+      if(mode_id == 11){
644
+         mode_name ="HFR"
645
+      }
646
+      if(mode_id == 12){
647
+         mode_name ="HDF+HP"
648
+      }
649
+      if(mode_id == 13){
650
+         mode_name ="CRRT"
651
+      }
652
+      if(mode_id == 14){
653
+         mode_name ="腹水回输"
654
+      }
655
+      if(mode_id == 19){
656
+         mode_name ="IUF+HD"
657
+      }
658
+      if(mode_id == 20){
659
+         mode_name ="UF"
660
+      }
661
+      if(mode_id == 21){
662
+         mode_name ="HD+"
663
+      }
664
+      if(mode_id == 22){
665
+         mode_name ="血浆胆红素吸附+HDF"
666
+      }
667
+      if(mode_id == 23){
668
+         mode_name ="血浆胆红素吸附"
669
+      }
670
+      if(mode_id == 24){
671
+         mode_name ="I-HDF"
672
+      }
673
+      if(mode_id == 25){
674
+         mode_name ="HD高通"
675
+      }
676
+      if(mode_id == 26){
677
+         mode_name ="CVVH"
678
+      }
679
+      if(mode_id == 27){
680
+         mode_name ="CVVHD"
681
+      }
682
+      if(mode_id == 28){
683
+         mode_name ="CVVHDF"
684
+      }
685
+      if(mode_id == 29){
686
+         mode_name ="PE"
687
+      }
688
+      if(mode_id == 30){
689
+         mode_name ="血浆胆红素吸附+HP"
690
+      }
691
+      if(mode_id == 31){
692
+         mode_name ="HPD"
693
+      }
694
+      if(mode_id == 32){
695
+         mode_name ="HDP"
696
+      }
697
+      return mode_name
698
+    },
699
+    GetAnticoagulant(id){
700
+      var  anticoagulant_name = ""
701
+      if(id == 1){
702
+       anticoagulant_name = "无肝素"
703
+      }
704
+      if(id == 2){
705
+         anticoagulant_name = "普通肝素"
706
+      }
707
+      if(id == 3){
708
+        anticoagulant_name = "低分子肝素"
709
+      } 
710
+      if(id == 4){
711
+        anticoagulant_name = "阿加曲班"
712
+      } 
713
+
714
+      if(id == 5){
715
+       anticoagulant_name = "枸橼酸钠"
716
+      }
717
+      if(id == 6){
718
+         anticoagulant_name = "低分子肝素钙"
719
+      }
720
+      if(id == 7){
721
+        anticoagulant_name = "低分子肝素钠"
722
+      } 
723
+      if(id == 8){
724
+        anticoagulant_name = "依诺肝素"
725
+      } 
726
+
727
+      if(id == 9){
728
+        anticoagulant_name = "达肝素"
729
+      } 
730
+      if(id == 10){
731
+        anticoagulant_name = "体外抗凝"
732
+      } 
733
+
734
+      if(id == 11){
735
+        anticoagulant_name = "那屈肝素"
736
+      } 
737
+      if(id == 12){
738
+        anticoagulant_name = "无抗凝剂"
739
+      } 
740
+
741
+      if(id == 13){
742
+        anticoagulant_name = "那屈肝素钙"
743
+      } 
744
+      if(id == 14){
745
+        anticoagulant_name = "肝素钙注射液"
746
+      } 
747
+      if(id == 15){
748
+        anticoagulant_name = "甲磺酸萘莫司他"
749
+      } 
750
+
751
+      return anticoagulant_name
752
+    },
753
+    getTime (time) {
754
+     return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
755
+    },
501 756
   },
502 757
   watch: {
503 758
     isVisibility(val) {},
@@ -545,6 +800,7 @@ export default {
545 800
         }
546 801
       },
547 802
     },
803
+  
548 804
   },
549 805
   created() {
550 806
     this.education = getDataConfig("education", "education");
@@ -562,6 +818,7 @@ export default {
562 818
       this.record_date = uParseTime(date, "{y}-{m}-{d}");
563 819
     }
564 820
     
821
+    this.org_id = this.$store.getters.xt_user.template_info.org_id
565 822
   },
566 823
 };
567 824
 </script>

+ 4 - 4
src/xt_pages/dialysis/details/dialysisMonitoring.vue 查看文件

@@ -16,15 +16,15 @@
16 16
           <th v-if="isShow('跨膜压')" width="76px">跨膜压({{monitores[0]&&monitores[0]['transmembrane_pressure_type'] == 2 ? 'kpa' : 'mmHg'}})</th>
17 17
           <th v-if=" isShow('超滤量') &&(template_id == 6 || template_id == 9 || template_id == 10 || template_id == 11 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 27 || template_id == 28 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 32 || template_id == 34 || template_id == 35 || template_id == 36 || template_id == 38 || template_id == 39 || template_id == 40  || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47 || template_id == 48 || this.$store.getters.xt_user.template_info.org_id == 9555 || template_id == 53 || template_id == 54 || template_id == 56 || template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10340  || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10485) &&this.$store.getters.xt_user.template_info.org_id!=10387 " width="76px" > 超滤量(ml)</th>
18 18
           <th v-if=" isShow('超滤量') && (template_id != 6 && template_id != 9 && template_id != 10 && template_id != 11 && template_id != 13 && template_id != 17 && template_id != 18 && template_id != 19 && template_id != 20 && template_id != 21 && template_id != 22 && template_id != 23 && template_id != 24 && template_id != 26 && template_id !=27 && template_id!=28 && template_id!=29 && template_id!=30 && template_id!=31 && template_id!=32 && template_id!=34 && template_id!=35 && template_id!=36 && template_id!=38 && template_id != 39 && template_id != 40  && template_id != 41 && template_id != 43 && template_id != 44 && template_id != 46  && template_id != 47 && template_id != 48 && template_id != 53  && template_id != 54  && template_id != 56  && template_id != 60 && this.$store.getters.xt_user.template_info.org_id != 9555 &&  this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id!=10432  && this.$store.getters.xt_user.template_info.org_id!=10445 && this.$store.getters.xt_user.template_info.org_id!=10410 && this.$store.getters.xt_user.template_info.org_id!=10485) || this.$store.getters.xt_user.template_info.org_id == 10387"  width="76px"> 超滤量(L) </th>
19
-          <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47  || template_id == 48  || template_id == 53 || template_id == 54 || template_id == 56  || template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410) && this.$store.getters.xt_user.template_info.org_id!=10387" width="50px"> 超滤率 <br />(ml/h) </th>
20
-          <th v-if="isShow('超滤率') && (template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=29 && template_id !=30 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38  && template_id !=41 && template_id !=43 && template_id !=44 && template_id !=46 && template_id !=47 &&  template_id !=48 &&  template_id !=53 &&  template_id !=54 &&  template_id !=56 &&  template_id !=60 && this.$store.getters.xt_user.template_info.org_id!=10432  && this.$store.getters.xt_user.template_info.org_id!=10445 && this.$store.getters.xt_user.template_info.org_id!=10410) || this.$store.getters.xt_user.template_info.org_id==10387" width="50px"> 超滤率 <br />(L/h) </th>
19
+          <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18 || template_id == 19 || template_id == 20 || template_id == 21 || template_id == 22 || template_id == 23 || template_id == 24 || template_id == 26 || template_id == 29 || template_id == 30 || template_id == 31 || template_id == 34 || template_id == 35 || template_id == 38 || template_id == 41 || template_id == 43 || template_id == 44 || template_id == 46 || template_id == 47  || template_id == 48  || template_id == 53 || template_id == 54 || template_id == 56  || template_id == 60 || this.$store.getters.xt_user.template_info.org_id == 10432 || this.$store.getters.xt_user.template_info.org_id == 10445 || this.$store.getters.xt_user.template_info.org_id == 10410 || this.$store.getters.xt_user.template_info.org_id == 10485) && this.$store.getters.xt_user.template_info.org_id!=10387" width="50px"> 超滤率 <br />(ml/h) </th>
20
+          <th v-if="isShow('超滤率') && (template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18 && template_id !=19 && template_id !=20 && template_id !=21 && template_id !=22 && template_id !=23 && template_id !=24 && template_id !=26 && template_id !=29 && template_id !=30 && template_id !=31 && template_id !=34 && template_id !=35 && template_id !=38  && template_id !=41 && template_id !=43 && template_id !=44 && template_id !=46 && template_id !=47 &&  template_id !=48 &&  template_id !=53 &&  template_id !=54 &&  template_id !=56 &&  template_id !=60 && this.$store.getters.xt_user.template_info.org_id!=10432  && this.$store.getters.xt_user.template_info.org_id!=10445 && this.$store.getters.xt_user.template_info.org_id!=10410 &&this.$store.getters.xt_user.template_info.org_id!=10485 ) || this.$store.getters.xt_user.template_info.org_id==10387" width="50px"> 超滤率 <br />(L/h) </th>
21 21
           <th v-if="isShow('钠浓度')" width="92px">钠浓度(mmol/L)</th>
22 22
           <th v-if="isShow('透析液温度')" width="92px">透析液温度(℃)</th>
23 23
           <th v-if=" isShow('置换率') && (template_id == 6 || template_id == 10 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46  || template_id == 48 || template_id == 53  || template_id == 54 || template_id == 56 || org_id == 10432 || org_id == 10445 || org_id == 10410) " width="92px" > 置换率(ml/min) </th>
24 24
           <th v-if=" isShow('置换率') && template_id != 6 && template_id != 10 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && org_id!=10432 && org_id!=10445 && org_id!=10410" width="92px" > 置换率(L/h)  </th>
25 25
           <th v-if=" isShow('置换量') && (template_id == 43)" width="92px"> 置换量(ml/h)  </th>
26
-          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 10432  || this.$store.getters.xt_user.template_info.org_id == 10445 )" width="92px"  > 置换量(ml)  </th>
27
-          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432  && this.$store.getters.xt_user.template_info.org_id != 10445)" width="92px" > 置换量(L) </th>
26
+          <th v-if=" isShow('置换量') && ((template_id == 6 && org_id != 9919 && org_id !=10191 && org_id!=10478) || org_id == 9779 || template_id == 11 || template_id == 20 || template_id == 26 || template_id == 29 || template_id == 46 || template_id == 48 || template_id == 53 || template_id == 54 || template_id == 56 || this.$store.getters.xt_user.template_info.org_id == 10340 || this.$store.getters.xt_user.template_info.org_id == 10432  || this.$store.getters.xt_user.template_info.org_id == 10445 )" width="92px"  > 置换量(ml)  </th>
27
+          <th v-if=" isShow('置换量') && ((template_id != 6 || org_id == 9919 || org_id == 10191 || org_id == 10478) && org_id != 9779 && template_id != 11 && template_id != 20 && template_id != 26 && template_id != 29 && template_id != 46 && template_id != 48 && template_id != 53 && template_id != 54 && template_id != 56 && this.$store.getters.xt_user.template_info.org_id != 10340 && this.$store.getters.xt_user.template_info.org_id != 10432  && this.$store.getters.xt_user.template_info.org_id != 10445)" width="92px" > 置换量(L) </th>
28 28
           <th v-if=" isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11  " width="92px" > SpO₂(%) </th>
29 29
           <th v-if="isShow('电导度')" width="92px">电导度(mS/m)</th>
30 30
           <th v-if="isShow('置换液流量') && template_id != 27" width="92px">置换液流量(ml/h)</th>

+ 1 - 0
src/xt_pages/dialysis/details/index.vue 查看文件

@@ -676,6 +676,7 @@
676 676
         :lastOrder="lastOrder"
677 677
         :dryWeightList="dryWeightList"
678 678
         :docList="docList"
679
+       
679 680
       >
680 681
       </nav-igation>
681 682
 

+ 40 - 131
src/xt_pages/dialysis/dialysisFlow.vue 查看文件

@@ -135,7 +135,19 @@
135 135
                {{ scope.row.patient.name }}
136 136
              </template>
137 137
           </el-table-column>
138
-          <el-table-column prop="mode_name" label="透析处方" align="center"  width="100">
138
+          <el-table-column
139
+          align="center"
140
+          prop="name"
141
+          v-for="(item,index) in moduleList"
142
+          :key="index"
143
+          :label="item.name"
144
+        >
145
+          <template slot-scope="scope">
146
+            <span>{{getModeFinish(scope.row.dialysis_finish,item.id)}}</span>
147
+          </template>
148
+
149
+        </el-table-column>
150
+          <!-- <el-table-column prop="mode_name" label="透析处方" align="center"  width="100">
139 151
             <template slot-scope="scope">
140 152
                 <span v-if="scope.row.dialysis_finish!=null && scope.row.dialysis_finish.module == 1">
141 153
@@ -304,7 +316,7 @@
304 316
                   ×
305 317
                 </span>
306 318
            </template>
307
-         </el-table-column>
319
+         </el-table-column> -->
308 320
   
309 321
 
310 322
         </el-table>
@@ -356,6 +368,19 @@
356 368
           { value: 2, label: "下午" },
357 369
           { value: 3, label: "晚上" }
358 370
         ],
371
+        moduleList:[
372
+        {id:1,name:"透析处方"},
373
+        {id:2,name:"接诊评估"},
374
+        {id:3,name:"透前评估"},
375
+        {id:4,name:"临时医嘱"},  
376
+        {id:5,name:"双人核对"}, 
377
+        {id:6,name:"透析上机"}, 
378
+        {id:7,name:"透析监测"},
379
+        {id:8,name:"透析下机"},
380
+        {id:9,name:"透后评估"},
381
+        {id:10,name:"治疗小结"},
382
+        {id:11,name:"耗材出库"},
383
+        ],
359 384
         template_id: 0,
360 385
   
361 386
         partitionType: 0,
@@ -749,135 +774,19 @@
749 774
         this.listQuery.limit = val;
750 775
         this.getSchedualPatientList();
751 776
       },
752
-      batchPrintAction: function() {
753
-        if (this.selecting_schs.length === 0) {
754
-          this.$message.error("请至少选择一条需要打印的内容");
755
-          return false;
756
-        }
757
-        // 模板ID为6
758
-        var sch_ids = [];
759
-  
760
-        for (let index = 0; index < this.selecting_schs.length; index++) {
761
-          sch_ids.push(this.selecting_schs[index].sch_id);
762
-        }
763
-        console.log("sch_ids",sch_ids)
764
-        this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
765
-        if (this.template_id == 2 || this.template_id == 0) {
766
-          this.$router.push({ path: "/dialysis/print/batch/other" });
767
-        } else if (this.template_id == 1) {
768
-          this.$router.push({ path: "/dialysis/print/batch" });
769
-        } else if (this.template_id == 3) {
770
-          this.$router.push({ path: "/dialysis/print/batch/three" });
771
-        } else if (this.template_id == 4) {
772
-          this.$router.push({ path: "/dialysis/print/batch/four" });
773
-        } else if (this.template_id == 5) {
774
-          this.$router.push({ path: "/dialysis/print/batch/five" });
775
-        } else if (this.template_id == 6) {
776
-          this.$router.push({ path: "/dialysis/print/batch/six" });
777
-        } else if (this.template_id == 7) {
778
-          this.$router.push({ path: "/dialysis/print/batch/seven" });
779
-        } else if (this.template_id == 8) {
780
-          this.$router.push({ path: "/dialysis/print/batch/eight" });
781
-        } else if (this.template_id == 9) {
782
-          this.$router.push({ path: "/dialysis/print/batch/nine" });
783
-        } else if (this.template_id == 12) {
784
-          this.$router.push({ path: "/dialysis/print/batch/twelve" });
785
-        } else if (this.template_id == 13) {
786
-          this.$router.push({ path: "/dialysis/print/batch/thirteen" });
787
-        } else if (this.template_id == 15) {
788
-          this.$router.push({ path: "/dialysis/print/batch/fifteen" });
789
-        } else if (this.template_id == 17) {
790
-          this.$router.push({ path: "/dialysis/print/batch/seventeen" });
791
-        } else if (this.template_id == 20) {
792
-          this.$router.push({ path: "/dialysis/print/batch/twenty" });
793
-        } else if (this.template_id == 22) {
794
-          this.$router.push({ path: "/dialysis/print/batch/twentyTwo" });
795
-        } else if (this.template_id == 25) {
796
-          this.$router.push({ path: "/dialysis/print/batch/twentyFive" });
797
-        }else if (this.template_id == 27) {
798
-          this.$router.push({ path: "/dialysis/print/batch/twentySeven" });
799
-        } else if(this.template_id == 28){
800
-           this.$router.push({path:"/dialysis/print/batch/twentyEight"})
801
-        } else if (this.template_id == 30) {
802
-          this.$router.push({ path: "/dialysis/print/batch/thirty" });
803
-        } else if (this.template_id == 32) {
804
-          this.$router.push({ path: "/dialysis/print/batch/thirtyTwo" });
805
-        } else if (this.template_id == 33) {
806
-          this.$router.push({ path: "/dialysis/print/batch/thirtyThree" });
807
-        } else if (this.template_id == 37) {
808
-          this.$router.push({ path: "/dialysis/print/batch/thirtySeven" });
809
-        } else if (this.template_id == 38) {
810
-          this.$router.push({ path: "/dialysis/print/batch/thirtyEight" });
811
-        } else if (this.template_id == 39) {
812
-          this.$router.push({ path: "/dialysis/print/batch/thirtyNine" });
813
-        } else if (this.template_id == 40) {
814
-          this.$router.push({ path: "/dialysis/print/batch/forty" });
815
-        } else if (this.template_id == 41) {
816
-          this.$router.push({ path: "/dialysis/print/batch/fortyOne" });
817
-        } else if (this.template_id == 43) {
818
-          this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
819
-        } else if (this.template_id == 47) {
820
-          this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
821
-        } else if (this.template_id == 48) {
822
-          this.$router.push({ path: "/dialysis/print/batch/six" });
823
-        }else if (this.template_id == 51) {
824
-          this.$router.push({ path: "/dialysis/print/batch/fiftyOne" });
825
-        }else if (this.template_id == 53) {
826
-          this.$router.push({ path: "/dialysis/print/batch/fiftyThree" });
827
-        }else if (this.template_id == 59) {
828
-          this.$router.push({ path: "/dialysis/print/batch/fiftynine" });
829
-        }else if (this.template_id == 60) {
830
-          this.$router.push({ path: "/dialysis/print/batch/sixty" });
831
-        }else if (this.template_id == 61) {
832
-          this.$router.push({ path: "/dialysis/print/batch/sixtyOne" });
833
-        }else if (this.template_id == 62) {
834
-          this.$router.push({ path: "/dialysis/print/batch/sixtyTwo" });
835
-        }
836
-      },
837
-      batchPrintActionOne: function() {
838
-        if (this.selecting_schs.length === 0) {
839
-          this.$message.error("请至少选择一条需要打印的内容");
840
-          return false;
841
-        }
842
-        var sch_ids = [];
843
-        for (let index = 0; index < this.selecting_schs.length; index++) {
844
-          sch_ids.push(this.selecting_schs[index].sch_id);
845
-        }
846
-        this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
847
-        if (this.template_id == 2 || this.template_id == 0) {
848
-          this.$router.push({ path: "/dialysis/print/batch/otherone" });
849
-        } else if (this.template_id == 1) {
850
-          this.$router.push({ path: "/dialysis/print/batch" });
851
-        } else if (this.template_id == 5) {
852
-          this.$router.push({ path: "/dialysis/print/batch/fiveone" });
853
-        } else if (this.template_id == 22) {
854
-          this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
855
-        } else if(this.template_id == 33){
856
-          this.$router.push({ path: "/dialysis/print/batch/thirtyThree_one" });
857
-        }
858
-      },
859
-      batchPrintActionTwo: function() {
860
-        if (this.selecting_schs.length === 0) {
861
-          this.$message.error("请至少选择一条需要打印的内容");
862
-          return false;
863
-        }
864
-        var sch_ids = [];
865
-        for (let index = 0; index < this.selecting_schs.length; index++) {
866
-          sch_ids.push(this.selecting_schs[index].sch_id);
867
-        }
868
-        this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
869
-        if (this.template_id == 2 || this.template_id == 0) {
870
-          this.$router.push({ path: "/dialysis/print/batch/othertwo" });
871
-        } else if (this.template_id == 1) {
872
-          this.$router.push({ path: "/dialysis/print/batch" });
873
-        } else if (this.template_id == 5) {
874
-          this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
875
-        } else if (this.template_id == 22) {
876
-          this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
877
-        } else if (this.template_id == 33) {
878
-          this.$router.push({ path: "/dialysis/print/batch/thirtyThree_two" });
879
-        }
880
-      }
777
+     getModeFinish(val,id){
778
+      var name = "×"
779
+       if(val!=null){
780
+         for(let i=0;i<val.length;i++){
781
+            if(val[i].module == id){
782
+               name = "√"
783
+            }
784
+         }
785
+       }
786
+       return name
787
+     }
788
+      
789
+      
881 790
     },
882 791
     components: {
883 792
       BreadCrumb

+ 3 - 5
src/xt_pages/dialysis/dialysisPrintOrder.vue 查看文件

@@ -112,7 +112,6 @@
112 112
           org_template_info.template_id == 52 ||
113 113
           org_template_info.template_id == 53  ||
114 114
           org_template_info.template_id == 64)
115
-          && $store.getters.xt_user.org.id != 0
116 115
         "
117 116
       >
118 117
       <div>
@@ -403,8 +402,7 @@
403 402
       </template>
404 403
       <template
405 404
         v-if="
406
-          org_template_info.template_id == 27 ||
407
-          org_template_info.template_id == 0
405
+          org_template_info.template_id == 27
408 406
         "
409 407
       >
410 408
         <div>
@@ -971,7 +969,7 @@
971 969
                                   
972 970
           <DialysisPrintOrderSix
973 971
             v-bind:childResponse="childResponse"
974
-            v-if="org_template_info.template_id == 6 && $store.getters.xt_user.org.id!=0"
972
+            v-if="org_template_info.template_id == 6"
975 973
           >
976 974
           </DialysisPrintOrderSix>
977 975
 
@@ -1260,7 +1258,7 @@
1260 1258
 
1261 1259
           <DialysisPrintOrderSixtyFive
1262 1260
               v-bind:childResponse="childResponse"
1263
-            v-if="org_template_info.template_id == 65 || $store.getters.xt_user.org.id ==0">
1261
+            v-if="org_template_info.template_id == 65">
1264 1262
 
1265 1263
           </DialysisPrintOrderSixtyFive>
1266 1264
         </div>

+ 687 - 0
src/xt_pages/dialysis/doctorLongNewAdvicePrint.vue 查看文件

@@ -0,0 +1,687 @@
1
+<template>
2
+    <div class="main-contain">
3
+      <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+          <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+          </el-col>
9
+        </el-row>
10
+      </div>
11
+      <div class="app-container" style="background-color: white;">
12
+  
13
+        <div id="print_content">
14
+          <div class="print_main_content">
15
+            <div class="order_title_panl">
16
+              <span class="main_title"> &nbsp;
17
+                药品统计
18
+              </span>
19
+              <span  style="float:right;">打印日期: &nbsp;
20
+                 {{$route.query.schedule_date}}
21
+              </span>
22
+            </div>
23
+            <div class="table_panel">
24
+  
25
+              <table class="table">
26
+                <thead>
27
+                <tr>
28
+                  <td width="50">序号</td>
29
+                  <td width="100">区域</td>
30
+                  <!-- <td width="100">责护</td> -->
31
+                  <td width="100">透析模式</td>
32
+                  <td  v-for="(item,index) in tabHead"  :key="index" :label="item.advice_name" width="200">
33
+                     {{item.advice_name}}
34
+                  </td>
35
+                </tr>
36
+                </thead>
37
+                <tbody>
38
+                 <tr v-for="(item,index) in tableDataList" :key="i">
39
+                  <td>
40
+                    <span v-if="item.is_total ==1"> {{index+1}}</span>
41
+                    <span v-if="item.is_total ==0">总计</span>
42
+                  </td>
43
+                  <td>
44
+                    <span v-if="item.is_total == 1">
45
+                      <!-- {{getZoneName(item.child)}} -->
46
+                      {{item.zone_name}}
47
+                    </span> 
48
+                  </td>
49
+                  <!-- <td>
50
+                    <span v-if="item.is_total == 1"> {{getAdminUserName(item.execution_staff)}}</span>
51
+                  </td> -->
52
+                  <td>
53
+                    <span v-if="item.is_total == 1"> {{getModeId(item.child)}}</span>
54
+                  </td>
55
+                  <td v-for="(it,i) in tabHead"  :key="i">
56
+                    <span v-if="item.is_total == 1">
57
+                      <span v-if="item.child[i]!=null">
58
+                        {{getDrugCount(item.child,it.advice_name)}}
59
+                      </span>
60
+                      <span v-if="it&&it.advice_name == '肝素钠注射剂'">
61
+                        {{getDrugAdviceCount(it.advice_name,item.zone_name)}}  
62
+                      </span>
63
+                    </span>
64
+                    <span v-if="item.is_total == 0">
65
+                      {{getAllSumCount(it.advice_name)}}
66
+                    </span>
67
+                  </td>
68
+
69
+                 </tr>
70
+                </tbody>
71
+              </table>
72
+            </div>
73
+          </div>
74
+        </div>
75
+      </div>
76
+    </div>
77
+  </template>
78
+  
79
+  <script>
80
+    import { getLongDialysisAdviceToday } from '@/api/dialysis'
81
+    import { parseTime } from '@/utils'
82
+    import { uParseTime } from '@/utils/tools'
83
+    import BreadCrumb from '@/xt_pages/components/bread-crumb'
84
+    import print from 'print-js'
85
+    import { getDataConfig } from '@/utils/data'
86
+    export default {
87
+      name: 'SchedulePrint',
88
+      data() {
89
+        return {
90
+          crumbs: [
91
+            { path: false, name: '排班管理' },
92
+            { path: false, name: '排班打印' }
93
+          ],
94
+          td_1_width: '8%',
95
+          td_2_width: '8%',
96
+          td_3_width: '64%',
97
+          td_4_width: '20%',
98
+          month: 1,
99
+          begin_day: 1,
100
+          total:[],
101
+          list:[],
102
+          schedule_date:"",
103
+          schedule_type:0,
104
+          partition_type:0,
105
+          keywords:"",
106
+          loading:false,
107
+          tableData:[],
108
+          numberList:[],
109
+          partitionArr:[],
110
+          his_config:{},
111
+          typeList:[],
112
+          rowList:[],
113
+          dialysate_formulation:[],
114
+          body_fluid_option:[],
115
+          displace_liqui_part_option:[],
116
+          blood_access_option:[],
117
+          hemodialysisPipelinesOptions:[],
118
+          tableList:[],
119
+          druglist:[],
120
+          config:{},
121
+          tabHead:[],
122
+          tableDataList:[],
123
+          adminUserList:[],
124
+          doctorMap:[],
125
+        }
126
+      },
127
+      components: {
128
+        BreadCrumb
129
+      },
130
+      created() {
131
+        this.getDialysisAdviceSchedudeList()
132
+      },
133
+      methods: {
134
+        getDialysisAdviceSchedudeList() {
135
+            var params = {
136
+              schedule_type:this.$route.query.schedule_type,
137
+              partion_type:this.$route.query.partion_type,
138
+              selected_date:this.$route.query.schedule_date,
139
+            }
140
+          console.log("params2332232wo",params)
141
+          getLongDialysisAdviceToday(params).then(response=>{
142
+            if(response.data.state == 1){
143
+             var doctorList = []
144
+             var druglist = response.data.data.drug
145
+             this.druglist = druglist
146
+             this.startdialogVisibleOne = true
147
+             var list = response.data.data.list
148
+             if(list!=null && list.length>0){
149
+                for(let i=0;i<list.length;i++){
150
+                  list[i].new_doctor_advice = []
151
+                  for(let j=0;j<list[i].xt_doctor_advice.length;j++){
152
+                    if((list[i].xt_doctor_advice[j].frequency_type == 1) || (list[i].xt_doctor_advice[j].frequency_type == 3 && list[i].xt_doctor_advice[j].week_day.indexOf(this.getweekday(this.$route.query.schedule_date))!=-1)){
153
+                        list[i].new_doctor_advice.push(list[i].xt_doctor_advice[j])
154
+                    }
155
+                  }
156
+                }
157
+              }
158
+          
159
+             this.adminUserList = response.data.data.doctorList
160
+             
161
+             if(list!=null && list.length > 0){
162
+                
163
+               for(let i=0;i<list.length;i++){
164
+                for(let j=0;j<list[i].new_doctor_advice.length;j++){
165
+                  list[i].new_doctor_advice[j].mode_id = list[i].mode_id
166
+                  list[i].new_doctor_advice[j].zone_name = list[i].device_number.zone.name
167
+                  list[i].new_doctor_advice[j].sort = list[i].device_number.zone.sort
168
+                  doctorList.push(list[i].new_doctor_advice[j])
169
+                }
170
+               }
171
+             }
172
+          
173
+
174
+             
175
+              if(doctorList!=null && doctorList.length > 0){
176
+
177
+                let dataInfo = {}
178
+                  doctorList.forEach((item, index) => {
179
+                  item.advice_name = item.advice_name.replace(/\s/g,"")  
180
+                  let { advice_name } = item
181
+                  if (!dataInfo[advice_name]) {
182
+                    dataInfo[advice_name] = {
183
+                      advice_name:item.advice_name,
184
+                      child: [],
185
+                      count:0,
186
+                      execution_staff:item.execution_staff,
187
+                      specification_name:item.advice_desc +item.drug_spec_unit,
188
+                      patient_id:item.patient_id,
189
+                    }
190
+                  }
191
+                })
192
+                let arr = Object.values(dataInfo)
193
+                for(let i=0;i<arr.length;i++){
194
+                  for(let j=0;j<doctorList.length;j++){
195
+                    if(arr[i].advice_name == doctorList[j].advice_name){
196
+                        arr[i].child.push(doctorList[j])
197
+                    }
198
+                  }
199
+                }
200
+                this.tabHead = arr
201
+                console.log("arr---------------------",this.tabHead)
202
+              }
203
+              
204
+              this.doctorMap = []
205
+              if(doctorList!=null && doctorList.length > 0){
206
+                let dataInfo = {}
207
+                  doctorList.forEach((item, index) => {
208
+                  if(item.advice_name == "肝素钠注射剂"){
209
+                    this.doctorMap.push(item)
210
+                  } 
211
+                  let { zone_name } = item
212
+                  if (!dataInfo[zone_name])  {
213
+                    dataInfo[zone_name] = {
214
+                      zone_name:item.zone_name,
215
+                      child: [],
216
+                      count:0,
217
+                      sort:item.sort,
218
+                    }
219
+                  }
220
+                })
221
+                let newArr = Object.values(dataInfo)
222
+                if(newArr!=null && newArr.length >0){
223
+                  for(let i=0;i<newArr.length;i++){
224
+                    for(let j=0;j<doctorList.length;j++){
225
+                      if(newArr[i].zone_name == doctorList[j].zone_name){
226
+                         newArr[i].child.push(doctorList[j])
227
+                      }
228
+                    }
229
+                  }
230
+
231
+                }
232
+                var newList = newArr.sort(this.compareList('sort'))
233
+                if(newList!=null && newList.length >0){
234
+                  for(let i=0;i<newList.length;i++){
235
+                    newList[i].is_total = 1
236
+                  }
237
+                }
238
+
239
+                var obj = {is_total:0,count:0,execution_staff:0,child:[]}
240
+                newList.push(obj)
241
+                this.tableDataList = newList
242
+                console.log("999999999999999999-------",this.tableDataList)
243
+              }
244
+
245
+             
246
+             
247
+             
248
+              
249
+              
250
+            }
251
+          })
252
+        },
253
+       getTimeOne(val) {
254
+          if(val == ""){
255
+          return ""
256
+          }else {
257
+          return uParseTime(val, '{y}-{m}-{d}')
258
+          }
259
+       },
260
+       getCount(val){
261
+         var count = 0
262
+         if(val!=null && val.length > 0){
263
+          for(let i=0;i<val.length;i++){
264
+            count += parseInt(val[i].prescribing_number)
265
+          }
266
+         }
267
+         if(count > 0){
268
+          return count
269
+         }else{
270
+          return 0
271
+         }
272
+       },
273
+      printAction: function() {
274
+      const style = '@media print { .print_main_content { background-color: white; width:960px;  margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
275
+  
276
+      printJS({
277
+          printable: 'print_content',
278
+          type: 'html',
279
+          documentTitle: '  ',
280
+          style: style,
281
+          scanStyles: false
282
+       })
283
+      },
284
+      getSpecification(id){
285
+          var specification_name = ""
286
+          for(let i=0;i<this.druglist.length;i++){
287
+            if(id == this.druglist[i].id){
288
+              specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
289
+            }
290
+          }
291
+          return specification_name
292
+        },
293
+       getHisCount(val,max_unit,min_unit,min_number){
294
+          var total = 0
295
+          var max_str = "";
296
+          var min_str = "";
297
+          for(let i=0;i<val.length;i++){
298
+            total+=parseInt(val[i].prescribing_number)
299
+          }
300
+          if (total < min_number) {
301
+          min_str = total + min_unit;
302
+        }
303
+        if (total == 0) {
304
+          min_str = "";
305
+          max_str = "";
306
+        }
307
+        if (total >= min_number) {
308
+          if (parseInt(total / min_number) != 0) {
309
+            max_str = parseInt(total / min_number) + max_unit;
310
+          }
311
+          if (total % min_number != 0) {
312
+            min_str = (total % min_number) + min_unit;
313
+          }
314
+        }
315
+        return max_str + min_str;
316
+          
317
+        },
318
+
319
+        getModeId(val){
320
+        if(val!=null && val.length > 0){
321
+          let dataInfo = {}
322
+            val.forEach((item, index) => {
323
+            let { patient_id } = item
324
+            if (!dataInfo[patient_id])  {
325
+              dataInfo[patient_id] = {
326
+                patient_id:item.patient_id,
327
+                child: [],
328
+                count:0,
329
+                mode_id:item.mode_id,
330
+              }
331
+            }
332
+        })
333
+          let newArr = Object.values(dataInfo)
334
+        
335
+          if(newArr!=null && newArr.length >0){
336
+            let dataInfo = {}
337
+            newArr.forEach((item, index) => {
338
+              let { mode_id } = item
339
+              if (!dataInfo[mode_id])  {
340
+                dataInfo[mode_id] = {
341
+                  mode_id:item.mode_id,
342
+                  child: [],
343
+                  count:0,
344
+                }
345
+              }
346
+           })
347
+           let hisNewArr = Object.values(dataInfo)
348
+          
349
+           if(hisNewArr!=null && hisNewArr.length >0){
350
+             for(let i=0;i<hisNewArr.length;i++){
351
+               for(let j=0;j<newArr.length;j++){
352
+                 if(hisNewArr[i].mode_id == newArr[j].mode_id){
353
+                    hisNewArr[i].child.push(newArr[j])
354
+                 }
355
+               }
356
+             }
357
+           }
358
+         
359
+           
360
+           var str = ""
361
+           for(let i=0;i<hisNewArr.length;i++){
362
+             if(hisNewArr[i].mode_id == 1){
363
+                hisNewArr[i].mode_id = "HD"
364
+             }
365
+             if(hisNewArr[i].mode_id == 2){
366
+                hisNewArr[i].mode_id = "HDF"
367
+             }
368
+             if(hisNewArr[i].mode_id == 3){
369
+                hisNewArr[i].mode_id = "HD+HP"
370
+             }
371
+             if(hisNewArr[i].mode_id == 4){
372
+                hisNewArr[i].mode_id = "HP"
373
+             }
374
+             if(hisNewArr[i].mode_id == 5){
375
+                hisNewArr[i].mode_id = "HF"
376
+             }
377
+             if(hisNewArr[i].mode_id == 6){
378
+                hisNewArr[i].mode_id = "SCUF"
379
+             }
380
+             if(hisNewArr[i].mode_id == 7){
381
+                hisNewArr[i].mode_id = "IUF"
382
+             }
383
+             if(hisNewArr[i].mode_id == 8){
384
+                hisNewArr[i].mode_id = "HFHD"
385
+             }
386
+             if(hisNewArr[i].mode_id == 9){
387
+                hisNewArr[i].mode_id = "HFHD+HP"
388
+             }
389
+             if(hisNewArr[i].mode_id == 10){
390
+                hisNewArr[i].mode_id = "PHF"
391
+             }
392
+             if(hisNewArr[i].mode_id == 11){
393
+                hisNewArr[i].mode_id = "HFR"
394
+             }
395
+             if(hisNewArr[i].mode_id == 12){
396
+                hisNewArr[i].mode_id = "HDF+HP"
397
+             }
398
+             if(hisNewArr[i].mode_id == 13){
399
+                hisNewArr[i].mode_id = "CRRT"
400
+             }
401
+             if(hisNewArr[i].mode_id == 14){
402
+                hisNewArr[i].mode_id = "腹水回输"
403
+             }
404
+             if(hisNewArr[i].mode_id == 15){
405
+                hisNewArr[i].mode_id = "IUF+HD"
406
+             }
407
+             if(hisNewArr[i].mode_id == 20){
408
+                hisNewArr[i].mode_id = "UF"
409
+             }
410
+             if(hisNewArr[i].mode_id == 21){
411
+                hisNewArr[i].mode_id = "HD+"
412
+             }
413
+             if(hisNewArr[i].mode_id == 22){
414
+                hisNewArr[i].mode_id = "血浆胆红素吸附+HDF"
415
+             }
416
+             if(hisNewArr[i].mode_id == 23){
417
+                hisNewArr[i].mode_id = "血浆胆红素吸附"
418
+             }
419
+             if(hisNewArr[i].mode_id == 24){
420
+                hisNewArr[i].mode_id = "I-HDF"
421
+             }
422
+             if(hisNewArr[i].mode_id == 25){
423
+                hisNewArr[i].mode_id = "HD高通"
424
+             }
425
+             if(hisNewArr[i].mode_id == 26){
426
+                hisNewArr[i].mode_id = "CVVH"
427
+             }
428
+             if(hisNewArr[i].mode_id == 27){
429
+                hisNewArr[i].mode_id = "CVVHD"
430
+             }
431
+             if(hisNewArr[i].mode_id == 28){
432
+                hisNewArr[i].mode_id = "CVVHDF"
433
+             }
434
+             if(hisNewArr[i].mode_id == 29){
435
+                hisNewArr[i].mode_id = "PE"
436
+             }
437
+             if(hisNewArr[i].mode_id == 30){
438
+                hisNewArr[i].mode_id = "血浆胆红素吸附+HP"
439
+             }
440
+             if(hisNewArr[i].mode_id == 31){
441
+                hisNewArr[i].mode_id = "HPD"
442
+             }
443
+             if(hisNewArr[i].mode_id == 32){
444
+                hisNewArr[i].mode_id = "HDP"
445
+             }
446
+             str += hisNewArr[i].mode_id +"("+hisNewArr[i].child.length+")" +"\n" 
447
+           }
448
+          
449
+           return str
450
+         }
451
+
452
+          // return newArr.length
453
+        }
454
+      },
455
+      getDrugCount(val,advice_name){
456
+        
457
+        if(val!=null){
458
+          for(let i=0;i<val.length;i++){
459
+           val[i].advice_name = val[i].advice_name.replace(/\s/g,"")
460
+          }
461
+        }
462
+       
463
+        if(val!=null && val.length >0){
464
+            let dataInfo = {}
465
+            val.forEach((item, index) => {
466
+            
467
+            let { advice_name } = item
468
+            if (!dataInfo[advice_name])  {
469
+              dataInfo[advice_name] = {
470
+                advice_name:item.advice_name,
471
+                child: [],
472
+                count:0,
473
+              }
474
+            }
475
+          })
476
+       
477
+          let newArr = Object.values(dataInfo) 
478
+         
479
+         
480
+          if(newArr!=null && newArr.length >0){
481
+            for(let i=0;i<newArr.length;i++){
482
+              for(let j=0;j<val.length;j++){
483
+                if(newArr[i].advice_name == val[j].advice_name){
484
+                   newArr[i].child.push(val[j])
485
+                }
486
+              }
487
+            }
488
+          }
489
+          
490
+          var total = 0
491
+          var newHisArr =[]
492
+          if(newArr!=null && newArr.length >0){
493
+            for(let i=0;i<newArr.length;i++){
494
+               if(newArr[i].advice_name == advice_name){
495
+                  newHisArr.push(newArr[i])
496
+               }
497
+            }
498
+          }
499
+
500
+          if(newHisArr!=null && newHisArr.length>0){
501
+            
502
+            for(let i=0;i<newHisArr.length;i++){
503
+              for(let j=0;j<newHisArr[i].child.length;j++){
504
+                total += parseInt(newHisArr[i].child[j].prescribing_number)
505
+              }
506
+            }
507
+          }
508
+           
509
+          return total
510
+        }
511
+
512
+      },
513
+      getAdminUserName(id){
514
+        var name = ""
515
+        for(let i=0;i<this.adminUserList.length;i++){
516
+          if(id == this.adminUserList[i].id){
517
+             name = this.adminUserList[i].name
518
+          }
519
+        }
520
+        return name
521
+      },
522
+      getZoneName(val){
523
+        var zone_name = ""
524
+        if(val!=null && val.length >0){
525
+          zone_name = val[0].zone_name
526
+        }
527
+        return zone_name
528
+      },
529
+      compareList: function (k) {
530
+        return function (a, b) {
531
+          var M = a[k]
532
+          var N = b[k]
533
+          return M - N // 从低向高排
534
+          // return N - M;   // 从高向低排
535
+        }
536
+      },
537
+
538
+      getAllSumCount(advice_name){
539
+       
540
+        var hisNewArr =[]
541
+        if(this.tabHead.length!=null && this.tabHead.length >0){
542
+          for(let i=0;i<this.tabHead.length;i++){
543
+            if(this.tabHead[i].advice_name == advice_name){
544
+              hisNewArr.push(this.tabHead[i])
545
+            }
546
+          }
547
+        }
548
+        
549
+        var total = 0
550
+        if(hisNewArr!=null && hisNewArr.length > 0){
551
+          for(let i=0;i<hisNewArr.length;i++){
552
+          for(let j=0;j<hisNewArr[i].child.length;j++){
553
+              total += parseInt(hisNewArr[i].child[j].prescribing_number)
554
+          }
555
+          }
556
+        }
557
+        if (total > 0) {
558
+          return total
559
+        }else{
560
+          return 0
561
+        }
562
+
563
+     },
564
+     getDrugAdviceCount(advice_name,zone_name){
565
+        var str = ""
566
+        var arr =[]
567
+        var arrOne = []
568
+        if(this.doctorMap!=null && this.doctorMap.length>0){
569
+
570
+           for(let i=0;i<this.doctorMap.length;i++){
571
+            if(this.doctorMap[i].advice_name!="" || this.doctorMap[i].advice_name!=undefined){
572
+                this.doctorMap[i].advice_name = this.doctorMap[i].advice_name.replace(/\s/g,"")
573
+            }
574
+             if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way =="导管封管"){
575
+                arr.push(this.doctorMap[i])
576
+             }
577
+
578
+             if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way.indexOf("泵入")!=-1){
579
+                arrOne.push(this.doctorMap[i])
580
+             }
581
+           }
582
+        }
583
+
584
+        if(arr!=null && arr.length >0){
585
+            var total = 0
586
+           for(let i=0;i<arr.length;i++){
587
+              total +=arr[i].prescribing_number
588
+           }
589
+          str =  "封管" +"("+total+")"
590
+        }
591
+        if(arrOne!=null && arrOne.length >0){
592
+            var total_one = 0
593
+           for(let i=0;i<arrOne.length;i++){
594
+             total_one +=arrOne[i].prescribing_number
595
+           }
596
+          str = str + "泵入" +"("+total_one+")"
597
+        }
598
+        return str
599
+      },
600
+      getweekday(date){
601
+        var weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
602
+
603
+        var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
604
+
605
+        return week;
606
+      }
607
+     }
608
+    }
609
+  </script>
610
+  
611
+  <style rel="stylesheet/scss" lang="scss" scoped>
612
+    .print_main_content {
613
+      background-color: white;
614
+      width: 960px;
615
+      margin: 0 auto;
616
+      padding: 0 0 20px 0;
617
+  
618
+    .order_title_panl {
619
+      text-align: center;
620
+  
621
+    .main_title {
622
+      font-size: 18px;
623
+      line-height: 40px;
624
+      font-weight: 500;
625
+    }
626
+  
627
+    }
628
+    .table_panel {
629
+  
630
+    .table {
631
+      width: 100%;
632
+      border: 1px solid;
633
+      border-collapse: collapse;
634
+      padding: 2px;
635
+  
636
+    thead {
637
+  
638
+    tr {
639
+  
640
+    td {
641
+      border: 1px solid;
642
+      text-align: center;
643
+      font-size: 20px;
644
+      padding: 15px 5px;
645
+    }
646
+  
647
+    }
648
+    }
649
+    tbody {
650
+  
651
+    tr {
652
+  
653
+    td {
654
+      border: 1px solid;
655
+      text-align: center;
656
+      font-size: 18px;
657
+      padding: 10px 5px;
658
+  
659
+    .proj {
660
+      padding: 5px 0;
661
+      text-align: left;
662
+  
663
+    .proj_title {
664
+      font-size: 16px;
665
+      font-weight: 500;
666
+      line-height: 25px;
667
+    }
668
+  
669
+    .proj_item {
670
+      font-size: 15px;
671
+      line-height: 20px;
672
+  
673
+    .zone_name {
674
+      font-weight: 500;
675
+    }
676
+  
677
+    }
678
+    }
679
+    }
680
+    }
681
+    }
682
+    }
683
+    }
684
+    }
685
+  </style>
686
+  
687
+  

文件差异内容过多而无法显示
+ 2121 - 0
src/xt_pages/dialysis/longDoctorAdvice.vue


+ 617 - 0
src/xt_pages/dialysis/longDoctorAdvicePrint.vue 查看文件

@@ -0,0 +1,617 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;" v-show="show">
12
+            <div id="dialysisTable">
13
+                <div class="order_title_panl">
14
+                    <span class="main_title">透析医嘱</span>
15
+                </div>
16
+                <p style="width: 960px;text-align: right;margin: 0 auto 10px;">日期:{{ time }}</p>
17
+                <table class="table dialysisTable" border="1" cellspacing="0" cellpadding="0">
18
+                    <tr>
19
+                    <th width="20px">姓名</th>
20
+                    <th width="100px">医嘱内容</th>
21
+                     <th width="50px">执行护士</th>
22
+                    </tr>
23
+                    <template v-for="(schedules, zone_name, index) in scheduleMap">
24
+                    <tr ><!--:key="index"-->
25
+                        <td>{{ zone_name }}</td>
26
+                        <td></td>
27
+                        <td></td>
28
+                       
29
+                    </tr>
30
+                    <template v-for="schedule in schedules">
31
+                        <template v-for="(group, group_index) in schedule.new_advice">
32
+                        <tr v-for="(advice, advice_index) in group.advices" :key="advice_index">
33
+                            <td
34
+                            v-if="advice_index == 0"
35
+                            :rowspan="group.advices.length"
36
+                            >{{ advice.parent_id == 0 ? schedule.patient.name : "" }}
37
+                            <br>
38
+                            ({{ advice.parent_id == 0 ? schedule.dialysis_no : ""}})
39
+                             {{getAge(schedule) }}岁
40
+                            <br>
41
+                            <span v-if="schedule.mode_id == 1">(HD)</span>
42
+                            <span v-if="schedule.mode_id == 2">(HDF)</span>
43
+                            <span v-if="schedule.mode_id == 3">(HD+HP)</span>
44
+                            <span v-if="schedule.mode_id == 4">(HP)</span>
45
+                            <span v-if="schedule.mode_id == 5">(HF)</span>
46
+                            <span v-if="schedule.mode_id == 6">(SCUF)</span>
47
+                            <span v-if="schedule.mode_id == 7">(IUF)</span>
48
+                            <span v-if="schedule.mode_id == 8">(HFHD)</span>
49
+                            <span v-if="schedule.mode_id == 9">(HFHD+HP)</span>
50
+                            <span v-if="schedule.mode_id == 10">(PHF)</span>
51
+                            <span v-if="schedule.mode_id == 11">(HFR)</span>
52
+                            <span v-if="schedule.mode_id == 12">(HDF+HP)</span>
53
+                            <span v-if="schedule.mode_id == 13">(CRRT)</span>
54
+                            <span v-if="schedule.mode_id == 14">(腹水回输)</span>
55
+                            <span v-if="schedule.mode_id == 24">I-HDF</span>
56
+                            </td>
57
+                          
58
+                   
59
+                            <td
60
+                            :class="
61
+                                advice.parent_id == 0
62
+                                ? 'advice_content'
63
+                                : 'subadvice_content'
64
+                            "
65
+                            >
66
+                            <span>{{ advice.advice_name }}</span>
67
+                           
68
+                            <span v-if="advice.single_dose">
69
+                                单次用量 {{ advice.single_dose
70
+                                }}{{ advice.single_dose_unit }}
71
+                            </span>
72
+                            <span v-if="advice.prescribing_number>0">总量:</span>
73
+                            <span v-if="advice.prescribing_number">
74
+                                {{ advice.prescribing_number
75
+                                }}{{ advice.prescribing_number_unit }}
76
+                            </span>
77
+                            <span>{{ advice.delivery_way }}</span>
78
+                            <span>{{ advice.execution_frequency }}</span>
79
+                           
80
+                            </td>
81
+                            <td>{{ getName(advice.execution_staff) }}</td>
82
+                           
83
+                        </tr>
84
+                        </template>
85
+                    </template>
86
+                    </template>
87
+                </table>
88
+            </div>
89
+        </div>
90
+
91
+          <div class="app-container" style="background-color: white;" v-show="showOne">
92
+            <div id="dialysisTable">
93
+                <div class="order_title_panl">
94
+                    <span class="main_title">透析医嘱</span>
95
+                </div>
96
+                <p style="width: 960px;text-align: right;margin: 0 auto 10px;">日期:{{ time }}</p>
97
+                <table class="table dialysisTable" border="1" cellspacing="0" cellpadding="0">
98
+                    <tr>
99
+                    <th width="20px">姓名</th>
100
+                    <th width="100px">医嘱内容</th>
101
+                    <th width="20px">执行护士</th>
102
+                    </tr>
103
+                    <template v-for="(schedules, zone_name, index) in scheduleMap">
104
+                    <tr ><!--:key="index"-->
105
+                        <td>{{ zone_name }}</td>
106
+                        <td></td>
107
+                        <td></td>
108
+                    </tr>
109
+                    <template v-for="schedule in schedules">
110
+                        <template v-for="(group, group_index) in schedule.new_advice">
111
+                        <tr v-for="(advice, advice_index) in group.advices" :key="advice_index">
112
+                            <td
113
+                            v-if="advice_index == 0"
114
+                            :rowspan="group.advices.length"
115
+                            >{{ advice.parent_id == 0 ? schedule.patient.name : "" }}
116
+                            <br>
117
+                            ({{ advice.parent_id == 0 ? schedule.dialysis_no : ""}})
118
+                            {{getAge(schedule) }}岁
119
+                            <br>
120
+                            <span v-if="schedule.mode_id == 1">(HD)</span>
121
+                            <span v-if="schedule.mode_id == 2">(HDF)</span>
122
+                            <span v-if="schedule.mode_id == 3">(HD+HP)</span>
123
+                            <span v-if="schedule.mode_id == 4">(HP)</span>
124
+                            <span v-if="schedule.mode_id == 5">(HF)</span>
125
+                            <span v-if="schedule.mode_id == 6">(SCUF)</span>
126
+                            <span v-if="schedule.mode_id == 7">(IUF)</span>
127
+                            <span v-if="schedule.mode_id == 8">(HFHD)</span>
128
+                            <span v-if="schedule.mode_id == 9">(HFHD+HP)</span>
129
+                            <span v-if="schedule.mode_id == 10">(PHF)</span>
130
+                            <span v-if="schedule.mode_id == 11">(HFR)</span>
131
+                            <span v-if="schedule.mode_id == 12">(HDF+HP)</span>
132
+                            <span v-if="schedule.mode_id == 13">(CRRT)</span>
133
+                            <span v-if="schedule.mode_id == 14">(腹水回输)</span>
134
+                            <span v-if="schedule.mode_id == 24">I-HDF</span>
135
+                            </td>
136
+                           
137
+                           
138
+                            <td v-if="advice_index == 0" :rowspan="group.advices.length">
139
+                            {{
140
+                            advice.parent_id == 0
141
+                            ? parseTime(advice.start_time, "{m}-{d} {h}:{i}")
142
+                            : ""
143
+                            }}
144
+                            </td>
145
+                            <td
146
+                            :class="
147
+                                advice.parent_id == 0
148
+                                ? 'advice_content'
149
+                                : 'subadvice_content'
150
+                            "
151
+                            >
152
+                            <span>{{ advice.advice_name }}</span>
153
+                            
154
+                            <span v-if="advice.single_dose">
155
+                                单次用量 {{ advice.single_dose
156
+                                }}{{ advice.single_dose_unit }}
157
+                            </span>
158
+                            <span v-if="advice.prescribing_number>0">总量:</span>
159
+                            <span v-if="advice.prescribing_number">
160
+                                {{ advice.prescribing_number
161
+                                }}{{ advice.prescribing_number_unit }}
162
+                            </span>
163
+                            <span>{{ advice.delivery_way }}</span>
164
+                            <span>{{ advice.execution_frequency }}</span>
165
+                           
166
+                            </td>
167
+                            <td>{{ getName(advice.execution_staff) }}</td>
168
+                        </tr>
169
+                        </template>
170
+                    </template>
171
+                    </template>
172
+                </table>
173
+            </div>
174
+        </div>
175
+    </div>
176
+</template>
177
+
178
+<script>
179
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
180
+import { getNewLongSchedualDoctors } from '@/api/advice'
181
+import { parseTime } from '@/utils'
182
+import { jsGetAge } from "@/utils/tools";
183
+import print from 'print-js'
184
+const moment = require('moment')
185
+export default {
186
+    components:{
187
+        BreadCrumb
188
+    },
189
+    data(){
190
+        return{
191
+            crumbs: [
192
+                { path: false, name: '药品' },
193
+                { path: false, name: '打印' }
194
+            ],
195
+            tableData:[],
196
+            start_time:"",
197
+            end_time:"",
198
+            print_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
199
+
200
+            zone_selected: 0,
201
+            scheduleMap:[],
202
+            time:'',
203
+            show:true,
204
+            showOne:false,
205
+            delivery_way:"",
206
+            org_id:0,
207
+        }
208
+    },
209
+    methods:{
210
+        getAge: function (val) {
211
+            var thisLen = val.patient.id_card_no.length;
212
+            var birth = "";
213
+            if (thisLen == 15) {
214
+                birth = "19" + val.patient.id_card_no.substr(6, 6);
215
+            } else {
216
+                birth = val.patient.id_card_no.substr(6, 8);
217
+            }
218
+            var birthtwo =
219
+                birth.substr(0, 4) +
220
+                "-" +
221
+                birth.substr(4, 2) +
222
+                "-" +
223
+                birth.substr(6, 2);
224
+
225
+            var age = jsGetAge(birthtwo, "-");
226
+            return age;
227
+        },
228
+        printAction: function() {
229
+            const style = '@media print { .dialysisTable{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
230
+
231
+            printJS({
232
+            printable: 'dialysisTable',
233
+            type: 'html',
234
+            documentTitle: '  ',
235
+            style: style,
236
+            scanStyles: false
237
+            })
238
+        },
239
+        requestSchedualDoctors (time) {
240
+            let newTime =  moment(time).format('YYYY-MM-DD')
241
+            getNewLongSchedualDoctors({
242
+            date: newTime,
243
+            patient_type: 0,
244
+            advice_type: 1,
245
+            delivery_way:this.delivery_way,
246
+            }).then(rs => {
247
+                var resp = rs.data
248
+                if (resp.state == 1) {
249
+                   this.admin_user = resp.data.adminUser
250
+                   var schedulesArr = resp.data.scheduals
251
+                   console.log("schedulesArr",schedulesArr)
252
+                   if(schedulesArr!=null && schedulesArr.length >0){
253
+                     for(let i=0;i<schedulesArr.length;i++){
254
+                        schedulesArr[i].new_doctor_advice = []
255
+                       for(let j=0;j<schedulesArr[i].doctor_advice.length;j++){
256
+                        if((schedulesArr[i].doctor_advice[j].frequency_type == 1) || (schedulesArr[i].doctor_advice[j].frequency_type == 3 && schedulesArr[i].doctor_advice[j].week_day.indexOf(this.getweekday(time))!=-1)){
257
+                            schedulesArr[i].new_doctor_advice.push(schedulesArr[i].doctor_advice[j])
258
+                        }
259
+                       }
260
+                     }
261
+                   }
262
+                   let schedules = []
263
+                   var ids = this.$store.getters.temp_params.advice_ids
264
+                   console.log('ids',ids)
265
+                   schedulesArr.map(item => {
266
+                    if(ids.indexOf(item.patient_id) > -1){
267
+                        schedules.push(item)
268
+                    }
269
+
270
+                })
271
+                console.log("schedules2333333333333w",schedules)
272
+                for (let i = 0; i < schedules.length; i++) {
273
+                    schedules[i].dialysis_no = schedules[i].patient.dialysis_no
274
+                }
275
+
276
+
277
+                var arr = []
278
+                for (let j = 0; j < schedules.length; j++) {
279
+                    arr.push(schedules[j].dialysis_no)
280
+                }
281
+                arr.sort(function (a, b) {
282
+                    return a - b
283
+                })
284
+
285
+
286
+                var arrTwo = []
287
+                for (let i = 0; i < arr.length; i++) {
288
+                    for (let j = 0; j < schedules.length; j++) {
289
+                    if (arr[i] == schedules[j].dialysis_no) {
290
+                        arrTwo.push(schedules[j])
291
+                    }
292
+                    }
293
+                }
294
+
295
+                arrTwo.map((item, index) => {
296
+
297
+                    item.new_doctor_advice.sort(this.compare('start_time'))
298
+                })
299
+
300
+
301
+                const res = new Map()
302
+                let a = arrTwo.filter(
303
+                    a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
304
+                )
305
+
306
+
307
+
308
+                schedules = a
309
+                var zoneMap = {}
310
+                var scheduleMap = {}
311
+                for (let index = 0; index < schedules.length; index++) {
312
+                    const schedule = schedules[index]
313
+                    if (schedule.new_doctor_advice.length == 0) {
314
+                    continue
315
+                    }
316
+                    if (scheduleMap[schedule.device_number.zone.name] == null) {
317
+                    scheduleMap[schedule.device_number.zone.name] = []
318
+                    }
319
+                    scheduleMap[schedule.device_number.zone.name].push(schedule)
320
+                    if (zoneMap[schedule.device_number.zone.name] == null) {
321
+                    zoneMap[schedule.device_number.zone.name] =
322
+                        schedule.device_number.zone
323
+                    }
324
+                }
325
+
326
+                var zones = []
327
+                zones.push({ value: 0, text: '全部分区' })
328
+                for (var zoneName in zoneMap) {
329
+                    zones.push({ value: zoneMap[zoneName].id, text: zoneName })
330
+                }
331
+
332
+                zones = zones.sort(function (a, b) {
333
+                    return a.value > b.value
334
+                })
335
+                this.zones = zones
336
+                for (var key in scheduleMap) {
337
+                    let mapArr = scheduleMap[key]
338
+                    for (let i = 0; i < mapArr.length; i++) {
339
+                    mapArr[i]['new_advice'] = []
340
+                    }
341
+                }
342
+
343
+                for (var key in scheduleMap) {
344
+                    let mapArr = scheduleMap[key]
345
+                    for (let i = 0; i < mapArr.length; i++) {
346
+                    var maps = mapArr[i]
347
+                    var resp_advices = maps.new_doctor_advice
348
+                    if (resp_advices.length > 0) {
349
+                        var newGroupObject = function () {
350
+                        return Object.assign(
351
+                            {},
352
+                            {
353
+                            group_no: 0,
354
+                            advices: []
355
+                            }
356
+                        )
357
+                        }
358
+                        var initGroupBlock = function (group, advice) {
359
+                        group.group_no = advice.groupno
360
+                        }
361
+
362
+                        var advice_groups = []
363
+                        var group = newGroupObject()
364
+                        for (let index = 0; index < resp_advices.length; index++) {
365
+                        const advice = resp_advices[index]
366
+                        if (advice.groupno == 0) {
367
+                            // 老版本的医嘱
368
+                            if (advice.parent_id > 0) {
369
+                            if (advice_groups.length > 0) {
370
+                                var parent_group = advice_groups[advice_groups.length - 1]
371
+                                if (parent_group.advices.length > 0) {
372
+                                if (parent_group.advices[0].id == advice.parent_id) {
373
+                                    parent_group.advices.push(advice)
374
+                                }
375
+                                }
376
+                            }
377
+                            continue
378
+                            } else {
379
+                            if (group.group_no > 0) {
380
+                                advice_groups.push(group)
381
+                                group = newGroupObject()
382
+                            }
383
+
384
+                            initGroupBlock(group, advice)
385
+                            group.advices.push(advice)
386
+                            advice_groups.push(group)
387
+                            group = newGroupObject()
388
+                            continue
389
+                            }
390
+                        } else {
391
+                            if (group.group_no > 0 && group.group_no != advice.groupno) {
392
+                            advice_groups.push(group)
393
+                            group = newGroupObject()
394
+                            }
395
+                            if (group.group_no == 0) {
396
+                            initGroupBlock(group, advice)
397
+                            }
398
+                            if (group.group_no == advice.groupno) {
399
+                            group.advices.push(advice)
400
+                            }
401
+                        }
402
+                        }
403
+                        if (group.group_no > 0) {
404
+                        // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
405
+                        advice_groups.push(group)
406
+                        }
407
+                        advice_groups = advice_groups
408
+                    } else {
409
+                        advice_groups = []
410
+                    }
411
+                    maps.new_advice = advice_groups
412
+                    }
413
+                 }
414
+
415
+
416
+                 this.scheduleMap = scheduleMap
417
+                
418
+
419
+               
420
+
421
+                }
422
+            })
423
+        },
424
+        compare (property) {
425
+            return function (a, b) {
426
+                var value1 = a[property]
427
+                var value2 = b[property]
428
+                return value1 - value2
429
+            }
430
+        },
431
+        parseTime: function (time, layout) {
432
+            if (time == 0) {
433
+                return ''
434
+            }
435
+            return parseTime(time, layout)
436
+        },
437
+        getName (val) {
438
+            for (let i = 0; i < this.admin_user.length; i++) {
439
+                if (this.admin_user[i].id == val) {
440
+                    return this.admin_user[i].name
441
+                }
442
+            }
443
+        },
444
+        getweekday(date){
445
+            var weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
446
+
447
+            var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
448
+
449
+            return week;
450
+      }
451
+    },
452
+    computed: {
453
+     filtedScheduals: function () {
454
+        var scheduleMap = new Object()
455
+        if (this.zone_selected == 0) {
456
+            for (const key in this.scheduleMap) {
457
+            scheduleMap[key] = this.scheduleMap[key]
458
+            }
459
+        } else {
460
+            var zone_name = this.zones[this.zone_selected].text
461
+            scheduleMap[zone_name] = this.scheduleMap[zone_name]
462
+        }
463
+
464
+        if (this.schedule_type_selected != 0) {
465
+            var _scheduleMap = {}
466
+            for (const key in scheduleMap) {
467
+            var origin_schedules = scheduleMap[key]
468
+            var schedules = []
469
+            for (let index = 0; index < origin_schedules.length; index++) {
470
+                const schedule = origin_schedules[index]
471
+                if (schedule.schedule_type == this.schedule_type_selected) {
472
+                schedules.push(schedule)
473
+                }
474
+            }
475
+            if (schedules.length > 0) {
476
+                _scheduleMap[key] = schedules
477
+            }
478
+            }
479
+
480
+            scheduleMap = _scheduleMap
481
+        }
482
+        for (var key in scheduleMap) {
483
+            let mapArr = scheduleMap[key]
484
+            for (let i = 0; i < mapArr.length; i++) {
485
+            mapArr[i]['new_advice'] = []
486
+            }
487
+        }
488
+
489
+        for (var key in scheduleMap) {
490
+            let mapArr = scheduleMap[key]
491
+            for (let i = 0; i < mapArr.length; i++) {
492
+            var maps = mapArr[i]
493
+            var resp_advices = maps.new_doctor_advice
494
+            if (resp_advices.length > 0) {
495
+                var newGroupObject = function () {
496
+                return Object.assign(
497
+                    {},
498
+                    {
499
+                    group_no: 0,
500
+                    advices: []
501
+                    }
502
+                )
503
+                }
504
+                var initGroupBlock = function (group, advice) {
505
+                group.group_no = advice.groupno
506
+                }
507
+
508
+                var advice_groups = []
509
+                var group = newGroupObject()
510
+                for (let index = 0; index < resp_advices.length; index++) {
511
+                const advice = resp_advices[index]
512
+                if (advice.groupno == 0) {
513
+                    // 老版本的医嘱
514
+                    if (advice.parent_id > 0) {
515
+                    if (advice_groups.length > 0) {
516
+                        var parent_group = advice_groups[advice_groups.length - 1]
517
+                        if (parent_group.advices.length > 0) {
518
+                        if (parent_group.advices[0].id == advice.parent_id) {
519
+                            parent_group.advices.push(advice)
520
+                        }
521
+                        }
522
+                    }
523
+                    continue
524
+                    } else {
525
+                    if (group.group_no > 0) {
526
+                        advice_groups.push(group)
527
+                        group = newGroupObject()
528
+                    }
529
+
530
+                    initGroupBlock(group, advice)
531
+                    group.advices.push(advice)
532
+                    advice_groups.push(group)
533
+                    group = newGroupObject()
534
+                    continue
535
+                    }
536
+                } else {
537
+                    if (group.group_no > 0 && group.group_no != advice.groupno) {
538
+                    advice_groups.push(group)
539
+                    group = newGroupObject()
540
+                    }
541
+                    if (group.group_no == 0) {
542
+                    initGroupBlock(group, advice)
543
+                    }
544
+                    if (group.group_no == advice.groupno) {
545
+                    group.advices.push(advice)
546
+                    }
547
+                }
548
+                }
549
+                if (group.group_no > 0) {
550
+                // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
551
+                advice_groups.push(group)
552
+                }
553
+                advice_groups = advice_groups
554
+            } else {
555
+                advice_groups = []
556
+            }
557
+            maps.new_advice = advice_groups
558
+            }
559
+        }
560
+        console.log("222222",scheduleMap)
561
+        return scheduleMap
562
+        },
563
+       
564
+    },
565
+    created(){
566
+      var time = this.$route.query.time
567
+      var delivery_way = this.$route.query.delivery_way
568
+      this.delivery_way = delivery_way
569
+      this.time = moment(time).format('YYYY-MM-DD')
570
+      console.log(11,this.$route.query)
571
+      this.requestSchedualDoctors(time)
572
+      this.org_id = this.$store.getters.xt_user.template_info.org_id;
573
+    }
574
+}
575
+</script>
576
+
577
+
578
+<style rel="stylesheet/scss" lang="scss" scoped>
579
+.dialysisTable{
580
+    width:960px;
581
+    margin: 0 auto;
582
+    text-align: center;
583
+    border-collapse: collapse;
584
+}
585
+.order_title_panl {
586
+    text-align: center;
587
+
588
+    .main_title {
589
+      font-size: 18px;
590
+      line-height: 40px;
591
+      font-weight: 500;
592
+    }
593
+}
594
+.dialysisTable tr{
595
+    padding: 10px 0;
596
+}
597
+.dialysisTable th {
598
+    color: #000;
599
+    padding: 0;
600
+    margin: 0;
601
+    height: 30px;
602
+}
603
+.dialysisTable tr td {
604
+    padding: 12px 0;
605
+}
606
+.subadvice_content {
607
+    text-align: left;
608
+    padding-left: 25px !important;
609
+    padding-right: 5px !important;
610
+}
611
+.advice_content {
612
+    text-align: left;
613
+    padding-left: 5px !important;
614
+    padding-right: 5px !important;
615
+    padding: 15px 5px !important;
616
+}
617
+</style>

+ 632 - 0
src/xt_pages/dialysis/longSignPrint.vue 查看文件

@@ -0,0 +1,632 @@
1
+<template>
2
+    <div class="main-contain">
3
+        <div class="position">
4
+        <bread-crumb :crumbs="crumbs"></bread-crumb>
5
+        <el-row style="float:right;">
6
+            <el-col :span="24">
7
+            <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
8
+            </el-col>
9
+        </el-row>
10
+        </div>
11
+        <div class="app-container" style="background-color: white;" v-show="show">
12
+            <div id="dialysisTable">
13
+                <div v-for="(item, index) in list" :key="index">
14
+                    <div class="signPrint" v-for="it in item.parent_advice" style="page-break-after: always;">
15
+                       
16
+                        <div v-if="org_id!=10278">分区/床位号:{{item.device_number.zone.name}}/{{item.device_number.number}}</div>  
17
+                        <div>姓名:{{item.patient.name}}</div>  
18
+
19
+                        <div>
20
+                            <div>医嘱内容:{{ it.advice_name }} 
21
+                            <span v-if="it.prescribing_number>0 && org_id !=0 && org_id!=10440">
22
+                                {{it.prescribing_number}}{{ it.prescribing_number_unit }}
23
+                            
24
+                            
25
+                            </span> 
26
+                            </div>  
27
+                            <div v-if="org_id ==0 || org_id == 10138 || org_id == 10278">
28
+                            规格:{{getSpecialName(it.drug_id)}} 
29
+                            
30
+                            </div>  
31
+                            <div v-if="(org_id ==0 || org_id==10440 || org_id == 10478) && org_id!=10278">单次用量:{{it.single_dose}}{{it.single_dose_unit }}</div>  
32
+                            <div v-if="org_id!=0 && org_id!=10278 && org_id!=10138">执行频率:{{it.execution_frequency}}</div>  
33
+                            <div v-if="org_id!=10278">给药途径:{{it.delivery_way}}</div>  
34
+                             
35
+                        </div>
36
+                         
37
+                       <span v-if="it.childAdvice.length >0">&nbsp;</span>  
38
+                       <div v-for="its in it.childAdvice">
39
+                            <div>医嘱内容:{{ its.advice_name }} 
40
+                            <span v-if="its.prescribing_number>0 && org_id !=0 && org_id!=10440">
41
+                                {{its.prescribing_number}}{{ its.prescribing_number_unit }}
42
+                            </span> 
43
+                            </div>  
44
+                            <div v-if="org_id ==0 || org_id == 10138 || org_id == 10278">
45
+                            规格:{{getSpecialName(its.drug_id)}} 
46
+                            
47
+                            </div>  
48
+                            <div v-if=" org_id ==0 || org_id==10440 || org_id == 10478">单次用量:{{its.single_dose}}{{its.single_dose_unit }}</div>  
49
+                            <div v-if="org_id!=0 && org_id!=10278 && org_id!=10138">执行频率:{{its.execution_frequency}}</div>  
50
+                            <div>给药途径:{{its.delivery_way}}</div>  
51
+                        </div>
52
+                        <div>打印时间:{{time}}</div> 
53
+                    </div>  
54
+                </div>
55
+            </div>
56
+        </div>
57
+
58
+          <!-- <div class="app-container" style="background-color: white;" v-show="showOne">
59
+            <div id="dialysisTable">
60
+                <div v-for="(item, index) in list" :key="index">
61
+                    <div class="signPrint" v-for="it in item.doctor_advice" style="page-break-after: always;">
62
+                        <div>分区/床位号:{{item.device_number.zone.name}}/{{item.device_number.number}}</div>  
63
+                        <div>姓名:{{item.patient.name}}</div>  
64
+                        <div>医嘱内容:{{getAdvice(item.doctor_advice)}} 
65
+                           <span v-if="it.prescribing_number >0&& org_id !=0 && org_id!=10440"> {{it.prescribing_number}}{{ it.prescribing_number_unit }}</span>
66
+                        </div>  
67
+                        <div v-if="org_id ==0 || org_id == 10138 || org_id == 10278">
68
+                          规格:{{getSpecialName(it.drug_id)}} 
69
+                         
70
+                        </div>  
71
+                        <div v-if=" org_id ==0 || org_id==10440">单次用量:{{it.single_dose}}&nbsp;{{it.single_dose_unit }}</div>
72
+                        <div>给药途径:{{item.doctor_advice[0].execution_frequency}}</div>  
73
+                        <div v-if="org_id!=0 && org_id!=10278 && org_id!=10138">执行频率:{{item.doctor_advice[0].delivery_way}}</div>  
74
+                        <div>打印时间:{{time}}</div>   
75
+                    </div>  
76
+                  
77
+                </div>
78
+            </div>
79
+        </div> -->
80
+    </div>
81
+</template>
82
+
83
+<script>
84
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
85
+import { getNewLongSchedualDoctors } from '@/api/advice'
86
+import { parseTime } from '@/utils'
87
+import print from 'print-js'
88
+const moment = require('moment')
89
+export default {
90
+    components:{
91
+        BreadCrumb
92
+    },
93
+    data(){
94
+        return{
95
+            crumbs: [
96
+                { path: false, name: '耗材药品' },
97
+                { path: false, name: '打印' }
98
+            ],
99
+            tableData:[],
100
+            start_time:"",
101
+            end_time:"",
102
+            print_time:moment(new Date()).add('year', 0).format('YYYY-MM-DD'),
103
+
104
+            zone_selected: 0,
105
+            scheduleMap:[],
106
+            time:'',
107
+            show:true,
108
+            showOne:false,
109
+            delivery_way:"",
110
+            list:[],
111
+            execution_frequency:"",
112
+            org_id:0,
113
+            drugList:[],
114
+        }
115
+    },
116
+    methods:{
117
+        printAction: function() {
118
+            const style = '@media print { .dialysisTable{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
119
+
120
+            printJS({
121
+            printable: 'dialysisTable',
122
+            type: 'html',
123
+            documentTitle: '  ',
124
+            style: style,
125
+            scanStyles: false
126
+            })
127
+        },
128
+        requestSchedualDoctors (time) {
129
+            let newTime =  moment(time).format('YYYY-MM-DD')
130
+            getNewLongSchedualDoctors({
131
+            date: newTime,
132
+            patient_type: 0,
133
+            advice_type: 1,
134
+            delivery_way:this.delivery_way,
135
+            execution_frequency:this.execution_frequency,
136
+            patient_id:this.$route.query.patient_id,
137
+            }).then(rs => {
138
+                var resp = rs.data
139
+                if (resp.state == 1) {
140
+                this.admin_user = resp.data.adminUser
141
+             
142
+                var schedulesArr = resp.data.scheduals
143
+                if(schedulesArr!=null && schedulesArr.length >0){
144
+                    for(let i=0;i<schedulesArr.length;i++){
145
+                     schedulesArr[i].new_doctor_advice = []
146
+                    for(let j=0;j<schedulesArr[i].doctor_advice.length;j++){
147
+                        if((schedulesArr[i].doctor_advice[j].frequency_type == 1) || (schedulesArr[i].doctor_advice[j].frequency_type == 3 && schedulesArr[i].doctor_advice[j].week_day.indexOf(this.getweekday(time))!=-1)){
148
+                            schedulesArr[i].new_doctor_advice.push(schedulesArr[i].doctor_advice[j])
149
+                        }
150
+                      }
151
+                    }
152
+                }
153
+                let schedules = []
154
+                var ids = this.$store.getters.temp_params.advice_ids
155
+                console.log('ids',ids)
156
+                schedulesArr.map(item => {
157
+                if(ids.indexOf(item.patient_id) > -1){
158
+                    schedules.push(item)
159
+                }
160
+                    
161
+                })
162
+               
163
+                for (let i = 0; i < schedules.length; i++) {
164
+                    schedules[i].dialysis_no = schedules[i].patient.dialysis_no
165
+                }
166
+           
167
+
168
+                var arr = []
169
+                for (let j = 0; j < schedules.length; j++) {
170
+                    arr.push(schedules[j].dialysis_no)
171
+                }
172
+                arr.sort(function (a, b) {
173
+                    return a - b
174
+                })
175
+               
176
+
177
+                var arrTwo = []
178
+                for (let i = 0; i < arr.length; i++) {
179
+                    for (let j = 0; j < schedules.length; j++) {
180
+                    if (arr[i] == schedules[j].dialysis_no) {
181
+                        arrTwo.push(schedules[j])
182
+                    }
183
+                    }
184
+                }
185
+
186
+                arrTwo.map((item, index) => {
187
+                  
188
+                    item.new_doctor_advice.sort(this.compare('start_time'))
189
+                })
190
+                
191
+
192
+                const res = new Map()
193
+                let a = arrTwo.filter(
194
+                    a => !res.has(a.dialysis_no) && res.set(a.dialysis_no, 1)
195
+                )
196
+
197
+               
198
+
199
+                schedules = a
200
+                var zoneMap = {}
201
+                var scheduleMap = {}
202
+                for (let index = 0; index < schedules.length; index++) {
203
+                    const schedule = schedules[index]
204
+                    if (schedule.new_doctor_advice.length == 0) {
205
+                    continue
206
+                    }
207
+                    if (scheduleMap[schedule.device_number.zone.name] == null) {
208
+                    scheduleMap[schedule.device_number.zone.name] = []
209
+                    }
210
+                    scheduleMap[schedule.device_number.zone.name].push(schedule)
211
+                    if (zoneMap[schedule.device_number.zone.name] == null) {
212
+                    zoneMap[schedule.device_number.zone.name] =schedule.device_number.zone}
213
+                }
214
+
215
+                var zones = []
216
+                zones.push({ value: 0, text: '全部分区' })
217
+                for (var zoneName in zoneMap) {
218
+                    zones.push({ value: zoneMap[zoneName].id, text: zoneName })
219
+                }
220
+
221
+                zones = zones.sort(function (a, b) {
222
+                    return a.value > b.value
223
+                })
224
+                this.zones = zones
225
+                for (var key in scheduleMap) {
226
+                    let mapArr = scheduleMap[key]
227
+                    for (let i = 0; i < mapArr.length; i++) {
228
+                    mapArr[i]['new_advice'] = []
229
+                    }
230
+                }
231
+
232
+                for (var key in scheduleMap) {
233
+                    let mapArr = scheduleMap[key]
234
+                    for (let i = 0; i < mapArr.length; i++) {
235
+                    var maps = mapArr[i]
236
+                    var resp_advices = maps.new_doctor_advice
237
+                    if (resp_advices.length > 0) {
238
+                        var newGroupObject = function () {
239
+                        return Object.assign(
240
+                            {},
241
+                            {
242
+                            group_no: 0,
243
+                            advices: []
244
+                            }
245
+                        )
246
+                        }
247
+                        var initGroupBlock = function (group, advice) {
248
+                        group.group_no = advice.groupno
249
+                        }
250
+
251
+                        var advice_groups = []
252
+                        var group = newGroupObject()
253
+                        for (let index = 0; index < resp_advices.length; index++) {
254
+                        const advice = resp_advices[index]
255
+                        if (advice.groupno == 0) {
256
+                            // 老版本的医嘱
257
+                            if (advice.parent_id > 0) {
258
+                            if (advice_groups.length > 0) {
259
+                                var parent_group = advice_groups[advice_groups.length - 1]
260
+                                if (parent_group.advices.length > 0) {
261
+                                if (parent_group.advices[0].id == advice.parent_id) {
262
+                                    parent_group.advices.push(advice)
263
+                                }
264
+                                }
265
+                            }
266
+                            continue
267
+                            } else {
268
+                            if (group.group_no > 0) {
269
+                                advice_groups.push(group)
270
+                                group = newGroupObject()
271
+                            }
272
+
273
+                            initGroupBlock(group, advice)
274
+                            group.advices.push(advice)
275
+                            advice_groups.push(group)
276
+                            group = newGroupObject()
277
+                            continue
278
+                            }
279
+                        } else {
280
+                            if (group.group_no > 0 && group.group_no != advice.groupno) {
281
+                            advice_groups.push(group)
282
+                            group = newGroupObject()
283
+                            }
284
+                            if (group.group_no == 0) {
285
+                            initGroupBlock(group, advice)
286
+                            }
287
+                            if (group.group_no == advice.groupno) {
288
+                            group.advices.push(advice)
289
+                            }
290
+                        }
291
+                        }
292
+                        if (group.group_no > 0) {
293
+                        // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
294
+                        advice_groups.push(group)
295
+                        }
296
+                        advice_groups = advice_groups
297
+                    } else {
298
+                        advice_groups = []
299
+                    }
300
+                    maps.new_advice = advice_groups
301
+                    }
302
+                 }
303
+               
304
+                 for(let i=0;i<schedules.length;i++){
305
+                    schedules[i].parent_advice = []
306
+                   for(let j=0;j<schedules[i].new_doctor_advice.length;j++){
307
+                      if(schedules[i].new_doctor_advice[j].parent_id== 0){
308
+                         schedules[i].parent_advice.push(schedules[i].new_doctor_advice[j])
309
+                      }
310
+                   }
311
+                  }
312
+                  for(let i=0;i<schedules.length;i++){
313
+                    schedules[i].sort = 0
314
+                    schedules[i].sort = schedules[i].device_number.sort
315
+                    for(let j=0;j<schedules[i].parent_advice.length;j++){
316
+                      schedules[i].parent_advice[j].childAdvice = []
317
+                      for(let z=0;z<schedules[i].new_doctor_advice.length;z++){
318
+                         if(schedules[i].parent_advice[j].id == schedules[i].new_doctor_advice[z].parent_id){
319
+                            schedules[i].parent_advice[j].childAdvice.push(schedules[i].new_doctor_advice[z])
320
+                         }
321
+                      }
322
+                    }
323
+                  }
324
+                  console.log("scheduleMap999999999999",schedules)
325
+                  this.list = schedules.sort(this.compare('sort'))
326
+                
327
+               
328
+              
329
+                console.log("this.list",this.list)
330
+                
331
+                }
332
+            })
333
+        },
334
+        compare (property) {
335
+            return function (a, b) {
336
+                var value1 = a[property]
337
+                var value2 = b[property]
338
+                return value1 - value2
339
+            }
340
+        },
341
+        parseTime: function (time, layout) {
342
+            if (time == 0) {
343
+                return ''
344
+            }
345
+            return parseTime(time, layout)
346
+        },
347
+        getName (val) {
348
+            for (let i = 0; i < this.admin_user.length; i++) {
349
+                if (this.admin_user[i].id == val) {
350
+                    return this.admin_user[i].name
351
+                }
352
+            }
353
+        },
354
+        getAdvice: function(doctor_advice) {
355
+          if (doctor_advice.length > 0) {
356
+            let name = "";
357
+            for (let i = 0; i < doctor_advice.length; i++) {
358
+            let prescribing_number = "";
359
+            let single_dose = "";
360
+            let drug_spec = "";
361
+
362
+            if (doctor_advice[i].prescribing_number > 0) {
363
+                prescribing_number =
364
+                doctor_advice[i].prescribing_number +
365
+                doctor_advice[i].prescribing_number_unit;
366
+            }
367
+            if (doctor_advice[i].single_dose > 0) {
368
+                single_dose =
369
+                " 单次用量 " +
370
+                doctor_advice[i].single_dose +
371
+                doctor_advice[i].single_dose_unit;
372
+            }
373
+
374
+            if (doctor_advice[i].drug_spec > 0) {
375
+                drug_spec =
376
+                doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
377
+            }
378
+
379
+            name =
380
+                name +
381
+                doctor_advice[i].advice_name +
382
+                " " +
383
+                drug_spec +
384
+                " " +
385
+                prescribing_number +
386
+                " " +
387
+                single_dose +
388
+                " " +
389
+                doctor_advice[i].delivery_way +
390
+                " " +
391
+                doctor_advice[i].execution_frequency +
392
+                " " +
393
+                doctor_advice[i].remark +
394
+                "\n";
395
+
396
+            // if (doctor_advice[i].child.length > 0) {
397
+            //     for (let a = 0; a < doctor_advice[i].child.length; a++) {
398
+            //     if (doctor_advice[i].child[a].prescribing_number > 0) {
399
+            //         doctor_advice[i].child[a]["presc"] =
400
+            //         doctor_advice[i].child[a].prescribing_number +
401
+            //         doctor_advice[i].child[a].prescribing_number_unit;
402
+            //     } else {
403
+            //         doctor_advice[i].child[a]["presc"] = "";
404
+            //     }
405
+
406
+            //     if (doctor_advice[i].child[a].single_dose > 0) {
407
+            //         doctor_advice[i].child[a]["single"] =
408
+            //         " " +
409
+            //         " 单次用量 " +
410
+            //         " " +
411
+            //         doctor_advice[i].child[a].single_dose +
412
+            //         doctor_advice[i].child[a].single_dose_unit;
413
+            //     } else {
414
+            //         doctor_advice[i].child[a]["single"] = "";
415
+            //     }
416
+
417
+            //     name =
418
+            //         name +
419
+            //         "▲" +
420
+            //         doctor_advice[i].child[a].advice_name +
421
+            //         "" +
422
+            //         doctor_advice[i].child[a].advice_desc +
423
+            //         doctor_advice[i].child[a].drug_spec_unit +
424
+            //         doctor_advice[i].child[a].presc +
425
+            //         doctor_advice[i].child[a].single +
426
+            //         "\n";
427
+            //     }
428
+            // }
429
+        }
430
+        return name;
431
+      }else{
432
+        return ""
433
+      }
434
+    },
435
+    getSpecialName(drug_id){
436
+        var name = ""
437
+        for(let i=0;i<this.drugList.length;i++){
438
+            if(drug_id == this.drugList[i].id){
439
+            name = this.drugList[i].dose + this.drugList[i].dose_unit + "*" + this.drugList[i].min_number + this.drugList[i].min_unit +"/"+this.drugList[i].max_unit
440
+            }
441
+        }
442
+        return name
443
+     },
444
+
445
+     getweekday(date){
446
+        var weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
447
+
448
+        var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
449
+
450
+        return week;
451
+      }
452
+
453
+    },
454
+    computed: {
455
+    filtedScheduals: function () {
456
+        var scheduleMap = new Object()
457
+        if (this.zone_selected == 0) {
458
+            for (const key in this.scheduleMap) {
459
+            scheduleMap[key] = this.scheduleMap[key]
460
+            }
461
+        } else {
462
+            var zone_name = this.zones[this.zone_selected].text
463
+            scheduleMap[zone_name] = this.scheduleMap[zone_name]
464
+        }
465
+
466
+        if (this.schedule_type_selected != 0) {
467
+            var _scheduleMap = {}
468
+            for (const key in scheduleMap) {
469
+            var origin_schedules = scheduleMap[key]
470
+            var schedules = []
471
+            for (let index = 0; index < origin_schedules.length; index++) {
472
+                const schedule = origin_schedules[index]
473
+                if (schedule.schedule_type == this.schedule_type_selected) {
474
+                schedules.push(schedule)
475
+                }
476
+            }
477
+            if (schedules.length > 0) {
478
+                _scheduleMap[key] = schedules
479
+            }
480
+            }
481
+
482
+            scheduleMap = _scheduleMap
483
+        }
484
+        for (var key in scheduleMap) {
485
+            let mapArr = scheduleMap[key]
486
+            for (let i = 0; i < mapArr.length; i++) {
487
+            mapArr[i]['new_advice'] = []
488
+            }
489
+        }
490
+
491
+        for (var key in scheduleMap) {
492
+            let mapArr = scheduleMap[key]
493
+            for (let i = 0; i < mapArr.length; i++) {
494
+            var maps = mapArr[i]
495
+            var resp_advices = maps.new_doctor_advice
496
+            if (resp_advices.length > 0) {
497
+                var newGroupObject = function () {
498
+                return Object.assign(
499
+                    {},
500
+                    {
501
+                    group_no: 0,
502
+                    advices: []
503
+                    }
504
+                )
505
+                }
506
+                var initGroupBlock = function (group, advice) {
507
+                group.group_no = advice.groupno
508
+                }
509
+
510
+                var advice_groups = []
511
+                var group = newGroupObject()
512
+                for (let index = 0; index < resp_advices.length; index++) {
513
+                const advice = resp_advices[index]
514
+                if (advice.groupno == 0) {
515
+                    // 老版本的医嘱
516
+                    if (advice.parent_id > 0) {
517
+                    if (advice_groups.length > 0) {
518
+                        var parent_group = advice_groups[advice_groups.length - 1]
519
+                        if (parent_group.advices.length > 0) {
520
+                        if (parent_group.advices[0].id == advice.parent_id) {
521
+                            parent_group.advices.push(advice)
522
+                        }
523
+                        }
524
+                    }
525
+                    continue
526
+                    } else {
527
+                    if (group.group_no > 0) {
528
+                        advice_groups.push(group)
529
+                        group = newGroupObject()
530
+                    }
531
+
532
+                    initGroupBlock(group, advice)
533
+                    group.advices.push(advice)
534
+                    advice_groups.push(group)
535
+                    group = newGroupObject()
536
+                    continue
537
+                    }
538
+                } else {
539
+                    if (group.group_no > 0 && group.group_no != advice.groupno) {
540
+                    advice_groups.push(group)
541
+                    group = newGroupObject()
542
+                    }
543
+                    if (group.group_no == 0) {
544
+                    initGroupBlock(group, advice)
545
+                    }
546
+                    if (group.group_no == advice.groupno) {
547
+                    group.advices.push(advice)
548
+                    }
549
+                }
550
+                }
551
+                if (group.group_no > 0) {
552
+                // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加
553
+                advice_groups.push(group)
554
+                }
555
+                advice_groups = advice_groups
556
+            } else {
557
+                advice_groups = []
558
+            }
559
+            maps.new_advice = advice_groups
560
+            }
561
+        }
562
+        console.log("222222",scheduleMap)
563
+        return scheduleMap
564
+        },
565
+       
566
+    
567
+      
568
+    
569
+    },
570
+    created(){
571
+      var time = this.$route.query.time
572
+      var delivery_way = this.$route.query.delivery_way
573
+      this.org_id = this.$store.getters.xt_user.org.id
574
+      console.log("delivery_Way",delivery_way)
575
+      this.delivery_way = delivery_way
576
+      var execution_frequency = this.$route.query.execution_frequency
577
+      this.execution_frequency = execution_frequency
578
+      this.time = moment(time).format('YYYY-MM-DD')
579
+      console.log(11,this.$route.query)
580
+      this.requestSchedualDoctors(time)
581
+    }
582
+}
583
+</script>
584
+
585
+
586
+<style rel="stylesheet/scss" lang="scss" scoped>
587
+.signPrint{
588
+    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
589
+    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
590
+    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
591
+    margin-bottom: 20px;
592
+    padding: 20px 10px;
593
+}
594
+.dialysisTable{
595
+    width:960px;
596
+    margin: 0 auto;
597
+    text-align: center;
598
+    border-collapse: collapse;
599
+}
600
+.order_title_panl {
601
+    text-align: center;
602
+
603
+    .main_title {
604
+      font-size: 18px;
605
+      line-height: 40px;
606
+      font-weight: 500;
607
+    }
608
+}
609
+.dialysisTable tr{
610
+    padding: 10px 0;
611
+}
612
+.dialysisTable th {
613
+    color: #000;
614
+    padding: 0;
615
+    margin: 0;
616
+    height: 30px;
617
+}
618
+.dialysisTable tr td {
619
+    padding: 12px 0;
620
+}
621
+.subadvice_content {
622
+    text-align: left;
623
+    padding-left: 25px !important;
624
+    padding-right: 5px !important;
625
+}
626
+.advice_content {
627
+    text-align: left;
628
+    padding-left: 5px !important;
629
+    padding-right: 5px !important;
630
+    padding: 15px 5px !important;
631
+}
632
+</style>

+ 0 - 0
src/xt_pages/dialysis/scheduleIndex.vue 查看文件


+ 35 - 13
src/xt_pages/dialysis/template/DialysisPrintOrderFortyOne.vue 查看文件

@@ -1658,20 +1658,42 @@ export default {
1658 1658
       }
1659 1659
       return ''
1660 1660
     },
1661
+    // getAge: function(val) {
1662
+    //   if (
1663
+    //     this.org_template_info.template_id == 2 ||
1664
+    //     this.org_template_info.template_id == 0
1665
+    //   ) {
1666
+    //     if (val.age == 0) {
1667
+    //       return jsGetAge(val.birth, '-')
1668
+    //     } else {
1669
+    //       return val.age
1670
+    //     }
1671
+    //   } else {
1672
+    //     return jsGetAge(val.birth, '-')
1673
+    //   }
1674
+    // },
1661 1675
     getAge: function(val) {
1662
-      if (
1663
-        this.org_template_info.template_id == 2 ||
1664
-        this.org_template_info.template_id == 0
1665
-      ) {
1666
-        if (val.age == 0) {
1667
-          return jsGetAge(val.birth, '-')
1668
-        } else {
1669
-          return val.age
1670
-        }
1671
-      } else {
1672
-        return jsGetAge(val.birth, '-')
1673
-      }
1674
-    },
1676
+     
1677
+     if (val.id_card_no) {
1678
+       var thisLen = val.id_card_no.length
1679
+
1680
+       var birth = ''
1681
+       if (thisLen == 15) {
1682
+         birth = '19' + val.id_card_no.substr(6, 6)
1683
+       } else {
1684
+         birth = val.id_card_no.substr(6, 8)
1685
+       }
1686
+       var birthtwo =
1687
+         birth.substr(0, 4) +
1688
+         '-' +
1689
+         birth.substr(4, 2) +
1690
+         '-' +
1691
+         birth.substr(6, 2)
1692
+
1693
+       var age = jsGetAge(birthtwo, '-')
1694
+       return age
1695
+     }
1696
+   },
1675 1697
     newAdviceGroupObject: function() {
1676 1698
       return Object.assign(
1677 1699
         {},

+ 68 - 33
src/xt_pages/dialysis/template/DialysisPrintOrderSix.vue 查看文件

@@ -65,12 +65,18 @@
65 65
             </div>
66 66
67 67
           </div>
68
-          <div class="inline_block">
68
+          <div class="inline_block" v-if="receiverTreatmentAccess.condition!=1">
69 69
             门诊:
70 70
             <div class="under_line" style="width: 30px; text-align: center">
71 71
               <check-box :checked="patientInfo_source_1"></check-box>
72 72
             </div>
73 73
           </div>
74
+          <div class="inline_block" v-if="receiverTreatmentAccess.condition==1">
75
+            住院:
76
+            <div class="under_line" style="width: 30px; text-align: center">
77
+              <check-box :checked="receiverTreatmentAccess.condition == 1"></check-box>
78
+            </div>
79
+          </div>
74 80
           <div class="inline_block">
75 81
             病区:
76 82
             <div class="under_line" style="width: 50px; text-align: center">
@@ -745,6 +751,7 @@
745 751
                       </div>
746 752
                     </div>
747 753
                     <div
754
+                     
748 755
                       class="inline_block"
749 756
                       style="margin-left: 10px; flex: 1"
750 757
                     >
@@ -1447,20 +1454,14 @@
1447 1454
                         <td width="60" v-if="org_id == 9671">血温(°C)</td>
1448 1455
                         <td width="60" v-if="org_id!=9836&&org_id!=9919&&org_id!=9671">透析液温度(°C)</td>
1449 1456
                         <td width="50" v-if="org_id != 10121">
1450
-                          <span v-if="org_id != 0 && org_id !=10469"> 电导度<br />(ms/cm)</span> 
1451
-                          <span v-if="org_id == 0 || org_id ==10469"> 钠浓度<br />(mmol/L)</span> 
1457
+                          <span v-if="org_id != 0 && org_id !=10469 && org_id!=10490"> 电导度<br />(ms/cm)</span> 
1458
+                          <span v-if="org_id ==10469"> 钠浓度<br />(mmol/L)</span> 
1459
+                          <span v-if="org_id == 0 || org_id == 10490"> 置换液的速度<br />(ml/h)</span> 
1452 1460
                         </td>
1453 1461
                         <td width="50" v-if="org_id == 10121">SpO₂<br />(%)</td>
1454 1462
                         <td width="50" v-if="org_id != 3877 && org_id != 10449 && org_id != 0">超滤量<br />(ml)</td>
1455 1463
                         <td width="50" v-if="org_id ==3877 || org_id == 10449 || org_id ==0">累计超滤量<br />(ml)</td>
1456
-                        <td
1457
-                          v-if="
1458
-                            prescription.mode_id == 2 ||
1459
-                            prescription.mode_id == 5 ||
1460
-                            prescription.mode_id == 12
1461
-                          "
1462
-                          width="50"
1463
-                        >
1464
+                        <td v-if="(prescription.mode_id == 2 ||prescription.mode_id == 5 ||prescription.mode_id == 12) &&org_id!=10478 && org_id!=0" width="50">
1464 1465
                           置换量<br />(ml)
1465 1466
                         </td>
1466 1467
                         <td width="50" v-if="org_id == 3877 || org_id == 0 || org_id == 10449">滤前压(mmHg)</td>
@@ -1468,6 +1469,7 @@
1468 1469
                         <td width="50" v-if="org_id == 9919">在线尿素监测</td>  
1469 1470
                         <td width="50" v-if="org_id == 9671">在线尿素监测</td>  
1470 1471
                         <td width="50" v-if="org_id == 9538 || org_id == 9919 || org_id== 9671">血容量<br />(L)</td>
1472
+                        <td width="50" v-if="org_id == 10490 || org_id == 0">碳酸氢钠<br />(ml)</td>
1471 1473
                         <td width="200">病情变化及处理</td>
1472 1474
                       </tr>
1473 1475
 
@@ -1542,9 +1544,9 @@
1542 1544
 
1543 1545
 
1544 1546
                         <td v-if="org_id != 9538 &&org_id != 10121">
1545
-                          <span v-if="org_id!=0&&org_id!=10469"> {{ monitor.conductivity ? monitor.conductivity : "" }}</span>
1546
-                          <span v-if="org_id==0||org_id==10469"> {{ monitor.sodium_concentration ? monitor.sodium_concentration : "" }}</span>
1547
-                          
1547
+                          <span v-if="org_id!=0&&org_id!=10469 && org_id!=10490"> {{ monitor.conductivity ? monitor.conductivity : "" }}</span>
1548
+                          <span v-if="org_id==10469"> {{ monitor.sodium_concentration ? monitor.sodium_concentration : "" }}</span>
1549
+                          <span v-if="org_id==0||org_id==10490"> {{ monitor.replacement_speed ? monitor.replacement_speed : "" }}</span>
1548 1550
                         </td>
1549 1551
 
1550 1552
                       
@@ -1563,9 +1565,10 @@
1563 1565
                         </td> -->
1564 1566
                         <td
1565 1567
                           v-if="
1566
-                            prescription.mode_id == 2 ||
1568
+                            (prescription.mode_id == 2 ||
1567 1569
                             prescription.mode_id == 5 ||
1568
-                            prescription.mode_id == 12
1570
+                            prescription.mode_id == 12)
1571
+                            && org_id!=0 && org_id!=10478
1569 1572
                           "
1570 1573
                           style="width: 50px"
1571 1574
                         >
@@ -1584,6 +1587,9 @@
1584 1587
                         <td width="50" v-if="org_id == 9538 || org_id == 9919 || org_id == 9671">
1585 1588
                           {{ monitor.accumulated_blood_volume }}
1586 1589
                         </td>
1590
+                        <td width="50" v-if="org_id ==10490 || org_id == 0">
1591
+                          {{ monitor.dicarbonate }}
1592
+                        </td>
1587 1593
                         <td style="line-height: 16px; padding: 0px">
1588 1594
                           <div
1589 1595
                             style="
@@ -1638,14 +1644,15 @@
1638 1644
                         <td v-if="org_id == 9671 || org_id == 9919"></td>
1639 1645
                         <td
1640 1646
                           v-if="
1641
-                            prescription.mode_id == 2 ||
1647
+                            (prescription.mode_id == 2 ||
1642 1648
                             prescription.mode_id == 5 ||
1643
-                            prescription.mode_id == 12
1649
+                            prescription.mode_id == 12) && org_id!=10478
1644 1650
                           "
1645 1651
                           width="50"
1646 1652
                         ></td>
1647 1653
                         <td v-if="org_id == 9919||org_id == 9538 || org_id == 9671"></td>
1648 1654
                         <td v-if="org_id == 9538"></td>
1655
+                        <td v-if="org_id == 10490 || org_id == 0"></td>
1649 1656
                         <td style="line-height: 16px; padding: 0px">
1650 1657
                           <div
1651 1658
                             style="
@@ -1872,12 +1879,18 @@
1872 1879
               </div>
1873 1880
1874 1881
             </div>
1875
-            <div class="inline_block">
1876
-              门诊:
1877
-              <div class="under_line" style="width: 30px; text-align: center">
1878
-                <check-box :checked="patientInfo_source_1"></check-box>
1879
-              </div>
1882
+            <div class="inline_block" v-if="receiverTreatmentAccess.condition!=1">
1883
+            门诊:
1884
+            <div class="under_line" style="width: 30px; text-align: center">
1885
+              <check-box :checked="patientInfo_source_1"></check-box>
1886
+            </div>
1887
+          </div>
1888
+          <div class="inline_block" v-if="receiverTreatmentAccess.condition==1">
1889
+            住院:
1890
+            <div class="under_line" style="width: 30px; text-align: center">
1891
+              <check-box :checked="receiverTreatmentAccess.condition == 1"></check-box>
1880 1892
             </div>
1893
+          </div>
1881 1894
             <div class="inline_block">
1882 1895
               病区:
1883 1896
               <div class="under_line" style="width: 50px; text-align: center">
@@ -3921,18 +3934,40 @@ export default {
3921 3934
       }
3922 3935
       return "";
3923 3936
     },
3924
-    getAge: function (val) {
3925
-      if (
3926
-        this.org_template_info.template_id == 2 ||
3927
-        this.org_template_info.template_id == 0
3928
-      ) {
3929
-        if (val.age == 0) {
3930
-          return jsGetAge(val.birth, "-");
3937
+    // getAge: function (val) {
3938
+    //   if (
3939
+    //     this.org_template_info.template_id == 2 ||
3940
+    //     this.org_template_info.template_id == 0
3941
+    //   ) {
3942
+    //     if (val.age == 0) {
3943
+    //       return jsGetAge(val.birth, "-");
3944
+    //     } else {
3945
+    //       return val.age;
3946
+    //     }
3947
+    //   } else {
3948
+    //     return this.getoldAge();
3949
+    //   }
3950
+    // },
3951
+    getAge: function(val) {
3952
+     
3953
+      if (val.id_card_no) {
3954
+        var thisLen = val.id_card_no.length
3955
+
3956
+        var birth = ''
3957
+        if (thisLen == 15) {
3958
+          birth = '19' + val.id_card_no.substr(6, 6)
3931 3959
         } else {
3932
-          return val.age;
3960
+          birth = val.id_card_no.substr(6, 8)
3933 3961
         }
3934
-      } else {
3935
-        return this.getoldAge();
3962
+        var birthtwo =
3963
+          birth.substr(0, 4) +
3964
+          '-' +
3965
+          birth.substr(4, 2) +
3966
+          '-' +
3967
+          birth.substr(6, 2)
3968
+
3969
+        var age = jsGetAge(birthtwo, '-')
3970
+        return age
3936 3971
       }
3937 3972
     },
3938 3973
     newAdviceGroupObject: function () {

+ 93 - 49
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyfour.vue 查看文件

@@ -20,7 +20,9 @@
20 20
           <h1 style="text-align: center;">血液透析(滤过)记录表单</h1>
21 21
           <div>
22 22
             <div>
23
-              <div style="display:inline-block; ;">病历号:</div>
23
+              <div style="display:inline-block; ;">病历号:
24
+                {{patientInfo.record_number?patientInfo.record_number:"" }}
25
+              </div>
24 26
               <div style="display:inline-block;margin-left: 90px;">
25 27
                 姓名:{{ patientInfo.name }}
26 28
               </div>
@@ -54,7 +56,8 @@
54 56
                 <td colspan="3" style="border:1px solid black">
55 57
                   <div style="display: inline-block; word-break: break-all;word-wrap: break-word;">
56 58
                     上机前病情:
57
-                    {{ predialysis.symptom_before_dialysis ? predialysis.symptom_before_dialysis : "/" }}
59
+                    <!-- {{ predialysis.symptom_before_dialysis ? predialysis.symptom_before_dialysis : "/" }} -->
60
+                    {{ predialysis.befor_symptoms? predialysis.befor_symptoms:"" }}
58 61
                   </div>
59 62
 
60 63
                 </td>
@@ -63,7 +66,7 @@
63 66
                 <td colspan="3">
64 67
                   <div style="display: inline-block; word-break: break-all;word-wrap: break-word;">
65 68
                     疾病诊断:
66
-                    {{ patientInfo.diagnose }}
69
+                    {{ getDiagnosis(prescriptionInfo.patient_diagnosis) }}
67 70
                   </div>
68 71
                 </td>
69 72
               </tr>
@@ -74,30 +77,31 @@
74 77
                     <span v-else-if="prescription.mode_id == 1">HD</span>
75 78
                     <span v-else-if="prescription.mode_id == 2">HDF</span>
76 79
                     <span v-else-if="prescription.mode_id == 3">HD+HP</span>
77
-                    <span v-else-if="prescription.mode_id == 4">HF</span>
78
-                    <span v-else-if="prescription.mode_id == 5">SCUF</span>
79
-                    <span v-else-if="prescription.mode_id == 6">IUF</span>
80
-                    <span v-else-if="prescription.mode_id == 7">HFHD</span>
81
-                    <span v-else-if="prescription.mode_id == 8">HFHD+HP</span>
82
-                    <span v-else-if="prescription.mode_id == 9">PHF</span>
83
-                    <span v-else-if="prescription.mode_id == 10">HFR</span>
84
-                    <span v-else-if="prescription.mode_id == 11">HDF+HP</span>
85
-                    <span v-else-if="prescription.mode_id == 12">CRRT</span>
86
-                    <span v-else-if="prescription.mode_id == 13">腹水回输</span>
87
-                    <span v-else-if="prescription.mode_id == 14">IUF+HD</span>
88
-                    <span v-else-if="prescription.mode_id == 15">UF</span>
89
-                    <span v-else-if="prescription.mode_id == 16">HD+</span>
90
-                    <span v-else-if="prescription.mode_id == 17">血浆胆红素吸附+HDF</span>
91
-                    <span v-else-if="prescription.mode_id == 18">血浆胆红素吸附</span>
92
-                    <span v-else-if="prescription.mode_id == 19">I-HDF</span>
93
-                    <span v-else-if="prescription.mode_id == 20">HD高通</span>
94
-                    <span v-else-if="prescription.mode_id == 21">CVVH</span>
95
-                    <span v-else-if="prescription.mode_id == 22">CVVHD</span>
96
-                    <span v-else-if="prescription.mode_id == 23">CVVHDF</span>
97
-                    <span v-else-if="prescription.mode_id == 24">PE</span>
98
-                    <span v-else-if="prescription.mode_id == 25">血浆胆红素吸附+HP</span>
99
-                    <span v-else-if="prescription.mode_id == 26">HPD</span>
100
-                    <span v-else-if="prescription.mode_id == 27">HDP</span>
80
+                    <span v-else-if="prescription.mode_id == 4">HP</span>
81
+                    <span v-else-if="prescription.mode_id == 5">HF</span>
82
+                    <span v-else-if="prescription.mode_id == 6">SCUF</span>
83
+                    <span v-else-if="prescription.mode_id == 7">IUF</span>
84
+                    <span v-else-if="prescription.mode_id == 8">HFHD</span>
85
+                    <span v-else-if="prescription.mode_id == 9">HFHD+HP</span>
86
+                    <span v-else-if="prescription.mode_id == 10">PHF</span>
87
+                    <span v-else-if="prescription.mode_id == 11">HFR</span>
88
+                    <span v-else-if="prescription.mode_id == 12">HDF+HP</span>
89
+                    <span v-else-if="prescription.mode_id == 13">CRRT</span>
90
+                  
91
+                    <span v-else-if="prescription.mode_id == 19">IUF+HD</span>
92
+                    <span v-else-if="prescription.mode_id == 20">UF</span>
93
+                    <span v-else-if="prescription.mode_id == 21">HD+</span>
94
+                    <span v-else-if="prescription.mode_id == 22">血浆胆红素吸附+HDF</span>
95
+                    <span v-else-if="prescription.mode_id == 23">血浆胆红素吸附</span>
96
+                    <span v-else-if="prescription.mode_id == 24">I-HDF</span>
97
+                    <span v-else-if="prescription.mode_id == 25">HD高通</span>
98
+                    <span v-else-if="prescription.mode_id == 26">CVVH</span>
99
+                    <span v-else-if="prescription.mode_id == 27">CVVHD</span>
100
+                    <span v-else-if="prescription.mode_id == 28">CVVHDF</span>
101
+                    <span v-else-if="prescription.mode_id == 29">PE</span>
102
+                    <span v-else-if="prescription.mode_id == 30">血浆胆红素吸附+HP</span>
103
+                    <span v-else-if="prescription.mode_id == 31">HPD</span>
104
+                    <span v-else-if="prescription.mode_id == 32">HDP</span>
101 105
                 </td>
102 106
                 <td>
103 107
                   <span
@@ -765,7 +769,9 @@ export default {
765 769
       adminUser: [],
766 770
       bloodAccessParOpera: {},
767 771
       lastafterdialysis: {},
768
-      projects:[]
772
+      projects:[],
773
+      prescriptionInfo:{},
774
+      patientDiagnose:[]
769 775
     };
770 776
   },
771 777
   computed: {},
@@ -886,7 +892,8 @@ export default {
886 892
         // this.receiverTreatmentAccess =
887 893
         //     response.data.data.receiverTreatmentAccess;
888 894
         this.assessmentafter = response.data.data.assessmentAfterDislysis;
889
-
895
+        this.prescriptionInfo = response.data.data.prescriptionInfo
896
+        this.patientDiagnose = response.data.data.patientDiagnose
890 897
         // this.sick_condition_arr.forEach((o) => {
891 898
         //     if (this.receiverTreatmentAccess.sick_condition == o.id) {
892 899
         //     this.sick_condition = o.name;
@@ -981,11 +988,12 @@ export default {
981 988
 
982 989
         let projects = [];
983 990
         response.data.data.projects.map((item) => {
984
-          if (item.type == 2) {
991
+          if (item.type == 2 && item.project.is_print == 1) {
985 992
             projects.push(item);
986 993
           }
987 994
         });
988 995
         this.projects = projects;
996
+
989 997
         if (this.doctor_advices.length + this.projects.length <= 6) {
990 998
           var nl = 6 - (this.doctor_advices.length + this.projects.length);
991 999
           this.print_length = 6;
@@ -1004,20 +1012,22 @@ export default {
1004 1012
         console.log("advices",this.advices)
1005 1013
         console.log("this.projects", this.projects);
1006 1014
 
1007
-        var objProject = {advice_name:"",start_time:"",single_dose:"",single_dose_unit:"",}
1015
+        // var objProject = {advice_name:"",start_time:"",single_dose:"",single_dose_unit:"",}
1008 1016
         if(this.projects!=null && this.projects.length >0){
1009 1017
            for(let i=0;i<this.projects.length;i++){
1010
-              if(this.projects[i].project_id ==  7620){
1011
-                 objProject.advice_name = this.projects[i].project.project_name
1012
-                 objProject.start_time = this.projects[i].start_time
1013
-                 objProject.single_dose = this.projects[i].single_dose
1014
-                 objProject.single_dose_unit = this.projects[i].unit
1015
-                 objProject.execution_time = this.projects[i].execution_time
1016
-                 objProject.execution_staff= this.projects[i].execution_staff
1017
-              }
1018
+             if(this.projects[i].type== 2){
1019
+              this.projects[i].advice_name = this.projects[i].project.project_name
1020
+              this.projects[i].start_time = this.projects[i].start_time
1021
+              this.projects[i].single_dose = this.projects[i].single_dose
1022
+              this.projects[i].single_dose_unit = this.projects[i].unit
1023
+              this.projects[i].execution_time = this.projects[i].execution_time
1024
+              this.projects[i].execution_staff= this.projects[i].execution_staff 
1025
+              this.advices.push(this.projects[i])
1026
+             }
1027
+             
1018 1028
            }
1019 1029
         }
1020
-        this.advices.push(objProject)
1030
+        
1021 1031
 
1022 1032
         var tableAdvice = this.advices;
1023 1033
 
@@ -1098,6 +1108,8 @@ export default {
1098 1108
           this.advices = tableAdvice;
1099 1109
         }
1100 1110
 
1111
+        console.log("advices-----------------",this.advices)
1112
+
1101 1113
  
1102 1114
          
1103 1115
 
@@ -1164,20 +1176,52 @@ export default {
1164 1176
       }
1165 1177
       return ''
1166 1178
     },
1179
+    // getAge: function (val) {
1180
+    //   if (
1181
+    //     this.org_template_info.template_id == 2 ||
1182
+    //     this.org_template_info.template_id == 0
1183
+    //   ) {
1184
+    //     if (val.age == 0) {
1185
+    //       return jsGetAge(val.birth, "-");
1186
+    //     } else {
1187
+    //       return val.age;
1188
+    //     }
1189
+    //   } else {
1190
+    //     return jsGetAge(val.birth, "-");
1191
+    //   }
1192
+    // },
1167 1193
     getAge: function (val) {
1168
-      if (
1169
-        this.org_template_info.template_id == 2 ||
1170
-        this.org_template_info.template_id == 0
1171
-      ) {
1172
-        if (val.age == 0) {
1173
-          return jsGetAge(val.birth, "-");
1194
+      if(val!=undefined){
1195
+        var thisLen = val.id_card_no.length;
1196
+        var birth = "";
1197
+        if (thisLen == 15) {
1198
+          birth = "19" + val.id_card_no.substr(6, 6);
1174 1199
         } else {
1175
-          return val.age;
1200
+          birth = val.id_card_no.substr(6, 8);
1176 1201
         }
1177
-      } else {
1178
-        return jsGetAge(val.birth, "-");
1202
+        var birthtwo =
1203
+          birth.substr(0, 4) +
1204
+          "-" +
1205
+          birth.substr(4, 2) +
1206
+          "-" +
1207
+          birth.substr(6, 2);
1208
+
1209
+        var age = jsGetAge(birthtwo, "-");
1210
+        return age;
1179 1211
       }
1212
+    
1180 1213
     },
1214
+   
1215
+    getDiagnosis(id) {
1216
+      let arr = id.split(',')
1217
+      var name = ''
1218
+      for (let i = 0; i < this.patientDiagnose.length; i++) {
1219
+        if (arr.indexOf(String(this.patientDiagnose[i].id)) > -1) {
1220
+          name += this.patientDiagnose[i].class_name + ' '
1221
+        }
1222
+      }
1223
+      return name
1224
+    }
1181 1225
   },
1182 1226
   created() {
1183 1227
     var bloodAccessParOpera = getDataConfig(

+ 48 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderThirteen.vue 查看文件

@@ -129,10 +129,19 @@
129 129
             </div>
130 130
             <div class="inline_block" style="margin-right:30px;">
131 131
               透析液配方
132
-              <div class="inline_block under_line" style="width:150px;text-align: center;">
132
+              <div class="inline_block under_line" style="width:100px;text-align: center;">
133 133
                   {{ prescription.dialysate_formulation_name ? prescription.dialysate_formulation_name : ''}}
134 134
               </div>
135 135
             </div>
136
+           
137
+            <div class="inline_block" style="margin-right:30px;">
138
+              通路形成时间
139
+              <div class="inline_block under_line" style="width:100px;text-align: center;">
140
+                {{getTimeOne(predialysis.pathway_formation_time) }}
141
+              </div>
142
+            </div>
143
+          
144
+         
136 145
         </div>
137 146
         <div class="row">
138 147
           血管通路
@@ -162,17 +171,42 @@
162 171
             <label-box :isChecked="predialysis.blood_access_part_id.indexOf('其他')>-1?true:false" showValue="其他"></label-box>
163 172
             &nbsp;
164 173
           </div>
174
+        
165 175
         </div>
166 176
         <div class="row">
167 177
           导管
168
-          <div class="inline_block under_line" style="width:200px;text-align: left;">
178
+          <div class="inline_block under_line" style="width:95%;text-align: left;">
169 179
             {{ predialysis.catheter ? predialysis.catheter : "" }}
170 180
           </div>
181
+        
182
+         
183
+        </div>
184
+        <div class="row">
171 185
           内瘘
172
-          <div class="inline_block under_line" style="width:200px;text-align: left;">
186
+          <div class="inline_block under_line" style="width:95%;text-align: left;">
173 187
             {{ predialysis.internal_fistula ? predialysis.internal_fistula : "" }}
174 188
           </div>
175 189
         </div>
190
+        <div class="row">
191
+          <!-- 导管评估项目
192
+          <div class="inline_block under_line" style="width:200px;text-align: left;">
193
+            {{ predialysis.catheter_evaluation_program ? predialysis.catheter_evaluation_program : "" }}
194
+          </div>
195
+          置管部位皮肤
196
+          <div class="inline_block under_line" style="width:200px;text-align: left;">
197
+            {{ predialysis.skin_site_catheterization ? predialysis.skin_site_catheterization : "" }}
198
+          </div>
199
+          是否通畅
200
+          <div class="inline_block under_line" style="width:100px;text-align: left;">
201
+             <span v-if="predialysis.whether_unobstructed ==1">是</span>
202
+             <span v-if="predialysis.whether_unobstructed ==2">否</span>
203
+          </div> -->
204
+          <!-- 留置必要
205
+          <div class="inline_block under_line" style="width:100px;text-align: left;">
206
+            <span v-if="predialysis.lien_necessary ==1">是</span>
207
+            <span v-if="predialysis.lien_necessary ==2">否</span>
208
+          </div> -->
209
+        </div>
176 210
         <div class="row">
177 211
           抗凝药物
178 212
           <div class="inline_block under_line" style="width:92%;text-align: left;">
@@ -913,6 +947,17 @@ export default {
913 947
       }
914 948
       return ''
915 949
     },
950
+
951
+    getTimeOne(val) {
952
+        if(val < 0){
953
+          return ""
954
+        }
955
+        if(val == ""){
956
+        return ""
957
+        }else {
958
+        return uParseTime(val, '{y}-{m}-{d}')
959
+        }
960
+     },
916 961
     printThisPage() {
917 962
       var ptime = Math.round(new Date().getTime() / 1000)
918 963
       this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')

+ 24 - 3
src/xt_pages/dialysis/template/DialysisPrintOrderTwentySeven.vue 查看文件

@@ -2277,11 +2277,32 @@ export default {
2277 2277
       }
2278 2278
       return ''
2279 2279
     },
2280
+    // getAge: function(val) {
2281
+    //   if (val.birthday != 0) {
2282
+    //     return jsGetAge(val.birth, '-')
2283
+    //   }
2284
+    //   return ''
2285
+    // },
2280 2286
     getAge: function(val) {
2281
-      if (val.birthday != 0) {
2282
-        return jsGetAge(val.birth, '-')
2287
+      if (val.id_card_no == undefined) {
2288
+        return false
2283 2289
       }
2284
-      return ''
2290
+      var thisLen = val.id_card_no.length
2291
+      var birth = ''
2292
+      if (thisLen == 15) {
2293
+        birth = '19' + val.id_card_no.substr(6, 6)
2294
+      } else {
2295
+        birth = val.id_card_no.substr(6, 8)
2296
+      }
2297
+      var birthtwo =
2298
+        birth.substr(0, 4) +
2299
+        '-' +
2300
+        birth.substr(4, 2) +
2301
+        '-' +
2302
+        birth.substr(6, 2)
2303
+
2304
+      var age = jsGetAge(birthtwo, '-')
2305
+      return age
2285 2306
     },
2286 2307
     checkIdCardNo(val) {
2287 2308
       var thisLen = val.length

+ 7 - 2
src/xt_pages/home/index.vue 查看文件

@@ -87,13 +87,18 @@
87 87
 
88 88
             <el-table-column label="检查日期" align="center">
89 89
               <template slot-scope="scope">
90
+                
90 91
                 <span
91 92
                   v-if="dateCompare(scope.row.infectious_next_record_time) == 1"
92
-                >{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
93
+                >
94
+                <span v-if="parseInt(scope.row.infectious_next_record_time)>100000000">{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span> 
95
+                </span>
93 96
                 <span
94 97
                   v-if="dateCompare(scope.row.infectious_next_record_time) == 2"
95 98
                   style="color: red"
96
-                >{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span>
99
+                >
100
+                <span v-if="parseInt(scope.row.infectious_next_record_time)>100000000">{{ scope.row.infectious_next_record_time | parseTime('{y}-{m}-{d}')}}</span> 
101
+              </span>
97 102
               </template>
98 103
             </el-table-column>
99 104
 

+ 414 - 415
src/xt_pages/hospitalStation/batchStatementTemplate/hospitalBatchPrint.vue 查看文件

@@ -1,421 +1,420 @@
1 1
 <template>
2
-    <div id="statement-print" class="statement-print">
3
-      <div  v-for="(info,index) in infos">
4
-      <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
5
-      <table class="statementTable" border="1">
6
-        <tr>
7
-          <td width="80">机构名称</td>
8
-          <td colspan="4">{{info.fixmedins_name}}</td>
9
-          <td width="80">机构编码</td>
10
-          <td colspan="4">{{info.fixmedins_code}}</td>
11
-          <td width="100">医保结算级别</td>
12
-          <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
13
-          <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
14
-          <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
15
-          <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
16
-          <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
17
-          <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
18
-          <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
19
-          <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
20
-          <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
21
-          <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
22
-          <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
23
-          <td width="100" v-else></td>
24
-  
25
-        </tr>
26
-        <tr>
27
-          <td width="90">就医登记号</td>
28
-          <td colspan="11">{{info.mdtrt_id}}</td>
29
-        </tr>
30
-        <tr>
31
-          <td width="80">姓名</td>
32
-          <td width="80">{{info.psn_name}}</td>
33
-          <td width="80">性别</td>
34
-          <td width="50" v-if="info.gend == '1'">男</td>
35
-          <td width="50" v-if="info.gend == '2'">女</td>
36
-  
37
-          <td width="80">出生日期</td>
38
-          <td width="100">{{info.brdy}}</td>
39
-          <td width="90">个人电脑号</td>
40
-          <td width="110">{{info.psn_no}}</td>
41
-          <td width="80">人员类别</td>
42
-          <td colspan="3" v-if="info.psn_type == '11'">在职</td>
43
-          <td colspan="3" v-if="info.psn_type == '1101'">职工在职</td>
44
-          <td colspan="3" v-if="info.psn_type == '1102'">公务员在职</td>
45
-          <td colspan="3" v-if="info.psn_type == '1103'">灵活就业人员在职</td>
46
-          <td colspan="3" v-if="info.psn_type == '1160'">地方其他扩展人员</td>
47
-  
48
-  
49
-          <td colspan="3" v-if="info.psn_type == '12'">退休人员</td>
50
-          <td colspan="3" v-if="info.psn_type == '1201'">职工退休</td>
51
-          <td colspan="3" v-if="info.psn_type == '1202'">公务员退休</td>
52
-          <td colspan="3" v-if="info.psn_type == '1203'">灵活就业人员退休</td>
53
-          <td colspan="3" v-if="info.psn_type == '1260'">地方其他扩展人员</td>
54
-  
55
-  
56
-          <td colspan="3" v-if="info.psn_type == '13'">离休</td>
57
-          <td colspan="3" v-if="info.psn_type == '1300'">离休人员</td>
58
-          <td colspan="3" v-if="info.psn_type == '1360'">地方其他扩展人员</td>
59
-  
60
-          <td colspan="3" v-if="info.psn_type == '14'">居民(未成年)</td>
61
-          <td colspan="3" v-if="info.psn_type == '1401'">新生儿</td>
62
-          <td colspan="3" v-if="info.psn_type == '1402'">学龄前儿童</td>
63
-          <td colspan="3" v-if="info.psn_type == '1403'">中小学生</td>
64
-          <td colspan="3" v-if="info.psn_type == '1404'">大学生</td>
65
-          <td colspan="3" v-if="info.psn_type == '1405'">未成年(未入学)</td>
66
-  
67
-  
68
-          <td colspan="3" v-if="info.psn_type == '15'">居民(成年)</td>
69
-          <td colspan="3" v-if="info.psn_type == '1501'">普通居民(成年)</td>
70
-          <td colspan="3" v-if="info.psn_type == '1560'">地方其他扩展身份</td>
71
-  
72
-          <td colspan="3" v-if="info.psn_type == '16'">居民(老年)</td>
73
-  
74
-  
75
-  
76
-        </tr>
77
-        <tr>
78
-          <td>单位名称</td>
79
-          <td colspan="5">{{info.emp_name}}</td>
80
-          <td width="80">联系电话</td>
81
-          <td width="110">{{info.patient.phone}}</td>
82
-          <td width="80">身份证号</td>
83
-          <td colspan="3">{{info.certno}}</td>
84
-        </tr>
85
-        <tr>
86
-          <td>住院号</td>
87
-          <td>{{info.number}}</td>
88
-          <td>科别</td>
89
-          <td width="100"></td>
90
-          <td>床号</td>
91
-          <td></td>
92
-          <td>入院日期</td>
93
-          <td>{{info.begndate}}</td>
94
-          <td>出院日期</td>
95
-          <td width="100">{{info.enddate}}</td>
96
-          <td>住院天数</td>
97
-          <td>{{getDay(info.begndate,info.enddate)}}</td>
98
-  
99
-        </tr>
100
-        <tr>
101
-          <td>险种</td>
102
-          <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
103
-          <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
104
-          <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
105
-          <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
106
-          <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
107
-          <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
108
-          <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
109
-          <td>入院第一诊断</td>
110
-          <td colspan="3">{{info.diagnosis}}</td>
111
-          <td>出院第一诊断</td>
112
-          <td colspan="4">{{info.diagnosis}}</td>
113
-  
114
-  
115
-        </tr>
116
-        <tr>
117
-          <td>业务类别</td>
118
-          <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
119
-          <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
120
-          <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
121
-          <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊慢性病</td>
122
-          <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
123
-          <!--        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>-->
124
-          <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
125
-  
126
-          <td>结算时间</td>
127
-          <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time.split(' ')[0]}}</td>
128
-        </tr>
129
-        <tr>
130
-          <td colspan="12" style="text-align:left;padding-left:10px;">
131
-            本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
132
-            (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.psn_pay - info.preselfpay_amt).toFixed(2)}} )
133
-  
134
-          </td>
135
-        </tr>
136
-        <tr>
137
-          <td>费用名称</td>
138
-          <td colspan="2">总费用</td>
139
-          <td>自费</td>
140
-          <td colspan="2">部分项目自付</td>
141
-          <td>费用名称</td>
142
-          <td colspan="2">总费用</td>
143
-          <td>自费</td>
144
-          <td colspan="2">部分项目自付</td>
145
-        </tr>
146
-        <tr>
147
-          <td>床位费</td>
148
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
149
-          <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
150
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
151
-          <td>西成药</td>
152
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
153
-          <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
154
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
155
-        </tr>
156
-        <tr>
157
-          <td>中药费</td>
158
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
159
-          <td style="text-align:right;padding-right:10px;">0</td>
160
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
161
-          <td>中成药</td>
162
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
163
-          </td>
164
-          <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
165
-          <td colspan="2" style="text-align:right;padding-right:10px;">
166
-            {{info.chinese_traditional_medicine_cost_part_self_total}}
167
-          </td>
168
-        </tr>
169
-        <tr>
170
-          <td>中草药</td>
171
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
172
-          <td style="text-align:right;padding-right:10px;">0</td>
173
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
-          <td>检查费</td>
175
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
176
-          <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
177
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
178
-        </tr>
179
-        <tr>
180
-          <td>治疗费</td>
181
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
182
-          <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
183
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
184
-          <td>放射费</td>
185
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
186
-          <td style="text-align:right;padding-right:10px;">0</td>
187
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
188
-        </tr>
189
-        <tr>
190
-          <td>手术费</td>
191
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
192
-          <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
193
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
194
-          <td>化验费</td>
195
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
196
-          <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
197
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
198
-        </tr>
199
-        <tr>
200
-          <td>输血费</td>
201
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
202
-          <td style="text-align:right;padding-right:10px;">0</td>
203
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
-          <td>输氧费</td>
205
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
206
-          <td style="text-align:right;padding-right:10px;">0</td>
207
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
208
-        </tr>
209
-        <tr>
210
-          <td>其他</td>
211
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
212
-          <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
213
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
214
-          <td>麻醉费</td>
215
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
216
-          <td style="text-align:right;padding-right:10px;">0</td>
217
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
218
-        </tr>
219
-        <tr>
220
-          <td>材料费</td>
221
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
222
-          <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
223
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
224
-          <td>特殊检查费</td>
225
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
226
-          <td style="text-align:right;padding-right:10px;">0</td>
227
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
228
-        </tr>
229
-        <tr>
230
-          <td>特殊治疗费</td>
231
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
232
-          <td style="text-align:right;padding-right:10px;">0</td>
233
-          <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
234
-          <td style="text-align:right;padding-right:10px;"></td>
235
-          <td colspan="2" style="text-align:right;padding-right:10px;"></td>
236
-          <td style="text-align:right;padding-right:10px;"></td>
237
-          <td colspan="2" style="text-align:right;padding-right:10px;"></td>
238
-        </tr>
239
-        <tr>
240
-          <td>合计</td>
241
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
242
-            parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
243
-            parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
244
-            parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
245
-            parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
246
-          </td>
247
-          <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
248
-            parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
249
-            parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
250
-            parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
251
-            parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
252
-          </td>
253
-          <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
254
-            parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
255
-            parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
256
-            parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
257
-            parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
258
-            parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
259
-          </td>
260
-          <td style="text-align:right;padding-right:10px;"></td>
261
-          <td colspan="2" style="text-align:right;padding-right:10px;"></td>
262
-          <td style="text-align:right;padding-right:10px;"></td>
263
-          <td colspan="2" style="text-align:right;padding-right:10px;"></td>
264
-        </tr>
265
-        <tr>
266
-          <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
267
-          <td colspan="3">{{info.hifp_pay}}</td>
268
-          <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
269
-          <td colspan="3">{{info.hifob_pay}}</td>
270
-        </tr>
271
-        <tr>
272
-          <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
273
-          <td colspan="3">{{info.hifmi_pay}}</td>
274
-          <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
275
-          <td colspan="3">{{info.hifes_pay}}</td>
276
-        </tr>
277
-        <tr>
278
-          <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
279
-          <td colspan="3">{{info.maf_pay}}</td>
280
-          <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
281
-          <td colspan="3">{{info.cvlserv_pay}}</td>
282
-        </tr>
283
-  
284
-        <tr>
285
-          <td colspan="3" style="text-align:left;padding-left:10px;">其他基金支付</td>
286
-          <td colspan="3">{{info.oth_pay}}</td>
287
-          <td colspan="3" style="text-align:left;padding-left:10px;">个人账户支付</td>
288
-          <td colspan="3">{{info.acct_pay}}</td>
289
-        </tr>
290
-        <tr>
291
-          <td>收款人:</td>
292
-          <td colspan="2">{{info.charge_admin.user_name}}</td>
293
-          <td>审核人:</td>
294
-          <td colspan="2">{{info.p_admin.user_name}}</td>
295
-          <td>制单人:</td>
296
-          <td colspan="2">{{info.p_admin.user_name}}</td>
297
-          <td>打印日期</td>
298
-          <td colspan="2">{{getNowTime()}}</td>
299
-        </tr>
300
-        <tr>
301
-          <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
302
-            注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
303
-            &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
304
-            &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
305
-          </td>
306
-        </tr>
307
-        <tr>
308
-          <td colspan="12" style="text-align:left;padding-left:10px;">
309
-            病人家属签字:
310
-          </td>
311
-        </tr>
312
-      </table>
313
-    </div>
314
-    </div>
315
-  </template>
316
-  <script>
317
-  
318
-  export default {
319
-    name: 'hospitalBatchPrint',
320
-    props: {
321
-      infos:{
322
-        type: Array,
323
-        default: function() {
324
-          return []
325
-        }
326
-      },
327
-      info: {
328
-        type: Object,
329
-        default: function() {
330
-          return {}
331
-        }
332
-      }, p_admin: {
333
-        type: Object,
334
-        default: function() {
335
-          return {}
336
-        }
337
-      }, charge_admin: {
338
-        type: Object,
339
-        default: function() {
340
-          return {}
341
-        },
342
-      },his: {
343
-        type: Object,
344
-        default: function() {
345
-          return {}
346
-        },
347
-      },his_record: {
348
-        type: Object,
349
-        default: function() {
350
-          return {}
351
-        },
352
-      },patient:{
353
-        type: Object,
354
-        default: function() {
355
-          return {}
356
-        },
357
-  
2
+  <div id="statement-print" class="statement-print">
3
+    <div  v-for="(info,index) in infos">
4
+    <div class="statementTitle">广东省社会医疗保险医疗费用结算单</div>
5
+    <table class="statementTable" border="1">
6
+      <tr>
7
+        <td width="80">机构名称</td>
8
+        <td colspan="4">{{info.fixmedins_name}}</td>
9
+        <td width="80">机构编码</td>
10
+        <td colspan="4">{{info.fixmedins_code}}</td>
11
+        <td width="100">医保结算级别</td>
12
+        <td width="100" v-if="info.hosp_lv == '1'">三级特等</td>
13
+        <td width="100" v-if="info.hosp_lv == '2'">三级甲等</td>
14
+        <td width="100" v-if="info.hosp_lv == '3'">三级乙等</td>
15
+        <td width="100" v-if="info.hosp_lv == '4'">三级丙等</td>
16
+        <td width="100" v-if="info.hosp_lv == '5'">二级甲等</td>
17
+        <td width="100" v-if="info.hosp_lv == '6'">二级乙等</td>
18
+        <td width="100" v-if="info.hosp_lv == '7'">二级丙等</td>
19
+        <td width="100" v-if="info.hosp_lv == '8'">一级甲等</td>
20
+        <td width="100" v-if="info.hosp_lv == '9'">一级乙等</td>
21
+        <td width="100" v-if="info.hosp_lv == '10'">一级丙等</td>
22
+        <td width="100" v-if="info.hosp_lv == '11'">无等级</td>
23
+        <td width="100" v-else></td>
24
+
25
+      </tr>
26
+      <tr>
27
+        <td width="90">就医登记号</td>
28
+        <td colspan="11">{{info.mdtrt_id}}</td>
29
+      </tr>
30
+      <tr>
31
+        <td width="80">姓名</td>
32
+        <td width="80">{{info.psn_name}}</td>
33
+        <td width="80">性别</td>
34
+        <td width="50" v-if="info.gend == '1'">男</td>
35
+        <td width="50" v-if="info.gend == '2'">女</td>
36
+
37
+        <td width="80">出生日期</td>
38
+        <td width="100">{{info.brdy}}</td>
39
+        <td width="90">个人电脑号</td>
40
+        <td width="110">{{info.psn_no}}</td>
41
+        <td width="80">人员类别</td>
42
+        <td colspan="3" v-if="info.psn_type == '11'">在职</td>
43
+        <td colspan="3" v-if="info.psn_type == '1101'">职工在职</td>
44
+        <td colspan="3" v-if="info.psn_type == '1102'">公务员在职</td>
45
+        <td colspan="3" v-if="info.psn_type == '1103'">灵活就业人员在职</td>
46
+        <td colspan="3" v-if="info.psn_type == '1160'">地方其他扩展人员</td>
47
+
48
+
49
+        <td colspan="3" v-if="info.psn_type == '12'">退休人员</td>
50
+        <td colspan="3" v-if="info.psn_type == '1201'">职工退休</td>
51
+        <td colspan="3" v-if="info.psn_type == '1202'">公务员退休</td>
52
+        <td colspan="3" v-if="info.psn_type == '1203'">灵活就业人员退休</td>
53
+        <td colspan="3" v-if="info.psn_type == '1260'">地方其他扩展人员</td>
54
+
55
+
56
+        <td colspan="3" v-if="info.psn_type == '13'">离休</td>
57
+        <td colspan="3" v-if="info.psn_type == '1300'">离休人员</td>
58
+        <td colspan="3" v-if="info.psn_type == '1360'">地方其他扩展人员</td>
59
+
60
+        <td colspan="3" v-if="info.psn_type == '14'">居民(未成年)</td>
61
+        <td colspan="3" v-if="info.psn_type == '1401'">新生儿</td>
62
+        <td colspan="3" v-if="info.psn_type == '1402'">学龄前儿童</td>
63
+        <td colspan="3" v-if="info.psn_type == '1403'">中小学生</td>
64
+        <td colspan="3" v-if="info.psn_type == '1404'">大学生</td>
65
+        <td colspan="3" v-if="info.psn_type == '1405'">未成年(未入学)</td>
66
+
67
+
68
+        <td colspan="3" v-if="info.psn_type == '15'">居民(成年)</td>
69
+        <td colspan="3" v-if="info.psn_type == '1501'">普通居民(成年)</td>
70
+        <td colspan="3" v-if="info.psn_type == '1560'">地方其他扩展身份</td>
71
+
72
+        <td colspan="3" v-if="info.psn_type == '16'">居民(老年)</td>
73
+
74
+
75
+
76
+      </tr>
77
+      <tr>
78
+        <td>单位名称</td>
79
+        <td colspan="5">{{info.emp_name}}</td>
80
+        <td width="80">联系电话</td>
81
+        <td width="110">{{info.patient.phone}}</td>
82
+        <td width="80">身份证号</td>
83
+        <td colspan="3">{{info.certno}}</td>
84
+      </tr>
85
+      <tr>
86
+        <td>住院号</td>
87
+        <td>{{info.number}}</td>
88
+        <td>科别</td>
89
+        <td width="100"></td>
90
+        <td>床号</td>
91
+        <td></td>
92
+        <td>入院日期</td>
93
+        <td>{{info.begndate}}</td>
94
+        <td>出院日期</td>
95
+        <td width="100">{{info.enddate}}</td>
96
+        <td>住院天数</td>
97
+        <td>{{getDay(info.begndate,info.enddate)}}</td>
98
+
99
+      </tr>
100
+      <tr>
101
+        <td>险种</td>
102
+        <td colspan="2" v-if="info.insutype == '310'">职工基本医疗保险</td>
103
+        <td colspan="2" v-if="info.insutype == '320'">公务员医疗补助</td>
104
+        <td colspan="2" v-if="info.insutype == '330'">大额医疗费用补助</td>
105
+        <td colspan="2" v-if="info.insutype == '340'">离休人员医疗保障</td>
106
+        <td colspan="2" v-if="info.insutype == '390'">城乡居民基本医疗保险</td>
107
+        <td colspan="2" v-if="info.insutype == '392'">城乡居民大病医疗保险</td>
108
+        <td colspan="2" v-if="info.insutype == '510'">生育保险</td>
109
+        <td>入院第一诊断</td>
110
+        <td colspan="3">{{info.diagnosis}}</td>
111
+        <td>出院第一诊断</td>
112
+        <td colspan="4">{{info.diagnosis}}</td>
113
+
114
+
115
+      </tr>
116
+      <tr>
117
+        <td>业务类别</td>
118
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '11'">普通门诊</td>
119
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '12'">门诊挂号</td>
120
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '13'">急诊</td>
121
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '14'">门诊慢性病</td>
122
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '15'">门诊统筹</td>
123
+        <!--        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '16'">门诊慢性病</td>-->
124
+        <td colspan="5" style="text-align:left;padding-left:10px;" v-if="info.med_type == '21'">普通住院</td>
125
+
126
+        <td>结算时间</td>
127
+        <td colspan="5" style="text-align:left;padding-left:10px;">{{info.setl_time.split(' ')[0]}}</td>
128
+      </tr>
129
+      <tr>
130
+        <td colspan="12" style="text-align:left;padding-left:10px;">
131
+          本次就医:总费用{{info.medfee_sumamt}}元,基金支付{{info.fund_pay_sumamt}}元,个人支付{{info.psn_pay}}元。
132
+          (起付线 {{info.act_pay_dedc}}元, 先自付 {{info.preselfpay_amt}}元, 段内自付 {{(info.psn_pay - info.preselfpay_amt).toFixed(2)}} )
133
+
134
+        </td>
135
+      </tr>
136
+      <tr>
137
+        <td>费用名称</td>
138
+        <td colspan="2">总费用</td>
139
+        <td>自费</td>
140
+        <td colspan="2">部分项目自付</td>
141
+        <td>费用名称</td>
142
+        <td colspan="2">总费用</td>
143
+        <td>自费</td>
144
+        <td colspan="2">部分项目自付</td>
145
+      </tr>
146
+      <tr>
147
+        <td>床位费</td>
148
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_total}}</td>
149
+        <td style="text-align:right;padding-right:10px;">{{info.bed_cost_self_total}}</td>
150
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.bed_cost_part_self_total}}</td>
151
+        <td>西成药</td>
152
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_total}}</td>
153
+        <td style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_self_total}}</td>
154
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.western_medicine_cost_part_self_total}}</td>
155
+      </tr>
156
+      <tr>
157
+        <td>中药费</td>
158
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
159
+        <td style="text-align:right;padding-right:10px;">0</td>
160
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
161
+        <td>中成药</td>
162
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_total}}
163
+        </td>
164
+        <td style="text-align:right;padding-right:10px;">{{info.chinese_traditional_medicine_cost_self_total}}</td>
165
+        <td colspan="2" style="text-align:right;padding-right:10px;">
166
+          {{info.chinese_traditional_medicine_cost_part_self_total}}
167
+        </td>
168
+      </tr>
169
+      <tr>
170
+        <td>中草药</td>
171
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
172
+        <td style="text-align:right;padding-right:10px;">0</td>
173
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
174
+        <td>检查费</td>
175
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_total}}</td>
176
+        <td style="text-align:right;padding-right:10px;">{{info.check_cost_self_total}}</td>
177
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.check_cost_part_self_total}}</td>
178
+      </tr>
179
+      <tr>
180
+        <td>治疗费</td>
181
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_total}}</td>
182
+        <td style="text-align:right;padding-right:10px;">{{info.treat_cost_self_total}}</td>
183
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.treat_cost_part_self_total}}</td>
184
+        <td>放射费</td>
185
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
186
+        <td style="text-align:right;padding-right:10px;">0</td>
187
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
188
+      </tr>
189
+      <tr>
190
+        <td>手术费</td>
191
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_total}}</td>
192
+        <td style="text-align:right;padding-right:10px;">{{info.operation_cost_self_total}}</td>
193
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.operation_cost_part_self_total}}</td>
194
+        <td>化验费</td>
195
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_total}}</td>
196
+        <td style="text-align:right;padding-right:10px;">{{info.laboratory_cost_self_total}}</td>
197
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.laboratory_cost_part_self_total}}</td>
198
+      </tr>
199
+      <tr>
200
+        <td>输血费</td>
201
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
202
+        <td style="text-align:right;padding-right:10px;">0</td>
203
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
204
+        <td>输氧费</td>
205
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
206
+        <td style="text-align:right;padding-right:10px;">0</td>
207
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
208
+      </tr>
209
+      <tr>
210
+        <td>其他</td>
211
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_total}}</td>
212
+        <td style="text-align:right;padding-right:10px;">{{info.other_cost_self_total}}</td>
213
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.other_cost_part_self_total}}</td>
214
+        <td>麻醉费</td>
215
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
216
+        <td style="text-align:right;padding-right:10px;">0</td>
217
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
218
+      </tr>
219
+      <tr>
220
+        <td>材料费</td>
221
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_total}}</td>
222
+        <td style="text-align:right;padding-right:10px;">{{info.material_cost_self_total}}</td>
223
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{info.material_cost_part_self_total}}</td>
224
+        <td>特殊检查费</td>
225
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
226
+        <td style="text-align:right;padding-right:10px;">0</td>
227
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
228
+      </tr>
229
+      <tr>
230
+        <td>特殊治疗费</td>
231
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
232
+        <td style="text-align:right;padding-right:10px;">0</td>
233
+        <td colspan="2" style="text-align:right;padding-right:10px;">0</td>
234
+        <td style="text-align:right;padding-right:10px;"></td>
235
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
236
+        <td style="text-align:right;padding-right:10px;"></td>
237
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
238
+      </tr>
239
+      <tr>
240
+        <td>合计</td>
241
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_total) +
242
+          parseFloat(info.operation_cost_total) + parseFloat(info.other_cost_total) +
243
+          parseFloat(info.material_cost_total) + parseFloat(info.western_medicine_cost_total) +
244
+          parseFloat(info.chinese_traditional_medicine_cost_total) + parseFloat(info.check_cost_total) +
245
+          parseFloat(info.laboratory_cost_total) + parseFloat(info.treat_cost_total)).toFixed(2) }}
246
+        </td>
247
+        <td style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_self_total )+
248
+          parseFloat(info.operation_cost_self_total) + parseFloat(info.other_cost_self_total) +
249
+          parseFloat(info.material_cost_self_total) + parseFloat(info.western_medicine_cost_self_total) +
250
+          parseFloat(info.chinese_traditional_medicine_cost_self_total) + parseFloat(info.check_cost_self_total) +
251
+          parseFloat(info.laboratory_cost_self_total) + parseFloat(info.treat_cost_self_total)).toFixed(2)}}
252
+        </td>
253
+        <td colspan="2" style="text-align:right;padding-right:10px;">{{(parseFloat(info.bed_cost_part_self_total) +
254
+          parseFloat(info.operation_cost_part_self_total) + parseFloat(info.other_cost_part_self_total) +
255
+          parseFloat(info.material_cost_part_self_total) + parseFloat(info.western_medicine_cost_part_self_total) +
256
+          parseFloat(info.chinese_traditional_medicine_cost_part_self_total) +
257
+          parseFloat(info.check_cost_part_self_total) + parseFloat(info.laboratory_cost_part_self_total) +
258
+          parseFloat(info.treat_cost_part_self_total)).toFixed(2)}}
259
+        </td>
260
+        <td style="text-align:right;padding-right:10px;"></td>
261
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
262
+        <td style="text-align:right;padding-right:10px;"></td>
263
+        <td colspan="2" style="text-align:right;padding-right:10px;"></td>
264
+      </tr>
265
+      <tr>
266
+        <td colspan="3" style="text-align:left;padding-left:10px;">基本医疗保险统筹基金支付</td>
267
+        <td colspan="3">{{info.hifp_pay}}</td>
268
+        <td colspan="3" style="text-align:left;padding-left:10px;">大额基金支付</td>
269
+        <td colspan="3">{{info.hifob_pay}}</td>
270
+      </tr>
271
+      <tr>
272
+        <td colspan="3" style="text-align:left;padding-left:10px;">大病基金支付</td>
273
+        <td colspan="3">{{info.hifmi_pay}}</td>
274
+        <td colspan="3" style="text-align:left;padding-left:10px;">补充保险基金支付</td>
275
+        <td colspan="3">{{info.hifes_pay}}</td>
276
+      </tr>
277
+      <tr>
278
+        <td colspan="3" style="text-align:left;padding-left:10px;">医疗救助基金支付</td>
279
+        <td colspan="3">{{info.maf_pay}}</td>
280
+        <td colspan="3" style="text-align:left;padding-left:10px;">公务员基金支付</td>
281
+        <td colspan="3">{{info.cvlserv_pay}}</td>
282
+      </tr>
283
+
284
+      <tr>
285
+        <td colspan="3" style="text-align:left;padding-left:10px;">其他基金支付</td>
286
+        <td colspan="3">{{info.oth_pay}}</td>
287
+        <td colspan="3" style="text-align:left;padding-left:10px;">个人账户支付</td>
288
+        <td colspan="3">{{info.acct_pay}}</td>
289
+      </tr>
290
+      <tr>
291
+        <td>收款人:</td>
292
+        <td colspan="2">{{info.charge_admin.user_name}}</td>
293
+        <td>审核人:</td>
294
+        <td colspan="2">{{info.p_admin.user_name}}</td>
295
+        <td>制单人:</td>
296
+        <td colspan="2">{{info.p_admin.user_name}}</td>
297
+        <td>打印日期</td>
298
+        <td colspan="2">{{getNowTime()}}</td>
299
+      </tr>
300
+      <tr>
301
+        <td colspan="12" style="text-align:left;padding-left:10px;line-height:20px;">
302
+          注: 1、部分项目自付金额是指基本医疗保险范围内的项目需参保人先按规定比例自付的金额。<br/>
303
+          &ensp;&ensp;&ensp;2、此表由医院打印。<br/>
304
+          &ensp;&ensp;&ensp;3、此表一式两份,医院、参保人各一份。
305
+        </td>
306
+      </tr>
307
+      <tr>
308
+        <td colspan="12" style="text-align:left;padding-left:10px;">
309
+          病人家属签字:
310
+        </td>
311
+      </tr>
312
+    </table>
313
+  </div>
314
+  </div>
315
+</template>
316
+<script>
317
+
318
+export default {
319
+  name: 'hospitalBatchPrint',
320
+  props: {
321
+    infos:{
322
+      type: Array,
323
+      default: function() {
324
+        return []
325
+      }
326
+    },
327
+    info: {
328
+      type: Object,
329
+      default: function() {
330
+        return {}
331
+      }
332
+    }, p_admin: {
333
+      type: Object,
334
+      default: function() {
335
+        return {}
358 336
       }
359
-    },methods:{
360
-      getDay(dateString1,dateString2){
361
-        var  startDate = Date.parse(dateString1);
362
-        var  endDate = Date.parse(dateString2);
363
-        if (startDate>endDate){
364
-          return 0;
365
-        }
366
-        if (startDate==endDate){
367
-          return 1;
368
-        }
369
-        var days=(endDate - startDate)/(1*24*60*60*1000);
370
-        return  days+1;
371
-  
337
+    }, charge_admin: {
338
+      type: Object,
339
+      default: function() {
340
+        return {}
341
+      },
342
+    },his: {
343
+      type: Object,
344
+      default: function() {
345
+        return {}
346
+      },
347
+    },his_record: {
348
+      type: Object,
349
+      default: function() {
350
+        return {}
372 351
       },
373
-      getNowTime: function () {
374
-        let dateTime;
375
-        let yy = new Date().getFullYear();
376
-        let mm = new Date().getMonth() + 1;
377
-        let dd = new Date().getDate();
378
-        // let hh = new Date().getHours();
379
-        // let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
380
-        //   :
381
-        //   new Date().getMinutes();
382
-        // let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
383
-        //   :
384
-        //   new Date().getSeconds();
385
-        dateTime = yy + '-' + mm + '-' + dd
386
-        return dateTime
352
+    },patient:{
353
+      type: Object,
354
+      default: function() {
355
+        return {}
387 356
       },
388
-  
357
+
389 358
     }
359
+  },methods:{
360
+    getDay(dateString1,dateString2){
361
+      var  startDate = Date.parse(dateString1);
362
+      var  endDate = Date.parse(dateString2);
363
+      if (startDate>endDate){
364
+        return 0;
365
+      }
366
+      if (startDate==endDate){
367
+        return 1;
368
+      }
369
+      var days=(endDate - startDate)/(1*24*60*60*1000);
370
+      return  days+1;
371
+
372
+    },
373
+    getNowTime: function () {
374
+      let dateTime;
375
+      let yy = new Date().getFullYear();
376
+      let mm = new Date().getMonth() + 1;
377
+      let dd = new Date().getDate();
378
+      // let hh = new Date().getHours();
379
+      // let mf = new Date().getMinutes() < 10 ? '0' + new Date().getMinutes()
380
+      //   :
381
+      //   new Date().getMinutes();
382
+      // let ss = new Date().getSeconds() < 10 ? '0' + new Date().getSeconds()
383
+      //   :
384
+      //   new Date().getSeconds();
385
+      dateTime = yy + '-' + mm + '-' + dd
386
+      return dateTime
387
+    },
388
+
390 389
   }
391
-  
392
-  
393
-  </script>
394
-  
395
-  
396
-  <style lang="scss" scoped>
397
-  .statement-print {
398
-    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
399
-    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
400
-    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
401
-    margin-bottom: 20px;
402
-    padding: 20px 10px;
403
-  }
404
-  
405
-  .statementTitle {
406
-    font-size: 28px;
407
-    text-align: center;
408
-    font-weight: bold;
409
-    margin-bottom: 10px;
410
-  }
411
-  
412
-  .statementTable {
413
-    width: 100%;
414
-    text-align: center;
415
-    border-collapse: collapse;
416
-    line-height: 40px;
417
-    font-size: 14px;
418
-    border-color: #000;
419
-  }
420
-  </style>
421
-  
390
+}
391
+
392
+
393
+</script>
394
+
395
+
396
+<style lang="scss" scoped>
397
+.statement-print {
398
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
399
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
400
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
401
+  margin-bottom: 20px;
402
+  padding: 20px 10px;
403
+}
404
+
405
+.statementTitle {
406
+  font-size: 28px;
407
+  text-align: center;
408
+  font-weight: bold;
409
+  margin-bottom: 10px;
410
+}
411
+
412
+.statementTable {
413
+  width: 100%;
414
+  text-align: center;
415
+  border-collapse: collapse;
416
+  line-height: 40px;
417
+  font-size: 14px;
418
+  border-color: #000;
419
+}
420
+</style>

+ 73 - 20
src/xt_pages/hospitalStation/chargeDetailManagement.vue 查看文件

@@ -114,6 +114,13 @@
114 114
                 type="primary">上传费用明细
115 115
             </el-button>
116 116
 
117
+            <el-button
118
+              v-if="( this.hisPatientInfo.balance_accounts_type == 2 && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0 )"
119
+              size="small"
120
+              @click="open(1)"
121
+              type="primary">上传费用明细
122
+            </el-button>
123
+
117 124
 
118 125
             <el-button
119 126
                 v-if="( this.hisPatientInfo.balance_accounts_type != 2  && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
@@ -122,6 +129,13 @@
122 129
             >撤销明细
123 130
             </el-button>
124 131
 
132
+            <el-button
133
+              v-if="( this.hisPatientInfo.balance_accounts_type == 2  && this.hisPatientInfo.id > 0 && this.hisPatientInfo.in_hospital_status == 1 && this.hisPatientInfo.out_hospital_status == 0)"
134
+
135
+              size="small" @click="open(2)" type="primary"
136
+            >撤销明细
137
+            </el-button>
138
+
125 139
           </div>
126 140
 
127 141
         </div>
@@ -833,25 +847,27 @@ export default {
833 847
           }).catch(() => {
834 848
           })
835 849
         } else {
836
-          settle_accounts_type = 2
837
-          var that = this
838
-          this.$confirm('该操作会撤销此次入院后所有处方明细,是否继续操作?', '撤销明细', {
839
-            confirmButtonText: '确 定',
840
-            cancelButtonText: '取 消',
841
-            type: 'warning'
842
-          }).then(() => {
843 850
 
844
-            let params = {
845
-              'settle_accounts_type': settle_accounts_type,
846
-              'patient_id': that.hisPatientInfo.patient_id,
847
-              'his_patient_id': that.hisPatientInfo.id,
848
-              'record_time': that.record_date,
849
-              'order_id': that.order.id,
850
-              'admin_user_id': that.$store.getters.xt_user.user.id
851
-            }
852
-            axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
853
-              params: params
854
-            })
851
+          if (this.hisPatientInfo.balance_accounts_type != 2) {
852
+            settle_accounts_type = 2
853
+            var that = this
854
+            this.$confirm('该操作会撤销此次入院后所有处方明细,是否继续操作?', '撤销明细', {
855
+              confirmButtonText: '确 定',
856
+              cancelButtonText: '取 消',
857
+              type: 'warning'
858
+            }).then(() => {
859
+
860
+              let params = {
861
+                'settle_accounts_type': settle_accounts_type,
862
+                'patient_id': that.hisPatientInfo.patient_id,
863
+                'his_patient_id': that.hisPatientInfo.id,
864
+                'record_time': that.record_date,
865
+                'order_id': that.order.id,
866
+                'admin_user_id': that.$store.getters.xt_user.user.id
867
+              }
868
+              axios.get('http://127.0.0.1:9532/zh/api/refunddetail', {
869
+                params: params
870
+              })
855 871
                 .then(function(response) {
856 872
                   if (response.data.state == 0) {
857 873
                     that.$message.error(response.data.msg)
@@ -878,8 +894,45 @@ export default {
878 894
                 .catch(function(error) {
879 895
                 })
880 896
 
881
-          }).catch(() => {
882
-          })
897
+            }).catch(() => {
898
+            })
899
+
900
+          }else{
901
+            settle_accounts_type = 2
902
+            var that = this
903
+            this.$confirm('该操作会撤销此次入院后所有处方明细,是否继续操作?', '撤销明细', {
904
+              confirmButtonText: '确 定',
905
+              cancelButtonText: '取 消',
906
+              type: 'warning'
907
+            }).then(() => {
908
+              let params = {
909
+                'settle_accounts_type': settle_accounts_type,
910
+                'patient_id': that.hisPatientInfo.patient_id,
911
+                'his_patient_id': that.hisPatientInfo.id,
912
+                'record_time': that.record_date,
913
+                'admin_user_id': that.$store.getters.xt_user.user.id
914
+              }
915
+              refundDetail(params).then(response => {
916
+                if (response.data.state == 0) {
917
+                  this.loading = false
918
+                  this.$message.error(response.data.msg)
919
+                  return false
920
+                } else {
921
+                  that.$message.success('撤销明细成功')
922
+                  that.radio = 1
923
+                  that.getPatientList()
924
+                }
925
+              })
926
+
927
+
928
+
929
+            }).catch(() => {
930
+            })
931
+
932
+
933
+          }
934
+
935
+
883 936
 
884 937
         }
885 938
 

+ 13 - 13
src/xt_pages/hospitalStation/components/chargeDialog.vue 查看文件

@@ -317,13 +317,13 @@
317 317
             this.form.pay_price = this.tmp_pay
318 318
             return
319 319
           }
320
-          if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
321
-            // alert("押金不得大于自费金额")
322
-            this.$message.error("押金不得大于自费金额");
323
-            this.form.tmp_decimal = ""
324
-            this.form.pay_price = this.tmp_pay
325
-            return
326
-          }
320
+          // if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
321
+          //   // alert("押金不得大于自费金额")
322
+          //   this.$message.error("押金不得大于自费金额");
323
+          //   this.form.tmp_decimal = ""
324
+          //   this.form.pay_price = this.tmp_pay
325
+          //   return
326
+          // }
327 327
           // this.form.private_price = parseFloat(this.form.tmp_decimal) + parseFloat(this.form.pay_price)
328 328
 
329 329
           this.form.pay_price = ((parseFloat(this.form.private_price) * 10000 - parseFloat(this.form.tmp_decimal) * 10000) / 10000).toFixed(2)
@@ -340,12 +340,12 @@
340 340
           } else {
341 341
             //储存临时付款
342 342
             this.tmp_pay = this.form.pay_price
343
-            if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
344
-              this.form.tmp_decimal = 0
345
-              // alert("押金不得大于自费金额")
346
-              this.$message.error("押金不得大于自费金额");
347
-              return
348
-            }
343
+            // if (parseFloat(this.form.tmp_decimal) > parseFloat(this.form.private_price)) {
344
+            //   this.form.tmp_decimal = 0
345
+            //   // alert("押金不得大于自费金额")
346
+            //   this.$message.error("押金不得大于自费金额");
347
+            //   return
348
+            // }
349 349
             // this.form.private_price = parseFloat(this.form.tmp_decimal) + parseFloat(this.form.pay_price)
350 350
             this.tmp_pay = this.form.pay_price
351 351
             this.form.pay_price = ((parseFloat(this.form.private_price) * 10000 - parseFloat(this.form.tmp_decimal) * 10000) / 10000).toFixed(2)

+ 12 - 9
src/xt_pages/hospitalStation/components/deskPrescription.vue 查看文件

@@ -2303,6 +2303,7 @@ export default {
2303 2303
                 record_date: this.record_date,
2304 2304
                 his_patient_id: this.hisPatientInfo.id,
2305 2305
                 reg_type: this.register_type,
2306
+                patient_diagnose:""
2306 2307
               }
2307 2308
 
2308 2309
               for (let i = 0; i < this.prescriptions.length; i++) {
@@ -2441,7 +2442,7 @@ export default {
2441 2442
                     if(arr.length > 0){
2442 2443
                       let objInfo = {};
2443 2444
                       arr.forEach((item, index) => {
2444
-                    
2445
+
2445 2446
                       let { id } = item.id;
2446 2447
                       if (!objInfo[id]) {
2447 2448
                           objInfo[id] = {
@@ -2504,7 +2505,7 @@ export default {
2504 2505
                      if(arr_one.length > 0){
2505 2506
                       let objInfo = {};
2506 2507
                       arr_one.forEach((item, index) => {
2507
-                     
2508
+
2508 2509
                       let { id } = item.id;
2509 2510
                       if (!objInfo[id]) {
2510 2511
                           objInfo[id] = {
@@ -2725,7 +2726,8 @@ export default {
2725 2726
                 record_date: this.end_time,
2726 2727
                 his_patient_id: this.hisPatientInfo.id,
2727 2728
                 reg_type: this.register_type,
2728
-                p_type: 1
2729
+                p_type: 1,
2730
+                patient_diagnose:""
2729 2731
               }
2730 2732
 
2731 2733
               var month_prescriptions = this.deepClone(this.month_prescriptions)
@@ -3156,14 +3158,14 @@ export default {
3156 3158
       }
3157 3159
 
3158 3160
       if (this.curStatus == 1 && this.rightTab == 2) {
3159
-        this.$message.error('处方是药品,无法添加项目')
3161
+        this.$message.error('处方是药品,无法添加项目')
3160 3162
         this.teamList = []
3161 3163
         this.$refs.tables.clearSelection()
3162 3164
         return
3163 3165
       }
3164 3166
 
3165 3167
       if (this.curStatus == 2 && this.rightTab == 1) {
3166
-        this.$message.error('处方是项目,无法添加药品')
3168
+        this.$message.error('处方是项目,无法添加药品')
3167 3169
         this.curDrugs = []
3168 3170
         this.tempDrugs = []
3169 3171
         this.$refs.multipleTable.clearSelection()
@@ -3293,10 +3295,10 @@ export default {
3293 3295
             for (let b = 0; b < temp2.length; b++) {
3294 3296
               let obj = {
3295 3297
                 id: 0,
3298
+                single_dose: temp2[b].single_dose.toString(),
3296 3299
                 project_id: temp2[b].id,
3297 3300
                 project_name: temp2[b].project_name,
3298 3301
                 statistical_classification: '',
3299
-                single_dose: temp2[b].single_dose.toString(),
3300 3302
                 delivery_way: temp2[b].delivery_way,
3301 3303
                 execution_frequency: temp2[b].execution_frequency,
3302 3304
                 number_days: temp2[b].number_days.toString(),
@@ -3311,6 +3313,7 @@ export default {
3311 3313
                 obj['project'] = temp2[b].project
3312 3314
                 obj['unit'] = temp2[b].project.unit
3313 3315
 
3316
+
3314 3317
               } else if (temp2[b].type == 3) {
3315 3318
                 obj['good_info'] = temp2[b].good_info
3316 3319
                 obj['unit'] = temp2[b].good_info.packing_unit
@@ -3449,7 +3452,7 @@ export default {
3449 3452
               cus_total: 1,
3450 3453
               price: good_info[i].packing_price,
3451 3454
               medical_code: good_info[i].medical_insurance_number,
3452
-              unit: this.getGoodUnit(good_info[i].good_unit),
3455
+              unit: good_info[i].packing_unit,
3453 3456
               type: 3,
3454 3457
               total: good_info[i].total,
3455 3458
               is_special_diseases: good_info[i].is_special_diseases,
@@ -3584,7 +3587,7 @@ export default {
3584 3587
                   id: project[i].project_id,
3585 3588
                   project_name: project[i].good_info.good_name,
3586 3589
                   statistical_classification: '',
3587
-                  single_dose: '',
3590
+                  single_dose: project[i].good_info.default_count,
3588 3591
                   delivery_way: '',
3589 3592
                   execution_frequency: '',
3590 3593
                   number_days: '',
@@ -3592,7 +3595,7 @@ export default {
3592 3595
                   price: project[i].good_info.retail_price,
3593 3596
                   remark: '',
3594 3597
                   medical_code: project[i].good_info.medical_insurance_number,
3595
-                  unit: project[i].good_info.unit,
3598
+                  unit: project[i].good_info.packing_unit,
3596 3599
                   type: project[i].type,
3597 3600
                   is_special_diseases: project[i].good_info.is_special_diseases,
3598 3601
                   team_id: team_id,

+ 1 - 0
src/xt_pages/hospitalStation/components/dialysisIndex.vue 查看文件

@@ -63,6 +63,7 @@
63 63
           :stockType="stockType"
64 64
           :mode_id="mode_id"
65 65
           :is_advice_open="is_advice_open"
66
+          :record_date="date"
66 67
         >
67 68
         </nav-igation>
68 69
 

+ 45 - 3
src/xt_pages/hospitalStation/components/inquiriesDetail.vue 查看文件

@@ -10,6 +10,10 @@
10 10
     <div style="position: absolute;right:20px;z-index:99">
11 11
       <el-button v-if="activeName == 'first'" @click="open(1)" type="primary">打印</el-button>
12 12
       <el-button v-if="activeName == 'second'" @click="open(2)" type="primary">打印</el-button>
13
+
14
+      <el-button @click="open(3)" type="primary">打印清单</el-button>
15
+      <el-button @click="open(4)" type="primary">打印汇总</el-button>
16
+
13 17
     </div>
14 18
     <el-tabs v-model="activeName">
15 19
 
@@ -113,6 +117,25 @@
113 117
       <print v-if="activeName == 'first'" :paramsObj='paramsObj' :showBtn='true'></print>
114 118
       <recordPrint v-if="activeName == 'second'" :patientid="patientid" :showBtn='true'></recordPrint>
115 119
     </el-dialog>
120
+
121
+    <div >
122
+      <el-dialog
123
+        class="centerDialog"
124
+        width="900px"
125
+        title="打印"
126
+        :visible.sync="listVisible"  append-to-body>
127
+        <hospital-list-print :paramsObj='paramsObjTwo'></hospital-list-print>
128
+      </el-dialog>
129
+    </div>
130
+    <div >
131
+      <el-dialog
132
+        class="centerDialog"
133
+        width="900px"
134
+        title="打印"
135
+        :visible.sync="allListVisible"  append-to-body>
136
+        <hospital-all-list-print :paramsObj='paramsObjTwo'></hospital-all-list-print>
137
+      </el-dialog>
138
+    </div>
116 139
   </el-dialog>
117 140
 </div>
118 141
 </template>
@@ -120,7 +143,6 @@
120 143
 
121 144
 
122 145
 <script>
123
-  import { getDictionaryDataConfig} from "@/utils/data";
124 146
   import { getHisPrescriptionInfo } from '@/api/his/his'
125 147
   import NewPrescriptionTable from './newPrescriptionTable'
126 148
   import { uParseTime } from '@/utils/tools'
@@ -128,14 +150,19 @@
128 150
   import moment from 'moment';
129 151
   import print from '../print'
130 152
   import recordPrint from '../recordPrint'
153
+  import HospitalListPrint from '../pastQuiriesPrint/hospitalListPrint.vue'
154
+  import HospitalAllListPrint from '../pastQuiriesPrint/hospitalAllListPrint.vue'
131 155
 
132 156
   export default {
133
-    components: { NewPrescriptionTable,print,recordPrint },
157
+    components: { HospitalAllListPrint, HospitalListPrint, NewPrescriptionTable,print,recordPrint },
134 158
     data() {
135 159
       return {
160
+        listVisible:false,
161
+        allListVisible:false,
136 162
         visible: false,
137 163
         activeName: 'first',
138 164
         curPrescriptions: {},
165
+        paramsObjTwo:{},
139 166
         prescriptions: [],
140 167
         record_date: '',
141 168
         editableTabsValue: '处方1',
@@ -188,11 +215,26 @@
188 215
            this.innerVisible = true
189 216
           //  this.$router.push("/outpatientDoctorStation/print?record="+record_date+"&prescription_id="+prescription_id+"&ids="+ids+"&patient_id="+this.patientInfo.id)
190 217
 
191
-        }else if(index == 2){
218
+        } else if(index == 2){
192 219
           var record_date = this.format(this.case_history.sick_date);
193 220
           this.patientid = this.patientInfo.id;
194 221
           this.innerVisible = true
195 222
           // this.$router.push("/outpatientDoctorStation/recordPrint?record="+record_date+"&patient_id="+this.case_history.patient_id)
223
+        }else if(index == 3){
224
+          // var record_date = this.format(this.order.record_date);
225
+          this.patientid = this.patientInfo.id;
226
+          this.paramsObjTwo = {
227
+            record_date:this.order.record_date,
228
+            patient_id:this.patientid
229
+          }
230
+          this.listVisible = true
231
+        }else if(index == 4){
232
+          this.patientid = this.patientInfo.id;
233
+          this.paramsObjTwo = {
234
+            record_date:this.order.record_date,
235
+            patient_id:this.patientid
236
+          }
237
+          this.allListVisible = true
196 238
         }
197 239
       },
198 240
       getTimes(time,temp) {

+ 419 - 0
src/xt_pages/hospitalStation/components/registerDialog9504.vue 查看文件

@@ -104,6 +104,28 @@
104 104
             </el-form-item>
105 105
 
106 106
 
107
+          <el-form-item label="参保地:" prop="id_card_type">
108
+            <el-autocomplete
109
+              popper-class="my-autocomplete"
110
+              v-model="form.insuplc_admdvs"
111
+              :fetch-suggestions="querySearch"
112
+              placeholder="请输入内容"
113
+              @select="handleSelectTwo">
114
+              <i
115
+                class="el-icon-edit el-input__icon"
116
+                slot="suffix"
117
+                @click="handleIconClick">
118
+              </i>
119
+              <template slot-scope="{ item }">
120
+                <div class="name">{{ item.value }}</div>
121
+                <span class="addr">{{ item.address }}</span>
122
+              </template>
123
+            </el-autocomplete>
124
+          </el-form-item>
125
+
126
+
127
+
128
+
107 129
             <el-form-item label="读卡类型:" prop="id_card_type">
108 130
                 <el-select v-model="form.id_card_type" placeholder="请选择">
109 131
                     <el-option
@@ -212,6 +234,7 @@
212 234
           id: '',
213 235
           settlement_value: '',
214 236
           medical_insurance_card: '',
237
+          insuplc_admdvs:'',
215 238
           name: '',
216 239
           gender: '',
217 240
           certificates: '',
@@ -238,6 +261,384 @@
238 261
           value: 2,
239 262
           label: '身份证'
240 263
         }],
264
+        area:[
265
+          {id:110000,name:"北京市"},
266
+          {id:120000,name:"天津市"},
267
+          {id:130000,name:"河北省"},
268
+          {id:130100,name:"石家庄市"},
269
+          {id:130200,name:"唐山市"},
270
+          {id:130300,name:"秦皇岛市"},
271
+          {id:130400,name:"邯郸市"},
272
+          {id:130500,name:"邢台市"},
273
+          {id:130600,name:"保定市"},
274
+          {id:130700,name:"张家口市"},
275
+          {id:130800,name:"承德市"},
276
+          {id:130900,name:"沧州市"},
277
+          {id:131000,name:"廊坊市"},
278
+          {id:131100,name:"衡水市"},
279
+          {id:140000,name:"山西省"},
280
+          {id:140100,name:"太原市"},
281
+          {id:140200,name:"大同市"},
282
+          {id:140300,name:"阳泉市"},
283
+          {id:140400,name:"长治市"},
284
+          {id:140500,name:"晋城市"},
285
+          {id:140600,name:"朔州市"},
286
+          {id:140700,name:"晋中市"},
287
+          {id:140800,name:"运城市"},
288
+          {id:140900,name:"忻州市"},
289
+          {id:141000,name:"临汾市"},
290
+          {id:141100,name:"吕梁市"},
291
+          {id:150000,name:"内蒙古自治区"},
292
+          {id:150100,name:"呼和浩特市"},
293
+          {id:150200,name:"包头市"},
294
+          {id:150300,name:"乌海市"},
295
+          {id:150400,name:"赤峰市"},
296
+          {id:150500,name:"通辽市"},
297
+          {id:150600,name:"鄂尔多斯市"},
298
+          {id:150700,name:"呼伦贝尔市"},
299
+          {id:150800,name:"巴彦淖尔市"},
300
+          {id:150900,name:"乌兰察布市"},
301
+          {id:152200,name:"兴安盟"},
302
+          {id:152500,name:"锡林郭勒盟"},
303
+          {id:152900,name:"阿拉善盟"},
304
+          {id:210000,name:"辽宁省"},
305
+          {id:210100,name:"沈阳市"},
306
+          {id:210200,name:"大连市"},
307
+          {id:210300,name:"鞍山市"},
308
+          {id:210400,name:"抚顺市"},
309
+          {id:210500,name:"本溪市"},
310
+          {id:210600,name:"丹东市"},
311
+          {id:210700,name:"锦州市"},
312
+          {id:210800,name:"营口市"},
313
+          {id:210900,name:"阜新市"},
314
+          {id:211000,name:"辽阳市"},
315
+          {id:211100,name:"盘锦市"},
316
+          {id:211200,name:"铁岭市"},
317
+          {id:211300,name:"朝阳市"},
318
+          {id:211400,name:"葫芦岛市"},
319
+          {id:220000,name:"吉林省"},
320
+          {id:220100,name:"长春市"},
321
+          {id:220200,name:"吉林市"},
322
+          {id:220300,name:"四平市"},
323
+          {id:220400,name:"辽源市"},
324
+          {id:220500,name:"通化市"},
325
+          {id:220600,name:"白山市"},
326
+          {id:220700,name:"松原市"},
327
+          {id:220800,name:"白城市"},
328
+          {id:222400,name:"延边朝鲜族自治州"},
329
+          {id:230000,name:"黑龙江省"},
330
+          {id:230100,name:"哈尔滨市"},
331
+          {id:230200,name:"齐齐哈尔市"},
332
+          {id:230300,name:"鸡西市"},
333
+          {id:230400,name:"鹤岗市"},
334
+          {id:230500,name:"双鸭山市"},
335
+          {id:230600,name:"大庆市"},
336
+          {id:230700,name:"伊春市"},
337
+          {id:230800,name:"佳木斯市"},
338
+          {id:230900,name:"七台河市"},
339
+          {id:231000,name:"牡丹江市"},
340
+          {id:231100,name:"黑河市"},
341
+          {id:231200,name:"绥化市"},
342
+          {id:232700,name:"大兴安岭地区"},
343
+          {id:310000,name:"上海市"},
344
+          {id:320000,name:"江苏省"},
345
+          {id:320100,name:"南京市"},
346
+          {id:320200,name:"无锡市"},
347
+          {id:320300,name:"徐州市"},
348
+          {id:320400,name:"常州市"},
349
+          {id:320500,name:"苏州市"},
350
+          {id:320600,name:"南通市"},
351
+          {id:320700,name:"连云港市"},
352
+          {id:320800,name:"淮安市"},
353
+          {id:320900,name:"盐城市"},
354
+          {id:321000,name:"扬州市"},
355
+          {id:321100,name:"镇江市"},
356
+          {id:321200,name:"泰州市"},
357
+          {id:321300,name:"宿迁市"},
358
+          {id:330000,name:"浙江省"},
359
+          {id:330100,name:"杭州市"},
360
+          {id:330200,name:"宁波市"},
361
+          {id:330300,name:"温州市"},
362
+          {id:330400,name:"嘉兴市"},
363
+          {id:330500,name:"湖州市"},
364
+          {id:330600,name:"绍兴市"},
365
+          {id:330700,name:"金华市"},
366
+          {id:330800,name:"衢州市"},
367
+          {id:330900,name:"舟山市"},
368
+          {id:331000,name:"台州市"},
369
+          {id:331100,name:"丽水市"},
370
+          {id:340000,name:"安徽省"},
371
+          {id:340100,name:"合肥市"},
372
+          {id:340200,name:"芜湖市"},
373
+          {id:340300,name:"蚌埠市"},
374
+          {id:340400,name:"淮南市"},
375
+          {id:340500,name:"马鞍山市"},
376
+          {id:340600,name:"淮北市"},
377
+          {id:340700,name:"铜陵市"},
378
+          {id:340800,name:"安庆市"},
379
+          {id:341000,name:"黄山市"},
380
+          {id:341100,name:"滁州市"},
381
+          {id:341200,name:"阜阳市"},
382
+          {id:341300,name:"宿州市"},
383
+          {id:341500,name:"六安市"},
384
+          {id:341600,name:"亳州市"},
385
+          {id:341700,name:"池州市"},
386
+          {id:341800,name:"宣城市"},
387
+          {id:350000,name:"福建省"},
388
+          {id:350100,name:"福州市"},
389
+          {id:350200,name:"厦门市"},
390
+          {id:350300,name:"莆田市"},
391
+          {id:350400,name:"三明市"},
392
+          {id:350500,name:"泉州市"},
393
+          {id:350600,name:"漳州市"},
394
+          {id:350700,name:"南平市"},
395
+          {id:350800,name:"龙岩市"},
396
+          {id:350900,name:"宁德市"},
397
+          {id:360000,name:"江西省"},
398
+          {id:360100,name:"南昌市"},
399
+          {id:360200,name:"景德镇市"},
400
+          {id:360300,name:"萍乡市"},
401
+          {id:360400,name:"九江市"},
402
+          {id:360500,name:"新余市"},
403
+          {id:360600,name:"鹰潭市"},
404
+          {id:360700,name:"赣州市"},
405
+          {id:360800,name:"吉安市"},
406
+          {id:360900,name:"宜春市"},
407
+          {id:361000,name:"抚州市"},
408
+          {id:361100,name:"上饶市"},
409
+          {id:370000,name:"山东省"},
410
+          {id:370100,name:"济南市"},
411
+          {id:370200,name:"青岛市"},
412
+          {id:370300,name:"淄博市"},
413
+          {id:370400,name:"枣庄市"},
414
+          {id:370500,name:"东营市"},
415
+          {id:370600,name:"烟台市"},
416
+          {id:370700,name:"潍坊市"},
417
+          {id:370800,name:"济宁市"},
418
+          {id:370900,name:"泰安市"},
419
+          {id:371000,name:"威海市"},
420
+          {id:371100,name:"日照市"},
421
+          {id:371300,name:"临沂市"},
422
+          {id:371400,name:"德州市"},
423
+          {id:371500,name:"聊城市"},
424
+          {id:371600,name:"滨州市"},
425
+          {id:371700,name:"菏泽市"},
426
+          {id:410000,name:"河南省"},
427
+          {id:410100,name:"郑州市"},
428
+          {id:410200,name:"开封市"},
429
+          {id:410300,name:"洛阳市"},
430
+          {id:410400,name:"平顶山市"},
431
+          {id:410500,name:"安阳市"},
432
+          {id:410600,name:"鹤壁市"},
433
+          {id:410700,name:"新乡市"},
434
+          {id:410800,name:"焦作市"},
435
+          {id:410900,name:"濮阳市"},
436
+          {id:411000,name:"许昌市"},
437
+          {id:411100,name:"漯河市"},
438
+          {id:411200,name:"三门峡市"},
439
+          {id:411300,name:"南阳市"},
440
+          {id:411400,name:"商丘市"},
441
+          {id:411500,name:"信阳市"},
442
+          {id:411600,name:"周口市"},
443
+          {id:411700,name:"驻马店市"},
444
+          {id:420000,name:"湖北省"},
445
+          {id:420100,name:"武汉市"},
446
+          {id:420200,name:"黄石市"},
447
+          {id:420300,name:"十堰市"},
448
+          {id:420500,name:"宜昌市"},
449
+          {id:420600,name:"襄阳市"},
450
+          {id:420700,name:"鄂州市"},
451
+          {id:420800,name:"荆门市"},
452
+          {id:420900,name:"孝感市"},
453
+          {id:421000,name:"荆州市"},
454
+          {id:421100,name:"黄冈市"},
455
+          {id:421200,name:"咸宁市"},
456
+          {id:421300,name:"随州市"},
457
+          {id:422800,name:"恩施土家族苗族自治州"},
458
+          {id:430000,name:"湖南省"},
459
+          {id:430100,name:"长沙市"},
460
+          {id:430200,name:"株洲市"},
461
+          {id:430300,name:"湘潭市"},
462
+          {id:430400,name:"衡阳市"},
463
+          {id:430500,name:"邵阳市"},
464
+          {id:430600,name:"岳阳市"},
465
+          {id:430700,name:"常德市"},
466
+          {id:430800,name:"张家界市"},
467
+          {id:430900,name:"益阳市"},
468
+          {id:431000,name:"郴州市"},
469
+          {id:431100,name:"永州市"},
470
+          {id:431200,name:"怀化市"},
471
+          {id:431300,name:"娄底市"},
472
+          {id:433100,name:"湘西土家族苗族自治州"},
473
+          {id:440000,name:"广东省"},
474
+          {id:440100,name:"广州市"},
475
+          {id:440200,name:"韶关市"},
476
+          {id:440300,name:"深圳市"},
477
+          {id:440400,name:"珠海市"},
478
+          {id:440500,name:"汕头市"},
479
+          {id:440600,name:"佛山市"},
480
+          {id:440700,name:"江门市"},
481
+          {id:440800,name:"湛江市"},
482
+          {id:440900,name:"茂名市"},
483
+          {id:441200,name:"肇庆市"},
484
+          {id:441300,name:"惠州市"},
485
+          {id:441400,name:"梅州市"},
486
+          {id:441500,name:"汕尾市"},
487
+          {id:441600,name:"河源市"},
488
+          {id:441700,name:"阳江市"},
489
+          {id:441800,name:"清远市"},
490
+          {id:441900,name:"东莞市"},
491
+          {id:442000,name:"中山市"},
492
+          {id:445100,name:"潮州市"},
493
+          {id:445200,name:"揭阳市"},
494
+          {id:445300,name:"云浮市"},
495
+          {id:450000,name:"广西壮族自治区"},
496
+          {id:450100,name:"南宁市"},
497
+          {id:450200,name:"柳州市"},
498
+          {id:450300,name:"桂林市"},
499
+          {id:450400,name:"梧州市"},
500
+          {id:450500,name:"北海市"},
501
+          {id:450600,name:"防城港市"},
502
+          {id:450700,name:"钦州市"},
503
+          {id:450800,name:"贵港市"},
504
+          {id:450900,name:"玉林市"},
505
+          {id:451000,name:"百色市"},
506
+          {id:451100,name:"贺州市"},
507
+          {id:451200,name:"河池市"},
508
+          {id:451300,name:"来宾市"},
509
+          {id:451400,name:"崇左市"},
510
+          {id:460000,name:"海南省"},
511
+          {id:460100,name:"海口市"},
512
+          {id:460200,name:"三亚市"},
513
+          {id:460300,name:"三沙市"},
514
+          {id:460400,name:"儋州市"},
515
+          {id:500000,name:"重庆市"},
516
+          {id:510000,name:"四川省"},
517
+          {id:510100,name:"成都市"},
518
+          {id:510300,name:"自贡市"},
519
+          {id:510400,name:"攀枝花市"},
520
+          {id:510500,name:"泸州市"},
521
+          {id:510600,name:"德阳市"},
522
+          {id:510700,name:"绵阳市"},
523
+          {id:510800,name:"广元市"},
524
+          {id:510900,name:"遂宁市"},
525
+          {id:511000,name:"内江市"},
526
+          {id:511100,name:"乐山市"},
527
+          {id:511300,name:"南充市"},
528
+          {id:511400,name:"眉山市"},
529
+          {id:511500,name:"宜宾市"},
530
+          {id:511600,name:"广安市"},
531
+          {id:511700,name:"达州市"},
532
+          {id:511800,name:"雅安市"},
533
+          {id:511900,name:"巴中市"},
534
+          {id:512000,name:"资阳市"},
535
+          {id:513200,name:"阿坝藏族羌族自治州"},
536
+          {id:513300,name:"甘孜藏族自治州"},
537
+          {id:513400,name:"凉山彝族自治州"},
538
+          {id:520000,name:"贵州省"},
539
+          {id:520100,name:"贵阳市"},
540
+          {id:520200,name:"六盘水市"},
541
+          {id:520300,name:"遵义市"},
542
+          {id:520400,name:"安顺市"},
543
+          {id:520500,name:"毕节市"},
544
+          {id:520600,name:"铜仁市"},
545
+          {id:522300,name:"黔西南布依族苗族自治州"},
546
+          {id:522600,name:"黔东南苗族侗族自治州"},
547
+          {id:522700,name:"黔南布依族苗族自治州"},
548
+          {id:530000,name:"云南省"},
549
+          {id:530100,name:"昆明市"},
550
+          {id:530300,name:"曲靖市"},
551
+          {id:530400,name:"玉溪市"},
552
+          {id:530500,name:"保山市"},
553
+          {id:530600,name:"昭通市"},
554
+          {id:530700,name:"丽江市"},
555
+          {id:530800,name:"普洱市"},
556
+          {id:530900,name:"临沧市"},
557
+          {id:532300,name:"楚雄彝族自治州"},
558
+          {id:532500,name:"红河哈尼族彝族自治州"},
559
+          {id:532600,name:"文山壮族苗族自治州"},
560
+          {id:532800,name:"西双版纳傣族自治州"},
561
+          {id:532900,name:"大理白族自治州"},
562
+          {id:533100,name:"德宏傣族景颇族自治州"},
563
+          {id:533300,name:"怒江傈僳族自治州"},
564
+          {id:533400,name:"迪庆藏族自治州"},
565
+          {id:540000,name:"西藏自治区"},
566
+          {id:540100,name:"拉萨市"},
567
+          {id:540200,name:"日喀则市"},
568
+          {id:540300,name:"昌都市"},
569
+          {id:540400,name:"林芝市"},
570
+          {id:540500,name:"山南市"},
571
+          {id:540600,name:"那曲市"},
572
+          {id:542500,name:"阿里地区"},
573
+          {id:610000,name:"陕西省"},
574
+          {id:610100,name:"西安市"},
575
+          {id:610200,name:"铜川市"},
576
+          {id:610300,name:"宝鸡市"},
577
+          {id:610400,name:"咸阳市"},
578
+          {id:610500,name:"渭南市"},
579
+          {id:610600,name:"延安市"},
580
+          {id:610700,name:"汉中市"},
581
+          {id:610800,name:"榆林市"},
582
+          {id:610900,name:"安康市"},
583
+          {id:611000,name:"商洛市"},
584
+          {id:620000,name:"甘肃省"},
585
+          {id:620100,name:"兰州市"},
586
+          {id:620200,name:"嘉峪关市"},
587
+          {id:620300,name:"金昌市"},
588
+          {id:620400,name:"白银市"},
589
+          {id:620500,name:"天水市"},
590
+          {id:620600,name:"武威市"},
591
+          {id:620700,name:"张掖市"},
592
+          {id:620800,name:"平凉市"},
593
+          {id:620900,name:"酒泉市"},
594
+          {id:621000,name:"庆阳市"},
595
+          {id:621100,name:"定西市"},
596
+          {id:621200,name:"陇南市"},
597
+          {id:622900,name:"临夏回族自治州"},
598
+          {id:623000,name:"甘南藏族自治州"},
599
+          {id:630000,name:"青海省"},
600
+          {id:630100,name:"西宁市"},
601
+          {id:630200,name:"海东市"},
602
+          {id:632200,name:"海北藏族自治州"},
603
+          {id:632300,name:"黄南藏族自治州"},
604
+          {id:632500,name:"海南藏族自治州"},
605
+          {id:632600,name:"果洛藏族自治州"},
606
+          {id:632700,name:"玉树藏族自治州"},
607
+          {id:632800,name:"海西蒙古族藏族自治州"},
608
+          {id:640000,name:"宁夏回族自治区"},
609
+          {id:640100,name:"银川市"},
610
+          {id:640200,name:"石嘴山市"},
611
+          {id:640300,name:"吴忠市"},
612
+          {id:640400,name:"固原市"},
613
+          {id:640500,name:"中卫市"},
614
+          {id:650000,name:"新疆维吾尔自治区"},
615
+          {id:650100,name:"乌鲁木齐市"},
616
+          {id:650200,name:"克拉玛依市"},
617
+          {id:650400,name:"吐鲁番市"},
618
+          {id:650500,name:"哈密市"},
619
+          {id:652300,name:"昌吉回族自治州"},
620
+          {id:652700,name:"博尔塔拉蒙古自治州"},
621
+          {id:652800,name:"巴音郭楞蒙古自治州"},
622
+          {id:652900,name:"阿克苏地区"},
623
+          {id:653000,name:"克孜勒苏柯尔克孜自治州"},
624
+          {id:653100,name:"喀什地区"},
625
+          {id:653200,name:"和田地区"},
626
+          {id:654000,name:"伊犁哈萨克自治州"},
627
+          {id:654200,name:"塔城地区"},
628
+          {id:654300,name:"阿勒泰地区"},
629
+          {id:659001,name:"石河子市"},
630
+          {id:659002,name:"阿拉尔市"},
631
+          {id:659003,name:"图木舒克市"},
632
+          {id:659004,name:"五家渠市"},
633
+          {id:659005,name:"北屯市"},
634
+          {id:659006,name:"铁门关市"},
635
+          {id:659007,name:"双河市"},
636
+          {id:659008,name:"可克达拉市"},
637
+          {id:659009,name:"昆玉市"},
638
+          {id:710000,name:"台湾省"},
639
+          {id:810000,name:"香港特别行政区"},
640
+          {id:820000,name:"澳门特别行政区"}
641
+        ],
241 642
         settlement: [
242 643
           {value: 1, label: '医保'},
243 644
           {value: 2, label: '自费'},
@@ -381,6 +782,24 @@
381 782
       diagnoses: Array,
382 783
     },
383 784
     methods: {
785
+      handleIconClick(){
786
+
787
+
788
+      },
789
+      handleSelectTwo(){
790
+
791
+
792
+      },  createFilter(queryString) {
793
+        return (restaurant) => {
794
+          return (restaurant.name.indexOf(queryString) === 0 || restaurant.id.indexOf(queryString) === 0);
795
+        };
796
+      },
797
+      querySearch(queryString, cb) {
798
+        var restaurants = this.area;
799
+        var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
800
+        // 调用 callback 返回建议列表的数据
801
+        cb(results);
802
+      },
384 803
       changeDoctor() {
385 804
         for (let i = 0; i < this.doctors.length; i++) {
386 805
           if (this.doctors[i].admin_user_id == this.form.doctor) {

文件差异内容过多而无法显示
+ 3570 - 3544
src/xt_pages/hospitalStation/doctorDesk.vue


+ 451 - 449
src/xt_pages/hospitalStation/hospitalBatchStatementPrint.vue 查看文件

@@ -1,463 +1,465 @@
1 1
 <template>
2
-    <div>
3
-      <template>
4
-        <el-button
5
-          style="position:fixed;right:25px;z-index:999"
6
-          :loading="loading"
7
-          size="small"
8
-          icon="el-icon-printer"
9
-          @click="printThisPage"
10
-          type="primary"
11
-        >打印
12
-        </el-button
13
-        >
14
-      </template>
15
-  
16
-      <div class='dialysisPage' style="padding-top:40px;" v-if="this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0">
17
-        <hospital-batch-print :infos="infos"></hospital-batch-print>
18
-      </div>
2
+  <div>
3
+    <template>
4
+      <el-button
5
+        style="position:fixed;right:25px;z-index:999"
6
+        :loading="loading"
7
+        size="small"
8
+        icon="el-icon-printer"
9
+        @click="printThisPage"
10
+        type="primary"
11
+      >打印
12
+      </el-button
13
+      >
14
+    </template>
15
+
16
+    <div class='dialysisPage' style="padding-top:40px;" v-if="this.$store.getters.xt_user.org_id == 10215 || this.$store.getters.xt_user.org_id == 0">
17
+      <hospital-batch-print :infos="infos"></hospital-batch-print>
19 18
     </div>
20
-  </template>
21
-  
22
-  <script>
23
-  import { uParseTime } from '@/utils/tools'
24
-  import axios from 'axios'
25
-  import HospitalBatchPrint from './batchStatementTemplate/hospitalBatchPrint.vue'
26
-  
27
-  export default {
28
-    name: 'hospitalBatchStatementPrint',
29
-    components: {
30
-      HospitalBatchPrint,
31
-    },
32
-    props: {
33
-      paramsObj: Object
19
+  </div>
20
+</template>
21
+
22
+<script>
23
+import { uParseTime } from '@/utils/tools'
24
+import axios from 'axios'
25
+import HospitalBatchPrint from './batchStatementTemplate/hospitalBatchPrint.vue'
26
+
27
+export default {
28
+  name: 'hospitalBatchStatementPrint',
29
+  components: {
30
+    HospitalBatchPrint,
31
+  },
32
+  props: {
33
+    paramsObj: Object
34
+  },
35
+  data() {
36
+    return {
37
+      record_date: '',
38
+      patientTableData: [],
39
+      advicePrint: [],
40
+      hisPatient: {},
41
+      patient: {},
42
+      search_input: '',
43
+      loading: false,
44
+      patient_id: 0,
45
+      prescription_id: 0,
46
+      ids: '',
47
+      info: null,
48
+      org_id: '',
49
+      list:[],
50
+      infos:[],
51
+    }
52
+  },
53
+  methods: {
54
+    getType(med_chrgitm_type) {
55
+      switch (med_chrgitm_type) {
56
+        case '01':
57
+          return '床位费'
58
+          break
59
+        case '02':
60
+          return '诊察费'
61
+
62
+          break
63
+        case '03':
64
+          return '检查费'
65
+
66
+          break
67
+        case '04':
68
+          return '化验费'
69
+          break
70
+        case '05':
71
+          return '治疗费'
72
+
73
+          break
74
+        case '06':
75
+          return '手术费'
76
+
77
+          break
78
+        case '07':
79
+          return '护理费'
80
+
81
+          break
82
+        case '08':
83
+          return '材料费'
84
+
85
+          break
86
+        case '09':
87
+          return '西药费'
88
+
89
+          break
90
+        case '10':
91
+          return '中药饮片费'
92
+
93
+          break
94
+        case '11':
95
+          return '中成药费'
96
+
97
+          break
98
+        case '12':
99
+          return '一般诊疗费'
100
+
101
+          break
102
+        case '13':
103
+          return '挂号费'
104
+
105
+          break
106
+        case '14':
107
+          return '其他费'
108
+
109
+          break
110
+
111
+      }
112
+
34 113
     },
35
-    data() {
36
-      return {
37
-        record_date: '',
38
-        patientTableData: [],
39
-        advicePrint: [],
40
-        hisPatient: {},
41
-        patient: {},
42
-        search_input: '',
43
-        loading: false,
44
-        patient_id: 0,
45
-        prescription_id: 0,
46
-        ids: '',
47
-        info: null,
48
-        org_id: '',
49
-        list:[],
50
-        infos:[],
114
+    printThisPage() {
115
+      var ptime = Math.round(new Date().getTime() / 1000)
116
+      this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
117
+
118
+      if (this.org_id == 10265) {
119
+
120
+        const style =
121
+          '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
122
+        const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}";
123
+        printJS({
124
+          printable: "prescription-print",
125
+          type: "html",
126
+          style: style1,
127
+          scanStyles: false
128
+        });
129
+
130
+      } else {
131
+
132
+        const style =
133
+          '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}'
134
+        printJS({
135
+          printable: 'statement-print',
136
+          type: 'html',
137
+          style: style,
138
+          scanStyles: false
139
+        })
140
+
51 141
       }
142
+
143
+      // if (this.org_template_info.template_id == 1) {
144
+      //   printJS({
145
+      //     printable: "dialysis-print-box",
146
+      //     type: "html",
147
+      //     style: style,
148
+      //     scanStyles: false
149
+      //   });
150
+      // }
52 151
     },
53
-    methods: {
54
-      getType(med_chrgitm_type) {
55
-        switch (med_chrgitm_type) {
56
-          case '01':
57
-            return '床位费'
58
-            break
59
-          case '02':
60
-            return '诊察费'
61
-  
62
-            break
63
-          case '03':
64
-            return '检查费'
65
-  
66
-            break
67
-          case '04':
68
-            return '化验费'
69
-            break
70
-          case '05':
71
-            return '治疗费'
72
-  
73
-            break
74
-          case '06':
75
-            return '手术费'
76
-  
77
-            break
78
-          case '07':
79
-            return '护理费'
80
-  
81
-            break
82
-          case '08':
83
-            return '材料费'
84
-  
85
-            break
86
-          case '09':
87
-            return '西药费'
88
-  
89
-            break
90
-          case '10':
91
-            return '中药饮片费'
92
-  
93
-            break
94
-          case '11':
95
-            return '中成药费'
96
-  
97
-            break
98
-          case '12':
99
-            return '一般诊疗费'
100
-  
101
-            break
102
-          case '13':
103
-            return '挂号费'
104
-  
105
-            break
106
-          case '14':
107
-            return '其他费'
108
-  
109
-            break
110
-  
152
+    getJiaTotal(items) {
153
+      console.log(items)
154
+      let total = 0
155
+      for (let i = 0; i < items.length; i++) {
156
+        if (items[i].chrgitm_lv == "01") {
157
+          total = parseFloat(total) + (parseFloat(items[i].cnt) * parseFloat(items[i].pric))
158
+
111 159
         }
112
-  
113
-      },
114
-      printThisPage() {
115
-        var ptime = Math.round(new Date().getTime() / 1000)
116
-        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
117
-  
118
-        if (this.org_id == 10265) {
119
-  
120
-          const style =
121
-            '@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoMain{display: flex;flex-wrap: wrap;padding:0 10px;margin-top:10px;}.infoMain .infoP{width: 33%;}.chargeBox{border: 1px solid #000;}.chargeUl{display:flex;justify-content: space-between;text-align: center;}.chargeUl p{line-height: 1px;}.chargeP{line-height: 1px;padding-bottom:16px;}.moneyBox{display: flex;justify-content: space-between;padding: 0 10px;background: #eeeeee;-webkit-print-color-adjust:exact;-moz-print-color-adjust:exact;-ms-print-color-adjust:exact;print-color-adjust:exact;height: 40px;align-items: center;border:1px solid #000; border-top:none}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar div{width:150px;}}';
122
-          const style1 = "@media print{#prescription-print{font-size:14px;}.title{text-align: center;font-size: 22px;font-weight: bold;}.row{display: flex;justify-content: space-between;}.under_line{border-bottom: 1px solid #999;width: 95%;text-align: center;margin-left: 2px;display: inline-block;}.inline_block{display: inline-block;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 14px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; /* 解决边框冲突 */border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid;text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}}";
123
-          printJS({
124
-            printable: "prescription-print",
125
-            type: "html",
126
-            style: style1,
127
-            scanStyles: false
128
-          });
129
-  
130
-        } else {
131
-  
132
-          const style =
133
-            '@media print {.statementTitle{font-size: 28px;text-align: center;font-weight: bold;margin-bottom: 10px;}.statementTable{width: 100%;text-align: center;border-collapse: collapse;line-height: 40px;font-size: 16px;border-color: #000;}}'
134
-          printJS({
135
-            printable: 'statement-print',
136
-            type: 'html',
137
-            style: style,
138
-            scanStyles: false
139
-          })
140
-  
141
-        }
142
-  
143
-        // if (this.org_template_info.template_id == 1) {
144
-        //   printJS({
145
-        //     printable: "dialysis-print-box",
146
-        //     type: "html",
147
-        //     style: style,
148
-        //     scanStyles: false
149
-        //   });
150
-        // }
151
-      },
152
-      getJiaTotal(items) {
153
-        console.log(items)
154
-        let total = 0
155
-        for (let i = 0; i < items.length; i++) {
156
-          if (items[i].chrgitm_lv == "01") {
157
-            total = parseFloat(total) + (parseFloat(items[i].cnt) * parseFloat(items[i].pric))
158
-  
159
-          }
160
+      }
161
+      return total.toFixed(2)
162
+    },
163
+    getYiTotal(items) {
164
+      let total = 0
165
+      for (let i = 0; i < items.length; i++) {
166
+        if (items[i].chrgitm_lv == "02") {
167
+          total = parseFloat(total) + (parseFloat(items[i].cnt) * parseFloat(items[i].pric))
168
+
169
+          // total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
160 170
         }
161
-        return total.toFixed(2)
162
-      },
163
-      getYiTotal(items) {
164
-        let total = 0
165
-        for (let i = 0; i < items.length; i++) {
166
-          if (items[i].chrgitm_lv == "02") {
167
-            total = parseFloat(total) + (parseFloat(items[i].cnt) * parseFloat(items[i].pric))
168
-  
169
-            // total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
170
-          }
171
+      }
172
+      return total.toFixed(2)
173
+    },
174
+    getBingTotal(items) {
175
+
176
+      let total = 0
177
+      for (let i = 0; i < items.length; i++) {
178
+        if (items[i].chrgitm_lv == "03") {
179
+          total = parseFloat(total) + (parseFloat(items[i].cnt) * parseFloat(items[i].pric))
180
+
181
+          // total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
171 182
         }
172
-        return total.toFixed(2)
173
-      },
174
-      getBingTotal(items) {
175
-  
176
-        let total = 0
177
-        for (let i = 0; i < items.length; i++) {
178
-          if (items[i].chrgitm_lv == "03") {
179
-            total = parseFloat(total) + (parseFloat(items[i].cnt) * parseFloat(items[i].pric))
180
-  
181
-            // total = Number(total) + Number((parseFloat(items[i].count) * parseFloat(items[i].price)).toFixed(2))
182
-          }
183
+      }
184
+      return total.toFixed(2)
185
+    },
186
+    getInfo(order_ids) {
187
+      var that = this
188
+      axios.get('http://127.0.0.1:9532/api/settle/query/batch', {
189
+        params: {
190
+          order_ids: order_ids,
191
+          admin_user_id: this.$store.getters.xt_user.user.id
183 192
         }
184
-        return total.toFixed(2)
185
-      },
186
-      getInfo(order_ids) {
187
-        var that = this
188
-        axios.get('http://127.0.0.1:9532/api/settle/query/batch', {
189
-          params: {
190
-            order_ids: order_ids,
191
-            admin_user_id: this.$store.getters.xt_user.user.id
193
+      })
194
+        .then(function(response) {
195
+          if (response.data.state == 0) {
196
+            this.$message.error(response.data.msg)
197
+            return false
198
+          } else {
199
+            let infos = []
200
+            for(var i  = 0; i < response.data.data.infos.length; i++){
201
+              var info = response.data.data.infos[i]
202
+              that.info['patient'] = info.patient
203
+              that.info['diagnosis'] = info.diagnosis
204
+              that.info['p_admin'] = info.printor_admin
205
+              that.info['charge_admin'] = info.charge_admin
206
+              that.info['fixmedins_name'] = info.org_name
207
+              that.info['fixmedins_code'] = info.org_code
208
+              that.info['order'] = info.order
209
+              that.info['date'] = info.date
210
+              that.info['number'] = info.number
211
+              that.info['order_infos'] = info.order_infos
212
+              that.info['diagnosis'] = info.diagnosis
213
+              that.info['dia_config'] = info.dia_config
214
+              that.info['doctor_info'] = info.doctor_info
215
+              that.info['bed_cost_total'] = info.bedCostTotal
216
+              that.info['bed_cost_self_total'] = info.bedCostSelfTotal
217
+              that.info['bed_cost_part_self_total'] = info.bedCostPartSelfTotal
218
+              that.info['operation_cost_total'] = info.operationCostTotal
219
+              that.info['operation_cost_self_total'] = info.operationCostSelfTotal
220
+              that.info['operation_cost_part_self_total'] = info.operationCostPartSelfTotal
221
+              that.info['other_cost_total'] = info.otherCostTotal
222
+              that.info['other_cost_self_total'] = info.otherCostSelfTotal
223
+              that.info['other_cost_part_self_total'] = info.otherCostPartSelfTotal
224
+              that.info['material_cost_total'] = info.materialCostTotal
225
+              that.info['material_cost_self_total'] = info.materialCostSelfTotal
226
+              that.info['material_cost_part_self_total'] = info.materialCostPartSelfTotal
227
+              that.info['western_medicine_cost_total'] = info.westernMedicineCostTotal
228
+              that.info['western_medicine_cost_self_total'] = info.westernMedicineCostSelfTotal
229
+              that.info['western_medicine_cost_part_self_total'] = info.westernMedicineCostPartSelfTotal
230
+              that.info['chinese_traditional_medicine_cost_total'] = info.chineseTraditionalMedicineCostTotal
231
+              that.info['chinese_traditional_medicine_cost_self_total'] = info.chineseTraditionalMedicineCostSelfTotal
232
+              that.info['chinese_traditional_medicine_cost_part_self_total'] = info.chineseTraditionalMedicineCostPartSelfTotal
233
+              that.info['check_cost_total'] = info.checkCostTotal
234
+              that.info['check_cost_self_total'] = info.checkCostSelfTotal
235
+              that.info['check_cost_part_self_total'] = info.checkCostPartSelfTotal
236
+              that.info['laboratory_cost_total'] = info.laboratoryCostTotal
237
+              that.info['laboratory_cost_self_total'] = info.laboratoryCostSelfTotal
238
+              that.info['laboratory_cost_part_self_total'] = info.laboratoryCostPartSelfTotal
239
+              that.info['treat_cost_total'] = info.treatCostTotal
240
+              that.info['treat_cost_self_total'] = info.treatCostSelfTotal
241
+              that.info['treat_cost_part_self_total'] = info.treatCostPartSelfTotal
242
+              that.info['date'] = info.date
243
+              that.info['number'] = info.number
244
+              that.info['order_infos'] = info.order_infos
245
+              that.info['diagnosis'] = info.diagnosis
246
+              that.info['his'] = info.his_hospital
247
+              infos.push(that.info)
248
+            }
249
+            that.infos = infos
250
+            console.log(infos)
251
+            console.log(that.infos)
252
+
253
+
192 254
           }
193 255
         })
194
-          .then(function(response) {
195
-            if (response.data.state == 0) {
196
-              this.$message.error(response.data.msg)
197
-              return false
198
-            } else {
199
-              let infos = []
200
-              for(var i  = 0; i < response.data.data.infos; i++){
201
-                var info = response.data.data.infos[i]
202
-                that.info['patient'] = info.patient
203
-                that.info['diagnosis'] = info.diagnosis
204
-                that.info['p_admin'] = info.printor_admin
205
-                that.info['charge_admin'] = info.charge_admin
206
-                that.info['fixmedins_name'] = info.org_name
207
-                that.info['fixmedins_code'] = info.org_code
208
-                that.info['order'] = info.order
209
-                that.info['date'] = info.date
210
-                that.info['number'] = info.number
211
-                that.info['order_infos'] = info.order_infos
212
-                that.info['diagnosis'] = info.diagnosis
213
-                that.info['dia_config'] = info.dia_config
214
-                that.info['doctor_info'] = info.doctor_info
215
-                that.info['bed_cost_total'] = info.bedCostTotal
216
-                that.info['bed_cost_self_total'] = info.bedCostSelfTotal
217
-                that.info['bed_cost_part_self_total'] = info.bedCostPartSelfTotal
218
-                that.info['operation_cost_total'] = info.operationCostTotal
219
-                that.info['operation_cost_self_total'] = info.operationCostSelfTotal
220
-                that.info['operation_cost_part_self_total'] = info.operationCostPartSelfTotal
221
-                that.info['other_cost_total'] = info.otherCostTotal
222
-                that.info['other_cost_self_total'] = info.otherCostSelfTotal
223
-                that.info['other_cost_part_self_total'] = info.otherCostPartSelfTotal
224
-                that.info['material_cost_total'] = info.materialCostTotal
225
-                that.info['material_cost_self_total'] = info.materialCostSelfTotal
226
-                that.info['material_cost_part_self_total'] = info.materialCostPartSelfTotal
227
-                that.info['western_medicine_cost_total'] = info.westernMedicineCostTotal
228
-                that.info['western_medicine_cost_self_total'] = info.westernMedicineCostSelfTotal
229
-                that.info['western_medicine_cost_part_self_total'] = info.westernMedicineCostPartSelfTotal
230
-                that.info['chinese_traditional_medicine_cost_total'] = info.chineseTraditionalMedicineCostTotal
231
-                that.info['chinese_traditional_medicine_cost_self_total'] = info.chineseTraditionalMedicineCostSelfTotal
232
-                that.info['chinese_traditional_medicine_cost_part_self_total'] = info.chineseTraditionalMedicineCostPartSelfTotal
233
-                that.info['check_cost_total'] = info.checkCostTotal
234
-                that.info['check_cost_self_total'] = info.checkCostSelfTotal
235
-                that.info['check_cost_part_self_total'] = info.checkCostPartSelfTotal
236
-                that.info['laboratory_cost_total'] = info.laboratoryCostTotal
237
-                that.info['laboratory_cost_self_total'] = info.laboratoryCostSelfTotal
238
-                that.info['laboratory_cost_part_self_total'] = info.laboratoryCostPartSelfTotal
239
-                that.info['treat_cost_total'] = info.treatCostTotal
240
-                that.info['treat_cost_self_total'] = info.treatCostSelfTotal
241
-                that.info['treat_cost_part_self_total'] = info.treatCostPartSelfTotal
242
-                that.info['date'] = info.date
243
-                that.info['number'] = info.number
244
-                that.info['order_infos'] = info.order_infos
245
-                that.info['diagnosis'] = info.diagnosis
246
-                that.info['his'] = info.his_hospital
247
-                infos.push(that.info)
248
-              }
249
-              that.infos = infos
250
-  
251
-            }
252
-          })
253
-          .catch(function(error) {
254
-          })
255
-      }
256
-      },
257
-    created() {
258
-      this.getInfo(this.paramsObj.order_ids)
259
-      this.org_id = this.$store.getters.xt_user.org_id
256
+        .catch(function(error) {
257
+        })
258
+    }
260 259
     },
261
-    watch: {
262
-      paramsObj: {//深度监听,可监听到对象、数组的变化
263
-        handler(val, oldVal) {
264
-          this.paramsObj = val
265
-          this.getInfo(this.paramsObj.order_ids)
266
-  
267
-        },
268
-        deep: true
269
-      }
260
+  created() {
261
+    this.getInfo(this.paramsObj.order_ids)
262
+    this.org_id = this.$store.getters.xt_user.org_id
263
+  },
264
+  watch: {
265
+    paramsObj: {//深度监听,可监听到对象、数组的变化
266
+      handler(val, oldVal) {
267
+        this.paramsObj = val
268
+        this.getInfo(this.paramsObj.order_ids)
269
+
270
+      },
271
+      deep: true
270 272
     }
271
-  
272
-  }
273
-  </script>
274
-  
275
-  <style>
276
-  .dialysis-print-order {
277
-    width: 960px;
278
-    margin: 0 auto;
279
-  }
280
-  
281
-  .dialysis-print-order .order-yy-name {
282
-    margin: auto;
283
-    text-align: center;
284
-    font-size: 20px;
285
-    letter-spacing: 5px;
286
-  }
287
-  
288
-  .dialysis-print-order .order-title {
289
-    margin: auto;
290
-    font-weight: 600;
291
-    text-align: center;
292
-    font-size: 22px;
293
-    padding: 10px;
294
-  }
295
-  
296
-  .dialysis-print-order .table-box {
297
-    width: 100%;
298
-    line-height: 23px;
299
-    font-size: 14px;
300
-  }
301
-  
302
-  .dialysis-print-order .print-table {
303
-    width: 100%;
304
-    text-align: center;
305
-    border-collapse: collapse;
306
-    line-height: 40px;
307
-    font-size: 14px;
308
-    border-color: #000;
309
-  }
310
-  
311
-  .dialysis-print-order .print-table-no {
312
-    width: 100%;
313
-    text-align: center;
314
-    border-collapse: collapse;
315
-    font-size: 14px;
316
-  }
317
-  
318
-  .dialysis-print-order .under-line {
319
-    border-bottom: 1px solid #999;
320
-    width: 95%;
321
-    text-align: center;
322
-    margin-left: 2px;
323
-  }
324
-  
325
-  .dialysis-print-order .title-box {
326
-    text-align: center;
327
-    font-size: 16px;
328
-  }
329
-  
330
-  .dialysis-print-order .radio-lebel-box {
331
-    font-weight: 400;
332
-    cursor: pointer;
333
-  }
334
-  
335
-  .dialysis-print-order .radio-no {
336
-    opacity: 0;
337
-    outline: none;
338
-    position: absolute;
339
-    margin: 0;
340
-    width: 0;
341
-    height: 0;
342
-    z-index: -1;
343
-  }
344
-  
345
-  .dialysis-print-order .radio-inner {
346
-    white-space: nowrap;
347
-    cursor: pointer;
348
-    outline: none;
349
-    display: inline-block;
350
-    line-height: 1;
351
-    position: relative;
352
-    vertical-align: middle;
353
-  }
354
-  
355
-  .dialysis-print-order .radio-fang {
356
-    display: inline-block;
357
-    position: relative;
358
-    border: 1px solid #000;
359
-    box-sizing: border-box;
360
-    width: 14px;
361
-    height: 14px;
362
-    background-color: #fff;
363
-    z-index: 1;
364
-    transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
365
-    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
366
-  }
367
-  
368
-  .dialysis-print-order .is-checked-radio::after {
369
-    content: "√";
370
-    font-size: 15px;
371
-  }
372
-  
373
-  .dialysis-print-order .print-table-no tr td {
374
-    padding: 8px 5px;
375
-    line-height: 25px;
376
-  }
377
-  
378
-  .dialysis-print-order .print-table tr td {
379
-    padding: 1px 1px;
380
-    /*line-height: 25px;*/
381
-  }
382
-  
383
-  .es-img {
384
-    height: 30px;
385
-  }
386
-  
387
-  .advice-name {
388
-    text-align: left;
389
-  }
390
-  
391
-  .advice-children {
392
-    display: flex;
393
-  }
394
-  
395
-  .title-box-pro {
396
-    border: 0 #fff;
397
-    line-height: 25px;
398
-    height: 25px;
399
-    text-align: left;
400
-    padding-left: 10px !important;
401
-  }
402
-  
403
-  .title-box-pro-tr {
404
-    border: 0 #fff;
405
-  }
406
-  
407
-  .text-align-left {
408
-    text-align: left !important;
409
-    padding-left: 10px !important;
410
-    font-size: 14px !important;
411
-    line-height: 25px;
412
-  }
413
-  
414
-  .print-table-tr-new td {
415
-    line-height: 20px !important;
416
-  }
417
-  
418
-  .border-top-solid {
419
-    border: solid 1px #000;
420
-  }
421
-  
422
-  .print-template-two tr {
423
-    line-height: 30px;
424
-  }
425
-  
426
-  .table-box1 {
427
-    border: 1px solid #000;
428
-    width: 100%;
429
-    line-height: 30px;
430
-    font-size: 14px;
431
-    border-collapse: collapse;
432
-  }
433
-  
434
-  .table-box1 tr {
435
-    border-bottom: 1px solid #000;
436
-  }
437
-  </style>
438
-  
439
-  <style lang="scss">
440
-  
441
-  .newContainer {
442
-  
443
-  .dialysisPage::-webkit-scrollbar {
444
-    height: 15px;
445
-  }
446
-  
447
-  .el-date-editor {
448
-  
449
-  .el-input__inner {
450
-    padding-right: 0px;
451
-  }
452
-  
453
-  }
454
-  .el-table td, .el-table th {
455
-    text-align: center;
456
-  }
457
-  
458
-  }
459
-  .newContainer::-webkit-scrollbar {
460
-    height: 15px !important;
461 273
   }
462
-  </style>
463
-  
274
+
275
+}
276
+</script>
277
+
278
+<style>
279
+.dialysis-print-order {
280
+  width: 960px;
281
+  margin: 0 auto;
282
+}
283
+
284
+.dialysis-print-order .order-yy-name {
285
+  margin: auto;
286
+  text-align: center;
287
+  font-size: 20px;
288
+  letter-spacing: 5px;
289
+}
290
+
291
+.dialysis-print-order .order-title {
292
+  margin: auto;
293
+  font-weight: 600;
294
+  text-align: center;
295
+  font-size: 22px;
296
+  padding: 10px;
297
+}
298
+
299
+.dialysis-print-order .table-box {
300
+  width: 100%;
301
+  line-height: 23px;
302
+  font-size: 14px;
303
+}
304
+
305
+.dialysis-print-order .print-table {
306
+  width: 100%;
307
+  text-align: center;
308
+  border-collapse: collapse;
309
+  line-height: 40px;
310
+  font-size: 14px;
311
+  border-color: #000;
312
+}
313
+
314
+.dialysis-print-order .print-table-no {
315
+  width: 100%;
316
+  text-align: center;
317
+  border-collapse: collapse;
318
+  font-size: 14px;
319
+}
320
+
321
+.dialysis-print-order .under-line {
322
+  border-bottom: 1px solid #999;
323
+  width: 95%;
324
+  text-align: center;
325
+  margin-left: 2px;
326
+}
327
+
328
+.dialysis-print-order .title-box {
329
+  text-align: center;
330
+  font-size: 16px;
331
+}
332
+
333
+.dialysis-print-order .radio-lebel-box {
334
+  font-weight: 400;
335
+  cursor: pointer;
336
+}
337
+
338
+.dialysis-print-order .radio-no {
339
+  opacity: 0;
340
+  outline: none;
341
+  position: absolute;
342
+  margin: 0;
343
+  width: 0;
344
+  height: 0;
345
+  z-index: -1;
346
+}
347
+
348
+.dialysis-print-order .radio-inner {
349
+  white-space: nowrap;
350
+  cursor: pointer;
351
+  outline: none;
352
+  display: inline-block;
353
+  line-height: 1;
354
+  position: relative;
355
+  vertical-align: middle;
356
+}
357
+
358
+.dialysis-print-order .radio-fang {
359
+  display: inline-block;
360
+  position: relative;
361
+  border: 1px solid #000;
362
+  box-sizing: border-box;
363
+  width: 14px;
364
+  height: 14px;
365
+  background-color: #fff;
366
+  z-index: 1;
367
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
368
+  background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
369
+}
370
+
371
+.dialysis-print-order .is-checked-radio::after {
372
+  content: "√";
373
+  font-size: 15px;
374
+}
375
+
376
+.dialysis-print-order .print-table-no tr td {
377
+  padding: 8px 5px;
378
+  line-height: 25px;
379
+}
380
+
381
+.dialysis-print-order .print-table tr td {
382
+  padding: 1px 1px;
383
+  /*line-height: 25px;*/
384
+}
385
+
386
+.es-img {
387
+  height: 30px;
388
+}
389
+
390
+.advice-name {
391
+  text-align: left;
392
+}
393
+
394
+.advice-children {
395
+  display: flex;
396
+}
397
+
398
+.title-box-pro {
399
+  border: 0 #fff;
400
+  line-height: 25px;
401
+  height: 25px;
402
+  text-align: left;
403
+  padding-left: 10px !important;
404
+}
405
+
406
+.title-box-pro-tr {
407
+  border: 0 #fff;
408
+}
409
+
410
+.text-align-left {
411
+  text-align: left !important;
412
+  padding-left: 10px !important;
413
+  font-size: 14px !important;
414
+  line-height: 25px;
415
+}
416
+
417
+.print-table-tr-new td {
418
+  line-height: 20px !important;
419
+}
420
+
421
+.border-top-solid {
422
+  border: solid 1px #000;
423
+}
424
+
425
+.print-template-two tr {
426
+  line-height: 30px;
427
+}
428
+
429
+.table-box1 {
430
+  border: 1px solid #000;
431
+  width: 100%;
432
+  line-height: 30px;
433
+  font-size: 14px;
434
+  border-collapse: collapse;
435
+}
436
+
437
+.table-box1 tr {
438
+  border-bottom: 1px solid #000;
439
+}
440
+</style>
441
+
442
+<style lang="scss">
443
+
444
+.newContainer {
445
+
446
+.dialysisPage::-webkit-scrollbar {
447
+  height: 15px;
448
+}
449
+
450
+.el-date-editor {
451
+
452
+.el-input__inner {
453
+  padding-right: 0px;
454
+}
455
+
456
+}
457
+.el-table td, .el-table th {
458
+  text-align: center;
459
+}
460
+
461
+}
462
+.newContainer::-webkit-scrollbar {
463
+  height: 15px !important;
464
+}
465
+</style>

+ 647 - 0
src/xt_pages/hospitalStation/inHospitalHistory.vue 查看文件

@@ -0,0 +1,647 @@
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
+        <!-- <el-input style="width: 180px;" v-model.trim="search_input" class="filter-item"/> -->
9
+        <el-autocomplete
10
+          style="margin:16px 5px"
11
+          popper-class="my-autocomplete"
12
+          v-model.trim="search_input"
13
+          :fetch-suggestions="querySearchAsync"
14
+          :trigger-on-focus="false"
15
+          placeholder="病人名字或者透析号"
16
+          @select="handleSelect"
17
+        >
18
+          <i class="el-icon-search el-input__icon" slot="suffix"> </i>
19
+          <template slot-scope="{ item }">
20
+            <div class="name">{{ item.name }}</div>
21
+          </template>
22
+        </el-autocomplete>
23
+        <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
24
+                   @click="searchAction">搜索
25
+        </el-button>
26
+
27
+        <el-date-picker type="datetime" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
28
+                        placeholder="选择时间" v-model="start_time" style="width:200px"
29
+                        @change="changeStart"
30
+        >
31
+        </el-date-picker>
32
+        -
33
+        <el-date-picker type="datetime" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
34
+                        placeholder="选择时间" v-model="end_time" style="width:200px"
35
+                        @change="changeEnd"
36
+        >
37
+        </el-date-picker>
38
+
39
+      </div>
40
+      <el-table :data="tableData" border  :row-style="{ color: '#303133' }"
41
+                :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
42
+                highlight-current-row>
43
+        <el-table-column align="center" type="index" label="序号" width="60">
44
+        </el-table-column>
45
+        <el-table-column align="center" prop="dialysis_no" label="姓名" width="80">
46
+          <template slot-scope="scope">{{scope.row.name }}</template>
47
+        </el-table-column>
48
+        <el-table-column align="center" prop="name" label="证件号" width='180'>
49
+          <template slot-scope="scope">{{ scope.row.id_card_no }}</template>
50
+        </el-table-column>
51
+        <el-table-column align="center" prop="name" label="就诊号" width="80">
52
+          <template slot-scope="scope">
53
+            {{scope.row.number}}
54
+          </template>
55
+        </el-table-column>
56
+        <el-table-column align="center" prop="name" label="入院科室" width="80">
57
+          <template slot-scope="scope">{{getDepartMent(scope.row.departments)}}</template>
58
+        </el-table-column>
59
+        <el-table-column align="center" prop="name" label="入院时间" width="100">
60
+          <template slot-scope="scope">{{scope.row.in_hosptial_time}}</template>
61
+        </el-table-column>
62
+        <el-table-column align="center" prop="name" label="出院时间" width="100">
63
+          <template slot-scope="scope">{{scope.row.out_hosptial_time}}</template>
64
+        </el-table-column>
65
+        <el-table-column align="center" prop="name" label="疾病类型" width="100">
66
+          <template slot-scope="scope">{{GetSickType(scope.row.sick_type)}}</template>
67
+        </el-table-column>
68
+        <el-table-column align="center" prop="name" label="诊断" width="100">
69
+          <template slot-scope="scope">{{GetDiagnosisName(parseInt(scope.row.diagnosis))}}</template>
70
+        </el-table-column>
71
+        <el-table-column align="center" prop="name" label="医疗类别" width="100">
72
+          <template slot-scope="scope">
73
+            <div v-if="scope.row.med_type == 11">普通住院</div>
74
+            <div v-if="scope.row.med_type == 14">门诊特殊病</div>
75
+          </template>
76
+        </el-table-column>
77
+
78
+        <el-table-column align="center" prop="name" label="结算类型" width="70">
79
+          <template slot-scope="scope">{{getBanlance(scope.row.balance_accounts_type) }}</template>
80
+        </el-table-column>
81
+
82
+
83
+
84
+        <el-table-column align="center" prop="name" label="医生" width="80">
85
+          <template slot-scope="scope">{{getDoctor(scope.row.doctor) }}</template>
86
+        </el-table-column>
87
+        <el-table-column align="center" prop="name" label="状态" width="70">
88
+          <template slot-scope="scope">
89
+            <div v-if="scope.row.in_hospital_status == 1 && scope.row.out_hospital_status == 0">{{"在院"}}</div>
90
+            <div v-if="scope.row.in_hospital_status == 1 && scope.row.out_hospital_status == 1">{{"已出院"}}</div>
91
+          </template>
92
+        </el-table-column>
93
+<!--        <el-table-column align="center" prop="name" label="操作" width="180">-->
94
+<!--          <template slot-scope="scope">-->
95
+<!--            <el-button size="mini" type="primary" v-if="scope.row.status == 1"-->
96
+<!--                       @click="toReturnPatient(scope.row)">退号-->
97
+<!--            </el-button>-->
98
+<!--          </template>-->
99
+<!--        </el-table-column>-->
100
+      </el-table>
101
+
102
+      <el-pagination
103
+        @size-change="handleSizeChange"
104
+        @current-change="handleCurrentChange"
105
+        :page-sizes="[10, 50, 100]"
106
+        :page-size="10"
107
+        background
108
+        style="margin-top:20px;float: right"
109
+        layout="total, sizes, prev, pager, next, jumper"
110
+        :total="total"
111
+      >
112
+      </el-pagination>
113
+
114
+    </div>
115
+  </div>
116
+</template>
117
+
118
+<script>
119
+const moment = require('moment')
120
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
121
+import {getInHospitalHistory,getInitData} from '@/api/his/his'
122
+import { uParseTime } from '@/utils/tools'
123
+import { getDictionaryDataConfig } from '@/utils/data'
124
+import axios from 'axios'
125
+export default {
126
+  components: {
127
+    BreadCrumb
128
+  },
129
+  data() {
130
+    return {
131
+      crumbs: [
132
+        { path: false, name: '门诊挂号' },
133
+        { path: false, name: '挂号历史' }
134
+      ],
135
+      register_type: 0,
136
+      search_input: '',
137
+      value1: '',
138
+      tableData: [],
139
+      register: [
140
+        { value: 0, label: '全部' },
141
+        { value: 1, label: '普通' },
142
+        { value: 2, label: '主治' },
143
+        { value: 3, label: '主任' },
144
+        { value: 4, label: '免收诊金' },
145
+        { value: 5, label: '专家' }
146
+      ],
147
+      start_time: moment().format('YYYY-MM-DD HH:mm'),
148
+      end_time: moment().format('YYYY-MM-DD HH:mm'),
149
+      limit: 10,
150
+      page: 1,
151
+      total: 0,
152
+      departMent: [],
153
+      doctorList: [],
154
+      medicalCare: [{
155
+        id: 1,
156
+        name: '职工基本医疗保险'
157
+      }, {
158
+        id: 2,
159
+        name: '公务员医疗补助'
160
+      }, {
161
+        id: 3,
162
+        name: '大额医疗费用补助'
163
+      }, {
164
+        id: 4,
165
+        name: '离休人员医疗'
166
+      }, {
167
+        id: 5,
168
+        name: '城乡居民基本医疗保险'
169
+      }, {
170
+        id: 6,
171
+        name: '城乡居民大病医疗保险'
172
+      },
173
+        {
174
+          id: 7,
175
+          name: '生育保险'
176
+        }],
177
+      certificates: [{
178
+        value: 1,
179
+        label: '内地身份证'
180
+      }, {
181
+        value: 2,
182
+        label: '社保卡'
183
+      }, {
184
+        value: 3,
185
+        label: '护照'
186
+      }, {
187
+        value: 4,
188
+        label: '军官证'
189
+      }, {
190
+        value: 5,
191
+        label: '台胞证'
192
+      }, {
193
+        value: 6,
194
+        label: '港澳地区身份证'
195
+      }],
196
+      settlement:
197
+        [
198
+          { value: 1, label: '医保' },
199
+          { value: 2, label: '自费' },
200
+          { value: 3, label: '公费' },
201
+          { value: 4, label: '农保' },
202
+          { value: 5, label: '会员' },
203
+          { value: 6, label: '职工' },
204
+          { value: 7, label: '合同' },
205
+          {value: 8, label: '医保自费'},
206
+
207
+        ],
208
+      // medicalCare: [{
209
+      //   value: 1,
210
+      //   label: '职工基本医疗保险'
211
+      //   }, {
212
+      //   value: 2,
213
+      //   label: "公务员医疗补助"
214
+      //   },{
215
+      //   value: 3,
216
+      //   label: "大额医疗费用补助"
217
+      //   },{
218
+      //   value: 4,
219
+      //   label: "离休人员医疗"
220
+      //   },{
221
+      //   value: 5,
222
+      //   label: "城乡居民基本医疗保险"
223
+      //   },{
224
+      //   value: 6,
225
+      //   label: "城乡居民大病医疗保险"
226
+      //   },
227
+      //   {
228
+      //   value: 7,
229
+      //   label: "生育保险"
230
+      // }],
231
+      newRegister: [{
232
+        value: 1,
233
+        label: '普通'
234
+      }, {
235
+        value: 2,
236
+        label: '主治'
237
+      }, {
238
+        value: 3,
239
+        label: '主任'
240
+      }, {
241
+        value: 4,
242
+        label: '免收诊金'
243
+      }, {
244
+        value: 5,
245
+        label: '专家'
246
+      }],
247
+
248
+      tablePatient: [],
249
+      creator: '',
250
+      startUnix: '',
251
+
252
+      dialogVisible: false,
253
+      form: {},
254
+      is_Name: false,
255
+      sick:[],
256
+      diagnoses:[],
257
+    }
258
+  },
259
+  created() {
260
+    // let a = JSON.parse(localStorage.getItem("temp"))
261
+    // let arr = []
262
+    // a.map(item => {
263
+    //     if(item.org_id == this.$store.getters.xt_user.org_id){
264
+    //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
265
+    //         arr.push(item)
266
+    //     }
267
+
268
+    // })
269
+    // this.tableData = arr
270
+    //获取所有挂号号的患者
271
+
272
+    this.creator = this.$store.getters.xt_user.user.user_name
273
+    var today = moment().startOf('day').format('YYYY-MM-DD')
274
+    var todayUnix = Date.parse(today) / 1000
275
+    this.startUnix = todayUnix - 28800
276
+    this.getInitData()
277
+    this.getlist()
278
+    this.getDictionaryDataConfig()
279
+  },
280
+  methods: {
281
+    getInitData() {
282
+      getInitData().then((response) => {
283
+        if (response.data.state == 0) {
284
+          this.$message.error(response.data.msg);
285
+          return false;
286
+        } else {
287
+          this.sick = response.data.data.sick;
288
+          this.diagnoses = response.data.data.diagnose;
289
+        }
290
+      });
291
+    },GetSickType(id){
292
+      for(let i = 0;i < this.sick.length; i++){
293
+        if(this.sick[i].id == id){
294
+          return this.sick[i].class_name
295
+        }
296
+      }
297
+      return ""
298
+    },
299
+    GetDiagnosisName(id){
300
+      for(let i = 0;i < this.diagnoses.length; i++){
301
+        if(this.diagnoses[i].id == id){
302
+          return this.diagnoses[i].class_name
303
+        }
304
+      }
305
+      return ""
306
+    },
307
+    searchAction() {
308
+      this.getlist()
309
+    },
310
+    // changeTime(val){
311
+    //     let arr = JSON.parse(localStorage.getItem("temp"))
312
+    //     arr.map(item => {
313
+    //         item.create_time = moment(item.create_time * 1000).format('YYYY-MM-DD')
314
+    //     })
315
+    //     this.tableData = arr
316
+    //     console.log(new Date(val[0]).getTime() / 1000)
317
+    //     console.log(new Date(val[1]).getTime() / 1000)
318
+    //     let arr1 = this.tableData
319
+    //     let a = []
320
+    //     arr1.map(item => {
321
+    //      if(new Date(item.create_time).getTime() / 1000 > new Date(val[0]).getTime() / 1000 && new Date(item.create_time).getTime() / 1000 < new Date(val[1]).getTime() / 1000 && item.org_id == this.$store.getters.xt_user.org_id){
322
+    //         a.push(item)
323
+    //       }
324
+    //     })
325
+    //     this.tableData = a
326
+    // },
327
+    changeStart(val) {
328
+      this.start_time = val
329
+      this.getlist()
330
+    },
331
+    changeEnd(val) {
332
+      this.end_time = val
333
+      this.getlist()
334
+    },
335
+    changeRegister(val) {
336
+      this.getlist()
337
+    },
338
+    handleSizeChange(val) {
339
+      this.limit = val
340
+      this.getlist()
341
+    },
342
+    handleCurrentChange(val) {
343
+      this.page = val
344
+      this.getlist()
345
+    },
346
+    getlist() {
347
+      var params = {
348
+        keyword: this.search_input,
349
+        start_time: this.start_time,
350
+        end_time: this.end_time,
351
+        limit: this.limit,
352
+        page: this.page
353
+      }
354
+      getInHospitalHistory(params).then(response => {
355
+        if (response.data.state == 1) {
356
+          var history = response.data.data.history
357
+
358
+          console.log('history', history)
359
+          this.tableData = history
360
+          var total = response.data.data.total
361
+          console.log('total', total)
362
+          this.total = total
363
+          var department = response.data.data.department
364
+          console.log('department', department)
365
+          this.departMent = department
366
+          var doctor = response.data.data.doctor
367
+          console.log('doctor', doctor)
368
+          this.doctorList = doctor
369
+        }
370
+      })
371
+
372
+    },
373
+    getDepartMent(id) {
374
+      var name = ''
375
+      for (let i = 0; i < this.departMent.length; i++) {
376
+        if (id == this.departMent[i].id) {
377
+          name = this.departMent[i].name
378
+        }
379
+      }
380
+      return name
381
+    },
382
+    getDoctor(id) {
383
+      var user_name = ''
384
+      for (let i = 0; i < this.doctorList.length; i++) {
385
+        if (id == this.doctorList[i].admin_user_id) {
386
+          user_name = this.doctorList[i].user_name
387
+        }
388
+      }
389
+      return user_name
390
+    },
391
+    getMedicalTreatment(id) {
392
+      var name = ''
393
+      for (let i = 0; i < this.medicalCare.length; i++) {
394
+        if (this.medicalCare[i].id == id) {
395
+          name = this.medicalCare[i].name
396
+        }
397
+      }
398
+      return name
399
+    },
400
+    getTime(value, temp) {
401
+      if (value != undefined) {
402
+        return uParseTime(value, temp)
403
+      }
404
+      return ''
405
+    }, toReturnSZPatient(val) {
406
+      if(val.balance_accounts_type == 2){
407
+        this.$confirm('是否退号', '退号 ', {
408
+          confirmButtonText: '确 定',
409
+          cancelButtonText: '取 消',
410
+          type: 'warning'
411
+        }).then(() => {
412
+          let params = {
413
+            'id': val.id,
414
+          };
415
+          refundNumber(params).then(response => {
416
+            if (response.data.state == 0) {
417
+              this.$message.error(response.data.msg);
418
+              this.loadingtwo = false;
419
+              return false
420
+            } else {
421
+              this.getlist()
422
+              this.$message({ message: '退号成功', type: 'success' });
423
+
424
+            }
425
+          })
426
+
427
+        }).catch(() => {
428
+
429
+        })
430
+
431
+      }else{
432
+        var that = this
433
+        this.$confirm('是否退号', '退号', {
434
+          confirmButtonText: '确 定',
435
+          cancelButtonText: '取 消',
436
+          type: 'warning'
437
+        }).then(() => {
438
+          axios.get('http://127.0.0.1:9532/sz/api/refundnumber/get', {
439
+            params: {
440
+              his_patient_id: val.id,
441
+              record_time: this.getTime(val.record_date, '{y}-{m}-{d}'),
442
+              admin_user_id: this.$store.getters.xt_user.user.id,
443
+              patient_id: val.patient_id
444
+            }
445
+          })
446
+            .then(function(response) {
447
+              if (response.data.state == 0) {
448
+                that.$message.error(response.data.msg)
449
+                return false
450
+              } else {
451
+                if (response.data.data.failed_code == -10) {
452
+                  that.$confirm(response.data.data.msg, '医保错误信息', {
453
+                    confirmButtonText: '确 定',
454
+                    type: 'warning'
455
+                  }).then(() => {
456
+
457
+                  }).catch(() => {
458
+                  })
459
+                  // that.$message.error(response.data.data.msg)
460
+
461
+                } else {
462
+                  that.getlist()
463
+                  that.$message({ message: '退号成功', type: 'success' })
464
+                }
465
+              }
466
+            })
467
+            .catch(function(error) {
468
+            })
469
+        }).catch(() => {
470
+        })
471
+      }
472
+    },
473
+    toReturnPatient(row) {
474
+      var that = this
475
+      this.$confirm('确认退号吗?', '退号', {
476
+        confirmButtonText: '确 定',
477
+        cancelButtonText: '取 消',
478
+        type: 'warning'
479
+      }).then(() => {
480
+        //
481
+        let params = {
482
+          'id':row.id,
483
+          'patient_id': row.patient_id,
484
+          'record_time': that.getTimes(row.record_date),
485
+          'admin_user_id': this.$store.getters.xt_user.user.id
486
+        }
487
+        axios.get('http://127.0.0.1:9532/api/refundnumber/post', {
488
+          params: params
489
+        })
490
+          .then(function(response) {
491
+            if (response.data.state == 0) {
492
+              that.$message.error(response.data.msg)
493
+              return false
494
+            } else {
495
+              if (response.data.data.failed_code == -10) {
496
+                // that.$message.error(response.data.data.msg)
497
+                that.$confirm(response.data.data.msg, '医保错误信息', {
498
+                  confirmButtonText: '确 定',
499
+                  type: 'warning'
500
+                }).then(() => {
501
+
502
+                }).catch(() => {
503
+                })
504
+              } else {
505
+                that.$message({ message: '退号成功', type: 'success', duration: 5000 });
506
+                that.getlist()
507
+              }
508
+            }
509
+          })
510
+          .catch(function(error) {
511
+          })
512
+        //
513
+        // changePatient(id).then(response => {
514
+        //   if (response.data.state == 1) {
515
+        //     var msg = response.data.data.msg
516
+        //     this.$message.success('退号成功')
517
+        //     this.getlist()
518
+        //   } else {
519
+        //     this.$message.error('患者已就诊,退号失败')
520
+        //   }
521
+        // })
522
+      })
523
+        .catch(() => {
524
+        })
525
+    }, getTimes(time) {
526
+      return uParseTime(time, '{y}-{m}-{d}')
527
+    },
528
+
529
+    querySearchAsync(keyword, cb) {
530
+      let key = '';
531
+      if (keyword != undefined) {
532
+        key = keyword
533
+      }
534
+      let searchArray = []
535
+
536
+      var params = {
537
+        keyword: key
538
+      }
539
+      console.log('params', params)
540
+      getHisPatient(params).then(response => {
541
+        if (response.data.state == 1) {
542
+          searchArray = response.data.data.patient
543
+          console.log('searcharrya', searchArray)
544
+          cb(searchArray)
545
+        }
546
+      })
547
+      return searchArray
548
+    },
549
+
550
+    handleSelect(val) {
551
+      this.search_input = val.name
552
+      this.getlist()
553
+    },
554
+    handleClose(done) {
555
+      done()
556
+    },
557
+    open(obj) {
558
+      this.dialogVisible = true
559
+      this.form = obj
560
+      console.log(obj)
561
+    },
562
+    getDictionaryDataConfig(type) {
563
+      let arr = getDictionaryDataConfig('system', 'social_type')
564
+      let str = ''
565
+      arr.map(item => {
566
+        if (item.id == type) {
567
+          str = item.name
568
+        }
569
+      })
570
+      return str
571
+    },
572
+    getCertificates(type) {
573
+      let arr = this.certificates
574
+      let str = ''
575
+      arr.map(item => {
576
+        if (item.value == type) {
577
+          str = item.label
578
+        }
579
+      })
580
+      return str
581
+    },
582
+    getSettlement(type) {
583
+      let arr = this.settlement
584
+      let str = ''
585
+      arr.map(item => {
586
+        if (item.value == type) {
587
+          str = item.label
588
+        }
589
+      })
590
+      return str
591
+    },
592
+    getMedicalCare(type) {
593
+      let arr = this.medicalCare
594
+      let str = ''
595
+      arr.map(item => {
596
+        if (item.id == type) {
597
+          str = item.name
598
+        }
599
+      })
600
+      return str
601
+    },
602
+    getRegister(type) {
603
+      let arr = this.newRegister
604
+      let str = ''
605
+      arr.map(item => {
606
+        if (item.value == type) {
607
+          str = item.label
608
+        }
609
+      })
610
+      return str
611
+    },
612
+    getDepartMent(type) {
613
+      let arr = this.departMent
614
+      let str = ''
615
+      arr.map(item => {
616
+        if (item.id == type) {
617
+          str = item.name
618
+        }
619
+      })
620
+      return str
621
+    },
622
+
623
+    getBanlance(id) {
624
+      var label = ''
625
+      for (let i = 0; i < this.settlement.length; i++) {
626
+        if (id == this.settlement[i].value) {
627
+          label = this.settlement[i].label
628
+        }
629
+      }
630
+      return label
631
+    }
632
+  }
633
+}
634
+</script>
635
+
636
+<style lang="scss" scoped>
637
+.basicForm {
638
+  display: flex;
639
+  flex-wrap: wrap;
640
+  justify-content: space-between;
641
+
642
+.el-form-item {
643
+  width: 33%;
644
+}
645
+
646
+}
647
+</style>

+ 0 - 0
src/xt_pages/hospitalStation/pastInquiries.vue 查看文件


部分文件因为文件数量过多而无法显示