Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
vue-flow-editor
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-12-06 14:26:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b8a9cbd7081f8eb41d978070974b7a5dcd05d895
b8a9cbd7
1 parent
2bbb1fd9
新增测试后端返回未通过的节点ID添加错误提示
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
7 deletions
doc/App.vue
doc/App.vue
View file @
b8a9cbd
...
...
@@ -1512,6 +1512,33 @@ export default {
if (code) {
state.node_tree = {}; // 清空节点树缓存
editor.closeModel();
// TODO: 节点错误提示测试
// let node_keys = ['start-node']; // 后端返回的未通过的节点key
// let { nodes } = editor.editorState.graph.save();
// if (node_keys.length) {
// ElMessage({
// type: 'error',
// message: '流程配置不完善,请点击节点红点完善。',
// });
// nodes.forEach((ele: any, idx: number) => {
// node_keys.forEach((key: string) => {
// if (ele.id === key) {
// ele.desc = 'https://cdn.ipadbiz.cn/oa/flow/icons-error1.png';
// editor.updateModel(ele); // 更新流程图信息
// }
// })
// });
// } else {
// ElMessage({
// type: 'success',
// message: '保存流程图成功',
// });
// }
ElMessage({
type: 'success',
message: '保存流程图成功',
});
}
}
...
...
@@ -1556,10 +1583,6 @@ export default {
if (paths.length) {
const { code, data } = await saveFlowAPI({ form_id: +form_id, flow_id: +flow_id, data: JSON.stringify({ nodes, edges }) });
if (code) {
ElMessage({
type: 'success',
message: '保存流程图成功',
});
updateFlowId(data); // 更新缓存flow_id
console.log(paths); // 输出满足条件的路径结果数组
}
...
...
@@ -1616,9 +1639,6 @@ export default {
// });
// let flow_id = getFlowId(); // 流程id
// // TODO: 需要一个可以保存多个表单的接口,field字段的结构要重新遍历state.field_extend
// // TODO:只要失焦的话就需要判断表单是否为空,为空需要用户继续填写不能走。
// console.warn(state.node_tree);
// // TAG: 保存表单信息
// const { code, data } = await saveFlowNodePropertyAPI({ flow_id: +flow_id, node_code: state.detailModel.id, data: JSON.stringify({ name: state.node_name, user: state.userTags, field: state.field_extend, property: state.more_attr }) })
...
...
Please
register
or
login
to post a comment