@@ -153,7 +153,9 @@ const props = defineProps({
153153const emit = defineEmits ([' clickNodes' , ' onmousedown' ])
154154
155155const apiType = computed (() => {
156- if (route .path .includes (' resource-management' )) {
156+ if (route .path .includes (' shared' )) {
157+ return ' systemShare'
158+ } else if (route .path .includes (' resource-management' )) {
157159 return ' systemManage'
158160 } else {
159161 return ' workspace'
@@ -247,7 +249,7 @@ const toolTreeData = ref<any[]>([])
247249const toolList = ref <any []>([])
248250
249251async function getToolFolder() {
250- const res: any = await folder .asyncGetFolder (SourceTypeEnum .TOOL , {}, apiType .value , loading )
252+ const res: any = await folder .asyncGetFolder (SourceTypeEnum .TOOL , {id: props . id }, apiType .value , loading )
251253 toolTreeData .value = res .data
252254 folder .setCurrentFolder (res .data ?.[0 ] || {})
253255}
@@ -256,7 +258,7 @@ async function getToolList() {
256258 const res = await loadSharedApi ({
257259 type: ' tool' ,
258260 isShared: folder .currentFolder ?.id === ' share' ,
259- systemType: ' workspace ' ,
261+ systemType: apiType . value ,
260262 }).getToolList ({
261263 folder_id: folder .currentFolder ?.id || user .getWorkspaceId (),
262264 tool_type: ' CUSTOM' ,
@@ -269,7 +271,7 @@ const applicationTreeData = ref<any[]>([])
269271const applicationList = ref <any []>([])
270272
271273function getApplicationFolder() {
272- folder .asyncGetFolder (SourceTypeEnum .APPLICATION , {}, apiType .value , loading ).then ((res : any ) => {
274+ folder .asyncGetFolder (SourceTypeEnum .APPLICATION , {id: props . id }, apiType .value , loading ).then ((res : any ) => {
273275 applicationTreeData .value = res .data
274276 folder .setCurrentFolder (res .data ?.[0 ] || {})
275277 })
@@ -278,7 +280,7 @@ function getApplicationFolder() {
278280async function getApplicationList() {
279281 const res = await loadSharedApi ({
280282 type: ' application' ,
281- systemType: ' workspace ' ,
283+ systemType: apiType . value ,
282284 }).getAllApplication ({
283285 folder_id: folder .currentFolder ?.id || user .getWorkspaceId (),
284286 })
0 commit comments