src/components/makepager/TableCommonView.vue
@@ -22,7 +22,7 @@
      :summary-method="getSummaries"
      :show-summary="showSummary"
    >
      <el-table-column v-if="tableList.selectBox" type="selection" width="40"> </el-table-column>
      <el-table-column v-if="tableList.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-for="(item, i) in tableList.tableColumn"
@@ -151,6 +151,15 @@
    showSummary: {
      type: Boolean,
      default: false
    },
    // 列表不可选的数据
    selectBoxList: {
      type: Array,
      default: () => []
    },
    name:{
      type:String,
      default:''
    }
  },
  data() {
@@ -254,6 +263,18 @@
        })
        return sums
      }
    },
    selectable(row) {
      let prop='id'
      if(this.name=='product'){
        prop='productId'
      }
      let list = this.selectBoxList.map((item) => item[prop])
      if (list.findIndex((v) => v == row.id) == -1) {
        return true
      } else {
        return false
      }
    }
  }
}