LIJU 1 hafta önce
ebeveyn
işleme
31272034b6

+ 14 - 16
src/views/medical-advice/nursing-manage/ThreeTestList.vue

@@ -217,14 +217,12 @@
                                     </el-table-column>
                                     <el-table-column prop="bodyWeight" label="体重(kg)">
                                         <template #default="scope">
-                                            <!-- <el-input v-model="scope.row.bodyWeight" :disabled="isBodyWeightDisabled(scope.row)"></el-input> -->
-                                            <el-input v-model="scope.row.bodyWeight" ></el-input>
+                                            <el-input v-model="scope.row.bodyWeight" :disabled="isBodyWeightDisabled(scope.row)"></el-input>
                                         </template>
                                     </el-table-column>
                                     <el-table-column prop="bodyLength" label="身高(cm)">
                                         <template #default="scope">
-                                            <!-- <el-input v-model="scope.row.bodyLength" :disabled="isBodyLengthDisabled(scope.row)"></el-input> -->
-                                            <el-input v-model="scope.row.bodyLength" ></el-input>
+                                            <el-input v-model="scope.row.bodyLength" :disabled="isBodyLengthDisabled(scope.row)"></el-input>
                                         </template>
                                     </el-table-column>
                                     <el-table-column label="操作">
@@ -649,21 +647,21 @@ const tableHeight = ref(0)
 // 处理体重特殊选项变化
 const handleBodyWeightInfoChange = (row) => {
     // 如果选择了"卧床"或"平车",清空体重和身高,并禁用输入框
-    // if (row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车') {
-    //     row.bodyWeight = ''
-    //     row.bodyLength = ''
-    // }
+    if (row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车') {
+        row.bodyWeight = ''
+        row.bodyLength = ''
+    }
 }
 
-// // 判断体重输入框是否禁用
-// const isBodyWeightDisabled = (row) => {
-//     return row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车'
-// }
+// 判断体重输入框是否禁用
+const isBodyWeightDisabled = (row) => {
+    return row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车'
+}
 
-// // 判断身高输入框是否禁用
-// const isBodyLengthDisabled = (row) => {
-//     return row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车'
-// }
+// 判断身高输入框是否禁用
+const isBodyLengthDisabled = (row) => {
+    return row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车'
+}
 
 // 验证体重数据
 const validateBodyWeightData = () => {

+ 8 - 10
src/views/medical-advice/nursing-manage/bodyThreeTestList.vue

@@ -275,15 +275,13 @@
                                         </template>
                                     </el-table-column>
                                     <!-- <el-table-column prop="bodyWeight" label="体重(kg)">
-                                        <template #default="scope"> -->
-                                            <!-- <el-input v-model="scope.row.bodyWeight" :disabled="isBodyWeightDisabled(scope.row)"></el-input> -->
-                                             <!-- <el-input v-model="scope.row.bodyWeight"></el-input>
+                                        <template #default="scope">
+                                            <el-input v-model="scope.row.bodyWeight" :disabled="isBodyWeightDisabled(scope.row)"></el-input>
                                         </template>
                                     </el-table-column> -->
                                     <el-table-column prop="bodyLength" label="身高(cm)">
                                         <template #default="scope">
-                                            <!-- <el-input v-model="scope.row.bodyLength" :disabled="isBodyLengthDisabled(scope.row)"></el-input> -->
-                                             <el-input v-model="scope.row.bodyLength" ></el-input>
+                                            <el-input v-model="scope.row.bodyLength" :disabled="isBodyLengthDisabled(scope.row)"></el-input>
                                         </template>
                                     </el-table-column>
                                     <el-table-column prop="bilirubin" label="测黄疸(mg/dl)" min-width="130">
@@ -752,11 +750,11 @@ const tableHeight = ref(0)
 
 // 处理体重特殊选项变化
 const handleBodyWeightInfoChange = (row) => {
-    // // 如果选择了"卧床"或"平车",清空体重和身高,并禁用输入框
-    // if (row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车') {
-    //     row.bodyWeight = ''
-    //     row.bodyLength = ''
-    // }
+    // 如果选择了"卧床"或"平车",清空体重和身高,并禁用输入框
+    if (row.bodyWeightInfo === '卧床' || row.bodyWeightInfo === '平车') {
+        row.bodyWeight = ''
+        row.bodyLength = ''
+    }
 }
 
 // 判断体重输入框是否禁用