Commit 1a6b99ad by chenwq

选择客户

1 parent becf5bbc
...@@ -183,6 +183,7 @@ export default { ...@@ -183,6 +183,7 @@ export default {
}, },
recoverySelected() { recoverySelected() {
this.$nextTick(() => {
this.selectedCustomerList.forEach(row => { this.selectedCustomerList.forEach(row => {
var idx = this.tableList.findIndex(k => k.id == row.id) var idx = this.tableList.findIndex(k => k.id == row.id)
if (idx != -1) { if (idx != -1) {
...@@ -199,6 +200,7 @@ export default { ...@@ -199,6 +200,7 @@ export default {
} }
}) })
} }
})
}, },
dealCondLimit(val) { dealCondLimit(val) {
...@@ -215,9 +217,16 @@ export default { ...@@ -215,9 +217,16 @@ export default {
if (!this.selectedCustomerList.length) { if (!this.selectedCustomerList.length) {
this.dealCondLimit(val[0]) this.dealCondLimit(val[0])
} }
let currentList = JSON.parse(JSON.stringify(this.selectedCustomerList))
let tableIds = this.tableList.map(item => item.id)
this.selectedCustomerList = JSON.parse(JSON.stringify(val)) this.selectedCustomerList = JSON.parse(JSON.stringify(val))
var selectIds = this.selectedCustomerList.map(item => item.id)
currentList.forEach(item => {
if (!selectIds.includes(item.id) && !tableIds.includes(item.id)) {
this.selectedLabelList.push(item)
}
})
this.recoverySelected() this.recoverySelected()
// console.log(this.selectedCustomerList)
} }
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!