Procházet zdrojové kódy

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

yq1 před 3 dny
rodič
revize
b1ae3be8d3

+ 9 - 0
src/api/dialysis.js Zobrazit soubor

@@ -566,4 +566,13 @@ export function getDialysisProject(params){
566 566
     method:"Get",
567 567
     params:params
568 568
   })
569
+}
570
+
571
+export function getPatientBefor(params){
572
+ 
573
+  return request({
574
+    url:"/api/schedule/getpatientbefor",
575
+    method:"Get",
576
+    params:params,
577
+  })
569 578
 }

+ 44 - 2
src/xt_pages/dialysis/batch_print/batch_print_order_eighty.vue Zobrazit soubor

@@ -40,10 +40,11 @@
40 40
               </div>
41 41
             </div>
42 42
             <div class="inline_block" style="flex: 1;">
43
-              年龄:
43
+              年龄1:
44 44
               <div class="under_line" style="width: 30px; text-align: center">
45 45
                 <!-- {{ record.patient.age }} -->
46
-                {{ getAge(record.patient) }}
46
+                <!-- {{ getAge(record.patient) }} -->
47
+                {{ calculateAge(record.patient.id_card_no,record.prescription.record_date) }}
47 48
               </div>
48 49
49 50
             </div>
@@ -1931,6 +1932,47 @@ export default {
1931 1932
       });
1932 1933
   },
