Huanyi 3 semanas atrás
pai
commit
9822b1f00d

Diferenças do arquivo suprimidas por serem muito extensas
+ 712 - 667
src/views/patients/dietTherapy/addDaily.vue


+ 37 - 56
src/views/patients/dietTherapy/addHospital.vue

@@ -12,15 +12,8 @@
             <span>配餐日期:</span>
           </el-col>
           <el-col :span="8">
-            <el-date-picker
-              v-model="mealTimeRange"
-              type="daterange"
-              range-separator="-"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-              style="width: 100%"
-              @keydown.enter.prevent
-            />
+            <el-date-picker v-model="mealTimeRange" type="daterange" range-separator="-" start-placeholder="开始日期"
+              end-placeholder="结束日期" style="width: 100%" @keydown.enter.prevent />
           </el-col>
           <el-col :span="3">
             <el-button type="primary" @click.prevent="addRecipe">新增食谱</el-button>
@@ -34,42 +27,30 @@
         </el-row>
       </div>
       <div class="tab-bar">
-        <el-button
-          v-for="(recipe, index) in allTableData"
-          :key="index"
-          :type="currentRecipe === index ? 'success' : 'info'"
-          plain
-          icon="Document"
-          class="tab-btn"
-          :class="{active: currentRecipe === index}"
-          @click="switchRecipe(index)"
-        >
+        <el-button v-for="(recipe, index) in allTableData" :key="index"
+          :type="currentRecipe === index ? 'success' : 'info'" plain icon="Document" class="tab-btn"
+          :class="{ active: currentRecipe === index }" @click="switchRecipe(index)">
           食谱{{ index + 1 }}
           <el-icon class="close-icon" @click.stop="deleteRecipe(index)" v-if="allTableData.length > 1">
             <Close />
           </el-icon>
         </el-button>
       </div>
-      <el-alert
-        title="周食谱模板的食谱数量小于7时,食谱可循环使用"
-        type="warning"
-        show-icon
-        class="mb-2 info-alert"
-        :closable="false"
-        style="background: transparent; border: none; color: #ff9900"
-      />
+      <el-alert title="周食谱模板的食谱数量小于7时,食谱可循环使用" type="warning" show-icon class="mb-2 info-alert" :closable="false"
+        style="background: transparent; border: none; color: #ff9900" />
 
       <el-table :data="tableData" class="diet-table" border>
-        <el-table-column prop="meal" label="餐次" width="200px" align="center" />
-        <el-table-column prop="time" label="用餐时间" width="260px" align="center">
-          <template #default="{row}">
+        <el-table-column prop="meal" label="餐次" width="100px" align="center" />
+        <el-table-column prop="time" label="用餐时间" width="150px" align="center">
+          <template #default="{ row }">
             <el-time-select v-model="row.time" start="06:00" step="00:30" end="22:00" placeholder="选择时间" />
           </template>
         </el-table-column>
-        <el-table-column prop="menuName" label="食谱名称" width="350px" align="center">
-          <template #default="{row}">
+        <el-table-column prop="menuName" label="食谱名称" width="200px" align="center">
+          <template #default="{ row }">
             <div class="recipe-list">
-              <div v-if="!row.recipes?.length" class="recipe-input" @click.stop.prevent="openRecipeDialog(row)">请选择</div>
+              <div v-if="!row.recipes?.length" class="recipe-input" @click.stop.prevent="openRecipeDialog(row)">请选择
+              </div>
               <template v-else>
                 <div v-for="(recipe, index) in row.recipes" :key="recipe.id" class="recipe-item">
                   <div class="recipe-input" @click.stop.prevent="openRecipeDialog(row, index)">
@@ -86,8 +67,8 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="categoryName" label="食谱分类" width="220px" align="center">
-          <template #default="{row}">
+        <el-table-column prop="categoryName" label="食谱分类" width="150px" align="center">
+          <template #default="{ row }">
             <div v-for="recipe in row.recipes" :key="recipe.id" class="recipe-item">
               <div class="recipe-input-one">
                 {{ recipe.categoryName }}
