From 706896076f193579e7fc0f9d65c1fd75cd084322 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期日, 27 四月 2025 12:30:58 +0800
Subject: [PATCH] gx

---
 src/views/home/components/patient_file.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/views/home/components/patient_file.vue b/src/views/home/components/patient_file.vue
index e5a4a55..ff61df9 100644
--- a/src/views/home/components/patient_file.vue
+++ b/src/views/home/components/patient_file.vue
@@ -80,10 +80,8 @@
 
                         </tr>
                         <tr>
-                            <td colspan="2">证件号:{{ patientsInfo.patientIdentityNo }}</td>
-                            <td>透析龄:<span v-if="patientsInfo.medHistoryStatByMonth">{{
-                                patientsInfo.medHistoryStatByMonth }}
-                                    (月)</span></td>
+                            <td colspan="2">证件号:{{ state.patientData.证件号 }}</td>
+                            <td>透析龄:<span>{{透析年龄}}</span></td>
                             <td>最近体重:<span>{{ state.patientData.上一次透前体重 }} (kg)</span></td>
                             <td>BMI:<span>{{ BMI }}</span></td>
 
@@ -208,6 +206,7 @@
         身高: '',
         上一次透前体重: '',
         出院诊断:'',
+        '透析龄(月)':''
     },
     listData: <any>{}
 })
@@ -295,6 +294,15 @@
         return ''
     }
 })
+const 透析年龄=computed(() => {
+    if (state.patientData['透析龄(月)']) {
+        const nian=Math.floor(Number(state.patientData['透析龄(月)']) / 12)===0?'':Math.floor(Number(state.patientData['透析龄(月)']) / 12)+'年'
+        const yue=(Number(state.patientData['透析龄(月)']) % 12)===0?'':Number(state.patientData['透析龄(月)']) % 12+'月'
+        return  nian +yue
+    } else {
+        return ''
+    }
+})
 // 第一步:定义子组件里面的方法
 const getData = async (str: string) => {
     var pam = {
@@ -320,6 +328,7 @@
             listNurtion(pas3)
         ])
         state.patientData = res1.data
+        console.log('赋值患者信息',state.patientData)
         state.listData = res2.data
         if(res3.data?.list.length>=1){
             const row=res3.data.list[0]

--
Gitblit v1.8.0