Browse Source

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

杨青 1 year ago
parent
commit
db30be26fe

+ 24 - 2
src/api/inspection.js View File

@@ -3,9 +3,9 @@ import {
3 3
   fromTextArea
4 4
 } from 'codemirror'
5 5
 
6
-export function fetchInspectionReference(id) {
6
+export function fetchInspectionReference(id,type) {
7 7
   return request({
8
-    url: '/api/patient/inspection/reference?patient=' + id,
8
+    url: '/api/patient/inspection/reference?patient=' + id+"&type=" + type,
9 9
     method: 'get'
10 10
   })
11 11
 }
@@ -59,3 +59,25 @@ export function GetInitInspections(params) {
59 59
     params: params
60 60
   })
61 61
 }
62
+
63
+
64
+export function CreatePatientPICInspection(id, data) {
65
+  return request({
66
+    url: '/api/patient/pic_inspection/create?patient=' + id,
67
+    method: 'post',
68
+    data: data
69
+  })
70
+}
71
+
72
+export function editPatientPICInspection(id, data) {
73
+  return request({
74
+    url: '/api/patient/pic_inspection/edit?patient=' + id,
75
+    method: 'post',
76
+    data: data
77
+  })
78
+}
79
+
80
+
81
+
82
+
83
+

+ 93 - 1
src/api/patient.js View File

@@ -509,7 +509,7 @@ export function getInspectionItemList(params) {
509 509
 }
510 510
 
511 511
 export function saveCreation(data) {
512
- 
512
+
513 513
   return request({
514 514
     url: '/api/patient/savecreationinspection',
515 515
     method: 'post',
@@ -652,3 +652,95 @@ export function deleteFirstDisease(params) {
652 652
     params: params
653 653
   })
654 654
 }
655
+
656
+export function createSickHistoryRecord(params) {
657
+  return request({
658
+    url: '/api/patient/sickhistory/create',
659
+    method: 'get',
660
+    params: params
661
+  })
662
+}
663
+
664
+
665
+export function deleteSickHistoryRecords(params) {
666
+  return request({
667
+    url: '/api/patient/sickhistory/delete',
668
+    method: 'post',
669
+    params: params
670
+  })
671
+}
672
+
673
+ export function ModifySickHistoryRecord(params) {
674
+  return request({
675
+    url: '/api/patient/sickhistory/modify',
676
+    method: 'get',
677
+    params: params
678
+  })
679
+}
680
+
681
+export function GetSickHistoryRecords(params) {
682
+  return request({
683
+    url: '/api/patient/sickhistory',
684
+    method: 'get',
685
+    params: params
686
+  })
687
+}
688
+
689
+
690
+
691
+export function getPhysiqueCheckRecords(patient_id, start_time_ymd, end_time_ymd) {
692
+  var params = {
693
+    patient_id: patient_id,
694
+    start_time: start_time_ymd,
695
+    end_time: end_time_ymd
696
+  }
697
+  return request({
698
+    url: '/api/patient/physiquecheck',
699
+    method: 'get',
700
+    params: params
701
+  })
702
+}
703
+export function createPhysiqueCheckRecord(params) {
704
+  return request({
705
+    url: '/api/patient/physiquecheck/create',
706
+    method: 'get',
707
+    params: params
708
+  })
709
+}
710
+
711
+export function modifyPhysiqueCheckRecord(params) {
712
+  return request({
713
+    url: '/api/patient/physiquecheck/modify',
714
+    method: 'get',
715
+    params: params
716
+  })
717
+}
718
+
719
+
720
+export function deletePhysiqueCheckRecords(params) {
721
+  return request({
722
+    url: '/api/patient/physiquecheck/delete',
723
+    method: 'post',
724
+    params: params
725
+  })
726
+}
727
+
728
+
729
+export function getPhysiqueCheckRecordsPrint(params) {
730
+  return request({
731
+    url: '/api/patient/physiquecheck/print',
732
+    method: 'get',
733
+    params: params
734
+  })
735
+}
736
+
737
+
738
+export function getSickhistoryCheckRecordsPrint(params) {
739
+  return request({
740
+    url: '/api/patient/sickhistory/print',
741
+    method: 'get',
742
+    params: params
743
+  })
744
+}
745
+
746
+

+ 1 - 0
src/lang/zh.js View File

@@ -393,6 +393,7 @@ export default {
393 393
     config_value: '字段值',
394 394
     remark: '备注',
395 395
     course_disease: '病程',
396
+    sick_history: '病史',
396 397
     rescue_record: '抢救记录',
397 398
     manage_ment: '设备管理',
398 399
     nursing_record: '透析护理记录',

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

@@ -638,7 +638,7 @@ export const xt_asyncRouterMap = [
638 638
         meta: { title: 'inspection', noCache: true }
639 639
       },
640 640
       {
641
-        path: '/patients/course',
641
+        path: '/',
642 642
         component: () => import('@/xt_pages/user/courseOfDisease'),
643 643
         hidden: true,
644 644
         is_menu: false,
@@ -978,5 +978,5 @@ export const xt_asyncRouterMap = [
978 978
       { path: '/role/perview', component: () => import('@/xt_pages/role/EditPerview'), name: 'setupPerview', meta: { title: 'setupPerview', noCache: true }, hidden: true, is_menu: false },
979 979
       { path: '/role/admin/specialpermission', component: () => import('@/xt_pages/role/special_permission'), name: 'special_permission_manage', meta: { title: 'special_permission_manage' }}
980 980
     ]
981
-  }
981
+  },
982 982
 ]

+ 41 - 2
src/router/modules/patient.js View File

@@ -181,7 +181,35 @@ export default {
181 181
       title: 'CourseOfDiseaseManage',
182 182
       noCache: true
183 183
     }
184
-  },
184
+  }, {
185
+      path: '/patients/sickhistory',
186
+      component: () => import('@/xt_pages/user/sickHistory'),
187
+      hidden: true,
188
+      is_menu: false,
189
+      name: 'sickHistory',
190
+      meta: { title: 'sickHistory', noCache: true }
191
+    }, {
192
+      path: '/patients/inspection_check',
193
+      component: () => import('@/xt_pages/user/inspectionCheck'),
194
+      hidden: true,
195
+      is_menu: false,
196
+      name: 'inspectionCheck',
197
+      meta: { title: 'inspectionCheck', noCache: true }
198
+    },{
199
+      path: '/patients/ktv',
200
+      component: () => import('@/xt_pages/user/ktv'),
201
+      hidden: true,
202
+      is_menu: false,
203
+      name: 'ktv',
204
+      meta: { title: 'ktv', noCache: true }
205
+    },{
206
+      path: '/patients/physicalexamination',
207
+      component: () => import('@/xt_pages/user/Physicalexamination'),
208
+      hidden: true,
209
+      is_menu: false,
210
+      name: 'physicalexamination',
211
+      meta: { title: 'physicalexamination', noCache: true }
212
+    },
185 213
   {
186 214
     path: '/patients/rescue',
187 215
     component: () => import('@/xt_pages/user/rescueRecord'),
@@ -216,7 +244,7 @@ export default {
216 244
     }
217 245
   },
218 246
   {
219
-    path: '/physique/print',//coursePrint
247
+    path: '/sickhistory/print',
220 248
     component: () => import('@/xt_pages/user/physiqueprinting'),
221 249
     hidden: true,
222 250
     is_menu: false,
@@ -226,6 +254,17 @@ export default {
226 254
       noCache: true
227 255
     }
228 256
   },
