chenyc
2025-07-14 05c827fea632f004821cc746ba73880769fab7cd
src/views/home/components/shiwuguoming/editDietary.vue
@@ -2,8 +2,8 @@
<template>
    <div class="dietarySurvey-item">
        <el-dialog  v-model="state.dialogTableVisible" title="食物过敏原及胃肠功能调查" :fullscreen="true" width="100%">
            <div class="container" style="width: 100%; height: 100%;overflow: auto;">
                <div id="printFrom1">
            <div  style="width: 100%; height: 100%;overflow: auto;">
                <div id="guomingyuan">
                    <div>
                        <el-form size="small">
                            <div style="width: 100%">
@@ -460,6 +460,18 @@
                                            </el-form-item>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td  >
                                           总结
                                        </td>
                                        <td colspan="8" >
                                            <el-form-item >
                                                <el-input v-model="state.tableData.结果" type="textarea"
                                                    :autosize="{ minRows: 2, maxRows: 6 }" placeholder="备注" />
                                            </el-form-item>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </el-form>
@@ -473,7 +485,7 @@
                    <el-button type="primary" @click="onSubmit">
                        保存
                    </el-button>
                    <el-button v-if="state.viewInfo.id" type="primary" v-print="'#printFrom1'">
                    <el-button v-if="state.viewInfo.id" type="primary" v-print="'#guomingyuan'">
                        <el-icon><Printer /></el-icon>
                        打印
                    </el-button>
@@ -599,6 +611,7 @@
                备注: '',
            },
        },
        结果:''
        
        
      
@@ -628,7 +641,7 @@
    
}
const generatePDF=()=> {
      const element = document.getElementById('printFrom1');
      const element = document.getElementById('guomingyuan');
      const opt = {
        margin: 10,
        filename: `${state.tableData.表名}.pdf`,
@@ -761,6 +774,7 @@
                备注: '',
            },
        },
        结果:''
    }
    state.viewInfo={
        id: 0,
@@ -793,6 +807,9 @@
        console.log(mode)
        state.viewInfo=mode
        state.tableData=JSON.parse(mode.surveryJsonBody)
        if(!state.tableData.结果){
            state.tableData.结果=''
        }
        state.tableData.初次调查日期=mode.surveryTime
        state.tableData.更新日期=mode.updateTime
        state.dialogTableVisible = true