@@ -95,8 +76,8 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop="count" label="份数" width="220px" align="center">
-          <template #default="{row}">
+        <el-table-column prop="count" label="份数" width="150px" align="center">
+          <template #default="{ row }">
             <el-input-number v-model="row.count" :min="1" :max="99" @change="updateRowData(row)" size="small" />
           </template>
         </el-table-column>
@@ -105,8 +86,8 @@
                         <span>{{ row.weight || '-' }}</span>
                     </template>
                 </el-table-column> -->
-        <el-table-column label="食材重量" align="center">
-          <template #default="{row}">
+        <el-table-column label="食材重量" width="100px" align="center">
+          <template #default="{ row }">
             <div v-if="row.recipes && row.recipes.length">
               <div v-for="recipe in row.recipes" :key="recipe.id">
                 {{ getRecipeWeight(recipe, row.count) }}
@@ -115,8 +96,8 @@
             <span v-else>-</span>
           </template>
         </el-table-column>
-        <el-table-column prop="calorie" label="热量" align="center">
-          <template #default="{row}">
+        <el-table-column prop="calorie" width="100px" label="热量" align="center">
+          <template #default="{ row }">
             <div v-if="row.recipes && row.recipes.length">
               <div v-for="recipe in row.recipes" :key="recipe.id">
                 {{ getRecipeCalorie(recipe, row.calorie) }}
@@ -125,8 +106,8 @@
             <span v-else>-</span>
           </template>
         </el-table-column>
-        <el-table-column label="金额" align="center">
-          <template #default="{row}">
+        <el-table-column label="金额" width="100px" align="center">
+          <template #default="{ row }">
             <div v-if="row.recipes && row.recipes.length">
               <div v-for="recipe in row.recipes" :key="recipe.id">
                 {{ getRecipeAmount(recipe, row.count) }}
@@ -144,7 +125,7 @@
     </div>
 
     <!-- 底部按钮卡片 -->
-    <div class="bottom-btn-card">
+    <div>
       <div class="btn-wrapper">
         <el-button type="info" plain @click="saveDraft">存为草稿</el-button>
         <el-button type="primary" @click="handleSubmit">提交</el-button>
@@ -158,16 +139,16 @@
   <RecipeTemplate ref="recipeTemplateRef" @confirm="handleRecipeTemplateConfirm" />
 </template>
 <script setup lang="ts">
-import {ref, onMounted, computed, watch, nextTick} from 'vue';
-import {MealPlanVO} from '@/api/patients/hospitalMealPlan/types';
+import { ref, onMounted, computed, watch, nextTick } from 'vue';
+import { MealPlanVO } from '@/api/patients/hospitalMealPlan/types';
 
 import * as echarts from 'echarts';
 import CommonDialog from './components/CommonDialog.vue';
 import RecipeTemplate from './components/RecipeTemplate.vue';
 const emit = defineEmits(['goBack', 'submitHospital']);
-import {MealRecipeForm} from '@/api/patients/hospitalMealRecipe/types';
-import {ElMessage} from 'element-plus';
-import {useHospitalStore} from '@/store/modules/hospital';
+import { MealRecipeForm } from '@/api/patients/hospitalMealRecipe/types';
+import { ElMessage } from 'element-plus';
+import { useHospitalStore } from '@/store/modules/hospital';
 
 const useStore = useHospitalStore();
 
@@ -250,9 +231,9 @@ const calculateTotalPrice = () => {
 };
 
 const nutritionData = ref([
-  {name: '蛋白质', weight: '', ratio: 0, reference: '10% - 15%'},
-  {name: '脂肪', weight: '', ratio: 0, reference: '20% - 30%'},
-  {name: '碳水化合物', weight: '', ratio: 0, reference: '50% - 65%'}
+  { name: '蛋白质', weight: '', ratio: 0, reference: '10% - 15%' },
+  { name: '脂肪', weight: '', ratio: 0, reference: '20% - 30%' },
+  { name: '碳水化合物', weight: '', ratio: 0, reference: '50% - 65%' }
 ]);
 
 const initialTableData: TableRow[] = [
@@ -537,7 +518,7 @@ const handleRecipeConfirm = (selectedRecipes: Recipe[]) => {
 };
 
 // 处理食谱取消
-const handleRecipeCancel = () => {};
+const handleRecipeCancel = () => { };
 
 // 移除食谱
 const removeRecipe = (row: TableRow, index: number) => {
@@ -642,7 +623,7 @@ watch(
   () => {
     loadDraft();
   },
-  {immediate: true}
+  { immediate: true }
 );
 
 // 监听食谱数据变化,重新计算总价格
@@ -651,7 +632,7 @@ watch(
   () => {
     calculateTotalPrice();
   },
-  {deep: true}
+  { deep: true }
 );
 
 // 监听当前食谱切换,重新计算总价格
@@ -764,7 +745,7 @@ watch(
       });
     }
   },
