From 6a02437da5ca1fd368bae48622589f6f359bff95 Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期三, 09 十月 2024 09:01:04 +0800
Subject: [PATCH] 更新营养筛查评估

---
 src/views/home/components/pingubiao/editDietary2.vue |  613 ++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 428 insertions(+), 185 deletions(-)

diff --git a/src/views/home/components/pingubiao/editDietary2.vue b/src/views/home/components/pingubiao/editDietary2.vue
index 26c7a35..6c77a33 100644
--- a/src/views/home/components/pingubiao/editDietary2.vue
+++ b/src/views/home/components/pingubiao/editDietary2.vue
@@ -1,6 +1,6 @@
 <template>
     <div class="dietarySurvey-item">
-        <el-dialog  v-model="state.dialogTableVisible" title="主观全面评定(SGA)评价" :fullscreen="true" width="100%">
+        <el-dialog v-model="state.dialogTableVisible" title="主观全面评定(SGA)评价" :fullscreen="true" width="100%">
             <div class="container" style="width: 100%; height: 100%;overflow: auto;">
                 <div>
                     <div>
@@ -11,15 +11,17 @@
                                     <tr>
                                         <th colspan="2">
                                             <el-form-item label="初次调查日期">
-                                                <el-date-picker v-model="state.tableData.初次调查日期" type="date" style="width: 100px;"
-                                                    placeholder="" format="YYYY/MM/DD" value-format="YYYY-MM-DD" />
+                                                <el-date-picker v-model="state.tableData.初次调查日期" type="date"
+                                                    style="width: 100px;" placeholder="" format="YYYY/MM/DD"
+                                                    value-format="YYYY-MM-DD" />
                                             </el-form-item>
 
                                         </th>
                                         <th colspan="2">
                                             <el-form-item label="更新日期">
-                                                <el-date-picker v-model="state.tableData.更新日期" type="date" style="width: 100px;"
-                                                    placeholder="" format="YYYY/MM/DD" value-format="YYYY-MM-DD" />
+                                                <el-date-picker v-model="state.tableData.更新日期" type="date"
+                                                    style="width: 100px;" placeholder="" format="YYYY/MM/DD"
+                                                    value-format="YYYY-MM-DD" />
                                             </el-form-item>
 
 
@@ -29,62 +31,57 @@
                                     </tr>
                                     <tr>
                                         <th colspan="2">
-                                           患者姓名:{{patientsInfo.patientName}}
+                                            患者姓名:{{ patientsInfo.patientName }}
 
                                         </th>
                                         <th colspan="2">
-                                            年龄:{{patientsInfo.age}}
+                                            年龄:{{ patientsInfo.age }}
                                         </th>
-                                        <th colspan="2">性别:{{patientsInfo.patientGenderText}}</th>
+                                        <th colspan="2">性别:{{ patientsInfo.patientGenderText }}</th>
 
                                     </tr>
-                                    
+
 
                                     <tr>
                                         <td colspan="3">
                                             评价内容
-                                            
+
                                         </td>
-                                        <td colspan="3">
-                                            评级结果
+                                        <td colspan="3" style="color: red;">
+                                            评级结果:{{sum}}
                                         </td>
-                                       
+
 
                                     </tr>
                                     <tr>
                                         <td colspan="1" rowspan="3">
                                             体重改变
-                                            
+
                                         </td>
                                         <td colspan="2">您目前体重?</td>
                                         <td colspan="3">
-                                            <el-input
-                                                v-model="state.tableData.您目前体重" 
-                                                style="max-width: 150px"
-                                                placeholder=""
-                                                >
+                                            <el-input v-model="state.tableData.您目前体重" style="max-width: 150px"
+                                                placeholder="">
                                                 <template #append>kg</template>
-                                            </el-input> 
+                                            </el-input>
                                         </td>
                                     </tr>
                                     <tr>
-                                      
+
                                         <td colspan="2">与您六月份前的体重相比有变化吗?</td>
                                         <td colspan="3">
