【修复】工作流申请节点参数

This commit is contained in:
cai
2025-09-18 09:59:33 +08:00
parent e4b456b1ee
commit 39e0bc73e7
51 changed files with 52 additions and 48 deletions

View File

@@ -13,6 +13,7 @@ const {
flowData,
selectedNodeId,
setflowZoom,
setZoomValue,
initFlowData,
updateFlowData,
setShowAddNodeSelect,
@@ -133,6 +134,7 @@ export const useController = (props: FlowNodeProps = { type: 'quick', node: flow
* 返回上一级
*/
const goBack = () => {
setZoomValue(100)
router.back()
}

View File

@@ -488,15 +488,17 @@ export const useFlowStore = defineStore('flow-store', () => {
* @param nodeId 节点ID
* @param config 新的配置数据
*/
const updateNodeConfig = (nodeId: string, config: Record<string, any>) => {
const updateNodeConfig = (nodeId: string, config: Record<string, any>) => {
const node = getFlowFindNodeData(nodeId);
if (!node) {
console.warn(`Node with id ${nodeId} not found`);
return;
}
const { eabId, ...params } = config;
// 更新原始数据
updateNodeRecursive(flowData.value.childNode, nodeId, (node) => {
node.config = config;
node.config = params;
});
return flowData.value;
};