data.js
2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* @Date: 2023-10-27 09:29:48
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2023-12-01 17:40:28
* @FilePath: /vue-flow-editor/doc/data.js
* @Description: 初始化结构,数据都是固定的
*/
import { v4 as uuidv4 } from 'uuid';
const flow_id = uuidv4();
const cc_id = uuidv4();
export const AppData = {
nodes: [
{
id: 'start-node',
x: 225,
y: 100,
text: '开始',
desc: '',
control: 'start',
index: 1
},
{
id: flow_id,
x: 225,
y: 210,
text: '流程节点',
desc: '',
control: 'flow',
index: 2
},
// {
// id: '1700459406515',
// x: -25,
// y: 260,
// text: '流程节点test',
// desc: '',
// control: 'flow',
// },
{
id: cc_id,
x: 465,
y: 210,
text: '抄送节点',
desc: '',
control: 'cc',
index: 3
},
{
id: 'end-node',
x: 225,
y: 335,
text: '结束',
desc: '',
control: 'end',
index: 4
},
],
edges: [
{
shape: 'flow-polyline-round',
source: 'start-node',
sourceAnchor: 2,
target: flow_id,
targetAnchor: 0,
},
{
shape: 'flow-polyline-round',
source: flow_id,
sourceAnchor: 2,
target: 'end-node',
targetAnchor: 0,
},
{
shape: 'flow-polyline-round',
source: flow_id,
sourceAnchor: 3,
target: cc_id,
targetAnchor: 1,
},
// {
// source : "start-node",
// sourceAnchor : 1,
// target : "1700459406515",
// targetAnchor : 0
// },
// {
// source : "1700459406515",
// sourceAnchor : 2,
// target : "end-node",
// targetAnchor : 1
// }
],
}