@das-fed/ui 6.4.0-beta.7 → 6.4.0-dev.10

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 (39) hide show
  1. package/package.json +5 -5
  2. package/packages/business-components/device-panel/index.js +10094 -9817
  3. package/packages/business-components/device-panel/index.js.gz +0 -0
  4. package/packages/business-components/export-button/index.js +432 -152
  5. package/packages/business-components/export-button/index.js.gz +0 -0
  6. package/packages/business-components/import-button/index.js +603 -323
  7. package/packages/business-components/import-button/index.js.gz +0 -0
  8. package/packages/business-components/process-form/index.js +1122 -841
  9. package/packages/business-components/process-form/index.js.gz +0 -0
  10. package/packages/business-components/process-log/index.js +1758 -1477
  11. package/packages/business-components/process-log/index.js.gz +0 -0
  12. package/packages/business-components/process-search-form/index.js +719 -439
  13. package/packages/business-components/process-search-form/index.js.gz +0 -0
  14. package/packages/business-components/process-table/index.js +819 -538
  15. package/packages/business-components/process-table/index.js.gz +0 -0
  16. package/packages/business-components/urgent-panel/index.js +1969 -1691
  17. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  18. package/packages/business-components/video-dialog/index.js +619 -338
  19. package/packages/business-components/video-dialog/index.js.gz +0 -0
  20. package/packages/components/calendar/index.js +614 -257
  21. package/packages/components/calendar/index.js.gz +0 -0
  22. package/packages/components/date-picker/index.js +6025 -5129
  23. package/packages/components/date-picker/index.js.gz +0 -0
  24. package/packages/components/image-viewer/index.d.ts +0 -9
  25. package/packages/components/image-viewer/index.js +29 -34
  26. package/packages/components/image-viewer/index.js.gz +0 -0
  27. package/packages/components/image-viewer/src/Index.vue.d.ts +0 -3
  28. package/packages/components/image-viewer/src/hooks/use-handler-image-src.d.ts +1 -2
  29. package/packages/components/image-viewer/src/type.d.ts +0 -3
  30. package/packages/components/image-viewer/style.css +1 -1
  31. package/packages/components/image-viewer/style.css.gz +0 -0
  32. package/packages/components/search-form/index.js +11 -13
  33. package/packages/components/search-form/index.js.gz +0 -0
  34. package/packages/components/table/index.js +127 -127
  35. package/packages/components/table/index.js.gz +0 -0
  36. package/packages/components/tree/index.js +70 -70
  37. package/packages/components/tree/index.js.gz +0 -0
  38. package/packages/components/tree-select/index.js +30 -29
  39. package/packages/components/tree-select/index.js.gz +0 -0
@@ -1,154 +1,434 @@
1
1
  import '@das-fed/ui/packages/business-components/export-button/style.css';
