w-web-perm 1.1.4 → 1.1.6
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/README.md +1 -1
- package/dist/css/app.6918ec45.css +1 -0
- package/dist/css/{chunk-vendors.2bcfce08.css → chunk-vendors.3c580e72.css} +1 -1
- package/dist/index.tmp +2 -2
- package/dist/js/app-legacy.5f15a58f.js +1 -0
- package/dist/js/app.5f15a58f.js +1 -0
- package/dist/js/{chunk-vendors-legacy.fc37f076.js → chunk-vendors-legacy.38f515f9.js} +16 -16
- package/dist/js/{chunk-vendors.fc37f076.js → chunk-vendors.38f515f9.js} +16 -16
- package/dist/w-web-perm.umd.js +2 -2
- package/dist/w-web-perm.umd.js.map +1 -1
- package/docs/WWebPerm.html +7 -7
- package/docs/global.html +2068 -111
- package/docs/index.html +2 -2
- package/docs/server_WWebPerm.mjs.html +63 -31
- package/docs/server_lockSave.mjs.html +115 -0
- package/docs/server_maskLog.mjs.html +176 -0
- package/docs/server_procCore.mjs.html +31 -5
- package/docs/server_wrapInjected.mjs.html +163 -0
- package/docs/src_fetchJson.mjs.html +31 -5
- package/docs/src_js_legendFit.mjs.html +225 -0
- package/docs/src_plugins_reuseDeletedIds.mjs.html +136 -0
- package/docs/src_plugins_submitGuard.mjs.html +163 -0
- package/package.json +13 -13
- package/public/index.html +2 -0
- package/server/WWebPerm.mjs +61 -29
- package/server/lockSave.mjs +43 -0
- package/server/maskLog.mjs +104 -0
- package/server/procCore.mjs +29 -3
- package/server/procLang.mjs +8 -0
- package/server/procStaInfor.mjs +32 -14
- package/server/wrapInjected.mjs +91 -0
- package/src/components/Common/CheckYes.vue +6 -0
- package/src/components/Common/CheckYesNo.vue +6 -0
- package/src/components/LayoutContentGrups.vue +30 -21
- package/src/components/LayoutContentPemis.vue +30 -21
- package/src/components/LayoutContentStaInfor.vue +74 -5
- package/src/components/LayoutContentTargets.vue +36 -22
- package/src/components/LayoutContentUsers.vue +31 -21
- package/src/components/RelationChips.vue +11 -31
- package/src/components/VeCgrups.vue +8 -1
- package/src/components/VeCpemis.vue +8 -1
- package/src/components/VeCrules.vue +8 -1
- package/src/components/VeGrupBlngUsers.vue +37 -31
- package/src/components/VePemiBlngGrups.vue +37 -31
- package/src/fetchJson.mjs +28 -2
- package/src/getPerm.mjs +9 -6
- package/src/getPermUserInfor.mjs +12 -9
- package/src/js/legendFit.mjs +153 -0
- package/src/plugins/mUI.mjs +20 -0
- package/src/plugins/reuseDeletedIds.mjs +64 -0
- package/src/plugins/submitGuard.mjs +91 -0
- package/srv.mjs +20 -1
- package/dist/css/app.506ce4d8.css +0 -1
- package/dist/js/app-legacy.8e615442.js +0 -1
- package/dist/js/app.8e615442.js +0 -1
- package/tableTags-web-perm.json +0 -1
package/docs/global.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WWebPerm.html">WWebPerm</a></li></ul><h3>Global</h3><ul><li><a href="global.html#createLegendMeasurer">createLegendMeasurer</a></li><li><a href="global.html#createLockSave">createLockSave</a></li><li><a href="global.html#decideLegendType">decideLegendType</a></li><li><a href="global.html#describeUpstream">describeUpstream</a></li><li><a href="global.html#fetchJson">fetchJson</a></li><li><a href="global.html#genLegend">genLegend</a></li><li><a href="global.html#maskQuery">maskQuery</a></li><li><a href="global.html#maskTok">maskTok</a></li><li><a href="global.html#maskUrl">maskUrl</a></li><li><a href="global.html#mergePickKeysOnly">mergePickKeysOnly</a></li><li><a href="global.html#reuseDeletedIds">reuseDeletedIds</a></li><li><a href="global.html#submitGuard">submitGuard</a></li><li><a href="global.html#wrapInjected">wrapInjected</a></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
<h4 class="name" id="
|
|
133
|
+
<h4 class="name" id="createLegendMeasurer"><span class="type-signature"></span>createLegendMeasurer<span class="signature">(echarts)</span><span class="type-signature"> → {Object}</span></h4>
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
|
|
@@ -140,20 +140,14 @@
|
|
|
140
140
|
<dl class="details">
|
|
141
141
|
|
|
142
142
|
<dt class="tag-description">Description:</dt>
|
|
143
|
-
<dd class="tag-description"><ul class="dummy"><li><p
|
|
144
|
-
<p
|
|
145
|
-
<ul>
|
|
146
|
-
<li>網路錯誤或非 2xx: axios 會 reject, fetch 只在網路錯誤 reject, 故此處對 !res.ok 亦 reject, 統一為 { kind: 'request', status, message }</li>
|
|
147
|
-
<li>回應非 JSON: axios 回原字串(呼叫端判 state 失敗), 此處 res.json() 失敗 reject { kind: 'parse', status, message }</li>
|
|
148
|
-
<li>成功: resolve 解析後之 JSON(對應 axios 之 res.data)
|
|
149
|
-
注意: node 端 fetch(undici) 不讀 HTTP_PROXY / HTTPS_PROXY 環境變數(axios 會), 需走 proxy 之部署須自行以 opt.dispatcher 注入 undici Agent</li>
|
|
150
|
-
</ul></li></ul></dd>
|
|
143
|
+
<dd class="tag-description"><ul class="dummy"><li><p>建立離屏量測器: 以未掛入DOM之echarts實例, 計算一般式圖例於指定寬度之排版</p>
|
|
144
|
+
<p>量測實例僅含圖例、隱藏之座標軸與同名空系列, 故顯示列表中「文字等於系列名」之元素即圖例項目(不會與軸刻度文字撞名)</p></li></ul></dd>
|
|
151
145
|
|
|
152
146
|
|
|
153
147
|
|
|
154
148
|
<dt class="tag-source">Source:</dt>
|
|
155
149
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
156
|
-
<a href="
|
|
150
|
+
<a href="src_js_legendFit.mjs.html">src/js/legendFit.mjs</a>, <a href="src_js_legendFit.mjs.html#line59">line 59</a>
|
|
157
151
|
</li></ul></dd>
|
|
158
152
|
|
|
159
153
|
|
|
@@ -213,12 +207,8 @@
|
|
|
213
207
|
<th>Type</th>
|
|
214
208
|
|
|
215
209
|
|
|
216
|
-
<th>Attributes</th>
|
|
217
|
-
|
|
218
210
|
|
|
219
211
|
|
|
220
|
-
<th>Default</th>
|
|
221
|
-
|
|
222
212
|
|
|
223
213
|
<th class="last">Description</th>
|
|
224
214
|
</tr>
|
|
@@ -229,43 +219,7 @@
|
|
|
229
219
|
|
|
230
220
|
<tr>
|
|
231
221
|
|
|
232
|
-
<td class="name"><code>
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<td class="type">
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
<span class="param-type">String</span>
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
</td>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
<td class="attributes">
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
</td>
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
<td class="default">
|
|
257
|
-
|
|
258
|
-
</td>
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<td class="description last"><p>輸入請求網址字串</p></td>
|
|
262
|
-
</tr>
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<tr>
|
|
267
|
-
|
|
268
|
-
<td class="name"><code>opt</code></td>
|
|
222
|
+
<td class="name"><code>echarts</code></td>
|
|
269
223
|
|
|
270
224
|
|
|
271
225
|
<td class="type">
|
|
@@ -279,26 +233,10 @@
|
|
|
279
233
|
</td>
|
|
280
234
|
|
|
281
235
|
|
|
282
|
-
<td class="attributes">
|
|
283
|
-
|
|
284
|
-
<optional><br>
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</td>
|
|
291
|
-
|
|
292
236
|
|
|
293
237
|
|
|
294
|
-
<td class="default">
|
|
295
|
-
|
|
296
|
-
<code>{}</code>
|
|
297
|
-
|
|
298
|
-
</td>
|
|
299
|
-
|
|
300
238
|
|
|
301
|
-
<td class="description last"><p>輸入
|
|
239
|
+
<td class="description last"><p>輸入echarts命名空間物件, 須與圖表同一份(例如w-echarts-vue之iniEcharts()), 字型與版面規則方能一致</p></td>
|
|
302
240
|
</tr>
|
|
303
241
|
|
|
304
242
|
|
|
@@ -324,7 +262,7 @@
|
|
|
324
262
|
|
|
325
263
|
|
|
326
264
|
<div class="param-desc">
|
|
327
|
-
<p
|
|
265
|
+
<p>回傳物件, 含measure(names,width,height)與dispose(); measure回傳{rows,bottom}(bottom為圖例底緣距圖表頂之px), 量不到回null</p>
|
|
328
266
|
</div>
|
|
329
267
|
|
|
330
268
|
|
|
@@ -335,7 +273,7 @@
|
|
|
335
273
|
</dt>
|
|
336
274
|
<dd>
|
|
337
275
|
|
|
338
|
-
<span class="param-type">
|
|
276
|
+
<span class="param-type">Object</span>
|
|
339
277
|
|
|
340
278
|
|
|
341
279
|
|
|
@@ -351,7 +289,7 @@
|
|
|
351
289
|
|
|
352
290
|
|
|
353
291
|
|
|
354
|
-
<h4 class="name" id="
|
|
292
|
+
<h4 class="name" id="createLockSave"><span class="type-signature"></span>createLockSave<span class="signature">(cst)</span><span class="type-signature"> → {function}</span></h4>
|
|
355
293
|
|
|
356
294
|
|
|
357
295
|
|
|
@@ -361,14 +299,19 @@
|
|
|
361
299
|
<dl class="details">
|
|
362
300
|
|
|
363
301
|
<dt class="tag-description">Description:</dt>
|
|
364
|
-
<dd class="tag-description"><ul class="dummy"><li><p
|
|
365
|
-
<p
|
|
302
|
+
<dd class="tag-description"><ul class="dummy"><li><p>有副作用之寫入路徑(如清單儲存 updateUsersList / updateTokensList / updateIpsList)之雙擊防護(後端, ADR-025)</p>
|
|
303
|
+
<p>以「操作:操作者 id」於 wsemi cacheSt 原子占位執行 fn, 同一操作者之同一操作處理中再送出即 reject 錯誤 key
|
|
304
|
+
(預設 'saveInProgress', 可以 opt.errKey 指定; 皆為 i18n key, 見 procLang); 不同操作者、不同操作互不影響;
|
|
305
|
+
fn 之 reject 原樣 bubble; fn 結束(含失敗)即釋放.
|
|
306
|
+
第 2 次不排隊執行: 其內容與第 1 次相同, 排隊後再寫一次會把第 1 次剛建立之列當修改覆寫
|
|
307
|
+
(依序重送另由各專案之資料層檢查擋, 如 SSO procCore.updateTabItems 之新增列檢查回 'saveNewRowExists').
|
|
308
|
+
operatorId 可為操作者 id 或「操作者 id + 列識別」(只擋同一列之連發, 同批其他列不受影響).</p></li></ul></dd>
|
|
366
309
|
|
|
367
310
|
|
|
368
311
|
|
|
369
312
|
<dt class="tag-source">Source:</dt>
|
|
370
313
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
371
|
-
<a href="
|
|
314
|
+
<a href="server_lockSave.mjs.html">server/lockSave.mjs</a>, <a href="server_lockSave.mjs.html#line18">line 18</a>
|
|
372
315
|
</li></ul></dd>
|
|
373
316
|
|
|
374
317
|
|
|
@@ -440,13 +383,13 @@
|
|
|
440
383
|
|
|
441
384
|
<tr>
|
|
442
385
|
|
|
443
|
-
<td class="name"><code>
|
|
386
|
+
<td class="name"><code>cst</code></td>
|
|
444
387
|
|
|
445
388
|
|
|
446
389
|
<td class="type">
|
|
447
390
|
|
|
448
391
|
|
|
449
|
-
<span class="param-type">
|
|
392
|
+
<span class="param-type">Object</span>
|
|
450
393
|
|
|
451
394
|
|
|
452
395
|
|
|
@@ -457,68 +400,157 @@
|
|
|
457
400
|
|
|
458
401
|
|
|
459
402
|
|
|
460
|
-
<td class="description last"><p
|
|
403
|
+
<td class="description last"><p>輸入 wsemi cacheSt 實例</p></td>
|
|
461
404
|
</tr>
|
|
462
405
|
|
|
463
406
|
|
|
407
|
+
</tbody>
|
|
408
|
+
</table>
|
|
409
|
+
|
|
410
|
+
|
|
464
411
|
|
|
465
|
-
<tr>
|
|
466
|
-
|
|
467
|
-
<td class="name"><code>rowsIn</code></td>
|
|
468
|
-
|
|
469
412
|
|
|
470
|
-
<td class="type">
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
<span class="param-type">Array</span>
|
|
474
413
|
|
|
475
414
|
|
|
476
415
|
|
|
477
|
-
|
|
478
|
-
</td>
|
|
479
416
|
|
|
480
|
-
|
|
481
417
|
|
|
482
|
-
|
|
483
418
|
|
|
484
|
-
|
|
485
|
-
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
<div class="param-desc">
|
|
429
|
+
<p>回傳 async (op, operatorId, fn, opt = {}) => fn 之結果, opt.errKey 為占位衝突時 reject 之 key</p>
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
<dl class="param-type">
|
|
435
|
+
<dt>
|
|
436
|
+
Type
|
|
437
|
+
</dt>
|
|
438
|
+
<dd>
|
|
439
|
+
|
|
440
|
+
<span class="param-type">function</span>
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
</dd>
|
|
445
|
+
</dl>
|
|
486
446
|
|
|
487
447
|
|
|
488
448
|
|
|
489
|
-
<tr>
|
|
490
|
-
|
|
491
|
-
<td class="name"><code>keyDetect</code></td>
|
|
492
|
-
|
|
493
449
|
|
|
494
|
-
|
|
450
|
+
|
|
451
|
+
|
|
495
452
|
|
|
496
|
-
|
|
497
|
-
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
<h4 class="name" id="decideLegendType"><span class="type-signature"></span>decideLegendType<span class="signature">(m)</span><span class="type-signature"> → {String}</span></h4>
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
<dl class="details">
|
|
464
|
+
|
|
465
|
+
<dt class="tag-description">Description:</dt>
|
|
466
|
+
<dd class="tag-description"><ul class="dummy"><li><p>依量測結果決定圖例類型</p></li></ul></dd>
|
|
467
|
+
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
<dt class="tag-source">Source:</dt>
|
|
471
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
472
|
+
<a href="src_js_legendFit.mjs.html">src/js/legendFit.mjs</a>, <a href="src_js_legendFit.mjs.html#line43">line 43</a>
|
|
473
|
+
</li></ul></dd>
|
|
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
|
+
</dl>
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
498
512
|
|
|
499
513
|
|
|
500
514
|
|
|
501
|
-
|
|
502
|
-
</td>
|
|
503
515
|
|
|
504
|
-
|
|
505
516
|
|
|
506
|
-
|
|
507
517
|
|
|
508
|
-
<td class="description last"><p>對應列之鍵欄位(如 'id')</p></td>
|
|
509
|
-
</tr>
|
|
510
518
|
|
|
519
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
<table class="params">
|
|
523
|
+
<thead>
|
|
524
|
+
<tr>
|
|
525
|
+
|
|
526
|
+
<th>Name</th>
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
<th>Type</th>
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
<th class="last">Description</th>
|
|
536
|
+
</tr>
|
|
537
|
+
</thead>
|
|
538
|
+
|
|
539
|
+
<tbody>
|
|
511
540
|
|
|
512
541
|
|
|
513
542
|
<tr>
|
|
514
543
|
|
|
515
|
-
<td class="name"><code>
|
|
544
|
+
<td class="name"><code>m</code></td>
|
|
516
545
|
|
|
517
546
|
|
|
518
547
|
<td class="type">
|
|
519
548
|
|
|
520
549
|
|
|
521
|
-
<span class="param-type">
|
|
550
|
+
<span class="param-type">Object</span>
|
|
551
|
+
|
|
|
552
|
+
|
|
553
|
+
<span class="param-type">null</span>
|
|
522
554
|
|
|
523
555
|
|
|
524
556
|
|
|
@@ -529,7 +561,7 @@
|
|
|
529
561
|
|
|
530
562
|
|
|
531
563
|
|
|
532
|
-
<td class="description last"><p
|
|
564
|
+
<td class="description last"><p>輸入量測結果物件{rows,bottom}, 量測失敗為null</p></td>
|
|
533
565
|
</tr>
|
|
534
566
|
|
|
535
567
|
|
|
@@ -555,7 +587,7 @@
|
|
|
555
587
|
|
|
556
588
|
|
|
557
589
|
<div class="param-desc">
|
|
558
|
-
<p
|
|
590
|
+
<p>回傳'plain'或'scroll', 量測失敗回'scroll'(單列, 不會重疊)</p>
|
|
559
591
|
</div>
|
|
560
592
|
|
|
561
593
|
|
|
@@ -566,7 +598,1932 @@
|
|
|
566
598
|
</dt>
|
|
567
599
|
<dd>
|
|
568
600
|
|
|
569
|
-
<span class="param-type">
|
|
601
|
+
<span class="param-type">String</span>
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
</dd>
|
|
606
|
+
</dl>
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
<h4 class="name" id="describeUpstream"><span class="type-signature"></span>describeUpstream<span class="signature">(err)</span><span class="type-signature"> → {Object}</span></h4>
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
<dl class="details">
|
|
625
|
+
|
|
626
|
+
<dt class="tag-description">Description:</dt>
|
|
627
|
+
<dd class="tag-description"><ul class="dummy"><li><p>描述上游失敗, 供寫入 log: 絕不含上游原文</p>
|
|
628
|
+
<ul>
|
|
629
|
+
<li>reject 值(字串)或其 message 屬白名單 key → { upstream: key }</li>
|
|
630
|
+
<li>其餘 → { upstreamType, upstreamName }: 型別(null / array / typeof)與名稱形狀之 Error.name(無則 '')</li>
|
|
631
|
+
</ul></li></ul></dd>
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
<dt class="tag-source">Source:</dt>
|
|
636
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
637
|
+
<a href="server_wrapInjected.mjs.html">server/wrapInjected.mjs</a>, <a href="server_wrapInjected.mjs.html#line45">line 45</a>
|
|
638
|
+
</li></ul></dd>
|
|
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
|
+
</dl>
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
<table class="params">
|
|
688
|
+
<thead>
|
|
689
|
+
<tr>
|
|
690
|
+
|
|
691
|
+
<th>Name</th>
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
<th>Type</th>
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
<th class="last">Description</th>
|
|
701
|
+
</tr>
|
|
702
|
+
</thead>
|
|
703
|
+
|
|
704
|
+
<tbody>
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
<tr>
|
|
708
|
+
|
|
709
|
+
<td class="name"><code>err</code></td>
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
<td class="type">
|
|
713
|
+
|
|
714
|
+
|
|
715
|
+
<span class="param-type">*</span>
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
</td>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
<td class="description last"><p>輸入注入函數拋出或 reject 之值</p></td>
|
|
727
|
+
</tr>
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
</tbody>
|
|
731
|
+
</table>
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
|
|
748
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
<div class="param-desc">
|
|
752
|
+
<p>回傳描述物件</p>
|
|
753
|
+
</div>
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
|
|
757
|
+
<dl class="param-type">
|
|
758
|
+
<dt>
|
|
759
|
+
Type
|
|
760
|
+
</dt>
|
|
761
|
+
<dd>
|
|
762
|
+
|
|
763
|
+
<span class="param-type">Object</span>
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
</dd>
|
|
768
|
+
</dl>
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
<h4 class="name" id="fetchJson"><span class="type-signature type-signature-async">(async) </span>fetchJson<span class="signature">(url, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise}</span></h4>
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
<dl class="details">
|
|
787
|
+
|
|
788
|
+
<dt class="tag-description">Description:</dt>
|
|
789
|
+
<dd class="tag-description"><ul class="dummy"><li><p>以瀏覽器與 node(18+) 內建之 fetch 取得 JSON 回應, 取代 axios(2026-09-07 起本套件不再依賴 axios)</p>
|
|
790
|
+
<p>與 axios 之語意對齊:</p>
|
|
791
|
+
<ul>
|
|
792
|
+
<li>網路錯誤或非 2xx: axios 會 reject, fetch 只在網路錯誤 reject, 故此處對 !res.ok 亦 reject, 統一為 { kind: 'request', status, message }</li>
|
|
793
|
+
<li>回應非 JSON: axios 回原字串(呼叫端判 state 失敗), 此處 res.json() 失敗 reject { kind: 'parse', status, message }</li>
|
|
794
|
+
<li>成功: resolve 解析後之 JSON(對應 axios 之 res.data)
|
|
795
|
+
reject 之 message 只含例外名稱與代碼(如 'TypeError ECONNREFUSED'、'SyntaxError')或 'HTTP <status>', 不含網址與回應本體(網址常帶權杖)
|
|
796
|
+
注意: node 端 fetch(undici) 不讀 HTTP_PROXY / HTTPS_PROXY 環境變數(axios 會), 需走 proxy 之部署須自行以 opt.dispatcher 注入 undici Agent</li>
|
|
797
|
+
</ul></li></ul></dd>
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
<dt class="tag-source">Source:</dt>
|
|
802
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
803
|
+
<a href="src_fetchJson.mjs.html">src/fetchJson.mjs</a>, <a href="src_fetchJson.mjs.html#line40">line 40</a>
|
|
804
|
+
</li></ul></dd>
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
</dl>
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
|
|
840
|
+
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
<table class="params">
|
|
854
|
+
<thead>
|
|
855
|
+
<tr>
|
|
856
|
+
|
|
857
|
+
<th>Name</th>
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
<th>Type</th>
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
<th>Attributes</th>
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
<th>Default</th>
|
|
868
|
+
|
|
869
|
+
|
|
870
|
+
<th class="last">Description</th>
|
|
871
|
+
</tr>
|
|
872
|
+
</thead>
|
|
873
|
+
|
|
874
|
+
<tbody>
|
|
875
|
+
|
|
876
|
+
|
|
877
|
+
<tr>
|
|
878
|
+
|
|
879
|
+
<td class="name"><code>url</code></td>
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
<td class="type">
|
|
883
|
+
|
|
884
|
+
|
|
885
|
+
<span class="param-type">String</span>
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
</td>
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
<td class="attributes">
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
|
|
899
|
+
</td>
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
<td class="default">
|
|
904
|
+
|
|
905
|
+
</td>
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
<td class="description last"><p>輸入請求網址字串</p></td>
|
|
909
|
+
</tr>
|
|
910
|
+
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
<tr>
|
|
914
|
+
|
|
915
|
+
<td class="name"><code>opt</code></td>
|
|
916
|
+
|
|
917
|
+
|
|
918
|
+
<td class="type">
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
<span class="param-type">Object</span>
|
|
922
|
+
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
</td>
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
<td class="attributes">
|
|
930
|
+
|
|
931
|
+
<optional><br>
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
</td>
|
|
938
|
+
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
<td class="default">
|
|
942
|
+
|
|
943
|
+
<code>{}</code>
|
|
944
|
+
|
|
945
|
+
</td>
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
<td class="description last"><p>輸入 fetch 選項物件(method / headers / body / signal / dispatcher 等原樣傳給 fetch), 預設 {}</p></td>
|
|
949
|
+
</tr>
|
|
950
|
+
|
|
951
|
+
|
|
952
|
+
</tbody>
|
|
953
|
+
</table>
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
<div class="param-desc">
|
|
974
|
+
<p>回傳 Promise, resolve 為 JSON 物件, reject 為 { kind: 'request'|'parse', status, message }</p>
|
|
975
|
+
</div>
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
<dl class="param-type">
|
|
980
|
+
<dt>
|
|
981
|
+
Type
|
|
982
|
+
</dt>
|
|
983
|
+
<dd>
|
|
984
|
+
|
|
985
|
+
<span class="param-type">Promise</span>
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
</dd>
|
|
990
|
+
</dl>
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
<h4 class="name" id="genLegend"><span class="type-signature"></span>genLegend<span class="signature">(type<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Object}</span></h4>
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
<dl class="details">
|
|
1009
|
+
|
|
1010
|
+
<dt class="tag-description">Description:</dt>
|
|
1011
|
+
<dd class="tag-description"><ul class="dummy"><li><p>產生圖例設定(單一來源), genOpt 與執行期切換類型共用</p>
|
|
1012
|
+
<p>切換類型(plain↔scroll)時 echarts 以新傳入之選項重建圖例模型(Global.js:322-344), 未帶之設定一律回到預設, 故每次都須帶齊</p></li></ul></dd>
|
|
1013
|
+
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
<dt class="tag-source">Source:</dt>
|
|
1017
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1018
|
+
<a href="src_js_legendFit.mjs.html">src/js/legendFit.mjs</a>, <a href="src_js_legendFit.mjs.html#line24">line 24</a>
|
|
1019
|
+
</li></ul></dd>
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
</dl>
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
<table class="params">
|
|
1069
|
+
<thead>
|
|
1070
|
+
<tr>
|
|
1071
|
+
|
|
1072
|
+
<th>Name</th>
|
|
1073
|
+
|
|
1074
|
+
|
|
1075
|
+
<th>Type</th>
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
<th>Attributes</th>
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
<th>Default</th>
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
<th class="last">Description</th>
|
|
1086
|
+
</tr>
|
|
1087
|
+
</thead>
|
|
1088
|
+
|
|
1089
|
+
<tbody>
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
<tr>
|
|
1093
|
+
|
|
1094
|
+
<td class="name"><code>type</code></td>
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
<td class="type">
|
|
1098
|
+
|
|
1099
|
+
|
|
1100
|
+
<span class="param-type">String</span>
|
|
1101
|
+
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
</td>
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
<td class="attributes">
|
|
1109
|
+
|
|
1110
|
+
<optional><br>
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
|
|
1116
|
+
</td>
|
|
1117
|
+
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
<td class="default">
|
|
1121
|
+
|
|
1122
|
+
<code>'plain'</code>
|
|
1123
|
+
|
|
1124
|
+
</td>
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
<td class="description last"><p>輸入圖例類型字串, 'plain'或'scroll', 預設'plain'</p></td>
|
|
1128
|
+
</tr>
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
</tbody>
|
|
1132
|
+
</table>
|
|
1133
|
+
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
<div class="param-desc">
|
|
1153
|
+
<p>回傳echarts之legend設定物件</p>
|
|
1154
|
+
</div>
|
|
1155
|
+
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
<dl class="param-type">
|
|
1159
|
+
<dt>
|
|
1160
|
+
Type
|
|
1161
|
+
</dt>
|
|
1162
|
+
<dd>
|
|
1163
|
+
|
|
1164
|
+
<span class="param-type">Object</span>
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
|
|
1168
|
+
</dd>
|
|
1169
|
+
</dl>
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
<h4 class="name" id="maskQuery"><span class="type-signature"></span>maskQuery<span class="signature">(q)</span><span class="type-signature"> → {Object|String|Array}</span></h4>
|
|
1181
|
+
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
<dl class="details">
|
|
1188
|
+
|
|
1189
|
+
<dt class="tag-description">Description:</dt>
|
|
1190
|
+
<dd class="tag-description"><ul class="dummy"><li><p>查詢參數遮罩: 淺拷貝, 鍵名小寫為 token 者以 maskTok 處理, 其餘原樣(供印出 req.query)
|
|
1191
|
+
非物件輸入依 maskTok 處理</p></li></ul></dd>
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
<dt class="tag-source">Source:</dt>
|
|
1196
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1197
|
+
<a href="server_maskLog.mjs.html">server/maskLog.mjs</a>, <a href="server_maskLog.mjs.html#line55">line 55</a>
|
|
1198
|
+
</li></ul></dd>
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
|
|
1227
|
+
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
</dl>
|
|
1231
|
+
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
<table class="params">
|
|
1248
|
+
<thead>
|
|
1249
|
+
<tr>
|
|
1250
|
+
|
|
1251
|
+
<th>Name</th>
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
<th>Type</th>
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
<th class="last">Description</th>
|
|
1261
|
+
</tr>
|
|
1262
|
+
</thead>
|
|
1263
|
+
|
|
1264
|
+
<tbody>
|
|
1265
|
+
|
|
1266
|
+
|
|
1267
|
+
<tr>
|
|
1268
|
+
|
|
1269
|
+
<td class="name"><code>q</code></td>
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
<td class="type">
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
<span class="param-type">*</span>
|
|
1276
|
+
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
</td>
|
|
1281
|
+
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
<td class="description last"><p>輸入查詢參數物件(Hapi 之 req.query 為 null-prototype 物件)</p></td>
|
|
1287
|
+
</tr>
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
</tbody>
|
|
1291
|
+
</table>
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
|
|
1300
|
+
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
<div class="param-desc">
|
|
1312
|
+
<p>回傳遮罩後之淺拷貝</p>
|
|
1313
|
+
</div>
|
|
1314
|
+
|
|
1315
|
+
|
|
1316
|
+
|
|
1317
|
+
<dl class="param-type">
|
|
1318
|
+
<dt>
|
|
1319
|
+
Type
|
|
1320
|
+
</dt>
|
|
1321
|
+
<dd>
|
|
1322
|
+
|
|
1323
|
+
<span class="param-type">Object</span>
|
|
1324
|
+
|
|
|
1325
|
+
|
|
1326
|
+
<span class="param-type">String</span>
|
|
1327
|
+
|
|
|
1328
|
+
|
|
1329
|
+
<span class="param-type">Array</span>
|
|
1330
|
+
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
</dd>
|
|
1334
|
+
</dl>
|
|
1335
|
+
|
|
1336
|
+
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
|
|
1345
|
+
<h4 class="name" id="maskTok"><span class="type-signature"></span>maskTok<span class="signature">(token)</span><span class="type-signature"> → {String|Array}</span></h4>
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
<dl class="details">
|
|
1353
|
+
|
|
1354
|
+
<dt class="tag-description">Description:</dt>
|
|
1355
|
+
<dd class="tag-description"><ul class="dummy"><li><p>權杖遮罩</p>
|
|
1356
|
+
<ul>
|
|
1357
|
+
<li>空值(undefined / null / '')回 ''</li>
|
|
1358
|
+
<li>陣列逐元素遮罩</li>
|
|
1359
|
+
<li>字串(長度 n)露出前後各 k=min(4, floor(n/8)) 字: k=0 只回 '(len=n)', 否則 '前k...後k(len=n)'; 36 字元之 session token 為前 4 後 4(與 w-web-sso 格式相同)</li>
|
|
1360
|
+
<li>其他型別只回 '(typeof)', 絕不輸出原值</li>
|
|
1361
|
+
</ul></li></ul></dd>
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
|
|
1365
|
+
<dt class="tag-source">Source:</dt>
|
|
1366
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1367
|
+
<a href="server_maskLog.mjs.html">server/maskLog.mjs</a>, <a href="server_maskLog.mjs.html#line29">line 29</a>
|
|
1368
|
+
</li></ul></dd>
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
|
|
1379
|
+
|
|
1380
|
+
|
|
1381
|
+
|
|
1382
|
+
|
|
1383
|
+
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
|
|
1395
|
+
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
</dl>
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
|
|
1414
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
1415
|
+
|
|
1416
|
+
|
|
1417
|
+
<table class="params">
|
|
1418
|
+
<thead>
|
|
1419
|
+
<tr>
|
|
1420
|
+
|
|
1421
|
+
<th>Name</th>
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
<th>Type</th>
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
|
|
1430
|
+
<th class="last">Description</th>
|
|
1431
|
+
</tr>
|
|
1432
|
+
</thead>
|
|
1433
|
+
|
|
1434
|
+
<tbody>
|
|
1435
|
+
|
|
1436
|
+
|
|
1437
|
+
<tr>
|
|
1438
|
+
|
|
1439
|
+
<td class="name"><code>token</code></td>
|
|
1440
|
+
|
|
1441
|
+
|
|
1442
|
+
<td class="type">
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
<span class="param-type">*</span>
|
|
1446
|
+
|
|
1447
|
+
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
</td>
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
<td class="description last"><p>輸入權杖</p></td>
|
|
1457
|
+
</tr>
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
</tbody>
|
|
1461
|
+
</table>
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
|
|
1466
|
+
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
<div class="param-desc">
|
|
1482
|
+
<p>回傳遮罩後字串, 輸入陣列時回傳陣列</p>
|
|
1483
|
+
</div>
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
<dl class="param-type">
|
|
1488
|
+
<dt>
|
|
1489
|
+
Type
|
|
1490
|
+
</dt>
|
|
1491
|
+
<dd>
|
|
1492
|
+
|
|
1493
|
+
<span class="param-type">String</span>
|
|
1494
|
+
|
|
|
1495
|
+
|
|
1496
|
+
<span class="param-type">Array</span>
|
|
1497
|
+
|
|
1498
|
+
|
|
1499
|
+
|
|
1500
|
+
</dd>
|
|
1501
|
+
</dl>
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
|
|
1505
|
+
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
|
|
1512
|
+
<h4 class="name" id="maskUrl"><span class="type-signature"></span>maskUrl<span class="signature">(u)</span><span class="type-signature"> → {String|Array}</span></h4>
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
<dl class="details">
|
|
1520
|
+
|
|
1521
|
+
<dt class="tag-description">Description:</dt>
|
|
1522
|
+
<dd class="tag-description"><ul class="dummy"><li><p>網址遮罩: http(s) 只留 origin + pathname, 捨棄 query / fragment / userinfo(其內常含權杖, 如 ?token=)</p>
|
|
1523
|
+
<ul>
|
|
1524
|
+
<li>陣列逐元素處理; 空值回 ''; 其他非字串只回 '(typeof)'</li>
|
|
1525
|
+
<li>非 http(s) 之網址(如 data:、javascript:)路徑即全部內容, 只回 protocol(同 w-web-sso src/maskUrl.mjs)</li>
|
|
1526
|
+
<li>無法解析回 '(invalid-url)'</li>
|
|
1527
|
+
</ul></li></ul></dd>
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
<dt class="tag-source">Source:</dt>
|
|
1532
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1533
|
+
<a href="server_maskLog.mjs.html">server/maskLog.mjs</a>, <a href="server_maskLog.mjs.html#line76">line 76</a>
|
|
1534
|
+
</li></ul></dd>
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
|
|
1549
|
+
|
|
1550
|
+
|
|
1551
|
+
|
|
1552
|
+
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
|
|
1556
|
+
|
|
1557
|
+
|
|
1558
|
+
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
|
|
1566
|
+
</dl>
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
|
|
1574
|
+
|
|
1575
|
+
|
|
1576
|
+
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
1581
|
+
|
|
1582
|
+
|
|
1583
|
+
<table class="params">
|
|
1584
|
+
<thead>
|
|
1585
|
+
<tr>
|
|
1586
|
+
|
|
1587
|
+
<th>Name</th>
|
|
1588
|
+
|
|
1589
|
+
|
|
1590
|
+
<th>Type</th>
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
<th class="last">Description</th>
|
|
1597
|
+
</tr>
|
|
1598
|
+
</thead>
|
|
1599
|
+
|
|
1600
|
+
<tbody>
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
<tr>
|
|
1604
|
+
|
|
1605
|
+
<td class="name"><code>u</code></td>
|
|
1606
|
+
|
|
1607
|
+
|
|
1608
|
+
<td class="type">
|
|
1609
|
+
|
|
1610
|
+
|
|
1611
|
+
<span class="param-type">*</span>
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
|
|
1616
|
+
</td>
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
<td class="description last"><p>輸入網址</p></td>
|
|
1623
|
+
</tr>
|
|
1624
|
+
|
|
1625
|
+
|
|
1626
|
+
</tbody>
|
|
1627
|
+
</table>
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
|
|
1643
|
+
|
|
1644
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
1645
|
+
|
|
1646
|
+
|
|
1647
|
+
<div class="param-desc">
|
|
1648
|
+
<p>回傳可寫入 log 之字串, 輸入陣列時回傳陣列</p>
|
|
1649
|
+
</div>
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
|
|
1653
|
+
<dl class="param-type">
|
|
1654
|
+
<dt>
|
|
1655
|
+
Type
|
|
1656
|
+
</dt>
|
|
1657
|
+
<dd>
|
|
1658
|
+
|
|
1659
|
+
<span class="param-type">String</span>
|
|
1660
|
+
|
|
|
1661
|
+
|
|
1662
|
+
<span class="param-type">Array</span>
|
|
1663
|
+
|
|
1664
|
+
|
|
1665
|
+
|
|
1666
|
+
</dd>
|
|
1667
|
+
</dl>
|
|
1668
|
+
|
|
1669
|
+
|
|
1670
|
+
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
|
|
1676
|
+
|
|
1677
|
+
|
|
1678
|
+
<h4 class="name" id="mergePickKeysOnly"><span class="type-signature"></span>mergePickKeysOnly<span class="signature">(ltdtDb, rowsIn, keyDetect, pickKeys)</span><span class="type-signature"> → {Array}</span></h4>
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
<dl class="details">
|
|
1686
|
+
|
|
1687
|
+
<dt class="tag-description">Description:</dt>
|
|
1688
|
+
<dd class="tag-description"><ul class="dummy"><li><p>僅採納既有列之指定欄位變更, 其餘欄位、新增列、缺列(刪除)與順序一律以資料庫現值為準</p>
|
|
1689
|
+
<p>用於 modeEditUsers='for:grups': 使用者身分由外部單一登入系統同步, 本系統只擁有群組指派(cgrups), 故 API 層須與 UI 一致只接受 cgrups 變更</p></li></ul></dd>
|
|
1690
|
+
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
<dt class="tag-source">Source:</dt>
|
|
1694
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1695
|
+
<a href="server_procCore.mjs.html">server/procCore.mjs</a>, <a href="server_procCore.mjs.html#line26">line 26</a>
|
|
1696
|
+
</li></ul></dd>
|
|
1697
|
+
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
|
|
1710
|
+
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
|
|
1719
|
+
|
|
1720
|
+
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
</dl>
|
|
1729
|
+
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
|
|
1733
|
+
|
|
1734
|
+
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
|
|
1738
|
+
|
|
1739
|
+
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
<table class="params">
|
|
1746
|
+
<thead>
|
|
1747
|
+
<tr>
|
|
1748
|
+
|
|
1749
|
+
<th>Name</th>
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
<th>Type</th>
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
<th class="last">Description</th>
|
|
1759
|
+
</tr>
|
|
1760
|
+
</thead>
|
|
1761
|
+
|
|
1762
|
+
<tbody>
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
<tr>
|
|
1766
|
+
|
|
1767
|
+
<td class="name"><code>ltdtDb</code></td>
|
|
1768
|
+
|
|
1769
|
+
|
|
1770
|
+
<td class="type">
|
|
1771
|
+
|
|
1772
|
+
|
|
1773
|
+
<span class="param-type">Array</span>
|
|
1774
|
+
|
|
1775
|
+
|
|
1776
|
+
|
|
1777
|
+
|
|
1778
|
+
</td>
|
|
1779
|
+
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
|
|
1784
|
+
<td class="description last"><p>資料庫現有列(select 結果, 依 order 排序後為基底)</p></td>
|
|
1785
|
+
</tr>
|
|
1786
|
+
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
<tr>
|
|
1790
|
+
|
|
1791
|
+
<td class="name"><code>rowsIn</code></td>
|
|
1792
|
+
|
|
1793
|
+
|
|
1794
|
+
<td class="type">
|
|
1795
|
+
|
|
1796
|
+
|
|
1797
|
+
<span class="param-type">Array</span>
|
|
1798
|
+
|
|
1799
|
+
|
|
1800
|
+
|
|
1801
|
+
|
|
1802
|
+
</td>
|
|
1803
|
+
|
|
1804
|
+
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
|
|
1808
|
+
<td class="description last"><p>前端/外部送入之整表列</p></td>
|
|
1809
|
+
</tr>
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
|
|
1813
|
+
<tr>
|
|
1814
|
+
|
|
1815
|
+
<td class="name"><code>keyDetect</code></td>
|
|
1816
|
+
|
|
1817
|
+
|
|
1818
|
+
<td class="type">
|
|
1819
|
+
|
|
1820
|
+
|
|
1821
|
+
<span class="param-type">String</span>
|
|
1822
|
+
|
|
1823
|
+
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
</td>
|
|
1827
|
+
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
<td class="description last"><p>對應列之鍵欄位(如 'id')</p></td>
|
|
1833
|
+
</tr>
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
|
|
1837
|
+
<tr>
|
|
1838
|
+
|
|
1839
|
+
<td class="name"><code>pickKeys</code></td>
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
<td class="type">
|
|
1843
|
+
|
|
1844
|
+
|
|
1845
|
+
<span class="param-type">Array</span>
|
|
1846
|
+
|
|
1847
|
+
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
</td>
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
|
|
1854
|
+
|
|
1855
|
+
|
|
1856
|
+
<td class="description last"><p>允許採納之欄位名陣列(如 ['cgrups'])</p></td>
|
|
1857
|
+
</tr>
|
|
1858
|
+
|
|
1859
|
+
|
|
1860
|
+
</tbody>
|
|
1861
|
+
</table>
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
|
|
1867
|
+
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
|
|
1871
|
+
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
<div class="param-desc">
|
|
1882
|
+
<p>以資料庫列為基底、僅覆蓋 pickKeys 之新列陣列(順序同資料庫)</p>
|
|
1883
|
+
</div>
|
|
1884
|
+
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
<dl class="param-type">
|
|
1888
|
+
<dt>
|
|
1889
|
+
Type
|
|
1890
|
+
</dt>
|
|
1891
|
+
<dd>
|
|
1892
|
+
|
|
1893
|
+
<span class="param-type">Array</span>
|
|
1894
|
+
|
|
1895
|
+
|
|
1896
|
+
|
|
1897
|
+
</dd>
|
|
1898
|
+
</dl>
|
|
1899
|
+
|
|
1900
|
+
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
|
|
1904
|
+
|
|
1905
|
+
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
<h4 class="name" id="reuseDeletedIds"><span class="type-signature"></span>reuseDeletedIds<span class="signature">(rows, rowsDb)</span><span class="type-signature"> → {Array}</span></h4>
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
<dl class="details">
|
|
1917
|
+
|
|
1918
|
+
<dt class="tag-description">Description:</dt>
|
|
1919
|
+
<dd class="tag-description"><ul class="dummy"><li><p>新增列沿用資料庫既有 id 時之正規化 (標的清單專用, 其 id 為可就地改寫之標的路徑; ADR-025)</p>
|
|
1920
|
+
<p>同一次儲存中刪除(或把 id 改掉)某既有列, 又新增一列並把 id 改成該既有列之 id, 淨效果為「修改該列」:
|
|
1921
|
+
該新增列改為一般列送出(_isNew 設 false), 建立者 / 建立時間沿用資料庫之值(修改者 / 修改時間由後端寫入).
|
|
1922
|
+
否則後端之「新增列已存在即拒絕」(saveNewRowExists, 擋同一包重送) 會把它當重送擋下, 且重新整理後重做仍被擋;
|
|
1923
|
+
亦避免以前端佔位字({待自動給予})覆寫建立者 / 建立時間.
|
|
1924
|
+
只處理 id 於 rows 內唯一者; 重複 id 不處理, 由後端 ckKey 回 saveRowFieldDuplicate.
|
|
1925
|
+
使用者 / 群組 / 權限清單之 id 為系統產生且不可編輯, 新增列不會與既有列同 id, 不需此處理.</p></li></ul></dd>
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
|
|
1929
|
+
<dt class="tag-source">Source:</dt>
|
|
1930
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
1931
|
+
<a href="src_plugins_reuseDeletedIds.mjs.html">src/plugins/reuseDeletedIds.mjs</a>, <a href="src_plugins_reuseDeletedIds.mjs.html#line20">line 20</a>
|
|
1932
|
+
</li></ul></dd>
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
|
|
1939
|
+
|
|
1940
|
+
|
|
1941
|
+
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
|
|
1945
|
+
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
|
|
1960
|
+
|
|
1961
|
+
|
|
1962
|
+
|
|
1963
|
+
|
|
1964
|
+
</dl>
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
|
|
1978
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
1979
|
+
|
|
1980
|
+
|
|
1981
|
+
<table class="params">
|
|
1982
|
+
<thead>
|
|
1983
|
+
<tr>
|
|
1984
|
+
|
|
1985
|
+
<th>Name</th>
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
<th>Type</th>
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
|
|
1994
|
+
<th class="last">Description</th>
|
|
1995
|
+
</tr>
|
|
1996
|
+
</thead>
|
|
1997
|
+
|
|
1998
|
+
<tbody>
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
<tr>
|
|
2002
|
+
|
|
2003
|
+
<td class="name"><code>rows</code></td>
|
|
2004
|
+
|
|
2005
|
+
|
|
2006
|
+
<td class="type">
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
<span class="param-type">Array</span>
|
|
2010
|
+
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
|
|
2014
|
+
</td>
|
|
2015
|
+
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
|
|
2019
|
+
|
|
2020
|
+
<td class="description last"><p>輸入欲送出之列陣列(清單之 opt.rows), 不修改</p></td>
|
|
2021
|
+
</tr>
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
|
|
2025
|
+
<tr>
|
|
2026
|
+
|
|
2027
|
+
<td class="name"><code>rowsDb</code></td>
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
<td class="type">
|
|
2031
|
+
|
|
2032
|
+
|
|
2033
|
+
<span class="param-type">Array</span>
|
|
2034
|
+
|
|
2035
|
+
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
</td>
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
|
|
2042
|
+
|
|
2043
|
+
|
|
2044
|
+
<td class="description last"><p>輸入資料庫之列陣列(前端 store 之同表資料)</p></td>
|
|
2045
|
+
</tr>
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
</tbody>
|
|
2049
|
+
</table>
|
|
2050
|
+
|
|
2051
|
+
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
|
|
2063
|
+
|
|
2064
|
+
|
|
2065
|
+
|
|
2066
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
2067
|
+
|
|
2068
|
+
|
|
2069
|
+
<div class="param-desc">
|
|
2070
|
+
<p>回傳正規化後之新陣列</p>
|
|
2071
|
+
</div>
|
|
2072
|
+
|
|
2073
|
+
|
|
2074
|
+
|
|
2075
|
+
<dl class="param-type">
|
|
2076
|
+
<dt>
|
|
2077
|
+
Type
|
|
2078
|
+
</dt>
|
|
2079
|
+
<dd>
|
|
2080
|
+
|
|
2081
|
+
<span class="param-type">Array</span>
|
|
2082
|
+
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
</dd>
|
|
2086
|
+
</dl>
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
|
|
2091
|
+
|
|
2092
|
+
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
<h4 class="name" id="submitGuard"><span class="type-signature"></span>submitGuard<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
|
|
2098
|
+
|
|
2099
|
+
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
<dl class="details">
|
|
2105
|
+
|
|
2106
|
+
<dt class="tag-description">Description:</dt>
|
|
2107
|
+
<dd class="tag-description"><ul class="dummy"><li><p>送出類操作之前端雙擊防護核心 (與 Vue / store 無關, 供單元測試; 由 mUI 之 runSubmit 與 updateLoading 使用, ADR-025)</p>
|
|
2108
|
+
<ul>
|
|
2109
|
+
<li>run(key, fn, opt): 同 key 之送出流程進行中(自觸發起至流程結束, 含結果訊息框開啟期間)再觸發即略過.
|
|
2110
|
+
按鈕之滑鼠與鍵盤 Enter、輸入框之 Enter 等入口共用同一狀態.
|
|
2111
|
+
opt.pm 為 WButtonChip / WButtonCircle 之 promiseUnlock 鎖(click 事件之 msg.pm), 於 releaseBtnLocks()(全頁 loading 關閉, 即請求結束)
|
|
2112
|
+
或流程結束時釋放; 被略過之觸發亦立即釋放其 pm, 否則該按鈕永久鎖住.
|
|
2113
|
+
fn 收到 unlock 函數: 流程需先開確認框者於開框前呼叫, 按鈕鎖只涵蓋請求期間(確認框背後之按鈕不顯示載入圖示), 重入仍由流程狀態擋.
|
|
2114
|
+
opt.hold 為函數, 輸入流程結果, 回傳 true 時保持占位與按鈕鎖(如登入成功轉址, 頁面即將離開).</li>
|
|
2115
|
+
<li>releaseBtnLocks(): 釋放進行中流程所登記之按鈕鎖, 流程狀態不變(結果訊息框開啟期間之重入仍擋).</li>
|
|
2116
|
+
<li>isRunning(key): 查詢 key 是否進行中.</li>
|
|
2117
|
+
</ul>
|
|
2118
|
+
<p>為何需要: 全頁 loading(WDialog)不搶焦點, 只擋滑鼠, 鍵盤事件仍送達背後之按鈕與輸入框;
|
|
2119
|
+
按鈕鎖若於 handler 第一行即解除, 鍵盤連按照樣送出(2026-09-29 實測).</p></li></ul></dd>
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
|
|
2123
|
+
<dt class="tag-source">Source:</dt>
|
|
2124
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
2125
|
+
<a href="src_plugins_submitGuard.mjs.html">src/plugins/submitGuard.mjs</a>, <a href="src_plugins_submitGuard.mjs.html#line24">line 24</a>
|
|
2126
|
+
</li></ul></dd>
|
|
2127
|
+
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
|
|
2143
|
+
|
|
2144
|
+
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
|
|
2148
|
+
|
|
2149
|
+
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
</dl>
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
|
|
2162
|
+
|
|
2163
|
+
|
|
2164
|
+
|
|
2165
|
+
|
|
2166
|
+
|
|
2167
|
+
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
|
|
2171
|
+
|
|
2172
|
+
|
|
2173
|
+
|
|
2174
|
+
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
|
|
2178
|
+
|
|
2179
|
+
|
|
2180
|
+
|
|
2181
|
+
|
|
2182
|
+
|
|
2183
|
+
|
|
2184
|
+
|
|
2185
|
+
|
|
2186
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
<div class="param-desc">
|
|
2190
|
+
<p>回傳 { run, releaseBtnLocks, isRunning }</p>
|
|
2191
|
+
</div>
|
|
2192
|
+
|
|
2193
|
+
|
|
2194
|
+
|
|
2195
|
+
<dl class="param-type">
|
|
2196
|
+
<dt>
|
|
2197
|
+
Type
|
|
2198
|
+
</dt>
|
|
2199
|
+
<dd>
|
|
2200
|
+
|
|
2201
|
+
<span class="param-type">Object</span>
|
|
2202
|
+
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
</dd>
|
|
2206
|
+
</dl>
|
|
2207
|
+
|
|
2208
|
+
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
|
|
2212
|
+
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
<h4 class="name" id="wrapInjected"><span class="type-signature"></span>wrapInjected<span class="signature">(fn, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {function}</span></h4>
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
<dl class="details">
|
|
2225
|
+
|
|
2226
|
+
<dt class="tag-description">Description:</dt>
|
|
2227
|
+
<dd class="tag-description"><ul class="dummy"><li><p>包裝注入函數: 回傳(同步或 Promise)原樣回傳; 同步拋錯或 reject 回 failValue, 並以 describeUpstream(err) 呼叫 onFail
|
|
2228
|
+
包裝後一律回 Promise(呼叫端既有之 ispm 判斷照常)</p></li></ul></dd>
|
|
2229
|
+
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
<dt class="tag-source">Source:</dt>
|
|
2233
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
2234
|
+
<a href="server_wrapInjected.mjs.html">server/wrapInjected.mjs</a>, <a href="server_wrapInjected.mjs.html#line67">line 67</a>
|
|
2235
|
+
</li></ul></dd>
|
|
2236
|
+
|
|
2237
|
+
|
|
2238
|
+
|
|
2239
|
+
|
|
2240
|
+
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
|
|
2245
|
+
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
|
|
2253
|
+
|
|
2254
|
+
|
|
2255
|
+
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
|
|
2262
|
+
|
|
2263
|
+
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
|
|
2267
|
+
</dl>
|
|
2268
|
+
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
|
|
2272
|
+
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
|
|
2281
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
<table class="params">
|
|
2285
|
+
<thead>
|
|
2286
|
+
<tr>
|
|
2287
|
+
|
|
2288
|
+
<th>Name</th>
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
<th>Type</th>
|
|
2292
|
+
|
|
2293
|
+
|
|
2294
|
+
<th>Attributes</th>
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
<th>Default</th>
|
|
2299
|
+
|
|
2300
|
+
|
|
2301
|
+
<th class="last">Description</th>
|
|
2302
|
+
</tr>
|
|
2303
|
+
</thead>
|
|
2304
|
+
|
|
2305
|
+
<tbody>
|
|
2306
|
+
|
|
2307
|
+
|
|
2308
|
+
<tr>
|
|
2309
|
+
|
|
2310
|
+
<td class="name"><code>fn</code></td>
|
|
2311
|
+
|
|
2312
|
+
|
|
2313
|
+
<td class="type">
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
<span class="param-type">function</span>
|
|
2317
|
+
|
|
2318
|
+
|
|
2319
|
+
|
|
2320
|
+
|
|
2321
|
+
</td>
|
|
2322
|
+
|
|
2323
|
+
|
|
2324
|
+
<td class="attributes">
|
|
2325
|
+
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
|
|
2329
|
+
|
|
2330
|
+
</td>
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
|
|
2334
|
+
<td class="default">
|
|
2335
|
+
|
|
2336
|
+
</td>
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
<td class="description last"><p>輸入注入函數</p></td>
|
|
2340
|
+
</tr>
|
|
2341
|
+
|
|
2342
|
+
|
|
2343
|
+
|
|
2344
|
+
<tr>
|
|
2345
|
+
|
|
2346
|
+
<td class="name"><code>opt</code></td>
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
<td class="type">
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
<span class="param-type">Object</span>
|
|
2353
|
+
|
|
2354
|
+
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
</td>
|
|
2358
|
+
|
|
2359
|
+
|
|
2360
|
+
<td class="attributes">
|
|
2361
|
+
|
|
2362
|
+
<optional><br>
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
</td>
|
|
2369
|
+
|
|
2370
|
+
|
|
2371
|
+
|
|
2372
|
+
<td class="default">
|
|
2373
|
+
|
|
2374
|
+
<code>{}</code>
|
|
2375
|
+
|
|
2376
|
+
</td>
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
<td class="description last"><p>輸入設定物件</p>
|
|
2380
|
+
<h6>Properties</h6>
|
|
2381
|
+
|
|
2382
|
+
|
|
2383
|
+
<table class="params">
|
|
2384
|
+
<thead>
|
|
2385
|
+
<tr>
|
|
2386
|
+
|
|
2387
|
+
<th>Name</th>
|
|
2388
|
+
|
|
2389
|
+
|
|
2390
|
+
<th>Type</th>
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
<th>Attributes</th>
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
<th>Default</th>
|
|
2398
|
+
|
|
2399
|
+
|
|
2400
|
+
<th class="last">Description</th>
|
|
2401
|
+
</tr>
|
|
2402
|
+
</thead>
|
|
2403
|
+
|
|
2404
|
+
<tbody>
|
|
2405
|
+
|
|
2406
|
+
|
|
2407
|
+
<tr>
|
|
2408
|
+
|
|
2409
|
+
<td class="name"><code>failValue</code></td>
|
|
2410
|
+
|
|
2411
|
+
|
|
2412
|
+
<td class="type">
|
|
2413
|
+
|
|
2414
|
+
|
|
2415
|
+
<span class="param-type">*</span>
|
|
2416
|
+
|
|
2417
|
+
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
</td>
|
|
2421
|
+
|
|
2422
|
+
|
|
2423
|
+
<td class="attributes">
|
|
2424
|
+
|
|
2425
|
+
<optional><br>
|
|
2426
|
+
|
|
2427
|
+
|
|
2428
|
+
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
</td>
|
|
2432
|
+
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
<td class="default">
|
|
2436
|
+
|
|
2437
|
+
<code>null</code>
|
|
2438
|
+
|
|
2439
|
+
</td>
|
|
2440
|
+
|
|
2441
|
+
|
|
2442
|
+
<td class="description last"><p>輸入失敗時之回傳值(getUserByToken 為 null 等同查無, verify* 為 false 等同無權限)</p></td>
|
|
2443
|
+
</tr>
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
|
|
2447
|
+
<tr>
|
|
2448
|
+
|
|
2449
|
+
<td class="name"><code>onFail</code></td>
|
|
2450
|
+
|
|
2451
|
+
|
|
2452
|
+
<td class="type">
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
<span class="param-type">function</span>
|
|
2456
|
+
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
|
|
2460
|
+
</td>
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
<td class="attributes">
|
|
2464
|
+
|
|
2465
|
+
<optional><br>
|
|
2466
|
+
|
|
2467
|
+
|
|
2468
|
+
|
|
2469
|
+
|
|
2470
|
+
|
|
2471
|
+
</td>
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
|
|
2475
|
+
<td class="default">
|
|
2476
|
+
|
|
2477
|
+
<code>null</code>
|
|
2478
|
+
|
|
2479
|
+
</td>
|
|
2480
|
+
|
|
2481
|
+
|
|
2482
|
+
<td class="description last"><p>輸入失敗時之紀錄函數, 只收到 describeUpstream 之結果(收不到上游原文); 其自身拋錯不影響回傳</p></td>
|
|
2483
|
+
</tr>
|
|
2484
|
+
|
|
2485
|
+
|
|
2486
|
+
</tbody>
|
|
2487
|
+
</table>
|
|
2488
|
+
|
|
2489
|
+
</td>
|
|
2490
|
+
</tr>
|
|
2491
|
+
|
|
2492
|
+
|
|
2493
|
+
</tbody>
|
|
2494
|
+
</table>
|
|
2495
|
+
|
|
2496
|
+
|
|
2497
|
+
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
|
|
2501
|
+
|
|
2502
|
+
|
|
2503
|
+
|
|
2504
|
+
|
|
2505
|
+
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
|
|
2509
|
+
|
|
2510
|
+
|
|
2511
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
2512
|
+
|
|
2513
|
+
|
|
2514
|
+
<div class="param-desc">
|
|
2515
|
+
<p>回傳包裝後之函數</p>
|
|
2516
|
+
</div>
|
|
2517
|
+
|
|
2518
|
+
|
|
2519
|
+
|
|
2520
|
+
<dl class="param-type">
|
|
2521
|
+
<dt>
|
|
2522
|
+
Type
|
|
2523
|
+
</dt>
|
|
2524
|
+
<dd>
|
|
2525
|
+
|
|
2526
|
+
<span class="param-type">function</span>
|
|
570
2527
|
|
|
571
2528
|
|
|
572
2529
|
|
|
@@ -597,7 +2554,7 @@
|
|
|
597
2554
|
<br class="clear">
|
|
598
2555
|
|
|
599
2556
|
<footer>
|
|
600
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
2557
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Fri Oct 02 2026 20:53:56 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
601
2558
|
</footer>
|
|
602
2559
|
|
|
603
2560
|
<script>prettyPrint();</script>
|