@yuku123/z-frontend-common 1.1.0 → 1.1.1
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/dist/{PagedTable-DyjNokXN.js → PagedTable-D9Bw7uhG.js} +277 -327
- package/dist/index.js +32 -33
- package/dist/ui-echarts.js +54 -0
- package/dist/ui.js +16 -17
- package/package.json +4 -1
- package/src/components/ui/echarts.js +8 -0
- package/src/components/ui/index.js +1 -2
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as R, useRef as
|
|
3
|
-
import { Button as W, Skeleton as
|
|
4
|
-
import { InboxOutlined as
|
|
5
|
-
import
|
|
6
|
-
import { LineChart as V, PieChart as ee, BarChart as te } from "echarts/charts";
|
|
7
|
-
import { GridComponent as re, TooltipComponent as ne, LegendComponent as ie, TitleComponent as ae } from "echarts/components";
|
|
8
|
-
import { CanvasRenderer as oe } from "echarts/renderers";
|
|
9
|
-
import { useNavigate as le } from "react-router-dom";
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as R, useRef as L, useEffect as D, useCallback as Y } from "react";
|
|
3
|
+
import { Button as W, Skeleton as B, Input as K, Breadcrumb as $, Space as P, Tag as F, Card as _, Table as q } from "antd";
|
|
4
|
+
import { InboxOutlined as J, ExclamationCircleOutlined as Q, ReloadOutlined as M, SearchOutlined as X } from "@ant-design/icons";
|
|
5
|
+
import { useNavigate as Z } from "react-router-dom";
|
|
10
6
|
const T = {
|
|
11
7
|
// 主色 (蓝紫) - 顶导/重点按钮/链接
|
|
12
8
|
primary: "#7c3aed",
|
|
@@ -92,7 +88,7 @@ const T = {
|
|
|
92
88
|
md: "0 2px 4px -1px rgba(15, 23, 42, 0.04), 0 4px 8px -1px rgba(15, 23, 42, 0.08)",
|
|
93
89
|
lg: "0 4px 6px -2px rgba(15, 23, 42, 0.05), 0 12px 16px -4px rgba(15, 23, 42, 0.10)",
|
|
94
90
|
xl: "0 8px 24px -6px rgba(15, 23, 42, 0.10), 0 24px 48px -12px rgba(15, 23, 42, 0.18)"
|
|
95
|
-
},
|
|
91
|
+
}, ue = {
|
|
96
92
|
rest: k.md,
|
|
97
93
|
hover: "0 8px 16px -4px rgba(15, 23, 42, 0.08), 0 20px 32px -8px rgba(15, 23, 42, 0.14)"
|
|
98
94
|
}, z = {
|
|
@@ -106,7 +102,7 @@ const T = {
|
|
|
106
102
|
10: 40,
|
|
107
103
|
12: 48,
|
|
108
104
|
16: 64
|
|
109
|
-
},
|
|
105
|
+
}, O = {
|
|
110
106
|
xs: 11,
|
|
111
107
|
sm: 12,
|
|
112
108
|
base: 14,
|
|
@@ -116,7 +112,7 @@ const T = {
|
|
|
116
112
|
"2xl": 24,
|
|
117
113
|
"3xl": 30,
|
|
118
114
|
"4xl": 36
|
|
119
|
-
},
|
|
115
|
+
}, be = {
|
|
120
116
|
token: {
|
|
121
117
|
// 主色
|
|
122
118
|
colorPrimary: T.primary,
|
|
@@ -145,7 +141,7 @@ const T = {
|
|
|
145
141
|
borderRadiusLG: y.lg,
|
|
146
142
|
borderRadiusSM: y.sm,
|
|
147
143
|
// 字体
|
|
148
|
-
fontSize:
|
|
144
|
+
fontSize: O.base,
|
|
149
145
|
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Arial, sans-serif",
|
|
150
146
|
// 阴影
|
|
151
147
|
boxShadow: k.md,
|
|
@@ -185,7 +181,7 @@ const T = {
|
|
|
185
181
|
Tabs: {
|
|
186
182
|
itemSelectedColor: T.primary,
|
|
187
183
|
inkBarColor: T.primary,
|
|
188
|
-
titleFontSize:
|
|
184
|
+
titleFontSize: O.base
|
|
189
185
|
},
|
|
190
186
|
// Tag: 更小巧
|
|
191
187
|
Tag: {
|
|
@@ -193,50 +189,50 @@ const T = {
|
|
|
193
189
|
}
|
|
194
190
|
}
|
|
195
191
|
};
|
|
196
|
-
function
|
|
192
|
+
function he({
|
|
197
193
|
icon: t,
|
|
198
|
-
label:
|
|
194
|
+
label: n,
|
|
199
195
|
value: r,
|
|
200
196
|
suffix: a,
|
|
201
|
-
color:
|
|
202
|
-
trend:
|
|
203
|
-
href:
|
|
204
|
-
loading:
|
|
205
|
-
precision:
|
|
197
|
+
color: g = "blue",
|
|
198
|
+
trend: i,
|
|
199
|
+
href: o,
|
|
200
|
+
loading: d = !1,
|
|
201
|
+
precision: l = 0
|
|
206
202
|
}) {
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
if (
|
|
210
|
-
const
|
|
211
|
-
if (
|
|
212
|
-
u
|
|
203
|
+
const s = w[g] || w.blue, [b, p] = R(0), v = L(0);
|
|
204
|
+
D(() => {
|
|
205
|
+
if (d || r == null) return;
|
|
206
|
+
const f = v.current, u = Number(r) || 0;
|
|
207
|
+
if (f === u) {
|
|
208
|
+
p(u);
|
|
213
209
|
return;
|
|
214
210
|
}
|
|
215
211
|
const h = 600, A = performance.now();
|
|
216
|
-
let
|
|
217
|
-
const H = (
|
|
218
|
-
const
|
|
219
|
-
|
|
212
|
+
let E;
|
|
213
|
+
const H = (j) => {
|
|
214
|
+
const N = Math.min(1, (j - A) / h), G = 1 - Math.pow(1 - N, 3), U = f + (u - f) * G;
|
|
215
|
+
p(U), N < 1 ? E = requestAnimationFrame(H) : v.current = u;
|
|
220
216
|
};
|
|
221
|
-
return
|
|
222
|
-
}, [r,
|
|
217
|
+
return E = requestAnimationFrame(H), () => E && cancelAnimationFrame(E);
|
|
218
|
+
}, [r, d]);
|
|
223
219
|
const S = () => {
|
|
224
|
-
|
|
225
|
-
}, C =
|
|
226
|
-
minimumFractionDigits:
|
|
227
|
-
maximumFractionDigits:
|
|
228
|
-
}), m =
|
|
229
|
-
return /* @__PURE__ */
|
|
220
|
+
o && typeof window < "u" && (window.location.href = o);
|
|
221
|
+
}, C = d ? "--" : Number(b).toLocaleString("zh-CN", {
|
|
222
|
+
minimumFractionDigits: l,
|
|
223
|
+
maximumFractionDigits: l
|
|
224
|
+
}), m = i != null ? Number(i) : null, I = m != null && m >= 0;
|
|
225
|
+
return /* @__PURE__ */ c(
|
|
230
226
|
"div",
|
|
231
227
|
{
|
|
232
228
|
onClick: S,
|
|
233
229
|
style: {
|
|
234
230
|
position: "relative",
|
|
235
|
-
background:
|
|
231
|
+
background: s.gradient,
|
|
236
232
|
borderRadius: y.lg,
|
|
237
233
|
padding: z[5],
|
|
238
|
-
color:
|
|
239
|
-
cursor:
|
|
234
|
+
color: s.fg,
|
|
235
|
+
cursor: o ? "pointer" : "default",
|
|
240
236
|
boxShadow: k.md,
|
|
241
237
|
overflow: "hidden",
|
|
242
238
|
transition: "transform 200ms ease, box-shadow 200ms ease",
|
|
@@ -245,11 +241,11 @@ function Ee({
|
|
|
245
241
|
flexDirection: "column",
|
|
246
242
|
justifyContent: "space-between"
|
|
247
243
|
},
|
|
248
|
-
onMouseEnter: (
|
|
249
|
-
|
|
244
|
+
onMouseEnter: (f) => {
|
|
245
|
+
f.currentTarget.style.transform = "translateY(-2px)", f.currentTarget.style.boxShadow = k.lg;
|
|
250
246
|
},
|
|
251
|
-
onMouseLeave: (
|
|
252
|
-
|
|
247
|
+
onMouseLeave: (f) => {
|
|
248
|
+
f.currentTarget.style.transform = "translateY(0)", f.currentTarget.style.boxShadow = k.md;
|
|
253
249
|
},
|
|
254
250
|
children: [
|
|
255
251
|
/* @__PURE__ */ e(
|
|
@@ -267,7 +263,7 @@ function Ee({
|
|
|
267
263
|
}
|
|
268
264
|
}
|
|
269
265
|
),
|
|
270
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ c("div", { style: {
|
|
271
267
|
display: "flex",
|
|
272
268
|
alignItems: "center",
|
|
273
269
|
gap: z[2],
|
|
@@ -288,9 +284,9 @@ function Ee({
|
|
|
288
284
|
fontSize: 13,
|
|
289
285
|
fontWeight: 500,
|
|
290
286
|
opacity: 0.92
|
|
291
|
-
}, children:
|
|
287
|
+
}, children: n })
|
|
292
288
|
] }),
|
|
293
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ c("div", { style: {
|
|
294
290
|
display: "flex",
|
|
295
291
|
alignItems: "baseline",
|
|
296
292
|
gap: z[2],
|
|
@@ -305,18 +301,18 @@ function Ee({
|
|
|
305
301
|
fontVariantNumeric: "tabular-nums"
|
|
306
302
|
}, children: C }),
|
|
307
303
|
a && /* @__PURE__ */ e("div", { style: { fontSize: 14, opacity: 0.85, fontWeight: 500 }, children: a }),
|
|
308
|
-
m != null && /* @__PURE__ */
|
|
304
|
+
m != null && /* @__PURE__ */ c("div", { style: {
|
|
309
305
|
marginLeft: "auto",
|
|
310
306
|
fontSize: 12,
|
|
311
307
|
fontWeight: 600,
|
|
312
308
|
padding: "2px 8px",
|
|
313
309
|
borderRadius: 999,
|
|
314
|
-
background:
|
|
310
|
+
background: I ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.18)",
|
|
315
311
|
display: "flex",
|
|
316
312
|
alignItems: "center",
|
|
317
313
|
gap: 2
|
|
318
314
|
}, children: [
|
|
319
|
-
/* @__PURE__ */ e("span", { style: { fontSize: 10 }, children:
|
|
315
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 10 }, children: I ? "▲" : "▼" }),
|
|
320
316
|
Math.abs(m).toFixed(1),
|
|
321
317
|
"%"
|
|
322
318
|
] })
|
|
@@ -325,9 +321,9 @@ function Ee({
|
|
|
325
321
|
}
|
|
326
322
|
);
|
|
327
323
|
}
|
|
328
|
-
function
|
|
324
|
+
function V({ color: t = "blue", label: n, size: r = 8 }) {
|
|
329
325
|
const a = w[t] || w.blue;
|
|
330
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ c("span", { style: {
|
|
331
327
|
display: "inline-flex",
|
|
332
328
|
alignItems: "center",
|
|
333
329
|
gap: 8,
|
|
@@ -343,37 +339,37 @@ function se({ color: t = "blue", label: i, size: r = 8 }) {
|
|
|
343
339
|
boxShadow: `0 0 0 3px ${a.soft}`,
|
|
344
340
|
flexShrink: 0
|
|
345
341
|
} }),
|
|
346
|
-
|
|
342
|
+
n && /* @__PURE__ */ e("span", { children: n })
|
|
347
343
|
] });
|
|
348
344
|
}
|
|
349
|
-
function
|
|
345
|
+
function me({
|
|
350
346
|
color: t = "blue",
|
|
351
|
-
title:
|
|
347
|
+
title: n,
|
|
352
348
|
subtitle: r,
|
|
353
349
|
moreText: a = "全部",
|
|
354
|
-
moreHref:
|
|
355
|
-
onMore:
|
|
350
|
+
moreHref: g,
|
|
351
|
+
onMore: i
|
|
356
352
|
}) {
|
|
357
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ c("div", { style: {
|
|
358
354
|
display: "flex",
|
|
359
355
|
alignItems: "center",
|
|
360
356
|
justifyContent: "space-between",
|
|
361
357
|
marginBottom: 16
|
|
362
358
|
}, children: [
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */ e(
|
|
359
|
+
/* @__PURE__ */ c("div", { style: { display: "flex", alignItems: "baseline", gap: 12 }, children: [
|
|
360
|
+
/* @__PURE__ */ e(V, { color: t, label: n, size: 10 }),
|
|
365
361
|
r && /* @__PURE__ */ e("span", { style: {
|
|
366
362
|
fontSize: 13,
|
|
367
363
|
color: "#6b7280",
|
|
368
364
|
fontWeight: 400
|
|
369
365
|
}, children: r })
|
|
370
366
|
] }),
|
|
371
|
-
(
|
|
367
|
+
(g || i) && /* @__PURE__ */ c(
|
|
372
368
|
"a",
|
|
373
369
|
{
|
|
374
|
-
href:
|
|
375
|
-
onClick: (
|
|
376
|
-
|
|
370
|
+
href: g,
|
|
371
|
+
onClick: (o) => {
|
|
372
|
+
i && (o.preventDefault(), i());
|
|
377
373
|
},
|
|
378
374
|
style: {
|
|
379
375
|
fontSize: 13,
|
|
@@ -385,11 +381,11 @@ function Ie({
|
|
|
385
381
|
cursor: "pointer",
|
|
386
382
|
transition: "color 150ms ease"
|
|
387
383
|
},
|
|
388
|
-
onMouseEnter: (
|
|
389
|
-
|
|
384
|
+
onMouseEnter: (o) => {
|
|
385
|
+
o.currentTarget.style.color = "#7c3aed";
|
|
390
386
|
},
|
|
391
|
-
onMouseLeave: (
|
|
392
|
-
|
|
387
|
+
onMouseLeave: (o) => {
|
|
388
|
+
o.currentTarget.style.color = "#6b7280";
|
|
393
389
|
},
|
|
394
390
|
children: [
|
|
395
391
|
a,
|
|
@@ -399,31 +395,31 @@ function Ie({
|
|
|
399
395
|
)
|
|
400
396
|
] });
|
|
401
397
|
}
|
|
402
|
-
function
|
|
398
|
+
function ye({
|
|
403
399
|
title: t,
|
|
404
|
-
description:
|
|
400
|
+
description: n,
|
|
405
401
|
icon: r,
|
|
406
402
|
cover: a,
|
|
407
|
-
color:
|
|
408
|
-
tags:
|
|
409
|
-
meta:
|
|
410
|
-
href:
|
|
411
|
-
extra:
|
|
403
|
+
color: g = "violet",
|
|
404
|
+
tags: i = [],
|
|
405
|
+
meta: o,
|
|
406
|
+
href: d,
|
|
407
|
+
extra: l
|
|
412
408
|
}) {
|
|
413
|
-
const
|
|
414
|
-
return /* @__PURE__ */
|
|
409
|
+
const s = w[g] || w.violet, [b, p] = R(!1);
|
|
410
|
+
return /* @__PURE__ */ c(
|
|
415
411
|
"div",
|
|
416
412
|
{
|
|
417
413
|
onClick: () => {
|
|
418
|
-
|
|
414
|
+
d && typeof window < "u" && (window.location.href = d);
|
|
419
415
|
},
|
|
420
|
-
onMouseEnter: () =>
|
|
421
|
-
onMouseLeave: () =>
|
|
416
|
+
onMouseEnter: () => p(!0),
|
|
417
|
+
onMouseLeave: () => p(!1),
|
|
422
418
|
style: {
|
|
423
419
|
background: "#ffffff",
|
|
424
420
|
borderRadius: y.lg,
|
|
425
421
|
overflow: "hidden",
|
|
426
|
-
cursor:
|
|
422
|
+
cursor: d ? "pointer" : "default",
|
|
427
423
|
boxShadow: b ? k.lg : k.sm,
|
|
428
424
|
transform: b ? "translateY(-2px)" : "translateY(0)",
|
|
429
425
|
transition: "transform 200ms ease, box-shadow 200ms ease",
|
|
@@ -432,10 +428,10 @@ function Be({
|
|
|
432
428
|
flexDirection: "column"
|
|
433
429
|
},
|
|
434
430
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ c("div", { style: {
|
|
436
432
|
position: "relative",
|
|
437
433
|
aspectRatio: "16 / 9",
|
|
438
|
-
background: a ? "#f1f5f9" :
|
|
434
|
+
background: a ? "#f1f5f9" : s.gradient,
|
|
439
435
|
display: "flex",
|
|
440
436
|
alignItems: "center",
|
|
441
437
|
justifyContent: "center",
|
|
@@ -466,24 +462,24 @@ function Be({
|
|
|
466
462
|
borderRadius: "50%",
|
|
467
463
|
background: "rgba(255, 255, 255, 0.15)"
|
|
468
464
|
} }),
|
|
469
|
-
|
|
465
|
+
l && /* @__PURE__ */ e("div", { style: {
|
|
470
466
|
position: "absolute",
|
|
471
467
|
top: 8,
|
|
472
468
|
right: 8
|
|
473
|
-
}, children:
|
|
469
|
+
}, children: l })
|
|
474
470
|
] }),
|
|
475
|
-
/* @__PURE__ */
|
|
471
|
+
/* @__PURE__ */ c("div", { style: {
|
|
476
472
|
padding: z[4],
|
|
477
473
|
display: "flex",
|
|
478
474
|
flexDirection: "column",
|
|
479
475
|
gap: z[2],
|
|
480
476
|
flex: 1
|
|
481
477
|
}, children: [
|
|
482
|
-
|
|
478
|
+
i.length > 0 && /* @__PURE__ */ e("div", { style: {
|
|
483
479
|
display: "flex",
|
|
484
480
|
flexWrap: "wrap",
|
|
485
481
|
gap: 6
|
|
486
|
-
}, children:
|
|
482
|
+
}, children: i.slice(0, 3).map((S, C) => {
|
|
487
483
|
const m = w[S.color] || w.blue;
|
|
488
484
|
return /* @__PURE__ */ e(
|
|
489
485
|
"span",
|
|
@@ -512,7 +508,7 @@ function Be({
|
|
|
512
508
|
WebkitLineClamp: 1,
|
|
513
509
|
WebkitBoxOrient: "vertical"
|
|
514
510
|
}, children: t }),
|
|
515
|
-
|
|
511
|
+
n && /* @__PURE__ */ e("div", { style: {
|
|
516
512
|
fontSize: 12,
|
|
517
513
|
color: "#6b7280",
|
|
518
514
|
lineHeight: 1.5,
|
|
@@ -522,28 +518,28 @@ function Be({
|
|
|
522
518
|
WebkitLineClamp: 2,
|
|
523
519
|
WebkitBoxOrient: "vertical",
|
|
524
520
|
minHeight: 36
|
|
525
|
-
}, children:
|
|
526
|
-
|
|
521
|
+
}, children: n }),
|
|
522
|
+
o && /* @__PURE__ */ e("div", { style: {
|
|
527
523
|
fontSize: 11,
|
|
528
524
|
color: "#9ca3af",
|
|
529
525
|
marginTop: "auto",
|
|
530
526
|
paddingTop: z[2],
|
|
531
527
|
borderTop: "1px dashed #f1f5f9"
|
|
532
|
-
}, children:
|
|
528
|
+
}, children: o })
|
|
533
529
|
] })
|
|
534
530
|
]
|
|
535
531
|
}
|
|
536
532
|
);
|
|
537
533
|
}
|
|
538
|
-
function
|
|
534
|
+
function xe({
|
|
539
535
|
tag: t,
|
|
540
|
-
title:
|
|
536
|
+
title: n,
|
|
541
537
|
description: r,
|
|
542
538
|
buttonText: a,
|
|
543
|
-
buttonHref:
|
|
544
|
-
onButtonClick:
|
|
539
|
+
buttonHref: g,
|
|
540
|
+
onButtonClick: i
|
|
545
541
|
}) {
|
|
546
|
-
return /* @__PURE__ */
|
|
542
|
+
return /* @__PURE__ */ c("div", { style: {
|
|
547
543
|
position: "relative",
|
|
548
544
|
borderRadius: y.lg,
|
|
549
545
|
padding: "40px 48px",
|
|
@@ -572,7 +568,7 @@ function De({
|
|
|
572
568
|
background: "radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%)",
|
|
573
569
|
pointerEvents: "none"
|
|
574
570
|
} }),
|
|
575
|
-
/* @__PURE__ */
|
|
571
|
+
/* @__PURE__ */ c("div", { style: {
|
|
576
572
|
position: "relative",
|
|
577
573
|
display: "flex",
|
|
578
574
|
alignItems: "center",
|
|
@@ -580,7 +576,7 @@ function De({
|
|
|
580
576
|
gap: 32,
|
|
581
577
|
flexWrap: "wrap"
|
|
582
578
|
}, children: [
|
|
583
|
-
/* @__PURE__ */
|
|
579
|
+
/* @__PURE__ */ c("div", { style: { flex: 1, minWidth: 240 }, children: [
|
|
584
580
|
t && /* @__PURE__ */ e("div", { style: {
|
|
585
581
|
fontSize: 11,
|
|
586
582
|
fontWeight: 600,
|
|
@@ -594,7 +590,7 @@ function De({
|
|
|
594
590
|
fontWeight: 700,
|
|
595
591
|
lineHeight: 1.3,
|
|
596
592
|
marginBottom: 8
|
|
597
|
-
}, children:
|
|
593
|
+
}, children: n }),
|
|
598
594
|
r && /* @__PURE__ */ e("div", { style: {
|
|
599
595
|
fontSize: 14,
|
|
600
596
|
color: "rgba(255, 255, 255, 0.7)",
|
|
@@ -602,12 +598,12 @@ function De({
|
|
|
602
598
|
maxWidth: 540
|
|
603
599
|
}, children: r })
|
|
604
600
|
] }),
|
|
605
|
-
a && (
|
|
601
|
+
a && (g || i) && /* @__PURE__ */ c(
|
|
606
602
|
"a",
|
|
607
603
|
{
|
|
608
|
-
href:
|
|
609
|
-
onClick: (
|
|
610
|
-
|
|
604
|
+
href: g || "#",
|
|
605
|
+
onClick: (o) => {
|
|
606
|
+
i && (o.preventDefault(), i());
|
|
611
607
|
},
|
|
612
608
|
style: {
|
|
613
609
|
display: "inline-flex",
|
|
@@ -624,11 +620,11 @@ function De({
|
|
|
624
620
|
transition: "transform 150ms ease, box-shadow 150ms ease",
|
|
625
621
|
whiteSpace: "nowrap"
|
|
626
622
|
},
|
|
627
|
-
onMouseEnter: (
|
|
628
|
-
|
|
623
|
+
onMouseEnter: (o) => {
|
|
624
|
+
o.currentTarget.style.transform = "translateY(-1px)", o.currentTarget.style.boxShadow = "0 6px 16px rgba(16, 185, 129, 0.5)";
|
|
629
625
|
},
|
|
630
|
-
onMouseLeave: (
|
|
631
|
-
|
|
626
|
+
onMouseLeave: (o) => {
|
|
627
|
+
o.currentTarget.style.transform = "translateY(0)", o.currentTarget.style.boxShadow = "0 4px 12px rgba(16, 185, 129, 0.4)";
|
|
632
628
|
},
|
|
633
629
|
children: [
|
|
634
630
|
a,
|
|
@@ -639,28 +635,28 @@ function De({
|
|
|
639
635
|
] })
|
|
640
636
|
] });
|
|
641
637
|
}
|
|
642
|
-
function
|
|
638
|
+
function ee({
|
|
643
639
|
icon: t,
|
|
644
|
-
title:
|
|
640
|
+
title: n = "暂无数据",
|
|
645
641
|
description: r,
|
|
646
642
|
actionText: a,
|
|
647
|
-
onAction:
|
|
648
|
-
size:
|
|
649
|
-
style:
|
|
643
|
+
onAction: g,
|
|
644
|
+
size: i = "md",
|
|
645
|
+
style: o
|
|
650
646
|
}) {
|
|
651
|
-
const
|
|
652
|
-
return /* @__PURE__ */
|
|
647
|
+
const d = { sm: 24, md: 40, lg: 64 }, l = { sm: 14, md: 16, lg: 20 };
|
|
648
|
+
return /* @__PURE__ */ c(
|
|
653
649
|
"div",
|
|
654
650
|
{
|
|
655
651
|
role: "status",
|
|
656
652
|
"aria-live": "polite",
|
|
657
653
|
style: {
|
|
658
|
-
padding:
|
|
654
|
+
padding: d[i] || d.md,
|
|
659
655
|
textAlign: "center",
|
|
660
656
|
background: "#ffffff",
|
|
661
657
|
borderRadius: y.md,
|
|
662
658
|
border: "1px dashed #e5e7eb",
|
|
663
|
-
...
|
|
659
|
+
...o
|
|
664
660
|
},
|
|
665
661
|
children: [
|
|
666
662
|
/* @__PURE__ */ e("div", { style: {
|
|
@@ -674,13 +670,13 @@ function de({
|
|
|
674
670
|
marginBottom: 16,
|
|
675
671
|
fontSize: 28,
|
|
676
672
|
color: "#9ca3af"
|
|
677
|
-
}, children: t || /* @__PURE__ */ e(
|
|
673
|
+
}, children: t || /* @__PURE__ */ e(J, {}) }),
|
|
678
674
|
/* @__PURE__ */ e("div", { style: {
|
|
679
|
-
fontSize:
|
|
675
|
+
fontSize: l[i],
|
|
680
676
|
fontWeight: 600,
|
|
681
677
|
color: x.text,
|
|
682
678
|
marginBottom: r ? 6 : 16
|
|
683
|
-
}, children:
|
|
679
|
+
}, children: n }),
|
|
684
680
|
r && /* @__PURE__ */ e("div", { style: {
|
|
685
681
|
fontSize: 13,
|
|
686
682
|
color: x.textMuted,
|
|
@@ -688,11 +684,11 @@ function de({
|
|
|
688
684
|
maxWidth: 360,
|
|
689
685
|
margin: "0 auto 16px"
|
|
690
686
|
}, children: r }),
|
|
691
|
-
a &&
|
|
687
|
+
a && g && /* @__PURE__ */ e(
|
|
692
688
|
W,
|
|
693
689
|
{
|
|
694
690
|
type: "primary",
|
|
695
|
-
onClick:
|
|
691
|
+
onClick: g,
|
|
696
692
|
style: {
|
|
697
693
|
background: "linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%)",
|
|
698
694
|
border: "none",
|
|
@@ -705,60 +701,60 @@ function de({
|
|
|
705
701
|
}
|
|
706
702
|
);
|
|
707
703
|
}
|
|
708
|
-
function
|
|
704
|
+
function te({
|
|
709
705
|
error: t,
|
|
710
|
-
title:
|
|
706
|
+
title: n = "加载失败",
|
|
711
707
|
description: r,
|
|
712
708
|
onRetry: a,
|
|
713
|
-
retryText:
|
|
714
|
-
variant:
|
|
715
|
-
style:
|
|
709
|
+
retryText: g = "重新加载",
|
|
710
|
+
variant: i = "inline",
|
|
711
|
+
style: o
|
|
716
712
|
}) {
|
|
717
713
|
var v;
|
|
718
|
-
const
|
|
719
|
-
return /* @__PURE__ */
|
|
714
|
+
const d = i === "full", l = (v = t == null ? void 0 : t.response) == null ? void 0 : v.data, s = l && typeof l == "object" && (typeof l.message == "string" && l.message || typeof l.msg == "string" && l.msg) || null, b = s || (typeof t == "string" ? t : (t == null ? void 0 : t.message) || (t == null ? void 0 : t.msg) || (t ? String(t) : null)), p = r || (s ? `原因: ${s}` : b ? `原因: ${b}。请检查网络或稍后重试。` : "请检查网络或稍后重试。");
|
|
715
|
+
return /* @__PURE__ */ c(
|
|
720
716
|
"div",
|
|
721
717
|
{
|
|
722
718
|
role: "alert",
|
|
723
719
|
"aria-live": "assertive",
|
|
724
720
|
style: {
|
|
725
|
-
padding:
|
|
726
|
-
background:
|
|
727
|
-
border:
|
|
721
|
+
padding: d ? "48px 24px" : "20px 24px",
|
|
722
|
+
background: d ? "#ffffff" : "#fef2f2",
|
|
723
|
+
border: d ? `1px dashed ${x.border}` : "1px solid #fecaca",
|
|
728
724
|
borderRadius: y.md,
|
|
729
|
-
textAlign:
|
|
725
|
+
textAlign: d ? "center" : "left",
|
|
730
726
|
display: "flex",
|
|
731
|
-
flexDirection:
|
|
732
|
-
alignItems:
|
|
733
|
-
gap:
|
|
734
|
-
...
|
|
727
|
+
flexDirection: d ? "column" : "row",
|
|
728
|
+
alignItems: d ? "center" : "flex-start",
|
|
729
|
+
gap: d ? 12 : 16,
|
|
730
|
+
...o
|
|
735
731
|
},
|
|
736
732
|
children: [
|
|
737
733
|
/* @__PURE__ */ e("div", { style: {
|
|
738
734
|
display: "inline-flex",
|
|
739
735
|
alignItems: "center",
|
|
740
736
|
justifyContent: "center",
|
|
741
|
-
width:
|
|
742
|
-
height:
|
|
737
|
+
width: d ? 56 : 36,
|
|
738
|
+
height: d ? 56 : 36,
|
|
743
739
|
borderRadius: "50%",
|
|
744
|
-
background:
|
|
740
|
+
background: d ? "#fef2f2" : "#ffffff",
|
|
745
741
|
color: "#dc2626",
|
|
746
|
-
fontSize:
|
|
742
|
+
fontSize: d ? 28 : 18,
|
|
747
743
|
flexShrink: 0
|
|
748
|
-
}, children: /* @__PURE__ */ e(
|
|
749
|
-
/* @__PURE__ */
|
|
744
|
+
}, children: /* @__PURE__ */ e(Q, {}) }),
|
|
745
|
+
/* @__PURE__ */ c("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
750
746
|
/* @__PURE__ */ e("div", { style: {
|
|
751
|
-
fontSize:
|
|
747
|
+
fontSize: d ? 16 : 14,
|
|
752
748
|
fontWeight: 600,
|
|
753
749
|
color: "#991b1b",
|
|
754
750
|
marginBottom: 4
|
|
755
|
-
}, children:
|
|
751
|
+
}, children: n }),
|
|
756
752
|
/* @__PURE__ */ e("div", { style: {
|
|
757
753
|
fontSize: 13,
|
|
758
754
|
color: "#7f1d1d",
|
|
759
755
|
lineHeight: 1.6,
|
|
760
756
|
wordBreak: "break-word"
|
|
761
|
-
}, children:
|
|
757
|
+
}, children: p }),
|
|
762
758
|
a && /* @__PURE__ */ e(
|
|
763
759
|
W,
|
|
764
760
|
{
|
|
@@ -766,9 +762,9 @@ function ce({
|
|
|
766
762
|
danger: !0,
|
|
767
763
|
icon: /* @__PURE__ */ e(M, {}),
|
|
768
764
|
onClick: a,
|
|
769
|
-
size:
|
|
765
|
+
size: d ? "middle" : "small",
|
|
770
766
|
style: { marginTop: 12 },
|
|
771
|
-
children:
|
|
767
|
+
children: g
|
|
772
768
|
}
|
|
773
769
|
)
|
|
774
770
|
] })
|
|
@@ -776,9 +772,9 @@ function ce({
|
|
|
776
772
|
}
|
|
777
773
|
);
|
|
778
774
|
}
|
|
779
|
-
function
|
|
775
|
+
function ve({
|
|
780
776
|
variant: t = "cards",
|
|
781
|
-
rows:
|
|
777
|
+
rows: n = 4,
|
|
782
778
|
active: r = !0,
|
|
783
779
|
style: a
|
|
784
780
|
}) {
|
|
@@ -794,7 +790,7 @@ function Le({
|
|
|
794
790
|
gap: 16,
|
|
795
791
|
...a
|
|
796
792
|
},
|
|
797
|
-
children: Array.from({ length:
|
|
793
|
+
children: Array.from({ length: n }).map((g, i) => /* @__PURE__ */ c(
|
|
798
794
|
"div",
|
|
799
795
|
{
|
|
800
796
|
style: {
|
|
@@ -805,16 +801,16 @@ function Le({
|
|
|
805
801
|
},
|
|
806
802
|
children: [
|
|
807
803
|
/* @__PURE__ */ e(
|
|
808
|
-
|
|
804
|
+
B.Image,
|
|
809
805
|
{
|
|
810
806
|
active: r,
|
|
811
807
|
style: { width: "100%", height: 140, borderRadius: 0 }
|
|
812
808
|
}
|
|
813
809
|
),
|
|
814
|
-
/* @__PURE__ */ e("div", { style: { padding: 16 }, children: /* @__PURE__ */ e(
|
|
810
|
+
/* @__PURE__ */ e("div", { style: { padding: 16 }, children: /* @__PURE__ */ e(B, { active: r, paragraph: { rows: 2 }, title: { width: "60%" } }) })
|
|
815
811
|
]
|
|
816
812
|
},
|
|
817
|
-
|
|
813
|
+
i
|
|
818
814
|
))
|
|
819
815
|
}
|
|
820
816
|
) : t === "table" ? /* @__PURE__ */ e(
|
|
@@ -829,9 +825,9 @@ function Le({
|
|
|
829
825
|
borderRadius: y.md,
|
|
830
826
|
...a
|
|
831
827
|
},
|
|
832
|
-
children: /* @__PURE__ */ e(
|
|
828
|
+
children: /* @__PURE__ */ e(B, { active: r, paragraph: { rows: n } })
|
|
833
829
|
}
|
|
834
|
-
) : t === "list" ? /* @__PURE__ */ e("div", { role: "status", "aria-busy": "true", "aria-label": "加载中", style: a, children: Array.from({ length:
|
|
830
|
+
) : t === "list" ? /* @__PURE__ */ e("div", { role: "status", "aria-busy": "true", "aria-label": "加载中", style: a, children: Array.from({ length: n }).map((g, i) => /* @__PURE__ */ c(
|
|
835
831
|
"div",
|
|
836
832
|
{
|
|
837
833
|
style: {
|
|
@@ -839,14 +835,14 @@ function Le({
|
|
|
839
835
|
alignItems: "center",
|
|
840
836
|
gap: 12,
|
|
841
837
|
padding: "12px 0",
|
|
842
|
-
borderBottom:
|
|
838
|
+
borderBottom: i < n - 1 ? "1px solid #f1f5f9" : "none"
|
|
843
839
|
},
|
|
844
840
|
children: [
|
|
845
|
-
/* @__PURE__ */ e(
|
|
846
|
-
/* @__PURE__ */ e(
|
|
841
|
+
/* @__PURE__ */ e(B.Avatar, { active: r, size: "default" }),
|
|
842
|
+
/* @__PURE__ */ e(B, { active: r, paragraph: { rows: 1 }, title: { width: 120 }, style: { flex: 1 } })
|
|
847
843
|
]
|
|
848
844
|
},
|
|
849
|
-
|
|
845
|
+
i
|
|
850
846
|
)) }) : /* @__PURE__ */ e(
|
|
851
847
|
"div",
|
|
852
848
|
{
|
|
@@ -859,141 +855,96 @@ function Le({
|
|
|
859
855
|
borderRadius: y.md,
|
|
860
856
|
...a
|
|
861
857
|
},
|
|
862
|
-
children: /* @__PURE__ */ e(
|
|
858
|
+
children: /* @__PURE__ */ e(B, { active: r, title: { width: "40%" }, paragraph: { rows: n } })
|
|
863
859
|
}
|
|
864
860
|
);
|
|
865
861
|
}
|
|
866
|
-
function
|
|
862
|
+
function Se({
|
|
867
863
|
value: t,
|
|
868
|
-
onChange:
|
|
864
|
+
onChange: n,
|
|
869
865
|
onSearch: r,
|
|
870
866
|
placeholder: a = "搜索...",
|
|
871
|
-
debounceMs:
|
|
872
|
-
width:
|
|
873
|
-
allowClear:
|
|
867
|
+
debounceMs: g = 300,
|
|
868
|
+
width: i = 280,
|
|
869
|
+
allowClear: o = !0,
|
|
874
870
|
// antd v6: enterButton 已被废弃,SearchInput 已通过 onKeyDown 自行处理 Enter 键,
|
|
875
871
|
// 所以从 rest 里过滤掉,避免透传到原生 <input> 报 React 警告。
|
|
876
|
-
enterButton:
|
|
877
|
-
...
|
|
872
|
+
enterButton: d,
|
|
873
|
+
...l
|
|
878
874
|
}) {
|
|
879
|
-
const [
|
|
880
|
-
|
|
881
|
-
t !== void 0 && t !==
|
|
882
|
-
}, [t]),
|
|
883
|
-
|
|
875
|
+
const [s, b] = R(t || ""), p = L(null), v = L(t || "");
|
|
876
|
+
D(() => {
|
|
877
|
+
t !== void 0 && t !== s && (b(t || ""), v.current = t || "");
|
|
878
|
+
}, [t]), D(() => () => {
|
|
879
|
+
p.current && clearTimeout(p.current);
|
|
884
880
|
}, []);
|
|
885
|
-
const S = (
|
|
886
|
-
v.current =
|
|
887
|
-
}, C = (
|
|
888
|
-
const h =
|
|
889
|
-
if (b(h),
|
|
881
|
+
const S = (u) => {
|
|
882
|
+
v.current = u, n && n(u);
|
|
883
|
+
}, C = (u) => {
|
|
884
|
+
const h = u.target.value;
|
|
885
|
+
if (b(h), p.current && clearTimeout(p.current), h === "") {
|
|
890
886
|
S("");
|
|
891
887
|
return;
|
|
892
888
|
}
|
|
893
|
-
|
|
894
|
-
}, m = (
|
|
895
|
-
|
|
889
|
+
p.current = setTimeout(() => S(h), g);
|
|
890
|
+
}, m = (u) => {
|
|
891
|
+
p.current && clearTimeout(p.current), S(u), r && r(u);
|
|
896
892
|
};
|
|
897
893
|
return /* @__PURE__ */ e(
|
|
898
|
-
|
|
894
|
+
K,
|
|
899
895
|
{
|
|
900
|
-
...
|
|
901
|
-
value:
|
|
896
|
+
...l,
|
|
897
|
+
value: s,
|
|
902
898
|
onChange: C,
|
|
903
899
|
onPressEnter: m,
|
|
904
|
-
onKeyDown: (
|
|
905
|
-
|
|
900
|
+
onKeyDown: (u) => {
|
|
901
|
+
u.key === "Enter" ? (u.preventDefault(), m(s)) : u.key === "Escape" && (b(""), m(""));
|
|
906
902
|
},
|
|
907
903
|
placeholder: a,
|
|
908
|
-
allowClear:
|
|
904
|
+
allowClear: o ? { clearIcon: /* @__PURE__ */ e("span", { onClick: () => {
|
|
909
905
|
b(""), m("");
|
|
910
906
|
}, children: "×" }) } : !1,
|
|
911
|
-
prefix: /* @__PURE__ */ e(
|
|
907
|
+
prefix: /* @__PURE__ */ e(X, { style: { color: "#9ca3af" } }),
|
|
912
908
|
style: {
|
|
913
|
-
width:
|
|
909
|
+
width: i,
|
|
914
910
|
borderRadius: y.md,
|
|
915
|
-
...
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
);
|
|
919
|
-
}
|
|
920
|
-
j.use([
|
|
921
|
-
V,
|
|
922
|
-
ee,
|
|
923
|
-
te,
|
|
924
|
-
re,
|
|
925
|
-
ne,
|
|
926
|
-
ie,
|
|
927
|
-
ae,
|
|
928
|
-
oe
|
|
929
|
-
]);
|
|
930
|
-
function Ae({
|
|
931
|
-
option: t,
|
|
932
|
-
height: i = 300,
|
|
933
|
-
className: r,
|
|
934
|
-
style: a
|
|
935
|
-
}) {
|
|
936
|
-
const c = D(null), n = D(null);
|
|
937
|
-
return B(() => {
|
|
938
|
-
if (!c.current) return;
|
|
939
|
-
n.current = j.init(c.current, null, { renderer: "canvas" });
|
|
940
|
-
let l;
|
|
941
|
-
const s = () => {
|
|
942
|
-
var o;
|
|
943
|
-
return (o = n.current) == null ? void 0 : o.resize();
|
|
944
|
-
};
|
|
945
|
-
return typeof ResizeObserver < "u" ? (l = new ResizeObserver(s), l.observe(c.current)) : window.addEventListener("resize", s), () => {
|
|
946
|
-
l ? l.disconnect() : window.removeEventListener("resize", s), n.current && (n.current.dispose(), n.current = null);
|
|
947
|
-
};
|
|
948
|
-
}, []), B(() => {
|
|
949
|
-
n.current && t && n.current.setOption(t, { notMerge: !0 });
|
|
950
|
-
}, [t]), /* @__PURE__ */ e(
|
|
951
|
-
"div",
|
|
952
|
-
{
|
|
953
|
-
ref: c,
|
|
954
|
-
className: r,
|
|
955
|
-
role: "img",
|
|
956
|
-
"aria-label": "数据可视化图表",
|
|
957
|
-
style: {
|
|
958
|
-
width: "100%",
|
|
959
|
-
height: i,
|
|
960
|
-
...a
|
|
911
|
+
...l.style || {}
|
|
961
912
|
}
|
|
962
913
|
}
|
|
963
914
|
);
|
|
964
915
|
}
|
|
965
|
-
function
|
|
916
|
+
function re({
|
|
966
917
|
title: t,
|
|
967
|
-
subtitle:
|
|
918
|
+
subtitle: n,
|
|
968
919
|
breadcrumb: r,
|
|
969
920
|
extra: a,
|
|
970
|
-
back:
|
|
971
|
-
onBack:
|
|
921
|
+
back: g,
|
|
922
|
+
onBack: i
|
|
972
923
|
}) {
|
|
973
|
-
const
|
|
924
|
+
const o = Z();
|
|
974
925
|
return /* @__PURE__ */ e("div", { style: {
|
|
975
926
|
marginBottom: 12,
|
|
976
927
|
paddingBottom: 10,
|
|
977
928
|
borderBottom: "1px solid #f1f5f9"
|
|
978
|
-
}, children: /* @__PURE__ */
|
|
929
|
+
}, children: /* @__PURE__ */ c("div", { style: {
|
|
979
930
|
display: "flex",
|
|
980
931
|
alignItems: "center",
|
|
981
932
|
justifyContent: "space-between",
|
|
982
933
|
gap: 12,
|
|
983
934
|
flexWrap: "wrap"
|
|
984
935
|
}, children: [
|
|
985
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ c("div", { style: {
|
|
986
937
|
display: "flex",
|
|
987
938
|
alignItems: "center",
|
|
988
939
|
gap: 10,
|
|
989
940
|
minWidth: 0,
|
|
990
941
|
flexWrap: "wrap"
|
|
991
942
|
}, children: [
|
|
992
|
-
|
|
943
|
+
g && /* @__PURE__ */ e(
|
|
993
944
|
"button",
|
|
994
945
|
{
|
|
995
946
|
onClick: () => {
|
|
996
|
-
|
|
947
|
+
i ? i() : o(-1);
|
|
997
948
|
},
|
|
998
949
|
"aria-label": "返回上一页",
|
|
999
950
|
style: {
|
|
@@ -1011,27 +962,27 @@ function fe({
|
|
|
1011
962
|
transition: "all 150ms ease",
|
|
1012
963
|
flexShrink: 0
|
|
1013
964
|
},
|
|
1014
|
-
onMouseEnter: (
|
|
1015
|
-
|
|
965
|
+
onMouseEnter: (l) => {
|
|
966
|
+
l.currentTarget.style.background = "#f8fafc", l.currentTarget.style.color = "#111827", l.currentTarget.style.borderColor = "#7c3aed";
|
|
1016
967
|
},
|
|
1017
|
-
onMouseLeave: (
|
|
1018
|
-
|
|
968
|
+
onMouseLeave: (l) => {
|
|
969
|
+
l.currentTarget.style.background = "#ffffff", l.currentTarget.style.color = "#6b7280", l.currentTarget.style.borderColor = "#e5e7eb";
|
|
1019
970
|
},
|
|
1020
971
|
children: "←"
|
|
1021
972
|
}
|
|
1022
973
|
),
|
|
1023
974
|
r && r.length > 0 ? /* @__PURE__ */ e(
|
|
1024
|
-
|
|
975
|
+
$,
|
|
1025
976
|
{
|
|
1026
|
-
items: r.map((
|
|
1027
|
-
const b =
|
|
977
|
+
items: r.map((l, s) => {
|
|
978
|
+
const b = s === r.length - 1;
|
|
1028
979
|
return {
|
|
1029
|
-
title:
|
|
1030
|
-
|
|
1031
|
-
}, children:
|
|
980
|
+
title: l.href && !b ? /* @__PURE__ */ e("a", { onClick: (p) => {
|
|
981
|
+
p.preventDefault(), o(l.href);
|
|
982
|
+
}, children: l.label }) : /* @__PURE__ */ e("span", { style: b ? {
|
|
1032
983
|
fontWeight: 600,
|
|
1033
984
|
color: "#111827"
|
|
1034
|
-
} : void 0, children:
|
|
985
|
+
} : void 0, children: l.label })
|
|
1035
986
|
};
|
|
1036
987
|
})
|
|
1037
988
|
}
|
|
@@ -1041,7 +992,7 @@ function fe({
|
|
|
1041
992
|
color: "#111827",
|
|
1042
993
|
lineHeight: 1.4
|
|
1043
994
|
}, children: t }),
|
|
1044
|
-
|
|
995
|
+
n && /* @__PURE__ */ e("span", { title: n, style: {
|
|
1045
996
|
fontSize: 12,
|
|
1046
997
|
color: "#94a3b8",
|
|
1047
998
|
lineHeight: 1.4,
|
|
@@ -1049,7 +1000,7 @@ function fe({
|
|
|
1049
1000
|
overflow: "hidden",
|
|
1050
1001
|
textOverflow: "ellipsis",
|
|
1051
1002
|
maxWidth: 360
|
|
1052
|
-
}, children:
|
|
1003
|
+
}, children: n })
|
|
1053
1004
|
] }),
|
|
1054
1005
|
a && /* @__PURE__ */ e("div", { style: {
|
|
1055
1006
|
display: "flex",
|
|
@@ -1058,8 +1009,8 @@ function fe({
|
|
|
1058
1009
|
}, children: a })
|
|
1059
1010
|
] }) });
|
|
1060
1011
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return /* @__PURE__ */
|
|
1012
|
+
function we({ left: t, right: n, extra: r }) {
|
|
1013
|
+
return /* @__PURE__ */ c(
|
|
1063
1014
|
"div",
|
|
1064
1015
|
{
|
|
1065
1016
|
style: {
|
|
@@ -1072,110 +1023,110 @@ function Me({ left: t, right: i, extra: r }) {
|
|
|
1072
1023
|
},
|
|
1073
1024
|
children: [
|
|
1074
1025
|
/* @__PURE__ */ e(P, { size: 8, wrap: !0, children: t }),
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
|
|
1026
|
+
/* @__PURE__ */ c(P, { size: 8, wrap: !0, children: [
|
|
1027
|
+
n,
|
|
1077
1028
|
r
|
|
1078
1029
|
] })
|
|
1079
1030
|
]
|
|
1080
1031
|
}
|
|
1081
1032
|
);
|
|
1082
1033
|
}
|
|
1083
|
-
function
|
|
1084
|
-
return /* @__PURE__ */ e(W, { icon: /* @__PURE__ */ e(M, {}), onClick: t, loading:
|
|
1034
|
+
function ke({ onClick: t, loading: n, title: r = "刷新" }) {
|
|
1035
|
+
return /* @__PURE__ */ e(W, { icon: /* @__PURE__ */ e(M, {}), onClick: t, loading: n, title: r, children: r });
|
|
1085
1036
|
}
|
|
1086
|
-
const
|
|
1037
|
+
const ne = {
|
|
1087
1038
|
0: { label: "待办", color: "default" },
|
|
1088
1039
|
1: { label: "进行中", color: "blue" },
|
|
1089
1040
|
2: { label: "已完成", color: "green" }
|
|
1090
|
-
},
|
|
1041
|
+
}, ae = {
|
|
1091
1042
|
ACTIVE: { label: "正常", color: "green" },
|
|
1092
1043
|
INACTIVE: { label: "禁用", color: "red" },
|
|
1093
1044
|
ENABLED: { label: "启用", color: "green" },
|
|
1094
1045
|
DISABLED: { label: "禁用", color: "red" }
|
|
1095
|
-
},
|
|
1046
|
+
}, ie = {
|
|
1096
1047
|
low: { label: "低", color: "default" },
|
|
1097
1048
|
medium: { label: "中", color: "orange" },
|
|
1098
1049
|
high: { label: "高", color: "red" },
|
|
1099
1050
|
1: { label: "低", color: "default" },
|
|
1100
1051
|
2: { label: "中", color: "orange" },
|
|
1101
1052
|
3: { label: "高", color: "red" }
|
|
1102
|
-
},
|
|
1053
|
+
}, le = {
|
|
1103
1054
|
PENDING: { label: "待审批", color: "orange" },
|
|
1104
1055
|
APPROVED: { label: "已通过", color: "green" },
|
|
1105
1056
|
REJECTED: { label: "已拒绝", color: "red" },
|
|
1106
1057
|
CANCELLED: { label: "已撤回", color: "default" }
|
|
1107
|
-
},
|
|
1058
|
+
}, oe = {
|
|
1108
1059
|
RUNNING: { label: "运行中", color: "green" },
|
|
1109
1060
|
PAUSED: { label: "已暂停", color: "orange" },
|
|
1110
1061
|
STOPPED: { label: "已停止", color: "default" },
|
|
1111
1062
|
FAILED: { label: "失败", color: "red" },
|
|
1112
1063
|
SUCCESS: { label: "成功", color: "green" }
|
|
1113
|
-
},
|
|
1114
|
-
task:
|
|
1115
|
-
model:
|
|
1116
|
-
priority:
|
|
1117
|
-
approval:
|
|
1118
|
-
schedule:
|
|
1064
|
+
}, de = {
|
|
1065
|
+
task: ne,
|
|
1066
|
+
model: ae,
|
|
1067
|
+
priority: ie,
|
|
1068
|
+
approval: le,
|
|
1069
|
+
schedule: oe
|
|
1119
1070
|
};
|
|
1120
|
-
function
|
|
1121
|
-
const
|
|
1122
|
-
return
|
|
1071
|
+
function Ce({ status: t, type: n = "task", mapping: r, ...a }) {
|
|
1072
|
+
const i = (r || de[n] || {})[t];
|
|
1073
|
+
return i ? /* @__PURE__ */ e(F, { color: i.color, ...a, children: i.label }) : /* @__PURE__ */ e(F, { ...a, children: String(t) });
|
|
1123
1074
|
}
|
|
1124
|
-
function
|
|
1125
|
-
const [
|
|
1075
|
+
function Te({ title: t, description: n, load: r, columns: a, rowKey: g = "id", extra: i, expandable: o }) {
|
|
1076
|
+
const [d, l] = R([]), [s, b] = R({ current: 1, size: 10, total: null }), [p, v] = R(!1), [S, C] = R(null), m = Y(async (f = s.current, u = s.size) => {
|
|
1126
1077
|
v(!0), C(null);
|
|
1127
1078
|
try {
|
|
1128
|
-
const h = await r(
|
|
1079
|
+
const h = await r(f, u);
|
|
1129
1080
|
if (Array.isArray(h))
|
|
1130
|
-
|
|
1081
|
+
l(h || []), b({ current: f, size: u, total: h.length });
|
|
1131
1082
|
else {
|
|
1132
1083
|
const A = (h == null ? void 0 : h.records) || [];
|
|
1133
|
-
|
|
1084
|
+
l(A), b({ current: f, size: u, total: (h == null ? void 0 : h.total) == null ? null : Number(h.total) });
|
|
1134
1085
|
}
|
|
1135
1086
|
} catch (h) {
|
|
1136
|
-
|
|
1087
|
+
l([]), C(h);
|
|
1137
1088
|
} finally {
|
|
1138
1089
|
v(!1);
|
|
1139
1090
|
}
|
|
1140
|
-
}, [r,
|
|
1141
|
-
|
|
1091
|
+
}, [r, s.current, s.size]);
|
|
1092
|
+
D(() => {
|
|
1142
1093
|
m(1);
|
|
1143
1094
|
}, []);
|
|
1144
|
-
const
|
|
1145
|
-
return /* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */ e(
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
|
|
1095
|
+
const I = s.total != null && s.total > 0;
|
|
1096
|
+
return /* @__PURE__ */ c("div", { children: [
|
|
1097
|
+
/* @__PURE__ */ e(re, { title: t, subtitle: n }),
|
|
1098
|
+
/* @__PURE__ */ c(
|
|
1099
|
+
_,
|
|
1149
1100
|
{
|
|
1150
1101
|
extra: /* @__PURE__ */ e(
|
|
1151
1102
|
W,
|
|
1152
1103
|
{
|
|
1153
1104
|
icon: /* @__PURE__ */ e(M, {}),
|
|
1154
|
-
loading:
|
|
1155
|
-
onClick: () => m(
|
|
1105
|
+
loading: p,
|
|
1106
|
+
onClick: () => m(s.current, s.size),
|
|
1156
1107
|
children: "刷新"
|
|
1157
1108
|
}
|
|
1158
1109
|
),
|
|
1159
1110
|
children: [
|
|
1160
|
-
|
|
1161
|
-
S ? /* @__PURE__ */ e(
|
|
1162
|
-
|
|
1111
|
+
i,
|
|
1112
|
+
S ? /* @__PURE__ */ e(te, { error: S, onRetry: () => m(s.current, s.size), type: "inline" }) : /* @__PURE__ */ e(
|
|
1113
|
+
q,
|
|
1163
1114
|
{
|
|
1164
1115
|
size: "small",
|
|
1165
1116
|
columns: a,
|
|
1166
|
-
dataSource:
|
|
1167
|
-
loading:
|
|
1168
|
-
rowKey: (
|
|
1117
|
+
dataSource: d,
|
|
1118
|
+
loading: p,
|
|
1119
|
+
rowKey: (f) => (f == null ? void 0 : f[g]) ?? (f == null ? void 0 : f.key) ?? JSON.stringify(f).slice(0, 32),
|
|
1169
1120
|
pagination: {
|
|
1170
|
-
current:
|
|
1171
|
-
pageSize:
|
|
1172
|
-
total:
|
|
1121
|
+
current: s.current,
|
|
1122
|
+
pageSize: s.size,
|
|
1123
|
+
total: I ? s.total : d.length,
|
|
1173
1124
|
showSizeChanger: !0,
|
|
1174
|
-
showTotal: () =>
|
|
1125
|
+
showTotal: () => I ? `共 ${s.total} 条` : `本页 ${d.length} 条(接口 total 未返回有效值)`
|
|
1175
1126
|
},
|
|
1176
|
-
onChange: (
|
|
1177
|
-
expandable:
|
|
1178
|
-
locale: { emptyText: /* @__PURE__ */ e(
|
|
1127
|
+
onChange: (f) => m(f.current, f.pageSize),
|
|
1128
|
+
expandable: o,
|
|
1129
|
+
locale: { emptyText: /* @__PURE__ */ e(ee, { title: "暂无数据", description: "接口返回空列表" }) }
|
|
1179
1130
|
}
|
|
1180
1131
|
)
|
|
1181
1132
|
]
|
|
@@ -1184,26 +1135,25 @@ function Pe({ title: t, description: i, load: r, columns: a, rowKey: c = "id", e
|
|
|
1184
1135
|
] });
|
|
1185
1136
|
}
|
|
1186
1137
|
export {
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
Re as l,
|
|
1138
|
+
V as C,
|
|
1139
|
+
xe as D,
|
|
1140
|
+
ee as E,
|
|
1141
|
+
ye as F,
|
|
1142
|
+
he as G,
|
|
1143
|
+
ve as L,
|
|
1144
|
+
re as P,
|
|
1145
|
+
ke as R,
|
|
1146
|
+
Se as S,
|
|
1147
|
+
we as T,
|
|
1148
|
+
te as a,
|
|
1149
|
+
Te as b,
|
|
1150
|
+
me as c,
|
|
1151
|
+
Ce as d,
|
|
1152
|
+
be as e,
|
|
1153
|
+
T as f,
|
|
1154
|
+
O as g,
|
|
1155
|
+
z as h,
|
|
1156
|
+
ue as l,
|
|
1207
1157
|
x as n,
|
|
1208
1158
|
w as p,
|
|
1209
1159
|
y as r,
|