haoxuan
2024-02-28 fb20919d312b7f3bf81805eda670f42fa2d18e39
src/components/makepager/TableCommonView.vue
@@ -7,6 +7,7 @@
      :data="tableList.tableInfomation"
      tooltip-effect="dark"
      :height="'calc(100% - 0px)'"
      :max-height="tableList.maxHeight"
      style="width: 100%"
      :lazy="tableList.lazy"
      :show-summary="showSummary.show"
@@ -18,8 +19,8 @@
      @row-click="tableRowClick"
      :row-class-name="tableRowClassName"
    >
      <el-table-column v-if="selectBox" type="selection" width="40" :selectable="selectable"> </el-table-column>
      <el-table-column v-if="tableList.selectIndex" type="index" label="序号" width="50"></el-table-column>
      <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column>
      <el-table-column
        v-for="(item, i) in tableList.tableColumn"
        :key="i"
@@ -184,11 +185,16 @@
        return {}
      }
    },
    loading:{
    loading: {
      type: Boolean,
      default: false
    },
    selectBoxList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      iscolopen: false,
@@ -390,6 +396,14 @@
        }
      }
      this.$emit("tableRowClassName", row)
    },
    selectable(row) {
      let list = this.selectBoxList.map((item) => item.number)
      if (list.findIndex((v) => v == row.number) == -1) {
        return true
      } else {
        return false
      }
    }
  }
}