Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions ui/src/components/resource-authorization-drawer/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ const handleSelectionChange = (val: any[]) => {
}

const dialogVisible = ref(false)
const rowWorkspaceId = ref<string | null>(null)
const singleSelectDialogVisible = ref(false)
const pendingPermissionChange = ref<{ val: any; row: any } | null>(null)
const radioPermission = ref('')
Expand Down Expand Up @@ -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(() => {
Expand All @@ -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]
Expand All @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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([])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading