@das-fed/utils 6.3.0-beta.3 → 6.3.0-beta.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 (88) hide show
  1. package/__VLS_types.d.ts +124 -0
  2. package/api-services/modules/app-manage/index.d.ts +2 -0
  3. package/api-services/modules/app-manage/index.js +5 -0
  4. package/api-services/modules/authentication/index.d.ts +2 -0
  5. package/api-services/modules/authentication/index.js +5 -0
  6. package/api-services/modules/bems/index.d.ts +6 -0
  7. package/api-services/modules/bems/index.js +9 -0
  8. package/api-services/modules/contract/index.d.ts +2 -0
  9. package/api-services/modules/contract/index.js +5 -0
  10. package/api-services/modules/duty-manage/index.d.ts +7 -0
  11. package/api-services/modules/duty-manage/index.js +14 -0
  12. package/api-services/modules/enterpriseright/index.d.ts +2 -0
  13. package/api-services/modules/enterpriseright/index.js +5 -0
  14. package/api-services/modules/file/index.d.ts +36 -0
  15. package/api-services/modules/file/index.js +499 -0
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.d.ts +2 -0
  18. package/api-services/modules/gateway-edge/index.js +5 -0
  19. package/api-services/modules/index.d.ts +21 -0
  20. package/api-services/modules/index.js +59 -0
  21. package/api-services/modules/index.js.gz +0 -0
  22. package/api-services/modules/iot/index.d.ts +15 -0
  23. package/api-services/modules/iot/index.js +18 -0
  24. package/api-services/modules/justauth/index.d.ts +3 -0
  25. package/api-services/modules/justauth/index.js +6 -0
  26. package/api-services/modules/knowledge/index.d.ts +2 -0
  27. package/api-services/modules/knowledge/index.js +5 -0
  28. package/api-services/modules/link/index.d.ts +2 -0
  29. package/api-services/modules/link/index.js +5 -0
  30. package/api-services/modules/permission/index.d.ts +2 -0
  31. package/api-services/modules/permission/index.js +5 -0
  32. package/api-services/modules/platformManage/index.d.ts +14 -0
  33. package/api-services/modules/platformManage/index.js +13 -0
  34. package/api-services/modules/portal/index.d.ts +2 -0
  35. package/api-services/modules/portal/index.js +5 -0
  36. package/api-services/modules/space-manage/index.d.ts +2 -0
  37. package/api-services/modules/space-manage/index.js +5 -0
  38. package/api-services/modules/super-admin/index.d.ts +8 -0
  39. package/api-services/modules/super-admin/index.js +8 -0
  40. package/api-services/modules/supplier/index.d.ts +6 -0
  41. package/api-services/modules/supplier/index.js +7 -0
  42. package/api-services/modules/supplychain-manage/index.d.ts +2 -0
  43. package/api-services/modules/supplychain-manage/index.js +5 -0
  44. package/api-services/modules/systemConfiguration/index.d.ts +2 -0
  45. package/api-services/modules/systemConfiguration/index.js +5 -0
  46. package/api-services/modules/tool/index.d.ts +2 -0
  47. package/api-services/modules/tool/index.js +5 -0
  48. package/api-services/src/create-service/index.d.ts +1 -0
  49. package/api-services/src/create-service/index.js +4 -0
  50. package/common-info/getIframeUrl/index.d.ts +9 -0
  51. package/common-info/getIframeUrl/index.js +10 -0
  52. package/common-info/getInfoFromUrl/index.d.ts +8 -0
  53. package/common-info/getInfoFromUrl/index.js +84 -0
  54. package/common-info/getInfoFromUrl/index.js.gz +0 -0
  55. package/common-info/set-personal-info/index.d.ts +5 -0
  56. package/common-info/set-personal-info/index.js +1664 -0
  57. package/common-info/set-personal-info/index.js.gz +0 -0
  58. package/common-info/type.d.ts +104 -0
  59. package/common-tools/arr-tools/index.d.ts +15 -0
  60. package/common-tools/arr-tools/index.js +8 -0
  61. package/common-tools/date-format/index.d.ts +7 -0
  62. package/common-tools/date-format/index.js +18 -0
  63. package/common-tools/get-url-params/index.d.ts +46 -0
  64. package/common-tools/get-url-params/index.js +60 -0
  65. package/common-tools/get-url-params/index.js.gz +0 -0
  66. package/common-tools/handle-data/index.d.ts +6 -0
  67. package/common-tools/handle-data/index.js +4 -0
  68. package/common-tools/nest-tree-format/index.d.ts +30 -0
  69. package/common-tools/nest-tree-format/index.js +24 -0
  70. package/common-tools/obj-tools/index.d.ts +7 -0
  71. package/common-tools/obj-tools/index.js +14 -0
  72. package/common-tools/platform-tools/index.d.ts +18 -0
  73. package/common-tools/platform-tools/index.js +14 -0
  74. package/common-tools/queue-promise/index.d.ts +6 -0
  75. package/common-tools/queue-promise/index.js +9 -0
  76. package/common-tools/setHtmlMinWH/index.d.ts +5 -0
  77. package/common-tools/setHtmlMinWH/index.js +11 -0
  78. package/common-tools/update-fav-icon/index.d.ts +11 -0
  79. package/common-tools/update-fav-icon/index.js +21 -0
  80. package/create-api-service/proxy-sso/index.d.ts +3 -0
  81. package/create-api-service/proxy-sso/index.js +21 -0
  82. package/create-api-service/sso/index.d.ts +23 -0
  83. package/create-api-service/sso/index.js +1946 -0
  84. package/create-api-service/sso/index.js.gz +0 -0
  85. package/curring-http/type.d.ts +89 -0
  86. package/esm-map.json +3 -3
  87. package/package.json +3 -3
  88. package/webSocket-service/type.d.ts +28 -0
