From a0d8f555f9b370a9629281b86327e039e62e7984 Mon Sep 17 00:00:00 2001 From: libertyspy Date: Tue, 31 Mar 2026 14:32:54 +0800 Subject: [PATCH 1/3] UPDATE: VERSION-20260331 --- modeler/src/style.less | 49 +++++++++++++++++-- modeler/src/views/decision/api.ts | 8 ++- .../src/views/decision/designer/designer.vue | 19 ++++++- .../views/decision/designer/properties.vue | 21 +++++++- modeler/src/views/decision/types/command.ts | 21 ++++++++ modeler/src/views/decision/types/index.ts | 3 +- 6 files changed, 110 insertions(+), 11 deletions(-) create mode 100644 modeler/src/views/decision/types/command.ts diff --git a/modeler/src/style.less b/modeler/src/style.less index b4c09aa..c14bddb 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,45 @@ } } -} \ No newline at end of file +} + +.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/designer/designer.vue b/modeler/src/views/decision/designer/designer.vue index 12cbf9c..4be2cfd 100644 --- a/modeler/src/views/decision/designer/designer.vue +++ b/modeler/src/views/decision/designer/designer.vue @@ -43,6 +43,7 @@ (false); const treesCardRef = ref | null>(null); const platforms = ref([]); + const nodeCommands = ref([]) const currentScenarioId = ref(null); const { @@ -138,6 +140,18 @@ export default defineComponent({ }); }; + const loadNodeCommands = ()=> { + nodeCommands.value = [] + findAllNodeCommands().then(r=> { + nodeCommands.value = r.data ?? [] + }) + } + + const loadDatasource = ()=> { + loadPlatforms(); + loadNodeCommands(); + } + // 处理拖动开始 const handleDragStart = (nm: NodeDragTemplate) => { draggedNodeData.value = nm; @@ -449,13 +463,14 @@ export default defineComponent({ // 初始化 onMounted(() => { init(); - loadPlatforms(); + loadDatasource(); }); // 清理 onBeforeUnmount(() => destroy()); return { + nodeCommands, currentScenarioId, platforms, treesCardRef, diff --git a/modeler/src/views/decision/designer/properties.vue b/modeler/src/views/decision/designer/properties.vue index 7924bf9..ed0e85a 100644 --- a/modeler/src/views/decision/designer/properties.vue +++ b/modeler/src/views/decision/designer/properties.vue @@ -111,6 +111,11 @@ v-else-if="setting.paramKey === 'platforms'" v-model:value="setting.defaultValue"> {{pl.description}} + + {{pl.chineseName}} + @@ -127,6 +132,16 @@ + + {{ pl.description }} + + + {{pl.chineseName}} + @@ -161,7 +176,7 @@ import type { ElementParameter, ElementVariable, GraphTaskElement } from '../gra import type { BehaviorTree } from './tree'; import type { Graph, Node, NodeProperties } from '@antv/x6'; import { generateKey } from '@/utils/strings'; -import type { Platform } from '@/views/decision/types'; +import type { NodeCommand, Platform } from '../types'; const actionSpaceColumns = [ { title: '序号', dataIndex: 'index', key: 'index', width: 40 }, @@ -179,10 +194,12 @@ export default defineComponent({ node: { type: [Object, null] as PropType | null | undefined>, required: false }, graph: { type: [Object, null] as PropType, required: true }, platforms: { type: Array as PropType, required: true }, + nodeCommands: { type: Array as PropType, required: true }, }, emits: ['update-element', 'update-tree'], setup(props, { emit }) { const platforms = ref(props.platforms ?? []); + const nodeCommands = ref(props.nodeCommands ?? []); const activeTopTabsKey = ref('1'); const activeBottomTabsKey = ref('1'); @@ -370,11 +387,13 @@ export default defineComponent({ watch(() => currentElement.value, () => updateNode(), { deep: true }); + watch(() => props.nodeCommands, (n: NodeCommand[] | null | undefined) => nodeCommands.value = n ?? [], { deep: true, immediate: true }); watch(() => props.platforms, (n: Platform[] | null | undefined) => platforms.value = n ?? [], { deep: true, immediate: true }); onMounted(() => load()); return { + nodeCommands, platforms, addParameterTab, groupedParametersActiveTab, diff --git a/modeler/src/views/decision/types/command.ts b/modeler/src/views/decision/types/command.ts new file mode 100644 index 0000000..cba9553 --- /dev/null +++ b/modeler/src/views/decision/types/command.ts @@ -0,0 +1,21 @@ +/* + * 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 type { ApiDataResponse, NullableString } from '@/types'; + +export interface NodeCommand { + id: number, + command: NullableString, + chineseName: NullableString, + description: NullableString, +} + +export interface NodeCommandListResponse extends ApiDataResponse { + +} \ No newline at end of file diff --git a/modeler/src/views/decision/types/index.ts b/modeler/src/views/decision/types/index.ts index 0a425d0..4e201b4 100644 --- a/modeler/src/views/decision/types/index.ts +++ b/modeler/src/views/decision/types/index.ts @@ -7,4 +7,5 @@ * that was distributed with this source code. */ -export * from './platform' \ No newline at end of file +export * from './platform' +export * from './command' \ No newline at end of file From a4d9e8d8eb2ffa2a60444fd8192b2aa87119f8c7 Mon Sep 17 00:00:00 2001 From: libertyspy Date: Tue, 31 Mar 2026 14:33:02 +0800 Subject: [PATCH 2/3] UPDATE: VERSION-20260331 --- .../solution/system/domain/HbNodeCommand.java | 55 +++++++++++++++++++ .../system/mapper/HbNodeCommandMapper.java | 18 ++++++ .../system/service/HbNodeCommandService.java | 18 ++++++ .../impl/HbNodeCommandServiceImpl.java | 32 +++++++++++ .../mapper/system/HbNodeCommandMapper.xml | 19 +++++++ 5 files changed, 142 insertions(+) create mode 100644 auto-solution-behaviour/src/main/java/com/solution/system/domain/HbNodeCommand.java create mode 100644 auto-solution-behaviour/src/main/java/com/solution/system/mapper/HbNodeCommandMapper.java create mode 100644 auto-solution-behaviour/src/main/java/com/solution/system/service/HbNodeCommandService.java create mode 100644 auto-solution-behaviour/src/main/java/com/solution/system/service/impl/HbNodeCommandServiceImpl.java create mode 100644 auto-solution-behaviour/src/main/resources/mapper/system/HbNodeCommandMapper.xml 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 From 150966824e241ee0aef4c819ed7bb1e2516183f8 Mon Sep 17 00:00:00 2001 From: libertyspy Date: Tue, 31 Mar 2026 14:33:09 +0800 Subject: [PATCH 3/3] UPDATE: VERSION-20260331 --- .../behaviour/HbNodeCommandController.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 auto-solution-admin/src/main/java/com/solution/web/controller/behaviour/HbNodeCommandController.java 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()); + } + +}