bgff-pass4 0.0.0-stage → 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/irule-engine-calls.html +621 -0
- package/package.json +13 -4
- package/README.md +0 -3
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN" data-theme="dark">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<title>IRule 引擎调用图谱 · biz 33 个 HTTP 端点</title>
|
|
7
|
+
<style>
|
|
8
|
+
*{box-sizing:border-box}
|
|
9
|
+
:root{
|
|
10
|
+
--once:#22c98a; --multi:#f5a524; --none:#7d8899;
|
|
11
|
+
--local:#38bdf8; --remote:#a78bfa; --off:#64748b;
|
|
12
|
+
}
|
|
13
|
+
html[data-theme="dark"]{
|
|
14
|
+
--bg:#0b0f14; --bg2:#0e141b; --card:#141b24; --card2:#182231;
|
|
15
|
+
--line:#243040; --tx:#e8eef6; --tx2:#93a3b5; --tx3:#6b7c8f;
|
|
16
|
+
--shadow:0 10px 30px rgba(0,0,0,.45);
|
|
17
|
+
}
|
|
18
|
+
html[data-theme="light"]{
|
|
19
|
+
--bg:#f2f5fa; --bg2:#eaeff7; --card:#ffffff; --card2:#f7fafd;
|
|
20
|
+
--line:#dfe7f1; --tx:#131c26; --tx2:#5a6b7d; --tx3:#8496a8;
|
|
21
|
+
--shadow:0 8px 24px rgba(31,56,88,.10);
|
|
22
|
+
}
|
|
23
|
+
body{margin:0;background:
|
|
24
|
+
radial-gradient(1200px 600px at 8% -10%, rgba(56,189,248,.10), transparent 60%),
|
|
25
|
+
radial-gradient(900px 500px at 100% 0%, rgba(245,165,36,.09), transparent 55%),
|
|
26
|
+
var(--bg);
|
|
27
|
+
color:var(--tx);font:14px/1.6 "Segoe UI","Microsoft YaHei",system-ui,sans-serif;
|
|
28
|
+
-webkit-font-smoothing:antialiased;padding:28px 22px 60px}
|
|
29
|
+
.wrap{max-width:1360px;margin:0 auto}
|
|
30
|
+
header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:22px}
|
|
31
|
+
h1{margin:0;font-size:26px;letter-spacing:.4px;font-weight:700}
|
|
32
|
+
h1 .accent{background:linear-gradient(92deg,var(--once),var(--multi) 55%,var(--local));-webkit-background-clip:text;background-clip:text;color:transparent}
|
|
33
|
+
.sub{margin:6px 0 0;color:var(--tx2);font-size:13px}
|
|
34
|
+
.hright{display:flex;align-items:center;gap:12px}
|
|
35
|
+
#themeBtn{cursor:pointer;border:1px solid var(--line);background:var(--card);color:var(--tx);
|
|
36
|
+
padding:8px 14px;border-radius:999px;font-size:13px;transition:.18s}
|
|
37
|
+
#themeBtn:hover{border-color:var(--local);color:var(--local)}
|
|
38
|
+
.badge{font-size:11.8px;color:var(--tx3);white-space:nowrap}
|
|
39
|
+
.badge b{color:var(--once)}
|
|
40
|
+
.badge.warn b{color:#f5a524}
|
|
41
|
+
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:18px}
|
|
42
|
+
.kpi{background:linear-gradient(160deg,var(--card2),var(--card));border:1px solid var(--line);
|
|
43
|
+
border-radius:14px;padding:15px 16px;box-shadow:var(--shadow);position:relative;overflow:hidden}
|
|
44
|
+
.kpi:before{content:"";position:absolute;inset:0 auto 0 0;width:3px;background:var(--k,var(--local))}
|
|
45
|
+
.kpi .lab{color:var(--tx2);font-size:12.5px;letter-spacing:.3px}
|
|
46
|
+
.kpi .num{font-size:30px;font-weight:750;line-height:1.15;margin-top:4px;color:var(--k,var(--tx))}
|
|
47
|
+
.kpi .num small{font-size:14px;font-weight:600;color:var(--tx2);margin-left:2px}
|
|
48
|
+
.kpi .foot{color:var(--tx3);font-size:11.5px;margin-top:2px}
|
|
49
|
+
.grid2{display:grid;grid-template-columns:1.05fr 1.35fr;gap:16px;margin-bottom:16px}
|
|
50
|
+
@media(max-width:1080px){.grid2{grid-template-columns:1fr}}
|
|
51
|
+
.card{background:linear-gradient(170deg,var(--card2),var(--card));border:1px solid var(--line);
|
|
52
|
+
border-radius:16px;padding:16px 18px 14px;box-shadow:var(--shadow);margin-bottom:16px}
|
|
53
|
+
.card h2{margin:0 0 10px;font-size:15px;font-weight:650;letter-spacing:.3px;display:flex;align-items:center;gap:9px}
|
|
54
|
+
.card h2 em{font-style:normal;font-size:11.5px;color:var(--tx3);font-weight:500}
|
|
55
|
+
.card h2 .dot{width:7px;height:7px;border-radius:50%;background:var(--local);box-shadow:0 0 0 3px rgba(56,189,248,.15)}
|
|
56
|
+
svg{display:block;width:100%;height:auto;overflow:visible}
|
|
57
|
+
.lgd{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px;font-size:12.5px;color:var(--tx2)}
|
|
58
|
+
.lgd i{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:6px;vertical-align:-1px}
|
|
59
|
+
.hint{color:var(--tx3);font-size:12px;margin:10px 0 0}
|
|
60
|
+
.toolbar{display:flex;gap:9px;flex-wrap:wrap;align-items:center;margin:4px 0 12px}
|
|
61
|
+
.chip{cursor:pointer;border:1px solid var(--line);background:var(--card);color:var(--tx2);
|
|
62
|
+
padding:6px 12px;border-radius:999px;font-size:12.5px;transition:.16s}
|
|
63
|
+
.chip:hover{color:var(--tx);border-color:var(--tx3)}
|
|
64
|
+
.chip.on{background:rgba(56,189,248,.13);border-color:var(--local);color:var(--tx);font-weight:600}
|
|
65
|
+
.chip b{font-weight:700;margin-left:5px}
|
|
66
|
+
.chip.ok.on{background:rgba(34,201,138,.14);border-color:var(--once)}
|
|
67
|
+
#q{margin-left:auto;min-width:230px;background:var(--card);border:1px solid var(--line);color:var(--tx);
|
|
68
|
+
border-radius:10px;padding:8px 12px;font-size:13px;outline:none}
|
|
69
|
+
#q:focus{border-color:var(--local)}
|
|
70
|
+
.btn{cursor:pointer;border:1px solid var(--line);background:var(--card);color:var(--tx2);
|
|
71
|
+
padding:7px 12px;border-radius:10px;font-size:12.5px;transition:.16s;white-space:nowrap}
|
|
72
|
+
.btn:hover{border-color:var(--local);color:var(--local)}
|
|
73
|
+
.btn.danger:hover{border-color:#f87171;color:#f87171}
|
|
74
|
+
.tblwrap{max-height:none;overflow:visible;border:1px solid var(--line);border-radius:12px}
|
|
75
|
+
table{border-collapse:separate;border-spacing:0;width:100%;font-size:12.7px}
|
|
76
|
+
th{position:sticky;top:0;z-index:2;background:var(--card2);color:var(--tx2);text-align:left;
|
|
77
|
+
font-weight:600;padding:10px 11px;border-bottom:1px solid var(--line);white-space:nowrap}
|
|
78
|
+
td{padding:9px 11px;border-bottom:1px solid var(--line);vertical-align:top;color:var(--tx)}
|
|
79
|
+
tbody tr:hover td{background:rgba(56,189,248,.06)}
|
|
80
|
+
td.id{color:var(--tx3);font-variant-numeric:tabular-nums;width:38px}
|
|
81
|
+
td.url{font-family:"Cascadia Code",Consolas,monospace;font-size:11.9px;color:var(--tx);word-break:break-all;max-width:330px}
|
|
82
|
+
td.site{font-family:"Cascadia Code",Consolas,monospace;font-size:11.4px;color:var(--tx2);word-break:break-all;max-width:430px}
|
|
83
|
+
td.calls{font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
84
|
+
.tag{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11.5px;font-weight:650;white-space:nowrap}
|
|
85
|
+
.tag.once{background:rgba(34,201,138,.15);color:var(--once)}
|
|
86
|
+
.tag.multi{background:rgba(245,165,36,.16);color:var(--multi)}
|
|
87
|
+
.tag.none{background:rgba(125,136,153,.18);color:var(--tx2)}
|
|
88
|
+
.note{color:var(--tx3);font-size:11.5px}
|
|
89
|
+
footer{color:var(--tx3);font-size:12px;text-align:center;margin-top:26px;line-height:1.9}
|
|
90
|
+
code{font-family:"Cascadia Code",Consolas,monospace;background:rgba(125,136,153,.14);padding:1px 5px;border-radius:4px;font-size:11.5px}
|
|
91
|
+
.mnote{color:var(--tx3);font-size:10px;font-weight:400}
|
|
92
|
+
/* ---- 完成标记 ---- */
|
|
93
|
+
.chk{width:23px;height:23px;border-radius:6px;border:1.5px solid var(--line);background:transparent;
|
|
94
|
+
color:transparent;cursor:pointer;font-size:13px;line-height:1;display:inline-flex;align-items:center;
|
|
95
|
+
justify-content:center;transition:.16s;padding:0;font-family:inherit}
|
|
96
|
+
.chk:hover{border-color:var(--once);color:rgba(34,201,138,.55)}
|
|
97
|
+
.chk.on{background:var(--once);border-color:var(--once);color:#06291c;font-weight:800}
|
|
98
|
+
tr.done td{background:rgba(34,201,138,.055)}
|
|
99
|
+
tr.done td.url{text-decoration:line-through;text-decoration-color:rgba(34,201,138,.55);color:var(--tx2)}
|
|
100
|
+
tr.done .tag{opacity:.6}
|
|
101
|
+
.donemark{display:inline-block;margin-left:7px;font-size:10.7px;color:var(--once);white-space:nowrap;
|
|
102
|
+
border:1px solid rgba(34,201,138,.35);border-radius:999px;padding:0 7px}
|
|
103
|
+
.prow{display:flex;align-items:center;gap:14px;margin:2px 0 16px}
|
|
104
|
+
.pbar{flex:1;height:12px;border-radius:999px;background:rgba(125,136,153,.18);overflow:hidden}
|
|
105
|
+
.pbar i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--once),#38bdf8);
|
|
106
|
+
transition:width .35s ease;border-radius:999px}
|
|
107
|
+
.pnum{font-size:13px;color:var(--tx2);white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
108
|
+
.pnum b{color:var(--once);font-size:17px;font-weight:750}
|
|
109
|
+
.mrow{display:flex;align-items:flex-start;gap:12px;padding:7px 0;border-bottom:1px dashed var(--line)}
|
|
110
|
+
.mrow:last-child{border-bottom:none}
|
|
111
|
+
.mname{width:126px;flex:none;font-size:11.5px;color:var(--tx2);padding-top:6px}
|
|
112
|
+
.mname b{color:var(--tx3);font-weight:500;font-size:10.5px;margin-left:4px}
|
|
113
|
+
.cells{display:flex;flex-wrap:wrap;gap:6px}
|
|
114
|
+
.cell{width:44px;height:29px;border-radius:7px;border:1px solid var(--line);background:transparent;
|
|
115
|
+
color:var(--tx3);font-size:10.8px;font-variant-numeric:tabular-nums;cursor:pointer;transition:.14s;
|
|
116
|
+
font-family:inherit;padding:0}
|
|
117
|
+
.cell:hover{border-color:var(--once);color:var(--tx)}
|
|
118
|
+
.cell.on{background:rgba(34,201,138,.92);border-color:var(--once);color:#04281b;font-weight:750}
|
|
119
|
+
#toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,18px);
|
|
120
|
+
background:rgba(20,27,36,.97);color:#e8eef6;border:1px solid var(--line);padding:10px 18px;
|
|
121
|
+
border-radius:999px;font-size:13px;opacity:0;pointer-events:none;transition:.24s;
|
|
122
|
+
box-shadow:0 10px 30px rgba(0,0,0,.45);z-index:99}
|
|
123
|
+
#toast.show{opacity:1;transform:translate(-50%,0)}
|
|
124
|
+
</style>
|
|
125
|
+
</head>
|
|
126
|
+
<body>
|
|
127
|
+
<div class="wrap">
|
|
128
|
+
<header>
|
|
129
|
+
<div>
|
|
130
|
+
<h1>IRule <span class="accent">引擎调用图谱</span></h1>
|
|
131
|
+
<p class="sub">biz 层 33 个 HTTP 端点 · 单次请求落到规则引擎的次数(源码静态追踪:Controller → Service → session → singleExecute / HttpRequest)</p>
|
|
132
|
+
</div>
|
|
133
|
+
<div class="hright">
|
|
134
|
+
<span class="badge" id="storeBadge"></span>
|
|
135
|
+
<button id="themeBtn">☀ 亮色</button>
|
|
136
|
+
</div>
|
|
137
|
+
</header>
|
|
138
|
+
|
|
139
|
+
<section class="kpis" id="kpis"></section>
|
|
140
|
+
|
|
141
|
+
<section class="card">
|
|
142
|
+
<h2><span class="dot"></span>完成进度 <em>点击方块即可标记 / 取消,自动保存在本机</em></h2>
|
|
143
|
+
<div class="prow">
|
|
144
|
+
<div class="pbar"><i id="pbarFill"></i></div>
|
|
145
|
+
<div class="pnum"><b id="pbarDone">0</b> / 33 · <span id="pbarPct">0.0%</span></div>
|
|
146
|
+
</div>
|
|
147
|
+
<div id="pgrid"></div>
|
|
148
|
+
<div class="lgd">
|
|
149
|
+
<span><i style="background:rgba(34,201,138,.92)"></i>已完成</span>
|
|
150
|
+
<span><i style="background:var(--line)"></i>未完成</span>
|
|
151
|
+
<span style="color:var(--tx3)">进度存于浏览器 localStorage(key: irule.engineCalls.progress.v2),换机器/换浏览器请用「导出 / 导入」</span>
|
|
152
|
+
</div>
|
|
153
|
+
</section>
|
|
154
|
+
|
|
155
|
+
<div class="grid2">
|
|
156
|
+
<section class="card">
|
|
157
|
+
<h2><span class="dot"></span>三类占比 <em>共 33 个端点</em></h2>
|
|
158
|
+
<div id="donut"></div>
|
|
159
|
+
</section>
|
|
160
|
+
<section class="card">
|
|
161
|
+
<h2><span class="dot"></span>模块 × 调用类别 <em>堆叠条形</em></h2>
|
|
162
|
+
<div id="modbar"></div>
|
|
163
|
+
<div class="lgd">
|
|
164
|
+
<span><i style="background:var(--once)"></i>只调 1 次</span>
|
|
165
|
+
<span><i style="background:var(--multi)"></i>调多次</span>
|
|
166
|
+
<span><i style="background:var(--none)"></i>不调引擎</span>
|
|
167
|
+
</div>
|
|
168
|
+
</section>
|
|
169
|
+
</div>
|
|
170
|
+
|
|
171
|
+
<section class="card">
|
|
172
|
+
<h2><span class="dot"></span>33 个端点的引擎调用次数 <em>纵轴=单次请求调用次数,N=按数据量循环,✓=已完成</em></h2>
|
|
173
|
+
<div id="bars"></div>
|
|
174
|
+
<p class="hint">柱高按「一次请求最多触达引擎次数」绘制;<b>N</b> 表示随单证数 / 文件数线性增长(vhlclm 单证规则、Compare 批处理)。已完成端点柱顶带 ✓。</p>
|
|
175
|
+
</section>
|
|
176
|
+
|
|
177
|
+
<div class="grid2">
|
|
178
|
+
<section class="card">
|
|
179
|
+
<h2><span class="dot"></span>调用通道构成 <em>本地 API vs 远程 HTTP</em></h2>
|
|
180
|
+
<div id="flow"></div>
|
|
181
|
+
<div class="lgd">
|
|
182
|
+
<span><i style="background:var(--local)"></i>singleExecute 本地引擎</span>
|
|
183
|
+
<span><i style="background:var(--remote)"></i>HttpRequest 远程引擎</span>
|
|
184
|
+
<span><i style="background:var(--off)"></i>不进引擎</span>
|
|
185
|
+
</div>
|
|
186
|
+
</section>
|
|
187
|
+
<section class="card">
|
|
188
|
+
<h2><span class="dot"></span>模块热力矩阵 <em>模块 × 类别 端点数</em></h2>
|
|
189
|
+
<div id="heat"></div>
|
|
190
|
+
</section>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<section class="card">
|
|
194
|
+
<h2><span class="dot"></span>端点明细 <em>33 条,左侧 ✓ 标记完成,可筛选 / 搜索</em></h2>
|
|
195
|
+
<div class="toolbar" id="toolbar"></div>
|
|
196
|
+
<div class="tblwrap">
|
|
197
|
+
<table>
|
|
198
|
+
<thead><tr><th style="width:46px">完成</th><th>#</th><th>模块</th><th>端点 URL</th><th>handler</th><th>引擎调用点(文件:行)</th><th>次数</th><th>类别</th></tr></thead>
|
|
199
|
+
<tbody id="tbody"></tbody>
|
|
200
|
+
</table>
|
|
201
|
+
</div>
|
|
202
|
+
</section>
|
|
203
|
+
|
|
204
|
+
<section class="card">
|
|
205
|
+
<h2><span class="dot"></span>引擎调用点清单 <em>11 处真实落点 + 1 处死代码</em></h2>
|
|
206
|
+
<div class="tblwrap" style="max-height:none">
|
|
207
|
+
<table>
|
|
208
|
+
<thead><tr><th>模块</th><th>位置</th><th>形式</th><th>说明</th></tr></thead>
|
|
209
|
+
<tbody id="sites"></tbody>
|
|
210
|
+
</table>
|
|
211
|
+
</div>
|
|
212
|
+
</section>
|
|
213
|
+
|
|
214
|
+
<footer>
|
|
215
|
+
数据来源:<code>F:\source\irulecloud-tpc-uat164-20260523\src\main\java\net\goeasy\irule\biz</code><br>
|
|
216
|
+
口径:仅统计最终落到规则引擎执行的点 —— 本地 <code>IRuleExecuteService.singleExecute(RuleExecuteVo)</code> 与远程 <code>HttpRequest.post(引擎URL)</code>;纯 DAO / 文件比对 / 开关 / 首页不计。<br>
|
|
217
|
+
生成时间 2026-11-17 10:31 · 静态扫描,未运行
|
|
218
|
+
</footer>
|
|
219
|
+
</div>
|
|
220
|
+
<input type="file" id="fileIn" accept=".json,application/json" hidden>
|
|
221
|
+
<div id="toast"></div>
|
|
222
|
+
|
|
223
|
+
<script>
|
|
224
|
+
const DATA = {"rows": [{"id": 1, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=autoClaimDocumentRules", "handler": "autoClaimDocumentRules", "site": "AutoClaimRiskService.java:1372 → runDocumentRules (:1407/:1420/:1432/:1444/:1456)", "calls": "N×(1~5)", "peak": 4, "cat": "multi", "note": "按单证循环,每张单证 1 次 + 最多 4 次逐级截断 companyCode 重试"}, {"id": 2, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=autoClaimDocumentVerifyRules", "handler": "autoClaimDocumentVerifyRules", "site": "AutoClaimRiskWebController.java:119(服务调用已注释)", "calls": "0", "peak": 0, "cat": "none", "note": "桩方法:直接 new IfcAutoClaimDocumentCheckResponseDTO() 返回空"}, {"id": 3, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=autoClaimRiskRules", "handler": "autoClaimRiskRules", "site": "AutoClaimRiskService.java:319 session.runRules(TPAutoClaimAdjustmentRule)", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 4, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=autoClaimVerifyRules", "handler": "autoClaimVerifyRules", "site": "AutoClaimRiskService.java:1507 → runGenrealRules :1548/:1558/:1571/:1580/:1598/:1608/:1616 → runVerifyLevelRules :1758", "calls": "1 或 3", "peak": 3, "cat": "multi", "note": "按 requestType 分派;type=17 正向未过再跑反向,随后无条件跑核验等级规则"}, {"id": 5, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=generalService", "handler": "generalService", "site": "AutoClaimRiskService.java:1819 反射调 AutoClaimDetailService", "calls": "0", "peak": 0, "cat": "none", "note": "DAO 查表 / 通用服务,不进规则引擎"}, {"id": 6, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=getAutoClaimRiskFactor", "handler": "getAutoClaimRiskFactor", "site": "AutoClaimRiskService.java:1284 session.runRiskRules", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 7, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=getAutoClaimRiskFactorSecd", "handler": "getAutoClaimRiskFactorSecd", "site": "AutoClaimRiskService.java:1345 session.runRiskRules", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 8, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=servicePlan", "handler": "servicePlan", "site": "AutoClaimRiskService.java:1908 session.runPlanRules", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 9, "mod": "vhlclm", "ctl": "AutoClaimRiskWebController", "url": "/TPAutoClaimWLS/AutoClaimRiskService.do?method=ocrDiscernRules", "handler": "ocrDiscernRules", "site": "AutoClaimRiskService.java:1960 session.runOcrRules", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 10, "mod": "newnocar", "ctl": "NoCarInsuredClaimController", "url": "/new-biz/ruleRun/caseHistoryLiability.do", "handler": "insuredClaimAuto", "site": "NoCarInsuredClaimServiceImpl.java:37 InsuredAutoClaim → :52 runRules", "calls": "1", "peak": 1, "cat": "once", "note": "经 RuleExecutionSessionForWas:72 → singleExecute"}, {"id": 11, "mod": "newnocar", "ctl": "NoCarProductController", "url": "/new-biz/ruleRun/nocarproduct.do", "handler": "noCarProduct", "site": "NoCarProductServiceImpl.java:43 runRules(TPProductsLevelRules)", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 12, "mod": "newnocar", "ctl": "NoCarUnderwriteController", "url": "/new-biz/ruleRun/auditlevel.do", "handler": "auditLevel", "site": "NoCarUnderwriteServiceImpl.java:151 runRules(TPNoCarAuditLevelRules)", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 13, "mod": "newnocar", "ctl": "NoCarUnderwriteController", "url": "/new-biz/ruleRun/autounderwriting.do", "handler": "autounderwriting", "site": "NoCarUnderwriteServiceImpl.java:66 / :73 / :83", "calls": "1 或 3", "peak": 3, "cat": "multi", "note": "正向规则未命中时再跑公共库 + 产品库"}, {"id": 14, "mod": "newnocar", "ctl": "NoCarQuotationController", "url": "/new-biz/ruleRun/quotationLevel.do", "handler": "doLevel", "site": "NoCarQuotationServiceImpl.java:47 runRules(TPQuotationAuditLevelRules)", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 15, "mod": "nocar", "ctl": "UnderwritingWebController", "url": "/CIGNVhlUnderwritingWLS/UnderwritingService.do?method=general", "handler": "underwrite", "site": "UnderwritingService.java:121 getVerifyPassResult(16 分支择一)+ :142 getVerifyCoverResult + :155-188 逐单 RulesFlow", "calls": "2~3", "peak": 3, "cat": "multi", "note": "核保通过直接免单;未通过再逐单跑风险流(:170–:184 按 riskClass 择一)"}, {"id": 16, "mod": "nocar", "ctl": "UnderwritingWebController", "url": "/CIGNVhlUnderwritingWLS/UnderwritingService.do?method=autoclaim", "handler": "autoclaim", "site": "ClaimService.java:72 runRules(CIGAccidentHealthClaimInitRules)", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 17, "mod": "nocar", "ctl": "NocarAgreementController", "url": "/agreement-biz/rule/agreementAudit.do", "handler": "doAgreementAudit", "site": "NocarAgreementServiceImpl.java:49 → :67 HttpRequest.post", "calls": "1", "peak": 1, "cat": "once", "note": "唯一一个「单次但走远程 HTTP」的端点"}, {"id": 18, "mod": "nocargroupclaim", "ctl": "IndexController", "url": "/index", "handler": "index", "site": "IndexController.java:15", "calls": "0", "peak": 0, "cat": "none", "note": "只返回 ModelAndView(\"home\"),纯首页"}, {"id": 19, "mod": "nocargroupclaim", "ctl": "NoCarGroupClaimController", "url": "/group-biz/rule/auto.do", "handler": "doAuto", "site": "NoCarGroupClaimServiceImpl.java:43(CaseLabel) + :64(RiskFactor)", "calls": "2", "peak": 2, "cat": "multi", "note": ""}, {"id": 20, "mod": "nocargroupclaim", "ctl": "NoCarGroupClaimController", "url": "/group-biz/rule/risk.do", "handler": "doRisk", "site": "NoCarGroupClaimServiceImpl.java:173 runRules(TPGroupClaimRiskFactorRules)", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 21, "mod": "nocargroupclaim", "ctl": "NoCarGroupClaimController", "url": "/group-biz/rule/channel.do", "handler": "doChannel", "site": "NoCarGroupClaimServiceImpl.java:190(CaseLabel) + :211(RiskFactor) + :267(Channel)", "calls": "3", "peak": 3, "cat": "multi", "note": "单次请求串行跑三个规则库"}, {"id": 22, "mod": "nocargroupclaim", "ctl": "NoCarGroupClaimController", "url": "/group-biz/rule/caselabel.do", "handler": "doCaseLabel", "site": "NoCarGroupClaimServiceImpl.java:302", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 23, "mod": "nocargroupclaim", "ctl": "NoCarGroupClaimController", "url": "/group-biz/rule/getRiskCode", "handler": "doGetRiskCode", "site": "NoCarGroupClaimServiceImpl.java:317", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 24, "mod": "repair", "ctl": "AutoClaimRepairNewWebController", "url": "/TPAutoClaimRepairWLS/AutoClaimRepairService.do?method=autoClaimRepairNew", "handler": "autoClaimRepairNew", "site": "AutoClaimRepairNewWebServiceImpl.java:54 singleExecute", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 25, "mod": "carrenewal", "ctl": "CarRenewalController", "url": "/TPCarRenewal-biz/carRenewalRuleRun/carRenewalRule.do", "handler": "carRenewal", "site": "CarRenewalService.java:45 singleExecute", "calls": "1", "peak": 1, "cat": "once", "note": ""}, {"id": 26, "mod": "vhluw", "ctl": "UnderwritingController", "url": "/biz/underwritingRuleRun.do", "handler": "underwrite", "site": "UnderwritingService.java:55 flowUW → :126 singleExecute", "calls": "1", "peak": 1, "cat": "once", "note": "flowApprove / flowBizLevel / flowAdvance 均未调引擎"}, {"id": 27, "mod": "task", "ctl": "CompareController", "url": "/compare/vhluwExecute", "handler": "vhluwExecute", "site": "CompareTask.java:73 → executeIlogTask + executeIruleTask(每文件一次引擎 HTTP,CompareTask:539 / CompareFactory:136)", "calls": "N(批量)", "peak": 4, "cat": "multi", "note": "异步批处理,调用次数 = 文件数 × 2"}, {"id": 28, "mod": "task", "ctl": "CompareController", "url": "/compare/execute", "handler": "execute", "site": "CompareTask.java:231 assingTask 批量下发(同上引擎 HTTP)", "calls": "N(批量)", "peak": 4, "cat": "multi", "note": "异步批处理"}, {"id": 29, "mod": "task", "ctl": "CompareController", "url": "/compare/vhluwCompare", "handler": "vhluwCompare", "site": "CompareTask.java:135 仅比对已有结果文件", "calls": "0", "peak": 0, "cat": "none", "note": ""}, {"id": 30, "mod": "task", "ctl": "CompareController", "url": "/compare/compare", "handler": "compare", "site": "CompareTask.java:415 compareTask 仅比对", "calls": "0", "peak": 0, "cat": "none", "note": ""}, {"id": 31, "mod": "task", "ctl": "CompareController", "url": "/compare/switch", "handler": "compareSwitch", "site": "CompareConstant.COMPARE_SWITCH 静态开关", "calls": "0", "peak": 0, "cat": "none", "note": ""}, {"id": 32, "mod": "task", "ctl": "CompareController", "url": "/compare/result/update", "handler": "updateCompareResult", "site": "CompareResultService.updateCompareResult 写库", "calls": "0", "peak": 0, "cat": "none", "note": ""}, {"id": 33, "mod": "task", "ctl": "CompareController", "url": "/compare/result/sortedCompareResult", "handler": "sortedCompareResult", "site": "查库 + 排序", "calls": "0", "peak": 0, "cat": "none", "note": ""}], "sites": [{"mod": "vhlclm", "loc": "src/main/java/net/goeasy/irule/biz/vhlclm/claim/engine/RuleExecuteSession.java:60", "how": "singleExecute", "note": "executePOJO 内,runRules/runRiskRules/runPlanRules/runOcrRules/runDocumentRules/runVerifyLevelRules/runGenrealRules 的统一出口"}, {"mod": "vhlclm", "loc": "src/main/java/net/goeasy/irule/biz/vhlclm/claim/engine/BPMRuleExcutionSession.java:49,98", "how": "HttpRequest.post", "note": "⚠ 无任何调用方(死代码)"}, {"mod": "newnocar", "loc": "src/main/java/net/goeasy/irule/biz/newnocar/common/engine/RuleExecutionSessionForWas.java:72", "how": "singleExecute", "note": "commonExecuteRuleSet 统一出口,4 个非车端点经此落引擎"}, {"mod": "nocar", "loc": "src/main/java/net/goeasy/irule/biz/nocar/firsttech/nvhlunderwriting/engine/RuleExecuteSession.java:58,87", "how": "singleExecute", "note": "核保 pass / cover / rulesflow 三处"}, {"mod": "nocar", "loc": "src/main/java/net/goeasy/irule/biz/nocar/nocaragreement/service/impl/NocarAgreementServiceImpl.java:67", "how": "HttpRequest.post", "note": "协议审核走远程 HTTP"}, {"mod": "nocargroupclaim", "loc": "src/main/java/net/goeasy/irule/biz/nocargroupclaim/service/impl/NoCarGroupClaimServiceImpl.java:414", "how": "singleExecute", "note": "私有 runRules(bom, ApiConfig) 统一出口"}, {"mod": "repair", "loc": "src/main/java/net/goeasy/irule/biz/repair/service/impl/AutoClaimRepairNewWebServiceImpl.java:54", "how": "singleExecute", "note": ""}, {"mod": "carrenewal", "loc": "src/main/java/net/goeasy/irule/biz/carrenewal/service/CarRenewalService.java:45", "how": "singleExecute", "note": ""}, {"mod": "vhluw", "loc": "src/main/java/net/goeasy/irule/biz/vhluw/biz/service/UnderwritingService.java:126", "how": "singleExecute", "note": "flowUW 内"}, {"mod": "task", "loc": "src/main/java/net/goeasy/irule/biz/task/CompareTask.java:539", "how": "HttpRequest.post", "note": "比对批处理下发引擎"}, {"mod": "task", "loc": "src/main/java/net/goeasy/irule/biz/task/CompareFactory.java:136", "how": "HttpRequest.post", "note": "比对批处理下发引擎"}], "modnames": {"vhlclm": "vhlclm<br><span class='mnote'>车险理赔<\/span>", "task": "task<br><span class='mnote'>比对批处理<\/span>", "nocargroupclaim": "nocargroupclaim<br><span class='mnote'>团险理赔<\/span>", "newnocar": "newnocar<br><span class='mnote'>非车(新)<\/span>", "nocar": "nocar<br><span class='mnote'>非车<\/span>", "repair": "repair<br><span class='mnote'>理赔修复<\/span>", "carrenewal": "carrenewal<br><span class='mnote'>续保<\/span>", "vhluw": "vhluw<br><span class='mnote'>核保<\/span>"}, "modorder": ["vhlclm", "task", "nocargroupclaim", "newnocar", "nocar", "repair", "carrenewal", "vhluw"], "generated": "2026-11-17 10:31", "source": "F:\\source\\irulecloud-tpc-uat164-20260523\\src\\main\\java\\net\\goeasy\\irule\\biz"};
|
|
225
|
+
const CAT = {once:{name:'只调 1 次',hex:'#22c98a'},
|
|
226
|
+
multi:{name:'调多次',hex:'#f5a524'},
|
|
227
|
+
none:{name:'不调引擎',hex:'#7d8899'}};
|
|
228
|
+
const R = DATA.rows, MODS = DATA.modnames, MORDER = DATA.modorder;
|
|
229
|
+
const cnt = c => R.filter(r=>r.cat===c).length;
|
|
230
|
+
|
|
231
|
+
/* ============ 持久化状态层 ============ */
|
|
232
|
+
const LS_KEY = 'irule.engineCalls.progress.v2';
|
|
233
|
+
let STORAGE_OK = true;
|
|
234
|
+
const ST = {done:{}, updated:null};
|
|
235
|
+
|
|
236
|
+
(function load(){
|
|
237
|
+
try{
|
|
238
|
+
localStorage.setItem(LS_KEY+'.probe','1');
|
|
239
|
+
localStorage.removeItem(LS_KEY+'.probe');
|
|
240
|
+
}catch(e){ STORAGE_OK = false; }
|
|
241
|
+
if(!STORAGE_OK) return;
|
|
242
|
+
try{
|
|
243
|
+
const raw = localStorage.getItem(LS_KEY);
|
|
244
|
+
if(raw){
|
|
245
|
+
const o = JSON.parse(raw);
|
|
246
|
+
const d = (o && o.done) || {};
|
|
247
|
+
Object.keys(d).forEach(k=>{
|
|
248
|
+
if(R.some(r=>String(r.id)===String(k))) ST.done[k] = (typeof d[k]==='object'&&d[k]) ? d[k] : {at:new Date().toISOString()};
|
|
249
|
+
});
|
|
250
|
+
ST.updated = o.updated || null;
|
|
251
|
+
}
|
|
252
|
+
}catch(e){ /* 数据损坏则从空开始,不影响页面 */ }
|
|
253
|
+
})();
|
|
254
|
+
|
|
255
|
+
const isDone = id => !!ST.done[id];
|
|
256
|
+
const doneCount = () => R.filter(r=>isDone(r.id)).length;
|
|
257
|
+
|
|
258
|
+
function persist(){
|
|
259
|
+
ST.updated = new Date().toISOString();
|
|
260
|
+
if(STORAGE_OK){
|
|
261
|
+
try{ localStorage.setItem(LS_KEY, JSON.stringify({v:2, updated:ST.updated, done:ST.done})); }
|
|
262
|
+
catch(e){ STORAGE_OK = false; }
|
|
263
|
+
}
|
|
264
|
+
badge();
|
|
265
|
+
}
|
|
266
|
+
function badge(){
|
|
267
|
+
const el = document.getElementById('storeBadge');
|
|
268
|
+
const d = ST.updated ? fmtAt(ST.updated) : '—';
|
|
269
|
+
if(STORAGE_OK){
|
|
270
|
+
el.className = 'badge';
|
|
271
|
+
el.innerHTML = '进度已存本机 · 更新 <b>'+d+'</b>';
|
|
272
|
+
}else{
|
|
273
|
+
el.className = 'badge warn';
|
|
274
|
+
el.innerHTML = '⚠ 浏览器禁止本地存储,请用「导出」保存进度';
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function fmtAt(iso){
|
|
278
|
+
const d = new Date(iso);
|
|
279
|
+
if(isNaN(d)) return '';
|
|
280
|
+
const p = n => String(n).padStart(2,'0');
|
|
281
|
+
return p(d.getMonth()+1)+'-'+p(d.getDate())+' '+p(d.getHours())+':'+p(d.getMinutes());
|
|
282
|
+
}
|
|
283
|
+
function toggle(id){
|
|
284
|
+
if(isDone(id)) delete ST.done[id];
|
|
285
|
+
else ST.done[id] = {at:new Date().toISOString()};
|
|
286
|
+
persist(); refresh();
|
|
287
|
+
toast(isDone(id) ? '已标记端点 #'+id+' 完成' : '已取消端点 #'+id+' 的完成标记');
|
|
288
|
+
}
|
|
289
|
+
let toastT=null;
|
|
290
|
+
function toast(msg){
|
|
291
|
+
const t=document.getElementById('toast');
|
|
292
|
+
t.textContent=msg; t.classList.add('show');
|
|
293
|
+
clearTimeout(toastT);
|
|
294
|
+
toastT=setTimeout(()=>t.classList.remove('show'),1900);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/* ============ KPI ============ */
|
|
298
|
+
function renderKPI(){
|
|
299
|
+
const total=R.length, once=cnt('once'), multi=cnt('multi'), none=cnt('none'), dn=doneCount();
|
|
300
|
+
const pct = n => (n/total*100).toFixed(1)+'%';
|
|
301
|
+
const cards = [
|
|
302
|
+
{k:'#38bdf8',lab:'HTTP 端点总数',num:total,unit:'个',foot:'13 个 Controller'},
|
|
303
|
+
{k:'#22c98a',lab:'只调 1 次引擎',num:once,unit:'个',foot:pct(once)+' · 单次请求固定 1 次'},
|
|
304
|
+
{k:'#f5a524',lab:'调多次引擎',num:multi,unit:'个',foot:pct(multi)+' · 最多 3 次或按量循环'},
|
|
305
|
+
{k:'#7d8899',lab:'不调引擎',num:none,unit:'个',foot:pct(none)+' · 首页/通用/比对/开关'},
|
|
306
|
+
{k:'#22c98a',lab:'已完成标记',num:dn,unit:'/ '+total,foot:pct(dn)+' · 剩余 '+(total-dn)+' 个待办',bar:dn/total},
|
|
307
|
+
];
|
|
308
|
+
document.getElementById('kpis').innerHTML = cards.map(c=>`
|
|
309
|
+
<div class="kpi" style="--k:${c.k}">
|
|
310
|
+
<div class="lab">${c.lab}</div>
|
|
311
|
+
<div class="num">${c.num}<small>${c.unit}</small></div>
|
|
312
|
+
<div class="foot">${c.foot}</div>
|
|
313
|
+
${c.bar!=null?`<div class="pbar" style="margin-top:9px;height:7px"><i style="width:${(c.bar*100).toFixed(1)}%"></i></div>`:''}
|
|
314
|
+
</div>`).join('');
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* ============ 图1 环形 ============ */
|
|
318
|
+
(function donut(){
|
|
319
|
+
const W=430,H=300,cx=170,cy=150,r=104,sw=36;
|
|
320
|
+
const data=[{c:'once',v:cnt('once')},{c:'multi',v:cnt('multi')},{c:'none',v:cnt('none')}];
|
|
321
|
+
const total=data.reduce((a,b)=>a+b.v,0);
|
|
322
|
+
let ang=-Math.PI/2, out=`<svg viewBox="0 0 ${W} ${H}">`;
|
|
323
|
+
const P=(a,rr)=>[cx+rr*Math.cos(a),cy+rr*Math.sin(a)];
|
|
324
|
+
data.forEach(d=>{
|
|
325
|
+
const sweep=d.v/total*Math.PI*2, a0=ang+0.018, a1=ang+sweep-0.018;
|
|
326
|
+
const [x0,y0]=P(a0,r),[x1,y1]=P(a1,r),[x2,y2]=P(a1,r+sw),[x3,y3]=P(a0,r+sw);
|
|
327
|
+
const large = (a1-a0)>Math.PI?1:0;
|
|
328
|
+
out+=`<path d="M${x0} ${y0} A${r} ${r} 0 ${large} 1 ${x1} ${y1} L${x2} ${y2} A${r+sw} ${r+sw} 0 ${large} 0 ${x3} ${y3} Z"
|
|
329
|
+
fill="${CAT[d.c].hex}" opacity=".92"><title>${CAT[d.c].name} ${d.v}</title></path>`;
|
|
330
|
+
ang+=sweep;
|
|
331
|
+
});
|
|
332
|
+
out+=`<text x="${cx}" y="${cy-6}" text-anchor="middle" font-size="42" font-weight="750" fill="var(--tx)">${total}</text>
|
|
333
|
+
<text x="${cx}" y="${cy+18}" text-anchor="middle" font-size="12.5" fill="var(--tx2)">个端点</text>`;
|
|
334
|
+
let ly=64;
|
|
335
|
+
data.forEach(d=>{
|
|
336
|
+
const p=(d.v/total*100).toFixed(1);
|
|
337
|
+
out+=`<rect x="300" y="${ly-11}" width="11" height="11" rx="3" fill="${CAT[d.c].hex}"/>
|
|
338
|
+
<text x="318" y="${ly}" font-size="12.5" fill="var(--tx)">${CAT[d.c].name}</text>
|
|
339
|
+
<text x="318" y="${ly+17}" font-size="16" font-weight="700" fill="${CAT[d.c].hex}">${d.v}<tspan font-size="11.5" font-weight="500" fill="var(--tx3)"> · ${p}%</tspan></text>`;
|
|
340
|
+
ly+=72;
|
|
341
|
+
});
|
|
342
|
+
out+='</svg>';
|
|
343
|
+
document.getElementById('donut').innerHTML=out;
|
|
344
|
+
})();
|
|
345
|
+
|
|
346
|
+
/* ============ 图2 模块堆叠 ============ */
|
|
347
|
+
(function modbar(){
|
|
348
|
+
const stats=MORDER.map(m=>{
|
|
349
|
+
const rs=R.filter(r=>r.mod===m);
|
|
350
|
+
return {m,total:rs.length,once:rs.filter(r=>r.cat==='once').length,
|
|
351
|
+
multi:rs.filter(r=>r.cat==='multi').length,none:rs.filter(r=>r.cat==='none').length};
|
|
352
|
+
});
|
|
353
|
+
const maxT=Math.max(...stats.map(s=>s.total));
|
|
354
|
+
const L=150,BW=560,bh=26,gap=15,H=stats.length*(bh+gap)+30,W=L+BW+90;
|
|
355
|
+
let out=`<svg viewBox="0 0 ${W} ${H}">`;
|
|
356
|
+
for(let i=0;i<=maxT;i++){
|
|
357
|
+
const x=L+BW*i/maxT;
|
|
358
|
+
out+=`<line x1="${x}" y1="6" x2="${x}" y2="${H-22}" stroke="var(--line)" stroke-dasharray="3 4"/>
|
|
359
|
+
<text x="${x}" y="${H-8}" font-size="10.5" fill="var(--tx3)" text-anchor="middle">${i}</text>`;
|
|
360
|
+
}
|
|
361
|
+
stats.forEach((s,i)=>{
|
|
362
|
+
const y=i*(bh+gap)+6; let x=L;
|
|
363
|
+
out+=`<text x="${L-14}" y="${y+bh/2+4}" font-size="11.6" fill="var(--tx2)" text-anchor="end">${MODS[s.m].split('<br>')[0]}<tspan fill="var(--tx3)" font-size="9.5"> ${s.total}</tspan></text>`;
|
|
364
|
+
[['once',s.once],['multi',s.multi],['none',s.none]].forEach(([c,v])=>{
|
|
365
|
+
if(!v) return;
|
|
366
|
+
const w=BW*v/maxT;
|
|
367
|
+
out+=`<rect x="${x}" y="${y}" width="${Math.max(w-2,1)}" height="${bh}" rx="4" fill="${CAT[c].hex}" opacity=".88">
|
|
368
|
+
<title>${MODS[s.m].replace(/<br>.*/,'')} · ${CAT[c].name} ${v}</title></rect>`;
|
|
369
|
+
if(w>20) out+=`<text x="${x+w/2-1}" y="${y+bh/2+4.5}" font-size="11.5" font-weight="700" fill="#0b0f14" text-anchor="middle">${v}</text>`;
|
|
370
|
+
x+=w;
|
|
371
|
+
});
|
|
372
|
+
});
|
|
373
|
+
out+='</svg>';
|
|
374
|
+
document.getElementById('modbar').innerHTML=out;
|
|
375
|
+
})();
|
|
376
|
+
|
|
377
|
+
/* ============ 图3 端点柱状(随完成状态重绘) ============ */
|
|
378
|
+
function renderBars(){
|
|
379
|
+
const W=1240,H=330,PB=52,PT=26,L=44,bw=22;
|
|
380
|
+
const maxP=4, plotH=H-PB-PT, y0=PT, ax=W-L-20;
|
|
381
|
+
let out=`<svg viewBox="0 0 ${W} ${H}" preserveAspectRatio="xMidYMid meet">
|
|
382
|
+
<defs><pattern id="hatch" width="6" height="6" patternTransform="rotate(45)" patternUnits="userSpaceOnUse">
|
|
383
|
+
<rect width="6" height="6" fill="#f5a524" opacity=".35"/>
|
|
384
|
+
<line x1="0" y1="0" x2="0" y2="6" stroke="#f5a524" stroke-width="2.6"/>
|
|
385
|
+
</pattern></defs>`;
|
|
386
|
+
for(let v=0;v<=maxP;v++){
|
|
387
|
+
const y=y0+plotH-plotH*v/maxP;
|
|
388
|
+
out+=`<line x1="${L}" y1="${y}" x2="${ax}" y2="${y}" stroke="var(--line)" stroke-dasharray="${v? '3 4':'0'}"/>
|
|
389
|
+
<text x="${L-10}" y="${y+4}" font-size="10.5" fill="var(--tx3)" text-anchor="end">${v}</text>`;
|
|
390
|
+
}
|
|
391
|
+
const n=R.length, step=(ax-L)/n;
|
|
392
|
+
R.forEach((r,i)=>{
|
|
393
|
+
const cx=L+step*(i+.5);
|
|
394
|
+
const h=plotH*r.peak/maxP;
|
|
395
|
+
const y=y0+plotH-h;
|
|
396
|
+
const dn=isDone(r.id);
|
|
397
|
+
const fill = r.peak===4 ? 'url(#hatch)' : CAT[r.cat].hex;
|
|
398
|
+
out+=`<g><title>#${r.id} ${r.handler}\n${r.url}\n调用次数:${r.calls}(${CAT[r.cat].name})${dn?'\n状态:已完成':''}\n${r.site}</title>`;
|
|
399
|
+
if(r.peak>0){
|
|
400
|
+
out+=`<rect x="${cx-bw/2}" y="${y}" width="${bw}" height="${h}" rx="3" fill="${fill}"
|
|
401
|
+
fill-opacity="${dn?'.5':'.9'}"
|
|
402
|
+
stroke="${dn?'#22c98a':CAT[r.cat].hex}" stroke-opacity="${dn?'1':'.55'}" stroke-width="${dn?2:1}"/>`;
|
|
403
|
+
out+=`<text x="${cx}" y="${y-7}" font-size="10.5" font-weight="700" fill="${dn?'#22c98a':CAT[r.cat].hex}" text-anchor="middle">${r.peak===4?'N':r.peak}${dn?' ✓':''}</text>`;
|
|
404
|
+
} else {
|
|
405
|
+
out+=`<circle cx="${cx}" cy="${y0+plotH-3}" r="4.5" fill="${dn?'#22c98a':'var(--none)'}" opacity=".8"/>`;
|
|
406
|
+
out+=`<text x="${cx}" y="${y0+plotH-13}" font-size="10" fill="${dn?'#22c98a':'var(--tx3)'}" text-anchor="middle">${dn?'✓':'0'}</text>`;
|
|
407
|
+
}
|
|
408
|
+
out+=`<text x="${cx}" y="${H-PB+18}" font-size="10" fill="${dn?'#22c98a':'var(--tx3)'}" text-anchor="end"
|
|
409
|
+
transform="rotate(-58 ${cx} ${H-PB+18})">#${r.id}</text></g>`;
|
|
410
|
+
});
|
|
411
|
+
out+=`<line x1="${L}" y1="${y0+plotH}" x2="${ax}" y2="${y0+plotH}" stroke="var(--tx3)" stroke-opacity=".5"/>`;
|
|
412
|
+
out+='</svg>';
|
|
413
|
+
document.getElementById('bars').innerHTML=out;
|
|
414
|
+
}
|
|
415
|
+
renderBars();
|
|
416
|
+
|
|
417
|
+
/* ============ 图4 通道流向 ============ */
|
|
418
|
+
(function flow(){
|
|
419
|
+
const left=[{k:'once',v:cnt('once')},{k:'multi',v:cnt('multi')},{k:'none',v:cnt('none')}];
|
|
420
|
+
const links=[['once','local',16],['once','remote',1],['multi','local',6],['multi','remote',2],['none','off',8]];
|
|
421
|
+
const right=[{k:'local',v:23,color:'#38bdf8',name:'singleExecute 本地'},{k:'remote',v:3,color:'#a78bfa',name:'HttpRequest 远程'},{k:'off',v:8,color:'#64748b',name:'不调引擎'}];
|
|
422
|
+
const W=560,H=372, LX=118, RX=300, BW=104, NW=132;
|
|
423
|
+
let out=`<svg viewBox="0 0 ${W} ${H}">`;
|
|
424
|
+
const total=33, TOP=24, GAP=13, unit=(H-TOP-14-GAP*2)/total;
|
|
425
|
+
const posL={},posR={};
|
|
426
|
+
let y=TOP;
|
|
427
|
+
left.forEach(d=>{posL[d.k]=y; y+=d.v*unit+GAP;});
|
|
428
|
+
y=TOP;
|
|
429
|
+
right.forEach(d=>{posR[d.k]=y; y+=d.v*unit+GAP;});
|
|
430
|
+
const offL={},offR={};
|
|
431
|
+
left.forEach(d=>offL[d.k]=0); right.forEach(d=>offR[d.k]=0);
|
|
432
|
+
links.forEach(([a,b,v])=>{
|
|
433
|
+
const h=v*unit, y1=posL[a]+offL[a], y2=posR[b]+offR[b];
|
|
434
|
+
offL[a]+=h; offR[b]+=h;
|
|
435
|
+
const color = b==='local'?'#38bdf8':(b==='remote'?'#a78bfa':'#64748b');
|
|
436
|
+
out+=`<path d="M${LX} ${y1} C${LX+80} ${y1}, ${RX-80} ${y2}, ${RX} ${y2} L${RX} ${y2+h} C${RX-80} ${y2+h}, ${LX+80} ${y1+h}, ${LX} ${y1+h} Z"
|
|
437
|
+
fill="${color}" opacity=".30" stroke="${color}" stroke-opacity=".45" stroke-width=".8"><title>${CAT[a].name} → ${b} : ${v}</title></path>`;
|
|
438
|
+
out+=`<text x="${(LX+RX)/2}" y="${(y1+y2)/2+h/2+4}" font-size="11" font-weight="700" fill="${color}" text-anchor="middle">${v}</text>`;
|
|
439
|
+
});
|
|
440
|
+
left.forEach(d=>{
|
|
441
|
+
const h=d.v*unit;
|
|
442
|
+
out+=`<rect x="${LX-BW}" y="${posL[d.k]}" width="${BW}" height="${h}" rx="6" fill="${CAT[d.k].hex}" opacity=".9"/>
|
|
443
|
+
<text x="${LX-BW+12}" y="${posL[d.k]+h/2-2}" font-size="12" font-weight="650" fill="#0b0f14">${CAT[d.k].name}</text>
|
|
444
|
+
<text x="${LX-BW+12}" y="${posL[d.k]+h/2+14}" font-size="13" font-weight="800" fill="#0b0f14">${d.v}</text>`;
|
|
445
|
+
});
|
|
446
|
+
right.forEach(d=>{
|
|
447
|
+
const h=d.v*unit;
|
|
448
|
+
out+=`<rect x="${RX}" y="${posR[d.k]}" width="${NW}" height="${h}" rx="6" fill="${d.color}" opacity=".22"
|
|
449
|
+
stroke="${d.color}" stroke-opacity=".6"/>
|
|
450
|
+
<text x="${RX+12}" y="${posR[d.k]+h/2-2}" font-size="11.4" fill="var(--tx)">${d.name}</text>
|
|
451
|
+
<text x="${RX+12}" y="${posR[d.k]+h/2+15}" font-size="13" font-weight="800" fill="${d.color}">${d.v}</text>`;
|
|
452
|
+
});
|
|
453
|
+
out+=`<text x="${LX}" y="14" font-size="11" fill="var(--tx3)" text-anchor="end">调用类别</text>
|
|
454
|
+
<text x="${RX}" y="14" font-size="11" fill="var(--tx3)">引擎通道</text>`;
|
|
455
|
+
out+='</svg>';
|
|
456
|
+
document.getElementById('flow').innerHTML=out;
|
|
457
|
+
})();
|
|
458
|
+
|
|
459
|
+
/* ============ 图5 热力矩阵 ============ */
|
|
460
|
+
(function heat(){
|
|
461
|
+
const cats=['once','multi','none'];
|
|
462
|
+
const cell=(m,c)=>R.filter(r=>r.mod===m&&r.cat===c).length;
|
|
463
|
+
let mx=0; MORDER.forEach(m=>cats.forEach(c=>mx=Math.max(mx,cell(m,c))));
|
|
464
|
+
const W=560,L=150,CW=100,CH=28,H=MORDER.length*CH+62;
|
|
465
|
+
let out=`<svg viewBox="0 0 ${W} ${H}">`;
|
|
466
|
+
cats.forEach((c,j)=>{
|
|
467
|
+
out+=`<text x="${L+CW*j+CW/2}" y="20" font-size="11.4" fill="${CAT[c].hex}" font-weight="650" text-anchor="middle">${CAT[c].name}</text>`;
|
|
468
|
+
out+=`<text x="${L+CW*j+CW/2}" y="36" font-size="10" fill="var(--tx3)" text-anchor="middle">${cnt(c)} 个</text>`;
|
|
469
|
+
});
|
|
470
|
+
MORDER.forEach((m,i)=>{
|
|
471
|
+
const y=46+i*CH, name=MODS[m].replace(/<br>.*/,''), tot=cell(m,'once')+cell(m,'multi')+cell(m,'none');
|
|
472
|
+
out+=`<text x="${L-12}" y="${y+CH/2+4}" font-size="11.4" fill="var(--tx2)" text-anchor="end">${name}<tspan fill="var(--tx3)" font-size="9.5"> ${tot}</tspan></text>`;
|
|
473
|
+
cats.forEach((c,j)=>{
|
|
474
|
+
const v=cell(m,c), x=L+CW*j;
|
|
475
|
+
const op = v? (0.14+0.62*v/mx).toFixed(3) : 0;
|
|
476
|
+
out+=`<rect x="${x+3}" y="${y+3}" width="${CW-6}" height="${CH-6}" rx="5"
|
|
477
|
+
fill="${v?CAT[c].hex:'transparent'}" fill-opacity="${op}"
|
|
478
|
+
stroke="${v?CAT[c].hex:'var(--line)'}" stroke-opacity="${v?'.45':'.7'}"/>`;
|
|
479
|
+
if(v) out+=`<text x="${x+CW/2}" y="${y+CH/2+5}" font-size="13" font-weight="750" fill="${v/mx>0.62?'#0b0f14':CAT[c].hex}" text-anchor="middle">${v}</text>`;
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
out+='</svg>';
|
|
483
|
+
document.getElementById('heat').innerHTML=out;
|
|
484
|
+
})();
|
|
485
|
+
|
|
486
|
+
/* ============ 完成进度网格 ============ */
|
|
487
|
+
function renderProgress(){
|
|
488
|
+
const dn=doneCount(), total=R.length, pct=dn/total*100;
|
|
489
|
+
document.getElementById('pbarFill').style.width=pct.toFixed(1)+'%';
|
|
490
|
+
document.getElementById('pbarDone').textContent=dn;
|
|
491
|
+
document.getElementById('pbarPct').textContent=pct.toFixed(1)+'%';
|
|
492
|
+
document.getElementById('pgrid').innerHTML = MORDER.map(m=>{
|
|
493
|
+
const rs=R.filter(r=>r.mod===m);
|
|
494
|
+
const d=rs.filter(r=>isDone(r.id)).length;
|
|
495
|
+
return `<div class="mrow">
|
|
496
|
+
<div class="mname">${MODS[m].replace(/<br>/,' ')}<b>${d}/${rs.length}</b></div>
|
|
497
|
+
<div class="cells">${rs.map(r=>`<button class="cell ${isDone(r.id)?'on':''}" data-id="${r.id}"
|
|
498
|
+
title="#${r.id} ${r.handler}${isDone(r.id)?'\n已完成 '+fmtAt(ST.done[r.id].at):''}">#${r.id}</button>`).join('')}</div>
|
|
499
|
+
</div>`;
|
|
500
|
+
}).join('');
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/* ============ 明细表 + 筛选 ============ */
|
|
504
|
+
let FLT='all', Q='';
|
|
505
|
+
const FILTERS=[
|
|
506
|
+
{k:'all',label:'全部'}, {k:'once',label:'只调 1 次'}, {k:'multi',label:'调多次'},
|
|
507
|
+
{k:'none',label:'不调引擎'}, {k:'done',label:'已完成',cls:'ok'}, {k:'todo',label:'未完成',cls:'ok'},
|
|
508
|
+
];
|
|
509
|
+
function match(r){
|
|
510
|
+
if(FLT==='done' && !isDone(r.id)) return false;
|
|
511
|
+
if(FLT==='todo' && isDone(r.id)) return false;
|
|
512
|
+
if(FLT!=='all'&&FLT!=='done'&&FLT!=='todo' && r.cat!==FLT) return false;
|
|
513
|
+
if(Q && !(r.url+' '+r.handler+' '+r.ctl+' '+r.site+' '+r.mod+' '+r.note).toLowerCase().includes(Q)) return false;
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
516
|
+
function renderChips(){
|
|
517
|
+
const c=k=> k==='all'?R.length : (k==='done'?doneCount():(k==='todo'?R.length-doneCount():cnt(k)));
|
|
518
|
+
document.getElementById('toolbar').innerHTML =
|
|
519
|
+
FILTERS.map(f=>`<button class="chip ${f.cls||''} ${FLT===f.k?'on':''}" data-f="${f.k}">${f.label}<b>${c(f.k)}</b></button>`).join('')
|
|
520
|
+
+ `<input id="q" placeholder="搜索 URL / handler / 类名 / 行号…" value="${Q.replace(/"/g,'"')}">
|
|
521
|
+
<button class="btn" id="btnExport">⭳ 导出进度</button>
|
|
522
|
+
<button class="btn" id="btnImport">⭱ 导入进度</button>
|
|
523
|
+
<button class="btn danger" id="btnReset">清空</button>`;
|
|
524
|
+
const q=document.getElementById('q');
|
|
525
|
+
q.oninput=e=>{Q=e.target.value.trim().toLowerCase();renderTable();};
|
|
526
|
+
}
|
|
527
|
+
function renderTable(){
|
|
528
|
+
const rows=R.filter(match);
|
|
529
|
+
document.getElementById('tbody').innerHTML = rows.map(r=>{
|
|
530
|
+
const d=isDone(r.id);
|
|
531
|
+
return `<tr class="${d?'done':''}">
|
|
532
|
+
<td><button class="chk ${d?'on':''}" data-id="${r.id}" title="${d?'取消完成':'标记完成'}">${d?'✓':''}</button></td>
|
|
533
|
+
<td class="id">${r.id}</td>
|
|
534
|
+
<td><span style="color:var(--tx2)">${MODS[r.mod].replace(/<br>.*/,'')}</span></td>
|
|
535
|
+
<td class="url">${r.url}${d?`<span class="donemark">✓ ${fmtAt(ST.done[r.id].at)}</span>`:''}</td>
|
|
536
|
+
<td><code>${r.handler}</code></td>
|
|
537
|
+
<td class="site">${r.site}${r.note?`<div class="note">↳ ${r.note}</div>`:''}</td>
|
|
538
|
+
<td class="calls" style="color:${CAT[r.cat].hex}">${r.calls}</td>
|
|
539
|
+
<td><span class="tag ${r.cat}">${CAT[r.cat].name}</span></td>
|
|
540
|
+
</tr>`;}).join('') || `<tr><td colspan="8" style="text-align:center;padding:26px;color:var(--tx3)">无匹配结果</td></tr>`;
|
|
541
|
+
}
|
|
542
|
+
function refresh(){ renderKPI(); renderBars(); renderProgress(); renderChips(); renderTable(); }
|
|
543
|
+
|
|
544
|
+
/* --- 表格内勾选(事件委托) --- */
|
|
545
|
+
document.getElementById('tbody').addEventListener('click',e=>{
|
|
546
|
+
const b=e.target.closest('.chk'); if(!b) return;
|
|
547
|
+
toggle(+b.dataset.id);
|
|
548
|
+
});
|
|
549
|
+
/* --- 进度网格点击 --- */
|
|
550
|
+
document.getElementById('pgrid').addEventListener('click',e=>{
|
|
551
|
+
const b=e.target.closest('.cell'); if(!b) return;
|
|
552
|
+
toggle(+b.dataset.id);
|
|
553
|
+
});
|
|
554
|
+
/* --- 筛选 chips --- */
|
|
555
|
+
document.getElementById('toolbar').addEventListener('click',e=>{
|
|
556
|
+
const chip=e.target.closest('.chip');
|
|
557
|
+
if(chip){ FLT=chip.dataset.f; renderChips(); renderTable(); return; }
|
|
558
|
+
if(e.target.id==='btnExport') return exportJson();
|
|
559
|
+
if(e.target.id==='btnImport') return document.getElementById('fileIn').click();
|
|
560
|
+
if(e.target.id==='btnReset') return resetAll();
|
|
561
|
+
});
|
|
562
|
+
|
|
563
|
+
/* ============ 导出 / 导入 / 重置 ============ */
|
|
564
|
+
function ts(){const d=new Date(),p=n=>String(n).padStart(2,'0');
|
|
565
|
+
return d.getFullYear()+p(d.getMonth()+1)+p(d.getDate())+'-'+p(d.getHours())+p(d.getMinutes());}
|
|
566
|
+
function exportJson(){
|
|
567
|
+
const payload={app:'irule-engine-calls',version:2,exported:new Date().toISOString(),total:R.length,done:ST.done};
|
|
568
|
+
const blob=new Blob([JSON.stringify(payload,null,2)],{type:'application/json;charset=utf-8'});
|
|
569
|
+
const a=document.createElement('a');
|
|
570
|
+
a.href=URL.createObjectURL(blob);
|
|
571
|
+
a.download='irule-engine-progress-'+ts()+'.json';
|
|
572
|
+
document.body.appendChild(a); a.click(); a.remove();
|
|
573
|
+
setTimeout(()=>URL.revokeObjectURL(a.href),4000);
|
|
574
|
+
toast('已导出 '+doneCount()+' 条完成记录');
|
|
575
|
+
}
|
|
576
|
+
document.getElementById('fileIn').addEventListener('change',e=>{
|
|
577
|
+
const f=e.target.files&&e.target.files[0]; if(!f) return;
|
|
578
|
+
const fr=new FileReader();
|
|
579
|
+
fr.onload=()=>{
|
|
580
|
+
try{
|
|
581
|
+
const o=JSON.parse(fr.result);
|
|
582
|
+
const d=(o&&o.done)||o;
|
|
583
|
+
if(!d||typeof d!=='object'||Array.isArray(d)) throw new Error('bad');
|
|
584
|
+
const next={};
|
|
585
|
+
Object.keys(d).forEach(k=>{
|
|
586
|
+
if(R.some(r=>String(r.id)===String(k))) next[k]=(d[k]&&typeof d[k]==='object')?d[k]:{at:new Date().toISOString()};
|
|
587
|
+
});
|
|
588
|
+
ST.done=next; persist(); refresh();
|
|
589
|
+
toast('已导入 '+doneCount()+' 条完成记录');
|
|
590
|
+
}catch(err){ toast('文件格式不正确,需要本页导出的 JSON'); }
|
|
591
|
+
e.target.value='';
|
|
592
|
+
};
|
|
593
|
+
fr.readAsText(f,'utf-8');
|
|
594
|
+
});
|
|
595
|
+
function resetAll(){
|
|
596
|
+
if(!doneCount()){ toast('当前没有完成标记'); return; }
|
|
597
|
+
if(!confirm('清空全部 '+doneCount()+' 条完成标记?建议先「导出进度」备份。')) return;
|
|
598
|
+
ST.done={}; persist(); refresh(); toast('已清空完成标记');
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/* ============ 静态表 & 主题 ============ */
|
|
602
|
+
document.getElementById('sites').innerHTML = DATA.sites.map(s=>`<tr>
|
|
603
|
+
<td style="color:var(--tx2);white-space:nowrap">${s.mod}</td>
|
|
604
|
+
<td class="site">${s.loc}</td>
|
|
605
|
+
<td><code>${s.how}</code></td>
|
|
606
|
+
<td class="note">${s.note||''}</td>
|
|
607
|
+
</tr>`).join('');
|
|
608
|
+
|
|
609
|
+
const btn=document.getElementById('themeBtn'), root=document.documentElement;
|
|
610
|
+
btn.onclick=()=>{
|
|
611
|
+
const dark=root.getAttribute('data-theme')==='dark';
|
|
612
|
+
root.setAttribute('data-theme', dark?'light':'dark');
|
|
613
|
+
btn.textContent = dark?'🌙 暗色':'☀ 亮色';
|
|
614
|
+
};
|
|
615
|
+
|
|
616
|
+
/* ============ 启动 ============ */
|
|
617
|
+
badge();
|
|
618
|
+
refresh();
|
|
619
|
+
</script>
|
|
620
|
+
</body>
|
|
621
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bgff-pass4",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "test",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"irule-engine-calls.html"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
11
|
+
"publish:npm": "npm publish --access public --registry=https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"author": "",
|
|
14
|
+
"license": "ISC"
|
|
15
|
+
}
|
package/README.md
DELETED