@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.
Files changed (105) hide show
  1. package/dist/index.iife.js +1 -1
  2. package/dist/index.js +790 -245
  3. package/dist/index.umd.cjs +1 -1
  4. package/dist/style.css +1 -1
  5. package/es/_virtual/_plugin-vue_export-helper.js +9 -0
  6. package/es/bar/Bar.vue.js +6 -8
  7. package/es/components.d.ts +2 -0
  8. package/es/components.js +6 -2
  9. package/es/config/Config.css +1 -0
  10. package/es/config/Config.d.ts +2 -0
  11. package/es/config/Config.vue.js +7 -0
  12. package/es/config/Config.vue2.js +207 -0
  13. package/es/config/index.d.ts +14 -0
  14. package/es/config/index.js +6 -0
  15. package/es/index.js +26 -22
  16. package/es/line/Line.d.ts +5 -0
  17. package/es/line/Line.vue.js +20 -0
  18. package/es/line/Line.vue2.js +4 -0
  19. package/es/line/index.d.ts +15 -0
  20. package/es/line/index.js +6 -0
  21. package/es/pie/Pie.d.ts +5 -0
  22. package/es/pie/index.d.ts +15 -0
  23. package/es/report/Report.d.ts +7 -0
  24. package/es/report/index.d.ts +17 -0
  25. package/es/select/Select.d.ts +9 -0
  26. package/es/select/index.d.ts +25 -0
  27. package/es/settingCharts/SettingCharts.d.ts +5 -0
  28. package/es/settingCharts/index.d.ts +14 -0
  29. package/es/settingFilter/index.d.ts +15 -0
  30. package/es/settingFilter/settingFilter.d.ts +5 -0
  31. package/es/settingTable/SettingTable.d.ts +2 -0
  32. package/es/settingTable/index.d.ts +14 -0
  33. package/es/settingText/index.d.ts +15 -0
  34. package/es/settingText/settingText.d.ts +5 -0
  35. package/es/settingTitle/index.d.ts +14 -0
  36. package/es/settingTitle/settingTitle.d.ts +2 -0
  37. package/es/stores/interface/index.d.ts +18 -0
  38. package/es/stores/modules/report.d.ts +35 -0
  39. package/es/stores/modules/report.js +45 -0
  40. package/es/table/Table.d.ts +5 -0
  41. package/es/table/index.d.ts +15 -0
  42. package/es/text/Text.d.ts +5 -0
  43. package/es/text/index.d.ts +15 -0
  44. package/es/time/Time.d.ts +9 -0
  45. package/es/time/index.d.ts +25 -0
  46. package/es/utils/api.d.ts +12 -0
  47. package/es/utils/api.js +9 -0
  48. package/es/utils/chartsOption.d.ts +298 -0
  49. package/es/utils/chartsOption.js +187 -0
  50. package/es/utils/data.d.ts +4 -0
  51. package/es/utils/data.js +101 -0
  52. package/es/utils/index.d.ts +2 -0
  53. package/es/utils/index.js +82 -79
  54. package/es/utils/type.js +1 -1
  55. package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
  56. package/lib/bar/Bar.vue.cjs +1 -1
  57. package/lib/components.cjs +1 -1
  58. package/lib/components.d.ts +2 -0
  59. package/lib/config/Config.css +1 -0
  60. package/lib/config/Config.d.ts +2 -0
  61. package/lib/config/Config.vue.cjs +1 -0
  62. package/lib/config/Config.vue2.cjs +1 -0
  63. package/lib/config/index.cjs +1 -0
  64. package/lib/config/index.d.ts +14 -0
  65. package/lib/index.cjs +1 -1
  66. package/lib/line/Line.d.ts +5 -0
  67. package/lib/line/Line.vue.cjs +1 -0
  68. package/lib/line/Line.vue2.cjs +1 -0
  69. package/lib/line/index.cjs +1 -0
  70. package/lib/line/index.d.ts +15 -0
  71. package/lib/pie/Pie.d.ts +5 -0
  72. package/lib/pie/index.d.ts +15 -0
  73. package/lib/report/Report.d.ts +7 -0
  74. package/lib/report/index.d.ts +17 -0
  75. package/lib/select/Select.d.ts +9 -0
  76. package/lib/select/index.d.ts +25 -0
  77. package/lib/settingCharts/SettingCharts.d.ts +5 -0
  78. package/lib/settingCharts/index.d.ts +14 -0
  79. package/lib/settingFilter/index.d.ts +15 -0
  80. package/lib/settingFilter/settingFilter.d.ts +5 -0
  81. package/lib/settingTable/SettingTable.d.ts +2 -0
  82. package/lib/settingTable/index.d.ts +14 -0
  83. package/lib/settingText/index.d.ts +15 -0
  84. package/lib/settingText/settingText.d.ts +5 -0
  85. package/lib/settingTitle/index.d.ts +14 -0
  86. package/lib/settingTitle/settingTitle.d.ts +2 -0
  87. package/lib/stores/interface/index.d.ts +18 -0
  88. package/lib/stores/modules/report.cjs +1 -0
  89. package/lib/stores/modules/report.d.ts +35 -0
  90. package/lib/table/Table.d.ts +5 -0
  91. package/lib/table/index.d.ts +15 -0
  92. package/lib/text/Text.d.ts +5 -0
  93. package/lib/text/index.d.ts +15 -0
  94. package/lib/time/Time.d.ts +9 -0
  95. package/lib/time/index.d.ts +25 -0
  96. package/lib/utils/api.cjs +1 -0
  97. package/lib/utils/api.d.ts +12 -0
  98. package/lib/utils/chartsOption.cjs +1 -0
  99. package/lib/utils/chartsOption.d.ts +298 -0
  100. package/lib/utils/data.cjs +1 -0
  101. package/lib/utils/data.d.ts +4 -0
  102. package/lib/utils/index.cjs +1 -1
  103. package/lib/utils/index.d.ts +2 -0
  104. package/lib/utils/type.cjs +1 -1
  105. package/package.json +9 -4
