diff --git a/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java b/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java index 96706c2..d4399f3 100644 --- a/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java +++ b/auto-solution-admin/src/main/java/com/solution/web/controller/rule/FireRuleController.java @@ -53,6 +53,12 @@ public class FireRuleController extends BaseController { return success(ruleService.getCommPlatformComponentNames(scenarioId)); } + @GetMapping("/platforms/{scenarioId}") + @ApiOperation("获取通信组件的所有平台和组件") + public AjaxResult platforms(@PathVariable Integer scenarioId){ + return success(ruleService.findPlatformComponents(scenarioId)); + } + /** * 根据平台id获取平台下所有组件 * @param platformId diff --git a/auto-solution-rule/src/main/java/com/solution/rule/domain/Platform.java b/auto-solution-rule/src/main/java/com/solution/rule/domain/Platform.java new file mode 100644 index 0000000..6a1b57a --- /dev/null +++ b/auto-solution-rule/src/main/java/com/solution/rule/domain/Platform.java @@ -0,0 +1,56 @@ +package com.solution.rule.domain; +/* + * This file is part of the kernelstudio package. + * + * (c) 2014-2026 zlin + * + * For the full copyright and license information, please view the LICENSE file + * that was distributed with this source code. + */ + +import java.io.Serializable; +import java.util.List; + +public class Platform implements Serializable { + + private Integer id; + + private String name; + + private String description; + + private List components; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getComponents() { + return components; + } + + public void setComponents(List components) { + this.components = components; + } + +} diff --git a/auto-solution-rule/src/main/java/com/solution/rule/mapper/FireRuleMapper.java b/auto-solution-rule/src/main/java/com/solution/rule/mapper/FireRuleMapper.java index b7cd858..8db0fde 100644 --- a/auto-solution-rule/src/main/java/com/solution/rule/mapper/FireRuleMapper.java +++ b/auto-solution-rule/src/main/java/com/solution/rule/mapper/FireRuleMapper.java @@ -1,5 +1,6 @@ package com.solution.rule.mapper; +import com.solution.rule.domain.Platform; import com.solution.rule.domain.PlatformComponent; import com.solution.rule.domain.vo.ComponentCountVO; import com.solution.rule.domain.vo.PlatformComponentNamesVO; @@ -39,4 +40,6 @@ public interface FireRuleMapper { * @return */ List getComponents(Integer platformId); + + List findPlatformComponents(Integer scenarioId); } diff --git a/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java b/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java index 0514c38..5955d69 100644 --- a/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java +++ b/auto-solution-rule/src/main/java/com/solution/rule/service/FireRuleService.java @@ -1,6 +1,7 @@ package com.solution.rule.service; import com.solution.rule.domain.FireRuleExecuteDTO; +import com.solution.rule.domain.Platform; import com.solution.rule.domain.PlatformComponent; import com.solution.rule.domain.vo.PlatformComponentNamesVO; import com.solution.rule.domain.vo.PlatformWeaponAggregateVO; @@ -37,4 +38,6 @@ public interface FireRuleService { * @return */ List getComponents(Integer platformId); + + List findPlatformComponents(Integer scenarioId); } diff --git a/auto-solution-rule/src/main/java/com/solution/rule/service/impl/FireRuleServiceImpl.java b/auto-solution-rule/src/main/java/com/solution/rule/service/impl/FireRuleServiceImpl.java index 20fcdf7..83a727d 100644 --- a/auto-solution-rule/src/main/java/com/solution/rule/service/impl/FireRuleServiceImpl.java +++ b/auto-solution-rule/src/main/java/com/solution/rule/service/impl/FireRuleServiceImpl.java @@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import com.solution.common.constant.ExceptionConstants; import com.solution.rule.domain.FireRuleExecuteDTO; +import com.solution.rule.domain.Platform; import com.solution.rule.domain.PlatformComponent; import com.solution.rule.domain.RuleParam; import com.solution.rule.domain.dto.WeaponModelDTO; @@ -19,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -164,4 +166,14 @@ public class FireRuleServiceImpl implements FireRuleService { } return componentCountVOS; } + + @Override + public List findPlatformComponents(Integer scenarioId) { + List platforms = ruleMapper.findPlatformComponents(scenarioId); + if(!CollUtil.isEmpty(platforms)){ + return platforms; + } + return new ArrayList<>(); + } + } diff --git a/auto-solution-rule/src/main/resources/mapper/rule/FireRuleService.xml b/auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml similarity index 64% rename from auto-solution-rule/src/main/resources/mapper/rule/FireRuleService.xml rename to auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml index e59c2b5..5df2854 100644 --- a/auto-solution-rule/src/main/resources/mapper/rule/FireRuleService.xml +++ b/auto-solution-rule/src/main/resources/mapper/rule/FireRuleMapper.xml @@ -69,4 +69,39 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modeler/src/router/config.ts b/modeler/src/router/config.ts index 8a751d4..f5a2405 100644 --- a/modeler/src/router/config.ts +++ b/modeler/src/router/config.ts @@ -32,7 +32,15 @@ export const routes: RouteRecordRaw[] = [ meta: { title: '决策树', }, - component: () => import('@/views/decision/designer.vue'), + component: () => import('@/views/decision/designer/designer.vue'), + }, + { + name: 'decision-communication', + path: '/app/decision/communication', + meta: { + title: '通信', + }, + component: () => import('@/views/decision/communication/communication.vue'), }, { name: 'decision-algorithm-management', @@ -42,4 +50,12 @@ export const routes: RouteRecordRaw[] = [ }, component: () => import('@/views/decision/algorithm/management.vue'), }, + { + name: 'decision-fire-rule', + path: '/app/decision/fire-rule', + meta: { + title: '活力规则', + }, + component: () => import('@/views/decision/rule/management.vue'), + }, ] \ No newline at end of file diff --git a/modeler/src/style.less b/modeler/src/style.less index 32b711c..48e7e4c 100644 --- a/modeler/src/style.less +++ b/modeler/src/style.less @@ -1647,4 +1647,184 @@ .anticon{ color: #eeeeee; } +} + + +.ant-switch { + background: rgb(8 30 59); +} + + +.ks-algorithm-card { + .ant-card-head-title { + span.text { + display: block; + line-height: 30px; + } + } +} + +.ks-sidebar-header { + line-height: 40px; + background: #081d36; + min-height: 40px; + background: url(@/assets/icons/card-head.png) left / 180% 100%; + padding: 0 10px; + + .ks-sidebar-title { + color: #7ae8fc; + font-size: 16px; + .icon { + background: url(@/assets/icons/list.png) center / 100% 100%; + width: 25px; + height: 25px; + display: block; + margin-top: 7px; + } + .text{ + margin-left: 40px; + font-size: 16px; + color: #eee; + } + } + + .ks-sidebar-add { + position: absolute; + right: 7px; + top: 8px; + font-size: 12px; + + .anticon { + display: block; + float: left; + line-height: 16px; + } + } +} + +.ant-list { + &.ks-sidebar-list { + .ant-list-item { + cursor: pointer; + transition: all 0.5s; + border-left: 2px solid transparent; + position: relative; + + &.selected, + &:hover { + background: #0a1b3c; + border-left: 2px solid #11377e; + } + } + + .ks-sidebar-list-type { + position: absolute; + right: 10px; + + .ant-badge { + .ant-badge-count { + color: #c3c2c2; + background: #333f7d; + box-shadow: 0 0 0 1px #325478; + } + } + } + + .ant-list-item-meta { + .ant-list-item-meta-title { + color: #7ae8fc; + } + + .ant-list-item-meta-description { + color: #4d8c98; + font-size: 13px; + } + } + } +} + +.ks-sidebar-list-param-list { + padding: 15px; + border: 1px solid #475f71; + border-radius: 2px; + + .ks-sidebar-list-param-item { + margin-bottom: 15px; + + &:last-child { + margin-bottom: 0; + } + } + +} + + +.ks-sidebar-list-param-actions { + .anticon { + color: #7ae8fc; + font-size: 20px; + display: block; + line-height: 26px; + cursor: pointer; + } +} + + + +.ant-collapse { + .ant-list-sm { + .ant-list-item { + padding: 4px 15px; + cursor: pointer; + color: rgb(130 196 233); + position: relative; + + .ks-tree-actions { + position: absolute; + right: 10px; + display: none; + } + + &:hover { + background: #0d2d4e; + + .ks-tree-actions { + display: block; + } + } + + } + } + + &.ks-trees-collapse { + + .ant-collapse-content-box { + padding: 0; + height: 40vh; + position: relative; + } + } +} + +.create-tree-icon { + cursor: pointer; +} + +.ant-list-item { + padding: 3px 5px; + cursor: pointer; + color: rgb(130 196 233); + + &:hover { + background: #0d2d4e; + } +} + +.ks-model-builder-body .ks-model-builder-left .ant-collapse { + &.platform-collapse{ + .ant-collapse-content-box{ + max-height: 45.5vh; + } + } + } \ No newline at end of file diff --git a/modeler/src/views/decision/algorithm/management.vue b/modeler/src/views/decision/algorithm/management.vue index 43bab84..d47e326 100644 --- a/modeler/src/views/decision/algorithm/management.vue +++ b/modeler/src/views/decision/algorithm/management.vue @@ -11,13 +11,13 @@ 新增 - +