Преглед на файлове

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

陈少旭 преди 1 година
родител
ревизия
8d913b52ae

+ 18 - 3
src/xt_pages/outpatientDoctorStation/checkTemplate/printThree.vue Целия файл

@@ -88,7 +88,7 @@
88 88
             padding: 0 10px;
89 89
           "
90 90
         >
91
-          <div>开单医生:{{ doctor ? doctor : "" }}</div>
91
+          <div>开单医生: {{ getAdminUser(item.creator) }}</div>
92 92
           <div>
93 93
             开单日期:
94 94
             {{ getTime(pre_time) ? getTime(pre_time).split(" ")[0] : "" }}
@@ -145,6 +145,7 @@ export default {
145 145
       org_id: "",
146 146
       singleProjectPrint: [],
147 147
       operatorMaps: {},
148
+      adminUser:[],
148 149
     };
149 150
   },
150 151
   methods: {
@@ -198,7 +199,7 @@ export default {
198 199
       }
199 200
       return "";
200 201
     },
201
-
202
+    // 数据源
202 203
     getPrescriptionPrint() {
203 204
       var params = {
204 205
         // patient_id:this.patient_id,
@@ -217,8 +218,9 @@ export default {
217 218
           console.log("adviceprint9999", advicePrint);
218 219
           this.advicePrint = advicePrint;
219 220
           this.prescriptions = advicePrint;
220
-          // console.log("处方222222", this.prescriptions);
221
+          console.log("处方222222", response.data.data);
221 222
           var hisPatient = response.data.data.hisPatient;
223
+          this.adminUser = response.data.data.roles
222 224
           // console.log("hisPatient", hisPatient);
223 225
           this.hisPatient = hisPatient;
224 226
           let projectPrint = [];
@@ -292,6 +294,19 @@ export default {
292 294
         return "";
293 295
       }
294 296
     },
297
+    getAdminUser(id) {
298
+      if (id == 0) {
299
+        return "";
300
+      }
301
+      if (id == undefined) {
302
+        return "";
303
+      }
304
+      for (let i = 0; i < this.adminUser.length; i++) {
305
+        if (this.adminUser[i].admin_user_id == id) {
306
+          return this.adminUser[i].user_name;
307
+        }
308
+      }
309
+    },
295 310
     getHisPatientDetail() {
296 311
       const params = {
297 312
         patient_id: this.patient_id,

+ 39 - 14
src/xt_pages/outpatientDoctorStation/template/prinSeven.vue Целия файл

@@ -289,7 +289,9 @@
289 289
               <template v-if="index==yi&&item.advices.length>5">
290 290
                 <div style="margin: 20px 0px;">
291 291
                   <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
292
-                    <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
292
+                    <p style="text-align: right;">医师:{{ getAdminUser(item.creator)}}</p>
293
+                    <!-- <span v-if="setAdminUserES(item.creator)==''" ></span>{{ item.doctor ? item.doctor : "" }} -->
294
+                    <!-- <img style="height:30px;" :src="setAdminUserES(item.creator)" alt srcset /> -->
293 295
                   </div>
294 296
 
295 297
                   <div class="actionBar" >
@@ -404,7 +406,10 @@
404 406
             <p>日期:{{ getTime(item.ctime) ? getTime(item.ctime) : "" }}</p>
405 407
           </div> -->
406 408
           <div  style="border-bottom: 2px solid #000; width: 100%;margin-right: 30px;padding: 0 10px;line-height: 24px;" >
407
-            <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p>
409
+            <!-- <p style="text-align: right;">医师:{{ item.doctor ? item.doctor : "" }}</p> -->
410
+            <p style="text-align: right;">医师:{{ getAdminUser(item.creator)}}</p>
411
+            <!-- <span ></span>  -->
412
+            <!-- <img style="height:30px;" :src="setAdminUserES(item.creator)" alt srcset /> -->
408 413
           </div>
409 414
           <!-- <div style="display: flex;justify-content: space-around;border-bottom: 2px solid #000;">
410 415
             <p style="width:300px;">大额处方患者意见:
@@ -488,26 +493,49 @@ export default{
488 493
       operatorMaps: {},
489 494
       operators: [],
490 495
       doctorList_1: [],
496
+      adminUser:[],
491 497
     };
492 498
   },
493 499
   methods: {
494 500
     // 电子签名
495
-    setAdminUserES(id,name) {
496
-      console.log(id)
497
-      console.log(name)
498
-      console.log(this.operatorMaps)
499
-
500
-
501
+    // setAdminUserES(id,name) {
502
+    //   console.log(id)
503
+    //   console.log(name)
504
+    //   console.log(this.operatorMaps)
505
+    //   if (id == 0) {
506
+    //     return "";
507
+    //   }
508
+    //   if (id in this.operatorMaps) {
509
+    //     return this.operatorMaps[id].url;
510
+    //   } else {
511
+    //     this.doc_name = name
512
+    //     return "";
513
+    //   }
514
+    // },
515
+    setAdminUserES(id) {
516
+      console.log('5555555555',this.operatorMaps);
501 517
       if (id == 0) {
502 518
         return "";
503 519
       }
504 520
       if (id in this.operatorMaps) {
505 521
         return this.operatorMaps[id].url;
506 522
       } else {
507
-        this.doc_name = name
508 523
         return "";
509 524
       }
510 525
     },
526
+    getAdminUser(id) {
527
+      if (id == 0) {
528
+        return "";
529
+      }
530
+      if (id == undefined) {
531
+        return "";
532
+      }
533
+      for (let i = 0; i < this.adminUser.length; i++) {
534
+        if (this.adminUser[i].admin_user_id == id) {
535
+          return this.adminUser[i].user_name;
536
+        }
537
+      }
538
+    },
511 539
     getAge(patient) {
512 540
       if(patient.id_card_no == "TWN001836483"){
513 541
         return patient.age
@@ -556,6 +584,7 @@ export default{
556 584
       }
557 585
       return "";
558 586
     },
587
+    //数据源
559 588
     getPrescriptionPrint() {
560 589
       var params = {
561 590
         patient_id: this.patient_id,
@@ -571,7 +600,7 @@ export default{
571 600
           console.log("response.data.data", response.data.data);
572 601
           this.advicePrint = advicePrint;
573 602
           this.prescriptions = advicePrint;
574
-
603
+          this.adminUser = response.data.data.roles
575 604
           this.doctorList_1 = response.data.data.eles;
576 605
          for(let i=0;i<this.advicePrint.length;i++){
577 606
           const arr = new Array()
@@ -586,10 +615,6 @@ export default{
586 615
             }
587 616
           }
588 617
 
589
-        //   this.advicePrint[i]['advices'][0]['arr'] = arr
590
-        //  this.advicePrint[i]["arr"]    = arr
591
-        //  console.log('55555',arr);
592
-        //   console.log('ttttt',arr);
593 618
           for(let x in arr){
594 619
             for(let j in this.advicePrint[i].advices){
595 620
               if(arr[x][0].groupno==this.advicePrint[i].advices[j].groupno){

+ 20 - 4
src/xt_pages/outpatientDoctorStation/treatTemplate/printThree.vue Целия файл

@@ -77,7 +77,7 @@
77 77
           </div>
78 78
 
79 79
           <div style="display: flex; margin-top: 10px; line-height: 24px;padding: 0 10px;">
80
-              <div style="width: 300px;">开单医生:{{item.doctor?item.doctor:''}}</div>
80
+              <div style="width: 300px;">开单医生:{{getAdminUser(item.creator)}}</div>
81 81
               <div style="width: 300px;">签章:</div>
82 82
               <div style="width: 300px;">费用:{{getTotalOne(item.id).toFixed(2)?getTotalOne(item.id).toFixed(2):''}}元</div>
83 83
           </div>
@@ -250,7 +250,8 @@ export default {
250 250
 
251 251
         ],
252 252
       hisPatient: {},
253
-      diagnoses: []
253
+      diagnoses: [],
254
+      adminUser:[]
254 255
     }
255 256
   },
256 257
   methods: {
@@ -293,7 +294,20 @@ export default {
293 294
         }
294 295
       })
295 296
     },
296
-
297
+    // 医生签名
298
+    getAdminUser(id) {
299
+      if (id == 0) {
300
+        return "";
301
+      }
302
+      if (id == undefined) {
303
+        return "";
304
+      }
305
+      for (let i = 0; i < this.adminUser.length; i++) {
306
+        if (this.adminUser[i].admin_user_id == id) {
307
+          return this.adminUser[i].user_name;
308
+        }
309
+      }
310
+    },
297 311
     getDoctor(id) {
298 312
       var name = ''
299 313
       for (let i = 0; i < this.doctorList.length; i++) {
@@ -309,6 +323,7 @@ export default {
309 323
       }
310 324
       return ''
311 325
     },
326
+    // 数据源
312 327
     getPrescriptionPrint() {
313 328
       var params = {
314 329
         patient_id: this.patient_id,
@@ -317,14 +332,15 @@ export default {
317 332
         ids: this.ids,
318 333
         p_type:2,
319 334
       }
320
-      console.log('999999', params)
321 335
       getPrescriptionPrint(params).then(response => {
322 336
         if (response.data.state == 1) {
323 337
           var advicePrint = response.data.data.advicePrint
338
+          console.log('ttttttt',response.data.data);
324 339
           console.log('adviceprint', advicePrint)
325 340
           this.advicePrint = advicePrint
326 341
           this.prescriptions = advicePrint
327 342
           var projectlist = response.data.data.projectlist
343
+          this.adminUser = response.data.data.roles
328 344
           console.log('所有项目列表', projectlist)
329 345
           this.projectList = projectlist
330 346
           this.hisPatient = response.data.data.hisPatient