Showing
1 changed file
with
11 additions
and
0 deletions
| ... | @@ -840,6 +840,7 @@ export default { | ... | @@ -840,6 +840,7 @@ export default { |
| 840 | form_id: '', | 840 | form_id: '', |
| 841 | type: '', | 841 | type: '', |
| 842 | _path: '', // 预览流程表单时的参数 | 842 | _path: '', // 预览流程表单时的参数 |
| 843 | + todo_node_codes: '', // 预览流程表单时的参数 | ||
| 843 | }; | 844 | }; |
| 844 | // 将url以问号为分隔符拆分为两部分 | 845 | // 将url以问号为分隔符拆分为两部分 |
| 845 | const parts = url.split("?"); | 846 | const parts = url.split("?"); |
| ... | @@ -955,6 +956,7 @@ export default { | ... | @@ -955,6 +956,7 @@ export default { |
| 955 | flowData.value = null; | 956 | flowData.value = null; |
| 956 | const urlQuery = getQueryParams(location.href); | 957 | const urlQuery = getQueryParams(location.href); |
| 957 | let flow_id = urlQuery.flow_id? urlQuery.flow_id : ''; // 表单id | 958 | let flow_id = urlQuery.flow_id? urlQuery.flow_id : ''; // 表单id |
| 959 | + let todo_node_codes = urlQuery.todo_node_codes ? urlQuery.todo_node_codes.split(',') : []; // | ||
| 958 | const { code, data } = await flowNodesAPI({ flow_id }); | 960 | const { code, data } = await flowNodesAPI({ flow_id }); |
| 959 | if (code) { | 961 | if (code) { |
| 960 | state.reloadLoading = false; | 962 | state.reloadLoading = false; |
| ... | @@ -969,6 +971,15 @@ export default { | ... | @@ -969,6 +971,15 @@ export default { |
| 969 | } else { | 971 | } else { |
| 970 | flowData.value = { nodes, edges }; // 获取已存在的数据 | 972 | flowData.value = { nodes, edges }; // 获取已存在的数据 |
| 971 | 973 | ||
| 974 | + // 通过todo_node_codes 新增待办显示 | ||
| 975 | + nodes.forEach((node: any) => { | ||
| 976 | + todo_node_codes.forEach((todo_node_code: any) => { | ||
| 977 | + if (node.id === todo_node_code) { | ||
| 978 | + node.text = node.text + ' (待办)'; | ||
| 979 | + } | ||
| 980 | + }) | ||
| 981 | + }); | ||
| 982 | + | ||
| 972 | // 内部刷新graph数据 | 983 | // 内部刷新graph数据 |
| 973 | nextTick(() => { | 984 | nextTick(() => { |
| 974 | editor.editorState.graph.read(flowData.value) | 985 | editor.editorState.graph.read(flowData.value) | ... | ... |
-
Please register or login to post a comment