kk
lkk
2025-03-27 c320aa3768fbc916fb145a9315481ebdd44c2da4
src/views/doctor/pacsCheck/index.vue
@@ -17,7 +17,7 @@
          style="width: 170px"
        />
      </el-form-item>
      <el-form-item label="姓名" prop="name">
      <!--  <el-form-item label="姓名" prop="name">
        <el-input
          v-model="queryParams.name"
          placeholder="请输入姓名"
@@ -40,7 +40,7 @@
          @change="handleDateChange"
        >
        </el-date-picker>
      </el-form-item>
      </el-form-item> -->
      <el-form-item>
        <el-button
          type="primary"
@@ -99,8 +99,8 @@
        align="center"
        label="选择"
        width="40"
        :selectable="isSelectable"
      >
        <!--   :selectable="isSelectable" -->
      </el-table-column>
      <el-table-column label="姓名" align="center" prop="name" width="80px" />
@@ -253,7 +253,6 @@
  
  <script>
import { getLeftList, getRightList, asyncPacs } from "@/api/doctor/pacsCheck";
import moment from "moment";
export default {
  dicts: ["dict_tj_status"],
@@ -329,21 +328,19 @@
    });
  },
  methods: {
    handleDateChange(val){
    handleDateChange(val) {
      if (val && val.length === 2) {
        this.queryParams.start = val[0]; // 设置开始时间
        this.queryParams.end = val[1];   // 设置结束时间
        this.queryParams.end = val[1]; // 设置结束时间
      } else {
        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" : "";
    },
@@ -354,11 +351,11 @@
        let del_row = val.shift();
        this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中
      }
      console.log(val, 999);
      // console.log(val, 999);
      if (val.length > 0) {
        const selectedRow = val[0];
        console.log(val[0], 555);
        // console.log(val[0], 555);
        /*  if (!selectedRow.mzh) {
          this.$refs.tb.toggleRowSelection(selectedRow, false);
          this.$message.warning("当前行无有效门诊号,不能选中");
@@ -367,7 +364,17 @@
        this.selectedFirstTable = selectedRow;
        console.log("当前选中的行数据:", this.selectedFirstTable);
        this.fetchRightTableData(selectedRow);
        const code = this.queryParams.tjNum;
        if (!code) {
          this.$message.warning("体检号不能为空!");
          return; // 直接返回,避免继续执行请求
        }
        this.loading = true;
        getRightList(code).then((response) => {
          this.checkList = response.data;
          this.loading = false;
        });
        // this.fetchRightTableData(selectedRow);
      } else {
        this.selectedFirstTable = null;
        this.checkList = [];
@@ -375,8 +382,9 @@
    },
    // 根据选中的行数据请求右边表格数据
    fetchRightTableData(selectedRow) {
      const code = selectedRow.mzh;
      if (!code) return;
      const code = this.queryParams.tjNum;
      // const code = selectedRow.mzh;
      // if (!code) return;
      this.loading = true;
      getRightList(code).then((response) => {
        this.checkList = response.data;
@@ -386,6 +394,10 @@
    handleSelectionChangeSecond(selectedRows) {
      this.selectedSecondTable = selectedRows;
      if (selectedRows.length > 1) {
        let del_row = selectedRows.shift();
        this.$refs.tab1.toggleRowSelection(del_row, false); //设置这一行取消选中
      }
      console.log("当前选中的行数据:", this.selectedSecondTable);
    },
    getList() {
@@ -408,7 +420,7 @@
          if (res.code == 200) {
            this.loading = false;
            this.exaLists = res.data;
            this.code = this.exaLists.mzh;
            // this.code = this.exaLists.mzh;
          }
        })
        .catch((error) => {
@@ -449,6 +461,7 @@
      this.$modal.loading("正在同步,请稍候...");
      this.setTime();
      // console.log(val, 66);
      this.selectedFirstTable.tjnum = this.queryParams.tjNum;
      const requestData = {
        pacs: this.selectedFirstTable, // 左侧表格选中数据
        tj: this.selectedSecondTable[0], // 右侧表格选中数据
@@ -476,7 +489,7 @@
          this.clearTimeSet = null;
          this.$modal.closeLoading();
          // this.$modal.error("操作失败,请稍后重试");
        })
        });
    },
  },
};