diff --git a/auto-solution-admin/src/main/java/com/solution/web/controller/behaviour/HbNodeCommandController.java b/auto-solution-admin/src/main/java/com/solution/web/controller/behaviour/HbNodeCommandController.java new file mode 100644 index 0000000..7e7a6ef --- /dev/null +++ b/auto-solution-admin/src/main/java/com/solution/web/controller/behaviour/HbNodeCommandController.java @@ -0,0 +1,25 @@ +package com.solution.web.controller.behaviour; + +import com.solution.common.core.controller.BaseController; +import com.solution.common.core.domain.AjaxResult; +import com.solution.system.service.HbNodeCommandService; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api/node/command") +public class HbNodeCommandController extends BaseController { + + private final HbNodeCommandService nodeCommandService; + + public HbNodeCommandController(HbNodeCommandService nodeCommandService) { + this.nodeCommandService = nodeCommandService; + } + + @GetMapping(value = "/all") + public AjaxResult all() { + return success(nodeCommandService.findAll()); + } + +} diff --git a/auto-solution-admin/src/main/java/com/solution/web/controller/scene/SceneController.java b/auto-solution-admin/src/main/java/com/solution/web/controller/scene/SceneController.java index aacdd55..5b92009 100644 --- a/auto-solution-admin/src/main/java/com/solution/web/controller/scene/SceneController.java +++ b/auto-solution-admin/src/main/java/com/solution/web/controller/scene/SceneController.java @@ -49,4 +49,10 @@ public class SceneController extends BaseController { List list = sceneService.selectSceneList(); return getDataTable(list); } + + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sceneService.findOneById(id)); + } } diff --git a/auto-solution-behaviour/src/main/java/com/solution/system/domain/HbNodeCommand.java b/auto-solution-behaviour/src/main/java/com/solution/system/domain/HbNodeCommand.java new file mode 100644 index 0000000..869c525 --- /dev/null +++ b/auto-solution-behaviour/src/main/java/com/solution/system/domain/HbNodeCommand.java @@ -0,0 +1,55 @@ +package com.solution.system.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; + +public class HbNodeCommand implements Serializable { + + private Integer id; + + private String command; + + private String chineseName; + + private String description; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + + public String getChineseName() { + return chineseName; + } + + public void setChineseName(String chineseName) { + this.chineseName = chineseName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + +} diff --git a/auto-solution-behaviour/src/main/java/com/solution/system/mapper/HbNodeCommandMapper.java b/auto-solution-behaviour/src/main/java/com/solution/system/mapper/HbNodeCommandMapper.java new file mode 100644 index 0000000..5da8921 --- /dev/null +++ b/auto-solution-behaviour/src/main/java/com/solution/system/mapper/HbNodeCommandMapper.java @@ -0,0 +1,18 @@ +package com.solution.system.mapper; +/* + * 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 com.solution.system.domain.HbNodeCommand; + +import java.util.List; + +public interface HbNodeCommandMapper { + + List findAll(); +} diff --git a/auto-solution-behaviour/src/main/java/com/solution/system/service/HbNodeCommandService.java b/auto-solution-behaviour/src/main/java/com/solution/system/service/HbNodeCommandService.java new file mode 100644 index 0000000..19b5b24 --- /dev/null +++ b/auto-solution-behaviour/src/main/java/com/solution/system/service/HbNodeCommandService.java @@ -0,0 +1,18 @@ +package com.solution.system.service; +/* + * 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 com.solution.system.domain.HbNodeCommand; + +import java.util.List; + +public interface HbNodeCommandService { + + List findAll(); +} diff --git a/auto-solution-behaviour/src/main/java/com/solution/system/service/impl/HbNodeCommandServiceImpl.java b/auto-solution-behaviour/src/main/java/com/solution/system/service/impl/HbNodeCommandServiceImpl.java new file mode 100644 index 0000000..dc101a0 --- /dev/null +++ b/auto-solution-behaviour/src/main/java/com/solution/system/service/impl/HbNodeCommandServiceImpl.java @@ -0,0 +1,32 @@ +package com.solution.system.service.impl; +/* + * 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 com.solution.system.domain.HbNodeCommand; +import com.solution.system.mapper.HbNodeCommandMapper; +import com.solution.system.service.HbNodeCommandService; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class HbNodeCommandServiceImpl implements HbNodeCommandService { + + private final HbNodeCommandMapper hbNodeCommandMapper; + + public HbNodeCommandServiceImpl(HbNodeCommandMapper hbNodeCommandMapper) { + this.hbNodeCommandMapper = hbNodeCommandMapper; + } + + @Override + public List findAll() { + return hbNodeCommandMapper.findAll(); + } + +} diff --git a/auto-solution-behaviour/src/main/resources/mapper/system/HbNodeCommandMapper.xml b/auto-solution-behaviour/src/main/resources/mapper/system/HbNodeCommandMapper.xml new file mode 100644 index 0000000..63853e4 --- /dev/null +++ b/auto-solution-behaviour/src/main/resources/mapper/system/HbNodeCommandMapper.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/auto-solution-scene/src/main/java/com/solution/scene/mapper/SceneMapper.java b/auto-solution-scene/src/main/java/com/solution/scene/mapper/SceneMapper.java index d1c2569..1285072 100644 --- a/auto-solution-scene/src/main/java/com/solution/scene/mapper/SceneMapper.java +++ b/auto-solution-scene/src/main/java/com/solution/scene/mapper/SceneMapper.java @@ -24,4 +24,6 @@ public interface SceneMapper { * @return */ List selectSceneList(); + + AfsimScenario findOneById(Long id); } diff --git a/auto-solution-scene/src/main/java/com/solution/scene/service/SceneService.java b/auto-solution-scene/src/main/java/com/solution/scene/service/SceneService.java index ea06aad..cc5ac5f 100644 --- a/auto-solution-scene/src/main/java/com/solution/scene/service/SceneService.java +++ b/auto-solution-scene/src/main/java/com/solution/scene/service/SceneService.java @@ -23,4 +23,6 @@ public interface SceneService { * @return */ List selectSceneList(); + + AfsimScenario findOneById(Long id); } diff --git a/auto-solution-scene/src/main/java/com/solution/scene/service/impl/SceneServiceImpl.java b/auto-solution-scene/src/main/java/com/solution/scene/service/impl/SceneServiceImpl.java index 7669444..3de6b73 100644 --- a/auto-solution-scene/src/main/java/com/solution/scene/service/impl/SceneServiceImpl.java +++ b/auto-solution-scene/src/main/java/com/solution/scene/service/impl/SceneServiceImpl.java @@ -64,4 +64,10 @@ public class SceneServiceImpl implements SceneService { public List selectSceneList() { return sceneMapper.selectSceneList(); } + + @Override + public AfsimScenario findOneById(Long id) { + return sceneMapper.findOneById(id); + } + } diff --git a/auto-solution-scene/src/main/resources/mapper/scene/SceneMapper.xml b/auto-solution-scene/src/main/resources/mapper/scene/SceneMapper.xml index 9044c61..1428fcb 100644 --- a/auto-solution-scene/src/main/resources/mapper/scene/SceneMapper.xml +++ b/auto-solution-scene/src/main/resources/mapper/scene/SceneMapper.xml @@ -12,6 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + INSERT INTO afsim_scenario (name, description, scenario_path, communication_graph) VALUES (#{name}, #{description}, #{scenarioPath}, #{communicationGraph}) diff --git a/modeler/src/style.less b/modeler/src/style.less index b4c09aa..254371c 100644 --- a/modeler/src/style.less +++ b/modeler/src/style.less @@ -1204,7 +1204,7 @@ .ant-tabs-content { //padding: 15px; padding: 4px; - background: #041b36db; + background: #041832; } &.settings-tab, @@ -1508,9 +1508,7 @@ border-inline-end-width: 1px; } } -.ant-select:not(.ant-select-customize-input) .ant-select-selector{ - border: 1px solid #2c2a2a; -} + .ant-select .ant-select-selection-placeholder, .ant-select .ant-select-selection-search-input{ background: transparent @@ -1831,4 +1829,51 @@ } } -} \ No newline at end of file +} + +.ant-select .ant-select-clear { + color: rgb(153 168 180); + background: #475f71; + border-radius: 50%; +} + +.ks-add-parameter-action{ + color: #eee; + position: absolute; + right: 14px; + top: 6px; + cursor: pointer; +} + +.ks-parameter-setting-tabs{ + .ant-tabs-nav{ + background: none; + } + .ant-tabs-nav-list{ + margin-left: 0; + } + &.ant-tabs-left >.ant-tabs-content-holder, + &.ant-tabs-left >div>.ant-tabs-content-holder{ + border-left-color: #09264b; + } + .ant-tabs-tab-remove{ + //position: absolute; + //right: 10px; + //top: 7px; + .anticon{ + color: rgb(173 206 224); + } + } + &.ant-tabs-left >.ant-tabs-nav .ant-tabs-tab{ + border-radius: 0!important; + } + &.ant-tabs-card >.ant-tabs-nav .ant-tabs-tab-active, + &.ant-tabs-card >div>.ant-tabs-nav .ant-tabs-tab-active { + background: #09264c; + } + + &.ant-tabs-left >.ant-tabs-content-holder >.ant-tabs-content>.ant-tabs-tabpane, + &.ant-tabs-left >div>.ant-tabs-content-holder >.ant-tabs-content>.ant-tabs-tabpane{ + padding-left: 5px; + } +} diff --git a/modeler/src/views/decision/api.ts b/modeler/src/views/decision/api.ts index b1a4096..a88b542 100644 --- a/modeler/src/views/decision/api.ts +++ b/modeler/src/views/decision/api.ts @@ -9,7 +9,7 @@ import { HttpRequestClient } from '@/utils/request'; import type { BasicResponse } from '@/types'; -import type { PlatformListableResponse } from './types'; +import type { NodeCommandListResponse, PlatformListableResponse } from './types'; const req = HttpRequestClient.create({ baseURL: '/api', @@ -18,4 +18,8 @@ const req = HttpRequestClient.create({ export const findAllBasicPlatforms = (): Promise => { return req.get('/system/firerule/platforms/basic'); -}; \ No newline at end of file +}; + +export const findAllNodeCommands = (): Promise => { + return req.get('/node/command/all') +} \ No newline at end of file diff --git a/modeler/src/views/decision/communication/api.ts b/modeler/src/views/decision/communication/api.ts index 9f41d12..65a6f1d 100644 --- a/modeler/src/views/decision/communication/api.ts +++ b/modeler/src/views/decision/communication/api.ts @@ -8,7 +8,7 @@ */ import { HttpRequestClient } from '@/utils/request'; -import type { Scenario, ScenarioPageableResponse, ScenarioRequest } from './types'; +import type { Scenario, ScenarioDetailsResponse, ScenarioPageableResponse, ScenarioRequest } from './types'; import type { PlatformWithComponentsResponse } from '../types'; import type { BasicResponse } from '@/types'; @@ -17,17 +17,21 @@ const req = HttpRequestClient.create({ }); export const findScenarioByQuery = (_query: Partial = {}): Promise => { - return req.get('/system/scene/list', _query); + return req.get('/system/scene/list', _query); +}; + +export const findOneScenarioById = (id: number): Promise => { + return req.get(`/system/scene/${id}`); }; export const deleteOneScenarioById = (id: number): Promise => { - return req.delete(`/system/behaviortree/${id}`); + return req.delete(`/system/behaviortree/${id}`); }; export const findPlatformWithComponents = (id: number): Promise => { - return req.get(`/system/firerule/platforms/${id}`); + return req.get(`/system/firerule/platforms/${id}`); }; export const saveScenario = (scenario: Scenario): Promise => { - return req.postJson(`/system/scene/saveSceneConfig`,scenario); + return req.postJson(`/system/scene/saveSceneConfig`,scenario); }; \ No newline at end of file diff --git a/modeler/src/views/decision/communication/communication.vue b/modeler/src/views/decision/communication/communication.vue index c4b3362..36f0909 100644 --- a/modeler/src/views/decision/communication/communication.vue +++ b/modeler/src/views/decision/communication/communication.vue @@ -46,7 +46,7 @@