Skip to content

Commit

Permalink
feat: delete virtual_user type
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 26068
  • Loading branch information
JoJohw committed Dec 6, 2024
1 parent 805e9e5 commit 1abf216
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
13 changes: 12 additions & 1 deletion src/pages/src/views/operations-history/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,18 @@
@page-value-change="pageCurrentChange"
:show-overflow-tooltip="true"
:max-height="505"
@column-sort="handleSortBy"
>
<bk-table-column :label="$t('操作人')" prop="creator" width="100">
<template #default="{ row }">
<span>{{ row.creator || '--' }}</span>
</template>
</bk-table-column>
<bk-table-column :label="$t('操作时间')" sort prop="created_at" width="100">
<bk-table-column
:label="$t('操作时间')"
:sort="sortConfig"
prop="created_at"
width="100">
<template #default="{ row }">
<span>{{ row.created_at || '--' }}</span>
</template>
Expand Down Expand Up @@ -197,6 +202,8 @@ const curSearchParams: SearchParams = {
created_at: '', // 操作时间
};
const sortType = ref('null');
const sortConfig = computed(() => ({ SortScope: 'all', value: sortType.value }));
const pagination = reactive({
current: 1,
count: 0,
Expand Down Expand Up @@ -273,6 +280,10 @@ const pageCurrentChange = (page: number) => {
handleFetchAudit();
};
const handleSortBy = (curSort: any) => {
sortType.value = curSort.type;
};
// 折叠button处理
const handleHoverFoldBtn = () => isHover.value = true;
const handleLeaveFoldBtn = () => isHover.value = false;
Expand Down
14 changes: 5 additions & 9 deletions src/pages/src/views/operations-history/operations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export const operationMap = {
delete_data_source_user: t('删除数据源用户'),
delete_user_leader: t('删除用户-上级关系'),
delete_user_department: t('删除用户-部门关系'),

modify_virtual_user: t('修改虚拟用户'),
},
tenant_user: {
create_tenant_user: t('创建租户用户'),
Expand All @@ -40,6 +42,9 @@ export const operationMap = {

delete_tenant_user: t('删除租户用户'),
delete_collaboration_tenant_user: t('删除协同租户用户'),

create_virtual_user: t('创建虚拟用户'),
delete_virtual_user: t('删除虚拟用户'),
},
data_source_department: {
create_data_source_department: t('创建数据源部门'),
Expand Down Expand Up @@ -71,11 +76,6 @@ export const operationMap = {
delete_tenant: t('删除租户'),
delete_tenant_real_manager: t('删除租户实名管理员'),
},
virtual_user: {
create_virtual_user: t('创建虚拟用户'),
modify_virtual_user: t('修改虚拟用户'),
delete_virtual_user: t('删除虚拟用户'),
},
};

// eslint-disable-next-line @typescript-eslint/naming-convention
Expand Down Expand Up @@ -108,10 +108,6 @@ export const operationType = [
key: 'tenant',
label: t('租户'),
},
{
key: 'virtual_user',
label: t('虚拟用户'),
},
];

// 展开operationMap子项,获取操作类型所有下拉项
Expand Down

0 comments on commit 1abf216

Please sign in to comment.