Browse Source

Merge branch '20201109_pc_vue_new_branch' of http://git.shengws.com/csx/Vue_New into 20201109_pc_vue_new_branch

see999 3 years ago
parent
commit
2acd9e2d0b

+ 8 - 10
src/api/patient.js View File

276
   })
276
   })
277
 }
277
 }
278
 
278
 
279
-export function GetCoursePrintData(id) {
279
+export function GetCoursePrintData(params) {
280
   return request({
280
   return request({
281
     url: '/api/print/course',
281
     url: '/api/print/course',
282
     method: 'Get',
282
     method: 'Get',
283
-    params: {
284
-      id: id
285
-    }
283
+    params: params
286
   })
284
   })
287
 }
285
 }
288
 
286
 
552
   })
550
   })
553
 }
551
 }
554
 
552
 
555
-export function createHospitalSummary(params) {
553
+export function createHospitalSummary(data) {
556
   return request({
554
   return request({
557
     url: '/api/patient/hospitalsummary',
555
     url: '/api/patient/hospitalsummary',
558
-    method: 'get',
559
-    params: params
556
+    method: 'post',
557
+    data: data
560
   })
558
   })
561
 }
559
 }
562
 
560
 
576
   })
574
   })
577
 }
575
 }
578
 
576
 
579
-export function updateHospitalSummary(params) {
577
+export function updateHospitalSummary(data) {
580
   return request({
578
   return request({
581
     url: '/api/patient/updatehospitalsummary',
579
     url: '/api/patient/updatehospitalsummary',
582
-    method: 'get',
583
-    params: params
580
+    method: 'post',
581
+    data: data
584
   })
582
   })
585
 }
583
 }
586
 
584
 

+ 1 - 1
src/xt_pages/data/components/addDrugs.vue View File

654
       },
654
       },
