@topdatasec/report 1.0.12 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/style.css +1 -0
- package/lib/t-report-ui.es.js +2175 -19
- package/lib/t-report-ui.umd.js +2 -1
- package/package.json +8 -9
package/lib/t-report-ui.es.js
CHANGED
|
@@ -1,28 +1,2184 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as k, computed as F, resolveComponent as p, openBlock as d, createElementBlock as h, createElementVNode as C, Fragment as A, renderList as I, normalizeClass as O, createBlock as S, createCommentVNode as R, toDisplayString as W, ref as $, createVNode as a, withCtx as u, onMounted as te, normalizeProps as re, guardReactiveProps as se, isVNode as ie, normalizeStyle as xe, mergeModels as ue, useModel as pe, unref as y, createTextVNode as D, resolveDynamicComponent as Y, isRef as we, withModifiers as Ve, watch as Se, resolveDirective as ke, withDirectives as $e, shallowRef as Te, onBeforeUnmount as Le, onUnmounted as Re, reactive as Ue, TransitionGroup as De } from "vue";
|
|
2
|
+
import { defineStore as Ae, storeToRefs as Ee } from "pinia";
|
|
3
|
+
import { ElMessage as Fe } from "element-plus";
|
|
4
|
+
import { VueDraggable as Ie } from "vue-draggable-plus";
|
|
5
|
+
import { Toolbar as ze, Editor as He } from "@wangeditor/editor-for-vue";
|
|
6
|
+
const B = () => (/* @__PURE__ */ new Date()).getTime().toString(36) + "-" + Math.random().toString(36).substring(2, 9), q = (n) => JSON.parse(JSON.stringify(n)), Me = (n) => n.replace(/-([a-z])/g, (t, e) => e.toUpperCase()).replace(/^[a-z]/, (t) => t.toUpperCase()), H = (n, t) => n[Me(t)], j = window.$http, P = window.$reportURL, je = (n) => j.request({
|
|
7
|
+
url: `${P}/tds/report/demo/get`,
|
|
8
|
+
method: "get",
|
|
9
|
+
params: n,
|
|
10
|
+
isError: !1
|
|
11
|
+
}), de = (n) => j.request({
|
|
12
|
+
url: `${P}/tds/report/item/get`,
|
|
13
|
+
method: "get",
|
|
14
|
+
params: n,
|
|
15
|
+
isError: !1
|
|
16
|
+
}), Pe = (n) => j.request({
|
|
17
|
+
url: `${P}/tds/report/preview`,
|
|
18
|
+
method: "get",
|
|
19
|
+
params: n,
|
|
20
|
+
isError: !1
|
|
21
|
+
}), Be = (n) => j.request({
|
|
22
|
+
url: `${P}/tds/report/add`,
|
|
23
|
+
method: "post",
|
|
24
|
+
data: n
|
|
25
|
+
}), We = (n) => j.request({
|
|
26
|
+
url: `${P}/tds/report/put`,
|
|
27
|
+
method: "put",
|
|
28
|
+
data: n
|
|
29
|
+
}), Ne = (n) => j.request({
|
|
30
|
+
url: `${P}/tds/report/get`,
|
|
31
|
+
method: "get",
|
|
32
|
+
params: n,
|
|
33
|
+
isError: !1
|
|
34
|
+
}), Oe = (n) => j.request({
|
|
35
|
+
url: `${P}/tds/report/filter/get`,
|
|
36
|
+
method: "get",
|
|
37
|
+
params: n,
|
|
38
|
+
isError: !1
|
|
39
|
+
}), Ye = (n) => j.request({
|
|
40
|
+
url: `${P}/tds/report/delete`,
|
|
41
|
+
method: "delete",
|
|
42
|
+
data: n
|
|
43
|
+
}), ce = "rgba(51, 51, 51, 0.15)", M = "rgba(51, 51, 51, 1)", N = 12, me = (n = !1) => {
|
|
44
|
+
const t = {
|
|
45
|
+
// top: '2%',
|
|
46
|
+
left: "3%",
|
|
47
|
+
right: "3%",
|
|
48
|
+
bottom: "2%",
|
|
49
|
+
containLabel: !0
|
|
50
|
+
};
|
|
51
|
+
return n && (t.top = "5%"), t;
|
|
52
|
+
}, U = [
|
|
53
|
+
"46, 145, 255",
|
|
54
|
+
"48, 212, 183",
|
|
55
|
+
"108, 108, 255",
|
|
56
|
+
"109, 237, 124",
|
|
57
|
+
"128, 218, 236",
|
|
58
|
+
"58, 200, 218",
|
|
59
|
+
"146, 218, 89",
|
|
60
|
+
"118, 218, 218",
|
|
61
|
+
"143, 192, 244",
|
|
62
|
+
"192, 192, 145",
|
|
63
|
+
"153, 136, 204",
|
|
64
|
+
"212, 217, 230",
|
|
65
|
+
"124, 186, 255",
|
|
66
|
+
"209, 182, 225",
|
|
67
|
+
"255, 197, 84",
|
|
68
|
+
"249, 140, 106",
|
|
69
|
+
"246, 179, 82",
|
|
70
|
+
"100, 161, 206",
|
|
71
|
+
"246, 175, 159",
|
|
72
|
+
"238, 97, 97"
|
|
73
|
+
], qe = (n, t, e = "", l = { name: "name", value: "value" }) => {
|
|
74
|
+
const r = [], o = [];
|
|
75
|
+
t.forEach((s) => {
|
|
76
|
+
r.push(s[l.name]), o.push(s[l.value]);
|
|
77
|
+
}), n.xAxis[0].data = r, n.series[0].data = o, n.series[0].name = e, n.series[1].data = o, n.series[2].data = o;
|
|
78
|
+
}, oe = (n = [
|
|
79
|
+
{
|
|
80
|
+
name: "数据1",
|
|
81
|
+
value: 63
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "数据2",
|
|
85
|
+
value: 45
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "数据3",
|
|
89
|
+
value: 43
|
|
90
|
+
}
|
|
91
|
+
], t = { name: "name", value: "value" }) => {
|
|
92
|
+
const e = (r = "rgba(46, 145, 255, 0.7)", o = "rgba(46, 145, 255, 0.2)") => ({
|
|
93
|
+
color: {
|
|
94
|
+
type: "linear",
|
|
95
|
+
x: 0,
|
|
96
|
+
y: 0,
|
|
97
|
+
x2: 0,
|
|
98
|
+
y2: 1,
|
|
99
|
+
colorStops: [
|
|
100
|
+
{
|
|
101
|
+
offset: 0,
|
|
102
|
+
color: r
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
offset: 0.8,
|
|
106
|
+
color: o
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
}), l = n.map((r) => r[t.value]);
|
|
111
|
+
return {
|
|
112
|
+
// 提示框组件
|
|
113
|
+
tooltip: {
|
|
114
|
+
trigger: "item"
|
|
115
|
+
//触发类型,axis:坐标轴触发
|
|
116
|
+
},
|
|
117
|
+
// 图例组件
|
|
118
|
+
// legend: {
|
|
119
|
+
// type: 'plain', //plain:普通图例;scroll:可滚动翻页的图例。当图例数量较多时使。
|
|
120
|
+
// show: true,
|
|
121
|
+
// },
|
|
122
|
+
grid: me(),
|
|
123
|
+
title: {
|
|
124
|
+
show: !0,
|
|
125
|
+
text: "样例数据",
|
|
126
|
+
textStyle: {
|
|
127
|
+
color: "#333",
|
|
128
|
+
fontSize: 18
|
|
129
|
+
},
|
|
130
|
+
x: 10,
|
|
131
|
+
y: 10
|
|
132
|
+
},
|
|
133
|
+
// x 轴设置
|
|
134
|
+
xAxis: [
|
|
135
|
+
{
|
|
136
|
+
type: "category",
|
|
137
|
+
nameGap: 8,
|
|
138
|
+
// X轴名称与轴线之间的距离
|
|
139
|
+
nameRotate: 0,
|
|
140
|
+
// 坐标轴名称旋转
|
|
141
|
+
axisLabel: {
|
|
142
|
+
color: M,
|
|
143
|
+
// X轴类目名称样式
|
|
144
|
+
rotate: 0
|
|
145
|
+
// X轴类目名称旋转角度
|
|
146
|
+
},
|
|
147
|
+
axisLine: {
|
|
148
|
+
//X轴轴线设置
|
|
149
|
+
show: !0,
|
|
150
|
+
lineStyle: {
|
|
151
|
+
color: ce,
|
|
152
|
+
width: 1
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
axisTick: { show: !1 },
|
|
156
|
+
// X轴刻度相关设置
|
|
157
|
+
splitLine: { show: !1 },
|
|
158
|
+
// 横向分隔线
|
|
159
|
+
data: n.map((r) => r[t.name])
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
// y轴设置
|
|
163
|
+
yAxis: [
|
|
164
|
+
{
|
|
165
|
+
type: "value",
|
|
166
|
+
min: 0,
|
|
167
|
+
// 坐标轴刻度最小值
|
|
168
|
+
position: "left",
|
|
169
|
+
nameTextStyle: {
|
|
170
|
+
fontSize: N,
|
|
171
|
+
color: M,
|
|
172
|
+
fontWeight: "bold"
|
|
173
|
+
},
|
|
174
|
+
axisLine: { show: !1 },
|
|
175
|
+
// y轴轴线设置
|
|
176
|
+
axisTick: { show: !1 },
|
|
177
|
+
// 刻度设置
|
|
178
|
+
splitLine: { show: !1 },
|
|
179
|
+
// 纵向分隔线
|
|
180
|
+
axisLabel: {
|
|
181
|
+
color: M,
|
|
182
|
+
// y轴刻度标签
|
|
183
|
+
formatter: "{value}",
|
|
184
|
+
inside: !1
|
|
185
|
+
// 刻度标签是否朝内,默认朝外
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
series: [
|
|
190
|
+
{
|
|
191
|
+
type: "bar",
|
|
192
|
+
barWidth: 15,
|
|
193
|
+
barGap: "0%",
|
|
194
|
+
itemStyle: e(`rgba(${U[0]}, 0.7)`, `rgba(${U[0]}, 0.2)`),
|
|
195
|
+
data: l,
|
|
196
|
+
label: {
|
|
197
|
+
show: !0,
|
|
198
|
+
// 显示标签
|
|
199
|
+
position: "top",
|
|
200
|
+
// 标签位置
|
|
201
|
+
color: "inherit",
|
|
202
|
+
// 标签颜色
|
|
203
|
+
lineHeight: 24
|
|
204
|
+
// 行高
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
// 柱底圆片
|
|
209
|
+
name: "",
|
|
210
|
+
type: "pictorialBar",
|
|
211
|
+
symbolSize: [15, 10],
|
|
212
|
+
//调整截面形状
|
|
213
|
+
symbolOffset: [0, 5],
|
|
214
|
+
itemStyle: e(`rgba(${U[0]}, 0.7)`, `rgba(${U[0]}, 0.2)`),
|
|
215
|
+
data: l
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
// 柱顶圆片
|
|
219
|
+
name: "",
|
|
220
|
+
type: "pictorialBar",
|
|
221
|
+
symbolSize: [15, 10],
|
|
222
|
+
//调整截面形状
|
|
223
|
+
symbolOffset: [0, -5],
|
|
224
|
+
symbolPosition: "end",
|
|
225
|
+
itemStyle: e(`rgba(${U[0]}, 0.9)`, `rgba(${U[0]}, 1)`),
|
|
226
|
+
data: l
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
};
|
|
230
|
+
}, Ge = ({ chartOption: n, data: t, props: e = { name: "label", value: "data" } }) => {
|
|
231
|
+
let l = 0;
|
|
232
|
+
const r = t.map((o, s) => (l += Number(o[e.value]), {
|
|
233
|
+
name: o[e.name],
|
|
234
|
+
value: Number(o[e.value])
|
|
235
|
+
}));
|
|
236
|
+
t.length > 0 && (n.legend.data = r, n.series[0].data = r, n.graphic[1].style.text = l);
|
|
237
|
+
}, Je = () => U.map((n) => `rgba(${n}, 1)`), J = ({
|
|
238
|
+
data: n = [
|
|
239
|
+
{
|
|
240
|
+
name: "数据1",
|
|
241
|
+
value: 63
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
name: "数据2",
|
|
245
|
+
value: 45
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
name: "数据3",
|
|
249
|
+
value: 43
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
radiusType: t = 1,
|
|
253
|
+
roseType: e = !1,
|
|
254
|
+
isLegend: l = !0,
|
|
255
|
+
isLine: r = !1,
|
|
256
|
+
center: o = ["50%", "50%"],
|
|
257
|
+
isTitle: s = !0
|
|
258
|
+
}) => {
|
|
259
|
+
const m = {
|
|
260
|
+
color: Je(),
|
|
261
|
+
toolbox: { show: !1 },
|
|
262
|
+
tooltip: {
|
|
263
|
+
trigger: "item",
|
|
264
|
+
show: !0,
|
|
265
|
+
formatter: (i) => {
|
|
266
|
+
const { name: f, value: c } = i;
|
|
267
|
+
return `<div style="color: ${i.color}; font-size: 14px;">${f} </div>
|
|
268
|
+
<div><span style="font-size: 14px; color: #86909c; float: right;">数量:${c}</span></div>`;
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
title: {
|
|
272
|
+
show: s,
|
|
273
|
+
text: "样例数据",
|
|
274
|
+
textStyle: {
|
|
275
|
+
color: "#333",
|
|
276
|
+
fontSize: 18
|
|
277
|
+
},
|
|
278
|
+
x: 10,
|
|
279
|
+
y: 10
|
|
280
|
+
},
|
|
281
|
+
legend: {
|
|
282
|
+
show: l,
|
|
283
|
+
left: "70%",
|
|
284
|
+
formatter: (i) => {
|
|
285
|
+
var c;
|
|
286
|
+
const f = (c = m.series[0]) == null ? void 0 : c.data.find((_) => _.name === i).value;
|
|
287
|
+
return ` ${i} | ${f}`;
|
|
288
|
+
},
|
|
289
|
+
textStyle: {
|
|
290
|
+
fontSize: N,
|
|
291
|
+
color: M
|
|
292
|
+
},
|
|
293
|
+
data: n,
|
|
294
|
+
orient: "vertical",
|
|
295
|
+
itemWidth: 10,
|
|
296
|
+
itemHeight: 10,
|
|
297
|
+
borderRadius: 10,
|
|
298
|
+
x: "left",
|
|
299
|
+
top: "center",
|
|
300
|
+
align: "left",
|
|
301
|
+
itemGap: 15
|
|
302
|
+
},
|
|
303
|
+
series: [
|
|
304
|
+
// 展示层
|
|
305
|
+
{
|
|
306
|
+
type: "pie",
|
|
307
|
+
center: o,
|
|
308
|
+
radius: t === 1 ? e ? ["10%", "65%"] : ["45%", "70%"] : ["0%", "65%"],
|
|
309
|
+
roseType: e,
|
|
310
|
+
itemStyle: {
|
|
311
|
+
borderRadius: 1
|
|
312
|
+
// color: (p: any) => {
|
|
313
|
+
// return {
|
|
314
|
+
// colorStops: [
|
|
315
|
+
// {
|
|
316
|
+
// offset: 0,
|
|
317
|
+
// color: `rgba(${colorRGBValue[p.dataIndex % colorRGBValue.length]}, 0.5)`, // 0% 处的颜色
|
|
318
|
+
// },
|
|
319
|
+
// {
|
|
320
|
+
// offset: 1,
|
|
321
|
+
// color: `rgba(${colorRGBValue[p.dataIndex % colorRGBValue.length]}, 1)`, // 100% 处的颜色
|
|
322
|
+
// },
|
|
323
|
+
// ],
|
|
324
|
+
// }
|
|
325
|
+
// },
|
|
326
|
+
},
|
|
327
|
+
label: {
|
|
328
|
+
show: r,
|
|
329
|
+
position: "outside",
|
|
330
|
+
alignTo: "labelLine",
|
|
331
|
+
backgroundColor: "#fff",
|
|
332
|
+
height: 0,
|
|
333
|
+
width: 0,
|
|
334
|
+
lineHeight: 0,
|
|
335
|
+
distanceToLabelLine: 0,
|
|
336
|
+
borderRadius: 3,
|
|
337
|
+
borderWidth: 1,
|
|
338
|
+
borderColor: "inherit",
|
|
339
|
+
padding: [3, -3, 3, -3],
|
|
340
|
+
formatter: function(i) {
|
|
341
|
+
return `{a|${i.name}(${i.value})}`;
|
|
342
|
+
},
|
|
343
|
+
rich: {
|
|
344
|
+
a: {
|
|
345
|
+
padding: [20, -80, 40, -80],
|
|
346
|
+
fontSize: "12px",
|
|
347
|
+
fontFamily: "MicrosoftYaHei",
|
|
348
|
+
color: "#091158"
|
|
349
|
+
},
|
|
350
|
+
b: {
|
|
351
|
+
padding: [0, -80, 55, -80],
|
|
352
|
+
fontSize: "15px",
|
|
353
|
+
fontFamily: "MicrosoftYaHei-Bold, MicrosoftYaHei",
|
|
354
|
+
fontWeight: "bold",
|
|
355
|
+
color: "#001F3D"
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
labelLine: {
|
|
360
|
+
show: !0,
|
|
361
|
+
length: 40,
|
|
362
|
+
length2: 85,
|
|
363
|
+
align: "right",
|
|
364
|
+
lineStyle: {
|
|
365
|
+
width: 1
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
data: n
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
graphic: [
|
|
372
|
+
{
|
|
373
|
+
invisible: !1,
|
|
374
|
+
type: "text",
|
|
375
|
+
left: "center",
|
|
376
|
+
top: "44%",
|
|
377
|
+
style: {
|
|
378
|
+
text: "总量",
|
|
379
|
+
fontSize: 14,
|
|
380
|
+
fill: "#86909c",
|
|
381
|
+
fontWeight: "bold"
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
invisible: !1,
|
|
386
|
+
type: "text",
|
|
387
|
+
left: "center",
|
|
388
|
+
top: "50%",
|
|
389
|
+
style: {
|
|
390
|
+
text: "151",
|
|
391
|
+
fontSize: 18,
|
|
392
|
+
fill: "#86909c",
|
|
393
|
+
fontWeight: "bold"
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
};
|
|
398
|
+
return m;
|
|
399
|
+
}, Ke = (n, t, e = { name: "name", value: "value" }) => {
|
|
400
|
+
n.xAxis.data = t.map((l) => l[e.name]), Array.isArray(e.value) ? e.value.forEach((l, r) => {
|
|
401
|
+
n.series[r].data = t.map((o) => o[l.value]);
|
|
402
|
+
}) : typeof e.value == "string" && (n.series[0].data = t.map((l) => l[e.value]));
|
|
403
|
+
}, Qe = () => ({
|
|
404
|
+
name: "",
|
|
405
|
+
type: "line",
|
|
406
|
+
symbol: "circle",
|
|
407
|
+
smooth: !0,
|
|
408
|
+
lineStyle: {
|
|
409
|
+
width: 1,
|
|
410
|
+
color: `rgba(${U[0]}, 1)`
|
|
411
|
+
// 线条颜色
|
|
412
|
+
},
|
|
413
|
+
showSymbol: !1,
|
|
414
|
+
itemStyle: {
|
|
415
|
+
color: `rgba(${U[0]}, 1)`,
|
|
416
|
+
//拐点颜色
|
|
417
|
+
label: {
|
|
418
|
+
show: !0,
|
|
419
|
+
//开启显示
|
|
420
|
+
position: "top",
|
|
421
|
+
//在上方显示
|
|
422
|
+
formatter: function(n) {
|
|
423
|
+
return n.value ? n.value : 0;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
areaStyle: {
|
|
428
|
+
color: {
|
|
429
|
+
type: "linear",
|
|
430
|
+
x: 0,
|
|
431
|
+
y: 0,
|
|
432
|
+
x2: 0,
|
|
433
|
+
y2: 1,
|
|
434
|
+
colorStops: [
|
|
435
|
+
// 渐变颜色
|
|
436
|
+
{
|
|
437
|
+
offset: 0,
|
|
438
|
+
color: `rgba(${U[0]}, 0.7)`
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
offset: 1,
|
|
442
|
+
color: `rgba(${U[0]}, 0.1)`
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
global: !1
|
|
446
|
+
}
|
|
447
|
+
},
|
|
448
|
+
data: []
|
|
449
|
+
}), K = (n = [
|
|
450
|
+
{
|
|
451
|
+
name: "2024-08",
|
|
452
|
+
value: 63
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
name: "2024-09",
|
|
456
|
+
value: 45
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
name: "2024-10",
|
|
460
|
+
value: 43
|
|
461
|
+
}
|
|
462
|
+
], t = { name: "name", value: "value" }) => {
|
|
463
|
+
const e = {
|
|
464
|
+
tooltip: {
|
|
465
|
+
trigger: "axis"
|
|
466
|
+
},
|
|
467
|
+
title: {
|
|
468
|
+
show: !0,
|
|
469
|
+
text: "样例数据",
|
|
470
|
+
textStyle: {
|
|
471
|
+
color: "#333",
|
|
472
|
+
fontSize: 18
|
|
473
|
+
},
|
|
474
|
+
x: 10,
|
|
475
|
+
y: 10
|
|
476
|
+
},
|
|
477
|
+
legend: {
|
|
478
|
+
show: !0,
|
|
479
|
+
itemWidth: 30,
|
|
480
|
+
textStyle: {
|
|
481
|
+
color: M,
|
|
482
|
+
fontSize: N,
|
|
483
|
+
padding: [0, 8, 0, 8]
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
grid: me(),
|
|
487
|
+
xAxis: {
|
|
488
|
+
type: "category",
|
|
489
|
+
splitLine: { show: !1 },
|
|
490
|
+
axisTick: { show: !1 },
|
|
491
|
+
axisLine: {
|
|
492
|
+
show: !0,
|
|
493
|
+
lineStyle: { color: ce }
|
|
494
|
+
},
|
|
495
|
+
axisLabel: {
|
|
496
|
+
show: !0,
|
|
497
|
+
fontSize: N,
|
|
498
|
+
color: M
|
|
499
|
+
},
|
|
500
|
+
boundaryGap: !1,
|
|
501
|
+
data: n.map((o) => o[t.name])
|
|
502
|
+
},
|
|
503
|
+
yAxis: {
|
|
504
|
+
name: "",
|
|
505
|
+
type: "value",
|
|
506
|
+
splitLine: { show: !1 },
|
|
507
|
+
axisLine: { show: !1 },
|
|
508
|
+
axisTick: { show: !1 },
|
|
509
|
+
nameTextStyle: {
|
|
510
|
+
fontSize: N,
|
|
511
|
+
color: M,
|
|
512
|
+
padding: [0, 60, 0, 0]
|
|
513
|
+
},
|
|
514
|
+
axisLabel: {
|
|
515
|
+
show: !0,
|
|
516
|
+
fontSize: N,
|
|
517
|
+
color: M
|
|
518
|
+
}
|
|
519
|
+
},
|
|
520
|
+
series: []
|
|
521
|
+
}, l = Qe(), r = [];
|
|
522
|
+
if (Array.isArray(t.value))
|
|
523
|
+
t.value.forEach((o, s) => {
|
|
524
|
+
const m = q(l);
|
|
525
|
+
m.name = o.name, m.lineStyle.color = `rgba(${U[s]}, 1)`, m.itemStyle.color = `rgba(${U[s]}, 1)`, m.areaStyle.color.colorStops[0].color = `rgba(${U[s]}, 0.7)`, m.areaStyle.color.colorStops[1].color = `rgba(${U[s]}, 0.1)`, m.data = n.map((i) => i[o.value]), r.push(m);
|
|
526
|
+
});
|
|
527
|
+
else if (typeof t.value == "string") {
|
|
528
|
+
const o = q(l);
|
|
529
|
+
o.data = n.map((s) => s[t.value]), r.push(o);
|
|
530
|
+
}
|
|
531
|
+
return e.series = r, e;
|
|
532
|
+
}, le = [
|
|
533
|
+
{ key: "assets", name: "资产名称" },
|
|
534
|
+
{ key: "type", name: "资产类型" },
|
|
535
|
+
{ key: "data", name: "资产数据" }
|
|
536
|
+
], ne = [
|
|
537
|
+
{ assets: "name1", type: "type1", data: "data1" },
|
|
538
|
+
{ assets: "name2", type: "type2", data: "data2" },
|
|
539
|
+
{ assets: "name3", type: "type3", data: "data3" }
|
|
540
|
+
], Q = [
|
|
541
|
+
{ data: [{ name: "默认数据", value: 180 }], label: "name1" },
|
|
542
|
+
{ data: [{ name: "默认数据", value: 311 }], label: "name2" },
|
|
543
|
+
{ data: [{ name: "默认数据", value: 42 }], label: "name3" },
|
|
544
|
+
{ data: [{ name: "默认数据", value: 32391 }], label: "name4" }
|
|
545
|
+
], Xe = [
|
|
546
|
+
{
|
|
547
|
+
data: 63,
|
|
548
|
+
label: "数据1"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
data: 45,
|
|
552
|
+
label: "数据2"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
data: 43,
|
|
556
|
+
label: "数据3"
|
|
557
|
+
}
|
|
558
|
+
], Ze = [
|
|
559
|
+
{
|
|
560
|
+
type: "report-select",
|
|
561
|
+
label: "资产:",
|
|
562
|
+
value: "0",
|
|
563
|
+
data: [
|
|
564
|
+
{
|
|
565
|
+
label: "全部",
|
|
566
|
+
data: "0"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
label: "10.10.2.20_root",
|
|
570
|
+
data: "743dbb32-8a41-4990-9d76-48925b000a93"
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
label: "10.10.4.206_sysdba",
|
|
574
|
+
data: "23193788-c895-47a8-8123-65799540394c"
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
label: "10.10.4.26_root@/root/files/",
|
|
578
|
+
data: "bb7b07c9-b96b-4caf-ac76-bb45ae849844"
|
|
579
|
+
}
|
|
580
|
+
],
|
|
581
|
+
uri: "/da/report/sens/get_asset_all",
|
|
582
|
+
id: B()
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
type: "range-time",
|
|
586
|
+
data: [
|
|
587
|
+
{
|
|
588
|
+
start_time: "2024-08-20 19:49:34",
|
|
589
|
+
end_time: "2024-09-12 19:49:34"
|
|
590
|
+
}
|
|
591
|
+
],
|
|
592
|
+
id: B()
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
type: "h1",
|
|
596
|
+
data: "报表名称",
|
|
597
|
+
options: {
|
|
598
|
+
size: 24,
|
|
599
|
+
color: "rgba(0,0,0,0.85)",
|
|
600
|
+
fontWeight: 500,
|
|
601
|
+
letterSpacing: 0,
|
|
602
|
+
textIndent: 0,
|
|
603
|
+
textAlign: "left"
|
|
604
|
+
},
|
|
605
|
+
id: B()
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
type: "h2",
|
|
609
|
+
data: "一级标题",
|
|
610
|
+
name: "一级标题",
|
|
611
|
+
options: {
|
|
612
|
+
size: 18,
|
|
613
|
+
color: " rgba(0, 0, 0, 0.85)",
|
|
614
|
+
fontWeight: 500,
|
|
615
|
+
letterSpacing: 0,
|
|
616
|
+
textIndent: 0,
|
|
617
|
+
textAlign: "left"
|
|
618
|
+
},
|
|
619
|
+
id: B()
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
type: "report-table",
|
|
623
|
+
data: ne,
|
|
624
|
+
showColumn: le,
|
|
625
|
+
name: "表格",
|
|
626
|
+
options: {
|
|
627
|
+
showColumn: {
|
|
628
|
+
assets: !0,
|
|
629
|
+
type: !0,
|
|
630
|
+
data: !0
|
|
631
|
+
},
|
|
632
|
+
border: !0,
|
|
633
|
+
showHeader: !0,
|
|
634
|
+
stripe: !1
|
|
635
|
+
},
|
|
636
|
+
rp_item_uuid: "",
|
|
637
|
+
id: B()
|
|
638
|
+
}
|
|
639
|
+
], et = [
|
|
640
|
+
{
|
|
641
|
+
type: "h1",
|
|
642
|
+
data: "报表名称",
|
|
643
|
+
name: "报表名称",
|
|
644
|
+
options: {
|
|
645
|
+
size: 24,
|
|
646
|
+
color: " rgba(0, 0, 0, 0.85)",
|
|
647
|
+
fontWeight: 500,
|
|
648
|
+
letterSpacing: 0,
|
|
649
|
+
textIndent: 0,
|
|
650
|
+
textAlign: "left"
|
|
651
|
+
},
|
|
652
|
+
hide: !0,
|
|
653
|
+
id: ""
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
type: "h2",
|
|
657
|
+
data: "一级标题",
|
|
658
|
+
name: "一级标题",
|
|
659
|
+
options: {
|
|
660
|
+
size: 18,
|
|
661
|
+
color: " rgba(0, 0, 0, 0.85)",
|
|
662
|
+
fontWeight: 500,
|
|
663
|
+
letterSpacing: 0,
|
|
664
|
+
textIndent: 0,
|
|
665
|
+
textAlign: "left"
|
|
666
|
+
},
|
|
667
|
+
id: ""
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
type: "h3",
|
|
671
|
+
data: "二级标题",
|
|
672
|
+
name: "二级标题",
|
|
673
|
+
options: {
|
|
674
|
+
size: 14,
|
|
675
|
+
color: " rgba(0, 0, 0, 0.85)",
|
|
676
|
+
fontWeight: 500,
|
|
677
|
+
letterSpacing: 0,
|
|
678
|
+
textIndent: 0,
|
|
679
|
+
textAlign: "left"
|
|
680
|
+
},
|
|
681
|
+
id: ""
|
|
682
|
+
},
|
|
683
|
+
{ type: "p", data: "正文", name: "正文", rp_item_uuid: "", id: "" },
|
|
684
|
+
{
|
|
685
|
+
type: "report-table",
|
|
686
|
+
data: ne,
|
|
687
|
+
showColumn: le,
|
|
688
|
+
name: "表格",
|
|
689
|
+
options: {
|
|
690
|
+
border: !0,
|
|
691
|
+
showHeader: !0,
|
|
692
|
+
stripe: !1,
|
|
693
|
+
showColumn: {
|
|
694
|
+
assect: !0,
|
|
695
|
+
type: !0,
|
|
696
|
+
data: !0
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
rp_item_uuid: "",
|
|
700
|
+
id: ""
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
type: "bar",
|
|
704
|
+
data: Q,
|
|
705
|
+
showColumn: [{ key: "label", value: "data" }],
|
|
706
|
+
name: "图表",
|
|
707
|
+
options: oe(),
|
|
708
|
+
rp_item_uuid: "",
|
|
709
|
+
id: ""
|
|
710
|
+
}
|
|
711
|
+
], tt = (n) => ({
|
|
712
|
+
bar: {
|
|
713
|
+
type: "bar",
|
|
714
|
+
data: Q,
|
|
715
|
+
showColumn: [{ key: "label", value: "data" }],
|
|
716
|
+
name: "图表",
|
|
717
|
+
options: oe(),
|
|
718
|
+
rp_item_uuid: "",
|
|
719
|
+
id: ""
|
|
720
|
+
},
|
|
721
|
+
line: {
|
|
722
|
+
type: "line",
|
|
723
|
+
data: Q,
|
|
724
|
+
showColumn: [{ key: "label", value: "data" }],
|
|
725
|
+
name: "图表",
|
|
726
|
+
options: K(),
|
|
727
|
+
rp_item_uuid: "",
|
|
728
|
+
id: ""
|
|
729
|
+
},
|
|
730
|
+
pie: {
|
|
731
|
+
type: "pie",
|
|
732
|
+
data: Xe,
|
|
733
|
+
showColumn: [{ key: "label", value: "data" }],
|
|
734
|
+
name: "图表",
|
|
735
|
+
options: J({ isLegend: !0 }),
|
|
736
|
+
rp_item_uuid: "",
|
|
737
|
+
id: ""
|
|
738
|
+
},
|
|
739
|
+
"report-table": {
|
|
740
|
+
type: "report-table",
|
|
741
|
+
data: ne,
|
|
742
|
+
showColumn: le,
|
|
743
|
+
name: "表格",
|
|
744
|
+
options: {
|
|
745
|
+
showColumn: {
|
|
746
|
+
assect: !0,
|
|
747
|
+
type: !0,
|
|
748
|
+
data: !0
|
|
749
|
+
},
|
|
750
|
+
border: !0,
|
|
751
|
+
showHeader: !0,
|
|
752
|
+
stripe: !1
|
|
753
|
+
},
|
|
754
|
+
rp_item_uuid: "",
|
|
755
|
+
id: ""
|
|
756
|
+
}
|
|
757
|
+
})[n], z = Ae("tds-cl-report", {
|
|
758
|
+
state: () => ({
|
|
759
|
+
componentList: [],
|
|
760
|
+
activeComponents: {},
|
|
761
|
+
notDraggableList: [],
|
|
762
|
+
titleComponent: {},
|
|
763
|
+
prodType: 4,
|
|
764
|
+
filterForm: {
|
|
765
|
+
range_time: 1,
|
|
766
|
+
filter_uuid: ""
|
|
767
|
+
}
|
|
768
|
+
}),
|
|
769
|
+
getters: {
|
|
770
|
+
getActiveComponents: (n) => n.activeComponents
|
|
771
|
+
},
|
|
772
|
+
actions: {
|
|
773
|
+
// setComponentList
|
|
774
|
+
setComponentList(n) {
|
|
775
|
+
this.componentList = n;
|
|
776
|
+
},
|
|
777
|
+
async getReportDemo(n) {
|
|
778
|
+
let t = [];
|
|
779
|
+
n ? t = (await je({ report_uuid: n })).data : t = { content: q(Ze), range_time: 1 };
|
|
780
|
+
const e = [];
|
|
781
|
+
t.content.forEach((l) => {
|
|
782
|
+
(l.type === "report-select" || l.type === "range-time") && e.push(l), l.type === "h1" && (this.titleComponent = l), l.id = B();
|
|
783
|
+
}), this.notDraggableList = e, this.filterForm.range_time = t.range_time, this.filterForm.filter_uuid = t.filter_uuid, t.content.splice(0, 3), this.componentList = t.content;
|
|
784
|
+
},
|
|
785
|
+
setActiveComponents(n) {
|
|
786
|
+
this.activeComponents = n;
|
|
787
|
+
},
|
|
788
|
+
clearComponents() {
|
|
789
|
+
this.activeComponents = {}, this.componentList = [], this.notDraggableList = [], this.titleComponent = {}, this.filterForm = {
|
|
790
|
+
range_time: 1,
|
|
791
|
+
filter_uuid: ""
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
}), ot = { class: "catalogue" }, lt = ["href", "title"], nt = /* @__PURE__ */ k({
|
|
796
|
+
__name: "Catalogue",
|
|
797
|
+
props: {
|
|
798
|
+
data: { default: () => [] }
|
|
799
|
+
},
|
|
800
|
+
setup(n) {
|
|
801
|
+
const t = n, e = F(() => t.data.filter((l) => ["h2", "h3", "h4"].includes(l.type)));
|
|
802
|
+
return (l, r) => {
|
|
803
|
+
const o = p("el-divider");
|
|
804
|
+
return d(), h("div", ot, [
|
|
805
|
+
r[0] || (r[0] = C("div", { class: "cata-title el-anchor__link" }, "目录", -1)),
|
|
806
|
+
(d(!0), h(A, null, I(e.value, (s) => (d(), h("div", {
|
|
807
|
+
class: O("level" + s.type),
|
|
808
|
+
key: s.value
|
|
809
|
+
}, [
|
|
810
|
+
s.type === "h2" ? (d(), S(o, {
|
|
811
|
+
key: 0,
|
|
812
|
+
style: { "margin-top": "10px", "margin-bottom": "10px" }
|
|
813
|
+
})) : R("", !0),
|
|
814
|
+
C("a", {
|
|
815
|
+
class: "el-anchor__link",
|
|
816
|
+
href: "#" + s.id,
|
|
817
|
+
title: s.data
|
|
818
|
+
}, W(s.data), 9, lt)
|
|
819
|
+
], 2))), 128))
|
|
820
|
+
]);
|
|
821
|
+
};
|
|
822
|
+
}
|
|
823
|
+
});
|
|
824
|
+
const G = (n, t) => {
|
|
825
|
+
const e = n.__vccOpts || n;
|
|
826
|
+
for (const [l, r] of t)
|
|
827
|
+
e[l] = r;
|
|
828
|
+
return e;
|
|
829
|
+
}, at = /* @__PURE__ */ G(nt, [["__scopeId", "data-v-1cd8aa2d"]]), rt = {
|
|
830
|
+
class: "chart-components"
|
|
831
|
+
}, _e = /* @__PURE__ */ k({
|
|
832
|
+
__name: "Bar",
|
|
833
|
+
props: {
|
|
834
|
+
value: {}
|
|
835
|
+
},
|
|
836
|
+
setup(n) {
|
|
837
|
+
const t = n, e = F(() => t.value.options);
|
|
838
|
+
return $(!1), (l, r) => {
|
|
839
|
+
const o = p("TdsChart");
|
|
840
|
+
return d(), h("div", rt, [a(o, {
|
|
841
|
+
option: e.value
|
|
842
|
+
}, null, 8, ["option"])]);
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
}), st = { class: "chart-components" }, fe = /* @__PURE__ */ k({
|
|
846
|
+
__name: "Line",
|
|
847
|
+
props: {
|
|
848
|
+
value: {}
|
|
849
|
+
},
|
|
850
|
+
setup(n) {
|
|
851
|
+
const t = n, e = F(() => t.value.options);
|
|
852
|
+
return (l, r) => {
|
|
853
|
+
const o = p("TdsChart");
|
|
854
|
+
return d(), h("div", st, [
|
|
855
|
+
a(o, { option: e.value }, null, 8, ["option"])
|
|
856
|
+
]);
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
}), it = { class: "chart-components" }, ve = /* @__PURE__ */ k({
|
|
860
|
+
__name: "Pie",
|
|
861
|
+
props: {
|
|
862
|
+
value: {}
|
|
863
|
+
},
|
|
864
|
+
setup(n) {
|
|
865
|
+
const t = n, e = F(() => t.value.options);
|
|
866
|
+
return (l, r) => {
|
|
867
|
+
const o = p("TdsChart");
|
|
868
|
+
return d(), h("div", it, [
|
|
869
|
+
a(o, { option: e.value }, null, 8, ["option"])
|
|
870
|
+
]);
|
|
871
|
+
};
|
|
872
|
+
}
|
|
873
|
+
}), ut = { key: 0 }, X = /* @__PURE__ */ k({
|
|
874
|
+
__name: "ReportSelect",
|
|
875
|
+
props: {
|
|
876
|
+
value: {}
|
|
877
|
+
},
|
|
878
|
+
emits: ["change"],
|
|
879
|
+
setup(n, { emit: t }) {
|
|
880
|
+
const e = t, l = (s) => {
|
|
881
|
+
e("change", s);
|
|
882
|
+
}, o = $(n.value);
|
|
883
|
+
return (s, m) => {
|
|
884
|
+
const i = p("el-option"), f = p("el-select");
|
|
885
|
+
return o.value.data ? (d(), h("div", ut, [
|
|
886
|
+
a(f, {
|
|
887
|
+
modelValue: o.value.value,
|
|
888
|
+
"onUpdate:modelValue": m[0] || (m[0] = (c) => o.value.value = c),
|
|
889
|
+
multiple: "",
|
|
890
|
+
style: { width: "100%" },
|
|
891
|
+
onChange: l,
|
|
892
|
+
placeholder: "全部"
|
|
893
|
+
}, {
|
|
894
|
+
default: u(() => [
|
|
895
|
+
(d(!0), h(A, null, I(o.value.data, (c) => (d(), S(i, {
|
|
896
|
+
key: c.data,
|
|
897
|
+
label: c.label,
|
|
898
|
+
value: c.data
|
|
899
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
900
|
+
]),
|
|
901
|
+
_: 1
|
|
902
|
+
}, 8, ["modelValue"])
|
|
903
|
+
])) : R("", !0);
|
|
904
|
+
};
|
|
905
|
+
}
|
|
906
|
+
}), Z = /* @__PURE__ */ k({
|
|
907
|
+
__name: "RangeTime",
|
|
908
|
+
props: {
|
|
909
|
+
value: {}
|
|
910
|
+
},
|
|
911
|
+
emits: ["change"],
|
|
912
|
+
setup(n, { emit: t }) {
|
|
913
|
+
const e = t, r = $(n.value), o = $([]);
|
|
914
|
+
function s(m) {
|
|
915
|
+
m ? (r.value.data[0].start_time = m[0], r.value.data[0].end_time = m[1]) : o.value = [], e("change", o.value);
|
|
916
|
+
}
|
|
917
|
+
return te(() => {
|
|
918
|
+
o.value = [r.value.data[0].start_time, r.value.data[0].end_time];
|
|
919
|
+
}), (m, i) => {
|
|
920
|
+
const f = p("el-date-picker");
|
|
921
|
+
return d(), h("div", null, [
|
|
922
|
+
a(f, {
|
|
923
|
+
modelValue: o.value,
|
|
924
|
+
"onUpdate:modelValue": i[0] || (i[0] = (c) => o.value = c),
|
|
925
|
+
type: "datetimerange",
|
|
926
|
+
placeholder: "Pick a Date",
|
|
927
|
+
format: "YYYY-MM-DD HH:mm:ss",
|
|
928
|
+
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
929
|
+
onChange: s,
|
|
930
|
+
clearable: !1
|
|
931
|
+
}, null, 8, ["modelValue"])
|
|
932
|
+
]);
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
});
|
|
936
|
+
function pt(n) {
|
|
937
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !ie(n);
|
|
938
|
+
}
|
|
939
|
+
const be = /* @__PURE__ */ k({
|
|
940
|
+
__name: "ReportTable",
|
|
941
|
+
props: {
|
|
942
|
+
value: {}
|
|
943
|
+
},
|
|
944
|
+
setup(n) {
|
|
945
|
+
const t = n, e = (l) => {
|
|
946
|
+
let r;
|
|
947
|
+
return a(p("el-table"), {
|
|
948
|
+
data: l.data,
|
|
949
|
+
border: t.value.options.border,
|
|
950
|
+
"show-header": !!t.value.options.showHeader,
|
|
951
|
+
stripe: t.value.options.stripe
|
|
952
|
+
}, pt(r = l.showColumn.map((o) => t.value.options.showColumn[o.key] === !0 ? a(p("el-table-column"), {
|
|
953
|
+
prop: o.key,
|
|
954
|
+
label: o.name
|
|
955
|
+
}, null) : null)) ? r : {
|
|
956
|
+
default: () => [r]
|
|
957
|
+
});
|
|
958
|
+
};
|
|
959
|
+
return (l, r) => (d(), h("div", null, [a(e, re(se(l.value)), null, 16)]));
|
|
960
|
+
}
|
|
961
|
+
}), ee = /* @__PURE__ */ k({
|
|
962
|
+
__name: "ReportText",
|
|
963
|
+
props: {
|
|
964
|
+
value: {}
|
|
965
|
+
},
|
|
966
|
+
setup(n) {
|
|
967
|
+
const t = n, e = () => {
|
|
968
|
+
const l = t.value.options || {};
|
|
969
|
+
return {
|
|
970
|
+
color: l.color,
|
|
971
|
+
"font-size": l.size + "px",
|
|
972
|
+
"font-weight": l.fontWeight,
|
|
973
|
+
"letter-spacing": l.letterSpacing + "px",
|
|
974
|
+
"text-indent": l.textIndent + "px",
|
|
975
|
+
"text-align": l.textAlign
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
return (l, r) => (d(), h("div", {
|
|
979
|
+
style: xe(e())
|
|
980
|
+
}, W(l.value.data), 5));
|
|
981
|
+
}
|
|
982
|
+
}), dt = { class: "chart-components" }, ge = /* @__PURE__ */ k({
|
|
983
|
+
__name: "ReportChart",
|
|
984
|
+
props: {
|
|
985
|
+
value: {}
|
|
986
|
+
},
|
|
987
|
+
setup(n) {
|
|
988
|
+
const t = n, e = F(() => t.value), l = F(() => {
|
|
989
|
+
if (e.value.type === "bar") {
|
|
990
|
+
e.value.options.series = oe([]).series;
|
|
991
|
+
const r = [];
|
|
992
|
+
let o = "";
|
|
993
|
+
e.value.data.forEach((s) => {
|
|
994
|
+
o = s.data[0].name, r.push({
|
|
995
|
+
name: s.label,
|
|
996
|
+
value: s.data[0].value
|
|
997
|
+
});
|
|
998
|
+
}), qe(e.value.options, r, o);
|
|
999
|
+
}
|
|
1000
|
+
if (e.value.type === "pie" && (e.value.options = J({ isLegend: !0 }), console.log(J({ isLegend: !0 }), "chartsPie({ isLegend: true })"), Ge({ chartOption: e.value.options, data: e.value.data })), e.value.type === "line") {
|
|
1001
|
+
let r = [];
|
|
1002
|
+
e.value.data.forEach((m) => {
|
|
1003
|
+
r = m.data.map((i, f) => ({ name: i.name, value: "value" + f }));
|
|
1004
|
+
});
|
|
1005
|
+
const o = {
|
|
1006
|
+
name: "name",
|
|
1007
|
+
value: r
|
|
1008
|
+
}, s = e.value.data.map((m) => {
|
|
1009
|
+
const i = {
|
|
1010
|
+
name: m.label
|
|
1011
|
+
};
|
|
1012
|
+
return r.forEach((f, c) => {
|
|
1013
|
+
i[f.value] = m.data[c].value;
|
|
1014
|
+
}), i;
|
|
1015
|
+
});
|
|
1016
|
+
console.log(K([], o), "chartsLine([], params)"), e.value.options.series = K([], o).series, Ke(e.value.options, s, o);
|
|
1017
|
+
}
|
|
1018
|
+
return e.value.options;
|
|
1019
|
+
});
|
|
1020
|
+
return (r, o) => {
|
|
1021
|
+
const s = p("TdsChart");
|
|
1022
|
+
return d(), h("div", dt, [
|
|
1023
|
+
a(s, { option: l.value }, null, 8, ["option"])
|
|
1024
|
+
]);
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
});
|
|
1028
|
+
function ct(n) {
|
|
1029
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !ie(n);
|
|
1030
|
+
}
|
|
1031
|
+
const ye = /* @__PURE__ */ k({
|
|
1032
|
+
__name: "ReportDescribe",
|
|
1033
|
+
props: {
|
|
1034
|
+
value: {}
|
|
1035
|
+
},
|
|
1036
|
+
setup(n) {
|
|
1037
|
+
const t = n, e = (l) => {
|
|
1038
|
+
let r;
|
|
1039
|
+
return a(p("el-descriptions"), {
|
|
1040
|
+
title: t.value.options.title,
|
|
1041
|
+
border: t.value.options.border,
|
|
1042
|
+
column: t.value.options.column,
|
|
1043
|
+
direction: t.value.options.direction
|
|
1044
|
+
}, ct(r = l.showColumn.map((o) => a(p("el-descriptions-item"), {
|
|
1045
|
+
label: o.name
|
|
1046
|
+
}, {
|
|
1047
|
+
default: () => [t.value.data[o.key]]
|
|
1048
|
+
}))) ? r : {
|
|
1049
|
+
default: () => [r]
|
|
1050
|
+
});
|
|
1051
|
+
};
|
|
1052
|
+
return (l, r) => (d(), h("div", null, [a(e, re(se(l.value)), null, 16)]));
|
|
1053
|
+
}
|
|
1054
|
+
}), mt = {
|
|
1055
|
+
class: "editor-box"
|
|
1056
|
+
}, _t = {
|
|
1057
|
+
class: "editor",
|
|
1058
|
+
id: "editor",
|
|
1059
|
+
style: {
|
|
1060
|
+
width: "100%"
|
|
1061
|
+
}
|
|
1062
|
+
}, ft = {
|
|
1063
|
+
class: "editor-content flex flex-start"
|
|
1064
|
+
}, vt = ["id"], bt = ["innerHTML"], gt = /* @__PURE__ */ k({
|
|
1065
|
+
__name: "index",
|
|
1066
|
+
props: /* @__PURE__ */ ue({
|
|
1067
|
+
reportId: {
|
|
1068
|
+
type: String,
|
|
1069
|
+
default: ""
|
|
1070
|
+
}
|
|
1071
|
+
}, {
|
|
1072
|
+
modelValue: {},
|
|
1073
|
+
modelModifiers: {}
|
|
1074
|
+
}),
|
|
1075
|
+
emits: ["update:modelValue"],
|
|
1076
|
+
setup(n) {
|
|
1077
|
+
const t = {
|
|
1078
|
+
Bar: _e,
|
|
1079
|
+
Line: fe,
|
|
1080
|
+
Pie: ve,
|
|
1081
|
+
ReportSelect: X,
|
|
1082
|
+
RangeTime: Z,
|
|
1083
|
+
ReportTable: be,
|
|
1084
|
+
ReportText: ee,
|
|
1085
|
+
ReportChart: ge,
|
|
1086
|
+
ReportDescribe: ye
|
|
1087
|
+
}, e = z(), l = n, r = pe(n, "modelValue"), o = $([]), s = $([]), m = $([]), i = $(""), f = $("");
|
|
1088
|
+
function c() {
|
|
1089
|
+
r.value = "table";
|
|
1090
|
+
}
|
|
1091
|
+
const _ = (v) => {
|
|
1092
|
+
m.value = v, b();
|
|
1093
|
+
}, g = (v) => {
|
|
1094
|
+
v && v.length > 0 && (i.value = v[0], f.value = v[1]), b();
|
|
1095
|
+
}, b = async () => {
|
|
1096
|
+
const v = {
|
|
1097
|
+
report_uuid: l.reportId,
|
|
1098
|
+
start_time: i.value,
|
|
1099
|
+
end_time: f.value,
|
|
1100
|
+
select_data: m.value.join(",")
|
|
1101
|
+
}, x = await Pe(v), E = [];
|
|
1102
|
+
x.data.forEach((w) => {
|
|
1103
|
+
(w.type === "report-select" || w.type === "range-time") && E.push(w);
|
|
1104
|
+
}), o.value = E, x.data.splice(0, o.value.length), s.value = x.data;
|
|
1105
|
+
};
|
|
1106
|
+
b();
|
|
1107
|
+
const T = () => a("div", null, [D("未找到对应组件")]), V = (v) => v === "h2" || v === "h3" || v === "h4" ? H(t, "ReportText") : v === "bar" || v === "pie" || v === "line" ? H(t, "ReportChart") : v ? H(t, v) : a(T, null, null);
|
|
1108
|
+
return (v, x) => {
|
|
1109
|
+
const E = p("el-button"), w = p("el-card");
|
|
1110
|
+
return d(), S(w, {
|
|
1111
|
+
class: "editor view"
|
|
1112
|
+
}, {
|
|
1113
|
+
default: u(() => [C("div", mt, [a(at, {
|
|
1114
|
+
data: s.value
|
|
1115
|
+
}, null, 8, ["data"]), C("div", _t, [C("div", ft, [(d(!0), h(A, null, I(o.value, (L) => (d(), h("div", {
|
|
1116
|
+
class: "item-input",
|
|
1117
|
+
key: L.id
|
|
1118
|
+
}, [L.type === "report-select" ? (d(), S(X, {
|
|
1119
|
+
key: 0,
|
|
1120
|
+
onChange: _,
|
|
1121
|
+
value: L
|
|
1122
|
+
}, null, 8, ["value"])) : R("", !0), L.type === "range-time" && y(e).filterForm.range_time ? (d(), S(Z, {
|
|
1123
|
+
key: 1,
|
|
1124
|
+
onChange: g,
|
|
1125
|
+
value: L
|
|
1126
|
+
}, null, 8, ["value"])) : R("", !0)]))), 128)), a(E, {
|
|
1127
|
+
plain: "",
|
|
1128
|
+
onClick: c,
|
|
1129
|
+
type: "primary",
|
|
1130
|
+
class: "custom-btn",
|
|
1131
|
+
style: {
|
|
1132
|
+
"margin-left": "auto"
|
|
1133
|
+
}
|
|
1134
|
+
}, {
|
|
1135
|
+
default: u(() => x[0] || (x[0] = [D("退出预览")])),
|
|
1136
|
+
_: 1
|
|
1137
|
+
})]), (d(!0), h(A, null, I(s.value, (L) => (d(), h("div", {
|
|
1138
|
+
key: L.id,
|
|
1139
|
+
class: O(["editor-content", ["editor" + L.type]]),
|
|
1140
|
+
id: L.id
|
|
1141
|
+
}, [L.type !== "p" ? (d(), S(Y(V(L.type)), {
|
|
1142
|
+
key: 0,
|
|
1143
|
+
class: O(["editor" + L.type]),
|
|
1144
|
+
value: L
|
|
1145
|
+
}, {
|
|
1146
|
+
default: u(() => [D(W(L.data), 1)]),
|
|
1147
|
+
_: 2
|
|
1148
|
+
}, 1032, ["class", "value"])) : (d(), h("p", {
|
|
1149
|
+
key: 1,
|
|
1150
|
+
innerHTML: L.data
|
|
1151
|
+
}, null, 8, bt))], 10, vt))), 128))])])]),
|
|
1152
|
+
_: 1
|
|
1153
|
+
});
|
|
1154
|
+
};
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
const yt = /* @__PURE__ */ G(gt, [["__scopeId", "data-v-2d59469a"]]), ht = {
|
|
1158
|
+
class: "editor"
|
|
1159
|
+
}, Ct = {
|
|
1160
|
+
class: "editor-content edit"
|
|
1161
|
+
}, xt = ["onClick"], wt = ["onClick"], Vt = ["innerHTML", "draggable"], St = /* @__PURE__ */ k({
|
|
1162
|
+
__name: "Editor",
|
|
1163
|
+
setup(n) {
|
|
1164
|
+
const t = {
|
|
1165
|
+
Bar: _e,
|
|
1166
|
+
Line: fe,
|
|
1167
|
+
Pie: ve,
|
|
1168
|
+
ReportSelect: X,
|
|
1169
|
+
RangeTime: Z,
|
|
1170
|
+
ReportTable: be,
|
|
1171
|
+
ReportText: ee,
|
|
1172
|
+
ReportChart: ge,
|
|
1173
|
+
ReportDescribe: ye
|
|
1174
|
+
}, {
|
|
1175
|
+
componentList: e,
|
|
1176
|
+
activeComponents: l,
|
|
1177
|
+
notDraggableList: r,
|
|
1178
|
+
titleComponent: o
|
|
1179
|
+
} = Ee(z()), s = z(), m = (v) => {
|
|
1180
|
+
e.value.forEach((x, E) => {
|
|
1181
|
+
x.id === v && (e.value.splice(E, 1), s.activeComponents = []);
|
|
1182
|
+
});
|
|
1183
|
+
}, i = (v) => {
|
|
1184
|
+
s.setActiveComponents(v);
|
|
1185
|
+
}, f = () => a("div", null, [D("未找到对应组件")]), c = (v) => v === "h2" || v === "h3" || v === "h4" ? H(t, "ReportText") : v === "bar" || v === "pie" || v === "line" ? H(t, "ReportChart") : v ? H(t, v) : a(f, null, null), _ = (v) => {
|
|
1186
|
+
console.log(v, "evt");
|
|
1187
|
+
}, g = $(!1), b = () => {
|
|
1188
|
+
g.value = !0;
|
|
1189
|
+
}, T = (v) => {
|
|
1190
|
+
v.newIndex !== 0 && (console.log(v), g.value = !1);
|
|
1191
|
+
}, V = $();
|
|
1192
|
+
return (v, x) => {
|
|
1193
|
+
const E = p("icon-material-symbols:cancel-outline");
|
|
1194
|
+
return d(), h("div", ht, [C("div", {
|
|
1195
|
+
class: O(["editor-content edit flex flex-start", [{
|
|
1196
|
+
active: y(l).id === "filter"
|
|
1197
|
+
}]]),
|
|
1198
|
+
onClick: x[0] || (x[0] = (w) => i({
|
|
1199
|
+
id: "filter",
|
|
1200
|
+
type: "filter"
|
|
1201
|
+
}))
|
|
1202
|
+
}, [(d(!0), h(A, null, I(y(r), (w) => (d(), h("div", {
|
|
1203
|
+
class: "item-input",
|
|
1204
|
+
key: w.id
|
|
1205
|
+
}, [w.type === "report-select" || w.type === "range-time" && y(s).filterForm.range_time ? (d(), S(Y(y(H)(t, w.type)), {
|
|
1206
|
+
key: 0,
|
|
1207
|
+
value: w
|
|
1208
|
+
}, {
|
|
1209
|
+
default: u(() => [D(W(w.data), 1)]),
|
|
1210
|
+
_: 2
|
|
1211
|
+
}, 1032, ["value"])) : R("", !0)]))), 128))], 2), C("div", Ct, [a(ee, {
|
|
1212
|
+
value: y(o),
|
|
1213
|
+
onClick: x[1] || (x[1] = (w) => i(y(o)))
|
|
1214
|
+
}, null, 8, ["value"])]), a(y(Ie), {
|
|
1215
|
+
ref_key: "el",
|
|
1216
|
+
ref: V,
|
|
1217
|
+
modelValue: y(e),
|
|
1218
|
+
"onUpdate:modelValue": x[2] || (x[2] = (w) => we(e) ? e.value = w : null),
|
|
1219
|
+
"on-change": _,
|
|
1220
|
+
animation: 150,
|
|
1221
|
+
onStart: b,
|
|
1222
|
+
onEnd: T
|
|
1223
|
+
}, {
|
|
1224
|
+
default: u(() => [(d(!0), h(A, null, I(y(e), (w) => (d(), h("div", {
|
|
1225
|
+
key: w.id,
|
|
1226
|
+
class: O(["editor-content edit", ["editor" + w.type, {
|
|
1227
|
+
active: w.id === y(l).id
|
|
1228
|
+
}]]),
|
|
1229
|
+
onClick: (L) => i(w)
|
|
1230
|
+
}, [C("i", {
|
|
1231
|
+
onClick: Ve((L) => m(w.id), ["stop"])
|
|
1232
|
+
}, [a(E, {
|
|
1233
|
+
class: "color-red"
|
|
1234
|
+
})], 8, wt), w.type !== "p" ? (d(), S(Y(c(w.type)), {
|
|
1235
|
+
key: 0,
|
|
1236
|
+
class: O(["editor" + w.type]),
|
|
1237
|
+
value: w,
|
|
1238
|
+
draggable: g.value
|
|
1239
|
+
}, {
|
|
1240
|
+
default: u(() => [D(W(w.data), 1)]),
|
|
1241
|
+
_: 2
|
|
1242
|
+
}, 1032, ["class", "value", "draggable"])) : (d(), h("p", {
|
|
1243
|
+
key: 1,
|
|
1244
|
+
innerHTML: w.data,
|
|
1245
|
+
draggable: g.value
|
|
1246
|
+
}, null, 8, Vt))], 10, xt))), 128))]),
|
|
1247
|
+
_: 1
|
|
1248
|
+
}, 8, ["modelValue"])]);
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
}), kt = { class: "label" }, $t = { class: "flex item-switch" }, Tt = { class: "flex item-switch" }, Lt = { class: "flex item-switch" }, he = /* @__PURE__ */ k({
|
|
1252
|
+
__name: "SettingTable",
|
|
1253
|
+
setup(n) {
|
|
1254
|
+
const t = z(), e = F(() => t.getActiveComponents);
|
|
1255
|
+
return (l, r) => {
|
|
1256
|
+
const o = p("el-switch"), s = p("el-form-item"), m = p("el-divider");
|
|
1257
|
+
return d(), h("div", null, [
|
|
1258
|
+
a(s, { label: "控制列" }, {
|
|
1259
|
+
default: u(() => [
|
|
1260
|
+
(d(!0), h(A, null, I(e.value.showColumn, (i, f) => (d(), h("p", {
|
|
1261
|
+
class: "flex item-switch",
|
|
1262
|
+
key: f
|
|
1263
|
+
}, [
|
|
1264
|
+
C("span", kt, W(i.name), 1),
|
|
1265
|
+
a(o, {
|
|
1266
|
+
modelValue: e.value.options.showColumn[i.key],
|
|
1267
|
+
"onUpdate:modelValue": (c) => e.value.options.showColumn[i.key] = c
|
|
1268
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
1269
|
+
]))), 128))
|
|
1270
|
+
]),
|
|
1271
|
+
_: 1
|
|
1272
|
+
}),
|
|
1273
|
+
a(m),
|
|
1274
|
+
a(s, { label: "表格样式" }, {
|
|
1275
|
+
default: u(() => [
|
|
1276
|
+
C("p", $t, [
|
|
1277
|
+
r[3] || (r[3] = C("span", { class: "label" }, "斑马纹", -1)),
|
|
1278
|
+
a(o, {
|
|
1279
|
+
modelValue: e.value.options.stripe,
|
|
1280
|
+
"onUpdate:modelValue": r[0] || (r[0] = (i) => e.value.options.stripe = i)
|
|
1281
|
+
}, null, 8, ["modelValue"])
|
|
1282
|
+
]),
|
|
1283
|
+
C("p", Tt, [
|
|
1284
|
+
r[4] || (r[4] = C("span", { class: "label" }, "边框", -1)),
|
|
1285
|
+
a(o, {
|
|
1286
|
+
modelValue: e.value.options.border,
|
|
1287
|
+
"onUpdate:modelValue": r[1] || (r[1] = (i) => e.value.options.border = i)
|
|
1288
|
+
}, null, 8, ["modelValue"])
|
|
1289
|
+
]),
|
|
1290
|
+
C("p", Lt, [
|
|
1291
|
+
r[5] || (r[5] = C("span", { class: "label" }, "表头", -1)),
|
|
1292
|
+
a(o, {
|
|
1293
|
+
modelValue: e.value.options.showHeader,
|
|
1294
|
+
"onUpdate:modelValue": r[2] || (r[2] = (i) => e.value.options.showHeader = i)
|
|
1295
|
+
}, null, 8, ["modelValue"])
|
|
1296
|
+
])
|
|
1297
|
+
]),
|
|
1298
|
+
_: 1
|
|
1299
|
+
})
|
|
1300
|
+
]);
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
}), Rt = { key: 0 }, Ut = /* @__PURE__ */ k({
|
|
1304
|
+
__name: "ChartsUniConfig",
|
|
1305
|
+
setup(n) {
|
|
1306
|
+
const t = z(), e = F(() => t.activeComponents);
|
|
1307
|
+
function l(r) {
|
|
1308
|
+
r ? (e.value.options.series[0].radius = ["10%", "65%"], e.value.options.graphic[0].invisible = !0, e.value.options.graphic[1].invisible = !0) : (e.value.options.series[0].radius = ["45%", "70%"], e.value.options.graphic[0].invisible = !1, e.value.options.graphic[1].invisible = !1);
|
|
1309
|
+
}
|
|
1310
|
+
return $("rgb(46, 145, 255)"), (r, o) => {
|
|
1311
|
+
const s = p("el-input"), m = p("el-form-item"), i = p("el-switch"), f = p("el-col"), c = p("el-color-picker"), _ = p("el-input-number"), g = p("el-row"), b = p("el-collapse-item"), T = p("el-collapse");
|
|
1312
|
+
return e.value.options.title ? (d(), h("div", Rt, [
|
|
1313
|
+
a(m, { label: "标题" }, {
|
|
1314
|
+
default: u(() => [
|
|
1315
|
+
a(s, {
|
|
1316
|
+
modelValue: e.value.options.title.text,
|
|
1317
|
+
"onUpdate:modelValue": o[0] || (o[0] = (V) => e.value.options.title.text = V)
|
|
1318
|
+
}, null, 8, ["modelValue"])
|
|
1319
|
+
]),
|
|
1320
|
+
_: 1
|
|
1321
|
+
}),
|
|
1322
|
+
a(T, null, {
|
|
1323
|
+
default: u(() => [
|
|
1324
|
+
a(b, {
|
|
1325
|
+
title: "标题配置",
|
|
1326
|
+
name: "1"
|
|
1327
|
+
}, {
|
|
1328
|
+
default: u(() => [
|
|
1329
|
+
a(g, { class: "w-100%" }, {
|
|
1330
|
+
default: u(() => [
|
|
1331
|
+
a(f, { span: 24 }, {
|
|
1332
|
+
default: u(() => [
|
|
1333
|
+
o[8] || (o[8] = C("span", { class: "switch-label" }, "显示标题", -1)),
|
|
1334
|
+
a(i, {
|
|
1335
|
+
modelValue: e.value.options.title.show,
|
|
1336
|
+
"onUpdate:modelValue": o[1] || (o[1] = (V) => e.value.options.title.show = V)
|
|
1337
|
+
}, null, 8, ["modelValue"])
|
|
1338
|
+
]),
|
|
1339
|
+
_: 1
|
|
1340
|
+
}),
|
|
1341
|
+
a(f, { span: 12 }, {
|
|
1342
|
+
default: u(() => [
|
|
1343
|
+
a(c, {
|
|
1344
|
+
modelValue: e.value.options.title.textStyle.color,
|
|
1345
|
+
"onUpdate:modelValue": o[2] || (o[2] = (V) => e.value.options.title.textStyle.color = V),
|
|
1346
|
+
"show-alpha": ""
|
|
1347
|
+
}, null, 8, ["modelValue"]),
|
|
1348
|
+
o[9] || (o[9] = C("p", { class: "sub-title" }, "颜色", -1))
|
|
1349
|
+
]),
|
|
1350
|
+
_: 1
|
|
1351
|
+
}),
|
|
1352
|
+
a(f, { span: 12 }, {
|
|
1353
|
+
default: u(() => [
|
|
1354
|
+
a(_, {
|
|
1355
|
+
modelValue: e.value.options.title.textStyle.fontSize,
|
|
1356
|
+
"onUpdate:modelValue": o[3] || (o[3] = (V) => e.value.options.title.textStyle.fontSize = V),
|
|
1357
|
+
"controls-position": "right"
|
|
1358
|
+
}, null, 8, ["modelValue"]),
|
|
1359
|
+
o[10] || (o[10] = C("p", { class: "sub-title" }, "字体大小", -1))
|
|
1360
|
+
]),
|
|
1361
|
+
_: 1
|
|
1362
|
+
}),
|
|
1363
|
+
a(f, { span: 12 }, {
|
|
1364
|
+
default: u(() => [
|
|
1365
|
+
a(_, {
|
|
1366
|
+
modelValue: e.value.options.title.x,
|
|
1367
|
+
"onUpdate:modelValue": o[4] || (o[4] = (V) => e.value.options.title.x = V),
|
|
1368
|
+
"controls-position": "right"
|
|
1369
|
+
}, null, 8, ["modelValue"]),
|
|
1370
|
+
o[11] || (o[11] = C("p", { class: "sub-title" }, "横向", -1))
|
|
1371
|
+
]),
|
|
1372
|
+
_: 1
|
|
1373
|
+
}),
|
|
1374
|
+
a(f, { span: 12 }, {
|
|
1375
|
+
default: u(() => [
|
|
1376
|
+
a(_, {
|
|
1377
|
+
modelValue: e.value.options.title.y,
|
|
1378
|
+
"onUpdate:modelValue": o[5] || (o[5] = (V) => e.value.options.title.y = V),
|
|
1379
|
+
"controls-position": "right"
|
|
1380
|
+
}, null, 8, ["modelValue"]),
|
|
1381
|
+
o[12] || (o[12] = C("p", { class: "sub-title" }, "纵向", -1))
|
|
1382
|
+
]),
|
|
1383
|
+
_: 1
|
|
1384
|
+
})
|
|
1385
|
+
]),
|
|
1386
|
+
_: 1
|
|
1387
|
+
})
|
|
1388
|
+
]),
|
|
1389
|
+
_: 1
|
|
1390
|
+
}),
|
|
1391
|
+
a(b, {
|
|
1392
|
+
title: "图形配置",
|
|
1393
|
+
name: "2"
|
|
1394
|
+
}, {
|
|
1395
|
+
default: u(() => [
|
|
1396
|
+
e.value.options.color && e.value.options.color.length && e.value.type === "pie" ? (d(), S(g, { key: 0 }, {
|
|
1397
|
+
default: u(() => [
|
|
1398
|
+
a(f, { span: 24 }, {
|
|
1399
|
+
default: u(() => [
|
|
1400
|
+
o[13] || (o[13] = C("span", { class: "switch-label" }, "玫瑰图", -1)),
|
|
1401
|
+
a(i, {
|
|
1402
|
+
onChange: l,
|
|
1403
|
+
modelValue: e.value.options.series[0].roseType,
|
|
1404
|
+
"onUpdate:modelValue": o[6] || (o[6] = (V) => e.value.options.series[0].roseType = V)
|
|
1405
|
+
}, null, 8, ["modelValue"])
|
|
1406
|
+
]),
|
|
1407
|
+
_: 1
|
|
1408
|
+
})
|
|
1409
|
+
]),
|
|
1410
|
+
_: 1
|
|
1411
|
+
})) : R("", !0)
|
|
1412
|
+
]),
|
|
1413
|
+
_: 1
|
|
1414
|
+
}),
|
|
1415
|
+
a(b, {
|
|
1416
|
+
title: "图例配置",
|
|
1417
|
+
name: "3"
|
|
1418
|
+
}, {
|
|
1419
|
+
default: u(() => [
|
|
1420
|
+
a(g, null, {
|
|
1421
|
+
default: u(() => [
|
|
1422
|
+
a(f, { span: 24 }, {
|
|
1423
|
+
default: u(() => [
|
|
1424
|
+
o[14] || (o[14] = C("span", { class: "switch-label" }, "显示图例", -1)),
|
|
1425
|
+
e.value.options.legend ? (d(), S(i, {
|
|
1426
|
+
key: 0,
|
|
1427
|
+
modelValue: e.value.options.legend.show,
|
|
1428
|
+
"onUpdate:modelValue": o[7] || (o[7] = (V) => e.value.options.legend.show = V)
|
|
1429
|
+
}, null, 8, ["modelValue"])) : R("", !0)
|
|
1430
|
+
]),
|
|
1431
|
+
_: 1
|
|
1432
|
+
})
|
|
1433
|
+
]),
|
|
1434
|
+
_: 1
|
|
1435
|
+
})
|
|
1436
|
+
]),
|
|
1437
|
+
_: 1
|
|
1438
|
+
})
|
|
1439
|
+
]),
|
|
1440
|
+
_: 1
|
|
1441
|
+
})
|
|
1442
|
+
])) : R("", !0);
|
|
1443
|
+
};
|
|
1444
|
+
}
|
|
1445
|
+
});
|
|
1446
|
+
const Dt = /* @__PURE__ */ G(Ut, [["__scopeId", "data-v-e9859d3b"]]), Ce = /* @__PURE__ */ k({
|
|
1447
|
+
__name: "SettingDescribe",
|
|
1448
|
+
setup(n) {
|
|
1449
|
+
const t = z(), e = F(() => t.getActiveComponents);
|
|
1450
|
+
return (l, r) => {
|
|
1451
|
+
const o = p("el-input"), s = p("el-form-item"), m = p("el-switch"), i = p("el-input-number"), f = p("el-radio"), c = p("el-radio-group");
|
|
1452
|
+
return d(), h("div", null, [
|
|
1453
|
+
a(s, { label: "标题" }, {
|
|
1454
|
+
default: u(() => [
|
|
1455
|
+
a(o, {
|
|
1456
|
+
modelValue: e.value.options.title,
|
|
1457
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => e.value.options.title = _)
|
|
1458
|
+
}, null, 8, ["modelValue"])
|
|
1459
|
+
]),
|
|
1460
|
+
_: 1
|
|
1461
|
+
}),
|
|
1462
|
+
a(s, { label: "边框" }, {
|
|
1463
|
+
default: u(() => [
|
|
1464
|
+
a(m, {
|
|
1465
|
+
modelValue: e.value.options.border,
|
|
1466
|
+
"onUpdate:modelValue": r[1] || (r[1] = (_) => e.value.options.border = _)
|
|
1467
|
+
}, null, 8, ["modelValue"])
|
|
1468
|
+
]),
|
|
1469
|
+
_: 1
|
|
1470
|
+
}),
|
|
1471
|
+
a(s, { label: "每行展示数量" }, {
|
|
1472
|
+
default: u(() => [
|
|
1473
|
+
a(i, {
|
|
1474
|
+
modelValue: e.value.options.column,
|
|
1475
|
+
"onUpdate:modelValue": r[2] || (r[2] = (_) => e.value.options.column = _),
|
|
1476
|
+
min: 1,
|
|
1477
|
+
max: 10,
|
|
1478
|
+
controls: !1
|
|
1479
|
+
}, null, 8, ["modelValue"])
|
|
1480
|
+
]),
|
|
1481
|
+
_: 1
|
|
1482
|
+
}),
|
|
1483
|
+
a(s, { label: "排列方向" }, {
|
|
1484
|
+
default: u(() => [
|
|
1485
|
+
a(c, {
|
|
1486
|
+
modelValue: e.value.options.direction,
|
|
1487
|
+
"onUpdate:modelValue": r[3] || (r[3] = (_) => e.value.options.direction = _)
|
|
1488
|
+
}, {
|
|
1489
|
+
default: u(() => [
|
|
1490
|
+
a(f, { value: "horizontal" }, {
|
|
1491
|
+
default: u(() => r[4] || (r[4] = [
|
|
1492
|
+
D("横向")
|
|
1493
|
+
])),
|
|
1494
|
+
_: 1
|
|
1495
|
+
}),
|
|
1496
|
+
a(f, { value: "vertical" }, {
|
|
1497
|
+
default: u(() => r[5] || (r[5] = [
|
|
1498
|
+
D("纵向")
|
|
1499
|
+
])),
|
|
1500
|
+
_: 1
|
|
1501
|
+
})
|
|
1502
|
+
]),
|
|
1503
|
+
_: 1
|
|
1504
|
+
}, 8, ["modelValue"])
|
|
1505
|
+
]),
|
|
1506
|
+
_: 1
|
|
1507
|
+
})
|
|
1508
|
+
]);
|
|
1509
|
+
};
|
|
1510
|
+
}
|
|
1511
|
+
}), At = /* @__PURE__ */ k({
|
|
1512
|
+
__name: "SettingCharts",
|
|
1513
|
+
setup(n) {
|
|
1514
|
+
const t = z(), e = $(!1), l = F(() => t.getActiveComponents), r = [
|
|
1515
|
+
{ value: "report-describe", name: "描述列表" },
|
|
1516
|
+
{ value: "report-table", name: "表格" },
|
|
1517
|
+
{ value: "line", name: "趋势图" },
|
|
1518
|
+
{ value: "pie", name: "扇形图" },
|
|
1519
|
+
{ value: "bar", name: "柱状图" }
|
|
1520
|
+
], o = $(""), s = $();
|
|
1521
|
+
async function m(c) {
|
|
1522
|
+
const _ = await de({
|
|
1523
|
+
prod_type: t.prodType,
|
|
1524
|
+
chart_type: c,
|
|
1525
|
+
filter_uuid: t.filterForm.filter_uuid
|
|
1526
|
+
});
|
|
1527
|
+
s.value = _.data;
|
|
1528
|
+
}
|
|
1529
|
+
function i(c) {
|
|
1530
|
+
let _ = s.value.find((b) => b.rp_item_uuid === c);
|
|
1531
|
+
const g = _.rp_item_content;
|
|
1532
|
+
if (_.rp_item_content.type, g.type === "report-table") {
|
|
1533
|
+
const b = {};
|
|
1534
|
+
g.showColumn.forEach((T) => {
|
|
1535
|
+
b[T.key] = !0;
|
|
1536
|
+
}), g.options = { ...g.options, showColumn: b, border: !0, showHeader: !0, stripe: !1 };
|
|
1537
|
+
}
|
|
1538
|
+
g.type === "report-describe" && (g.options = { ...g.options, title: "", border: !0, column: 1, direction: "horizontal", ...l.value.options }), Object.assign(t.activeComponents, g), t.activeComponents.rp_item_uuid = _.rp_item_uuid;
|
|
1539
|
+
}
|
|
1540
|
+
te(async () => {
|
|
1541
|
+
o.value = l.value.type, await m(o.value);
|
|
1542
|
+
});
|
|
1543
|
+
async function f(c) {
|
|
1544
|
+
try {
|
|
1545
|
+
e.value = !0, await m(c), Object.assign(t.activeComponents, tt(c)), e.value = !1;
|
|
1546
|
+
} catch {
|
|
1547
|
+
e.value = !1;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
return Se(
|
|
1551
|
+
() => l.value,
|
|
1552
|
+
(c) => {
|
|
1553
|
+
console.log(c, "activeComponents"), ~["bar", "pie", "line", "report-table", "report-describe"].indexOf(c.type) && (o.value = l.value.type, m(o.value));
|
|
1554
|
+
}
|
|
1555
|
+
), (c, _) => {
|
|
1556
|
+
const g = p("el-option"), b = p("el-select"), T = p("el-form-item"), V = p("el-form"), v = ke("loading");
|
|
1557
|
+
return $e((d(), h("div", null, [
|
|
1558
|
+
a(V, { "label-position": "top" }, {
|
|
1559
|
+
default: u(() => [
|
|
1560
|
+
a(T, { label: "图表类型" }, {
|
|
1561
|
+
default: u(() => [
|
|
1562
|
+
a(b, {
|
|
1563
|
+
style: { width: "100%" },
|
|
1564
|
+
modelValue: o.value,
|
|
1565
|
+
"onUpdate:modelValue": _[0] || (_[0] = (x) => o.value = x),
|
|
1566
|
+
onChange: f
|
|
1567
|
+
}, {
|
|
1568
|
+
default: u(() => [
|
|
1569
|
+
(d(), h(A, null, I(r, (x, E) => a(g, {
|
|
1570
|
+
key: E,
|
|
1571
|
+
label: x.name,
|
|
1572
|
+
value: x.value
|
|
1573
|
+
}, null, 8, ["label", "value"])), 64))
|
|
1574
|
+
]),
|
|
1575
|
+
_: 1
|
|
1576
|
+
}, 8, ["modelValue"])
|
|
1577
|
+
]),
|
|
1578
|
+
_: 1
|
|
1579
|
+
}),
|
|
1580
|
+
a(T, { label: "组件库" }, {
|
|
1581
|
+
default: u(() => [
|
|
1582
|
+
a(b, {
|
|
1583
|
+
style: { width: "100%" },
|
|
1584
|
+
modelValue: y(t).activeComponents.rp_item_uuid,
|
|
1585
|
+
"onUpdate:modelValue": _[1] || (_[1] = (x) => y(t).activeComponents.rp_item_uuid = x),
|
|
1586
|
+
onChange: i
|
|
1587
|
+
}, {
|
|
1588
|
+
default: u(() => [
|
|
1589
|
+
(d(!0), h(A, null, I(s.value, (x, E) => (d(), S(g, {
|
|
1590
|
+
key: E,
|
|
1591
|
+
label: x.rp_item_name,
|
|
1592
|
+
value: x.rp_item_uuid
|
|
1593
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
1594
|
+
]),
|
|
1595
|
+
_: 1
|
|
1596
|
+
}, 8, ["modelValue"])
|
|
1597
|
+
]),
|
|
1598
|
+
_: 1
|
|
1599
|
+
}),
|
|
1600
|
+
o.value === "report-table" && l.value.options.showColumn ? (d(), S(he, { key: 0 })) : R("", !0),
|
|
1601
|
+
o.value === "pie" || o.value === "bar" || o.value === "line" ? (d(), S(Dt, { key: 1 })) : R("", !0),
|
|
1602
|
+
o.value === "report-describe" ? (d(), S(Ce, { key: 2 })) : R("", !0)
|
|
1603
|
+
]),
|
|
1604
|
+
_: 1
|
|
1605
|
+
})
|
|
1606
|
+
])), [
|
|
1607
|
+
[v, e.value]
|
|
1608
|
+
]);
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
}), Et = { key: 0 }, Ft = { style: { border: "1px solid #ccc", "border-radius": "3px" } }, ae = "default", It = /* @__PURE__ */ k({
|
|
1612
|
+
__name: "SettingText",
|
|
1613
|
+
setup(n) {
|
|
1614
|
+
const t = z(), e = Te(), l = $();
|
|
1615
|
+
function r(c) {
|
|
1616
|
+
const _ = l.value.find((g) => g.rp_item_uuid === c);
|
|
1617
|
+
t.activeComponents.uri = _.rp_item_content.uri, e.value.setHtml((_ == null ? void 0 : _.rp_item_content.data) || "");
|
|
1618
|
+
}
|
|
1619
|
+
async function o() {
|
|
1620
|
+
const c = await de({ prod_type: t.prodType, chart_type: "p", filter_uuid: t.filterForm.filter_uuid });
|
|
1621
|
+
l.value = c.data;
|
|
1622
|
+
}
|
|
1623
|
+
o();
|
|
1624
|
+
const s = {
|
|
1625
|
+
toolbarKeys: [
|
|
1626
|
+
"bold",
|
|
1627
|
+
"underline",
|
|
1628
|
+
"italic",
|
|
1629
|
+
"through",
|
|
1630
|
+
"code",
|
|
1631
|
+
"bulletedList",
|
|
1632
|
+
// 无序列表
|
|
1633
|
+
"numberedList",
|
|
1634
|
+
// 有序列表
|
|
1635
|
+
"clearStyle",
|
|
1636
|
+
"color",
|
|
1637
|
+
"bgColor",
|
|
1638
|
+
"fontSize",
|
|
1639
|
+
"fontFamily",
|
|
1640
|
+
"justifyLeft",
|
|
1641
|
+
"justifyRight",
|
|
1642
|
+
"justifyCenter",
|
|
1643
|
+
"justifyJustify",
|
|
1644
|
+
"lineHeight"
|
|
1645
|
+
]
|
|
1646
|
+
}, m = { placeholder: "请输入内容..." }, i = (c) => {
|
|
1647
|
+
e.value = c;
|
|
1648
|
+
}, f = (c) => {
|
|
1649
|
+
};
|
|
1650
|
+
return Le(() => {
|
|
1651
|
+
const c = e.value;
|
|
1652
|
+
c != null && c.destroy();
|
|
1653
|
+
}), (c, _) => {
|
|
1654
|
+
const g = p("el-option"), b = p("el-select"), T = p("el-form-item"), V = p("el-form");
|
|
1655
|
+
return y(t).activeComponents.id ? (d(), h("div", Et, [
|
|
1656
|
+
a(V, { "label-position": "top" }, {
|
|
1657
|
+
default: u(() => [
|
|
1658
|
+
a(T, { label: "组件库" }, {
|
|
1659
|
+
default: u(() => [
|
|
1660
|
+
a(b, {
|
|
1661
|
+
style: { width: "100%" },
|
|
1662
|
+
modelValue: y(t).activeComponents.rp_item_uuid,
|
|
1663
|
+
"onUpdate:modelValue": _[0] || (_[0] = (v) => y(t).activeComponents.rp_item_uuid = v),
|
|
1664
|
+
onChange: r
|
|
1665
|
+
}, {
|
|
1666
|
+
default: u(() => [
|
|
1667
|
+
(d(!0), h(A, null, I(l.value, (v, x) => (d(), S(g, {
|
|
1668
|
+
key: x,
|
|
1669
|
+
label: v.rp_item_name,
|
|
1670
|
+
value: v.rp_item_uuid
|
|
1671
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
1672
|
+
]),
|
|
1673
|
+
_: 1
|
|
1674
|
+
}, 8, ["modelValue"])
|
|
1675
|
+
]),
|
|
1676
|
+
_: 1
|
|
1677
|
+
}),
|
|
1678
|
+
a(T, { label: "文本内容" }, {
|
|
1679
|
+
default: u(() => [
|
|
1680
|
+
C("div", Ft, [
|
|
1681
|
+
a(y(ze), {
|
|
1682
|
+
style: { "border-bottom": "1px solid #ccc" },
|
|
1683
|
+
editor: e.value,
|
|
1684
|
+
"default-config": s,
|
|
1685
|
+
mode: ae
|
|
1686
|
+
}, null, 8, ["editor"]),
|
|
1687
|
+
a(y(He), {
|
|
1688
|
+
style: { height: "500px", "overflow-y": "hidden" },
|
|
1689
|
+
onOnChange: f,
|
|
1690
|
+
modelValue: y(t).activeComponents.data,
|
|
1691
|
+
"onUpdate:modelValue": _[1] || (_[1] = (v) => y(t).activeComponents.data = v),
|
|
1692
|
+
"default-config": m,
|
|
1693
|
+
mode: ae,
|
|
1694
|
+
onOnCreated: i
|
|
1695
|
+
}, null, 8, ["modelValue"])
|
|
1696
|
+
])
|
|
1697
|
+
]),
|
|
1698
|
+
_: 1
|
|
1699
|
+
})
|
|
1700
|
+
]),
|
|
1701
|
+
_: 1
|
|
1702
|
+
})
|
|
1703
|
+
])) : R("", !0);
|
|
1704
|
+
};
|
|
1705
|
+
}
|
|
1706
|
+
}), zt = /* @__PURE__ */ k({
|
|
1707
|
+
__name: "SettingFilter",
|
|
1708
|
+
setup(n) {
|
|
1709
|
+
const t = $([]), e = z();
|
|
1710
|
+
async function l() {
|
|
1711
|
+
const r = await Oe({ prod_type: e.prodType });
|
|
1712
|
+
t.value = r.data;
|
|
1713
|
+
}
|
|
1714
|
+
return l(), (r, o) => {
|
|
1715
|
+
const s = p("el-option"), m = p("el-select"), i = p("el-form-item"), f = p("el-checkbox"), c = p("el-form");
|
|
1716
|
+
return d(), S(c, {
|
|
1717
|
+
"label-width": "80px",
|
|
1718
|
+
"label-position": "top"
|
|
1719
|
+
}, {
|
|
1720
|
+
default: u(() => [
|
|
1721
|
+
a(i, { label: "筛选条件" }, {
|
|
1722
|
+
default: u(() => [
|
|
1723
|
+
a(m, {
|
|
1724
|
+
modelValue: y(e).filterForm.filter_uuid,
|
|
1725
|
+
"onUpdate:modelValue": o[0] || (o[0] = (_) => y(e).filterForm.filter_uuid = _),
|
|
1726
|
+
disabled: !!y(e).filterForm.filter_uuid
|
|
1727
|
+
}, {
|
|
1728
|
+
default: u(() => [
|
|
1729
|
+
(d(!0), h(A, null, I(t.value, (_) => (d(), S(s, {
|
|
1730
|
+
key: _.filter_uuid,
|
|
1731
|
+
label: _.filter_name,
|
|
1732
|
+
value: _.filter_uuid
|
|
1733
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
1734
|
+
]),
|
|
1735
|
+
_: 1
|
|
1736
|
+
}, 8, ["modelValue", "disabled"])
|
|
1737
|
+
]),
|
|
1738
|
+
_: 1
|
|
1739
|
+
}),
|
|
1740
|
+
a(i, null, {
|
|
1741
|
+
default: u(() => [
|
|
1742
|
+
a(f, {
|
|
1743
|
+
modelValue: y(e).filterForm.range_time,
|
|
1744
|
+
"onUpdate:modelValue": o[1] || (o[1] = (_) => y(e).filterForm.range_time = _),
|
|
1745
|
+
"true-value": 1,
|
|
1746
|
+
"false-value": 0,
|
|
1747
|
+
label: "时间范围"
|
|
1748
|
+
}, null, 8, ["modelValue"])
|
|
1749
|
+
]),
|
|
1750
|
+
_: 1
|
|
1751
|
+
})
|
|
1752
|
+
]),
|
|
1753
|
+
_: 1
|
|
1754
|
+
});
|
|
1755
|
+
};
|
|
1756
|
+
}
|
|
1757
|
+
}), Ht = /* @__PURE__ */ k({
|
|
1758
|
+
__name: "SettingTitle",
|
|
1759
|
+
setup(n) {
|
|
1760
|
+
const t = z();
|
|
1761
|
+
return (e, l) => {
|
|
1762
|
+
const r = p("el-input"), o = p("el-form-item"), s = p("el-color-picker"), m = p("el-col"), i = p("el-input-number"), f = p("el-option"), c = p("el-select"), _ = p("el-row"), g = p("el-form");
|
|
1763
|
+
return d(), S(g, {
|
|
1764
|
+
"label-width": "auto",
|
|
1765
|
+
"label-position": "top"
|
|
1766
|
+
}, {
|
|
1767
|
+
default: u(() => [
|
|
1768
|
+
a(o, { label: "名称" }, {
|
|
1769
|
+
default: u(() => [
|
|
1770
|
+
a(r, {
|
|
1771
|
+
modelValue: y(t).activeComponents.data,
|
|
1772
|
+
"onUpdate:modelValue": l[0] || (l[0] = (b) => y(t).activeComponents.data = b),
|
|
1773
|
+
placeholder: "Please input",
|
|
1774
|
+
maxlength: "24",
|
|
1775
|
+
"show-word-limit": ""
|
|
1776
|
+
}, null, 8, ["modelValue"])
|
|
1777
|
+
]),
|
|
1778
|
+
_: 1
|
|
1779
|
+
}),
|
|
1780
|
+
a(o, { label: "样式" }, {
|
|
1781
|
+
default: u(() => [
|
|
1782
|
+
a(_, { gutter: 20 }, {
|
|
1783
|
+
default: u(() => [
|
|
1784
|
+
a(m, { span: 12 }, {
|
|
1785
|
+
default: u(() => [
|
|
1786
|
+
a(s, {
|
|
1787
|
+
modelValue: y(t).activeComponents.options.color,
|
|
1788
|
+
"onUpdate:modelValue": l[1] || (l[1] = (b) => y(t).activeComponents.options.color = b),
|
|
1789
|
+
"show-alpha": ""
|
|
1790
|
+
}, null, 8, ["modelValue"]),
|
|
1791
|
+
l[7] || (l[7] = C("p", { class: "sub-title" }, "颜色", -1))
|
|
1792
|
+
]),
|
|
1793
|
+
_: 1
|
|
1794
|
+
}),
|
|
1795
|
+
a(m, { span: 12 }, {
|
|
1796
|
+
default: u(() => [
|
|
1797
|
+
a(i, {
|
|
1798
|
+
modelValue: y(t).activeComponents.options.size,
|
|
1799
|
+
"onUpdate:modelValue": l[2] || (l[2] = (b) => y(t).activeComponents.options.size = b),
|
|
1800
|
+
"controls-position": "right"
|
|
1801
|
+
}, null, 8, ["modelValue"]),
|
|
1802
|
+
l[8] || (l[8] = C("p", { class: "sub-title" }, "字体大小", -1))
|
|
1803
|
+
]),
|
|
1804
|
+
_: 1
|
|
1805
|
+
}),
|
|
1806
|
+
a(m, { span: 12 }, {
|
|
1807
|
+
default: u(() => [
|
|
1808
|
+
a(c, {
|
|
1809
|
+
modelValue: y(t).activeComponents.options.fontWeight,
|
|
1810
|
+
"onUpdate:modelValue": l[3] || (l[3] = (b) => y(t).activeComponents.options.fontWeight = b)
|
|
1811
|
+
}, {
|
|
1812
|
+
default: u(() => [
|
|
1813
|
+
a(f, {
|
|
1814
|
+
label: "常规",
|
|
1815
|
+
value: 500
|
|
1816
|
+
}),
|
|
1817
|
+
a(f, {
|
|
1818
|
+
label: "加粗",
|
|
1819
|
+
value: 600
|
|
1820
|
+
})
|
|
1821
|
+
]),
|
|
1822
|
+
_: 1
|
|
1823
|
+
}, 8, ["modelValue"]),
|
|
1824
|
+
l[9] || (l[9] = C("p", { class: "sub-title" }, "字体粗细", -1))
|
|
1825
|
+
]),
|
|
1826
|
+
_: 1
|
|
1827
|
+
}),
|
|
1828
|
+
a(m, { span: 12 }, {
|
|
1829
|
+
default: u(() => [
|
|
1830
|
+
a(i, {
|
|
1831
|
+
modelValue: y(t).activeComponents.options.letterSpacing,
|
|
1832
|
+
"onUpdate:modelValue": l[4] || (l[4] = (b) => y(t).activeComponents.options.letterSpacing = b),
|
|
1833
|
+
"controls-position": "right"
|
|
1834
|
+
}, null, 8, ["modelValue"]),
|
|
1835
|
+
l[10] || (l[10] = C("p", { class: "sub-title" }, "字间距", -1))
|
|
1836
|
+
]),
|
|
1837
|
+
_: 1
|
|
1838
|
+
}),
|
|
1839
|
+
a(m, { span: 12 }, {
|
|
1840
|
+
default: u(() => [
|
|
1841
|
+
a(i, {
|
|
1842
|
+
modelValue: y(t).activeComponents.options.textIndent,
|
|
1843
|
+
"onUpdate:modelValue": l[5] || (l[5] = (b) => y(t).activeComponents.options.textIndent = b),
|
|
1844
|
+
"controls-position": "right"
|
|
1845
|
+
}, null, 8, ["modelValue"]),
|
|
1846
|
+
l[11] || (l[11] = C("p", { class: "sub-title" }, "首行缩进", -1))
|
|
1847
|
+
]),
|
|
1848
|
+
_: 1
|
|
1849
|
+
}),
|
|
1850
|
+
a(m, { span: 12 }, {
|
|
1851
|
+
default: u(() => [
|
|
1852
|
+
a(c, {
|
|
1853
|
+
modelValue: y(t).activeComponents.options.textAlign,
|
|
1854
|
+
"onUpdate:modelValue": l[6] || (l[6] = (b) => y(t).activeComponents.options.textAlign = b)
|
|
1855
|
+
}, {
|
|
1856
|
+
default: u(() => [
|
|
1857
|
+
a(f, {
|
|
1858
|
+
label: "左对齐",
|
|
1859
|
+
value: "left"
|
|
1860
|
+
}),
|
|
1861
|
+
a(f, {
|
|
1862
|
+
label: "居中对齐",
|
|
1863
|
+
value: "center"
|
|
1864
|
+
}),
|
|
1865
|
+
a(f, {
|
|
1866
|
+
label: "右对齐",
|
|
1867
|
+
value: "right"
|
|
1868
|
+
})
|
|
1869
|
+
]),
|
|
1870
|
+
_: 1
|
|
1871
|
+
}, 8, ["modelValue"]),
|
|
1872
|
+
l[12] || (l[12] = C("p", { class: "sub-title" }, "位置", -1))
|
|
1873
|
+
]),
|
|
1874
|
+
_: 1
|
|
1875
|
+
})
|
|
1876
|
+
]),
|
|
1877
|
+
_: 1
|
|
1878
|
+
})
|
|
1879
|
+
]),
|
|
1880
|
+
_: 1
|
|
1881
|
+
})
|
|
1882
|
+
]),
|
|
1883
|
+
_: 1
|
|
1884
|
+
});
|
|
1885
|
+
};
|
|
1886
|
+
}
|
|
1887
|
+
});
|
|
1888
|
+
const Mt = /* @__PURE__ */ G(Ht, [["__scopeId", "data-v-56fef84c"]]), jt = /* @__PURE__ */ k({
|
|
1889
|
+
__name: "Setting",
|
|
1890
|
+
setup(n) {
|
|
1891
|
+
const t = {
|
|
1892
|
+
SettingTable: he,
|
|
1893
|
+
SettingCharts: At,
|
|
1894
|
+
SettingDescribe: Ce,
|
|
1895
|
+
SettingText: It,
|
|
1896
|
+
SettingFilter: zt,
|
|
1897
|
+
SettingTitle: Mt
|
|
1898
|
+
}, e = z(), l = F(() => e.activeComponents), r = ["h1", "h2", "h3", "h4"], o = ["p"], s = ["report-table", "bar", "line", "pie", "report-describe"], m = (i) => r.includes(i) ? H(t, "SettingTitle") : o.includes(i) ? H(t, "SettingText") : s.includes(i) ? H(t, "SettingCharts") : i === "filter" ? H(t, "SettingFilter") : "DefaultEditor";
|
|
1899
|
+
return (i, f) => {
|
|
1900
|
+
const c = p("el-card");
|
|
1901
|
+
return d(), S(c, { class: "config-wrapper" }, {
|
|
1902
|
+
default: u(() => [
|
|
1903
|
+
(d(), S(Y(m(l.value.type))))
|
|
1904
|
+
]),
|
|
1905
|
+
_: 1
|
|
1906
|
+
});
|
|
1907
|
+
};
|
|
1908
|
+
}
|
|
1909
|
+
}), Pt = { class: "editor-wrapper flex start" }, Bt = { class: "flex" }, Wt = { class: "btn-group" }, Nt = /* @__PURE__ */ k({
|
|
1910
|
+
__name: "index",
|
|
1911
|
+
props: /* @__PURE__ */ ue({
|
|
1912
|
+
reportId: {
|
|
1913
|
+
type: String,
|
|
1914
|
+
default: ""
|
|
1915
|
+
}
|
|
1916
|
+
}, {
|
|
1917
|
+
modelValue: {},
|
|
1918
|
+
modelModifiers: {}
|
|
1919
|
+
}),
|
|
1920
|
+
emits: ["update:modelValue"],
|
|
1921
|
+
setup(n) {
|
|
1922
|
+
const t = z(), e = n, l = pe(n, "modelValue"), r = (i) => {
|
|
1923
|
+
const f = q(i);
|
|
1924
|
+
f.id = B(), t.componentList.push(f);
|
|
1925
|
+
};
|
|
1926
|
+
function o() {
|
|
1927
|
+
l.value = "table";
|
|
1928
|
+
}
|
|
1929
|
+
function s() {
|
|
1930
|
+
t.getReportDemo(e.reportId);
|
|
1931
|
+
}
|
|
1932
|
+
te(() => {
|
|
1933
|
+
s();
|
|
1934
|
+
});
|
|
1935
|
+
async function m() {
|
|
1936
|
+
if (!t.filterForm.filter_uuid) {
|
|
1937
|
+
Fe.error("请选择筛选条件");
|
|
1938
|
+
return;
|
|
1939
|
+
}
|
|
1940
|
+
try {
|
|
1941
|
+
e.reportId ? await We({
|
|
1942
|
+
report_uuid: e.reportId,
|
|
1943
|
+
data: {
|
|
1944
|
+
report_name: t.titleComponent.data,
|
|
1945
|
+
prod_type: t.prodType,
|
|
1946
|
+
content: [...t.notDraggableList, t.titleComponent, ...t.componentList],
|
|
1947
|
+
...t.filterForm
|
|
1948
|
+
}
|
|
1949
|
+
}) : await Be({
|
|
1950
|
+
data: {
|
|
1951
|
+
report_name: t.titleComponent.data,
|
|
1952
|
+
prod_type: t.prodType,
|
|
1953
|
+
content: [...t.notDraggableList, t.titleComponent, ...t.componentList],
|
|
1954
|
+
...t.filterForm
|
|
1955
|
+
}
|
|
1956
|
+
}), o();
|
|
1957
|
+
} catch (i) {
|
|
1958
|
+
console.log(i, "error");
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
return Re(() => {
|
|
1962
|
+
t.clearComponents();
|
|
1963
|
+
}), (i, f) => {
|
|
1964
|
+
const c = p("el-button"), _ = p("el-button-group"), g = p("el-card");
|
|
1965
|
+
return d(), h("div", Pt, [
|
|
1966
|
+
a(g, { class: "view-wrapper" }, {
|
|
1967
|
+
default: u(() => [
|
|
1968
|
+
C("div", Bt, [
|
|
1969
|
+
C("div", Wt, [
|
|
1970
|
+
a(_, null, {
|
|
1971
|
+
default: u(() => [
|
|
1972
|
+
(d(!0), h(A, null, I(y(et), (b) => (d(), h(A, {
|
|
1973
|
+
key: b.type
|
|
1974
|
+
}, [
|
|
1975
|
+
b != null && b.hide ? R("", !0) : (d(), S(c, {
|
|
1976
|
+
key: 0,
|
|
1977
|
+
onClick: (T) => r(b)
|
|
1978
|
+
}, {
|
|
1979
|
+
default: u(() => [
|
|
1980
|
+
D(W(b.name), 1)
|
|
1981
|
+
]),
|
|
1982
|
+
_: 2
|
|
1983
|
+
}, 1032, ["onClick"]))
|
|
1984
|
+
], 64))), 128))
|
|
1985
|
+
]),
|
|
1986
|
+
_: 1
|
|
1987
|
+
})
|
|
1988
|
+
]),
|
|
1989
|
+
a(_, null, {
|
|
1990
|
+
default: u(() => [
|
|
1991
|
+
a(c, {
|
|
1992
|
+
type: "primary",
|
|
1993
|
+
onClick: m
|
|
1994
|
+
}, {
|
|
1995
|
+
default: u(() => f[0] || (f[0] = [
|
|
1996
|
+
D("保存")
|
|
1997
|
+
])),
|
|
1998
|
+
_: 1
|
|
1999
|
+
}),
|
|
2000
|
+
a(c, { onClick: o }, {
|
|
2001
|
+
default: u(() => f[1] || (f[1] = [
|
|
2002
|
+
D("退出")
|
|
2003
|
+
])),
|
|
2004
|
+
_: 1
|
|
2005
|
+
})
|
|
2006
|
+
]),
|
|
2007
|
+
_: 1
|
|
2008
|
+
})
|
|
2009
|
+
]),
|
|
2010
|
+
a(St)
|
|
2011
|
+
]),
|
|
2012
|
+
_: 1
|
|
2013
|
+
}),
|
|
2014
|
+
a(jt)
|
|
2015
|
+
]);
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
}), Ot = {
|
|
2019
|
+
class: "table-box"
|
|
2020
|
+
}, Yt = /* @__PURE__ */ k({
|
|
2021
|
+
__name: "Report",
|
|
2022
|
+
props: {
|
|
2023
|
+
prodType: {}
|
|
2024
|
+
},
|
|
2025
|
+
emits: ["click"],
|
|
2026
|
+
setup(n, {
|
|
2027
|
+
emit: t
|
|
2028
|
+
}) {
|
|
2029
|
+
const e = n, l = F(() => ({
|
|
2030
|
+
prod_type: e.prodType
|
|
2031
|
+
})), r = $(), o = t, s = (g) => {
|
|
2032
|
+
o("click", g.report_uuid, "review");
|
|
2033
|
+
}, m = (g) => {
|
|
2034
|
+
o("click", g.report_uuid, "editor");
|
|
2035
|
+
}, i = () => {
|
|
2036
|
+
o("click", "", "editor");
|
|
2037
|
+
}, f = (g) => {
|
|
2038
|
+
console.log(g);
|
|
2039
|
+
}, c = (g) => {
|
|
2040
|
+
window.$messageBox("确定要删除吗?", "", "温馨提示", "error").then(async () => {
|
|
2041
|
+
await Ye({
|
|
2042
|
+
report_uuids: g
|
|
2043
|
+
}), r.value.getTableList();
|
|
2044
|
+
});
|
|
2045
|
+
}, _ = Ue([
|
|
2046
|
+
// { type: 'selection', fixed: 'left', width: 70 },
|
|
2047
|
+
{
|
|
2048
|
+
type: "selection",
|
|
2049
|
+
width: 80
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
field: "report_name",
|
|
2053
|
+
name: "名称",
|
|
2054
|
+
search: {
|
|
2055
|
+
type: "input"
|
|
2056
|
+
}
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
field: "report_desc",
|
|
2060
|
+
name: "报表描述"
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
field: "create_time",
|
|
2064
|
+
name: "创建时间"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
field: "operation",
|
|
2068
|
+
width: 140,
|
|
2069
|
+
name: "操作",
|
|
2070
|
+
align: "center",
|
|
2071
|
+
fixed: "right",
|
|
2072
|
+
render: (g) => a("div", null, [a(p("el-button"), {
|
|
2073
|
+
link: !0,
|
|
2074
|
+
type: "primary",
|
|
2075
|
+
class: "custom-btn",
|
|
2076
|
+
icon: "View",
|
|
2077
|
+
title: "预览",
|
|
2078
|
+
onClick: () => s(g.row)
|
|
2079
|
+
}, null), a(p("el-button"), {
|
|
2080
|
+
link: !0,
|
|
2081
|
+
type: "primary",
|
|
2082
|
+
class: "custom-btn",
|
|
2083
|
+
icon: "Edit",
|
|
2084
|
+
title: "编辑",
|
|
2085
|
+
onClick: () => m(g.row)
|
|
2086
|
+
}, null), a(p("el-button"), {
|
|
2087
|
+
link: !0,
|
|
2088
|
+
type: "danger",
|
|
2089
|
+
icon: "Delete",
|
|
2090
|
+
title: "删除",
|
|
2091
|
+
onClick: () => c([g.row.report_uuid])
|
|
2092
|
+
}, null)])
|
|
2093
|
+
}
|
|
2094
|
+
]);
|
|
2095
|
+
return (g, b) => {
|
|
2096
|
+
const T = p("el-button"), V = p("TdsTable");
|
|
2097
|
+
return d(), h("div", Ot, [a(V, {
|
|
2098
|
+
ref_key: "proTable",
|
|
2099
|
+
ref: r,
|
|
2100
|
+
columns: _,
|
|
2101
|
+
"request-api": y(Ne),
|
|
2102
|
+
"init-param": l.value,
|
|
2103
|
+
"row-key": "report_uuid",
|
|
2104
|
+
options: g.$tableOptions(),
|
|
2105
|
+
"search-col": 6,
|
|
2106
|
+
onSelectionChange: f
|
|
2107
|
+
}, {
|
|
2108
|
+
tableHeader: u((v) => [a(T, {
|
|
2109
|
+
plain: "",
|
|
2110
|
+
type: "primary",
|
|
2111
|
+
class: "custom-btn",
|
|
2112
|
+
icon: "Plus",
|
|
2113
|
+
onClick: i
|
|
2114
|
+
}, {
|
|
2115
|
+
default: u(() => b[0] || (b[0] = [D("添加")])),
|
|
2116
|
+
_: 1
|
|
2117
|
+
}), a(T, {
|
|
2118
|
+
plain: "",
|
|
2119
|
+
type: "danger",
|
|
2120
|
+
icon: "Delete",
|
|
2121
|
+
onClick: (x) => c(v.selectedListIds)
|
|
2122
|
+
}, {
|
|
2123
|
+
default: u(() => b[1] || (b[1] = [D("删除")])),
|
|
2124
|
+
_: 2
|
|
2125
|
+
}, 1032, ["onClick"])]),
|
|
2126
|
+
_: 1
|
|
2127
|
+
}, 8, ["columns", "request-api", "init-param", "options"])]);
|
|
2128
|
+
};
|
|
2129
|
+
}
|
|
2130
|
+
});
|
|
2131
|
+
const qt = { style: { height: "100%" } }, Gt = /* @__PURE__ */ k({
|
|
3
2132
|
name: "TCReport",
|
|
4
2133
|
__name: "index",
|
|
5
|
-
setup(
|
|
6
|
-
|
|
2134
|
+
setup(n) {
|
|
2135
|
+
const t = $(), e = $("table"), l = (r, o) => {
|
|
2136
|
+
t.value = r, e.value = o;
|
|
2137
|
+
};
|
|
2138
|
+
return (r, o) => (d(), h("div", qt, [
|
|
2139
|
+
a(De, { name: "slide-fade" }, {
|
|
2140
|
+
default: u(() => [
|
|
2141
|
+
e.value === "table" ? (d(), S(Yt, {
|
|
2142
|
+
key: 0,
|
|
2143
|
+
onClick: l,
|
|
2144
|
+
"prod-type": "4"
|
|
2145
|
+
})) : R("", !0),
|
|
2146
|
+
e.value === "review" ? (d(), S(yt, {
|
|
2147
|
+
key: 1,
|
|
2148
|
+
"report-id": t.value,
|
|
2149
|
+
modelValue: e.value,
|
|
2150
|
+
"onUpdate:modelValue": o[0] || (o[0] = (s) => e.value = s)
|
|
2151
|
+
}, null, 8, ["report-id", "modelValue"])) : R("", !0),
|
|
2152
|
+
e.value === "editor" ? (d(), S(Nt, {
|
|
2153
|
+
key: 2,
|
|
2154
|
+
"report-id": t.value,
|
|
2155
|
+
modelValue: e.value,
|
|
2156
|
+
"onUpdate:modelValue": o[1] || (o[1] = (s) => e.value = s)
|
|
2157
|
+
}, null, 8, ["report-id", "modelValue"])) : R("", !0)
|
|
2158
|
+
]),
|
|
2159
|
+
_: 1
|
|
2160
|
+
})
|
|
2161
|
+
]));
|
|
7
2162
|
}
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2163
|
+
});
|
|
2164
|
+
const Jt = (n, t) => {
|
|
2165
|
+
if (n.install = (e) => {
|
|
2166
|
+
for (const l of [n, ...Object.values(t ?? {})])
|
|
2167
|
+
e.component(l.name, l);
|
|
12
2168
|
}, t)
|
|
13
|
-
for (const [
|
|
14
|
-
e
|
|
15
|
-
return
|
|
16
|
-
},
|
|
17
|
-
TCReport:
|
|
18
|
-
},
|
|
19
|
-
install(
|
|
20
|
-
Object.entries(
|
|
21
|
-
|
|
2169
|
+
for (const [e, l] of Object.entries(t))
|
|
2170
|
+
n[e] = l;
|
|
2171
|
+
return n;
|
|
2172
|
+
}, Kt = Jt(Gt), Qt = {
|
|
2173
|
+
TCReport: Kt
|
|
2174
|
+
}, lo = {
|
|
2175
|
+
install(n) {
|
|
2176
|
+
Object.entries(Qt).forEach(([t, e]) => {
|
|
2177
|
+
n.component(t, e);
|
|
22
2178
|
});
|
|
23
2179
|
}
|
|
24
2180
|
};
|
|
25
2181
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
2182
|
+
Kt as TCReport,
|
|
2183
|
+
lo as default
|
|
28
2184
|
};
|