-                                            <el-radio-group class="elradiozdi"
-                                                v-model="state.tableData.体重改变1.type">
-                                                <el-radio value="A">A:体重变化<5%或5%-10%但正在改善</el-radio>
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.体重改变1.type">
+                                                <el-radio value="A">A:体重变化&lt;5%或5%-10%但正在改善 </el-radio>
                                                 <el-radio value="B">B:持续减少5%-10%或由10%升至5%-10%</el-radio>
                                                 <el-radio value="C">C:持续减少>10%</el-radio>
                                             </el-radio-group>
                                         </td>
                                     </tr>
                                     <tr>
-                                       
+
                                         <td colspan="2">近2周体重变化了吗?</td>
                                         <td colspan="3">
-                                            <el-radio-group class="elradiozdi"
-                                                v-model="state.tableData.体重改变2.type">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.体重改变2.type">
                                                 <el-radio value="A">A:无变化,正常体重或恢复到5%内</el-radio>
                                                 <el-radio value="B">B:稳定,但低于理想或通常体重;部分恢复但不完全</el-radio>
                                                 <el-radio value="C">C:减少/降低</el-radio>
@@ -95,12 +92,11 @@
                                     <tr>
                                         <td rowspan="4">
                                             进食
-                                            
+
                                         </td>
                                         <td colspan="2">您的食欲??</td>
                                         <td colspan="3" rowspan="3">
-                                            <el-radio-group class="elradiozdi"
-                                                v-model="state.tableData.进食1.type">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.进食1.type">
                                                 <el-radio value="A">A:好;无变化,轻度;短期变化</el-radio>
                                                 <el-radio value="B">B:正常下限,但在减少;差,但在增加;差,没变化(取决于初始状态)</el-radio>
                                                 <el-radio value="C">C:差,并在减少;差,无变化</el-radio>
@@ -108,133 +104,272 @@
                                         </td>
                                     </tr>
                                     <tr>
-                                      
+
                                         <td colspan="2">您的进食量有变化吗?</td>
-                                       
+
                                     </tr>
                                     <tr>
-                                       
+
                                         <td colspan="2">这种情况持续多长时间?</td>
-                                       
+
                                     </tr>
                                     <tr>
-                                       
-                                       <td colspan="2">您的食物类型有变化吗?</td>
-                                       <td colspan="3">
-                                           <el-radio-group class="elradiozdi"
-                                               v-model="state.tableData.进食2.type">
-                                               <el-radio value="A">A:没有变化</el-radio>
-                                               <el-radio value="B">B:半流食</el-radio>
-                                               <el-radio value="C">C:全流食</el-radio>
-                                               <el-radio value="D">D:无法进食</el-radio>
-                                           </el-radio-group>
-                                       </td>
-                                   </tr>
-                                   <tr>
+
+                                        <td colspan="2">您的食物类型有变化吗?</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.进食2.type">
+                                                <el-radio value="A">A:没有变化</el-radio>
+                                                <el-radio value="B">B:半流食</el-radio>
+                                                <el-radio value="C">C:全流食</el-radio>
+                                                <el-radio value="D">D:无法进食</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
                                         <td rowspan="6">
                                             胃肠道症状
                                         </td>
                                         <td colspan="5">近2周以来您经常出现下列问题吗?</td>
-                                   </tr>   
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">1:没有食欲:</td>
                                         <td colspan="3">
                                             从不-很少-每天-一周1-2次-每周2-3次
                                         </td>
-                                   </tr>
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">2:腹泻:</td>
                                         <td colspan="3">
                                             从不-很少-每天-一周1-2次-每周2-3次
                                         </td>
-                                   </tr>        
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">3:恶心:</td>
                                         <td colspan="3">
                                             从不-很少-每天-一周1-2次-每周2-3次
                                         </td>
-                                   </tr>        
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">4:呕吐:</td>
                                         <td colspan="3">
                                             从不-很少-每天-一周1-2次-每周2-3次
                                         </td>
-                                   </tr>    
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="6">
-                                            <el-radio-group class="elradiozdi"
-                                               v-model="state.tableData.胃肠道症状.type">
-                                               <el-radio value="A">A:少有,间断</el-radio>
-                                               <el-radio value="B">B:部分症状,>2周;严重、持续的症状,但在改善</el-radio>
-                                               <el-radio value="C">C:部分或所有症状,频繁或每天,>2周</el-radio>
-                                           </el-radio-group>
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.胃肠道症状.type">
+                                                <el-radio value="A">A:少有,间断</el-radio>
+                                                <el-radio value="B">B:部分症状,>2周;严重、持续的症状,但在改善</el-radio>
+                                                <el-radio value="C">C:部分或所有症状,频繁或每天,>2周</el-radio>
+                                            </el-radio-group>
                                         </td>