2
- import { withInstall as N } from "@das-fed/utils/with-install/index";
3
- import { ref as p, defineComponent as X, watch as S, openBlock as G, createElementBlock as J, createVNode as D, unref as x, withCtx as H, renderSlot as K, createTextVNode as Q, toDisplayString as W, isRef as Y } from "vue";
4
- import { i18n as k } from "@das-fed/web/packages/i18n/index";
5
- import { DasDialog as Z } from "@das-fed/ui/packages/components/dialog/index";
6
- import { DasProgress as ee } from "@das-fed/ui/packages/components/progress/index";
7
- import { DasButton as te } from "@das-fed/ui/packages/components/button/index";
8
- import { iotProgress as se } from "@das-fed/utils/api-services/modules/iot";
9
- import { DasMessage as w } from "@das-fed/ui/packages/components/message/index";
10
- import U from "dayjs";
11
- import { getConfig as E } from "@das-fed/utils/config";
12
- let _ = (a = 21) => {
13
- let l = "", t = crypto.getRandomValues(new Uint8Array(a));
14
- for (; a--; ) {
15
- let s = t[a] & 63;
16
- s < 36 ? l += s.toString(36) : s < 62 ? l += (s - 26).toString(36).toUpperCase() : s < 63 ? l += "_" : l += "-";
2
+ import { withInstall as le } from "@das-fed/utils/with-install/index";
3
+ import { ref as H, defineComponent as ce, watch as re, openBlock as fe, createElementBlock as de, createVNode as ee, unref as I, withCtx as se, renderSlot as pe, createTextVNode as me, toDisplayString as he, isRef as ne } from "vue";
4
+ import { i18n as q } from "@das-fed/web/packages/i18n/index";
5
+ import { DasDialog as ve } from "@das-fed/ui/packages/components/dialog/index";
6
+ import { DasProgress as ge } from "@das-fed/ui/packages/components/progress/index";
7
+ import { DasButton as $e } from "@das-fed/ui/packages/components/button/index";
8
+ import { iotProgress as ye } from "@das-fed/utils/api-services/modules/iot";
9
+ import { DasMessage as Q } from "@das-fed/ui/packages/components/message/index";
10
+ import { getConfig as ae } from "@das-fed/utils/config";
11
+ let ie = (c = 21) => {
12
+ let D = "", f = crypto.getRandomValues(new Uint8Array(c));
13
+ for (; c--; ) {
14
+ let u = f[c] & 63;
15
+ u < 36 ? D += u.toString(36) : u < 62 ? D += (u - 26).toString(36).toUpperCase() : u < 63 ? D += "_" : D += "-";
17
16
  }
18
- return l;
17
+ return D;
19
18
  };
20
- const ae = se.get("progress"), oe = (a) => {
21
- let l = p(!1), t = p(!1), s = p(""), i = p(0), o = p("normal"), m = p(!1), c, b = p(""), u = p(""), d = p(""), f = p(""), g = p(!1), $ = p(""), P;
22
- const C = () => {
23
- u.value = "", d.value = "", f.value = "", g.value = !1, $.value = "";
24
- }, j = async (e, n = "", y = "") => {
25
- o.value = "normal", i.value = 0, s.value = y || "导出进度", t.value = !0;
26
- const v = await (e == null ? void 0 : e());
27
- if (!v.status) {
28
- t.value = !1, o.value = "error";
19
+ var be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
20
+ function Me(c) {
21
+ return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
22
+ }
23
+ var ue = { exports: {} };
24
+ (function(c, D) {
25
+ (function(f, u) {
26
+ c.exports = u();
27
+ })(be, function() {
28
+ var f = 1e3, u = 6e4, x = 36e5, v = "millisecond", b = "second", M = "minute", k = "hour", p = "day", w = "week", h = "month", L = "quarter", O = "year", _ = "date", J = "Invalid Date", X = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, K = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, z = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(n) {
29
+ var r = ["th", "st", "nd", "rd"], e = n % 100;
30
+ return "[" + n + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
31
+ } }, E = function(n, r, e) {
32
+ var s = String(n);
33
+ return !s || s.length >= r ? n : "" + Array(r + 1 - s.length).join(e) + n;
34
+ }, Z = { s: E, z: function(n) {
35
+ var r = -n.utcOffset(), e = Math.abs(r), s = Math.floor(e / 60), t = e % 60;
36
+ return (r <= 0 ? "+" : "-") + E(s, 2, "0") + ":" + E(t, 2, "0");
37
+ }, m: function n(r, e) {
38
+ if (r.date() < e.date()) return -n(e, r);
39
+ var s = 12 * (e.year() - r.year()) + (e.month() - r.month()), t = r.clone().add(s, h), a = e - t < 0, o = r.clone().add(s + (a ? -1 : 1), h);
40
+ return +(-(s + (e - t) / (a ? t - o : o - t)) || 0);
41
+ }, a: function(n) {
42
+ return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
43
+ }, p: function(n) {
44
+ return { M: h, y: O, w, d: p, D: _, h: k, m: M, s: b, ms: v, Q: L }[n] || String(n || "").toLowerCase().replace(/s$/, "");
45
+ }, u: function(n) {
46
+ return n === void 0;
47
+ } }, V = "en", j = {};
48
+ j[V] = z;
49
+ var d = "$isDayjsObject", $ = function(n) {
50
+ return n instanceof g || !(!n || !n[d]);
51
+ }, P = function n(r, e, s) {
52
+ var t;
53
+ if (!r) return V;
54
+ if (typeof r == "string") {
55
+ var a = r.toLowerCase();
56
+ j[a] && (t = a), e && (j[a] = e, t = a);
57
+ var o = r.split("-");
58
+ if (!t && o.length > 1) return n(o[0]);
59
+ } else {
60
+ var m = r.name;
61
+ j[m] = r, t = m;
62
+ }
63
+ return !s && t && (V = t), t || !s && V;
64
+ }, l = function(n, r) {
65
+ if ($(n)) return n.clone();
66
+ var e = typeof r == "object" ? r : {};
67
+ return e.date = n, e.args = arguments, new g(e);
68
+ }, i = Z;
69
+ i.l = P, i.i = $, i.w = function(n, r) {
70
+ return l(n, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
71
+ };
72
+ var g = function() {
73
+ function n(e) {
74
+ this.$L = P(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[d] = !0;
75
+ }
76
+ var r = n.prototype;
77
+ return r.parse = function(e) {
78
+ this.$d = function(s) {
79
+ var t = s.date, a = s.utc;
80
+ if (t === null) return /* @__PURE__ */ new Date(NaN);
81
+ if (i.u(t)) return /* @__PURE__ */ new Date();
82
+ if (t instanceof Date) return new Date(t);
83
+ if (typeof t == "string" && !/Z$/i.test(t)) {
84
+ var o = t.match(X);
85
+ if (o) {
86
+ var m = o[2] - 1 || 0, y = (o[7] || "0").substring(0, 3);
87
+ return a ? new Date(Date.UTC(o[1], m, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, y)) : new Date(o[1], m, o[3] || 1, o[4] || 0, o[5] || 0, o[6] || 0, y);
88
+ }
89
+ }
90
+ return new Date(t);
91
+ }(e), this.init();
92
+ }, r.init = function() {
93
+ var e = this.$d;
94
+ this.$y = e.getFullYear(), this.$M = e.getMonth(), this.$D = e.getDate(), this.$W = e.getDay(), this.$H = e.getHours(), this.$m = e.getMinutes(), this.$s = e.getSeconds(), this.$ms = e.getMilliseconds();
95
+ }, r.$utils = function() {
96
+ return i;
97
+ }, r.isValid = function() {
98
+ return this.$d.toString() !== J;
99
+ }, r.isSame = function(e, s) {
100
+ var t = l(e);
101
+ return this.startOf(s) <= t && t <= this.endOf(s);
102
+ }, r.isAfter = function(e, s) {
103
+ return l(e) < this.startOf(s);
104
+ }, r.isBefore = function(e, s) {
105
+ return this.endOf(s) < l(e);
106
+ }, r.$g = function(e, s, t) {
107
+ return i.u(e) ? this[s] : this.set(t, e);
108
+ }, r.unix = function() {
109
+ return Math.floor(this.valueOf() / 1e3);
110
+ }, r.valueOf = function() {
111
+ return this.$d.getTime();
112
+ }, r.startOf = function(e, s) {
113
+ var t = this, a = !!i.u(s) || s, o = i.p(e), m = function(A, Y) {
114
+ var C = i.w(t.$u ? Date.UTC(t.$y, Y, A) : new Date(t.$y, Y, A), t);
115
+ return a ? C : C.endOf(p);
116
+ }, y = function(A, Y) {
117
+ return i.w(t.toDate()[A].apply(t.toDate("s"), (a ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(Y)), t);
118
+ }, S = this.$W, T = this.$M, U = this.$D, W = "set" + (this.$u ? "UTC" : "");
119
+ switch (o) {
120
+ case O:
121
+ return a ? m(1, 0) : m(31, 11);
122
+ case h:
123
+ return a ? m(1, T) : m(0, T + 1);
124
+ case w:
125
+ var R = this.$locale().weekStart || 0, F = (S < R ? S + 7 : S) - R;
126
+ return m(a ? U - F : U + (6 - F), T);
127
+ case p:
128
+ case _:
129
+ return y(W + "Hours", 0);
130
+ case k:
131
+ return y(W + "Minutes", 1);
132
+ case M:
133
+ return y(W + "Seconds", 2);
134
+ case b:
135
+ return y(W + "Milliseconds", 3);
136
+ default:
137
+ return this.clone();
138
+ }
139
+ }, r.endOf = function(e) {
140
+ return this.startOf(e, !1);
141
+ }, r.$set = function(e, s) {
142
+ var t, a = i.p(e), o = "set" + (this.$u ? "UTC" : ""), m = (t = {}, t[p] = o + "Date", t[_] = o + "Date", t[h] = o + "Month", t[O] = o + "FullYear", t[k] = o + "Hours", t[M] = o + "Minutes", t[b] = o + "Seconds", t[v] = o + "Milliseconds", t)[a], y = a === p ? this.$D + (s - this.$W) : s;
143
+ if (a === h || a === O) {
144
+ var S = this.clone().set(_, 1);
145
+ S.$d[m](y), S.init(), this.$d = S.set(_, Math.min(this.$D, S.daysInMonth())).$d;
146
+ } else m && this.$d[m](y);
147
+ return this.init(), this;
148
+ }, r.set = function(e, s) {
149
+ return this.clone().$set(e, s);
150
+ }, r.get = function(e) {
151
+ return this[i.p(e)]();
152
+ }, r.add = function(e, s) {
153
+ var t, a = this;
154
+ e = Number(e);
155
+ var o = i.p(s), m = function(T) {
156
+ var U = l(a);
157
+ return i.w(U.date(U.date() + Math.round(T * e)), a);
158
+ };
159
+ if (o === h) return this.set(h, this.$M + e);
160
+ if (o === O) return this.set(O, this.$y + e);
161
+ if (o === p) return m(1);
162
+ if (o === w) return m(7);
163
+ var y = (t = {}, t[M] = u, t[k] = x, t[b] = f, t)[o] || 1, S = this.$d.getTime() + e * y;
164
+ return i.w(S, this);
165
+ }, r.subtract = function(e, s) {
166
+ return this.add(-1 * e, s);
167
+ }, r.format = function(e) {
168
+ var s = this, t = this.$locale();
169
+ if (!this.isValid()) return t.invalidDate || J;
170
+ var a = e || "YYYY-MM-DDTHH:mm:ssZ", o = i.z(this), m = this.$H, y = this.$m, S = this.$M, T = t.weekdays, U = t.months, W = t.meridiem, R = function(Y, C, N, G) {
171
+ return Y && (Y[C] || Y(s, a)) || N[C].slice(0, G);
172
+ }, F = function(Y) {
173
+ return i.s(m % 12 || 12, Y, "0");
174
+ }, A = W || function(Y, C, N) {
175
+ var G = Y < 12 ? "AM" : "PM";
176
+ return N ? G.toLowerCase() : G;
177
+ };
178
+ return a.replace(K, function(Y, C) {
179
+ return C || function(N) {
180
+ switch (N) {
181
+ case "YY":
182
+ return String(s.$y).slice(-2);
183
+ case "YYYY":
184
+ return i.s(s.$y, 4, "0");
185
+ case "M":
186
+ return S + 1;
187
+ case "MM":
188
+ return i.s(S + 1, 2, "0");
189
+ case "MMM":
190
+ return R(t.monthsShort, S, U, 3);
191
+ case "MMMM":
192
+ return R(U, S);
193
+ case "D":
194
+ return s.$D;
195
+ case "DD":
196
+ return i.s(s.$D, 2, "0");
197
+ case "d":
198
+ return String(s.$W);
199
+ case "dd":
200
+ return R(t.weekdaysMin, s.$W, T, 2);
201
+ case "ddd":
202
+ return R(t.weekdaysShort, s.$W, T, 3);
203
+ case "dddd":
204
+ return T[s.$W];
205
+ case "H":
206
+ return String(m);
207
+ case "HH":
208
+ return i.s(m, 2, "0");
209
+ case "h":
210
+ return F(1);
211
+ case "hh":
212
+ return F(2);
213
+ case "a":
214
+ return A(m, y, !0);
215
+ case "A":
216
+ return A(m, y, !1);
217
+ case "m":
218
+ return String(y);
219
+ case "mm":
220
+ return i.s(y, 2, "0");
221
+ case "s":
222
+ return String(s.$s);
223
+ case "ss":
224
+ return i.s(s.$s, 2, "0");
225
+ case "SSS":
226
+ return i.s(s.$ms, 3, "0");
227
+ case "Z":
228
+ return o;
229
+ }
230
+ return null;
231
+ }(Y) || o.replace(":", "");
232
+ });
233
+ }, r.utcOffset = function() {
234
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
235
+ }, r.diff = function(e, s, t) {
236
+ var a, o = this, m = i.p(s), y = l(e), S = (y.utcOffset() - this.utcOffset()) * u, T = this - y, U = function() {
237
+ return i.m(o, y);
238
+ };
239
+ switch (m) {
240
+ case O:
241
+ a = U() / 12;
242
+ break;
243
+ case h:
244
+ a = U();
245
+ break;
246
+ case L:
247
+ a = U() / 3;
248
+ break;
249
+ case w:
250
+ a = (T - S) / 6048e5;
251
+ break;
252
+ case p:
253
+ a = (T - S) / 864e5;
254
+ break;
255
+ case k:
256
+ a = T / x;
257
+ break;
258
+ case M:
259
+ a = T / u;
260
+ break;
261
+ case b:
262
+ a = T / f;
263
+ break;
264
+ default:
265
+ a = T;
266
+ }
267
+ return t ? a : i.a(a);
268
+ }, r.daysInMonth = function() {
269
+ return this.endOf(h).$D;
270
+ }, r.$locale = function() {
271
+ return j[this.$L];
272
+ }, r.locale = function(e, s) {
273
+ if (!e) return this.$L;
274
+ var t = this.clone(), a = P(e, s, !0);
275
+ return a && (t.$L = a), t;
276
+ }, r.clone = function() {
277
+ return i.w(this.$d, this);
278
+ }, r.toDate = function() {
279
+ return new Date(this.valueOf());
280
+ }, r.toJSON = function() {
281
+ return this.isValid() ? this.toISOString() : null;
282
+ }, r.toISOString = function() {
283
+ return this.$d.toISOString();
284
+ }, r.toString = function() {
285
+ return this.$d.toUTCString();
286
+ }, n;
287
+ }(), B = g.prototype;
288
+ return l.prototype = B, [["$ms", v], ["$s", b], ["$m", M], ["$H", k], ["$W", p], ["$M", h], ["$y", O], ["$D", _]].forEach(function(n) {
289
+ B[n[1]] = function(r) {
290
+ return this.$g(r, n[0], n[1]);
291
+ };
292
+ }), l.extend = function(n, r) {
293
+ return n.$i || (n(r, g, l), n.$i = !0), l;
294
+ }, l.locale = P, l.isDayjs = $, l.unix = function(n) {
295
+ return l(1e3 * n);
296
+ }, l.en = j[V], l.Ls = j, l.p = {}, l;
297
+ });
298
+ })(ue);
299
+ var De = ue.exports;
300
+ const te = /* @__PURE__ */ Me(De), we = ye.get("progress"), Se = (c) => {
301
+ let D = H(!1), f = H(!1), u = H(""), x = H(0), v = H("normal"), b = H(!1), M, k = H(""), p = H(""), w = H(""), h = H(""), L = H(!1), O = H(""), _;
302
+ const J = () => {
303
+ p.value = "", w.value = "", h.value = "", L.value = !1, O.value = "";
304
+ }, X = async (d, $ = "", P = "") => {
305
+ v.value = "normal", x.value = 0, u.value = P || "导出进度", f.value = !0;
306
+ const l = await (d == null ? void 0 : d());
307
+ if (!l.status) {
308
+ f.value = !1, v.value = "error";
29
309
  return;
30
310
  }
31
- T(v.taskId, "action", "");
32
- }, q = async (e, n = "", y = "") => {
33
- o.value = "normal", i.value = 0, s.value = "导出进度", t.value = !0;
34
- const v = await (e == null ? void 0 : e());
35
- if (!v.status) {
36
- t.value = !1, o.value = "error";
311
+ z(l.taskId, "action", "");
312
+ }, K = async (d, $ = "", P = "") => {
313
+ v.value = "normal", x.value = 0, u.value = "导出进度", f.value = !0;
314
+ const l = await (d == null ? void 0 : d());
315
+ if (!l.status) {
316
+ f.value = !1, v.value = "error";
37
317
  return;
38
318
  }
39
- U().format("YYYYMMDDHHmmss") + "", T(v.taskId, "export", n || "", y);
40
- }, T = async (e, n, y, v = "") => {
41
- m.value = !0, R(e, n, y, v), c = setTimeout(() => {
319
+ te().format("YYYYMMDDHHmmss") + "", z(l.taskId, "export", $ || "", P);
320
+ }, z = async (d, $, P, l = "") => {
321
+ b.value = !0, Z(d, $, P, l), M = setTimeout(() => {
42
322
  }, 50);
43
- }, V = () => {
44
- clearTimeout(c), c = null, t.value = !1;
45
- }, R = async (e, n = "export", y, v = "") => {
46
- var I, L, M;
47
- const [z, r] = await ae("", {
48
- url: `progress/${e}`
323
+ }, E = () => {
324
+ clearTimeout(M), M = null, f.value = !1;
325
+ }, Z = async (d, $ = "export", P, l = "") => {
326
+ var n, r, e;
327
+ const [i, g] = await we("", {
328
+ url: `progress/${d}`
49
329
  }).run();
50
- if (z) {
51
- m.value = !1;
330
+ if (i) {
331
+ b.value = !1;
52
332
  return;
53
333
  }
54
- i.value = r.percentage;
55
- const h = n == "export" ? "导出" : "导入";
56
- if (i.value == 100)
57
- if (b.value = r, m.value = !1, V(), n == "export")
58
- r.status == 1 ? (o.value = "success", O(`${E().baseURL}/oss${r.filePath}`, y, v), m.value = !1, a("success")) : r.status == 2 && (f.value = r.message || `${h}失败`, w.error({
59
- message: r.message || `${h}失败`,
334
+ x.value = g.percentage;
335
+ const B = $ == "export" ? "导出" : "导入";
336
+ if (x.value == 100)
337
+ if (k.value = g, b.value = !1, E(), $ == "export")
338
+ g.status == 1 ? (v.value = "success", oe(`${ae().baseURL}/oss${g.filePath}`, P, l), b.value = !1, c("success")) : g.status == 2 && (h.value = g.message || `${B}失败`, Q.error({
339
+ message: g.message || `${B}失败`,
60
340
  grouping: !0,
61
341
  repeatNum: 1
62
342
  }));
63
- else if (n == "import") {
64
- if (r.filePath) {
65
- o.value = "error";
66
- const A = (I = P.name) == null ? void 0 : I.substr(P.name.indexOf("."));
67
- (L = P.name) == null || L.replace(/(.*\/)*([^.]+).*/gi, "$2"), g.value = !0;
68
- const F = (M = r.filePath) == null ? void 0 : M.replace(/(.*\/)*([^.]+).*/gi, "$2");
69
- u.value = `${F}${A}`, d.value = P.sizeText, f.value = "部分数据校验不通过,请下载附件并修改,重新导入!", $.value = `${E().baseURL}/oss${r.filePath}`;
343
+ else if ($ == "import") {
344
+ if (g.filePath) {
345
+ v.value = "error";
346
+ const s = (n = _.name) == null ? void 0 : n.substr(_.name.indexOf("."));
347
+ (r = _.name) == null || r.replace(/(.*\/)*([^.]+).*/gi, "$2"), L.value = !0;
348
+ const t = (e = g.filePath) == null ? void 0 : e.replace(/(.*\/)*([^.]+).*/gi, "$2");
349
+ p.value = `${t}${s}`, w.value = _.sizeText, h.value = "部分数据校验不通过,请下载附件并修改,重新导入!", O.value = `${ae().baseURL}/oss${g.filePath}`;
70
350
  }
71
- B(r.status, h), r.status == 1 && (l.value = !1), a("success");
72
- } else n == "action" && (o.value = "success");
351
+ V(g.status, B), g.status == 1 && (D.value = !1), c("success");
352
+ } else $ == "action" && (v.value = "success");
73
353
  else
74
- c && r.status != 2 ? c = setTimeout(() => {
75
- R(e, n, y, v);
76
- }, 50) : (b.value = r, m.value = !1, B(r.status, h), V(), g.value = !0, f.value = (r == null ? void 0 : r.message) || "");
77
- }, B = (e, n) => {
78
- e == 1 ? (o.value = "success", w.success({
79
- message: `${n}成功`,
354
+ M && g.status != 2 ? M = setTimeout(() => {
355
+ Z(d, $, P, l);
356
+ }, 50) : (k.value = g, b.value = !1, V(g.status, B), E(), L.value = !0, h.value = (g == null ? void 0 : g.message) || "");
357
+ }, V = (d, $) => {
358
+ d == 1 ? (v.value = "success", Q.success({
359
+ message: `${$}成功`,
80
360
  grouping: !0,
81
361
  repeatNum: 1
82
- }), u.value = "", d.value = "", f.value = "") : e == 2 ? (o.value = "error", w.error({
83
- message: `${n}失败`,
362
+ }), p.value = "", w.value = "", h.value = "") : d == 2 ? (v.value = "error", Q.error({
363
+ message: `${$}失败`,
84
364
  grouping: !0,
85
365
  repeatNum: 1
86
- })) : e == 3 && (o.value = "error", w.error({
87
- message: `部分${n}失败`,
366
+ })) : d == 3 && (v.value = "error", Q.error({
367
+ message: `部分${$}失败`,
88
368
  grouping: !0,
89
369
  repeatNum: 1
90
370
  }));
91
371
  };
92
372
  return {
93
- importDialog: l,
94
- showProgressDialog: t,
95
- progressTitle: s,
96
- percent: i,
97
- progressStatus: o,
98
- progressLoading: m,
99
- progressResult: b,
100
- errorFileName: u,
101
- errorFileSize: d,
102
- errorMessage: f,
103
- errorImport: g,
104
- errorFilePath: $,
105
- fileExport: q,
106
- fileAction: j,
107
- generateUniqueName: (e) => {
108
- const n = e == null ? void 0 : e.substr(e.indexOf("."));
109
- return `${e == null ? void 0 : e.replace(/(.*\/)*([^.]+).*/gi, "$2")}${_()}${n}`;
373
+ importDialog: D,
374
+ showProgressDialog: f,
375
+ progressTitle: u,
376
+ percent: x,
377
+ progressStatus: v,
378
+ progressLoading: b,
379
+ progressResult: k,
380
+ errorFileName: p,
381
+ errorFileSize: w,
382
+ errorMessage: h,
383
+ errorImport: L,
384
+ errorFilePath: O,
385
+ fileExport: K,
386
+ fileAction: X,
387
+ generateUniqueName: (d) => {
388
+ const $ = d == null ? void 0 : d.substr(d.indexOf("."));
389
+ return `${d == null ? void 0 : d.replace(/(.*\/)*([^.]+).*/gi, "$2")}${ie()}${$}`;
110
390
  },
111
- downloadFile: O,
112
- resetStataus: C,
113
- checkProgress: T
391
+ downloadFile: oe,
392
+ resetStataus: J,
393
+ checkProgress: z
114
394
  };
115
- }, O = (a, l, t = "xlsx") => {
116
- const s = new XMLHttpRequest();
117
- s.open("get", a), s.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), s.responseType = "blob", s.onload = function(i) {
118
- const o = new Blob([this.response], {
119
- type: t === "zip" ? "application/zip" : t === "xlsx" ? "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "application/pdf"
120
- }), m = URL.createObjectURL(o);
395
+ }, oe = (c, D, f = "xlsx") => {
396
+ const u = new XMLHttpRequest();
397
+ u.open("get", c), u.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), u.responseType = "blob", u.onload = function(x) {
398
+ const v = new Blob([this.response], {
399
+ type: f === "zip" ? "application/zip" : f === "xlsx" ? "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "application/pdf"
400
+ }), b = URL.createObjectURL(v);
121
401
  if (window.navigator.msSaveOrOpenBlob)
122
- navigator.msSaveBlob(o, l);
402
+ navigator.msSaveBlob(v, D);
123
403
  else {
124
- const c = document.createElement("a");
125
- c.href = m, c.download = l, c.click(), window.URL.revokeObjectURL(m);
404
+ const M = document.createElement("a");
405
+ M.href = b, M.download = D, M.click(), window.URL.revokeObjectURL(b);
126
406
  }
127
- }, s.send();
128
- }, re = (a, l) => {
129
- const { showProgressDialog: t, progressTitle: s, percent: i, progressStatus: o, progressLoading: m, fileExport: c } = oe(l), b = p({}), u = p({}), d = (g, $) => {
130
- b.value = {
131
- ...g
132
- }, u.value = {
133
- ...$
407
+ }, u.send();
408
+ }, xe = (c, D) => {
409
+ const { showProgressDialog: f, progressTitle: u, percent: x, progressStatus: v, progressLoading: b, fileExport: M } = Se(D), k = H({}), p = H({}), w = (L, O) => {
410
+ k.value = {
411
+ ...L
412
+ }, p.value = {
413
+ ...O
134
414
  };
135
- const P = `${a.exportFileName}${U().format("YYYYMMDD")}-${U().format("HHmmss")}.${a.fileType}`;
136
- c(f, P, a.fileType);
137
- }, f = async () => {
138
- let g = _();
139
- a.taskIdPosition === "params" && (b.value.taskId = g), a.taskIdPosition === "body" && (u.value.taskId = g);
140
- const [$, P] = await a.exportFun(u.value, { params: b.value }).run();
141
- return $ ? { status: !1 } : { status: !0, taskId: g };
415
+ const _ = `${c.exportFileName}${te().format("YYYYMMDD")}-${te().format("HHmmss")}.${c.fileType}`;
416
+ M(h, _, c.fileType);
417
+ }, h = async () => {
418
+ let L = ie();
419
+ c.taskIdPosition === "params" && (k.value.taskId = L), c.taskIdPosition === "body" && (p.value.taskId = L);
420
+ const [O, _] = await c.exportFun(p.value, { params: k.value }).run();
421
+ return O ? { status: !1 } : { status: !0, taskId: L };
142
422
  };
143
423
  return {
144
- showProgressDialog: t,
145
- progressTitle: s,
146
- percent: i,
147
- progressStatus: o,
148
- progressLoading: m,
149
- exportList: d
424
+ showProgressDialog: f,
425
+ progressTitle: u,
426
+ percent: x,
427
+ progressStatus: v,
428
+ progressLoading: b,
429
+ exportList: w
150
430
  };
151
- }, le = { class: "das-export-button" }, ue = /* @__PURE__ */ X({
431
+ }, ke = { class: "das-export-button" }, Oe = /* @__PURE__ */ ce({
152
432
  __name: "App",
153
433
  props: {
154
434
  modelValue: {},
@@ -163,60 +443,60 @@ const ae = se.get("progress"), oe = (a) => {
163
443
  disabled: { type: Boolean, default: !1 }
164
444
  },
165
445
  emits: ["update:modelValue", "update:bodyParams", "success"],
166
- setup(a, { emit: l }) {
167
- const t = a, s = l;
168
- S(t.modelValue, (u) => {
169
- s("update:modelValue", u);
170
- }), S(t.bodyParams, (u) => {
171
- s("update:bodyParams", u);
446
+ setup(c, { emit: D }) {
447
+ const f = c, u = D;
448
+ re(f.modelValue, (p) => {
449
+ u("update:modelValue", p);
450
+ }), re(f.bodyParams, (p) => {
451
+ u("update:bodyParams", p);
172
452
  });
173
- const { showProgressDialog: i, percent: o, progressStatus: m, exportList: c } = re(t, s), b = [k("正在导出中...").value, k("导出失败").value, k("导出成功").value];
174
- return (u, d) => (G(), J("div", le, [
175
- D(x(te), {
176
- block: u.block,
453
+ const { showProgressDialog: x, percent: v, progressStatus: b, exportList: M } = xe(f, u), k = [q("正在导出中...").value, q("导出失败").value, q("导出成功").value];
454
+ return (p, w) => (fe(), de("div", ke, [
455
+ ee(I($e), {
456
+ block: p.block,
177
457
  size: "middle",
178
- disabled: u.disabled,
179
- "btn-type": t.btnType,
180
- ghost: u.ghost,
181
- onClick: d[0] || (d[0] = (f) => x(c)(t.modelValue, t.bodyParams))
458
+ disabled: p.disabled,
459
+ "btn-type": f.btnType,
460
+ ghost: p.ghost,
461
+ onClick: w[0] || (w[0] = (h) => I(M)(f.modelValue, f.bodyParams))
182
462
  }, {
183
- default: H(() => [
184
- K(u.$slots, "default", {}, () => [
185
- Q(W(x(k)("导出").value), 1)
463
+ default: se(() => [
464
+ pe(p.$slots, "default", {}, () => [
465
+ me(he(I(q)("导出").value), 1)
186
466
  ], !0)
187
467
  ]),
188
468
  _: 3
189
469
  }, 8, ["block", "disabled", "btn-type", "ghost"]),
190
- D(x(Z), {
470
+ ee(I(ve), {
191
471
  size: "mini",
192
- title: x(k)("导出进度").value,
472
+ title: I(q)("导出进度").value,
193
473
  "is-feedback-img": !1,
194
- modelValue: x(i),
195
- "onUpdate:modelValue": d[2] || (d[2] = (f) => Y(i) ? i.value = f : null),
474
+ modelValue: I(x),
475
+ "onUpdate:modelValue": w[2] || (w[2] = (h) => ne(x) ? x.value = h : null),
196
476
  "append-to-body": !0,
197
477
  type: "feedback"
198
478
  }, {
199
- default: H(() => [
200
- D(x(ee), {
201
- modelValue: x(o),
202
- "onUpdate:modelValue": d[1] || (d[1] = (f) => Y(o) ? o.value = f : null),
479
+ default: se(() => [
480
+ ee(I(ge), {
481
+ modelValue: I(v),
482
+ "onUpdate:modelValue": w[1] || (w[1] = (h) => ne(v) ? v.value = h : null),
203
483
  style: { "margin-top": "35px" },
204
484
  type: "circle",
205
- status: x(m),
206
- textMap: b
485
+ status: I(b),
486
+ textMap: k
207
487
  }, null, 8, ["modelValue", "status"])
208
488
  ]),
209
489
  _: 1
210
490
  }, 8, ["title", "modelValue"])
211
491
  ]));
212
492
  }
213
- }), ne = (a, l) => {
214
- const t = a.__vccOpts || a;
215
- for (const [s, i] of l)
216
- t[s] = i;
217
- return t;
218
- }, ie = /* @__PURE__ */ ne(ue, [["__scopeId", "data-v-0cfa0245"]]), Pe = N(ie);
493
+ }), Te = (c, D) => {
494
+ const f = c.__vccOpts || c;
495
+ for (const [u, x] of D)
496
+ f[u] = x;
497
+ return f;
498
+ }, _e = /* @__PURE__ */ Te(Oe, [["__scopeId", "data-v-0cfa0245"]]), Be = le(_e);
219
499
  export {
220
- Pe as DasExportButton,
221
- Pe as default
500
+ Be as DasExportButton,
501
+ Be as default
222
502
  };