@das-fed/utils 1.0.7 → 1.0.9

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