w-flow-vue 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +9 -0
- package/.eslintignore +3 -0
- package/.eslintrc.js +55 -0
- package/.jsdoc +25 -0
- package/AGENT.md +223 -0
- package/LICENSE +21 -0
- package/README.md +37 -0
- package/SECURITY.md +5 -0
- package/babel.config.js +16 -0
- package/dist/w-flow-vue.umd.js +15 -0
- package/dist/w-flow-vue.umd.js.map +1 -0
- package/docs/components_WFlowVue.vue.html +1214 -0
- package/docs/examples/app.html +62 -0
- package/docs/examples/app.umd.js +20 -0
- package/docs/examples/app.umd.js.map +1 -0
- package/docs/examples/ex-AppBasic.html +440 -0
- package/docs/examples/ex-AppConnectivity.html +131 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/global.html +1919 -0
- package/docs/index.html +84 -0
- package/docs/js_defaults.mjs.html +105 -0
- package/docs/js_edge-path.mjs.html +237 -0
- package/docs/js_geometry.mjs.html +298 -0
- package/docs/js_graph.mjs.html +103 -0
- package/docs/js_step-routing.mjs.html +346 -0
- package/docs/module-WFlowVue.html +2790 -0
- package/docs/scripts/collapse.js +39 -0
- package/docs/scripts/commonNav.js +28 -0
- package/docs/scripts/linenumber.js +25 -0
- package/docs/scripts/nav.js +12 -0
- package/docs/scripts/polyfill.js +4 -0
- package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/scripts/prettify/lang-css.js +2 -0
- package/docs/scripts/prettify/prettify.js +28 -0
- package/docs/scripts/search.js +99 -0
- package/docs/styles/jsdoc.css +776 -0
- package/docs/styles/prettify.css +80 -0
- package/jest.config.js +20 -0
- package/package.json +80 -0
- package/public/index.html +38 -0
- package/script.txt +22 -0
- package/src/App.vue +326 -0
- package/src/AppBasic.vue +125 -0
- package/src/AppConnectivity.vue +186 -0
- package/src/components/WFlowVue.vue +1142 -0
- package/src/components/canvas/BackgroundLayer.vue +78 -0
- package/src/components/canvas/FlowCanvas.vue +64 -0
- package/src/components/canvas/SelectionBox.vue +36 -0
- package/src/components/canvas/ViewportTransform.vue +35 -0
- package/src/components/edges/ConnectionLine.vue +65 -0
- package/src/components/edges/EdgeMarkerDefs.vue +76 -0
- package/src/components/edges/EdgeRenderer.vue +120 -0
- package/src/components/edges/EdgeWrapper.vue +379 -0
- package/src/components/nodes/DefaultNode.vue +276 -0
- package/src/components/nodes/Handle.vue +101 -0
- package/src/components/nodes/InputNode.vue +47 -0
- package/src/components/nodes/NodeBody.vue +103 -0
- package/src/components/nodes/NodeFace.vue +128 -0
- package/src/components/nodes/NodeRenderer.vue +95 -0
- package/src/components/nodes/NodeWrapper.vue +475 -0
- package/src/components/nodes/OutputNode.vue +47 -0
- package/src/components/ui/ConnSettingsForm.vue +158 -0
- package/src/components/ui/Controls.vue +83 -0
- package/src/components/ui/NodeSettingsForm.vue +185 -0
- package/src/js/defaults.mjs +33 -0
- package/src/js/edge-path.mjs +165 -0
- package/src/js/geometry.mjs +226 -0
- package/src/js/graph.mjs +31 -0
- package/src/js/step-routing.mjs +274 -0
- package/src/main.js +22 -0
- package/test/WFlowVue-features.test.mjs +760 -0
- package/test/WFlowVue.test.mjs +421 -0
- package/test/components-canvas.test.mjs +102 -0
- package/test/components-edge.test.mjs +147 -0
- package/test/components-node.test.mjs +174 -0
- package/test/components-ui.test.mjs +69 -0
- package/test/defaults.test.mjs +86 -0
- package/test/edge-path.test.mjs +102 -0
- package/test/generate-routing-snapshots.mjs +77 -0
- package/test/generate-visual-baselines.mjs +206 -0
- package/test/geometry.test.mjs +236 -0
- package/test/graph.test.mjs +72 -0
- package/test/jsons/routing-snapshots.json +24994 -0
- package/test/pics/_check2.png +0 -0
- package/test/pics/_check3.png +0 -0
- package/test/pics/_check4.png +0 -0
- package/test/pics/_check5.png +0 -0
- package/test/pics/_v1.png +0 -0
- package/test/pics/_v2.png +0 -0
- package/test/pics/_v3.png +0 -0
- package/test/pics/_v4.png +0 -0
- package/test/pics/_v5.png +0 -0
- package/test/pics/_v6.png +0 -0
- package/test/pics/_v7.png +0 -0
- package/test/pics/vb-edge-hovered.png +0 -0
- package/test/pics/vb-edges-normal.png +0 -0
- package/test/pics/vb-locked-edge-hovered.png +0 -0
- package/test/pics/vb-locked-node-hovered.png +0 -0
- package/test/pics/vb-locked-node-selected.png +0 -0
- package/test/pics/vb-locked-overview.png +0 -0
- package/test/pics/vb-node-1.png +0 -0
- package/test/pics/vb-node-10.png +0 -0
- package/test/pics/vb-node-11.png +0 -0
- package/test/pics/vb-node-12.png +0 -0
- package/test/pics/vb-node-2.png +0 -0
- package/test/pics/vb-node-3.png +0 -0
- package/test/pics/vb-node-4.png +0 -0
- package/test/pics/vb-node-5.png +0 -0
- package/test/pics/vb-node-6.png +0 -0
- package/test/pics/vb-node-7.png +0 -0
- package/test/pics/vb-node-8.png +0 -0
- package/test/pics/vb-node-9.png +0 -0
- package/test/pics/vb-node-hovered.png +0 -0
- package/test/pics/vb-node-selected.png +0 -0
- package/test/pics/vb-overview.png +0 -0
- package/test/step-routing-connectivity.test.mjs +78 -0
- package/test/step-routing.test.mjs +88 -0
- package/test/visual-regression.test.mjs +274 -0
- package/toolg/addVersion.mjs +4 -0
- package/toolg/cleanFolder.mjs +4 -0
- package/toolg/gDistApp.mjs +34 -0
- package/toolg/gDistRollupComps.mjs +22 -0
- package/toolg/gDocExams.mjs +47 -0
- package/toolg/gExtractHtml.mjs +179 -0
- package/toolg/modifyReadme.mjs +4 -0
- package/vue.config.js +9 -0
- package/vue2/344/271/213foreignObject/345/205/247/346/270/262/346/237/223/345/225/217/351/241/214/350/210/207/344/277/256/346/255/243.md +151 -0
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
|
|
8
|
+
/>
|
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
10
|
+
<title>example for AppBasic</title>
|
|
11
|
+
|
|
12
|
+
<!-- @babel/polyfill -->
|
|
13
|
+
<script
|
|
14
|
+
nomodule
|
|
15
|
+
src="https://cdn.jsdelivr.net/npm/@babel/polyfill/dist/polyfill.min.js"
|
|
16
|
+
></script>
|
|
17
|
+
|
|
18
|
+
<!-- vue -->
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
|
|
20
|
+
|
|
21
|
+
<!-- extractHtml已自動添加@babel/polyfill與vue -->
|
|
22
|
+
|
|
23
|
+
<!-- fontawesome -->
|
|
24
|
+
<link
|
|
25
|
+
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- mdi, 各組件使用mdi/js會於轉單頁時改為mdi icon, 故需引用mdi/css -->
|
|
30
|
+
<link
|
|
31
|
+
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css"
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
36
|
+
<link
|
|
37
|
+
_href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
<link
|
|
41
|
+
_href="https://fonts.googleapis.com/css?family=Material+Icons"
|
|
42
|
+
rel="stylesheet"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<!-- w-flow-vue -->
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.0.0/dist/w-flow-vue.umd.js"></script>
|
|
47
|
+
|
|
48
|
+
<!-- lodash -->
|
|
49
|
+
<script src="https://cdn.jsdelivr.net/npm/lodash/lodash.min.js"></script>
|
|
50
|
+
|
|
51
|
+
<!-- wsemi -->
|
|
52
|
+
<script src="https://cdn.jsdelivr.net/npm/wsemi/dist/wsemi.umd.min.js"></script>
|
|
53
|
+
|
|
54
|
+
<!-- w-jsonview-tree -->
|
|
55
|
+
<script
|
|
56
|
+
src="https://cdn.jsdelivr.net/npm/w-jsonview-tree@latest/dist/w-jsonview-tree.umd.js"
|
|
57
|
+
></script>
|
|
58
|
+
<script>
|
|
59
|
+
let jv = window["w-jsonview-tree"];
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
.item-link {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
margin: 10px 10px 0px 0px;
|
|
66
|
+
padding: 5px 10px;
|
|
67
|
+
font-size: 0.8rem;
|
|
68
|
+
color: #fff;
|
|
69
|
+
background-color: #443a65;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
}
|
|
73
|
+
.bkh {
|
|
74
|
+
/* 寬 */
|
|
75
|
+
padding: 20px;
|
|
76
|
+
}
|
|
77
|
+
@media screen and (max-width: 800px) {
|
|
78
|
+
/* 中 */
|
|
79
|
+
.bkh {
|
|
80
|
+
padding: 10px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
@media screen and (max-width: 400px) {
|
|
84
|
+
/* 窄 */
|
|
85
|
+
.bkh {
|
|
86
|
+
padding: 5px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.bkp {
|
|
90
|
+
/* 寬 */
|
|
91
|
+
padding: 0px 20px;
|
|
92
|
+
}
|
|
93
|
+
@media screen and (max-width: 800px) {
|
|
94
|
+
/* 中 */
|
|
95
|
+
.bkp {
|
|
96
|
+
padding: 0px 10px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
@media screen and (max-width: 400px) {
|
|
100
|
+
/* 窄 */
|
|
101
|
+
.bkp {
|
|
102
|
+
padding: 0px 5px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
106
|
+
</head>
|
|
107
|
+
<body
|
|
108
|
+
style="font-family:'Microsoft JhengHei','Avenir','Helvetica'; padding:0px; margin:0px;"
|
|
109
|
+
>
|
|
110
|
+
<div id="app" class="bkh" style>
|
|
111
|
+
<div class="bkh">
|
|
112
|
+
<div style="font-size:1.5rem;">size</div>
|
|
113
|
+
<a
|
|
114
|
+
href="//yuda-lyu.github.io/w-flow-vue/examples/ex-AppBasic.html"
|
|
115
|
+
target="_blank"
|
|
116
|
+
class="item-link"
|
|
117
|
+
>example</a>
|
|
118
|
+
<a
|
|
119
|
+
href="//github.com/yuda-lyu/w-flow-vue/blob/master/docs/examples/ex-AppBasic.html"
|
|
120
|
+
target="_blank"
|
|
121
|
+
class="item-link"
|
|
122
|
+
>code</a>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<div class="bkp">
|
|
126
|
+
<div v-if="!loading">
|
|
127
|
+
<button
|
|
128
|
+
style="margin:0px 3px 3px 0px;"
|
|
129
|
+
@click="setWidth(800)"
|
|
130
|
+
>set width to 800</button>
|
|
131
|
+
<button
|
|
132
|
+
style="margin:0px 3px 3px 0px;"
|
|
133
|
+
@click="setWidth(300)"
|
|
134
|
+
>set width to 300</button>
|
|
135
|
+
<button
|
|
136
|
+
style="margin:0px 3px 3px 0px;"
|
|
137
|
+
@click="setHeight(600)"
|
|
138
|
+
>set height to 600</button>
|
|
139
|
+
<button
|
|
140
|
+
style="margin:0px 3px 3px 0px;"
|
|
141
|
+
@click="setHeight(300)"
|
|
142
|
+
>set height to 300</button>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<div style="display:flex; padding-bottom:40px; overflow-x:auto;">
|
|
146
|
+
<div style="position:relative; border:1px solid #ddd;">
|
|
147
|
+
<w-flow-vue :opt="opt" @init="loading=false"></w-flow-vue>
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<div style="padding:0px 20px;">
|
|
151
|
+
<div
|
|
152
|
+
:style="`border:1px solid #ddd; width:590px; min-width:590px; height:${opt.height}px; overflow-y:auto;`"
|
|
153
|
+
>
|
|
154
|
+
<div style="padding-left:5px;">
|
|
155
|
+
<div id="optjson" style="font-size:10pt;"></div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<script>
|
|
164
|
+
//install
|
|
165
|
+
Vue.component("w-flow-vue", window["w-flow-vue"]);
|
|
166
|
+
|
|
167
|
+
//initialize
|
|
168
|
+
new Vue({
|
|
169
|
+
el: "#app",
|
|
170
|
+
|
|
171
|
+
data: function() {
|
|
172
|
+
return {
|
|
173
|
+
loading: true,
|
|
174
|
+
opt: {
|
|
175
|
+
width: 800,
|
|
176
|
+
height: 600,
|
|
177
|
+
nodes: [
|
|
178
|
+
{
|
|
179
|
+
id: "1",
|
|
180
|
+
type: "input",
|
|
181
|
+
name: "資料來源",
|
|
182
|
+
description: "從外部 API 取得原始資料",
|
|
183
|
+
position: { x: 260, y: 0 },
|
|
184
|
+
edgeColor: "#0041d0",
|
|
185
|
+
width: 100,
|
|
186
|
+
height: 40
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "2",
|
|
190
|
+
type: "basic",
|
|
191
|
+
name: "資料驗證",
|
|
192
|
+
description: "檢查資料格式與完整性",
|
|
193
|
+
position: { x: 100, y: 120 },
|
|
194
|
+
width: 100,
|
|
195
|
+
height: 40
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "3",
|
|
199
|
+
type: "basic",
|
|
200
|
+
name: "資料轉換",
|
|
201
|
+
description: "將原始資料轉換為標準格式",
|
|
202
|
+
position: { x: 400, y: 120 },
|
|
203
|
+
width: 100,
|
|
204
|
+
height: 40
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: "8",
|
|
208
|
+
type: "basic",
|
|
209
|
+
name: "條件判斷",
|
|
210
|
+
description: "根據條件分流處理",
|
|
211
|
+
position: { x: 100, y: 220 },
|
|
212
|
+
shape: "diamond",
|
|
213
|
+
width: 120,
|
|
214
|
+
height: 80
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
id: "4",
|
|
218
|
+
type: "basic",
|
|
219
|
+
name: "商業邏輯",
|
|
220
|
+
description: "執行核心商業規則與計算",
|
|
221
|
+
position: { x: 80, y: 380 },
|
|
222
|
+
shape: "ellipse",
|
|
223
|
+
width: 140,
|
|
224
|
+
height: 60
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: "5",
|
|
228
|
+
type: "basic",
|
|
229
|
+
name: "資料聚合",
|
|
230
|
+
description: "合併多個來源的處理結果",
|
|
231
|
+
position: { x: 280, y: 500 },
|
|
232
|
+
edgeColor: "#ffa500",
|
|
233
|
+
edgeWidth: 2,
|
|
234
|
+
width: 100,
|
|
235
|
+
height: 40
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: "6",
|
|
239
|
+
type: "output",
|
|
240
|
+
name: "輸出結果",
|
|
241
|
+
description: "將最終結果寫入資料庫",
|
|
242
|
+
position: { x: 160, y: 620 },
|
|
243
|
+
width: 100,
|
|
244
|
+
height: 40
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: "7",
|
|
248
|
+
type: "output",
|
|
249
|
+
name: "通知服務",
|
|
250
|
+
description: "發送處理完成通知給相關人員",
|
|
251
|
+
position: { x: 400, y: 620 },
|
|
252
|
+
edgeColor: "#ff69b4",
|
|
253
|
+
width: 100,
|
|
254
|
+
height: 40
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
id: "9",
|
|
258
|
+
type: "basic",
|
|
259
|
+
name: "過濾器",
|
|
260
|
+
description: "過濾不符合條件的資料",
|
|
261
|
+
position: { x: 620, y: 80 },
|
|
262
|
+
shape: "triangle",
|
|
263
|
+
width: 100,
|
|
264
|
+
height: 80
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
id: "10",
|
|
268
|
+
type: "basic",
|
|
269
|
+
name: "路由分配",
|
|
270
|
+
description: "根據規則分配至不同處理管道",
|
|
271
|
+
position: { x: 620, y: 220 },
|
|
272
|
+
shape: "triangle-right",
|
|
273
|
+
width: 100,
|
|
274
|
+
height: 80
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
id: "11",
|
|
278
|
+
type: "basic",
|
|
279
|
+
name: "資料壓縮",
|
|
280
|
+
description: "壓縮資料以減少儲存空間",
|
|
281
|
+
position: { x: 620, y: 360 },
|
|
282
|
+
shape: "triangle-down",
|
|
283
|
+
width: 100,
|
|
284
|
+
height: 80
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
id: "12",
|
|
288
|
+
type: "basic",
|
|
289
|
+
name: "快取處理",
|
|
290
|
+
description: "從快取中讀取或寫入資料",
|
|
291
|
+
position: { x: 620, y: 500 },
|
|
292
|
+
shape: "triangle-left",
|
|
293
|
+
width: 100,
|
|
294
|
+
height: 80
|
|
295
|
+
}
|
|
296
|
+
],
|
|
297
|
+
conns: [
|
|
298
|
+
{
|
|
299
|
+
id: "e1-2",
|
|
300
|
+
from: "1",
|
|
301
|
+
to: "2",
|
|
302
|
+
type: "bezier",
|
|
303
|
+
animated: true,
|
|
304
|
+
name: "原始資料",
|
|
305
|
+
description: "未經處理的 API 回應"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: "e1-3",
|
|
309
|
+
from: "1",
|
|
310
|
+
to: "3",
|
|
311
|
+
type: "bezier",
|
|
312
|
+
name: "備份資料",
|
|
313
|
+
description: "同步至轉換流程",
|
|
314
|
+
markerEnd: "arrowclosed"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
id: "e2-8",
|
|
318
|
+
from: "2",
|
|
319
|
+
to: "8",
|
|
320
|
+
type: "smoothstep",
|
|
321
|
+
name: "驗證通過",
|
|
322
|
+
description: "通過格式檢查的資料"
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
id: "e8-4",
|
|
326
|
+
from: "8",
|
|
327
|
+
to: "4",
|
|
328
|
+
type: "bezier",
|
|
329
|
+
name: "條件成立",
|
|
330
|
+
description: "符合條件進入商業邏輯"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
id: "e8-5",
|
|
334
|
+
from: "8",
|
|
335
|
+
to: "5",
|
|
336
|
+
type: "bezier",
|
|
337
|
+
name: "條件不成立",
|
|
338
|
+
description: "不符條件直接聚合"
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: "e3-5",
|
|
342
|
+
from: "3",
|
|
343
|
+
to: "5",
|
|
344
|
+
type: "step",
|
|
345
|
+
name: "轉換完成",
|
|
346
|
+
description: "標準化後的資料"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
id: "e4-5",
|
|
350
|
+
from: "4",
|
|
351
|
+
to: "5",
|
|
352
|
+
type: "bezier",
|
|
353
|
+
name: "處理結果",
|
|
354
|
+
description: "商業邏輯計算結果"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
id: "e5-6",
|
|
358
|
+
from: "5",
|
|
359
|
+
to: "6",
|
|
360
|
+
type: "smoothstep",
|
|
361
|
+
name: "最終資料",
|
|
362
|
+
description: "聚合後準備寫入的資料"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
id: "e5-7",
|
|
366
|
+
from: "5",
|
|
367
|
+
to: "7",
|
|
368
|
+
type: "bezier",
|
|
369
|
+
animated: true,
|
|
370
|
+
name: "觸發通知",
|
|
371
|
+
description: "處理完成的事件訊號"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
id: "e3-9",
|
|
375
|
+
from: "3",
|
|
376
|
+
to: "9",
|
|
377
|
+
type: "step",
|
|
378
|
+
name: "轉換副本",
|
|
379
|
+
description: "備份至過濾流程"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
id: "e9-10",
|
|
383
|
+
from: "9",
|
|
384
|
+
to: "10",
|
|
385
|
+
type: "smoothstep",
|
|
386
|
+
name: "已過濾",
|
|
387
|
+
description: "通過過濾條件的資料"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
id: "e10-11",
|
|
391
|
+
from: "10",
|
|
392
|
+
to: "11",
|
|
393
|
+
type: "bezier",
|
|
394
|
+
name: "管道A",
|
|
395
|
+
description: "分配至壓縮管道"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: "e11-12",
|
|
399
|
+
from: "11",
|
|
400
|
+
to: "12",
|
|
401
|
+
type: "step",
|
|
402
|
+
name: "已壓縮",
|
|
403
|
+
description: "壓縮完成的資料"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
id: "e12-7",
|
|
407
|
+
from: "12",
|
|
408
|
+
to: "7",
|
|
409
|
+
type: "bezier",
|
|
410
|
+
name: "快取完成",
|
|
411
|
+
description: "快取處理後通知"
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
action: []
|
|
416
|
+
};
|
|
417
|
+
},
|
|
418
|
+
mounted: function() {
|
|
419
|
+
let vo = this;
|
|
420
|
+
vo.showOptJson();
|
|
421
|
+
},
|
|
422
|
+
computed: {},
|
|
423
|
+
methods: {
|
|
424
|
+
showOptJson: function() {
|
|
425
|
+
let vo = this;
|
|
426
|
+
jv(vo.opt, document.querySelector("#optjson"), { expanded: true });
|
|
427
|
+
},
|
|
428
|
+
setWidth: function(r) {
|
|
429
|
+
let vo = this;
|
|
430
|
+
vo.opt.width = r;
|
|
431
|
+
},
|
|
432
|
+
setHeight: function(r) {
|
|
433
|
+
let vo = this;
|
|
434
|
+
vo.opt.height = r;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
</script>
|
|
439
|
+
</body>
|
|
440
|
+
</html>
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-tw">
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
|
5
|
+
<meta
|
|
6
|
+
name="viewport"
|
|
7
|
+
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"
|
|
8
|
+
/>
|
|
9
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
|
10
|
+
<title>example for AppConnectivity</title>
|
|
11
|
+
|
|
12
|
+
<!-- @babel/polyfill -->
|
|
13
|
+
<script
|
|
14
|
+
nomodule
|
|
15
|
+
src="https://cdn.jsdelivr.net/npm/@babel/polyfill/dist/polyfill.min.js"
|
|
16
|
+
></script>
|
|
17
|
+
|
|
18
|
+
<!-- vue -->
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>
|
|
20
|
+
|
|
21
|
+
<!-- extractHtml已自動添加@babel/polyfill與vue -->
|
|
22
|
+
|
|
23
|
+
<!-- fontawesome -->
|
|
24
|
+
<link
|
|
25
|
+
href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css"
|
|
26
|
+
rel="stylesheet"
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<!-- mdi, 各組件使用mdi/js會於轉單頁時改為mdi icon, 故需引用mdi/css -->
|
|
30
|
+
<link
|
|
31
|
+
href="https://cdn.jsdelivr.net/npm/@mdi/font@7.4.47/css/materialdesignicons.min.css"
|
|
32
|
+
rel="stylesheet"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<!-- google, 各組件使用mdi/js故不需引用 -->
|
|
36
|
+
<link
|
|
37
|
+
_href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"
|
|
38
|
+
rel="stylesheet"
|
|
39
|
+
/>
|
|
40
|
+
<link
|
|
41
|
+
_href="https://fonts.googleapis.com/css?family=Material+Icons"
|
|
42
|
+
rel="stylesheet"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<!-- w-flow-vue -->
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/w-flow-vue@1.0.0/dist/w-flow-vue.umd.js"></script>
|
|
47
|
+
|
|
48
|
+
<!-- lodash -->
|
|
49
|
+
<script src="https://cdn.jsdelivr.net/npm/lodash/lodash.min.js"></script>
|
|
50
|
+
|
|
51
|
+
<!-- wsemi -->
|
|
52
|
+
<script src="https://cdn.jsdelivr.net/npm/wsemi/dist/wsemi.umd.min.js"></script>
|
|
53
|
+
|
|
54
|
+
<!-- w-jsonview-tree -->
|
|
55
|
+
<script
|
|
56
|
+
src="https://cdn.jsdelivr.net/npm/w-jsonview-tree@latest/dist/w-jsonview-tree.umd.js"
|
|
57
|
+
></script>
|
|
58
|
+
<script>
|
|
59
|
+
let jv = window["w-jsonview-tree"];
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style>
|
|
63
|
+
.item-link {
|
|
64
|
+
display: inline-block;
|
|
65
|
+
margin: 10px 10px 0px 0px;
|
|
66
|
+
padding: 5px 10px;
|
|
67
|
+
font-size: 0.8rem;
|
|
68
|
+
color: #fff;
|
|
69
|
+
background-color: #443a65;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
text-decoration: none;
|
|
72
|
+
}
|
|
73
|
+
.bkh {
|
|
74
|
+
/* 寬 */
|
|
75
|
+
padding: 20px;
|
|
76
|
+
}
|
|
77
|
+
@media screen and (max-width: 800px) {
|
|
78
|
+
/* 中 */
|
|
79
|
+
.bkh {
|
|
80
|
+
padding: 10px;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
@media screen and (max-width: 400px) {
|
|
84
|
+
/* 窄 */
|
|
85
|
+
.bkh {
|
|
86
|
+
padding: 5px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.bkp {
|
|
90
|
+
/* 寬 */
|
|
91
|
+
padding: 0px 20px;
|
|
92
|
+
}
|
|
93
|
+
@media screen and (max-width: 800px) {
|
|
94
|
+
/* 中 */
|
|
95
|
+
.bkp {
|
|
96
|
+
padding: 0px 10px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
@media screen and (max-width: 400px) {
|
|
100
|
+
/* 窄 */
|
|
101
|
+
.bkp {
|
|
102
|
+
padding: 0px 5px;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
106
|
+
</head>
|
|
107
|
+
<body
|
|
108
|
+
style="font-family:'Microsoft JhengHei','Avenir','Helvetica'; padding:0px; margin:0px;"
|
|
109
|
+
>
|
|
110
|
+
<div id="app" class="bkh" style></div>
|
|
111
|
+
|
|
112
|
+
<script>
|
|
113
|
+
//install
|
|
114
|
+
Vue.component("w-flow-vue", window["w-flow-vue"]);
|
|
115
|
+
|
|
116
|
+
//initialize
|
|
117
|
+
new Vue({
|
|
118
|
+
el: "#app",
|
|
119
|
+
|
|
120
|
+
data: function() {
|
|
121
|
+
return {};
|
|
122
|
+
},
|
|
123
|
+
mounted: function() {
|
|
124
|
+
return {};
|
|
125
|
+
},
|
|
126
|
+
computed: {},
|
|
127
|
+
methods: {}
|
|
128
|
+
});
|
|
129
|
+
</script>
|
|
130
|
+
</body>
|
|
131
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|