655
       comfirm: function(formName) {
655
       comfirm: function(formName) {
656
         this.$refs[formName].validate((valid) => {
656
         this.$refs[formName].validate((valid) => {
657
-          // console.log(valid)
657
+           console.log(valid)
658
           if (valid) {
658
           if (valid) {
659
             this.$emit('dialog-comfirm', this.getValue())
659
             this.$emit('dialog-comfirm', this.getValue())
660
           }
660
           }

+ 6 - 7
src/xt_pages/dialysis/bloodPresssWatch.vue View File

723
           this.total = response.data.data.total;
723
           this.total = response.data.data.total;
724
           // console.log(response.data.data)
724
           // console.log(response.data.data)
725
           for (let i = 0; i < response.data.data.schedule.length; i++) {
725
           for (let i = 0; i < response.data.data.schedule.length; i++) {
726
-            if (response.data.data.schedule[i].patient.id > 0) {
726
+            if (response.data.data.schedule[i].patient&&response.data.data.schedule[i].patient.id > 0) {
727
               const SchedualPatientsTable = {
727
               const SchedualPatientsTable = {
728
                 bp: []
728
                 bp: []
729
               };
729
               };
760
               }
760
               }
761
 
761
 
762
               SchedualPatientsTable.bp = [];
762
               SchedualPatientsTable.bp = [];
763
-              for (
764
-                let a = 0;
765
-                a < response.data.data.schedule[i].monitoring_record.length;
766
-                a++
767
-              ) {
763
+              if(response.data.data.schedule[i].monitoring_record && response.data.data.schedule[i].monitoring_record.length > 0){
764
+                for (let a = 0;a < response.data.data.schedule[i].monitoring_record.length;a++) {
768
                 const bp = {};
765
                 const bp = {};
769
                 bp["value"] =
766
                 bp["value"] =
770
                   response.data.data.schedule[i].monitoring_record[
767
                   response.data.data.schedule[i].monitoring_record[
775
                     a
772
                     a
776
                   ].diastolic_blood_pressure.toString();
773
                   ].diastolic_blood_pressure.toString();
777
 
774
 
778
-                SchedualPatientsTable.bp.push(bp);
775
+                 SchedualPatientsTable.bp.push(bp);
776
+               }
779
               }
777
               }
778
+             
780
 
779
 
781
               this.SchedualPatientsTableData.push(SchedualPatientsTable);
780
               this.SchedualPatientsTableData.push(SchedualPatientsTable);
782
               console.log("中国222222",this.SchedualPatientsTableData)
781
               console.log("中国222222",this.SchedualPatientsTableData)

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

512
             align="center"
512
             align="center"
513
             label="KT/V"
513
             label="KT/V"
514
             width="140"
514
             width="140"
515
-            v-if="isShow('KT/V') && org_id == 9987"
515
+            v-if="isShow('KT/V') && (org_id == 9987 || org_id ==10215) "
516
           >
516
           >
517
            <template slot-scope="scope">
517
            <template slot-scope="scope">
518
               {{ scope.row.ktv ? scope.row.ktv : ""  }}
518
               {{ scope.row.ktv ? scope.row.ktv : ""  }}

+ 2 - 2
src/xt_pages/dialysis/details/dialysisMonitoring.vue View File

38
           <th v-if="isShow('血压监测')" width="92px">血压监测</th>
38
           <th v-if="isShow('血压监测')" width="92px">血压监测</th>
39
           <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
39
           <!-- <th v-if="isShow('血压监测部位')" width="92px">血压监测部位</th>
40
           <th v-if="isShow('并发症')" width="92px">并发症</th> -->
40
           <th v-if="isShow('并发症')" width="92px">并发症</th> -->
41
-          <th v-if="isShow('KT/V') && org_id == 9987" width="92px">KT/V</th>
41
+          <th v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215)" width="92px">KT/V</th>
42
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
42
           <th v-if="isShow('病情变化')" width="92px">病情变化</th>
43
 
43
 
44
           <th v-if="isShow('处理')" width="92px">处理</th>
44
           <th v-if="isShow('处理')" width="92px">处理</th>
85
           <th v-if="isShow('尿素监测')" width="92px">{{monitor.urea_monitoring ? monitor.urea_monitoring : ""}}</th>
85
           <th v-if="isShow('尿素监测')" width="92px">{{monitor.urea_monitoring ? monitor.urea_monitoring : ""}}</th>
86
           <th v-if="isShow('血浓量')" width="92px">{{monitor.blood_thickness ? monitor.blood_thickness : ""}}</th>
86
           <th v-if="isShow('血浓量')" width="92px">{{monitor.blood_thickness ? monitor.blood_thickness : ""}}</th>
87
           <th v-if="isShow('血压监测')" width="92px">{{monitor.blood_monitor ? monitor.blood_monitor : ""}}</th>
87
           <th v-if="isShow('血压监测')" width="92px">{{monitor.blood_monitor ? monitor.blood_monitor : ""}}</th>
88
-          <td v-if="isShow('KT/V') && org_id == 9987">{{ monitor.ktv?monitor.ktv:""}}</td>
88
+          <td v-if="isShow('KT/V') && (org_id == 9987 || org_id == 10215)">{{ monitor.ktv?monitor.ktv:""}}</td>
89
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
89
           <td v-if="isShow('病情变化')">{{ monitor.symptom }}</td>
90
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>
90
           <td v-if="isShow('处理')">{{ monitor.dispose }}</td>
91
           <td v-if="isShow('结果')">{{ monitor.result }}</td>
91
           <td v-if="isShow('结果')">{{ monitor.result }}</td>

+ 28 - 16
src/xt_pages/hospitalStation/components/deskPrescription.vue View File

667
         }
667
         }
668
       },
668
       },
669
       setMonthPrescription(month_prescriptions) {
669
       setMonthPrescription(month_prescriptions) {
670
+        console.log("~~~~~~~~")
670
         this.month_prescriptions = []
671
         this.month_prescriptions = []
671
 
672
 
672
         let drug_month_prescriptions = {
673
         let drug_month_prescriptions = {
673
           advices: []
674
           advices: []
674
         }
675
         }
675
         let drug_ids = []
676
         let drug_ids = []
677
+        let drug_ids2 = []
678
+
676
         let project_month_prescriptions = {
679
         let project_month_prescriptions = {
677
           project: []
680
           project: []
678
 
681
 
693
                 price: month_prescriptions[i].advices[a].price
696
                 price: month_prescriptions[i].advices[a].price
694
 
697
 
695
               }
698
               }
699
+              if(month_prescriptions[i].advices[a].drug_id == 1280){
700
+                drug_ids2.push(obj)
701
+              }
696
               drug_ids.push(obj)
702
               drug_ids.push(obj)
697
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
703
               drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
698
             }
704
             }
726
         const obj1 = {}
732
         const obj1 = {}
727
         const obj2 = {}
733
         const obj2 = {}
728
 
734
 
729
-        drug_ids = drug_ids.reduce((cur, next) => {
730
-          obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
731
-          return cur
732
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
733
-        project_ids = project_ids.reduce((cur, next) => {
734
-          obj1[next.price] ? '' : obj1[next.price] = true && cur.push(next)
735
-          return cur
736
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
737
-        additions_ids = additions_ids.reduce((cur, next) => {
738
-          obj2[next.price] ? '' : obj2[next.price] = true && cur.push(next)
739
-          return cur
740
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
735
+        drug_ids = this.unique(drug_ids)
736
+        project_ids = this.unique(project_ids)
737
+        additions_ids = this.unique(additions_ids)
738
+
741
 
739
 
742
         let drugs = []
740
         let drugs = []
743
         let projects = []
741
         let projects = []
747
           let obj = {}
745
           let obj = {}
748
           let count = 0
746
           let count = 0
749
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
747
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
750
-            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
748
+            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
751
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
749
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
752
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
750
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
753
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
751
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
775
           let obj = {}
773
           let obj = {}
776
           let count = 0
774
           let count = 0
777
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
775
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
778
-            if (project_ids[i].price == project_month_prescriptions.project[a].price) {
776
+            if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
779
 
777
 
780
               if (project_month_prescriptions.project[a].type == 2) {
778
               if (project_month_prescriptions.project[a].type == 2) {
781
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
779
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
3194
         if (this.dayorMonth == 'day') {
3192
         if (this.dayorMonth == 'day') {
3195
           this.$emit('day')
3193
           this.$emit('day')
3196
         } else if (this.dayorMonth == 'month') {
3194
         } else if (this.dayorMonth == 'month') {
3197
-          console.log('~~~~~~')
3198
           let form = {
3195
           let form = {
3199
             id: this.patientInfo.id,
3196
             id: this.patientInfo.id,
3200
             his_patient_id: this.hisPatientInfo.id
3197
             his_patient_id: this.hisPatientInfo.id
3213
       },
3210
       },
3214
       clearSelection() {
3211
       clearSelection() {
3215
         this.$refs.tabProjectTeam.clearSelection()
3212
         this.$refs.tabProjectTeam.clearSelection()
3216
-      }
3213
+      },unique(array) {
3214
+        // res用来存储结果
3215
+        var res = []
3216
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
3217
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
3218
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
3219
+              break
3220
+            }
3221
+          }
3222
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
3223
+          if (j === resLen) {
3224
+            res.push(array[i])
3225
+          }
3226
+        }
3227
+        return res
3228
+      },
3217
     },
3229
     },
3218
     mounted() {
3230
     mounted() {
3219
 
3231
 

+ 26 - 14
src/xt_pages/hospitalStation/doctorDesk.vue View File

318
     },
318
     },
319
     data() {
319
     data() {
320
       return {
320
       return {
321
+        current_data:null,
321
         drugs: [],
322
         drugs: [],
322
         allDrugs: [],
323
         allDrugs: [],
323
         advices_template: [],
324
         advices_template: [],
598
             this.admin_info = response.data.data.info
599
             this.admin_info = response.data.data.info
599
 
600
 
600
             if (this.patientTableData.length > 0) {
601
             if (this.patientTableData.length > 0) {
602
+              this.current_data = this.patientTableData[0]
601
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
603
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
602
               this.oldCurrentRow = this.patientTableData[0]
604
               this.oldCurrentRow = this.patientTableData[0]
603
               this.getPatientInfo(this.patientTableData[0])
605
               this.getPatientInfo(this.patientTableData[0])
703
         const obj1 = {}
705
         const obj1 = {}
704
         const obj2 = {}
706
         const obj2 = {}
705
 
707
 
706
-        drug_ids = drug_ids.reduce((cur, next) => {
707
-          obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
708
-          return cur
709
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
710
-        project_ids = project_ids.reduce((cur, next) => {
711
-          obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
712
-          return cur
713
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
714
-        additions_ids = additions_ids.reduce((cur, next) => {
715
-          obj[next.price] ? '' : obj[next.price] = true && cur.push(next)
716
-          return cur
717
-        }, []) // 设置cur默认类型为数组,并且初始值为空的数组
708
+        drug_ids = this.unique(drug_ids)
709
+        project_ids = this.unique(project_ids)
710
+        additions_ids = this.unique(additions_ids)
711
+
718
 
712
 
719
         let drugs = []
713
         let drugs = []
720
         let projects = []
714
         let projects = []
724
           let obj = {}
718
           let obj = {}
725
           let count = 0
719
           let count = 0
726
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
720
           for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
727
-            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price) {
721
+            if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id ==  drug_month_prescriptions.advices[a].drug_id) {
728
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
722
               obj['drug_name'] = drug_month_prescriptions.advices[a].advice_name
729
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
723
               obj['single_dose'] = drug_month_prescriptions.advices[a].single_dose
730
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
724
               obj['delivery_way'] = drug_month_prescriptions.advices[a].delivery_way
751
           let obj = {}
745
           let obj = {}
752
           let count = 0
746
           let count = 0
753
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
747
           for (let a = 0; a < project_month_prescriptions.project.length; a++) {
754
-            if (project_ids[i].price == project_month_prescriptions.project[a].price) {
748
+            if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
755
               if (project_month_prescriptions.project[a].type == 2) {
749
               if (project_month_prescriptions.project[a].type == 2) {
756
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
750
                 obj['statistical_classification'] = project_month_prescriptions.project[a].project.statistical_classification
757
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
751
                 obj['medical_code'] = project_month_prescriptions.project[a].project.medical_code
1038
             this.admin_info = response.data.data.info
1032
             this.admin_info = response.data.data.info
1039
 
1033
 
1040
             if (this.patientTableData.length > 0) {
1034
             if (this.patientTableData.length > 0) {
1035
+              this.current_data = this.patientTableData[0]
1041
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
1036
               this.$refs.tab.setCurrentRow(this.patientTableData[0])
1042
               this.oldCurrentRow = this.patientTableData[0]
1037
               this.oldCurrentRow = this.patientTableData[0]
1043
               this.getPatientInfo(this.patientTableData[0])
1038
               this.getPatientInfo(this.patientTableData[0])
1419
           }
1414
           }
1420
         })
1415
         })
1421
 
1416
 
1417
+      },unique(array) {
1418
+        // res用来存储结果
1419
+        var res = []
1420
+        for (var i = 0, arrayLen = array.length; i < arrayLen; i++) {
1421
+          for (var j = 0, resLen = res.length; j < resLen; j++) {
1422
+            if (array[i].id === res[j].id && array[i].price === res[j].price) {
1423
+              break
1424
+            }
1425
+          }
1426
+          // 如果array[i]是唯一的,那么执行完循环,j等于resLen
1427
+          if (j === resLen) {
1428
+            res.push(array[i])
1429
+          }
1430
+        }
1431
+        return res
1422
       },
1432
       },
1423
 
1433
 
1424
       choosePatient(val) {
1434
       choosePatient(val) {
1435
+        this.current_data = val
1425
         if (this.titleType == '电子病历') {
1436
         if (this.titleType == '电子病历') {
1426
 
1437
 
1427
           if (this.$refs.child.watchSign > 2) {
1438
           if (this.$refs.child.watchSign > 2) {
4010
         }
4021
         }
4011
       }, changeDay() {
4022
       }, changeDay() {
4012
         this.current_tab = 'day'
4023
         this.current_tab = 'day'
4024
+        this.getPatientInfo(this.current_data)
4013
 
4025
 
4014
       }, changeMonth(val) {
4026
       }, changeMonth(val) {
4015
         this.current_tab = 'month'
4027
         this.current_tab = 'month'

+ 19 - 4
src/xt_pages/user/courseOfDisease.vue View File

218
         selectingRows: [],
218
         selectingRows: [],
219
         table_current_index: -1,
219
         table_current_index: -1,
220
         edit_current_id: 0,
220
         edit_current_id: 0,
221
-        edit_title: ''
221
+        edit_title: '',
222
+        ids:"",
223
+        idArr:[],
222
       }
224
       }
223
     },
225
     },
224
     created() {
226
     created() {
366
       },
368
       },
367
 
369
 
368
       didSelectionChange: function(selectRows) {
370
       didSelectionChange: function(selectRows) {
371
+       
372
+        var arr = []
373
+        for(let i=0;i<selectRows.length;i++){
374
+           arr.push(selectRows[i].id)
375
+        }
376
+        var newArr = arr.join(',') 
377
+        this.ids = newArr
378
+        console.log("select23322332",this.ids)
369
         this.selectingRows = selectRows
379
         this.selectingRows = selectRows
370
       },
380
       },
371
       deleteAction: function() {
381
       deleteAction: function() {
422
         row.index = rowIndex
432
         row.index = rowIndex
423
       }, onRowClick(row, event, column) {
433
       }, onRowClick(row, event, column) {
424
         this.table_current_index = row.index
434
         this.table_current_index = row.index
425
-      },print(){
426
-        if (this.table_current_index == -1) {
435
+      },
436
+      print(){
437
+        // if (this.table_current_index == -1) {
438
+        //   this.$message.error('请选择要打印的病程')
439
+        //   return
440
+        // }
441
+        if(this.ids.length == 0){
427
           this.$message.error('请选择要打印的病程')
442
           this.$message.error('请选择要打印的病程')
428
           return
443
           return
429
         }
444
         }
430
-        this.$router.push({ path: "/course/print?id="+this.records[this.table_current_index].id});
445
+        this.$router.push({ path: "/course/print?ids="+this.ids+"&patient_id="+this.patient_id});
431
       }
446
       }
432
     }
447
     }
433
   }
448
   }

+ 30 - 20
src/xt_pages/user/coursePrint.vue View File

24
             </div>
24
             </div>
25
 
25
 
26
             <div style="flex:1;text-align: center;">
26
             <div style="flex:1;text-align: center;">
27
-              床位:
28
-              <div  style="width: 120px;text-align: left;display:inline-block;">{{patient.DialysisSchedule&&patient.DialysisSchedule.device_number?patient.DialysisSchedule.device_number.number:''}}</div>
27
+              透析号:
28
+                <div  style="width: 120px;text-align: left;display:inline-block;">
29
+                  {{patient.dialysis_no?patient.dialysis_no:"/"}}
30
+                </div>
29
             </div>
31
             </div>
30
 
32
 
31
             <div  style="flex:1;text-align: center;">
33
             <div  style="flex:1;text-align: center;">
32
               住院号:
34
               住院号:
33
-              <div style="width: 100px;text-align: left;display:inline-block;" v-if="patient.admission_number">
34
-                {{patient.admission_number}}
35
-              </div>
36
-              <div style="width: 100px;;display:inline-block;" v-else>
37
-                {{'/'}}
35
+              <div style="width: 100px;text-align: left;display:inline-block;">
36
+                 {{patient.admission_number?patient.admission_number:"/"}}
38
               </div>
37
               </div>
38
+           
39
             </div>
39
             </div>
40
 
40
 
41
           </div>
41
           </div>
42
-          <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;">
42
+          <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;" v-for="(item,index) in this.record" :key="index">
43
             <div class="inline_block">
43
             <div class="inline_block">
44
-              <div>{{getTime(record.record_time,'{y}-{m}-{d} {h}:{i}')}}</div>
44
+              <div>{{getTime(item.record_time,'{y}-{m}-{d} {h}:{i}')}}</div>
45
             </div>
45
             </div>
46
             <div class="inline_block" style="margin-left: 30px">
46
             <div class="inline_block" style="margin-left: 30px">
47
-              <div>{{record.title}}</div>
47
+              <div>{{item.title}}</div>
48
+            </div>
49
+
50
+             <div class="inline_block" style="width:100%;">
51
+              <div v-html="item.content" class="printP">{{item.content}}</div>
48
             </div>
52
             </div>
49
           </div>
53
           </div>
50
 
54
 
51
-          <div class="row" style="padding: 2px 0;line-height:24px;">
55
+          <!-- <div class="row" style="padding: 2px 0;line-height:24px;">
52
             <div class="inline_block" style="width:100%;">
56
             <div class="inline_block" style="width:100%;">
53
-              <div v-html="record.content" class="printP">{{record.content}}</div>
57
+              <div v-html="item.content" class="printP">{{item.content}}</div>
54
             </div>
58
             </div>
55
-          </div>
59
+          </div> -->
56
 
60
 
57
         </div>
61
         </div>
58
       </div>
62
       </div>
81
 
85
 
82
         loading: false,
86
         loading: false,
83
         orgname: '',
87
         orgname: '',
84
-        record: {},
88
+        record:[],
85
         patient: {}
89
         patient: {}
86
       }
90
       }
87
     },
91
     },
92
     },
96
     },
93
     mounted() {
97
     mounted() {
94
       this.loading = true
98
       this.loading = true
95
-      var id = this.$route.query.id
96
-      if (id == 0) {
97
-        this.$router.back(-1)
98
-        return
99
+      var ids = this.$route.query.ids
100
+      var patient_id = parseInt(this.$route.query.patient_id)
101
+      var params = {
102
+          ids:ids,
103
+          patient_id:patient_id,
99
       }
104
       }
100
-      GetCoursePrintData(id).then(rs => {
105
+      console.log("para2333223233223",params)
106
+      GetCoursePrintData(params).then(rs => {
101
         var resp = rs.data
107
         var resp = rs.data
102
         if (resp.state == 1) {
108
         if (resp.state == 1) {
103
           this.record = resp.data.record
109
           this.record = resp.data.record
104
-          this.record.content = resp.data.record.content.replace(new RegExp('<p>','g'),"<div>").replace(new RegExp('</p>','g'),"</div>")
110
+          console.log("h2232323223",this.record)
111
+          // for(let i=0;i<this.record.length;i++){
112
+          //   this.record[i].content = this.record[i].content.replace(new RegExp('<p>','g'),"<div>").replace(new RegExp('</p>','g'),"</div>")
113
+          // }
114
+          console.log("h2232323223",this.record)
105
           this.patient = resp.data.patient
115
           this.patient = resp.data.patient
106
 
116
 
107
           this.loading = false
117
           this.loading = false

+ 239 - 57
src/xt_pages/user/hospitalSummary.vue View File

7
         <div>
7
         <div>
8
                     <span style="margin-left: 10px;float:right;">
8
                     <span style="margin-left: 10px;float:right;">
9
                         <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
9
                         <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
10
-                                   @click="show_dialog = true">新增</el-button>
10
+                                   @click="addAction">新增</el-button>
11
 
11
 
12
                         <el-button type="primary" icon="el-icon-edit-outline" size="small"
12
                         <el-button type="primary" icon="el-icon-edit-outline" size="small"
13
                                    @click="toEdit">修改</el-button>
13
                                    @click="toEdit">修改</el-button>
77
                    {{getDoctor(hosDetail.doctor)}}
77
                    {{getDoctor(hosDetail.doctor)}}
78
                 </div>
78
                 </div>
79
                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">记录日期:
79
                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">记录日期:
80
-                  <span v-if="hosDetail.record_time > 0">{{getTime(hosDetail.record_time)}}</span> 
80
+                  <span v-if="hosDetail.record_date > 0">{{getTime(hosDetail.record_date)}}</span> 
81
                 </div>
81
                 </div>
82
                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">病案号:
82
                 <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">病案号:
83
                    {{hosDetail.sick_personnel}}
83
                    {{hosDetail.sick_personnel}}
98
                    {{hosDetail.pathology}}
98
                    {{hosDetail.pathology}}
99
                  </div>
99
                  </div>
100
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院诊断:
100
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院诊断:
101
-                   {{hosDetail.admitting_diagnosis}}
101
+                   <span v-html="hosDetail.admitting_diagnosis"></span> 
102
                  </div>
102
                  </div>
103
                   <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院诊断:
103
                   <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院诊断:
104
-                   {{hosDetail.discharge_diagnosis}}
104
+                   <span v-html="hosDetail.discharge_diagnosis"></span>
105
                  </div>
105
                  </div>
106
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院时病情:
106
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">入院时病情:
107
-                   {{hosDetail.diagnosis_admission}}
107
+                   <span v-html="hosDetail.diagnosis_admission"></span>
108
                  </div>
108
                  </div>
109
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">诊断经过:
109
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">诊断经过:
110
-                   {{hosDetail.treatment}}
110
+                   <span v-html="hosDetail.treatment"></span> 
111
                  </div>
111
                  </div>
112
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院时病情:
112
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院时病情:
113
-                   {{hosDetail.illness_discharge}}
113
+                   <span v-html="hosDetail.illness_discharge"></span> 
114
                  </div>
114
                  </div>
115
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院医嘱:
115
                  <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">出院医嘱:
116
-                   {{hosDetail.discharge_advice}}
116
+                    <span v-html="hosDetail.discharge_advice"></span>
117
                  </div>
117
                  </div>
118
                
118
                
119
               </div>
119
               </div>
442
 
442
 
443
                 <div class="textarea_panel">
443
                 <div class="textarea_panel">
444
                     <keep-alive>
444
                     <keep-alive>
445
-                      <editor ref="editorEight"
446
-                              id="editorEight"
445
+                      <editor ref="editorSixty"
446
+                              id="editorSixty"
447
                               style="width: 800px"
447
                               style="width: 800px"
448
                               v-bind:r_content="form.diagnosis_admission">
448
                               v-bind:r_content="form.diagnosis_admission">
449
                       </editor>
449
                       </editor>
479
 
479
 
480
                <div class="textarea_panel">
480
                <div class="textarea_panel">
481
                     <keep-alive>
481
                     <keep-alive>
482
-                      <editor ref="editorElement"
483
-                              id="editorElement"
482
+                      <editor ref="editorThirty"
483
+                              id="editorThirty"
484
                               style="width: 800px"
484
                               style="width: 800px"
485
                               v-bind:r_content="form.illness_discharge">
485
                               v-bind:r_content="form.illness_discharge">
486
                       </editor>
486
                       </editor>
583
         form:{
583
         form:{
584
           id:0,
584
           id:0,
585
           title:"",
585
           title:"",
586
-          admission_time:new Date(),
587
-          discharge_time:new Date(),
586
+          admission_time:this.getTime(new Date()),
587
+          discharge_time:this.getTime(new Date()),
588
           sick_personnel:"",
588
           sick_personnel:"",
589
           xray:"",
589
           xray:"",
590
           admitting_diagnosis_id:"",
590
           admitting_diagnosis_id:"",
599
           illness_discharge:"",
599
           illness_discharge:"",
600
           dean:"",
600
           dean:"",
601
           doctor:"",
601
           doctor:"",
602
-          record_date:new Date(),
602
+          record_date:this.getTime(new Date()),
603
           discharge_advice_id:"",
603
           discharge_advice_id:"",
604
           discharge_advice:"",
604
           discharge_advice:"",
605
           connecticut:"",
605
           connecticut:"",
612
        docList:[],
612
        docList:[],
613
        doctorList:[],
613
        doctorList:[],
614
        hosDetail:{},
614
        hosDetail:{},
615
+       ids:"",
615
       }
616
       }
616
     },
617
     },
617
     created() {
618
     created() {
618
      
619
      
619
-     
620
+ 
620
       this.patient_id = this.$route.params && this.$route.params.id
621
       this.patient_id = this.$route.params && this.$route.params.id
621
-      console.log("患者2332323",this.patient_id)
622
+      console.log("患者2332323",this.$store.getters.configlist.admitting_diagnosis)
622
       var now = new Date()
623
       var now = new Date()
623
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
624
       this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
624
 
625
 
673
 
674
 
674
        },
675
        },
675
       changeCurrentRecordTwo(row){
676
       changeCurrentRecordTwo(row){
676
-        this.form.id = row.id 
677
-        this.getHospitalSummaryDetail(row.id)
677
+       
678
+        this.form.id = 0
679
+        if(row!=null){
680
+          this.form.id = row.id 
681
+          this.getHospitalSummaryDetail(row.id)
682
+        }
678
       },
683
       },
679
       selectSummary(row){
684
       selectSummary(row){
680
-       console.log("row322323",row)
685
+        var arr = []
686
+        for(let i=0;i<row.length;i++){
687
+          arr.push(row[i].id)
688
+        }
689
+       var ids = arr.join(",")
690
+       this.ids = ids
681
       },
691
       },
682
       changeAmittDiagnosis(content){
692
       changeAmittDiagnosis(content){
693
+        
683
         this.form.admitting_diagnosis = content
694
         this.form.admitting_diagnosis = content
684
       },
695
       },
685
       changeDischargeDiagnosis(content){
696
       changeDischargeDiagnosis(content){
697
+       
686
          this.form.discharge_diagnosis = content
698
          this.form.discharge_diagnosis = content
687
       },
699
       },
688
       changeDiagnosisAdmission(content){
700
       changeDiagnosisAdmission(content){
701
+      
689
        this.form.diagnosis_admission = content
702
        this.form.diagnosis_admission = content
690
       },
703
       },
691
       changeTreatment(content){
704
       changeTreatment(content){
705
+       
692
         this.form.treatment = content
706
         this.form.treatment = content
693
       },
707
       },
694
       changeillnessDisCharge(content){
708
       changeillnessDisCharge(content){
709
+      
695
         this.form.illness_discharge = content
710
         this.form.illness_discharge = content
696
       },
711
       },
697
       changeDischargeAdvice(content){
712
       changeDischargeAdvice(content){
713
+      
698
         this.form.discharge_advice = content
714
         this.form.discharge_advice = content
699
       },
715
       },
700
       createAction(){
716
       createAction(){
717
+         console.log("hh23h",this.templates)
718
+         var admitting_diagnosis_id = ""
719
+         var discharge_diagnosis_id = ""
720
+         var diagnosis_admission_id = ""
721
+         var treatment_id = ""
722
+         var illness_discharge_id=""
723
+         var discharge_advice_id= ""
724
+         
725
+         if(this.templates!=undefined){
726
+            for(let i=0;i<this.templates.length;i++){
727
+            if(this.form.admitting_diagnosis_id == this.templates[i].content){
728
+            
729
+                admitting_diagnosis_id = this.templates[i].title
730
+              }
731
+          }
732
+         }
733
+       
734
+         if(this.templatesOne!=undefined){
735
+          for(let i=0;i<this.templatesOne.length;i++){
736
+           if(this.form.discharge_diagnosis_id == this.templatesOne[i].content){
737
+              discharge_diagnosis_id = this.templatesOne[i].title
738
+            }
739
+          }
740
+         }
701
          
741
          
742
+         if(this.templatesTwo!=undefined){
743
+          for(let i=0;i<this.templatesTwo.length;i++){
744
+            if(this.form.diagnosis_admission_id == this.templatesTwo[i].content){
745
+                diagnosis_admission_id = this.templatesTwo[i].title
746
+              }
747
+          }
748
+         }
749
+        
750
+        if(this.templatesThree!=undefined){
751
+         for(let i=0;i<this.templatesThree.length;i++){
752
+           if(this.form.treatment_id == this.templatesThree[i].content){
753
+              treatment_id = this.templatesThree[i].title
754
+            }
755
+         }
756
+        }
757
+        
758
+        if(this.templatesFour!=undefined){
759
+          for(let i=0;i<this.templatesFour.length;i++){
760
+           if(this.form.illness_discharge_id == this.templatesFour[i].content){
761
+              illness_discharge_id = this.templatesFour[i].title
762
+            }
763
+         }
764
+        }
765
+         
766
+        if(this.templatesFive!=undefined){
767
+         for(let i=0;i<this.templatesFive.length;i++){
768
+           if(this.form.discharge_advice_id == this.templatesFive[i].content){
769
+              discharge_advice_id = this.templatesFive[i].title
770
+            }
771
+         }
772
+        }
773
+
774
+       
775
+         if(this.form.doctor == ""){
776
+            this.form.doctor = 0
777
+         }
778
+         if(this.form.dean == ""){
779
+           this.form.dean = 0
780
+         }
781
+         console.log("hhj232322323",this.form.admitting_diagnosis_id)
702
          var params = {
782
          var params = {
703
           patient_id:parseInt(this.patient_id),
783
           patient_id:parseInt(this.patient_id),
704
           title:this.form.title,
784
           title:this.form.title,
705
-          admission_time:this.getTime(this.form.admission_time),
706
-          discharge_time:this.getTime(this.form.discharge_time),
785
+          admission_time:this.form.admission_time,
786
+          discharge_time:this.form.discharge_time,
707
           sick_personnel:this.form.sick_personnel,
787
           sick_personnel:this.form.sick_personnel,
708
           xray:this.form.xray,
788
           xray:this.form.xray,
709
-          admitting_diagnosis_id:this.form.admitting_diagnosis_id,
710
-          admitting_diagnosis:this.form.admitting_diagnosis,
711
-          discharge_diagnosis:this.form.discharge_diagnosis,
712
-          discharge_diagnosis_id:this.form.discharge_diagnosis_id,
713
-          diagnosis_admission_id:this.form.diagnosis_admission_id,
714
-          diagnosis_admission:this.form.diagnosis_admission,
715
-          illness_discharge:this.form.illness_discharge,
716
-          illness_discharge_id:this.form.illness_discharge_id,
717
-          discharge_advice_id:this.form.discharge_advice_id,
718
-          discharge_advice:this.form.discharge_advice,
719
-          treatment_id:this.form.treatment_id,
720
-          treatment:this.form.treatment,
789
+          admitting_diagnosis_id:admitting_diagnosis_id,
790
+          admitting_diagnosis:this.$refs.editor.content,
791
+          discharge_diagnosis:this.$refs.editorOne.content,
792
+          discharge_diagnosis_id:discharge_diagnosis_id,
793
+          diagnosis_admission_id:diagnosis_admission_id,
794
+          diagnosis_admission:this.$refs.editorTwo.content,
795
+          illness_discharge:this.$refs.editorFive.content,
796
+          illness_discharge_id:illness_discharge_id,
797
+          discharge_advice_id:discharge_advice_id,
798
+          discharge_advice:this.$refs.editorSix.content,
799
+          treatment_id:treatment_id,
800
+          treatment:this.$refs.editorFour.content,
721
           dean:this.form.dean,
801
           dean:this.form.dean,
722
           doctor:this.form.doctor,
802
           doctor:this.form.doctor,
723
-          record_date:this.getTime(this.form.record_date),
803
+          record_date:this.form.record_date,
724
           connecticut:this.form.connecticut,
804
           connecticut:this.form.connecticut,
725
           nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
805
           nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
726
           ultrasound:this.form.ultrasound,
806
           ultrasound:this.form.ultrasound,
727
           pathology:this.form.pathology,
807
           pathology:this.form.pathology,
728
          }
808
          }
729
          console.log("oaram2322323",params)
809
          console.log("oaram2322323",params)
730
-         
810
+        
731
          createHospitalSummary(params).then(response=>{
811
          createHospitalSummary(params).then(response=>{
732
             if(response.data.state == 1){
812
             if(response.data.state == 1){
733
               var list = response.data.data.list
813
               var list = response.data.data.list
800
         getHospitalSummaryDetail(id).then(response=>{
880
         getHospitalSummaryDetail(id).then(response=>{
801
            if(response.data.state == 1){
881
            if(response.data.state == 1){
802
              var detail = response.data.data.detail
882
              var detail = response.data.data.detail
883
+            
803
              this.hosDetail = detail
884
              this.hosDetail = detail
804
            }
885
            }
805
         })
886
         })
808
         getHospitalSummaryDetail(id).then(response=>{
889
         getHospitalSummaryDetail(id).then(response=>{
809
            if(response.data.state == 1){
890
            if(response.data.state == 1){
810
              var detail = response.data.data.detail
891
              var detail = response.data.data.detail
892
+             console.log("detial323232232323322323",detail)
893
+             if(detail.doctor == 0){
894
+               this.form.doctor = ""
895
+             }
896
+             if(detail.dean == 0){
897
+               this.form.dean = ""
898
+             }
811
              this.form.id = detail.id
899
              this.form.id = detail.id
812
              this.form.title = detail.title
900
              this.form.title = detail.title
813
              this.form.patient_id = detail.patient_id
901
              this.form.patient_id = detail.patient_id
831
              this.form.illness_discharge = detail.illness_discharge
919
              this.form.illness_discharge = detail.illness_discharge
832
              this.form.discharge_advice_id = detail.discharge_advice_id
920
              this.form.discharge_advice_id = detail.discharge_advice_id
833
              this.form.discharge_advice = detail.discharge_advice
921
              this.form.discharge_advice = detail.discharge_advice
834
-             this.form.record_time = detail.record_time
922
+             this.form.record_time = this.getTime(detail.record_time)
923
+             this.form.record_date = this.getTime(detail.record_date)
835
              this.form.dean = detail.dean_id
924
              this.form.dean = detail.dean_id
836
              this.form.doctor = detail.doctor
925
              this.form.doctor = detail.doctor
837
-             this.form.record_date = detail.record_date
838
-             this.hosDetail = detail
839
              this.edit_show_dialog = true
926
              this.edit_show_dialog = true
840
            }
927
            }
841
         })
928
         })
844
         this.getHospitalSummaryDetailOne(this.form.id)
931
         this.getHospitalSummaryDetailOne(this.form.id)
845
       },
932
       },
846
       updateAction(){
933
       updateAction(){
847
-         console.log("hhhahdf2332332",this.form.admission_time)
934
+         var admitting_diagnosis_id = this.form.admitting_diagnosis_id
935
+         var discharge_diagnosis_id = this.form.discharge_diagnosis_id
936
+         var diagnosis_admission_id = this.form.diagnosis_admission_id
937
+         var treatment_id = this.form.treatment_id
938
+         var illness_discharge_id= this.form.illness_discharge_id
939
+         var discharge_advice_id= this.form.discharge_advice_id
940
+
941
+         if(this.templates!=undefined){
942
+            for(let i=0;i<this.templates.length;i++){
943
+            if(this.form.admitting_diagnosis_id == this.templates[i].content){
944
+            
945
+                admitting_diagnosis_id = this.templates[i].title
946
+              }
947
+          }
948
+         }
949
+        
950
+         if(this.templatesOne!=undefined){
951
+          for(let i=0;i<this.templatesOne.length;i++){
952
+           if(this.form.discharge_diagnosis_id == this.templatesOne[i].content){
953
+              discharge_diagnosis_id = this.templatesOne[i].title
954
+            }
955
+          }
956
+         }
957
+
958
+         if(this.templatesTwo!=undefined){
959
+          for(let i=0;i<this.templatesTwo.length;i++){
960
+            if(this.form.diagnosis_admission_id == this.templatesTwo[i].content){
961
+                diagnosis_admission_id = this.templatesTwo[i].title
962
+              }
963
+          }
964
+         }
965
+        
966
+        if(this.templatesThree!=undefined){
967
+           for(let i=0;i<this.templatesThree.length;i++){
968
+           if(this.form.treatment_id == this.templatesThree[i].content){
969
+              treatment_id = this.templatesThree[i].title
970
+            }
971
+         }
972
+        }
973
+      
974
+        if(this.templatesFour!=undefined){
975
+            for(let i=0;i<this.templatesFour.length;i++){
976
+           if(this.form.illness_discharge_id == this.templatesFour[i].content){
977
+              illness_discharge_id = this.templatesFour[i].title
978
+            }
979
+         }
980
+        }
981
+
982
+       if(this.templatesFive!=undefined){
983
+         for(let i=0;i<this.templatesFive.length;i++){
984
+           if(this.form.discharge_advice_id == this.templatesFive[i].content){
985
+              discharge_advice_id = this.templatesFive[i].title
986
+            }
987
+         }
988
+       }
989
+       
990
+
991
+      
992
+        if(this.form.doctor == ""){
993
+            this.form.doctor = 0
994
+         }
995
+         if(this.form.dean == ""){
996
+           this.form.dean = 0
997
+         }
848
          var params = {
998
          var params = {
849
           id:this.form.id,
999
           id:this.form.id,
850
           patient_id:parseInt(this.patient_id),
1000
           patient_id:parseInt(this.patient_id),
853
           discharge_time:this.form.discharge_time,
1003
           discharge_time:this.form.discharge_time,
854
           sick_personnel:this.form.sick_personnel,
1004
           sick_personnel:this.form.sick_personnel,
855
           xray:this.form.xray,
1005
           xray:this.form.xray,
856
-          admitting_diagnosis_id:this.form.admitting_diagnosis_id,
857
-          admitting_diagnosis:this.form.admitting_diagnosis,
858
-          discharge_diagnosis:this.form.discharge_diagnosis,
859
-          discharge_diagnosis_id:this.form.discharge_diagnosis_id,
860
-          diagnosis_admission_id:this.form.diagnosis_admission_id,
861
-          diagnosis_admission:this.form.diagnosis_admission,
862
-          illness_discharge:this.form.illness_discharge,
863
-          illness_discharge_id:this.form.illness_discharge_id,
864
-          discharge_advice_id:this.form.discharge_advice_id,
865
-          discharge_advice:this.form.discharge_advice,
866
-          treatment_id:this.form.treatment_id,
867
-          treatment:this.form.treatment,
1006
+          admitting_diagnosis_id:admitting_diagnosis_id,
1007
+          admitting_diagnosis:this.$refs.editorTen.content,
1008
+          discharge_diagnosis:this.$refs.editorSeven.content,
1009
+          discharge_diagnosis_id:discharge_diagnosis_id,
1010
+          diagnosis_admission_id:diagnosis_admission_id,
1011
+          diagnosis_admission:this.$refs.editorSixty.content,
1012
+          illness_discharge:this.$refs.editorThirty.content,
1013
+          illness_discharge_id:illness_discharge_id,
1014
+          discharge_advice_id:discharge_advice_id,
1015
+          discharge_advice:this.$refs.editorTwelve.content,
1016
+          treatment_id:treatment_id,
1017
+          treatment:this.$refs.editorNight.content,
868
           dean:this.form.dean,
1018
           dean:this.form.dean,
869
           doctor:this.form.doctor,
1019
           doctor:this.form.doctor,
870
           record_date:this.getTime(this.form.record_date),
1020
           record_date:this.getTime(this.form.record_date),
872
           nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
1022
           nuclear_magnetic_resonance:this.form.nuclear_magnetic_resonance,
873
           ultrasound:this.form.ultrasound,
1023
           ultrasound:this.form.ultrasound,
874
           pathology:this.form.pathology,
1024
           pathology:this.form.pathology,
1025
+          record_date:this.form.record_date,
875
          }
1026
          }
876
-        console.log("param2332233223232323",params)
877
-     
1027
+        console.log("比你强2332322323232",params)
1028
+        
878
         updateHospitalSummary(params).then(response=>{
1029
         updateHospitalSummary(params).then(response=>{
879
           if(response.data.state == 1){
1030
           if(response.data.state == 1){
880
             var detail = response.data.data.detail
1031
             var detail = response.data.data.detail
881
             this.edit_show_dialog = false
1032
             this.edit_show_dialog = false
1033
+            // this.$refs.monthlyPlanTable.setCurrentRow(detail)
882
             this.getlist()
1034
             this.getlist()
883
           }
1035
           }
884
         }) 
1036
         }) 
885
       },
1037
       },
886
-      deleteAction(id,index){
1038
+      deleteAction(){
1039
+          if(this.ids.length == 0){
1040
+            this.$message.error("请勾选需要删除的数据")
1041
+            return false
1042
+          }
887
           this.$confirm('确认删除吗?', '删除', {
1043
           this.$confirm('确认删除吗?', '删除', {
888
             confirmButtonText: '确 定',
1044
             confirmButtonText: '确 定',
889
             cancelButtonText: '取 消',
1045
             cancelButtonText: '取 消',
890
             type: 'warning'
1046
             type: 'warning'
891
          }).then(() => {
1047
          }).then(() => {
892
             var params = {
1048
             var params = {
893
-              id:this.form.id,
1049
+              ids:this.ids,
894
             }
1050
             }
895
             deleteHospitalSummary(params).then(response => {
1051
             deleteHospitalSummary(params).then(response => {
896
               if (response.data.state == 1) {
1052
               if (response.data.state == 1) {
897
                   var msg = response.data.data.msg
1053
                   var msg = response.data.data.msg
898
-                  this.tableData.splice(index, 1);
1054
+                  this.getlist()
899
                   this.$message.success("删除成功")
1055
                   this.$message.success("删除成功")
900
               } else {
1056
               } else {
901
                   this.$message.error("删除失败")
1057
                   this.$message.error("删除失败")
903
             })
1059
             })
904
           }).catch(() => {
1060
           }).catch(() => {
905
           }) 
1061
           }) 
1062
+      },
1063
+      addAction(){
1064
+        this.form.title = ""
1065
+        this.form.sick_personnel = ""
1066
+        this.form.xray = ""
1067
+        this.form.admitting_diagnosis = ""
1068
+        this.form.discharge_diagnosis = ""
1069
+        this.form.diagnosis_admission = ""
1070
+        this.form.illness_discharge = ""
1071
+        this.form.discharge_advice = ""
1072
+        this.form.treatment = ""
1073
+        this.form.connecticut = ""
1074
+        this.form.nuclear_magnetic_resonance = ""
1075
+        this.form.ultrasound = ""
1076
+        this.form.pathology = ""
1077
+        this.form.admitting_diagnosis_id = ""
1078
+        this.form.discharge_diagnosis_id = ""
1079
+        this.form.illness_discharge_id = ""
1080
+        this.form.discharge_advice_id  =""
1081
+        this.form.treatment_id = "" 
1082
+        this.form.dean = ""
1083
+        this.form.doctor = ""
1084
+        this.form.admission_time = this.getTime(new Date())
1085
+        this.form.admission_time = this.getTime(new Date()),
1086
+        this.form.discharge_time = this.getTime(new Date()),
1087
+        this.show_dialog = true
906
       }
1088
       }
907
     },
1089
     },
908
     watch: {
1090
     watch: {

+ 106 - 97
src/xt_pages/user/hospitalSummaryPrint.vue View File

7
     <div class="dialysis-print-order">
7
     <div class="dialysis-print-order">
8
       <div class="order-yy-name"></div>
8
       <div class="order-yy-name"></div>
9
       <div class="order-title">{{ orgname }}出院小结</div>
9
       <div class="order-title">{{ orgname }}出院小结</div>
10
+      <div style="margin-float:right">病案号:{{hosDetail.sick_personnel}}</div>
10
       <div>
11
       <div>
11
         <table class="print-table" border="1" style="margin-top: 10px;">
12
         <table class="print-table" border="1" style="margin-top: 10px;">
12
           <tr>
13
           <tr>
13
-            <td style="text-align:center;width:170px" colspan="1">
14
+            <td style="text-align:center;width:50px" colspan="1">
14
               姓名:
15
               姓名:
15
             </td>
16
             </td>
16
-             <td style="text-align:center;width:170px" colspan="1">
17
+             <td style="text-align:center;width:50px" colspan="1">
17
               <span style="display:inline-block;margin-left:10px;">
18
               <span style="display:inline-block;margin-left:10px;">
18
                {{patient.name}}
19
                {{patient.name}}
19
               </span>
20
               </span>
20
             </td>
21
             </td>
21
-            <td style="text-align:center;" colspan="1">
22
+            <td style="text-align:center;width:50px" colspan="1">
22
               性别:
23
               性别:
23
             </td>
24
             </td>
24
-             <td style="text-align:center;" colspan="1">
25
+             <td style="text-align:center;width:50px" colspan="1">
25
               <span style="display:inline-block;margin-left:10px;">
26
               <span style="display:inline-block;margin-left:10px;">
26
                 <span v-if="patient.gender == 1">男</span>
27
                 <span v-if="patient.gender == 1">男</span>
27
                 <span v-if="patient.gender == 2">女</span>
28
                 <span v-if="patient.gender == 2">女</span>
28
               </span>
29
               </span>
29
             </td>
30
             </td>
30
-            <td style="text-align:center;" colspan="1">
31
+            <td style="text-align:center;width:50px" colspan="1">
31
               年龄:
32
               年龄:
32
             </td>
33
             </td>
33
-            <td style="text-align:center;" colspan="1">
34
+            <td style="text-align:center;width:50px" colspan="1">
34
               <span style="display:inline-block;margin-left:10px;">
35
               <span style="display:inline-block;margin-left:10px;">
35
-               
36
+                 {{getNewAge(patient.id_card_no)}}
36
               </span>
37
               </span>
37
             </td>
38
             </td>
38
-            <td style="text-align:center;" colspan="1">
39
+            <td style="text-align:center;width:50px" colspan="1">
39
               婚姻:
40
               婚姻:
40
             </td>
41
             </td>
41
-             <td style="text-align:center;" colspan="1">
42
+             <td style="text-align:center;width:50px" colspan="1">
42
               <span style="display:inline-block;margin-left:10px;">
43
               <span style="display:inline-block;margin-left:10px;">
43
-               
44
+                 <span v-if="patient.marital_status == 0">未婚</span>
45
+                 <span v-if="patient.marital_status == 1">已婚</span>
46
+                 <span v-if="patient.marital_status == 2">未婚</span>
47
+                 <span v-if="patient.marital_status == 3">离异</span>
48
+                 <span v-if="patient.marital_status == 4">丧偶</span>
44
               </span>
49
               </span>
45
             </td>
50
             </td>
46
-             <td style="text-align:center;" colspan="1">
47
-              职业:
51
+             <td style="text-align:center;width:50px" colspan="1">
52
+              职业: 
48
             </td>
53
             </td>
49
-             <td style="text-align:center;" colspan="1">
54
+             <td style="text-align:center;width:50px" colspan="1">
50
               <span style="display:inline-block;margin-left:10px;">
55
               <span style="display:inline-block;margin-left:10px;">
51
-               
56
+               {{getProfession(patient.profession)?getProfession(patient.profession):''}}
52
               </span>
57
               </span>
53
             </td>
58
             </td>
54
-             <td style="text-align:center;" colspan="1">
59
+             <td style="text-align:center;width:50px" colspan="1">
55
               电话:
60
               电话:
56
             </td>
61
             </td>
57
-             <td style="text-align:center;" colspan="1">
62
+             <td style="text-align:center;width:50px" colspan="1">
58
               <span style="display:inline-block;margin-left:10px;">
63
               <span style="display:inline-block;margin-left:10px;">
59
-               
64
+                {{patient.phone}}
60
               </span>
65
               </span>
61
             </td>
66
             </td>
62
           </tr>
67
           </tr>
68
+
63
           <tr>
69
           <tr>
64
             <td style="text-align:center;" colspan="1">
70
             <td style="text-align:center;" colspan="1">
65
-              入院时间:
71
+              住址:
66
             </td>   
72
             </td>   
67
             <td style="text-align:center;" colspan="11">
73
             <td style="text-align:center;" colspan="11">
68
             
74
             
69
               <span style="display:inline-block;margin-left:10px;">
75
               <span style="display:inline-block;margin-left:10px;">
70
-               
76
+                {{patient.home_address}}
71
               </span>
77
               </span>
72
             </td>   
78
             </td>   
73
           </tr>
79
           </tr>
74
           <tr>
80
           <tr>
81
+            <td style="text-align:center;width:170px" colspan="1">
82
+              入院时间:
83
+            </td>
75
             <td style="text-align:center;width:170px" colspan="2">
84
             <td style="text-align:center;width:170px" colspan="2">
85
+              <span style="display:inline-block;margin-left:10px;">
86
+                {{getTime(hosDetail.admission_time)}}
87
+              </span>
88
+            </td>
89
+            <td style="text-align:center;width:100px" colspan="2">
76
               出院时间:
90
               出院时间:
77
             </td>
91
             </td>
78
-            <td style="text-align:center;width:170px" colspan="2">
92
+            <td style="text-align:center;width:100px" colspan="2">
79
               <span style="display:inline-block;margin-left:10px;">
93
               <span style="display:inline-block;margin-left:10px;">
80
-               
94
+                {{getTime(hosDetail.discharge_time)}}
81
               </span>
95
               </span>
82
             </td>
96
             </td>
83
-            <td style="text-align:center;" colspan="2">
97
+            <td style="text-align:center;width:100px"  colspan="1">
84
               住院天数:
98
               住院天数:
85
             </td>
99
             </td>
86
-            <td style="text-align:center;" colspan="2">
100
+            <td style="text-align:center;width:50px" colspan="1">
87
               <span style="display:inline-block;margin-left:10px;">
101
               <span style="display:inline-block;margin-left:10px;">
88
-              
102
+               {{getTimeDay(hosDetail.admission_time,hosDetail.discharge_time)}}
103
+               
89
               </span>
104
               </span>
90
             </td>
105
             </td>
91
-            <td style="text-align:center;" colspan="2">
106
+            <td style="text-align:center;width:50px" colspan="2">
92
               转归:
107
               转归:
93
             
108
             
94
             </td>
109
             </td>
95
-            <td style="text-align:center;" colspan="2">
110
+            <td style="text-align:center;width:50px" colspan="1">
96
               <span style="display:inline-block;margin-left:10px;">
111
               <span style="display:inline-block;margin-left:10px;">
97
-               
112
+                <span v-if="patient.lapseto == 1">留治</span>
113
+                <span v-if="patient.lapseto == 2">转归</span>
98
               </span>
114
               </span>
99
             </td>
115
             </td>
100
             
116
             
101
           </tr>
117
           </tr>
102
           <tr>
118
           <tr>
103
-            <td style="text-align:center;width:170px" colspan="1">
119
+            <td style="text-align:center;width:50px" colspan="1">
104
               检查号:
120
               检查号:
105
             </td>
121
             </td>
106
-             <td style="text-align:center;" colspan="1">
107
-              <span style="display:inline-block;margin-left:10px;">
108
-              
109
-              </span>
110
-            </td>
111
-            <td style="text-align:center;" colspan="1">
122
+            <td style="text-align:center;width:50px" colspan="2">
112
               X线:
123
               X线:
113
             </td>
124
             </td>
114
-            <td style="text-align:center;" colspan="1">
125
+            <td style="text-align:center;width:50px" colspan="1">
115
               <span style="display:inline-block;margin-left:10px;">
126
               <span style="display:inline-block;margin-left:10px;">
116
-              
127
+                {{hosDetail.xray}}
117
               </span>
128
               </span>
118
             </td>
129
             </td>
119
-            <td style="text-align:center;" colspan="1">
130
+            <td style="text-align:center;width:50px" colspan="1">
120
               CT:
131
               CT:
121
             </td>
132
             </td>
122
-            <td style="text-align:center;" colspan="1">
133
+            <td style="text-align:center;width:50px" colspan="1">
123
               <span style="display:inline-block;margin-left:10px;">
134
               <span style="display:inline-block;margin-left:10px;">
124
-               
135
+                {{hosDetail.connecticut}}
125
               </span>
136
               </span>
126
             </td>
137
             </td>
127
-            <td style="text-align:center;" colspan="1">
138
+            <td style="text-align:center;width:50px" colspan="1">
128
               MRI:
139
               MRI:
129
             </td>
140
             </td>
130
-             <td style="text-align:center;" colspan="1">
141
+             <td style="text-align:center;width:50px" colspan="1">
131
               <span style="display:inline-block;margin-left:10px;">
142
               <span style="display:inline-block;margin-left:10px;">
132
-               
143
+                {{hosDetail.nuclear_magnetic_resonance}}
133
               </span>
144
               </span>
134
             </td>
145
             </td>
135
-             <td style="text-align:center;" colspan="1">
146
+             <td style="text-align:center;width:50px" colspan="1">
136
               超声:
147
               超声:
137
             </td>
148
             </td>
138
-             <td style="text-align:center;" colspan="1">
149
+             <td style="text-align:center;width:50px" colspan="1">
139
               <span style="display:inline-block;margin-left:10px;">
150
               <span style="display:inline-block;margin-left:10px;">
140
-               
151
+                {{hosDetail.ultrasound}}
141
               </span>
152
               </span>
142
             </td>
153
             </td>
143
-             <td style="text-align:center;" colspan="1">
154
+             <td style="text-align:center;width:50px" colspan="1">
144
               病理:
155
               病理:
145
             </td>
156
             </td>
146
-             <td style="text-align:center;" colspan="1">
157
+             <td style="text-align:center;width:50px" colspan="1">
147
               <span style="display:inline-block;margin-left:10px;">
158
               <span style="display:inline-block;margin-left:10px;">
148
-               
159
+                {{hosDetail.pathology}}
149
               </span>
160
               </span>
150
             </td>
161
             </td>
151
           </tr>
162
           </tr>
152
           <tr>
163
           <tr>
153
             <td style="text-align:center;" colspan="1">
164
             <td style="text-align:center;" colspan="1">
154
-              入院时间:
165
+              入院诊断:
155
               <span style="display:inline-block;margin-left:10px;">
166
               <span style="display:inline-block;margin-left:10px;">
156
                
167
                
157
               </span>
168
               </span>
158
             </td>   
169
             </td>   
159
             <td style="text-align:center;" colspan="11">
170
             <td style="text-align:center;" colspan="11">
160
               <span style="display:inline-block;margin-left:10px;">
171
               <span style="display:inline-block;margin-left:10px;">
161
-               
172
+                <span v-html="hosDetail.admitting_diagnosis"></span>
162
               </span>
173
               </span>
163
             </td>   
174
             </td>   
164
           </tr>
175
           </tr>
165
           <tr>
176
           <tr>
166
             <td style="text-align:center;width:170px" colspan="1">
177
             <td style="text-align:center;width:170px" colspan="1">
167
-              入院诊断:
168
-              <span style="display:inline-block;margin-left:10px;">
169
-               
170
-              </span>
178
+              出院诊断:
171
             </td>
179
             </td>
172
              <td style="text-align:center;width:170px" colspan="11">
180
              <td style="text-align:center;width:170px" colspan="11">
173
-              入院诊断:
181
+             
174
               <span style="display:inline-block;margin-left:10px;">
182
               <span style="display:inline-block;margin-left:10px;">
175
-               
183
+               <span v-html="hosDetail.discharge_diagnosis"></span>  
176
               </span>
184
               </span>
177
             </td>
185
             </td>
178
             
186
             
179
           </tr>
187
           </tr>
180
            <tr>
188
            <tr>
181
             <td style="text-align:center;width:170px" colspan="1">
189
             <td style="text-align:center;width:170px" colspan="1">
182
-              出院诊断:
190
+              入院时病情:
183
             </td>
191
             </td>
184
            <td style="text-align:center;width:170px" colspan="11">
192
            <td style="text-align:center;width:170px" colspan="11">
185
             
193
             
186
               <span style="display:inline-block;margin-left:10px;">
194
               <span style="display:inline-block;margin-left:10px;">
187
-               
188
-              </span>
189
-            </td>
190
-            
191
-          </tr>
192
-           <tr>
193
-            <td style="text-align:center;width:170px" colspan="1">
194
-              入院时病情:
195
-             
196
-            </td>
197
-            <td style="text-align:center;width:170px" colspan="11">
198
-              <span style="display:inline-block;margin-left:10px;">
199
-               
195
+                 <span v-html="hosDetail.diagnosis_admission"></span>
200
               </span>
196
               </span>
201
             </td>
197
             </td>
202
             
198
             
203
           </tr>
199
           </tr>
200
+        
204
           <tr>
201
           <tr>
205
             <td style="text-align:center;width:170px" colspan="1">
202
             <td style="text-align:center;width:170px" colspan="1">
206
               诊断经过:
203
               诊断经过:
208
             </td>
205
             </td>
209
             <td style="text-align:center;width:170px" colspan="11">
206
             <td style="text-align:center;width:170px" colspan="11">
210
               <span style="display:inline-block;margin-left:10px;">
207
               <span style="display:inline-block;margin-left:10px;">
211
-               
208
+               <span v-html="hosDetail.treatment"></span> 
212
               </span>
209
               </span>
213
             </td>
210
             </td>
214
             
211
             
216
           <tr>
213
           <tr>
217
             <td style="text-align:center;width:170px" colspan="1">
214
             <td style="text-align:center;width:170px" colspan="1">
218
               出院时病情:
215
               出院时病情:
219
-              <span style="display:inline-block;margin-left:10px;">
220
-               
221
-              </span>
222
             </td>
216
             </td>
223
             <td style="text-align:center;width:170px" colspan="11">
217
             <td style="text-align:center;width:170px" colspan="11">
224
             
218
             
225
               <span style="display:inline-block;margin-left:10px;">
219
               <span style="display:inline-block;margin-left:10px;">
226
-               
220
+               <span v-html="hosDetail.illness_discharge"></span> 
227
               </span>
221
               </span>
228
             </td>
222
             </td>
229
           
223
           
232
           <tr>
226
           <tr>
233
             <td style="text-align:center;width:170px" colspan="1">
227
             <td style="text-align:center;width:170px" colspan="1">
234
               出院医嘱:
228
               出院医嘱:
235
-              <span style="display:inline-block;margin-left:10px;">
236
-               
237
-              </span>
238
             </td>
229
             </td>
239
             <td style="text-align:center;width:170px" colspan="11">
230
             <td style="text-align:center;width:170px" colspan="11">
240
-              出院医嘱:
241
               <span style="display:inline-block;margin-left:10px;">
231
               <span style="display:inline-block;margin-left:10px;">
242
-               
232
+                <span v-html="hosDetail.discharge_advice"></span> 
243
               </span>
233
               </span>
244
             </td>
234
             </td>
245
             
235
             
252
             </td>
242
             </td>
253
             <td style="text-align:center;width:170px" colspan="2">
243
             <td style="text-align:center;width:170px" colspan="2">
254
               上级签名:
244
               上级签名:
255
-              <span style="display:inline-block;margin-left:10px;">
256
-               
257
-              </span>
258
             </td>
245
             </td>
259
             <td style="text-align:center;width:170px" colspan="2">
246
             <td style="text-align:center;width:170px" colspan="2">
260
               <span style="display:inline-block;margin-left:10px;">
247
               <span style="display:inline-block;margin-left:10px;">
261
-               
248
+                {{getDoctor(hosDetail.dean_id)}}
262
               </span>
249
               </span>
263
             </td>
250
             </td>
264
            <td style="text-align:center;width:170px" colspan="2">
251
            <td style="text-align:center;width:170px" colspan="2">
265
               住院医师签名:
252
               住院医师签名:
266
             </td>
253
             </td>
267
              <td style="text-align:center;width:170px" colspan="2">
254
              <td style="text-align:center;width:170px" colspan="2">
268
-             
269
               <span style="display:inline-block;margin-left:10px;">
255
               <span style="display:inline-block;margin-left:10px;">
270
-               
256
+                 {{getDoctor(hosDetail.doctor)}}
271
               </span>
257
               </span>
272
             </td>
258
             </td>
273
           </tr>
259
           </tr>
287
 import LabelBox from '../dialysis/printItem/LabelBox'
273
 import LabelBox from '../dialysis/printItem/LabelBox'
288
 import CheckBox from '../dialysis/batch_print/option_check_box'
274
 import CheckBox from '../dialysis/batch_print/option_check_box'
289
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
275
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
290
-import {getHospitalSummaryDetail} from "@/api/patient"
291
-  import { getAllDoctorList } from "@/api/device"
276
+import {getHospitalSummaryDetail,getPatientInfo} from "@/api/patient"
277
+import { getAllDoctorList } from "@/api/device"
278
+import { getDataConfig } from "@/utils/data";
292
 export default {
279
 export default {
293
   name: 'dialysisPrintOrderOne',
280
   name: 'dialysisPrintOrderOne',
294
   components: {
281
   components: {
305
      hosDetail:{},
292
      hosDetail:{},
306
      patient:{},
293
      patient:{},
307
      doctorList:[],
294
      doctorList:[],
295
+    educationOptions:[],
308
     }
296
     }
309
   },
297
   },
310
   methods: {
298
   methods: {
313
       var timestr = uParseTime(times, '{y}年{m}月{d}日')
301
       var timestr = uParseTime(times, '{y}年{m}月{d}日')
314
       return timestr
302
       return timestr
315
     },
303
     },
316
-    getTime(value, temp) {
317
-      if (value == 0) {
318
-        return ''
319
-      }
320
-      if (value != undefined) {
321
-        return uParseTime(value, temp)
322
-      }
323
-      return ''
304
+    getTime(val) {
305
+       if(val == "" || val == undefined){
306
+          return ""
307
+         }else {
308
+          return uParseTime(val, '{y}-{m}-{d}')
309
+         }
324
     },
310
     },
325
-   
326
     printThisPage() {
311
     printThisPage() {
327
         var ptime = Math.round(new Date().getTime() / 1000)
312
         var ptime = Math.round(new Date().getTime() / 1000)
328
         this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
313
         this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
385
         }
370
         }
386
        })
371
        })
387
      },
372
      },
373
+     getDoctor(id){
374
+        var name = ""
375
+        for(let i=0;i<this.doctorList.length;i++){
376
+          if(id == this.doctorList[i].admin_user_id){
377
+             name = this.doctorList[i].user_name
378
+          }
379
+        }
380
+        return name
381
+    },
382
+    getProfession(id){
383
+      var name = ""
384
+      for(let i=0;i<this.educationOptions.length;i++){
385
+          if(id == this.educationOptions[i].id){
386
+              name = this.educationOptions[i].name
387
+          }
388
+      }
389
+      return name
390
+    },
391
+    getTimeDay(start,end){
392
+      var count = ""
393
+      count = (end-start)/86400
394
+      return count
395
+    }
388
   },
396
   },
389
  
397
  
390
   created() {
398
   created() {
399
+    this.educationOptions = getDataConfig("patient", "education_types");
391
     var xtuser = this.$store.getters.xt_user
400
     var xtuser = this.$store.getters.xt_user
392
     this.orgname = xtuser.org.org_name
401
     this.orgname = xtuser.org.org_name
393
     var id = this.$route.query.id
402
     var id = this.$route.query.id