增加工具栏提示。
This commit is contained in:
parent
bfb7e34839
commit
c93847b482
@ -1,6 +1,6 @@
|
||||
import Ajv from 'ajv';
|
||||
import addFormats from 'ajv-formats';
|
||||
import { NodeType } from '../../../../types';
|
||||
import {NodeTypeEnum} from "@/pages/Workflow/Definition/Designer/components/NodePanel/types";
|
||||
|
||||
const ajv = new Ajv({
|
||||
allErrors: true,
|
||||
@ -17,7 +17,7 @@ export interface ValidationResult {
|
||||
}
|
||||
|
||||
export const validateNodeConfig = (
|
||||
nodeType: NodeType,
|
||||
nodeType: NodeTypeEnum,
|
||||
formData: any
|
||||
): ValidationResult => {
|
||||
console.log('Validating node config:', { nodeType, formData });
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { BaseResponse } from '@/types/base/response';
|
||||
import { NodeGraph } from '../../../types';
|
||||
|
||||
/**
|
||||
* 节点样式
|
||||
@ -37,47 +36,13 @@ export enum NodeTypeEnum {
|
||||
CALL_ACTIVITY = 'CALL_ACTIVITY' // 调用活动
|
||||
}
|
||||
|
||||
/**
|
||||
* 节点详情
|
||||
*/
|
||||
export interface NodeDetails {
|
||||
description: string; // 详细描述
|
||||
features: string[]; // 功能特性
|
||||
scenarios: string[]; // 使用场景
|
||||
}
|
||||
|
||||
/**
|
||||
* JSON Schema属性
|
||||
*/
|
||||
export interface JsonSchemaProperty {
|
||||
type: string;
|
||||
title: string;
|
||||
description: string;
|
||||
format?: string;
|
||||
default?: any;
|
||||
enum?: string[];
|
||||
enumNames?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 节点配置Schema
|
||||
*/
|
||||
export interface NodeConfigSchema {
|
||||
type: string;
|
||||
properties: Record<string, JsonSchemaProperty>;
|
||||
required: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 节点图形配置
|
||||
*/
|
||||
export interface NodeGraphConfig {
|
||||
code: string; // 节点代码
|
||||
name: string; // 节点名称
|
||||
description: string; // 节点描述
|
||||
details: NodeDetails; // 节点详情
|
||||
configSchema: NodeConfigSchema; // 配置模式
|
||||
uiSchema: NodeGraph; // UI渲染模式
|
||||
style: NodeStyle; // 节点样式
|
||||
ports?: any[]; // 连接点配置
|
||||
shape?: string; // 节点形状
|
||||
}
|
||||
|
||||
/**
|
||||
@ -88,9 +53,8 @@ export interface NodeType extends BaseResponse {
|
||||
name: string; // 节点名称
|
||||
description: string; // 节点描述
|
||||
category: NodeCategory; // 节点分类
|
||||
flowableConfig: any; // 工作流引擎配置
|
||||
graphConfig: NodeGraphConfig; // 图形配置
|
||||
style: NodeStyle; // 节点样式
|
||||
style?: NodeStyle; // 兼容旧版本的样式配置
|
||||
orderNum: number; // 排序号
|
||||
enabled: boolean; // 是否启用
|
||||
deleted: boolean; // 是否删除
|
||||
|
||||
@ -8,13 +8,8 @@ import { Snapline } from '@antv/x6-plugin-snapline';
|
||||
import { MiniMap } from '@antv/x6-plugin-minimap';
|
||||
import {
|
||||
NodeData,
|
||||
EdgeData,
|
||||
WorkflowDefinition,
|
||||
GraphData,
|
||||
EdgeStyle,
|
||||
NodeType
|
||||
} from '../types';
|
||||
import { generateNodeStyle, generatePorts } from './nodeUtils';
|
||||
import {WorkflowDefinition} from "@/pages/Workflow/Definition/types";
|
||||
|
||||
// Initialize graph with enhanced configuration
|
||||
export const initGraph = ({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user