hookehuyr

显示图标修改

......@@ -522,14 +522,14 @@ export default {
text: '流程节点',
desc: '拖拽新增流程',
color: '#ed8383',
img: 'https://cdn.ipadbiz.cn/oa/flow/icons-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-cc1.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-start1.png',
},
flow: {
text: '流程节点',
desc: '流程节点',
color: '#ed8383',
img: 'https://cdn.ipadbiz.cn/oa/flow/icons-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-cc1.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-end1.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(() => {
});
......