From 44103c6eff411018fbe11de880280a8f5232d277 Mon Sep 17 00:00:00 2001 From: icanci Date: Mon, 25 Sep 2023 19:08:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=BE=B9=E6=B7=B1=E5=BA=A6=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../loopstack/bic/biz/service/impl/GraphServiceImpl.java | 6 ++---- .../main/java/cn/icanci/loopstack/bic/graph/edge/Edge.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java index ff795c8..6bfebed 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java @@ -6,6 +6,7 @@ import java.util.stream.Collectors; import javax.annotation.Resource; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import com.google.common.collect.Lists; @@ -88,10 +89,7 @@ public class GraphServiceImpl implements GraphService { } String text = node.getAttrs().getLabel().getText(); String noData = "(无数据)"; - - if (text.contains(noData)) { - continue; - } + text = text.replace(noData, StringUtils.EMPTY); node.getAttrs().getLabel().setText(text + noData); } } diff --git a/graph/src/main/java/cn/icanci/loopstack/bic/graph/edge/Edge.java b/graph/src/main/java/cn/icanci/loopstack/bic/graph/edge/Edge.java index e8fbc8d..c9b39a8 100644 --- a/graph/src/main/java/cn/icanci/loopstack/bic/graph/edge/Edge.java +++ b/graph/src/main/java/cn/icanci/loopstack/bic/graph/edge/Edge.java @@ -21,5 +21,5 @@ public class Edge { private EdgeConsumerInfo consumerInfo; private EdgeHistoryInfo historyInfo; /** 深度,只用来计算节点的样式 */ - private transient int deep; + private int deep; } -- Gitee From 662026daabda75ff287dbc703de7630deea14447 Mon Sep 17 00:00:00 2001 From: icanci Date: Mon, 25 Sep 2023 22:42:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ui=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bic/biz/adapter/GraphAdapterService.java | 11 +- .../bic/biz/service/NodeVueService.java | 3 + .../biz/service/impl/NodeVueServiceImpl.java | 4 + .../dal/mongo/daointerface/NodeVueDAO.java | 2 + .../bic/dal/mongo/dateobject/UnitNodeDO.java | 2 + .../bic/dal/mongo/mongo/MongoNodeVueDAO.java | 8 + .../icanci/loopstack/bic/graph/node/Node.java | 4 + .../bic/graph/node/UnitViewNode.java | 1 + .../src/views/bic-config/node-vue-config.vue | 1 + .../src/views/bic-config/unit-view-tree.vue | 1 + .../src/views/bic-view/bic-singleton-view.vue | 271 ++++++++++++------ .../views/bic-view/{vuep.css => vuepc.css} | 8 +- 12 files changed, 226 insertions(+), 90 deletions(-) rename views/src/main/resources/vueboot/src/views/bic-view/{vuep.css => vuepc.css} (99%) diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java index d8fb7b9..17b9a05 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/adapter/GraphAdapterService.java @@ -15,13 +15,11 @@ import com.google.common.collect.Maps; import cn.hutool.json.JSONUtil; import cn.icanci.loopstack.bic.biz.exception.GraphAdapterException; -import cn.icanci.loopstack.bic.biz.service.EdgeStyleService; -import cn.icanci.loopstack.bic.biz.service.NodeService; -import cn.icanci.loopstack.bic.biz.service.NodeStyleService; -import cn.icanci.loopstack.bic.biz.service.UnitViewService; +import cn.icanci.loopstack.bic.biz.service.*; import cn.icanci.loopstack.bic.common.model.base.EdgeStyleVO; import cn.icanci.loopstack.bic.common.model.base.NodeStyleVO; import cn.icanci.loopstack.bic.common.model.base.NodeVO; +import cn.icanci.loopstack.bic.common.model.base.NodeVueVO; import cn.icanci.loopstack.bic.common.model.graph.UnitEdgeVO; import cn.icanci.loopstack.bic.common.model.graph.UnitNodeVO; import cn.icanci.loopstack.bic.common.model.graph.UnitViewVO; @@ -40,6 +38,8 @@ public class GraphAdapterService implements GraphAdapter { @Resource private NodeService nodeService; @Resource + private NodeVueService nodeVueService; + @Resource private NodeStyleService nodeStyleService; @Resource private EdgeStyleService edgeStyleService; @@ -75,6 +75,9 @@ public class GraphAdapterService implements GraphAdapter { retNode.setNodeDataMode(node.getNodeDataMode().getCode()); retNode.setNodeDataKey(node.getNodeDataKey()); retNode.setNodeType(node.getNodeType().getCode()); + NodeVueVO nodeVueVO = nodeVueService.queryByUuid(node.getNodeVue()); + retNode.setNodeVueCode(nodeVueVO.getNodeVueCode()); + retNode.setNodeType(nodeVueVO.getNodeVueType().getCode()); return retNode; } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/NodeVueService.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/NodeVueService.java index a7eb91a..917e373 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/NodeVueService.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/NodeVueService.java @@ -30,4 +30,7 @@ public interface NodeVueService extends BaseService { List loadSelector(String systemUuid, String nodeUuid); String loadDefaultVue(); + + NodeVueVO queryByUuid(String nodeVueUuid); + } diff --git a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeVueServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeVueServiceImpl.java index d5beaec..901d594 100644 --- a/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeVueServiceImpl.java +++ b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/NodeVueServiceImpl.java @@ -101,4 +101,8 @@ public class NodeVueServiceImpl implements NodeVueService { public String loadDefaultVue() { return TemplateFileUtils.queryDefaultNodeVueTemplate(); } + + @Override public NodeVueVO queryByUuid(String nodeVueUuid) { + return nodeVueMapper.do2vo(nodeVueDAO.queryByUuid(nodeVueUuid)); + } } diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/NodeVueDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/NodeVueDAO.java index 3cc4db1..d065a08 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/NodeVueDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/daointerface/NodeVueDAO.java @@ -16,6 +16,8 @@ public interface NodeVueDAO extends BaseDAO { NodeVueDO queryBySystemUuidAndKey(String systemUuid, String key); + NodeVueDO queryByUuid(String nodeVueUuid); + /** 列 */ interface NodeVueColumn extends BaseColumn { String SYSTEM_UUID = "systemUuid"; diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/dateobject/UnitNodeDO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/dateobject/UnitNodeDO.java index 21a2980..47476cb 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/dateobject/UnitNodeDO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/dateobject/UnitNodeDO.java @@ -20,4 +20,6 @@ public class UnitNodeDO { private String nodeDataKey; /** 节点类型 */ private String nodeType; + /** 节点组件 */ + private String nodeVue; } diff --git a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoNodeVueDAO.java b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoNodeVueDAO.java index 8c853bc..43f29a4 100644 --- a/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoNodeVueDAO.java +++ b/dal/src/main/java/cn/icanci/loopstack/bic/dal/mongo/mongo/MongoNodeVueDAO.java @@ -90,4 +90,12 @@ public class MongoNodeVueDAO extends AbstractBaseDAO implements NodeV return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); } + + @Override + public NodeVueDO queryByUuid(String nodeVueUuid) { + Criteria criteria = Criteria.where(NodeVueColumn.UUID).is(nodeVueUuid); + criteria.and(NodeVueColumn.ENV).is(DEFAULT_ENV); + Query query = new Query(criteria); + return mongoTemplate.findOne(query, COLLECTION_CLASS, COLLECTION_NAME); + } } diff --git a/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/Node.java b/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/Node.java index 8b60e53..1135f7e 100644 --- a/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/Node.java +++ b/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/Node.java @@ -19,4 +19,8 @@ public class Node { private String nodeDataKey; /** 节点类型 */ private String nodeType; + /** 节点组件代码 */ + private String nodeVueCode; + /** 组件类型:DIALOG、OPEN_TAG,可以选择为弹框、或者打开一个新的标签页 */ + private String nodeVueType; } diff --git a/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/UnitViewNode.java b/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/UnitViewNode.java index c94f2f0..7d548ce 100644 --- a/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/UnitViewNode.java +++ b/graph/src/main/java/cn/icanci/loopstack/bic/graph/node/UnitViewNode.java @@ -17,6 +17,7 @@ public class UnitViewNode extends Node { /** 路径是否经过 */ private boolean pathPass; + public boolean hasBurying() { return CollectionUtil.isNotEmpty(buryings); } diff --git a/views/src/main/resources/vueboot/src/views/bic-config/node-vue-config.vue b/views/src/main/resources/vueboot/src/views/bic-config/node-vue-config.vue index f837ac9..954fb8b 100644 --- a/views/src/main/resources/vueboot/src/views/bic-config/node-vue-config.vue +++ b/views/src/main/resources/vueboot/src/views/bic-config/node-vue-config.vue @@ -245,6 +245,7 @@ export default { }, async refreshNodeOptions() { let vm = this + vm.queryForm.nodeUuid = '' if (vm.queryForm.systemUuid === '') { vm.nodeOptions = [] } else { diff --git a/views/src/main/resources/vueboot/src/views/bic-config/unit-view-tree.vue b/views/src/main/resources/vueboot/src/views/bic-config/unit-view-tree.vue index 14f0b39..ca1c358 100644 --- a/views/src/main/resources/vueboot/src/views/bic-config/unit-view-tree.vue +++ b/views/src/main/resources/vueboot/src/views/bic-config/unit-view-tree.vue @@ -200,6 +200,7 @@ export default { }, async refreshUseCaseOptions() { let vm = this + vm.queryForm.useCaseUuid = '' if (vm.queryForm.systemUuid === '') { vm.useCaseOptions = [] } else { diff --git a/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue b/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue index 86db109..f5ba648 100644 --- a/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue +++ b/views/src/main/resources/vueboot/src/views/bic-view/bic-singleton-view.vue @@ -1,12 +1,33 @@ +