清除mode
This commit is contained in:
1 parent
696457321b
commit
85130fe8b5
2 files changed
+1
-19
No files matched your search
@@ -198,15 +198,11 @@ Vue.component("process-flow", {
|
|||||||
editType: 'flow', //编辑的类型
|
editType: 'flow', //编辑的类型
|
||||||
displayModeIndex: 1, // 'complex'、'simple'
|
displayModeIndex: 1, // 'complex'、'simple'
|
||||||
displayMode: 'complex', // 'complex'、'simple'
|
displayMode: 'complex', // 'complex'、'simple'
|
||||||
mode: "mode",
|
|
||||||
isAddNodeMenuShown: false,
|
isAddNodeMenuShown: false,
|
||||||
activeMenuIndex: -1,
|
activeMenuIndex: -1,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
mode() {
|
|
||||||
this.logicFlow.clearData();
|
|
||||||
},
|
|
||||||
workflowConfig: {
|
workflowConfig: {
|
||||||
handler: async function (val) {
|
handler: async function (val) {
|
||||||
// 初始化起点和终点
|
// 初始化起点和终点
|
||||||
@@ -548,21 +544,6 @@ Vue.component("process-flow", {
|
|||||||
logicFlow.on("edge:add", (e) => {
|
logicFlow.on("edge:add", (e) => {
|
||||||
const {data} = e;
|
const {data} = e;
|
||||||
const {id, sourceNodeId, targetNodeId, properties} = data;
|
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 = {
|
let line = {
|
||||||
from: sourceNodeId,
|
from: sourceNodeId,
|
||||||
to: targetNodeId,
|
to: targetNodeId,
|
||||||
|
|||||||
@@ -303,6 +303,7 @@
|
|||||||
|
|
||||||
// ---------- <<<<<<<<<< 申请项目审核 --------
|
// ---------- <<<<<<<<<< 申请项目审核 --------
|
||||||
async prepareCreateFormData(funObj) {
|
async prepareCreateFormData(funObj) {
|
||||||
|
console.log('prepareCreateFormData', funObj);
|
||||||
const { workflowForm, workflowPersonList, workflowId } = funObj;
|
const { workflowForm, workflowPersonList, workflowId } = funObj;
|
||||||
this.currentWorkflowForm = workflowForm;
|
this.currentWorkflowForm = workflowForm;
|
||||||
this.currentWorkflowPersonList = workflowPersonList;
|
this.currentWorkflowPersonList = workflowPersonList;
|
||||||
|
|||||||
Reference in new issue
Block a user