Showing
1 changed file
with
5 additions
and
1 deletions
| ... | @@ -1925,7 +1925,11 @@ export default { | ... | @@ -1925,7 +1925,11 @@ export default { |
| 1925 | // TAG: 检查节点是否完整 | 1925 | // TAG: 检查节点是否完整 |
| 1926 | const checkResult = await checkAllFlowNodePropertyAPI({ flow_id: +flow_id }) | 1926 | const checkResult = await checkAllFlowNodePropertyAPI({ flow_id: +flow_id }) |
| 1927 | if (checkResult.code) { | 1927 | if (checkResult.code) { |
| 1928 | - let result = checkResult.data; | 1928 | + let { nodes, edges } = editor.editorState.graph.save(); |
| 1929 | + let available_keys = _.map(nodes, 'id'); // 画布上存在的有效节点ID | ||
| 1930 | + let raw_keys = _.intersection(checkResult.data, available_keys); // 取交集有效ID | ||
| 1931 | + let node_keys = Object.keys(state.node_tree); // 现在本地的ID都是有效的值 | ||
| 1932 | + let result = _.difference(raw_keys, node_keys); | ||
| 1929 | if (result.length) { | 1933 | if (result.length) { |
| 1930 | ElMessage({ | 1934 | ElMessage({ |
| 1931 | type: 'error', | 1935 | type: 'error', | ... | ... |
-
Please register or login to post a comment