提交 d376326f authored 作者: quanlili's avatar quanlili

修改标签

上级 52a83847
......@@ -349,7 +349,7 @@ export default {
// { required: true, message: '请选择资源类型', trigger: 'change' }
// ]
},
resourceLabelList: [], //资源标签列表
resourceLabelList: [], //储存用户操作资源标签列表
resourceLabelCopy:[],//存储的标签中间数组
resourceDiyType: '',
resourceLabel: [],//便签的数组
......@@ -790,10 +790,46 @@ export default {
//this.setDelData();
},
selectHandler(val,row){
let rowId=row.id;
console.log(rowId,val,row,'88888')
val.map(item => {
this.$set(item, 'labelId', item.id)
})
this.multipleSelection = val;
let fleg=true;//[1,2,3,4]
if(this.multipleSelection.length>0){
for(let i =0;i< this.multipleSelection.length;i++){
let itemsId=this.multipleSelection[i].id;
if(rowId==itemsId){
fleg=false;
this.multipleSelection.splice(i,1);
break;
}else{
fleg=true;
}
}
if(fleg){
this.multipleSelection.push(row);
}
// this.multipleSelection.forEach((i,index)=>{
// console.log(i.id,'iddid')
// if(rowId==i.id){
// fleg=false;
// this.multipleSelection.splice(index,1)
// }else{
// fleg=true;
// }
// })
}else{
this.multipleSelection.push(row)
console.log("push")
}
this.multipleSelection=Array.from(new Set(this.multipleSelection))
// if(this.multipleSelection.length<=0){
// this.multipleSelection = val;
// }else{
// this.resourceLabelList=val;
// }
console.log(this.multipleSelection, '呵呵呵呵呵呵呵呵')
if (this.$route.query.flag === 'look') {
console.log(this.resourceLabel, "&*&*&*")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论