qx
qx
2025-04-11 b2e0bcff3ced2ac14a5de6511bff05b6a5045372
src/views/sampling/sampling/index.vue
@@ -105,8 +105,9 @@
      </div>
      <div style="width: 50%">
        <!-- v-if="this.rightTabShow" -->
        <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList" @selection-change="handleChange"
          :span-method="objectSpanMethod" ref="tab1" :row-class-name="tableRowClassName" border height="520px">
        <el-table :key="tableKey" :row-key="getRowKey" v-if="tableList.length > 0" v-loading="loading" :data="tableList"
          @selection-change="handleChange" :span-method="objectSpanMethod" ref="tab1"
          :row-class-name="tableRowClassName" border height="520px">
          <el-table-column type="selection" width="40" align="center" />
          <!--  :selectable="selectEnable" -->
          <!-- <el-table-column label="是否签收" align="center" prop="isSignFor" /> -->
@@ -661,6 +662,7 @@
      // 调试日志
      console.log(`当前选中数量: ${selectedCount}`);
      console.log(`是否禁用选择: ${this.disableSelections}`);
    },
    getRowKey(row) {
@@ -679,6 +681,9 @@
                if (this.$refs.tab1) {
                  this.$refs.tab1.doLayout(); // 修改为正确的 ref 名称
                  this.$refs.tab1.clearSelection(); // 清空选中状态
                  const headerCheckbox = this.$refs.tab1.$el.querySelector('.el-table__header .el-checkbox');
                  if (headerCheckbox) headerCheckbox.style.display = 'inline';
                }
              });
              resolve(this.tableList);