|
|
|
@ -19,12 +19,22 @@ export class EdituserComponent implements OnInit {
|
|
|
|
|
constructor(private modal: NzModalRef, private fb: FormBuilder, private http: HttpClient, private toTree: TreeService) { } |
|
|
|
|
|
|
|
|
|
ngOnInit(): void { |
|
|
|
|
console.log(this.data) |
|
|
|
|
let roleData1 = [] |
|
|
|
|
let roleData2 = [] |
|
|
|
|
this.data.roleNames.forEach(element => { |
|
|
|
|
if (element.indexOf('LEVEL') != -1) { |
|
|
|
|
roleData2.push(element) |
|
|
|
|
}else{ |
|
|
|
|
roleData1.push(element) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.validateForm = this.fb.group({ |
|
|
|
|
account: [null, [Validators.required]], |
|
|
|
|
name: [null, [Validators.required]], |
|
|
|
|
organization: [null, [Validators.required]], |
|
|
|
|
role: [null], |
|
|
|
|
role2: [null], |
|
|
|
|
role: [roleData1], |
|
|
|
|
role2: [roleData2], |
|
|
|
|
phonenum: [null, [Validators.required]] |
|
|
|
|
}); |
|
|
|
|
if (this.listOfData.length == 0) { |
|
|
|
@ -57,6 +67,7 @@ export class EdituserComponent implements OnInit {
|
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取角色列表
|
|
|
|
|
async getAllRoles2() { |
|
|
|
|
let params = { |
|
|
|
|