qx
qx
2025-04-15 99dcb0a585582d195a33e0d0cefcd6ec7857c537
qx
3个文件已修改
82 ■■■■■ 已修改文件
src/components/public/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/advice/advice/index.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/doctor/pacsCheck/index.vue 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/public/index.vue
@@ -220,8 +220,8 @@
          this.loading = true; // 添加加载状态
  
          const res = await getlist(this.queryParams);
          this.dataList = res.rows;
          this.total = res.total;
          this.dataList = res.data.rows;
          this.total = res.data.total;
  
          // 如果需要选中操作,将其封装为独立方法
          await this.handleAutoSelection();
src/views/advice/advice/index.vue
@@ -9,6 +9,14 @@
      label-width="68px"
      @submit.native.prevent
    >
    <el-form-item label="标题" prop="bt">
        <el-input
          v-model="queryParams.bt"
          placeholder="请输入标题"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="项目名称" prop="proName">
        <el-input
          v-model="queryParams.proName"
@@ -339,6 +347,7 @@
        page: 1,
        pageSize: 10,
        proName: null,
        bt: null,
      },
      // 表单参数
      form: {},
src/views/doctor/pacsCheck/index.vue
@@ -16,6 +16,7 @@
          clearable
          @keyup.enter.native="handleQuery"
          style="width: 170px"
          @input="onInput"
        />
      </el-form-item>
      <!--  <el-form-item label="姓名" prop="name">
@@ -89,7 +90,7 @@
      :data="exaLists"
      v-loading="loading"
      border
      max-height="350"
      height="350"
      @current-change="handleCurrentChange"
      @selection-change="handleSelectionChange"
      :row-class-name="tableRowClassName"
@@ -100,8 +101,8 @@
        align="center"
        label="选择"
        width="40"
        :selectable="isSelectable"
      >
        <!--   :selectable="isSelectable" -->
      </el-table-column>
      <el-table-column label="姓名" align="center" prop="name" width="80px" />
@@ -126,12 +127,12 @@
        prop="checkParts"
        width="150px"
      />
      <!-- :formatter="formatDate" -->
      <el-table-column
        label="报告时间"
        align="center"
        prop="examinationDate"
        width="150px"
        :formatter="formatDate"
        width="150px"
      />
      <el-table-column label="门诊号" align="center" prop="mzh" width="140px" />
@@ -331,6 +332,9 @@
    });
  },
  methods: {
    onInput(val) {
      this.inputVal = val.replace(/\s+/g, ""); // 清除所有空格
    },
    handleDateChange(val) {
      if (val && val.length === 2) {
        this.queryParams.start = val[0]; // 设置开始时间
@@ -341,11 +345,22 @@
      }
      console.log("Query Params:", this.queryParams);
    },
    isSelectable(row) {
      return !!row.mzh;
    },
    // isSelectable(row) {
    //   return !!row.mzh;
    // },
    tableRowClassName({ row }) {
      return !row.mzh ? "row-disabled" : "";
    },
    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");
    },
    handleSelectionChange(val) {
@@ -354,11 +369,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 +382,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 +400,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 +412,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 +438,7 @@
          if (res.code == 200) {
            this.loading = false;
            this.exaLists = res.data;
            this.code = this.exaLists.mzh;
            // this.code = this.exaLists.mzh;
          }
        })
        .catch((error) => {
@@ -445,22 +475,11 @@
        this.$modal.closeLoading();
      }, 300000);
    },
    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");
    },
    tongbu(row) {
      this.$modal.loading("正在同步,请稍候...");
      this.setTime();
      // console.log(val, 66);
      this.selectedFirstTable.tjnum = this.queryParams.tjNum;
      const requestData = {
        pacs: this.selectedFirstTable, // 左侧表格选中数据
        tj: this.selectedSecondTable[0], // 右侧表格选中数据