-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomplete_workflow_graph.html
More file actions
761 lines (634 loc) · 41.6 KB
/
complete_workflow_graph.html
File metadata and controls
761 lines (634 loc) · 41.6 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>企业智维 工作流图表 - 完整版</title>
<style>
body {
margin: 0;
padding: 20px;
font-family: 'Microsoft YaHei', Arial, sans-serif;
background-color: #f5f5f5;
}
.container {
max-width: 100%;
margin: 0 auto;
background: white;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
padding: 20px;
}
.title {
text-align: center;
color: #333;
margin-bottom: 20px;
font-size: 24px;
font-weight: bold;
}
.subtitle {
text-align: center;
color: #666;
margin-bottom: 30px;
font-size: 14px;
}
.svg-container {
width: 100%;
overflow: auto;
border: 1px solid #ddd;
border-radius: 4px;
background: #fafafa;
}
.legend {
margin-top: 20px;
padding: 15px;
background: #f9f9f9;
border-radius: 4px;
border-left: 4px solid #007acc;
}
.legend-title {
font-weight: bold;
margin-bottom: 10px;
color: #333;
}
.legend-item {
display: inline-block;
margin: 5px 15px 5px 0;
font-size: 12px;
}
.legend-color {
display: inline-block;
width: 16px;
height: 16px;
margin-right: 5px;
vertical-align: middle;
border-radius: 2px;
}
.controls {
margin-bottom: 20px;
text-align: center;
}
.zoom-btn {
margin: 0 5px;
padding: 8px 16px;
background: #007acc;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
.zoom-btn:hover {
background: #005a9e;
}
.download-btn {
margin: 0 5px;
padding: 8px 16px;
background: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
.download-btn:hover {
background: #45a049;
}
.svg-container {
width: 100%;
height: 600px;
overflow: auto;
border: 1px solid #ddd;
border-radius: 4px;
background: #fafafa;
position: relative;
}
.drag-hint {
position: absolute;
top: 10px;
left: 10px;
background: rgba(0,0,0,0.7);
color: white;
padding: 5px 10px;
border-radius: 4px;
font-size: 12px;
z-index: 1000;
pointer-events: none;
}
</style>
</head>
<body>
<div class="container">
<div class="title">企业智维工作流图表</div>
<div class="subtitle">企业智维报告系统</div>
<div class="controls">
<button class="zoom-btn" onclick="zoomIn()">放大 (+)</button>
<button class="zoom-btn" onclick="zoomOut()">缩小 (-)</button>
<button class="zoom-btn" onclick="resetZoom()">重置</button>
<button class="zoom-btn" onclick="fitToScreen()">适应屏幕</button>
<button class="download-btn" onclick="downloadImage()">下载图片</button>
</div>
<div class="svg-container" id="svgContainer">
<div class="drag-hint">拖拽移动图表 | 滚轮缩放</div>
<svg id="workflowSvg" width="2400" height="2000" viewBox="0 0 2400 2000" xmlns="http://www.w3.org/2000/svg">
<!-- 定义箭头标记 -->
<defs>
<marker id="arrowhead" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
<polygon points="0 0, 10 3.5, 0 7" fill="#666" />
</marker>
<marker id="arrowhead-condition" markerWidth="10" markerHeight="7" refX="9" refY="3.5" orient="auto">
<polygon points="0 0, 10 3.5, 0 7" fill="#ff6b35" />
</marker>
</defs>
<!-- 开始节点 -->
<circle cx="1200" cy="50" r="25" fill="#4CAF50" stroke="#2E7D32" stroke-width="2"/>
<text x="1200" y="55" text-anchor="middle" font-size="12" fill="white" font-weight="bold">START</text>
<!-- 主流程节点 -->
<rect x="1120" y="120" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="1200" y="145" text-anchor="middle" font-size="12" fill="white" font-weight="bold">coordinator</text>
<!-- 条件节点1 -->
<polygon points="1200,200 1240,220 1200,240 1160,220" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="1200" y="225" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition1</text>
<!-- 查询路由节点 -->
<rect x="1120" y="280" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="1200" y="305" text-anchor="middle" font-size="12" fill="white" font-weight="bold">query_routing</text>
<!-- 条件节点2 -->
<polygon points="1200,360 1240,380 1200,400 1160,380" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="1200" y="385" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition2</text>
<!-- 三个主要分支 -->
<!-- 终端分支 -->
<rect x="400" y="460" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="480" y="485" text-anchor="middle" font-size="12" fill="white" font-weight="bold">terminal_planner</text>
<polygon points="480,540 520,560 480,580 440,560" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="480" y="565" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition3</text>
<rect x="400" y="620" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="480" y="645" text-anchor="middle" font-size="12" fill="white" font-weight="bold">terminal_information</text>
<polygon points="480,700 520,720 480,740 440,720" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="480" y="725" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition4</text>
<rect x="400" y="780" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="480" y="805" text-anchor="middle" font-size="12" fill="white" font-weight="bold">terminal_router</text>
<polygon points="480,860 520,880 480,900 440,880" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="480" y="885" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition5</text>
<!-- 认证节点组 -->
<g id="auth-nodes">
<!-- 第一行认证节点 -->
<rect x="50" y="960" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="120" y="982" text-anchor="middle" font-size="10" fill="white">auth_user_lock</text>
<rect x="210" y="960" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="280" y="982" text-anchor="middle" font-size="10" fill="white">auth_session_capability</text>
<rect x="370" y="960" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="440" y="982" text-anchor="middle" font-size="10" fill="white">auth_phone_binding</text>
<rect x="530" y="960" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="600" y="982" text-anchor="middle" font-size="10" fill="white">auth_device_card_binding</text>
<rect x="690" y="960" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="760" y="982" text-anchor="middle" font-size="10" fill="white">auth_no_record</text>
<!-- 第二行认证节点 -->
<rect x="50" y="1020" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="120" y="1042" text-anchor="middle" font-size="10" fill="white">auth_username_strategy</text>
<rect x="210" y="1020" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="280" y="1042" text-anchor="middle" font-size="10" fill="white">auth_whitelist_network</text>
<rect x="370" y="1020" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="440" y="1042" text-anchor="middle" font-size="10" fill="white">auth_database_exception</text>
<rect x="530" y="1020" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="600" y="1042" text-anchor="middle" font-size="10" fill="white">auth_region_control</text>
<rect x="690" y="1020" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="760" y="1042" text-anchor="middle" font-size="10" fill="white">auth_user_expired</text>
<!-- 第三行认证节点 -->
<rect x="50" y="1080" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="120" y="1102" text-anchor="middle" font-size="10" fill="white">auth_blacklist_user</text>
<rect x="210" y="1080" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="280" y="1102" text-anchor="middle" font-size="10" fill="white">auth_user_not_exist</text>
<rect x="370" y="1080" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="440" y="1102" text-anchor="middle" font-size="10" fill="white">auth_password_error</text>
<rect x="530" y="1080" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="600" y="1102" text-anchor="middle" font-size="10" fill="white">auth_blacklist_time_slot</text>
<rect x="690" y="1080" width="140" height="35" rx="17" fill="#9C27B0" stroke="#7B1FA2" stroke-width="2"/>
<text x="760" y="1102" text-anchor="middle" font-size="10" fill="white">auth_user_status</text>
<!-- 成功认证流程 -->
<rect x="850" y="960" width="140" height="35" rx="17" fill="#4CAF50" stroke="#388E3C" stroke-width="2"/>
<text x="920" y="982" text-anchor="middle" font-size="10" fill="white">auth_success_planner</text>
<polygon points="920,1020 950,1035 920,1050 890,1035" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="920" y="1040" text-anchor="middle" font-size="9" fill="white">condition6</text>
<rect x="850" y="1080" width="140" height="35" rx="17" fill="#4CAF50" stroke="#388E3C" stroke-width="2"/>
<text x="920" y="1102" text-anchor="middle" font-size="10" fill="white">auth_success_information</text>
<polygon points="920,1140 950,1155 920,1170 890,1155" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="920" y="1160" text-anchor="middle" font-size="9" fill="white">condition7</text>
<rect x="850" y="1200" width="140" height="35" rx="17" fill="#4CAF50" stroke="#388E3C" stroke-width="2"/>
<text x="920" y="1222" text-anchor="middle" font-size="10" fill="white">auth_success_router</text>
<polygon points="920,1260 950,1275 920,1290 890,1275" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="920" y="1280" text-anchor="middle" font-size="9" fill="white">condition8</text>
</g>
<!-- 终端分析节点组 -->
<g id="terminal-analysis-nodes">
<rect x="1050" y="1320" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1120" y="1342" text-anchor="middle" font-size="10" fill="white">terminal_network_diagnosis</text>
<rect x="1210" y="1320" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1280" y="1342" text-anchor="middle" font-size="10" fill="white">terminal_security_check</text>
<rect x="1370" y="1320" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1440" y="1342" text-anchor="middle" font-size="10" fill="white">terminal_usage_analysis</text>
<rect x="1050" y="1380" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1120" y="1402" text-anchor="middle" font-size="10" fill="white">terminal_billing_check</text>
<rect x="1210" y="1380" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1280" y="1402" text-anchor="middle" font-size="10" fill="white">terminal_config_verification</text>
<rect x="1370" y="1380" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1440" y="1402" text-anchor="middle" font-size="10" fill="white">terminal_log_analysis</text>
<rect x="1530" y="1320" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1600" y="1342" text-anchor="middle" font-size="10" fill="white">terminal_performance_analysis</text>
<rect x="1530" y="1380" width="140" height="35" rx="17" fill="#607D8B" stroke="#455A64" stroke-width="2"/>
<text x="1600" y="1402" text-anchor="middle" font-size="10" fill="white">default_success_terminal</text>
</g>
<!-- 默认终端节点 -->
<rect x="250" y="1200" width="140" height="35" rx="17" fill="#795548" stroke="#5D4037" stroke-width="2"/>
<text x="320" y="1222" text-anchor="middle" font-size="10" fill="white">default_terminal_node</text>
<!-- 企业分支 -->
<rect x="1520" y="460" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="1600" y="485" text-anchor="middle" font-size="12" fill="white" font-weight="bold">business_planner</text>
<rect x="1520" y="540" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="1600" y="565" text-anchor="middle" font-size="12" fill="white" font-weight="bold">business_information</text>
<polygon points="1600,620 1640,640 1600,660 1560,640" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="1600" y="645" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition9</text>
<rect x="1520" y="700" width="160" height="40" rx="20" fill="#2196F3" stroke="#1976D2" stroke-width="2"/>
<text x="1600" y="725" text-anchor="middle" font-size="12" fill="white" font-weight="bold">business_router</text>
<polygon points="1600,780 1640,800 1600,820 1560,800" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="1600" y="805" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition10</text>
<!-- 企业节点组 -->
<g id="enterprise-nodes">
<rect x="1750" y="860" width="140" height="35" rx="17" fill="#FF5722" stroke="#D84315" stroke-width="2"/>
<text x="1820" y="882" text-anchor="middle" font-size="10" fill="white">enterprise_network_check</text>
<rect x="1910" y="860" width="140" height="35" rx="17" fill="#FF5722" stroke="#D84315" stroke-width="2"/>
<text x="1980" y="882" text-anchor="middle" font-size="10" fill="white">enterprise_auth_query</text>
<rect x="2070" y="860" width="140" height="35" rx="17" fill="#FF5722" stroke="#D84315" stroke-width="2"/>
<text x="2140" y="882" text-anchor="middle" font-size="10" fill="white">enterprise_user_analysis</text>
<rect x="1750" y="920" width="140" height="35" rx="17" fill="#FF5722" stroke="#D84315" stroke-width="2"/>
<text x="1820" y="942" text-anchor="middle" font-size="10" fill="white">enterprise_info_query</text>
<rect x="1910" y="920" width="140" height="35" rx="17" fill="#FF5722" stroke="#D84315" stroke-width="2"/>
<text x="1980" y="942" text-anchor="middle" font-size="10" fill="white">enterprise_alert_query</text>
<rect x="2070" y="920" width="140" height="35" rx="17" fill="#FF5722" stroke="#D84315" stroke-width="2"/>
<text x="2140" y="942" text-anchor="middle" font-size="10" fill="white">default_enterprise_node</text>
</g>
<!-- 知识查询分支 -->
<rect x="1120" y="460" width="160" height="40" rx="20" fill="#4CAF50" stroke="#388E3C" stroke-width="2"/>
<text x="1200" y="485" text-anchor="middle" font-size="12" fill="white" font-weight="bold">rewrite_multi_query</text>
<polygon points="1200,540 1240,560 1200,580 1160,560" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="1200" y="565" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition11</text>
<rect x="1120" y="620" width="160" height="40" rx="20" fill="#4CAF50" stroke="#388E3C" stroke-width="2"/>
<text x="1200" y="645" text-anchor="middle" font-size="12" fill="white" font-weight="bold">knowledge_query</text>
<polygon points="1200,700 1240,720 1200,740 1160,720" fill="#FF9800" stroke="#F57C00" stroke-width="2"/>
<text x="1200" y="725" text-anchor="middle" font-size="10" fill="white" font-weight="bold">condition12</text>
<!-- 报告节点 -->
<ellipse cx="1200" cy="1600" rx="80" ry="30" fill="#F44336" stroke="#C62828" stroke-width="2"/>
<text x="1200" y="1608" text-anchor="middle" font-size="14" fill="white" font-weight="bold">reporter</text>
<!-- 结束节点 -->
<circle cx="1200" cy="1750" r="25" fill="#F44336" stroke="#C62828" stroke-width="2"/>
<text x="1200" y="1755" text-anchor="middle" font-size="12" fill="white" font-weight="bold">END</text>
<!-- 连接线 -->
<!-- 主流程线 -->
<line x1="1200" y1="75" x2="1200" y2="120" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="1200" y1="160" x2="1200" y2="200" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="1200" y1="240" x2="1200" y2="280" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1200" y1="320" x2="1200" y2="360" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<!-- 分支线 -->
<line x1="1160" y1="380" x2="480" y2="460" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1200" y1="400" x2="1200" y2="460" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1240" y1="380" x2="1600" y2="460" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- 终端流程线 -->
<line x1="480" y1="500" x2="480" y2="540" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="480" y1="580" x2="480" y2="620" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="480" y1="660" x2="480" y2="700" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="480" y1="740" x2="480" y2="780" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="480" y1="820" x2="480" y2="860" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<!-- 认证节点连接线 -->
<line x1="440" y1="880" x2="120" y2="960" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="460" y1="880" x2="280" y2="960" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="480" y1="900" x2="440" y2="960" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="500" y1="880" x2="600" y2="960" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="520" y1="880" x2="760" y2="960" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- 第二行认证节点连接 -->
<line x1="440" y1="900" x2="120" y2="1020" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="460" y1="900" x2="280" y2="1020" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="480" y1="900" x2="440" y2="1020" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="500" y1="900" x2="600" y2="1020" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="520" y1="900" x2="760" y2="1020" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- 第三行认证节点连接 -->
<line x1="440" y1="900" x2="120" y2="1080" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="460" y1="900" x2="280" y2="1080" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="480" y1="900" x2="440" y2="1080" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="500" y1="900" x2="600" y2="1080" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="520" y1="900" x2="760" y2="1080" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- 成功认证流程连接 -->
<line x1="520" y1="880" x2="920" y2="960" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="920" y1="995" x2="920" y2="1020" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="920" y1="1050" x2="920" y2="1080" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="920" y1="1115" x2="920" y2="1140" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="920" y1="1170" x2="920" y2="1200" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="920" y1="1235" x2="920" y2="1260" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<!-- 终端分析节点连接 -->
<line x1="890" y1="1275" x2="1120" y2="1320" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="920" y1="1290" x2="1280" y2="1320" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="950" y1="1275" x2="1440" y2="1320" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="890" y1="1290" x2="1120" y2="1380" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="920" y1="1290" x2="1280" y2="1380" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="950" y1="1290" x2="1440" y2="1380" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="950" y1="1275" x2="1600" y2="1320" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="950" y1="1290" x2="1600" y2="1380" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- 企业流程线 -->
<line x1="1600" y1="500" x2="1600" y2="540" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="1600" y1="580" x2="1600" y2="620" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="1600" y1="660" x2="1600" y2="700" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1600" y1="740" x2="1600" y2="780" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<!-- 企业节点连接线 -->
<line x1="1560" y1="800" x2="1820" y2="860" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1600" y1="820" x2="1980" y2="860" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1640" y1="800" x2="2140" y2="860" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1560" y1="820" x2="1820" y2="920" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1600" y1="820" x2="1980" y2="920" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1640" y1="820" x2="2140" y2="920" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- 知识查询流程线 -->
<line x1="1200" y1="500" x2="1200" y2="540" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<line x1="1200" y1="580" x2="1200" y2="620" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<line x1="1200" y1="660" x2="1200" y2="700" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<!-- 汇聚到reporter的连接线 -->
<!-- 认证节点到reporter -->
<line x1="120" y1="995" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="280" y1="995" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="440" y1="995" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="600" y1="995" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="760" y1="995" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="120" y1="1055" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="280" y1="1055" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="440" y1="1055" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="600" y1="1055" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="760" y1="1055" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="120" y1="1115" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="280" y1="1115" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="440" y1="1115" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="600" y1="1115" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="760" y1="1115" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<!-- 默认终端节点到reporter -->
<line x1="320" y1="1235" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<!-- 终端分析节点到reporter -->
<line x1="1120" y1="1355" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1280" y1="1355" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1440" y1="1355" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1120" y1="1415" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1280" y1="1415" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1440" y1="1415" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1600" y1="1355" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1600" y1="1415" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<!-- 企业节点到reporter -->
<line x1="1820" y1="895" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1980" y1="895" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="2140" y1="895" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1820" y1="955" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="1980" y1="955" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<line x1="2140" y1="955" x2="1200" y2="1570" stroke="#666" stroke-width="1" marker-end="url(#arrowhead)"/>
<!-- 知识查询到reporter -->
<line x1="1160" y1="720" x2="1200" y2="1570" stroke="#ff6b35" stroke-width="2" marker-end="url(#arrowhead-condition)"/>
<!-- reporter到END -->
<line x1="1200" y1="1630" x2="1200" y2="1725" stroke="#666" stroke-width="2" marker-end="url(#arrowhead)"/>
<!-- 直接到END的连接线 -->
<line x1="1160" y1="220" x2="50" y2="1750" stroke="#ff6b35" stroke-width="1" stroke-dasharray="5,5" marker-end="url(#arrowhead-condition)"/>
<line x1="1240" y1="380" x2="2350" y2="1750" stroke="#ff6b35" stroke-width="1" stroke-dasharray="5,5" marker-end="url(#arrowhead-condition)"/>
</svg>
</div>
<div class="legend">
<div class="legend-title">图例说明</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #4CAF50;"></span>
开始/结束节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #2196F3;"></span>
主流程节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #FF9800;"></span>
条件判断节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #9C27B0;"></span>
认证节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #607D8B;"></span>
终端分析节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #FF5722;"></span>
企业服务节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #795548;"></span>
默认节点
</div>
<div class="legend-item">
<span class="legend-color" style="background-color: #F44336;"></span>
报告节点
</div>
</div>
<div style="margin-top: 20px; padding: 15px; background: #e3f2fd; border-radius: 4px; border-left: 4px solid #2196f3;">
<strong>说明:</strong>
<ul style="margin: 10px 0; padding-left: 20px;">
<li>此图表展示了完整的知识库工作流程,包含所有节点和连接关系</li>
<li>支持缩放和平移操作,便于查看详细内容</li>
<li>不同颜色代表不同类型的节点,参考上方图例</li>
<li>实线表示直接连接,虚线表示条件连接</li>
</ul>
</div>
</div>
<script>
// 下载图片功能
function downloadImage() {
const svg = document.getElementById('workflowSvg');
const svgData = new XMLSerializer().serializeToString(svg);
// 创建canvas
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
// 设置canvas尺寸
canvas.width = 2400;
canvas.height = 2000;
// 创建图片
const img = new Image();
const svgBlob = new Blob([svgData], {type: 'image/svg+xml;charset=utf-8'});
const url = URL.createObjectURL(svgBlob);
img.onload = function() {
// 设置白色背景
ctx.fillStyle = 'white';
ctx.fillRect(0, 0, canvas.width, canvas.height);
// 绘制SVG
ctx.drawImage(img, 0, 0);
// 下载图片
const link = document.createElement('a');
link.download = 'workflow_graph.png';
link.href = canvas.toDataURL('image/png');
link.click();
// 清理
URL.revokeObjectURL(url);
};
img.src = url;
}
let currentZoom = 1;
let isDragging = false;
let dragStartX = 0;
let dragStartY = 0;
let currentTranslateX = 0;
let currentTranslateY = 0;
const svg = document.getElementById('workflowSvg');
const container = document.getElementById('svgContainer');
// 更新SVG变换
function updateTransform() {
svg.style.transform = `translate(${currentTranslateX}px, ${currentTranslateY}px) scale(${currentZoom})`;
}
function zoomIn() {
if (currentZoom < 5) {
currentZoom *= 1.2;
updateTransform();
}
}
function zoomOut() {
if (currentZoom > 0.1) {
currentZoom /= 1.2;
updateTransform();
}
}
function resetZoom() {
currentZoom = 1;
currentTranslateX = 0;
currentTranslateY = 0;
updateTransform();
}
function fitToScreen() {
const containerRect = container.getBoundingClientRect();
const svgRect = svg.getBoundingClientRect();
const scaleX = containerRect.width / 2400;
const scaleY = containerRect.height / 2000;
currentZoom = Math.min(scaleX, scaleY, 1);
// 居中显示
currentTranslateX = (containerRect.width - 2400 * currentZoom) / 2;
currentTranslateY = (containerRect.height - 2000 * currentZoom) / 2;
updateTransform();
}
function updateZoom() {
const newWidth = 2400 * currentZoom;
const newHeight = 2000 * currentZoom;
svg.style.width = newWidth + 'px';
svg.style.height = newHeight + 'px';
}
// 拖拽功能
function startDrag(e) {
isDragging = true;
const clientX = e.clientX || (e.touches && e.touches[0].clientX);
const clientY = e.clientY || (e.touches && e.touches[0].clientY);
dragStartX = clientX - currentTranslateX;
dragStartY = clientY - currentTranslateY;
container.style.cursor = 'grabbing';
e.preventDefault();
}
function drag(e) {
if (!isDragging) return;
const clientX = e.clientX || (e.touches && e.touches[0].clientX);
const clientY = e.clientY || (e.touches && e.touches[0].clientY);
currentTranslateX = clientX - dragStartX;
currentTranslateY = clientY - dragStartY;
updateTransform();
e.preventDefault();
}
function endDrag() {
isDragging = false;
container.style.cursor = 'grab';
}
// 事件监听器
container.addEventListener('mousedown', startDrag);
document.addEventListener('mousemove', drag);
document.addEventListener('mouseup', endDrag);
// 设置初始光标样式
container.style.cursor = 'grab';
container.style.overflow = 'hidden';
// 防止在SVG元素上的默认拖拽行为
svg.addEventListener('dragstart', function(e) {
e.preventDefault();
});
// 初始化适应屏幕
window.addEventListener('load', function() {
setTimeout(fitToScreen, 100);
});
// 初始化
resetZoom();
// 鼠标滚轮缩放
container.addEventListener('wheel', function(e) {
e.preventDefault();
const rect = container.getBoundingClientRect();
const mouseX = e.clientX - rect.left;
const mouseY = e.clientY - rect.top;
// 计算缩放前鼠标在SVG中的位置
const svgX = (mouseX - currentTranslateX) / currentZoom;
const svgY = (mouseY - currentTranslateY) / currentZoom;
const oldZoom = currentZoom;
if (e.deltaY < 0 && currentZoom < 5) {
currentZoom *= 1.1;
} else if (e.deltaY > 0 && currentZoom > 0.1) {
currentZoom /= 1.1;
}
// 调整平移,使鼠标位置保持不变
currentTranslateX = mouseX - svgX * currentZoom;
currentTranslateY = mouseY - svgY * currentZoom;
updateTransform();
});
// 触摸设备支持
let touchStartDistance = 0;
let touchStartZoom = 1;
container.addEventListener('touchstart', function(e) {
if (e.touches.length === 2) {
// 双指缩放
const touch1 = e.touches[0];
const touch2 = e.touches[1];
touchStartDistance = Math.sqrt(
Math.pow(touch2.clientX - touch1.clientX, 2) +
Math.pow(touch2.clientY - touch1.clientY, 2)
);
touchStartZoom = currentZoom;
} else if (e.touches.length === 1) {
// 单指拖拽
const touch = e.touches[0];
startDrag({
clientX: touch.clientX,
clientY: touch.clientY,
preventDefault: () => e.preventDefault()
});
}
});
container.addEventListener('touchmove', function(e) {
if (e.touches.length === 2) {
// 双指缩放
const touch1 = e.touches[0];
const touch2 = e.touches[1];
const currentDistance = Math.sqrt(
Math.pow(touch2.clientX - touch1.clientX, 2) +
Math.pow(touch2.clientY - touch1.clientY, 2)
);
if (touchStartDistance > 0) {
const scale = currentDistance / touchStartDistance;
currentZoom = touchStartZoom * scale;
currentZoom = Math.max(0.1, Math.min(5, currentZoom));
updateZoom();
}
e.preventDefault();
} else if (e.touches.length === 1) {
// 单指拖拽
const touch = e.touches[0];
drag({
clientX: touch.clientX,
clientY: touch.clientY,
preventDefault: () => e.preventDefault()
});
}
});
container.addEventListener('touchend', function(e) {
if (e.touches.length === 0) {
endDrag();
touchStartDistance = 0;
}
});
</script>
</body>
</html>