-  {immediate: true}
+  { immediate: true }
 );
 
 onMounted(() => {

+ 37 - 25
src/views/patients/dietTherapy/addSmartRec.vue

@@ -2,7 +2,9 @@
   <div class="container">
     <div class="header-bar">
       <el-button @click="goBack" type="primary" plain class="back-btn">
-        <el-icon><ArrowLeft /></el-icon>
+        <el-icon>
+          <ArrowLeft />
+        </el-icon>
         返回
       </el-button>
       <span class="title">智能推荐</span>
@@ -15,7 +17,8 @@
         <div class="diet-type">
           <span class="required">基本膳食</span>
           <el-checkbox-group :model-value="dietTypes">
-            <el-checkbox v-for="item in dietOptions" :key="item" :label="item" @click="(e) => onDietTypesChange(item, e)">
+            <el-checkbox v-for="item in dietOptions" :key="item" :label="item"
+              @click="(e) => onDietTypesChange(item, e)">
               {{ item }}
             </el-checkbox>
           </el-checkbox-group>
@@ -24,12 +27,15 @@
           <span>禁忌食材</span>
           <div class="food-select" @click="openFoodDialog">
             <div v-if="forbiddenFoods" class="selected-foods">
-              <el-tag v-for="food in forbiddenFoods.split(',')" :key="food" size="small" closable @close="removeForbiddenFood(food)">
+              <el-tag v-for="food in forbiddenFoods.split(',')" :key="food" size="small" closable
+                @close="removeForbiddenFood(food)">
                 {{ food }}
               </el-tag>
             </div>
             <div v-else class="placeholder">请选择</div>
-            <el-icon class="select-icon"><ArrowDown /></el-icon>
+            <el-icon class="select-icon">
+              <ArrowDown />
+            </el-icon>
           </div>
         </div>
       </div>
@@ -80,7 +86,9 @@
           </div>
           <div class="form-item">
             <span>参考范围</span>
-            <el-icon class="info-icon"><QuestionFilled /></el-icon>
+            <el-icon class="info-icon">
+              <QuestionFilled />
+            </el-icon>
           </div>
           <div class="form-item">
             <span>总热量</span>
@@ -89,21 +97,13 @@
           <div class="form-item">
             <span>体质指标(BMI):</span>
             <span class="value">{{ bmi }}</span>
-            <span class="status" :style="{color: bmiColor}">正常</span>
+            <span class="status" :style="{ color: bmiColor }">正常</span>
           </div>
           <div class="form-item bmi-slider">
-            <el-slider
-              v-model="bmiValue"
-              :min="18.5"
-              :max="23.9"
-              :step="0.1"
-              :show-tooltip="false"
-              :marks="{
-                18.5: '18.5',
-                23.9: '23.9'
-              }"
-              style="width: 160px"
-            />
+            <el-slider v-model="bmiValue" :min="18.5" :max="23.9" :step="0.1" :show-tooltip="false" :marks="{
+              18.5: '18.5',
+              23.9: '23.9'
+            }" style="width: 160px" />
             <div class="bmi-status-text">
               <span>20.20(正常)</span>
             </div>
@@ -119,7 +119,8 @@
         <div class="ratio-section">
           <div class="ratio-header">
             <span>各餐比例:</span>
-            <el-progress :stroke-width="10" :percentage="100" :format="() => '100.00%'" :color="'#00B42A'" :striped="true" :striped-flow="true" />
+            <el-progress :stroke-width="10" :percentage="100" :format="() => '100.00%'" :color="'#00B42A'"
+              :striped="true" :striped-flow="true" />
           </div>
 
           <div class="meal-ratios">
@@ -171,7 +172,8 @@
 
           <div class="nutrition-ratio">
             <span>三大营养素供能比:</span>
