|
|
|
@ -10,6 +10,46 @@
|
|
|
|
|
</template>
|
|
|
|
|
折线
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'multiLines')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
多折线
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'curve')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
曲线
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'multiCurves')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
多曲线
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'bar')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
柱状图
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'multiBars')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
多柱状图
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'customBoard')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
@ -49,6 +89,14 @@
|
|
|
|
|
</template>
|
|
|
|
|
映射
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'text')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
文字
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'inputNode')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
@ -65,51 +113,97 @@
|
|
|
|
|
</template>
|
|
|
|
|
时间
|
|
|
|
|
</el-card>
|
|
|
|
|
<el-card style="width: 80px" shadow="never" :draggable="true"
|
|
|
|
|
@dragstart="onDragStart($event, 'img')" :style="{display:'inline-block',margin:'0 4px 4px 0'}"
|
|
|
|
|
:body-style="{padding:'4px 0'}">
|
|
|
|
|
<template #header>
|
|
|
|
|
<StarFilled />
|
|
|
|
|
</template>
|
|
|
|
|
图片
|
|
|
|
|
</el-card>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="content" @drop="onDrop">
|
|
|
|
|
<VueFlow :min-zoom="0.01" ref="flowRef" v-model:nodes="nodes" v-model:edges="edges" fit-view-on-init
|
|
|
|
|
default-marker-color="#409EFF"
|
|
|
|
|
@connect="logEvent('connect', $event)"
|
|
|
|
|
@node-click="logEvent('click', $event)"
|
|
|
|
|
@node-contextMenu="logEvent('contextmenu', $event)"
|
|
|
|
|
@dragover="onDragOver"
|
|
|
|
|
>
|
|
|
|
|
<Background :size="1" :gap="20" pattern-color="#BDBDBD" style="background-color: #000" />
|
|
|
|
|
<div class="pageSetting">
|
|
|
|
|
<span class="pageTitle">{{ pageTitle }}</span>
|
|
|
|
|
<div class="btns">
|
|
|
|
|
<el-button type="primary" text :icon="Setting" @click="pageSetting">页面配置</el-button>
|
|
|
|
|
<el-button type="primary" text :icon="Check" @click="save">保存</el-button>
|
|
|
|
|
<el-button type="primary" text :icon="Close" @click="clear">清空</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flowArea">
|
|
|
|
|
<VueFlow :min-zoom="0.01" ref="flowRef" v-model:nodes="nodes" v-model:edges="edges" fit-view-on-init
|
|
|
|
|
default-marker-color="#409EFF"
|
|
|
|
|
@connect="logEvent('connect', $event)"
|
|
|
|
|
@node-click="logEvent('click', $event)"
|
|
|
|
|
@node-contextMenu="logEvent('contextmenu', $event)"
|
|
|
|
|
@dragover="onDragOver"
|
|
|
|
|
>
|
|
|
|
|
<Background :size="1" :gap="20" pattern-color="#BDBDBD" style="background-color: #000" />
|
|
|
|
|
|
|
|
|
|
<template #node-area="areaNodeProps">
|
|
|
|
|
<AreaNode v-bind="areaNodeProps"></AreaNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-customBoard="customBoardNodeProps">
|
|
|
|
|
<CustomBoardNode :inputData=getInputData(customBoardNodeProps.id) v-bind="customBoardNodeProps"
|
|
|
|
|
@resize="resize"></CustomBoardNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-customData="customDataNodeProps">
|
|
|
|
|
<CustomDataNode :inputData=getInputData(customDataNodeProps.id) v-bind="customDataNodeProps"
|
|
|
|
|
@resize="resize"></CustomDataNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-line="lineNodeProps">
|
|
|
|
|
<LineNode :inputData=getInputData(lineNodeProps.id) v-bind="lineNodeProps"
|
|
|
|
|
@resize="resize"></LineNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-data="dataNodeProps">
|
|
|
|
|
<DataNode :inputData=getInputData(dataNodeProps.id) v-bind="dataNodeProps"
|
|
|
|
|
@resize="resize"></DataNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-inputNode="inputNodeProps">
|
|
|
|
|
<InputNode :inputData=getInputData(inputNodeProps.id) v-bind="inputNodeProps"
|
|
|
|
|
@resize="resize"></InputNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-time="timeNodeProps">
|
|
|
|
|
<TimeNode :inputData=getInputData(timeNodeProps.id) v-bind="timeNodeProps"
|
|
|
|
|
@resize="resize"></TimeNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-map="mapNodeProps">
|
|
|
|
|
<MapNode :inputData=getInputData(mapNodeProps.id) v-bind="mapNodeProps"
|
|
|
|
|
@resize="resize"></MapNode>
|
|
|
|
|
</template>
|
|
|
|
|
</VueFlow>
|
|
|
|
|
<template #node-area="areaNodeProps">
|
|
|
|
|
<AreaNode v-bind="areaNodeProps" :pageData="pageData"></AreaNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-customBoard="customBoardNodeProps">
|
|
|
|
|
<CustomBoardNode :inputData=getInputData(customBoardNodeProps.id) v-bind="customBoardNodeProps"
|
|
|
|
|
@resize="resize"></CustomBoardNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-customData="customDataNodeProps">
|
|
|
|
|
<CustomDataNode :inputData=getInputData(customDataNodeProps.id) v-bind="customDataNodeProps"
|
|
|
|
|
@resize="resize"></CustomDataNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-line="lineNodeProps">
|
|
|
|
|
<LineNode :inputData=getInputData(lineNodeProps.id) v-bind="lineNodeProps"
|
|
|
|
|
@resize="resize"></LineNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-multiLines="multiLinesNodeProps">
|
|
|
|
|
<MultiLinesNode :inputData=getInputData(multiLinesNodeProps.id) v-bind="multiLinesNodeProps"
|
|
|
|
|
@resize="resize"></MultiLinesNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-curve="curveNodeProps">
|
|
|
|
|
<CurveNode :inputData=getInputData(curveNodeProps.id) v-bind="curveNodeProps"
|
|
|
|
|
@resize="resize"></CurveNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-multiCurves="multiCurvesNodeProps">
|
|
|
|
|
<MultiCurvesNode :inputData=getInputData(multiCurvesNodeProps.id) v-bind="multiCurvesNodeProps"
|
|
|
|
|
@resize="resize"></MultiCurvesNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-bar="barNodeProps">
|
|
|
|
|
<BarNode :inputData=getInputData(barNodeProps.id) v-bind="barNodeProps"
|
|
|
|
|
@resize="resize"></BarNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-multiBars="multiBarsNodeProps">
|
|
|
|
|
<MultiBarsNode :inputData=getInputData(multiBarsNodeProps.id) v-bind="multiBarsNodeProps"
|
|
|
|
|
@resize="resize"></MultiBarsNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-data="dataNodeProps">
|
|
|
|
|
<DataNode :inputData=getInputData(dataNodeProps.id) v-bind="dataNodeProps"
|
|
|
|
|
@resize="resize"></DataNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-text="textNodeProps">
|
|
|
|
|
<TextNode :inputData=getInputData(textNodeProps.id) v-bind="textNodeProps"
|
|
|
|
|
@resize="resize"></TextNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-img="imgNodeProps">
|
|
|
|
|
<ImgNode :inputData=getInputData(imgNodeProps.id) v-bind="imgNodeProps"
|
|
|
|
|
@resize="resize"></ImgNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-inputNode="inputNodeProps">
|
|
|
|
|
<InputNode :inputData=getInputData(inputNodeProps.id) v-bind="inputNodeProps"
|
|
|
|
|
@resize="resize"></InputNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-time="timeNodeProps">
|
|
|
|
|
<TimeNode :inputData=getInputData(timeNodeProps.id) v-bind="timeNodeProps"
|
|
|
|
|
@resize="resize"></TimeNode>
|
|
|
|
|
</template>
|
|
|
|
|
<template #node-map="mapNodeProps">
|
|
|
|
|
<MapNode :inputData=getInputData(mapNodeProps.id) v-bind="mapNodeProps"
|
|
|
|
|
@resize="resize"></MapNode>
|
|
|
|
|
</template>
|
|
|
|
|
</VueFlow>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="rightPanel">
|
|
|
|
|
<el-form :model="nodeAttrForm" label-width="auto" style="max-width: 600px" v-if="nodeAttrForm">
|
|
|
|
@ -146,26 +240,100 @@
|
|
|
|
|
添加映射
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="内容" v-if="Object.keys(nodeAttrForm).includes('text')">
|
|
|
|
|
<el-input v-model="nodeAttrForm.text" style="width: 100%" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="对齐方式" v-if="Object.keys(nodeAttrForm).includes('align')">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="nodeAttrForm.align"
|
|
|
|
|
placeholder="Select"
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
label="左对齐"
|
|
|
|
|
value="left"
|
|
|
|
|
/>
|
|
|
|
|
<el-option
|
|
|
|
|
label="居中对齐"
|
|
|
|
|
value="center"
|
|
|
|
|
/>
|
|
|
|
|
<el-option
|
|
|
|
|
label="右对齐"
|
|
|
|
|
value="right"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="文字颜色" v-if="Object.keys(nodeAttrForm).includes('color')">
|
|
|
|
|
<el-color-picker v-model="nodeAttrForm.color" show-alpha />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="图片路径" v-if="Object.keys(nodeAttrForm).includes('imgSrc')">
|
|
|
|
|
<el-input v-model="nodeAttrForm.imgSrc" style="width: 100%" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="标题" v-if="Object.keys(nodeAttrForm).includes('title')">
|
|
|
|
|
<el-input v-model="nodeAttrForm.title" style="width: 100%" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="数据名称" v-if="Object.keys(nodeAttrForm).includes('yNames')">
|
|
|
|
|
<el-input-tag v-model="nodeAttrForm.yNames" placeholder="回车确认" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
{{ nodes }}
|
|
|
|
|
<br />
|
|
|
|
|
---
|
|
|
|
|
<br />
|
|
|
|
|
{{ edges }}
|
|
|
|
|
</div>
|
|
|
|
|
<el-dialog v-model="pageSettingVisible" title="页面设置" width="500">
|
|
|
|
|
<el-form :model="pageSettingForm">
|
|
|
|
|
<el-form-item label="页面大小" label-width="80px">
|
|
|
|
|
<el-input v-model="pageSettingForm.width" style="width: calc(50% - 10px)" autocomplete="off"
|
|
|
|
|
placeholder="缺省则为不限制" />
|
|
|
|
|
<span style="width: 20px;text-align: center">
|
|
|
|
|
X
|
|
|
|
|
</span>
|
|
|
|
|
<el-input v-model="pageSettingForm.height" style="width: calc(50% - 10px)" autocomplete="off"
|
|
|
|
|
placeholder="缺省则为不限制" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="页面背景" label-width="80px">
|
|
|
|
|
<el-upload
|
|
|
|
|
class="avatar-uploader"
|
|
|
|
|
action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15"
|
|
|
|
|
:show-file-list="false"
|
|
|
|
|
:limit="1"
|
|
|
|
|
accept=".jpg,.png"
|
|
|
|
|
:before-upload="pageBgUploadSuccess"
|
|
|
|
|
>
|
|
|
|
|
<img v-if="pageSettingForm.bg" :src="pageSettingForm.bg" class="avatar" />
|
|
|
|
|
<el-icon v-else class="avatar-uploader-icon">
|
|
|
|
|
<Plus />
|
|
|
|
|
</el-icon>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="pageSettingVisible = false">取消</el-button>
|
|
|
|
|
<el-button type="primary" @click="setPageData">
|
|
|
|
|
确定
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
import { Setting, Check, Close, Plus } from '@element-plus/icons-vue';
|
|
|
|
|
import { MarkerType, VueFlow, useVueFlow } from '@vue-flow/core';
|
|
|
|
|
import { Background } from '@vue-flow/background';
|
|
|
|
|
import { StarFilled } from '@element-plus/icons-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 CustomBoardNode from './nodes/board/customBoardNode.vue';
|
|
|
|
|
import DataNode from './nodes/data/dataNode.vue';
|
|
|
|
|
import CustomDataNode from './nodes/data/customDataNode.vue';
|
|
|
|
|
import MapNode from './nodes/form/mapNode.vue';
|
|
|
|
|
import InputNode from './nodes/form/inputNode.vue';
|
|
|
|
|
import TimeNode from './nodes/form/timeNode.vue';
|
|
|
|
|
import TextNode from './nodes/form/textNode.vue';
|
|
|
|
|
import ImgNode from './nodes/form/imgNode.vue';
|
|
|
|
|
import AreaNode from './nodes/other/areaNode.vue';
|
|
|
|
|
import tool from './tool';
|
|
|
|
|
|
|
|
|
@ -178,520 +346,29 @@ const {
|
|
|
|
|
addEdges
|
|
|
|
|
} = useVueFlow();
|
|
|
|
|
|
|
|
|
|
const pageSettingVisible = ref(false);
|
|
|
|
|
const pageSettingForm = ref({});
|
|
|
|
|
const pageTitle = ref('页面名称');
|
|
|
|
|
const leftPanelState = ref('1');
|
|
|
|
|
const areaId = `area_${uuidv4().replaceAll('-', '_')}`;
|
|
|
|
|
// const nodes = ref([{
|
|
|
|
|
// id: areaId,
|
|
|
|
|
// name: 'area',
|
|
|
|
|
// type: 'area',
|
|
|
|
|
// position: {
|
|
|
|
|
// x: 0,
|
|
|
|
|
// y: 0
|
|
|
|
|
// },
|
|
|
|
|
// data: { label: areaId }
|
|
|
|
|
// }]);
|
|
|
|
|
// const edges = ref([]);
|
|
|
|
|
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 pageData = ref({});
|
|
|
|
|
const nodes = ref([{
|
|
|
|
|
id: `area_${uuidv4().replaceAll('-', '_')}`,
|
|
|
|
|
name: 'area',
|
|
|
|
|
type: 'area',
|
|
|
|
|
position: {
|
|
|
|
|
x: 0,
|
|
|
|
|
y: 0
|
|
|
|
|
},
|
|
|
|
|
data: {}
|
|
|
|
|
}]);
|
|
|
|
|
const edges = ref([]);
|
|
|
|
|
const customData = ref([]);
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
customData.value = JSON.parse(localStorage.getItem('DATANODE') || '[]');
|
|
|
|
|
await nextTick();
|
|
|
|
|
nodes.value = reactive(JSON.parse(localStorage.getItem('NODES') || '[]'));
|
|
|
|
|
edges.value = JSON.parse(localStorage.getItem('EDGES') || '[]');
|
|
|
|
|
pageData.value = JSON.parse(localStorage.getItem('PAGEDATA'));
|
|
|
|
|
});
|
|
|
|
|
const nodeAttrForm = ref({});
|
|
|
|
|
const logEvent = async (eventname, event) => {
|
|
|
|
@ -746,10 +423,76 @@ const getInputData = (e) => {
|
|
|
|
|
});
|
|
|
|
|
return outputData;
|
|
|
|
|
};
|
|
|
|
|
const pageSetting = () => {
|
|
|
|
|
pageSettingVisible.value = true;
|
|
|
|
|
pageSettingForm.value = JSON.parse(localStorage.getItem('PAGEDATA'));
|
|
|
|
|
};
|
|
|
|
|
const save = () => {
|
|
|
|
|
console.log(nodes.value);
|
|
|
|
|
localStorage.setItem('NODES', JSON.stringify(nodes.value.map(e => {
|
|
|
|
|
let data = {};
|
|
|
|
|
let savaField = ['customData', 'options'];
|
|
|
|
|
Object.keys(e.data).forEach((key) => {
|
|
|
|
|
if (savaField.includes(key)) {
|
|
|
|
|
data[key] = e.data[key];
|
|
|
|
|
} else {
|
|
|
|
|
if (Array.isArray(e.data[key])) {
|
|
|
|
|
data[key] = [];
|
|
|
|
|
} else if (e.data[key] && typeof e.data[key] === 'object' && !Array.isArray(e.data[key])) {
|
|
|
|
|
data[key] = {};
|
|
|
|
|
} else {
|
|
|
|
|
data[key] = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
return {
|
|
|
|
|
id: e.id,
|
|
|
|
|
name: e.name,
|
|
|
|
|
dimensions: e.dimensions,
|
|
|
|
|
position: e.position,
|
|
|
|
|
type: e.type,
|
|
|
|
|
data: data
|
|
|
|
|
};
|
|
|
|
|
})));
|
|
|
|
|
localStorage.setItem('EDGES', JSON.stringify(edges.value));
|
|
|
|
|
};
|
|
|
|
|
const clear = () => {
|
|
|
|
|
nodes.value = [{
|
|
|
|
|
id: `area_${uuidv4().replaceAll('-', '_')}`,
|
|
|
|
|
name: 'area',
|
|
|
|
|
type: 'area',
|
|
|
|
|
position: {
|
|
|
|
|
x: 0,
|
|
|
|
|
y: 0
|
|
|
|
|
},
|
|
|
|
|
data: {}
|
|
|
|
|
}];
|
|
|
|
|
edges.value = [];
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
const pageBgUploadSuccess = (file) => {
|
|
|
|
|
const getFileText = (file) => {
|
|
|
|
|
const reader = new FileReader();
|
|
|
|
|
reader.onload = function(e) {
|
|
|
|
|
const fileContent = e.target.result;
|
|
|
|
|
console.log(fileContent);
|
|
|
|
|
pageSettingForm.value.bg = fileContent;
|
|
|
|
|
};
|
|
|
|
|
reader.readAsDataURL(file);
|
|
|
|
|
};
|
|
|
|
|
getFileText(file);
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
const setPageData = () => {
|
|
|
|
|
pageData.value = JSON.parse(JSON.stringify(pageSettingForm.value));
|
|
|
|
|
localStorage.setItem('PAGEDATA', JSON.stringify(pageData.value));
|
|
|
|
|
pageSettingVisible.value = false;
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|
:deep(.vue-flow__node-area) {
|
|
|
|
|
z-index: 0 !important;
|
|
|
|
|
z-index: -1 !important;
|
|
|
|
|
pointer-events: none !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -760,14 +503,44 @@ const getInputData = (e) => {
|
|
|
|
|
width: 300px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border-right: 1px solid #409EFF;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.content {
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 320px;
|
|
|
|
|
width: calc(100% - 320px - 320px);
|
|
|
|
|
left: 300px;
|
|
|
|
|
width: calc(100% - 300px - 300px);
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
.pageSetting {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 50px;
|
|
|
|
|
border-bottom: 1px solid #409EFF;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
.pageTitle {
|
|
|
|
|
line-height: 50px;
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.btns {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 8px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
line-height: 50px;
|
|
|
|
|
|
|
|
|
|
button {
|
|
|
|
|
vertical-align: inherit;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.flowArea {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100% - 50px);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rightPanel {
|
|
|
|
@ -777,5 +550,27 @@ const getInputData = (e) => {
|
|
|
|
|
width: 300px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
border-left: 1px solid #409EFF;
|
|
|
|
|
overflow: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.avatar-uploader) .el-upload {
|
|
|
|
|
border: 1px dashed var(--el-border-color);
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
position: relative;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
transition: var(--el-transition-duration-fast);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.avatar-uploader) .el-upload:hover {
|
|
|
|
|
border-color: var(--el-color-primary);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:deep(.el-icon.avatar-uploader-icon) {
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
width: 178px;
|
|
|
|
|
height: 178px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|