diff --git a/ui/src/views/system/shared-resources/tool/index.vue b/ui/src/views/system/shared-resources/tool/index.vue
index f0431904de0..ca845c0e032 100644
--- a/ui/src/views/system/shared-resources/tool/index.vue
+++ b/ui/src/views/system/shared-resources/tool/index.vue
@@ -16,7 +16,6 @@ import ButtonCreateTool from '@/views/tool/components/ButtonCreateTool.vue'
import {
RelatedResourcesToolAction,
DeleteToolAction,
- EditToolAction,
ExportToolAction,
ExecutionRecordToolAction,
InitParamAction,
@@ -24,6 +23,7 @@ import {
CopyToolAction,
} from '@/views/tool/tool-card/action-dropdown'
import ButtonToolStore from '@/views/tool/components/ButtonToolStore.vue'
+import EditToolForm from '@/views/tool/tool-form/EditToolForm.vue'
import perm from '@/permission'
const router = useRouter()
@@ -68,7 +68,12 @@ function handleSearchChange(query?: Dict
) {
/* 共享工具维护 */
const toolOperationLoading = ref(false)
-const editToolActionRefs: Record | null> = {}
+const editToolFormRef = useTemplateRef>('editToolFormRef')
+
+function handleOpenEditTool(tool: ToolItem) {
+ if (!perm.tool.share.edit()) return
+ return editToolFormRef.value?.open(tool)
+}
function handleOpenTool(tool: ToolItem, event: MouseEvent) {
if (tool.tool_type === TOOL_TYPE.WORKFLOW) {
@@ -79,7 +84,7 @@ function handleOpenTool(tool: ToolItem, event: MouseEvent) {
}
return router.push(target)
}
- editToolActionRefs[tool.id]?.handleOpenToolForm()
+ handleOpenEditTool(tool)
}
function handleToolUpdate(tool: ToolItem) {
@@ -141,19 +146,7 @@ function handleOpenWorkflow(tool: ToolItem, event: MouseEvent) {
-
+
+
diff --git a/ui/src/views/tool/components/ButtonCreateTool.vue b/ui/src/views/tool/components/ButtonCreateTool.vue
index 831a9f3cf0f..1aab48845cc 100644
--- a/ui/src/views/tool/components/ButtonCreateTool.vue
+++ b/ui/src/views/tool/components/ButtonCreateTool.vue
@@ -1,9 +1,10 @@
-
-
-
-
-
-
-
-
+
diff --git a/ui/src/views/tool/tool-form/EditToolForm.vue b/ui/src/views/tool/tool-form/EditToolForm.vue
new file mode 100644
index 00000000000..9669f8e139d
--- /dev/null
+++ b/ui/src/views/tool/tool-form/EditToolForm.vue
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/src/views/workflow/application/index.vue b/ui/src/views/workflow/application/index.vue
index c73e5ba2e08..24cd3e6d40d 100644
--- a/ui/src/views/workflow/application/index.vue
+++ b/ui/src/views/workflow/application/index.vue
@@ -408,7 +408,7 @@ onBeforeUnmount(() => stopAutoSave())
-