chenying2100 пре 4 недеља
родитељ
комит
80a0a22a44

+ 200 - 0
.specstory/history/2025-07-14_04-02Z-修改-index-vue-以实现宫格按钮样式.md

@@ -125,7 +125,15 @@ _**Assistant**_
 
 ---
 
+<details><summary>Edit file: src/views/patients/screening/index.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 12, lines removed: 3
+
 ```diff
+@@ -17,7 +17,16 @@
               </el-form-item>
               <el-form-item label="筛查类型" prop="configId">
 -               <el-select v-model="queryParams.configId" placeholder="请选择" clearable>
@@ -147,7 +155,11 @@ _**Assistant**_
               <el-form-item prop="patientNo">
 ```
 
+**Chunk 2**
+Lines added: 12, lines removed: 1
+
 ```diff
+@@ -92,5 +101,16 @@
           </el-form-item>
           <el-form-item label="营养筛查类型" prop="configId">
 -           <el-input v-model="form.configId" placeholder="请输入营养筛查类型" />
@@ -167,7 +179,11 @@ _**Assistant**_
           <el-form-item label="筛查时间" prop="screeningTime">
 ```
 
+**Chunk 3**
+Lines added: 14, lines removed: undefined
+
 ```diff
+@@ -303,3 +323,17 @@
   });
   </script>
 + 
@@ -187,6 +203,8 @@ _**Assistant**_
   
 ```
 
+</details>
+
 ---
 
 已将“营养筛查类型”表单项改为宫格按钮选择,样式与图片类似。你现在可以在弹窗表单中直接点击按钮选择筛查类型,选中项会高亮显示,体验与图片一致。
@@ -506,7 +524,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 14, lines removed: 9
+
 ```diff
+@@ -17,16 +17,21 @@
                   <el-row>
                       <el-col :span="24">
 -                         * 年龄
@@ -539,7 +565,11 @@ _**Assistant**_
                   </el-row>
 ```
 
+**Chunk 2**
+Lines added: 1, lines removed: undefined
+
 ```diff
+@@ -58,4 +63,5 @@
     import { ScreeningVO, ScreeningQuery, ScreeningForm } from '@/api/patients/screening/types';
     import {  getScreeningAssessmentConfig } from '@/api/system/screeningAssessmentConfig'; 
 +   import { ref } from 'vue'
@@ -547,7 +577,11 @@ _**Assistant**_
     const { proxy } = getCurrentInstance() as ComponentInternalInstance; 
 ```
 
+**Chunk 3**
+Lines added: 1, lines removed: undefined
+
 ```diff
+@@ -66,4 +72,5 @@
      
     let form=ref({});   
 +   const age = ref('<50')
@@ -555,7 +589,11 @@ _**Assistant**_
     
 ```
 
+**Chunk 4**
+Lines added: 13, lines removed: undefined
+
 ```diff
+@@ -108,4 +115,17 @@
       margin-left: ;
     }
 +   .el-radio-group {
@@ -575,9 +613,19 @@ _**Assistant**_
     
 ```
 
+</details>
+
 ---
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: undefined, lines removed: 1
+
 ```diff
+@@ -113,5 +113,4 @@
       height: 48px;
       border-radius: 8px;
 -     margin-left: ;
@@ -585,6 +633,8 @@ _**Assistant**_
     .el-radio-group {
 ```
 
+</details>
+
 ---
 
 已将“年龄”部分修改为与图片一致的竖直单选框样式,左侧有红色星号,选项为 `<50`、`50~74`、`≥75`,选中项为蓝色下划线,并修复了样式错误。
@@ -601,7 +651,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 1, lines removed: undefined
+
 ```diff
+@@ -23,4 +23,5 @@
                   <el-row>
                       <el-col :span="24">
 +                         <div class="radio-card">
@@ -609,7 +667,11 @@ _**Assistant**_
                                 <el-radio :label="'<50'">
 ```
 
+**Chunk 2**
+Lines added: 1, lines removed: undefined
+
 ```diff
+@@ -34,4 +35,5 @@
                                 </el-radio>
                             </el-radio-group>
 +                         </div>
@@ -617,7 +679,11 @@ _**Assistant**_
                   </el-row>
 ```
 
+**Chunk 3**
+Lines added: 8, lines removed: undefined
+
 ```diff
+@@ -114,4 +116,12 @@
       border-radius: 8px;
     }
 +   .radio-card {
@@ -632,7 +698,11 @@ _**Assistant**_
       display: flex;
 ```
 
+**Chunk 4**
+Lines added: 5, lines removed: 1
+
 ```diff
+@@ -120,5 +130,9 @@
     }
     .el-radio {
 -     margin-bottom: 12px;
@@ -645,6 +715,8 @@ _**Assistant**_
     .blue-underline {
 ```
 
+</details>
+
 ---
 
 已将年龄单选框部分的样式调整如下:
@@ -665,7 +737,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 9, lines removed: 1
+
 ```diff
+@@ -42,5 +42,13 @@
                   <el-row>
                       <el-col :span="24">
 - AAA
@@ -682,7 +762,11 @@ _**Assistant**_
                   </el-row>
 ```
 
+**Chunk 2**
+Lines added: 1, lines removed: undefined
+
 ```diff
+@@ -75,4 +83,5 @@
     let form=ref({});   
     const age = ref('<50')
 +   const exerciseFreq = ref('无')
@@ -690,7 +774,11 @@ _**Assistant**_
     
 ```
 
+**Chunk 3**
+Lines added: 11, lines removed: undefined
+
 ```diff
+@@ -131,4 +140,15 @@
       margin-bottom: 0;
     }
 +   .horizontal-radio-group {
@@ -708,6 +796,8 @@ _**Assistant**_
     </style>
 ```
 
+</details>
+
 ---
 
 已将 AAA、BBB、CCC 替换为“1.平均运动次数是”横向单选题,选项为“无、偶尔、1-2次/周、3-4次/周、≥5次/周”,并加上红色星号和题号,样式与图片一致(横向排列,间距合适)。
@@ -796,7 +886,15 @@ const malnutritionSigns = ref<string[]>([])
 
 ---
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 16, lines removed: 11
+
 ```diff
+@@ -49,16 +49,21 @@
                           </el-row>
   
 -                         <el-row style="margin-bottom: 10px; border-top: 1px dashed  #e5e7eb; padding-top: 20px;">
@@ -831,7 +929,11 @@ const malnutritionSigns = ref<string[]>([])
   </el-row>
 ```
 
+**Chunk 2**
+Lines added: 2, lines removed: undefined
+
 ```diff
+@@ -122,4 +127,6 @@
     let form=ref<ScreeningAssessmentConfigForm>({});   
    
 +   const malnutritionSigns = ref<string[]>([])
@@ -840,7 +942,11 @@ const malnutritionSigns = ref<string[]>([])
     
 ```
 
+**Chunk 3**
+Lines added: 10, lines removed: undefined
+
 ```diff
+@@ -189,4 +196,14 @@
       margin-left: 0;
     }
 +   .horizontal-checkbox-group {
@@ -857,6 +963,8 @@ const malnutritionSigns = ref<string[]>([])
     </style>
 ```
 
+</details>
+
 ---
 
 1.2题已改为横向排列的多选框,题号加粗,选项与图片一致,间距适中,自动换行,整体左对齐。  
@@ -872,7 +980,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 2, lines removed: undefined
+
 ```diff
+@@ -18,4 +18,6 @@
                           <span style="color: #f56c6c; margin-right: 4px;">*</span>
                           <span style="font-weight: bold;">年龄</span>
 +                     </el-col>
@@ -881,7 +997,11 @@ _**Assistant**_
                               <el-radio-group v-model="age" style="margin-top: 8px;">
 ```
 
+**Chunk 2**
+Lines added: 1, lines removed: undefined
+
 ```diff
+@@ -153,4 +155,5 @@
    
     const malnutritionSigns = ref<string[]>([])
 +   const age = ref('<50')
@@ -889,6 +1009,8 @@ _**Assistant**_
    
 ```
 
+</details>
+
 ---
 
 已将“年龄”标题和单选框分为两行,单选框单独一行并左对齐,样式更美观,符合你的需求。
@@ -905,7 +1027,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: src/views/patients/screening/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 1, lines removed: 1
+
 ```diff
+@@ -64,5 +64,5 @@
                   <el-row style="margin-bottom: 20px;">
                       <el-col :span="24">
 -                         <div class="radio-card">
@@ -914,7 +1044,11 @@ _**Assistant**_
                                   <el-checkbox label="饮食行为问题">饮食行为问题</el-checkbox>
 ```
 
+**Chunk 2**
+Lines added: 12, lines removed: undefined
+
 ```diff
+@@ -243,4 +243,16 @@
       margin-bottom: 8px;
     }
 +   .checkbox-vertical-card .el-checkbox-group {
@@ -933,6 +1067,8 @@ _**Assistant**_
     </style>
 ```
 
+</details>
+
 ---
 
 已将该段 checkbox 样式调整为每个选项一行,左对齐,间距适中,视觉更清晰整齐。如需进一步美化或有其他表单项需要类似处理,请随时告知!
@@ -1148,7 +1284,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: src/views/patients/evaluation/add.vue</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 4, lines removed: 2
+
 ```diff
+@@ -53,7 +53,9 @@
                                         <template v-for="ctl,i in item.contentList">
                                             <el-radio :label="ctl.label" :value="i" :disabled="isView">
 -                                               <span>{{ctl.label }}</span>
@@ -1162,7 +1306,11 @@ _**Assistant**_
                                             </el-radio>
 ```
 
+**Chunk 2**
+Lines added: 5, lines removed: undefined
+
 ```diff
+@@ -81,5 +83,10 @@
                                             <template v-for="ctl,i in item.contentList">
                                                 <el-checkbox :label="ctl.label" :value="i" :disabled="isView">
 +                                                   <span class="option-content">
@@ -1175,7 +1323,11 @@ _**Assistant**_
                                             </template>
 ```
 
+**Chunk 3**
+Lines added: 5, lines removed: undefined
+
 ```diff
+@@ -101,5 +108,10 @@
                                         <template v-for="ctl,i in item.contentList">
                                             <el-checkbox :label="ctl.label" :value="i" :disabled="isView">
 +                                               <span class="option-content">
@@ -1188,7 +1340,11 @@ _**Assistant**_
                                         </template>
 ```
 
+**Chunk 4**
+Lines added: 10, lines removed: undefined
+
 ```diff
+@@ -458,4 +470,14 @@
     border-left: none;
   }
 +  
@@ -1205,6 +1361,8 @@ _**Assistant**_
   
 ```
 
+</details>
+
 ---
 
 已优化图片和文字的样式:  
@@ -1599,7 +1757,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: prompt/info.txt</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 19, lines removed: 19
+
 ```diff
+@@ -12,28 +12,28 @@
     支付方式
   
 - CREATE TABLE settlement (
@@ -1649,6 +1815,8 @@ _**Assistant**_
   
 ```
 
+</details>
+
 ---
 
 已将 settlement 表的所有字段名都加上了反引号 `,包括主键和系统字段,完全符合你的要求。如需其它表也这样处理,请随时告知!
@@ -1663,7 +1831,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: prompt/info.txt</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 31, lines removed: 31
+
 ```diff
+@@ -63,38 +63,38 @@
     金额
    
 - CREATE TABLE enteral_nutrition (
@@ -1735,6 +1911,8 @@ _**Assistant**_
   
 ```
 
+</details>
+
 ---
 
 已将 enteral_nutrition 表的所有字段名都加上了反引号 `,包括主键和系统字段,完全符合你的要求。如需其它表也这样处理,请随时告知!
@@ -1749,7 +1927,15 @@ _**User**_
 
 _**Assistant**_
 
+<details><summary>Edit file: prompt/info.txt</summary>
+
+undefined
+
+**Chunk 1**
+Lines added: 20, lines removed: 20
+
 ```diff
+@@ -113,27 +113,27 @@
   
    
 -  CREATE TABLE enteral_nutrition_consumable (
@@ -1799,6 +1985,8 @@ _**Assistant**_
   
 ```
 
+</details>
+
 ---
 
 已将 enteral_nutrition_consumable 表的所有字段名都加上了反引号 `,包括主键和系统字段,完全符合你的要求。如需其它表也这样处理,请随时告知!
@@ -1817,7 +2005,19 @@ Cancelled
 
 ---
 
+已将选项图片显示样式调整为图片在文字右侧,且图片和文字分开,间距美观。如需进一步调整样式或有其他需求,请随时告知!
+
+---
+
+_**User**_
+
+帮我使用js代码计算日期之差:2025-07-28、2025-07-30
+
+---
+
+_**Assistant**_
 
+*You've hit your free requests limit. [Upgrade to Pro](https://www.cursor.com/api/auth/checkoutDeepControl?tier=pro) for more usage, frontier models, Background Agents, and more. Your usage limits will reset when your monthly cycle ends on 8/9/2025.*
 
 ---
 

+ 71 - 0
prompt/info.txt

@@ -1,3 +1,74 @@
+
+
+添加配置处方
+    组号
+    营养产品
+    用量/次
+    餐次时间
+    频次
+    首日
+    用量/日
+    使用天数
+    用量/总
+    规格
+    用法
+    制剂液量/次
+    制剂浓度/次
+    能量密度/次
+    处方备注
+    每日热量
+    金额
+    操作    
+
+
+
+
+
+添加预包装处方
+    营养产品
+    数量
+    用量/次
+    餐次时间
+    频次
+    首日
+    用量/日
+    使用天数
+    规格
+    用法
+    处方备注
+    每日热量
+    金额
+    操作
+
+
+添加长期医嘱处方 
+    组号
+    营养产品
+    用量/次
+    餐次时间
+    频次
+    首日
+    用量/日
+    规格
+    用法
+    制剂液量/次
+    制剂浓度/次
+    能量密度/次
+    处方备注
+    每日热量
+    金额
+    操作
+
+
+
+
+
+
+
+
+
+
+
 营养筛查
 营养评估
 预包装处方

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

@@ -212,6 +212,10 @@ const submitForm = async (status: string) => {
 
         let arr = pd.nutritionProductId.split("_");
         pd.nutritionProductId = arr[0];
+        pd.usage = item.usage ;
+        pd.preparationVolumePerTime = item.preparationVolumePerTime ;
+        pd.preparationConcentrationPerTime = item.preparationConcentrationPerTime ;
+        pd.energyDensityPerTime = item.energyDensityPerTime ;
 
         pd.prescriptionDate = prescriptionDate.value;
         pd.groupNo = item.sn;

+ 14 - 2
src/views/patients/enteralNutrition/components/table/ConfigureTable.vue

@@ -310,7 +310,9 @@ const changeProductSelect = async (id: string) => {
     pt.dailyCalories=null;
     pt.productSpecUnit=item.productSpecUnit;
     pt.amount=null; 
-    row.usage=item.defaultUsage;
+    if(!row.usage){
+      row.usage=item.defaultUsage;
+    }    
     pt.totalDose='0' ;
     pt.dosePerDay='0';
     pt.firstDay=Math.ceil(row.frequency/2.0);
@@ -378,10 +380,20 @@ const changeUsage = (value: string, sn:string) => {
 }
 
 const changePreparationVolumePerTime = (value: string, sn:string) => { 
+  let row = tableData.value[sn];
+  if(row.preparationVolumePerTime){
+    row.preparationConcentrationPerTime=2;
+    row.energyDensityPerTime=Number(row.preparationVolumePerTime)*row.preparationConcentrationPerTime/100.0;
+  }
   changeTimeSelection(null,sn);
 }
 
 const changeEnergyDensityPerTime = (value: string, sn:string) => { 
+  let row = tableData.value[sn];
+  if(row.preparationConcentrationPerTime!=null){     
+    row.preparationVolumePerTime=Number(row.energyDensityPerTime)/(row.preparationConcentrationPerTime/100.0);
+  }
+
   changeTimeSelection(null,sn);
 }
 
@@ -405,7 +417,7 @@ const changeTimeSelection = (value: string, sn:string) => {
   row.frequency=frequency;
   if(value!=null){
     row.firstDay=Math.ceil(row.frequency/2.0);
-  }
+  } 
 
   row.products.forEach(pt => {
     if (!pt.dosePerTime || pt.dosePerTime.trim().length == 0) {

+ 6 - 6
src/views/patients/enteralNutrition/components/table/MaterialTable.vue

@@ -226,9 +226,9 @@ watch(
       });
 
       let row: TableRow = {
-        frequency: item.frequency,
-        usageDays: item.usageDays,
-        firstDay: item.firstDay,
+        frequency: Number(item.frequency),
+        usageDays: Number(item.usageDays),
+        firstDay: Number(item.firstDay),
         dosePerTime: 1,
         tableId: item.tableId,
         sn: newTableList.value.length
@@ -243,9 +243,9 @@ watch(
         dosePerTime = row.dosePerTime;
       }
 
-      row.frequency = item.frequency;
-      row.usageDays = item.usageDays;
-      row.firstDay = item.firstDay;
+      row.frequency = Number(item.frequency);
+      row.usageDays = Number(item.usageDays);
+      row.firstDay = Number(item.firstDay);
       row.dosePerDay = item.frequency * dosePerTime;
       row.quantity = ((row.usageDays - 1) * row.frequency + row.firstDay) * dosePerTime;
 

+ 8 - 8
src/views/patients/enteralNutrition/components/table/MaterialTable2.vue

@@ -163,7 +163,7 @@ const changeConsumableSelect = async (id: string) => {
 
     let dosePerTime = 0;
     if (row.dosePerTime) {
-      dosePerTime = row.dosePerTime;
+      dosePerTime = Number(row.dosePerTime);
     }
     
     row.specification=item.suppliesSpec;
@@ -226,9 +226,9 @@ watch(
       });
 
       let row: TableRow = {
-        frequency: item.frequency,
-        usageDays: item.usageDays,
-        firstDay: item.firstDay,
+        frequency: Number(item.frequency),
+        usageDays: Number(item.usageDays),
+        firstDay: Number(item.firstDay),
         dosePerTime: 1,
         tableId: item.tableId,
         sn: newTableList.value.length
@@ -240,12 +240,12 @@ watch(
       }
       let dosePerTime=0;
       if (row.dosePerTime) {
-        dosePerTime = row.dosePerTime;
+        dosePerTime = Number(row.dosePerTime);
       }
 
-      row.frequency = item.frequency;
-      row.usageDays = item.usageDays;
-      row.firstDay = item.firstDay;
+      row.frequency = Number(item.frequency);
+      row.usageDays = Number(item.usageDays);
+      row.firstDay = Number(item.firstDay);
       row.dosePerDay = item.frequency * dosePerTime;
       row.quantity =Math.max(0,((row.usageDays - 1) * row.frequency + row.firstDay) * dosePerTime) ;
 

+ 13 - 2
src/views/patients/enteralNutrition/components/table/NutritionTable.vue

@@ -277,8 +277,10 @@ const changeProductSelect = async (id: string) => {
     pt.dosePerTime=null;     
     pt.dailyCalories=null;
     pt.productSpecUnit=item.productSpecUnit;
-    pt.amount=null; 
-    row.usage=item.defaultUsage;
+    pt.amount=null;      
+    if(!row.usage){
+      row.usage=item.defaultUsage;
+    }  
     pt.totalDose='0' ;
     pt.dosePerDay='0';
     pt.firstDay=Math.ceil(row.frequency/2.0);
@@ -360,10 +362,19 @@ const changeUsage = (value: string, sn:string) => {
 }
 
 const changePreparationVolumePerTime = (value: string, sn:string) => { 
+  let row = tableData.value[sn];
+  if(row.preparationVolumePerTime){
+    row.preparationConcentrationPerTime=2;
+    row.energyDensityPerTime=Number(row.preparationVolumePerTime)*row.preparationConcentrationPerTime/100.0;
+  }
   changeTimeSelection(null,sn);
 }
 
 const changeEnergyDensityPerTime = (value: string, sn:string) => { 
+  let row = tableData.value[sn];
+  if(row.preparationConcentrationPerTime!=null){     
+    row.preparationVolumePerTime=Number(row.energyDensityPerTime)/(row.preparationConcentrationPerTime/100.0);
+  }
   changeTimeSelection(null,sn);
 }
 

+ 4 - 2
src/views/patients/enteralNutrition/components/table/PackageTable.vue

@@ -354,8 +354,10 @@ const changeProductSelect = async (id: string) => {
     row.dosePerTime=null;     
     row.dailyCalories=null;
     row.amount=null; 
-    row.productSpecUnit=item.productSpecUnit;
-    row.usage=item.defaultUsage;     
+    row.productSpecUnit=item.productSpecUnit;         
+    if(!row.usage){
+      row.usage=item.defaultUsage;
+    }  
     row.dosePerDay='0';
     row.firstDay=Math.ceil(row.frequency/2.0);
     break;

+ 1 - 1
vite.config.ts

@@ -28,7 +28,7 @@ export default defineConfig(({mode, command}) => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
-          target: 'http://localhost:8080',
+          target: 'http://localhost:8081',
           changeOrigin: true,
           ws: true,
           rewrite: (path) => path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')