-                                        
-                                   </tr>   
-                                  <!-- 功能特异                                      -->
-                                  <tr>
+
+                                    </tr>
+                                    <!-- 功能特异                                      -->
+                                    <tr>
                                         <td rowspan="6">
                                             功能异常
                                         </td>
                                         <td colspan="5">您现在还能像往常那样做以下的事吗?</td>
-                                   </tr>   
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">1:散步:</td>
                                         <td colspan="3">
                                             没有-稍微减少-明显减少-增多
                                         </td>
-                                   </tr>
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">2:工作:</td>
                                         <td colspan="3">
                                             没有-稍微减少-明显减少-增多
                                         </td>
-                                   </tr>        
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">3:室内活动:</td>
                                         <td colspan="3">
                                             没有-稍微减少-明显减少-增多
                                         </td>
-                                   </tr>        
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="2">4:再过去的两周内有何变化:</td>
                                         <td colspan="3">
                                             有所改善-无变化-恶化
                                         </td>
-                                   </tr>    
-                                   <tr>
+                                    </tr>
+                                    <tr>
                                         <td colspan="6">
-                                            <el-radio-group class="elradiozdi"
-                                               v-model="state.tableData.功能异常.type">
-                                               <el-radio value="A">A:无受损,力气/精力无改变或轻中度下降但在改善</el-radio>
-                                               <el-radio value="B">B:力气/精力中度下降但在改善;通常的活动部分减少;严重下降但在改善</el-radio>
-                                               <el-radio value="C">C:力气/精力严重下降,卧床</el-radio>
-                                           </el-radio-group>
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.功能异常.type">
+                                                <el-radio value="A">A:无受损,力气/精力无改变或轻中度下降但在改善</el-radio>
+                                                <el-radio value="B">B:力气/精力中度下降但在改善;通常的活动部分减少;严重下降但在改善</el-radio>
+                                                <el-radio value="C">C:力气/精力严重下降,卧床</el-radio>
+                                            </el-radio-group>
                                         </td>
+
+                                    </tr>
+                                    <tr>
+                                        <td>
+                                            疾病和相关营养需求
+                                        </td>
+                                        <td colspan="2">疾病诊断&代谢应激</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.疾病和相关营养需求.type">
+                                                <el-radio value="A">A:无应激</el-radio>
+                                                <el-radio value="B">B:低水平应激</el-radio>
+                                                <el-radio value="C">C:中高度应激</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr >
+                                        <td rowspan="14">
+                                            体检
+                                        </td>
+                                        <td colspan="2" >皮下脂肪</td>
+                                        <td colspan="3" >
+                                                <span value="A">A:良好</span>  &nbsp;&nbsp;
+                                                <span value="B">B:轻度-中度</span>  &nbsp;&nbsp;
+                                                <span value="C">C:重度</span>
+                                        </td>
+                                    </tr>
+                                    <tr>
                                         
-                                   </tr>  
-                                   <tr>
-                                      <td>
-                                        疾病和相关营养需求
-                                      </td>
-                                      <td colspan="2">疾病诊断&代谢应激</td>
-                                      <td colspan="3">
-                                          <el-radio-group class="elradiozdi"
-                                              v-model="state.tableData.疾病和相关营养需求.type">
-                                              <el-radio value="A">A:无应激</el-radio>
-                                              <el-radio value="B">B:低水平应激</el-radio>
-                                              <el-radio value="C">C:中高度应激</el-radio>
-                                          </el-radio-group>
-                                      </td>
-                                  </tr> 
+                                        <td colspan="2">下眼皮</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.下眼皮.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        
+                                        <td colspan="2">二/三头肌</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.二三头肌.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        
+                                        <td colspan="2">肌肉消耗</td>
+                                        <td colspan="3">
+                                                <span value="A">A:良好</span>  &nbsp;&nbsp;
+                                                <span value="B">B:轻度-中度</span>  &nbsp;&nbsp;
+                                                <span value="C">C:重度</span>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">颞部</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.颞部.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">锁骨</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.锁骨.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">肩</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.肩.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">肩胛骨</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.肩胛骨.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">骨间肌</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.骨间肌.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">膝盖</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.膝盖.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">股四头肌</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.股四头肌.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">腓肠肌</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.腓肠肌.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">水肿</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.水肿.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    <tr>
+                                        <td colspan="2">腹水</td>
+                                        <td colspan="3">
+                                            <el-radio-group class="elradiozdi" v-model="state.tableData.腹水.type">
+                                                <el-radio value="A">A</el-radio>
+                                                <el-radio value="B">B</el-radio>
+                                                <el-radio value="C">C</el-radio>
+                                            </el-radio-group>
+                                        </td>
+                                    </tr>
+                                    
                                     <tr>
                                         <td colspan="6" style="font-weight: 600;">
                                             注意:
-                                            <br/>
+                                            <br />
                                             1.体重变化,考虑过去6个月或近2周的,过去5个月变化显著,但近一个月无丢失无增加,或近2周经治疗后体重稳定,则体重丢失一项不予考虑。
-                                            <br/>2.胃肠道症状至少持续2周,偶尔一两次不予考虑。
-                                            <br/>3.应激参照:大面积烧伤、高烧、或大量出血属高应激,长期发烧、慢性腹泻属中应激,长期低烧或恶性肿瘤属低应
-                                            <br/>4.评价结果中,8项中至少5项属于C级或者B级,分别定位重度或中度具体参考:C>5项定为重度营养不良,有明显的躯体症状C小于5但B+C大于等于5项定为中度营养不良,B+C小于5项为轻度营养不良A≥5定为营养良好,或有明显的改善病例结果
+                                            <br />2.胃肠道症状至少持续2周,偶尔一两次不予考虑。
+                                            <br />3.应激参照:大面积烧伤、高烧、或大量出血属高应激,长期发烧、慢性腹泻属中应激,长期低烧或恶性肿瘤属低应
+                                            <br />4.评价结果中,8项中至少5项属于C级或者B级,分别定位重度或中度具体参考:C>5项定为重度营养不良,有明显的躯体症状C小于5但B+C大于等于5项定为中度营养不良,B+C小于5项为轻度营养不良A≥5定为营养良好,或有明显的改善病例结果
                                         </td>
                                     </tr>
 
@@ -267,49 +402,96 @@
 import { useUserInfo } from '/@/stores/userInfo';
 import { usePatientsInfo } from '/@/stores/patientsInfo';
 const storesPat = usePatientsInfo();
-import {Add,update,deleteId,tiaochabiaoInfo} from '/@/api/tiaochabiao/index'
+import { Add, update, deleteId, tiaochabiaoInfo } from '/@/api/tiaochabiao/index'
 import { storeToRefs } from 'pinia';
-import { useRoute,useRouter } from 'vue-router';
+import { useRoute, useRouter } from 'vue-router';
 import { ElMessage } from 'element-plus';
 const stores = useUserInfo();
 const { patientsInfo } = storeToRefs(storesPat);
 const { userInfos } = storeToRefs(stores);
 const router = useRouter()
