提交 5f63ad22 authored 作者: quanlili's avatar quanlili

修改标签

上级 65aeb0b3
......@@ -813,24 +813,6 @@ export default {
// }
},
sureLable () {
// this.multipleSelection.map((item, index) => {
// if (!this.resourceLabel.includes(item.name)) {
// this.resourceLabel.push(item.name)
// }
// })
console.log(this.multipleSelection,"点击确定按钮的时候")
let rr = [...new Set(this.clickedLableIds)];
rr.map( ( item, index ) => {
this.resourceLabel.map(( item2, index ) => {
if ( item === item2.labelId ) {
this.resourceLabel.splice( index, 1 )
}
})
} )
console.log(this.multipleSelection,this.multipleSelection.length,"hahahhahahaahahahah")
if ( this.multipleSelection.length != 0 ) {
this.resourceLabel = [...this.multipleSelection];
let optIdArr = [];
this.resourceLabel.map((item, index) => {
......@@ -840,11 +822,8 @@ export default {
optIdArr.push(obj)
})
this.formData.label = optIdArr;
this.dialogTableVisible = false;
} else {
this.$message.warning('请选择资源标签')
}
},
cancleSureLable () {
this.dialogTableVisible = false
......@@ -879,13 +858,18 @@ export default {
},
closeLableDia() {
console.log(this.resourceLabel,'closeLableDia')
//this.$refs.multipleTable.clearSelection();
this.$refs.multipleTable.clearSelection();
//this.delArr = [];
},
deleteLableItem (item, key) {
//this.delArr.push(item);
let Id=item.id
this.resourceLabel.splice(key, 1);//删除便签
this.multipleSelection.forEach((list,index)=>{
if(Id==list.id){
this.multipleSelection.splice(index, 1);//删除复选框里面的便签
}
})
let optIdArr = [];
this.resourceLabel.map((item, index) => {
var obj = {
......@@ -894,13 +878,6 @@ export default {
optIdArr.push(obj)
})
this.formData.label = optIdArr;
this.gridData.forEach((item2, index) => {
if (Id == item2.id) {
this.$nextTick(function () {
this.$refs.multipleTable.toggleRowSelection(this.gridData[index], false);
})
}
})
},
setDelData(){
let Vue=this;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论