flow.js
4.5 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
export default {
namespaced: true,
state: {
showGrid: false,
type: 'mesh',
size: 10,
color: '#e5e5e5',
thickness: 1,
colorSecond: '#d0d0d0',
thicknessSecond: 1,
factor: 4,
bgColor: '#e5e5e5',
showImage: false,
repeat: 'watermark',
angle: 30,
position: 'center',
bgSize: JSON.stringify({ width: 150, height: 150 }),
opacity: 0.9,
strokeWidth: 4,
outStrokeWidth: 7,
stroke: '#cfe7f2',
outStroke: '#456d89',
strokeDasharray: 1,
animation: 0,
connector: 'normal',
edgeRouter: 'metro',
edgeOffset: 32,
edgeDirection: 'H',
label:'',
nodeStroke: '#5F95FF',
nodeStrokeWidth: 1,
nodeFill: '#ffffff',
// nodeImageWidth: 60,
// nodeImageHeight: 60,
portId: '',
portX: 0,
portY: 0,
portColor: '#5F95FF',
portFill: '#FFF',
ZIndex: 0,
nodeFontSize: 12,
nodeColor: '#080808',
// 业务数据
nodeStatus: 0,
nodePointCode: '52',
nodeFieldName: 'fieldName1',
nodeType: '' // 节点类型(text、image)
},
mutations: {
updateshowGrid(state, showGrid) {
state.showGrid = showGrid
},
updatetype(state, type) {
state.type = type
},
updatesize(state, size) {
state.size = size
},
updatecolor(state, color) {
state.color = color
},
updatethickness(state, thickness) {
state.thickness = thickness
},
updatecolorSecond(state, colorSecond) {
state.colorSecond = colorSecond
},
updatethicknessSecond(state, thicknessSecond) {
state.thicknessSecond = thicknessSecond
},
updatefactor(state, factor) {
state.factor = factor
},
updatebgColor(state, bgColor) {
state.bgColor = bgColor
},
updateshowImage(state, showImage) {
state.showImage = showImage
},
updaterepeat(state, repeat) {
state.repeat = repeat
},
updateangle(state, angle) {
state.angle = angle
},
updateposition(state, position) {
state.position = position
},
updatebgSize(state, bgSize) {
state.bgSize = bgSize
},
updateopacity(state, opacity) {
state.opacity = opacity
},
updatestrokeWidth(state, strokeWidth) {
state.strokeWidth = strokeWidth
},
updateoutStrokeWidth(state, outStrokeWidth) {
state.outStrokeWidth = outStrokeWidth
},
updatestroke(state, stroke) {
state.stroke = stroke
},
updateoutStroke(state, outStroke) {
state.outStroke = outStroke
},
updatestrokeDasharray(state, strokeDasharray) {
state.strokeDasharray = strokeDasharray
},
updateanimation(state, animation) {
state.animation = animation
},
updateconnector(state, connector) {
state.connector = connector
},
updateedgeRouter(state, edgeRouter) {
state.edgeRouter = edgeRouter
},
updateedgeOffset(state, edgeOffset) {
state.edgeOffset = edgeOffset
},
updateedgeDirection(state, edgeDirection) {
state.edgeDirection = edgeDirection
},
updatelabel(state, label) {
state.label = label
},
updatenodeStroke(state, nodeStroke) {
state.nodeStroke = nodeStroke
},
updatenodeStrokeWidth(state, nodeStrokeWidth) {
state.nodeStrokeWidth = nodeStrokeWidth
},
updatenodeFill(state, nodeFill) {
state.nodeFill = nodeFill
},
// updatenodeImageWidth(state, nodeImageWidth) {
// state.nodeImageWidth = nodeImageWidth
// },
// updatenodeImageHeight(state, nodeImageHeight) {
// state.nodeImageHeight = nodeImageHeight
// },
updateportId(state, portId) {
state.portId = portId
},
updateportX(state, portX) {
state.portX = portX
},
updateportY(state, portY) {
state.portY = portY
},
updateportColor(state, portColor) {
state.portColor = portColor
},
updateportFill(state, portFill) {
state.portFill = portFill
},
updateZIndex(state, ZIndex) {
state.ZIndex = ZIndex
},
updatenodeFontSize(state, nodeFontSize) {
state.nodeFontSize = nodeFontSize
},
updatenodeColor(state, nodeColor) {
state.nodeColor = nodeColor
},
updatenodeStatus(state, nodeStatus) {
state.nodeStatus = nodeStatus
},
updatenodePointCode(state, nodePointCode) {
state.nodePointCode = nodePointCode
},
updatenodeFieldName(state, nodeFieldName) {
state.nodeFieldName = nodeFieldName
},
updatenodeType(state, nodeType) {
state.nodeType = nodeType
}
}
}