提交 49908f42 authored 作者: 王腾飞's avatar 王腾飞

0108

上级 5a0a5453
...@@ -242,6 +242,7 @@ export default { ...@@ -242,6 +242,7 @@ export default {
}, },
data() { data() {
return { return {
clickedLableIds: [],
pages: null, //资源标签分页的页数 pages: null, //资源标签分页的页数
delArr:[], delArr:[],
selectItemArr: [], selectItemArr: [],
...@@ -914,16 +915,18 @@ export default { ...@@ -914,16 +915,18 @@ export default {
// this.resourceLabel.splice(index, 1) // this.resourceLabel.splice(index, 1)
// } // }
// }) // })
this.clickedLableIds.push(row.id);
} }
}) })
} else { } else {
this.resourceLabel.map((item2, index) => { this.resourceLabel.map((item2, index) => {
// if (!item2.labelId) { if (!item2.labelId) {
// this.$set(item2, 'labelId', item2.id) this.$set(item2, 'labelId', item2.id)
// } }
// if (row.id === item2.labelId) { if (row.id === item2.labelId) {
// this.resourceLabel.splice(index, 1) this.resourceLabel.splice(index, 1)
// } }
}) })
} }
...@@ -936,6 +939,16 @@ export default { ...@@ -936,6 +939,16 @@ export default {
// this.resourceLabel.push(item.name) // this.resourceLabel.push(item.name)
// } // }
// }) // })
console.log(this.resourceLabel, '888999')
let rr = [...new Set(this.clickedLableIds)];
console.log(rr, '888888OOO')
rr.map( ( item, index ) => {
this.resourceLabel.map(( item2, index ) => {
if ( item === item2.labelId ) {
this.resourceLabel.splice( index, 1 )
}
})
} )
if ( this.multipleSelection.length != 0 ) { if ( this.multipleSelection.length != 0 ) {
console.log(this.multipleSelection, "789OOO") console.log(this.multipleSelection, "789OOO")
this.resourceLabel = this.multipleSelection; this.resourceLabel = this.multipleSelection;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论