qx
2025-04-10 0d22dac3090ad057a5470610a321c936cdf0d535
src/views/doctor/inspectCheck/index.vue
@@ -6,6 +6,7 @@
      size="small"
      :inline="true"
      label-width="68px"
      @submit.native.prevent
    >
      <el-form-item label="体检号" prop="reportDoctorCode">
        <el-input
@@ -54,19 +55,20 @@
      :data="exaLists"
      v-loading="loading"
      border
      max-height="350"
      @current-change="handleCurrentChange"
      @selection-change="handleSelectionChange"
      :row-class-name="tableRowClassName"
      style="width: 100%"
      height="350"
      @selection-change="handleCurrentChange"
      :header-cell-style="{ background: '#aad8df' }"
    >
    <!--  @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName" -->
      <el-table-column
        fixed
        type="selection"
        align="center"
        label="选择"
        width="40"
        :selectable="isSelectable"
      >
      <!--    :selectable="isSelectable" -->
      </el-table-column>
      <el-table-column label="姓名" align="center" prop="name" width="80px" />
@@ -96,6 +98,7 @@
        align="center"
        prop="examinationDate"
        width="150px"
        :formatter="formatDate"
      />
      <el-table-column label="门诊号" align="center" prop="mzh" width="140px" />
@@ -202,6 +205,7 @@
  
  <script>
import { getlisList, getJyTjList, asyncPacs } from "@/api/doctor/pacsCheck";
import moment from "moment";
export default {
  dicts: ["dict_tj_status"],
@@ -277,7 +281,6 @@
    });
  },
  methods: {
    handleDateChange(val){
      if (val && val.length === 2) {
        this.queryParams.start = val[0]; // 设置开始时间
@@ -286,14 +289,34 @@
        this.queryParams.start = null;
        this.queryParams.end = null;
      }
      console.log('Query Params:', this.queryParams);
      console.log("Query Params:", this.queryParams);
    },
    isSelectable(row) {
      return !!row.mzh;
    },
    // isSelectable(row) {
    //   return !!row.mzh;
    // },
    tableRowClassName({ row }) {
      return !row.mzh ? "row-disabled" : "";
    },
    handleSelectionChange(val) {
      console.log(val);
      /*  if (val.length > 1) {
        let del_row = val.shift();
        this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中
      }
      console.log(val, 999); */
      if (val.length > 0) {
        // const selectedRow = val[0];
        // console.log(val[0], 555);
        this.selectedFirstTable = val;
        console.log("当前选中的行数据:", this.selectedFirstTable);
        // this.fetchRightTableData(selectedRow);
      } else {
        this.selectedFirstTable = null;
        this.checkList = [];
      }
    },
    handleSelectionChange(val) {
@@ -325,6 +348,18 @@
        this.checkList = response.data;
        this.loading = false;
      });
    },
    formatDate(row) {
      if (!row.examinationDate) return "";
      // 使用 moment 解析指定格式的日期字符串
      const date = moment(row.examinationDate, "MM DD YYYY hh:mmA");
      if (!date.isValid()) return "无效日期";
      // 格式化为所需格式
      return date.format("YYYY-MM-DD HH:mm");
    },
    handleSelectionChangeSecond(selectedRows) {
@@ -417,7 +452,7 @@
          clearInterval(this.clearTimeSet);
          this.clearTimeSet = null;
          this.$modal.closeLoading();
        })
        });
    },
  },
};