diff --git a/modeler/src/style.less b/modeler/src/style.less index d51485e..1ed89a5 100644 --- a/modeler/src/style.less +++ b/modeler/src/style.less @@ -979,6 +979,8 @@ border-right: 1px solid #062850; width: 100%; overflow: hidden; + + background: #081229; } } @@ -1485,4 +1487,27 @@ .ant-divider { border-block-start: 1px solid rgb(255 255 255 / 17%); +} + + + +.ant-pagination { + position: absolute; + bottom: 10px; + width: 100%; + + .ant-pagination-disabled .ant-pagination-item-link, + .ant-pagination-disabled:hover .ant-pagination-item-link, + .ant-pagination-prev .ant-pagination-item-link, + .ant-pagination-next .ant-pagination-item-link, + &.ant-pagination-mini .ant-pagination-total-text, + &.ant-pagination-mini .ant-pagination-simple-pager { + color: rgb(255 255 255 / 95%); + } + + &.ant-pagination-simple .ant-pagination-simple-pager input { + background-color: transparent; + border: 1px solid #0f4a7c; + color: #eee; + } } \ No newline at end of file diff --git a/modeler/src/views/decision/algorithm/api.ts b/modeler/src/views/decision/algorithm/api.ts new file mode 100644 index 0000000..1f00f83 --- /dev/null +++ b/modeler/src/views/decision/algorithm/api.ts @@ -0,0 +1,32 @@ +/* + * 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 { HttpRequestClient } from '@/utils/request'; +import type { Algorithm, AlgorithmPageableResponse, AlgorithmRequest } from './types'; +import type { BasicResponse } from '@/types'; + +const req = HttpRequestClient.create({ + baseURL: '/api', +}); + +export const findAlgorithmsByQuery = (query: Partial = {}): Promise => { + return req.get('/algo/algorithm/list', query); +}; + +export const createAlgorithm = (algorithm: Algorithm): Promise => { + return req.postJson('/algo/algorithm', algorithm); +}; + +export const updateAlgorithm = (algorithm: Algorithm): Promise => { + return req.putJson('/algo/algorithm', algorithm); +}; + +export const deleteAlgorithm = (id: number): Promise => { + return req.delete(`/algo/algorithm/${id}`); +}; \ No newline at end of file diff --git a/modeler/src/views/decision/algorithm/config.ts b/modeler/src/views/decision/algorithm/config.ts new file mode 100644 index 0000000..2663aa5 --- /dev/null +++ b/modeler/src/views/decision/algorithm/config.ts @@ -0,0 +1,23 @@ +/* + * 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. + */ + +export const algorithmTypes = [ + { + type: 'defense', + name: '防守', + }, + { + type: 'offense', + name: '进攻', + }, + { + type: 'formation', + name: '队形', + } +] \ 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 198f942..602aa1e 100644 --- a/modeler/src/views/decision/algorithm/management.vue +++ b/modeler/src/views/decision/algorithm/management.vue @@ -1,11 +1,395 @@ + + \ No newline at end of file diff --git a/modeler/src/views/decision/algorithm/types.ts b/modeler/src/views/decision/algorithm/types.ts new file mode 100644 index 0000000..6252b63 --- /dev/null +++ b/modeler/src/views/decision/algorithm/types.ts @@ -0,0 +1,47 @@ +/* + * 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 { NullableString, PageableResponse } from '@/types'; + +export interface AlgorithmParam { + id: number, + algorithmId: number, + // 参数名 + paramName: NullableString, + // 默认值 + defaultValue: NullableString, + // 描述 + description: NullableString, +} + +export interface Algorithm { + + id: number, + // 算法名称 + name: NullableString, + // 业务类型 + type: NullableString | undefined, + // 算法文件路径 + codePath: NullableString, + // 算法描述 + description: NullableString, + // 算法配置 + algoConfig: NullableString, + // 算法参数定义信息 + algorithmParamList: AlgorithmParam[] +} + +export interface AlgorithmRequest extends Algorithm { + pageNum: number, + pageSize: number, +} + +export interface AlgorithmPageableResponse extends PageableResponse { + +} \ No newline at end of file diff --git a/modeler/src/views/decision/builder/node.vue b/modeler/src/views/decision/builder/node.vue index c798ee1..12e0a3c 100644 --- a/modeler/src/views/decision/builder/node.vue +++ b/modeler/src/views/decision/builder/node.vue @@ -9,14 +9,13 @@ > +
- + @@ -24,7 +23,11 @@ {{ substring(element?.description ?? (element?.name ?? '-'), 40) }}

+

+ {{ substring(element?.description ?? (element?.name ?? '-'), 40) }} +

+