hookehuyr

显示图标修改

...@@ -522,14 +522,14 @@ export default { ...@@ -522,14 +522,14 @@ export default {
522 text: '流程节点', 522 text: '流程节点',
523 desc: '拖拽新增流程', 523 desc: '拖拽新增流程',
524 color: '#ed8383', 524 color: '#ed8383',
525 - img: 'https://cdn.ipadbiz.cn/oa/flow/icons-flow.png', 525 + img: 'https://cdn.ipadbiz.cn/oa/flow/icon-flow1.png',
526 error: '', 526 error: '',
527 }, 527 },
528 cc: { 528 cc: {
529 text: '抄送节点', 529 text: '抄送节点',
530 desc: '拖拽新增抄送', 530 desc: '拖拽新增抄送',
531 color: '#ed8383', 531 color: '#ed8383',
532 - img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc.png', 532 + img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc1.png',
533 error: '', 533 error: '',
534 }, 534 },
535 }, 535 },
...@@ -539,20 +539,20 @@ export default { ...@@ -539,20 +539,20 @@ export default {
539 text: '开始', 539 text: '开始',
540 desc: '开始', 540 desc: '开始',
541 color: '#9283ed', 541 color: '#9283ed',
542 - img: 'https://cdn.ipadbiz.cn/oa/flow/icon-start.png', 542 + img: 'https://cdn.ipadbiz.cn/oa/flow/icon-start1.png',
543 }, 543 },
544 flow: { 544 flow: {
545 text: '流程节点', 545 text: '流程节点',
546 desc: '流程节点', 546 desc: '流程节点',
547 color: '#ed8383', 547 color: '#ed8383',
548 - img: 'https://cdn.ipadbiz.cn/oa/flow/icons-flow.png', 548 + img: 'https://cdn.ipadbiz.cn/oa/flow/icon-flow1.png',
549 error: '', 549 error: '',
550 }, 550 },
551 cc: { 551 cc: {
552 text: '抄送节点', 552 text: '抄送节点',
553 desc: '抄送节点', 553 desc: '抄送节点',
554 color: '#ed8383', 554 color: '#ed8383',
555 - img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc.png', 555 + img: 'https://cdn.ipadbiz.cn/oa/flow/icon-cc1.png',
556 error: '', 556 error: '',
557 }, 557 },
558 end: { 558 end: {
...@@ -560,7 +560,7 @@ export default { ...@@ -560,7 +560,7 @@ export default {
560 text: '结束', 560 text: '结束',
561 desc: '结束', 561 desc: '结束',
562 color: '#92dba8', 562 color: '#92dba8',
563 - img: 'https://cdn.ipadbiz.cn/oa/flow/icon-end.png', 563 + img: 'https://cdn.ipadbiz.cn/oa/flow/icon-end1.png',
564 }, 564 },
565 }, 565 },
566 search_auth_value: '', 566 search_auth_value: '',
...@@ -1542,7 +1542,7 @@ export default { ...@@ -1542,7 +1542,7 @@ export default {
1542 } 1542 }
1543 } 1543 }
1544 1544
1545 - const saveFlowData = async () => { // 保存流程图结构信息 1545 + const saveFlowData = async (type='') => { // 保存流程图结构信息
1546 let { nodes, edges } = editor.editorState.graph.save(); 1546 let { nodes, edges } = editor.editorState.graph.save();
1547 1547
1548 // 使用时需要把自定义节点的类型带过去 activity/control 1548 // 使用时需要把自定义节点的类型带过去 activity/control
...@@ -1585,6 +1585,12 @@ export default { ...@@ -1585,6 +1585,12 @@ export default {
1585 if (code) { 1585 if (code) {
1586 updateFlowId(data); // 更新缓存flow_id 1586 updateFlowId(data); // 更新缓存flow_id
1587 console.log(paths); // 输出满足条件的路径结果数组 1587 console.log(paths); // 输出满足条件的路径结果数组
1588 + if (type === 'single') {
1589 + ElMessage({
1590 + type: 'success',
1591 + message: '保存流程图成功',
1592 + });
1593 + }
1588 } 1594 }
1589 } else { 1595 } else {
1590 ElNotification.error('缺少一条从开始节点到结束节点的完整流程!'); 1596 ElNotification.error('缺少一条从开始节点到结束节点的完整流程!');
...@@ -1727,6 +1733,13 @@ export default { ...@@ -1727,6 +1733,13 @@ export default {
1727 1733
1728 flowData.value.nodes = editor.editorState.graph.save().nodes 1734 flowData.value.nodes = editor.editorState.graph.save().nodes
1729 flowData.value.edges = editor.editorState.graph.save().edges 1735 flowData.value.edges = editor.editorState.graph.save().edges
1736 +
1737 + // TAG: 节点删除后,如果有缓存也要删除掉
1738 + for (const key in state.node_tree) {
1739 + if (key === model.id) {
1740 + delete state.node_tree[model.id];
1741 + }
1742 + }
1730 } 1743 }
1731 1744
1732 /** 1745 /**
...@@ -1886,7 +1899,7 @@ export default { ...@@ -1886,7 +1899,7 @@ export default {
1886 } 1899 }
1887 ) 1900 )
1888 .then(async () => { 1901 .then(async () => {
1889 - saveFlowData(); 1902 + saveFlowData('single');
1890 }) 1903 })
1891 .catch(() => { 1904 .catch(() => {
1892 }); 1905 });
......