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