yq1 3 hafta önce
ebeveyn
işleme
fcd818b5f3

+ 6 - 2
src/xt_pages/outpatientDoctorStation/checkPrint.vue Dosyayı Görüntüle

@@ -13,9 +13,10 @@
13 13
       </template> -->
14 14
 <!--  && this.$store.getters.xt_user.org_id != 0  -->
15 15
       <div class='dialysisPage' style="padding-top:40px;">
16
-        <printOne v-if="this.$store.getters.xt_user.org_id != 10402 && this.$store.getters.xt_user.org_id != 10375 " :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printOne>
16
+        <printOne v-if="this.$store.getters.xt_user.org_id != 10402 && this.$store.getters.xt_user.org_id != 10375 && org_id != 10598 && org_id!=0" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printOne>
17 17
         <printTwo v-if="this.$store.getters.xt_user.org_id == 10402 " :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printTwo>
18 18
         <printThree v-if="this.$store.getters.xt_user.org_id == 10375 " :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printThree>
19
+        <printfour v-if="org_id == 10598 || org_id==0 " :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id" :newHisPatient="newHisPatient"></printfour>
19 20
         <!--      <print-two></print-two>-->
20 21
       </div>
21 22
 
@@ -31,6 +32,7 @@ import printOne from "./checkTemplate/printOne"
31 32
 import { getAllDoctorList,getAllHisPatientList } from "@/api/project/project"
32 33
 import printTwo from './checkTemplate/printTwo.vue'
33 34
 import printThree from './checkTemplate/printThree.vue'
