yh-report 1.2.21 → 2.0.2
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/StatementDesign-fa7f4a9e.mjs +27564 -0
- package/StatementDesign-fa7f4a9e.mjs.map +1 -0
- package/{StatementDetail-8066afdc.mjs → StatementDetail-b9ae83e7.mjs} +10 -9
- package/StatementDetail-b9ae83e7.mjs.map +1 -0
- package/{StatementList-80f0ada2.mjs → StatementList-d3110f6d.mjs} +79 -84
- package/StatementList-d3110f6d.mjs.map +1 -0
- package/index.es.js +43 -8
- package/index.es.js.map +1 -1
- package/package.json +4 -5
- package/report-run.vue_vue_type_style_index_0_lang-edf7216b.mjs +2281 -0
- package/report-run.vue_vue_type_style_index_0_lang-edf7216b.mjs.map +1 -0
- package/style.css +1 -1
- package/util-53adc03c.mjs +962 -0
- package/util-53adc03c.mjs.map +1 -0
- package/StatementDesign-cb9675c6.mjs +0 -38621
- package/StatementDesign-cb9675c6.mjs.map +0 -1
- package/StatementDetail-8066afdc.mjs.map +0 -1
- package/StatementList-80f0ada2.mjs.map +0 -1
- package/index-02d04dcb.mjs +0 -60611
- package/index-02d04dcb.mjs.map +0 -1
|
@@ -0,0 +1,962 @@
|
|
|
1
|
+
import x from "@/libs/api.request.js";
|
|
2
|
+
import { ref as v, computed as R } from "vue";
|
|
3
|
+
import { cloneDeep as O } from "lodash-es";
|
|
4
|
+
import { ElMessage as S } from "element-plus";
|
|
5
|
+
import { useRouter as P } from "vue-router";
|
|
6
|
+
var N = /* @__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))(N || {}), A = /* @__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))(A || {}), j = /* @__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))(j || {});
|
|
7
|
+
const b = {
|
|
8
|
+
type: N.TEXT,
|
|
9
|
+
format: A.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
|
+
}, L = {
|
|
25
|
+
size: 25,
|
|
26
|
+
data: void 0,
|
|
27
|
+
loop: !1,
|
|
28
|
+
index: 0
|
|
29
|
+
}, E = {
|
|
30
|
+
size: 80,
|
|
31
|
+
data: void 0,
|
|
32
|
+
loop: !1,
|
|
33
|
+
index: 0
|
|
34
|
+
};
|
|
35
|
+
let y = !1;
|
|
36
|
+
function $(e) {
|
|
37
|
+
var i;
|
|
38
|
+
y = !1;
|
|
39
|
+
const t = {
|
|
40
|
+
...e,
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
options: ((i = e.options) == null ? void 0 : i.map((a) => a.type === "report" ? I(a) : a)) || []
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
isComplete: y,
|
|
46
|
+
data: t
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function I(e) {
|
|
50
|
+
Object.keys(w).length !== Object.keys(e).length && (y = !0);
|
|
51
|
+
const t = {
|
|
52
|
+
...w,
|
|
53
|
+
...e,
|
|
54
|
+
id: `report-${Date.now()}`
|
|
55
|
+
};
|
|
56
|
+
t.rowConfig.length === 0 && (y = !0, t.rowConfig = Array.from({ length: 5 }, (r, p) => ({
|
|
57
|
+
size: 25,
|
|
58
|
+
data: void 0,
|
|
59
|
+
loop: !1,
|
|
60
|
+
index: p
|
|
61
|
+
}))), t.colConfig.length === 0 && (y = !0, t.colConfig = Array.from({ length: 10 }, (r, p) => ({
|
|
62
|
+
...E
|
|
63
|
+
})));
|
|
64
|
+
const i = t.rowConfig.length, a = t.colConfig.length;
|
|
65
|
+
return y = t.config.length !== i, t.config = t.config.map((r, p) => (y = r.length !== a, r.slice(0, a).map((d, l) => (y = Object.keys(d).length !== Object.keys(b).length, {
|
|
66
|
+
...b,
|
|
67
|
+
...d,
|
|
68
|
+
row: p,
|
|
69
|
+
col: l
|
|
70
|
+
})).concat(
|
|
71
|
+
Array.from({ length: a - r.length }, (d, l) => ({
|
|
72
|
+
...b,
|
|
73
|
+
row: p,
|
|
74
|
+
col: r.length + l
|
|
75
|
+
// 填充列时,列索引从当前行已有列数开始
|
|
76
|
+
}))
|
|
77
|
+
))).concat(
|
|
78
|
+
Array.from({ length: i - t.config.length }, (r, p) => {
|
|
79
|
+
const d = t.config.length + p;
|
|
80
|
+
return Array(a).fill(0).map((l, g) => ({
|
|
81
|
+
...b,
|
|
82
|
+
row: d,
|
|
83
|
+
col: g
|
|
84
|
+
}));
|
|
85
|
+
})
|
|
86
|
+
), t.rowConfig = t.rowConfig.map((r) => (y = Object.keys(r).length !== Object.keys(L).length, {
|
|
87
|
+
...L,
|
|
88
|
+
...r
|
|
89
|
+
})), t.colConfig = t.colConfig.map((r) => (y = Object.keys(r) !== Object.keys(E), {
|
|
90
|
+
...E,
|
|
91
|
+
...r
|
|
92
|
+
})), t;
|
|
93
|
+
}
|
|
94
|
+
const k = v([
|
|
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
|
+
]), G = R(() => k.value.map((e) => e.type)), T = ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272"], B = (e, t) => {
|
|
141
|
+
const i = e.dataIndex, a = t.value();
|
|
142
|
+
let r = t.value(1);
|
|
143
|
+
Array.isArray(r) && (r = r.map((m) => String.fromCharCode(m)).join(""));
|
|
144
|
+
const p = t.getWidth(), d = t.getHeight(), l = T[i % 6], g = e.dataInsideLength;
|
|
145
|
+
let s = p * 0.01;
|
|
146
|
+
s < 10 && (s = 10), s > 15 && (s = 15);
|
|
147
|
+
let f = d * 0.5;
|
|
148
|
+
f < 60 && (f = 60);
|
|
149
|
+
const u = (p - s * 2 - s * (g - 1)) / g, c = 8, o = s + i * (u + s), n = (t.getHeight() - f) / 2;
|
|
150
|
+
return {
|
|
151
|
+
type: "group",
|
|
152
|
+
children: [
|
|
153
|
+
{
|
|
154
|
+
type: "rect",
|
|
155
|
+
shape: {
|
|
156
|
+
x: o,
|
|
157
|
+
y: n,
|
|
158
|
+
width: u,
|
|
159
|
+
height: f,
|
|
160
|
+
r: c
|
|
161
|
+
},
|
|
162
|
+
style: {
|
|
163
|
+
fill: l,
|
|
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: `${r}
|
|
174
|
+
|
|
175
|
+
${a}`,
|
|
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: [o + u / 2, n + f / 2]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
};
|
|
187
|
+
}, M = {
|
|
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: B,
|
|
638
|
+
data: [
|
|
639
|
+
[20, "标签1:20"],
|
|
640
|
+
[35, "标签2: 35"],
|
|
641
|
+
[15, "标签3: 15"]
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
]
|
|
645
|
+
}
|
|
646
|
+
}, U = {
|
|
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
|
+
}, w = {
|
|
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
|
+
}, _ = (e, t) => {
|
|
703
|
+
let { option: i } = e, { xDataId: a } = i, r, p;
|
|
704
|
+
if (a.length === 3 ? (t && t[a[0]] && (r = t[a[0]][a[1]]), p = a[2]) : (r = t[a[0]], p = a[1]), !r)
|
|
705
|
+
return i;
|
|
706
|
+
let d = [];
|
|
707
|
+
if (e.groupBy) {
|
|
708
|
+
let l = /* @__PURE__ */ new Set();
|
|
709
|
+
r.forEach((g) => {
|
|
710
|
+
l.add(g[p]);
|
|
711
|
+
}), d = [...l];
|
|
712
|
+
} else
|
|
713
|
+
d = r.map((l) => l[p]);
|
|
714
|
+
return e.type == "rowBar" ? i.yAxis.data = d : ["line", "bar"].includes(e.type) ? i.xAxis.data = d : e.type == "radar" && (i.radar.indicator = d), i;
|
|
715
|
+
}, q = (e, t) => {
|
|
716
|
+
let { option: i } = e, { yDataId: a } = i, r = [], p = "";
|
|
717
|
+
if (i.xDataId && (i.xDataId.length === 3 ? (t && t[i.xDataId[0]] && (r = t[i.xDataId[0]][i.xDataId[1]]), p = i.xDataId[2]) : (r = t[i.xDataId[0]], p = i.xDataId[1])), r)
|
|
718
|
+
if (e.groupBy) {
|
|
719
|
+
let d = /* @__PURE__ */ new Set();
|
|
720
|
+
r.forEach((l) => {
|
|
721
|
+
d.add(l[p]);
|
|
722
|
+
}), r = [...d];
|
|
723
|
+
} else
|
|
724
|
+
r = r.map((d) => d[p]);
|
|
725
|
+
if (e.type == "radar") {
|
|
726
|
+
i.series[0].data = [];
|
|
727
|
+
for (let d of a) {
|
|
728
|
+
let l, g;
|
|
729
|
+
d.length === 3 ? (t[d[0]] && (l = t[d[0]][d[1]]), g = d[2]) : (l = t[d[0]], g = d[1]);
|
|
730
|
+
let s = [];
|
|
731
|
+
if (e.groupBy && r) {
|
|
732
|
+
let f = {};
|
|
733
|
+
l.forEach((u) => {
|
|
734
|
+
let c = u[p], o = u[g];
|
|
735
|
+
c && !isNaN(o) && (f[c] || (f[c] = 0), f[c] = o);
|
|
736
|
+
}), s = r.map((u) => f[u]);
|
|
737
|
+
} else
|
|
738
|
+
s = l.map((f) => f[g]);
|
|
739
|
+
e.orderBy && e.orderBy !== "NONE" && (s = s.sort((f, u) => e.orderBy === "ASC" ? f - u : u - f), !isNaN(e.cutLength) && e.cutLength > 0 && (s = s.slice(0, e.cutLength))), i.series[0].data.push({
|
|
740
|
+
value: s
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
} else if (e.type == "treemap") {
|
|
744
|
+
if (a && a.length) {
|
|
745
|
+
let [d, l] = a[0];
|
|
746
|
+
if (t[d][0]) {
|
|
747
|
+
let g = t[d][0][l];
|
|
748
|
+
if (g) {
|
|
749
|
+
let s = i.series[0].data[0].name.split(":")[0];
|
|
750
|
+
i.series[0].data[0].name = `${s}:${g}`;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
} else {
|
|
755
|
+
let d = O(i.series);
|
|
756
|
+
a.length && (i.series = []);
|
|
757
|
+
for (let l = 0; l < a.length; l++) {
|
|
758
|
+
let g = a[l], s, f;
|
|
759
|
+
g.length === 3 ? (t[g[0]] && (s = t[g[0]][g[1]]), f = g[2]) : (s = t[g[0]], f = g[1]);
|
|
760
|
+
let u = O(d[0]);
|
|
761
|
+
u.data = [];
|
|
762
|
+
let c = [];
|
|
763
|
+
if (s && p && r) {
|
|
764
|
+
switch (e.type) {
|
|
765
|
+
case "line":
|
|
766
|
+
case "rowBar":
|
|
767
|
+
case "bar":
|
|
768
|
+
if (e.groupBy) {
|
|
769
|
+
let o = {};
|
|
770
|
+
s.forEach((n) => {
|
|
771
|
+
let m = n[p], h = n[f];
|
|
772
|
+
m && !isNaN(h) && (o[m] || (o[m] = 0), o[m] = h);
|
|
773
|
+
}), c = r.map((n) => o[n]);
|
|
774
|
+
} else
|
|
775
|
+
c = s.map((o) => o[f]);
|
|
776
|
+
e.orderBy && e.orderBy !== "NONE" && (c = c.sort((o, n) => e.orderBy === "ASC" ? o - n : n - o), !isNaN(e.cutLength) && e.cutLength > 0 && (c = c.slice(0, e.cutLength)));
|
|
777
|
+
break;
|
|
778
|
+
case "pie":
|
|
779
|
+
if (e.groupBy) {
|
|
780
|
+
let o = {};
|
|
781
|
+
s.forEach((n) => {
|
|
782
|
+
let m = n[p], h = n[f];
|
|
783
|
+
m && !isNaN(h) && (o[m] || (o[m] = 0), o[m] = h);
|
|
784
|
+
}), c = r.map((n) => ({ value: o[n], name: n }));
|
|
785
|
+
} else
|
|
786
|
+
c = s.map((o) => ({ value: o[f], name: o[p] }));
|
|
787
|
+
e.orderBy && e.orderBy !== "NONE" && (c = c.sort((o, n) => e.orderBy === "ASC" ? o - n : n - o), !isNaN(e.cutLength) && e.cutLength > 0 && (c = c.slice(0, e.cutLength)));
|
|
788
|
+
break;
|
|
789
|
+
case "scatter":
|
|
790
|
+
if (e.groupBy) {
|
|
791
|
+
let o = {};
|
|
792
|
+
s.forEach((n) => {
|
|
793
|
+
let m = n[p], h = n[f];
|
|
794
|
+
m && !isNaN(h) && (o[m] || (o[m] = 0), o[m] = h);
|
|
795
|
+
}), c = r.map((n) => [n, o[n]]);
|
|
796
|
+
} else
|
|
797
|
+
c = s.map((o) => [o[p], o[f]]);
|
|
798
|
+
e.orderBy && e.orderBy !== "NONE" && (c = c.sort((o, n) => e.orderBy === "ASC" ? o - n : n - o), !isNaN(e.cutLength) && e.cutLength > 0 && (c = c.slice(0, e.cutLength)));
|
|
799
|
+
break;
|
|
800
|
+
case "label":
|
|
801
|
+
if (e.groupBy) {
|
|
802
|
+
let o = {};
|
|
803
|
+
s.forEach((n) => {
|
|
804
|
+
let m = n[p], h = n[f];
|
|
805
|
+
m && !isNaN(h) && (o[m] || (o[m] = 0), o[m] = h);
|
|
806
|
+
}), c = r.map((n) => {
|
|
807
|
+
const m = n ? n.split("").map((h) => h.charCodeAt()) : [];
|
|
808
|
+
return [o[n], m];
|
|
809
|
+
});
|
|
810
|
+
} else
|
|
811
|
+
c = s.map((o) => {
|
|
812
|
+
const n = o[p] ? o[p].split("").map((m) => m.charCodeAt()) : [];
|
|
813
|
+
return [o[f], n];
|
|
814
|
+
});
|
|
815
|
+
e.orderBy && e.orderBy !== "NONE" && (c = c.sort((o, n) => e.orderBy === "ASC" ? o - n : n - o), !isNaN(e.cutLength) && e.cutLength > 0 && (c = c.slice(0, e.cutLength))), u.renderItem = B;
|
|
816
|
+
break;
|
|
817
|
+
}
|
|
818
|
+
u.data = c;
|
|
819
|
+
}
|
|
820
|
+
i.series.push(u);
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
return i;
|
|
824
|
+
};
|
|
825
|
+
function K(e) {
|
|
826
|
+
if (e === "report")
|
|
827
|
+
return I(w);
|
|
828
|
+
{
|
|
829
|
+
let t = O(U);
|
|
830
|
+
return t.id = `${e}-${Date.now()}`, t.type = e, t.option = M[e], t;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
const Y = k;
|
|
834
|
+
function Z(e) {
|
|
835
|
+
return x.request({
|
|
836
|
+
url: "sysReport/list",
|
|
837
|
+
method: "post",
|
|
838
|
+
type: "json",
|
|
839
|
+
data: e
|
|
840
|
+
});
|
|
841
|
+
}
|
|
842
|
+
function F(e) {
|
|
843
|
+
return x.request({
|
|
844
|
+
url: "sysReport/config",
|
|
845
|
+
method: "post",
|
|
846
|
+
params: {
|
|
847
|
+
id: e
|
|
848
|
+
}
|
|
849
|
+
}).then((t) => {
|
|
850
|
+
let i = JSON.parse(t.data.info), { id: a, name: r, code: p, description: d, config: l, chartConfig: g } = i, s = [];
|
|
851
|
+
if (l && (l = JSON.parse(l), Array.isArray(l) && l.length)) {
|
|
852
|
+
if (l[0].type === "tableSheet")
|
|
853
|
+
throw S.error("当前报表版本不支持老版本数据,请等待老版本数据转换工具上线"), P().back(), new Error("当前报表版本不支持老版本数据,请等待老版本数据转换工具上线");
|
|
854
|
+
l = l.map((f) => (G.value.includes(f.type) || (f.type = "report"), f)), s = s.concat(l);
|
|
855
|
+
}
|
|
856
|
+
return g && (g = JSON.parse(g), Array.isArray(g) && (g.forEach((f) => {
|
|
857
|
+
f.data || (f.data = { source: [] });
|
|
858
|
+
}), s = s.concat(g))), Promise.resolve({
|
|
859
|
+
id: a,
|
|
860
|
+
name: r,
|
|
861
|
+
code: p,
|
|
862
|
+
description: d,
|
|
863
|
+
remoteOptions: s
|
|
864
|
+
});
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
function J(e) {
|
|
868
|
+
return x.request({
|
|
869
|
+
url: "sysReport/save",
|
|
870
|
+
method: "post",
|
|
871
|
+
type: "json",
|
|
872
|
+
data: e
|
|
873
|
+
});
|
|
874
|
+
}
|
|
875
|
+
function Q(e) {
|
|
876
|
+
return x.request({
|
|
877
|
+
url: "sysReport/delete",
|
|
878
|
+
method: "post",
|
|
879
|
+
type: "form",
|
|
880
|
+
data: { id: e }
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
function C(e) {
|
|
884
|
+
if (navigator.clipboard && window.isSecureContext)
|
|
885
|
+
return navigator.clipboard.writeText(e), Promise.resolve();
|
|
886
|
+
{
|
|
887
|
+
let t = document.createElement("textarea");
|
|
888
|
+
t.value = e, t.style.position = "absolute", t.style.opacity = "0", t.style.left = "-200%", t.style.top = "-200%", document.body.appendChild(t), t.focus(), t.select();
|
|
889
|
+
let i = document.execCommand("copy");
|
|
890
|
+
return t.remove(), i ? Promise.resolve() : Promise.reject(new Error("copy error"));
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
function D(e, t = "date") {
|
|
894
|
+
let i = "ElInput", a = "筛选", r = "";
|
|
895
|
+
switch (e) {
|
|
896
|
+
case "STRING":
|
|
897
|
+
i = "ElInput", a = "筛选", r = "text";
|
|
898
|
+
break;
|
|
899
|
+
case "LIST":
|
|
900
|
+
i = "ElSelect", a = "请选择";
|
|
901
|
+
break;
|
|
902
|
+
case "TABLE":
|
|
903
|
+
i = "ElSelect", a = "请选择";
|
|
904
|
+
break;
|
|
905
|
+
case "TREE":
|
|
906
|
+
i = "ElTreeSelect", a = "请选择";
|
|
907
|
+
break;
|
|
908
|
+
case "EDITOR":
|
|
909
|
+
i = "ElInput", a = "筛选", r = "textarea";
|
|
910
|
+
break;
|
|
911
|
+
case "BOOL":
|
|
912
|
+
i = "ElSwitch", a = "请选择";
|
|
913
|
+
break;
|
|
914
|
+
case "LONG":
|
|
915
|
+
i = "ElInputNumber", a = "筛选";
|
|
916
|
+
break;
|
|
917
|
+
case "PLONG":
|
|
918
|
+
i = "ElInputNumber", a = "筛选";
|
|
919
|
+
break;
|
|
920
|
+
case "DOUBLE":
|
|
921
|
+
i = "ElInputNumber", a = "筛选";
|
|
922
|
+
break;
|
|
923
|
+
case "DATE":
|
|
924
|
+
i = "ElDatePicker", a = "请选择", r = t;
|
|
925
|
+
break;
|
|
926
|
+
case "DATETIME":
|
|
927
|
+
i = "ElDatePicker", a = "请选择", r = t;
|
|
928
|
+
break;
|
|
929
|
+
case "TIME":
|
|
930
|
+
i = "ElTimePicker", a = "请选择", r = "time";
|
|
931
|
+
break;
|
|
932
|
+
case "TEXT":
|
|
933
|
+
i = "ElInput", a = "筛选", r = "text";
|
|
934
|
+
break;
|
|
935
|
+
case "COLOR":
|
|
936
|
+
i = "ElColorPicker", a = "请选择";
|
|
937
|
+
break;
|
|
938
|
+
default:
|
|
939
|
+
i = "ElInput", a = "筛选", r = "text";
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
return { componentName: i, placeholerPrefix: a, type: r };
|
|
943
|
+
}
|
|
944
|
+
export {
|
|
945
|
+
N as C,
|
|
946
|
+
j as D,
|
|
947
|
+
A as F,
|
|
948
|
+
G as I,
|
|
949
|
+
F as a,
|
|
950
|
+
D as b,
|
|
951
|
+
C as c,
|
|
952
|
+
Q as d,
|
|
953
|
+
Y as e,
|
|
954
|
+
K as f,
|
|
955
|
+
Z as g,
|
|
956
|
+
q as h,
|
|
957
|
+
_ as i,
|
|
958
|
+
B as r,
|
|
959
|
+
J as s,
|
|
960
|
+
$ as v
|
|
961
|
+
};
|
|
962
|
+
//# sourceMappingURL=util-53adc03c.mjs.map
|