From fb4fe48caf1146737d1fc573c4ac506c902e19bf Mon Sep 17 00:00:00 2001 From: dengbf Date: Mon, 4 Mar 2024 15:30:02 +0800 Subject: [PATCH 1/3] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[11050174009507?= =?UTF-8?q?84]=E5=AE=A1=E6=89=B9=E8=8A=82=E7=82=B9=E5=8F=AA=E8=83=BD?= =?UTF-8?q?=E8=BF=9E=E5=87=BA=E4=B8=A4=E6=9D=A1=E7=BA=BF=20http://192.168.?= =?UTF-8?q?0.96:8090/demo/rdm.html#/task-detail/939050947543040/9390509475?= =?UTF-8?q?43050/1105017400950784?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/message/en.json | 3 ++- src/resources/assets/languages/message/zh.json | 3 ++- .../process/flow/topoComponent/topo.node.process.js | 10 ++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/resources/assets/languages/message/en.json b/src/resources/assets/languages/message/en.json index 6a19f22d..6322caf4 100644 --- a/src/resources/assets/languages/message/en.json +++ b/src/resources/assets/languages/message/en.json @@ -111,7 +111,8 @@ "batchjobpolicytip": "Loop through list data to create multiple jobs", "jobpolicycolumn": "Loop through list data and merge into an array", "eoahasonelink": "Approval nodes can only have one line connected!", - "eoanodenobacklink": "Approval nodes can only be rolled back to one node" + "eoanodenobacklink": "Approval nodes can only be rolled back to one node", + "eoalinkouttip": "At most, the approval node can only be connected by two lines" }, "autoexec": { "savedeadlinenolimit": "No setting means unlimited storage period", diff --git a/src/resources/assets/languages/message/zh.json b/src/resources/assets/languages/message/zh.json index 46e13dd2..4f828286 100644 --- a/src/resources/assets/languages/message/zh.json +++ b/src/resources/assets/languages/message/zh.json @@ -111,7 +111,8 @@ "batchjobpolicytip": "循环遍历列表数据,创建多个作业", "jobpolicycolumn": "循环遍历列表数据,合并为数组", "eoahasonelink": "审批节点只能有一根线连出!", - "eoanodenobacklink": "审批节点只能回退到一个节点" + "eoanodenobacklink": "审批节点只能回退到一个节点", + "eoalinkouttip": "审批节点至多只有两条线连出" }, "autoexec": { "savedeadlinenolimit": "不设置代表保存期限不限制", diff --git a/src/views/pages/process/flow/topoComponent/topo.node.process.js b/src/views/pages/process/flow/topoComponent/topo.node.process.js index 4d4f124c..45793a74 100644 --- a/src/views/pages/process/flow/topoComponent/topo.node.process.js +++ b/src/views/pages/process/flow/topoComponent/topo.node.process.js @@ -33,8 +33,8 @@ import {$t} from '@/resources/init.js'; ViewUI.Message.warning({ content: $t('message.process.timernodenobacklink'), duration: 3, closable: true }); return false; } else if (sourceNode.getConfig().handler == 'eoa') { - if (this.getNextNodes('backward') && this.getNextNodes('backward').length > 0) { - ViewUI.Message.warning({ content: $t('message.process.eoanodenobacklink'), duration: 3, closable: true }); + if (this.getNextNodes('backward') && this.getNextNodes('backward').length > 0 || (this.getNextNodes('forward') && this.getNextNodes('backward').length > 1)) { + ViewUI.Message.warning({ content: $t('message.process.eoalinkouttip'), duration: 3, closable: true }); return false; } } @@ -62,8 +62,10 @@ import {$t} from '@/resources/init.js'; ViewUI.Message.warning({ content: $t('message.process.timerhasonelink'), duration: 3, closable: true }); return false; } else if (sourceNode.getConfig().handler == 'eoa') { - ViewUI.Message.warning({ content: $t('message.process.eoahasonelink'), duration: 3, closable: true }); - return false; + if ((this.getNextNodes('forward') && this.getNextNodes('backward').length > 0) || this.getNextNodes('forward').length > 1) { + ViewUI.Message.warning({ content: $t('message.process.eoalinkouttip'), duration: 3, closable: true }); + return false; + } } } this.canvas.addLink({ -- Gitee From 19d9e0c91b98d7af3f6ced868d0422f74bb72200 Mon Sep 17 00:00:00 2001 From: dengbf Date: Mon, 4 Mar 2024 16:36:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?-=20[=E5=8A=9F=E8=83=BD]=20=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E8=8A=82=E7=82=B9=E5=92=8C=E5=88=86=E6=B5=81=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E9=83=BD=E4=B8=8D=E8=83=BD=E8=BF=9E=E5=87=BA=E8=99=9A?= =?UTF-8?q?=E7=BA=BF=20=20=20=20-=20[=E5=85=B3=E8=81=94]=20#[1104999004733?= =?UTF-8?q?440]IT=E6=9C=8D=E5=8A=A1-=E5=AE=A1=E6=89=B9=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A1=E6=89=B9=E4=BB=BB=E5=8A=A1=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=A0=B9=E6=8D=AE=E7=8A=B6=E6=80=81=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=88=96=E5=A4=B1=E8=B4=A5=E8=87=AA=E5=8A=A8=E6=B5=81=E8=BD=AC?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20http://192.168.0.96:8090/demo/rdm.html#/st?= =?UTF-8?q?ory-detail/939050947543040/939050947543042/1104999004733440?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/message/en.json | 2 +- src/resources/assets/languages/message/zh.json | 2 +- .../flow/topoComponent/topo.node.condition.js | 13 ++----------- .../flow/topoComponent/topo.node.converge.js | 16 ++++------------ .../flow/topoComponent/topo.node.process.js | 10 +++------- .../flow/topoComponent/topo.node.timer.js | 2 +- 6 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/resources/assets/languages/message/en.json b/src/resources/assets/languages/message/en.json index 6322caf4..82584a27 100644 --- a/src/resources/assets/languages/message/en.json +++ b/src/resources/assets/languages/message/en.json @@ -95,7 +95,7 @@ "cannotnodelist": "Failed to obtain node list data!", "notsaveflow": "The flow has not been saved yet!", "notinitdata": "Initialization failed to obtain data!", - "timernodenobacklink": "The timer node cannot be connected to the backlink!", + "nodenobacklink": "The timer node cannot be connected to the backlink!", "timerhasonelink": "The timer node can only have one line connected!", "nodeorphaned": "Node is orphaned", "nodenofrontnode": "Node has no front node", diff --git a/src/resources/assets/languages/message/zh.json b/src/resources/assets/languages/message/zh.json index 4f828286..55d34061 100644 --- a/src/resources/assets/languages/message/zh.json +++ b/src/resources/assets/languages/message/zh.json @@ -95,7 +95,7 @@ "cannotnodelist": "节点列表数据获取失败!", "notsaveflow": "该流程还未保存!", "notinitdata": "初始化获取数据失败!", - "timernodenobacklink": "定时节点不能连回退线!", + "nodenobacklink": "不能连回退线!", "timerhasonelink": "定时节点只能有一根线连出!", "nodeorphaned": "节点被孤立", "nodenofrontnode": "节点没有前置节点", diff --git a/src/views/pages/process/flow/topoComponent/topo.node.condition.js b/src/views/pages/process/flow/topoComponent/topo.node.condition.js index 15ba3ebb..cd25de52 100644 --- a/src/views/pages/process/flow/topoComponent/topo.node.condition.js +++ b/src/views/pages/process/flow/topoComponent/topo.node.condition.js @@ -18,17 +18,8 @@ import Vue from 'vue'; const prevNodeList = targetNode.getAllNextNodes('forward'); const set = new Set(prevNodeList); if (set.has(this)) { //如果当前节点已经是目标节点的后置节点,则要用回退线 - //判断是否有连线 - const backwardSet = new Set(this.getNextNodes('backward')); - if (!backwardSet.has(targetNode) && targetNode.isAllowConnected(this)) { - this.canvas.addLink({ - type: 'backward', - source: this.getUuid(), - sAnchor: sourceAnchor, - target: targetNode.getUuid(), - tAnchor: targetAnchor - }); - } + //条件节点不能连回退线 + ViewUI.Message.warning({ content: $t('message.process.nodenobacklink'), duration: 3, closable: true }); } else { //判断是否有连线 const forwardSet = new Set(this.getNextNodes('forward')); diff --git a/src/views/pages/process/flow/topoComponent/topo.node.converge.js b/src/views/pages/process/flow/topoComponent/topo.node.converge.js index 27f1eccf..52b6cf52 100644 --- a/src/views/pages/process/flow/topoComponent/topo.node.converge.js +++ b/src/views/pages/process/flow/topoComponent/topo.node.converge.js @@ -1,4 +1,5 @@ -import {$t} from '@/resources/init.js'; +import ViewUI from 'neatlogic-ui/iview/index.js'; +import { $t } from '@/resources/init.js'; (function(global, factory) { factory((global.Converge = global.Converge || {}), global); }(window, function(exports, global) { @@ -18,17 +19,8 @@ import {$t} from '@/resources/init.js'; const prevNodeList = targetNode.getAllNextNodes('forward'); const set = new Set(prevNodeList); if (set.has(this)) { //如果当前节点已经是目标节点的后置节点,则要用回退线 - //判断是否有连线 - const backwardSet = new Set(this.getNextNodes('backward')); - if (!backwardSet.has(targetNode) && targetNode.isAllowConnected(this)) { - this.canvas.addLink({ - type: 'backward', - source: this.getUuid(), - sAnchor: sourceAnchor, - target: targetNode.getUuid(), - tAnchor: targetAnchor - }); - } + //分流节点不能连回退线 + ViewUI.Message.warning({ content: $t('message.process.nodenobacklink'), duration: 3, closable: true }); } else { //判断是否有连线 const forwardSet = new Set(this.getNextNodes('forward')); diff --git a/src/views/pages/process/flow/topoComponent/topo.node.process.js b/src/views/pages/process/flow/topoComponent/topo.node.process.js index 45793a74..11aa05d4 100644 --- a/src/views/pages/process/flow/topoComponent/topo.node.process.js +++ b/src/views/pages/process/flow/topoComponent/topo.node.process.js @@ -14,8 +14,8 @@ import {$t} from '@/resources/init.js'; isAllowConnected(sourceNode) { const nodeList = this.getNextNodes('forward'); let find = nodeList.find(item => item.getUuid() == sourceNode.getConfig().uuid); - if (this.__config.handler == 'timer' && (find || sourceNode.getType() == 'end')) { //定时节点不能连回退线 - ViewUI.Message.warning({ content: $t('message.process.timernodenobacklink'), duration: 3, closable: true }); + if (this.__config.handler == 'timer' && (find || sourceNode.getType() == 'end')) { //回退线不能指向定时节点 + ViewUI.Message.warning({ content: $t('message.process.nodenobacklink'), duration: 3, closable: true }); return false; } return true; @@ -30,7 +30,7 @@ import {$t} from '@/resources/init.js'; if (set.has(this)) { //如果当前节点已经是目标节点的后置节点,则要用回退线 //判断是否有连线 if (sourceNode.getConfig().handler == 'timer') { //定时节点不能连回退线 - ViewUI.Message.warning({ content: $t('message.process.timernodenobacklink'), duration: 3, closable: true }); + ViewUI.Message.warning({ content: $t('message.process.nodenobacklink'), duration: 3, closable: true }); return false; } else if (sourceNode.getConfig().handler == 'eoa') { if (this.getNextNodes('backward') && this.getNextNodes('backward').length > 0 || (this.getNextNodes('forward') && this.getNextNodes('backward').length > 1)) { @@ -40,10 +40,6 @@ import {$t} from '@/resources/init.js'; } const backwardSet = new Set(this.getNextNodes('backward')); if (!backwardSet.has(targetNode) && targetNode.isAllowConnected(this)) { - if (targetNode.getConfig().handler == 'timer') { - ViewUI.Message.warning({ content: $t('message.process.timernodenobacklink'), duration: 3, closable: true }); - return false; - } this.canvas.addLink({ type: 'backward', source: this.getUuid(), diff --git a/src/views/pages/process/flow/topoComponent/topo.node.timer.js b/src/views/pages/process/flow/topoComponent/topo.node.timer.js index 9061ddbf..8ff1f834 100644 --- a/src/views/pages/process/flow/topoComponent/topo.node.timer.js +++ b/src/views/pages/process/flow/topoComponent/topo.node.timer.js @@ -15,7 +15,7 @@ import {$t} from '@/resources/init.js'; const nodeList = this.getNextNodes('forward'); let find = nodeList.find(item => item.getUuid() == sourceNode.getConfig().uuid); if (find || sourceNode.getType() == 'end') { //不能连回退线 - ViewUI.Message.warning({ content: $t('message.process.timernodenobacklink'), duration: 3, closable: true }); + ViewUI.Message.warning({ content: $t('message.process.nodenobacklink'), duration: 3, closable: true }); return false; } return true; -- Gitee From 86217f0cb81cdc912aad83731d998a91b96eec22 Mon Sep 17 00:00:00 2001 From: dengbf Date: Mon, 4 Mar 2024 16:55:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?-=20[=E5=85=B3=E8=81=94]=20#[11049990047334?= =?UTF-8?q?40]IT=E6=9C=8D=E5=8A=A1-=E5=AE=A1=E6=89=B9=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A1=E6=89=B9=E4=BB=BB=E5=8A=A1=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E6=A0=B9=E6=8D=AE=E7=8A=B6=E6=80=81=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E6=88=96=E5=A4=B1=E8=B4=A5=E8=87=AA=E5=8A=A8=E6=B5=81=E8=BD=AC?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=20http://192.168.0.96:8090/demo/rdm.html#/st?= =?UTF-8?q?ory-detail/939050947543040/939050947543042/1104999004733440?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/resources/assets/languages/message/en.json | 4 ++-- src/resources/assets/languages/message/zh.json | 4 ++-- .../pages/process/flow/topoComponent/topo.node.process.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/resources/assets/languages/message/en.json b/src/resources/assets/languages/message/en.json index 82584a27..c45742c6 100644 --- a/src/resources/assets/languages/message/en.json +++ b/src/resources/assets/languages/message/en.json @@ -95,7 +95,6 @@ "cannotnodelist": "Failed to obtain node list data!", "notsaveflow": "The flow has not been saved yet!", "notinitdata": "Initialization failed to obtain data!", - "nodenobacklink": "The timer node cannot be connected to the backlink!", "timerhasonelink": "The timer node can only have one line connected!", "nodeorphaned": "Node is orphaned", "nodenofrontnode": "Node has no front node", @@ -112,7 +111,8 @@ "jobpolicycolumn": "Loop through list data and merge into an array", "eoahasonelink": "Approval nodes can only have one line connected!", "eoanodenobacklink": "Approval nodes can only be rolled back to one node", - "eoalinkouttip": "At most, the approval node can only be connected by two lines" + "eoalinkouttip": "At most, the approval node can only be connected by two lines", + "nodenobacklink": "Cannot connect fallback line" }, "autoexec": { "savedeadlinenolimit": "No setting means unlimited storage period", diff --git a/src/resources/assets/languages/message/zh.json b/src/resources/assets/languages/message/zh.json index 55d34061..24d18382 100644 --- a/src/resources/assets/languages/message/zh.json +++ b/src/resources/assets/languages/message/zh.json @@ -95,7 +95,6 @@ "cannotnodelist": "节点列表数据获取失败!", "notsaveflow": "该流程还未保存!", "notinitdata": "初始化获取数据失败!", - "nodenobacklink": "不能连回退线!", "timerhasonelink": "定时节点只能有一根线连出!", "nodeorphaned": "节点被孤立", "nodenofrontnode": "节点没有前置节点", @@ -112,7 +111,8 @@ "jobpolicycolumn": "循环遍历列表数据,合并为数组", "eoahasonelink": "审批节点只能有一根线连出!", "eoanodenobacklink": "审批节点只能回退到一个节点", - "eoalinkouttip": "审批节点至多只有两条线连出" + "eoalinkouttip": "审批节点至多只有两条线连出", + "nodenobacklink": "不能连回退线" }, "autoexec": { "savedeadlinenolimit": "不设置代表保存期限不限制", diff --git a/src/views/pages/process/flow/topoComponent/topo.node.process.js b/src/views/pages/process/flow/topoComponent/topo.node.process.js index 11aa05d4..88109422 100644 --- a/src/views/pages/process/flow/topoComponent/topo.node.process.js +++ b/src/views/pages/process/flow/topoComponent/topo.node.process.js @@ -33,7 +33,7 @@ import {$t} from '@/resources/init.js'; ViewUI.Message.warning({ content: $t('message.process.nodenobacklink'), duration: 3, closable: true }); return false; } else if (sourceNode.getConfig().handler == 'eoa') { - if (this.getNextNodes('backward') && this.getNextNodes('backward').length > 0 || (this.getNextNodes('forward') && this.getNextNodes('backward').length > 1)) { + if (this.getNextNodes('backward') && this.getNextNodes('backward').length > 0 || (this.getNextNodes('forward') && this.getNextNodes('forward').length > 1)) { ViewUI.Message.warning({ content: $t('message.process.eoalinkouttip'), duration: 3, closable: true }); return false; } -- Gitee