35
+import printfour from './checkTemplate/printfour'
34 36
 export default {
35 37
   name: "dialysisPrintOrder",
36 38
   components: {
@@ -38,6 +40,7 @@ export default {
38 40
     BreadCrumb,
39 41
     printOne,
40 42
     printThree,
43
+    printfour,
41 44
   },
42 45
   props:{
43 46
     paramsObj:Object,
@@ -59,7 +62,8 @@ export default {
59 62
       loading:false,
60 63
       patient_id:0,
61 64
       prescription_id:0,
62
-      ids:''
65
+      ids:'',
66
+      org_id:''
63 67
     };
64 68
   },
65 69
   methods:{

+ 669 - 0
src/xt_pages/outpatientDoctorStation/checkTemplate/printfour.vue Dosyayı Görüntüle

@@ -0,0 +1,669 @@
1
+<template>
2
+  <div id="prescription-print">
3
+    <div v-for="(item, index) in advicePrint" :key="index">
4
+      <div id="prescription-print" class="prescription-print" style="page-break-after: always">
5
+        <div class="printTitle">检验申请单</div>
6
+
7
+        <div style="border: 1px solid #000;margin-bottom: 10px;">
8
+          <div
9
+            style="
10
+              display: flex;
11
+              justify-content: space-between;
12
+              border-bottom: 1px solid #000;
13
+              line-height: 40px;
14
+              padding: 0 10px;
15
+            "
16
+          >
17
+            <div>是否急诊:否</div>
18
+            <div>
19
+              结算方式:{{
20
+                faber && faber.transBody
21
+                  ? getName(faber.transBody.outputlist1)
22
+                  : ""
23
+              }}
24
+            </div>
25
+            <div>金额:{{ total }}</div>
26
+          </div>
27
+          <div
28
+            style="
29
+              display: flex;
30
+              justify-content: space-between;
31
+              border-bottom: 1px solid #000;
32
+              line-height: 40px;
33
+              padding: 0 10px;
34
+            "
35
+          >
36
+            <div>
37
+              姓名:{{
38
+                advicePrint[0].patient.name
39
+                  ? advicePrint[0].patient.name.indexOf("(") > -1
40
+                    ? advicePrint[0].patient.name.substring(
41
+                      0,
42
+                      advicePrint[0].patient.name.indexOf("(")
43
+                    )
44
+                    : advicePrint[0].patient.name
45
+                  : ""
46
+              }}
47
+            </div>
48
+            <div>
49
+              性别:
50
+              <span v-if="advicePrint[0].patient.gender == 1">男</span>
51
+              <span v-if="advicePrint[0].patient.gender == 2">女</span>
52
+            </div>
53
+
54
+            <div>年龄:{{getAge(advicePrint[0].patient)?getAge(advicePrint[0].patient):""}}岁</div>
55
+
56
+          </div>
57
+          <div style="margin-bottom: 20px; padding: 10px 10px 0" v-if="org_id!=10278 && org_id!=10138 && org_id!=0">
58
+            病史摘要:{{
59
+              history.history_of_present_illness
60
+                ? history.history_of_present_illness
61
+                : ""
62
+            }}
63
+          </div>
64
+          <div style="margin-bottom: 20px; padding: 0 10px">
65
+            临床诊断:{{ getDiagnosis(advicePrint[0].info.diagnosis) }}
66
+          </div>
67
+          <div style="display: flex; margin-bottom: 20px; padding: 0 10px">
68
+            <div>检验项目:</div>
69
+            <div >
70
+              <div v-for="ite in item.project2" style="margin-bottom: 10px">
71
+                {{ ite}}
72
+              </div>
73
+              <div v-for="ite in item.project3" style="margin-bottom: 10px">
74
+                {{ ite}}
75
+              </div>
76
+              <!-- <div v-for="ite in item.singleProjectPrint" style="margin-bottom: 10px">
77
+                <span v-if="ite.team_id>0">
78
+                  {{ ite.team.project_team }}
79
+                </span>
80
+                <span v-else>
81
+                  {{ ite.project.project_name }}
82
+                </span>
83
+                  
84
+              </div> -->
85
+            </div>
86
+          </div>
87
+          <div
88
+            style="
89
+              display: flex;
90
+              justify-content: space-between;
91
+              border-top: 1px solid #000;
92
+              line-height: 40px;
93
+              padding: 0 10px;
94
+            "
95
+          >
96
+            <div>开单医生: {{ getAdminUser(item.creator) }}</div>
97
+            <div>
98
+              开单日期:
99
+              {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
100
+            </div>
101
+            <div>
102
+              医生签字:
103
+              <span style="width: 100px; display: inline-block"></span>
104
+            </div>
105
+          </div>
106
+        </div>
107
+
108
+      </div>
109
+    </div>
110
+
111
+  </div>
112
+</template>
113
+<script>
114
+import { jsGetAge, uParseTime } from "@/utils/tools";
115
+import {
116
+  getAllDoctorList,
117
+  getPrescriptionPrint,
118
+  getHisPatientDetail,
119
+  getPatientCaseHistory,
120
+} from "@/api/project/project";
121
+import { getInitData } from "@/api/his/his";
122
+export default {
123
+  props: {
124
+    patient_id: Number,
125
+    record_date: String,
126
+    prescription_id: Number,
127
+    ids: String,
128
+  },
129
+  data() {
130
+    return {
131
+      doctorList_1: [],
132
+      doctorList: [],
133
+      advicePrint: {},
134
+      patient: {},
135
+      tableData: [],
136
+      prescriptionInfo: [],
137
+      hisPatient: {},
138
+      department: [],
139
+      prescriptions: [],
140
+      projectList: [],
141
+      doc_name: "",
142
+      orgname: "",
143
+      diagnoses: [],
144
+      pageArr: [],
145
+      faber: {},
146
+      total: 0,
147
+      projectPrint: [],
148
+      time: "",
149
+      doctor: "",
150
+      org_id: "",
151
+      singleProjectPrint: [],
152
+      operatorMaps: {},
153
+      adminUser:[],
154
+      arr:[],
155
+    };
156
+  },
157
+  methods: {
158
+    getAge(patient){
159
+      // 将时间戳转换为 Date 对象
160
+      const birthday = new Date(patient.birthday* 1000);
161
+
162
+      // 获取当前日期
163
+      const now = new Date();
164
+      // 计算年龄差
165
+      const ageDiffMs = now - birthday;
166
+      const ageDate = new Date(ageDiffMs); // 不需要减掉 1970 年的时间戳
167
+      // 提取年份
168
+      const age = ageDate.getUTCFullYear() - 1970;
169
+      return age
170
+    },
171
+    getPatientCaseHistory() {
172
+      const params = {
173
+        patient_id: this.patient_id,
174
+      };
175
+      getPatientCaseHistory(params).then((response) => {
176
+        if (response.data.state == 1) {
177
+          var history = response.data.data.history;
178
+          // console.log("中国history222222", history);
179
+          this.history = history;
180
+        }
181
+      });
182
+    },
183
+    getAllDoctorList() {
184
+      getAllDoctorList().then((response) => {
185
+        if (response.data.state == 1) {
186
+          var doctor = response.data.data.doctor;
187
+
188
+          this.doctorList = doctor;
189
+        }
190
+      });
191
+    },
192
+
193
+    getDoctor(id) {
194
+      var name = "";
195
+      for (let i = 0; i < this.doctorList.length; i++) {
196
+        if (id == this.doctorList[i].admin_user_id) {
197
+          name = this.doctorList[i].user_name;
198
+        }
199
+      }
200
+      return name;
201
+    },
202
+    getTime(value, temp) {
203
+      if (value != undefined) {
204
+        return uParseTime(value, temp);
205
+      }
206
+      return "";
207
+    },
208
+    // 数据源
209
+    getPrescriptionPrint() {
210
+      var params = {
211
+        // patient_id:this.patient_id,
212
+        // record_date:this.record_date,
213
+        // prescription_id:this.prescription_id,
214
+        patient_id: this.patient_id,
215
+        record_date: this.record_date,
216
+        prescription_id: this.prescription_id,
217
+        ids: this.ids,
218
+        p_type: 2,
219
+      };
220
+      // console.log("params", params);
221
+      getPrescriptionPrint(params).then((response) => {
222
+        if (response.data.state == 1) {
223
+          var advicePrint = response.data.data.advicePrint;
224
+          // console.log("adviceprint999933333", advicePrint);
225
+          this.advicePrint = advicePrint;
226
+          
227
+          this.advicePrint.map((item) =>{
228
+            let a = []
229
+            let b = []
230
+            const project2 = []
231
+            
232
+            if (item.project.length > 0) {
233
+              item.project.map((it) => {
234
+                if(it.team_id>0){
235
+                  // b={
236
+                  //   id:item.id,
237
+                  //   label:it.team.project_team
238
+                  // }
239
+                  // project2.push(it.team.project_team)
240
+                  b.push(it.team.project_team)
241
+                }else{
242
+                  // a={
243
+                  //   id:item.id,
244
+                  //   label:it.project.project_name
245
+                  // }
246
+                  a.push(it.project.project_name)
247
+                }
248
+              });
249
+              console.log('ccccccc',a,b);
250
+            }
251
+            const arr = [...new Set(b)]
252
+            item['project2'] = arr
253
+            item['project3'] = a
254
+          })
255
+          // console.log('ccccccc',this.arr,a);
256
+          this.prescriptions = advicePrint;
257
+          console.log("处方99999222222", response.data.data);
258
+          var hisPatient = response.data.data.hisPatient;
259
+          this.adminUser = response.data.data.roles
260
+          // console.log("hisPatient", hisPatient);
261
+          this.hisPatient = hisPatient;
262
+          let projectPrint = [];
263
+          let total = 0;
264
+          this.advicePrint.map((item) => {
265
+            let singleProjectPrint = []
266
+            // console.log("imte233232323232323223", item.project);
267
+            if (item.project.length > 0) {
268
+              item.project.map((it) => {
269
+                if (it.type == 2) {
270
+                  if (it.project.cost_classify == 3) {
271
+                    projectPrint.push(it);
272
+                    singleProjectPrint.push(it)
273
+                    total += it.project.price * parseInt(it.count);
274
+                  }
275
+                }
276
+              });
277
+            }
278
+            item["singleProjectPrint"] = singleProjectPrint
279
+
280
+          });
281
+          this.doctorList_1 = response.data.data.eles;
282
+          // console.log(this.doctorList_1, "医生列表");
283
+          if (this.doctorList_1.length > 0) {
284
+            var operatorsLen = this.doctorList_1.length;
285
+            for (var index = 0; index < operatorsLen; index++) {
286
+              this.$set(
287
+                this.operatorMaps,
288
+                this.doctorList_1[index].creator,
289
+                this.doctorList_1[index]
290
+              );
291
+            }
292
+          }
293
+          let data = [];
294
+          let data2 = [];
295
+          projectPrint.map((item) => {
296
+              data2.push(item);
297
+          });
298
+          this.projectPrint = data;
299
+          console.log("列表", this.projectPrint);
300
+          this.total = total.toFixed(2);
301
+          this.pre_time = this.advicePrint[0].pre_time;
302
+          this.doctor = this.advicePrint[0].creator;
303
+
304
+          this.singleProjectPrint = data2;
305
+
306
+          var projectlist = response.data.data.projectlist;
307
+
308
+          var projectlist = response.data.data.projectlist;
309
+          // console.log("所有项目列表", projectlist);
310
+          this.projectList = projectlist;
311
+          this.getPage();
312
+          let outputlist1Name = response.data.data.his.patient_info
313
+            ? JSON.parse(response.data.data.his.patient_info)
314
+            : {};
315
+          this.faber = outputlist1Name;
316
+        }
317
+      });
318
+    },
319
+    // 电子签名
320
+    setAdminUserES(id) {
321
+      // console.log(id, "id");
322
+      if (id == 0) {
323
+        return "";
324
+      }
325
+      if (id in this.operatorMaps) {
326
+        // console.log(this.operatorMaps, "this.operatorMaps");
327
+        return this.operatorMaps[id].url;
328
+      } else {
329
+        // console.log("po");
330
+        return "";
331
+      }
332
+    },
333
+    getAdminUser(id) {
334
+      if (id == 0) {
335
+        return "";
336
+      }
337
+      if (id == undefined) {
338
+        return "";
339
+      }
340
+      for (let i = 0; i < this.adminUser.length; i++) {
341
+        if (this.adminUser[i].admin_user_id == id) {
342
+          return this.adminUser[i].user_name;
343
+        }
344
+      }
345
+    },
346
+    getHisPatientDetail() {
347
+      const params = {
348
+        patient_id: this.patient_id,
349
+      };
350
+      getHisPatientDetail(params).then((response) => {
351
+        if (response.data.state == 1) {
352
+          var hisPatient = response.data.data.hisPatient;
353
+          // console.log("挂号病人", hisPatient);
354
+          this.hisPatient = hisPatient;
355
+        }
356
+      });
357
+    },
358
+    getInitData() {
359
+      getInitData().then((response) => {
360
+        if (response.data.state == 1) {
361
+          this.department = response.data.data.department;
362
+          this.diagnoses = response.data.data.diagnose.sort(this.compare("id"));
363
+          // console.log("争端", this.diagnoses);
364
+        }
365
+      });
366
+    },
367
+    getDepart(id) {
368
+      var name = "";
369
+      for (let i = 0; i < this.department.length; i++) {
370
+        if (id == this.department[i].id) {
371
+          name = this.department[i].name;
372
+        }
373
+      }
374
+      return name;
375
+    },
376
+    getTotalOne(id) {
377
+      var total = 0;
378
+      var addtotal = 0;
379
+      for (let i = 0; i < this.prescriptions.length; i++) {
380
+        if (id == this.prescriptions[i].id) {
381
+          if (this.prescriptions[i].project != null) {
382
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
383
+              total =
384
+                total +
385
+                this.prescriptions[i].project[a].price *
386
+                this.prescriptions[i].project[a].count;
387
+            }
388
+          }
389
+
390
+          if (this.prescriptions[i].additionalcharge != null) {
391
+            for (
392
+              let a = 0;
393
+              a < this.prescriptions[i].additionalcharge.length;
394
+              a++
395
+            ) {
396
+              addtotal =
397
+                addtotal +
398
+                this.prescriptions[i].additionalcharge[a].price *
399
+                this.prescriptions[i].additionalcharge[a].count;
400
+            }
401
+          }
402
+          addtotal = Math.floor(addtotal * 100) / 100;
403
+        }
404
+      }
405
+
406
+      for (let i = 0; i < this.prescriptions.length; i++) {
407
+        if (id == this.prescriptions[i].id) {
408
+          if (this.prescriptions[i].advices != null) {
409
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
410
+              total =
411
+                total +
412
+                this.prescriptions[i].advices[a].price *
413
+                this.prescriptions[i].advices[a].prescribing_number;
414
+            }
415
+          }
416
+
417
+          if (this.prescriptions[i].additionalcharge != null) {
418
+            for (
419
+              let a = 0;
420
+              a < this.prescriptions[i].additionalcharge.length;
421
+              a++
422
+            ) {
423
+              addtotal =
424
+                addtotal +
425
+                this.prescriptions[i].additionalcharge[a].price *
426
+                this.prescriptions[i].additionalcharge[a].count;
427
+            }
428
+          }
429
+          addtotal = Math.floor(addtotal * 100) / 100;
430
+        }
431
+      }
432
+
433
+      return total + addtotal;
434
+    },
435
+
436
+    getProjectName(id) {
437
+      var project_name = "";
438
+      for (let i = 0; i < this.projectList.length; i++) {
439
+        if (id == this.projectList[i].id) {
440
+          project_name = this.projectList[i].project_name;
441
+        }
442
+      }
443
+      return project_name;
444
+    },
445
+
446
+    getDiagnosis(ids) {
447
+      let newIds = ids.split(",").sort(function (a, b) {
448
+        return a - b;
449
+      });
450
+
451
+      var name = "";
452
+      let nameArr = [];
453
+      for (let i = 0; i < this.diagnoses.length; i++) {
454
+        // if(id == this.diagnoses[i].id){
455
+        //    name = this.diagnoses[i].class_name
456
+        // }
457
+
458
+        if (newIds.indexOf(this.diagnoses[i].id.toString()) > -1) {
459
+          // name += diagnoses[i].class_name + ' '
460
+          nameArr.push(this.diagnoses[i].class_name);
461
+        }
462
+      }
463
+      let newNameArr = [];
464
+      nameArr.map((item, index) => {
465
+        if (item == "尿毒症") {
466
+          newNameArr.push(item);
467
+          nameArr.splice(index, 1, "");
468
+        }
469
+      });
470
+      newNameArr.push(...nameArr);
471
+      return newNameArr.join(" ");
472
+    },
473
+    compare(property) {
474
+      return function (a, b) {
475
+        var value1 = a[property];
476
+        var value2 = b[property];
477
+        return value1 - value2; //升序排序
478
+      };
479
+    },
480
+    getPage() {
481
+      this.page = 1;
482
+      this.pageArr = [];
483
+
484
+      this.advicePrint.map((item) => {
485
+        let arr = [];
486
+        item.pageArr = [];
487
+        if (item.advices.length <= 5) {
488
+          this.page = 1;
489
+          arr.push(item.advices.length);
490
+          item.pageArr.push(arr);
491
+        } else if (item.advices.length > 5) {
492
+          this.page = parseInt(item.advices.length / 5);
493
+          let num = item.advices.length % 5;
494
+          for (var i = 0; i < this.page; i++) {
495
+            item.pageArr.push([5]);
496
+          }
497
+          if (num != 0) {
498
+            item.pageArr.push([num]);
499
+          }
500
+        }
501
+      });
502
+      // console.log('this.pageArr',this.pageArr)
503
+    },
504
+    getName(list) {
505
+      console.log("list", list);
506
+      let new_list = [];
507
+      for (let i = 0; i < list.length; i++) {
508
+        if (list[i].aac031 == "1") {
509
+          new_list.push(list[i]);
510
+        }
511
+      }
512
+
513
+      switch (new_list[0].bcc334) {
514
+        case "A31001":
515
+          return "深圳医保1档";
516
+          break;
517
+        case "A31002":
518
+          return "深圳医保2档";
519
+
520
+          break;
521
+        case "A31003":
522
+          return "深圳医保3档";
523
+
524
+          break;
525
+        case "A31004":
526
+          return "二档(少儿)";
527
+
528
+          break;
529
+        case "A31005":
530
+          return "学生二档";
531
+
532
+          break;
533
+        case "A31006":
534
+          return "大学生二档";
535
+
536
+          break;
537
+        case "A32001":
538
+          return "在职公务员";
539
+          break;
540
+        case "A32002":
541
+          return "在职驻深公务员";
542
+
543
+          break;
544
+        case "A39301":
545
+          return "家属统筹医疗";
546
+
547
+          break;
548
+        case "A41001":
549
+          return "工伤在职";
550
+
551
+          break;
552
+        case "A51001":
553
+          return "生育在职";
554
+
555
+          break;
556
+        case "A52001":
557
+          return "生育医疗一档";
558
+
559
+          break;
560
+        case "A52002":
561
+          return "生育医疗一档";
562
+
563
+          break;
564
+        case "C31001":
565
+          return "一档医疗退休";
566
+
567
+          break;
568
+        case "C31002":
569
+          return "二档医疗退休";
570
+          break;
571
+      }
572
+    },
573
+  },
574
+  created() {
575
+    this.getAllDoctorList();
576
+    this.getInitData();
577
+    this.getPrescriptionPrint();
578
+    this.getHisPatientDetail();
579
+    this.getPatientCaseHistory();
580
+    var xtuser = this.$store.getters.xt_user;
581
+    this.orgname = xtuser.org.org_name;
582
+    this.org_id = this.$store.getters.xt_user.org_id;
583
+  },
584
+  watch: {
585
+    ids: function (val) {
586
+      this.ids = val;
587
+      this.getPrescriptionPrint();
588
+    },
589
+  },
590
+};
591
+</script>
592
+
593
+
594
+<style lang="scss" scoped>
595
+.prescription-print {
596
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
597
+  0 0 60px rgba(0, 0, 0, 0.06) inset;
598
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
599
+  0 0 40px rgba(0, 0, 0, 0.06) inset;
600
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
601
+  margin-bottom: 20px;
602
+  padding: 20px 10px;
603
+}
604
+.printTitle {
605
+  font-size: 22px;
606
+  text-align: center;
607
+  font-weight: bold;
608
+  margin-bottom: 10px;
609
+}
610
+.infoTitle {
611
+  display: flex;
612
+  margin-top: 10px;
613
+  line-height: 24px;
614
+}
615
+.infoTitle div {
616
+  width: 200px;
617
+}
618
+.infoMain {
619
+  display: flex;
620
+  flex-wrap: wrap;
621
+  margin-top: 10px;
622
+}
623
+.infoMain div {
624
+  width: 50%;
625
+  line-height: 24px;
626
+}
627
+.prescriptionBox {
628
+  padding: 0 10px;
629
+  min-height: 400px;
630
+}
631
+.Rp {
632
+  font-size: 22px;
633
+  font-weight: bold;
634
+}
635
+.drugsBox {
636
+  padding-left: 40px;
637
+  margin-bottom: 10px;
638
+}
639
+.drugsBox div {
640
+  line-height: 20px;
641
+}
642
+.drugsOne {
643
+  line-height: 24px;
644
+}
645
+.drugsOne span {
646
+  margin-right: 20px;
647
+}
648
+.doctorBox {
649
+  display: flex;
650
+  justify-content: space-between;
651
+  padding: 0 10px;
652
+  line-height: 24px;
653
+  border-bottom: 2px solid #000;
654
+}
655
+.actionBar {
656
+  display: flex;
657
+  justify-content: space-between;
658
+  line-height: 24px;
659
+  padding: 0 10px;
660
+}
661
+.actionBar p {
662
+  width: 150px;
663
+}
664
+.under_line {
665
+  display: inline-block;
666
+  border-bottom: 1px solid #000;
667
+  flex: 1;
668
+}
669
+</style>

+ 17 - 3
src/xt_pages/outpatientDoctorStation/print.vue Dosyayı Görüntüle

@@ -9,7 +9,7 @@
9 9
         :prescription_id="prescription_id"></printOne>
10 10
 
11 11
         <print-ten-one
12
-          v-if="org_id == 10188 || org_id == 10217 " v-bind:childResponse="childResponse"
12
+          v-if="org_id == 10188 || org_id == 10217  " v-bind:childResponse="childResponse"
13 13
           :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient"
14 14
           :doctorPorject="doctorPorject" :patient_id="patient_id" :record_date="record_date"
15 15
           :prescription_id="prescription_id"
@@ -27,8 +27,20 @@
27 27
           :prescription_id="prescription_id">
28 28
         </prinSeven>
29 29
 
30
+        <prineight v-if="org_id == 10644 || org_id ==0"
31
+          v-bind:childResponse="childResponse"
32
+          :advicePrint="advicePrint"
33
+          :ids="ids"
34
+          :patient="patient"
35
+          :hisPatient="hisPatient"
36
+          :doctorPorject="doctorPorject"
37
+          :patient_id="patient_id"
38
+          :record_date="record_date"
39
+          :prescription_id="prescription_id">
40
+        </prineight>
41
+
30 42
         <printFour
31
-          v-if="org_id == 10088 || org_id == 10510 || org_id == 10598 || org_id == 0"
43
+          v-if="org_id == 10088 || org_id == 10510 || org_id == 10598 "
32 44
           v-bind:childResponse="childResponse"
33 45
           :advicePrint="advicePrint"
34 46
           :ids="ids"
@@ -95,6 +107,7 @@ import printFour from "./template/printFour";
95 107
 import printFive from "./template/printFive";
96 108
 import printSix from "./template/printSix";
97 109
 import prinSeven from './template/prinSeven.vue'
110
+import prineight from './template/prineight'
98 111
 import {
99 112
   getAllDoctorList,
100 113
   getAllHisPatientList,
@@ -112,7 +125,8 @@ export default {
112 125
     printFour,
113 126
     printFive,
114 127
     printSix,
115
-    prinSeven
128
+    prinSeven,
129
+    prineight
116 130
   },
117 131
   props: {
118 132
     paramsObj: Object,

+ 820 - 0
src/xt_pages/outpatientDoctorStation/template/prineight.vue Dosyayı Görüntüle

@@ -0,0 +1,820 @@
1
+<template>
2
+  <div id="prescriptionPrint">
3
+    <div v-for="(item, index) in advicePrint" :key="index">
4
+      <div
5
+        id="prescription-print"
6
+        class="prescription-print"
7
+        style="page-break-after: always;"
8
+      >
9
+          <div
10
+            class="printTitle"
11
+            v-if="
12
+              prescriptions[index].med_type != '1111' &&
13
+              prescriptions[index].med_type != '1112'
14
+            "
15
+          >
16
+            {{ orgname }}处方笺
17
+          </div>
18
+          <div class="printTitle" v-else>
19
+            <span>{{ orgname }}处方笺</span>
20
+            <span style="font-size: 14px;font-weight: normal;color: red;" 
21
+              v-if="prescriptions[index].med_type == '1112'">(精)</span>
22
+          </div>
23
+          <div  style="border-bottom: 1px solid black;border-top: 1px solid black;width: 100%;">
24
+            <div style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
25
+              <div style="flex: 1;">
26
+                NO:
27
+              </div>
28
+              <div style="flex: 1;">
29
+                开方时间:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
30
+              </div>
31
+            </div>
32
+            <div style="display: flex;line-height: 24px;padding: 0 10px;">
33
+              <div style="flex: 1;">
34
+                透析号:{{ item.patient.dialysis_no }}
35
+              </div>
36
+              <div style="flex: 1;">
37
+                费别:居民医保/职工医保/自费
38
+              </div>
39
+            </div>
40
+            <div  style="display: flex;margin: 10px 0;line-height: 24px;padding: 0 10px;">
41
+              <p style="width: 200px;">姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
42
+              <p style="width: 200px;">
43
+                性别:
44
+                <span v-if="item.patient.gender == 1">男</span>
45
+                <span v-if="item.patient.gender == 2">女</span>
46
+              </p>
47
+              <p style="width: 200px;">年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
48
+            </div>
49
+            <div style="display: flex;line-height: 24px;padding: 0 10px;">
50
+              <div style="flex: 1;">
51
+                临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
52
+              </div>
53
+              <div style="flex: 1;">
54
+                过敏史:
55
+              </div>
56
+            </div>
57
+            <div style="width: 100%;margin: 10px 0;padding: 0 10px;">地址:{{ item.patient.home_address }}</div>
58
+          </div>
59
+          <div class="prescriptionBox" style="height: 300px;">
60
+            <div class="Rp">Rp:</div>
61
+            <div
62
+              class="drugsBox"
63
+              v-for="(it, index) in item.advices" :key="index"
64
+              :style="{'page-break-after':index==yi&&item.advices.length>5? 'always':'auto'}"
65
+            >
66
+              <template v-if="index==yi+1&&item.advices.length>5">
67
+                <div style="margin: 20px 0px;">
68
+                  <div class="infoTitle">
69
+                    <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
70
+                    <p>
71
+                      性别:
72
+                      <span v-if="item.patient.gender == 1">男</span>
73
+                      <span v-if="item.patient.gender == 2">女</span>
74
+                    </p>
75
+                    <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
76
+                  </div>
77
+                  <div class="infoMain">
78
+                    <div style="margin-bottom: 10px">
79
+                      门诊号:{{ hisPatient.number ? hisPatient.number : "" }}
80
+                    </div>
81
+                    <div style="margin-bottom: 10px">
82
+                      科室:{{ item.info ? getDepart(item.info.departments) : "" }}
83
+                    </div>
84
+                    <div style="margin-bottom: 10px">
85
+                      <!-- 医保卡号:{{ item.hisPatient.number ? item.hisPatient.number : "" }} -->
86
+                      费别:居民医保/职工医保/自费
87
+                    </div>
88
+                    <div style="margin-bottom: 10px" v-if="org_id != 10188">
89
+                      <!-- 电话:{{ item.patient.phone }} -->
90
+                      开方日期:{{ getTime(item.pre_time) ? getTime(item.pre_time) : "" }}
91
+                    </div>
92
+                    <div style="margin-bottom: 10px" v-else>
93
+                      日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}
94
+                    </div>
95
+                    <div style="width: 100%">地址:{{ item.patient.home_address }}</div>
96
+                    <div style="width: 100%">
97
+                      临床诊断:{{ getDiagnosis(item.info.diagnosis) }}
98
+                    </div>
99
+                  </div>
100
+                </div>
101
+              </template>
102
+              <div style="position: relative;">
103
+                <div v-if="it.arr !== undefined">
104
+                  <div class="drugsOne" :style="{'border-right':it.arr.length>0 ? '1px solid black': 'none','width':'80%'}">
105
+                    <span style="font-weight: bold" >
106
+                      {{ index + 1 + "."}}
107
+                    </span>
108
+                    {{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;
109
+                    <span v-if="it.drug.min_unit != it.drug.dose_unit">
110
+                      {{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* {{ it.drug.min_number }}{{ it.drug.min_unit }}/
111
+                      {{it.drug.max_unit}}
112
+                    </span>&nbsp;
113
+                    <div>
114
+                      <template>
115
+                        <div>
116
+                          <span style="margin-left: 38px;">{{it.arr[0].advice_name ? it.arr[0].advice_name : ""}}</span>&nbsp;&nbsp;
117
+                          <!-- v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit" -->
118
+                          <span >
119
+                            {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }}&nbsp;* {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
120
+                            {{it.arr[0].drug.max_unit}}
121
+                          </span>&nbsp;
122
+                        </div>
123
+                        <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
124
+                          &nbsp;共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
125
+                        </div>
126
+                      </template>
127
+                    </div>
128
+
129
+                    <div style="margin-left: 70px" >
130
+                      <template>
131
+                          用法:
132
+                          <!-- <div style="display: inline-block;">
133
+                            <template>
134
+                              <span style="margin-right: 0;" v-if="it.arr[0].length==0">{{ it.single_dose }}{{ it.single_dose_unit }}</span>
135
+                            </template>
136
+                          </div> -->
137
+                        &nbsp;&nbsp;<span>
138
+                          {{ it.execution_frequency }}&nbsp;{{
139
+                            it.delivery_way
140
+                          }}&nbsp;共{{ it.day}}天</span>&nbsp;&nbsp;<span>{{ it.advice_desc}}</span>
141
+                      </template>
142
+                    </div>
143
+
144
+                    <div style="margin-left: 70px" v-if="it.remark !=''">
145
+                      备注:<span > {{ it.remark }}</span>
146
+                    </div>
147
+                  </div>
148
+
149
+                  <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
150
+                    ×&nbsp;{{ it.prescribing_number}}
151
+                  </div>
152
+                  <!-- <div> -->
153
+                    <div style="display: inline-block;position: absolute;left:80%;bottom:15px;margin-left: 5px;" >
154
+                      ×&nbsp;{{ it.arr[0].prescribing_number}}
155
+                    </div>
156
+                  <!-- </div> -->
157
+                  <template>
158
+                      <!-- <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" v-if="(item.arr.length>0&&ite[0].groupno!=it.groupno) ||item.arr.length==0">
159
+                        &nbsp;共{{ it.prescribing_number}}{{ it.prescribing_number_unit }}
160
+                      </div> -->
161
+
162
+                      <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" >
163
+                        &nbsp;共{{ it.single_dose }}{{ it.single_dose_unit }}
164
+                      </div>
165
+                  </template>
166
+                </div>
167
+                <div v-if="it.arr === undefined">
168
+                  <div class="drugsOne" >
169
+                    <span style="font-weight: bold" >
170
+                      {{ index + 1 + "."}}
171
+                    </span>
172
+                    {{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;
173
+                    <span v-if="it.drug.min_unit != it.drug.dose_unit">
174
+                      {{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* {{ it.drug.min_number }}{{ it.drug.min_unit }}/
175
+                      {{it.drug.max_unit}}
176
+                    </span>&nbsp;
177
+                    <!-- <div>
178
+                      <template>
179
+                        <div>
180
+                          <span style="margin-left: 38px;">{{it.arr[0].advice_name ? it.arr[0].advice_name : ""}}</span>&nbsp;&nbsp;
181
+                          <span >
182
+                            {{ it.arr[0].drug.dose }}{{ it.arr[0].drug.dose_unit }}&nbsp;* {{ it.arr[0].drug.min_number }}{{ it.arr[0].drug.min_unit }}/
183
+                            {{it.arr[0].drug.max_unit}}
184
+                          </span>&nbsp;
185
+                        </div>
186
+                        <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
187
+                          &nbsp;共{{ it.arr[0].single_dose }}{{ it.arr[0].single_dose_unit }}
188
+                        </div>
189
+                      </template>
190
+                    </div> -->
191
+
192
+                    <div style="margin-left: 70px" >
193
+                      <template>
194
+                          用法:
195
+                          <span style="margin-right: 0;" >{{ it.single_dose }}{{ it.single_dose_unit }}</span>
196
+                        &nbsp;&nbsp;<span>
197
+                          {{ it.execution_frequency }}&nbsp;{{
198
+                            it.delivery_way
199
+                          }}&nbsp;共{{ it.day}}天</span><span>{{ it.advice_desc}} </span>
200
+                      </template>
201
+                    </div>
202
+
203
+                    <div style="margin-left: 70px" v-if="it.remark !=''">
204
+                      备注:<span > {{ it.remark }}</span>
205
+                    </div>
206
+                  </div>
207
+
208
+                  <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
209
+                    ×&nbsp;{{ it.prescribing_number}}
210
+                  </div>
211
+                  <!-- <div> -->
212
+                    <!-- <div style="display: inline-block;position: absolute;left:80%;bottom:15px;margin-left: 5px;" >
213
+                      ×&nbsp;{{ it.arr[0].prescribing_number}}
214
+                    </div> -->
215
+                  <!-- </div> -->
216
+                  <template>
217
+                      <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;">
218
+                        &nbsp;共{{ it.prescribing_number}}{{ it.prescribing_number_unit }}
219
+                      </div>
220
+
221
+                      <!-- <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" >
222
+                        &nbsp;共{{ it.single_dose }}{{ it.single_dose_unit }}
223
+                      </div> -->
224
+                  </template>
225
+                </div>
226
+
227
+                <!-------------------------------------------------------------------------->
228
+                <!-- <template>
229
+                  <div v-for="(ite,indexs) in item.arr" :key="indexs">
230
+                    <div class="drugsOne" :style="{'border-right':item.arr.length>0 && (ite[0].groupno==it.groupno) ? '1px solid black': 'none','width':'80%'}">
231
+                    <span style="font-weight: bold" >
232
+                      {{ index + 1 + "."}}
233
+                    </span>
234
+                    {{ it.advice_name ? it.advice_name : "" }}&nbsp;&nbsp;
235
+                    <span v-if="it.drug.min_unit != it.drug.dose_unit">
236
+                      {{ it.drug.dose }}{{ it.drug.dose_unit }}&nbsp;* {{ it.drug.min_number }}{{ it.drug.min_unit }}/
237
+                      {{it.drug.max_unit}}
238
+                    </span>&nbsp;
239
+                    <div >
240
+                      <template v-if="item.arr.length>0 && ite[0].groupno==it.groupno">
241
+                        <div >
242
+                          <span style="margin-left: 38px;">{{ite[0].advice_name ? ite[0].advice_name : ""}}</span>&nbsp;&nbsp;
243
+                          <span v-if="ite[0].drug.min_unit != ite[0].drug.dose_unit">
244
+                            {{ ite[0].drug.dose }}{{ ite[0].drug.dose_unit }}&nbsp;* {{ ite[0].drug.min_number }}{{ ite[0].drug.min_unit }}/
245
+                            {{ite[0].drug.max_unit}}
246
+                          </span>&nbsp;
247
+                        </div>
248
+                        <div style="display: inline-block;position: absolute;left:85%;top:20px;margin-left: 5px;" >
249
+                          &nbsp;共{{ ite[0].single_dose }}{{ ite[0].single_dose_unit }}
250
+                        </div>
251
+                      </template>
252
+                    </div>
253
+                    <div style="margin-left: 70px">
254
+                      用法:
255
+                      <span v-if="(item.arr.length>0 && item.arr[0][0].groupno!=it.groupno)||item.arr.length==0">{{ it.single_dose }}{{ it.single_dose_unit }}</span>
256
+                      &nbsp;&nbsp;<span>
257
+                        {{ it.execution_frequency }}&nbsp;{{
258
+                          it.delivery_way
259
+                        }}&nbsp;</span>&nbsp;&nbsp;<span>{{ it.advice_desc}}</span>
260
+                    </div>
261
+                    <div style="margin-left: 70px" v-if="it.remark !=''">
262
+                      备注:<span > {{ it.remark }}</span>
263
+                    </div>
264
+                    </div>
265
+                    <div style="display: inline-block;position: absolute;left:80%;bottom:30px;margin-left: 5px;" >
266
+                      ×&nbsp;{{ it.prescribing_number}}
267
+                    </div>
268
+                    <div >
269
+                      <template v-if="item.arr.length>0&&ite[0].groupno==it.groupno">
270
+                        <div style="display: inline-block;position: absolute;left:80%;bottom:15px;margin-left: 5px;" >
271
+                          ×&nbsp;{{ ite[0].prescribing_number}}
272
+                        </div>
273
+                      </template>
274
+                    </div>
275
+                    <template>
276
+                        <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" v-if="(item.arr.length>0&&item.arr[0][0].groupno!=it.groupno) || item.arr.length==0">
277
+                          &nbsp;共{{ it.prescribing_number}}{{ it.prescribing_number_unit }}
278
+                        </div>
279
+
280
+                        <div style="display: inline-block;position: absolute;left:85%;top:0px;margin-left: 5px;" v-if="item.arr.length>0&&item.arr[0][0].groupno==it.groupno">
281
+                          &nbsp;共{{ it.single_dose }}{{ it.single_dose_unit }}
282
+                        </div>
283
+
284
+                    </template>
285
+                  </div>
286
+
287
+                </template> -->
288
+
289
+              </div>
290
+              <template v-if="index==yi&&item.advices.length>5">
291
+                <div style="margin: 20px 0px;">
292
+                  <div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
293
+                    <div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
294
+                    <div style="flex: 1;">金额:
295
+                      {{ getTotalOne(item.id).toFixed(2)? getTotalOne(item.id).toFixed(2) : 0}}
296
+                    </div>
297
+                    <div style="flex: 1;">收费员:</div>
298
+                  </div>
299
+                  <div style="display: flex;">
300
+                    <div style="flex: 1;">审核医师:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</div>
301
+                    <div style="flex: 1;">调配药师:</div>
302
+                    <div style="flex: 1;">核/发药师:</div>
303
+                  </div>
304
+                </div>
305
+              </template>
306
+            </div>
307
+
308
+            <div
309
+              class="drugsBox"
310
+              v-for="(it, i) in item.additionalcharge"
311
+              :key="i"
312
+            >
313
+              <div class="drugsOne">
314
+                {{ it.item_name ? it.item_name : "" }}:&nbsp;{{ it.price }}元/{{
315
+                  it.count
316
+                }}次
317
+              </div>
318
+            </div>
319
+
320
+            <div
321
+              class="drugsBox"
322
+              v-for="(it, index) in item.project"
323
+              :key="index"
324
+            >
325
+              <div class="drugsOne">
326
+                <span style="font-weight: bold">{{ index + 1 + "." }}</span>
327
+                {{
328
+                  it.type == 2
329
+                    ? getProjectName(it.project_id)
330
+                      ? getProjectName(it.project_id)
331
+                      : ""
332
+                    : it.good_info.good_name
333
+                }}&nbsp;&nbsp;{{ it.single_dose
334
+                }}{{ it.single_dose_unit }}&nbsp;×&nbsp; {{ it.count }}{{ unit }}
335
+              </div>
336
+              <div style="margin-left: 100px">
337
+                <span>用法:{{ it.single_dose }}{{ it.single_dose_unit }}</span
338
+                >&nbsp;&nbsp;<span>{{ it.delivery_way }}</span
339
+                >&nbsp;&nbsp;<span>{{ it.advice_desc }}</span>
340
+              </div>
341
+            </div>
342
+
343
+            <div
344
+              class="drugsBox"
345
+              v-for="(it, i) in item.additionalcharge"
346
+              :key="i"
347
+            >
348
+              <div class="drugsOne">
349
+                {{ it.project_id ? it.project_id : "" }}:&nbsp;{{
350
+                  it.price.toFixed(2)
351
+                }}元/{{ it.count }}次
352
+              </div>
353
+            </div>
354
+            <div style="text-align: center">(以下空白)</div>
355
+          </div>
356
+          <div style="display: flex;border-top: 1px solid #000;margin: 10px 0;">
357
+            <div style="flex: 1;">医师:{{ getAdminUser(item.creator)}}</div>
358
+            <div style="flex: 1;">金额:
359
+              {{ getTotalOne(item.id).toFixed(2)? getTotalOne(item.id).toFixed(2) : 0}}
360
+            </div>
361
+            <div style="flex: 1;">收费员:</div>
362
+          </div>
363
+          <div style="display: flex;">
364
+            <div style="flex: 1;">审核医师:{{getDoctor(item.advices[0].checker)?getDoctor(item.advices[0].checker):""}}</div>
365
+            <div style="flex: 1;">调配药师:</div>
366
+            <div style="flex: 1;">核/发药师:</div>
367
+          </div>
368
+      </div>
369
+    </div>
370
+  </div>
371
+</template>
372
+<script>
373
+import { jsGetAge, uParseTime } from "@/utils/tools";
374
+import {
375
+  getAllDoctorList,
376
+  getPrescriptionPrint,
377
+  getHisPatientDetail,
378
+} from "@/api/project/project";
379
+import { getInitData } from "@/api/his/his";
380
+export default{
381
+  props: {
382
+    patient_id: Number,
383
+    record_date: String,
384
+    prescription_id: Number,
385
+    ids: String,
386
+  },
387
+  data() {
388
+    return {
389
+      doc_name:"",
390
+      doctorList: [],
391
+      advicePrint: {},
392
+      yi:4,
393
+      radio:'',
394
+      arr:[],
395
+      advicess:[],
396
+      page:sessionStorage.getItem('dayin'),
397
+      patient: {},
398
+      tableData: [],
399
+      prescriptionInfo: [],
400
+      hisPatient: {},
401
+      department: [],
402
+      prescriptions: [],
403
+      projectList: [],
404
+      orgname: "",
405
+      diagnoses: [],
406
+      org_id: 0,
407
+      operatorMaps: {},
408
+      operators: [],
409
+      doctorList_1: [],
410
+      adminUser:[],
411
+    };
412
+  },
413
+  methods: {
414
+    // 电子签名
415
+    setAdminUserES(id) {
416
+      console.log('5555555555',this.operatorMaps);
417
+      if (id == 0) {
418
+        return "";
419
+      }
420
+      if (id in this.operatorMaps) {
421
+        return this.operatorMaps[id].url;
422
+      } else {
423
+        return "";
424
+      }
425
+    },
426
+    getAdminUser(id) {
427
+      if (id == 0) {
428
+        return "";
429
+      }
430
+      if (id == undefined) {
431
+        return "";
432
+      }
433
+      for (let i = 0; i < this.adminUser.length; i++) {
434
+        if (this.adminUser[i].admin_user_id == id) {
435
+          return this.adminUser[i].user_name;
436
+        }
437
+      }
438
+    },
439
+    getAge(patient) {
440
+      if(patient.id_card_no == "TWN001836483"){
441
+        return patient.age
442
+      }else{
443
+        var thisLen = patient.id_card_no.length;
444
+        var birth = "";
445
+        if (thisLen == 15) {
446
+          birth = "19" + patient.id_card_no.substr(6, 6);
447
+        } else {
448
+          birth = patient.id_card_no.substr(6, 8);
449
+        }
450
+        var births =
451
+          birth.substr(0, 4) +
452
+          "-" +
453
+          birth.substr(4, 2) +
454
+          "-" +
455
+          birth.substr(6, 2);
456
+        return jsGetAge(births, "-");
457
+
458
+      }
459
+
460
+    },
461
+
462
+    getAllDoctorList() {
463
+      getAllDoctorList().then((response) => {
464
+        if (response.data.state == 1) {
465
+          var doctor = response.data.data.doctor;
466
+
467
+          this.doctorList = doctor;
468
+        }
469
+      });
470
+    },
471
+
472
+    getDoctor(id) {
473
+      var name = "";
474
+      for (let i = 0; i < this.doctorList.length; i++) {
475
+        if (id == this.doctorList[i].admin_user_id) {
476
+          name = this.doctorList[i].user_name;
477
+        }
478
+      }
479
+      return name;
480
+    },
481
+    getTime(value, temp) {
482
+      if (value != undefined) {
483
+        return uParseTime(value, '{y}年{m}月{d}日')
484
+      }
485
+      return "";
486
+    },
487
+    //数据源
488
+    getPrescriptionPrint() {
489
+      var params = {
490
+        patient_id: this.patient_id,
491
+        record_date: this.record_date,
492
+        prescription_id: this.prescription_id,
493
+        ids: this.ids,
494
+        p_type: 2,
495
+      };
496
+      getPrescriptionPrint(params).then((response) => {
497
+        if (response.data.state == 1) {
498
+          var advicePrint = response.data.data.advicePrint;
499
+          console.log("adviceprint9999", advicePrint);
500
+          console.log("response.data.data", response.data.data);
501
+          this.advicePrint = advicePrint;
502
+          this.prescriptions = advicePrint;
503
+          this.adminUser = response.data.data.roles
504
+          this.doctorList_1 = response.data.data.eles;
505
+         for(let i=0;i<this.advicePrint.length;i++){
506
+          const arr = new Array()
507
+          var advicess = new Array()
508
+          var advicess=advicePrint[i].advices
509
+
510
+         for(let j=0;j<advicess.length;j++){
511
+            for(let x=j+1;x<advicess.length;x++){
512
+              if(advicess[j].groupno == advicess[x].groupno){
513
+                arr.push(advicess.splice(x,1))
514
+              }
515
+            }
516
+          }
517
+
518
+          for(let x in arr){
519
+            for(let j in this.advicePrint[i].advices){
520
+              if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){
521
+                this.advicePrint[i]['advices'][j]['arr'] = arr[x]
522
+              }
523
+            }
524
+          }
525
+        }
526
+
527
+          // console.log('4444444',this.advicePrint);
528
+        //  console.log('55555555',this.arr);
529
+
530
+          // console.log(this.doctorList_1, "医生列表");
531
+          if (this.doctorList_1.length > 0) {
532
+            var operatorsLen = this.doctorList_1.length;
533
+            for (var index = 0; index < operatorsLen; index++) {
534
+              this.$set(
535
+                this.operatorMaps,
536
+                this.doctorList_1[index].creator,
537
+                this.doctorList_1[index]
538
+              );
539
+            }
540
+          }
541
+
542
+          // console.log("处方222222", this.prescriptions);
543
+          var hisPatient = response.data.data.hisPatient;
544
+          // console.log("hisPatient", hisPatient);
545
+          this.hisPatient = hisPatient;
546
+          var projectlist = response.data.data.projectlist;
547
+          // console.log("所有项目列表", projectlist);
548
+          this.projectList = projectlist;
549
+        }
550
+      });
551
+    },
552
+    getHisPatientDetail() {
553
+      const params = {
554
+        patient_id: this.patient_id,
555
+      };
556
+      getHisPatientDetail(params).then((response) => {
557
+        if (response.data.state == 1) {
558
+          var hisPatient = response.data.data.hisPatient;
559
+          console.log("挂号病人", hisPatient);
560
+          this.hisPatient = hisPatient;
561
+        }
562
+      });
563
+    },
564
+    getInitData() {
565
+      getInitData().then((response) => {
566
+        if (response.data.state == 1) {
567
+          this.department = response.data.data.department;
568
+          this.diagnoses = response.data.data.diagnose;
569
+          console.log("争端", this.diagnoses);
570
+        }
571
+      });
572
+    },
573
+    getDepart(id) {
574
+      var name = "";
575
+      for (let i = 0; i < this.department.length; i++) {
576
+        if (id == this.department[i].id) {
577
+          name = this.department[i].name;
578
+        }
579
+      }
580
+      return name;
581
+    },
582
+    getTotalOne(id) {
583
+      // console.log('999999999',this.prescriptions);
584
+      var total = 0;
585
+      var addtotal = 0;
586
+      var zimuyao = 0;
587
+      for (let i = 0; i < this.prescriptions.length; i++) {
588
+        if (id == this.prescriptions[i].id) {
589
+          if (this.prescriptions[i].project != null) {
590
+            for (let a = 0; a < this.prescriptions[i].project.length; a++) {
591
+              total =
592
+                total +
593
+                this.prescriptions[i].project[a].price *
594
+                  this.prescriptions[i].project[a].count ;
595
+            }
596
+          }
597
+
598
+          if (this.prescriptions[i].additionalcharge != null) {
599
+            for (
600
+              let a = 0;
601
+              a < this.prescriptions[i].additionalcharge.length;
602
+              a++
603
+            ) {
604
+              addtotal =
605
+                addtotal +
606
+                this.prescriptions[i].additionalcharge[a].price *
607
+                  this.prescriptions[i].additionalcharge[a].count ;
608
+            }
609
+          }
610
+          addtotal = Math.floor(addtotal * 100) / 100;
611
+        }
612
+      }
613
+
614
+      for (let i = 0; i < this.prescriptions.length; i++) {
615
+        if (id == this.prescriptions[i].id) {
616
+          if (this.prescriptions[i].advices != null) {
617
+            for (let a = 0; a < this.prescriptions[i].advices.length; a++) {
618
+              total =
619
+                total +
620
+                (this.prescriptions[i].advices[a].price *
621
+                  this.prescriptions[i].advices[a].prescribing_number) ;
622
+
623
+                if(this.prescriptions[i].advices[a].arr !=undefined){
624
+                  zimuyao = zimuyao +
625
+                  this.prescriptions[i].advices[a].arr[0].price *
626
+                  this.prescriptions[i].advices[a].arr[0].prescribing_number
627
+                }
628
+            }
629
+          }
630
+          // if(this.prescriptions[i].arr[0] != null){
631
+          //   for(let b=0;b<this.prescriptions[i].arr[0].length;b++){
632
+          //     zimuyao = zimuyao +
633
+          //     this.prescriptions[i].arr[b][0].price *
634
+          //     this.prescriptions[i].arr[b][0].prescribing_number
635
+          //   }
636
+          // }
637
+          if (this.prescriptions[i].additionalcharge != null) {
638
+            for (
639
+              let a = 0;
640
+              a < this.prescriptions[i].additionalcharge.length;
641
+              a++
642
+            ) {
643
+              addtotal =
644
+                addtotal +
645
+                (this.prescriptions[i].additionalcharge[a].price *
646
+                  this.prescriptions[i].additionalcharge[a].count );
647
+            }
648
+          }
649
+          addtotal = Math.floor(addtotal * 100) / 100;
650
+        }
651
+      }
652
+
653
+      return total + addtotal + zimuyao ;
654
+    },
655
+
656
+    getProjectName(id) {
657
+      var project_name = "";
658
+      for (let i = 0; i < this.projectList.length; i++) {
659
+        if (id == this.projectList[i].id) {
660
+          project_name = this.projectList[i].project_name;
661
+        }
662
+      }
663
+      return project_name;
664
+    },
665
+
666
+    getDiagnosis(id) {
667
+      let arr = id.split(",");
668
+      var name = "";
669
+      for (let i = 0; i < this.diagnoses.length; i++) {
670
+        if (arr.indexOf(String(this.diagnoses[i].id)) > -1) {
671
+          name += this.diagnoses[i].class_name + " ";
672
+        }
673
+      }
674
+      return name;
675
+    },
676
+    merge(arrA){
677
+      var len=arrA.lenfth
678
+      // for(let j=0;j<this.advicess.length;j++){
679
+      //   for(let x=j+1;x<this.advicess.length;x++){
680
+      //     if(this.advicess[j].groupno == this.advicess[x].groupno){
681
+      //       // this.arr.push(this.advicess.splice(x,1))
682
+      //       this.arrs=this.advicess.splice(x,1)
683
+      //     }
684
+      //   }
685
+      // }
686
+      for(let j=0;j<len;j++){
687
+        for(let x=j+1;x<len;x++){
688
+          if(arrA[j].groupno == arrA[x].groupno){
689
+            this.arr.push(arrA.splice(x,1))
690
+          }
691
+        }
692
+      }
693
+      console.log('777777777',this.arr);
694
+      return this.arr
695
+    }
696
+  },
697
+  created() {
698
+    this.getAllDoctorList();
699
+    this.getInitData();
700
+    this.getPrescriptionPrint();
701
+    this.getHisPatientDetail();
702
+    var xtuser = this.$store.getters.xt_user;
703
+    this.orgname = xtuser.org.org_name;
704
+    this.org_id = xtuser.org.id;
705
+    console.log('jjjjjj',this.orgname);
706
+    // for(let j=0;j<this.advicess.length;j++){
707
+    //   console.log('44444444');
708
+    //   for(let x=j+1;x<this.advicess.length;x++){
709
+    //     if(this.advicess[j].groupno == this.advicess[x].groupno){
710
+    //       this.arr.push(this.advicess.splice(x,1))
711
+    //     }
712
+    //   }
713
+    // }
714
+    // console.log('777777777',this.arr[0].advice_name);
715
+    // return this.arr
716
+
717
+  },
718
+
719
+  watch: {
720
+    ids: function (val) {
721
+      this.ids = val;
722
+      this.getPrescriptionPrint();
723
+    },
724
+  },
725
+};
726
+</script>
727
+
728
+
729
+<style lang="scss" scoped>
730
+.prescription-print {
731
+  -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
732
+    0 0 60px rgba(0, 0, 0, 0.06) inset;
733
+  -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27),
734
+    0 0 40px rgba(0, 0, 0, 0.06) inset;
735
+  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
736
+  margin-bottom: 20px;
737
+  padding: 20px 10px;
738
+}
739
+.printTitle {
740
+  font-size: 22px;
741
+  text-align: center;
742
+  font-weight: bold;
743
+}
744
+.infoTitle {
745
+  display: flex;
746
+  border-top: 2px solid #000;
747
+  margin-top: 10px;
748
+  line-height: 24px;
749
+  padding: 0 10px;
750
+
751
+}
752
+.infoTitle p {
753
+  width: 200px;
754
+}
755
+.infoMain {
756
+  display: flex;
757
+  flex-wrap: wrap;
758
+  border-bottom: 2px solid #000;
759
+  padding: 0 10px;
760
+}
761
+.infoMain div {
762
+  width: 50%;
763
+  line-height: 24px;
764
+}
765
+.prescriptionBox {
766
+  padding: 0 10px;
767
+  min-height: 450px;
768
+}
769
+.Rp {
770
+  font-size: 22px;
771
+  font-weight: bold;
772
+}
773
+.drugsBox {
774
+  padding-left: 40px;
775
+  margin-bottom: 10px;
776
+  position: relative;
777
+}
778
+.drugsBox div {
779
+  line-height: 20px;
780
+}
781
+.drugsOne {
782
+  line-height: 24px;
783
+  display: inline-block;
784
+  width: 80%;
785
+}
786
+.drugsOne span {
787
+  margin-right: 20px;
788
+}
789
+.doctorBox {
790
+  display: flex;
791
+  justify-content: space-between;
792
+  padding: 0 10px;
793
+  line-height: 24px;
794
+  border-bottom: 2px solid #000;
795
+}
796
+.doctorBoxs{
797
+  width: 100%;
798
+  margin-right: 30px;
799
+  text-align: right;
800
+  padding: 0 10px;
801
+  line-height: 24px;
802
+
803
+}
804
+.doctorBoxtwo {
805
+  display: flex;
806
+  justify-content: space-between;
807
+  padding: 0 10px;
808
+  line-height: 24px;
809
+
810
+}
811
+.actionBar {
812
+  display: flex;
813
+  justify-content: space-between;
814
+  line-height: 24px;
815
+  padding: 0 10px;
816
+}
817
+.actionBar p {
818
+  width: 150px;
819
+}
820
+</style>

+ 75 - 3
src/xt_pages/outpatientDoctorStation/template/printFour.vue Dosyayı Görüntüle

@@ -22,7 +22,31 @@
22 22
           <div class="prescriptionBox">
23 23
               <div class="Rp">Rp:</div>
24 24
               <div class="drugsBox" v-for="(it,index) in item.advices" :key="index"
25
+                :style="{'page-break-after':index==4&&item.advices.length>5? 'always':'auto'}"
25 26
               >
27
+                <template v-if="index==5&&item.advices.length>5">
28
+                  <div style="margin: 20px 0px;">
29
+                    <div class="printTitle">{{orgname}}处方笺</div>
30
+                    <div class="infoTitle">
31
+                      <p>姓名:{{ item.patient.name ? item.patient.name : "" }}</p>
32
+                      <p>
33
+                        性别:
34
+                        <span v-if="item.patient.gender == 1">男</span>
35
+                        <span v-if="item.patient.gender == 2">女</span>
36
+                      </p>
37
+                      <p>年龄:{{ getAge(item.patient) ? getAge(item.patient) : "" }}岁</p>
38
+                    </div>
39
+                    <div class="infoMain">
40
+                      <div style="margin-bottom: 10px;">门诊号:{{hisPatient.number?hisPatient.number:""}}</div>
41
+                <div style="margin-bottom: 10px;">科室:{{item.info?getDepart(item.info.departments):''}}</div>
42
+                      <div style="margin-bottom: 10px;">医保卡号:{{item.hisPatient.number?item.hisPatient.number:""}}</div>
43
+                      <div style="margin-bottom: 10px;">电话:{{item.patient.phone}}</div>
44
+                      <div>地址:{{item.patient.home_address}}</div>
45
+                      <div style="display:flex;width:50%;">临床诊断:{{getDiagnosis(item.info.diagnosis)}}</div>
46
+                    </div>
47
+                    <div class="Rp">Rp:</div>
48
+                  </div>
49
+                </template>
26 50
               <!-- :style="{'page-break-after':index==yi&&item.advices.length>5? 'always':'auto'}" -->
27 51
                   <!-- <div class="drugsOne"><span style="font-weight:bold;">{{ index+1 + '.' }}</span>{{it.advice_name?it.advice_name:""}}&nbsp;&nbsp;{{it.single_dose}}{{it.single_dose_unit}}&nbsp;×&nbsp; {{it.prescribing_number}}{{it.prescribing_number_unit}}</div> -->
28 52
                   <div class="drugsOne" >
@@ -36,6 +60,54 @@
36 60
                   <div style="margin-left:100px;">
37 61
                     <span>{{it.drug.drug_spec}}&nbsp;×&nbsp;{{it.prescribing_number}}{{it.prescribing_number_unit}}</span>
38 62
                   </div>
63
+                  <template v-if="index==4&&item.advices.length>5">
64
+                    <div style="margin: 100px 0 0 0;">
65
+                      <div class="doctorBox">
66
+                        <p v-if="org_id!=10598 && org_id!=0 ">
67
+                        医师:
68
+                        <span
69
+                            style="width: 100px; display: inline-block"
70
+                            v-if="item.creator == ''"
71
+                          >
72
+                            {{ item.doctor ? item.doctor : "" }}
73
+                          </span>
74
+                          <img
75
+                            style="height: 30px"
76
+                            :src="setAdminUserES(item.creator,item.doctor)"
77
+                            alt=""
78
+                            srcset=""
79
+                            v-else
80
+                          />
81
+                        </p>
82
+                        <p v-if="org_id==10598 || org_id==0">
83
+                        医师:
84
+                          <img
85
+                            style="height: 30px"
86
+                            :src="setAdminUserES(item.creator,item.doctor)"
87
+                            alt=""
88
+                            srcset=""
89
+                          />
90
+                        </p>
91
+                          <p>日期:{{getTime(item.ctime)?getTime(item.ctime):""}}</p>
92
+                      </div>
93
+
94
+                      <div class="actionBar" >
95
+
96
+                        <p>审核:</p>
97
+                        <p>配对:</p>
98
+                        <p>核对:</p>
99
+                        <p>发药:</p>
100
+                        <p>
101
+                          金额:{{
102
+                            getTotalOne(item.id).toFixed(2)
103
+                              ? getTotalOne(item.id).toFixed(2)
104
+                              : 0
105
+                          }}元
106
+                        </p>
107
+
108
+                      </div>
109
+                    </div>
110
+                  </template>
39 111
               </div>
40 112
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
41 113
                 <div class="drugsOne">{{it.item_name?it.item_name:""}}:&nbsp;{{it.price}}元/{{it.count}}次</div>
@@ -47,9 +119,9 @@
47 119
               </div>
48 120
               <div class="drugsBox" v-for="(it,i) in item.additionalcharge" :key="i">
49 121
                 <div class="drugsOne">{{it.project_id?it.project_id:""}}:&nbsp;{{it.price.toFixed(2)}}元/{{it.count}}次</div>
50
-               </div>
51
-               <div style="text-align:center;" >(以下空白)</div>
52
-
122
+              </div>
123
+              <div style="text-align:center;" >(以下空白)</div>
124
+              
53 125
           </div>
54 126
           <div class="doctorBox">
55 127
             <p v-if="org_id!=10598 && org_id!=0 ">

+ 12 - 10
src/xt_pages/user/evaluationtool/Glasgow.vue Dosyayı Görüntüle

@@ -122,6 +122,7 @@
122 122
               <el-table
123 123
               :data="history_Glasgow"
124 124
               stripe
125
+              ref="eltable"
125 126
               border
126 127
               @row-click="glasgow_click"
127 128
               :highlight-current-row="true"
@@ -479,11 +480,8 @@ export default {
479 480
     },
480 481
     // 选中数据
481 482
     glasgow_click(row,column, event){
482
-      if(row.id == 0){
483
-        this.dele_id =this.dele_id2
484
-      }else{
483
+      
485 484
         this.dele_id=row.id
486
-      }
487 485
       
488 486
       // if(this.cancel_num == 1){
489 487
       //   this.Glasadd_show = true
@@ -561,11 +559,12 @@ export default {
561 559
     deleclick(){
562 560
       deletePedPatientFallassment(this.dele_id).then(response =>{
563 561
         if(response.data.state == 1){
564
-          for(let i=0;i<this.history_Glasgow.length;i++){
565
-            if(this.dele_id==this.history_Glasgow[i].id){
566
-              this.history_Glasgow.splice(i,1)
567
-            }
568
-          }
562
+          this.getlist()
563
+          // for(let i=0;i<this.history_Glasgow.length;i++){
564
+          //   if(this.dele_id==this.history_Glasgow[i].id){
565
+          //     this.history_Glasgow.splice(i,1)
566
+          //   }
567
+          // }
569 568
           for(let i=0;i<this.zhengyan.length;i++){
570 569
         
571 570
             this.zhengyan[i].check =0
@@ -695,9 +694,12 @@ export default {
695 694
                   glasgow_input:text.glasgow_input,
696 695
                   list:text
697 696
                 }
698
-                this.history_Glasgow.push(arr)
697
+                this.history_Glasgow.unshift(arr)
699 698
             }
700 699
           });
700
+          this.$refs.eltable.setCurrentRow(this.$refs.eltable.data[0])
701
+          const eltable = this.$refs.eltable.data[0]
702
+          this.dele_id = eltable.id
701 703
           var total = response.data.data.total
702 704
           console.log('list',list);
703 705
         }

+ 13 - 22
src/xt_pages/user/evaluationtool/Muscleforce.vue Dosyayı Görüntüle

@@ -92,6 +92,7 @@
92 92
               <div style="width: 100%;">
93 93
                   <el-table
94 94
                   :data="history_muscle"
95
+                  ref="eltable"
95 96
                   stripe
96 97
                   border
97 98
                   @row-click="Muscle_click"
@@ -229,7 +230,6 @@ export default {
229 230
       cancel_num:0,//是否点击右侧
230 231
       open_print:false,
231 232
       dele_id:'',
232
-      dele_id2:'',
233 233
       dele_dialogVisible:false,
234 234
       content:"",
235 235
       text:"",
@@ -309,17 +309,6 @@ export default {
309 309
           if(response.data.state == 1){
310 310
             console.log('response',response.data.data);
311 311
             const muscle = response.data.data.pedFallssessment
312
-            // if(muscle.text !=''){
313
-            //   const text = JSON.parse(muscle.text)
314
-            //   this.dele_id2 = muscle.id
315
-            //   const arr={
316
-            //     id:muscle.id,
317
-            //     date:text.date,
318
-            //     mark:text.total,
319
-            //     evaluate:this.getpinggr(text.muscle_pinggu)
320
-            //   }
321
-            //   this.history_muscle.push(arr)
322
-            // }
323 312
             this.getlist()
324 313
             this.$message({message:'保存成功',type:'success'})
325 314
           }
@@ -370,11 +359,8 @@ export default {
370 359
     },
371 360
     // 选中右侧数据
372 361
     Muscle_click(row,column, event){
373
-      if(row.id ==0){
374
-        this.dele_id=this.dele_id2 
375
-      }else{
362
+     
376 363
         this.dele_id=row.id
377
-      }
378 364
       console.log('row.id',this.dele_id);
379 365
       this.muscle_show=true
380 366
       this.baocun_quxiao=false
@@ -422,11 +408,12 @@ export default {
422 408
     deleclick(){
423 409
       deletePedPatientFallassment(this.dele_id).then(response =>{
424 410
         if(response.data.state == 1){
425
-          for(let i=0;i<this.history_muscle.length;i++){
426
-            if(this.dele_id==this.history_muscle[i].id){
427
-              this.history_muscle.splice(i,1)
428
-            }
429
-          }
411
+          // for(let i=0;i<this.history_muscle.length;i++){
412
+          //   if(this.dele_id==this.history_muscle[i].id){
413
+          //     this.history_muscle.splice(i,1)
414
+          //   }
415
+          // }
416
+          this.getlist()
430 417
         }
431 418
       })
432 419
       this.dele_dialogVisible=false
@@ -549,10 +536,14 @@ export default {
549 536
                 content: text.content,
550 537
                 muscle_pinggu: text.muscle_pinggu
551 538
               }
552
-              this.history_muscle.push(arr)
539
+              
540
+              this.history_muscle.unshift(arr)
553 541
             }
554 542
             
555 543
           });
544
+          this.$refs.eltable.setCurrentRow(this.$refs.eltable.data[0])
545
+          const eltable = this.$refs.eltable.data[0]
546
+          this.dele_id = eltable.id
556 547
         }
557 548
       })
558 549
     },

+ 36 - 21
src/xt_pages/user/evaluationtool/OHpressuresore.vue Dosyayı Görüntüle

@@ -137,14 +137,17 @@
137 137
             <div style="font-size: 20px; margin-bottom: 20px;">评估历史记录</div>
138 138
             <div style="width: 100%;">
139 139
               <el-table
140
-              :data="history_OH"
141
-              stripe
142
-              border
143
-              @row-click="dele_click"
144
-              :highlight-current-row="true"
145
-              :header-cell-style="{
146
-                  background: '#0077ff9f',color:'white'}"
147
-              style="width: 100%">
140
+                :data="history_OH"
141
+                stripe
142
+                ref="eltable"
143
+                border
144
+                @row-click="dele_click"
145
+                :highlight-current-row="true"
146
+                :header-cell-style="{
147
+                    background: '#0077ff9f',color:'white'}"
148
+                style="width: 100%"
149
+                @selection-change="handleSelectionChange"
150
+              >
148 151
                   <el-table-column
149 152
                   prop="date"
150 153
                   label="评估日期"
@@ -338,12 +341,16 @@ export default {
338 341
     }
339 342
   },
340 343
   methods:{
344
+    // 患者信息
341 345
     tranpatient(event){
342 346
       console.log('event',event);
343 347
       this.Patient_info={
344 348
         name:event.name,
345 349
         dialysis_no:event.dialysis_no
346 350
       }
351
+    },
352
+    handleSelectionChange(){
353
+
347 354
     },
348 355
     //选择的总分
349 356
     handleCheckedCitiesChange(e,item){
@@ -605,11 +612,12 @@ export default {
605 612
             offset:150
606 613
           })
607 614
           console.log('1111111',response.data);
608
-          for(let i in this.history_OH){
609
-            if(this.dele_id == this.history_OH[i].id){
610
-              this.history_OH.splice(i,1)
611
-            }
612
-          }
615
+          this.getlist()
616
+          // for(let i in this.history_OH){
617
+          //   if(this.dele_id == this.history_OH[i].id){
618
+          //     this.history_OH.splice(i,1)
619
+          //   }
620
+          // }
613 621
           this.oh_appraiser = ''
614 622
           this.oh_huli = ''
615 623
             for(let i in this.tiwei){
@@ -736,8 +744,12 @@ export default {
736 744
                 evaluate:this.getpinggr(oh_text.oh_appraiser),
737 745
                 list:oh_text
738 746
               }
739
-              this.history_OH.push(arr)
747
+              this.history_OH.unshift(arr)
740 748
           });
749
+          this.$refs.eltable.setCurrentRow(this.$refs.eltable.data[0])
750
+          const eltable = this.$refs.eltable.data[0]
751
+          this.dele_id = eltable.id
752
+
741 753
           var total = response.data.data.total
742 754
           console.log('list',list);
743 755
         }
@@ -801,13 +813,16 @@ export default {
801 813
 
802 814
     }
803 815
   },
804
- created(){
805
-  const id = this.$route.params && this.$route.params.id
806
-  this.patientID = parseInt(id)
807
-  console.log('this.$route.query.patient_id',this.patientID);
808
-  this.getlist()
809
-  this.getAllNurseList()
810
- }
816
+  created(){
817
+    const id = this.$route.params && this.$route.params.id
818
+    this.patientID = parseInt(id)
819
+    console.log('this.$route.query.patient_id',this.patientID);
820
+    this.getlist()
821
+    this.getAllNurseList()
822
+  },
823
+  mounted(){
824
+    
825
+  }
811 826
 }
812 827
 </script>
813 828
 <style lang="scss" scoped>

+ 11 - 10
src/xt_pages/user/evaluationtool/hemodialysis.vue Dosyayı Görüntüle

@@ -665,6 +665,7 @@
665 665
               <div style="width: 100%;">
666 666
                   <el-table
667 667
                   :data="history_hemod"
668
+                  ref="eltable"
668 669
                   stripe
669 670
                   border
670 671
                   @row-click="hemod_click"
@@ -1800,18 +1801,17 @@ export default {
1800 1801
               shouj_input2 : text.shouj_input2,
1801 1802
             }
1802 1803
             console.log('this.history_hemod',this.history_hemod);
1803
-            this.history_hemod.push(arr)
1804
+            this.history_hemod.unshift(arr)
1804 1805
           });
1806
+          this.$refs.eltable.setCurrentRow(this.$refs.eltable.data[0])
1807
+          const eltable = this.$refs.eltable.data[0]
1808
+          this.dele_id = eltable.id
1805 1809
         }
1806 1810
       })
1807 1811
     },
1808 1812
     //选中行
1809 1813
     hemod_click(row,column, event){
1810
-      if(row.id ==0){
1811
-        this.dele_id= this.dele_id2
1812
-      }else{
1813 1814
         this.dele_id=row.id
1814
-      }
1815 1815
       
1816 1816
       this.hemodadd_show=true
1817 1817
       this.baocunqx = false
@@ -2585,11 +2585,12 @@ export default {
2585 2585
     deleclick(){
2586 2586
       deletePedPatientFallassment(this.dele_id).then(response =>{
2587 2587
         if(response.data.state ==1){
2588
-          for(let i=0;i<this.history_hemod.length;i++){
2589
-            if(this.dele_id==this.history_hemod[i].id){
2590
-              this.history_hemod.splice(i,1)
2591
-            }
2592
-          }
2588
+          this.getlist()
2589
+          // for(let i=0;i<this.history_hemod.length;i++){
2590
+          //   if(this.dele_id==this.history_hemod[i].id){
2591
+          //     this.history_hemod.splice(i,1)
2592
+          //   }
2593
+          // }
2593 2594
           this.check1 = false
2594 2595
           this.check2 = false
2595 2596
           this.check3 = false