From 6019738aca5695fb24c2c57b86799998cda842fc Mon Sep 17 00:00:00 2001 From: libertyspy Date: Sun, 15 Mar 2026 16:05:41 +0800 Subject: [PATCH] UPDATE: VERSION-20260314 --- modeler/src/views/decision/communication/api.ts | 15 +-------------- .../views/decision/communication/nodes-card.vue | 2 +- .../decision/communication/platform-card.vue | 2 +- modeler/src/views/decision/communication/types.ts | 2 ++ 4 files changed, 5 insertions(+), 16 deletions(-) diff --git a/modeler/src/views/decision/communication/api.ts b/modeler/src/views/decision/communication/api.ts index 04405ba..4db0889 100644 --- a/modeler/src/views/decision/communication/api.ts +++ b/modeler/src/views/decision/communication/api.ts @@ -16,20 +16,7 @@ const req = HttpRequestClient.create({ }); export const findScenarioByQuery = (_query: Partial = {}): Promise => { - return new Promise((resolve) => { - resolve({ - code: 200, - msg: null, - total: 1, - rows: [ - { - id: 1, - name: '空战场景', - description: null, - }, - ], - }); - }); + return req.get('/system/scene/list', _query); }; export const deleteOneScenarioById = (id: number): Promise => { diff --git a/modeler/src/views/decision/communication/nodes-card.vue b/modeler/src/views/decision/communication/nodes-card.vue index 60605c7..db9c3ed 100644 --- a/modeler/src/views/decision/communication/nodes-card.vue +++ b/modeler/src/views/decision/communication/nodes-card.vue @@ -70,7 +70,7 @@ export default defineComponent({ `; document.body.appendChild(dragPreview); e.dataTransfer.setDragImage(dragPreview, dragPreview.offsetWidth / 2, dragPreview.offsetHeight / 2); - emit('drag-item-start', dragNode, group, isDraggingOver.value, e); + emit('drag-item-start', dragNode, isDraggingOver.value, e); console.log('开始拖动:', dragNode); setTimeout(() => document.body.removeChild(dragPreview), 0); } diff --git a/modeler/src/views/decision/communication/platform-card.vue b/modeler/src/views/decision/communication/platform-card.vue index 44fd10f..a7a3742 100644 --- a/modeler/src/views/decision/communication/platform-card.vue +++ b/modeler/src/views/decision/communication/platform-card.vue @@ -57,7 +57,7 @@ import { deleteOneScenarioById, findScenarioByQuery } from './api'; import { substring } from '@/utils/strings'; export default defineComponent({ - emits: ['select-tree', 'create-tree'], + emits: ['select', 'create'], components: { CheckOutlined, PlusOutlined, diff --git a/modeler/src/views/decision/communication/types.ts b/modeler/src/views/decision/communication/types.ts index 1e23442..5e86edd 100644 --- a/modeler/src/views/decision/communication/types.ts +++ b/modeler/src/views/decision/communication/types.ts @@ -14,6 +14,8 @@ export interface Scenario { id: number, name: NullableString, description: NullableString, + // 用于存储场景中的通讯关系 + communicationGraph: NullableString, } export interface ScenarioRequest extends Scenario {