-
+
角色名称
@@ -8,13 +8,11 @@
-
+
+
+
+
+
@@ -32,7 +30,7 @@
角色名称 |
角色描述 |
创建时间 |
-
修改时间 |
+
更新时间 |
操作 |
diff --git a/src/app/pages/account/sys-role/sys-role.component.less b/src/app/pages/account/sys-role/sys-role.component.less
index dab6f69..a7f2d4e 100644
--- a/src/app/pages/account/sys-role/sys-role.component.less
+++ b/src/app/pages/account/sys-role/sys-role.component.less
@@ -4,9 +4,6 @@
button {
margin-left: 8px;
}
-.search-area {
- text-align: right;
-}
.submit-btn {
width: 150px;
}
diff --git a/src/app/pages/account/sys-role/sys-role.component.ts b/src/app/pages/account/sys-role/sys-role.component.ts
index d592149..20cc556 100644
--- a/src/app/pages/account/sys-role/sys-role.component.ts
+++ b/src/app/pages/account/sys-role/sys-role.component.ts
@@ -142,8 +142,8 @@ export class SysRoleComponent {
/**
* 打开编辑角色模态框
- * @param edit
- * @param data
+ * @param edit 编辑状态 ture:新增 false:修改
+ * @param data 数据
*/
showEditRole(edit: boolean, data: any) {
if (edit) {
@@ -197,7 +197,7 @@ export class SysRoleComponent {
showDelData(dataId: number) {
this.modal.confirm({
nzTitle: '提示',
- nzContent: '确实删除数据?',
+ nzContent: '确定删除数据?',
nzOnOk: () => this.delData(dataId)
});
}
diff --git a/src/app/pipes/account/sys-account-status.pipe.ts b/src/app/pipes/account/sys-account-status.pipe.ts
new file mode 100644
index 0000000..7f7a6ab
--- /dev/null
+++ b/src/app/pipes/account/sys-account-status.pipe.ts
@@ -0,0 +1,20 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'sysAccountStatus',
+ standalone: true
+})
+export class SysAccountStatusPipe implements PipeTransform {
+
+ transform(value: number): string {
+ switch (value) {
+ case 1:
+ return '正常';
+ case 2:
+ return '禁用';
+ default:
+ return '未知';
+ }
+ }
+
+}
diff --git a/src/app/servies/account/sys-account.service.ts b/src/app/servies/account/sys-account.service.ts
new file mode 100644
index 0000000..309795b
--- /dev/null
+++ b/src/app/servies/account/sys-account.service.ts
@@ -0,0 +1,104 @@
+import { Injectable } from '@angular/core';
+import {HttpClient} from "@angular/common/http";
+import {environment} from "../../../environments/environment";
+import {ObjectData} from "../../utils/objectData.service";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class SysAccountService {
+
+ constructor(private http: HttpClient) { }
+
+ /**
+ *
+ * 编辑账户
+ * @param params
+ * @param callBack
+ */
+ public editUser(params: object, callBack:any) {
+ this.http.post(environment.baseUrl + 'secUser/editUser', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 删除账户
+ * @param params
+ * @param callBack
+ */
+ public delete(params: object, callBack:any) {
+ this.http.post(environment.baseUrl + 'secUser/delete', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 恢复账户
+ * @param params
+ * @param callBack
+ */
+ public restore(params: object, callBack:any) {
+ this.http.post(environment.baseUrl + 'secUser/restore', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 禁用账户
+ * @param params
+ * @param callBack
+ */
+ public disable(params: object, callBack:any) {
+ this.http.post(environment.baseUrl + 'secUser/disable', params).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 密码重置
+ * @param userId
+ * @param callBack
+ */
+ public resetPwd(param: object, callBack:any) {
+ this.http.post(environment.baseUrl + 'secUser/resetPwd', param).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 查询详情
+ * @param userId
+ * @param callBack
+ */
+ public queryDetail(userId: number, callBack:any) {
+ this.http.get(environment.baseUrl + 'secUser/queryDetail?userId='+userId).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 查询列表
+ * @param params
+ * @param callBack
+ */
+ public queryList(params: object, callBack:any) {
+ this.http.get(environment.baseUrl + 'secUser/queryList?'+ObjectData.objectByString(params)).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+ /**
+ * 查询账户登录列表
+ * @param params
+ * @param callBack
+ */
+ public queryLoginLogList(params: object, callBack:any) {
+ this.http.get(environment.baseUrl + 'secUser/queryLoginLogList?'+ObjectData.objectByString(params)).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+
+
+}
diff --git a/src/app/servies/role/role.service.ts b/src/app/servies/role/role.service.ts
index 17f6831..b99f823 100644
--- a/src/app/servies/role/role.service.ts
+++ b/src/app/servies/role/role.service.ts
@@ -54,4 +54,14 @@ export class RoleService {
});
}
+ /**
+ * 查询全部角色
+ * @param callBack
+ */
+ public queryAllRole(callBack:any) {
+ this.http.get(environment.baseUrl + 'secRole/queryAllRole').subscribe(data => {
+ callBack(data);
+ });
+ }
+
}