@@ -0,0 +1,499 @@
1
+ import { iotMinio as G, iotProgress as te } from "@das-fed/utils/api-services/modules/iot";
2
+ import { ref as C } from "vue";
3
+ import { getConfig as Q } from "@das-fed/utils/config";
4
+ let re = (l = 21) => {
5
+ let v = "", $ = crypto.getRandomValues(new Uint8Array(l));
6
+ for (; l--; ) {
7
+ let c = $[l] & 63;
8
+ c < 36 ? v += c.toString(36) : c < 62 ? v += (c - 26).toString(36).toUpperCase() : c < 63 ? v += "_" : v += "-";
9
+ }
10
+ return v;
11
+ };
12
+ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
13
+ function ne(l) {
14
+ return l && l.__esModule && Object.prototype.hasOwnProperty.call(l, "default") ? l.default : l;
15
+ }
16
+ var ee = { exports: {} };
17
+ (function(l, v) {
18
+ (function($, c) {
19
+ l.exports = c();
20
+ })(se, function() {
21
+ var $ = 1e3, c = 6e4, j = 36e5, M = "millisecond", T = "second", b = "minute", _ = "hour", y = "day", Y = "week", D = "month", R = "quarter", k = "year", P = "date", B = "Invalid Date", q = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Z = /\[([^\]]+)]|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, F = { 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(t) {
22
+ var r = ["th", "st", "nd", "rd"], e = t % 100;
23
+ return "[" + t + (r[(e - 20) % 10] || r[e] || r[0]) + "]";
24
+ } }, E = function(t, r, e) {
25
+ var n = String(t);
26
+ return !n || n.length >= r ? t : "" + Array(r + 1 - n.length).join(e) + t;
27
+ }, z = { s: E, z: function(t) {
28
+ var r = -t.utcOffset(), e = Math.abs(r), n = Math.floor(e / 60), s = e % 60;
29
+ return (r <= 0 ? "+" : "-") + E(n, 2, "0") + ":" + E(s, 2, "0");
30
+ }, m: function t(r, e) {
31
+ if (r.date() < e.date()) return -t(e, r);
32
+ var n = 12 * (e.year() - r.year()) + (e.month() - r.month()), s = r.clone().add(n, D), i = e - s < 0, u = r.clone().add(n + (i ? -1 : 1), D);
33
+ return +(-(n + (e - s) / (i ? s - u : u - s)) || 0);
34
+ }, a: function(t) {
35
+ return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
36
+ }, p: function(t) {
37
+ return { M: D, y: k, w: Y, d: y, D: P, h: _, m: b, s: T, ms: M, Q: R }[t] || String(t || "").toLowerCase().replace(/s$/, "");
38
+ }, u: function(t) {
39
+ return t === void 0;
40
+ } }, I = "en", H = {};
41
+ H[I] = F;
42
+ var W = "$isDayjsObject", J = function(t) {
43
+ return t instanceof h || !(!t || !t[W]);
44
+ }, f = function t(r, e, n) {
45
+ var s;
46
+ if (!r) return I;
47
+ if (typeof r == "string") {
48
+ var i = r.toLowerCase();
49
+ H[i] && (s = i), e && (H[i] = e, s = i);
50
+ var u = r.split("-");
51
+ if (!s && u.length > 1) return t(u[0]);
52
+ } else {
53
+ var d = r.name;
54
+ H[d] = r, s = d;
55
+ }
56
+ return !n && s && (I = s), s || !n && I;
57
+ }, a = function(t, r) {
58
+ if (J(t)) return t.clone();
59
+ var e = typeof r == "object" ? r : {};
60
+ return e.date = t, e.args = arguments, new h(e);
61
+ }, o = z;
62
+ o.l = f, o.i = J, o.w = function(t, r) {
63
+ return a(t, { locale: r.$L, utc: r.$u, x: r.$x, $offset: r.$offset });
64
+ };
65
+ var h = function() {
66
+ function t(e) {
67
+ this.$L = f(e.locale, null, !0), this.parse(e), this.$x = this.$x || e.x || {}, this[W] = !0;
68
+ }
69
+ var r = t.prototype;
70
+ return r.parse = function(e) {
71
+ this.$d = function(n) {
72
+ var s = n.date, i = n.utc;
73
+ if (s === null) return /* @__PURE__ */ new Date(NaN);
74
+ if (o.u(s)) return /* @__PURE__ */ new Date();
75
+ if (s instanceof Date) return new Date(s);
76
+ if (typeof s == "string" && !/Z$/i.test(s)) {
77
+ var u = s.match(q);
78
+ if (u) {
79
+ var d = u[2] - 1 || 0, p = (u[7] || "0").substring(0, 3);
80
+ return i ? new Date(Date.UTC(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, p)) : new Date(u[1], d, u[3] || 1, u[4] || 0, u[5] || 0, u[6] || 0, p);
81
+ }
82
+ }
83
+ return new Date(s);
84
+ }(e), this.init();
85
+ }, r.init = function() {
86
+ var e = this.$d;
87
+ 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();
88
+ }, r.$utils = function() {
89
+ return o;
90
+ }, r.isValid = function() {
91
+ return this.$d.toString() !== B;
92
+ }, r.isSame = function(e, n) {
93
+ var s = a(e);
94
+ return this.startOf(n) <= s && s <= this.endOf(n);
95
+ }, r.isAfter = function(e, n) {
96
+ return a(e) < this.startOf(n);
97
+ }, r.isBefore = function(e, n) {
98
+ return this.endOf(n) < a(e);
99
+ }, r.$g = function(e, n, s) {
100
+ return o.u(e) ? this[n] : this.set(s, e);
101
+ }, r.unix = function() {
102
+ return Math.floor(this.valueOf() / 1e3);
103
+ }, r.valueOf = function() {
104
+ return this.$d.getTime();
105
+ }, r.startOf = function(e, n) {
106
+ var s = this, i = !!o.u(n) || n, u = o.p(e), d = function(L, x) {
107
+ var N = o.w(s.$u ? Date.UTC(s.$y, x, L) : new Date(s.$y, x, L), s);
108
+ return i ? N : N.endOf(y);
109
+ }, p = function(L, x) {
110
+ return o.w(s.toDate()[L].apply(s.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(x)), s);
111
+ }, m = this.$W, g = this.$M, w = this.$D, A = "set" + (this.$u ? "UTC" : "");
112
+ switch (u) {
113
+ case k:
114
+ return i ? d(1, 0) : d(31, 11);
115
+ case D:
116
+ return i ? d(1, g) : d(0, g + 1);
117
+ case Y:
118
+ var O = this.$locale().weekStart || 0, U = (m < O ? m + 7 : m) - O;
119
+ return d(i ? w - U : w + (6 - U), g);
120
+ case y:
121
+ case P:
122
+ return p(A + "Hours", 0);
123
+ case _:
124
+ return p(A + "Minutes", 1);
125
+ case b:
126
+ return p(A + "Seconds", 2);
127
+ case T:
128
+ return p(A + "Milliseconds", 3);
129
+ default:
130
+ return this.clone();
131
+ }
132
+ }, r.endOf = function(e) {
133
+ return this.startOf(e, !1);
134
+ }, r.$set = function(e, n) {
135
+ var s, i = o.p(e), u = "set" + (this.$u ? "UTC" : ""), d = (s = {}, s[y] = u + "Date", s[P] = u + "Date", s[D] = u + "Month", s[k] = u + "FullYear", s[_] = u + "Hours", s[b] = u + "Minutes", s[T] = u + "Seconds", s[M] = u + "Milliseconds", s)[i], p = i === y ? this.$D + (n - this.$W) : n;
136
+ if (i === D || i === k) {
137
+ var m = this.clone().set(P, 1);
138
+ m.$d[d](p), m.init(), this.$d = m.set(P, Math.min(this.$D, m.daysInMonth())).$d;
139
+ } else d && this.$d[d](p);
140
+ return this.init(), this;
141
+ }, r.set = function(e, n) {
142
+ return this.clone().$set(e, n);
143
+ }, r.get = function(e) {
144
+ return this[o.p(e)]();
145
+ }, r.add = function(e, n) {
146
+ var s, i = this;
147
+ e = Number(e);
148
+ var u = o.p(n), d = function(g) {
149
+ var w = a(i);
150
+ return o.w(w.date(w.date() + Math.round(g * e)), i);
151
+ };
152
+ if (u === D) return this.set(D, this.$M + e);
153
+ if (u === k) return this.set(k, this.$y + e);
154
+ if (u === y) return d(1);
155
+ if (u === Y) return d(7);
156
+ var p = (s = {}, s[b] = c, s[_] = j, s[T] = $, s)[u] || 1, m = this.$d.getTime() + e * p;
157
+ return o.w(m, this);
158
+ }, r.subtract = function(e, n) {
159
+ return this.add(-1 * e, n);
160
+ }, r.format = function(e) {
161
+ var n = this, s = this.$locale();
162
+ if (!this.isValid()) return s.invalidDate || B;
163
+ var i = e || "YYYY-MM-DDTHH:mm:ssZ", u = o.z(this), d = this.$H, p = this.$m, m = this.$M, g = s.weekdays, w = s.months, A = s.meridiem, O = function(x, N, K, V) {
164
+ return x && (x[N] || x(n, i)) || K[N].slice(0, V);
165
+ }, U = function(x) {
166
+ return o.s(d % 12 || 12, x, "0");
167
+ }, L = A || function(x, N, K) {
168
+ var V = x < 12 ? "AM" : "PM";
169
+ return K ? V.toLowerCase() : V;
170
+ };
171
+ return i.replace(Z, function(x, N) {
172
+ return N || function(K) {
173
+ switch (K) {
174
+ case "YY":
175
+ return String(n.$y).slice(-2);
176
+ case "YYYY":
177
+ return o.s(n.$y, 4, "0");
178
+ case "M":
179
+ return m + 1;
180
+ case "MM":
181
+ return o.s(m + 1, 2, "0");
182
+ case "MMM":
183
+ return O(s.monthsShort, m, w, 3);
184
+ case "MMMM":
185
+ return O(w, m);
186
+ case "D":
187
+ return n.$D;
188
+ case "DD":
189
+ return o.s(n.$D, 2, "0");
190
+ case "d":
191
+ return String(n.$W);
192
+ case "dd":
193
+ return O(s.weekdaysMin, n.$W, g, 2);
194
+ case "ddd":
195
+ return O(s.weekdaysShort, n.$W, g, 3);
196
+ case "dddd":
197
+ return g[n.$W];
198
+ case "H":
199
+ return String(d);
200
+ case "HH":
201
+ return o.s(d, 2, "0");
202
+ case "h":
203
+ return U(1);
204
+ case "hh":
205
+ return U(2);
206
+ case "a":
207
+ return L(d, p, !0);
208
+ case "A":
209
+ return L(d, p, !1);
210
+ case "m":
211
+ return String(p);
212
+ case "mm":
213
+ return o.s(p, 2, "0");
214
+ case "s":
215
+ return String(n.$s);
216
+ case "ss":
217
+ return o.s(n.$s, 2, "0");
218
+ case "SSS":
219
+ return o.s(n.$ms, 3, "0");
220
+ case "Z":
221
+ return u;
222
+ }
223
+ return null;
224
+ }(x) || u.replace(":", "");
225
+ });
226
+ }, r.utcOffset = function() {
227
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
228
+ }, r.diff = function(e, n, s) {
229
+ var i, u = this, d = o.p(n), p = a(e), m = (p.utcOffset() - this.utcOffset()) * c, g = this - p, w = function() {
230
+ return o.m(u, p);
231
+ };
232
+ switch (d) {
233
+ case k:
234
+ i = w() / 12;
235
+ break;
236
+ case D:
237
+ i = w();
238
+ break;
239
+ case R:
240
+ i = w() / 3;
241
+ break;
242
+ case Y:
243
+ i = (g - m) / 6048e5;
244
+ break;
245
+ case y:
246
+ i = (g - m) / 864e5;
247
+ break;
248
+ case _:
249
+ i = g / j;
250
+ break;
251
+ case b:
252
+ i = g / c;
253
+ break;
254
+ case T:
255
+ i = g / $;
256
+ break;
257
+ default:
258
+ i = g;
259
+ }
260
+ return s ? i : o.a(i);
261
+ }, r.daysInMonth = function() {
262
+ return this.endOf(D).$D;
263
+ }, r.$locale = function() {
264
+ return H[this.$L];
265
+ }, r.locale = function(e, n) {
266
+ if (!e) return this.$L;
267
+ var s = this.clone(), i = f(e, n, !0);
268
+ return i && (s.$L = i), s;
269
+ }, r.clone = function() {
270
+ return o.w(this.$d, this);
271
+ }, r.toDate = function() {
272
+ return new Date(this.valueOf());
273
+ }, r.toJSON = function() {
274
+ return this.isValid() ? this.toISOString() : null;
275
+ }, r.toISOString = function() {
276
+ return this.$d.toISOString();
277
+ }, r.toString = function() {
278
+ return this.$d.toUTCString();
279
+ }, t;
280
+ }(), S = h.prototype;
281
+ return a.prototype = S, [["$ms", M], ["$s", T], ["$m", b], ["$H", _], ["$W", y], ["$M", D], ["$y", k], ["$D", P]].forEach(function(t) {
282
+ S[t[1]] = function(r) {
283
+ return this.$g(r, t[0], t[1]);
284
+ };
285
+ }), a.extend = function(t, r) {
286
+ return t.$i || (t(r, h, a), t.$i = !0), a;
287
+ }, a.locale = f, a.isDayjs = J, a.unix = function(t) {
288
+ return a(1e3 * t);
289
+ }, a.en = H[I], a.Ls = H, a.p = {}, a;
290
+ });
291
+ })(ee);
292
+ var ae = ee.exports;
293
+ const ie = /* @__PURE__ */ ne(ae), oe = G.get("token"), ue = G.post("putObject", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), le = G.post("upload-objects", (l) => (l.headers || (l.headers = {}), l.headers["Content-Type"] = "multipart/form-data", l.responseType = "blob", l)), ce = te.get("progress"), ve = () => {
294
+ let l = C(!1), v = C(""), $ = C(0), c = C("normal"), j = C(!1), M, T = C(""), b = C(""), _ = C(""), y = C(""), Y = C(!1), D = C(""), R = "", k;
295
+ const P = () => {
296
+ b.value = "", _.value = "", y.value = "", Y.value = !1, D.value = "";
297
+ }, B = async () => {
298
+ const [f, a] = await oe().run();
299
+ return f ? { stauts: !1 } : { status: !0, data: a };
300
+ }, q = (f) => new Promise((a, o) => {
301
+ const S = [];
302
+ let t = 0;
303
+ for (; t < f.size; ) {
304
+ const e = f.slice(t, t + 1048576);
305
+ S.push(e), t += 1048576;
306
+ }
307
+ const r = new Blob(S, { type: f.type });
308
+ a(r);
309
+ }), Z = async (f, a, o, h = !0, S = "", t = !1) => {
310
+ var A;
311
+ R = S, h && (c.value = "normal", $.value = 0, v.value = "导入进度", l.value = !0, T.value = ""), k = a;
312
+ const r = await B();
313
+ if (!r.status) return;
314
+ let e = r.data, n = null, { autoContentType: s, bucketName: i, importFileName: u } = o;
315
+ const d = t ? le : ue;
316
+ if (t) {
317
+ let O = [];
318
+ await a.forEach(async (U) => {
319
+ let L = await q(U);
320
+ O.push(L);
321
+ }), n = new FormData(), n.append("accessKeyId", e.accessKeyId), n.append("secretAccessKey", e.secretAccessKey), n.append("sessionToken", e.sessionToken), n.append("bucketName", i), a.forEach((U, L) => {
322
+ n.append("file", O[L]);
323
+ }), u.forEach((U) => {
324
+ n.append("filePaths", U);
325
+ });
326
+ } else {
327
+ const O = await q(a);
328
+ n = {
329
+ accessKeyId: e.accessKeyId,
330
+ secretAccessKey: e.secretAccessKey,
331
+ sessionToken: e.sessionToken,
332
+ file: O,
333
+ bucketName: i,
334
+ filePath: u,
335
+ autoContentType: s
336
+ };
337
+ }
338
+ const [p, m] = await d(n).run();
339
+ if (p) return;
340
+ const g = await de(m.data), w = await (f == null ? void 0 : f(g));
341
+ if (h) {
342
+ if (!w.status) {
343
+ l.value = !1, c.value = "error";
344
+ return;
345
+ }
346
+ v.value = "导入进度", l.value = !0, z(w.taskId, "import", "");
347
+ } else {
348
+ if (!w.status) return;
349
+ c.value = "success", (A = window.DasMessage) == null || A.success({
350
+ message: "导入成功",
351
+ grouping: !0,
352
+ repeatNum: 1
353
+ });
354
+ }
355
+ }, F = async (f, a = "", o = "") => {
356
+ c.value = "normal", $.value = 0, v.value = o || "导出进度", l.value = !0;
357
+ const h = await (f == null ? void 0 : f());
358
+ if (!h.status) {
359
+ l.value = !1, c.value = "error";
360
+ return;
361
+ }
362
+ z(h.taskId, "action", "");
363
+ }, E = async (f, a = "", o = "", h = !0) => {
364
+ h && (c.value = "normal", $.value = 0, v.value = "导出进度", l.value = !0);
365
+ const S = await (f == null ? void 0 : f());
366
+ if (!S.status) {
367
+ l.value = !1, c.value = "error";
368
+ return;
369
+ }
370
+ ie().format("YYYYMMDDHHmmss") + "", z(S.taskId, "export", a || "", o);
371
+ }, z = async (f, a, o, h = "") => {
372
+ j.value = !0, H(f, a, o, h), M = setTimeout(() => {
373
+ }, 50);
374
+ }, I = () => {
375
+ clearTimeout(M), M = null, l.value = !1;
376
+ }, H = async (f, a = "export", o, h = "") => {
377
+ var e, n, s;
378
+ const [S, t] = await ce("", {
379
+ url: `progress/${f}`
380
+ }).run();
381
+ if (S) {
382
+ j.value = !1;
383
+ return;
384
+ }
385
+ $.value = t.percentage;
386
+ const r = a == "export" ? "导出" : "导入";
387
+ if ($.value == 100)
388
+ if (T.value = t, j.value = !1, I(), a == "export")
389
+ t.status == 1 ? (c.value = "success", X(`${Q().baseURL}/oss${t.filePath}`, o, h), j.value = !1) : t.status == 2 && (y.value = t.message || `${r}失败`, (e = window.DasMessage) == null || e.error({
390
+ message: t.message || `${r}失败`,
391
+ grouping: !0,
392
+ repeatNum: 1
393
+ }));
394
+ else if (a == "import") {
395
+ if (t.filePath) {
396
+ c.value = "error";
397
+ const i = (n = k.name) == null ? void 0 : n.match(/(.*?)(\.[^.]*$|$)/), u = i.length ? i[2] : "";
398
+ Y.value = !0;
399
+ const d = (s = t.filePath) == null ? void 0 : s.replace(/(.*\/)*([^.]+).*/gi, "$2");
400
+ b.value = R || `${d}${u}`, _.value = k.sizeText, y.value = "部分数据校验不通过,请下载附件并修改,重新导入!", D.value = `${Q().baseURL}/oss${t.filePath}`;
401
+ }
402
+ W(t.status, r, t.message);
403
+ } else a == "action" && (c.value = "success");
404
+ else
405
+ M && t.status != 2 ? M = setTimeout(() => {
406
+ H(f, a, o, h);
407
+ }, 50) : (T.value = t, j.value = !1, W(t.status, r, t.message), I(), Y.value = !0, y.value = (t == null ? void 0 : t.message) || "");
408
+ }, W = (f, a, o) => {
409
+ var h, S, t;
410
+ f == 1 ? (c.value = "success", (h = window.DasMessage) == null || h.success({
411
+ message: `${a}成功`,
412
+ grouping: !0,
413
+ repeatNum: 1
414
+ }), b.value = "", _.value = "", y.value = "") : f == 2 ? (c.value = "error", (S = window.DasMessage) == null || S.error({
415
+ message: o || `${a}失败`,
416
+ grouping: !0,
417
+ repeatNum: 1
418
+ }), y.value = o || "部分数据校验不通过,请下载附件并修改,重新导入!") : f == 3 && (c.value = "error", (t = window.DasMessage) == null || t.error({
419
+ message: `部分${a}失败`,
420
+ grouping: !0,
421
+ repeatNum: 1
422
+ }));
423
+ };
424
+ return {
425
+ showProgressDialog: l,
426
+ progressTitle: v,
427
+ percent: $,
428
+ progressStatus: c,
429
+ progressLoading: j,
430
+ progressResult: T,
431
+ errorFileName: b,
432
+ errorFileSize: _,
433
+ errorMessage: y,
434
+ errorImport: Y,
435
+ errorFilePath: D,
436
+ fileImport: Z,
437
+ fileExport: E,
438
+ fileAction: F,
439
+ generateUniqueName: (f) => {
440
+ const a = f == null ? void 0 : f.match(/(.*?)(\.[^.]*$|$)/), o = a.length ? a[2] : "";
441
+ return `${a.length ? a[1] : f}${re()}${o}`;
442
+ },
443
+ downloadFile: X,
444
+ resetStataus: P,
445
+ checkProgress: z
446
+ };
447
+ }, fe = (l) => {
448
+ let v = l == null ? void 0 : l.toLocaleLowerCase();
449
+ return {
450
+ excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
451
+ pdf: "application/pdf",
452
+ doc: "application/msword",
453
+ docx: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
454
+ xls: "application/vnd.ms-excel",
455
+ xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
456
+ zip: "application/zip",
457
+ txt: "text/plain",
458
+ html: "text/html",
459
+ xml: "application/xml",
460
+ json: "application/json",
461
+ css: "text/css",
462
+ js: "application/javascript",
463
+ svg: "image/svg+xml",
464
+ jpg: "image/jpeg",
465
+ jpeg: "image/jpeg",
466
+ gif: "image/gif",
467
+ bmp: "image/bmp",
468
+ ico: "image/x-icon",
469
+ mp3: "audio/mpeg",
470
+ mp4: "video/mp4",
471
+ pem: "application/x-pem-file",
472
+ crt: "application/x-x509-ca-cert",
473
+ der: "application/x-x509-ca-cert",
474
+ cer: "application/pkix-cert"
475
+ }[v];
476
+ }, X = (l, v, $ = "excel") => {
477
+ const c = new XMLHttpRequest();
478
+ c.open("get", l), c.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), c.responseType = "blob", c.onload = function(j) {
479
+ const M = new Blob([this.response], {
480
+ type: fe($)
481
+ }), T = URL.createObjectURL(M);
482
+ if (window.navigator.msSaveOrOpenBlob)
483
+ navigator.msSaveBlob(M, v);
484
+ else {
485
+ const b = document.createElement("a");
486
+ b.href = T, b.download = v, b.click(), window.URL.revokeObjectURL(T);
487
+ }
488
+ }, c.send();
489
+ }, de = (l) => new Promise((v, $) => {
490
+ var c = new FileReader();
491
+ c.onload = function(j) {
492
+ let M = "";
493
+ typeof c.result == "string" && (M = JSON.parse(c.result)), v(M);
494
+ }, c.readAsText(l);
495
+ });
496
+ export {
497
+ X as downloadFile,
498
+ ve as useFile
499
+ };
@@ -0,0 +1,2 @@
1
+ /** gateway服务 */
2
+ export declare const gatewayEdge: any;
@@ -0,0 +1,5 @@
1
+ import { createService as e } from "@das-fed/utils/create-api-service";
2
+ const o = "v2", t = e(`/api/edge/${o}`);
3
+ export {
4
+ t as gatewayEdge
5
+ };
@@ -0,0 +1,21 @@
1
+ export { appManage } from '@das-fed/utils/api-services/modules/app-manage';
2
+ export { authentication } from '@das-fed/utils/api-services/modules/authentication';
3
+ export { bemsModules } from '@das-fed/utils/api-services/modules/bems';
4
+ export { contract } from '@das-fed/utils/api-services/modules/contract';
5
+ export { dutyModules } from '@das-fed/utils/api-services/modules/duty-manage';
6
+ export { enterpriseright } from '@das-fed/utils/api-services/modules/enterpriseright';
7
+ export { downloadFile, useFile } from '@das-fed/utils/api-services/modules/file';
8
+ export { gatewayEdge } from '@das-fed/utils/api-services/modules/gateway-edge';
9
+ export { iot, iotMinio, iotModules, iotProgress, iotRelationModules } from '@das-fed/utils/api-services/modules/iot';
10
+ export { justauth, oauthServer } from '@das-fed/utils/api-services/modules/justauth';
11
+ export { knowledgeBase } from '@das-fed/utils/api-services/modules/knowledge';
12
+ export { daslink } from '@das-fed/utils/api-services/modules/link';
13
+ export { permission } from '@das-fed/utils/api-services/modules/permission';
14
+ export { company, customer, customerGrade, customerType, projectManage, } from '@das-fed/utils/api-services/modules/platformManage';
15
+ export { portal } from '@das-fed/utils/api-services/modules/portal';
16
+ export { spaceManage } from '@das-fed/utils/api-services/modules/space-manage';
17
+ export { superadminLicense, superadminPermission, superadminPortal, superadminResource, } from '@das-fed/utils/api-services/modules/super-admin';
18
+ export { supplier, supplierClassification, supplierManage } from '@das-fed/utils/api-services/modules/supplier';
19
+ export { enterpriseadminBrandModel } from '@das-fed/utils/api-services/modules/supplychain-manage';
20
+ export { tool } from '@das-fed/utils/api-services/modules/tool';
21
+ export { systemConfiguration } from '@das-fed/utils/api-services/modules/systemConfiguration';
@@ -0,0 +1,59 @@
1
+ import { appManage as r } from "@das-fed/utils/api-services/modules/app-manage";
2
+ import { authentication as p } from "@das-fed/utils/api-services/modules/authentication";
3
+ import { bemsModules as i } from "@das-fed/utils/api-services/modules/bems";
4
+ import { contract as s } from "@das-fed/utils/api-services/modules/contract";
5
+ import { dutyModules as f } from "@das-fed/utils/api-services/modules/duty-manage";
6
+ import { enterpriseright as x } from "@das-fed/utils/api-services/modules/enterpriseright";
7
+ import { downloadFile as l, useFile as c } from "@das-fed/utils/api-services/modules/file";
8
+ import { gatewayEdge as M } from "@das-fed/utils/api-services/modules/gateway-edge";
9
+ import { iot as h, iotMinio as w, iotModules as P, iotProgress as j, iotRelationModules as k } from "@das-fed/utils/api-services/modules/iot";
10
+ import { justauth as C, oauthServer as F } from "@das-fed/utils/api-services/modules/justauth";
11
+ import { knowledgeBase as b } from "@das-fed/utils/api-services/modules/knowledge";
12
+ import { daslink as E } from "@das-fed/utils/api-services/modules/link";
13
+ import { permission as L } from "@das-fed/utils/api-services/modules/permission";
14
+ import { company as T, customer as q, customerGrade as z, customerType as A, projectManage as D } from "@das-fed/utils/api-services/modules/platformManage";
15
+ import { portal as I } from "@das-fed/utils/api-services/modules/portal";
16
+ import { spaceManage as K } from "@das-fed/utils/api-services/modules/space-manage";
17
+ import { superadminLicense as O, superadminPermission as Q, superadminPortal as U, superadminResource as V } from "@das-fed/utils/api-services/modules/super-admin";
18
+ import { supplier as X, supplierClassification as Y, supplierManage as Z } from "@das-fed/utils/api-services/modules/supplier";
19
+ import { enterpriseadminBrandModel as $ } from "@das-fed/utils/api-services/modules/supplychain-manage";
20
+ import { tool as eo } from "@das-fed/utils/api-services/modules/tool";
21
+ import { systemConfiguration as to } from "@das-fed/utils/api-services/modules/systemConfiguration";
22
+ export {
23
+ r as appManage,
24
+ p as authentication,
25
+ i as bemsModules,
26
+ T as company,
27
+ s as contract,
28
+ q as customer,
29
+ z as customerGrade,
30
+ A as customerType,
31
+ E as daslink,
32
+ l as downloadFile,
33
+ f as dutyModules,
34
+ $ as enterpriseadminBrandModel,
35
+ x as enterpriseright,
36
+ M as gatewayEdge,
37
+ h as iot,
38
+ w as iotMinio,
39
+ P as iotModules,
40
+ j as iotProgress,
41
+ k as iotRelationModules,
42
+ C as justauth,
43
+ b as knowledgeBase,
44
+ F as oauthServer,
45
+ L as permission,
46
+ I as portal,
47
+ D as projectManage,
48
+ K as spaceManage,
49
+ O as superadminLicense,
50
+ Q as superadminPermission,
51
+ U as superadminPortal,
52
+ V as superadminResource,
53
+ X as supplier,
54
+ Y as supplierClassification,
55
+ Z as supplierManage,
56
+ to as systemConfiguration,
57
+ eo as tool,
58
+ c as useFile
59
+ };
Binary file
@@ -0,0 +1,15 @@
1
+ /** iot服务 */
2
+ export declare const iot: any;
3
+ export declare const iotModules: {
4
+ thingmodel: any;
5
+ deviceManage: any;
6
+ product: any;
7
+ productStorage: any;
8
+ };
9
+ export declare const iotRelationModules: {
10
+ projectDevice: any;
11
+ deviceRules: any;
12
+ project: any;
13
+ };
14
+ export declare const iotMinio: any;
15
+ export declare const iotProgress: any;
@@ -0,0 +1,18 @@
1
+ import { createService as e } from "@das-fed/utils/create-api-service";
2
+ const i = "v1", t = e(`/api/iot/${i}`), c = {
3
+ thingmodel: e(`/api/iot-device/thingmodel/${i}`),
4
+ deviceManage: e(`/api/iot-device/devicemanage/${i}`),
5
+ product: e(`/api/iot-device/product/${i}`),
6
+ productStorage: e(`/api/iot-device/product-storage/${i}`)
7
+ }, r = {
8
+ projectDevice: e(`/api/device-relation/deviceproject/${i}`),
9
+ deviceRules: e(`/api/device-relation/devicerule/${i}`),
10
+ project: e(`/api/device-relation/project/${i}`)
11
+ }, a = e(`/api/oss/minio/${i}`), p = e(`/api/progress/accessor/${i}`);
12
+ export {
13
+ t as iot,
14
+ a as iotMinio,
15
+ c as iotModules,
16
+ p as iotProgress,
17
+ r as iotRelationModules
18
+ };
@@ -0,0 +1,3 @@
1
+ /** auth认证服务 */
2
+ export declare const justauth: any;
3
+ export declare const oauthServer: any;
@@ -0,0 +1,6 @@
1
+ import { createService as t } from "@das-fed/utils/create-api-service";
2
+ const r = "v1", o = t(`/api/justauth/oauth-server/${r}/visitor`), s = t(`/api/justauth/oauth-server/${r}`);
3
+ export {
4
+ o as justauth,
5
+ s as oauthServer
6
+ };
@@ -0,0 +1,2 @@
1
+ /** 知识库管理 */
2
+ export declare const knowledgeBase: any;
@@ -0,0 +1,5 @@
1
+ import { createService as e } from "@das-fed/utils/create-api-service";
2
+ const o = "v1", r = e(`/api/knowledge-base/knowledge/${o}`);
3
+ export {
4
+ r as knowledgeBase
5
+ };
@@ -0,0 +1,2 @@
1
+ /** 业务数据源 */
2
+ export declare const daslink: any;
@@ -0,0 +1,5 @@
1
+ import { createService as o } from "@das-fed/utils/create-api-service";
2
+ const t = "v1", e = o(`/api/custom-datasource/custom/${t}`);
3
+ export {
4
+ e as daslink
5
+ };
@@ -0,0 +1,2 @@
1
+ /** 统一权限服务 */
2
+ export declare const permission: any;