|
@@ -1,187 +1,505 @@
|
|
|
<template>
|
|
|
- <el-form ref="NutritionSettingFormRef" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-form-item label="所需热量" prop="caloriesKcalPerDay">
|
|
|
- <el-input v-model="form.caloriesKcalPerDay" placeholder="请输入所需热量" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需热量" prop="caloriesKcalPerKgDay">
|
|
|
- <el-input v-model="form.caloriesKcalPerKgDay" placeholder="请输入所需热量" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需热量" prop="caloriesKjPerDay">
|
|
|
- <el-input v-model="form.caloriesKjPerDay" placeholder="请输入所需热量" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="蛋白质热量占比" prop="proteinCaloriePercentage">
|
|
|
- <el-input v-model="form.proteinCaloriePercentage" placeholder="请输入蛋白质热量占比" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="脂肪热量占比" prop="fatCaloriePercentage">
|
|
|
- <el-input v-model="form.fatCaloriePercentage" placeholder="请输入脂肪热量占比" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="碳水化合物热量占比" prop="carbohydrateCaloriePercentage">
|
|
|
- <el-input v-model="form.carbohydrateCaloriePercentage" placeholder="请输入碳水化合物热量占比" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需蛋白质" prop="proteinGPerKgDay">
|
|
|
- <el-input v-model="form.proteinGPerKgDay" placeholder="请输入所需蛋白质" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需蛋白质" prop="proteinGPerDay">
|
|
|
- <el-input v-model="form.proteinGPerDay" placeholder="请输入所需蛋白质" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需脂肪" prop="fatGPerKgDay">
|
|
|
- <el-input v-model="form.fatGPerKgDay" placeholder="请输入所需脂肪" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需脂肪" prop="fatGPerDay">
|
|
|
- <el-input v-model="form.fatGPerDay" placeholder="请输入所需脂肪" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需碳水化合物" prop="carbohydrateGPerKgDay">
|
|
|
- <el-input v-model="form.carbohydrateGPerKgDay" placeholder="请输入所需碳水化合物" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="所需碳水化合物" prop="carbohydrateGPerDay">
|
|
|
- <el-input v-model="form.carbohydrateGPerDay" placeholder="请输入所需碳水化合物" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="钙" prop="calcium">
|
|
|
- <el-input v-model="form.calcium" placeholder="请输入钙" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="钾" prop="potassium">
|
|
|
- <el-input v-model="form.potassium" placeholder="请输入钾" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="钠" prop="sodium">
|
|
|
- <el-input v-model="form.sodium" placeholder="请输入钠" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="镁" prop="magnesium">
|
|
|
- <el-input v-model="form.magnesium" placeholder="请输入镁" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="磷" prop="phosphorus">
|
|
|
- <el-input v-model="form.phosphorus" placeholder="请输入磷" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="氯" prop="chloride">
|
|
|
- <el-input v-model="form.chloride" placeholder="请输入氯" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="铁" prop="iron">
|
|
|
- <el-input v-model="form.iron" placeholder="请输入铁" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="硒" prop="selenium">
|
|
|
- <el-input v-model="form.selenium" placeholder="请输入硒" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="锰" prop="manganese">
|
|
|
- <el-input v-model="form.manganese" placeholder="请输入锰" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="氟" prop="fluoride">
|
|
|
- <el-input v-model="form.fluoride" placeholder="请输入氟" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="钼" prop="molybdenum">
|
|
|
- <el-input v-model="form.molybdenum" placeholder="请输入钼" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="锌" prop="zinc">
|
|
|
- <el-input v-model="form.zinc" placeholder="请输入锌" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="铜" prop="copper">
|
|
|
- <el-input v-model="form.copper" placeholder="请输入铜" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="碘" prop="iodine">
|
|
|
- <el-input v-model="form.iodine" placeholder="请输入碘" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="铬" prop="chromium">
|
|
|
- <el-input v-model="form.chromium" placeholder="请输入铬" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素A" prop="vitaminA">
|
|
|
- <el-input v-model="form.vitaminA" placeholder="请输入维生素A" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素D" prop="vitaminD">
|
|
|
- <el-input v-model="form.vitaminD" placeholder="请输入维生素D" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素E" prop="vitaminE">
|
|
|
- <el-input v-model="form.vitaminE" placeholder="请输入维生素E" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素K" prop="vitaminK">
|
|
|
- <el-input v-model="form.vitaminK" placeholder="请输入维生素K" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素B1" prop="vitaminBOne">
|
|
|
- <el-input v-model="form.vitaminBOne" placeholder="请输入维生素B1" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素B2" prop="vitaminBTwo">
|
|
|
- <el-input v-model="form.vitaminBTwo" placeholder="请输入维生素B2" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素B6" prop="vitaminBSix">
|
|
|
- <el-input v-model="form.vitaminBSix" placeholder="请输入维生素B6" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素B12" prop="vitaminBTwelve">
|
|
|
- <el-input v-model="form.vitaminBTwelve" placeholder="请输入维生素B12" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="烟酸" prop="niacin">
|
|
|
- <el-input v-model="form.niacin" placeholder="请输入烟酸" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="维生素C" prop="vitaminC">
|
|
|
- <el-input v-model="form.vitaminC" placeholder="请输入维生素C" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="叶酸" prop="folicAcid">
|
|
|
- <el-input v-model="form.folicAcid" placeholder="请输入叶酸" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="胆碱" prop="choline">
|
|
|
- <el-input v-model="form.choline" placeholder="请输入胆碱" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="生物素" prop="biotin">
|
|
|
- <el-input v-model="form.biotin" placeholder="请输入生物素" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="泛酸" prop="pantothenicAcid">
|
|
|
- <el-input v-model="form.pantothenicAcid" placeholder="请输入泛酸" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="膳食纤维" prop="dietaryFiber">
|
|
|
- <el-input v-model="form.dietaryFiber" placeholder="请输入膳食纤维" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="患者id" prop="patientId">
|
|
|
- <el-input v-model="form.patientId" placeholder="请输入患者id" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="科室" prop="deptId">
|
|
|
- <el-input v-model="form.deptId" placeholder="请输入科室" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="门诊号" prop="outpatientNo">
|
|
|
- <el-input v-model="form.outpatientNo" placeholder="请输入门诊号" />
|
|
|
- </el-form-item>
|
|
|
- <template>
|
|
|
- <div class="dialog-footer">
|
|
|
- <el-button :loading="buttonLoading" type="primary" @click="() => submitForm()">确 定</el-button>
|
|
|
- <el-button @click="() => cancel()">取 消</el-button>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-form>
|
|
|
+ <div class="page-current">
|
|
|
+ <el-button type="primary" @click="onBack">返回</el-button>
|
|
|
+ </div>
|
|
|
+ <div class="question-main">
|
|
|
+ <!-- 顶部信息区(完全还原图片样式) -->
|
|
|
+ <div class="info-card info-card-bee">
|
|
|
+ <div class="info-title">
|
|
|
+ <span class="bee-title">{{ title }}</span>
|
|
|
+ </div>
|
|
|
+ <el-row :gutter="20" align="middle" class="info-row">
|
|
|
+ <el-col :span="2"><span>性别:</span>{{ form.gender }}</el-col>
|
|
|
+ <el-col :span="2"><span>年龄:</span>{{ form.age }}</el-col>
|
|
|
+ <el-col :span="2"><span class="required">*</span><span>BMI:{{ form.bmi }}</span></el-col>
|
|
|
+ <el-col :span="4"><span class="required">*</span><span>身高:</span>
|
|
|
+ <el-input v-model="form.height" style="width: 120px;" /> <span>cm</span></el-col>
|
|
|
+ <el-col :span="4"><span class="required">*</span><span>体力活动:</span>
|
|
|
+ <el-select v-model="form.activity" style="width: 150px;">
|
|
|
+ <el-option v-for="dict in physical_activity" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4" v-if="title === 'BEE'"><span class="required">*</span><span>应激状态:</span>
|
|
|
+ <el-select v-model="form.stressType" style="width: 150px;">
|
|
|
+ <el-option v-for="dict in stress_level" :key="dict.value" :label="dict.label" :value="dict.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" v-if="title === '烧伤公式'"><span>烧伤面积:</span>
|
|
|
+ <el-input v-model="form.burnArea" style="width: 120px;" /> <span>%</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3"><span>体重:</span>
|
|
|
+ <el-input v-model="form.weight" style="width: 120px;" /> <span>kg</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3"><span>上臂围:</span>
|
|
|
+ <el-input v-model="form.armCircumference" style="width: 120px;" /> <span>cm</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 10px;">
|
|
|
+ <el-col :span="3"><span>小腿围:</span>
|
|
|
+ <el-input v-model="form.calfCircumference" style="width: 120px;" /> <span>cm</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="20" style="text-align:right;">
|
|
|
+ <el-button type="primary" class="recalc-btn" @click="recalculate">重新计算</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <!-- 警示提示区 -->
|
|
|
+ <div class="tips-box">
|
|
|
+ 注:常量元素、微量元素、维生素、氨基酸、脂肪酸、膳食纤维默认为DRIS数据,如有必要请自行修改。
|
|
|
+ </div>
|
|
|
+ <div v-show="showFlag=='true'">
|
|
|
+ <el-form label-position="right" label-width="170px">
|
|
|
+
|
|
|
+ <!-- 能量及三大营养素 -->
|
|
|
+ <div class="group-card">
|
|
|
+
|
|
|
+ <div class="group-title">能量及三大营养素</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需热量:" class="right-label">
|
|
|
+ <el-input v-model="form.caloriesKcalPerDay" style="width: 200px;" />
|
|
|
+ <span class="unit">kcal/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需热量:" class="right-label">
|
|
|
+ <span>{{ form.caloriesKcalPerKgDay }}</span>
|
|
|
+ <span class="unit">kcal/kg·d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需热量:" class="right-label">
|
|
|
+ <span>{{form.caloriesKjPerDay}}</span>
|
|
|
+ <span class="unit">kJ/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="蛋白质热量占比:" class="right-label">
|
|
|
+ <el-input v-model="form.proteinCaloriePercentage" style="width: 200px;" />
|
|
|
+ <span class="unit">%</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需蛋白质:" class="right-label">
|
|
|
+ <span>{{ form.proteinGPerKgDay }}</span>
|
|
|
+ <span class="unit">g/kg·d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需蛋白质:" class="right-label">
|
|
|
+ <span>{{ form.proteinGPerDay }}</span>
|
|
|
+ <span class="unit">g/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="脂肪热量占比:" class="right-label">
|
|
|
+ <el-input v-model="form.fatCaloriePercentage" style="width: 200px;" />
|
|
|
+ <span class="unit">%</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需脂肪:" class="right-label">
|
|
|
+ <span>{{ form.fatGPerKgDay }}</span>
|
|
|
+ <span class="unit">g/kg·d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需脂肪:" class="right-label">
|
|
|
+ <span>{{ form.fatGPerDay }}</span>
|
|
|
+ <span class="unit">g/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="碳水化合物热量占比:" class="right-label">
|
|
|
+ <el-input v-model="form.carbohydrateCaloriePercentage" style="width: 200px;" />
|
|
|
+ <span class="unit">%</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需碳水化合物:" class="right-label">
|
|
|
+ <el-input v-model="form.carbohydrateGPerKgDay" style="width: 200px;" />
|
|
|
+ <span class="unit">g/kg·d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="所需碳水化合物:" class="right-label">
|
|
|
+ <el-input v-model="form.carbohydrateGPerDay" style="width: 200px;" />
|
|
|
+ <span class="unit">g/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!-- 常量元素 -->
|
|
|
+ <div class="group-card">
|
|
|
+ <div class="group-title">常量元素</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="钙:" class="right-label">
|
|
|
+ <el-input v-model="form.calcium" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="磷:" class="right-label">
|
|
|
+ <el-input v-model="form.phosphorus" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="钾:" class="right-label">
|
|
|
+ <el-input v-model="form.potassium" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="钠:" class="right-label">
|
|
|
+ <el-input v-model="form.sodium" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="镁:" class="right-label">
|
|
|
+ <el-input v-model="form.magnesium" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="氯:" class="right-label">
|
|
|
+ <el-input v-model="form.chloride" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <!-- 微量元素 -->
|
|
|
+ <div class="group-card">
|
|
|
+ <div class="group-title">微量元素</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="铁:" class="right-label">
|
|
|
+ <el-input v-model="form.iron" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="锌:" class="right-label">
|
|
|
+ <el-input v-model="form.zinc" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="硒:" class="right-label">
|
|
|
+ <el-input v-model="form.selenium" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="铜:" class="right-label">
|
|
|
+ <el-input v-model="form.copper" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="锰:" class="right-label">
|
|
|
+ <el-input v-model="form.manganese" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="碘:" class="right-label">
|
|
|
+ <el-input v-model="form.iodine" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="氟:" class="right-label">
|
|
|
+ <el-input v-model="form.fluoride" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="铬:" class="right-label">
|
|
|
+ <el-input v-model="form.chromium" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="钼:" class="right-label">
|
|
|
+ <el-input v-model="form.molybdenum" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <!-- 脂溶性维生素 -->
|
|
|
+ <div class="group-card">
|
|
|
+ <div class="group-title">脂溶性维生素</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素A:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminA" style="width: 200px;" />
|
|
|
+ <span class="unit">μgRAE/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素D:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminD" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素E:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminE" style="width: 200px;" />
|
|
|
+ <span class="unit">mgα-TE/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素K:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminK" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <!-- 水溶性维生素 -->
|
|
|
+ <div class="group-card">
|
|
|
+ <div class="group-title">水溶性维生素</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素B1:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminBOne" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素B2:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminBTwo" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素B6:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminBSix" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素B12:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminBTwelve" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="烟酸(尼克酸):" class="right-label">
|
|
|
+ <el-input v-model="form.niacin" style="width: 200px;" />
|
|
|
+ <span class="unit">mgNE/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="维生素C:" class="right-label">
|
|
|
+ <el-input v-model="form.vitaminC" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="叶酸:" class="right-label">
|
|
|
+ <el-input v-model="form.folicAcid" style="width: 200px;" />
|
|
|
+ <span class="unit">μgDFE/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="生物素:" class="right-label">
|
|
|
+ <el-input v-model="form.biotin" style="width: 200px;" />
|
|
|
+ <span class="unit">μg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="胆碱:" class="right-label">
|
|
|
+ <el-input v-model="form.choline" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="20" style="margin-top: 8px;">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="泛酸:" class="right-label">
|
|
|
+ <el-input v-model="form.pantothenicAcid" style="width: 200px;" />
|
|
|
+ <span class="unit">mg/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <!-- 其他 -->
|
|
|
+ <div class="group-card">
|
|
|
+ <div class="group-title">其他</div>
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="膳食纤维:" class="right-label">
|
|
|
+ <el-input v-model="form.dietaryFiber" style="width: 200px;" />
|
|
|
+ <span class="unit">g/d</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { ref } from 'vue';
|
|
|
-import { addSetting, updateSetting } from '@/api/patients/nutritionSetting';
|
|
|
-import type { FormInstance } from 'element-plus';
|
|
|
-
|
|
|
-// 接收父组件传递的参数
|
|
|
-const props = defineProps({
|
|
|
- form: {
|
|
|
- type: Object,
|
|
|
- required: true
|
|
|
- },
|
|
|
- rules: {
|
|
|
- type: Object,
|
|
|
- required: true
|
|
|
- },
|
|
|
- buttonLoading: {
|
|
|
- type: Boolean,
|
|
|
- required: true
|
|
|
- },
|
|
|
- submitForm: {
|
|
|
- type: Function,
|
|
|
- required: true
|
|
|
- },
|
|
|
- cancel: {
|
|
|
- type: Function,
|
|
|
- required: true
|
|
|
- }
|
|
|
-});
|
|
|
-
|
|
|
-// 表单ref
|
|
|
-const NutritionSettingFormRef = ref<FormInstance>();
|
|
|
-
|
|
|
-// 新增
|
|
|
-const handleAdd = async () => {
|
|
|
- await addSetting({ ...props.form });
|
|
|
-};
|
|
|
-// 更新
|
|
|
-const handleUpdate = async () => {
|
|
|
- await updateSetting({ ...props.form });
|
|
|
-};
|
|
|
+ import { ref } from 'vue';
|
|
|
+ import { addSetting, updateSetting, recalculateValue } from '@/api/patients/nutritionSetting';
|
|
|
+ import type { FormInstance } from 'element-plus';
|
|
|
+ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
+ const { physical_activity, stress_level } = toRefs(proxy ?.useDict('physical_activity', 'stress_level'));
|
|
|
+
|
|
|
+
|
|
|
+ const props = defineProps({
|
|
|
+ form: { type: Object, required: true },
|
|
|
+ rules: { type: Object, required: true },
|
|
|
+ buttonLoading: { type: Boolean, required: true },
|
|
|
+ submitForm: { type: Function, required: true },
|
|
|
+ cancel: { type: Function, required: true },
|
|
|
+ handleCancel: { type: Function, required: true },
|
|
|
+ title: { type: String }
|
|
|
+ });
|
|
|
+ const { handleCancel, form } = props;
|
|
|
+ const { title } = toRefs(props);
|
|
|
+ const showFlag = ref('false');
|
|
|
+ const NutritionSettingFormRef = ref < FormInstance > ();
|
|
|
+ const handleAdd = async () => { await addSetting({ ...form }); };
|
|
|
+ const handleUpdate = async () => { await updateSetting({ ...form }); };
|
|
|
+
|
|
|
+ const recalculateValue = async () => {
|
|
|
+ // 重新计算逻辑预留
|
|
|
+ showFlag.value = 'true';
|
|
|
+ }
|
|
|
+ const onBack = () => {
|
|
|
+ showFlag.value = 'false';
|
|
|
+ handleCancel();
|
|
|
+ };
|
|
|
</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+ .page-current {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 20px;
|
|
|
+ background: #fff;
|
|
|
+ border-bottom: 1px solid #e6e6e6;
|
|
|
+ }
|
|
|
+
|
|
|
+ .question-main {
|
|
|
+ padding: 20px 0 100px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-card-bee {
|
|
|
+ margin-bottom: 16px;
|
|
|
+ background: #f8fafc;
|
|
|
+ border-radius: 8px;
|
|
|
+ box-shadow: 0 2px 8px #f0f1f2;
|
|
|
+ padding: 18px 24px 10px 24px;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-title {
|
|
|
+ font-weight: bold;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #409EFF;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ padding-left: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bee-title {
|
|
|
+ border-left: 4px solid #409EFF;
|
|
|
+ padding-left: 8px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #409EFF;
|
|
|
+ }
|
|
|
+
|
|
|
+ .info-row {
|
|
|
+ background: #f8fafc;
|
|
|
+ font-size: 16px;
|
|
|
+ padding: 0 0 0 0;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .required {
|
|
|
+ color: #f56c6c;
|
|
|
+ margin-right: 2px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .recalc-btn {
|
|
|
+ margin-left: 12px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tips-box {
|
|
|
+ color: #ff5e4c;
|
|
|
+ margin: 16px 0;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .group-card {
|
|
|
+ background: #fff;
|
|
|
+ border-radius: 8px;
|
|
|
+ margin-bottom: 24px;
|
|
|
+ box-shadow: 0 2px 8px #f0f1f2;
|
|
|
+ padding: 16px 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .group-title {
|
|
|
+ background: #f5f7fa;
|
|
|
+ padding: 8px 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ border-radius: 4px;
|
|
|
+ margin-bottom: 16px;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .unit {
|
|
|
+ margin-left: 4px;
|
|
|
+ color: #888;
|
|
|
+ }
|
|
|
+
|
|
|
+ .right-label .el-form-item__label {
|
|
|
+ text-align: right !important;
|
|
|
+ justify-content: flex-end;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+
|
|
|
+ ::v-deep .el-form-item__label {
|
|
|
+ text-align: right !important;
|
|
|
+ justify-content: flex-end;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+</style>
|