src/components/makepager/TableCommonView.vue
@@ -1,12 +1,13 @@
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
<template>
  <div class="table-view">
  <div class="table-view" v-loading="loading">
    <el-table
      ref="table"
      border
      :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"
@@ -183,8 +184,17 @@
      default: () => {
        return {}
      }
    },
    loading: {
      type: Boolean,
      default: false
    },
    selectBoxList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      iscolopen: false,
@@ -386,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
      }
    }
  }
}