|
@@ -207,7 +207,7 @@
|
|
|
type="text"
|
|
|
style="color: #FF4949;"
|
|
|
@click="deleteSelected(scope.row)"
|
|
|
- >删除
|
|
|
+ >移除
|
|
|
</el-button>
|
|
|
|
|
|
</template>
|
|
@@ -308,6 +308,19 @@ export default {
|
|
|
methods: {
|
|
|
deleteSelected(row){
|
|
|
console.log('deleteSelected row is:',row)
|
|
|
+ if (this.checkedList.length == 0) { return }
|
|
|
+ this.checkedList = this.checkedList.filter(item => item.box_auto_id != row.box_auto_id)
|
|
|
+ //this.deleteRows([row])
|
|
|
+ if (this.checkedList && this.checkedList.find(item => item && (item.box_auto_id == row.box_auto_id))) {
|
|
|
+ this.addRows([row])
|
|
|
+ } else {
|
|
|
+ this.deleteRows([row])
|
|
|
+ }
|
|
|
+ // rows.forEach(row => {
|
|
|
+ // this.checkedList = this.checkedList.filter(item => item.box_auto_id != row.box_auto_id)
|
|
|
+ // })
|
|
|
+ console.log('delete then count is:',this.checkedList.length)
|
|
|
+ console.log('delete this.checkedList is',this.checkedList)
|
|
|
},
|
|
|
addRows (rows) {
|
|
|
console.log('rows is',rows)
|