diff --git a/ui/src/components/resource-authorization-drawer/index.vue b/ui/src/components/resource-authorization-drawer/index.vue index ea6b002ae28..522b361913a 100644 --- a/ui/src/components/resource-authorization-drawer/index.vue +++ b/ui/src/components/resource-authorization-drawer/index.vue @@ -368,6 +368,7 @@ const handleSelectionChange = (val: any[]) => { } const dialogVisible = ref(false) +const rowWorkspaceId = ref(null) const singleSelectDialogVisible = ref(false) const pendingPermissionChange = ref<{ val: any; row: any } | null>(null) const radioPermission = ref('') @@ -431,7 +432,7 @@ function permissionsHandle(val: any, row: any) { } function submitPermissions(obj: any) { - const workspaceId = user.getWorkspaceId() || 'default' + const workspaceId = rowWorkspaceId.value ?? user.getWorkspaceId() ?? 'default' loadSharedApi({ type: 'resourceAuthorization', systemType: apiType.value }) .putResourceAuthorization(workspaceId, targetId.value, props.type, obj, loading) .then(() => { @@ -440,7 +441,7 @@ function submitPermissions(obj: any) { }) } const getPermissionList = () => { - const workspaceId = user.getWorkspaceId() || 'default' + const workspaceId = rowWorkspaceId.value ?? user.getWorkspaceId() ?? 'default' const params: any = {} if (searchForm.value[searchType.value]) { params[searchType.value] = searchForm.value[searchType.value] @@ -466,9 +467,10 @@ const getPermissionList = () => { }) } -const open = (id: string, folder_data?: any) => { +const open = (id: string, folder_data?: any, workspace_id?: string) => { targetId.value = id folderData.value = folder_data + rowWorkspaceId.value = workspace_id ?? null drawerVisible.value = true getPermissionList() } diff --git a/ui/src/views/system-resource-management/ApplicationResourceIndex.vue b/ui/src/views/system-resource-management/ApplicationResourceIndex.vue index b9151940314..d16938e0797 100644 --- a/ui/src/views/system-resource-management/ApplicationResourceIndex.vue +++ b/ui/src/views/system-resource-management/ApplicationResourceIndex.vue @@ -373,7 +373,7 @@ const openTriggerDrawer = (data: any) => { const ResourceAuthorizationDrawerRef = ref() function openAuthorization(item: any) { - ResourceAuthorizationDrawerRef.value.open(item.id) + ResourceAuthorizationDrawerRef.value.open(item.id, undefined, item.workspace_id) } const apiInputParams = ref([]) diff --git a/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue b/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue index c8fcf074a44..6ab1ef61863 100644 --- a/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue +++ b/ui/src/views/system-resource-management/KnowledgeResourceIndex.vue @@ -377,7 +377,7 @@ const paginationConfig = reactive({ const ResourceAuthorizationDrawerRef = ref() function openAuthorization(item: any) { - ResourceAuthorizationDrawerRef.value.open(item.id) + ResourceAuthorizationDrawerRef.value.open(item.id, undefined, item.workspace_id) } const exportKnowledge = (item: any) => { diff --git a/ui/src/views/system-resource-management/ModelResourceIndex.vue b/ui/src/views/system-resource-management/ModelResourceIndex.vue index 9e13efe35b2..30b8f91b54c 100644 --- a/ui/src/views/system-resource-management/ModelResourceIndex.vue +++ b/ui/src/views/system-resource-management/ModelResourceIndex.vue @@ -319,7 +319,7 @@ const MoreFilledPermission = () => { const ResourceAuthorizationDrawerRef = ref() function openAuthorization(item: any) { - ResourceAuthorizationDrawerRef.value.open(item.id) + ResourceAuthorizationDrawerRef.value.open(item.id, undefined, item.workspace_id) } const deleteModel = (row: any) => { diff --git a/ui/src/views/system-resource-management/ToolResourceIndex.vue b/ui/src/views/system-resource-management/ToolResourceIndex.vue index b2682099649..07760d0f1c7 100644 --- a/ui/src/views/system-resource-management/ToolResourceIndex.vue +++ b/ui/src/views/system-resource-management/ToolResourceIndex.vue @@ -558,7 +558,7 @@ const openTriggerDrawer = (data: any) => { const ResourceAuthorizationDrawerRef = ref() function openAuthorization(item: any) { - ResourceAuthorizationDrawerRef.value.open(item.id) + ResourceAuthorizationDrawerRef.value.open(item.id, undefined, item.workspace_id) } function exportTool(row: any) {