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
2024-07-10 18:26:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b7352ba775ac71ca8c7d6cce38b0980bdfca94f8
b7352ba7
1 parent
7d83ad9c
fix 通过todo_node_codes 新增待办显示
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
doc/index.vue
doc/index.vue
View file @
b7352ba
...
...
@@ -840,6 +840,7 @@ export default {
form_id: '',
type: '',
_path: '', // 预览流程表单时的参数
todo_node_codes: '', // 预览流程表单时的参数
};
// 将url以问号为分隔符拆分为两部分
const parts = url.split("?");
...
...
@@ -955,6 +956,7 @@ export default {
flowData.value = null;
const urlQuery = getQueryParams(location.href);
let flow_id = urlQuery.flow_id? urlQuery.flow_id : ''; // 表单id
let todo_node_codes = urlQuery.todo_node_codes ? urlQuery.todo_node_codes.split(',') : []; //
const { code, data } = await flowNodesAPI({ flow_id });
if (code) {
state.reloadLoading = false;
...
...
@@ -969,6 +971,15 @@ export default {
} else {
flowData.value = { nodes, edges }; // 获取已存在的数据
// 通过todo_node_codes 新增待办显示
nodes.forEach((node: any) => {
todo_node_codes.forEach((todo_node_code: any) => {
if (node.id === todo_node_code) {
node.text = node.text + ' (待办)';
}
})
});
// 内部刷新graph数据
nextTick(() => {
editor.editorState.graph.read(flowData.value)
...
...
Please
register
or
login
to post a comment