| | |
| | | :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" |
| | |
| | | showSummary: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | // 列表不可选的数据 |
| | | selectBoxList: { |
| | | type: Array, |
| | | default: () => [] |
| | | }, |
| | | name:{ |
| | | type:String, |
| | | default:'' |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | }) |
| | | 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 |
| | | } |
| | | } |
| | | } |
| | | } |