权限菜单控制及系统管理操作优化

This commit is contained in:
zhouyuejun
2019-03-11 17:16:51 +08:00
parent 867e2583dc
commit 142b7a2d00
7 changed files with 74 additions and 207 deletions
@@ -94,7 +94,16 @@ export class DepartmentManagementComponent implements OnInit {
if(type==1){
}else if(type==2){
let item=this.orgDetail;
let item=this.orgDetail;
// console.log(item);
this.zNodesChild=this.zNodes.concat();
for(let i = 0;i<this.zNodesChild.length;i++){
if(this.zNodesChild[i].id===item.id){
this.zNodesChild.splice(i,1);
break;
}
}
$.fn.zTree.init($("#treeDemoChild"), this.settingChild, this.zNodesChild);
this.validateForm.patchValue({
organization:item.organization,
shortName:item.shortName,
@@ -182,7 +191,8 @@ export class DepartmentManagementComponent implements OnInit {
//保存选择机构
treeSave(){
if(this.treeSelectedChild){
this.orgSeleted=this.treeSelectedChild;
this.orgSeleted=this.treeSelectedChild;
this.close();
// this.visible = false;
// this.orgSeletedBtn=false;
}else{
@@ -338,9 +348,10 @@ export class DepartmentManagementComponent implements OnInit {
this.statusParamsTree.status=0;
}
this.zNodes=json.body;
this.zNodesChild=json.body;
// console.log(this.zNodes);
$.fn.zTree.init($("#treeDemo"), this.setting, this.zNodes);
$.fn.zTree.init($("#treeDemoChild"), this.settingChild, this.zNodesChild);
var zTree = $.fn.zTree.getZTreeObj("treeDemo");
let node = zTree.getNodes();
if(json.body.length>0){