@topdatasec/report 1.0.6 → 1.0.8
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 +1 -1
- package/dist/index.js +790 -245
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/es/_virtual/_plugin-vue_export-helper.js +9 -0
- package/es/bar/Bar.vue.js +6 -8
- package/es/components.d.ts +2 -0
- package/es/components.js +6 -2
- package/es/config/Config.css +1 -0
- package/es/config/Config.d.ts +2 -0
- package/es/config/Config.vue.js +7 -0
- package/es/config/Config.vue2.js +207 -0
- package/es/config/index.d.ts +14 -0
- package/es/config/index.js +6 -0
- package/es/index.js +26 -22
- package/es/line/Line.d.ts +5 -0
- package/es/line/Line.vue.js +20 -0
- package/es/line/Line.vue2.js +4 -0
- package/es/line/index.d.ts +15 -0
- package/es/line/index.js +6 -0
- package/es/pie/Pie.d.ts +5 -0
- package/es/pie/index.d.ts +15 -0
- package/es/report/Report.d.ts +7 -0
- package/es/report/index.d.ts +17 -0
- package/es/select/Select.d.ts +9 -0
- package/es/select/index.d.ts +25 -0
- package/es/settingCharts/SettingCharts.d.ts +5 -0
- package/es/settingCharts/index.d.ts +14 -0
- package/es/settingFilter/index.d.ts +15 -0
- package/es/settingFilter/settingFilter.d.ts +5 -0
- package/es/settingTable/SettingTable.d.ts +2 -0
- package/es/settingTable/index.d.ts +14 -0
- package/es/settingText/index.d.ts +15 -0
- package/es/settingText/settingText.d.ts +5 -0
- package/es/settingTitle/index.d.ts +14 -0
- package/es/settingTitle/settingTitle.d.ts +2 -0
- package/es/stores/interface/index.d.ts +18 -0
- package/es/stores/modules/report.d.ts +35 -0
- package/es/stores/modules/report.js +45 -0
- package/es/table/Table.d.ts +5 -0
- package/es/table/index.d.ts +15 -0
- package/es/text/Text.d.ts +5 -0
- package/es/text/index.d.ts +15 -0
- package/es/time/Time.d.ts +9 -0
- package/es/time/index.d.ts +25 -0
- package/es/utils/api.d.ts +12 -0
- package/es/utils/api.js +9 -0
- package/es/utils/chartsOption.d.ts +298 -0
- package/es/utils/chartsOption.js +187 -0
- package/es/utils/data.d.ts +4 -0
- package/es/utils/data.js +101 -0
- package/es/utils/index.d.ts +2 -0
- package/es/utils/index.js +82 -79
- package/es/utils/type.js +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/lib/bar/Bar.vue.cjs +1 -1
- package/lib/components.cjs +1 -1
- package/lib/components.d.ts +2 -0
- package/lib/config/Config.css +1 -0
- package/lib/config/Config.d.ts +2 -0
- package/lib/config/Config.vue.cjs +1 -0
- package/lib/config/Config.vue2.cjs +1 -0
- package/lib/config/index.cjs +1 -0
- package/lib/config/index.d.ts +14 -0
- package/lib/index.cjs +1 -1
- package/lib/line/Line.d.ts +5 -0
- package/lib/line/Line.vue.cjs +1 -0
- package/lib/line/Line.vue2.cjs +1 -0
- package/lib/line/index.cjs +1 -0
- package/lib/line/index.d.ts +15 -0
- package/lib/pie/Pie.d.ts +5 -0
- package/lib/pie/index.d.ts +15 -0
- package/lib/report/Report.d.ts +7 -0
- package/lib/report/index.d.ts +17 -0
- package/lib/select/Select.d.ts +9 -0
- package/lib/select/index.d.ts +25 -0
- package/lib/settingCharts/SettingCharts.d.ts +5 -0
- package/lib/settingCharts/index.d.ts +14 -0
- package/lib/settingFilter/index.d.ts +15 -0
- package/lib/settingFilter/settingFilter.d.ts +5 -0
- package/lib/settingTable/SettingTable.d.ts +2 -0
- package/lib/settingTable/index.d.ts +14 -0
- package/lib/settingText/index.d.ts +15 -0
- package/lib/settingText/settingText.d.ts +5 -0
- package/lib/settingTitle/index.d.ts +14 -0
- package/lib/settingTitle/settingTitle.d.ts +2 -0
- package/lib/stores/interface/index.d.ts +18 -0
- package/lib/stores/modules/report.cjs +1 -0
- package/lib/stores/modules/report.d.ts +35 -0
- package/lib/table/Table.d.ts +5 -0
- package/lib/table/index.d.ts +15 -0
- package/lib/text/Text.d.ts +5 -0
- package/lib/text/index.d.ts +15 -0
- package/lib/time/Time.d.ts +9 -0
- package/lib/time/index.d.ts +25 -0
- package/lib/utils/api.cjs +1 -0
- package/lib/utils/api.d.ts +12 -0
- package/lib/utils/chartsOption.cjs +1 -0
- package/lib/utils/chartsOption.d.ts +298 -0
- package/lib/utils/data.cjs +1 -0
- package/lib/utils/data.d.ts +4 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/type.cjs +1 -1
- package/package.json +9 -4
package/dist/index.js
CHANGED
|
@@ -1,184 +1,186 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
|
|
1
|
+
import { defineComponent as z, computed as S, resolveComponent as h, createElementBlock as B, openBlock as x, createVNode as d, onMounted as I, onUnmounted as Z, ref as v, toValue as $, watch as H, onBeforeUnmount as O, useSlots as K, reactive as X, getCurrentInstance as Q, Comment as ee, Text as te, createCommentVNode as F, withCtx as f, createElementVNode as _, createBlock as U, Fragment as oe, renderList as ne, toDisplayString as se } from "vue";
|
|
2
|
+
import { defineStore as ae } from "pinia";
|
|
3
|
+
import "echarts";
|
|
4
|
+
const re = { class: "chart-components" }, le = /* @__PURE__ */ z({
|
|
3
5
|
name: "TdsReportBar",
|
|
4
6
|
__name: "Bar",
|
|
5
7
|
props: {
|
|
6
8
|
data: {}
|
|
7
9
|
},
|
|
8
|
-
setup(
|
|
9
|
-
const t =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return U(), H("div", C, [
|
|
15
|
-
V(s, { option: n.value }, null, 8, ["option"])
|
|
10
|
+
setup(t) {
|
|
11
|
+
const o = t, e = S(() => o.data.options);
|
|
12
|
+
return (n, s) => {
|
|
13
|
+
const r = h("TdsChart");
|
|
14
|
+
return x(), B("div", re, [
|
|
15
|
+
d(r, { option: e.value }, null, 8, ["option"])
|
|
16
16
|
]);
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
}),
|
|
20
|
-
const
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
}), N = (t) => {
|
|
20
|
+
const o = t;
|
|
21
|
+
return o.install = function(e) {
|
|
22
|
+
e.component(o.name, t);
|
|
23
|
+
}, t;
|
|
24
|
+
}, ie = N(le), W = window.$envURL, ue = (t) => W.request({
|
|
25
|
+
url: `${W}/tds/report/demo/get`,
|
|
26
|
+
method: "get",
|
|
27
|
+
params: t,
|
|
28
|
+
isError: !1
|
|
29
|
+
});
|
|
30
|
+
function Ue(t = Date.now(), o = "YYYY-MM-DD HH:mm:ss") {
|
|
29
31
|
try {
|
|
30
|
-
let
|
|
31
|
-
if (typeof
|
|
32
|
-
if (
|
|
32
|
+
let e;
|
|
33
|
+
if (typeof t == "number" || typeof t == "string") {
|
|
34
|
+
if (e = new Date(t), isNaN(e.getTime()))
|
|
33
35
|
throw new Error("Invalid date");
|
|
34
36
|
} else
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
switch (
|
|
37
|
+
e = t;
|
|
38
|
+
const n = (r, l = 2) => String(r).padStart(l, "0"), s = (r) => {
|
|
39
|
+
switch (r) {
|
|
38
40
|
case "YYYY":
|
|
39
|
-
return
|
|
41
|
+
return n(e.getFullYear());
|
|
40
42
|
case "YY":
|
|
41
|
-
return
|
|
43
|
+
return n(e.getFullYear()).slice(2, 4);
|
|
42
44
|
case "MM":
|
|
43
|
-
return
|
|
45
|
+
return n(e.getMonth() + 1);
|
|
44
46
|
case "M":
|
|
45
|
-
return String(
|
|
47
|
+
return String(e.getMonth() + 1);
|
|
46
48
|
case "DD":
|
|
47
|
-
return
|
|
49
|
+
return n(e.getDate());
|
|
48
50
|
case "D":
|
|
49
|
-
return String(
|
|
51
|
+
return String(e.getDate());
|
|
50
52
|
case "HH":
|
|
51
|
-
return
|
|
53
|
+
return n(e.getHours());
|
|
52
54
|
case "H":
|
|
53
|
-
return String(
|
|
55
|
+
return String(e.getHours());
|
|
54
56
|
case "mm":
|
|
55
|
-
return
|
|
57
|
+
return n(e.getMinutes());
|
|
56
58
|
case "m":
|
|
57
|
-
return String(
|
|
59
|
+
return String(e.getMinutes());
|
|
58
60
|
case "ss":
|
|
59
|
-
return
|
|
61
|
+
return n(e.getSeconds());
|
|
60
62
|
case "s":
|
|
61
|
-
return String(
|
|
63
|
+
return String(e.getSeconds());
|
|
62
64
|
case "SSS":
|
|
63
|
-
return
|
|
65
|
+
return n(e.getMilliseconds(), 3);
|
|
64
66
|
default:
|
|
65
|
-
return
|
|
67
|
+
return r;
|
|
66
68
|
}
|
|
67
69
|
};
|
|
68
|
-
return
|
|
69
|
-
} catch (
|
|
70
|
-
return console.error("Error formatting date:",
|
|
70
|
+
return o.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g, s);
|
|
71
|
+
} catch (e) {
|
|
72
|
+
return console.error("Error formatting date:", e), "";
|
|
71
73
|
}
|
|
72
74
|
}
|
|
73
|
-
function
|
|
74
|
-
typeof
|
|
75
|
-
const
|
|
76
|
-
if (isNaN(
|
|
75
|
+
function Be(t, o = 2, e = ",", n = ".", s, r) {
|
|
76
|
+
typeof t != "number" && typeof t != "string" && console.warn("Expected value to be of type number or string"), typeof o != "number" && console.warn("Expected precision to be of type number");
|
|
77
|
+
const l = Number(t);
|
|
78
|
+
if (isNaN(l) || !isFinite(l))
|
|
77
79
|
return "";
|
|
78
|
-
if (
|
|
79
|
-
return
|
|
80
|
-
let
|
|
81
|
-
if (typeof
|
|
82
|
-
const [i,
|
|
83
|
-
|
|
80
|
+
if (l === 0)
|
|
81
|
+
return l.toFixed(o);
|
|
82
|
+
let u = l.toFixed(o);
|
|
83
|
+
if (typeof e == "string" && e !== "") {
|
|
84
|
+
const [i, a] = u.split(".");
|
|
85
|
+
u = i.replace(/(\d)(?=(\d{3})+$)/g, "$1" + e) + (a ? n + a : "");
|
|
84
86
|
}
|
|
85
|
-
return (
|
|
87
|
+
return (s || "") + u + (r || "");
|
|
86
88
|
}
|
|
87
|
-
function
|
|
88
|
-
let
|
|
89
|
-
function
|
|
90
|
-
if (
|
|
89
|
+
function Oe(t, o = 0, e = !1) {
|
|
90
|
+
let n = null;
|
|
91
|
+
function s(l) {
|
|
92
|
+
if (n || (n = l), l - n >= o) {
|
|
91
93
|
try {
|
|
92
|
-
|
|
94
|
+
t();
|
|
93
95
|
} catch (i) {
|
|
94
96
|
console.error("Error executing rafTimeout function:", i);
|
|
95
97
|
}
|
|
96
|
-
|
|
98
|
+
e && (n = l, r.id = requestAnimationFrame(s));
|
|
97
99
|
} else
|
|
98
|
-
|
|
100
|
+
r.id = requestAnimationFrame(s);
|
|
99
101
|
}
|
|
100
|
-
const
|
|
101
|
-
id: requestAnimationFrame(
|
|
102
|
+
const r = {
|
|
103
|
+
id: requestAnimationFrame(s)
|
|
102
104
|
};
|
|
103
|
-
return
|
|
105
|
+
return r;
|
|
104
106
|
}
|
|
105
|
-
function
|
|
106
|
-
|
|
107
|
+
function Ye(t) {
|
|
108
|
+
t && t.id && typeof t.id == "number" ? cancelAnimationFrame(t.id) : console.warn("cancelRaf received an invalid id:", t);
|
|
107
109
|
}
|
|
108
|
-
function
|
|
109
|
-
let
|
|
110
|
-
return function(...
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
},
|
|
110
|
+
function ce(t, o = 300) {
|
|
111
|
+
let e = !0;
|
|
112
|
+
return function(...n) {
|
|
113
|
+
return e && (t(...n), e = !1, setTimeout(() => {
|
|
114
|
+
e = !0;
|
|
115
|
+
}, o)), !1;
|
|
114
116
|
};
|
|
115
117
|
}
|
|
116
|
-
function
|
|
117
|
-
let
|
|
118
|
-
return function(...
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
118
|
+
function de(t, o = 300) {
|
|
119
|
+
let e = null;
|
|
120
|
+
return function(...n) {
|
|
121
|
+
e && clearTimeout(e), e = setTimeout(() => {
|
|
122
|
+
t(...n);
|
|
123
|
+
}, o);
|
|
122
124
|
};
|
|
123
125
|
}
|
|
124
|
-
function
|
|
125
|
-
if (Number.isNaN(
|
|
126
|
+
function ze(t, o) {
|
|
127
|
+
if (Number.isNaN(t) || Number.isNaN(o))
|
|
126
128
|
throw new Error("Both num1 and num2 must be valid numbers.");
|
|
127
|
-
const
|
|
128
|
-
if (!
|
|
129
|
-
return
|
|
130
|
-
const
|
|
131
|
-
return (+i.replace(".", "") + +
|
|
129
|
+
const e = t % 1 !== 0, n = o % 1 !== 0;
|
|
130
|
+
if (!e && !n)
|
|
131
|
+
return t + o;
|
|
132
|
+
const s = String(t).split(".")[1] ?? "", r = String(o).split(".")[1] ?? "", l = Math.max(s.length, r.length), u = Math.pow(10, l), i = t.toFixed(l), a = o.toFixed(l);
|
|
133
|
+
return (+i.replace(".", "") + +a.replace(".", "")) / u;
|
|
132
134
|
}
|
|
133
|
-
function
|
|
134
|
-
if (!
|
|
135
|
+
function Ie(t, o) {
|
|
136
|
+
if (!t) {
|
|
135
137
|
console.error("无效的 url");
|
|
136
138
|
return;
|
|
137
139
|
}
|
|
138
|
-
const
|
|
140
|
+
const e = o || t.split("?")[0].split("/").pop() || "download";
|
|
139
141
|
try {
|
|
140
|
-
fetch(
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
}) : console.error("请求文件失败,状态码:",
|
|
142
|
+
fetch(t).then((n) => {
|
|
143
|
+
n.ok ? n.blob().then((s) => {
|
|
144
|
+
const r = URL.createObjectURL(s), l = document.createElement("a");
|
|
145
|
+
l.href = r, l.download = e, document.body.appendChild(l), l.click(), document.body.removeChild(l), URL.revokeObjectURL(r);
|
|
146
|
+
}) : console.error("请求文件失败,状态码:", n.status);
|
|
145
147
|
});
|
|
146
|
-
} catch (
|
|
147
|
-
console.error("文件下载失败:",
|
|
148
|
+
} catch (n) {
|
|
149
|
+
console.error("文件下载失败:", n);
|
|
148
150
|
}
|
|
149
151
|
}
|
|
150
|
-
function
|
|
151
|
-
const
|
|
152
|
-
|
|
152
|
+
function He() {
|
|
153
|
+
const t = document.documentElement;
|
|
154
|
+
t.classList.toggle("dark"), t.classList.contains("dark") ? t.style.colorScheme = "dark" : t.style.colorScheme = "light";
|
|
153
155
|
}
|
|
154
|
-
function
|
|
155
|
-
const
|
|
156
|
-
return
|
|
157
|
-
|
|
158
|
-
},
|
|
156
|
+
function pe() {
|
|
157
|
+
const t = v(!1), o = Q();
|
|
158
|
+
return o && I(() => {
|
|
159
|
+
t.value = !0;
|
|
160
|
+
}, o), t;
|
|
159
161
|
}
|
|
160
|
-
function
|
|
161
|
-
const
|
|
162
|
-
return
|
|
162
|
+
function q(t) {
|
|
163
|
+
const o = pe();
|
|
164
|
+
return S(() => (o.value, !!t()));
|
|
163
165
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
166
|
+
function Ne(t, o, e) {
|
|
167
|
+
I(() => t.addEventListener(o, e)), Z(() => t.removeEventListener(o, e));
|
|
166
168
|
}
|
|
167
|
-
function
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
return
|
|
173
|
-
}),
|
|
174
|
-
|
|
169
|
+
function We(t, o, e = {}) {
|
|
170
|
+
const n = q(() => window && "MutationObserver" in window), s = v(!1);
|
|
171
|
+
let r;
|
|
172
|
+
const l = S(() => {
|
|
173
|
+
const m = $(t);
|
|
174
|
+
return m ? Array.isArray(m) ? m.map((g) => $(g)).filter((g) => g) : [m] : [];
|
|
175
|
+
}), u = () => {
|
|
176
|
+
r && (r.disconnect(), r = void 0);
|
|
175
177
|
}, i = () => {
|
|
176
|
-
|
|
178
|
+
n.value && l.value.length && !s.value && (r = new MutationObserver(o), l.value.forEach((m) => r.observe(m, e)));
|
|
177
179
|
};
|
|
178
|
-
|
|
179
|
-
() =>
|
|
180
|
+
H(
|
|
181
|
+
() => l.value,
|
|
180
182
|
() => {
|
|
181
|
-
|
|
183
|
+
u(), i();
|
|
182
184
|
},
|
|
183
185
|
{
|
|
184
186
|
immediate: !0,
|
|
@@ -186,38 +188,38 @@ function ue(e, t, n = {}) {
|
|
|
186
188
|
flush: "post"
|
|
187
189
|
}
|
|
188
190
|
);
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
|
|
191
|
+
const a = () => {
|
|
192
|
+
s.value = !0, u();
|
|
193
|
+
}, y = () => {
|
|
194
|
+
s.value = !1, i();
|
|
193
195
|
};
|
|
194
|
-
return
|
|
195
|
-
stop:
|
|
196
|
-
start:
|
|
196
|
+
return O(() => u()), {
|
|
197
|
+
stop: a,
|
|
198
|
+
start: y
|
|
197
199
|
};
|
|
198
200
|
}
|
|
199
|
-
function
|
|
200
|
-
const
|
|
201
|
-
function
|
|
201
|
+
function je(t = window, o = 0, e, n) {
|
|
202
|
+
const s = v(0), r = v(0), l = v(0), u = v(0), i = v(!1), a = v(!1), y = v(!1), m = v(!1), g = v(!1), b = v(0), E = v(0);
|
|
203
|
+
function M(c) {
|
|
202
204
|
i.value = !0;
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
+
const w = c.target.documentElement ?? c.target;
|
|
206
|
+
s.value = w.scrollLeft, l.value = w.scrollTop, a.value = s.value < b.value, y.value = s.value > b.value, m.value = l.value < E.value, g.value = l.value > E.value, b.value = s.value, E.value = l.value, D(c), e && e(c);
|
|
205
207
|
}
|
|
206
|
-
const L =
|
|
207
|
-
function
|
|
208
|
-
i.value && (i.value = !1,
|
|
208
|
+
const L = ce(M, o);
|
|
209
|
+
function k(c) {
|
|
210
|
+
i.value && (i.value = !1, a.value = !1, y.value = !1, m.value = !1, g.value = !1, n && n(c));
|
|
209
211
|
}
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
return
|
|
212
|
+
const D = de(k, o + 200), p = S(() => {
|
|
213
|
+
const c = $(t);
|
|
214
|
+
return c || null;
|
|
213
215
|
});
|
|
214
|
-
|
|
215
|
-
() =>
|
|
216
|
-
(
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
|
|
216
|
+
H(
|
|
217
|
+
() => p.value,
|
|
218
|
+
(c, w) => {
|
|
219
|
+
var A;
|
|
220
|
+
if (w && V(w), c) {
|
|
221
|
+
const C = ((A = c == null ? void 0 : c.document) == null ? void 0 : A.documentElement) || (c == null ? void 0 : c.documentElement) || c;
|
|
222
|
+
r.value = C.scrollWidth - C.clientWidth, u.value = C.scrollHeight - C.clientHeight, C.addEventListener("scroll", L), C.addEventListener("scrollend", D);
|
|
221
223
|
}
|
|
222
224
|
},
|
|
223
225
|
{
|
|
@@ -225,52 +227,52 @@ function fe(e = window, t = 0, n, r) {
|
|
|
225
227
|
flush: "post"
|
|
226
228
|
}
|
|
227
229
|
);
|
|
228
|
-
function
|
|
229
|
-
var
|
|
230
|
-
const
|
|
231
|
-
|
|
230
|
+
function V(c) {
|
|
231
|
+
var A;
|
|
232
|
+
const w = ((A = c == null ? void 0 : c.document) == null ? void 0 : A.documentElement) || (c == null ? void 0 : c.documentElement) || c;
|
|
233
|
+
w.removeEventListener("scroll", L), w.removeEventListener("scrollend", D);
|
|
232
234
|
}
|
|
233
|
-
return
|
|
235
|
+
return O(() => V(p.value)), { x: s, xScrollMax: r, y: l, yScrollMax: u, isScrolling: i, left: a, right: y, top: m, bottom: g };
|
|
234
236
|
}
|
|
235
|
-
function
|
|
236
|
-
const
|
|
237
|
-
let
|
|
238
|
-
const
|
|
239
|
-
if (
|
|
240
|
-
const
|
|
241
|
-
|
|
237
|
+
function qe() {
|
|
238
|
+
const t = v(0), o = v(0);
|
|
239
|
+
let e = performance.now();
|
|
240
|
+
const n = 10, s = (r) => {
|
|
241
|
+
if (o.value++, o.value >= n) {
|
|
242
|
+
const l = r - e;
|
|
243
|
+
t.value = Math.round(1e3 / (l / n)), e = r, o.value = 0;
|
|
242
244
|
}
|
|
243
|
-
requestAnimationFrame(
|
|
245
|
+
requestAnimationFrame(s);
|
|
244
246
|
};
|
|
245
|
-
return requestAnimationFrame(
|
|
247
|
+
return requestAnimationFrame(s), { fps: t };
|
|
246
248
|
}
|
|
247
|
-
function
|
|
248
|
-
if (!
|
|
249
|
+
function Pe(t) {
|
|
250
|
+
if (!t || typeof t != "string" || t.trim() === "")
|
|
249
251
|
throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
+
const o = v(window && window.matchMedia(t).matches), e = window.matchMedia(t), n = (s) => {
|
|
253
|
+
o.value = s.matches;
|
|
252
254
|
};
|
|
253
|
-
return
|
|
254
|
-
|
|
255
|
-
}),
|
|
256
|
-
|
|
257
|
-
}), { match:
|
|
255
|
+
return I(() => {
|
|
256
|
+
e.addEventListener("change", n);
|
|
257
|
+
}), O(() => {
|
|
258
|
+
e.removeEventListener("change", n);
|
|
259
|
+
}), { match: o };
|
|
258
260
|
}
|
|
259
|
-
function
|
|
260
|
-
const
|
|
261
|
-
let
|
|
262
|
-
const
|
|
263
|
-
const
|
|
264
|
-
return
|
|
265
|
-
}),
|
|
266
|
-
|
|
261
|
+
function Ge(t, o, e = {}) {
|
|
262
|
+
const n = q(() => window && "ResizeObserver" in window);
|
|
263
|
+
let s;
|
|
264
|
+
const r = v(!1), l = S(() => {
|
|
265
|
+
const m = $(t);
|
|
266
|
+
return m ? Array.isArray(m) ? m.map((g) => $(g)).filter((g) => g) : [m] : [];
|
|
267
|
+
}), u = () => {
|
|
268
|
+
s && (s.disconnect(), s = void 0);
|
|
267
269
|
}, i = () => {
|
|
268
|
-
|
|
270
|
+
n.value && l.value.length && !r.value && (s = new ResizeObserver(o), l.value.forEach((m) => s.observe(m, e)));
|
|
269
271
|
};
|
|
270
|
-
|
|
271
|
-
() =>
|
|
272
|
+
H(
|
|
273
|
+
() => l.value,
|
|
272
274
|
() => {
|
|
273
|
-
|
|
275
|
+
u(), i();
|
|
274
276
|
},
|
|
275
277
|
{
|
|
276
278
|
immediate: !0,
|
|
@@ -278,97 +280,640 @@ function ve(e, t, n = {}) {
|
|
|
278
280
|
flush: "post"
|
|
279
281
|
}
|
|
280
282
|
);
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
},
|
|
284
|
-
|
|
283
|
+
const a = () => {
|
|
284
|
+
r.value = !0, u();
|
|
285
|
+
}, y = () => {
|
|
286
|
+
r.value = !1, i();
|
|
285
287
|
};
|
|
286
|
-
return
|
|
287
|
-
stop:
|
|
288
|
-
start:
|
|
288
|
+
return O(() => u()), {
|
|
289
|
+
stop: a,
|
|
290
|
+
start: y
|
|
289
291
|
};
|
|
290
292
|
}
|
|
291
|
-
function
|
|
292
|
-
const
|
|
293
|
-
var
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
293
|
+
function Je(t = "default") {
|
|
294
|
+
const o = K(), e = (n) => {
|
|
295
|
+
var l;
|
|
296
|
+
const s = (l = o[n]) == null ? void 0 : l.call(o), r = (u) => {
|
|
297
|
+
if (u.type === ee || Array.isArray(u.children) && !u.children.length)
|
|
296
298
|
return !1;
|
|
297
|
-
if (
|
|
299
|
+
if (u.type !== te)
|
|
298
300
|
return !0;
|
|
299
|
-
if (typeof
|
|
300
|
-
return
|
|
301
|
+
if (typeof u.children == "string")
|
|
302
|
+
return u.children.trim() !== "";
|
|
301
303
|
};
|
|
302
|
-
return
|
|
304
|
+
return s && (s != null && s.length) ? s.some((i) => r(i)) : !1;
|
|
303
305
|
};
|
|
304
|
-
if (Array.isArray(
|
|
305
|
-
const
|
|
306
|
-
return
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
}),
|
|
306
|
+
if (Array.isArray(t)) {
|
|
307
|
+
const n = X({});
|
|
308
|
+
return t.forEach((s) => {
|
|
309
|
+
const r = S(() => e(s));
|
|
310
|
+
n[s] = r;
|
|
311
|
+
}), n;
|
|
310
312
|
} else
|
|
311
|
-
return
|
|
313
|
+
return S(() => e(t));
|
|
312
314
|
}
|
|
313
|
-
const R = {
|
|
315
|
+
const R = () => (/* @__PURE__ */ new Date()).getTime().toString(36) + "-" + Math.random().toString(36).substring(2, 9), me = (t) => JSON.parse(JSON.stringify(t)), fe = "rgba(51, 51, 51, 0.15)", Y = "rgba(51, 51, 51, 1)", ve = 12, ge = (t = !1) => {
|
|
316
|
+
const o = {
|
|
317
|
+
// top: '2%',
|
|
318
|
+
left: "3%",
|
|
319
|
+
right: "3%",
|
|
320
|
+
bottom: "2%",
|
|
321
|
+
containLabel: !0
|
|
322
|
+
};
|
|
323
|
+
return t && (o.top = "5%"), o;
|
|
324
|
+
}, T = [
|
|
325
|
+
"46, 145, 255",
|
|
326
|
+
"48, 212, 183",
|
|
327
|
+
"108, 108, 255",
|
|
328
|
+
"109, 237, 124",
|
|
329
|
+
"128, 218, 236",
|
|
330
|
+
"58, 200, 218",
|
|
331
|
+
"146, 218, 89",
|
|
332
|
+
"118, 218, 218",
|
|
333
|
+
"143, 192, 244",
|
|
334
|
+
"192, 192, 145",
|
|
335
|
+
"153, 136, 204",
|
|
336
|
+
"212, 217, 230",
|
|
337
|
+
"124, 186, 255",
|
|
338
|
+
"209, 182, 225",
|
|
339
|
+
"255, 197, 84",
|
|
340
|
+
"249, 140, 106",
|
|
341
|
+
"246, 179, 82",
|
|
342
|
+
"100, 161, 206",
|
|
343
|
+
"246, 175, 159",
|
|
344
|
+
"238, 97, 97"
|
|
345
|
+
], be = (t = [
|
|
346
|
+
{
|
|
347
|
+
name: "数据1",
|
|
348
|
+
value: 63
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "数据2",
|
|
352
|
+
value: 45
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: "数据3",
|
|
356
|
+
value: 43
|
|
357
|
+
}
|
|
358
|
+
], o = { name: "name", value: "value" }) => {
|
|
359
|
+
const e = (s = "rgba(46, 145, 255, 0.7)", r = "rgba(46, 145, 255, 0.2)") => ({
|
|
360
|
+
color: {
|
|
361
|
+
type: "linear",
|
|
362
|
+
x: 0,
|
|
363
|
+
y: 0,
|
|
364
|
+
x2: 0,
|
|
365
|
+
y2: 1,
|
|
366
|
+
colorStops: [
|
|
367
|
+
{
|
|
368
|
+
offset: 0,
|
|
369
|
+
color: s
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
offset: 0.8,
|
|
373
|
+
color: r
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
}), n = t.map((s) => s[o.value]);
|
|
378
|
+
return {
|
|
379
|
+
// 提示框组件
|
|
380
|
+
tooltip: {
|
|
381
|
+
trigger: "item"
|
|
382
|
+
//触发类型,axis:坐标轴触发
|
|
383
|
+
},
|
|
384
|
+
// 图例组件
|
|
385
|
+
// legend: {
|
|
386
|
+
// type: 'plain', //plain:普通图例;scroll:可滚动翻页的图例。当图例数量较多时使。
|
|
387
|
+
// show: true,
|
|
388
|
+
// },
|
|
389
|
+
grid: ge(),
|
|
390
|
+
title: {
|
|
391
|
+
show: !0,
|
|
392
|
+
text: "样例数据",
|
|
393
|
+
textStyle: {
|
|
394
|
+
color: "#333",
|
|
395
|
+
fontSize: 18
|
|
396
|
+
},
|
|
397
|
+
x: 10,
|
|
398
|
+
y: 10
|
|
399
|
+
},
|
|
400
|
+
// x 轴设置
|
|
401
|
+
xAxis: [
|
|
402
|
+
{
|
|
403
|
+
type: "category",
|
|
404
|
+
nameGap: 8,
|
|
405
|
+
// X轴名称与轴线之间的距离
|
|
406
|
+
nameRotate: 0,
|
|
407
|
+
// 坐标轴名称旋转
|
|
408
|
+
axisLabel: {
|
|
409
|
+
color: Y,
|
|
410
|
+
// X轴类目名称样式
|
|
411
|
+
rotate: 0
|
|
412
|
+
// X轴类目名称旋转角度
|
|
413
|
+
},
|
|
414
|
+
axisLine: {
|
|
415
|
+
//X轴轴线设置
|
|
416
|
+
show: !0,
|
|
417
|
+
lineStyle: {
|
|
418
|
+
color: fe,
|
|
419
|
+
width: 1
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
axisTick: { show: !1 },
|
|
423
|
+
// X轴刻度相关设置
|
|
424
|
+
splitLine: { show: !1 },
|
|
425
|
+
// 横向分隔线
|
|
426
|
+
data: t.map((s) => s[o.name])
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
// y轴设置
|
|
430
|
+
yAxis: [
|
|
431
|
+
{
|
|
432
|
+
type: "value",
|
|
433
|
+
min: 0,
|
|
434
|
+
// 坐标轴刻度最小值
|
|
435
|
+
position: "left",
|
|
436
|
+
nameTextStyle: {
|
|
437
|
+
fontSize: ve,
|
|
438
|
+
color: Y,
|
|
439
|
+
fontWeight: "bold"
|
|
440
|
+
},
|
|
441
|
+
axisLine: { show: !1 },
|
|
442
|
+
// y轴轴线设置
|
|
443
|
+
axisTick: { show: !1 },
|
|
444
|
+
// 刻度设置
|
|
445
|
+
splitLine: { show: !1 },
|
|
446
|
+
// 纵向分隔线
|
|
447
|
+
axisLabel: {
|
|
448
|
+
color: Y,
|
|
449
|
+
// y轴刻度标签
|
|
450
|
+
formatter: "{value}",
|
|
451
|
+
inside: !1
|
|
452
|
+
// 刻度标签是否朝内,默认朝外
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
],
|
|
456
|
+
series: [
|
|
457
|
+
{
|
|
458
|
+
type: "bar",
|
|
459
|
+
barWidth: 15,
|
|
460
|
+
barGap: "0%",
|
|
461
|
+
itemStyle: e(`rgba(${T[0]}, 0.7)`, `rgba(${T[0]}, 0.2)`),
|
|
462
|
+
data: n,
|
|
463
|
+
label: {
|
|
464
|
+
show: !0,
|
|
465
|
+
// 显示标签
|
|
466
|
+
position: "top",
|
|
467
|
+
// 标签位置
|
|
468
|
+
color: "inherit",
|
|
469
|
+
// 标签颜色
|
|
470
|
+
lineHeight: 24
|
|
471
|
+
// 行高
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
// 柱底圆片
|
|
476
|
+
name: "",
|
|
477
|
+
type: "pictorialBar",
|
|
478
|
+
symbolSize: [15, 10],
|
|
479
|
+
//调整截面形状
|
|
480
|
+
symbolOffset: [0, 5],
|
|
481
|
+
itemStyle: e(`rgba(${T[0]}, 0.7)`, `rgba(${T[0]}, 0.2)`),
|
|
482
|
+
data: n
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
// 柱顶圆片
|
|
486
|
+
name: "",
|
|
487
|
+
type: "pictorialBar",
|
|
488
|
+
symbolSize: [15, 10],
|
|
489
|
+
//调整截面形状
|
|
490
|
+
symbolOffset: [0, -5],
|
|
491
|
+
symbolPosition: "end",
|
|
492
|
+
itemStyle: e(`rgba(${T[0]}, 0.9)`, `rgba(${T[0]}, 1)`),
|
|
493
|
+
data: n
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
};
|
|
497
|
+
}, P = [
|
|
498
|
+
{ key: "assets", name: "资产名称" },
|
|
499
|
+
{ key: "type", name: "资产类型" },
|
|
500
|
+
{ key: "data", name: "资产数据" }
|
|
501
|
+
], G = [
|
|
502
|
+
{ assets: "name1", type: "type1", data: "data1" },
|
|
503
|
+
{ assets: "name2", type: "type2", data: "data2" },
|
|
504
|
+
{ assets: "name3", type: "type3", data: "data3" }
|
|
505
|
+
], ye = [
|
|
506
|
+
{ data: [{ name: "默认数据", value: 180 }], label: "name1" },
|
|
507
|
+
{ data: [{ name: "默认数据", value: 311 }], label: "name2" },
|
|
508
|
+
{ data: [{ name: "默认数据", value: 42 }], label: "name3" },
|
|
509
|
+
{ data: [{ name: "默认数据", value: 32391 }], label: "name4" }
|
|
510
|
+
], he = [
|
|
511
|
+
{
|
|
512
|
+
type: "report-select",
|
|
513
|
+
label: "资产:",
|
|
514
|
+
value: "0",
|
|
515
|
+
data: [
|
|
516
|
+
{
|
|
517
|
+
label: "全部",
|
|
518
|
+
data: "0"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
label: "10.10.2.20_root",
|
|
522
|
+
data: "743dbb32-8a41-4990-9d76-48925b000a93"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
label: "10.10.4.206_sysdba",
|
|
526
|
+
data: "23193788-c895-47a8-8123-65799540394c"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
label: "10.10.4.26_root@/root/files/",
|
|
530
|
+
data: "bb7b07c9-b96b-4caf-ac76-bb45ae849844"
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
uri: "/da/report/sens/get_asset_all",
|
|
534
|
+
id: R()
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
type: "range-time",
|
|
538
|
+
data: [
|
|
539
|
+
{
|
|
540
|
+
start_time: "2024-08-20 19:49:34",
|
|
541
|
+
end_time: "2024-09-12 19:49:34"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
id: R()
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
type: "h1",
|
|
548
|
+
data: "报表名称",
|
|
549
|
+
options: {
|
|
550
|
+
size: 24,
|
|
551
|
+
color: "rgba(0,0,0,0.85)",
|
|
552
|
+
fontWeight: 500,
|
|
553
|
+
letterSpacing: 0,
|
|
554
|
+
textIndent: 0,
|
|
555
|
+
textAlign: "left"
|
|
556
|
+
},
|
|
557
|
+
id: R()
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
type: "h2",
|
|
561
|
+
data: "一级标题",
|
|
562
|
+
name: "一级标题",
|
|
563
|
+
options: {
|
|
564
|
+
size: 18,
|
|
565
|
+
color: " rgba(0, 0, 0, 0.85)",
|
|
566
|
+
fontWeight: 500,
|
|
567
|
+
letterSpacing: 0,
|
|
568
|
+
textIndent: 0,
|
|
569
|
+
textAlign: "left"
|
|
570
|
+
},
|
|
571
|
+
id: R()
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
type: "report-table",
|
|
575
|
+
data: G,
|
|
576
|
+
showColumn: P,
|
|
577
|
+
name: "表格",
|
|
578
|
+
options: {
|
|
579
|
+
showColumn: {
|
|
580
|
+
assets: !0,
|
|
581
|
+
type: !0,
|
|
582
|
+
data: !0
|
|
583
|
+
},
|
|
584
|
+
border: !0,
|
|
585
|
+
showHeader: !0,
|
|
586
|
+
stripe: !1
|
|
587
|
+
},
|
|
588
|
+
rp_item_uuid: "",
|
|
589
|
+
id: R()
|
|
590
|
+
}
|
|
591
|
+
];
|
|
592
|
+
be();
|
|
593
|
+
const _e = ae("tds-report", {
|
|
594
|
+
state: () => ({
|
|
595
|
+
componentList: [],
|
|
596
|
+
activeComponents: {},
|
|
597
|
+
notDraggableList: [],
|
|
598
|
+
titleComponent: {},
|
|
599
|
+
filterForm: {
|
|
600
|
+
range_time: 1,
|
|
601
|
+
filter_uuid: ""
|
|
602
|
+
}
|
|
603
|
+
}),
|
|
604
|
+
getters: {
|
|
605
|
+
getActiveComponents: (t) => t.activeComponents
|
|
606
|
+
},
|
|
607
|
+
actions: {
|
|
608
|
+
// setComponentList
|
|
609
|
+
setComponentList(t) {
|
|
610
|
+
this.componentList = t;
|
|
611
|
+
},
|
|
612
|
+
async getReportDemo(t) {
|
|
613
|
+
let o = [];
|
|
614
|
+
t ? o = (await ue({ report_uuid: t })).data : o = { content: me(he), range_time: 1 };
|
|
615
|
+
const e = [];
|
|
616
|
+
o.content.forEach((n) => {
|
|
617
|
+
(n.type === "report-select" || n.type === "range-time") && e.push(n), n.type === "h1" && (this.titleComponent = n), n.id = R();
|
|
618
|
+
}), this.notDraggableList = e, this.filterForm.range_time = o.range_time, this.filterForm.filter_uuid = o.filter_uuid, o.content.splice(0, 3), this.componentList = o.content;
|
|
619
|
+
},
|
|
620
|
+
setActiveComponents(t) {
|
|
621
|
+
this.activeComponents = t;
|
|
622
|
+
},
|
|
623
|
+
clearComponents() {
|
|
624
|
+
this.activeComponents = {}, this.componentList = [], this.notDraggableList = [], this.titleComponent = {}, this.filterForm = {
|
|
625
|
+
range_time: 1,
|
|
626
|
+
filter_uuid: ""
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}), Se = { key: 0 }, we = { class: "sub-title" }, xe = /* @__PURE__ */ z({
|
|
631
|
+
name: "TdsReportConfig",
|
|
632
|
+
__name: "Config",
|
|
633
|
+
setup(t) {
|
|
634
|
+
const o = _e(), e = S(() => o.activeComponents);
|
|
635
|
+
function n(i) {
|
|
636
|
+
i ? (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
|
+
}
|
|
638
|
+
const s = v("rgb(46, 145, 255)"), r = (i = "rgba(46, 145, 255, 0.7)", a = "rgba(46, 145, 255, 0.2)") => ({
|
|
639
|
+
color: {
|
|
640
|
+
type: "linear",
|
|
641
|
+
x: 0,
|
|
642
|
+
y: 0,
|
|
643
|
+
x2: 0,
|
|
644
|
+
y2: 1,
|
|
645
|
+
colorStops: [
|
|
646
|
+
{
|
|
647
|
+
offset: 0,
|
|
648
|
+
color: i
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
offset: 0.8,
|
|
652
|
+
color: a
|
|
653
|
+
}
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
function l(i) {
|
|
658
|
+
i && (o.activeComponents.options.series[0].itemStyle = r(u(i, 0.7), u(i, 0.2)), o.activeComponents.options.series[1].itemStyle = r(u(i, 0.7), u(i, 0.2)), o.activeComponents.options.series[2].itemStyle = r(u(i, 0.9), u(i, 1)));
|
|
659
|
+
}
|
|
660
|
+
function u(i, a = 1) {
|
|
661
|
+
i = i.replace(/^#/, "");
|
|
662
|
+
const y = parseInt(i.substring(0, 2), 16), m = parseInt(i.substring(2, 4), 16), g = parseInt(i.substring(4, 6), 16);
|
|
663
|
+
return `rgba(${y}, ${m}, ${g}, ${a})`;
|
|
664
|
+
}
|
|
665
|
+
return (i, a) => {
|
|
666
|
+
const y = h("el-input"), m = h("el-form-item"), g = h("el-switch"), b = h("el-col"), E = h("el-color-picker"), M = h("el-input-number"), L = h("el-row"), k = h("el-collapse-item"), D = h("el-collapse");
|
|
667
|
+
return e.value.options.title ? (x(), B("div", Se, [
|
|
668
|
+
d(m, { label: "标题" }, {
|
|
669
|
+
default: f(() => [
|
|
670
|
+
d(y, {
|
|
671
|
+
modelValue: e.value.options.title.text,
|
|
672
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => e.value.options.title.text = p)
|
|
673
|
+
}, null, 8, ["modelValue"])
|
|
674
|
+
]),
|
|
675
|
+
_: 1
|
|
676
|
+
}),
|
|
677
|
+
d(D, null, {
|
|
678
|
+
default: f(() => [
|
|
679
|
+
d(k, {
|
|
680
|
+
title: "标题配置",
|
|
681
|
+
name: "1"
|
|
682
|
+
}, {
|
|
683
|
+
default: f(() => [
|
|
684
|
+
d(L, { class: "w-100%" }, {
|
|
685
|
+
default: f(() => [
|
|
686
|
+
d(b, { span: 24 }, {
|
|
687
|
+
default: f(() => [
|
|
688
|
+
a[9] || (a[9] = _("span", { class: "switch-label" }, "显示标题", -1)),
|
|
689
|
+
d(g, {
|
|
690
|
+
modelValue: e.value.options.title.show,
|
|
691
|
+
"onUpdate:modelValue": a[1] || (a[1] = (p) => e.value.options.title.show = p)
|
|
692
|
+
}, null, 8, ["modelValue"])
|
|
693
|
+
]),
|
|
694
|
+
_: 1
|
|
695
|
+
}),
|
|
696
|
+
d(b, { span: 12 }, {
|
|
697
|
+
default: f(() => [
|
|
698
|
+
d(E, {
|
|
699
|
+
modelValue: e.value.options.title.textStyle.color,
|
|
700
|
+
"onUpdate:modelValue": a[2] || (a[2] = (p) => e.value.options.title.textStyle.color = p),
|
|
701
|
+
"show-alpha": ""
|
|
702
|
+
}, null, 8, ["modelValue"]),
|
|
703
|
+
a[10] || (a[10] = _("p", { class: "sub-title" }, "颜色", -1))
|
|
704
|
+
]),
|
|
705
|
+
_: 1
|
|
706
|
+
}),
|
|
707
|
+
d(b, { span: 12 }, {
|
|
708
|
+
default: f(() => [
|
|
709
|
+
d(M, {
|
|
710
|
+
modelValue: e.value.options.title.textStyle.fontSize,
|
|
711
|
+
"onUpdate:modelValue": a[3] || (a[3] = (p) => e.value.options.title.textStyle.fontSize = p),
|
|
712
|
+
"controls-position": "right"
|
|
713
|
+
}, null, 8, ["modelValue"]),
|
|
714
|
+
a[11] || (a[11] = _("p", { class: "sub-title" }, "字体大小", -1))
|
|
715
|
+
]),
|
|
716
|
+
_: 1
|
|
717
|
+
}),
|
|
718
|
+
d(b, { span: 12 }, {
|
|
719
|
+
default: f(() => [
|
|
720
|
+
d(M, {
|
|
721
|
+
modelValue: e.value.options.title.x,
|
|
722
|
+
"onUpdate:modelValue": a[4] || (a[4] = (p) => e.value.options.title.x = p),
|
|
723
|
+
"controls-position": "right"
|
|
724
|
+
}, null, 8, ["modelValue"]),
|
|
725
|
+
a[12] || (a[12] = _("p", { class: "sub-title" }, "横向", -1))
|
|
726
|
+
]),
|
|
727
|
+
_: 1
|
|
728
|
+
}),
|
|
729
|
+
d(b, { span: 12 }, {
|
|
730
|
+
default: f(() => [
|
|
731
|
+
d(M, {
|
|
732
|
+
modelValue: e.value.options.title.y,
|
|
733
|
+
"onUpdate:modelValue": a[5] || (a[5] = (p) => e.value.options.title.y = p),
|
|
734
|
+
"controls-position": "right"
|
|
735
|
+
}, null, 8, ["modelValue"]),
|
|
736
|
+
a[13] || (a[13] = _("p", { class: "sub-title" }, "纵向", -1))
|
|
737
|
+
]),
|
|
738
|
+
_: 1
|
|
739
|
+
})
|
|
740
|
+
]),
|
|
741
|
+
_: 1
|
|
742
|
+
})
|
|
743
|
+
]),
|
|
744
|
+
_: 1
|
|
745
|
+
}),
|
|
746
|
+
d(k, {
|
|
747
|
+
title: "图形配置",
|
|
748
|
+
name: "2"
|
|
749
|
+
}, {
|
|
750
|
+
default: f(() => [
|
|
751
|
+
e.value.options.color && e.value.options.color.length && e.value.type === "pie" ? (x(), U(L, { key: 0 }, {
|
|
752
|
+
default: f(() => [
|
|
753
|
+
d(b, { span: 24 }, {
|
|
754
|
+
default: f(() => [
|
|
755
|
+
a[14] || (a[14] = _("span", { class: "switch-label" }, "玫瑰图", -1)),
|
|
756
|
+
d(g, {
|
|
757
|
+
onChange: n,
|
|
758
|
+
modelValue: e.value.options.series[0].roseType,
|
|
759
|
+
"onUpdate:modelValue": a[6] || (a[6] = (p) => e.value.options.series[0].roseType = p)
|
|
760
|
+
}, null, 8, ["modelValue"])
|
|
761
|
+
]),
|
|
762
|
+
_: 1
|
|
763
|
+
}),
|
|
764
|
+
(x(!0), B(oe, null, ne(e.value.data, (p, V) => (x(), U(b, {
|
|
765
|
+
span: 12,
|
|
766
|
+
class: "mb-10px",
|
|
767
|
+
key: V
|
|
768
|
+
}, {
|
|
769
|
+
default: f(() => [
|
|
770
|
+
d(E, {
|
|
771
|
+
modelValue: e.value.options.color[V],
|
|
772
|
+
"onUpdate:modelValue": (c) => e.value.options.color[V] = c,
|
|
773
|
+
"show-alpha": ""
|
|
774
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
775
|
+
_("p", we, se(p.label), 1)
|
|
776
|
+
]),
|
|
777
|
+
_: 2
|
|
778
|
+
}, 1024))), 128))
|
|
779
|
+
]),
|
|
780
|
+
_: 1
|
|
781
|
+
})) : F("", !0),
|
|
782
|
+
e.value.type === "bar" ? (x(), U(L, { key: 1 }, {
|
|
783
|
+
default: f(() => [
|
|
784
|
+
d(b, { span: 12 }, {
|
|
785
|
+
default: f(() => [
|
|
786
|
+
d(E, {
|
|
787
|
+
modelValue: s.value,
|
|
788
|
+
"onUpdate:modelValue": a[7] || (a[7] = (p) => s.value = p),
|
|
789
|
+
onChange: l
|
|
790
|
+
}, null, 8, ["modelValue"]),
|
|
791
|
+
a[15] || (a[15] = _("p", { class: "sub-title" }, "柱颜色", -1))
|
|
792
|
+
]),
|
|
793
|
+
_: 1
|
|
794
|
+
})
|
|
795
|
+
]),
|
|
796
|
+
_: 1
|
|
797
|
+
})) : F("", !0)
|
|
798
|
+
]),
|
|
799
|
+
_: 1
|
|
800
|
+
}),
|
|
801
|
+
d(k, {
|
|
802
|
+
title: "图例配置",
|
|
803
|
+
name: "3"
|
|
804
|
+
}, {
|
|
805
|
+
default: f(() => [
|
|
806
|
+
d(L, null, {
|
|
807
|
+
default: f(() => [
|
|
808
|
+
d(b, { span: 24 }, {
|
|
809
|
+
default: f(() => [
|
|
810
|
+
a[16] || (a[16] = _("span", { class: "switch-label" }, "显示图例", -1)),
|
|
811
|
+
e.value.options.legend ? (x(), U(g, {
|
|
812
|
+
key: 0,
|
|
813
|
+
modelValue: e.value.options.legend.show,
|
|
814
|
+
"onUpdate:modelValue": a[8] || (a[8] = (p) => e.value.options.legend.show = p)
|
|
815
|
+
}, null, 8, ["modelValue"])) : F("", !0)
|
|
816
|
+
]),
|
|
817
|
+
_: 1
|
|
818
|
+
})
|
|
819
|
+
]),
|
|
820
|
+
_: 1
|
|
821
|
+
})
|
|
822
|
+
]),
|
|
823
|
+
_: 1
|
|
824
|
+
})
|
|
825
|
+
]),
|
|
826
|
+
_: 1
|
|
827
|
+
})
|
|
828
|
+
])) : F("", !0);
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
}), Ee = (t, o) => {
|
|
832
|
+
const e = t.__vccOpts || t;
|
|
833
|
+
for (const [n, s] of o)
|
|
834
|
+
e[n] = s;
|
|
835
|
+
return e;
|
|
836
|
+
}, Le = /* @__PURE__ */ Ee(xe, [["__scopeId", "data-v-9d35239c"]]), Ve = N(Le), Ce = { class: "chart-components" }, Te = /* @__PURE__ */ z({
|
|
837
|
+
name: "TdsReportLine",
|
|
838
|
+
__name: "Line",
|
|
839
|
+
props: {
|
|
840
|
+
data: {}
|
|
841
|
+
},
|
|
842
|
+
setup(t) {
|
|
843
|
+
const o = t, e = S(() => o.data.options);
|
|
844
|
+
return (n, s) => {
|
|
845
|
+
const r = h("TdsChart");
|
|
846
|
+
return x(), B("div", Ce, [
|
|
847
|
+
d(r, { option: e.value }, null, 8, ["option"])
|
|
848
|
+
]);
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
}), Re = N(Te), Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
852
|
+
__proto__: null,
|
|
853
|
+
TdsReportBar: ie,
|
|
854
|
+
TdsReportConfig: Ve,
|
|
855
|
+
TdsReportLine: Re
|
|
856
|
+
}, Symbol.toStringTag, { value: "Module" })), J = {
|
|
314
857
|
TdsReportBar: "TdsReportBar"
|
|
315
|
-
},
|
|
858
|
+
}, j = {
|
|
316
859
|
BackTop: ["Tooltip"]
|
|
317
860
|
};
|
|
318
|
-
function
|
|
319
|
-
if (["NumberAnimation", "Watermark"].includes(
|
|
861
|
+
function ke(t, o) {
|
|
862
|
+
if (["NumberAnimation", "Watermark"].includes(t))
|
|
320
863
|
return [];
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
const
|
|
324
|
-
return
|
|
325
|
-
|
|
326
|
-
`@topdatasec/report/${
|
|
864
|
+
const e = [t];
|
|
865
|
+
t in j && e.push(...j[t]);
|
|
866
|
+
const n = o != null && o.cjs ? "lib" : "es", s = [`@topdatasec/report/${n}/style/global.css`];
|
|
867
|
+
return e.forEach((r) => {
|
|
868
|
+
s.push(
|
|
869
|
+
`@topdatasec/report/${n}/${J[r]}/${r}.css`
|
|
327
870
|
);
|
|
328
|
-
}),
|
|
871
|
+
}), s;
|
|
329
872
|
}
|
|
330
|
-
function
|
|
873
|
+
function Ze(t) {
|
|
331
874
|
return {
|
|
332
875
|
type: "component",
|
|
333
|
-
resolve: (
|
|
334
|
-
if (
|
|
876
|
+
resolve: (o) => {
|
|
877
|
+
if (o in J)
|
|
335
878
|
return {
|
|
336
|
-
name:
|
|
879
|
+
name: o,
|
|
337
880
|
// 组件名
|
|
338
881
|
from: "@topdatasec/report",
|
|
339
882
|
// 组件库名称
|
|
340
|
-
sideEffects:
|
|
883
|
+
sideEffects: ke(o, t)
|
|
341
884
|
// 组件样式文件
|
|
342
885
|
};
|
|
343
886
|
}
|
|
344
887
|
};
|
|
345
888
|
}
|
|
346
|
-
const
|
|
347
|
-
return Object.values(
|
|
348
|
-
|
|
349
|
-
}),
|
|
350
|
-
},
|
|
351
|
-
install:
|
|
889
|
+
const De = function(t) {
|
|
890
|
+
return Object.values(Me).forEach((o) => {
|
|
891
|
+
o && o.install && t.use(o);
|
|
892
|
+
}), t;
|
|
893
|
+
}, Ke = {
|
|
894
|
+
install: De
|
|
352
895
|
};
|
|
353
896
|
export {
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
897
|
+
ie as TdsReportBar,
|
|
898
|
+
Ve as TdsReportConfig,
|
|
899
|
+
Re as TdsReportLine,
|
|
900
|
+
Ze as VueAmazingUIResolver,
|
|
901
|
+
ze as add,
|
|
902
|
+
Ye as cancelRaf,
|
|
903
|
+
Ue as dateFormat,
|
|
904
|
+
de as debounce,
|
|
905
|
+
Ke as default,
|
|
906
|
+
Ie as downloadFile,
|
|
907
|
+
Be as formatNumber,
|
|
908
|
+
De as install,
|
|
909
|
+
Oe as rafTimeout,
|
|
910
|
+
ce as throttle,
|
|
911
|
+
He as toggleDark,
|
|
912
|
+
Ne as useEventListener,
|
|
913
|
+
qe as useFps,
|
|
914
|
+
Pe as useMediaQuery,
|
|
915
|
+
We as useMutationObserver,
|
|
916
|
+
Ge as useResizeObserver,
|
|
917
|
+
je as useScroll,
|
|
918
|
+
Je as useSlotsExist
|
|
374
919
|
};
|