1
lkk
2025-04-21 333626d05a8ce4cf553e2a1e3fed1259d0814fb1
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,10 +422,10 @@
                  <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)"
                        @blur="handleInputConfirm(row)" @input="vale"></el-input>
                      <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}`"
                        placeholder="请输入检测结果" @keyup="
                          keyInputConfirm($event,scope.$index,'proResult')
@@ -808,6 +808,7 @@
import { getlistUser } from "@/api/system/user";
import { getChildList } from "@/api/system/dept";
import { resultList } from "@/api/doctor/examination";
import { selectZT } from "@/api/system/package";
import { get } from "sortablejs";
export default {
  dicts: ["sys_user_sex", "sys_yes_no", "tj_result_type", "lj_positive"],
@@ -983,21 +984,27 @@
  methods: {
    handleFocus(row) {
      this.autorule = [];
      if (!row.resultType || row.resultType == 2) {
      if (!row.resultType || row.resultType == 2 ) {
        return;
      } else {
        this.curindex = row;
        this.$refs.bbb.title = "选择检测结果";
      selectZT({
        proId: row.proId,
      }).then((res) => {
        if (res.data.length > 0) {
          this.$refs.bbb.title = "选择检测结果";
        // this.$refs.bbb.proId = row.proId;
        this.$refs.bbb.open = true;
        this.$refs.bbb.getList(this.curindex);
        } else {
          this.$refs.bbb.open = false;
        }
      });
      }
    },
    handleChangesZt(params) {
      console.log(params)
      this.curindex.proResult = params.map((item) => item.ruleStr).join(",");
      console.log(this.curindex.proResult)
      this.handleInputConfirm(this.curindex, params);
    },
    tableRowClassName({ row }) {
@@ -1063,7 +1070,6 @@
      const proId = row.proId;
      resultList(tjNum, proId).then((res) => {
        this.jieguoList = res.data;
        console.log(this.jieguoList, 998877);
        this.jyjc = this.jieguoList[0].jyjc;
        const ycbz = this.jieguoList[0].ycbz;
@@ -1197,7 +1203,9 @@
      });
    },
    handleClose() {
      this.$tab.refreshPage();
      // 只刷新表格数据
      this.getList();
      this.drawer = false;
    },
    handleClose1() {
      this.jianqians = false;
@@ -1213,7 +1221,6 @@
    },
    changDesc(item) {
      console.log(item)
      if (item.exceptionDesc == true) {
        item.conclusion = "异常"
      } else {
@@ -1279,16 +1286,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 可能为数组的情况(如动态渲染)
@@ -1301,7 +1307,6 @@
    },
    handleInputConfirm(datas, params) {
      if (params && params.length === 0) {
        // 如果没有选中任何项目,取消异常复选框的选中状态
        this.curindex.exceptionDesc = false;
@@ -1809,7 +1814,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;
@@ -2313,7 +2322,10 @@
    // 点击确认
    determine() {
      // 体检号
      // 清空数组
      this.tjOrderDetail = [];
      // 原有代码
      let tjNumber = this.tableAll.tjNumber;
      this.userList.forEach((item) => {
        if (this.doctorName == item.nickName) {