diff --git a/ui/src/views/system-resource-management/ApplicationResourceIndex.vue b/ui/src/views/system-resource-management/ApplicationResourceIndex.vue index f89f2d594..f22c5ec03 100644 --- a/ui/src/views/system-resource-management/ApplicationResourceIndex.vue +++ b/ui/src/views/system-resource-management/ApplicationResourceIndex.vue @@ -162,6 +162,7 @@ import { isAppIcon } from '@/utils/common' import useStore from '@/stores' import WorkspaceApi from '@/api/workspace/workspace.ts' import { datetimeFormat } from '@/utils/time' +import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts"; const { user } = useStore() @@ -192,7 +193,7 @@ function filterWorkspaceChange(val: string) { } async function getWorkspaceList() { if (user.isEE()) { - const res = await WorkspaceApi.getSystemWorkspaceList(loading) + const res = await loadPermissionApi('workspace').getSystemWorkspaceList(loading) workspaceOptions.value = res.data.map((item: any) => ({ label: item.name, value: item.id, diff --git a/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue b/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue index 1f915cda4..f9a0441ed 100644 --- a/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue +++ b/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue @@ -151,6 +151,7 @@ import { isAppIcon } from '@/utils/common' import useStore from '@/stores' import WorkspaceApi from '@/api/workspace/workspace.ts' import { datetimeFormat } from '@/utils/time' +import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts"; const { user } = useStore() @@ -181,7 +182,7 @@ function filterWorkspaceChange(val: string) { } async function getWorkspaceList() { if (user.isEE()) { - const res = await WorkspaceApi.getSystemWorkspaceList(loading) + const res = await loadPermissionApi('workspace').getSystemWorkspaceList(loading) workspaceOptions.value = res.data.map((item: any) => ({ label: item.name, value: item.id, diff --git a/ui/src/views/system-resource-management/ModelResourceIndex.vue b/ui/src/views/system-resource-management/ModelResourceIndex.vue index d229c1c5d..ea828509b 100644 --- a/ui/src/views/system-resource-management/ModelResourceIndex.vue +++ b/ui/src/views/system-resource-management/ModelResourceIndex.vue @@ -175,6 +175,7 @@ import { t } from '@/locales' import useStore from '@/stores' import WorkspaceApi from '@/api/workspace/workspace.ts' import { datetimeFormat } from '@/utils/time' +import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts"; const { user, model } = useStore() @@ -219,7 +220,7 @@ function filterWorkspaceChange(val: string) { } async function getWorkspaceList() { if (user.isEE()) { - const res = await WorkspaceApi.getSystemWorkspaceList(loading) + const res = await loadPermissionApi('workspace').getSystemWorkspaceList(loading) workspaceOptions.value = res.data.map((item: any) => ({ label: item.name, value: item.id, diff --git a/ui/src/views/system-resource-management/ToolResourceIndex.vue b/ui/src/views/system-resource-management/ToolResourceIndex.vue index fd4cb90bc..40766c745 100644 --- a/ui/src/views/system-resource-management/ToolResourceIndex.vue +++ b/ui/src/views/system-resource-management/ToolResourceIndex.vue @@ -171,6 +171,7 @@ import { ToolType } from '@/enums/tool' import useStore from '@/stores' import WorkspaceApi from '@/api/workspace/workspace.ts' import { datetimeFormat } from '@/utils/time' +import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts"; const { user } = useStore() @@ -201,7 +202,7 @@ function filterWorkspaceChange(val: string) { } async function getWorkspaceList() { if (user.isEE()) { - const res = await WorkspaceApi.getSystemWorkspaceList(loading) + const res = await loadPermissionApi('workspace').getSystemWorkspaceList(loading) workspaceOptions.value = res.data.map((item: any) => ({ label: item.name, value: item.id, diff --git a/ui/src/views/system/resource-authorization/index.vue b/ui/src/views/system/resource-authorization/index.vue index 96be14bf2..ef841d96d 100644 --- a/ui/src/views/system/resource-authorization/index.vue +++ b/ui/src/views/system/resource-authorization/index.vue @@ -82,7 +82,7 @@
{{ $t('common.save') }}
@@ -106,6 +106,7 @@ import { hasPermission } from '@/utils/permission/index' import WorkspaceApi from '@/api/workspace/workspace.ts' import type { WorkspaceItem } from '@/api/type/workspace' import { ComplexPermission } from '@/utils/permission/type' +import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts"; const route = useRoute() const { user } = useStore() @@ -390,7 +391,7 @@ const currentWorkspace = computed(() => { return workspaceList.value.find((w) => w.id == currentWorkspaceId.value) }) async function getWorkspaceList() { - const res = await WorkspaceApi.getSystemWorkspaceList(loading) + const res = await loadPermissionApi('workspace').getSystemWorkspaceList(loading) workspaceList.value = res.data currentWorkspaceId.value = 'default' }