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 15:25:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ec3fe9e902b42a94974695de0809c53af57f5d4f
ec3fe9e9
1 parent
b8a9cbd7
显示图标修改
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
doc/App.vue
doc/App.vue
View file @
ec3fe9e
...
...
@@ -522,14 +522,14 @@ export default {
text: '流程节点',
desc: '拖拽新增流程',
color: '#ed8383',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon
s-flow
.png',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon
-flow1
.png',
error: '',
},
cc: {
text: '抄送节点',
desc: '拖拽新增抄送',
color: '#ed8383',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc.png',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc
1
.png',
error: '',
},
},
...
...
@@ -539,20 +539,20 @@ export default {
text: '开始',
desc: '开始',
color: '#9283ed',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-start.png',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-start
1
.png',
},
flow: {
text: '流程节点',
desc: '流程节点',
color: '#ed8383',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon
s-flow
.png',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon
-flow1
.png',
error: '',
},
cc: {
text: '抄送节点',
desc: '抄送节点',
color: '#ed8383',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc.png',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc
1
.png',
error: '',
},
end: {
...
...
@@ -560,7 +560,7 @@ export default {
text: '结束',
desc: '结束',
color: '#92dba8',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-end.png',
img: 'https://cdn.ipadbiz.cn/oa/flow/icon-end
1
.png',
},
},
search_auth_value: '',
...
...
@@ -1542,7 +1542,7 @@ export default {
}
}
const saveFlowData = async () => { // 保存流程图结构信息
const saveFlowData = async (
type=''
) => { // 保存流程图结构信息
let { nodes, edges } = editor.editorState.graph.save();
// 使用时需要把自定义节点的类型带过去 activity/control
...
...
@@ -1585,6 +1585,12 @@ export default {
if (code) {
updateFlowId(data); // 更新缓存flow_id
console.log(paths); // 输出满足条件的路径结果数组
if (type === 'single') {
ElMessage({
type: 'success',
message: '保存流程图成功',
});
}
}
} else {
ElNotification.error('缺少一条从开始节点到结束节点的完整流程!');
...
...
@@ -1727,6 +1733,13 @@ export default {
flowData.value.nodes = editor.editorState.graph.save().nodes
flowData.value.edges = editor.editorState.graph.save().edges
// TAG: 节点删除后,如果有缓存也要删除掉
for (const key in state.node_tree) {
if (key === model.id) {
delete state.node_tree[model.id];
}
}
}
/**
...
...
@@ -1886,7 +1899,7 @@ export default {
}
)
.then(async () => {
saveFlowData();
saveFlowData(
'single'
);
})
.catch(() => {
});
...
...
Please
register
or
login
to post a comment