|
@@ -10,7 +10,7 @@ import { NzSpaceModule } from 'ng-zorro-antd/space';
|
|
|
import { NzPageHeaderModule } from 'ng-zorro-antd/page-header';
|
|
|
import { NzBreadCrumbModule } from 'ng-zorro-antd/breadcrumb';
|
|
|
import { CommonCompModule } from '../../../services/common.modules';
|
|
|
-import { NzModalModule } from 'ng-zorro-antd/modal';
|
|
|
+import { NzModalModule, NzModalService } from 'ng-zorro-antd/modal';
|
|
|
import {
|
|
|
NzFormatEmitEvent,
|
|
|
NzTreeModule,
|
|
@@ -25,6 +25,7 @@ import { NzEmptyModule } from 'ng-zorro-antd/empty';
|
|
|
import { NzRadioModule } from 'ng-zorro-antd/radio';
|
|
|
import { NzMessageService } from 'ng-zorro-antd/message';
|
|
|
import { textbookServer } from '../../../services/textbook';
|
|
|
+import { NzSelectModule } from 'ng-zorro-antd/select';
|
|
|
interface nodes {
|
|
|
title: string;
|
|
|
key: string;
|
|
@@ -57,6 +58,7 @@ interface depart {
|
|
|
NzEmptyModule,
|
|
|
NzModalModule,
|
|
|
NzRadioModule,
|
|
|
+ NzSelectModule,
|
|
|
],
|
|
|
standalone: true,
|
|
|
})
|
|
@@ -93,13 +95,28 @@ export class PageRoleComponent implements OnInit {
|
|
|
};
|
|
|
parentMap: Array<any> = [];
|
|
|
parentList: Array<any> = [];
|
|
|
+ radio: string = '';
|
|
|
+
|
|
|
+ /* 添加账号 */
|
|
|
+ accountIsVisible: boolean = false;
|
|
|
+ account: any = {
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ email: '',
|
|
|
+ password: '',
|
|
|
+ identity: '',
|
|
|
+ department: {},
|
|
|
+ companyType: '',
|
|
|
+ };
|
|
|
+ userType: Array<string> = ['个人'];
|
|
|
|
|
|
constructor(
|
|
|
public tbookSer: textbookServer,
|
|
|
private route: Router,
|
|
|
+ private modal: NzModalService,
|
|
|
private activeRoute: ActivatedRoute,
|
|
|
private nzContextMenuService: NzContextMenuService,
|
|
|
- private message: NzMessageService,
|
|
|
+ private message: NzMessageService
|
|
|
) {
|
|
|
this.user = Parse.User.current();
|
|
|
this.className = this.Department.className;
|
|
@@ -121,57 +138,96 @@ export class PageRoleComponent implements OnInit {
|
|
|
// this.queryParams.where['isDeleted'] = { $ne: true };
|
|
|
// }
|
|
|
// this.list?.ngOnInit();
|
|
|
- if(!this.tbookSer.profile.user.department?.objectId){
|
|
|
- this.message.warning('权限不足')
|
|
|
- history.back()
|
|
|
- return
|
|
|
+ if (!this.tbookSer.profile.user.department?.objectId) {
|
|
|
+ this.message.warning('权限不足');
|
|
|
+ history.back();
|
|
|
+ return;
|
|
|
}
|
|
|
- this.nodes = [{
|
|
|
- title: this.tbookSer.profile.user.department.name,
|
|
|
- key: this.tbookSer.profile.user.department?.objectId,
|
|
|
- children: [...await this.getDepart(this.tbookSer.profile.user.department?.objectId)],
|
|
|
- isParent: false,
|
|
|
- isLeaf: false,
|
|
|
- }];
|
|
|
+ let query = new Parse.Query('Department')
|
|
|
+ query.equalTo('objectId', this.tbookSer.profile.user.department?.objectId)
|
|
|
+ query.select('hasChildren','branch')
|
|
|
+ let r = await query.first()
|
|
|
+
|
|
|
+ this.nodes = [
|
|
|
+ {
|
|
|
+ title: this.tbookSer.profile.user.department.name,
|
|
|
+ key: this.tbookSer.profile.user.department?.objectId,
|
|
|
+ children: [
|
|
|
+ ...(await this.getDepart(
|
|
|
+ this.tbookSer.profile.user.department?.objectId
|
|
|
+ )),
|
|
|
+ ],
|
|
|
+ isParent: !r?.get('hasChildren'),
|
|
|
+ isLeaf: !r?.get('hasChildren'),
|
|
|
+ branch:r?.get('branch')
|
|
|
+ },
|
|
|
+ ];
|
|
|
});
|
|
|
}
|
|
|
async getDepart(
|
|
|
parent?: string,
|
|
|
- searchValue?: string
|
|
|
+ searchValue?: string,
|
|
|
+ filter?: boolean
|
|
|
): Promise<Array<nodes>> {
|
|
|
let nodes: any = [];
|
|
|
let query = new Parse.Query('Department');
|
|
|
- query.equalTo('parent', parent ? parent : undefined);
|
|
|
+ if (!filter) {
|
|
|
+ query.equalTo('parent', parent ? parent : undefined);
|
|
|
+ }
|
|
|
searchValue && query.contains('name', searchValue);
|
|
|
query.notEqualTo('isDeleted', true);
|
|
|
- query.select('code', 'name', 'branch', 'parent','type');
|
|
|
+ query.select('code', 'name', 'branch', 'parent', 'type','hasChildren');
|
|
|
query.descending('createdAt');
|
|
|
- query.limit(2000);
|
|
|
+ query.equalTo('branch',this.tbookSer.profile.companyType)
|
|
|
+ console.log(searchValue);
|
|
|
+ if(searchValue && searchValue != undefined){
|
|
|
+ query.equalTo('parent',this.tbookSer.profile.user.department?.objectId)
|
|
|
+ }
|
|
|
+ query.limit(100);
|
|
|
+ if (this.activeDepart) query.notEqualTo('objectId', this.activeDepart?.id);
|
|
|
let res = await query.find();
|
|
|
res.forEach((item) => {
|
|
|
nodes.push({
|
|
|
title: item.get('name'),
|
|
|
key: item.id,
|
|
|
children: [],
|
|
|
- isParent: item.get('type') =='单位' ? true : false, //是否是最下级
|
|
|
- isLeaf: false,
|
|
|
+ branch: item.get('branch'),
|
|
|
+ isLeaf: !item.get('hasChildren') ? true : false, //是否是最下级
|
|
|
});
|
|
|
});
|
|
|
return nodes;
|
|
|
}
|
|
|
+ //搜索
|
|
|
+ async onSearchNodes(e: string, modal?: boolean) {
|
|
|
+ if (modal) {
|
|
|
+ this.parentList = await this.getDepart('', e, true);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.nodes = await this.getDepart('', e, e ? true : false);
|
|
|
+ }
|
|
|
//添加成员
|
|
|
addMember() {
|
|
|
- this.message.warning('权限灰度中')
|
|
|
+ this.parentList = this.nodes;
|
|
|
+ this.account = {
|
|
|
+ name: '',
|
|
|
+ phone: '',
|
|
|
+ email: '',
|
|
|
+ password: '',
|
|
|
+ identity: '',
|
|
|
+ department: {},
|
|
|
+ companyType: '',
|
|
|
+ };
|
|
|
+ this.accountIsVisible = true;
|
|
|
}
|
|
|
//展开/合并
|
|
|
async nzEvent(event: NzFormatEmitEvent): Promise<void> {
|
|
|
console.log(event);
|
|
|
let node: any = event.node;
|
|
|
if (event.eventName === 'expand') {
|
|
|
- if (node.origin.isParent) {
|
|
|
- node.addChildren([]);
|
|
|
- return;
|
|
|
- }
|
|
|
+ // if (node.origin.isParent) {
|
|
|
+ // node.addChildren([]);
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
if (node?._children.length <= 0) {
|
|
|
let data = await this.getDepart(node.key);
|
|
|
node.addChildren(data);
|
|
@@ -179,8 +235,8 @@ export class PageRoleComponent implements OnInit {
|
|
|
console.log(this.nodes);
|
|
|
} else {
|
|
|
// if (node.origin.isParent) {
|
|
|
- this.currentDepart = node.origin;
|
|
|
- this.getProfile();
|
|
|
+ this.currentDepart = node.origin;
|
|
|
+ this.getProfile();
|
|
|
// }
|
|
|
}
|
|
|
}
|
|
@@ -188,23 +244,26 @@ export class PageRoleComponent implements OnInit {
|
|
|
this.profiles = [];
|
|
|
this.loading = true;
|
|
|
let queryParams = {
|
|
|
- where : {
|
|
|
- "$or": [{
|
|
|
- "user": {
|
|
|
- "$inQuery": {
|
|
|
- "where": {
|
|
|
- "$or": [{
|
|
|
- "department": { "$eq": this.currentDepart.key}
|
|
|
- },
|
|
|
- ]
|
|
|
+ where: {
|
|
|
+ $or: [
|
|
|
+ {
|
|
|
+ user: {
|
|
|
+ $inQuery: {
|
|
|
+ where: {
|
|
|
+ $or: [
|
|
|
+ {
|
|
|
+ department: { $eq: this.currentDepart.key },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ className: '_User',
|
|
|
},
|
|
|
- "className": "_User"
|
|
|
- }
|
|
|
- }
|
|
|
- }]
|
|
|
- }
|
|
|
- }
|
|
|
- let query = Parse.Query.fromJSON('Profile',queryParams);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ };
|
|
|
+ let query = Parse.Query.fromJSON('Profile', queryParams);
|
|
|
query.include('user');
|
|
|
query.notEqualTo('identity', '国家级管理员');
|
|
|
let r = await query.find();
|
|
@@ -232,7 +291,7 @@ export class PageRoleComponent implements OnInit {
|
|
|
}
|
|
|
//删除部门
|
|
|
onDelDepart() {
|
|
|
- this.message.warning('权限灰度中')
|
|
|
+ this.message.warning('权限灰度中');
|
|
|
}
|
|
|
|
|
|
onAllChecked(checked: boolean): void {
|
|
@@ -254,82 +313,284 @@ export class PageRoleComponent implements OnInit {
|
|
|
}
|
|
|
//新建打开弹窗
|
|
|
async showModalDepart(type: string) {
|
|
|
+ this.parentList = this.nodes;
|
|
|
+ this.editObject = {
|
|
|
+ name: '',
|
|
|
+ code: '',
|
|
|
+ desc: '',
|
|
|
+ parent: '',
|
|
|
+ branch: '',
|
|
|
+ };
|
|
|
if (type == 'edit') {
|
|
|
let query = new Parse.Query('Department');
|
|
|
let r = await query.get(this.activatedNode?.key);
|
|
|
this.activeDepart = r;
|
|
|
- this.parentMap = this.formatNode(this.activatedNode);
|
|
|
- if(this.activatedNode?.parentNode?.origin.key){
|
|
|
- this.parentList = await this.getDepart(this.activatedNode.parentNode.origin.key);
|
|
|
+ this.editObject = {
|
|
|
+ name: this.activeDepart.get('name'),
|
|
|
+ code: this.activeDepart.get('code'),
|
|
|
+ desc: this.activeDepart.get('desc'),
|
|
|
+ parent: {
|
|
|
+ title: this.activeDepart.get('parent')?.get('name'),
|
|
|
+ id: this.activeDepart.get('parent')?.id,
|
|
|
+ },
|
|
|
+ branch: this.activeDepart.get('branch'),
|
|
|
+ };
|
|
|
+ this.parentMap = await this.formatNode(
|
|
|
+ this.activeDepart.get('parent')?.id
|
|
|
+ );
|
|
|
+ if (this.activatedNode?.parentNode?.origin?.parentNode?.origin.key) {
|
|
|
+ this.parentList = await this.getDepart(
|
|
|
+ this.activatedNode?.parentNode?.origin?.parentNode?.origin.key
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else if (type == 'add' && this.activatedNode) {
|
|
|
+ console.log(this.activatedNode);
|
|
|
+ this.editObject.parent = {
|
|
|
+ title: this.activatedNode.origin.title,
|
|
|
+ id: this.activatedNode.origin.key,
|
|
|
+ };
|
|
|
+ this.editObject.branch =
|
|
|
+ this.activatedNode.origin.branch || this.activatedNode.origin.title;
|
|
|
+ this.parentMap = await this.formatNode(this.activatedNode.origin.key);
|
|
|
+ if (this.activatedNode?.parentNode?.origin.key) {
|
|
|
+ this.parentList = await this.getDepart(
|
|
|
+ this.activatedNode.parentNode.origin.key
|
|
|
+ );
|
|
|
}
|
|
|
- }else{
|
|
|
- this.parentList = await this.getDepart(this.tbookSer.profile.user.department?.objectId)
|
|
|
}
|
|
|
+ console.log(this.parentMap);
|
|
|
this.editType = type;
|
|
|
this.isVisible = true;
|
|
|
}
|
|
|
//格式化链
|
|
|
- formatNode(node: NzTreeNode): Array<any> {
|
|
|
- let arr = [];
|
|
|
- if (node.parentNode?.origin.title) {
|
|
|
- arr.push({
|
|
|
- title: node.parentNode?.origin.title,
|
|
|
- key: node.parentNode?.origin.key,
|
|
|
- });
|
|
|
- arr.unshift(...this.formatNode(node.parentNode));
|
|
|
+ async formatNode(id: string): Promise<Array<any>> {
|
|
|
+ let query = new Parse.Query('Department');
|
|
|
+ query.select('name', 'parent','hasChildren');
|
|
|
+ let r = await query.get(id);
|
|
|
+ let arr = [
|
|
|
+ {
|
|
|
+ title: r.get('name'),
|
|
|
+ key: r.id,
|
|
|
+ hasChildren: r.get('hasChildren'), //是否是最下级
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ if (r?.get('parent')) {
|
|
|
+ arr.unshift(...(await this.formatNode(r?.get('parent').id)));
|
|
|
}
|
|
|
return arr;
|
|
|
}
|
|
|
- async onPre(key?:any,index?:number){
|
|
|
- if(!key){
|
|
|
+ async onPre(data?: any, index?: number) {
|
|
|
+ if (!data?.key || !data.hasChildren) {
|
|
|
// this.parentList = await this.getDepart();
|
|
|
// this.parentMap = []
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
// if(index == this.parentMap.length-1) return
|
|
|
- if(index !== 0 && !index) this.parentMap.splice(index || 0+1)
|
|
|
- this.parentList = await this.getDepart(key);
|
|
|
+ if (index !== 0 && !index) this.parentMap.splice(index || 0 + 1);
|
|
|
+ this.parentList = await this.getDepart(data?.key);
|
|
|
}
|
|
|
//选择所属类别下级列表
|
|
|
- async onCheckedDepart(e: any, checked?: boolean) {
|
|
|
+ async onCheckedDepart(type: string, e: any, checked?: boolean) {
|
|
|
+ this.radio = e.key;
|
|
|
console.log(e);
|
|
|
+ this.parentMap = await this.formatNode(e.key);
|
|
|
if (checked) {
|
|
|
- this.editObject = {
|
|
|
- name: e.title,
|
|
|
- code: '',
|
|
|
- desc: '',
|
|
|
- parent: e,
|
|
|
- branch: '',
|
|
|
- };
|
|
|
+ // this.editObject.name = e.title
|
|
|
+ if (type == 'account') {
|
|
|
+ this.account.department = { title: e.title, id: e.key };
|
|
|
+ this.account.companyType = e.branch || e.title;
|
|
|
+ } else {
|
|
|
+ this.editObject.parent = {
|
|
|
+ title: e.title,
|
|
|
+ id: e.key,
|
|
|
+ };
|
|
|
+ this.editObject.branch = e.branch || e.title;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
- this.parentMap.push({
|
|
|
- title: e.title,
|
|
|
- key: e.key,
|
|
|
- });
|
|
|
+ if (e.isLeaf) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ // this.parentMap.push({
|
|
|
+ // title: e.title,
|
|
|
+ // key: e.key,
|
|
|
+ // });
|
|
|
this.parentList = await this.getDepart(e?.key);
|
|
|
}
|
|
|
- handleOk(): void {
|
|
|
- this.message.warning('权限灰度中')
|
|
|
+ async handleOk(): Promise<void> {
|
|
|
+ if (!this.editObject?.name || !this.editObject.parent?.id) {
|
|
|
+ this.message.error('请填写完整信息');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this.activeDepart?.id && this.editType == 'edit') {
|
|
|
+ this.activeDepart.set('name', this.editObject?.name);
|
|
|
+ this.activeDepart.set('code', this.editObject?.code);
|
|
|
+ this.activeDepart.set('desc', this.editObject.desc);
|
|
|
+ this.activeDepart.set('parent', {
|
|
|
+ __type: 'Pointer',
|
|
|
+ className: 'Department',
|
|
|
+ objectId: this.editObject.parent?.id,
|
|
|
+ });
|
|
|
+ this.activeDepart.set('branch', this.editObject.branch);
|
|
|
+ } else {
|
|
|
+ let obj = Parse.Object.extend('Department');
|
|
|
+ this.activeDepart = new obj();
|
|
|
+ this.activeDepart?.set('name', this.editObject?.name);
|
|
|
+ this.activeDepart?.set('code', this.editObject?.code);
|
|
|
+ this.activeDepart?.set('desc', this.editObject.desc);
|
|
|
+ this.activeDepart?.set('parent', {
|
|
|
+ __type: 'Pointer',
|
|
|
+ className: 'Department',
|
|
|
+ objectId: this.editObject.parent?.id,
|
|
|
+ });
|
|
|
+ this.activeDepart?.set('branch', this.editObject.branch);
|
|
|
+ }
|
|
|
+ await this.activeDepart?.save();
|
|
|
+ await this.updateChildren()
|
|
|
this.isVisible = false;
|
|
|
+ this.message.success(this.editType == 'edit' ? '保存' : '添加' + '成功');
|
|
|
+ this.activeDepart = undefined;
|
|
|
+ this.ngOnInit()
|
|
|
+ }
|
|
|
+ //更新上级children字段
|
|
|
+ async updateChildren(){
|
|
|
+ let query = new Parse.Query('Department')
|
|
|
+ query.equalTo('objectId', this.editObject.parent?.id)
|
|
|
+ let r = await query.first()
|
|
|
+ if(r?.id && !r.get('hasChildren')){
|
|
|
+ r?.set('hasChildren', true)
|
|
|
+ await r.save()
|
|
|
+ }
|
|
|
+ return
|
|
|
}
|
|
|
-
|
|
|
handleCancel(): void {
|
|
|
console.log('Button cancel clicked!');
|
|
|
this.isVisible = false;
|
|
|
this.activatedNode = undefined;
|
|
|
this.parentMap = [];
|
|
|
- this.activeDepart = undefined
|
|
|
+
|
|
|
+ this.accountIsVisible = false;
|
|
|
+ this.account = null;
|
|
|
}
|
|
|
|
|
|
/* 组织 */
|
|
|
- showModalOrganize(){
|
|
|
- this.message.warning('权限灰度中')
|
|
|
+ showModalOrganize() {
|
|
|
+ this.message.warning('权限灰度中');
|
|
|
+ }
|
|
|
+ goDateil(id: string) {
|
|
|
+ this.route.navigate(['/nav-admin/manage/user/edit', { id: id }]);
|
|
|
+ }
|
|
|
+ randomPassword() {
|
|
|
+ let sCode =
|
|
|
+ 'A,B,C,E,F,G,H,J,K,L,M,N,P,Q,R,S,T,W,X,Y,Z,1,2,3,4,5,6,7,8,9,0,q,w,e,r,t,y,u,i,o,p,a,s,d,f,g,h,j,k,l,z,x,c,v,b,n,m';
|
|
|
+ let aCode = sCode.split(',');
|
|
|
+ let aLength = aCode.length; //获取到数组的长度
|
|
|
+ let str = [];
|
|
|
+ for (let i = 0; i <= 16; i++) {
|
|
|
+ let j = Math.floor(Math.random() * aLength); //获取到随机的索引值
|
|
|
+ let txt = aCode[j]; //得到随机的一个内容
|
|
|
+ str.push(txt);
|
|
|
+ }
|
|
|
+ this.account.password = str.join('');
|
|
|
+ console.log(this.account.password);
|
|
|
+ }
|
|
|
+ /* 添加账号 */
|
|
|
+ async accountComplete() {
|
|
|
+ if (
|
|
|
+ !this.account?.name.trim() ||
|
|
|
+ !this.account.department?.id ||
|
|
|
+ !this.account.password.trim()
|
|
|
+ ) {
|
|
|
+ this.message.warning('请填写必填项');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.account.identity) {
|
|
|
+ this.message.error('请选择人员类型');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let a = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
|
|
|
+ if (this.account.phone && !String(this.account.phone).match(a)) {
|
|
|
+ this.message.error('请填写正确手机号');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ let obj = Parse.Object.extend('_User');
|
|
|
+ let user = new obj();
|
|
|
+ user?.set('username', this.account?.email);
|
|
|
+ user?.set('name', this.account?.name);
|
|
|
+ user?.set('phone', this.account?.phone);
|
|
|
+ user?.set('email', this.account?.email);
|
|
|
+ user?.set('password', this.account.password);
|
|
|
+ user?.set('accountState', '已认证');
|
|
|
+ user?.set('department', {
|
|
|
+ __type: 'Pointer',
|
|
|
+ className: 'Department',
|
|
|
+ objectId: this.account.department?.id,
|
|
|
+ });
|
|
|
+ let u = await user.save();
|
|
|
+ let p = Parse.Object.extend('Profile');
|
|
|
+ let profile = new p();
|
|
|
+ profile?.set('user', u?.toPointer());
|
|
|
+ profile?.set('companyType', this.account.companyType);
|
|
|
+ profile?.set('email', this.account.email);
|
|
|
+ profile?.set('identity', this.account.identity);
|
|
|
+ let res = await profile?.save();
|
|
|
+ this.accountIsVisible = false;
|
|
|
+ this.account = null;
|
|
|
+ this.modal.success({
|
|
|
+ nzTitle: '添加成功',
|
|
|
+ nzContent: '',
|
|
|
+ nzOnOk: () => {
|
|
|
+ this.currentDepart && this.getProfile();
|
|
|
+ },
|
|
|
+ });
|
|
|
+ } catch (err: any) {
|
|
|
+ console.warn('添加用户错误', err);
|
|
|
+ this.message.error(err?.Error || '错误:请检查用户邮箱是否已存在');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setOfCheckedId = new Set<string>();
|
|
|
+ //移除部门
|
|
|
+ async removeBranch(data: Parse.Object) {
|
|
|
+ if (data?.get('user')?.id) {
|
|
|
+ data?.get('user')?.set('department', null);
|
|
|
+ await data?.get('user')?.save();
|
|
|
+ this.message.error('移除成功');
|
|
|
+ this.getProfile();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ removeBranchAll() {
|
|
|
+ this.modal.confirm({
|
|
|
+ nzTitle: '批量移除',
|
|
|
+ nzContent: `请谨慎操作`,
|
|
|
+ nzOkText: '确认',
|
|
|
+ nzOkType: 'primary',
|
|
|
+ nzOkDanger: true,
|
|
|
+ nzOnOk: async () => {
|
|
|
+ let selectedList = this.profiles.filter((item: any) =>
|
|
|
+ this.setOfCheckedId.has(item?.id)
|
|
|
+ );
|
|
|
+ let romovePromiseList = selectedList.map((item: any) => {
|
|
|
+ return new Promise(async (resolve) => {
|
|
|
+ item?.get('user')?.set('department', null);
|
|
|
+ await item?.get('user')?.save();
|
|
|
+ resolve(true);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ try {
|
|
|
+ await Promise.all(romovePromiseList);
|
|
|
+ this.message.error('移除成功');
|
|
|
+ this.getProfile();
|
|
|
+ this.resetChange();
|
|
|
+ } catch (err) {}
|
|
|
+ },
|
|
|
+ nzCancelText: '取消',
|
|
|
+ nzOnCancel: () => console.log('Cancel'),
|
|
|
+ });
|
|
|
}
|
|
|
- goDateil(id:string){
|
|
|
- this.route.navigate([
|
|
|
- '/nav-admin/manage/user/edit',
|
|
|
- { id:id },
|
|
|
- ])
|
|
|
+ resetChange() {
|
|
|
+ this.setOfCheckedId = new Set<string>();
|
|
|
+ this.checkedAll = false;
|
|
|
}
|
|
|
}
|