@@ -0,0 +1,298 @@
1
+ export declare const barParseData: (chartOption: any, data: any[], name?: string, props?: {
2
+ name: string;
3
+ value: string;
4
+ }) => void;
5
+ export declare const chartsBar: (data?: any, props?: {
6
+ name: string;
7
+ value: string;
8
+ }) => {
9
+ tooltip: {
10
+ trigger: string;
11
+ };
12
+ grid: any;
13
+ title: {
14
+ show: boolean;
15
+ text: string;
16
+ textStyle: {
17
+ color: string;
18
+ fontSize: number;
19
+ };
20
+ x: number;
21
+ y: number;
22
+ };
23
+ xAxis: {
24
+ type: string;
25
+ nameGap: number;
26
+ nameRotate: number;
27
+ axisLabel: {
28
+ color: string;
29
+ rotate: number;
30
+ };
31
+ axisLine: {
32
+ show: boolean;
33
+ lineStyle: {
34
+ color: string;
35
+ width: number;
36
+ };
37
+ };
38
+ axisTick: {
39
+ show: boolean;
40
+ };
41
+ splitLine: {
42
+ show: boolean;
43
+ };
44
+ data: any;
45
+ }[];
46
+ yAxis: {
47
+ type: string;
48
+ min: number;
49
+ position: string;
50
+ nameTextStyle: {
51
+ fontSize: number;
52
+ color: string;
53
+ fontWeight: string;
54
+ };
55
+ axisLine: {
56
+ show: boolean;
57
+ };
58
+ axisTick: {
59
+ show: boolean;
60
+ };
61
+ splitLine: {
62
+ show: boolean;
63
+ };
64
+ axisLabel: {
65
+ color: string;
66
+ formatter: string;
67
+ inside: boolean;
68
+ };
69
+ }[];
70
+ series: ({
71
+ type: string;
72
+ barWidth: number;
73
+ barGap: string;
74
+ itemStyle: {
75
+ color: {
76
+ type: string;
77
+ x: number;
78
+ y: number;
79
+ x2: number;
80
+ y2: number;
81
+ colorStops: {
82
+ offset: number;
83
+ color: string;
84
+ }[];
85
+ };
86
+ };
87
+ data: any;
88
+ label: {
89
+ show: boolean;
90
+ position: string;
91
+ color: string;
92
+ lineHeight: number;
93
+ };
94
+ name?: undefined;
95
+ symbolSize?: undefined;
96
+ symbolOffset?: undefined;
97
+ symbolPosition?: undefined;
98
+ } | {
99
+ name: string;
100
+ type: string;
101
+ symbolSize: number[];
102
+ symbolOffset: number[];
103
+ itemStyle: {
104
+ color: {
105
+ type: string;
106
+ x: number;
107
+ y: number;
108
+ x2: number;
109
+ y2: number;
110
+ colorStops: {
111
+ offset: number;
112
+ color: string;
113
+ }[];
114
+ };
115
+ };
116
+ data: any;
117
+ barWidth?: undefined;
118
+ barGap?: undefined;
119
+ label?: undefined;
120
+ symbolPosition?: undefined;
121
+ } | {
122
+ name: string;
123
+ type: string;
124
+ symbolSize: number[];
125
+ symbolOffset: number[];
126
+ symbolPosition: string;
127
+ itemStyle: {
128
+ color: {
129
+ type: string;
130
+ x: number;
131
+ y: number;
132
+ x2: number;
133
+ y2: number;
134
+ colorStops: {
135
+ offset: number;
136
+ color: string;
137
+ }[];
138
+ };
139
+ };
140
+ data: any;
141
+ barWidth?: undefined;
142
+ barGap?: undefined;
143
+ label?: undefined;
144
+ })[];
145
+ };
146
+ export declare const barHorizontalParseData: (chartOption: any, data: any[], props?: {
147
+ name: string;
148
+ value: string;
149
+ }) => void;
150
+ export declare const horizontalSeriesData: (val: number[]) => any;
151
+ export declare const horizontalMaxData: (val: number[]) => number[];
152
+ export declare const chartsHorizontalBar: (data: any, props?: {
153
+ name: string;
154
+ value: string;
155
+ }) => any;
156
+ export declare const pieParseData: ({ chartOption, data, props }: any) => void;
157
+ export declare const chartsPie: ({ data, radiusType, roseType, isLegend, isLine, center, isTitle }: any) => {
158
+ color: string[];
159
+ toolbox: {
160
+ show: boolean;
161
+ };
162
+ tooltip: {
163
+ trigger: string;
164
+ show: boolean;
165
+ formatter: (params: any) => string;
166
+ };
167
+ title: {
168
+ show: any;
169
+ text: string;
170
+ textStyle: {
171
+ color: string;
172
+ fontSize: number;
173
+ };
174
+ x: number;
175
+ y: number;
176
+ };
177
+ legend: {
178
+ show: any;
179
+ left: string;
180
+ formatter: (name: any) => string;
181
+ textStyle: {
182
+ fontSize: number;
183
+ color: string;
184
+ };
185
+ data: any;
186
+ orient: string;
187
+ itemWidth: number;
188
+ itemHeight: number;
189
+ borderRadius: number;
190
+ x: string;
191
+ top: string;
192
+ align: string;
193
+ itemGap: number;
194
+ };
195
+ series: {
196
+ type: string;
197
+ center: any;
198
+ radius: string[];
199
+ roseType: any;
200
+ itemStyle: {
201
+ borderRadius: number;
202
+ };
203
+ label: {
204
+ show: any;
205
+ position: string;
206
+ alignTo: string;
207
+ backgroundColor: string;
208
+ height: number;
209
+ width: number;
210
+ lineHeight: number;
211
+ distanceToLabelLine: number;
212
+ borderRadius: number;
213
+ borderWidth: number;
214
+ borderColor: string;
215
+ padding: number[];
216
+ formatter: (params: any) => string;
217
+ rich: {
218
+ a: {
219
+ padding: number[];
220
+ fontSize: string;
221
+ fontFamily: string;
222
+ color: string;
223
+ };
224
+ b: {
225
+ padding: number[];
226
+ fontSize: string;
227
+ fontFamily: string;
228
+ fontWeight: string;
229
+ color: string;
230
+ };
231
+ };
232
+ };
233
+ labelLine: {
234
+ show: boolean;
235
+ length: number;
236
+ length2: number;
237
+ align: string;
238
+ lineStyle: {
239
+ width: number;
240
+ };
241
+ };
242
+ data: any;
243
+ }[];
244
+ graphic: {
245
+ invisible: boolean;
246
+ type: string;
247
+ left: string;
248
+ top: string;
249
+ style: {
250
+ text: string;
251
+ fontSize: number;
252
+ fill: string;
253
+ fontWeight: string;
254
+ };
255
+ }[];
256
+ };
257
+ export declare const lineParseData: (chartOption: any, data: any, props?: {
258
+ name: string;
259
+ value: any;
260
+ }) => void;
261
+ export declare const lineMode: () => {
262
+ name: string;
263
+ type: string;
264
+ symbol: string;
265
+ smooth: boolean;
266
+ lineStyle: {
267
+ width: number;
268
+ color: string;
269
+ };
270
+ showSymbol: boolean;
271
+ itemStyle: {
272
+ color: string;
273
+ label: {
274
+ show: boolean;
275
+ position: string;
276
+ formatter: (res: any) => any;
277
+ };
278
+ };
279
+ areaStyle: {
280
+ color: {
281
+ type: string;
282
+ x: number;
283
+ y: number;
284
+ x2: number;
285
+ y2: number;
286
+ colorStops: {
287
+ offset: number;
288
+ color: string;
289
+ }[];
290
+ global: boolean;
291
+ };
292
+ };
293
+ data: never[];
294
+ };
295
+ export declare const chartsLine: (data?: any[], props?: {
296
+ name: string;
297
+ value: any;
298
+ }) => any;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs"),n=require("./chartsOption.cjs"),t=[{key:"assets",name:"资产名称"},{key:"type",name:"资产类型"},{key:"data",name:"资产数据"}],a=[{assets:"name1",type:"type1",data:"data1"},{assets:"name2",type:"type2",data:"data2"},{assets:"name3",type:"type3",data:"data3"}],d=[{data:[{name:"默认数据",value:180}],label:"name1"},{data:[{name:"默认数据",value:311}],label:"name2"},{data:[{name:"默认数据",value:42}],label:"name3"},{data:[{name:"默认数据",value:32391}],label:"name4"}],i=[{type:"report-select",label:"资产:",value:"0",data:[{label:"全部",data:"0"},{label:"10.10.2.20_root",data:"743dbb32-8a41-4990-9d76-48925b000a93"},{label:"10.10.4.206_sysdba",data:"23193788-c895-47a8-8123-65799540394c"},{label:"10.10.4.26_root@/root/files/",data:"bb7b07c9-b96b-4caf-ac76-bb45ae849844"}],uri:"/da/report/sens/get_asset_all",id:e.getUniId()},{type:"range-time",data:[{start_time:"2024-08-20 19:49:34",end_time:"2024-09-12 19:49:34"}],id:e.getUniId()},{type:"h1",data:"报表名称",options:{size:24,color:"rgba(0,0,0,0.85)",fontWeight:500,letterSpacing:0,textIndent:0,textAlign:"left"},id:e.getUniId()},{type:"h2",data:"一级标题",name:"一级标题",options:{size:18,color:" rgba(0, 0, 0, 0.85)",fontWeight:500,letterSpacing:0,textIndent:0,textAlign:"left"},id:e.getUniId()},{type:"report-table",data:a,showColumn:t,name:"表格",options:{showColumn:{assets:!0,type:!0,data:!0},border:!0,showHeader:!0,stripe:!1},rp_item_uuid:"",id:e.getUniId()}];n.chartsBar();exports.normalValue=i;
@@ -0,0 +1,4 @@
1
+ import { ContentType } from '../stores/interface';
2
+ export declare const normalValue: any[];
3
+ export declare const componentModelList: ContentType[];
4
+ export declare const normalValueFn: (type: string) => any;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");function O(e=Date.now(),n="YYYY-MM-DD HH:mm:ss"){try{let t;if(typeof e=="number"||typeof e=="string"){if(t=new Date(e),isNaN(t.getTime()))throw new Error("Invalid date")}else t=e;const r=(c,u=2)=>String(c).padStart(u,"0"),s=c=>{switch(c){case"YYYY":return r(t.getFullYear());case"YY":return r(t.getFullYear()).slice(2,4);case"MM":return r(t.getMonth()+1);case"M":return String(t.getMonth()+1);case"DD":return r(t.getDate());case"D":return String(t.getDate());case"HH":return r(t.getHours());case"H":return String(t.getHours());case"mm":return r(t.getMinutes());case"m":return String(t.getMinutes());case"ss":return r(t.getSeconds());case"s":return String(t.getSeconds());case"SSS":return r(t.getMilliseconds(),3);default:return c}};return n.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(t){return console.error("Error formatting date:",t),""}}function T(e,n=2,t=",",r=".",s,c){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");const u=Number(e);if(isNaN(u)||!isFinite(u))return"";if(u===0)return u.toFixed(n);let a=u.toFixed(n);if(typeof t=="string"&&t!==""){const[i,d]=a.split(".");a=i.replace(/(\d)(?=(\d{3})+$)/g,"$1"+t)+(d?r+d:"")}return(s||"")+a+(c||"")}function R(e,n=0,t=!1){let r=null;function s(u){if(r||(r=u),u-r>=n){try{e()}catch(i){console.error("Error executing rafTimeout function:",i)}t&&(r=u,c.id=requestAnimationFrame(s))}else c.id=requestAnimationFrame(s)}const c={id:requestAnimationFrame(s)};return c}function N(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function F(e,n=300){let t=!0;return function(...r){return t&&(e(...r),t=!1,setTimeout(()=>{t=!0},n)),!1}}function L(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e(...r)},n)}}function H(e,n){if(Number.isNaN(e)||Number.isNaN(n))throw new Error("Both num1 and num2 must be valid numbers.");const t=e%1!==0,r=n%1!==0;if(!t&&!r)return e+n;const s=String(e).split(".")[1]??"",c=String(n).split(".")[1]??"",u=Math.max(s.length,c.length),a=Math.pow(10,u),i=e.toFixed(u),d=n.toFixed(u);return(+i.replace(".","")+ +d.replace(".",""))/a}function U(e,n){if(!e){console.error("无效的 url");return}const t=n||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(r=>{r.ok?r.blob().then(s=>{const c=URL.createObjectURL(s),u=document.createElement("a");u.href=c,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)}):console.error("请求文件失败,状态码:",r.status)})}catch(r){console.error("文件下载失败:",r)}}function V(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function Y(){const e=o.ref(!1),n=o.getCurrentInstance();return n&&o.onMounted(()=>{e.value=!0},n),e}function E(e){const n=Y();return o.computed(()=>(n.value,!!e()))}function k(e,n,t){o.onMounted(()=>e.addEventListener(n,t)),o.onUnmounted(()=>e.removeEventListener(n,t))}function q(e,n,t={}){const r=E(()=>window&&"MutationObserver"in window),s=o.ref(!1);let c;const u=o.computed(()=>{const f=o.toValue(e);return f?Array.isArray(f)?f.map(m=>o.toValue(m)).filter(m=>m):[f]:[]}),a=()=>{c&&(c.disconnect(),c=void 0)},i=()=>{r.value&&u.value.length&&!s.value&&(c=new MutationObserver(n),u.value.forEach(f=>c.observe(f,t)))};o.watch(()=>u.value,()=>{a(),i()},{immediate:!0,flush:"post"});const d=()=>{s.value=!0,a()},v=()=>{s.value=!1,i()};return o.onBeforeUnmount(()=>a()),{stop:d,start:v}}function B(e=window,n=0,t,r){const s=o.ref(0),c=o.ref(0),u=o.ref(0),a=o.ref(0),i=o.ref(!1),d=o.ref(!1),v=o.ref(!1),f=o.ref(!1),m=o.ref(!1),b=o.ref(0),S=o.ref(0);function D(l){i.value=!0;const p=l.target.documentElement??l.target;s.value=p.scrollLeft,u.value=p.scrollTop,d.value=s.value<b.value,v.value=s.value>b.value,f.value=u.value<S.value,m.value=u.value>S.value,b.value=s.value,S.value=u.value,w(l),t&&t(l)}const y=F(D,n);function A(l){i.value&&(i.value=!1,d.value=!1,v.value=!1,f.value=!1,m.value=!1,r&&r(l))}const w=L(A,n+200),M=o.computed(()=>{const l=o.toValue(e);return l||null});o.watch(()=>M.value,(l,p)=>{var g;if(p&&x(p),l){const h=((g=l==null?void 0:l.document)==null?void 0:g.documentElement)||(l==null?void 0:l.documentElement)||l;c.value=h.scrollWidth-h.clientWidth,a.value=h.scrollHeight-h.clientHeight,h.addEventListener("scroll",y),h.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function x(l){var g;const p=((g=l==null?void 0:l.document)==null?void 0:g.documentElement)||(l==null?void 0:l.documentElement)||l;p.removeEventListener("scroll",y),p.removeEventListener("scrollend",w)}return o.onBeforeUnmount(()=>x(M.value)),{x:s,xScrollMax:c,y:u,yScrollMax:a,isScrolling:i,left:d,right:v,top:f,bottom:m}}function z(){const e=o.ref(0),n=o.ref(0);let t=performance.now();const r=10,s=c=>{if(n.value++,n.value>=r){const u=c-t;e.value=Math.round(1e3/(u/r)),t=c,n.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function I(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const n=o.ref(window&&window.matchMedia(e).matches),t=window.matchMedia(e),r=s=>{n.value=s.matches};return o.onMounted(()=>{t.addEventListener("change",r)}),o.onBeforeUnmount(()=>{t.removeEventListener("change",r)}),{match:n}}function j(e,n,t={}){const r=E(()=>window&&"ResizeObserver"in window);let s;const c=o.ref(!1),u=o.computed(()=>{const f=o.toValue(e);return f?Array.isArray(f)?f.map(m=>o.toValue(m)).filter(m=>m):[f]:[]}),a=()=>{s&&(s.disconnect(),s=void 0)},i=()=>{r.value&&u.value.length&&!c.value&&(s=new ResizeObserver(n),u.value.forEach(f=>s.observe(f,t)))};o.watch(()=>u.value,()=>{a(),i()},{immediate:!0,flush:"post"});const d=()=>{c.value=!0,a()},v=()=>{c.value=!1,i()};return o.onBeforeUnmount(()=>a()),{stop:d,start:v}}function P(e="default"){const n=o.useSlots(),t=r=>{var u;const s=(u=n[r])==null?void 0:u.call(n),c=a=>{if(a.type===o.Comment||Array.isArray(a.children)&&!a.children.length)return!1;if(a.type!==o.Text)return!0;if(typeof a.children=="string")return a.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(i=>c(i)):!1};if(Array.isArray(e)){const r=o.reactive({});return e.forEach(s=>{const c=o.computed(()=>t(s));r[s]=c}),r}else return o.computed(()=>t(e))}exports.add=H;exports.cancelRaf=N;exports.dateFormat=O;exports.debounce=L;exports.downloadFile=U;exports.formatNumber=T;exports.rafTimeout=R;exports.throttle=F;exports.toggleDark=V;exports.useEventListener=k;exports.useFps=z;exports.useMediaQuery=I;exports.useMounted=Y;exports.useMutationObserver=q;exports.useResizeObserver=j;exports.useScroll=B;exports.useSlotsExist=P;exports.useSupported=E;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue");function A(e=Date.now(),n="YYYY-MM-DD HH:mm:ss"){try{let t;if(typeof e=="number"||typeof e=="string"){if(t=new Date(e),isNaN(t.getTime()))throw new Error("Invalid date")}else t=e;const r=(a,u=2)=>String(a).padStart(u,"0"),s=a=>{switch(a){case"YYYY":return r(t.getFullYear());case"YY":return r(t.getFullYear()).slice(2,4);case"MM":return r(t.getMonth()+1);case"M":return String(t.getMonth()+1);case"DD":return r(t.getDate());case"D":return String(t.getDate());case"HH":return r(t.getHours());case"H":return String(t.getHours());case"mm":return r(t.getMinutes());case"m":return String(t.getMinutes());case"ss":return r(t.getSeconds());case"s":return String(t.getSeconds());case"SSS":return r(t.getMilliseconds(),3);default:return a}};return n.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g,s)}catch(t){return console.error("Error formatting date:",t),""}}function T(e,n=2,t=",",r=".",s,a){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");const u=Number(e);if(isNaN(u)||!isFinite(u))return"";if(u===0)return u.toFixed(n);let l=u.toFixed(n);if(typeof t=="string"&&t!==""){const[i,d]=l.split(".");l=i.replace(/(\d)(?=(\d{3})+$)/g,"$1"+t)+(d?r+d:"")}return(s||"")+l+(a||"")}function N(e,n=0,t=!1){let r=null;function s(u){if(r||(r=u),u-r>=n){try{e()}catch(i){console.error("Error executing rafTimeout function:",i)}t&&(r=u,a.id=requestAnimationFrame(s))}else a.id=requestAnimationFrame(s)}const a={id:requestAnimationFrame(s)};return a}function R(e){e&&e.id&&typeof e.id=="number"?cancelAnimationFrame(e.id):console.warn("cancelRaf received an invalid id:",e)}function F(e,n=300){let t=!0;return function(...r){return t&&(e(...r),t=!1,setTimeout(()=>{t=!0},n)),!1}}function L(e,n=300){let t=null;return function(...r){t&&clearTimeout(t),t=setTimeout(()=>{e(...r)},n)}}function U(e,n){if(Number.isNaN(e)||Number.isNaN(n))throw new Error("Both num1 and num2 must be valid numbers.");const t=e%1!==0,r=n%1!==0;if(!t&&!r)return e+n;const s=String(e).split(".")[1]??"",a=String(n).split(".")[1]??"",u=Math.max(s.length,a.length),l=Math.pow(10,u),i=e.toFixed(u),d=n.toFixed(u);return(+i.replace(".","")+ +d.replace(".",""))/l}function H(e,n){if(!e){console.error("无效的 url");return}const t=n||e.split("?")[0].split("/").pop()||"download";try{fetch(e).then(r=>{r.ok?r.blob().then(s=>{const a=URL.createObjectURL(s),u=document.createElement("a");u.href=a,u.download=t,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(a)}):console.error("请求文件失败,状态码:",r.status)})}catch(r){console.error("文件下载失败:",r)}}function V(){const e=document.documentElement;e.classList.toggle("dark"),e.classList.contains("dark")?e.style.colorScheme="dark":e.style.colorScheme="light"}function Y(){const e=o.ref(!1),n=o.getCurrentInstance();return n&&o.onMounted(()=>{e.value=!0},n),e}function E(e){const n=Y();return o.computed(()=>(n.value,!!e()))}function k(e,n,t){o.onMounted(()=>e.addEventListener(n,t)),o.onUnmounted(()=>e.removeEventListener(n,t))}function q(e,n,t={}){const r=E(()=>window&&"MutationObserver"in window),s=o.ref(!1);let a;const u=o.computed(()=>{const f=o.toValue(e);return f?Array.isArray(f)?f.map(m=>o.toValue(m)).filter(m=>m):[f]:[]}),l=()=>{a&&(a.disconnect(),a=void 0)},i=()=>{r.value&&u.value.length&&!s.value&&(a=new MutationObserver(n),u.value.forEach(f=>a.observe(f,t)))};o.watch(()=>u.value,()=>{l(),i()},{immediate:!0,flush:"post"});const d=()=>{s.value=!0,l()},v=()=>{s.value=!1,i()};return o.onBeforeUnmount(()=>l()),{stop:d,start:v}}function B(e=window,n=0,t,r){const s=o.ref(0),a=o.ref(0),u=o.ref(0),l=o.ref(0),i=o.ref(!1),d=o.ref(!1),v=o.ref(!1),f=o.ref(!1),m=o.ref(!1),b=o.ref(0),S=o.ref(0);function D(c){i.value=!0;const p=c.target.documentElement??c.target;s.value=p.scrollLeft,u.value=p.scrollTop,d.value=s.value<b.value,v.value=s.value>b.value,f.value=u.value<S.value,m.value=u.value>S.value,b.value=s.value,S.value=u.value,w(c),t&&t(c)}const y=F(D,n);function O(c){i.value&&(i.value=!1,d.value=!1,v.value=!1,f.value=!1,m.value=!1,r&&r(c))}const w=L(O,n+200),M=o.computed(()=>{const c=o.toValue(e);return c||null});o.watch(()=>M.value,(c,p)=>{var h;if(p&&x(p),c){const g=((h=c==null?void 0:c.document)==null?void 0:h.documentElement)||(c==null?void 0:c.documentElement)||c;a.value=g.scrollWidth-g.clientWidth,l.value=g.scrollHeight-g.clientHeight,g.addEventListener("scroll",y),g.addEventListener("scrollend",w)}},{immediate:!0,flush:"post"});function x(c){var h;const p=((h=c==null?void 0:c.document)==null?void 0:h.documentElement)||(c==null?void 0:c.documentElement)||c;p.removeEventListener("scroll",y),p.removeEventListener("scrollend",w)}return o.onBeforeUnmount(()=>x(M.value)),{x:s,xScrollMax:a,y:u,yScrollMax:l,isScrolling:i,left:d,right:v,top:f,bottom:m}}function I(){const e=o.ref(0),n=o.ref(0);let t=performance.now();const r=10,s=a=>{if(n.value++,n.value>=r){const u=a-t;e.value=Math.round(1e3/(u/r)),t=a,n.value=0}requestAnimationFrame(s)};return requestAnimationFrame(s),{fps:e}}function z(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid mediaQuery parameter. It must be a non-empty string.");const n=o.ref(window&&window.matchMedia(e).matches),t=window.matchMedia(e),r=s=>{n.value=s.matches};return o.onMounted(()=>{t.addEventListener("change",r)}),o.onBeforeUnmount(()=>{t.removeEventListener("change",r)}),{match:n}}function j(e,n,t={}){const r=E(()=>window&&"ResizeObserver"in window);let s;const a=o.ref(!1),u=o.computed(()=>{const f=o.toValue(e);return f?Array.isArray(f)?f.map(m=>o.toValue(m)).filter(m=>m):[f]:[]}),l=()=>{s&&(s.disconnect(),s=void 0)},i=()=>{r.value&&u.value.length&&!a.value&&(s=new ResizeObserver(n),u.value.forEach(f=>s.observe(f,t)))};o.watch(()=>u.value,()=>{l(),i()},{immediate:!0,flush:"post"});const d=()=>{a.value=!0,l()},v=()=>{a.value=!1,i()};return o.onBeforeUnmount(()=>l()),{stop:d,start:v}}function P(e="default"){const n=o.useSlots(),t=r=>{var u;const s=(u=n[r])==null?void 0:u.call(n),a=l=>{if(l.type===o.Comment||Array.isArray(l.children)&&!l.children.length)return!1;if(l.type!==o.Text)return!0;if(typeof l.children=="string")return l.children.trim()!==""};return s&&(s!=null&&s.length)?s.some(i=>a(i)):!1};if(Array.isArray(e)){const r=o.reactive({});return e.forEach(s=>{const a=o.computed(()=>t(s));r[s]=a}),r}else return o.computed(()=>t(e))}const C=()=>new Date().getTime().toString(36)+"-"+Math.random().toString(36).substring(2,9),J=e=>JSON.parse(JSON.stringify(e));exports.add=U;exports.cancelRaf=R;exports.dateFormat=A;exports.debounce=L;exports.deepClone=J;exports.downloadFile=H;exports.formatNumber=T;exports.getUniId=C;exports.rafTimeout=N;exports.throttle=F;exports.toggleDark=V;exports.useEventListener=k;exports.useFps=I;exports.useMediaQuery=z;exports.useMounted=Y;exports.useMutationObserver=q;exports.useResizeObserver=j;exports.useScroll=B;exports.useSlotsExist=P;exports.useSupported=E;
@@ -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;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=t=>{const n=t;return n.install=function(e){e.component(n.__name,t)},t};exports.withInstall=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=t=>{const n=t;return n.install=function(e){e.component(n.name,t)},t};exports.withInstall=l;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@topdatasec/report",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "author": "wangguiwang",
6
6
  "homepage": "",
@@ -58,7 +58,14 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@vuepic/vue-datepicker": "^11.0.1",
61
- "@vueuse/core": "^12.8.2"
61
+ "@vueuse/core": "^12.8.2",
62
+ "@wangeditor/editor": "^5.1.23",
63
+ "@wangeditor/editor-for-vue": "^1.0.2",
64
+ "echarts": "^5.6.0",
65
+ "pinia": "^3.0.1",
66
+ "topdatasec-ui": "^1.6.1",
67
+ "vue": "^3.5.13",
68
+ "vue-router": "^4.5.0"
62
69
  },
63
70
  "devDependencies": {
64
71
  "@ant-design/colors": "^7.2.0",
@@ -85,8 +92,6 @@
85
92
  "vite-plugin-dts": "^4.5.3",
86
93
  "vite-plugin-vue-devtools": "^7.7.2",
87
94
  "vitepress": "^1.6.3",
88
- "vue": "^3.5.13",
89
- "vue-router": "^4.5.0",
90
95
  "vue-tsc": "^2.2.8"
91
96
  },
92
97
  "license": "MIT",