管理中心 小组权限 配置页 勾选框闪动问题
This commit is contained in:
		
							parent
							
								
									354d086791
								
							
						
					
					
						commit
						98170379e4
					
				| @ -532,6 +532,25 @@ | ||||
|             checkedNode(data, checked, subChecked) {// 节点选中事件 | ||||
|                 // 获取所有子节点 | ||||
|                 const that = this; | ||||
|                 that.permInfo.loading = true; | ||||
|                 if (data.leaf){ // 如果当前节点是叶子节点 不存在子节点 就没必要再请求 性能优化 | ||||
|                   // 只对当前叶子节点处理 | ||||
|                   let currVerId = data.versionId; | ||||
|                   let checkedVerIds = that.permInfo.tree.value; | ||||
|                   if (checked){ | ||||
|                     if (checkedVerIds.indexOf(currVerId) == -1) { | ||||
|                       checkedVerIds.push(currVerId); | ||||
|                     } | ||||
|                   }else { | ||||
|                     if (checkedVerIds.indexOf(currVerId) !== -1){ | ||||
|                       checkedVerIds = checkedVerIds.filter(id => id !== currVerId); | ||||
|                     } | ||||
|                   } | ||||
|                   that.permInfo.tree.value = checkedVerIds; | ||||
|                   that.$refs.repositoryTree.setCheckedKeys(checkedVerIds); | ||||
|                   that.permInfo.loading = false; | ||||
|                   return; | ||||
|                 } | ||||
|                 const params = { | ||||
|                     url:'jd', | ||||
|                     data:{ | ||||
| @ -563,8 +582,9 @@ | ||||
|                             } | ||||
|                         } | ||||
|                         that.permInfo.tree.value = tempArr; | ||||
|                         that.$refs.repositoryTree.setCheckedKeys([]); | ||||
|                         that.$refs.repositoryTree.setCheckedKeys(tempArr); | ||||
|                     } | ||||
|                   that.permInfo.loading = false; | ||||
|                 }).catch(error=>{ | ||||
|                     console.log(error); | ||||
|                 }) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 qinoy
						qinoy