yangfeng
2024-02-27 441f8436a70c22fba6f25154f2f38a072c85b76b
src/components/makepager/TableCommonView.vue
@@ -19,7 +19,7 @@
      @row-click="tableRowClick"
      :row-class-name="tableRowClassName"
    >
      <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column>
      <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-for="(item, i) in tableList.tableColumn"
@@ -185,11 +185,16 @@
        return {}
      }
    },
    loading:{
    loading: {
      type: Boolean,
      default: false
    },
    selectBoxList: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      iscolopen: false,
@@ -391,6 +396,37 @@
        }
      }
      this.$emit("tableRowClassName", row)
    },
    selectable(row) {
      console.log(row, this.selectBoxList, "888899")
      let list = this.selectBoxList.map((item) => item.number)
      console.log(
        list,
        list.findIndex((v) => v == row.number)
      )
      if (list.findIndex((v) => v == row.number) == -1) {
        console.log("33")
        return true
      } else {
        console.log("44")
        return false
      }
      // if (this.selectBoxList.length == 1 && this.selectBoxList[0].number.length == 0) {
      //   return true
      // } else {
      //   let list = this.selectBoxList.map((item) => item.number)
      //   console.log(
      //     list,
      //     list.findIndex((v) => v === row.number),
      //     "5555"
      //   )
      //   if (list.findIndex((v) => v === row.number)) {
      //     return true
      //   } else {
      // }
      // }
    }
  }
}