diff --git a/src/app/system-management/user/edituser/edituser.component.html b/src/app/system-management/user/edituser/edituser.component.html index 0f69168..b069993 100644 --- a/src/app/system-management/user/edituser/edituser.component.html +++ b/src/app/system-management/user/edituser/edituser.component.html @@ -71,10 +71,10 @@
- - +
\ No newline at end of file diff --git a/src/app/system-management/user/user.component.html b/src/app/system-management/user/user.component.html index 1ade58b..b72b940 100644 --- a/src/app/system-management/user/user.component.html +++ b/src/app/system-management/user/user.component.html @@ -95,7 +95,7 @@ 姓名 角色/预警接收级别 所属机构 - 审核状态 + 用户状态 备注 操作 @@ -112,9 +112,9 @@ {{data.organizationName}} - + 已启用 diff --git a/src/app/system-management/user/user.component.ts b/src/app/system-management/user/user.component.ts index 04678b3..503f64a 100644 --- a/src/app/system-management/user/user.component.ts +++ b/src/app/system-management/user/user.component.ts @@ -53,21 +53,21 @@ export class UserComponent implements OnInit { this.level = JSON.parse( sessionStorage.getItem("userdata") ).organization.level; - if (this.level == 1) { - this.getAllUrl = "/api/services/app/User/GetAll"; - this.addUrl = "/api/services/app/User/Create"; - this.editUrl = "/api/services/app/User/Update"; - this.deleteUrl = "/api/services/app/User/Delete"; - this.CountsByOrganizations = - "/api/services/app/User/GetCountsByOrganizations"; - } else { - this.getAllUrl = "/api/services/app/EdittingUser/GetAll"; - this.addUrl = "/api/services/app/EdittingUser/Create"; - this.editUrl = "/api/services/app/EdittingUser/Update"; - this.deleteUrl = "/api/services/app/EdittingUser/Delete"; - this.CountsByOrganizations = - "/api/services/app/EdittingUser/GetCountsByOrganizations"; - } + // if (this.level == 1) { + this.getAllUrl = "/api/services/app/User/GetAll"; + this.addUrl = "/api/services/app/User/Create"; + this.editUrl = "/api/services/app/User/Update"; + this.deleteUrl = "/api/services/app/User/Delete"; + this.CountsByOrganizations = + "/api/services/app/User/GetCountsByOrganizations"; + // } else { + // this.getAllUrl = "/api/services/app/EdittingUser/GetAll"; + // this.addUrl = "/api/services/app/EdittingUser/Create"; + // this.editUrl = "/api/services/app/EdittingUser/Update"; + // this.deleteUrl = "/api/services/app/EdittingUser/Delete"; + // this.CountsByOrganizations = + // "/api/services/app/EdittingUser/GetCountsByOrganizations"; + // } this.getAllOrganization(); this.getAllRoles(); this.getAllRoles2(); @@ -102,7 +102,6 @@ export class UserComponent implements OnInit { .subscribe((data: any) => { this.usersLIst = data.result.items; this.usersNum = data.result.totalCount; - console.log("所有用户", this.usersLIst); this.loading = false; }); } @@ -216,7 +215,6 @@ export class UserComponent implements OnInit { this.defaultExpandedKeys = [this.nodes[0].id]; this.nzSelectedKeys = [this.nodes[0].id]; this.OrganizationUnitId = [this.nodes[0].id]; - console.log(this.nodes, 9000); }); }); } @@ -230,7 +228,6 @@ export class UserComponent implements OnInit { this.getAllUsers(); } nzClick(event: NzFormatEmitEvent) { - console.log(event); this.nzSelectedKeys[0] = event.node.origin.id; this.nzSelectedKeys = [...this.nzSelectedKeys]; this.OrganizationUnitId = event.node.origin.id; @@ -295,15 +292,10 @@ export class UserComponent implements OnInit { }, }); const instance = modal.getContentComponent(); - modal.afterOpen.subscribe(() => console.log("[afterOpen] emitted!")); - modal.afterClose.subscribe((result) => - console.log("[afterClose] The result is:", result) - ); } //编辑用户 editUser(data): void { - console.log(data); const modal = this.modal.create({ nzTitle: "编辑用户", nzContent: EdituserComponent, @@ -312,7 +304,7 @@ export class UserComponent implements OnInit { nzFooter: null, nzMaskClosable: false, nzComponentParams: { - data: data, + data: JSON.parse(JSON.stringify(data)), listOfData: this.listOfData, listOfData2: this.listOfData2, nodes: this.nodes, @@ -327,27 +319,30 @@ export class UserComponent implements OnInit { isShowNewPassword: boolean; newPasswordObj: any; resetPassword(item) { - // console.log(item) this.modal.confirm({ nzTitle: `确定要重置${item.userName}这个账户的密码吗?`, nzOkText: "确定", nzOkType: "primary", nzOnOk: () => { let body; - if (this.level == 1) { - body = { - userId: item.id, - }; - } else { - if (item.userId) { - body = { - userId: item.userId, - }; - } else { - this.message.create("warning", "审核未完成的不能重置密码"); - return; - } - } + // if (this.level == 1) { + // body = { + // userId: item.id, + // }; + // } else { + // if (item.userId) { + // body = { + // userId: item.userId, + // }; + // } else { + // this.message.create("warning", "审核未完成的不能重置密码"); + // return; + // } + // } + + body = { + userId: item.id, + }; this.http .post("/api/services/app/User/ResetPassword", body) @@ -450,15 +445,19 @@ export class UserComponent implements OnInit { //停用启用 cancel(data, type) { let url; - if (this.level == 1) { - type - ? (url = "/api/services/app/User/Activate") - : (url = "/api/services/app/User/DeActivate"); - } else { - type - ? (url = "/api/services/app/EdittingUser/Activate") - : (url = "/api/services/app/EdittingUser/DeActivate"); - } + + type + ? (url = "/api/services/app/User/Activate") + : (url = "/api/services/app/User/DeActivate"); + // if (this.level == 1) { + // type + // ? (url = "/api/services/app/User/Activate") + // : (url = "/api/services/app/User/DeActivate"); + // } else { + // type + // ? (url = "/api/services/app/EdittingUser/Activate") + // : (url = "/api/services/app/EdittingUser/DeActivate"); + // } let body = { id: data.id, };