表单CRUD

This commit is contained in:
dengqichen 2025-10-27 17:05:37 +08:00
parent c8648419e7
commit 1d576f5f1b
3 changed files with 30 additions and 1787 deletions

View File

@ -53,7 +53,6 @@
"dagre": "^0.8.5", "dagre": "^0.8.5",
"dayjs": "^1.11.13", "dayjs": "^1.11.13",
"form-render": "^2.5.6", "form-render": "^2.5.6",
"generator-form": "^0.2.0",
"less": "^4.2.1", "less": "^4.2.1",
"monaco-editor": "^0.52.2", "monaco-editor": "^0.52.2",
"react": "^18.2.0", "react": "^18.2.0",

File diff suppressed because it is too large Load Diff

View File

@ -99,9 +99,21 @@ const WorkflowDefinitionList: React.FC = () => {
}; };
// 新建 // 新建
const handleCreate = () => { const handleCreate = async () => {
setEditRecord(undefined); try {
setEditModalVisible(true); // 先预加载分类列表,确保接口可用
await getWorkflowCategoryList();
// 接口成功,打开弹窗
setEditRecord(undefined);
setEditModalVisible(true);
} catch (error) {
// 接口失败,不打开弹窗,直接报错
toast({
title: '服务异常',
description: '暂时无法申请',
variant: 'destructive',
});
}
}; };
// 编辑 // 编辑