qx
qx
2025-04-18 7b41c32c0107960760594ce7db9a130d93c9ad92
src/views/doctor/check/index.vue
@@ -274,7 +274,7 @@
        <el-col v-show="baogaoqian">
          <template>
            <el-tabs v-model="radio" type="border-card" @tab-click="handleTabClick" style="margin-left: 10px">
              <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index">
              <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index" :lazy="false">
                <el-table class="bgc" v-loading="loading" :data="proParentList.sons" border height="460px"
                  style="width: 96%; margin: 10px 10px" :row-class-name="tableRowClassName">
                  <el-table-column prop="project.proName" label="检测项目" width="150">
@@ -282,8 +282,8 @@
                  <el-table-column prop="proResult" label="检测结果" width="150">
              
                    <template slot-scope="{ row, $index }">
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                        @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-item${index}-row${$index}`"
                      @keydown.enter.native="keyInputConfirm($event,index,$index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" @input="vale"></el-input>
                    </template>
                  </el-table-column>
@@ -414,7 +414,7 @@
        <el-col :span="18" v-show="baogaohou">
          <template>
            <el-tabs v-model="radio" type="border-card" @tab-click="handleTabClick" style="margin-left: 10px">
              <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index">
              <el-tab-pane :label="item.proName" :name="item.proId" v-for="(item, index) in Parent" :key="index" :lazy="false">
                <el-table class="bgc" v-loading="loading" :data="proParentList.sons" border height="460px"
                  style="width: 96%; margin: 10px 10px" :row-class-name="tableRowClassName">
                  <el-table-column prop="project.proName" label="检测项目" width="100">
@@ -422,8 +422,8 @@
                  <el-table-column prop="proResult" label="检测结果" width="150">
                    <!-- slot-scope="scope" -->
                    <template slot-scope="{ row, $index }">
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-${$index}`"
                      @keydown.enter.native="keyInputConfirm($event, $index)" @focus="handleFocus(row)"
                      <el-input  type="textarea" autosize size="mini" v-model="row.proResult" :ref="`input-item${index}-row${$index}`"
                      @keydown.enter.native="keyInputConfirm($event,index,$index)" @focus="handleFocus(row)"
                        @blur="handleInputConfirm(row)" ></el-input>
                        <!-- @input="vale" -->
                      <!-- <el-input type="textarea" autosize size="mini" v-model="scope.row.proResult" autocomplete="off"   :ref="`input-${scope.$index}-${scope.row.proResult}`"
@@ -1284,16 +1284,15 @@
      this.inputDoms = inputDoms
      // console.log(this.inputDoms)
    },
    keyInputConfirm(event, currentRowIndex) {
    keyInputConfirm(event,index, currentRowIndex) {
      // 阻止默认回车行为,比如提交表单
      event.preventDefault();
     event.stopPropagation()
      const nextRowIndex = currentRowIndex + 1; // 计算下一行索引
      // 如果下一行存在,则聚焦该行的输入框
      if (nextRowIndex < this.proParentList.sons.length) {
        this.$nextTick(() => {
          const nextInputRef = `input-${nextRowIndex}`;
          const nextInputRef = `input-item${index}-row${nextRowIndex}`;
          const nextInput = this.$refs[nextInputRef];
          if (nextInput) {
            // 处理 ref 可能为数组的情况(如动态渲染)
@@ -1813,7 +1812,11 @@
      // }
      this.tjNumber = row.tjNumber;
      let num = 0;
      getParentList(this.tjNumber).then((response) => {
      let data = {
        type:this.tjStatus,
        tjNumber:this.tjNumber
      }
      getParentList(data).then((response) => {
        if (response.data) {
          this.loading = false;
          this.Parent = response.data;
@@ -2317,7 +2320,10 @@
    // 点击确认
    determine() {
      // 体检号
      // 清空数组
      this.tjOrderDetail = [];
      // 原有代码
      let tjNumber = this.tableAll.tjNumber;
      this.userList.forEach((item) => {
        if (this.doctorName == item.nickName) {