|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
* @Author: donghao donghao@supervision.ltd
|
|
|
|
|
* @Date: 2025-07-14 14:33:03
|
|
|
|
|
* @LastEditors: donghao donghao@supervision.ltd
|
|
|
|
|
* @LastEditTime: 2025-07-17 13:15:40
|
|
|
|
|
* @LastEditTime: 2025-07-21 16:28:24
|
|
|
|
|
* @FilePath: \Robot-Al-Platform-Web\src\renderer\src\hooks\useLoginFlow.ts
|
|
|
|
|
* @Description: 画布通用处理层
|
|
|
|
|
*
|
|
|
|
@ -11,38 +11,83 @@ export const useLogicFlow = () => {
|
|
|
|
|
const graphData = {
|
|
|
|
|
nodes: [
|
|
|
|
|
{
|
|
|
|
|
id: 'node_id_1',
|
|
|
|
|
id: '6b4be470-8515-4cec-9bb7-7f64eaae0d2a',
|
|
|
|
|
type: 'image-node',
|
|
|
|
|
x: 200,
|
|
|
|
|
y: 120,
|
|
|
|
|
text: { x: 200, y: 120, value: '图像源' },
|
|
|
|
|
properties: {}
|
|
|
|
|
x: 329.1111068725586,
|
|
|
|
|
y: 110.1111068725586,
|
|
|
|
|
properties: { width: 132, height: 40 },
|
|
|
|
|
text: { x: 329.1111068725586, y: 110.1111068725586, value: '图像源' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'node_id_2',
|
|
|
|
|
type: 'circle',
|
|
|
|
|
x: 200,
|
|
|
|
|
y: 300,
|
|
|
|
|
text: { x: 200, y: 300, value: '节点2' },
|
|
|
|
|
properties: {}
|
|
|
|
|
id: 'b3d05799-6137-4dbf-929a-95967e95c945',
|
|
|
|
|
type: 'multi-image-node',
|
|
|
|
|
x: 329.1111068725586,
|
|
|
|
|
y: 229.1111068725586,
|
|
|
|
|
properties: { width: 132, height: 40 },
|
|
|
|
|
text: { x: 329.1111068725586, y: 229.1111068725586, value: '多图采集' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: '0865bdd5-fd06-40a6-85ed-c176d2b153e0',
|
|
|
|
|
type: 'output-image-node',
|
|
|
|
|
x: 329.1111068725586,
|
|
|
|
|
y: 355.1111068725586,
|
|
|
|
|
properties: { width: 132, height: 40 },
|
|
|
|
|
text: { x: 329.1111068725586, y: 355.1111068725586, value: '输出图像' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'e35754f0-c85a-4d70-8bca-f0b995a2b31e',
|
|
|
|
|
type: 'cash-image-node',
|
|
|
|
|
x: 329.1111068725586,
|
|
|
|
|
y: 488.1111068725586,
|
|
|
|
|
properties: { width: 132, height: 40 },
|
|
|
|
|
text: { x: 329.1111068725586, y: 488.1111068725586, value: '缓存图像' }
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
edges: [
|
|
|
|
|
{
|
|
|
|
|
id: 'edge_id',
|
|
|
|
|
id: 'f20f421d-dec5-4d49-83cc-e46e22eb9972',
|
|
|
|
|
type: 'polyline',
|
|
|
|
|
properties: {},
|
|
|
|
|
sourceNodeId: '6b4be470-8515-4cec-9bb7-7f64eaae0d2a',
|
|
|
|
|
targetNodeId: 'b3d05799-6137-4dbf-929a-95967e95c945',
|
|
|
|
|
sourceAnchorId: '6b4be470-8515-4cec-9bb7-7f64eaae0d2a_2',
|
|
|
|
|
targetAnchorId: 'b3d05799-6137-4dbf-929a-95967e95c945_3',
|
|
|
|
|
startPoint: { x: 329.1111068725586, y: 130.1111068725586 },
|
|
|
|
|
endPoint: { x: 329.1111068725586, y: 209.1111068725586 },
|
|
|
|
|
pointsList: [
|
|
|
|
|
{ x: 329.1111068725586, y: 130.1111068725586 },
|
|
|
|
|
{ x: 329.1111068725586, y: 209.1111068725586 }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: '97ecf536-9362-4440-a259-d68188cced67',
|
|
|
|
|
type: 'polyline',
|
|
|
|
|
properties: {},
|
|
|
|
|
sourceNodeId: 'b3d05799-6137-4dbf-929a-95967e95c945',
|
|
|
|
|
targetNodeId: '0865bdd5-fd06-40a6-85ed-c176d2b153e0',
|
|
|
|
|
sourceAnchorId: 'b3d05799-6137-4dbf-929a-95967e95c945_2',
|
|
|
|
|
targetAnchorId: '0865bdd5-fd06-40a6-85ed-c176d2b153e0_3',
|
|
|
|
|
startPoint: { x: 329.1111068725586, y: 249.1111068725586 },
|
|
|
|
|
endPoint: { x: 329.1111068725586, y: 335.1111068725586 },
|
|
|
|
|
pointsList: [
|
|
|
|
|
{ x: 329.1111068725586, y: 249.1111068725586 },
|
|
|
|
|
{ x: 329.1111068725586, y: 335.1111068725586 }
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: '238d6ce5-03fa-40b2-ab46-7fdbd224a2e7',
|
|
|
|
|
type: 'polyline',
|
|
|
|
|
sourceNodeId: 'node_id_1',
|
|
|
|
|
targetNodeId: 'node_id_2',
|
|
|
|
|
text: { x: 200, y: 200, value: '' },
|
|
|
|
|
startPoint: { x: 200, y: 140 },
|
|
|
|
|
endPoint: { x: 200, y: 250 },
|
|
|
|
|
properties: {},
|
|
|
|
|
sourceNodeId: '0865bdd5-fd06-40a6-85ed-c176d2b153e0',
|
|
|
|
|
targetNodeId: 'e35754f0-c85a-4d70-8bca-f0b995a2b31e',
|
|
|
|
|
sourceAnchorId: '0865bdd5-fd06-40a6-85ed-c176d2b153e0_2',
|
|
|
|
|
targetAnchorId: 'e35754f0-c85a-4d70-8bca-f0b995a2b31e_3',
|
|
|
|
|
startPoint: { x: 329.1111068725586, y: 375.1111068725586 },
|
|
|
|
|
endPoint: { x: 329.1111068725586, y: 468.1111068725586 },
|
|
|
|
|
pointsList: [
|
|
|
|
|
{ x: 200, y: 140 },
|
|
|
|
|
{ x: 200, y: 200 },
|
|
|
|
|
{ x: 200, y: 200 },
|
|
|
|
|
{ x: 200, y: 250 }
|
|
|
|
|
],
|
|
|
|
|
properties: {}
|
|
|
|
|
{ x: 329.1111068725586, y: 375.1111068725586 },
|
|
|
|
|
{ x: 329.1111068725586, y: 468.1111068725586 }
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|