用户管理新增、列表修改
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { HttpClientService } from '../../../services/http-client.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { NzMessageService } from 'ng-zorro-antd';
|
||||
|
||||
import 'ztree';
|
||||
declare var $: any;
|
||||
@@ -38,19 +39,34 @@ export class UserManagementComponent implements OnInit {
|
||||
constructor(
|
||||
private http:HttpClientService,
|
||||
private router:Router,
|
||||
private message: NzMessageService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.initTree();
|
||||
this.queryTable();
|
||||
}
|
||||
//删除
|
||||
delectConfirm(item){
|
||||
this.http.delete('/sysapi/setting/user/deleteById/'+item.uid).subscribe((json)=>{
|
||||
if(json.is_success){
|
||||
this.message.success(`删除成功!`);
|
||||
this.queryTable();
|
||||
}else{
|
||||
this.message.error(`删除失败`)
|
||||
}
|
||||
})
|
||||
}
|
||||
//取消删除
|
||||
delectCancel(){
|
||||
|
||||
}
|
||||
//新增、修改 1新增 2修改
|
||||
addModify(type,item?){
|
||||
if(type==1){
|
||||
console.log(222)
|
||||
this.router.navigate(['app/system/users/modify'],{queryParams:{operateType:1}})
|
||||
}else if(type==2){
|
||||
|
||||
this.router.navigate(['app/system/users/modify'],{queryParams:{operateType:2,id:item.uid}})
|
||||
}
|
||||
}
|
||||
//打开详情页面
|
||||
|
||||
Reference in New Issue
Block a user