chenyc
2025-02-13 c7d64da312576120b6252f91fea4e0052fd5f8dc
src/views/home/components/pingubiao/editDietary2.vue
@@ -52,7 +52,7 @@
                                        </td>
                                        <td colspan="3" style="color: red;">
                                            评级结果:{{sum}}
                                            评级结果:{{sum.value}},{{sum.label}}
                                        </td>
@@ -404,7 +404,7 @@
                                    </tr>
                                    
                                    <tr>
                                        <td colspan="6" style="font-weight: 600;">
                                        <td colspan="6" style="font-weight: 600; color: #000;">
                                            注意:
                                            <br />
                                            1.体重变化,考虑过去6个月或近2周的,过去5个月变化显著,但近一个月无丢失无增加,或近2周经治疗后体重稳定,则体重丢失一项不予考虑。
@@ -540,7 +540,8 @@
        腹水: {
            type: '',
            input1: '',
        }
        },
        结果:''
    },
    loading: false,
    viewInfo: {
@@ -561,8 +562,12 @@
    let a = 0
    let b=0
    let c=0
    const res={
        value:'',
        label:'',
        color:''
    }
    for (let key in state.tableData) {
        console.log(key + 'key==' + state.tableData[key]?.type)
        if (state.tableData[key]?.type==='A') {
            a++
        }else if(state.tableData[key]?.type==='B') {
@@ -571,7 +576,23 @@
            c++
        }
    }
    return `A:${a},B:${b},C:${c}`
    if(c>5){
        res.label='重度营养不良'
        res.color='#F56C6C'
    }else if(c<5&&b+c>=5){
        res.label='中度营养不良'
        res.color='#E6A23C'
    }else if(b+c<5){
        res.label='轻度营养不良'
        res.color='#E6A23C'
    }else if(a>=5) {
        res.label='营养良好'
        res.color='#303133'
    }else{
        res.label=''
    }
    res.value=`A:${a},B:${b},C:${c}`
    return res
})
const funhui = () => {
    state.dialogTableVisible = false
@@ -579,6 +600,7 @@
const onSubmit = () => {
    console.log('submit!')
    console.log(state.tableData)
    state.tableData.结果=sum.value
    const info: tiaochabiaoInfo = {
        id: state.viewInfo.id,
        surveryFormType: 1,
@@ -716,7 +738,8 @@
        腹水: {
            type: '',
            input1: '',
        }
        },
        结果:''
    }
    state.viewInfo={
        id: 0,