部门详情

This commit is contained in:
liweijin
2018-11-29 18:08:54 +08:00
parent a1ffdb02c8
commit d5c42bebba
17 changed files with 306 additions and 57 deletions
@@ -4,13 +4,13 @@ import { Router } from '@angular/router';
import { NzMessageService } from 'ng-zorro-antd';
import 'ztree';
declare var $: any;
declare var $: any;
declare var jQuery: any;
@Component({
selector: 'app-user-management',
templateUrl: './user-management.component.html',
styleUrls: ['./user-management.component.scss','../../main.scss']
styleUrls: ['./user-management.component.scss',]
})
export class UserManagementComponent implements OnInit {
treeSelected:any; //树模型-当前选中项
@@ -43,6 +43,13 @@ export class UserManagementComponent implements OnInit {
) { }
ngOnInit() {
// 页面监听 动态改变表单高度
$('#tree-box').css('height',(document.documentElement.clientHeight-106+'px'));
$('#main-box').css('height',(document.documentElement.clientHeight-106+'px'));
$(window).resize(function(){
$('#tree-box').css('height',(document.documentElement.clientHeight-106+'px'));
$('#main-box').css('height',(document.documentElement.clientHeight-106+'px'));
})
this.initTree();
this.queryTable();
}
@@ -158,16 +165,14 @@ export class UserManagementComponent implements OnInit {
if(json.body.length>0){
this.statusParamsTree.status=3;
let children=[];
for(var i=0;i<json.body.length;i++){
let option=json.body[i];
json.body.forEach(option=>{
option.name=option.organization;
if(option.pid){
option.pId=option.pid;
}else{
option.pId='hsfuhiw34239j89sauf98992h3indshv98h392hf9mplsd032fs2a2313fc';
}
}
});
json.body.push({
name:"全部机构",
isParent:true,