各模块card高度设置
This commit is contained in:
@@ -34,7 +34,7 @@ export class UserManagementComponent implements OnInit {
|
||||
}
|
||||
visible = false;
|
||||
userDetail:any={}; //用户详情
|
||||
|
||||
tableHeight:any='100';
|
||||
|
||||
constructor(
|
||||
private http:HttpClientService,
|
||||
@@ -44,11 +44,19 @@ export class UserManagementComponent implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
// 页面监听 动态改变表单高度
|
||||
$('#tree-box').css('height',(document.documentElement.clientHeight-106+'px'));
|
||||
$('#main-box').css('height',(document.documentElement.clientHeight-106+'px'));
|
||||
$('#tree-box').css('height',(document.documentElement.clientHeight-126+'px'));
|
||||
$('#main-box').css('height',(document.documentElement.clientHeight-126+'px'));
|
||||
let winHeight=document.documentElement.clientHeight;
|
||||
if(winHeight-396>100){
|
||||
this.tableHeight=winHeight-396;
|
||||
}
|
||||
$(window).resize(function(){
|
||||
$('#tree-box').css('height',(document.documentElement.clientHeight-106+'px'));
|
||||
$('#main-box').css('height',(document.documentElement.clientHeight-106+'px'));
|
||||
$('#tree-box').css('height',(document.documentElement.clientHeight-126+'px'));
|
||||
$('#main-box').css('height',(document.documentElement.clientHeight-126+'px'));
|
||||
let winHeight2=document.documentElement.clientHeight;
|
||||
if(winHeight2-396>100){
|
||||
this.tableHeight=winHeight2-396;
|
||||
}
|
||||
})
|
||||
this.initTree();
|
||||
this.queryTable();
|
||||
@@ -100,15 +108,20 @@ export class UserManagementComponent implements OnInit {
|
||||
}
|
||||
//重置,重置搜索条件
|
||||
reset(){
|
||||
this.search.page_index=1;
|
||||
this.search.page_size=10;
|
||||
this.search.real_name='';
|
||||
this.search.login_name='';
|
||||
this.queryTable();
|
||||
}
|
||||
//获取列表
|
||||
queryTable():void{
|
||||
queryTable(params?):void{
|
||||
this.statusParamsTable.status=1;
|
||||
this.tableData=[];
|
||||
this.collectionSize='';
|
||||
if(params){
|
||||
this.search.page_index=params;
|
||||
}else{
|
||||
this.search.page_index='1';
|
||||
}
|
||||
this.http.get('/sysapi/setting/user/list',this.search).subscribe((json)=>{
|
||||
if(json.is_success){
|
||||
this.tableData=json.body.list;
|
||||
@@ -125,8 +138,7 @@ export class UserManagementComponent implements OnInit {
|
||||
}
|
||||
//翻页
|
||||
pageChange(event){
|
||||
this.search.page_index=event;
|
||||
this.queryTable();
|
||||
this.queryTable(event);
|
||||
}
|
||||
//树模型参数设置
|
||||
public zNodes: any[];
|
||||
|
||||
Reference in New Issue
Block a user