From e8d99cb26371369bb3583325120121636d4018bd Mon Sep 17 00:00:00 2001 From: lijiahang Date: Fri, 1 Dec 2023 17:29:42 +0800 Subject: [PATCH] review code. --- .../src/api/asset/asset-data-grant.ts | 2 +- .../src/components/app/tab-bar/index.vue | 12 ++-- .../src/components/app/tab-bar/tab-item.vue | 31 +++++----- orion-ops-ui/src/layout/page-layout.vue | 8 +-- orion-ops-ui/src/router/constants.ts | 4 +- .../src/store/modules/tab-bar/types.ts | 1 + orion-ops-ui/src/types/const.ts | 6 ++ .../components/host-group-role-grant.vue | 17 +++++- .../components/host-group-user-grant.vue | 17 +++++- .../asset/grant/components/host-list.vue | 7 --- .../asset/grant/components/router-roles.vue | 59 +++++++++++++------ .../asset/grant/components/router-users.vue | 59 +++++++++++++------ orion-ops-ui/src/views/asset/grant/index.vue | 42 +++++++------ .../src/views/asset/grant/types/const.ts | 13 ++-- .../components/config/host-config-drawer.vue | 6 +- .../components/config/ssh/ssh-config-form.vue | 19 +++--- .../components/config/ssh/types/const.ts | 3 + .../host-list/components/host-card-list.vue | 33 +++++++---- .../asset/host-list/components/host-table.vue | 19 ++++++ .../src/views/asset/host-list/index.vue | 6 +- .../src/views/asset/host-list/types/const.ts | 3 - 21 files changed, 235 insertions(+), 132 deletions(-) diff --git a/orion-ops-ui/src/api/asset/asset-data-grant.ts b/orion-ops-ui/src/api/asset/asset-data-grant.ts index fd520220..dae52df6 100644 --- a/orion-ops-ui/src/api/asset/asset-data-grant.ts +++ b/orion-ops-ui/src/api/asset/asset-data-grant.ts @@ -21,7 +21,7 @@ export interface AssetAuthorizedDataQueryRequest { * 主机分组授权 */ export function grantHostGroup(request: AssetDataGrantRequest) { - return axios.put('/asset/host-group/grant-host-group', request); + return axios.put('/asset/data-grant/grant-host-group', request); } /** diff --git a/orion-ops-ui/src/components/app/tab-bar/index.vue b/orion-ops-ui/src/components/app/tab-bar/index.vue index 3c03a7d7..880d29cb 100644 --- a/orion-ops-ui/src/components/app/tab-bar/index.vue +++ b/orion-ops-ui/src/components/app/tab-bar/index.vue @@ -4,12 +4,10 @@
- +
@@ -48,7 +46,7 @@ listenerRouteChange((route: RouteLocationNormalized) => { if ( !route.meta.noAffix && - !tagList.value.some((tag) => tag.fullPath === route.fullPath) + !tagList.value.some((tag) => tag.path === route.path) ) { // 固定并且没有此 tab 则添加 tabBarStore.addTab(routerToTag(route), route.meta?.ignoreCache as unknown as boolean); diff --git a/orion-ops-ui/src/components/app/tab-bar/tab-item.vue b/orion-ops-ui/src/components/app/tab-bar/tab-item.vue index faf1286d..7f2c06e1 100644 --- a/orion-ops-ui/src/components/app/tab-bar/tab-item.vue +++ b/orion-ops-ui/src/components/app/tab-bar/tab-item.vue @@ -1,18 +1,15 @@