-const emit = defineEmits([ "shuaxin" ]);
+const emit = defineEmits(["shuaxin"]);
 const state = reactive({
-    dialogTableVisible:false,
+    dialogTableVisible: false,
     tableData: {
         表名: '主观全面评定(SGA)评价',
-        初次调查日期:"",
+        初次调查日期: "",
         填表日期: '',
         更新日期: '',
         记录者: '陈银成',
-        您目前体重:'',
+        您目前体重: '',
         体重改变1: {
-            type: '', 
+            type: '',
             input1: '',
         },
         体重改变2: {
-            type: '', 
+            type: '',
             input1: '',
         },
-        进食1:{type: ''},
-        进食2:{type: ''},
-        进食3:{type: ''},
-        进食4:{type: ''},
-        胃肠道症状:{type: ''},
+        进食1: { type: '' },
+        进食2: { type: '' },
+        进食3: { type: '' },
+        进食4: { type: '' },
+        胃肠道症状: { type: '' },
         功能异常: {
-            type: '', 
+            type: '',
             input1: '',
         },
-        
-        疾病和相关营养需求:{
-            type: '', 
+        疾病和相关营养需求: {
+            type: '',
+            input1: '',
+        },
+        下眼皮: {
+            type: '',
+            input1: '',
+        },
+        二三头肌: {
+            type: '',
+            input1: '',
+        },
+        颞部: {
+            type: '',
+            input1: '',
+        },
+        锁骨: {
+            type: '',
+            input1: '',
+        },
+        肩: {
+            type: '',
+            input1: '',
+        },
+        肩胛骨: {
+            type: '',
+            input1: '',
+        },
+        骨间肌: {
+            type: '',
+            input1: '',
+        },
+        膝盖: {
+            type: '',
+            input1: '',
+        },
+        股四头肌: {
+            type: '',
+            input1: '',
+        },
+        腓肠肌: {
+            type: '',
+            input1: '',
+        },
+        水肿: {
+            type: '',
+            input1: '',
+        },
+        腹水: {
+            type: '',
             input1: '',
         }
     },
     loading: false,
-    viewInfo:{
+    viewInfo: {
         id: 0,
         code: '',
         clientCode: userInfos.value.clientCode,
@@ -317,56 +499,62 @@
         surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
         surveryPerson: userInfos.value.code,
         surveryJsonBody: '',
-        suveryFormName:'主观全面评定(SGA)评价',
-        surveryFormType:1,
+        suveryFormName: '主观全面评定(SGA)评价',
+        surveryFormType: 1,
         updateTime: ''
     }
 
 })
 const sum = computed(() => {
-    let x=0
-    for(let key in state.tableData){
-        console.log(key+'key=='+state.tableData[key]?.type)
-        if(Number(state.tableData[key]?.type)){
-            x+=Number(state.tableData[key]?.type)
+    let a = 0
+    let b=0
+    let c=0
+    for (let key in state.tableData) {
+        console.log(key + 'key==' + state.tableData[key]?.type)
+        if (state.tableData[key]?.type==='A') {
+            a++
+        }else if(state.tableData[key]?.type==='B') {
+            b++
+        }else if(state.tableData[key]?.type==='C') {
+            c++
         }
     }
-    return x
+    return `A:${a},B:${b},C:${c}`
 })
-const funhui=()=>{
-    state.dialogTableVisible=false
+const funhui = () => {
+    state.dialogTableVisible = false
 }
 const onSubmit = () => {
-  console.log('submit!')
-  console.log(state.tableData)
-  const info:tiaochabiaoInfo={
-    id: state.viewInfo.id,
-    surveryFormType:1,
-    code: state.viewInfo.code,
-    clientCode: userInfos.value.clientCode,
-    patientCode: patientsInfo.value.code,
-    surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
-    surveryPerson: userInfos.value.code,
-    surveryJsonBody: JSON.stringify(state.tableData),
-    suveryFormName:'主观全面评定(SGA)评价',
-    updateTime: ''
-  }
-  console.log(info)
-  if(info.id===0){
-    Add(info).then(re=>{
-        console.log(re.data)
-        state.dialogTableVisible=false
-        emit('shuaxin')
-    })
-  }else if(info.id>0){
-    info.surveryTime=state.viewInfo.surveryTime
-    update(info).then(re=>{
-        console.log(re.data)
-        state.dialogTableVisible=false
-        emit('shuaxin')
-    })
-  }
-  
+    console.log('submit!')
+    console.log(state.tableData)
+    const info: tiaochabiaoInfo = {
+        id: state.viewInfo.id,
+        surveryFormType: 1,
+        code: state.viewInfo.code,
+        clientCode: userInfos.value.clientCode,
+        patientCode: patientsInfo.value.code,
+        surveryTime: formatDate(new Date(), 'YYYY-mm-dd HH:MM:SS'),
+        surveryPerson: userInfos.value.code,
+        surveryJsonBody: JSON.stringify(state.tableData),
+        suveryFormName: '主观全面评定(SGA)评价',
+        updateTime: ''
+    }
+    console.log(info)
+    if (info.id === 0) {
+        Add(info).then(re => {
+            console.log(re.data)
+            state.dialogTableVisible = false
+            emit('shuaxin')
+        })
+    } else if (info.id > 0) {
+        info.surveryTime = state.viewInfo.surveryTime
+        update(info).then(re => {
+            console.log(re.data)
+            state.dialogTableVisible = false
+            emit('shuaxin')
+        })
+    }
+
 }
 // 第一步:定义子组件里面的方法
 const getData = (str: string) => {
@@ -375,45 +563,102 @@
 
 }
 // 打开查看或者编辑明细
-const openShow = (type: string,mode:tiaochabiaoInfo) => {
+const openShow = (type: string, mode: tiaochabiaoInfo) => {
     console.log(type)
-    
-    if(type==='add'){
-        state.tableData.初次调查日期=formatDate(new Date(),'YYYY-mm-dd')
-        state.tableData.更新日期=formatDate(new Date(),'YYYY-mm-dd')
-        state.tableData.记录者=userInfos.value.userName
-        // getPageInfo()
+
+    if (type === 'add') {
+        state.tableData.初次调查日期 = formatDate(new Date(), 'YYYY-mm-dd')
+        state.tableData.更新日期 = formatDate(new Date(), 'YYYY-mm-dd')
+        state.tableData.记录者 = userInfos.value.userName
+        getPageInfo()
         state.dialogTableVisible = true
     }
-    else if(type==='update'){
+    else if (type === 'update') {
         console.log('------------------------3333333333333333')
         console.log(mode)
-        state.viewInfo=mode
-        state.tableData=JSON.parse(mode.surveryJsonBody)
+        state.viewInfo = mode
+        state.tableData = JSON.parse(mode.surveryJsonBody)
         state.dialogTableVisible = true
 
 
     }
-   
+
 }
-const getPageInfo=()=>{
-    state.tableData={
+const getPageInfo = () => {
+    state.tableData = {
         表名: '主观全面评定(SGA)评价',
-        初次调查日期:formatDate(new Date(),'YYYY-mm-dd'),
+        初次调查日期: formatDate(new Date(), 'YYYY-mm-dd'),
         填表日期: '',
-        更新日期: formatDate(new Date(),'YYYY-mm-dd'),
+        更新日期: formatDate(new Date(), 'YYYY-mm-dd'),
         记录者: userInfos.value.userName,
-        体重改变: {
-            type: '', 
+        您目前体重: '',
+        体重改变1: {
+            type: '',
             input1: '',
         },
-        营养状态: {
-            type: '', 
+        体重改变2: {
+            type: '',
             input1: '',
         },
-        
-        年龄评分:{
-            type: '', 
+        进食1: { type: '' },
+        进食2: { type: '' },
+        进食3: { type: '' },
+        进食4: { type: '' },
+        胃肠道症状: { type: '' },
+        功能异常: {
+            type: '',
+            input1: '',
+        },
+        疾病和相关营养需求: {
+            type: '',
+            input1: '',
+        },
+        下眼皮: {
+            type: '',
+            input1: '',
+        },
+        二三头肌: {
+            type: '',
+            input1: '',
+        },
+        颞部: {
+            type: '',
+            input1: '',
+        },
+        锁骨: {
+            type: '',
+            input1: '',
+        },
+        肩: {
+            type: '',
+            input1: '',
+        },
+        肩胛骨: {
+            type: '',
+            input1: '',
+        },
+        骨间肌: {
+            type: '',
+            input1: '',
+        },
+        膝盖: {
+            type: '',
+            input1: '',
+        },
+        股四头肌: {
+            type: '',
+            input1: '',
+        },
+        腓肠肌: {
+            type: '',
+            input1: '',
+        },
+        水肿: {
+            type: '',
+            input1: '',
+        },
+        腹水: {
+            type: '',
             input1: '',
         }
     }
@@ -425,7 +670,6 @@
 
 
 <style scoped lang="scss">
-
 .gridtable {
     font-family: verdana, arial, sans-serif;
     font-size: 11px;
@@ -433,7 +677,7 @@
     border-width: 1px;
     border-color: #666666;
     border-collapse: collapse;
-   
+
 }
 
 .gridtable th {
@@ -452,5 +696,4 @@
     border-color: #666666;
     background-color: #ffffff;
 }
-
 </style>

--
Gitblit v1.8.0