-            <el-progress :stroke-width="10" :percentage="95" :format="() => '95%'" :color="'#00B42A'" :striped="true" :striped-flow="true" />
+            <el-progress :stroke-width="10" :percentage="95" :format="() => '95%'" :color="'#00B42A'" :striped="true"
+              :striped-flow="true" />
           </div>
 
           <div class="nutrition-ratios">
@@ -202,7 +204,7 @@
     </el-card>
 
     <!-- 底部按钮 -->
-    <div class="bottom-btn-card">
+    <div>
       <div class="btn-wrapper">
         <el-button @click="handleCancel">取消</el-button>
         <el-button type="primary" @click="handleGenerate">生成推荐方案</el-button>
@@ -210,13 +212,14 @@
     </div>
 
     <!-- 添加食材选择弹窗 -->
-    <common-dialog ref="foodDialogRef" type="food" title="添加食材" @confirm="handleFoodConfirm" @cancel="handleFoodCancel" />
+    <common-dialog ref="foodDialogRef" type="food" title="添加食材" @confirm="handleFoodConfirm"
+      @cancel="handleFoodCancel" />
   </div>
 </template>
 
 <script setup lang="ts">
-import {ref, computed} from 'vue';
-import {ArrowLeft, CircleCheck, QuestionFilled, ArrowDown} from '@element-plus/icons-vue';
+import { ref, computed } from 'vue';
+import { ArrowLeft, CircleCheck, QuestionFilled, ArrowDown } from '@element-plus/icons-vue';
 import CommonDialog from './components/CommonDialog.vue';
 
 // 基本信息
@@ -229,7 +232,7 @@ const foodDialogRef = ref();
 // 打开食材选择弹窗
 const openFoodDialog = () => {
   // 将当前已选择的食材传入
-  const currentFoods = forbiddenFoods.value ? forbiddenFoods.value.split(',').map((name) => ({name: name.trim()})) : [];
+  const currentFoods = forbiddenFoods.value ? forbiddenFoods.value.split(',').map((name) => ({ name: name.trim() })) : [];
   foodDialogRef.value?.openDialog('food', currentFoods);
 };
 
