handleClick(data,checked, node) {
console.log(data)
this.i++;
console.log(this.i);
if(this.i==1){
this.$refs.treeForm.setCheckedNodes([data]);
this.userForm.orgId=data.orgId;
this.userForm.orgName=data.orgName;
console.log("i=1");
console.log(data);
}else {
if(this.i%2==0){
if(checked){
console.log("i!=1")
this.$refs.treeForm.setCheckedNodes([]);
this.$refs.treeForm.setCheckedNodes([data]);
this.userForm.orgId=data.orgId;
this.userForm.orgName=data.orgName;
console.log(data);
//交叉点击节点
}else{
this.$refs.treeForm.setCheckedNodes([data]);
//点击已经选中的节点,置空handleCheckChange
}
}
}
},
网友评论