|
@@ -68,6 +68,7 @@
|
|
|
@rowSelection="rowSelectionFun"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
+ :style="{ height: '500px' }"
|
|
|
:scroll="{ y: 450 }"
|
|
|
:showPagination="false"
|
|
|
bordered>
|
|
@@ -161,6 +162,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns1"
|
|
|
:data="loadData1"
|
|
|
+ :style="{ height: '500px' }"
|
|
|
:scroll="{ y: 450 }"
|
|
|
:showPagination="false"
|
|
|
bordered>
|
|
@@ -336,6 +338,17 @@ export default {
|
|
|
},
|
|
|
// 添加
|
|
|
handleAdd (row) {
|
|
|
+ const clist = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
|
|
|
+ const blist = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys || []
|
|
|
+ const i = clist.findIndex(item => item.id == row.id)
|
|
|
+ const k = blist.findIndex(item => item == row.id)
|
|
|
+ console.log(i, k)
|
|
|
+ if (i >= 0) {
|
|
|
+ clist.splice(i, 1)
|
|
|
+ }
|
|
|
+ if (k >= 0) {
|
|
|
+ blist.splice(k, 1)
|
|
|
+ }
|
|
|
this.$emit('add', row)
|
|
|
},
|
|
|
// 批量添加
|
|
@@ -359,7 +372,7 @@ export default {
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
reload () {
|
|
|
- this.$refs.table.clearSelected()
|
|
|
+ // this.$refs.table.clearSelected()
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
// ---------- 全部产品----------
|