+
@@ -10,6 +11,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -22,6 +38,12 @@
+
+
+
+
+
+
@@ -30,510 +52,21 @@
import TimeNode from './nodes/form/timeNode.vue';
import DataNode from './nodes/data/dataNode.vue';
import LineNode from './nodes/board/lineNode.vue';
+import MultiLinesNode from './nodes/board/multiLinesNode.vue';
+import CurveNode from './nodes/board/curveNode.vue';
+import MultiCurvesNode from './nodes/board/multiCurvesNode.vue';
+import BarNode from './nodes/board/barNode.vue';
+import MultiBarsNode from './nodes/board/multiBarsNode.vue';
import InputNode from './nodes/form/inputNode.vue';
import MapNode from './nodes/form/mapNode.vue';
import AreaNode from './nodes/other/areaNode.vue';
import CustomBoardNode from './nodes/board/customBoardNode.vue';
import CustomDataNode from './nodes/data/customDataNode.vue';
+import TextNode from './nodes/form/textNode.vue';
+import ImgNode from './nodes/form/imgNode.vue';
-const nodes = ref([
- {
- 'id': 'area_474cfc79_4011_495e_9fb3_5e268ad09cfe',
- 'type': 'area',
- 'dimensions': { 'width': 1910, 'height': 970 },
- 'computedPosition': { 'x': 0, 'y': 0, 'z': 0 },
- 'handleBounds': { 'source': null, 'target': null },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 0, 'y': 0 },
- 'data': { 'label': 'area_474cfc79_4011_495e_9fb3_5e268ad09cfe' },
- 'events': {},
- 'name': 'area'
- }, {
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'type': 'time',
- 'dimensions': { 'width': 100, 'height': 100 },
- 'computedPosition': { 'x': 30.66721629102227, 'y': 21.424672395499982, 'z': 0 },
- 'handleBounds': {
- 'source': [{
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b.-s',
- 'type': 'source',
- 'nodeId': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'position': 'right',
- 'x': 97,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b.-t',
- 'type': 'target',
- 'nodeId': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'position': 'left',
- 'x': -3,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 30.66721629102227, 'y': 21.424672395499982 },
- 'data': {
- 'label': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'options': { 'startTimeId': 'startTime', 'endTimeId': 'endTime' },
- 'outputData': {}
- },
- 'events': {},
- 'name': 'time'
- }, {
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'type': 'customData',
- 'dimensions': { 'width': 100, 'height': 100 },
- 'computedPosition': { 'x': 202.86901500385937, 'y': -165.53728049272314, 'z': 0 },
- 'handleBounds': {
- 'source': [{
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-s',
- 'type': 'source',
- 'nodeId': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'position': 'right',
- 'x': 97,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-t',
- 'type': 'target',
- 'nodeId': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'position': 'left',
- 'x': -3,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 202.86901500385937, 'y': -165.53728049272314 },
- 'data': {
- 'label': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'options': {},
- 'outputData': {
- 'time': ['2025-01-01 00:00:00', '2025-01-03 00:00:00', '2025-01-05 00:00:00'],
- 'value': [20, 30, 40]
- },
- 'customData': {
- 'inputData': [{ 'name': 'startTime' }, { 'name': 'endTime' }],
- 'outputData': [{ 'name': 'time', 'remark': '时间', 'tier': 'data,map%time' }, {
- 'name': 'value',
- 'remark': '值',
- 'tier': 'data,map%value'
- }],
- 'name': '测试2',
- 'url': 'http://localhost:3000/test/getDevice',
- 'method': 'post'
- }
- },
- 'events': {},
- 'name': 'customData'
- }, {
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'type': 'map',
- 'dimensions': { 'width': 100, 'height': 30 },
- 'computedPosition': { 'x': 384.9109165002872, 'y': -88.45647535459605, 'z': 1000 },
- 'handleBounds': {
- 'source': [{
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-s',
- 'type': 'source',
- 'nodeId': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'position': 'right',
- 'x': 97,
- 'y': 12,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-t',
- 'type': 'target',
- 'nodeId': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'position': 'left',
- 'x': -3,
- 'y': 12,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': true,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 384.9109165002872, 'y': -88.45647535459605 },
- 'data': {
- 'label': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'options': { 'dataMap': [{ 'source': 'value', 'target': 'y1' }, { 'source': 'time', 'target': 'x1' }] },
- 'outputData': {
- 'time': ['2025-01-01 00:00:00', '2025-01-03 00:00:00', '2025-01-05 00:00:00'],
- 'value': [20, 30, 40]
- }
- },
- 'events': {},
- 'name': 'map'
- }, {
- 'id': 'line_650b8add_cbce_402a_a8e5_2c5769526772',
- 'type': 'line',
- 'dimensions': { 'width': 300, 'height': 150 },
- 'computedPosition': { 'x': 144.31114508758668, 'y': 202.1298087493107, 'z': 0 },
- 'handleBounds': {
- 'source': null,
- 'target': [{
- 'id': 'line_650b8add_cbce_402a_a8e5_2c5769526772.-t',
- 'type': 'target',
- 'nodeId': 'line_650b8add_cbce_402a_a8e5_2c5769526772',
- 'position': 'left',
- 'x': -3,
- 'y': 71.99951171875,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 144.31114508758668, 'y': 202.1298087493107 },
- 'data': { 'label': 'line_650b8add_cbce_402a_a8e5_2c5769526772', 'options': {}, 'outputData': {} },
- 'events': {},
- 'name': 'line'
- }]);
-const edges = ref([
- {
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b---customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'type': 'bezier',
- 'source': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'target': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'sourceHandle': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b.-s',
- 'data': {},
- 'events': {},
- 'label': '',
- 'animated': true,
- 'markerEnd': 'arrowclosed',
- 'style': { 'stroke': '#409EFF' },
- 'sourceNode': {
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'type': 'time',
- 'dimensions': { 'width': 100, 'height': 100 },
- 'computedPosition': { 'x': 30.66721629102227, 'y': 21.424672395499982, 'z': 0 },
- 'handleBounds': {
- 'source': [{
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b.-s',
- 'type': 'source',
- 'nodeId': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'position': 'right',
- 'x': 97,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b.-t',
- 'type': 'target',
- 'nodeId': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'position': 'left',
- 'x': -3,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 30.66721629102227, 'y': 21.424672395499982 },
- 'data': {
- 'label': 'time_a3f53d63_2a0c_4be6_9530_0ee8566e0e2b',
- 'options': { 'startTimeId': 'startTime', 'endTimeId': 'endTime' },
- 'outputData': {}
- },
- 'events': {},
- 'name': 'time'
- },
- 'targetNode': {
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'type': 'customData',
- 'dimensions': { 'width': 100, 'height': 100 },
- 'computedPosition': { 'x': 202.86901500385937, 'y': -165.53728049272314, 'z': 0 },
- 'handleBounds': {
- 'source': [{
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-s',
- 'type': 'source',
- 'nodeId': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'position': 'right',
- 'x': 97,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-t',
- 'type': 'target',
- 'nodeId': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'position': 'left',
- 'x': -3,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 202.86901500385937, 'y': -165.53728049272314 },
- 'data': {
- 'label': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'options': {},
- 'outputData': {
- 'time': ['2025-01-01 00:00:00', '2025-01-03 00:00:00', '2025-01-05 00:00:00'],
- 'value': [20, 30, 40]
- },
- 'customData': {
- 'inputData': [{ 'name': 'startTime' }, { 'name': 'endTime' }],
- 'outputData': [{ 'name': 'time', 'remark': '时间', 'tier': 'data,map%time' }, {
- 'name': 'value',
- 'remark': '值',
- 'tier': 'data,map%value'
- }],
- 'name': '测试2',
- 'url': 'http://localhost:3000/test/getDevice',
- 'method': 'post'
- }
- },
- 'events': {},
- 'name': 'customData'
- },
- 'sourceX': 133.66721629102227,
- 'sourceY': 71.42467239549998,
- 'targetX': 199.86901500385937,
- 'targetY': -115.53728049272314
- }, {
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699---map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'type': 'bezier',
- 'source': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'target': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'sourceHandle': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-s',
- 'data': {},
- 'events': {},
- 'label': '',
- 'animated': true,
- 'markerEnd': 'arrowclosed',
- 'style': { 'stroke': '#409EFF' },
- 'sourceNode': {
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'type': 'customData',
- 'dimensions': { 'width': 100, 'height': 100 },
- 'computedPosition': { 'x': 202.86901500385937, 'y': -165.53728049272314, 'z': 0 },
- 'handleBounds': {
- 'source': [{
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-s',
- 'type': 'source',
- 'nodeId': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'position': 'right',
- 'x': 97,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699.-t',
- 'type': 'target',
- 'nodeId': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'position': 'left',
- 'x': -3,
- 'y': 47,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 202.86901500385937, 'y': -165.53728049272314 },
- 'data': {
- 'label': 'customData_de7fe6a5_adeb_4c96_9cf4_0c76df770699',
- 'options': {},
- 'outputData': {
- 'time': ['2025-01-01 00:00:00', '2025-01-03 00:00:00', '2025-01-05 00:00:00'],
- 'value': [20, 30, 40]
- },
- 'customData': {
- 'inputData': [{ 'name': 'startTime' }, { 'name': 'endTime' }],
- 'outputData': [{ 'name': 'time', 'remark': '时间', 'tier': 'data,map%time' }, {
- 'name': 'value',
- 'remark': '值',
- 'tier': 'data,map%value'
- }],
- 'name': '测试2',
- 'url': 'http://localhost:3000/test/getDevice',
- 'method': 'post'
- }
- },
- 'events': {},
- 'name': 'customData'
- },
- 'targetNode': {
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'type': 'map',
- 'dimensions': { 'width': 100, 'height': 30 },
- 'computedPosition': { 'x': 384.9109165002872, 'y': -88.45647535459605, 'z': 1000 },
- 'handleBounds': {
- 'source': [{
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-s',
- 'type': 'source',
- 'nodeId': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'position': 'right',
- 'x': 97,
- 'y': 12,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-t',
- 'type': 'target',
- 'nodeId': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'position': 'left',
- 'x': -3,
- 'y': 12,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': true,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 384.9109165002872, 'y': -88.45647535459605 },
- 'data': {
- 'label': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'options': { 'dataMap': [{ 'source': 'value', 'target': 'y1' }, { 'source': 'time', 'target': 'x1' }] },
- 'outputData': {
- 'time': ['2025-01-01 00:00:00', '2025-01-03 00:00:00', '2025-01-05 00:00:00'],
- 'value': [20, 30, 40]
- }
- },
- 'events': {},
- 'name': 'map'
- },
- 'sourceX': 305.8690150038594,
- 'sourceY': -115.53728049272314,
- 'targetX': 381.9109165002872,
- 'targetY': -73.45647535459605
- }, {
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3---line_650b8add_cbce_402a_a8e5_2c5769526772',
- 'type': 'bezier',
- 'source': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'target': 'line_650b8add_cbce_402a_a8e5_2c5769526772',
- 'sourceHandle': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-s',
- 'data': {},
- 'events': {},
- 'label': '',
- 'animated': true,
- 'markerEnd': 'arrowclosed',
- 'style': { 'stroke': '#409EFF' },
- 'sourceNode': {
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'type': 'map',
- 'dimensions': { 'width': 100, 'height': 30 },
- 'computedPosition': { 'x': 384.9109165002872, 'y': -88.45647535459605, 'z': 1000 },
- 'handleBounds': {
- 'source': [{
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-s',
- 'type': 'source',
- 'nodeId': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'position': 'right',
- 'x': 97,
- 'y': 12,
- 'width': 6,
- 'height': 6
- }],
- 'target': [{
- 'id': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3.-t',
- 'type': 'target',
- 'nodeId': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'position': 'left',
- 'x': -3,
- 'y': 12,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': true,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 384.9109165002872, 'y': -88.45647535459605 },
- 'data': {
- 'label': 'map_54688bd0_db73_4f96_be55_c72beb0b33d3',
- 'options': { 'dataMap': [{ 'source': 'value', 'target': 'y1' }, { 'source': 'time', 'target': 'x1' }] },
- 'outputData': {
- 'time': ['2025-01-01 00:00:00', '2025-01-03 00:00:00', '2025-01-05 00:00:00'],
- 'value': [20, 30, 40]
- }
- },
- 'events': {},
- 'name': 'map'
- },
- 'targetNode': {
- 'id': 'line_650b8add_cbce_402a_a8e5_2c5769526772',
- 'type': 'line',
- 'dimensions': { 'width': 300, 'height': 150 },
- 'computedPosition': { 'x': 144.31114508758668, 'y': 202.1298087493107, 'z': 0 },
- 'handleBounds': {
- 'source': null,
- 'target': [{
- 'id': 'line_650b8add_cbce_402a_a8e5_2c5769526772.-t',
- 'type': 'target',
- 'nodeId': 'line_650b8add_cbce_402a_a8e5_2c5769526772',
- 'position': 'left',
- 'x': -3,
- 'y': 71.99951171875,
- 'width': 6,
- 'height': 6
- }]
- },
- 'selected': false,
- 'dragging': false,
- 'resizing': false,
- 'initialized': false,
- 'isParent': false,
- 'position': { 'x': 144.31114508758668, 'y': 202.1298087493107 },
- 'data': { 'label': 'line_650b8add_cbce_402a_a8e5_2c5769526772', 'options': {}, 'outputData': {} },
- 'events': {},
- 'name': 'line'
- },
- 'sourceX': 487.9109165002872,
- 'sourceY': -73.45647535459605,
- 'targetX': 141.31114508758668,
- 'targetY': 277.1293204680607
- }]);
+const nodes = ref([]);
+const edges = ref([]);
const area = ref({
width: 1910,
height: 970
@@ -555,11 +88,18 @@ const getInputData = (e) => {
});
return outputData;
};
+onMounted(() => {
+ nodes.value = JSON.parse(localStorage.getItem('NODES') || '[]');
+ edges.value = JSON.parse(localStorage.getItem('EDGES') || '[]');
+ area.value = JSON.parse(localStorage.getItem('PAGEDATA'));
+});