chenyc
2024-11-22 3c8f8f2102986cc01cb13c8e9bb791a32bff4e1e
src/views/home/components/fangAn/editDietary.vue
@@ -311,7 +311,7 @@
                                            </el-form-item>
                                        </td>
                                        <td>
                                            <el-button type="primary" :icon="Edit">模版</el-button>
                                            <el-button type="primary"  @click="Edit1('烹饪技巧')" :icon="Edit">模版</el-button>
                                        </td>
                                    </tr>
                                    <tr>
@@ -324,7 +324,7 @@
                                            </el-form-item>
                                        </td>
                                        <td>
                                            <el-button type="primary" :icon="Edit">模版</el-button>
                                            <el-button type="primary" @click="Edit1('食材选择')"  :icon="Edit">模版</el-button>
                                        </td>
                                    </tr>
                                    <tr>
@@ -337,7 +337,7 @@
                                            </el-form-item>
                                        </td>
                                        <td>
                                            <el-button type="primary" :icon="Edit">模版</el-button>
                                            <el-button type="primary" @click="Edit1('少盐控油')" :icon="Edit">模版</el-button>
                                        </td>
                                    </tr>
                                    <tr>
@@ -350,7 +350,7 @@
                                            </el-form-item>
                                        </td>
                                        <td>
                                            <el-button type="primary" :icon="Edit">模版</el-button>
                                            <el-button type="primary" @click="Edit1('适量饮水量出为入')" :icon="Edit">模版</el-button>
                                        </td>
                                    </tr>
                                    <tr>
@@ -574,6 +574,26 @@
                </div>
            </template>
            <el-dialog
                v-model="state.innerVisible"
                width="700"
                title="模版"
                append-to-body
                >
            <span>
                <el-row v-for="(item,index) in state.mobanlist" :key="index" style="border-bottom: #909399 solid 1px;margin-bottom:20px ;">
                    <el-col :span="22">
                        <div>
                            {{item}}
                        </div>
                    </el-col>
                    <el-col :span="2" style="text-align:right" @click="setText(item)">
                        <el-button  size="mini" :icon="Check" circle />
                        <!-- <el-button size="mini">应用</el-button> -->
                    </el-col>
                </el-row>
            </span>
            </el-dialog>
        </el-dialog>
@@ -582,7 +602,7 @@
</template>
<script setup lang="ts" name="visualizingLinkDemo2">
import { Edit } from '@element-plus/icons-vue'
import { Check } from '@element-plus/icons-vue'
import html2pdf from 'html2pdf.js';
import { reactive, onMounted, onUnmounted, ref } from 'vue';
import { formatDate } from '/@/utils/formatTime';
@@ -600,7 +620,15 @@
const router = useRouter()
const emit = defineEmits(["shuaxin"]);
const state = reactive({
    modeType:'',
    mobanlist:[
        '食材提前浸泡、焯水,可以去除1/2-2/3的磷钾;',
        '少盐控油,可以适量使用葱姜蒜等天然调味品进行调味;',
        '避免使用糖、味精、鸡精、黄豆酱、低钠盐等调味品;',
        '选择蒸、煮、焖、炖、炒等做法,避免高温油炸等做法'
    ],
    dialogTableVisible: false,
    innerVisible:false,
    tableData: {
        表名: '患者方案表',
        初次调查日期: "",
@@ -729,7 +757,60 @@
    }
})
const Edit1=(mode)=>{
    state.innerVisible=true
    state.modeType=mode
    if( state.modeType==='烹饪技巧'){
        state.mobanlist=[
            '食材提前浸泡、焯水,可以去除1/2-2/3的磷钾;',
            '少盐控油,可以适量使用葱姜蒜等天然调味品进行调味;',
            '避免使用糖、味精、鸡精、黄豆酱、低钠盐等调味品;',
            '选择蒸、煮、焖、炖、炒等做法,避免高温油炸等做法'
        ]
    }else if( state.modeType==='食材选择'){
        state.mobanlist=[
            '均衡饮食,食物多样化,建议每天摄入12种以上食物,每周达到25种',
            '建议优先从优质蛋白质食物摄入,必要时补充肾友专用低磷低钾乳清蛋白粉。优质蛋白质通常富含于动物性食物和大豆中,优先选择鱼禽类,其次是大豆类,最后是蛋奶畜肉。',
            '新鲜蔬菜和水果富含维生素,必要时可补充维生素B12 和叶酸;适量膳食纤维摄入对维持肠道健康有利,建议每日膳食纤维摄入量为25-30g,建议增加蔬菜摄入量至6两-1斤,血钾正常时,可安排4两内低钾水果。'
        ]
    }else if( state.modeType==='少盐控油'){
        state.mobanlist=[
            '推荐患者每日盐摄入量不超过3g,不吃烟熏、烧烤、腌制等过度加工食品,少吃酱油、味精、鸡精、各种酱料等调味品。建议烹调油摄入量不超过25-40g,可适当增加富含中链甘油三酯或w-3脂肪酸的油脂,如亚麻籽油、紫苏籽油等作为能量补充来源。',
        ]
    }else if( state.modeType==='适量饮水量出为入'){
        state.mobanlist=[
            '水分摄入需根据每天的尿液排出量及透析脱水量来计划饮水量,除了计算饮用水,还要考虑用水加工成粥、汤等及蔬菜、水果中所含的水,建议不喝浓肉汤、老火汤、菜汤。'
        ]
    }
}
const setText=(item)=>{
    if( state.modeType==='烹饪技巧'){
        if(state.tableData.烹饪技巧!==''){
            state.tableData.烹饪技巧+=`\n${item}`
        }else{
            state.tableData.烹饪技巧+=item
        }
    }else if( state.modeType==='食材选择'){
        if(state.tableData.食材选择!==''){
            state.tableData.食材选择+=`\n${item}`
        }else{
            state.tableData.食材选择+=item
        }
    }else if( state.modeType==='少盐控油'){
        if(state.tableData.少盐控油!==''){
            state.tableData.少盐控油+=`\n${item}`
        }else{
            state.tableData.少盐控油+=item
        }
    }else if( state.modeType==='适量饮水量出为入'){
        if(state.tableData.适量饮水量出为入!==''){
            state.tableData.适量饮水量出为入+=`\n${item}`
        }else{
            state.tableData.适量饮水量出为入+=item
        }
    }
}
const funhui = () => {
    state.dialogTableVisible = false
}
@@ -787,7 +868,7 @@
        初次调查日期: "",
        填表日期: '',
        更新日期: '',
        记录者: '陈银成',
        记录者: userInfos.value.userName,
        食物过敏原: "",
        胃肠功能状况: "",
        蛋白粉补充情况: "",
@@ -910,7 +991,7 @@
        state.tableData.非透析日.早餐=from1Json.三天饮食记录表.非透析日.早餐
        state.tableData.非透析日.早加餐=from1Json.三天饮食记录表.非透析日.加餐1
        state.tableData.非透析日.午餐=from1Json.三天饮食记录表.非透析日.午餐
        state.tableData.非透析日天.午加餐=from1Json.三天饮食记录表.非透析日.加餐2
        state.tableData.非透析日.午加餐=from1Json.三天饮食记录表.非透析日.加餐2
        state.tableData.非透析日.晚餐=from1Json.三天饮食记录表.非透析日.晚餐
@@ -1005,7 +1086,7 @@
    border-width: 1px;
    border-color: #666666;
    border-collapse: collapse;
}
.gridtable th {