靜態刪除兩項,雙重過濾

hello芳芳發表於2024-05-28
addToRight() {
      const selectList = this.$refs.tableLeft.$refs.table.getCheckboxRecords(true)
      if (selectList && selectList.length > 0) {
        const unselectList = this.leftList.filter(item => {
          return !selectList.some(record => record.lngwageitemid === item.lngwageitemid)
        })
        this.leftList = unselectList
        this.rightList = [...this.rightList, ...selectList]
      }
      this.selectLeft = 0
      this.$refs.tableLeft.selectLength = 0
    },

this.multipleSelection.map(item => {
this.tableData.list = this.tableData.list.filter(el => {
return item.lngdepartmentid !== el.lngdepartmentid
})
})

相關文章