Skip to content

Commit

Permalink
feat: 操作类型及操作对象的对应关系 (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoJohw authored Dec 4, 2024
1 parent 363d5ea commit 0d260e9
Show file tree
Hide file tree
Showing 9 changed files with 267 additions and 76 deletions.
2 changes: 0 additions & 2 deletions src/pages/src/components/MemberSelector.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div class="member-selector-wrapper" :class="{ 'is-focus': isFocus }">
<bk-select
v-model="modelValue"
class="member-selector"
:clearable="clearable"
:collapse-tags="false"
Expand Down Expand Up @@ -55,7 +54,6 @@ const props = defineProps({
default: true,
},
});
const modelValue = defineModel<string[]>('modelValue');
const emit = defineEmits(['changeSelectList', 'scrollChange', 'searchUserList']);
const isFocus = ref(false);
const scrollLoading = ref(false);
Expand Down
8 changes: 5 additions & 3 deletions src/pages/src/http/operationHistoryFiles.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import http from './fetch';
import { AuditListParams } from './types/operationHistory';
import { AuditListData, AuditListParams } from './types/operationHistory';
interface ResponseData<T> {
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<ResponseData<AuditListData>>(`/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}`);
};
3 changes: 2 additions & 1 deletion src/pages/src/http/settingFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
PutRealManagersParams,
PutTenantInfoParams,
PutUserValidityParams,
RealUsersData,
RealUsersParams,
TenantItem,
TenantSettingFieldsData,
Expand Down Expand Up @@ -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<ResponseData<RealUsersData>>('/api/v3/web/tenant-info/real-users/', params);

/**
* 管理员配置-批量添加租户实名管理员
Expand Down
11 changes: 11 additions & 0 deletions src/pages/src/http/types/operationHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}[],
}
10 changes: 10 additions & 0 deletions src/pages/src/http/types/settingFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,13 @@ export interface TenantSettingFieldsData {
}[],
custom_fields: any[],
}


export interface RealUsersData {
count: number,
results: {
id: string,
username: string,
full_name: string,
}[],
}
36 changes: 31 additions & 5 deletions src/pages/src/language/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,35 @@
"确认批量停用所选用户 ?": "Are you sure to batch deactivate selected users?",
"从当前组织移出": "Move out of the current organization",
"并追加到以下组织": "And added to the following organizations",
"创建数据源": "create data source",
"修改数据源": "modify data sources",
"删除数据源": "remove data sources",
"同步数据源": "Synchronize data sources",
"数据源": "data source"
"创建数据源": "Create data source",
"修改数据源": "Modify Data Sources",
"删除数据源": "Delete Data Sources",
"同步数据源": "Synchronize Data Sources",
"数据源": "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"
}
28 changes: 27 additions & 1 deletion src/pages/src/language/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -615,5 +615,31 @@
"修改数据源": "修改数据源",
"删除数据源": "删除数据源",
"同步数据源": "同步数据源",
"数据源": "数据源"
"数据源": "数据源",
"认证源": "认证源",
"数据源用户": "数据源用户",
"租户用户": "租户用户",
"创建认证源": "创建认证源",
"修改认证源": "修改认证源",
"修改认证源状态": "修改认证源状态",
"删除认证源": "删除认证源",
"创建数据源用户": "创建数据源用户",
"创建用户-上级关系": "创建用户-上级关系",
"创建用户-部门关系": "创建用户-部门关系",
"修改数据源用户": "修改数据源用户",
"修改用户-上级关系": "修改用户-上级关系",
"修改用户-部门关系": "修改用户-部门关系",
"修改用户密码": "修改用户密码",
"删除数据源用户": "删除数据源用户",
"删除用户-上级关系": "删除用户-上级关系",
"删除用户-部门关系": "删除用户-部门关系",
"创建租户用户": "创建租户用户",
"创建协同租户用户": "创建协同租户用户",
"修改租户用户": "修改租户用户",
"修改用户状态": "修改用户状态",
"修改用户账号过期时间": "修改用户账号过期时间",
"修改用户邮箱": "修改用户邮箱",
"修改用户电话号码": "修改用户电话号码",
"删除租户用户": "删除租户用户",
"删除协同租户用户": "删除协同租户用户"
}
Loading

0 comments on commit 0d260e9

Please sign in to comment.