@@ -353,6 +356,7 @@ const handleGenerate = () => {
     margin-right: 16px;
     display: flex;
     align-items: center;
+
     .el-icon {
       margin-right: 4px;
     }
@@ -586,6 +590,7 @@ const handleGenerate = () => {
   :deep(.el-radio) {
     margin-right: 0;
     height: 32px;
+
     .el-radio__label {
       font-size: 14px;
       color: #4e5969;
@@ -698,6 +703,7 @@ const handleGenerate = () => {
 
   :deep(.el-progress) {
     margin-top: 8px;
+
     .el-progress-bar__outer {
       background-color: #e5e6eb;
       height: 8px;
@@ -719,15 +725,18 @@ const handleGenerate = () => {
 
     :deep(.el-progress) {
       width: 240px;
+
       .el-progress-bar__outer {
         background-color: #e5e6eb;
         height: 10px;
         border-radius: 20px;
       }
+
       .el-progress-bar__inner {
         border-radius: 20px;
         background-color: rgb(28, 202, 141) !important;
       }
+
       .el-progress__text {
         font-size: 13px !important;
         color: #fff;
@@ -790,15 +799,18 @@ const handleGenerate = () => {
 
     :deep(.el-progress) {
       width: 240px;
+
       .el-progress-bar__outer {
         background-color: #e5e6eb;
         height: 10px;
         border-radius: 20px;
       }
+
       .el-progress-bar__inner {
         border-radius: 20px;
         background-color: rgb(28, 202, 141) !important;
       }
+
       .el-progress__text {
         font-size: 13px !important;
         color: #fff;

+ 26 - 26
src/views/patients/dietTherapy/dailyIndex.vue

@@ -1,23 +1,21 @@
 <template>
   <div class="p-2">
-    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+    <transition :enter-active-class="proxy?.animate.searchAnimate.enter"
+      :leave-active-class="proxy?.animate.searchAnimate.leave">
       <div v-show="showSearch" class="mb-[10px]">
         <el-card shadow="hover">
           <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px">
             <el-form-item label="推荐时间:">
-              <el-date-picker
-                v-model="queryParams.dateRange"
-                type="daterange"
-                range-separator="-"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              />
+              <el-date-picker v-model="queryParams.dateRange" type="daterange" range-separator="-"
+                start-placeholder="开始日期" end-placeholder="结束日期" />
             </el-form-item>
             <el-form-item label="看诊类型:">
               <el-select v-model="queryParams.type" class="spec-unit-select">
-                <el-option v-for="dict in treatment_user_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+                <el-option v-for="dict in treatment_user_type" :key="dict.value" :label="dict.label"
+                  :value="dict.value" />
               </el-select>
             </el-form-item>
+            <br />
             <el-form-item>
               <el-input v-model="queryParams.searchValue" placeholder="门诊号/住院号/医生" style="width: 240px" clearable />
             </el-form-item>
@@ -34,7 +32,8 @@
       <template #header>
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
-            <el-button type="primary" plain icon="Plus" @click="emit('addDaily')" v-hasPermi="['patients:dailyMealPlan:add']">新增日常膳食</el-button>
+            <el-button type="primary" plain icon="Plus" @click="emit('addDaily')"
+              v-hasPermi="['patients:dailyMealPlan:add']">新增日常膳食</el-button>
           </el-col>
           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
@@ -42,15 +41,15 @@
 
       <el-table v-loading="loading" border :data="mealPlanList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
-        <el-table-column label="推荐时间" align="center" prop="createTime" />
-        <el-table-column label="看诊类型" align="center" prop="type">
+        <el-table-column label="推荐时间" width="200" align="center" prop="createTime" />
+        <el-table-column label="看诊类型" width="150" align="center" prop="type">
           <template #default="scope">
             <span>{{ getDictLabel(treatment_user_type, scope.row.type) || '--' }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="门诊/住院号" align="center" prop="outpatientNo" />
-        <el-table-column label="推荐医生" align="center" prop="createByUser" />
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <el-table-column label="门诊/住院号" width="200" align="center" prop="outpatientNo" />
+        <el-table-column label="推荐医生" width="200" align="center" prop="createByUser" />
+        <el-table-column label="操作" width="200" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-tooltip content="详情" placement="top">
               <el-button link type="primary" icon="View" @click="handleView(scope.row)">详情</el-button>
@@ -59,17 +58,18 @@
         </el-table-column>
       </el-table>
 
-      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+        v-model:limit="queryParams.pageSize" @pagination="getList" />
     </el-card>
   </div>
 </template>
 
 <script setup name="MealPlan" lang="ts">
-import {listDailyMealPlan, getMealPlan, delMealPlan, addMealPlan, updateMealPlan} from '@/api/patients/dailyMealPlan';
-import {MealPlanVO, MealPlanQuery, MealPlanForm} from '@/api/patients/dailyMealPlan/types';
+import { listDailyMealPlan, getMealPlan, delMealPlan, addMealPlan, updateMealPlan } from '@/api/patients/dailyMealPlan';
+import { MealPlanVO, MealPlanQuery, MealPlanForm } from '@/api/patients/dailyMealPlan/types';
 
-const {proxy} = getCurrentInstance() as ComponentInternalInstance;
-const {treatment_user_type} = toRefs<any>(proxy?.useDict('treatment_user_type'));
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { treatment_user_type } = toRefs<any>(proxy?.useDict('treatment_user_type'));
 
 const mealPlanList = ref<MealPlanVO[]>([]);
 const buttonLoading = ref(false);
@@ -114,7 +114,7 @@ const initFormData: MealPlanForm = {
   mealRecipeList: []
 };
 const data = reactive<PageData<MealPlanForm, MealPlanQuery>>({
-  form: {...initFormData},
+  form: { ...initFormData },
   queryParams: {
     pageNum: 1,
     pageSize: 10,
@@ -127,12 +127,12 @@ const data = reactive<PageData<MealPlanForm, MealPlanQuery>>({
     params: {}
   },
   rules: {
-    id: [{required: true, message: '主键不能为空', trigger: 'blur'}],
-    patientId: [{required: true, message: '患者ID不能为空', trigger: 'blur'}]
+    id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
+    patientId: [{ required: true, message: '患者ID不能为空', trigger: 'blur' }]
   }
 });
 
-const {queryParams, form, rules} = toRefs(data);
+const { queryParams, form, rules } = toRefs(data);
 
 /** 查询日常膳食主列表 */
 const getList = async () => {
@@ -158,7 +158,7 @@ const cancel = () => {
 
 /** 表单重置 */
 const reset = () => {
-  form.value = {...initFormData};
+  form.value = { ...initFormData };
   mealPlanFormRef.value?.resetFields();
   queryParams.value.dateRange = undefined;
   queryParams.value.type = undefined;
@@ -229,7 +229,7 @@ const handleDelete = async (id?: number) => {
   await getList();
 };
 
-defineExpose({submitForm, handleDelete});
+defineExpose({ submitForm, handleDelete });
 
 /** 删除按钮操作 */
 

+ 30 - 32
src/views/patients/dietTherapy/hospitalIndex.vue

@@ -1,23 +1,21 @@
 <template>
   <div class="p-2">
-    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
+    <transition :enter-active-class="proxy?.animate.searchAnimate.enter"
+      :leave-active-class="proxy?.animate.searchAnimate.leave">
       <div v-show="showSearch" class="mb-[10px]">
         <el-card shadow="hover">
-          <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="120px">
+          <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="100px">
             <el-form-item label="推荐时间:">
-              <el-date-picker
-                v-model="queryParams.dateRange"
-                type="daterange"
-                range-separator="-"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              />
+              <el-date-picker v-model="queryParams.dateRange" type="daterange" range-separator="-"
+                start-placeholder="开始日期" end-placeholder="结束日期" />
             </el-form-item>
             <el-form-item label="看诊类型:">
               <el-select v-model="queryParams.type" class="spec-unit-select">
-                <el-option v-for="dict in treatment_user_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+                <el-option v-for="dict in treatment_user_type" :key="dict.value" :label="dict.label"
+                  :value="dict.value" />
               </el-select>
             </el-form-item>
+            <br />
             <el-form-item>
               <el-input v-model="queryParams.searchValue" placeholder="门诊号/住院号/医生" style="width: 240px" clearable />
             </el-form-item>
@@ -34,9 +32,8 @@
       <template #header>
         <el-row :gutter="10" class="mb8">
           <el-col :span="1.5">
-            <el-button type="primary" plain icon="Plus" @click="emit('addHospital')" v-hasPermi="['patients:hospitalMealPlan:add']"
-              >新增院内膳食</el-button
-            >
+            <el-button type="primary" plain icon="Plus" @click="emit('addHospital')"
+              v-hasPermi="['patients:hospitalMealPlan:add']">新增院内膳食</el-button>
           </el-col>
           <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
         </el-row>
@@ -44,20 +41,20 @@
 
       <el-table v-loading="loading" border :data="mealPlanList" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
-        <el-table-column label="推荐时间" align="center" prop="createTime" />
-        <el-table-column label="看诊类型" align="center" prop="type">
+        <el-table-column label="推荐时间" width="200px" align="center" prop="createTime" />
+        <el-table-column label="看诊类型" width="100px" align="center" prop="type">
           <template #default="scope">
             <span>{{ getDictLabel(treatment_user_type, scope.row.type) || '--' }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="门诊/住院号" align="center" prop="outpatientNo" />
-        <el-table-column label="处方状态" align="center" prop="status">
+        <el-table-column label="门诊/住院号" width="200px" align="center" prop="outpatientNo" />
+        <el-table-column label="处方状态" width="100px" align="center" prop="status">
           <template #default="scope">
             <span>{{ getDictLabel(payment_status, scope.row.status) || '--' }}</span>
           </template>
         </el-table-column>
-        <el-table-column label="推荐医生" align="center" prop="createByUser" />
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <el-table-column label="推荐医生" width="150px" align="center" prop="createByUser" />
+        <el-table-column label="操作" width="200px" align="center" class-name="small-padding fixed-width">
           <template #default="scope">
             <el-tooltip content="详情">
               <el-button link type="primary" icon="View" @click="handleView(scope.row)">详情</el-button>
@@ -66,21 +63,22 @@
         </el-table-column>
       </el-table>
 
-      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
+      <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
+        v-model:limit="queryParams.pageSize" @pagination="getList" />
     </el-card>
   </div>
 </template>
 
 <script setup name="MealPlan" lang="ts">
-import {listMealPlan, getMealPlan, delMealPlan, addMealPlan, updateMealPlan} from '@/api/patients/hospitalMealPlan';
-import {MealPlanVO, MealPlanQuery, MealPlanForm} from '@/api/patients/hospitalMealPlan/types';
-import {useHospitalStore} from '@/store/modules/hospital';
+import { listMealPlan, getMealPlan, delMealPlan, addMealPlan, updateMealPlan } from '@/api/patients/hospitalMealPlan';
+import { MealPlanVO, MealPlanQuery, MealPlanForm } from '@/api/patients/hospitalMealPlan/types';
+import { useHospitalStore } from '@/store/modules/hospital';
 
 const useStore = useHospitalStore();
-const {setHospitalList, hospitalList} = useStore;
+const { setHospitalList, hospitalList } = useStore;
 
-const {proxy} = getCurrentInstance() as ComponentInternalInstance;
-const {treatment_user_type, payment_status} = toRefs<any>(proxy?.useDict('treatment_user_type', 'payment_status'));
+const { proxy } = getCurrentInstance() as ComponentInternalInstance;
+const { treatment_user_type, payment_status } = toRefs<any>(proxy?.useDict('treatment_user_type', 'payment_status'));
 
 const mealPlanList = ref<MealPlanVO[]>([]);
 const buttonLoading = ref(false);
@@ -126,7 +124,7 @@ const initFormData: MealPlanForm = {
   mealRecipeList: []
 };
 const data = reactive<PageData<MealPlanForm, MealPlanQuery>>({
-  form: {...initFormData},
+  form: { ...initFormData },
   queryParams: {
     pageNum: 1,
     pageSize: 10,
@@ -139,12 +137,12 @@ const data = reactive<PageData<MealPlanForm, MealPlanQuery>>({
     params: {}
   },
   rules: {
-    id: [{required: true, message: '主键不能为空', trigger: 'blur'}],
-    patientId: [{required: true, message: '患者ID不能为空', trigger: 'blur'}]
+    id: [{ required: true, message: '主键不能为空', trigger: 'blur' }],
+    patientId: [{ required: true, message: '患者ID不能为空', trigger: 'blur' }]
   }
 });
 
-const {queryParams, form, rules} = toRefs(data);
+const { queryParams, form, rules } = toRefs(data);
 
 /** 查询院内膳食主列表 */
 const getList = async () => {
@@ -171,7 +169,7 @@ const cancel = () => {
 
 /** 表单重置 */
 const reset = () => {
-  form.value = {...initFormData};
+  form.value = { ...initFormData };
   mealPlanFormRef.value?.resetFields();
   queryParams.value.dateRange = undefined;
   queryParams.value.type = undefined;
@@ -267,7 +265,7 @@ const handleDelete = async (id?: number) => {
   await getList();
 };
 
-defineExpose({submitForm, handleDelete});
+defineExpose({ submitForm, handleDelete });
 
 onMounted(() => {
   getList();

+ 2 - 0
src/views/patients/enteralNutrition/components/LeftCard.vue

@@ -69,6 +69,7 @@
       </el-tab-pane>
       <el-tab-pane label="膳食治疗" name="therapy">
         <!-- 膳食治疗内容 -->
+        <DietTherapy />
       </el-tab-pane>
     </el-tabs>
   </el-card>
@@ -81,6 +82,7 @@ import MaterialTable from './table/MaterialTable.vue';
 import MaterialTable2 from './table/MaterialTable2.vue';
 import PackageTable from './table/PackageTable.vue';
 import ConfigureTable from './table/ConfigureTable.vue';
+const DietTherapy = defineAsyncComponent(() => import('@/views/patients/dietTherapy/index.vue'));
 
 import { listEnteralNutrition, getEnteralNutrition, delEnteralNutrition, addEnteralNutrition, updateEnteralNutrition } from '@/api/patients/nutrition';
 import { EnteralNutritionVO, EnteralNutritionQuery, EnteralNutritionForm, EnteralNutritionSaveForm } from '@/api/patients/nutrition/types';

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff