From 337bc9177616dbc1da9f9507c972ab3930ce0e49 Mon Sep 17 00:00:00 2001 From: JoJohw <3096241994@qq.com> Date: Fri, 29 Nov 2024 17:26:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=93=8D=E4=BD=9C=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=8F=8A=E6=93=8D=E4=BD=9C=E5=AF=B9=E8=B1=A1=E7=9A=84=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E5=85=B3=E7=B3=BB=20#=20Reviewed,=20transaction=20id:?= =?UTF-8?q?=2025395?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/src/http/operationHistoryFiles.ts | 8 +- src/pages/src/http/settingFiles.ts | 3 +- src/pages/src/http/types/operationHistory.ts | 11 ++ src/pages/src/http/types/settingFiles.ts | 10 + src/pages/src/language/en.json | 28 ++- src/pages/src/language/zh.json | 28 ++- .../src/views/operations-history/index.vue | 173 +++++++++++------- .../views/operations-history/operations.ts | 69 +++++++ 8 files changed, 262 insertions(+), 68 deletions(-) create mode 100644 src/pages/src/views/operations-history/operations.ts diff --git a/src/pages/src/http/operationHistoryFiles.ts b/src/pages/src/http/operationHistoryFiles.ts index 3eed62be2..1ea98da22 100644 --- a/src/pages/src/http/operationHistoryFiles.ts +++ b/src/pages/src/http/operationHistoryFiles.ts @@ -1,9 +1,11 @@ import http from './fetch'; -import { AuditListParams } from './types/operationHistory'; +import { AuditListData, AuditListParams } from './types/operationHistory'; +interface ResponseData { + data: T +} export const getAudit = (params: AuditListParams) => { // eslint-disable-next-line @typescript-eslint/naming-convention const { page, pageSize, operation, object_type, object_name, creator, created_at } = params; - console.log(params); - return http.get(`/api/v3/web/audit/?page_size=${pageSize}&page=${page}&operation=${operation}&object_type=${object_type}&object_name=${object_name}&creator=${creator}&created_at=${created_at}`); + return http.get>(`/api/v3/web/audit/?page_size=${pageSize}&page=${page}&operation=${operation}&object_type=${object_type}&object_name=${object_name}&creator=${creator}&created_at=${created_at}`); }; diff --git a/src/pages/src/http/settingFiles.ts b/src/pages/src/http/settingFiles.ts index 9d56af12d..a33345a70 100644 --- a/src/pages/src/http/settingFiles.ts +++ b/src/pages/src/http/settingFiles.ts @@ -10,6 +10,7 @@ import type { PutRealManagersParams, PutTenantInfoParams, PutUserValidityParams, + RealUsersData, RealUsersParams, TenantItem, TenantSettingFieldsData, @@ -72,7 +73,7 @@ export const getRealManagers = () => http.get('/api/v3/web/tenant-info/real-mana /** * 管理员配置-租户实名用户列表 */ -export const getRealUsers = (params: RealUsersParams) => http.get('/api/v3/web/tenant-info/real-users/', params); +export const getRealUsers = (params: RealUsersParams) => http.get>('/api/v3/web/tenant-info/real-users/', params); /** * 管理员配置-批量添加租户实名管理员 diff --git a/src/pages/src/http/types/operationHistory.ts b/src/pages/src/http/types/operationHistory.ts index edaf41934..667d2e3bf 100644 --- a/src/pages/src/http/types/operationHistory.ts +++ b/src/pages/src/http/types/operationHistory.ts @@ -7,3 +7,14 @@ export interface AuditListParams { creator: string, created_at: string } + +export interface AuditListData { + count: number, + results: { + operation: string, + object_type: string, + object_name: string, + creator: string, + created_at: string, + }[], +} diff --git a/src/pages/src/http/types/settingFiles.ts b/src/pages/src/http/types/settingFiles.ts index c7e1a6334..a00b88982 100644 --- a/src/pages/src/http/types/settingFiles.ts +++ b/src/pages/src/http/types/settingFiles.ts @@ -135,3 +135,13 @@ export interface TenantSettingFieldsData { }[], custom_fields: any[], } + + +export interface RealUsersData { + count: number, + results: { + id: string, + username: string, + full_name: string, + }[], +} diff --git a/src/pages/src/language/en.json b/src/pages/src/language/en.json index 47c084857..faa982c4d 100644 --- a/src/pages/src/language/en.json +++ b/src/pages/src/language/en.json @@ -615,5 +615,31 @@ "修改数据源": "modify data sources", "删除数据源": "remove data sources", "同步数据源": "Synchronize data sources", - "数据源": "data source" + "数据源": "data source", + "认证源": "Authentication Source", + "数据源用户": "Data Source User", + "租户用户": "Tenant User", + "创建认证源": "Create Authentication Source", + "修改认证源": "Modify Authentication Source", + "修改认证源状态": "Modify Authentication Source Status", + "删除认证源": "Delete Authentication Source", + "创建数据源用户": "Create Data Source User", + "创建用户-上级关系": "Create User-Superior Relationship", + "创建用户-部门关系": "Create User-Department Relationship", + "修改数据源用户": "Modify Data Source User", + "修改用户-上级关系": "Modify User-Superior Relationship", + "修改用户-部门关系": "Modify User-Department Relationship", + "修改用户密码": "Modify User Password", + "删除数据源用户": "Delete Data Source User", + "删除用户-上级关系": "Delete User-Superior Relationship", + "删除用户-部门关系": "Delete User-Department Relationship", + "创建租户用户": "Create Tenant User", + "创建协同租户用户": "Create Collaborative Tenant User", + "修改租户用户": "Modify Tenant User", + "修改用户状态": "Modify User Status", + "修改用户账号过期时间": "Modify User Account Expiration Time", + "修改用户邮箱": "Modify User Email", + "修改用户电话号码": "Modify User Phone Number", + "删除租户用户": "Delete Tenant User", + "删除协同租户用户": "Delete Collaborative Tenant User" } diff --git a/src/pages/src/language/zh.json b/src/pages/src/language/zh.json index 9ba83b408..41f7c8d4e 100644 --- a/src/pages/src/language/zh.json +++ b/src/pages/src/language/zh.json @@ -615,5 +615,31 @@ "修改数据源": "修改数据源", "删除数据源": "删除数据源", "同步数据源": "同步数据源", - "数据源": "数据源" + "数据源": "数据源", + "认证源": "认证源", + "数据源用户": "数据源用户", + "租户用户": "租户用户", + "创建认证源": "创建认证源", + "修改认证源": "修改认证源", + "修改认证源状态": "修改认证源状态", + "删除认证源": "删除认证源", + "创建数据源用户": "创建数据源用户", + "创建用户-上级关系": "创建用户-上级关系", + "创建用户-部门关系": "创建用户-部门关系", + "修改数据源用户": "修改数据源用户", + "修改用户-上级关系": "修改用户-上级关系", + "修改用户-部门关系": "修改用户-部门关系", + "修改用户密码": "修改用户密码", + "删除数据源用户": "删除数据源用户", + "删除用户-上级关系": "删除用户-上级关系", + "删除用户-部门关系": "删除用户-部门关系", + "创建租户用户": "创建租户用户", + "创建协同租户用户": "创建协同租户用户", + "修改租户用户": "修改租户用户", + "修改用户状态": "修改用户状态", + "修改用户账号过期时间": "修改用户账号过期时间", + "修改用户邮箱": "修改用户邮箱", + "修改用户电话号码": "修改用户电话号码", + "删除租户用户": "删除租户用户", + "删除协同租户用户": "删除协同租户用户" } diff --git a/src/pages/src/views/operations-history/index.vue b/src/pages/src/views/operations-history/index.vue index 100fcc841..83fc170d6 100644 --- a/src/pages/src/views/operations-history/index.vue +++ b/src/pages/src/views/operations-history/index.vue @@ -26,21 +26,21 @@ /> - + + v-for="item in curOperationOptions" + :key="item.key" + :id="item.key" + :name="item.label" /> - + + v-for="item in curOperationType" + :key="item.key" + :id="item.key" + :name="item.label" /> @@ -111,7 +111,7 @@ @@ -128,12 +128,26 @@