@topdatasec/report 1.0.7 → 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/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/package.json +9 -4
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import "echarts";
|
|
2
|
+
const n = "rgba(51, 51, 51, 0.15)", r = "rgba(51, 51, 51, 1)", c = 12, m = (a = !1) => {
|
|
3
|
+
const t = {
|
|
4
|
+
// top: '2%',
|
|
5
|
+
left: "3%",
|
|
6
|
+
right: "3%",
|
|
7
|
+
bottom: "2%",
|
|
8
|
+
containLabel: !0
|
|
9
|
+
};
|
|
10
|
+
return a && (t.top = "5%"), t;
|
|
11
|
+
}, e = [
|
|
12
|
+
"46, 145, 255",
|
|
13
|
+
"48, 212, 183",
|
|
14
|
+
"108, 108, 255",
|
|
15
|
+
"109, 237, 124",
|
|
16
|
+
"128, 218, 236",
|
|
17
|
+
"58, 200, 218",
|
|
18
|
+
"146, 218, 89",
|
|
19
|
+
"118, 218, 218",
|
|
20
|
+
"143, 192, 244",
|
|
21
|
+
"192, 192, 145",
|
|
22
|
+
"153, 136, 204",
|
|
23
|
+
"212, 217, 230",
|
|
24
|
+
"124, 186, 255",
|
|
25
|
+
"209, 182, 225",
|
|
26
|
+
"255, 197, 84",
|
|
27
|
+
"249, 140, 106",
|
|
28
|
+
"246, 179, 82",
|
|
29
|
+
"100, 161, 206",
|
|
30
|
+
"246, 175, 159",
|
|
31
|
+
"238, 97, 97"
|
|
32
|
+
], f = (a = [
|
|
33
|
+
{
|
|
34
|
+
name: "数据1",
|
|
35
|
+
value: 63
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "数据2",
|
|
39
|
+
value: 45
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "数据3",
|
|
43
|
+
value: 43
|
|
44
|
+
}
|
|
45
|
+
], t = { name: "name", value: "value" }) => {
|
|
46
|
+
const i = (o = "rgba(46, 145, 255, 0.7)", s = "rgba(46, 145, 255, 0.2)") => ({
|
|
47
|
+
color: {
|
|
48
|
+
type: "linear",
|
|
49
|
+
x: 0,
|
|
50
|
+
y: 0,
|
|
51
|
+
x2: 0,
|
|
52
|
+
y2: 1,
|
|
53
|
+
colorStops: [
|
|
54
|
+
{
|
|
55
|
+
offset: 0,
|
|
56
|
+
color: o
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
offset: 0.8,
|
|
60
|
+
color: s
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}), l = a.map((o) => o[t.value]);
|
|
65
|
+
return {
|
|
66
|
+
// 提示框组件
|
|
67
|
+
tooltip: {
|
|
68
|
+
trigger: "item"
|
|
69
|
+
//触发类型,axis:坐标轴触发
|
|
70
|
+
},
|
|
71
|
+
// 图例组件
|
|
72
|
+
// legend: {
|
|
73
|
+
// type: 'plain', //plain:普通图例;scroll:可滚动翻页的图例。当图例数量较多时使。
|
|
74
|
+
// show: true,
|
|
75
|
+
// },
|
|
76
|
+
grid: m(),
|
|
77
|
+
title: {
|
|
78
|
+
show: !0,
|
|
79
|
+
text: "样例数据",
|
|
80
|
+
textStyle: {
|
|
81
|
+
color: "#333",
|
|
82
|
+
fontSize: 18
|
|
83
|
+
},
|
|
84
|
+
x: 10,
|
|
85
|
+
y: 10
|
|
86
|
+
},
|
|
87
|
+
// x 轴设置
|
|
88
|
+
xAxis: [
|
|
89
|
+
{
|
|
90
|
+
type: "category",
|
|
91
|
+
nameGap: 8,
|
|
92
|
+
// X轴名称与轴线之间的距离
|
|
93
|
+
nameRotate: 0,
|
|
94
|
+
// 坐标轴名称旋转
|
|
95
|
+
axisLabel: {
|
|
96
|
+
color: r,
|
|
97
|
+
// X轴类目名称样式
|
|
98
|
+
rotate: 0
|
|
99
|
+
// X轴类目名称旋转角度
|
|
100
|
+
},
|
|
101
|
+
axisLine: {
|
|
102
|
+
//X轴轴线设置
|
|
103
|
+
show: !0,
|
|
104
|
+
lineStyle: {
|
|
105
|
+
color: n,
|
|
106
|
+
width: 1
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
axisTick: { show: !1 },
|
|
110
|
+
// X轴刻度相关设置
|
|
111
|
+
splitLine: { show: !1 },
|
|
112
|
+
// 横向分隔线
|
|
113
|
+
data: a.map((o) => o[t.name])
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
// y轴设置
|
|
117
|
+
yAxis: [
|
|
118
|
+
{
|
|
119
|
+
type: "value",
|
|
120
|
+
min: 0,
|
|
121
|
+
// 坐标轴刻度最小值
|
|
122
|
+
position: "left",
|
|
123
|
+
nameTextStyle: {
|
|
124
|
+
fontSize: c,
|
|
125
|
+
color: r,
|
|
126
|
+
fontWeight: "bold"
|
|
127
|
+
},
|
|
128
|
+
axisLine: { show: !1 },
|
|
129
|
+
// y轴轴线设置
|
|
130
|
+
axisTick: { show: !1 },
|
|
131
|
+
// 刻度设置
|
|
132
|
+
splitLine: { show: !1 },
|
|
133
|
+
// 纵向分隔线
|
|
134
|
+
axisLabel: {
|
|
135
|
+
color: r,
|
|
136
|
+
// y轴刻度标签
|
|
137
|
+
formatter: "{value}",
|
|
138
|
+
inside: !1
|
|
139
|
+
// 刻度标签是否朝内,默认朝外
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
series: [
|
|
144
|
+
{
|
|
145
|
+
type: "bar",
|
|
146
|
+
barWidth: 15,
|
|
147
|
+
barGap: "0%",
|
|
148
|
+
itemStyle: i(`rgba(${e[0]}, 0.7)`, `rgba(${e[0]}, 0.2)`),
|
|
149
|
+
data: l,
|
|
150
|
+
label: {
|
|
151
|
+
show: !0,
|
|
152
|
+
// 显示标签
|
|
153
|
+
position: "top",
|
|
154
|
+
// 标签位置
|
|
155
|
+
color: "inherit",
|
|
156
|
+
// 标签颜色
|
|
157
|
+
lineHeight: 24
|
|
158
|
+
// 行高
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
// 柱底圆片
|
|
163
|
+
name: "",
|
|
164
|
+
type: "pictorialBar",
|
|
165
|
+
symbolSize: [15, 10],
|
|
166
|
+
//调整截面形状
|
|
167
|
+
symbolOffset: [0, 5],
|
|
168
|
+
itemStyle: i(`rgba(${e[0]}, 0.7)`, `rgba(${e[0]}, 0.2)`),
|
|
169
|
+
data: l
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
// 柱顶圆片
|
|
173
|
+
name: "",
|
|
174
|
+
type: "pictorialBar",
|
|
175
|
+
symbolSize: [15, 10],
|
|
176
|
+
//调整截面形状
|
|
177
|
+
symbolOffset: [0, -5],
|
|
178
|
+
symbolPosition: "end",
|
|
179
|
+
itemStyle: i(`rgba(${e[0]}, 0.9)`, `rgba(${e[0]}, 1)`),
|
|
180
|
+
data: l
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
export {
|
|
186
|
+
f as chartsBar
|
|
187
|
+
};
|
package/es/utils/data.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { getUniId as t } from "./index.js";
|
|
2
|
+
import { chartsBar as n } from "./chartsOption.js";
|
|
3
|
+
const e = [
|
|
4
|
+
{ key: "assets", name: "资产名称" },
|
|
5
|
+
{ key: "type", name: "资产类型" },
|
|
6
|
+
{ key: "data", name: "资产数据" }
|
|
7
|
+
], a = [
|
|
8
|
+
{ assets: "name1", type: "type1", data: "data1" },
|
|
9
|
+
{ assets: "name2", type: "type2", data: "data2" },
|
|
10
|
+
{ assets: "name3", type: "type3", data: "data3" }
|
|
11
|
+
], o = [
|
|
12
|
+
{ data: [{ name: "默认数据", value: 180 }], label: "name1" },
|
|
13
|
+
{ data: [{ name: "默认数据", value: 311 }], label: "name2" },
|
|
14
|
+
{ data: [{ name: "默认数据", value: 42 }], label: "name3" },
|
|
15
|
+
{ data: [{ name: "默认数据", value: 32391 }], label: "name4" }
|
|
16
|
+
], d = [
|
|
17
|
+
{
|
|
18
|
+
type: "report-select",
|
|
19
|
+
label: "资产:",
|
|
20
|
+
value: "0",
|
|
21
|
+
data: [
|
|
22
|
+
{
|
|
23
|
+
label: "全部",
|
|
24
|
+
data: "0"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: "10.10.2.20_root",
|
|
28
|
+
data: "743dbb32-8a41-4990-9d76-48925b000a93"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
label: "10.10.4.206_sysdba",
|
|
32
|
+
data: "23193788-c895-47a8-8123-65799540394c"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: "10.10.4.26_root@/root/files/",
|
|
36
|
+
data: "bb7b07c9-b96b-4caf-ac76-bb45ae849844"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
uri: "/da/report/sens/get_asset_all",
|
|
40
|
+
id: t()
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "range-time",
|
|
44
|
+
data: [
|
|
45
|
+
{
|
|
46
|
+
start_time: "2024-08-20 19:49:34",
|
|
47
|
+
end_time: "2024-09-12 19:49:34"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
id: t()
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: "h1",
|
|
54
|
+
data: "报表名称",
|
|
55
|
+
options: {
|
|
56
|
+
size: 24,
|
|
57
|
+
color: "rgba(0,0,0,0.85)",
|
|
58
|
+
fontWeight: 500,
|
|
59
|
+
letterSpacing: 0,
|
|
60
|
+
textIndent: 0,
|
|
61
|
+
textAlign: "left"
|
|
62
|
+
},
|
|
63
|
+
id: t()
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: "h2",
|
|
67
|
+
data: "一级标题",
|
|
68
|
+
name: "一级标题",
|
|
69
|
+
options: {
|
|
70
|
+
size: 18,
|
|
71
|
+
color: " rgba(0, 0, 0, 0.85)",
|
|
72
|
+
fontWeight: 500,
|
|
73
|
+
letterSpacing: 0,
|
|
74
|
+
textIndent: 0,
|
|
75
|
+
textAlign: "left"
|
|
76
|
+
},
|
|
77
|
+
id: t()
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "report-table",
|
|
81
|
+
data: a,
|
|
82
|
+
showColumn: e,
|
|
83
|
+
name: "表格",
|
|
84
|
+
options: {
|
|
85
|
+
showColumn: {
|
|
86
|
+
assets: !0,
|
|
87
|
+
type: !0,
|
|
88
|
+
data: !0
|
|
89
|
+
},
|
|
90
|
+
border: !0,
|
|
91
|
+
showHeader: !0,
|
|
92
|
+
stripe: !1
|
|
93
|
+
},
|
|
94
|
+
rp_item_uuid: "",
|
|
95
|
+
id: t()
|
|
96
|
+
}
|
|
97
|
+
];
|
|
98
|
+
n();
|
|
99
|
+
export {
|
|
100
|
+
d as normalValue
|
|
101
|
+
};
|
package/es/utils/index.d.ts
CHANGED
|
@@ -39,3 +39,5 @@ export declare function useResizeObserver(target: Ref | Ref[] | HTMLElement | HT
|
|
|
39
39
|
start: () => void;
|
|
40
40
|
};
|
|
41
41
|
export declare function useSlotsExist(slotsName?: string | string[]): any;
|
|
42
|
+
export declare const getUniId: () => string;
|
|
43
|
+
export declare const deepClone: <T>(obj: T | T[]) => any;
|
package/es/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { onMounted as x, onUnmounted as
|
|
1
|
+
import { onMounted as x, onUnmounted as T, ref as f, computed as h, toValue as S, watch as L, onBeforeUnmount as w, useSlots as H, reactive as R, getCurrentInstance as k, Comment as U, Text as V } from "vue";
|
|
2
2
|
function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
|
|
3
3
|
try {
|
|
4
4
|
let t;
|
|
@@ -7,8 +7,8 @@ function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
|
|
|
7
7
|
throw new Error("Invalid date");
|
|
8
8
|
} else
|
|
9
9
|
t = e;
|
|
10
|
-
const r = (
|
|
11
|
-
switch (
|
|
10
|
+
const r = (i, s = 2) => String(i).padStart(s, "0"), o = (i) => {
|
|
11
|
+
switch (i) {
|
|
12
12
|
case "YYYY":
|
|
13
13
|
return r(t.getFullYear());
|
|
14
14
|
case "YY":
|
|
@@ -36,7 +36,7 @@ function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
|
|
|
36
36
|
case "SSS":
|
|
37
37
|
return r(t.getMilliseconds(), 3);
|
|
38
38
|
default:
|
|
39
|
-
return
|
|
39
|
+
return i;
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
return n.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g, o);
|
|
@@ -44,39 +44,39 @@ function j(e = Date.now(), n = "YYYY-MM-DD HH:mm:ss") {
|
|
|
44
44
|
return console.error("Error formatting date:", t), "";
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function J(e, n = 2, t = ",", r = ".", o, i) {
|
|
48
48
|
typeof e != "number" && typeof e != "string" && console.warn("Expected value to be of type number or string"), typeof n != "number" && console.warn("Expected precision to be of type number");
|
|
49
49
|
const s = Number(e);
|
|
50
50
|
if (isNaN(s) || !isFinite(s))
|
|
51
51
|
return "";
|
|
52
52
|
if (s === 0)
|
|
53
53
|
return s.toFixed(n);
|
|
54
|
-
let
|
|
54
|
+
let c = s.toFixed(n);
|
|
55
55
|
if (typeof t == "string" && t !== "") {
|
|
56
|
-
const [
|
|
57
|
-
|
|
56
|
+
const [l, d] = c.split(".");
|
|
57
|
+
c = l.replace(/(\d)(?=(\d{3})+$)/g, "$1" + t) + (d ? r + d : "");
|
|
58
58
|
}
|
|
59
|
-
return (o || "") +
|
|
59
|
+
return (o || "") + c + (i || "");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function P(e, n = 0, t = !1) {
|
|
62
62
|
let r = null;
|
|
63
63
|
function o(s) {
|
|
64
64
|
if (r || (r = s), s - r >= n) {
|
|
65
65
|
try {
|
|
66
66
|
e();
|
|
67
|
-
} catch (
|
|
68
|
-
console.error("Error executing rafTimeout function:",
|
|
67
|
+
} catch (l) {
|
|
68
|
+
console.error("Error executing rafTimeout function:", l);
|
|
69
69
|
}
|
|
70
|
-
t && (r = s,
|
|
70
|
+
t && (r = s, i.id = requestAnimationFrame(o));
|
|
71
71
|
} else
|
|
72
|
-
|
|
72
|
+
i.id = requestAnimationFrame(o);
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const i = {
|
|
75
75
|
id: requestAnimationFrame(o)
|
|
76
76
|
};
|
|
77
|
-
return
|
|
77
|
+
return i;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function W(e) {
|
|
80
80
|
e && e.id && typeof e.id == "number" ? cancelAnimationFrame(e.id) : console.warn("cancelRaf received an invalid id:", e);
|
|
81
81
|
}
|
|
82
82
|
function q(e, n = 300) {
|
|
@@ -95,14 +95,14 @@ function I(e, n = 300) {
|
|
|
95
95
|
}, n);
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function $(e, n) {
|
|
99
99
|
if (Number.isNaN(e) || Number.isNaN(n))
|
|
100
100
|
throw new Error("Both num1 and num2 must be valid numbers.");
|
|
101
101
|
const t = e % 1 !== 0, r = n % 1 !== 0;
|
|
102
102
|
if (!t && !r)
|
|
103
103
|
return e + n;
|
|
104
|
-
const o = String(e).split(".")[1] ?? "",
|
|
105
|
-
return (+
|
|
104
|
+
const o = String(e).split(".")[1] ?? "", i = String(n).split(".")[1] ?? "", s = Math.max(o.length, i.length), c = Math.pow(10, s), l = e.toFixed(s), d = n.toFixed(s);
|
|
105
|
+
return (+l.replace(".", "") + +d.replace(".", "")) / c;
|
|
106
106
|
}
|
|
107
107
|
function C(e, n) {
|
|
108
108
|
if (!e) {
|
|
@@ -113,15 +113,15 @@ function C(e, n) {
|
|
|
113
113
|
try {
|
|
114
114
|
fetch(e).then((r) => {
|
|
115
115
|
r.ok ? r.blob().then((o) => {
|
|
116
|
-
const
|
|
117
|
-
s.href =
|
|
116
|
+
const i = URL.createObjectURL(o), s = document.createElement("a");
|
|
117
|
+
s.href = i, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(i);
|
|
118
118
|
}) : console.error("请求文件失败,状态码:", r.status);
|
|
119
119
|
});
|
|
120
120
|
} catch (r) {
|
|
121
121
|
console.error("文件下载失败:", r);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Z() {
|
|
125
125
|
const e = document.documentElement;
|
|
126
126
|
e.classList.toggle("dark"), e.classList.contains("dark") ? e.style.colorScheme = "dark" : e.style.colorScheme = "light";
|
|
127
127
|
}
|
|
@@ -133,26 +133,26 @@ function z() {
|
|
|
133
133
|
}
|
|
134
134
|
function A(e) {
|
|
135
135
|
const n = z();
|
|
136
|
-
return
|
|
136
|
+
return h(() => (n.value, !!e()));
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
x(() => e.addEventListener(n, t)),
|
|
138
|
+
function G(e, n, t) {
|
|
139
|
+
x(() => e.addEventListener(n, t)), T(() => e.removeEventListener(n, t));
|
|
140
140
|
}
|
|
141
141
|
function K(e, n, t = {}) {
|
|
142
142
|
const r = A(() => window && "MutationObserver" in window), o = f(!1);
|
|
143
|
-
let
|
|
144
|
-
const s =
|
|
145
|
-
const a =
|
|
146
|
-
return a ? Array.isArray(a) ? a.map((m) =>
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
},
|
|
150
|
-
r.value && s.value.length && !o.value && (
|
|
143
|
+
let i;
|
|
144
|
+
const s = h(() => {
|
|
145
|
+
const a = S(e);
|
|
146
|
+
return a ? Array.isArray(a) ? a.map((m) => S(m)).filter((m) => m) : [a] : [];
|
|
147
|
+
}), c = () => {
|
|
148
|
+
i && (i.disconnect(), i = void 0);
|
|
149
|
+
}, l = () => {
|
|
150
|
+
r.value && s.value.length && !o.value && (i = new MutationObserver(n), s.value.forEach((a) => i.observe(a, t)));
|
|
151
151
|
};
|
|
152
152
|
L(
|
|
153
153
|
() => s.value,
|
|
154
154
|
() => {
|
|
155
|
-
|
|
155
|
+
c(), l();
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
immediate: !0,
|
|
@@ -161,28 +161,28 @@ function K(e, n, t = {}) {
|
|
|
161
161
|
}
|
|
162
162
|
);
|
|
163
163
|
const d = () => {
|
|
164
|
-
o.value = !0,
|
|
164
|
+
o.value = !0, c();
|
|
165
165
|
}, v = () => {
|
|
166
|
-
o.value = !1,
|
|
166
|
+
o.value = !1, l();
|
|
167
167
|
};
|
|
168
|
-
return w(() =>
|
|
168
|
+
return w(() => c()), {
|
|
169
169
|
stop: d,
|
|
170
170
|
start: v
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
function X(e = window, n = 0, t, r) {
|
|
174
|
-
const o = f(0),
|
|
175
|
-
function
|
|
176
|
-
|
|
174
|
+
const o = f(0), i = f(0), s = f(0), c = f(0), l = f(!1), d = f(!1), v = f(!1), a = f(!1), m = f(!1), E = f(0), y = f(0);
|
|
175
|
+
function N(u) {
|
|
176
|
+
l.value = !0;
|
|
177
177
|
const p = u.target.documentElement ?? u.target;
|
|
178
|
-
o.value = p.scrollLeft, s.value = p.scrollTop, d.value = o.value <
|
|
178
|
+
o.value = p.scrollLeft, s.value = p.scrollTop, d.value = o.value < E.value, v.value = o.value > E.value, a.value = s.value < y.value, m.value = s.value > y.value, E.value = o.value, y.value = s.value, M(u), t && t(u);
|
|
179
179
|
}
|
|
180
|
-
const Y = q(
|
|
181
|
-
function
|
|
182
|
-
|
|
180
|
+
const Y = q(N, n);
|
|
181
|
+
function O(u) {
|
|
182
|
+
l.value && (l.value = !1, d.value = !1, v.value = !1, a.value = !1, m.value = !1, r && r(u));
|
|
183
183
|
}
|
|
184
|
-
const M = I(
|
|
185
|
-
const u =
|
|
184
|
+
const M = I(O, n + 200), F = h(() => {
|
|
185
|
+
const u = S(e);
|
|
186
186
|
return u || null;
|
|
187
187
|
});
|
|
188
188
|
L(
|
|
@@ -190,8 +190,8 @@ function X(e = window, n = 0, t, r) {
|
|
|
190
190
|
(u, p) => {
|
|
191
191
|
var b;
|
|
192
192
|
if (p && D(p), u) {
|
|
193
|
-
const
|
|
194
|
-
|
|
193
|
+
const g = ((b = u == null ? void 0 : u.document) == null ? void 0 : b.documentElement) || (u == null ? void 0 : u.documentElement) || u;
|
|
194
|
+
i.value = g.scrollWidth - g.clientWidth, c.value = g.scrollHeight - g.clientHeight, g.addEventListener("scroll", Y), g.addEventListener("scrollend", M);
|
|
195
195
|
}
|
|
196
196
|
},
|
|
197
197
|
{
|
|
@@ -204,15 +204,15 @@ function X(e = window, n = 0, t, r) {
|
|
|
204
204
|
const p = ((b = u == null ? void 0 : u.document) == null ? void 0 : b.documentElement) || (u == null ? void 0 : u.documentElement) || u;
|
|
205
205
|
p.removeEventListener("scroll", Y), p.removeEventListener("scrollend", M);
|
|
206
206
|
}
|
|
207
|
-
return w(() => D(F.value)), { x: o, xScrollMax:
|
|
207
|
+
return w(() => D(F.value)), { x: o, xScrollMax: i, y: s, yScrollMax: c, isScrolling: l, left: d, right: v, top: a, bottom: m };
|
|
208
208
|
}
|
|
209
209
|
function _() {
|
|
210
210
|
const e = f(0), n = f(0);
|
|
211
211
|
let t = performance.now();
|
|
212
|
-
const r = 10, o = (
|
|
212
|
+
const r = 10, o = (i) => {
|
|
213
213
|
if (n.value++, n.value >= r) {
|
|
214
|
-
const s =
|
|
215
|
-
e.value = Math.round(1e3 / (s / r)), t =
|
|
214
|
+
const s = i - t;
|
|
215
|
+
e.value = Math.round(1e3 / (s / r)), t = i, n.value = 0;
|
|
216
216
|
}
|
|
217
217
|
requestAnimationFrame(o);
|
|
218
218
|
};
|
|
@@ -233,18 +233,18 @@ function Q(e) {
|
|
|
233
233
|
function ee(e, n, t = {}) {
|
|
234
234
|
const r = A(() => window && "ResizeObserver" in window);
|
|
235
235
|
let o;
|
|
236
|
-
const
|
|
237
|
-
const a =
|
|
238
|
-
return a ? Array.isArray(a) ? a.map((m) =>
|
|
239
|
-
}),
|
|
236
|
+
const i = f(!1), s = h(() => {
|
|
237
|
+
const a = S(e);
|
|
238
|
+
return a ? Array.isArray(a) ? a.map((m) => S(m)).filter((m) => m) : [a] : [];
|
|
239
|
+
}), c = () => {
|
|
240
240
|
o && (o.disconnect(), o = void 0);
|
|
241
|
-
},
|
|
242
|
-
r.value && s.value.length && !
|
|
241
|
+
}, l = () => {
|
|
242
|
+
r.value && s.value.length && !i.value && (o = new ResizeObserver(n), s.value.forEach((a) => o.observe(a, t)));
|
|
243
243
|
};
|
|
244
244
|
L(
|
|
245
245
|
() => s.value,
|
|
246
246
|
() => {
|
|
247
|
-
|
|
247
|
+
c(), l();
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
250
|
immediate: !0,
|
|
@@ -253,48 +253,51 @@ function ee(e, n, t = {}) {
|
|
|
253
253
|
}
|
|
254
254
|
);
|
|
255
255
|
const d = () => {
|
|
256
|
-
|
|
256
|
+
i.value = !0, c();
|
|
257
257
|
}, v = () => {
|
|
258
|
-
|
|
258
|
+
i.value = !1, l();
|
|
259
259
|
};
|
|
260
|
-
return w(() =>
|
|
260
|
+
return w(() => c()), {
|
|
261
261
|
stop: d,
|
|
262
262
|
start: v
|
|
263
263
|
};
|
|
264
264
|
}
|
|
265
265
|
function te(e = "default") {
|
|
266
|
-
const n =
|
|
266
|
+
const n = H(), t = (r) => {
|
|
267
267
|
var s;
|
|
268
|
-
const o = (s = n[r]) == null ? void 0 : s.call(n),
|
|
269
|
-
if (
|
|
268
|
+
const o = (s = n[r]) == null ? void 0 : s.call(n), i = (c) => {
|
|
269
|
+
if (c.type === U || Array.isArray(c.children) && !c.children.length)
|
|
270
270
|
return !1;
|
|
271
|
-
if (
|
|
271
|
+
if (c.type !== V)
|
|
272
272
|
return !0;
|
|
273
|
-
if (typeof
|
|
274
|
-
return
|
|
273
|
+
if (typeof c.children == "string")
|
|
274
|
+
return c.children.trim() !== "";
|
|
275
275
|
};
|
|
276
|
-
return o && (o != null && o.length) ? o.some((
|
|
276
|
+
return o && (o != null && o.length) ? o.some((l) => i(l)) : !1;
|
|
277
277
|
};
|
|
278
278
|
if (Array.isArray(e)) {
|
|
279
279
|
const r = R({});
|
|
280
280
|
return e.forEach((o) => {
|
|
281
|
-
const
|
|
282
|
-
r[o] =
|
|
281
|
+
const i = h(() => t(o));
|
|
282
|
+
r[o] = i;
|
|
283
283
|
}), r;
|
|
284
284
|
} else
|
|
285
|
-
return
|
|
285
|
+
return h(() => t(e));
|
|
286
286
|
}
|
|
287
|
+
const ne = () => (/* @__PURE__ */ new Date()).getTime().toString(36) + "-" + Math.random().toString(36).substring(2, 9), re = (e) => JSON.parse(JSON.stringify(e));
|
|
287
288
|
export {
|
|
288
|
-
|
|
289
|
-
|
|
289
|
+
$ as add,
|
|
290
|
+
W as cancelRaf,
|
|
290
291
|
j as dateFormat,
|
|
291
292
|
I as debounce,
|
|
293
|
+
re as deepClone,
|
|
292
294
|
C as downloadFile,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
+
J as formatNumber,
|
|
296
|
+
ne as getUniId,
|
|
297
|
+
P as rafTimeout,
|
|
295
298
|
q as throttle,
|
|
296
|
-
|
|
297
|
-
|
|
299
|
+
Z as toggleDark,
|
|
300
|
+
G as useEventListener,
|
|
298
301
|
_ as useFps,
|
|
299
302
|
Q as useMediaQuery,
|
|
300
303
|
z as useMounted,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=(e,o)=>{const t=e.__vccOpts||e;for(const[r,s]of o)t[r]=s;return t};exports.default=u;
|
package/lib/bar/Bar.vue.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r={class:"chart-components"},a=e.defineComponent({name:"TdsReportBar",__name:"Bar",props:{data:{}},setup(o){const t=o,n=e.computed(()=>t.data.options);return(c,p)=>{const s=e.resolveComponent("TdsChart");return e.openBlock(),e.createElementBlock("div",r,[e.createVNode(s,{option:n.value},null,8,["option"])])}}});exports.default=a;
|
package/lib/components.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bar/index.cjs");exports.TdsReportBar=e.default;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bar/index.cjs"),t=require("./config/index.cjs"),r=require("./line/index.cjs");exports.TdsReportBar=e.default;exports.TdsReportConfig=t.default;exports.TdsReportLine=r.default;
|
package/lib/components.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[data-v-9d35239c] .el-color-picker{width:95%}[data-v-9d35239c] .el-color-picker .el-color-picker__trigger{width:100%;top:1px}[data-v-9d35239c] .el-input-number{width:95%}.sub-title[data-v-9d35239c]{color:#555;font-size:12px;padding-left:5px;height:20px;line-height:20px;margin-bottom:10px}.switch-label[data-v-9d35239c]{color:#555;font-size:14px;margin-right:10px;margin-bottom:10px}[data-v-9d35239c] .el-collapse-item__header{background-color:#fafafa;padding-left:15px;height:42px;border-bottom:1px solid #ebeef5}[data-v-9d35239c] .el-collapse-item__content{padding-top:10px;padding-bottom:10px;padding-left:10px}[data-v-9d35239c] .el-collapse-item__content .el-descriptions__cell{padding:1px 0 0 15px}.el-collapse[data-v-9d35239c]{border-right:1px solid var(--el-border-color-lighter);border-left:1px solid var(--el-border-color-lighter)}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Config.vue2.cjs");;/* empty css */const t=require("../_virtual/_plugin-vue_export-helper.cjs"),u=t.default(e.default,[["__scopeId","data-v-9d35239c"]]);exports.default=u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../stores/modules/report.cjs"),x={key:0},y={class:"sub-title"},k=e.defineComponent({name:"TdsReportConfig",__name:"Config",setup(S){const r=_.useReportStore(),o=e.computed(()=>r.activeComponents);function N(n){n?(o.value.options.series[0].radius=["10%","65%"],o.value.options.graphic[0].invisible=!0,o.value.options.graphic[1].invisible=!0):(o.value.options.series[0].radius=["45%","70%"],o.value.options.graphic[0].invisible=!1,o.value.options.graphic[1].invisible=!1)}const f=e.ref("rgb(46, 145, 255)"),p=(n="rgba(46, 145, 255, 0.7)",t="rgba(46, 145, 255, 0.2)")=>({color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:n},{offset:.8,color:t}]}});function w(n){n&&(r.activeComponents.options.series[0].itemStyle=p(a(n,.7),a(n,.2)),r.activeComponents.options.series[1].itemStyle=p(a(n,.7),a(n,.2)),r.activeComponents.options.series[2].itemStyle=p(a(n,.9),a(n,1)))}function a(n,t=1){n=n.replace(/^#/,"");const d=parseInt(n.substring(0,2),16),m=parseInt(n.substring(2,4),16),i=parseInt(n.substring(4,6),16);return`rgba(${d}, ${m}, ${i}, ${t})`}return(n,t)=>{const d=e.resolveComponent("el-input"),m=e.resolveComponent("el-form-item"),i=e.resolveComponent("el-switch"),s=e.resolveComponent("el-col"),c=e.resolveComponent("el-color-picker"),V=e.resolveComponent("el-input-number"),u=e.resolveComponent("el-row"),v=e.resolveComponent("el-collapse-item"),b=e.resolveComponent("el-collapse");return o.value.options.title?(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(m,{label:"标题"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:o.value.options.title.text,"onUpdate:modelValue":t[0]||(t[0]=l=>o.value.options.title.text=l)},null,8,["modelValue"])]),_:1}),e.createVNode(b,null,{default:e.withCtx(()=>[e.createVNode(v,{title:"标题配置",name:"1"},{default:e.withCtx(()=>[e.createVNode(u,{class:"w-100%"},{default:e.withCtx(()=>[e.createVNode(s,{span:24},{default:e.withCtx(()=>[t[9]||(t[9]=e.createElementVNode("span",{class:"switch-label"},"显示标题",-1)),e.createVNode(i,{modelValue:o.value.options.title.show,"onUpdate:modelValue":t[1]||(t[1]=l=>o.value.options.title.show=l)},null,8,["modelValue"])]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:o.value.options.title.textStyle.color,"onUpdate:modelValue":t[2]||(t[2]=l=>o.value.options.title.textStyle.color=l),"show-alpha":""},null,8,["modelValue"]),t[10]||(t[10]=e.createElementVNode("p",{class:"sub-title"},"颜色",-1))]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:o.value.options.title.textStyle.fontSize,"onUpdate:modelValue":t[3]||(t[3]=l=>o.value.options.title.textStyle.fontSize=l),"controls-position":"right"},null,8,["modelValue"]),t[11]||(t[11]=e.createElementVNode("p",{class:"sub-title"},"字体大小",-1))]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:o.value.options.title.x,"onUpdate:modelValue":t[4]||(t[4]=l=>o.value.options.title.x=l),"controls-position":"right"},null,8,["modelValue"]),t[12]||(t[12]=e.createElementVNode("p",{class:"sub-title"},"横向",-1))]),_:1}),e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(V,{modelValue:o.value.options.title.y,"onUpdate:modelValue":t[5]||(t[5]=l=>o.value.options.title.y=l),"controls-position":"right"},null,8,["modelValue"]),t[13]||(t[13]=e.createElementVNode("p",{class:"sub-title"},"纵向",-1))]),_:1})]),_:1})]),_:1}),e.createVNode(v,{title:"图形配置",name:"2"},{default:e.withCtx(()=>[o.value.options.color&&o.value.options.color.length&&o.value.type==="pie"?(e.openBlock(),e.createBlock(u,{key:0},{default:e.withCtx(()=>[e.createVNode(s,{span:24},{default:e.withCtx(()=>[t[14]||(t[14]=e.createElementVNode("span",{class:"switch-label"},"玫瑰图",-1)),e.createVNode(i,{onChange:N,modelValue:o.value.options.series[0].roseType,"onUpdate:modelValue":t[6]||(t[6]=l=>o.value.options.series[0].roseType=l)},null,8,["modelValue"])]),_:1}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value.data,(l,C)=>(e.openBlock(),e.createBlock(s,{span:12,class:"mb-10px",key:C},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:o.value.options.color[C],"onUpdate:modelValue":g=>o.value.options.color[C]=g,"show-alpha":""},null,8,["modelValue","onUpdate:modelValue"]),e.createElementVNode("p",y,e.toDisplayString(l.label),1)]),_:2},1024))),128))]),_:1})):e.createCommentVNode("",!0),o.value.type==="bar"?(e.openBlock(),e.createBlock(u,{key:1},{default:e.withCtx(()=>[e.createVNode(s,{span:12},{default:e.withCtx(()=>[e.createVNode(c,{modelValue:f.value,"onUpdate:modelValue":t[7]||(t[7]=l=>f.value=l),onChange:w},null,8,["modelValue"]),t[15]||(t[15]=e.createElementVNode("p",{class:"sub-title"},"柱颜色",-1))]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(v,{title:"图例配置",name:"3"},{default:e.withCtx(()=>[e.createVNode(u,null,{default:e.withCtx(()=>[e.createVNode(s,{span:24},{default:e.withCtx(()=>[t[16]||(t[16]=e.createElementVNode("span",{class:"switch-label"},"显示图例",-1)),o.value.options.legend?(e.openBlock(),e.createBlock(i,{key:0,modelValue:o.value.options.legend.show,"onUpdate:modelValue":t[8]||(t[8]=l=>o.value.options.legend.show=l)},null,8,["modelValue"])):e.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1})]),_:1})])):e.createCommentVNode("",!0)}}});exports.default=k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./Config.vue.cjs"),t=require("../utils/type.cjs"),u=t.withInstall(e.default);exports.default=u;
|