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 d8fb7b9014e38c2c8d59fcf5af98fe0295fa95dd..17b9a05e307a34022be0432fa4ec2ee37fb85966 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 a7eb91a36352c63c3634f5318596e41bdd1f8f62..917e3738cf66c8986750d2c8dca3f301852e1dd8 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/GraphServiceImpl.java b/biz/src/main/java/cn/icanci/loopstack/bic/biz/service/impl/GraphServiceImpl.java index ff795c80eb2a352bca0fa2ade6aa40ab1e7b098f..6bfebed29c64d270d339de5ee35058c33a07d79b 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/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 d5beaecc2428784b9a2af8c51fad7b4f7cefe10a..901d594fa60f1a4857912c3ca9d4c5aa707391b7 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 3cc4db179b49a74300a848060153716135e4e5f3..d065a083b9121f7567b10aa0ce2cbacd9fcd8f90 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 21a2980fb10de62c13f13d68265ed51f67c51de5..47476cbd080cbb804c4321dfd16a9dc632d956dd 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 8c853bc9a398fe3b0dfd81779274cd5612046059..43f29a4bb71826a61d0a3c6176c28df0d3c46997 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/edge/Edge.java b/graph/src/main/java/cn/icanci/loopstack/bic/graph/edge/Edge.java index e8fbc8d50d6fecba754426708e4a5adfe79a097f..c9b39a86a077e35f35c07475477b213c08cdf428 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; } 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 8b60e5324ece4747ed74ca7b37fa5935cd91d8d4..1135f7e9882db4d2ccc2ffca284c47e1aa903463 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 c94f2f0548252dda502350e7b80680860d3832dd..7d548ce7aa8067f64c229e329e2375629ffaac5a 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 f837ac9e7a716ea8417f480ec493a80e2298aca5..954fb8be397cfc738d131d3e55f97b1cdcf1cd44 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 14f0b39dbe0a121c4ae8b6143dcdd26f61e89909..ca1c35897197dd704b8d34bcfa4c07cf48eea15c 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 86db109f803c8351eeb0e3d3634074e5f160b29c..f5ba648a8800a2390bf8d2ba6c112512cb5669f3 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 @@ +