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 @@
-
-
+
+
{{ itemData.title }}
-
+
@@ -91,7 +88,7 @@
});
const disabledReload = computed(() => {
- return props.itemData.fullPath !== route.fullPath;
+ return props.itemData.path !== route.path;
});
const disabledCurrent = computed(() => {
@@ -106,22 +103,22 @@
return props.index === tagList.value.length - 1;
});
- /**
- * 关闭 tag
- */
+ // 关闭 tag
const tagClose = (tag: TagProps, idx: number) => {
tabBarStore.deleteTab(idx, tag);
- if (props.itemData.fullPath === route.fullPath) {
+ if (props.itemData.path === route.path) {
// 获取队列的前一个 tab
const latest = tagList.value[idx - 1];
router.push({ name: latest.name });
}
};
+ // 获取当前路由索引
const findCurrentRouteIndex = () => {
- return tagList.value.findIndex((el) => el.fullPath === route.fullPath);
+ return tagList.value.findIndex((el) => el.path === route.path);
};
+ // 选择操作
const actionSelect = async (value: any) => {
const { itemData, index } = props;
const copyTagList = [...tagList.value];
diff --git a/orion-ops-ui/src/layout/page-layout.vue b/orion-ops-ui/src/layout/page-layout.vue
index 8f30a4d4..7e4cafca 100644
--- a/orion-ops-ui/src/layout/page-layout.vue
+++ b/orion-ops-ui/src/layout/page-layout.vue
@@ -2,11 +2,9 @@
-
+
diff --git a/orion-ops-ui/src/router/constants.ts b/orion-ops-ui/src/router/constants.ts
index ac9d6ab9..afd20eb2 100644
--- a/orion-ops-ui/src/router/constants.ts
+++ b/orion-ops-ui/src/router/constants.ts
@@ -35,6 +35,7 @@ export const STATUS_ROUTER_LIST = [
export const DEFAULT_TAB = {
title: '工作台',
name: DEFAULT_ROUTE_NAME,
+ path: DEFAULT_ROUTE_FULL_PATH,
fullPath: DEFAULT_ROUTE_FULL_PATH,
};
@@ -42,10 +43,11 @@ export const DEFAULT_TAB = {
* router 转 tag
*/
export const routerToTag = (route: RouteLocationNormalized): TagProps => {
- const { name, meta, fullPath, query } = route;
+ const { name, meta, path, fullPath, query } = route;
return {
title: meta.locale || '',
name: String(name),
+ path,
fullPath,
query,
ignoreCache: meta.ignoreCache,
diff --git a/orion-ops-ui/src/store/modules/tab-bar/types.ts b/orion-ops-ui/src/store/modules/tab-bar/types.ts
index 29c1c530..5716157d 100644
--- a/orion-ops-ui/src/store/modules/tab-bar/types.ts
+++ b/orion-ops-ui/src/store/modules/tab-bar/types.ts
@@ -1,6 +1,7 @@
export interface TagProps {
title: string;
name: string;
+ path: string;
fullPath: string;
query?: any;
ignoreCache?: boolean;
diff --git a/orion-ops-ui/src/types/const.ts b/orion-ops-ui/src/types/const.ts
index 70c1b84b..516f7dbb 100644
--- a/orion-ops-ui/src/types/const.ts
+++ b/orion-ops-ui/src/types/const.ts
@@ -6,3 +6,9 @@ export const TablePageSizeOptions = [10, 20, 30, 50, 100];
// 卡片视图分页数配置
export const CardPageSizeOptions = [12, 18, 36, 48, 96];
+
+// 通用启用状态
+export const EnabledStatus = {
+ DISABLED: 0,
+ ENABLED: 1
+};
diff --git a/orion-ops-ui/src/views/asset/grant/components/host-group-role-grant.vue b/orion-ops-ui/src/views/asset/grant/components/host-group-role-grant.vue
index 16bc9d59..78269ca1 100644
--- a/orion-ops-ui/src/views/asset/grant/components/host-group-role-grant.vue
+++ b/orion-ops-ui/src/views/asset/grant/components/host-group-role-grant.vue
@@ -1,14 +1,16 @@
-
+