qx
qx
2025-03-17 3d140ae64725f57f8d0be9f8182dfd6f9b3999fd
src/views/doctor/check/index.vue
@@ -287,8 +287,8 @@
                          " @focus="handleFocus(scope.row)" @blur="handleInputConfirm(scope.row)"
                        @input="vale"></el-input> -->
                    <template slot-scope="{ row, $index }">
                      <el-input v-model="row.name" :ref="`input-${$index}`"
                        @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                        @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale"></el-input>
                    </template>
                  </el-table-column>
@@ -427,8 +427,8 @@
                  <el-table-column prop="proResult" label="检测结果" width="150">
                    <!-- slot-scope="scope" -->
                    <template slot-scope="{ row, $index }">
                      <el-input v-model="row.name" :ref="`input-${$index}`"
                        @keyup.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                      @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale"></el-input>
                      <!-- <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off"   :ref="`input-${scope.$index}-${scope.row.proResult}`"
@@ -919,7 +919,6 @@
      radio: "",
      nums: "",
      proParentList: [],
      inputDoms: [],
      tjNumber: "",
      // 全部小结
      DeptadviceAll: [],
@@ -1286,6 +1285,7 @@
    keyInputConfirm(event, currentRowIndex) {
      // 阻止默认回车行为,比如提交表单
      event.preventDefault();
     event.stopPropagation()
      const nextRowIndex = currentRowIndex + 1; // 计算下一行索引
      // 如果下一行存在,则聚焦该行的输入框
@@ -1297,7 +1297,7 @@
            // 处理 ref 可能为数组的情况(如动态渲染)
            const target = Array.isArray(nextInput) ? nextInput[0] : nextInput;
            target.focus(); // 聚焦输入框
            target.select(); // 可选:选中文本
            // target.select(); // 可选:选中文本
          }
        });
      }