From a6f64303f88508d1c4d6ce53ff46be6b745cfb93 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期二, 14 十月 2025 15:21:59 +0800
Subject: [PATCH] 完成营养师管理

---
 src/views/home/components/pingubiao/editDietary4.vue |   40 ++++++++++++++++++++++++++++------------
 1 files changed, 28 insertions(+), 12 deletions(-)

diff --git a/src/views/home/components/pingubiao/editDietary4.vue b/src/views/home/components/pingubiao/editDietary4.vue
index d6bedfc..bb7630b 100644
--- a/src/views/home/components/pingubiao/editDietary4.vue
+++ b/src/views/home/components/pingubiao/editDietary4.vue
@@ -1,7 +1,7 @@
 <template>
     <div class="dietarySurvey-item">
-        <el-dialog  v-model="state.dialogTableVisible" title="PEW(蛋白质能量消耗评估)" :fullscreen="true" width="100%">
-            <div class="container" style="width: 100%; height: 100%;overflow: auto;">
+        <el-dialog  v-model="state.dialogTableVisible" title="PEW" :fullscreen="true" width="100%">
+            <div  style="width: 100%; height: 100%;overflow: auto;">
                 <div id="pinggu4">
                     <div>
                         <el-form size="small" >
@@ -114,8 +114,8 @@
                                             根据2008年ISRNM推荐的指标进行诊断,满足以下4条诊断标准(每项中至少1项符合)考虑存在PEW
 
                                         </td>
-                                        <td colspan="1" style="font-family: 600;color: blue; font-weight: 700;"> 
-                                            合计满足 {{sum}} 项
+                                        <td colspan="1" style="font-family: 600;color: blue; font-weight: 700;" :style="{color:sum?.color}"> 
+                                            合计满足{{sum.value}}项; {{sum.label}} 
                                         </td>
 
                                     </tr>
@@ -170,7 +170,7 @@
     options:[0,1],
     dialogTableVisible:false,
     tableData: {
-        表名: 'PEW(蛋白质能量消耗评估)',
+        表名: 'PEW',
         初次调查日期:"",
         填表日期: '',
         更新日期: '',
@@ -190,7 +190,8 @@
         肌肉指标:{
             type: '', 
             input1: '',
-        }
+        },
+        结果:''
     },
     loading: false,
     viewInfo:{
@@ -201,7 +202,7 @@
         surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
         surveryPerson: userInfos.value.code,
         surveryJsonBody: '',
-        suveryFormName:'PEW(蛋白质能量消耗评估)',
+        suveryFormName:'PEW',
         surveryFormType:1,
         updateTime: ''
     }
@@ -209,13 +210,26 @@
 })
 const sum = computed(() => {
     let x=0
+    const res={
+        value:'',
+        label:'',
+        color:''
+    }
     for(let key in state.tableData){
         console.log(key+'key=='+state.tableData[key]?.type)
         if(Number(state.tableData[key]?.type)){
             x+=Number(state.tableData[key]?.type)
         }
     }
-    return x
+    if(x>=4){
+        res.label="考虑存在PEW"
+        res.color='#F56C6C'
+    }else{
+        res.label="正常"
+        res.color='#303133'
+    }
+    res.value=x
+    return res
 })
 const funhui=()=>{
     state.dialogTableVisible=false
@@ -223,6 +237,7 @@
 const onSubmit = () => {
   console.log('submit!')
   console.log(state.tableData)
+  state.tableData.结果=sum.value
   const info:tiaochabiaoInfo={
     id: state.viewInfo.id,
     surveryFormType:1,
@@ -232,7 +247,7 @@
     surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
     surveryPerson: userInfos.value.code,
     surveryJsonBody: JSON.stringify(state.tableData),
-    suveryFormName:'PEW(蛋白质能量消耗评估)',
+    suveryFormName:'PEW',
     updateTime: ''
   }
   console.log(info)
@@ -283,7 +298,7 @@
 }
 const getPageInfo=()=>{
     state.tableData={
-        表名: 'PEW(蛋白质能量消耗评估)',
+        表名: 'PEW',
         初次调查日期:formatDate(new Date(),'YYYY-mm-dd'),
         填表日期: '',
         更新日期: formatDate(new Date(),'YYYY-mm-dd'),
@@ -303,7 +318,8 @@
         肌肉指标:{
             type: '', 
             input1: '肌肉量丢失(3个月内>5%或半年内>10%),上臂肌围减少(减少>10%参照群体第50个百分位数)',
-        }
+        },
+        结果:''
     }
     state.viewInfo={
         id: 0,
@@ -313,7 +329,7 @@
         surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
         surveryPerson: userInfos.value.code,
         surveryJsonBody: '',
-        suveryFormName:'PEW(蛋白质能量消耗评估)',
+        suveryFormName:'PEW',
         surveryFormType:1,
         updateTime: ''
     }

--
Gitblit v1.8.0