传入组件中选中的数据为ids,
1.备份选中的集合backIds
2.构造当前页面已选中的集合 currentSelectIds
3.备份当前已选中的集合 backCurrentSelectIds
4.界面点击选择,或者取消选择,全选,取消全选,变更当前页面已选中集合,在element 中捕获selection-change事件
4.1 currentSelectIds = selection.map((item)=> item.id)
4.2 计算currentSelectIds与backCurrentSelectIds的差异,算出哪些是新添加的(newJoinIds),那些是需要移除的(needRemovIds)
4.3 backIds = backIds.concat(newJoinIds)
4.4 backIds移除needRemoveIds
//假如是弹窗情况下点击确定时同步数据
5.当关闭弹窗时同步ids this.$emit("ids:update", backIds)