清除mode

This commit is contained in:
ChenXinXin committed 2024-04-22 13:42:28 +08:00
1 parent 696457321b
commit 85130fe8b5
2 files changed
+1 -19

No files matched your search

-19
View File
@@ -198,15 +198,11 @@ Vue.component("process-flow", {
editType: 'flow', //编辑的类型
displayModeIndex: 1, // 'complex'、'simple'
displayMode: 'complex', // 'complex'、'simple'
mode: "mode",
isAddNodeMenuShown: false,
activeMenuIndex: -1,
};
},
watch: {
mode() {
this.logicFlow.clearData();
},
workflowConfig: {
handler: async function (val) {
// 初始化起点和终点
@@ -548,21 +544,6 @@ Vue.component("process-flow", {
logicFlow.on("edge:add", (e) => {
const {data} = e;
const {id, sourceNodeId, targetNodeId, properties} = data;
// 并行模式不允许多条流程线
if (this.mode == 'parallel') {
const sourceNodeEdges = logicFlow.getNodeEdges(sourceNodeId);
const targetNodeEdges = logicFlow.getNodeEdges(targetNodeId);
if (
sourceNodeEdges.filter(edge => edge.sourceNodeId == sourceNodeId).length > 1 ||
sourceNodeEdges.filter(edge => edge.targetNodeId == sourceNodeId).length > 1 ||
targetNodeEdges.filter(edge => edge.sourceNodeId == targetNodeId).length > 1 ||
targetNodeEdges.filter(edge => edge.targetNodeId == targetNodeId).length > 1
) {
window.vtoast.fail("并行模式不允许多条流程线");
logicFlow.deleteEdge(id);
return;
}
}
let line = {
from: sourceNodeId,
to: targetNodeId,
+1
View File
@@ -303,6 +303,7 @@
// ---------- <<<<<<<<<< 申请项目审核 --------
async prepareCreateFormData(funObj) {
console.log('prepareCreateFormData', funObj);
const { workflowForm, workflowPersonList, workflowId } = funObj;
this.currentWorkflowForm = workflowForm;
this.currentWorkflowPersonList = workflowPersonList;