1933 1934
   methods: {
1935
+    calculateAge(idNumber,created_time) {
1936
+    var year = this.getTimeOne(created_time)
1937
+
1938
+    var month = this.getTimeTwo(created_time)
1939
+
1940
+    var day = this.getTimeThree(created_time)
1941
+    console.log("start_time=====",year)
1942
+    // 假设身份证号码是18位,且生日在第7位到第14位
1943
+    const birthYear = parseInt(idNumber.substring(6, 10), 10);
1944
+    const birthMonth = parseInt(idNumber.substring(10, 12), 10);
1945
+    const birthDay = parseInt(idNumber.substring(12, 14), 10);
1946
+ 
1947
+    const today = new Date();
1948
+    // console.log("today============",today)
1949
+    var ageYear = year - birthYear;
1950
+    let ageMonth = month - birthMonth; // 月份是从0开始的
1951
+    let ageDay = day - birthDay;
1952
+ 
1953
+    // 调整月份和日期,以便于正确计算
1954
+      if (ageDay < 0) {
1955
+          ageMonth -= 1;
1956
+          // 获取上个月的天数
1957
+          const pastMonthDay = new Date(year,month, 0).getDate();
1958
+          ageDay += pastMonthDay;
1959
+      }
1960
+      if (ageMonth < 0) {
1961
+          ageYear -= 1;
1962
+          ageMonth += 12;
1963
+      }
1964
+   
1965
+     return ageYear 
1966
+    },
1967
+    getTimeOne(val) {
1968
+      return uParseTime(val, "{y}");
1969
+    },
1970
+    getTimeTwo(val) {
1971
+      return uParseTime(val, "{m}");
1972
+    },
1973
+    getTimeThree(val) {
1974
+      return uParseTime(val, "{h}");
1975
+    },
1934 1976
     getmode(id){
1935 1977
       const options = this.modeOptions
1936 1978
       if(id !=0){

+ 2 - 1
src/xt_pages/dialysis/batch_print/batch_print_order_sixtyeight.vue Zobrazit soubor

@@ -2980,9 +2980,10 @@
2980 2980
                           />
2981 2981
                         </div>
2982 2982
                       </div>
2983
-                      <div class="inline_block" style="flex: 1">
2983
+                      <div class="inline_block" style="flex: 1" >
2984 2984
                         治疗医生:
2985 2985
                         <div
2986
+                          v-if="org_id!=10677"
2986 2987
                           class="under_line"
2987 2988
                           style="width: 80px; text-align: center"
2988 2989
                         >

+ 1 - 1
src/xt_pages/dialysis/bloodPresssWatch.vue Zobrazit soubor

@@ -1921,7 +1921,7 @@ export default {
1921 1921
           this.$message.error(response.data.msg);
1922 1922
           return false;
1923 1923
         } else {
1924
-          if(this.org_id ==10206){
1924
+          if(this.org_id ==10206 || this.org_id == 0){
1925 1925
             this.template_id = 80
1926 1926
             // this.template_id = 81
1927 1927
             console.log("templage-i233232323232322323233232323223",this.template_id)

+ 57 - 5
src/xt_pages/dialysis/details/dialog/dialysisPrescriptionDialog.vue Zobrazit soubor

@@ -1476,7 +1476,7 @@
1476 1476
 </template>
1477 1477
 
1478 1478
 <script>
1479
-  import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution,saveInformation,getPatientRecordList } from '@/api/dialysis'
1479
+  import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution,saveInformation,getPatientRecordList,getPatientBefor } from '@/api/dialysis'
1480 1480
   import { getDataConfig } from '@/utils/data'
1481 1481
   import { calculateAnticoagulantZL, uParseTime,replacementFlow } from '@/utils/tools'
1482 1482
   import store from '@/store'
@@ -2634,16 +2634,17 @@ mu
2634 2634
         }
2635 2635
       },
2636 2636
       show(pre, schedual, last, his_is_open,is_advice_open,admins) {
2637
-
2637
+        console.log("除非=======================")
2638
+      
2638 2639
         if(this.$store.getters.xt_user.template_info.org_id==10702 || this.$store.getters.xt_user.template_info.org_id==10635  || this.$store.getters.xt_user.template_info.org_id==0   || this.$store.getters.xt_user.template_info.org_id==10721){
2639 2640
           if(this.predialysis!=undefined){
2640 2641
             if(this.dialysisPrescription.target_ultrafiltration==0 || this.dialysisPrescription.target_ultrafiltration==""){
2641
-              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
2642
+              this.dialysisPrescription.target_ultrafiltration = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(1)
2642 2643
             }
2643 2644
 
2644 2645
             if(this.dialysisPrescription.prescription_water==0 || this.dialysisPrescription.prescription_water==""){
2645
-              if((this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)>0){
2646
-                this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(2)
2646
+              if((this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(1)>0){
2647
+                this.dialysisPrescription.prescription_water = (this.predialysis.weight_before - this.predialysis.dry_weight - this.predialysis.additional_weight).toFixed(1)
2647 2648
               }
2648 2649
 
2649 2650
             }
@@ -3100,6 +3101,10 @@ mu
3100 3101
         this.pre = pre
3101 3102
         // console.log("pre1", pre);
3102 3103
         this.getPermission()
3104
+        if(this.$store.getters.xt_user.template_info.org_id==10164 || this.$store.getters.xt_user.template_info.org_id==10721 || this.$store.getters.xt_user.template_info.org_id==10635 || this.$store.getters.xt_user.template_info.org_id==0){
3105
+          this.getPatientBefor()
3106
+        }
3107
+      
3103 3108
 
3104 3109
         let last_weight_after = 0
3105 3110
         let weight_before = 0
@@ -4884,6 +4889,53 @@ mu
4884 4889
           }
4885 4890
         })
4886 4891
     },
4892
+    getPatientBefor(){
4893
+     
4894
+       var patient_id = 0
4895
+       var record_date =""
4896
+       if(this.$route.query.patient_id!=undefined){
4897
+        patient_id =this.$route.query.patient_id
4898
+        record_date = uParseTime(this.$route.query.date, '{y}-{m}-{d}')
4899
+       }else{
4900
+        patient_id = this.patient.id
4901
+        record_date = this.record_date
4902
+       }
4903
+       var params = {
4904
+        patient_id:patient_id,
4905
+        record_date:record_date
4906
+       }
4907
+       console.log("param----------------",params)
4908
+      getPatientBefor(params).then(response=>{
4909
+         if(response.data.state == 1){
4910
+          var patientBefor = response.data.data.patientBefor
4911
+          var prescription = response.data.data.prescription
4912
+          if(patientBefor!=undefined){
4913
+            if(this.dialysisPrescription.target_ultrafiltration==0 || this.dialysisPrescription.target_ultrafiltration==""){
4914
+              this.dialysisPrescription.target_ultrafiltration = (patientBefor.weight_before - patientBefor.dry_weight - patientBefor.additional_weight).toFixed(1)
4915
+            }
4916
+
4917
+            if(this.dialysisPrescription.prescription_water==0 || this.dialysisPrescription.prescription_water==""){
4918
+              if((patientBefor.weight_before - patientBefor.dry_weight - patientBefor.additional_weight).toFixed(1)>0){
4919
+                this.dialysisPrescription.prescription_water = (patientBefor.weight_before - patientBefor.dry_weight - patientBefor.additional_weight).toFixed(1)
4920
+              }
4921
+
4922
+            }
4923
+
4924
+            // if(this.$store.getters.xt_user.template_info.org_id==10721 || this.$store.getters.xt_user.template_info.org_id==10164 || this.$store.getters.xt_user.template_info.org_id==10635 || this.$store.getters.xt_user.template_info.org_id==0){
4925
+            //   this.dialysisPrescription.target_ultrafiltration = prescription.target_ultrafiltration
4926
+            //   this.dialysisPrescription.prescription_water = prescription.prescription_water
4927
+
4928
+            // }
4929
+          }
4930
+          if(prescription!=undefined){
4931
+           
4932
+            this.dialysisPrescription.target_ultrafiltration = prescription.target_ultrafiltration
4933
+            this.dialysisPrescription.prescription_water = prescription.prescription_water
4934
+          }
4935
+
4936
+         }
4937
+      }) 
4938
+    },
4887 4939
     unique(arr) {
4888 4940
       const res = new Map()
4889 4941
       return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))

+ 1 - 1
src/xt_pages/dialysis/dialysisPrintOrder.vue Zobrazit soubor

@@ -2686,7 +2686,7 @@ export default {
2686 2686
           this.patient_id = response.data.data.patientInfo.DialysisSchedule.patient_id
2687 2687
           this.patient_name = response.data.data.patientInfo.name
2688 2688
 
2689
-          if(this.org_id !=10206){
2689
+          if(this.org_id !=10206 && this.org_id !=0){
2690 2690
             this.org_template_info.template_id= response.data.data.org_template_info.template_id
2691 2691
             this.org_template_info = response.data.data.org_template_info;
2692 2692
           }else{

+ 1 - 1
src/xt_pages/dialysis/template/DialysisPrintOrderSixtyeight.vue Zobrazit soubor

@@ -2527,7 +2527,7 @@
2527 2527
                         />
2528 2528
                       </div>
2529 2529
                       <div
2530
-                        v-if="org_id!=10191"
2530
+                        v-if="org_id!=10191 && org_id!=10677"
2531 2531
                         class="under_line"
2532 2532
                         style="width: 80px; text-align: center"
2533 2533
                       >

+ 81 - 3
src/xt_pages/dialysis/template/DialysisPrintOrdereighty.vue Zobrazit soubor

@@ -35,7 +35,8 @@
35 35
           <div class="inline_block" style="flex: 1;">
36 36
             年龄:
37 37
             <div class="under_line" style="width: 30px; text-align: center">
38
-              {{ getAge(patientInfo) }}
38
+              <!-- {{ getAge(patientInfo) }} -->
39
+              {{ calculateAge(patientInfo.id_card_no,prescription.record_date) }}
39 40
             </div>
40 41
41 42
           </div>
@@ -1365,7 +1366,8 @@
1365 1366
         <div class="inline_block" style="margin-left: 10px;">
1366 1367
           年龄:
1367 1368
           <div class="under_line" style="width: 30px;text-align: left">
1368
-            {{ getAge(patientInfo) }}
1369
+            <!-- {{ getAge(patientInfo) }} -->
1370
+            {{ calculateAge(patientInfo.id_card_no,prescription.record_date) }}
1369 1371
           </div>
1370 1372
1371 1373
         </div>
@@ -3432,7 +3434,83 @@ export default {
3432 3434
       }else{
3433 3435
         this.$message.success('核对完成')
3434 3436
       }
3435
-    }
3437
+    },
3438
+    calculateAge(idNumber,created_time) {
3439
+    var year = this.getTimeOne(created_time)
3440
+
3441
+    var month = this.getTimeTwo(created_time)
3442
+
3443
+    var day = this.getTimeThree(created_time)
3444
+    console.log("start_time=====",year)
3445
+    // 假设身份证号码是18位,且生日在第7位到第14位
3446
+    const birthYear = parseInt(idNumber.substring(6, 10), 10);
3447
+    const birthMonth = parseInt(idNumber.substring(10, 12), 10);
3448
+    const birthDay = parseInt(idNumber.substring(12, 14), 10);
3449
+ 
3450
+    const today = new Date();
3451
+    // console.log("today============",today)
3452
+    var ageYear = year - birthYear;
3453
+    let ageMonth = month - birthMonth; // 月份是从0开始的
3454
+    let ageDay = day - birthDay;
3455
+ 
3456
+    // 调整月份和日期,以便于正确计算
3457
+      if (ageDay < 0) {
3458
+          ageMonth -= 1;
3459
+          // 获取上个月的天数
3460
+          const pastMonthDay = new Date(year,month, 0).getDate();
3461
+          ageDay += pastMonthDay;
3462
+      }
3463
+      if (ageMonth < 0) {
3464
+          ageYear -= 1;
3465
+          ageMonth += 12;
3466
+      }
3467
+   
3468
+     return ageYear 
3469
+    },
3470
+    getTime(val) {
3471
+      return uParseTime(val, "{y}年{m}月{d}日");
3472
+    },
3473
+    getTimeOne(val) {
3474
+      return uParseTime(val, "{y}");
3475
+    },
3476
+    getTimeTwo(val) {
3477
+      return uParseTime(val, "{m}");
3478
+    },
3479
+    getTimeThree(val) {
3480
+      return uParseTime(val, "{h}");
3481
+    },
3482
+    calculateAge(idNumber,created_time) {
3483
+    var year = this.getTimeOne(created_time)
3484
+
3485
+    var month = this.getTimeTwo(created_time)
3486
+
3487
+    var day = this.getTimeThree(created_time)
3488
+    console.log("start_time=====",year)
3489
+    // 假设身份证号码是18位,且生日在第7位到第14位
3490
+    const birthYear = parseInt(idNumber.substring(6, 10), 10);
3491
+    const birthMonth = parseInt(idNumber.substring(10, 12), 10);
3492
+    const birthDay = parseInt(idNumber.substring(12, 14), 10);
3493
+ 
3494
+    const today = new Date();
3495
+    // console.log("today============",today)
3496
+    var ageYear = year - birthYear;
3497
+    let ageMonth = month - birthMonth; // 月份是从0开始的
3498
+    let ageDay = day - birthDay;
3499
+ 
3500
+    // 调整月份和日期,以便于正确计算
3501
+      if (ageDay < 0) {
3502
+          ageMonth -= 1;
3503
+          // 获取上个月的天数
3504
+          const pastMonthDay = new Date(year,month, 0).getDate();
3505
+          ageDay += pastMonthDay;
3506
+      }
3507
+      if (ageMonth < 0) {
3508
+          ageYear -= 1;
3509
+          ageMonth += 12;
3510
+      }
3511
+   
3512
+     return ageYear 
3513
+    },
3436 3514
 
3437 3515
   },
3438 3516
   watch: {

+ 44 - 1
src/xt_pages/user/components/PatientDetail.vue Zobrazit soubor

@@ -1332,7 +1332,9 @@
1332 1332
                     年龄
1333 1333
                   </td>
1334 1334
                   <td style="padding: 5px 0px;font-size: 22px;width:10%;">
1335
-                    {{ patientPrint.age }}岁
1335
+                    <!-- {{ patientPrint.age }} -->
1336
+                     {{ calculateAge(patientPrint.id_card_no,patientPrint.created_time) }}
1337
+                    岁
1336 1338
                   </td>
1337 1339
                   <td style="padding: 5px 0px;font-size: 22px;font-weight: 500;width:12%;">
1338 1340
                     医保类型
@@ -1835,9 +1837,50 @@ export default {
1835 1837
     this.printDate = data.getFullYear() + "-" + month + "-" + date;
1836 1838
   },
1837 1839
   methods: {
1840
+   calculateAge(idNumber,created_time) {
1841
+    var year = this.getTimeOne(created_time)
1842
+
1843
+    var month = this.getTimeTwo(created_time)
1844
+
1845
+    var day = this.getTimeThree(created_time)
1846
+    console.log("start_time=====",year)
1847
+    // 假设身份证号码是18位,且生日在第7位到第14位
1848
+    const birthYear = parseInt(idNumber.substring(6, 10), 10);
1849
+    const birthMonth = parseInt(idNumber.substring(10, 12), 10);
1850
+    const birthDay = parseInt(idNumber.substring(12, 14), 10);
1851
+ 
1852
+    const today = new Date();
1853
+    // console.log("today============",today)
1854
+    var ageYear = year - birthYear;
1855
+    let ageMonth = month - birthMonth; // 月份是从0开始的
1856
+    let ageDay = day - birthDay;
1857
+ 
1858
+    // 调整月份和日期,以便于正确计算
1859
+      if (ageDay < 0) {
1860
+          ageMonth -= 1;
1861
+          // 获取上个月的天数
1862
+          const pastMonthDay = new Date(year,month, 0).getDate();
1863
+          ageDay += pastMonthDay;
1864
+      }
1865
+      if (ageMonth < 0) {
1866
+          ageYear -= 1;
1867
+          ageMonth += 12;
1868
+      }
1869
+   
1870
+     return ageYear 
1871
+    },
1838 1872
     getTime(val) {
1839 1873
       return uParseTime(val, "{y}年{m}月{d}日");
1840 1874
     },
1875
+    getTimeOne(val) {
1876
+      return uParseTime(val, "{y}");
1877
+    },
1878
+    getTimeTwo(val) {
1879
+      return uParseTime(val, "{m}");
1880
+    },
1881
+    getTimeThree(val) {
1882
+      return uParseTime(val, "{h}");
1883
+    },
1841 1884
     printThisInfo() {
1842 1885
       var ptime = Math.round(new Date().getTime() / 1000);
1843 1886
       this.print_time = uParseTime(ptime, "{y}年{m}月{d}日");

+ 13 - 13
src/xt_permission.js Zobrazit soubor

@@ -12,19 +12,19 @@ const permissionWhiteList = loginWhiteList.concat(['/']) // 权限验证白名
12 12
 
13 13
 router.beforeEach((to, from, next) => {
14 14
   // 线上注释
15
-  // if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
-  //   store.dispatch('VerifyConfigList', []).then(() => {
17
-  //     next()
18
-  //   })
19
-  // }
20
-  // if (store.getters.permission_routers === undefined) {
21
-  //   store.dispatch('xt_GenerateRoutes', []).then(() => {
22
-  //     next()
23
-  //   })
24
-  // } else {
25
-  //   next()
26
-  // }
27
-  // return
15
+  if (!store.getters.configlist || store.getters.configlist === undefined || store.getters.configlist.length <= 0) {
16
+    store.dispatch('VerifyConfigList', []).then(() => {
17
+      next()
18
+    })
19
+  }
20
+  if (store.getters.permission_routers === undefined) {
21
+    store.dispatch('xt_GenerateRoutes', []).then(() => {
22
+      next()
23
+    })
24
+  } else {
25
+    next()
26
+  }
27
+  return
28 28
   // 线上注释
29 29
   NProgress.start()
30 30
   // console.log(store.getters.current_role_urls.indexOf(to.path))