From b2d04038df93bed77a49e3ad29004d9fc7eca888 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期五, 27 九月 2024 14:40:23 +0800
Subject: [PATCH] 更新

---
 src/views/home/components/patient_file.vue |   39 ++++++++++++++-------------------------
 1 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/src/views/home/components/patient_file.vue b/src/views/home/components/patient_file.vue
index d6f68af..f73cbe6 100644
--- a/src/views/home/components/patient_file.vue
+++ b/src/views/home/components/patient_file.vue
@@ -48,30 +48,29 @@
                     <el-icon size="16" color="#409efc"><CreditCard /></el-icon>  <span> &nbsp; 最新生化数据</span> 
                 </div>
                 <div >
-                    <el-row :gutter="10" v-if="state.listData.lis">
-
-                        <div v-for="(item, key) in state.listData.lis" :key="key">
-                            <div class="itemLis" v-if="item?.结果列表.length>0" >
+                    <el-row :gutter="10" v-if="state.listData.length">
+                        <el-col :xs="8" :sm="8" :md="6" :lg="6" :xl="4" v-for="(item, key) in state.listData" :key="key">
+                            <div class="itemLis" v-if="item?.item_result" >
                                 <div class="title">
                                     {{key}}
                                 </div>
-                                <div  class="itemRes" v-for="(itemRes, resIndex) in item?.结果列表" :key="resIndex">
-                                    <div  class="itemResDtile" v-for="(tdKey, ttIndex) in formatResKeys(itemRes)" :key="ttIndex" >
-                                       <div>
-                                        {{ itemRes[tdKey].name }}
+                                <div  class="itemRes">
+                                    <div  class="itemResDtile"   >
+                                       <div style="text-align: center;width: 100%;">
+                                        {{ item?.item_name }}
                                        </div>
                                        <div>
-                                        {{ itemRes[tdKey].result }}<span class="tdate">{{itemRes[tdKey].unit}}</span>
+                                        {{ item?.item_result }}<span class="tdate">{{item?.item_result_unit}}</span>
                                        </div>
                                     </div>
                                 </div>
                                 <div  class="tdate" >
-                                    {{item?.结果列表[0]?.标本日期}}
+                                    {{item?.sample_date_str}}
                                 </div>
                                
                             </div>
                           
-                        </div>
+                        </el-col>
                     </el-row>
                 </div>
             </el-card>
@@ -136,23 +135,10 @@
     catch(error){
         state.loading = false
     }
-    // console.log("患者档案子组件获取显示数据!" + str);
-    // console.log(props.tableHeight)
-    // var pam = {
-    //     patCode: patientsInfo.value.code,
-    // }
-    // state.loading = true
-    // getPatData(pam).then(re=>{
-    //     console.log(re.data)
-    //     state.patientData=re.data
-    // })
     
 }
 onMounted(()=>{
     // console.log(dayjs().add(-7, 'day').format('YYYY-MM-DD'),'---shan')
-    if(state.listData.lis){
-        console.log('有意义------------------')
-    }
 })
 const formatResKeys = (obj: Object) => {
 	return Object.keys(obj).filter((k) => k !== '标本日期');
@@ -181,7 +167,8 @@
 }
 
 .itemLis{
-    min-width: 120px;
+    margin-bottom: 10px;
+    width: 100%;
     padding-left: 10px;
     padding-right: 10px;
     height: 100px;
@@ -207,9 +194,11 @@
         color: #303133;
         font-size: 16px;
         div{
+            width: 100%;
             line-height: 30px;text-align: center; padding-left: 10px; padding-right: 10px;
         }
         .itemResDtile:not(:first-child) {
+            width: 100%;
             /* 在这里添加你想要的样式 */
             border-left: 1px solid #909399; /* 示例样式:为除第一个div外的所有div添加红色边框 */
         }

--
Gitblit v1.8.0