257
+    {
258
+      path: '/physique/print',
259
+      component: () => import('@/xt_pages/user/physiqueprintingtwo'),
260
+      hidden: true,
261
+      is_menu: false,
262
+      name: 'physiqueprintingtwo',
263
+      meta: {
264
+        title: 'physiqueprintingtwo',
265
+        noCache: true
266
+      }
267
+    },
229 268
   {
230 269
     path: '/patient/patient/templateSummary/print',
231 270
     component: () => import('@/xt_pages/user/templateSummaryPrint'),

+ 2 - 2
src/xt_pages/data/components/templateTable.vue View File

@@ -91,7 +91,7 @@
91 91
           ></el-input>
92 92
         </el-form-item>
93 93
 
94
-        <el-form-item label="内容" v-if="type == 'course_disease'">
94
+        <el-form-item label="内容" v-if="type == 'course_disease' || type == 'sick_history'">
95 95
           <keep-alive>
96 96
             <editor
97 97
               ref="editor"
@@ -350,7 +350,7 @@ export default {
350 350
     },
351 351
     createData() {
352 352
       this.$refs["dataForm"].validate(valid => {
353
-        if (this.type == "course_disease") {
353
+        if (this.type == "course_disease" || this.type == "sick_history") {
354 354
           this.temp.content = this.$refs.editor.content;
355 355
         }
356 356
 

+ 2 - 0
src/xt_pages/data/template.vue View File

@@ -62,6 +62,8 @@ export default {
62 62
         { label: this.$t("data_config.diagnostic_basis"), key:"diagnostic_basis"},
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
+        { label: this.$t("data_config.sick_history"), key:"sick_history"},
66
+
65 67
       ],
66 68
       activeName: "education",
67 69
       createdTimes: 0

+ 0 - 3
src/xt_pages/outpatientCharges/outpatientChargesManagement.vue View File

@@ -26,15 +26,12 @@
26 26
 
27 27
         <div class="mainCell" style="margin-top:10px;">
28 28
           <el-radio-group v-model="radio" @change="changeRadio">
29
-
30 29
             <el-radio :label=1>未收费<span
31 30
                 style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_one }}</span>人
32 31
             </el-radio>
33 32
             <el-radio :label=2>已收费<span
34 33
                 style="color: red;margin-bottom:10px;display: inline-block;">{{ cal_two }}</span>人
35 34
             </el-radio>
36
-
37
-
38 35
           </el-radio-group>
39 36
         </div>
40 37
         <div class="mainCell" style="margin-bottom:10px;">

+ 70 - 40
src/xt_pages/outpatientCharges/summary.vue View File

@@ -124,7 +124,7 @@
124 124
           <!--          </el-button-->
125 125
           <!--          >-->
126 126
 
127
-<!--                              <el-button size="small" type="primary" @click="export_detail_three">报表下载2</el-button>-->
127
+                              <el-button size="small" type="primary" @click="export_detail_three">报表下载12</el-button>
128 128
           <!--          <el-button size="small" type="primary" @click="export_detail_four">报表下载3</el-button>-->
129 129
           <!--          <el-button size="small" type="primary" @click="export_detail_five">报表下载3</el-button>-->
130 130
 <!--                    <el-button size="small" type="primary" @click="export_detail_six">报表下载9</el-button>-->
@@ -1205,22 +1205,25 @@ export default {
1205 1205
           return false;
1206 1206
         } else {
1207 1207
           let list = [];
1208
+          console.log(response.data.data.order)
1208 1209
           for (let i = 0; i < response.data.data.order.length; i++) {
1209 1210
             let order = response.data.data.order[i];
1210 1211
             let data = this.setMonthPrescription(order.info)
1211
-            // console.log(data)
1212
+            console.log(data)
1212 1213
             for (let b = 0; b < data.length; b++) {
1213 1214
               let obj = {
1214 1215
                 name: order.patient.name,
1215 1216
                 id_card_no: order.patient.id_card_no,
1216 1217
                 year: "2023",
1217
-                month: "3",
1218
+                month: "03",
1218 1219
                 code: data[b].code,
1219
-                pric: data[b].count * data[b].price,
1220
+                pric: data[b].total ,
1220 1221
                 item_name: data[b].name,
1221 1222
                 unit: data[b].unit,
1222 1223
                 count: data[b].count,
1223
-                item_type_name:this.getItemTypeName(order.order_info, data[b].id,data[b].type)
1224
+                item_type_name:this.getItemTypeName(order.info, data[b].id,data[b].type),
1225
+                pric_two: data[b].pric ,
1226
+
1224 1227
 
1225 1228
               }
1226 1229
               if (order.insutype == "310") {
@@ -1249,6 +1252,7 @@ export default {
1249 1252
                 "单位": list[i].unit,
1250 1253
                 "数量": list[i].count,
1251 1254
                 "金额": list[i].pric,
1255
+                "dan": list[i].pric_two,
1252 1256
               }
1253 1257
               tarList.push(obj)
1254 1258
             }
@@ -1267,6 +1271,7 @@ export default {
1267 1271
               "单位",
1268 1272
               "数量",
1269 1273
               "金额",
1274
+              "dan",
1270 1275
 
1271 1276
             ];
1272 1277
             const filterVal = [
@@ -1281,6 +1286,8 @@ export default {
1281 1286
               "单位",
1282 1287
               "数量",
1283 1288
               "金额",
1289
+              "dan",
1290
+
1284 1291
 
1285 1292
             ];
1286 1293
             const data = this.formatJson(filterVal, tarList);
@@ -3119,6 +3126,7 @@ export default {
3119 3126
       this.getHisOrderList();
3120 3127
     },
3121 3128
     setMonthPrescription(month_prescriptions) {
3129
+      console.log(month_prescriptions)
3122 3130
       let tableData = []
3123 3131
       let drug_month_prescriptions = {
3124 3132
         advices: []
@@ -3130,92 +3138,114 @@ export default {
3130 3138
       }
3131 3139
       let project_ids = []
3132 3140
 
3141
+      let to = 0
3142
+      for(let i = 0; i < month_prescriptions.length; i++){
3143
+        to = to + month_prescriptions[i].det_item_fee_sumamt
3144
+      }
3145
+      console.log(to)
3146
+
3133 3147
       // let addition_month_prescriptions = {
3134 3148
       //   addition: []
3135 3149
       //
3136 3150
       // }
3137 3151
       // let additions_ids = []
3138 3152
       for (let i = 0; i < month_prescriptions.length; i++) {
3139
-        if (month_prescriptions[i].type == 1) { //药品
3140
-          for (let a = 0; a < month_prescriptions[i].advices.length; a++) {
3153
+        if (month_prescriptions[i].advice_id > 0 && month_prescriptions[i].project_id == 0) { //药品
3141 3154
             let obj = {
3142
-              id: month_prescriptions[i].advices[a].drug_id,
3143
-              price: month_prescriptions[i].advices[a].price
3144
-
3155
+              id: month_prescriptions[i].advices.drug_id,
3156
+              price: month_prescriptions[i].pric
3145 3157
             }
3146 3158
             drug_ids.push(obj)
3147
-            drug_month_prescriptions.advices.push(month_prescriptions[i].advices[a])
3148
-          }
3159
+            drug_month_prescriptions.advices.push(month_prescriptions[i])
3149 3160
 
3150
-        } else if (month_prescriptions[i].type == 2) { //项目
3151
-          for (let a = 0; a < month_prescriptions[i].project.length; a++) {
3161
+        } else if (month_prescriptions[i].advice_id == 0 && month_prescriptions[i].project_id > 0) { //项目
3152 3162
             let obj = {
3153
-              id: month_prescriptions[i].project[a].project_id,
3154
-              price: month_prescriptions[i].project[a].price
3155
-
3163
+              id: month_prescriptions[i].project.project_id,
3164
+              price: month_prescriptions[i].pric
3156 3165
             }
3157 3166
 
3158 3167
             project_ids.push(obj)
3159
-            project_month_prescriptions.project.push(month_prescriptions[i].project[a])
3160
-          }
3168
+            project_month_prescriptions.project.push(month_prescriptions[i])
3161 3169
         }
3162 3170
 
3163 3171
       }
3172
+      console.log(drug_ids)
3173
+      console.log(project_ids)
3174
+
3164 3175
 
3165 3176
       drug_ids = this.unique(drug_ids)
3166 3177
       project_ids = this.unique(project_ids)
3178
+      console.log(drug_ids)
3179
+      console.log(project_ids)
3167 3180
 
3168 3181
       // additions_ids= this.unique(additions_ids)
3169 3182
 
3170 3183
       for (let i = 0; i < drug_ids.length; i++) {
3171 3184
         let obj = {}
3172 3185
         let count = 0
3186
+        let total = 0
3187
+
3173 3188
         for (let a = 0; a < drug_month_prescriptions.advices.length; a++) {
3174
-          if (drug_ids[i].price == drug_month_prescriptions.advices[a].price && drug_ids[i].id == drug_month_prescriptions.advices[a].drug_id) {
3175
-            obj['name'] = drug_month_prescriptions.advices[a].advice_name
3176
-            obj['code'] = drug_month_prescriptions.advices[a].id
3177
-            obj['unit'] = drug_month_prescriptions.advices[a].drug.min_unit
3178
-            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].price)
3179
-            obj['id'] = drug_month_prescriptions.advices[a].id
3180
-            obj['type'] = 1
3189
+          console.log( drug_month_prescriptions.advices[a].id)
3190
+          console.log( drug_month_prescriptions.advices[a].det_item_fee_sumamt)
3191
+          console.log((parseFloat(drug_month_prescriptions.advices[a].pric) * parseFloat(drug_month_prescriptions.advices[a].cnt)).toFixed(2))
3181 3192
 
3182 3193
 
3183
-            count = count + drug_month_prescriptions.advices[a].prescribing_number
3194
+          if (drug_ids[i].price == drug_month_prescriptions.advices[a].pric && drug_ids[i].id == drug_month_prescriptions.advices[a].advices.drug_id) {
3195
+            obj['name'] = drug_month_prescriptions.advices[a].advices.advice_name
3196
+            obj['code'] = drug_month_prescriptions.advices[a].advices.id
3197
+            obj['unit'] = drug_month_prescriptions.advices[a].advices.drug.min_unit
3198
+            obj['price'] = parseFloat(drug_month_prescriptions.advices[a].pric)
3199
+            obj['id'] = drug_month_prescriptions.advices[a].advices.id
3200
+            obj['type'] = 1
3201
+
3202
+            count = count + drug_month_prescriptions.advices[a].cnt
3203
+            total = total + drug_month_prescriptions.advices[a].det_item_fee_sumamt
3184 3204
           }
3185 3205
         }
3206
+
3186 3207
         obj['count'] = count
3208
+        obj['total'] = total
3209
+
3187 3210
         tableData.push(obj)
3188 3211
       }
3189 3212
 
3190 3213
       for (let i = 0; i < project_ids.length; i++) {
3191 3214
         let obj = {}
3192 3215
         let count = 0
3216
+        let total = 0
3217
+
3193 3218
         for (let a = 0; a < project_month_prescriptions.project.length; a++) {
3194
-          if (project_ids[i].price == project_month_prescriptions.project[a].price && project_ids[i].id == project_month_prescriptions.project[a].project_id) {
3219
+          if (project_ids[i].price == project_month_prescriptions.project[a].project.price && project_ids[i].id == project_month_prescriptions.project[a].project.project_id) {
3195 3220
 
3196
-            if (project_month_prescriptions.project[a].type == 2) {
3197
-              obj['name'] = project_month_prescriptions.project[a].project.project_name
3198
-              obj['code'] = project_month_prescriptions.project[a].id
3199
-              obj['unit'] = project_month_prescriptions.project[a].project.unit
3221
+            if (project_month_prescriptions.project[a].project.type == 2) {
3222
+              obj['name'] = project_month_prescriptions.project[a].project.project.project_name
3223
+              obj['code'] = project_month_prescriptions.project[a].project.id
3224
+              obj['unit'] = project_month_prescriptions.project[a].project.project.unit
3200 3225
               obj['type'] = 2
3201
-              obj['id'] = project_month_prescriptions.project[a].id
3226
+              obj['id'] = project_month_prescriptions.project[a].project.id
3202 3227
 
3203 3228
 
3204
-            } else if (project_month_prescriptions.project[a].type == 3) {
3205
-              obj['name'] = project_month_prescriptions.project[a].good_info.good_name
3206
-              obj['code'] = project_month_prescriptions.project[a].id
3207
-              obj['unit'] = project_month_prescriptions.project[a].good_info.packing_unit
3229
+            } else if (project_month_prescriptions.project[a].project.type == 3) {
3230
+              obj['name'] = project_month_prescriptions.project[a].project.good_info.good_name
3231
+              obj['code'] = project_month_prescriptions.project[a].project.id
3232
+              obj['unit'] = project_month_prescriptions.project[a].project.good_info.packing_unit
3208 3233
               obj['type'] = 3
3209
-              obj['id'] = project_month_prescriptions.project[a].id
3234
+              obj['id'] = project_month_prescriptions.project[a].project.id
3210 3235
 
3211 3236
             }
3212
-            count = count + parseFloat(project_month_prescriptions.project[a].count)
3213
-            obj['price'] = parseFloat(project_month_prescriptions.project[a].price)
3237
+            count = count + parseFloat(project_month_prescriptions.project[a].cnt)
3238
+            total = total + project_month_prescriptions.project[a].det_item_fee_sumamt
3239
+
3240
+            obj['price'] = parseFloat(project_month_prescriptions.project[a].pric)
3214 3241
             obj['type'] = 2
3215 3242
 
3216 3243
           }
3217 3244
         }
3245
+
3218 3246
         obj['count'] = count
3247
+        obj['total'] = total
3248
+
3219 3249
         tableData.push(obj)
3220 3250
 
3221 3251
       }

File diff suppressed because it is too large
+ 2016 - 2016
src/xt_pages/outpatientDoctorStation/prescriptionTemplatedetail.vue


+ 9 - 13
src/xt_pages/outpatientTool/components/detail.vue View File

@@ -83,13 +83,13 @@
83 83
             </el-table-column>
84 84
             <el-table-column align="center" prop="name" label="费用">
85 85
                 <template slot-scope="scope">
86
-                    <div>{{(scope.row.price.toFixed(2)*scope.row.count).toFixed(2)}}</div>
86
+                    <div>{{((scope.row.price*scope.row.count).toFixed(2))}}</div>
87 87
                 </template>
88 88
             </el-table-column>
89 89
 
90 90
             <el-table-column align="center" prop="total" label="费用总额">
91 91
                 <template slot-scope="scope">
92
-                    <div>{{scope.row.total.toFixed(2)}}</div>
92
+                    <div>{{scope.row.total}}</div>
93 93
                 </template>
94 94
             </el-table-column>
95 95
 
@@ -282,6 +282,8 @@
282 282
 
283 283
                   newObj['count'] = orders[b].order_info[c].cnt
284 284
                   newObj['price'] = orders[b].order_info[c].pric
285
+                  newObj['item_total'] = orders[b].order_info[c].det_item_fee_sumamt
286
+
285 287
                   if (orders[b].order_info[c].advice_id > 0 && orders[b].order_info[c].project_id == 0) {
286 288
                     newObj['type'] = 1
287 289
                     newObj['item_name'] = orders[b].order_info[c].advice.advice_name
@@ -346,6 +348,7 @@
346 348
                 obj['type'] = project[i].type
347 349
                 obj['item_name'] = project[i].item_name
348 350
                 obj['item_spec'] = project[i].item_spec
351
+                obj['item_total'] = project[i].item_total
349 352
 
350 353
                 obj['item_id'] = project[i].item_id
351 354
                 obj['name'] = tempPatientsTwo[d].name
@@ -369,6 +372,7 @@
369 372
                 obj['item_spec'] = advice[i].item_spec
370 373
                 obj['item_id'] = advice[i].item_id
371 374
                 obj['name'] = tempPatientsTwo[d].name
375
+                obj['item_total'] = advice[i].item_total
372 376
                 obj['patient_id'] = tempPatientsTwo[d].patient_id
373 377
                 obj['count'] = count
374 378
                 tempPatientsTwo[d].new_order_info.push(obj)
@@ -380,20 +384,12 @@
380 384
               let total = 0
381 385
               for (let b = 0; b < tempPatientsTwo[i].new_order_info.length; b++) {
382 386
                 let new_name = tempPatientsTwo[i].new_order_info[b].item_name
383
-                // console.log('3 ' + new_name)
384 387
                 if (new_name != undefined){
385
-                  // console.log('3 ' + tempPatientsTwo[i].new_order_info[b].patient_id)
386
-                  // console.log('3 ' + tempPatientsTwo[i].new_order_info[b].price)
387
-                  // console.log('3 ' + tempPatientsTwo[i].new_order_info[b].count)
388
-                  //
389
-                  // new_name = new_name.replace('( ', '')
390
-                  // new_name = new_name.replace(' )', '')
391 388
                   if (new_name.length != 0) {
392
-                    console.log(tempPatientsTwo[i].new_order_info[b].count)
393
-                    console.log(tempPatientsTwo[i].new_order_info[b].price)
394
-                    console.log(parseFloat(tempPatientsTwo[i].new_order_info[b].count) * parseFloat(tempPatientsTwo[i].new_order_info[b].price))
395 389
                     console.log(total)
396
-                    total = total + parseFloat(tempPatientsTwo[i].new_order_info[b].count) * parseFloat(tempPatientsTwo[i].new_order_info[b].price.toFixed(2))
390
+                    console.log(tempPatientsTwo[i].new_order_info[b].item_total)
391
+
392
+                    total = parseFloat(total) + parseFloat(tempPatientsTwo[i].new_order_info[b].item_total).toFixed(2)
397 393
                   }
398 394
 
399 395
 

+ 1 - 1
src/xt_pages/outpatientTool/detailPrint.vue View File

@@ -18,7 +18,7 @@
18 18
           <tr>
19 19
             <td>患者姓名:{{ patient.name }}</td>
20 20
             <td>性别:{{ patient.gender == 1 ? "男" : "女" }}</td>
21
-            <td>性别:{{patient.id_card_no}}</td>
21
+            <td>身份证:{{patient.id_card_no}}</td>
22 22
 
23 23
             <TD>年龄:{{ getAge(patient.id_card_no)?getAge(patient.id_card_no)+'岁':''}}</TD>
24 24
             <td>结算类别:

File diff suppressed because it is too large
+ 2518 - 527
src/xt_pages/user/Physicalexamination.vue


+ 91 - 25
src/xt_pages/user/components/PatientSidebar.vue View File

@@ -98,58 +98,112 @@ export default {
98 98
               name:'1-7',
99 99
               label:'血管通路'
100 100
             },
101
+            // {
102
+            //   name: '1-2',
103
+            //   label: '病程管理'
104
+            // },
105
+            // {
106
+            //   name: '1-9',
107
+            //   label: '阶段小结'
108
+            // },
109
+            // {
110
+            //   name: '1-10',
111
+            //   label: '出院小结'
112
+            // },
113
+            // {
114
+            //   name: '1-3',
115
+            //   label: '检验检查'
116
+            // },
117
+            // {
118
+            //   name:'1-8',
119
+            //   label:'传染病管理'
120
+            // },
121
+            // {
122
+            //   name: '1-5',
123
+            //   label: '抢救记录'
124
+            // },
125
+            // {
126
+            //   name: '1-11',
127
+            //   label: '首次病程记录'
128
+            // }
129
+          ]
130
+        },
131
+        {
132
+          name: '2',
133
+          label: '透析管理',
134
+          children: [
101 135
             {
102
-              name: '1-2',
103
-              label: '病程管理'
136
+              name: '2-1',
137
+              label: '长期透析处方'
104 138
             },
105 139
             {
106
-              name: '1-9',
107
-              label: '阶段小结'
140
+              name: '2-2',
141
+              label: '透析记录'
108 142
             },
109 143
             {
110
-              name: '1-10',
111
-              label: '出院小结'
144
+              name: '2-4',
145
+              label: '排班信息'
112 146
             },
113 147
             {
114
-              name: '1-3',
115
-              label: '检验检查'
116
-            },
148
+              name: '2-5',
149
+              label: '宣教信息'
150
+            }
151
+          ]
152
+        },
153
+        {
154
+          name: '3',
155
+          label: '病情记录',
156
+          children: [
117 157
             {
118
-              name:'1-8',
119
-              label:'传染病管理'
158
+              name: '3-1',
159
+              label: '病史'
120 160
             },
121 161
             {
122
-              name: '1-5',
123
-              label: '抢救记录'
162
+              name: '3-2',
163
+              label: '体格检查'
124 164
             },
125 165
             {
126 166
               name: '1-11',
127 167
               label: '首次病程记录'
168
+            },
169
+            {
170
+              name: '1-2',
171
+              label: '病程记录'
172
+            }, {
173
+              name: '1-5',
174
+              label: '抢救记录'
175
+            }, {
176
+              name: '1-9',
177
+              label: '阶段小结'
178
+            }, {
179
+              name: '1-10',
180
+              label: '出院小结'
128 181
             }
129 182
           ]
130 183
         },
131 184
         {
132
-          name: '2',
133
-          label: '透析管理',
185
+          name: '4',
186
+          label: '检验检查',
134 187
           children: [
135 188
             {
136
-              name: '2-1',
137
-              label: '长期透析处方'
189
+              name: '1-3',
190
+              label: '肾科检验'
138 191
             },
139 192
             {
140
-              name: '2-2',
141
-              label: '透析记录'
193
+              name: '4-1',
194
+              label: '肾科检查'
142 195
             },
143 196
             {
144
-              name: '2-4',
145
-              label: '排班信息'
197
+              name: '4-3',
198
+              label: 'KT/V'
146 199
             },
147 200
             {
148
-              name: '2-5',
149
-              label: '宣教信息'
150
-            }
201
+              name: '1-8',
202
+              label: '传染病管理'
203
+            },
151 204
           ]
152
-        }
205
+        },
206
+
153 207
       ],
154 208
       name:""
155 209
     }
@@ -201,6 +255,16 @@ export default {
201 255
         this.$router.push({path:'/patient/patient/'+this.id+'/hospitalSummary'})
202 256
       }else if(name == '1-11'){
203 257
         this.$router.push({path:'/patient/patient/'+this.id+'/firstDisease'})
258
+      }else if(name == '3-1'){
259
+        this.$router.push({ path: '/patients/sickhistory?id=' + this.id })
260
+
261
+      } else if(name == '3-2'){
262
+        this.$router.push({path:'/patients/physicalexamination?id='+this.id})
263
+
264
+      }else if(name == '4-1'){
265
+        this.$router.push({path:'/patients/inspection_check?id='+this.id})
266
+      }else if(name == '4-3'){
267
+        this.$router.push({path:'/patients/ktv?id='+this.id})
204 268
       }
205 269
     },
206 270
     changePatient(value) {
@@ -349,6 +413,8 @@ export default {
349 413
         this.$router.push({
350 414
           path: '/patients/patient/' + this.id + '/proeducation'
351 415
         })
416
+      }else if (patientKey == '3-1') {
417
+        this.$router.push({ path: '/patients/sickhistory?id=' + this.id })
352 418
       }
353 419
 
354 420
      }else{

+ 524 - 113
src/xt_pages/user/inspection.vue View File

@@ -40,6 +40,15 @@
40 40
         </el-col>
41 41
         <el-col :span="17" v-loading="itemLoading">
42 42
           <div class="filter-container" style="float:right">
43
+            <el-button
44
+              size="small"
45
+              class="filter-item"
46
+              type="primary"
47
+              @click="openPic()"
48
+              icon="el-icon-circle-plus-outline"
49
+              :disabled="project ? false : true"
50
+            >上传图片
51
+            </el-button>
43 52
             <el-button
44 53
               size="small"
45 54
               class="filter-item"
@@ -47,7 +56,8 @@
47 56
               @click="openNew()"
48 57
               icon="el-icon-circle-plus-outline"
49 58
               :disabled="project ? false : true"
50
-              >新增</el-button
59
+            >新增
60
+            </el-button
51 61
             >
52 62
             <el-button
53 63
               size="small"
@@ -56,7 +66,8 @@
56 66
               icon="el-icon-edit-outline"
57 67
               @click="openEdit()"
58 68
               :disabled="itemDate ? false : true"
59
-              >修改</el-button
69
+            >修改
70
+            </el-button
60 71
             >
61 72
             <el-button
62 73
               size="small"
@@ -65,73 +76,111 @@
65 76
               icon="el-icon-delete"
66 77
               @click="deleteInspection()"
67 78
               :disabled="itemDate ? false : true"
68
-              >删除</el-button
79
+            >删除
80
+            </el-button
69 81
             >
70 82
           </div>
71 83
           <div class="filter-container">
72 84
             <el-button class="filter-item" type="text" style="color:#000"
73
-              >{{ itemName }}
85
+            >{{ itemName }}
74 86
               <span v-if="itemDate"
75
-                >(检查日期:{{ itemDate }})</span
87
+              >(检查日期:{{ itemDate }})</span
76 88
               ></el-button
77 89
             >
78 90
           </div>
79
-          <el-table
80
-            :header-cell-style="{
91
+          <div v-if="!isPic">
92
+            <el-table
93
+              :header-cell-style="{
81 94
               backgroundColor: 'rgb(245, 247, 250)',
82 95
               color: '#606266'
83 96
             }"
84
-            :row-style="{ color: '#303133' }"
85
-            :data="items"
86
-            border
87
-            style="width: 100%"
88
-            id="user-inspection-order"
89
-          >
90
-            <el-table-column
91
-              prop="item_name"
92
-              label="检验项目"
93
-              align="center"
94
-              min-width="180"
95
-            >
96
-              <template slot-scope="scope">
97
-                {{ scope.row.item_name }} {{ scope.row.item_name_addition }}
98
-              </template>
99
-            </el-table-column>
100
-            <el-table-column
101
-              prop="name"
102
-              label="结果"
103
-              align="center"
104
-              min-width="80"
97
+              :row-style="{ color: '#303133' }"
98
+              :data="items"
99
+              border
100
+              style="width: 100%"
101
+              id="user-inspection-order"
102
+
105 103
             >
106
-              <template slot-scope="scope">
107
-                <span v-if="scope.row.value =='阳性'" style="color:red">{{ scope.row.value }}</span>
108
-                <span v-else>{{ scope.row.value }}</span>
109
-                <span v-if="scope.row.range_type == 1">
110
-                  {{scope.row.value_direction}}
104
+              <el-table-column
105
+                prop="item_name"
106
+                label="检验项目"
107
+                align="center"
108
+                min-width="180"
109
+              >
110
+                <template slot-scope="scope">
111
+                  {{ scope.row.item_name }} {{ scope.row.item_name_addition }}
112
+                </template>
113
+              </el-table-column>
114
+
115
+              <el-table-column
116
+                prop="name"
117
+                label="结果"
118
+                align="center"
119
+                min-width="80"
120
+              >
121
+                <template slot-scope="scope">
122
+                  <div v-if="items[0].value.indexOf('http') < 0">
123
+                    <span v-if="scope.row.value =='阳性'" style="color:red">{{ scope.row.value }}</span>
124
+                    <span v-else>{{ scope.row.value }}</span>
125
+                    <span v-if="scope.row.range_type == 1">
126
+                  {{ scope.row.value_direction }}
111 127
                 </span>
128
+                  </div>
129
+                  <div v-else>
130
+                    <img :src="scope.row.value">
131
+                  </div>
132
+                </template>
133
+              </el-table-column>
134
+
135
+              <el-table-column
136
+                prop="address"
137
+                label="参考值"
138
+                align="center"
139
+                min-width="120"
140
+              >
141
+                <template slot-scope="scope">
142
+                  <div   v-if="items[0].value.indexOf('http')  < 0">
143
+                     <span v-if="scope.row.range_type == 1"
144
+                     >{{ scope.row.range_min }}~{{ scope.row.range_max }}</span
145
+                     >
146
+                    <span v-else>{{ scope.row.range_value }}</span>
147
+                  </div>
148
+                </template>
149
+
150
+              </el-table-column>
151
+
152
+              <el-table-column
153
+                prop="111"
154
+                label="单位"
155
+                align="center"
156
+                min-width="80"
157
+              >
158
+                <template slot-scope="scope">
159
+                  <div  v-if="items[0].value.indexOf('http') < 0">
160
+                    <span>{{ scope.row.unit }}</span>
161
+                  </div>
162
+                </template>
163
+              </el-table-column>
164
+            </el-table>
165
+          </div>
166
+          <div v-else>
167
+            <el-row>
168
+              <template v-for="(item, index) in items">
169
+                <el-col :span="7" :key="index">
170
+                  <div style="width: 400px">
171
+                    <el-row>
172
+                      <img  :src="item.value" alt="">
173
+                    </el-row>
174
+                    <el-row>
175
+                      <div>{{item.item_name}}</div>
176
+                    </el-row>
177
+                  </div>
178
+                </el-col>
112 179
               </template>
113
-            </el-table-column>
114
-            <el-table-column
115
-              prop="address"
116
-              label="参考值"
117
-              align="center"
118
-              min-width="120"
119
-            >
120
-              <template slot-scope="scope">
121
-                <span v-if="scope.row.range_type == 1"
122
-                  >{{ scope.row.range_min }}~{{ scope.row.range_max }}</span
123
-                >
124
-                <span v-else>{{ scope.row.range_value }}</span>
125
-              </template>
126
-            </el-table-column>
127
-            <el-table-column
128
-              prop="unit"
129
-              label="单位"
130
-              align="center"
131
-              min-width="80"
132
-            >
133
-            </el-table-column>
134
-          </el-table>
180
+            </el-row>
181
+
182
+          </div>
183
+
135 184
           <el-pagination
136 185
             align="right"
137 186
             @current-change="handleCurrentChangePage"
@@ -238,26 +287,112 @@
238 287
           type="primary"
239 288
           v-if="form.method == 'add'"
240 289
           @click="submitNew('form')"
241
-          >保 存</el-button
290
+        >保 存
291
+        </el-button
242 292
         >
243 293
         <el-button type="primary" v-else @click="submitEdit('form')"
244
-          >保 存</el-button
294
+        >保 存
295
+        </el-button
245 296
         >
246 297
       </div>
247 298
     </el-dialog>
299
+
300
+    <el-dialog
301
+      :title="formTitle"
302
+      :visible.sync="dialogPicFormVisible"
303
+      width="1000px"
304
+      id="user-inspection-form"
305
+    >
306
+      <el-form :model="form" ref="form" label-position="top">
307
+        <el-row>
308
+          <el-col :span="7">
309
+            <el-form-item
310
+              label="检验日期"
311
+              prop="inspect_date"
312
+              :rules="[
313
+                { required: true, message: '请输入检验日期', trigger: 'blur' }
314
+              ]"
315
+            >
316
+              <el-date-picker
317
+                style="width:95%"
318
+                v-model="form.inspect_date"
319
+                type="datetime"
320
+                value-format="yyyy-MM-dd HH:mm"
321
+                format="yyyy-MM-dd HH:mm"
322
+                placeholder="选择日期"
323
+              >
324
+              </el-date-picker>
325
+            </el-form-item>
326
+          </el-col>
327
+        </el-row>
328
+        <el-row>
329
+          <template v-for="(item, index) in form.imgs">
330
+            <el-col :span="5" :key="index">
331
+              <div>
332
+                <el-row>
333
+                  <img width="100px" :src="item.img_url" alt="">
334
+                </el-row>
335
+                <el-row>
336
+                  <el-input v-model="item.desc" style="width: 100px"></el-input>
337
+                </el-row>
338
+                <el-row>
339
+                  <el-button
340
+                    type="danger"
341
+                    @click="deletePic(item,index)"
342
+                  >删除
343
+                  </el-button>
344
+                </el-row>
345
+              </div>
346
+            </el-col>
347
+            <el-col :span="1" :key="'form-col' + index">&nbsp;</el-col>
348
+          </template>
349
+        </el-row>
350
+      </el-form>
351
+      <div slot="footer" class="dialog-footer">
352
+        <el-upload
353
+          :data="uploadData"
354
+          :multiple="false"
355
+          action="https://upload.qiniup.com"
356
+          :show-file-list="false"
357
+          :on-error="handleAvatarError"
358
+          :on-success="handleAvatarSuccess"
359
+          :before-upload="beforeAvatarUpload">
360
+          <el-button type="primary">选择文件</el-button>
361
+        </el-upload>
362
+        <el-button @click="dialogPicFormVisible = false">取 消</el-button>
363
+        <el-button
364
+          type="primary"
365
+          v-if="this.form.pic_method== 'add'"
366
+          @click="submitPicNew()"
367
+        >保 存
368
+        </el-button>
369
+
370
+        <el-button
371
+          type="primary"
372
+          v-if="this.form.pic_method == 'edit'"
373
+          @click="submitEditPicNew()"
374
+        >修 改
375
+        </el-button>
376
+      </div>
377
+    </el-dialog>
248 378
   </div>
379
+
249 380
 </template>
250 381
 
251 382
 <script>
252 383
 import PatientSidebar from './components/PatientSidebar'
384
+import { getToken } from '@/api/qiniu'
385
+
253 386
 import {
254
-  fetchInspectionReference,
255 387
   CreatePatientInspection,
256
-  fetchPatientInspections,
388
+  CreatePatientPICInspection,
389
+  editPatientPICInspection,
390
+  DeletePatientInspection,
257 391
   EditPatientInspection,
258
-  DeletePatientInspection
392
+  fetchInspectionReference,
393
+  fetchPatientInspections
259 394
 } from '@/api/inspection'
260
-import { uParseTime, isPositiveNumber } from '@/utils/tools'
395
+import { getFileExtension, uParseTime } from '@/utils/tools'
261 396
 
262 397
 export default {
263 398
   name: 'Inspection',
@@ -265,6 +400,9 @@ export default {
265 400
   data() {
266 401
     return {
267 402
       total: 0,
403
+      qiniuDomain: 'https://images.shengws.com/',
404
+      isPic:false,
405
+      uploadData: { token: '', key: '' },
268 406
       pageLoading: true,
269 407
       itemLoading: false,
270 408
       formLoading: false,
@@ -276,15 +414,20 @@ export default {
276 414
       },
277 415
       itemName: '请选择项目',
278 416
       formTitle: '',
417
+      dialogPicFormVisible: false,
279 418
       dialogFormVisible: false,
280 419
       patient_info: null,
420
+
281 421
       form: {
282 422
         remind_cycle: '',
283 423
         method: 'add',
424
+        pic_method:'add',
284 425
         project_id: 0,
285 426
         inspect_date: '',
286 427
         old_inspect_date: '',
287
-        formItem: [{ id: 0, value: '' }]
428
+        formItem: [{ id: 0, value: '' }],
429
+        imgs: [],
430
+        delete_imgs:[],
288 431
       },
289 432
       formItem: [],
290 433
       items: [],
@@ -300,19 +443,90 @@ export default {
300 443
     }
301 444
   },
302 445
   methods: {
303
-    changeInput(item){
304
-      
305
-      if(item.item_name == '血清铁' || item.item_name == '总铁结合力'){
446
+    beforeAvatarUpload(file) {
447
+      // const isJPG = file.type === "image/jpeg";
448
+      var fileType = file.type
449
+      const isJPG = fileType.indexOf('image') > -1
450
+      const isLt2M = file.size / 1024 / 1024 < 5
451
+
452
+      if (!isJPG) {
453
+        this.$message.error('只能上传图片')
454
+        return false
455
+      }
456
+      if (!isLt2M) {
457
+        this.$message.error('上传头像图片大小不能超过 5MB!')
458
+        return false
459
+      }
460
+
461
+      var date = new Date()
462
+      var ext = getFileExtension(file.name)
463
+      var key =
464
+        date.getFullYear() +
465
+        '/' +
466
+        (date.getMonth() + 1) +
467
+        '/' +
468
+        date.getDate() +
469
+        '/' +
470
+        date.getHours() +
471
+        '/' +
472
+        date.getMinutes() +
473
+        '/' +
474
+        date.getSeconds() +
475
+        '/' +
476
+        '_s_' +
477
+        file.uid +
478
+        '.' +
479
+        ext
480
+      this.loading = this.$loading({
481
+        lock: true,
482
+        text: '上传中...',
483
+        spinner: 'el-icon-loading',
484
+        background: 'rgba(0, 0, 0, 0.7)'
485
+      })
486
+
487
+      const _self = this
488
+      return new Promise((resolve, reject) => {
489
+        getToken()
490
+          .then(response => {
491
+            const token = response.data.data.uptoken
492
+            _self._data.uploadData.token = token
493
+            _self._data.uploadData.key = key
494
+            resolve(true)
495
+          })
496
+          .catch(err => {
497
+            console.log(err)
498
+            reject(false)
499
+            this.loading.close()
500
+          })
501
+      })
502
+    },
503
+
504
+    handleAvatarError(err, file, fileList) {
505
+      this.$message.error(err)
506
+      this.loading.close()
507
+      return false
508
+    },
509
+    handleAvatarSuccess(res, file) {
510
+      this.form.imgs.push({
511
+        img_url: this.qiniuDomain + res.url + '?imageView2/2/w/500/h/500/q/90',
512
+        desc: '',
513
+        id: 0
514
+      })
515
+      this.loading.close()
516
+    },
517
+    changeInput(item) {
518
+
519
+      if (item.item_name == '血清铁' || item.item_name == '总铁结合力') {
306 520
         let index1 = ''
307 521
         let index2 = ''
308
-        this.form.formItem.map((it,index) => {
309
-          if(this.form.formItem[index].item_name == '血清铁'){
522
+        this.form.formItem.map((it, index) => {
523
+          if (this.form.formItem[index].item_name == '血清铁') {
310 524
             index1 = index
311 525
           }
312
-          if(this.form.formItem[index].item_name == '总铁结合力'){
526
+          if (this.form.formItem[index].item_name == '总铁结合力') {
313 527
             index2 = index
314 528
           }
315
-          if(it.item_name == '转铁蛋白饱和度(计算)'){
529
+          if (it.item_name == '转铁蛋白饱和度(计算)') {
316 530
             it.value = (parseFloat(this.form.formItem[index1].value) / parseFloat(this.form.formItem[index2].value)) * 100
317 531
           }
318 532
         })
@@ -363,39 +577,101 @@ export default {
363 577
             }
364 578
           })
365 579
         })
366
-        .catch(() => {})
580
+        .catch(() => {
581
+        })
367 582
     },
368 583
     openEdit() {
584
+
585
+      if (this.project == null) {
586
+        this.$message.error('请先选择项目')
587
+        return false
588
+      }
589
+      if(this.isPic){
590
+        this.form.pic_method = 'edit'
591
+        this.formTitle = '修改' + this.project.project_name
592
+        this.form.project_id = this.project.project_id
593
+        this.form.inspect_date = this.itemDate
594
+        this.form.old_inspect_date = this.itemDate
595
+        this.form.imgs = []
596
+        this.form.delete_imgs = []
597
+        for(var index in this.inspections){
598
+          this.form.imgs.push({
599
+            id: this.inspections[index].id,
600
+            img_url: this.inspections[index].inspect_value,
601
+            desc: this.inspections[index].item_name
602
+          })
603
+        }
604
+        console.log(this.form.imgs)
605
+        this.dialogPicFormVisible = true
606
+      }else{
607
+        console.log("22222")
608
+        this.form.method = 'edit'
609
+        this.formTitle = '修改' + this.project.project_name
610
+        this.form.project_id = this.project.project_id
611
+        this.form.inspect_date = this.itemDate
612
+        this.form.old_inspect_date = this.itemDate
613
+        this.form.remind_cycle = this.patient_info.remind_cycle
614
+        console.log(this.form.remind_cycle)
615
+
616
+        this.form.formItem = []
617
+        for (var index in this.project.inspection_reference) {
618
+          this.form.formItem.push({
619
+            id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
620
+            project_id: this.project.inspection_reference[index].project_id,
621
+            project_name: this.project.inspection_reference[index].project_name,
622
+            item_id: this.project.inspection_reference[index].id,
623
+            item: this.project.inspection_reference[index].item,
624
+            item_name: this.project.inspection_reference[index].item_name,
625
+            range_type: this.project.inspection_reference[index].range_type,
626
+            value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
627
+            select_options: this.project.inspection_reference[index].range_options.split(','),
628
+            unit: this.project.inspection_reference[index].unit
629
+          })
630
+        }
631
+        console.log(this.form.formItem)
632
+        this.dialogFormVisible = true
633
+
634
+      }
635
+
636
+    }, openPic() {
369 637
       if (this.project == null) {
370 638
         this.$message.error('请先选择项目')
371 639
         return false
372 640
       }
373 641
 
374
-      this.form.method = 'edit'
375
-      this.formTitle = '修改' + this.project.project_name
642
+      this.form.pic_method = 'add'
643
+      this.formTitle = '新增' + this.project.project_name
376 644
       this.form.project_id = this.project.project_id
377
-      this.form.inspect_date = this.itemDate
378
-      this.form.old_inspect_date = this.itemDate
645
+      this.form.imgs=[]
646
+      this.form.delete_imgs=[]
379 647
       this.form.remind_cycle = this.patient_info.remind_cycle
380
-      console.log(this.form.remind_cycle)
381
-
648
+      var today = new Date()
649
+      this.form.inspect_date = uParseTime(today, '{y}-{m}-{d} {h}:{i}')
382 650
       this.form.formItem = []
383 651
       for (var index in this.project.inspection_reference) {
652
+        // var formItem = this.project.inspection_reference[index];
653
+        // formItem["value"] = '';
654
+        // if (formItem.range_type==2) {
655
+        //   formItem["select_options"] = formItem.range_options.split(",");
656
+        // }
384 657
         this.form.formItem.push({
385
-          id: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].id : 0,
658
+          id: 0,
386 659
           project_id: this.project.inspection_reference[index].project_id,
387 660
           project_name: this.project.inspection_reference[index].project_name,
388 661
           item_id: this.project.inspection_reference[index].id,
389 662
           item: this.project.inspection_reference[index].item,
390 663
           item_name: this.project.inspection_reference[index].item_name,
391 664
           range_type: this.project.inspection_reference[index].range_type,
392
-          value: this.project.inspection_reference[index].id in this.inspectionsMap ? this.inspectionsMap[this.project.inspection_reference[index].id].inspect_value : '',
393
-          select_options: this.project.inspection_reference[index].range_options.split(','),
665
+          value: '',
666
+          select_options: this.project.inspection_reference[
667
+            index
668
+            ].range_options.split(','),
394 669
           unit: this.project.inspection_reference[index].unit
395 670
         })
396 671
       }
397
-      console.log(this.form.formItem)
398
-      this.dialogFormVisible = true
672
+      console.log('form.formItem', this.form.formItem)
673
+      this.dialogPicFormVisible = true
674
+
399 675
     },
400 676
     openNew() {
401 677
       if (this.project == null) {
@@ -426,11 +702,11 @@ export default {
426 702
           value: '',
427 703
           select_options: this.project.inspection_reference[
428 704
             index
429
-          ].range_options.split(','),
705
+            ].range_options.split(','),
430 706
           unit: this.project.inspection_reference[index].unit
431 707
         })
432 708
       }
433
-      console.log('form.formItem',this.form.formItem)
709
+      console.log('form.formItem', this.form.formItem)
434 710
       this.dialogFormVisible = true
435 711
     },
436 712
     submitEdit(formName) {
@@ -454,7 +730,7 @@ export default {
454 730
                 duration: 2000
455 731
               })
456 732
               this.patient_info.remind_cycle =
457
-                  response.data.data.remind_cycle
733
+                response.data.data.remind_cycle
458 734
               this.itemDate = this.form.inspect_date
459 735
               this.items = []
460 736
               var inspections = response.data.data.inspections
@@ -467,12 +743,12 @@ export default {
467 743
               this.inspectionsMap = {}
468 744
               for (var index in inspections) {
469 745
                 inspectionsMap[inspections[index].item_id] =
470
-                    inspections[index]
746
+                  inspections[index]
471 747
                 this.inspectionsMap[inspections[index].item_id] =
472
-                    inspections[index]
748
+                  inspections[index]
473 749
               }
474 750
               var items = this.project.inspection_reference
475
-              console.log("itmes",items)
751
+              console.log('itmes', items)
476 752
               for (var index in items) {
477 753
                 if (items[index].id in inspectionsMap) {
478 754
                   var item = {}
@@ -612,6 +888,123 @@ export default {
612 888
           return false
613 889
         }
614 890
       })
891
+    }, submitEditPicNew() {
892
+      if (this.form.imgs.length == 0) {
893
+        this.$message.error('未上传图片')
894
+        return false
895
+      }
896
+      this.formLoading = true
897
+      editPatientPICInspection(
898
+        this.patientID,
899
+        this.form
900
+      )
901
+        .then(response => {
902
+          if (response.data.state === 1) {
903
+            this.$notify({
904
+              title: '成功',
905
+              message: '修改成功',
906
+              type: 'success',
907
+              duration: 2000
908
+            })
909
+            this.itemDate = this.form.inspect_date
910
+            this.items = []
911
+            this.dialogPicFormVisible = false
912
+            this.queryParams.patient = this.patientID
913
+            this.queryParams.project_id = this.project.project_id
914
+            this.queryParams.page = 1
915
+            this.total = 0
916
+            this.fetchPatientInspections(this.queryParams)
917
+          } else {
918
+            this.$message.error(response.data.msg)
919
+            return false
920
+          }
921
+        })
922
+        .catch(v => {
923
+          this.$message.error(v)
924
+          return false
925
+        })
926
+      this.formLoading = false
927
+
928
+    },deletePic(item,index){
929
+      if(item.id == 0){
930
+        this.form.imgs.splice(index,1)
931
+      }else{
932
+        for(let index in this.form.imgs){
933
+          if(item.id == this.form.imgs[index].id){
934
+            this.form.imgs.splice(index,1)
935
+            this.form.delete_imgs.push({
936
+              id:item.id,
937
+            })
938
+          }
939
+        }
940
+
941
+      }
942
+    },
943
+    submitPicNew() {
944
+      this.formLoading = true
945
+      if (this.form.imgs.length == 0) {
946
+        this.$message.error('未上传图片')
947
+        return false
948
+      }
949
+      CreatePatientPICInspection(
950
+        this.patientID,
951
+        this.form
952
+      )
953
+        .then(response => {
954
+          if (response.data.state === 1) {
955
+            this.$notify({
956
+              title: '成功',
957
+              message: '新增成功',
958
+              type: 'success',
959
+              duration: 2000
960
+            })
961
+            this.itemDate = this.form.inspect_date
962
+            this.items = []
963
+            for (var index in this.projects) {
964
+              if (this.projects[index].project_id == this.form.project_id) {
965
+                this.projects[index].count++
966
+                break
967
+              }
968
+            }
969
+            this.total += 1
970
+            // var inspections = response.data.data.inspections
971
+            // this.inspections = response.data.data.inspections
972
+            // if (inspections == null) {
973
+            //   this.inspections = []
974
+            //   return false
975
+            // }
976
+            // var inspectionsMap = {}
977
+            // this.inspectionsMap = {}
978
+            //
979
+            // var items = this.project.inspection_reference
980
+            // for (var index in items) {
981
+            //   if (items[index].id in inspectionsMap) {
982
+            //     var item = {}
983
+            //     for (var key in items[index]) {
984
+            //       item[key] = items[index][key]
985
+            //     }
986
+            //     item.value = inspectionsMap[items[index].id].inspect_value
987
+            //     item.value_direction = ''
988
+            //     this.items.push(item)
989
+            //   }
990
+            // }
991
+            this.dialogPicFormVisible = false
992
+            this.queryParams.patient = this.patientID
993
+            this.queryParams.project_id = this.project.project_id
994
+            this.queryParams.page = 1
995
+            this.total = 0
996
+            this.fetchPatientInspections(this.queryParams)
997
+          } else {
998
+            this.$message.error(response.data.msg)
999
+            return false
1000
+          }
1001
+        })
1002
+        .catch(v => {
1003
+          this.$message.error(v)
1004
+          return false
1005
+        })
1006
+      this.formLoading = false
1007
+
615 1008
     },
616 1009
     fetchInspectionReference() {
617 1010
       fetchInspectionReference(this.patientID)
@@ -628,7 +1021,8 @@ export default {
628 1021
             return false
629 1022
           }
630 1023
         })
631
-        .catch(v => {})
1024
+        .catch(v => {
1025
+        })
632 1026
     },
633 1027
     setCurrent(row) {
634 1028
       this.$refs.singleTable.setCurrentRow(row)
@@ -664,6 +1058,7 @@ export default {
664 1058
     },
665 1059
     fetchPatientInspections(params) {
666 1060
       this.items = []
1061
+      this.isPic = false
667 1062
       fetchPatientInspections(params)
668 1063
         .then(response => {
669 1064
           if (response.data.state == 1) {
@@ -681,40 +1076,52 @@ export default {
681 1076
               inspectionsMap[inspections[index].item_id] = inspections[index]
682 1077
               this.inspectionsMap[inspections[index].item_id] = inspections[index]
683 1078
             }
1079
+
684 1080
             var items = this.project.inspection_reference
685 1081
             for (var index in items) {
686
-              if (items[index].id in inspectionsMap || items[index].item_id in inspectionsMap) {
687
-                var item = {}
688
-                for (var key in items[index]) {
689
-                  item[key] = items[index][key]
690
-                }
691
-                if (item.item_id > 0) {
692
-                  if (inspectionsMap[items[index].item_id] == undefined) {
693
-                    item.value = inspectionsMap[items[index].id].inspect_value
694
-                  } else {
695
-                    item.value = inspectionsMap[items[index].item_id].inspect_value
696
-                  }
697
-                } else {
1082
+              var item = {}
1083
+              for (var key in items[index]) {
1084
+                item[key] = items[index][key]
1085
+              }
1086
+              if (item.item_id > 0) {
1087
+                if (inspectionsMap[items[index].item_id] == undefined) {
698 1088
                   item.value = inspectionsMap[items[index].id].inspect_value
1089
+                  item.item_name = inspectionsMap[items[index].id].item_name
1090
+
1091
+                } else {
1092
+                  item.value = inspectionsMap[items[index].item_id].inspect_value
1093
+                  item.item_name = inspectionsMap[items[index].item_id].item_name
1094
+
699 1095
                 }
700
-                item.value_direction = ''
701
-                if (item.range_type == 1) {
702
-                  var value = parseFloat(item.value)
703
-                  var range_min = parseFloat(item.range_min)
704
-                  var range_max = parseFloat(item.range_max)
705
-                  if (value < range_min) {
706
-                    item.value_direction = '↓'
707
-                  } else if (value > range_max) {
708
-                    item.value_direction = '↑'
709
-                  }
1096
+              } else {
1097
+                item.value = inspectionsMap[items[index].id].inspect_value
1098
+                item.item_name = inspectionsMap[items[index].id].item_name
1099
+
1100
+              }
1101
+              // item["inspect_desc"] = inspectionsMap[items[index].id].inspect_desc
1102
+              // item["inspect_type"] = inspectionsMap[items[index].id].inspect_type
1103
+              item.value_direction = ''
1104
+              if (item.range_type == 1) {
1105
+                var value = parseFloat(item.value)
1106
+                var range_min = parseFloat(item.range_min)
1107
+                var range_max = parseFloat(item.range_max)
1108
+                if (value < range_min) {
1109
+                  item.value_direction = '↓'
1110
+                } else if (value > range_max) {
1111
+                  item.value_direction = '↑'
710 1112
                 }
711
-                this.items.push(item)
1113
+              }
1114
+              this.items.push(item)
1115
+
1116
+
1117
+              if(item.value.indexOf("http") >= 0){
1118
+                this.isPic = true
712 1119
               }
713 1120
             }
714
-            console.log(this.items)
715 1121
           }
716 1122
         })
717
-        .catch(v => {})
1123
+        .catch(v => {
1124
+        })
718 1125
       setTimeout(() => {
719 1126
         this.itemLoading = false
720 1127
       }, 1000)
@@ -747,18 +1154,22 @@ export default {
747 1154
   border-bottom: 0px !important;
748 1155
   border-right: 0px !important;
749 1156
 }
1157
+
750 1158
 #user-inspection-order th {
751 1159
   border-right: 0px !important;
752 1160
 }
1161
+
753 1162
 #user-inspection-form .el-form-item__content {
754 1163
   line-height: 0 !important;
755 1164
 }
1165
+
756 1166
 .el-table td,
757 1167
 .el-table th.is-leaf,
758 1168
 .el-table--border,
759 1169
 .el-table--group {
760 1170
   border-color: #d0d3da;
761 1171
 }
1172
+
762 1173
 .el-table--border::after,
763 1174
 .el-table--group::after,
764 1175
 .el-table::before {

File diff suppressed because it is too large
+ 1090 - 0
src/xt_pages/user/inspectionCheck.vue


File diff suppressed because it is too large
+ 1171 - 0
src/xt_pages/user/ktv.vue


+ 580 - 209
src/xt_pages/user/physiqueprinting.vue View File

@@ -1,229 +1,600 @@
1 1
 <template>
2
-    <div>
3
-        <div class="position">
4
-            <bread-crumb :crumbs='crumbs'></bread-crumb>
5
-            <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
6
-            </el-button>
7
-        </div>
8
-        <div class="app-container">
9
-            <div id="print_content">
10
-                <div class="print_page_main_content">
11
-                    
12
-                    <h1 style="text-align: center; padding-top:12px;">{{orgname}}血液净化治疗病历</h1> 
13
-                    <div style="border-bottom: 1px solid black;display: flex;padding-bottom: 10px;padding-top: 10px;">
14
-                        <div  style="flex:1;text-align: center;">
15
-                            姓名:
16
-                            <div  style="width: 120px;text-align: left;display:inline-block;">{{patient.name }}</div>
17
-                        </div>
18
-
19
-                        <div style="flex:1;text-align: center;" >
20
-                            病历号:
21
-                            <div  style="width: 120px;text-align: left;display:inline-block;">
22
-                                {{patient.disease_no?patient.disease_no:"/"}}
23
-                            </div>
24
-                        </div>
25
-
26
-                        <div style="flex:1;text-align: center;" >
27
-                           病区-床号:
28
-                            <div  style="width: 120px;text-align: left;display:inline-block;">
29
-                                {{patient.ward}}-{{patient.bed_no}}
30
-                            </div>
31
-                        </div>
32
-
33
-                        <div  style="flex:1;text-align: center;">
34
-                           接收日期:
35
-                            <div style="width: 100px;text-align: left;display:inline-block;">
36
-                                {{patient.date}}
37
-                            </div>
38
-                        </div>
39
-                    </div>
40
-
41
-                    <div style="display: flex; justify-self: start;margin-top: 5px ;">
42
-                        <div style="flex: 1;">性别:{{information.sex}}</div>
43
-                        <div style="flex: 1;">年龄:{{information.age}}</div>
44
-                        <div style="flex: 1;">出生日期:{{information.birthday}}</div>
45
-                    </div>
46
-                    <div style="display: flex; justify-self: start; margin-top: 5px ;">
47
-                        <div style="flex: 1;">身份证号:{{information.id_number}}</div>
48
-                        <div style="flex: 1;">病人来源:{{information.patient_source}}</div>
49
-                        <div style="flex: 1;">透析号:{{information.dialysis_num}}</div>
50
-                    </div>
51
-                    <div style="display: flex; justify-self: start; margin-top: 5px ;">
52
-                        <div style="flex: 1;">首次透析日期:{{information.first_date}}</div>
53
-                        <div style="flex: 1;">血型:{{information.blood_type}}</div>
54
-                        <div style="flex: 1;">报销方式:{{information.reimbursement}}</div>
55
-                    </div>
56
-                    <div style="display: flex; justify-self: start; margin-top: 5px ;">
57
-                        <div style="flex: 1;">工作单位:{{information.work_unit}}</div>
58
-                        <div style="flex: 1;">联系电话:{{information.contact_number}}</div>
59
-                        <div style="flex: 1;">家庭住址:{{information.home_address}}</div>
60
-                    </div>
61
-                    <div style="display: flex; justify-self: start; margin-top: 5px ;">
62
-                        <div style="flex: 1;">肾移植史:{{information.transplantation}}</div>
63
-                        <div style="flex: 1;">腹膜透析史:{{information.peritoneum}}</div>
64
-                        <div style="flex: 1;">过敏药物:{{information.allergy_drug}}</div>
65
-                    </div>
66
-
67
-                    <h3 style="text-align: center; margin: 20px 0px;">病史内容</h3>
68
-                    <div>
69
-                        <div>主诉:</div>
70
-                        <div>{{ medical_history.chief_complaint }}</div>
71
-                        <div>现病史:</div>
72
-                        <div>{{ medical_history.present_disease }}</div>
73
-                        <div>既往史:</div>
74
-                        <div>{{ medical_history.past }}</div>
75
-                        <div>个人史:</div>
76
-                        <div>{{ medical_history.personal }}</div>
77
-                        <div>婚育史:</div>
78
-                        <div>{{ medical_history.marriage }}</div>
79
-                        <div>家族史:</div>
80
-                        <div>{{ medical_history.family }}</div>
81
-                    </div>
82
-                    <h3 style="text-align: center; margin: 30px 0px 10px 0px;">体格检查</h3>
83
-                    <div>
84
-                        <div style="display: flex; justify-self: start;">
85
-                            <div style="flex:1;text-align: center;">T: {{physique.temperature}}℃</div>
86
-                            <div style="flex:1;text-align: center;">P:{{ physique.heartbeat }}次/分</div>
87
-                            <div style="flex:1;text-align: center;">R:{{ physique.R }}次/分</div>
88
-                            <div style="flex:1;text-align: center;">Bp:{{ physique.Bp }}mmHg</div>
89
-                        </div>
90
-                        <div style="margin-top: 5px;">
91
-                            无贫血容貌,自主体位,无浮肿,出血点/瘀斑/血肿:无,发育正常,营养良好,神志:清楚
92
-                            {{ physique.anemia }}
93
-                        </div>
94
-                        <div style="margin-top: 5px;">
95
-                            <span style="font-weight: bold;">皮肤黏膜</span>:
96
-                            {{ physique.cutaneous }}
97
-                        </div>
98
-                        <div style="margin-top: 5px;">
99
-                            <span style="font-weight: bold;">淋巴结</span>:
100
-                            {{ physique.lymph_node }}
101
-                        </div>
102
-                        <div style="margin-top: 5px;">
103
-                            <span style="font-weight: bold;">头部</span>:
104
-                            {{ physique.head }}
105
-                        </div>
106
-                        <div style="margin-top: 5px;">
107
-                            <span style="font-weight: bold;">颈部</span>:    
108
-                            {{ physique.neck }}
109
-                        </div>
110
-                        <div style="margin-top: 5px;">
111
-                            <span style="font-weight: bold;">肺脏</span>:
112
-                            {{ physique.lung }}
113
-                        </div>
114
-                        <div style="margin-top: 5px;">
115
-                            <span style="font-weight: bold;">心脏</span>:
116
-                            {{ physique.heart }}
117
-                        </div>
118
-                        <div style="margin-top: 5px;">
119
-                            <span style="font-weight: bold;">腹部</span>:
120
-                            {{ physique.abdomen }}
121
-                        </div>
122
-                        <div style="margin-top: 5px;">
123
-                            <span style="font-weight: bold;">其他</span>:
124
-                             {{ physique.other }}
125
-                        </div>
126
-                    </div>
127
-
128
-                    <div style="margin-top: 30px;">
129
-                        <span style="font-weight: bold; display: block;">初步诊断:</span>
130
-                        {{ diagnosis }}                       
131
-                    </div>
132
-                </div>
133
-                
134
-                
2
+  <div>
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
6
+      </el-button>
7
+    </div>
8
+    <div class="app-container">
9
+      <div id="print_content" v-for="item in this.list">
10
+        <div class="print_page_main_content">
11
+          <h1 style="text-align: center; padding-top:12px;">{{ orgname }}血液净化治疗病历</h1>
12
+          <div style="border-bottom: 1px solid black;display: flex;padding-bottom: 10px;padding-top: 10px;">
13
+            <div style="flex:1;text-align: center;">
14
+              姓名:
15
+              <div style="width: 120px;text-align: left;display:inline-block;">{{ patient.name }}</div>
16
+            </div>
17
+
18
+            <div style="flex:1;text-align: center;">
19
+              病历号:
20
+              <div style="width: 120px;text-align: left;display:inline-block;">
21
+                {{ patient.dialysis_no ? patient.dialysis_no : '/' }}
22
+              </div>
23
+            </div>
24
+
25
+            <div style="flex:1;text-align: center;">
26
+              病区-床号:
27
+              <div style="width: 120px;text-align: left;display:inline-block;">
28
+
29
+              </div>
30
+            </div>
31
+
32
+            <div style="flex:1;text-align: center;">
33
+              接收日期:
34
+              <div style="width: 100px;text-align: left;display:inline-block;">
35
+                {{ getTime(patient.created_time, '{y}-{m}-{d}') }}
36
+              </div>
37
+            </div>
38
+          </div>
39
+
40
+          <div style="display: flex; justify-self: start;margin-top: 5px ;">
41
+            <div style="flex: 1;">性别:{{ getPatientGender(patient.gender) }}</div>
42
+            <div style="flex: 1;">年龄:{{ patient.age }}</div>
43
+            <div style="flex: 1;">出生日期:{{ getTime(patient.birthday, '{y}-{m}-{d}') }}</div>
44
+          </div>
45
+          <div style="display: flex; justify-self: start; margin-top: 5px ;">
46
+            <div style="flex: 1;">身份证号:{{ patient.id_card_no }}</div>
47
+            <div style="flex: 1;">病人来源:{{ patient.source == 1 ? '门诊' : '住院' }}</div>
48
+            <div style="flex: 1;">透析号:{{ patient.dialysis_no }}</div>
49
+          </div>
50
+          <div style="display: flex; justify-self: start; margin-top: 5px ;">
51
+            <div style="flex: 1;">
52
+              首次透析日期:{{ patient.first_dialysis_date ? getTime(patient.first_dialysis_date, '{y}-{m}-{d}') : '' }}
53
+            </div>
54
+            <div style="flex: 1;">血型:{{ getBloodType(patient.blood_type) }}</div>
55
+            <div style="flex: 1;">报销方式:{{ getWayOptions(patient.reimbursement_way_id) }}</div>
56
+          </div>
57
+          <div style="display: flex; justify-self: start; margin-top: 5px ;">
58
+            <div style="flex: 1;">工作单位:{{ patient.work_unit }}</div>
59
+            <div style="flex: 1;">联系电话:{{ patient.phone }}</div>
60
+            <div style="flex: 1;">家庭住址:{{ patient.home_address }}</div>
61
+          </div>
62
+          <div style="display: flex; justify-self: start; margin-top: 5px ;">
63
+            <div style="flex: 1;">肾移植史:{{ item.is_shenyizhi_history == 0?'无':'有' }}</div>
64
+            <div style="flex: 1;">腹膜透析史:{{ item.is_fumo_dialysis_history == 0? '无':'有' }}</div>
65
+            <div style="flex: 1;" v-if="item.is_hypersusceptibility == 0">过敏药物:无</div>
66
+            <div style="flex: 1;" v-if="item.is_hypersusceptibility == 2">过敏药物:有</div>
67
+            <div style="flex: 1;" v-if="item.is_hypersusceptibility == 3">过敏药物:不想</div>
68
+
69
+          </div>
70
+          <h3 style="text-align: center; margin: 20px 0px;">病史内容</h3>
71
+          <div>
72
+            <div v-html="item.content"></div>
73
+          </div>
74
+          <h3 v-if="item.XtPatientPhysiqueCheck.id > 0" style="text-align: center; margin: 30px 0px 10px 0px;">体格检查</h3>
75
+          <div v-if="item.XtPatientPhysiqueCheck.id > 0">
76
+            <div style="display: flex; justify-self: start;">
77
+              <div style="flex:1;text-align: center;">T: {{ item.XtPatientPhysiqueCheck.t?item.XtPatientPhysiqueCheck.t:'' }}℃</div>
78
+              <div style="flex:1;text-align: center;">P:{{ item.XtPatientPhysiqueCheck.p?item.XtPatientPhysiqueCheck.p:''  }}次/分</div>
79
+              <div style="flex:1;text-align: center;">R:{{item.XtPatientPhysiqueCheck.r?item.XtPatientPhysiqueCheck.r:''  }}次/分</div>
80
+              <div style="flex:1;text-align: center;">Bp:{{ item.XtPatientPhysiqueCheck.bp_left + '/' +  item.XtPatientPhysiqueCheck.bp_right }}mmHg</div>
81
+            </div>
82
+            <div style="margin-top: 5px;">
83
+              无贫血容貌:{{item.XtPatientPhysiqueCheck.pinxuerongmao == 1?'无':'有'}},自主体位:{{getTiwei(item.XtPatientPhysiqueCheck.tiwei)}},浮肿:{{getFuzhong(item.XtPatientPhysiqueCheck.fuzhong)}},出血点/瘀斑/血肿:{{getChuXuedian(item.XtPatientPhysiqueCheck.chuxuedian)}},发育:{{getFaYu(item.XtPatientPhysiqueCheck.fayu)}},营养:{{getYinYang(item.XtPatientPhysiqueCheck.yinyang)}},神志:{{getShenzhi(item.XtPatientPhysiqueCheck.shenzhi)}}
84
+
85
+            </div>
86
+            <div style="margin-top: 5px;">
87
+              <span style="font-weight: bold;">皮肤黏膜</span>:
88
+              {{ '皮肤黏膜'+getPifuNianmo(item.XtPatientPhysiqueCheck.pifunianmo)+","+getPiXiaChuXue(item.XtPatientPhysiqueCheck.pixiachuxue)+","+'皮肤温度:'+getPiFuWenDu(item.XtPatientPhysiqueCheck.pifuwendu) }}
89
+            </div>
90
+            <div style="margin-top: 5px;">
91
+              <span style="font-weight: bold;">淋巴结</span>:
92
+              {{ '浅表淋巴肿大:'+ getLinBaZongDa(item.XtPatientPhysiqueCheck.linbazhongda)}}
135 93
             </div>
94
+            <div style="margin-top: 5px;">
95
+              <span style="font-weight: bold;">头部</span>:
96
+              {{ '眼睑'+getYanJian(item.XtPatientPhysiqueCheck.yanjian)+',瞳孔(等大等圆):'+ getTongKong(item.XtPatientPhysiqueCheck.tongkong)+","+"左(mm):"+item.XtPatientPhysiqueCheck.zuo+",右(mm):"+item.XtPatientPhysiqueCheck.you+",对光反射:"+item.XtPatientPhysiqueCheck.duiguangfanshe+","+"扁桃体:"+item.XtPatientPhysiqueCheck.biantaoti+","+"咽部:"+item.XtPatientPhysiqueCheck.yanbu}}
97
+            </div>
98
+            <div style="margin-top: 5px;">
99
+              <span style="font-weight: bold;">颈部</span>:
100
+              {{ "颈静脉:"+item.XtPatientPhysiqueCheck.ganjingjingmai }}
101
+            </div>
102
+            <div style="margin-top: 5px;">
103
+              <span style="font-weight: bold;">肺脏</span>:
104
+              {{ "呼吸音"+item.XtPatientPhysiqueCheck.huxiyin+","+getXiongmomocayin(item.XtPatientPhysiqueCheck.xiongmomocayin)+"胸膜摩擦音"+","+getLuoYin(item.XtPatientPhysiqueCheck.luoyin)+"啰音"}}
105
+            </div>
106
+            <div style="margin-top: 5px;">
107
+              <span style="font-weight: bold;">心脏</span>:
108
+              {{ "心脏大小"+getXinzangdaxiao(item.XtPatientPhysiqueCheck.xinzangdaxiao)+",心率"+getXinlv(item.XtPatientPhysiqueCheck.xinlv)+","+getXinbaomocasheng(item.XtPatientPhysiqueCheck.xinbaomocasheng)+"心包摩擦声,"+getZaYin(item.XtPatientPhysiqueCheck.zayin)+"杂音,"+getFujiaYin(item.XtPatientPhysiqueCheck.fujiayin)+"附加音"}}
109
+
110
+            </div>
111
+            <div style="margin-top: 5px;">
112
+              <span style="font-weight: bold;">腹部</span>:
113
+              {{"腹水征:"+getFushuizheng(item.XtPatientPhysiqueCheck.fushuizheng)+",肝脏:"+getGanZangYaTong(item.XtPatientPhysiqueCheck.gangzhang_yatong)+"压痛,"+getGanZangkouTong(item.XtPatientPhysiqueCheck.gangzhang_koutong)+"叩痛"+",脾脏:"+getPiZangYaTong(item.XtPatientPhysiqueCheck.pizhang_yatong)+"压痛,"+getPiZangkouTong(item.XtPatientPhysiqueCheck.pizhang_koutong)+"叩痛,"+"肾脏:"+getshenZangyatong(item.XtPatientPhysiqueCheck.gangzhang_yatong)+"压痛,"+getshenZangkoutong(item.XtPatientPhysiqueCheck.gangzhang_koutong)+"叩痛"}}
114
+            </div>
115
+            <div style="margin-top: 5px;">
116
+              <span style="font-weight: bold;">其他</span>:
117
+              {{ item.XtPatientPhysiqueCheck.oth_desc }}
118
+            </div>
119
+          </div>
120
+
121
+          <div style="margin-top: 30px;">
122
+            <span style="font-weight: bold; display: block;">初步诊断:</span>
123
+            {{ patient.diagnose }}
124
+          </div>
125
+
126
+          <div style="margin-top: 30px">
127
+            <span style="font-weight: bold;float: right">病历书写者:</span>
128
+            {{getDoctorName(item.doctor_id)}}
129
+          </div>
130
+          <div style="margin-top: 30px;">
131
+            <span style="font-weight: bold;float: right">日期:</span>
132
+            {{getTime(item.record_time,'{y}-{m}-{d}')}}
133
+          </div>
134
+<!--          <div style="margin-top: 30px;float: right">-->
135
+<!--            <span style="font-weight: bold; display: block;">日期:</span>-->
136
+<!--            {{getTime(item.record_time,'{y}-{m}-{d}')}}}-->
137
+<!--          </div>-->
136 138
         </div>
139
+
140
+
141
+      </div>
137 142
     </div>
143
+  </div>
138 144
 </template>
139 145
 
140 146
 <script>
141 147
 import BreadCrumb from '@/xt_pages/components/bread-crumb'
148
+import {  getSickhistoryCheckRecordsPrint } from '../../api/patient'
149
+import { uParseTime } from '@/utils/tools'
150
+import { fetchAllDoctorAndNurse } from "@/api/doctor";
142 151
 import print from "print-js";
152
+
143 153
 export default {
144
-    name:'physiquePrinting',
145
-    data() {
146
-        return {
147
-          crumbs: [
148
-            { path: false, name: '病人管理' },
149
-            { path: false, name: '病程打印' }
150
-          ],  
151
-          loading: false,
152
-          orgname:'',
153
-          patient:{
154
-            name:'',
155
-            disease_no:'',
156
-            ward:'',
157
-            bed_no:'',
158
-            date:'',
159
-          },
160
-          information:{
161
-            sex:'',
162
-            age:'',
163
-            birthday:'',
164
-            id_number:'',
165
-            patient_source:'',
166
-            dialysis_num:'',
167
-            first_date:'',
168
-            blood_type:'',
169
-            reimbursement:'',
170
-            work_unit:'',
171
-            contact_number:'',
172
-            home_address:'',
173
-            transplantation:'',
174
-            peritoneum:'',
175
-            allergy_drug:'',
176
-          },
177
-          medical_history:{
178
-            chief_complaint:'',
179
-            present_disease:'',
180
-            past:'',
181
-            personal:'',
182
-            marriage:'',
183
-            family:'',
184
-          },
185
-          physique:{
186
-            temperature:'',
187
-            heartbeat:'',
188
-            R:'',
189
-            Bp:'',
190
-            anemia:'',
191
-            cutaneous:'',
192
-            lymph_node:'',
193
-            head:'',
194
-            neck:'',
195
-            lung:'',
196
-            heart:'',
197
-            abdomen:'',
198
-            other:''
199
-          },
200
-          diagnosis:'',
154
+  name: 'physiquePrinting',
155
+  data() {
156
+    return {
157
+      list: [],
158
+      crumbs: [
159
+        { path: false, name: '病人管理' },
160
+        { path: false, name: '病程打印' }
161
+      ],
162
+      loading: false,
163
+      orgname: '',
164
+      patient: {},
165
+      information: {
166
+        sex: '',
167
+        age: '',
168
+        birthday: '',
169
+        id_number: '',
170
+        patient_source: '',
171
+        dialysis_num: '',
172
+        first_date: '',
173
+        blood_type: '',
174
+        reimbursement: '',
175
+        work_unit: '',
176
+        contact_number: '',
177
+        home_address: '',
178
+        transplantation: '',
179
+        peritoneum: '',
180
+        allergy_drug: ''
181
+      },
182
+      medical_history: {
183
+        chief_complaint: '',
184
+        present_disease: '',
185
+        past: '',
186
+        personal: '',
187
+        marriage: '',
188
+        family: ''
189
+      },
190
+      physique: {
191
+        temperature: '',
192
+        heartbeat: '',
193
+        R: '',
194
+        Bp: '',
195
+        anemia: '',
196
+        cutaneous: '',
197
+        lymph_node: '',
198
+        head: '',
199
+        neck: '',
200
+        lung: '',
201
+        heart: '',
202
+        abdomen: '',
203
+        other: ''
204
+      },
205
+      diagnosis: ''
206
+    }
207
+  },
208
+  components: {
209
+    BreadCrumb
210
+  },
211
+  methods: {
212
+    fetchAllDoctorAndNurse() {
213
+      fetchAllDoctorAndNurse().then(response => {
214
+        if (response.data.state == 1) {
215
+          this.doctorOptions = response.data.data.doctors;
216
+        }
217
+      });
218
+    },
219
+    getDoctorName: function(doctor_id) {
220
+      for (let index = 0; index < this.doctorOptions.length; index++) {
221
+        const doctor = this.doctorOptions[index]
222
+        if (doctor.id == doctor_id) {
223
+          return doctor.name
224
+        }
225
+      }
226
+      return ''
227
+    },
228
+    getTiwei(tiwei){
229
+     switch (tiwei){
230
+       case 1:
231
+         return '自主'
232
+         break
233
+       case 2:
234
+         return '被动'
235
+         break
236
+       case 3:
237
+         return '强迫'
238
+         break
239
+     }
240
+    },getFuzhong(fuzhong){
241
+      switch (fuzhong){
242
+        case 1:
243
+          return '无'
244
+          break
245
+        case 2:
246
+          return '轻度'
247
+          break
248
+        case 3:
249
+          return '中度'
250
+          break
251
+        case 4:
252
+          return '重度'
253
+          break
254
+      }
255
+    },getChuXuedian(chuxuedian){
256
+      switch (chuxuedian){
257
+        case 1:
258
+          return '无'
259
+          break
260
+        case 2:
261
+          return '不知道'
262
+          break
263
+        case 3:
264
+          return '有'
265
+          break
266
+
267
+      }
268
+    },getFaYu(fayu){
269
+      switch (fayu){
270
+        case 1:
271
+          return '正常'
272
+          break
273
+        case 2:
274
+          return '不良'
275
+          break
276
+      }
277
+    },getYinYang(yinyang){
278
+      switch (yinyang){
279
+        case 1:
280
+          return '良好'
281
+          break
282
+        case 2:
283
+          return '中等'
284
+          break
285
+        case 3:
286
+          return '不良'
287
+          break
288
+        case 4:
289
+          return '恶病质'
290
+          break
291
+      }
292
+    },getShenzhi(shenzhi){
293
+      switch (shenzhi){
294
+        case 1:
295
+          return '清楚'
296
+          break
297
+        case 2:
298
+          return '模糊'
299
+          break
300
+        case 3:
301
+          return '昏迷'
302
+          break
303
+        case 4:
304
+          return '其他'
305
+          break
306
+      }
307
+    },getPifuNianmo(pifunianmo){
308
+      switch (pifunianmo){
309
+        case 1:
310
+          return '正常'
311
+          break
312
+        case 2:
313
+          return '灰暗'
314
+          break
315
+        case 3:
316
+          return '苍白'
317
+          break
318
+        case 4:
319
+          return '黄染'
320
+          break
321
+        case 5:
322
+          return '色素沉着'
323
+          break
324
+      }
325
+    },getPiXiaChuXue(pixiachuxue){
326
+      switch (pixiachuxue){
327
+        case 1:
328
+          return '无'
329
+          break
330
+        case 2:
331
+          return '有'
332
+          break
333
+
334
+      }
335
+
336
+    },getPiFuWenDu(pifuwendu){
337
+      switch (pifuwendu){
338
+        case 1:
339
+          return '正常'
340
+          break
341
+        case 2:
342
+          return '冷'
343
+          break
344
+        case 3:
345
+          return '干'
346
+          break
347
+        case 4:
348
+          return '湿'
349
+          break
350
+
351
+      }
352
+
353
+    },getLinBaZongDa(linbazhongda){
354
+      switch (linbazhongda){
355
+        case 1:
356
+          return '无'
357
+          break
358
+        case 2:
359
+          return '有'
360
+          break
361
+      }
362
+    },getYanJian(yanjian){
363
+      switch (yanjian){
364
+        case 1:
365
+          return '正常'
366
+          break
367
+        case 2:
368
+          return '水肿'
369
+          break
370
+
371
+      }
372
+
373
+    },getTongKong(tongkong){
374
+      switch (tongkong){
375
+        case 1:
376
+          return '是'
377
+          break
378
+        case 2:
379
+          return '否'
380
+          break
381
+
382
+      }
383
+
384
+    },getXiongmomocayin(xiongmomocayin){
385
+
386
+      switch (xiongmomocayin){
387
+        case 1:
388
+          return '无'
389
+          break
390
+        case 2:
391
+          return '有'
392
+          break
393
+
394
+      }
395
+    },getLuoYin(luoyin){
396
+      switch (luoyin){
397
+        case 1:
398
+          return '无'
399
+          break
400
+        case 2:
401
+          return '有'
402
+          break
403
+
404
+      }
405
+
406
+
407
+    },getXinzangdaxiao(xinzangdaxiao){
408
+      switch (xinzangdaxiao){
409
+        case 1:
410
+          return '正常'
411
+          break
412
+        case 2:
413
+          return '偏大'
414
+          break
415
+        case 3:
416
+          return '偏小'
417
+          break
418
+      }
419
+
420
+    },getXinlv(xinlv){
421
+      switch (xinlv){
422
+        case 1:
423
+          return '齐'
424
+          break
425
+        case 2:
426
+          return '不齐'
427
+          break
428
+      }
429
+
430
+    },getXinbaomocasheng(xinbaomocasheng){
431
+      switch (xinbaomocasheng){
432
+        case 1:
433
+          return '无'
434
+          break
435
+        case 2:
436
+          return '有'
437
+          break
438
+      }
439
+
440
+    },getZaYin(zayin){
441
+      switch (zayin){
442
+        case 1:
443
+          return '无'
444
+          break
445
+        case 2:
446
+          return '有'
447
+          break
448
+      }
449
+
450
+    },getFujiaYin(fujiayin){
451
+      switch (fujiayin){
452
+        case 1:
453
+          return '无'
454
+          break
455
+        case 2:
456
+          return '有'
457
+          break
458
+      }
459
+
460
+    },getFushuizheng(fushuizheng){
461
+      switch (fushuizheng){
462
+        case 1:
463
+          return '阴性'
464
+          break
465
+        case 2:
466
+          return '阳性'
467
+          break
468
+      }
469
+
470
+    },getGanZangYaTong(yatong){
471
+      switch (yatong){
472
+        case 1:
473
+          return '无'
474
+          break
475
+        case 2:
476
+          return '有'
477
+          break
478
+      }
479
+
480
+    },getGanZangkouTong(koutong){
481
+      switch (koutong){
482
+        case 1:
483
+          return '无'
484
+          break
485
+        case 2:
486
+          return '有'
487
+          break
488
+      }
489
+
490
+    },getPiZangYaTong(yatong){
491
+      switch (yatong){
492
+        case 1:
493
+          return '无'
494
+          break
495
+        case 2:
496
+          return '有'
497
+          break
498
+      }
499
+
500
+    },getPiZangkouTong(koutong){
501
+      switch (koutong){
502
+        case 1:
503
+          return '无'
504
+          break
505
+        case 2:
506
+          return '有'
507
+          break
508
+      }
509
+
510
+    },getshenZangyatong(yatong){
511
+      switch (yatong){
512
+        case 1:
513
+          return '无'
514
+          break
515
+        case 2:
516
+          return '有'
517
+          break
518
+      }
519
+
520
+    },getshenZangkoutong(koutong){
521
+      switch (koutong){
522
+        case 1:
523
+          return '无'
524
+          break
525
+        case 2:
526
+          return '有'
527
+          break
528
+      }
529
+
530
+    },
531
+    getWayOptions(reimbursement_way_id) {
532
+      this.wayOptions = this.$store.getters.reimbursement_ways;
533
+      let wayLen = this.wayOptions.length
534
+      for (let index = 0; index < wayLen; index++) {
535
+        if (this.wayOptions[index].id === reimbursement_way_id) {
536
+          return  this.wayOptions[index].name
537
+        }
538
+      }
539
+    },
540
+    getBloodType(type) {
541
+      var types = this.$store.getters.blood_types
542
+      for (let i = 0; i < types.length; i++) {
543
+        if (types[i].id == type) {
544
+          return types[i].name
201 545
         }
546
+      }
547
+    },
548
+    getPatientGender(gender) {
549
+      if (gender == 1) {
550
+        return '男'
551
+      } else if (gender == 2) {
552
+        return '女'
553
+      }
554
+      return ''
202 555
     },
203
-    components: {
204
-      BreadCrumb
556
+    getTime(value, temp) {
557
+      if (value != undefined) {
558
+        return uParseTime(value, temp)
559
+      }
560
+      return ''
561
+    },
562
+    getPhysiquePrintList() {
563
+      let params = {
564
+        ids: this.$route.query.ids,
565
+        patient_id: this.$route.query.patient_id
566
+      }
567
+      getSickhistoryCheckRecordsPrint(params).then(response => {
568
+        if (response.data.state == 1) {
569
+          this.patient = response.data.data.patient
570
+          this.list = response.data.data.sickhistorys
571
+        }
572
+      })
205 573
     },
206
-    methods: {
207
-        printAction: function () {
208
-            const style = '@media print {.printP div{margin-bottom:5px;} .option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 20px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.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: 16px;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;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:1000px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}'
209
-            printJS({
210
-                printable: 'print_content',
211
-                type: 'html',
212
-                documentTitle: '  ',
213
-                style: style,
214
-                scanStyles: false
215
-            })
216
-        },
574
+    printAction: function() {
575
+      const style = '@media print {.printP div{margin-bottom:5px;} .option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 20px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.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: 16px;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;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:1000px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}'
576
+      printJS({
577
+        printable: 'print_content',
578
+        type: 'html',
579
+        documentTitle: '  ',
580
+        style: style,
581
+        scanStyles: false
582
+      })
217 583
     }
584
+  },
585
+  created() {
586
+    this.getPhysiquePrintList()
587
+    this.fetchAllDoctorAndNurse()
588
+  }
218 589
 }
219 590
 </script>
220 591
 <style scoped>
221 592
 .print_page_main_content {
222
-    background-color: white;
223
-    width: 960px;
224
-    margin: 0 auto 50px;
225
-    padding: 0 0 0 0;
226
-    page-break-after: always;
593
+  background-color: white;
594
+  width: 960px;
595
+  margin: 0 auto 50px;
596
+  padding: 0 0 0 0;
597
+  page-break-after: always;
227 598
 }
228 599
 
229
-</style>
600
+</style>

+ 561 - 0
src/xt_pages/user/physiqueprintingtwo.vue View File

@@ -0,0 +1,561 @@
1
+<template>
2
+  <div>
3
+    <div class="position">
4
+      <bread-crumb :crumbs='crumbs'></bread-crumb>
5
+      <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
6
+      </el-button>
7
+    </div>
8
+    <div class="app-container">
9
+      <div id="print_content" v-for="item in this.list">
10
+        <div class="print_page_main_content">
11
+          <h1 style="text-align: center; padding-top:12px;">{{ orgname }}血液净化体格检验单</h1>
12
+          <div style="border-bottom: 1px solid black;display: flex;padding-bottom: 10px;padding-top: 10px;">
13
+            <div style="flex:1;text-align: center;">
14
+              姓名:
15
+              <div style="width: 120px;text-align: left;display:inline-block;">{{ patient.name }}</div>
16
+            </div>
17
+
18
+            <div style="flex:1;text-align: center;">
19
+              病历号:
20
+              <div style="width: 120px;text-align: left;display:inline-block;">
21
+                {{ patient.dialysis_no ? patient.dialysis_no : '/' }}
22
+              </div>
23
+            </div>
24
+
25
+            <div style="flex:1;text-align: center;">
26
+              病区-床号:
27
+              <div style="width: 120px;text-align: left;display:inline-block;">
28
+
29
+              </div>
30
+            </div>
31
+
32
+            <div style="flex:1;text-align: center;">
33
+              接收日期:
34
+              <div style="width: 100px;text-align: left;display:inline-block;">
35
+                {{ getTime(patient.created_time, '{y}-{m}-{d}') }}
36
+              </div>
37
+            </div>
38
+          </div>
39
+
40
+
41
+          <div style="display: flex; justify-self: start; margin-top: 5px ;">
42
+            <div style="flex: 1;">
43
+              首次透析日期:{{ item.record_time ? getTime(item.record_time, '{y}-{m}-{d}') : '' }}
44
+            </div>
45
+          </div>
46
+          <div v-if="item.id > 0">
47
+            <div style="display: flex; justify-self: start;">
48
+              <div style="flex:1;text-align: center;">T: {{ item.t?item.t:'' }}℃</div>
49
+              <div style="flex:1;text-align: center;">P:{{ item.p?item.p:''  }}次/分</div>
50
+              <div style="flex:1;text-align: center;">R:{{item.r?item.r:''  }}次/分</div>
51
+              <div style="flex:1;text-align: center;">Bp:{{ item.bp_left + '/' +  item.bp_right }}mmHg</div>
52
+            </div>
53
+            <div style="margin-top: 5px;">
54
+              无贫血容貌:{{item.pinxuerongmao == 1?'无':'有'}},自主体位:{{getTiwei(item.tiwei)}},浮肿:{{getFuzhong(item.fuzhong)}},出血点/瘀斑/血肿:{{getChuXuedian(item.chuxuedian)}},发育:{{getFaYu(item.fayu)}},营养:{{getYinYang(item.yinyang)}},神志:{{getShenzhi(item.shenzhi)}}
55
+
56
+            </div>
57
+            <div style="margin-top: 5px;">
58
+              <span style="font-weight: bold;">皮肤黏膜</span>:
59
+              {{ '皮肤黏膜'+getPifuNianmo(item.pifunianmo)+","+getPiXiaChuXue(item.pixiachuxue)+","+'皮肤温度:'+getPiFuWenDu(item.pifuwendu) }}
60
+            </div>
61
+            <div style="margin-top: 5px;">
62
+              <span style="font-weight: bold;">淋巴结</span>:
63
+              {{ '浅表淋巴肿大:'+ getLinBaZongDa(item.linbazhongda)}}
64
+            </div>
65
+            <div style="margin-top: 5px;">
66
+              <span style="font-weight: bold;">头部</span>:
67
+              {{ '眼睑'+getYanJian(item.yanjian)+',瞳孔(等大等圆):'+ getTongKong(item.tongkong)+","+"左(mm):"+item.zuo+",右(mm):"+item.you+",对光反射:"+item.duiguangfanshe+","+"扁桃体:"+item.biantaoti+","+"咽部:"+item.yanbu}}
68
+            </div>
69
+            <div style="margin-top: 5px;">
70
+              <span style="font-weight: bold;">颈部</span>:
71
+              {{ "颈静脉:"+item.ganjingjingmai }}
72
+            </div>
73
+            <div style="margin-top: 5px;">
74
+              <span style="font-weight: bold;">肺脏</span>:
75
+              {{ "呼吸音"+item.huxiyin+","+getXiongmomocayin(item.xiongmomocayin)+"胸膜摩擦音"+","+getLuoYin(item.luoyin)+"啰音"}}
76
+            </div>
77
+            <div style="margin-top: 5px;">
78
+              <span style="font-weight: bold;">心脏</span>:
79
+              {{ "心脏大小"+getXinzangdaxiao(item.xinzangdaxiao)+",心率"+getXinlv(item.xinlv)+","+getXinbaomocasheng(item.xinbaomocasheng)+"心包摩擦声,"+getZaYin(item.zayin)+"杂音,"+getFujiaYin(item.fujiayin)+"附加音"}}
80
+
81
+            </div>
82
+            <div style="margin-top: 5px;">
83
+              <span style="font-weight: bold;">腹部</span>:
84
+              {{"腹水征:"+getFushuizheng(item.fushuizheng)+",肝脏:"+getGanZangYaTong(item.gangzhang_yatong)+"压痛,"+getGanZangkouTong(item.gangzhang_koutong)+"叩痛"+",脾脏:"+getPiZangYaTong(item.pizhang_yatong)+"压痛,"+getPiZangkouTong(item.pizhang_koutong)+"叩痛,"+"肾脏:"+getshenZangyatong(item.gangzhang_yatong)+"压痛,"+getshenZangkoutong(item.gangzhang_koutong)+"叩痛"}}
85
+            </div>
86
+            <div style="margin-top: 5px;">
87
+              <span style="font-weight: bold;">其他</span>:
88
+              {{ item.oth_desc }}
89
+            </div>
90
+          </div>
91
+
92
+
93
+
94
+          </div>
95
+          <!--          <div style="margin-top: 30px;float: right">-->
96
+          <!--            <span style="font-weight: bold; display: block;">日期:</span>-->
97
+          <!--            {{getTime(item.record_time,'{y}-{m}-{d}')}}}-->
98
+          <!--          </div>-->
99
+        </div>
100
+
101
+
102
+      </div>
103
+    </div>
104
+  </div>
105
+</template>
106
+
107
+<script>
108
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
109
+import {  getPhysiqueCheckRecordsPrint } from '../../api/patient'
110
+import { uParseTime } from '@/utils/tools'
111
+import { fetchAllDoctorAndNurse } from "@/api/doctor";
112
+import print from "print-js";
113
+
114
+export default {
115
+  name: 'physiquePrinting',
116
+  data() {
117
+    return {
118
+      list: [],
119
+      crumbs: [
120
+        { path: false, name: '病人管理' },
121
+        { path: false, name: '病程打印' }
122
+      ],
123
+      loading: false,
124
+      orgname: '',
125
+      patient: {},
126
+      information: {
127
+        sex: '',
128
+        age: '',
129
+        birthday: '',
130
+        id_number: '',
131
+        patient_source: '',
132
+        dialysis_num: '',
133
+        first_date: '',
134
+        blood_type: '',
135
+        reimbursement: '',
136
+        work_unit: '',
137
+        contact_number: '',
138
+        home_address: '',
139
+        transplantation: '',
140
+        peritoneum: '',
141
+        allergy_drug: ''
142
+      },
143
+      medical_history: {
144
+        chief_complaint: '',
145
+        present_disease: '',
146
+        past: '',
147
+        personal: '',
148
+        marriage: '',
149
+        family: ''
150
+      },
151
+      physique: {
152
+        temperature: '',
153
+        heartbeat: '',
154
+        R: '',
155
+        Bp: '',
156
+        anemia: '',
157
+        cutaneous: '',
158
+        lymph_node: '',
159
+        head: '',
160
+        neck: '',
161
+        lung: '',
162
+        heart: '',
163
+        abdomen: '',
164
+        other: ''
165
+      },
166
+      diagnosis: ''
167
+    }
168
+  },
169
+  components: {
170
+    BreadCrumb
171
+  },
172
+  methods: {
173
+    fetchAllDoctorAndNurse() {
174
+      fetchAllDoctorAndNurse().then(response => {
175
+        if (response.data.state == 1) {
176
+          this.doctorOptions = response.data.data.doctors;
177
+        }
178
+      });
179
+    },
180
+    getDoctorName: function(doctor_id) {
181
+      for (let index = 0; index < this.doctorOptions.length; index++) {
182
+        const doctor = this.doctorOptions[index]
183
+        if (doctor.id == doctor_id) {
184
+          return doctor.name
185
+        }
186
+      }
187
+      return ''
188
+    },
189
+    getTiwei(tiwei){
190
+      switch (tiwei){
191
+        case 1:
192
+          return '自主'
193
+          break
194
+        case 2:
195
+          return '被动'
196
+          break
197
+        case 3:
198
+          return '强迫'
199
+          break
200
+      }
201
+    },getFuzhong(fuzhong){
202
+      switch (fuzhong){
203
+        case 1:
204
+          return '无'
205
+          break
206
+        case 2:
207
+          return '轻度'
208
+          break
209
+        case 3:
210
+          return '中度'
211
+          break
212
+        case 4:
213
+          return '重度'
214
+          break
215
+      }
216
+    },getChuXuedian(chuxuedian){
217
+      switch (chuxuedian){
218
+        case 1:
219
+          return '无'
220
+          break
221
+        case 2:
222
+          return '不知道'
223
+          break
224
+        case 3:
225
+          return '有'
226
+          break
227
+
228
+      }
229
+    },getFaYu(fayu){
230
+      switch (fayu){
231
+        case 1:
232
+          return '正常'
233
+          break
234
+        case 2:
235
+          return '不良'
236
+          break
237
+      }
238
+    },getYinYang(yinyang){
239
+      switch (yinyang){
240
+        case 1:
241
+          return '良好'
242
+          break
243
+        case 2:
244
+          return '中等'
245
+          break
246
+        case 3:
247
+          return '不良'
248
+          break
249
+        case 4:
250
+          return '恶病质'
251
+          break
252
+      }
253
+    },getShenzhi(shenzhi){
254
+      switch (shenzhi){
255
+        case 1:
256
+          return '清楚'
257
+          break
258
+        case 2:
259
+          return '模糊'
260
+          break
261
+        case 3:
262
+          return '昏迷'
263
+          break
264
+        case 4:
265
+          return '其他'
266
+          break
267
+      }
268
+    },getPifuNianmo(pifunianmo){
269
+      switch (pifunianmo){
270
+        case 1:
271
+          return '正常'
272
+          break
273
+        case 2:
274
+          return '灰暗'
275
+          break
276
+        case 3:
277
+          return '苍白'
278
+          break
279
+        case 4:
280
+          return '黄染'
281
+          break
282
+        case 5:
283
+          return '色素沉着'
284
+          break
285
+      }
286
+    },getPiXiaChuXue(pixiachuxue){
287
+      switch (pixiachuxue){
288
+        case 1:
289
+          return '无'
290
+          break
291
+        case 2:
292
+          return '有'
293
+          break
294
+
295
+      }
296
+
297
+    },getPiFuWenDu(pifuwendu){
298
+      switch (pifuwendu){
299
+        case 1:
300
+          return '正常'
301
+          break
302
+        case 2:
303
+          return '冷'
304
+          break
305
+        case 3:
306
+          return '干'
307
+          break
308
+        case 4:
309
+          return '湿'
310
+          break
311
+
312
+      }
313
+
314
+    },getLinBaZongDa(linbazhongda){
315
+      switch (linbazhongda){
316
+        case 1:
317
+          return '无'
318
+          break
319
+        case 2:
320
+          return '有'
321
+          break
322
+      }
323
+    },getYanJian(yanjian){
324
+      switch (yanjian){
325
+        case 1:
326
+          return '正常'
327
+          break
328
+        case 2:
329
+          return '水肿'
330
+          break
331
+
332
+      }
333
+
334
+    },getTongKong(tongkong){
335
+      switch (tongkong){
336
+        case 1:
337
+          return '是'
338
+          break
339
+        case 2:
340
+          return '否'
341
+          break
342
+
343
+      }
344
+
345
+    },getXiongmomocayin(xiongmomocayin){
346
+
347
+      switch (xiongmomocayin){
348
+        case 1:
349
+          return '无'
350
+          break
351
+        case 2:
352
+          return '有'
353
+          break
354
+
355
+      }
356
+    },getLuoYin(luoyin){
357
+      switch (luoyin){
358
+        case 1:
359
+          return '无'
360
+          break
361
+        case 2:
362
+          return '有'
363
+          break
364
+
365
+      }
366
+
367
+
368
+    },getXinzangdaxiao(xinzangdaxiao){
369
+      switch (xinzangdaxiao){
370
+        case 1:
371
+          return '正常'
372
+          break
373
+        case 2:
374
+          return '偏大'
375
+          break
376
+        case 3:
377
+          return '偏小'
378
+          break
379
+      }
380
+
381
+    },getXinlv(xinlv){
382
+      switch (xinlv){
383
+        case 1:
384
+          return '齐'
385
+          break
386
+        case 2:
387
+          return '不齐'
388
+          break
389
+      }
390
+
391
+    },getXinbaomocasheng(xinbaomocasheng){
392
+      switch (xinbaomocasheng){
393
+        case 1:
394
+          return '无'
395
+          break
396
+        case 2:
397
+          return '有'
398
+          break
399
+      }
400
+
401
+    },getZaYin(zayin){
402
+      switch (zayin){
403
+        case 1:
404
+          return '无'
405
+          break
406
+        case 2:
407
+          return '有'
408
+          break
409
+      }
410
+
411
+    },getFujiaYin(fujiayin){
412
+      switch (fujiayin){
413
+        case 1:
414
+          return '无'
415
+          break
416
+        case 2:
417
+          return '有'
418
+          break
419
+      }
420
+
421
+    },getFushuizheng(fushuizheng){
422
+      switch (fushuizheng){
423
+        case 1:
424
+          return '阴性'
425
+          break
426
+        case 2:
427
+          return '阳性'
428
+          break
429
+      }
430
+
431
+    },getGanZangYaTong(yatong){
432
+      switch (yatong){
433
+        case 1:
434
+          return '无'
435
+          break
436
+        case 2:
437
+          return '有'
438
+          break
439
+      }
440
+
441
+    },getGanZangkouTong(koutong){
442
+      switch (koutong){
443
+        case 1:
444
+          return '无'
445
+          break
446
+        case 2:
447
+          return '有'
448
+          break
449
+      }
450
+
451
+    },getPiZangYaTong(yatong){
452
+      switch (yatong){
453
+        case 1:
454
+          return '无'
455
+          break
456
+        case 2:
457
+          return '有'
458
+          break
459
+      }
460
+
461
+    },getPiZangkouTong(koutong){
462
+      switch (koutong){
463
+        case 1:
464
+          return '无'
465
+          break
466
+        case 2:
467
+          return '有'
468
+          break
469
+      }
470
+
471
+    },getshenZangyatong(yatong){
472
+      switch (yatong){
473
+        case 1:
474
+          return '无'
475
+          break
476
+        case 2:
477
+          return '有'
478
+          break
479
+      }
480
+
481
+    },getshenZangkoutong(koutong){
482
+      switch (koutong){
483
+        case 1:
484
+          return '无'
485
+          break
486
+        case 2:
487
+          return '有'
488
+          break
489
+      }
490
+
491
+    },
492
+    getWayOptions(reimbursement_way_id) {
493
+      this.wayOptions = this.$store.getters.reimbursement_ways;
494
+      let wayLen = this.wayOptions.length
495
+      for (let index = 0; index < wayLen; index++) {
496
+        if (this.wayOptions[index].id === reimbursement_way_id) {
497
+          return  this.wayOptions[index].name
498
+        }
499
+      }
500
+    },
501
+    getBloodType(type) {
502
+      var types = this.$store.getters.blood_types
503
+      for (let i = 0; i < types.length; i++) {
504
+        if (types[i].id == type) {
505
+          return types[i].name
506
+        }
507
+      }
508
+    },
509
+    getPatientGender(gender) {
510
+      if (gender == 1) {
511
+        return '男'
512
+      } else if (gender == 2) {
513
+        return '女'
514
+      }
515
+      return ''
516
+    },
517
+    getTime(value, temp) {
518
+      if (value != undefined) {
519
+        return uParseTime(value, temp)
520
+      }
521
+      return ''
522
+    },
523
+    getPhysiquePrintList() {
524
+      let params = {
525
+        ids: this.$route.query.ids,
526
+        patient_id: this.$route.query.patient_id
527
+      }
528
+      getPhysiqueCheckRecordsPrint(params).then(response => {
529
+        if (response.data.state == 1) {
530
+          this.patient = response.data.data.patient
531
+          this.list = response.data.data.sickhistorys
532
+        }
533
+      })
534
+    },
535
+    printAction: function() {
536
+      const style = '@media print {.printP div{margin-bottom:5px;} .option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 20px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.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: 16px;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;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:1000px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}'
537
+      printJS({
538
+        printable: 'print_content',
539
+        type: 'html',
540
+        documentTitle: '  ',
541
+        style: style,
542
+        scanStyles: false
543
+      })
544
+    }
545
+  },
546
+  created() {
547
+    this.getPhysiquePrintList()
548
+    this.fetchAllDoctorAndNurse()
549
+  }
550
+}
551
+</script>
552
+<style scoped>
553
+.print_page_main_content {
554
+  background-color: white;
555
+  width: 960px;
556
+  margin: 0 auto 50px;
557
+  padding: 0 0 0 0;
558
+  page-break-after: always;
559
+}
560
+
561
+</style>

+ 641 - 0
src/xt_pages/user/sickHistory.vue View File

@@ -0,0 +1,641 @@
1
+<template>
2
+  <!-- <div class="main-contain">
3
+      <div class="position">
4
+         <bread-crumb></bread-crumb>
5
+      </div> -->
6
+  <div class="patient-container">
7
+    <patient-sidebar :id="patient_id" defaultActive="3-1"></patient-sidebar>
8
+    <!-- <div class="app-container"> -->
9
+    <div v-loading="loading">
10
+      <div class="patient-app-container advice-container app-container">
11
+
12
+        <div>
13
+                    <span style="margin-left: 10px;float:right;">
14
+                        <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
15
+                                   @click="showDialog">新增</el-button>
16
+
17
+                        <el-button type="primary" icon="el-icon-edit-outline" size="small"
18
+                                   @click="showEdit">修改</el-button>
19
+                      <el-button type="primary" icon="el-icon-printer" size="small"
20
+                                 @click="print">打印</el-button>
21
+                        <el-button size="small" v-show="selectingRows.length > 0" type="danger"
22
+                                   @click="deleteAction">删除</el-button>
23
+                    </span>
24
+          <!--<span class="filter_title">日期查询</span>-->
25
+          <!--<el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestCourseRecords()"></el-date-picker>-->
26
+        </div>
27
+        <div class="cell clearfix">
28
+          <label class="title"><span class="name">日期查询</span> : </label>
29
+          <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
30
+                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
31
+                          value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
32
+          <span class="">-</span>
33
+          <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
34
+                          type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
35
+                          value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
36
+        </div>
37
+        <div class="record">
38
+          <el-row :gutter="15">
39
+            <el-col :span="10">
40
+              <el-table
41
+
42
+                :header-cell-style="{
43
+                  backgroundColor: 'rgb(245, 247, 250)',
44
+                  color: '#606266'
45
+                }"
46
+                        :row-style="{ color: '#303133' }" ref="record_table" :data="records"
47
+                        border highlight-current-row @current-change="didChangeCurrentRecord"
48
+                        @selection-change="didSelectionChange"
49
+                        :row-class-name="tableRow"
50
+                        height="600px"
51
+                        @row-click="onRowClick"
52
+
53
+              >
54
+                <el-table-column type="selection" width="70"></el-table-column>
55
+                <el-table-column label="标题" align="center">
56
+                  <template slot-scope="scope">
57
+                    {{ scope.row.title}}
58
+                  </template>
59
+                </el-table-column>
60
+                <el-table-column label="记录日期" align="center">
61
+                  <template slot-scope="scope">
62
+                    {{ recordTime(scope.row.record_time) }}
63
+                  </template>
64
+                </el-table-column>
65
+                <el-table-column label="记录医生" align="center">
66
+                  <template slot-scope="scope">
67
+                    {{ doctorName(scope.row.doctor_id) }}
68
+                  </template>
69
+                </el-table-column>
70
+              </el-table>
71
+            </el-col>
72
+            <el-col :span="14">
73
+              <div class="record_content_panel">
74
+                <div style="background-color:rgb(245, 247, 250)" class="title">病史详情</div>
75
+                <div class="content">
76
+                  <span v-if="current_select_record" v-html="current_select_record.content">{{current_select_record.content }}</span>
77
+                  <span v-else></span>
78
+                </div>
79
+              </div>
80
+            </el-col>
81
+          </el-row>
82
+        </div>
83
+      </div>
84
+      <!-- </div> -->
85
+      <el-dialog title="新增病史记录" width="70%" top="5vh" :visible.sync="show_dialog">
86
+        <div>
87
+          <div class="new_record_form">
88
+            <div class="cell clearfix">
89
+              <label class="title"><span class="name">病程标题</span> : </label>
90
+              <el-input v-model="title" style="width: 150px"></el-input>
91
+
92
+              <label class="title"><span class="name">日期</span> : </label>
93
+              <el-date-picker v-model="sick_history_time" prefix-icon="el-icon-date" :editable="false"
94
+                              style="width: 150px;"
95
+                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
96
+                              value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
97
+
98
+
99
+              <label class="title"><span class="name">肾移植史</span> : </label>
100
+              <el-select style="width: 150px;" v-model="is_shenyizhishi" placeholder="选择肾移植史" >
101
+                <el-option label="无" value="0"></el-option>
102
+                <el-option label="有" value="1"></el-option>
103
+              </el-select>
104
+            </div>
105
+
106
+            <div class="cell clearfix">
107
+
108
+              <label class="title"><span class="name">腹膜透析史</span> : </label>
109
+              <el-select style="width: 150px;" v-model="is_fumotouxishi" placeholder="选择腹膜透析史" >
110
+                <el-option label="无" value="0"></el-option>
111
+                <el-option label="有" value="1"></el-option>
112
+              </el-select>
113
+
114
+              <label class="title"><span class="name">医生</span> : </label>
115
+              <el-select style="width: 100px;" v-model="doctor_id" placeholder="请选择医生">
116
+                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
117
+              </el-select>
118
+
119
+              <label class="title"><span class="name">过敏药物</span> : </label>
120
+              <el-select style="width: 100px;" v-model="is_guominyaowu" placeholder="选择过敏药物">
121
+                <el-option label="无" value="0"></el-option>
122
+                <el-option label="有" value="1"></el-option>
123
+                <el-option label="不详" value="2"></el-option>
124
+
125
+              </el-select>
126
+              <el-input v-if="is_guominyaowu == 1" v-model="guominyaowu_desc"></el-input>
127
+
128
+            </div>
129
+
130
+            <div class="cell clearfix">
131
+              <label class="title"><span class="name">病史模版</span> : </label>
132
+              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
133
+                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
134
+                           :value="option.content"></el-option>
135
+              </el-select>
136
+            </div>
137
+
138
+            <div class="textarea_panel">
139
+              <keep-alive>
140
+                <editor ref="editor"
141
+                        id="editors"
142
+                        style="width: 600px"
143
+                        v-bind:r_content="new_content"
144
+                >
145
+                </editor>
146
+              </keep-alive>
147
+            </div>
148
+
149
+            <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
150
+              <el-button @click="show_dialog = false">取消</el-button>
151
+              <el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" type="primary"
152
+                         @click="createAction" :loading="uploading_new_record">保存
153
+              </el-button>
154
+            </div>
155
+          </div>
156
+        </div>
157
+      </el-dialog>
158
+      <el-dialog title="修改病史记录" width="50%" top="5vh" :visible.sync="show_edit_dialog">
159
+        <div>
160
+          <div class="new_record_form">
161
+            <div class="cell clearfix">
162
+              <label class="title"><span class="name">病程标题</span> : </label>
163
+              <el-input v-model="edit_title" style="width: 150px"></el-input>
164
+
165
+              <label class="title"><span class="name">日期</span> : </label>
166
+              <el-date-picker v-model="edit_sick_history_time" prefix-icon="el-icon-date" :editable="false"
167
+                              style="width: 150px;"
168
+                              type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm:ss"
169
+                              value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
170
+
171
+
172
+              <label class="title"><span class="name">肾移植史</span> : </label>
173
+              <el-select style="width: 150px;" v-model="edit_is_shenyizhishi" placeholder="选择肾移植史" >
174
+                <el-option label="无" value="0"></el-option>
175
+                <el-option label="有" value="1"></el-option>
176
+              </el-select>
177
+            </div>
178
+
179
+            <div class="cell clearfix">
180
+
181
+              <label class="title"><span class="name">腹膜透析史</span> : </label>
182
+              <el-select style="width: 150px;" v-model="edit_is_fumotouxishi" placeholder="选择腹膜透析史" >
183
+                <el-option label="无" value="0"></el-option>
184
+                <el-option label="有" value="1"></el-option>
185
+              </el-select>
186
+
187
+              <label class="title"><span class="name">医生</span> : </label>
188
+              <el-select style="width: 100px;" v-model="edit_doctor_id" placeholder="请选择医生">
189
+                <el-option v-for="(item,index) in doctorOptions" :label="item.name" :value="item.id" :key="index"></el-option>
190
+              </el-select>
191
+
192
+              <label class="title"><span class="name">过敏药物</span> : </label>
193
+              <el-select style="width: 100px;" v-model="edit_is_guominyaowu" placeholder="选择过敏药物">
194
+                <el-option label="无" value="0"></el-option>
195
+                <el-option label="有" value="1"></el-option>
196
+              </el-select>
197
+              <el-input v-if="edit_is_guominyaowu == 1" v-model="edit_guominyaowu_desc"></el-input>
198
+
199
+            </div>
200
+
201
+            <div class="cell clearfix">
202
+              <label class="title"><span class="name">病史模版</span> : </label>
203
+              <el-select v-model="select_template" placeholder="选择病史模板" @change="didSelectTemplate">
204
+                <el-option v-for="(option, index) in templates" :key="index" :label="option.title"
205
+                           :value="option.content"></el-option>
206
+              </el-select>
207
+            </div>
208
+
209
+            <div class="textarea_panel">
210
+              <keep-alive>
211
+                <editor ref="edit_neditor"
212
+                        id="editors"
213
+                        style="width: 600px"
214
+                        v-bind:r_content="edit_new_content"
215
+                >
216
+                </editor>
217
+              </keep-alive>
218
+            </div>
219
+
220
+
221
+            <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
222
+              <el-button @click="show_edit_dialog = false">取消</el-button>
223
+              <el-button type="primary"
224
+                         @click="modifyAction" :loading="uploading_new_record">保存
225
+              </el-button>
226
+            </div>
227
+          </div>
228
+        </div>
229
+      </el-dialog>
230
+    </div>
231
+  </div>
232
+
233
+  <!-- </div> -->
234
+</template>
235
+
236
+<script>
237
+import PatientSidebar from './components/PatientSidebar'
238
+import Editor from '@/components/Editor'
239
+import { fetchAllDoctorAndNurse } from "@/api/doctor";
240
+
241
+import {
242
+  createSickHistoryRecord,
243
+  deleteSickHistoryRecords,
244
+  GetSickHistoryRecords,
245
+  ModifySickHistoryRecord,
246
+} from '@/api/patient'
247
+import { parseTime } from '@/utils'
248
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
249
+
250
+export default {
251
+  name: 'CourseOfDisease',
252
+  components: {
253
+    PatientSidebar,
254
+    BreadCrumb,
255
+    Editor
256
+  },
257
+  data() {
258
+    return {
259
+      loading: false,
260
+      title: '',
261
+      patient_id: 0,
262
+      date: [],
263
+      start_time: '',
264
+      end_time: '',
265
+      sick_history_time: '',
266
+      is_shenyizhishi:'',
267
+      is_fumotouxishi:'',
268
+      is_guominyaowu:'',
269
+      guominyaowu_desc:"",
270
+
271
+      edit_is_shenyizhishi:'',
272
+      edit_is_fumotouxishi:'',
273
+      edit_is_guominyaowu:'',
274
+      edit_guominyaowu_desc:"",
275
+
276
+      doctor_id:"",
277
+      doctorOptions:null,
278
+      records: [],
279
+      doctors: [],
280
+      current_select_record: null,
281
+      show_dialog: false,
282
+      show_edit_dialog: false,
283
+      uploading_new_record: false,
284
+      templates: this.$store.getters.configlist.sick_history,
285
+      select_template:"",
286
+      new_content: '',
287
+      edit_new_content: '',
288
+      edit_sick_history_time: '',
289
+      selectingRows: [],
290
+      table_current_index: -1,
291
+      edit_current_id: 0,
292
+      edit_doctor_id:0,
293
+      edit_title: '',
294
+      ids:"",
295
+      idArr:[],
296
+    }
297
+  },
298
+  created() {
299
+    this.patient_id = parseInt(this.$route.query.id)
300
+    if (isNaN(this.patient_id) || this.patient_id <= 0) {
301
+      this.$notify.error({
302
+        title: '错误',
303
+        message: '无效的id'
304
+      })
305
+      this.$router.push('/patients/patients')
306
+      return
307
+    }
308
+    var now = new Date()
309
+    this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
310
+
311
+    var nowDate = new Date()
312
+    var nowYear = nowDate.getFullYear()
313
+    var nowMonth = nowDate.getMonth() + 1
314
+    var nowDay = nowDate.getDate()
315
+    this.end_time =
316
+      nowYear +
317
+      '-' +
318
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
319
+      '-' +
320
+      (nowDay < 10 ? '0' + nowDay : nowDay)
321
+    nowDate.setMonth(nowDate.getMonth() - 1)
322
+    nowYear = nowDate.getFullYear()
323
+    nowMonth = nowDate.getMonth() + 1
324
+    nowDay = nowDate.getDate()
325
+    this.start_time =
326
+      nowYear +
327
+      '-' +
328
+      (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
329
+      '-' +
330
+      (nowDay < 10 ? '0' + nowDay : nowDay)
331
+
332
+    this.requestSickHistory()
333
+    this.fetchAllDoctorAndNurse()
334
+
335
+  },
336
+  methods: {
337
+    fetchAllDoctorAndNurse() {
338
+      fetchAllDoctorAndNurse().then(response => {
339
+        if (response.data.state == 1) {
340
+          this.doctorOptions = response.data.data.doctors;
341
+        }
342
+      });
343
+    },
344
+    requestSickHistory: function() {
345
+      this.loading = true
346
+      let params = {
347
+        patient_id:this.patient_id,
348
+        start_time:this.start_time,
349
+        end_time:this.end_time,
350
+      }
351
+      GetSickHistoryRecords(params).then(rs => {
352
+        this.loading = false
353
+        var resp = rs.data
354
+        if (resp.state == 1) {
355
+          this.current_select_record = null
356
+          this.records = resp.data.records
357
+          this.doctors = resp.data.doctors
358
+          this.$refs.record_table.setCurrentRow(this.records[0])
359
+        } else {
360
+          this.$message.error(resp.msg)
361
+        }
362
+      }).catch(error => {
363
+        this.loading = false
364
+        this.$message.error(error)
365
+      })
366
+    },
367
+
368
+    didChangeCurrentRecord: function(record) {
369
+      this.current_select_record = record
370
+    },
371
+    recordTime: function(timestamp) {
372
+      var time = new Date(timestamp * 1000)
373
+      return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
374
+    },
375
+    doctorName: function(doctor_id) {
376
+      for (let index = 0; index < this.doctorOptions.length; index++) {
377
+        const doctor = this.doctorOptions[index]
378
+        if (doctor.id == doctor_id) {
379
+          return doctor.name
380
+        }
381
+      }
382
+      return ''
383
+    },
384
+    modifyAction: function() {
385
+      this.edit_new_content = this.$refs.edit_neditor.content
386
+      if (this.edit_new_content.length == 0) {
387
+        this.$message.error('请填写病程内容')
388
+        return
389
+      }
390
+      this.uploading_new_record = true
391
+      let params = {
392
+        id:this.edit_current_id,
393
+        patient_id: this.patient_id,
394
+        content: this.edit_new_content,
395
+        record_time: this.edit_sick_history_time,
396
+        title: this.edit_title,
397
+        is_shenyizhishi:this.edit_is_shenyizhishi,
398
+        is_fumotouxishi:this.edit_is_fumotouxishi,
399
+        is_guominyaowu:this.edit_is_guominyaowu,
400
+        guominyaowu_desc:this.edit_guominyaowu_desc,
401
+        doctor_id: this.edit_doctor_id
402
+      }
403
+
404
+      ModifySickHistoryRecord(params).then(rs => {
405
+        this.uploading_new_record = false
406
+        var resp = rs.data
407
+        if (resp.state == 1) {
408
+          this.records[this.table_current_index].content = resp.data.record.content
409
+          this.records[this.table_current_index].record_time = resp.data.record.record_time
410
+          this.records[this.table_current_index].recorder = resp.data.record.recorder
411
+          this.records[this.table_current_index].title = resp.data.record.title
412
+          this.records[this.table_current_index].doctor_id = resp.data.record.doctor_id
413
+          this.records[this.table_current_index].is_shenyizhi_history = resp.data.record.is_shenyizhi_history
414
+          this.records[this.table_current_index].is_fumo_dialysis_history = resp.data.record.is_fumo_dialysis_history
415
+          this.records[this.table_current_index].is_hypersusceptibility = resp.data.record.is_hypersusceptibility
416
+          this.records[this.table_current_index].hypersusceptibility_desc = resp.data.record.hypersusceptibility_desc
417
+          this.show_edit_dialog = false
418
+          this.edit_new_content = ''
419
+          this.table_current_index = -1
420
+        } else {
421
+          this.table_current_index = -1
422
+          this.$message.error(resp.msg)
423
+        }
424
+
425
+      }).catch(error => {
426
+        this.table_current_index = -1
427
+        this.uploading_new_record = false
428
+        this.$message.error(error)
429
+      })
430
+
431
+    },
432
+
433
+    createAction: function() {
434
+      this.new_content = this.$refs.editor.content
435
+      if (this.new_content.length == 0) {
436
+        this.$message.error('请填写病程内容')
437
+        return
438
+      }
439
+      this.uploading_new_record = true
440
+      let params = {
441
+        patient_id: this.patient_id,
442
+        content: this.new_content,
443
+        record_time: this.sick_history_time,
444
+        title: this.title,
445
+        is_shenyizhishi:this.is_shenyizhishi,
446
+        is_fumotouxishi:this.is_fumotouxishi,
447
+        is_guominyaowu:this.is_guominyaowu,
448
+        guominyaowu_desc:this.guominyaowu_desc,
449
+        doctor_id: this.doctor_id
450
+      }
451
+      createSickHistoryRecord(params).then(rs => {
452
+        this.uploading_new_record = false
453
+        this.$message.success("新增成功")
454
+        var resp = rs.data
455
+        if (resp.state == 1) {
456
+          this.records.unshift(resp.data.record)
457
+          this.show_dialog = false
458
+          this.new_content = ''
459
+          this.title = ''
460
+          this.$refs.record_table.setCurrentRow(this.records[0])
461
+        } else {
462
+          this.$message.error(resp.msg)
463
+        }
464
+
465
+      }).catch(error => {
466
+        this.uploading_new_record = false
467
+        this.$message.error(error)
468
+      })
469
+    },
470
+    didSelectTemplate: function(templateContent) {
471
+      this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
472
+
473
+    }, didEditSelectTemplate: function(templateContent) {
474
+      this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
475
+    },
476
+
477
+    didSelectionChange: function(selectRows) {
478
+
479
+      var arr = []
480
+      for(let i=0;i<selectRows.length;i++){
481
+        arr.push(selectRows[i].id)
482
+      }
483
+      var newArr = arr.join(',')
484
+      this.ids = newArr
485
+      console.log("select23322332",this.ids)
486
+      this.selectingRows = selectRows
487
+    },
488
+    deleteAction: function() {
489
+      if (this.selectingRows.length == 0) {
490
+        return
491
+      }
492
+      var ids = []
493
+      for (let index = 0; index < this.selectingRows.length; index++) {
494
+        const row = this.selectingRows[index]
495
+        ids.push(row.id)
496
+      }
497
+      var ids_str = ids.join(',')
498
+      this.loading = true
499
+
500
+      let params={
501
+        patient_id:this.patient_id,
502
+        ids:ids_str,
503
+      }
504
+
505
+      deleteSickHistoryRecords(params).then(rs => {
506
+        var resp = rs.data
507
+        if (resp.state == 1) {
508
+          for (let id_index = 0; id_index < ids.length; id_index++) {
509
+            for (let record_index = 0; record_index < this.records.length; record_index++) {
510
+              if (ids[id_index] == this.records[record_index].id) {
511
+                this.records.splice(record_index, 1)
512
+                break
513
+              }
514
+            }
515
+          }
516
+          this.selectingRows = []
517
+          this.$message.success('已删除')
518
+
519
+        } else {
520
+          this.$message.error(resp.msg)
521
+        }
522
+        this.loading = false
523
+      }).catch(err => {
524
+        this.loading = false
525
+        this.$message.error(err)
526
+      })
527
+    }, startTimeChange(val) {
528
+      this.requestSickHistory()
529
+    }, endTimeChange(val) {
530
+      this.requestSickHistory()
531
+    }, showDialog(){
532
+      for(let i = 0; i < this.doctorOptions.length; i++){
533
+        if(this.doctorOptions[i].id == this.$store.getters.xt_user.user.id){
534
+          this.doctor_id =this.$store.getters.xt_user.user.id
535
+        }
536
+      }
537
+      this.show_dialog = true
538
+
539
+    },showEdit() {
540
+      if (this.table_current_index == -1) {
541
+        this.$message.error('请选择要修改的病程内容')
542
+        return
543
+      }
544
+      this.edit_is_shenyizhishi = this.records[this.table_current_index].is_shenyizhi_history.toString()
545
+      this.edit_is_fumotouxishi = this.records[this.table_current_index].is_fumo_dialysis_history.toString()
546
+      this.edit_is_guominyaowu = this.records[this.table_current_index].is_hypersusceptibility.toString()
547
+      this.edit_guominyaowu_desc = this.records[this.table_current_index].hypersusceptibility_desc
548
+      this.edit_sick_history_time = this.recordTime(this.records[this.table_current_index].record_time)
549
+      this.edit_new_content = this.records[this.table_current_index].content
550
+      this.edit_current_id = this.records[this.table_current_index].id
551
+      this.edit_doctor_id = this.records[this.table_current_index].doctor_id
552
+      console.log(this.edit_new_content )
553
+      this.edit_title = this.records[this.table_current_index].title//
554
+      this.show_edit_dialog = true
555
+
556
+      this.$refs.record_table.setCurrentRow(null)
557
+
558
+    }, tableRow({ row, rowIndex }) {
559
+      // 把每一行的索引放进row
560
+      row.index = rowIndex
561
+    }, onRowClick(row, event, column) {
562
+      this.table_current_index = row.index
563
+    },
564
+    print(){
565
+      // if (this.table_current_index == -1) {
566
+      //   this.$message.error('请选择要打印的病程')
567
+      //   return
568
+      // }
569
+      if(this.ids.length == 0){
570
+        this.$message.error('请选择要打印的病程')
571
+        return
572
+      }
573
+      this.$router.push({ path: "/sickhistory/print?ids="+this.ids+"&patient_id="+this.patient_id});
574
+    }
575
+  }
576
+}
577
+</script>
578
+
579
+<style rel="stylesheet/css" lang="scss" scoped>
580
+.container {
581
+  margin-left: 180px;
582
+  padding: 20px;
583
+  background: #fff;
584
+  min-height: calc(100vh - 173px);
585
+  margin-bottom: 15px;
586
+
587
+.record {
588
+  padding-top: 20px;
589
+}
590
+
591
+}
592
+.record_content_panel {
593
+  border-width: 1px;
594
+  border-style: solid;
595
+  border-color: #ebeef5;
596
+  min-height: 200px;
597
+
598
+.title {
599
+  font-size: 14px;
600
+  font-weight: 500;
601
+  color: #909399;
602
+  line-height: 44px;
603
+  height: 44px;
604
+  text-align: center;
605
+  border-bottom-width: 1px;
606
+  border-bottom-style: solid;
607
+  border-bottom-color: #ebeef5;
608
+}
609
+
610
+.content {
611
+  padding: 12px 15px;
612
+  font-size: 15px;
613
+  color: gray;
614
+  line-height: 22px;
615
+}
616
+
617
+}
618
+
619
+.new_record_form {
620
+
621
+/*/ / padding: 10 px, 25 px;*/
622
+
623
+.textarea_panel {
624
+  margin-top: 10px;
625
+}
626
+
627
+}
628
+</style>
629
+<style>
630
+.el-table td,
631
+.el-table th.is-leaf,
632
+.el-table--border,
633
+.el-table--group {
634
+  border-color: #d0d3da;
635
+}
636
+.el-table--border::after,
637
+.el-table--group::after,
638
+.el-table::before {
639
+  background-color: #d0d3da;
640
+}
641
+</style>