chenyc
2025-07-14 05c827fea632f004821cc746ba73880769fab7cd
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;">
            <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>
@@ -190,7 +190,8 @@
        肌肉指标:{
            type: '', 
            input1: '',
        }
        },
        结果:''
    },
    loading: false,
    viewInfo:{
@@ -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,
@@ -303,7 +318,8 @@
        肌肉指标:{
            type: '', 
            input1: '肌肉量丢失(3个月内>5%或半年内>10%),上臂肌围减少(减少>10%参照群体第50个百分位数)',
        }
        },
        结果:''
    }
    state.viewInfo={
        id: 0,