yh-report 2.0.1 → 2.0.3

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.
@@ -0,0 +1,1262 @@
1
+ import X from "@/libs/api.request.js";
2
+ import { ref as fe, computed as ue } from "vue";
3
+ import { cloneDeep as q } from "lodash-es";
4
+ import { ElMessage as ce } from "element-plus";
5
+ import { useRouter as de } from "vue-router";
6
+ var ee = /* @__PURE__ */ ((e) => (e.ROW = "row", e.COL = "col", e.CELL = "cell", e.HEAD = "head", e.TEXT = "text", e.ICON = "icon", e.FUN = "fun", e.IMAGE = "img", e.FIELD = "field", e))(ee || {}), te = /* @__PURE__ */ ((e) => (e.TEXT = "text", e.NUMBER = "number", e.CURRENCY = "currency", e.PERCENT = "percent", e.PROMILLE = "promille", e.SCIENTIFIC = "scientific", e.DATETIME = "datetime", e.STRING = "string", e))(te || {}), he = /* @__PURE__ */ ((e) => (e[e.STRING = 0] = "STRING", e[e.PLONG = 1] = "PLONG", e[e.LONG = 2] = "LONG", e[e.DOUBLE = 3] = "DOUBLE", e[e.TEXT = 4] = "TEXT", e[e.BOOL = 5] = "BOOL", e[e.DATE = 6] = "DATE", e[e.TIME = 7] = "TIME", e[e.DATETIME = 8] = "DATETIME", e[e.PASSWORD = 9] = "PASSWORD", e[e.ID = 10] = "ID", e[e.LIST = 11] = "LIST", e[e.TABLE = 12] = "TABLE", e[e.TREE = 13] = "TREE", e[e.IMG = 14] = "IMG", e[e.OPEN = 15] = "OPEN", e[e.SQL = 16] = "SQL", e[e.COLOR = 17] = "COLOR", e[e.EDITOR = 18] = "EDITOR", e))(he || {});
7
+ const V = {
8
+ type: ee.TEXT,
9
+ format: te.TEXT,
10
+ formatType: {
11
+ date: "",
12
+ numberDecimal: "",
13
+ numberUseGrouping: "",
14
+ currencySymbol: "",
15
+ scientificNotation: ""
16
+ },
17
+ style: {},
18
+ colSpan: 1,
19
+ rowSpan: 1,
20
+ col: 1,
21
+ row: 1,
22
+ text: "",
23
+ data: void 0
24
+ }, C = {
25
+ size: 25,
26
+ data: void 0,
27
+ loop: !1,
28
+ index: 0
29
+ }, J = {
30
+ size: 80,
31
+ data: void 0,
32
+ loop: !1,
33
+ index: 0
34
+ };
35
+ let B = !1;
36
+ function ke(e) {
37
+ var s;
38
+ B = !1;
39
+ const i = {
40
+ ...e,
41
+ // @ts-ignore
42
+ options: ((s = e.options) == null ? void 0 : s.map((f) => f.type === "report" ? re(f) : f)) || []
43
+ };
44
+ return {
45
+ isComplete: B,
46
+ data: i
47
+ };
48
+ }
49
+ function re(e) {
50
+ Object.keys(K).length !== Object.keys(e).length && (B = !0);
51
+ const i = {
52
+ ...K,
53
+ ...e,
54
+ id: `report-${Date.now()}`
55
+ };
56
+ i.rowConfig.length === 0 && (B = !0, i.rowConfig = Array.from({ length: 5 }, (o, b) => ({
57
+ size: 25,
58
+ data: void 0,
59
+ loop: !1,
60
+ index: b
61
+ }))), i.colConfig.length === 0 && (B = !0, i.colConfig = Array.from({ length: 10 }, (o, b) => ({
62
+ ...J
63
+ })));
64
+ const s = i.rowConfig.length, f = i.colConfig.length;
65
+ return B = i.config.length !== s, i.config = i.config.map((o, b) => (B = o.length !== f, o.slice(0, f).map((m, h) => (B = Object.keys(m).length !== Object.keys(V).length, {
66
+ ...V,
67
+ ...m,
68
+ row: b,
69
+ col: h
70
+ })).concat(
71
+ Array.from({ length: f - o.length }, (m, h) => ({
72
+ ...V,
73
+ row: b,
74
+ col: o.length + h
75
+ // 填充列时,列索引从当前行已有列数开始
76
+ }))
77
+ ))).concat(
78
+ Array.from({ length: s - i.config.length }, (o, b) => {
79
+ const m = i.config.length + b;
80
+ return Array(f).fill(0).map((h, x) => ({
81
+ ...V,
82
+ row: m,
83
+ col: x
84
+ }));
85
+ })
86
+ ), i.rowConfig = i.rowConfig.map((o) => (B = Object.keys(o).length !== Object.keys(C).length, {
87
+ ...C,
88
+ ...o
89
+ })), i.colConfig = i.colConfig.map((o) => (B = Object.keys(o) !== Object.keys(J), {
90
+ ...J,
91
+ ...o
92
+ })), i;
93
+ }
94
+ const ne = fe([
95
+ {
96
+ name: "报表",
97
+ icon: "icon-table",
98
+ type: "report"
99
+ },
100
+ {
101
+ name: "折线图",
102
+ icon: "icon-linechart",
103
+ type: "line"
104
+ },
105
+ {
106
+ name: "条形图",
107
+ icon: "icon-align-left",
108
+ type: "rowBar"
109
+ },
110
+ {
111
+ name: "柱状图",
112
+ icon: "icon-barchart",
113
+ type: "bar"
114
+ },
115
+ {
116
+ name: "饼状图",
117
+ icon: "icon-piechart",
118
+ type: "pie"
119
+ },
120
+ {
121
+ name: "散点图",
122
+ icon: "icon-chart-bubble",
123
+ type: "scatter"
124
+ },
125
+ {
126
+ name: "雷达图",
127
+ icon: "icon-radarchart",
128
+ type: "radar"
129
+ },
130
+ {
131
+ name: "矩形树图",
132
+ icon: "icon-s-grid",
133
+ type: "treemap"
134
+ },
135
+ {
136
+ name: "自定义标签",
137
+ icon: "icon-books",
138
+ type: "label"
139
+ }
140
+ ]), pe = ue(() => ne.value.map((e) => e.type)), ge = ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272"], ie = (e, i) => {
141
+ const s = e.dataIndex, f = i.value();
142
+ let o = i.value(1);
143
+ Array.isArray(o) && (o = o.map((v) => String.fromCharCode(v)).join(""));
144
+ const b = i.getWidth(), m = i.getHeight(), h = ge[s % 6], x = e.dataInsideLength;
145
+ let c = b * 0.01;
146
+ c < 10 && (c = 10), c > 15 && (c = 15);
147
+ let y = m * 0.5;
148
+ y < 60 && (y = 60);
149
+ const $ = (b - c * 2 - c * (x - 1)) / x, w = 8, a = c + s * ($ + c), u = (i.getHeight() - y) / 2;
150
+ return {
151
+ type: "group",
152
+ children: [
153
+ {
154
+ type: "rect",
155
+ shape: {
156
+ x: a,
157
+ y: u,
158
+ width: $,
159
+ height: y,
160
+ r: w
161
+ },
162
+ style: {
163
+ fill: h,
164
+ stroke: "#fff",
165
+ lineWidth: 1,
166
+ shadowBlur: 4,
167
+ shadowColor: "rgba(0,0,0,0.1)"
168
+ }
169
+ },
170
+ {
171
+ type: "text",
172
+ style: {
173
+ text: `${o}
174
+
175
+ ${f}`,
176
+ fill: "#fff",
177
+ // 自动反色可改为:echarts.color.lift(color, 0.8)
178
+ fontSize: 14,
179
+ fontWeight: "bold",
180
+ align: "center",
181
+ verticalAlign: "middle"
182
+ },
183
+ position: [a + $ / 2, u + y / 2]
184
+ }
185
+ ]
186
+ };
187
+ }, me = {
188
+ line: {
189
+ backgroundColor: "#fff",
190
+ title: {
191
+ text: "Title Line"
192
+ },
193
+ tooltip: {
194
+ trigger: "axis"
195
+ },
196
+ legend: {
197
+ top: "8%"
198
+ },
199
+ grid: {
200
+ left: "3%",
201
+ right: "9%",
202
+ top: "20%",
203
+ bottom: "3%",
204
+ containLabel: !0
205
+ },
206
+ xAxis: {
207
+ name: "天",
208
+ type: "category",
209
+ boundaryGap: !1,
210
+ data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
211
+ },
212
+ yAxis: {
213
+ name: "值",
214
+ type: "value"
215
+ },
216
+ dataZoom: [
217
+ {
218
+ type: "inside",
219
+ start: 0,
220
+ end: 100
221
+ }
222
+ ],
223
+ series: [
224
+ {
225
+ name: "Email",
226
+ type: "line",
227
+ stack: "Total",
228
+ data: [120, 132, 101, 134, 90, 230, 210]
229
+ },
230
+ {
231
+ name: "Union",
232
+ type: "line",
233
+ stack: "Total",
234
+ data: [220, 182, 191, 234, 290, 330, 310]
235
+ },
236
+ {
237
+ name: "Video",
238
+ type: "line",
239
+ stack: "Total",
240
+ data: [150, 232, 201, 154, 190, 330, 410]
241
+ }
242
+ ]
243
+ },
244
+ rowBar: {
245
+ backgroundColor: "#fff",
246
+ title: {
247
+ text: "Title Bar"
248
+ },
249
+ tooltip: {
250
+ trigger: "axis",
251
+ axisPointer: {
252
+ type: "shadow"
253
+ }
254
+ },
255
+ legend: {
256
+ top: "8%"
257
+ },
258
+ grid: {
259
+ left: "3%",
260
+ right: "9%",
261
+ top: "20%",
262
+ bottom: "3%",
263
+ containLabel: !0
264
+ },
265
+ yAxis: {
266
+ name: "天",
267
+ type: "category",
268
+ axisTick: {
269
+ alignWithLabel: !0
270
+ },
271
+ data: ["2012", "2013", "2014", "2015", "2016"]
272
+ },
273
+ xAxis: {
274
+ name: "值",
275
+ type: "value"
276
+ },
277
+ dataZoom: [
278
+ {
279
+ type: "inside",
280
+ start: 0,
281
+ end: 100
282
+ }
283
+ ],
284
+ series: [
285
+ {
286
+ name: "Forest",
287
+ type: "bar",
288
+ barGap: 0,
289
+ emphasis: {
290
+ focus: "series"
291
+ },
292
+ data: [320, 332, 301, 334, 390]
293
+ },
294
+ {
295
+ name: "Steppe",
296
+ type: "bar",
297
+ emphasis: {
298
+ focus: "series"
299
+ },
300
+ data: [220, 182, 191, 234, 290]
301
+ },
302
+ {
303
+ name: "Desert",
304
+ type: "bar",
305
+ emphasis: {
306
+ focus: "series"
307
+ },
308
+ data: [150, 232, 201, 154, 190]
309
+ }
310
+ ]
311
+ },
312
+ bar: {
313
+ backgroundColor: "#fff",
314
+ title: {
315
+ text: "Title Bar"
316
+ },
317
+ tooltip: {
318
+ trigger: "axis",
319
+ axisPointer: {
320
+ type: "shadow"
321
+ }
322
+ },
323
+ legend: {
324
+ top: "8%"
325
+ },
326
+ grid: {
327
+ left: "3%",
328
+ right: "9%",
329
+ top: "20%",
330
+ bottom: "3%",
331
+ containLabel: !0
332
+ },
333
+ xAxis: {
334
+ name: "天",
335
+ type: "category",
336
+ axisTick: {
337
+ alignWithLabel: !0
338
+ },
339
+ data: ["2012", "2013", "2014", "2015", "2016"]
340
+ },
341
+ yAxis: {
342
+ name: "值",
343
+ type: "value"
344
+ },
345
+ dataZoom: [
346
+ {
347
+ type: "inside",
348
+ start: 0,
349
+ end: 100
350
+ }
351
+ ],
352
+ series: [
353
+ {
354
+ name: "Forest",
355
+ type: "bar",
356
+ barGap: 0,
357
+ emphasis: {
358
+ focus: "series"
359
+ },
360
+ data: [320, 332, 301, 334, 390]
361
+ },
362
+ {
363
+ name: "Steppe",
364
+ type: "bar",
365
+ emphasis: {
366
+ focus: "series"
367
+ },
368
+ data: [220, 182, 191, 234, 290]
369
+ },
370
+ {
371
+ name: "Desert",
372
+ type: "bar",
373
+ emphasis: {
374
+ focus: "series"
375
+ },
376
+ data: [150, 232, 201, 154, 190]
377
+ }
378
+ ]
379
+ },
380
+ pie: {
381
+ backgroundColor: "#fff",
382
+ title: {
383
+ text: "Title Pie"
384
+ },
385
+ tooltip: {
386
+ trigger: "item"
387
+ },
388
+ legend: {
389
+ top: "8%"
390
+ },
391
+ xAxis: {
392
+ show: !1
393
+ },
394
+ yAxis: {
395
+ show: !1
396
+ },
397
+ series: [
398
+ {
399
+ name: "Access From",
400
+ type: "pie",
401
+ radius: "50%",
402
+ top: "10%",
403
+ data: [
404
+ { value: 1048, name: "Search" },
405
+ { value: 735, name: "Direct" },
406
+ { value: 580, name: "Email" },
407
+ { value: 484, name: "Union" },
408
+ { value: 300, name: "Video" }
409
+ ],
410
+ labelLine: {
411
+ show: !0
412
+ },
413
+ emphasis: {
414
+ itemStyle: {
415
+ shadowBlur: 10,
416
+ shadowOffsetX: 0,
417
+ shadowColor: "rgba(0, 0, 0, 0.5)"
418
+ }
419
+ }
420
+ }
421
+ ]
422
+ },
423
+ scatter: {
424
+ backgroundColor: "#fff",
425
+ title: {
426
+ text: "Title Scatter"
427
+ },
428
+ tooltip: {},
429
+ legend: {
430
+ top: "8%",
431
+ data: ["1990", "2015"]
432
+ },
433
+ grid: {
434
+ left: "5%",
435
+ right: "5%",
436
+ top: "20%",
437
+ bottom: "3%",
438
+ containLabel: !0
439
+ },
440
+ xAxis: {
441
+ splitLine: {
442
+ lineStyle: {
443
+ type: "dashed"
444
+ }
445
+ }
446
+ },
447
+ yAxis: {
448
+ splitLine: {
449
+ lineStyle: {
450
+ type: "dashed"
451
+ }
452
+ },
453
+ scale: !0
454
+ },
455
+ dataZoom: [
456
+ {
457
+ type: "inside",
458
+ start: 0,
459
+ end: 100
460
+ }
461
+ ],
462
+ series: [
463
+ {
464
+ name: "1990",
465
+ data: [
466
+ [1516, 68],
467
+ [13670, 74.7],
468
+ [28599, 75],
469
+ [29476, 77.1],
470
+ [31476, 75.4],
471
+ [28666, 78.1],
472
+ [1777, 57.7],
473
+ [29550, 79.1],
474
+ [2076, 67.9],
475
+ [12087, 72],
476
+ [24021, 75.4],
477
+ [43296, 76.8],
478
+ [10088, 70.8],
479
+ [19349, 69.6],
480
+ [10670, 67.3],
481
+ [26424, 75.7],
482
+ [37062, 75.4]
483
+ ],
484
+ type: "scatter",
485
+ symbolSize: 20,
486
+ emphasis: {
487
+ focus: "series",
488
+ label: {
489
+ show: !0,
490
+ position: "top"
491
+ }
492
+ },
493
+ itemStyle: {
494
+ shadowBlur: 10,
495
+ shadowColor: "rgba(0, 0, 0, 0.2)",
496
+ shadowOffsetY: 5
497
+ }
498
+ },
499
+ {
500
+ name: "2015",
501
+ data: [
502
+ [13334, 76.9],
503
+ [21291, 78.5],
504
+ [38923, 80.8],
505
+ [37599, 81.9],
506
+ [44053, 81.1],
507
+ [42182, 82.8],
508
+ [5903, 66.8],
509
+ [36162, 83.5],
510
+ [1390, 71.4],
511
+ [34644, 80.7],
512
+ [34186, 80.6],
513
+ [64304, 81.6],
514
+ [24787, 77.3],
515
+ [23038, 73.13],
516
+ [19360, 76.5],
517
+ [38225, 81.4],
518
+ [53354, 79.1]
519
+ ],
520
+ type: "scatter",
521
+ symbolSize: 20,
522
+ emphasis: {
523
+ focus: "series",
524
+ label: {
525
+ show: !0,
526
+ position: "top"
527
+ }
528
+ },
529
+ itemStyle: {
530
+ shadowBlur: 10,
531
+ shadowColor: "rgba(0, 0, 0, 0.2)",
532
+ shadowOffsetY: 5
533
+ }
534
+ }
535
+ ]
536
+ },
537
+ radar: {
538
+ backgroundColor: "#fff",
539
+ title: {
540
+ text: "Title Radar"
541
+ },
542
+ tooltip: {
543
+ trigger: "axis"
544
+ },
545
+ legend: {
546
+ top: "8%",
547
+ data: ["Budget", "Spending"]
548
+ },
549
+ radar: {
550
+ indicator: [{ name: "Sales" }, { name: "Administration" }, { name: "Technology" }, { name: "Customer" }, { name: "Development" }, { name: "Marketing" }],
551
+ radius: 80
552
+ },
553
+ series: [
554
+ {
555
+ name: "Radar",
556
+ type: "radar",
557
+ tooltip: {
558
+ trigger: "item"
559
+ },
560
+ areaStyle: {},
561
+ data: [
562
+ {
563
+ value: [4200, 3e3, 2e4, 35e3, 5e4, 18e3],
564
+ name: "Budget"
565
+ },
566
+ {
567
+ value: [5e3, 14e3, 28e3, 26e3, 42e3, 21e3],
568
+ name: "Spending"
569
+ }
570
+ ]
571
+ }
572
+ ]
573
+ },
574
+ treemap: {
575
+ backgroundColor: "#fff",
576
+ title: {
577
+ show: !1
578
+ },
579
+ legend: {
580
+ show: !1
581
+ },
582
+ grid: {
583
+ left: "0px",
584
+ right: "0px",
585
+ top: "0px",
586
+ bottom: "0px"
587
+ },
588
+ series: [
589
+ {
590
+ type: "treemap",
591
+ label: {
592
+ fontSize: 50
593
+ },
594
+ width: "100%",
595
+ height: "100%",
596
+ breadcrumb: {
597
+ show: !1
598
+ },
599
+ data: [
600
+ {
601
+ name: "标签",
602
+ value: 20
603
+ }
604
+ ],
605
+ symbol: "none",
606
+ areaStyle: null
607
+ }
608
+ ]
609
+ },
610
+ label: {
611
+ backgroundColor: "#fff",
612
+ title: {
613
+ show: !1
614
+ },
615
+ legend: {
616
+ show: !1
617
+ },
618
+ grid: {
619
+ left: "0px",
620
+ right: "0px",
621
+ top: "0px",
622
+ bottom: "0px"
623
+ },
624
+ xAxis: {
625
+ show: !1,
626
+ type: "category",
627
+ data: []
628
+ },
629
+ yAxis: {
630
+ show: !1,
631
+ type: "category",
632
+ data: []
633
+ },
634
+ series: [
635
+ {
636
+ type: "custom",
637
+ renderItem: ie,
638
+ data: [
639
+ [20, "标签1:20"],
640
+ [35, "标签2: 35"],
641
+ [15, "标签3: 15"]
642
+ ]
643
+ }
644
+ ]
645
+ }
646
+ }, ye = {
647
+ type: "chart",
648
+ data: {
649
+ source: []
650
+ },
651
+ xAisData: "",
652
+ yAisData: "",
653
+ name: "",
654
+ icon: "",
655
+ id: "",
656
+ left: 0,
657
+ top: 0,
658
+ smooth: !1,
659
+ symbol: "",
660
+ showLabel: !1,
661
+ areaStyle: "",
662
+ labelColor: "",
663
+ labelPosition: "",
664
+ radius: !1,
665
+ widthUnit: "px",
666
+ width: 600,
667
+ heightUnit: "px",
668
+ height: 400,
669
+ isSuspend: !1,
670
+ zIndex: 0,
671
+ option: void 0,
672
+ seriesData: "",
673
+ groupBy: !1,
674
+ orderBy: "NONE",
675
+ cutLength: 5
676
+ }, K = {
677
+ id: "",
678
+ type: "report",
679
+ config: [],
680
+ widthType: "px",
681
+ width: 600,
682
+ fullHeight: !1,
683
+ height: 400,
684
+ seriesEnable: !0,
685
+ seriesHeadText: "#",
686
+ frozen: {
687
+ rowCount: 0,
688
+ colCount: 0,
689
+ trailingColCount: 0,
690
+ trailingRowCount: 0
691
+ },
692
+ params: [],
693
+ theme: "blue",
694
+ data: {
695
+ source: [],
696
+ pagination: !0,
697
+ pageSize: 10,
698
+ processData: ""
699
+ },
700
+ rowConfig: [],
701
+ colConfig: []
702
+ }, Me = (e, i) => {
703
+ let { option: s } = e, { xDataId: f } = s, o, b;
704
+ if (f.length === 3 ? (i && i[f[0]] && (o = i[f[0]][f[1]]), b = f[2]) : (o = i[f[0]], b = f[1]), !o)
705
+ return s;
706
+ let m = [];
707
+ if (e.groupBy) {
708
+ let h = /* @__PURE__ */ new Set();
709
+ o.forEach((x) => {
710
+ h.add(x[b]);
711
+ }), m = [...h];
712
+ } else
713
+ m = o.map((h) => h[b]);
714
+ return e.type == "rowBar" ? s.yAxis.data = m : ["line", "bar"].includes(e.type) ? s.xAxis.data = m : e.type == "radar" && (s.radar.indicator = m), s;
715
+ }, Ae = (e, i) => {
716
+ let { option: s } = e, { yDataId: f } = s, o = [], b = "";
717
+ if (s.xDataId && (s.xDataId.length === 3 ? (i && i[s.xDataId[0]] && (o = i[s.xDataId[0]][s.xDataId[1]]), b = s.xDataId[2]) : (o = i[s.xDataId[0]], b = s.xDataId[1])), o)
718
+ if (e.groupBy) {
719
+ let m = /* @__PURE__ */ new Set();
720
+ o.forEach((h) => {
721
+ m.add(h[b]);
722
+ }), o = [...m];
723
+ } else
724
+ o = o.map((m) => m[b]);
725
+ if (e.type == "radar") {
726
+ s.series[0].data = [];
727
+ for (let m of f) {
728
+ let h, x;
729
+ m.length === 3 ? (i[m[0]] && (h = i[m[0]][m[1]]), x = m[2]) : (h = i[m[0]], x = m[1]);
730
+ let c = [];
731
+ if (e.groupBy && o) {
732
+ let y = {};
733
+ h.forEach(($) => {
734
+ let w = $[b], a = $[x];
735
+ w && !isNaN(a) && (y[w] || (y[w] = 0), y[w] = a);
736
+ }), c = o.map(($) => y[$]);
737
+ } else
738
+ c = h.map((y) => y[x]);
739
+ e.orderBy && e.orderBy !== "NONE" && (c = c.sort((y, $) => e.orderBy === "ASC" ? y - $ : $ - y), !isNaN(e.cutLength) && e.cutLength > 0 && (c = c.slice(0, e.cutLength))), s.series[0].data.push({
740
+ value: c
741
+ });
742
+ }
743
+ } else if (e.type == "treemap") {
744
+ if (f && f.length) {
745
+ let [m, h] = f[0];
746
+ if (i[m][0]) {
747
+ let x = i[m][0][h];
748
+ if (x) {
749
+ let c = s.series[0].data[0].name.split(":")[0];
750
+ s.series[0].data[0].name = `${c}:${x}`;
751
+ }
752
+ }
753
+ }
754
+ } else {
755
+ let m = q(s.series);
756
+ f.length && (s.series = []);
757
+ for (let h = 0; h < f.length; h++) {
758
+ let x = f[h], c, y;
759
+ x.length === 3 ? (i[x[0]] && (c = i[x[0]][x[1]]), y = x[2]) : (c = i[x[0]], y = x[1]);
760
+ let $ = q(m[0]);
761
+ $.data = [];
762
+ let w = [];
763
+ if (c && b && o) {
764
+ switch (e.type) {
765
+ case "line":
766
+ case "rowBar":
767
+ case "bar":
768
+ if (e.groupBy) {
769
+ let a = {};
770
+ c.forEach((u) => {
771
+ let v = u[b], N = u[y];
772
+ v && !isNaN(N) && (a[v] || (a[v] = 0), a[v] = N);
773
+ }), w = o.map((u) => a[u]);
774
+ } else
775
+ w = c.map((a) => a[y]);
776
+ e.orderBy && e.orderBy !== "NONE" && (w = w.sort((a, u) => e.orderBy === "ASC" ? a - u : u - a), !isNaN(e.cutLength) && e.cutLength > 0 && (w = w.slice(0, e.cutLength)));
777
+ break;
778
+ case "pie":
779
+ if (e.groupBy) {
780
+ let a = {};
781
+ c.forEach((u) => {
782
+ let v = u[b], N = u[y];
783
+ v && !isNaN(N) && (a[v] || (a[v] = 0), a[v] = N);
784
+ }), w = o.map((u) => ({ value: a[u], name: u }));
785
+ } else
786
+ w = c.map((a) => ({ value: a[y], name: a[b] }));
787
+ e.orderBy && e.orderBy !== "NONE" && (w = w.sort((a, u) => e.orderBy === "ASC" ? a - u : u - a), !isNaN(e.cutLength) && e.cutLength > 0 && (w = w.slice(0, e.cutLength)));
788
+ break;
789
+ case "scatter":
790
+ if (e.groupBy) {
791
+ let a = {};
792
+ c.forEach((u) => {
793
+ let v = u[b], N = u[y];
794
+ v && !isNaN(N) && (a[v] || (a[v] = 0), a[v] = N);
795
+ }), w = o.map((u) => [u, a[u]]);
796
+ } else
797
+ w = c.map((a) => [a[b], a[y]]);
798
+ e.orderBy && e.orderBy !== "NONE" && (w = w.sort((a, u) => e.orderBy === "ASC" ? a - u : u - a), !isNaN(e.cutLength) && e.cutLength > 0 && (w = w.slice(0, e.cutLength)));
799
+ break;
800
+ case "label":
801
+ if (e.groupBy) {
802
+ let a = {};
803
+ c.forEach((u) => {
804
+ let v = u[b], N = u[y];
805
+ v && !isNaN(N) && (a[v] || (a[v] = 0), a[v] = N);
806
+ }), w = o.map((u) => {
807
+ const v = u ? u.split("").map((N) => N.charCodeAt()) : [];
808
+ return [a[u], v];
809
+ });
810
+ } else
811
+ w = c.map((a) => {
812
+ const u = a[b] ? a[b].split("").map((v) => v.charCodeAt()) : [];
813
+ return [a[y], u];
814
+ });
815
+ e.orderBy && e.orderBy !== "NONE" && (w = w.sort((a, u) => e.orderBy === "ASC" ? a - u : u - a), !isNaN(e.cutLength) && e.cutLength > 0 && (w = w.slice(0, e.cutLength))), $.renderItem = ie;
816
+ break;
817
+ }
818
+ $.data = w;
819
+ }
820
+ s.series.push($);
821
+ }
822
+ }
823
+ return s;
824
+ };
825
+ function Ne(e) {
826
+ if (e === "report")
827
+ return re(K);
828
+ {
829
+ let i = q(ye);
830
+ return i.id = `${e}-${Date.now()}`, i.type = e, i.option = me[e], i;
831
+ }
832
+ }
833
+ const Ie = ne;
834
+ function Se(e) {
835
+ return X.request({
836
+ url: "sysReport/list",
837
+ method: "post",
838
+ type: "json",
839
+ data: e
840
+ });
841
+ }
842
+ function Be(e) {
843
+ return X.request({
844
+ url: "sysReport/config",
845
+ method: "post",
846
+ params: {
847
+ id: e
848
+ }
849
+ }).then((i) => {
850
+ let s = JSON.parse(i.data.info), { id: f, name: o, code: b, description: m, config: h, chartConfig: x } = s, c = [];
851
+ if (h && (h = JSON.parse(h), Array.isArray(h) && h.length)) {
852
+ if (h[0].type === "tableSheet")
853
+ throw ce.error("当前报表版本不支持老版本数据,请等待老版本数据转换工具上线"), de().back(), new Error("当前报表版本不支持老版本数据,请等待老版本数据转换工具上线");
854
+ h = h.map((y) => (pe.value.includes(y.type) || (y.type = "report"), y)), c = c.concat(h);
855
+ }
856
+ return x && (x = JSON.parse(x), Array.isArray(x) && (x.forEach((y) => {
857
+ y.data || (y.data = { source: [] });
858
+ }), c = c.concat(x))), Promise.resolve({
859
+ id: f,
860
+ name: o,
861
+ code: b,
862
+ description: m,
863
+ remoteOptions: c
864
+ });
865
+ });
866
+ }
867
+ function Re(e) {
868
+ return X.request({
869
+ url: "sysReport/save",
870
+ method: "post",
871
+ type: "json",
872
+ data: e
873
+ });
874
+ }
875
+ function Te(e) {
876
+ return X.request({
877
+ url: "sysReport/delete",
878
+ method: "post",
879
+ type: "form",
880
+ data: { id: e }
881
+ });
882
+ }
883
+ function je(e) {
884
+ if (navigator.clipboard && window.isSecureContext)
885
+ return navigator.clipboard.writeText(e), Promise.resolve();
886
+ {
887
+ let i = document.createElement("textarea");
888
+ i.value = e, i.style.position = "absolute", i.style.opacity = "0", i.style.left = "-200%", i.style.top = "-200%", document.body.appendChild(i), i.focus(), i.select();
889
+ let s = document.execCommand("copy");
890
+ return i.remove(), s ? Promise.resolve() : Promise.reject(new Error("copy error"));
891
+ }
892
+ }
893
+ function _e(e, i = "date") {
894
+ let s = "ElInput", f = "筛选", o = "";
895
+ switch (e) {
896
+ case "STRING":
897
+ s = "ElInput", f = "筛选", o = "text";
898
+ break;
899
+ case "LIST":
900
+ s = "ElSelect", f = "请选择";
901
+ break;
902
+ case "TABLE":
903
+ s = "ElSelect", f = "请选择";
904
+ break;
905
+ case "TREE":
906
+ s = "ElTreeSelect", f = "请选择";
907
+ break;
908
+ case "EDITOR":
909
+ s = "ElInput", f = "筛选", o = "textarea";
910
+ break;
911
+ case "BOOL":
912
+ s = "ElSwitch", f = "请选择";
913
+ break;
914
+ case "LONG":
915
+ s = "ElInputNumber", f = "筛选";
916
+ break;
917
+ case "PLONG":
918
+ s = "ElInputNumber", f = "筛选";
919
+ break;
920
+ case "DOUBLE":
921
+ s = "ElInputNumber", f = "筛选";
922
+ break;
923
+ case "DATE":
924
+ s = "ElDatePicker", f = "请选择", o = i;
925
+ break;
926
+ case "DATETIME":
927
+ s = "ElDatePicker", f = "请选择", o = i;
928
+ break;
929
+ case "TIME":
930
+ s = "ElTimePicker", f = "请选择", o = "time";
931
+ break;
932
+ case "TEXT":
933
+ s = "ElInput", f = "筛选", o = "text";
934
+ break;
935
+ case "COLOR":
936
+ s = "ElColorPicker", f = "请选择";
937
+ break;
938
+ default:
939
+ s = "ElInput", f = "筛选", o = "text";
940
+ break;
941
+ }
942
+ return { componentName: s, placeholerPrefix: f, type: o };
943
+ }
944
+ var be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
945
+ function xe(e) {
946
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
947
+ }
948
+ var se = { exports: {} };
949
+ (function(e, i) {
950
+ (function(s, f) {
951
+ e.exports = f();
952
+ })(be, function() {
953
+ var s = 1e3, f = 6e4, o = 36e5, b = "millisecond", m = "second", h = "minute", x = "hour", c = "day", y = "week", $ = "month", w = "quarter", a = "year", u = "date", v = "Invalid Date", N = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ae = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, oe = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(d) {
954
+ var n = ["th", "st", "nd", "rd"], t = d % 100;
955
+ return "[" + d + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
956
+ } }, F = function(d, n, t) {
957
+ var l = String(d);
958
+ return !l || l.length >= n ? d : "" + Array(n + 1 - l.length).join(t) + d;
959
+ }, le = { s: F, z: function(d) {
960
+ var n = -d.utcOffset(), t = Math.abs(n), l = Math.floor(t / 60), r = t % 60;
961
+ return (n <= 0 ? "+" : "-") + F(l, 2, "0") + ":" + F(r, 2, "0");
962
+ }, m: function d(n, t) {
963
+ if (n.date() < t.date())
964
+ return -d(t, n);
965
+ var l = 12 * (t.year() - n.year()) + (t.month() - n.month()), r = n.clone().add(l, $), p = t - r < 0, g = n.clone().add(l + (p ? -1 : 1), $);
966
+ return +(-(l + (t - r) / (p ? r - g : g - r)) || 0);
967
+ }, a: function(d) {
968
+ return d < 0 ? Math.ceil(d) || 0 : Math.floor(d);
969
+ }, p: function(d) {
970
+ return { M: $, y: a, w: y, d: c, D: u, h: x, m: h, s: m, ms: b, Q: w }[d] || String(d || "").toLowerCase().replace(/s$/, "");
971
+ }, u: function(d) {
972
+ return d === void 0;
973
+ } }, W = "en", T = {};
974
+ T[W] = oe;
975
+ var D = "$isDayjsObject", Z = function(d) {
976
+ return d instanceof U || !(!d || !d[D]);
977
+ }, Y = function d(n, t, l) {
978
+ var r;
979
+ if (!n)
980
+ return W;
981
+ if (typeof n == "string") {
982
+ var p = n.toLowerCase();
983
+ T[p] && (r = p), t && (T[p] = t, r = p);
984
+ var g = n.split("-");
985
+ if (!r && g.length > 1)
986
+ return d(g[0]);
987
+ } else {
988
+ var E = n.name;
989
+ T[E] = n, r = E;
990
+ }
991
+ return !l && r && (W = r), r || !l && W;
992
+ }, k = function(d, n) {
993
+ if (Z(d))
994
+ return d.clone();
995
+ var t = typeof n == "object" ? n : {};
996
+ return t.date = d, t.args = arguments, new U(t);
997
+ }, O = le;
998
+ O.l = Y, O.i = Z, O.w = function(d, n) {
999
+ return k(d, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
1000
+ };
1001
+ var U = function() {
1002
+ function d(t) {
1003
+ this.$L = Y(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[D] = !0;
1004
+ }
1005
+ var n = d.prototype;
1006
+ return n.parse = function(t) {
1007
+ this.$d = function(l) {
1008
+ var r = l.date, p = l.utc;
1009
+ if (r === null)
1010
+ return /* @__PURE__ */ new Date(NaN);
1011
+ if (O.u(r))
1012
+ return /* @__PURE__ */ new Date();
1013
+ if (r instanceof Date)
1014
+ return new Date(r);
1015
+ if (typeof r == "string" && !/Z$/i.test(r)) {
1016
+ var g = r.match(N);
1017
+ if (g) {
1018
+ var E = g[2] - 1 || 0, L = (g[7] || "0").substring(0, 3);
1019
+ return p ? new Date(Date.UTC(g[1], E, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, L)) : new Date(g[1], E, g[3] || 1, g[4] || 0, g[5] || 0, g[6] || 0, L);
1020
+ }
1021
+ }
1022
+ return new Date(r);
1023
+ }(t), this.init();
1024
+ }, n.init = function() {
1025
+ var t = this.$d;
1026
+ this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
1027
+ }, n.$utils = function() {
1028
+ return O;
1029
+ }, n.isValid = function() {
1030
+ return this.$d.toString() !== v;
1031
+ }, n.isSame = function(t, l) {
1032
+ var r = k(t);
1033
+ return this.startOf(l) <= r && r <= this.endOf(l);
1034
+ }, n.isAfter = function(t, l) {
1035
+ return k(t) < this.startOf(l);
1036
+ }, n.isBefore = function(t, l) {
1037
+ return this.endOf(l) < k(t);
1038
+ }, n.$g = function(t, l, r) {
1039
+ return O.u(t) ? this[l] : this.set(r, t);
1040
+ }, n.unix = function() {
1041
+ return Math.floor(this.valueOf() / 1e3);
1042
+ }, n.valueOf = function() {
1043
+ return this.$d.getTime();
1044
+ }, n.startOf = function(t, l) {
1045
+ var r = this, p = !!O.u(l) || l, g = O.p(t), E = function(_, I) {
1046
+ var R = O.w(r.$u ? Date.UTC(r.$y, I, _) : new Date(r.$y, I, _), r);
1047
+ return p ? R : R.endOf(c);
1048
+ }, L = function(_, I) {
1049
+ return O.w(r.toDate()[_].apply(r.toDate("s"), (p ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(I)), r);
1050
+ }, M = this.$W, A = this.$M, S = this.$D, P = "set" + (this.$u ? "UTC" : "");
1051
+ switch (g) {
1052
+ case a:
1053
+ return p ? E(1, 0) : E(31, 11);
1054
+ case $:
1055
+ return p ? E(1, A) : E(0, A + 1);
1056
+ case y:
1057
+ var j = this.$locale().weekStart || 0, H = (M < j ? M + 7 : M) - j;
1058
+ return E(p ? S - H : S + (6 - H), A);
1059
+ case c:
1060
+ case u:
1061
+ return L(P + "Hours", 0);
1062
+ case x:
1063
+ return L(P + "Minutes", 1);
1064
+ case h:
1065
+ return L(P + "Seconds", 2);
1066
+ case m:
1067
+ return L(P + "Milliseconds", 3);
1068
+ default:
1069
+ return this.clone();
1070
+ }
1071
+ }, n.endOf = function(t) {
1072
+ return this.startOf(t, !1);
1073
+ }, n.$set = function(t, l) {
1074
+ var r, p = O.p(t), g = "set" + (this.$u ? "UTC" : ""), E = (r = {}, r[c] = g + "Date", r[u] = g + "Date", r[$] = g + "Month", r[a] = g + "FullYear", r[x] = g + "Hours", r[h] = g + "Minutes", r[m] = g + "Seconds", r[b] = g + "Milliseconds", r)[p], L = p === c ? this.$D + (l - this.$W) : l;
1075
+ if (p === $ || p === a) {
1076
+ var M = this.clone().set(u, 1);
1077
+ M.$d[E](L), M.init(), this.$d = M.set(u, Math.min(this.$D, M.daysInMonth())).$d;
1078
+ } else
1079
+ E && this.$d[E](L);
1080
+ return this.init(), this;
1081
+ }, n.set = function(t, l) {
1082
+ return this.clone().$set(t, l);
1083
+ }, n.get = function(t) {
1084
+ return this[O.p(t)]();
1085
+ }, n.add = function(t, l) {
1086
+ var r, p = this;
1087
+ t = Number(t);
1088
+ var g = O.p(l), E = function(A) {
1089
+ var S = k(p);
1090
+ return O.w(S.date(S.date() + Math.round(A * t)), p);
1091
+ };
1092
+ if (g === $)
1093
+ return this.set($, this.$M + t);
1094
+ if (g === a)
1095
+ return this.set(a, this.$y + t);
1096
+ if (g === c)
1097
+ return E(1);
1098
+ if (g === y)
1099
+ return E(7);
1100
+ var L = (r = {}, r[h] = f, r[x] = o, r[m] = s, r)[g] || 1, M = this.$d.getTime() + t * L;
1101
+ return O.w(M, this);
1102
+ }, n.subtract = function(t, l) {
1103
+ return this.add(-1 * t, l);
1104
+ }, n.format = function(t) {
1105
+ var l = this, r = this.$locale();
1106
+ if (!this.isValid())
1107
+ return r.invalidDate || v;
1108
+ var p = t || "YYYY-MM-DDTHH:mm:ssZ", g = O.z(this), E = this.$H, L = this.$m, M = this.$M, A = r.weekdays, S = r.months, P = r.meridiem, j = function(I, R, G, z) {
1109
+ return I && (I[R] || I(l, p)) || G[R].slice(0, z);
1110
+ }, H = function(I) {
1111
+ return O.s(E % 12 || 12, I, "0");
1112
+ }, _ = P || function(I, R, G) {
1113
+ var z = I < 12 ? "AM" : "PM";
1114
+ return G ? z.toLowerCase() : z;
1115
+ };
1116
+ return p.replace(ae, function(I, R) {
1117
+ return R || function(G) {
1118
+ switch (G) {
1119
+ case "YY":
1120
+ return String(l.$y).slice(-2);
1121
+ case "YYYY":
1122
+ return O.s(l.$y, 4, "0");
1123
+ case "M":
1124
+ return M + 1;
1125
+ case "MM":
1126
+ return O.s(M + 1, 2, "0");
1127
+ case "MMM":
1128
+ return j(r.monthsShort, M, S, 3);
1129
+ case "MMMM":
1130
+ return j(S, M);
1131
+ case "D":
1132
+ return l.$D;
1133
+ case "DD":
1134
+ return O.s(l.$D, 2, "0");
1135
+ case "d":
1136
+ return String(l.$W);
1137
+ case "dd":
1138
+ return j(r.weekdaysMin, l.$W, A, 2);
1139
+ case "ddd":
1140
+ return j(r.weekdaysShort, l.$W, A, 3);
1141
+ case "dddd":
1142
+ return A[l.$W];
1143
+ case "H":
1144
+ return String(E);
1145
+ case "HH":
1146
+ return O.s(E, 2, "0");
1147
+ case "h":
1148
+ return H(1);
1149
+ case "hh":
1150
+ return H(2);
1151
+ case "a":
1152
+ return _(E, L, !0);
1153
+ case "A":
1154
+ return _(E, L, !1);
1155
+ case "m":
1156
+ return String(L);
1157
+ case "mm":
1158
+ return O.s(L, 2, "0");
1159
+ case "s":
1160
+ return String(l.$s);
1161
+ case "ss":
1162
+ return O.s(l.$s, 2, "0");
1163
+ case "SSS":
1164
+ return O.s(l.$ms, 3, "0");
1165
+ case "Z":
1166
+ return g;
1167
+ }
1168
+ return null;
1169
+ }(I) || g.replace(":", "");
1170
+ });
1171
+ }, n.utcOffset = function() {
1172
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1173
+ }, n.diff = function(t, l, r) {
1174
+ var p, g = this, E = O.p(l), L = k(t), M = (L.utcOffset() - this.utcOffset()) * f, A = this - L, S = function() {
1175
+ return O.m(g, L);
1176
+ };
1177
+ switch (E) {
1178
+ case a:
1179
+ p = S() / 12;
1180
+ break;
1181
+ case $:
1182
+ p = S();
1183
+ break;
1184
+ case w:
1185
+ p = S() / 3;
1186
+ break;
1187
+ case y:
1188
+ p = (A - M) / 6048e5;
1189
+ break;
1190
+ case c:
1191
+ p = (A - M) / 864e5;
1192
+ break;
1193
+ case x:
1194
+ p = A / o;
1195
+ break;
1196
+ case h:
1197
+ p = A / f;
1198
+ break;
1199
+ case m:
1200
+ p = A / s;
1201
+ break;
1202
+ default:
1203
+ p = A;
1204
+ }
1205
+ return r ? p : O.a(p);
1206
+ }, n.daysInMonth = function() {
1207
+ return this.endOf($).$D;
1208
+ }, n.$locale = function() {
1209
+ return T[this.$L];
1210
+ }, n.locale = function(t, l) {
1211
+ if (!t)
1212
+ return this.$L;
1213
+ var r = this.clone(), p = Y(t, l, !0);
1214
+ return p && (r.$L = p), r;
1215
+ }, n.clone = function() {
1216
+ return O.w(this.$d, this);
1217
+ }, n.toDate = function() {
1218
+ return new Date(this.valueOf());
1219
+ }, n.toJSON = function() {
1220
+ return this.isValid() ? this.toISOString() : null;
1221
+ }, n.toISOString = function() {
1222
+ return this.$d.toISOString();
1223
+ }, n.toString = function() {
1224
+ return this.$d.toUTCString();
1225
+ }, d;
1226
+ }(), Q = U.prototype;
1227
+ return k.prototype = Q, [["$ms", b], ["$s", m], ["$m", h], ["$H", x], ["$W", c], ["$M", $], ["$y", a], ["$D", u]].forEach(function(d) {
1228
+ Q[d[1]] = function(n) {
1229
+ return this.$g(n, d[0], d[1]);
1230
+ };
1231
+ }), k.extend = function(d, n) {
1232
+ return d.$i || (d(n, U, k), d.$i = !0), k;
1233
+ }, k.locale = Y, k.isDayjs = Z, k.unix = function(d) {
1234
+ return k(1e3 * d);
1235
+ }, k.en = T[W], k.Ls = T, k.p = {}, k;
1236
+ });
1237
+ })(se);
1238
+ var we = se.exports;
1239
+ const Pe = /* @__PURE__ */ xe(we);
1240
+ export {
1241
+ ee as C,
1242
+ he as D,
1243
+ te as F,
1244
+ pe as I,
1245
+ Te as a,
1246
+ Be as b,
1247
+ je as c,
1248
+ Pe as d,
1249
+ _e as e,
1250
+ Ie as f,
1251
+ Se as g,
1252
+ Ne as h,
1253
+ Ae as i,
1254
+ Me as j,
1255
+ we as k,
1256
+ be as l,
1257
+ xe as m,
1258
+ ie as r,
1259
+ Re as s,
1260
+ ke as v
1261
+ };
1262
+ //# sourceMappingURL=dayjs.min-fa6b7d57.mjs.map