修改任务编排界面的Json数据导出的格式

This commit is contained in:
18086616529
2026-06-18 15:17:32 +08:00
parent 0135fbc474
commit 2703392652
4 changed files with 7 additions and 7 deletions
@@ -364,7 +364,8 @@ async function onImportJson() {
}
const warnCount = prepared.reduce(
(sum, w) => sum + validateWorkflow(w).filter((i) => i.level === 'warning').length,
(sum, w) =>
sum + validateWorkflow(w).filter((i) => i.level === 'warning').length,
0
)
if (warnCount > 0) {
@@ -140,7 +140,7 @@ export const DEMO_WORKFLOW: WorkflowDefinition = {
label: '取货',
position: { x: 680, y: 180 },
params: {
actionType: 'pick',
actionType: 'fetch',
actionParameters: '[{"key":"loadType","value":"pallet"}]'
}
},
@@ -2,9 +2,8 @@ import type { ParamFieldDef } from '@/types/workflow'
/** 动作类型选项 */
export const ACTION_TYPE_OPTIONS = [
{ label: '取货', value: 'pick' },
{ label: '放货', value: 'drop' },
{ label: '充电', value: 'startCharging' }
{ label: '取货', value: 'fetch' },
{ label: '放货', value: 'put' }
] as const
/** 执行动作:对齐 VDA5050 Order.actions[] 单条 Action 结构(不含 actionId,下发时由运行时生成) */
@@ -15,7 +14,7 @@ export function executeActionParams(): ParamFieldDef[] {
label: '动作类型',
type: 'select',
required: true,
defaultValue: 'pick',
defaultValue: 'fetch',
options: [...ACTION_TYPE_OPTIONS]
},
{
@@ -1,7 +1,7 @@
import { toRaw } from 'vue'
import type { ParamFieldDef, WorkflowDefinition, WorkflowEdgeDef, WorkflowNodeDef } from '@/types/workflow'
import type { WorkflowCatalogExport } from '@/workflow/workflowLibrary'
import { NODE_CATALOG_MAP, defaultParamsForType } from '@/workflow/nodeCatalog'
import { defaultParamsForType, NODE_CATALOG_MAP } from '@/workflow/nodeCatalog'
import { WAIT_EVENT_HANDLES, WAIT_EVENT_HANDLE_LABELS } from '@/workflow/waitEventParams'
/** 深拷贝流程定义(workflow 为纯 JSON 结构,避免 structuredClone 对 Proxy/不可克隆对象报错) */