@das-fed/utils 7.0.0-zhaohang.1 → 7.0.0-zhaohang.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-services/index.js +217 -231
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +445 -459
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +445 -459
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +938 -970
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +445 -459
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +454 -468
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +963 -995
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +167 -181
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +445 -459
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +109 -123
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +617 -631
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +922 -918
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +384 -398
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +950 -946
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +445 -459
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +676 -690
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +445 -459
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +445 -459
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +956 -952
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +447 -461
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +384 -398
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +445 -459
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +445 -459
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +445 -459
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/index.d.ts +0 -2
- package/common-info/index.js +19 -20
- package/common-info/index.js.gz +0 -0
- package/common-info/type.d.ts +7 -11
- package/create-api-service/index.d.ts +1 -3
- package/create-api-service/index.js +918 -936
- package/create-api-service/index.js.gz +0 -0
- package/curring-http/index.js +95 -94
- package/curring-http/index.js.gz +0 -0
- package/curring-http/type.d.ts +3 -3
- package/esm-map.json +1 -2
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setI18nRule as Zn, currentLang as eo, t as
|
|
1
|
+
import { setI18nRule as Zn, currentLang as eo, t as D } from "@das-fed/web/packages/i18n/index";
|
|
2
2
|
import { curringHttp as to } from "@das-fed/utils/curring-http";
|
|
3
3
|
import { getToken as ro, getQuery as no, login as oo, real_uri as ao, getTokenParams as io } from "@das-fed/utils/create-api-service/sso";
|
|
4
4
|
import et from "dayjs";
|
|
@@ -338,11 +338,11 @@ function ot(t, e, n) {
|
|
|
338
338
|
if (f.endsWith(m, "{}"))
|
|
339
339
|
m = r ? m : m.slice(0, -2), y = JSON.stringify(y);
|
|
340
340
|
else if (f.isArray(y) && Zo(y) || (f.isFileList(y) || f.endsWith(m, "[]")) && (O = f.toArray(y)))
|
|
341
|
-
return m = sn(m), O.forEach(function(
|
|
342
|
-
!(f.isUndefined(
|
|
341
|
+
return m = sn(m), O.forEach(function(g, N) {
|
|
342
|
+
!(f.isUndefined(g) || g === null) && e.append(
|
|
343
343
|
// eslint-disable-next-line no-nested-ternary
|
|
344
|
-
i === !0 ? ur([m],
|
|
345
|
-
l(
|
|
344
|
+
i === !0 ? ur([m], N, a) : i === null ? m : m + "[]",
|
|
345
|
+
l(g)
|
|
346
346
|
);
|
|
347
347
|
}), !1;
|
|
348
348
|
}
|
|
@@ -353,7 +353,7 @@ function ot(t, e, n) {
|
|
|
353
353
|
convertValue: l,
|
|
354
354
|
isVisitable: Lt
|
|
355
355
|
});
|
|
356
|
-
function
|
|
356
|
+
function v(y, m) {
|
|
357
357
|
if (!f.isUndefined(y)) {
|
|
358
358
|
if (p.indexOf(y) !== -1)
|
|
359
359
|
throw Error("Circular reference detected in " + m.join("."));
|
|
@@ -364,13 +364,13 @@ function ot(t, e, n) {
|
|
|
364
364
|
f.isString(R) ? R.trim() : R,
|
|
365
365
|
m,
|
|
366
366
|
d
|
|
367
|
-
)) === !0 &&
|
|
367
|
+
)) === !0 && v(O, m ? m.concat(R) : [R]);
|
|
368
368
|
}), p.pop();
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
if (!f.isObject(t))
|
|
372
372
|
throw new TypeError("data must be an object");
|
|
373
|
-
return
|
|
373
|
+
return v(t), e;
|
|
374
374
|
}
|
|
375
375
|
function fr(t) {
|
|
376
376
|
const e = {
|
|
@@ -845,8 +845,8 @@ function Sa(t, e) {
|
|
|
845
845
|
d += n[p++], p = p % t;
|
|
846
846
|
if (o = (o + 1) % t, o === a && (a = (a + 1) % t), l - i < e)
|
|
847
847
|
return;
|
|
848
|
-
const
|
|
849
|
-
return
|
|
848
|
+
const v = c && l - c;
|
|
849
|
+
return v ? Math.round(d * 1e3 / v) : void 0;
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
852
|
function Ea(t, e) {
|
|
@@ -1017,22 +1017,22 @@ const hn = (t) => {
|
|
|
1017
1017
|
const o = hn(t);
|
|
1018
1018
|
let a = o.data;
|
|
1019
1019
|
const i = j.from(o.headers).normalize();
|
|
1020
|
-
let { responseType: s, onUploadProgress: u, onDownloadProgress: l } = o, c, p, d,
|
|
1020
|
+
let { responseType: s, onUploadProgress: u, onDownloadProgress: l } = o, c, p, d, v, y;
|
|
1021
1021
|
function m() {
|
|
1022
|
-
|
|
1022
|
+
v && v(), y && y(), o.cancelToken && o.cancelToken.unsubscribe(c), o.signal && o.signal.removeEventListener("abort", c);
|
|
1023
1023
|
}
|
|
1024
1024
|
let h = new XMLHttpRequest();
|
|
1025
1025
|
h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
|
|
1026
1026
|
function O() {
|
|
1027
1027
|
if (!h)
|
|
1028
1028
|
return;
|
|
1029
|
-
const
|
|
1029
|
+
const g = j.from(
|
|
1030
1030
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1031
1031
|
), x = {
|
|
1032
1032
|
data: !s || s === "text" || s === "json" ? h.responseText : h.response,
|
|
1033
1033
|
status: h.status,
|
|
1034
1034
|
statusText: h.statusText,
|
|
1035
|
-
headers:
|
|
1035
|
+
headers: g,
|
|
1036
1036
|
config: t,
|
|
1037
1037
|
request: h
|
|
1038
1038
|
};
|
|
@@ -1049,18 +1049,18 @@ const hn = (t) => {
|
|
|
1049
1049
|
}, h.onerror = function() {
|
|
1050
1050
|
r(new b("Network Error", b.ERR_NETWORK, t, h)), h = null;
|
|
1051
1051
|
}, h.ontimeout = function() {
|
|
1052
|
-
let
|
|
1052
|
+
let N = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1053
1053
|
const x = o.transitional || un;
|
|
1054
|
-
o.timeoutErrorMessage && (
|
|
1055
|
-
|
|
1054
|
+
o.timeoutErrorMessage && (N = o.timeoutErrorMessage), r(new b(
|
|
1055
|
+
N,
|
|
1056
1056
|
x.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
|
|
1057
1057
|
t,
|
|
1058
1058
|
h
|
|
1059
1059
|
)), h = null;
|
|
1060
|
-
}, a === void 0 && i.setContentType(null), "setRequestHeader" in h && f.forEach(i.toJSON(), function(
|
|
1061
|
-
h.setRequestHeader(x,
|
|
1062
|
-
}), f.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), s && s !== "json" && (h.responseType = o.responseType), l && ([d, y] = Je(l, !0), h.addEventListener("progress", d)), u && h.upload && ([p,
|
|
1063
|
-
h && (r(!
|
|
1060
|
+
}, a === void 0 && i.setContentType(null), "setRequestHeader" in h && f.forEach(i.toJSON(), function(N, x) {
|
|
1061
|
+
h.setRequestHeader(x, N);
|
|
1062
|
+
}), f.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), s && s !== "json" && (h.responseType = o.responseType), l && ([d, y] = Je(l, !0), h.addEventListener("progress", d)), u && h.upload && ([p, v] = Je(u), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", v)), (o.cancelToken || o.signal) && (c = (g) => {
|
|
1063
|
+
h && (r(!g || g.type ? new Se(null, t, h) : g), h.abort(), h = null);
|
|
1064
1064
|
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
1065
1065
|
const R = ba(o.url);
|
|
1066
1066
|
if (R && U.protocols.indexOf(R) === -1) {
|
|
@@ -1208,9 +1208,9 @@ const Ia = async (t) => {
|
|
|
1208
1208
|
fetchOptions: d
|
|
1209
1209
|
} = hn(t);
|
|
1210
1210
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1211
|
-
let
|
|
1212
|
-
const m =
|
|
1213
|
-
|
|
1211
|
+
let v = Ca([o, a && a.toAbortSignal()], i), y;
|
|
1212
|
+
const m = v && v.unsubscribe && (() => {
|
|
1213
|
+
v.unsubscribe();
|
|
1214
1214
|
});
|
|
1215
1215
|
let h;
|
|
1216
1216
|
try {
|
|
@@ -1232,7 +1232,7 @@ const Ia = async (t) => {
|
|
|
1232
1232
|
const O = "credentials" in Request.prototype;
|
|
1233
1233
|
y = new Request(e, {
|
|
1234
1234
|
...d,
|
|
1235
|
-
signal:
|
|
1235
|
+
signal: v,
|
|
1236
1236
|
method: n.toUpperCase(),
|
|
1237
1237
|
headers: c.normalize().toJSON(),
|
|
1238
1238
|
body: r,
|
|
@@ -1240,8 +1240,8 @@ const Ia = async (t) => {
|
|
|
1240
1240
|
credentials: O ? p : void 0
|
|
1241
1241
|
});
|
|
1242
1242
|
let R = await fetch(y);
|
|
1243
|
-
const
|
|
1244
|
-
if (Ut && (s ||
|
|
1243
|
+
const g = Ut && (l === "stream" || l === "response");
|
|
1244
|
+
if (Ut && (s || g && m)) {
|
|
1245
1245
|
const x = {};
|
|
1246
1246
|
["status", "statusText", "headers"].forEach((K) => {
|
|
1247
1247
|
x[K] = R[K];
|
|
@@ -1258,10 +1258,10 @@ const Ia = async (t) => {
|
|
|
1258
1258
|
);
|
|
1259
1259
|
}
|
|
1260
1260
|
l = l || "text";
|
|
1261
|
-
let
|
|
1262
|
-
return !
|
|
1261
|
+
let N = await Ve[f.findKey(Ve, l) || "text"](R, t);
|
|
1262
|
+
return !g && m && m(), await new Promise((x, L) => {
|
|
1263
1263
|
dn(x, L, {
|
|
1264
|
-
data:
|
|
1264
|
+
data: N,
|
|
1265
1265
|
headers: j.from(R.headers),
|
|
1266
1266
|
status: R.status,
|
|
1267
1267
|
statusText: R.statusText,
|
|
@@ -1463,18 +1463,18 @@ let ce = class {
|
|
|
1463
1463
|
return c;
|
|
1464
1464
|
}
|
|
1465
1465
|
d = s.length;
|
|
1466
|
-
let
|
|
1466
|
+
let v = n;
|
|
1467
1467
|
for (p = 0; p < d; ) {
|
|
1468
1468
|
const y = s[p++], m = s[p++];
|
|
1469
1469
|
try {
|
|
1470
|
-
|
|
1470
|
+
v = y(v);
|
|
1471
1471
|
} catch (h) {
|
|
1472
1472
|
m.call(this, h);
|
|
1473
1473
|
break;
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
1476
|
try {
|
|
1477
|
-
c = br.call(this,
|
|
1477
|
+
c = br.call(this, v);
|
|
1478
1478
|
} catch (y) {
|
|
1479
1479
|
return Promise.reject(y);
|
|
1480
1480
|
}
|
|
@@ -1667,26 +1667,26 @@ function Sn(t) {
|
|
|
1667
1667
|
return Sn(fe(t, o));
|
|
1668
1668
|
}, n;
|
|
1669
1669
|
}
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1670
|
+
const _ = Sn(Ne);
|
|
1671
|
+
_.Axios = ce;
|
|
1672
|
+
_.CanceledError = Se;
|
|
1673
|
+
_.CancelToken = ka;
|
|
1674
|
+
_.isCancel = pn;
|
|
1675
|
+
_.VERSION = wn;
|
|
1676
|
+
_.toFormData = ot;
|
|
1677
|
+
_.AxiosError = b;
|
|
1678
|
+
_.Cancel = _.CanceledError;
|
|
1679
|
+
_.all = function(e) {
|
|
1680
1680
|
return Promise.all(e);
|
|
1681
1681
|
};
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1682
|
+
_.spread = ja;
|
|
1683
|
+
_.isAxiosError = qa;
|
|
1684
|
+
_.mergeConfig = fe;
|
|
1685
|
+
_.AxiosHeaders = j;
|
|
1686
|
+
_.formToJSON = (t) => fn(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
1687
|
+
_.getAdapter = vn.getAdapter;
|
|
1688
|
+
_.HttpStatusCode = kt;
|
|
1689
|
+
_.default = _;
|
|
1690
1690
|
const {
|
|
1691
1691
|
Axios: vc,
|
|
1692
1692
|
AxiosError: wc,
|
|
@@ -1704,7 +1704,7 @@ const {
|
|
|
1704
1704
|
formToJSON: _c,
|
|
1705
1705
|
getAdapter: Nc,
|
|
1706
1706
|
mergeConfig: Dc
|
|
1707
|
-
} =
|
|
1707
|
+
} = _;
|
|
1708
1708
|
var Er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1709
1709
|
function Ha(t) {
|
|
1710
1710
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -1797,8 +1797,8 @@ var Ht = Ka, _r = Ht.custom, Nr = Pn(_r) ? _r : null, On = {
|
|
|
1797
1797
|
o = [];
|
|
1798
1798
|
else if (xn(o, e) >= 0)
|
|
1799
1799
|
return "[Circular]";
|
|
1800
|
-
function d(P,
|
|
1801
|
-
if (
|
|
1800
|
+
function d(P, $, w) {
|
|
1801
|
+
if ($ && (o = ri.call(o), o.push($)), w) {
|
|
1802
1802
|
var q = {
|
|
1803
1803
|
depth: a.depth
|
|
1804
1804
|
};
|
|
@@ -1807,8 +1807,8 @@ var Ht = Ka, _r = Ht.custom, Nr = Pn(_r) ? _r : null, On = {
|
|
|
1807
1807
|
return t(P, a, r + 1, o);
|
|
1808
1808
|
}
|
|
1809
1809
|
if (typeof e == "function" && !Dr(e)) {
|
|
1810
|
-
var
|
|
1811
|
-
return "[Function" + (
|
|
1810
|
+
var v = pi(e), y = Ue(e, d);
|
|
1811
|
+
return "[Function" + (v ? ": " + v : " (anonymous)") + "]" + (y.length > 0 ? " { " + re.call(y, ", ") + " }" : "");
|
|
1812
1812
|
}
|
|
1813
1813
|
if (Pn(e)) {
|
|
1814
1814
|
var m = ve ? ae.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : qt.call(e);
|
|
@@ -1822,12 +1822,12 @@ var Ht = Ka, _r = Ht.custom, Nr = Pn(_r) ? _r : null, On = {
|
|
|
1822
1822
|
if (zt(e)) {
|
|
1823
1823
|
if (e.length === 0)
|
|
1824
1824
|
return "[]";
|
|
1825
|
-
var
|
|
1826
|
-
return p && !bi(
|
|
1825
|
+
var g = Ue(e, d);
|
|
1826
|
+
return p && !bi(g) ? "[" + Wt(g, p) + "]" : "[ " + re.call(g, ", ") + " ]";
|
|
1827
1827
|
}
|
|
1828
1828
|
if (ii(e)) {
|
|
1829
|
-
var
|
|
1830
|
-
return !("cause" in Error.prototype) && "cause" in e && !An.call(e, "cause") ? "{ [" + String(e) + "] " + re.call(xr.call("[cause]: " + d(e.cause),
|
|
1829
|
+
var N = Ue(e, d);
|
|
1830
|
+
return !("cause" in Error.prototype) && "cause" in e && !An.call(e, "cause") ? "{ [" + String(e) + "] " + re.call(xr.call("[cause]: " + d(e.cause), N), ", ") + " }" : N.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + re.call(N, ", ") + " }";
|
|
1831
1831
|
}
|
|
1832
1832
|
if (typeof e == "object" && i) {
|
|
1833
1833
|
if (Nr && typeof e[Nr] == "function" && Ht)
|
|
@@ -1837,8 +1837,8 @@ var Ht = Ka, _r = Ht.custom, Nr = Pn(_r) ? _r : null, On = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
if (di(e)) {
|
|
1839
1839
|
var x = [];
|
|
1840
|
-
return Ar && Ar.call(e, function(P,
|
|
1841
|
-
x.push(d(
|
|
1840
|
+
return Ar && Ar.call(e, function(P, $) {
|
|
1841
|
+
x.push(d($, e, !0) + " => " + d(P, e));
|
|
1842
1842
|
}), Fr("Map", Qe.call(e), x, p);
|
|
1843
1843
|
}
|
|
1844
1844
|
if (mi(e)) {
|
|
@@ -2519,8 +2519,8 @@ var Fs = function t(e) {
|
|
|
2519
2519
|
var r = ks(e), o = r.length > 0 ? r[0] : "", a = js("%" + o + "%", n), i = a.name, s = a.value, u = !1, l = a.alias;
|
|
2520
2520
|
l && (o = l[0], Ls(r, Is([0, 1], l)));
|
|
2521
2521
|
for (var c = 1, p = !0; c < r.length; c += 1) {
|
|
2522
|
-
var d = r[c],
|
|
2523
|
-
if ((
|
|
2522
|
+
var d = r[c], v = Ze(d, 0, 1), y = Ze(d, -1);
|
|
2523
|
+
if ((v === '"' || v === "'" || v === "`" || y === '"' || y === "'" || y === "`") && v !== y)
|
|
2524
2524
|
throw new we("property names with quotes must have matching quotes");
|
|
2525
2525
|
if ((d === "constructor" || !p) && (u = !0), o += "." + d, i = "%" + o + "%", Ye(ue, i))
|
|
2526
2526
|
s = ue[i];
|
|
@@ -2694,8 +2694,8 @@ function() {
|
|
|
2694
2694
|
return e;
|
|
2695
2695
|
var i = e;
|
|
2696
2696
|
if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), r === "iso-8859-1")
|
|
2697
|
-
return escape(i).replace(/%u[0-9a-f]{4}/gi, function(
|
|
2698
|
-
return "%26%23" + parseInt(
|
|
2697
|
+
return escape(i).replace(/%u[0-9a-f]{4}/gi, function(v) {
|
|
2698
|
+
return "%26%23" + parseInt(v.slice(2), 16) + "%3B";
|
|
2699
2699
|
});
|
|
2700
2700
|
for (var s = "", u = 0; u < i.length; u += Dt) {
|
|
2701
2701
|
for (var l = i.length >= Dt ? i.slice(u, u + Dt) : i, c = [], p = 0; p < l.length; ++p) {
|
|
@@ -2790,49 +2790,49 @@ function() {
|
|
|
2790
2790
|
strictNullHandling: !1
|
|
2791
2791
|
}, Tl = function(e) {
|
|
2792
2792
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
|
|
2793
|
-
}, Ft = {}, Cl = function t(e, n, r, o, a, i, s, u, l, c, p, d,
|
|
2794
|
-
for (var
|
|
2795
|
-
var M =
|
|
2793
|
+
}, Ft = {}, Cl = function t(e, n, r, o, a, i, s, u, l, c, p, d, v, y, m, h, O, R) {
|
|
2794
|
+
for (var g = e, N = R, x = 0, L = !1; (N = N.get(Ft)) !== void 0 && !L; ) {
|
|
2795
|
+
var M = N.get(e);
|
|
2796
2796
|
if (x += 1, typeof M < "u") {
|
|
2797
2797
|
if (M === x)
|
|
2798
2798
|
throw new RangeError("Cyclic object value");
|
|
2799
2799
|
L = !0;
|
|
2800
2800
|
}
|
|
2801
|
-
typeof
|
|
2801
|
+
typeof N.get(Ft) > "u" && (x = 0);
|
|
2802
2802
|
}
|
|
2803
|
-
if (typeof c == "function" ?
|
|
2804
|
-
return X instanceof Date ?
|
|
2805
|
-
})),
|
|
2803
|
+
if (typeof c == "function" ? g = c(n, g) : g instanceof Date ? g = v(g) : r === "comma" && te(g) && (g = Ge.maybeMap(g, function(X) {
|
|
2804
|
+
return X instanceof Date ? v(X) : X;
|
|
2805
|
+
})), g === null) {
|
|
2806
2806
|
if (i)
|
|
2807
2807
|
return l && !h ? l(n, F.encoder, O, "key", y) : n;
|
|
2808
|
-
|
|
2808
|
+
g = "";
|
|
2809
2809
|
}
|
|
2810
|
-
if (Tl(
|
|
2810
|
+
if (Tl(g) || Ge.isBuffer(g)) {
|
|
2811
2811
|
if (l) {
|
|
2812
2812
|
var z = h ? n : l(n, F.encoder, O, "key", y);
|
|
2813
|
-
return [m(z) + "=" + m(l(
|
|
2813
|
+
return [m(z) + "=" + m(l(g, F.encoder, O, "value", y))];
|
|
2814
2814
|
}
|
|
2815
|
-
return [m(n) + "=" + m(String(
|
|
2815
|
+
return [m(n) + "=" + m(String(g))];
|
|
2816
2816
|
}
|
|
2817
2817
|
var K = [];
|
|
2818
|
-
if (typeof
|
|
2818
|
+
if (typeof g > "u")
|
|
2819
2819
|
return K;
|
|
2820
2820
|
var S;
|
|
2821
|
-
if (r === "comma" && te(
|
|
2822
|
-
h && l && (
|
|
2821
|
+
if (r === "comma" && te(g))
|
|
2822
|
+
h && l && (g = Ge.maybeMap(g, l)), S = [{ value: g.length > 0 ? g.join(",") || null : void 0 }];
|
|
2823
2823
|
else if (te(c))
|
|
2824
2824
|
S = c;
|
|
2825
2825
|
else {
|
|
2826
|
-
var E = Object.keys(
|
|
2826
|
+
var E = Object.keys(g);
|
|
2827
2827
|
S = p ? E.sort(p) : E;
|
|
2828
2828
|
}
|
|
2829
|
-
var T = u ? String(n).replace(/\./g, "%2E") : String(n), P = o && te(
|
|
2830
|
-
if (a && te(
|
|
2829
|
+
var T = u ? String(n).replace(/\./g, "%2E") : String(n), P = o && te(g) && g.length === 1 ? T + "[]" : T;
|
|
2830
|
+
if (a && te(g) && g.length === 0)
|
|
2831
2831
|
return P + "[]";
|
|
2832
|
-
for (var
|
|
2833
|
-
var w = S[
|
|
2832
|
+
for (var $ = 0; $ < S.length; ++$) {
|
|
2833
|
+
var w = S[$], q = typeof w == "object" && w && typeof w.value < "u" ? w.value : g[w];
|
|
2834
2834
|
if (!(s && q === null)) {
|
|
2835
|
-
var B = d && u ? String(w).replace(/\./g, "%2E") : String(w), k = te(
|
|
2835
|
+
var B = d && u ? String(w).replace(/\./g, "%2E") : String(w), k = te(g) ? typeof r == "function" ? r(P, B) : P : P + (d ? "." + B : "[" + B + "]");
|
|
2836
2836
|
R.set(e, x);
|
|
2837
2837
|
var W = Hn();
|
|
2838
2838
|
W.set(Ft, R), Wn(K, t(
|
|
@@ -2844,11 +2844,11 @@ function() {
|
|
|
2844
2844
|
i,
|
|
2845
2845
|
s,
|
|
2846
2846
|
u,
|
|
2847
|
-
r === "comma" && h && te(
|
|
2847
|
+
r === "comma" && h && te(g) ? null : l,
|
|
2848
2848
|
c,
|
|
2849
2849
|
p,
|
|
2850
2850
|
d,
|
|
2851
|
-
|
|
2851
|
+
v,
|
|
2852
2852
|
y,
|
|
2853
2853
|
m,
|
|
2854
2854
|
h,
|
|
@@ -2934,9 +2934,9 @@ function() {
|
|
|
2934
2934
|
l
|
|
2935
2935
|
));
|
|
2936
2936
|
}
|
|
2937
|
-
var
|
|
2938
|
-
return r.charsetSentinel && (r.charset === "iso-8859-1" ? y += "utf8=%26%2310003%3B&" : y += "utf8=%E2%9C%93&"),
|
|
2939
|
-
}, pe = qn, Gt = Object.prototype.hasOwnProperty, Jr = Array.isArray,
|
|
2937
|
+
var v = i.join(r.delimiter), y = r.addQueryPrefix === !0 ? "?" : "";
|
|
2938
|
+
return r.charsetSentinel && (r.charset === "iso-8859-1" ? y += "utf8=%26%2310003%3B&" : y += "utf8=%E2%9C%93&"), v.length > 0 ? y + v : "";
|
|
2939
|
+
}, pe = qn, Gt = Object.prototype.hasOwnProperty, Jr = Array.isArray, C = {
|
|
2940
2940
|
allowDots: !1,
|
|
2941
2941
|
allowEmptyArrays: !1,
|
|
2942
2942
|
allowPrototypes: !1,
|
|
@@ -2983,19 +2983,19 @@ function() {
|
|
|
2983
2983
|
i[u].indexOf("utf8=") === 0 && (i[u] === Fl ? l = "utf-8" : i[u] === Dl && (l = "iso-8859-1"), s = u, u = i.length);
|
|
2984
2984
|
for (u = 0; u < i.length; ++u)
|
|
2985
2985
|
if (u !== s) {
|
|
2986
|
-
var c = i[u], p = c.indexOf("]="), d = p === -1 ? c.indexOf("=") : p + 1,
|
|
2987
|
-
d === -1 ? (
|
|
2986
|
+
var c = i[u], p = c.indexOf("]="), d = p === -1 ? c.indexOf("=") : p + 1, v, y;
|
|
2987
|
+
d === -1 ? (v = n.decoder(c, C.decoder, l, "key"), y = n.strictNullHandling ? null : "") : (v = n.decoder(c.slice(0, d), C.decoder, l, "key"), y = pe.maybeMap(
|
|
2988
2988
|
Gn(
|
|
2989
2989
|
c.slice(d + 1),
|
|
2990
2990
|
n,
|
|
2991
|
-
Jr(r[
|
|
2991
|
+
Jr(r[v]) ? r[v].length : 0
|
|
2992
2992
|
),
|
|
2993
2993
|
function(h) {
|
|
2994
|
-
return n.decoder(h,
|
|
2994
|
+
return n.decoder(h, C.decoder, l, "value");
|
|
2995
2995
|
}
|
|
2996
2996
|
)), y && n.interpretNumericEntities && l === "iso-8859-1" && (y = Nl(String(y))), c.indexOf("[]=") > -1 && (y = Jr(y) ? [y] : y);
|
|
2997
|
-
var m = Gt.call(r,
|
|
2998
|
-
m && n.duplicates === "combine" ? r[
|
|
2997
|
+
var m = Gt.call(r, v);
|
|
2998
|
+
m && n.duplicates === "combine" ? r[v] = pe.combine(r[v], y) : (!m || n.duplicates === "last") && (r[v] = y);
|
|
2999
2999
|
}
|
|
3000
3000
|
return r;
|
|
3001
3001
|
}, Ll = function(t, e, n, r) {
|
|
@@ -3038,7 +3038,7 @@ function() {
|
|
|
3038
3038
|
}
|
|
3039
3039
|
}, Ul = function(e) {
|
|
3040
3040
|
if (!e)
|
|
3041
|
-
return
|
|
3041
|
+
return C;
|
|
3042
3042
|
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
|
|
3043
3043
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3044
3044
|
if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
|
|
@@ -3049,32 +3049,32 @@ function() {
|
|
|
3049
3049
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3050
3050
|
if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
|
|
3051
3051
|
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
|
|
3052
|
-
var n = typeof e.charset > "u" ?
|
|
3052
|
+
var n = typeof e.charset > "u" ? C.charset : e.charset, r = typeof e.duplicates > "u" ? C.duplicates : e.duplicates;
|
|
3053
3053
|
if (r !== "combine" && r !== "first" && r !== "last")
|
|
3054
3054
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
3055
|
-
var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 :
|
|
3055
|
+
var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : C.allowDots : !!e.allowDots;
|
|
3056
3056
|
return {
|
|
3057
3057
|
allowDots: o,
|
|
3058
|
-
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays :
|
|
3059
|
-
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes :
|
|
3060
|
-
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse :
|
|
3061
|
-
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit :
|
|
3058
|
+
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : C.allowEmptyArrays,
|
|
3059
|
+
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : C.allowPrototypes,
|
|
3060
|
+
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : C.allowSparse,
|
|
3061
|
+
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : C.arrayLimit,
|
|
3062
3062
|
charset: n,
|
|
3063
|
-
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel :
|
|
3064
|
-
comma: typeof e.comma == "boolean" ? e.comma :
|
|
3065
|
-
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys :
|
|
3066
|
-
decoder: typeof e.decoder == "function" ? e.decoder :
|
|
3067
|
-
delimiter: typeof e.delimiter == "string" || pe.isRegExp(e.delimiter) ? e.delimiter :
|
|
3063
|
+
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : C.charsetSentinel,
|
|
3064
|
+
comma: typeof e.comma == "boolean" ? e.comma : C.comma,
|
|
3065
|
+
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : C.decodeDotInKeys,
|
|
3066
|
+
decoder: typeof e.decoder == "function" ? e.decoder : C.decoder,
|
|
3067
|
+
delimiter: typeof e.delimiter == "string" || pe.isRegExp(e.delimiter) ? e.delimiter : C.delimiter,
|
|
3068
3068
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3069
|
-
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth :
|
|
3069
|
+
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : C.depth,
|
|
3070
3070
|
duplicates: r,
|
|
3071
3071
|
ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
|
|
3072
|
-
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities :
|
|
3073
|
-
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit :
|
|
3072
|
+
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : C.interpretNumericEntities,
|
|
3073
|
+
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : C.parameterLimit,
|
|
3074
3074
|
parseArrays: e.parseArrays !== !1,
|
|
3075
|
-
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects :
|
|
3076
|
-
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth :
|
|
3077
|
-
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling :
|
|
3075
|
+
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : C.plainObjects,
|
|
3076
|
+
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : C.strictDepth,
|
|
3077
|
+
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : C.strictNullHandling,
|
|
3078
3078
|
throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
|
|
3079
3079
|
};
|
|
3080
3080
|
}, Bl = function(t, e) {
|
|
@@ -3178,48 +3178,34 @@ const Kl = {
|
|
|
3178
3178
|
Zn(Kl);
|
|
3179
3179
|
et.extend(so);
|
|
3180
3180
|
et.extend(lo);
|
|
3181
|
-
const nr = Ke(), Kn = nr.sso ?? !0
|
|
3181
|
+
const nr = Ke(), Kn = nr.sso ?? !0;
|
|
3182
|
+
nr.i18n;
|
|
3183
|
+
const Jn = nr.noRedireLogin ?? !1, Vn = () => {
|
|
3182
3184
|
if (Jn) return;
|
|
3183
3185
|
const t = "/login";
|
|
3184
3186
|
location.pathname !== t && (sessionStorage.clear(), window.__isAutoCloseApp = !1, location.replace(t));
|
|
3185
|
-
}, Vl = async (t) => {
|
|
3186
|
-
var
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
if (i instanceof Blob && (i = await new Promise((g) => {
|
|
3198
|
-
const y = new FileReader();
|
|
3199
|
-
y.readAsText(i, "utf-8"), y.onload = () => {
|
|
3200
|
-
try {
|
|
3201
|
-
g(JSON.parse(y.result || "{}"));
|
|
3202
|
-
} catch {
|
|
3203
|
-
g({ code: 400, msg: C("blob解析错误") });
|
|
3204
|
-
}
|
|
3205
|
-
};
|
|
3206
|
-
})), i.code) {
|
|
3207
|
-
n = i.code;
|
|
3208
|
-
const g = (e == null ? void 0 : e.i18n) ?? !0;
|
|
3209
|
-
if (Jl && g) {
|
|
3210
|
-
const y = (i == null ? void 0 : i.status) ?? "";
|
|
3211
|
-
r = !(i != null && i.data) || !i.data.length ? C(y) : C(y, ...i.data);
|
|
3212
|
-
} else
|
|
3213
|
-
r = (i == null ? void 0 : i.msg) ?? "";
|
|
3214
|
-
o = i;
|
|
3187
|
+
}, Jl = "SUC0000", Vl = async (t) => {
|
|
3188
|
+
var i, s, u, l, c, p;
|
|
3189
|
+
let e = t.data || {};
|
|
3190
|
+
const n = e.returnCode;
|
|
3191
|
+
let r = e.errorMsg ?? "", o = {};
|
|
3192
|
+
return n !== Jl ? (!(no("code") || "") && !Jn && n === 401 ? (Kn ? oo({ ...io, redirect_uri: ao }) : Vn(), o = e) : (e instanceof Blob && (e = await new Promise((v) => {
|
|
3193
|
+
const y = new FileReader();
|
|
3194
|
+
y.readAsText(e, "utf-8"), y.onload = () => {
|
|
3195
|
+
try {
|
|
3196
|
+
v(JSON.parse(y.result || "{}"));
|
|
3197
|
+
} catch {
|
|
3198
|
+
v({ code: 400, msg: D("blob解析错误") });
|
|
3215
3199
|
}
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3200
|
+
};
|
|
3201
|
+
})), o = e), (i = t.config) != null && i.customErrorMessage && (r = (s = t.config) == null ? void 0 : s.customErrorMessage(r, n)), !((u = t.config) != null && u.ignoreErrorMessage) && r && ((c = (l = window.DasMessage) == null ? void 0 : l.error) == null || c.call(l, { message: r, showClose: !0 })), { ...o, code: n, msg: r }) : ((p = t.config) == null ? void 0 : p.responseType) === "blob" ? t : { ...t.data ?? {}, code: n };
|
|
3202
|
+
}, Ql = async (t, e) => {
|
|
3203
|
+
var o, a, i, s;
|
|
3204
|
+
let n = ((o = t == null ? void 0 : t.response) == null ? void 0 : o.data) || {}, r = (a = t.response) == null ? void 0 : a.message;
|
|
3205
|
+
if (!t.response)
|
|
3206
|
+
return t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = D("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = D("请求配置异常"), !(e != null && e.ignoreErrorMessage) && r && ((s = (i = window.DasMessage) == null ? void 0 : i.error) == null || s.call(i, { message: r, showClose: !0 })), { ...n, code: t.code, msg: r, error: t };
|
|
3221
3207
|
}, J = (t, e) => {
|
|
3222
|
-
const n =
|
|
3208
|
+
const n = _.create();
|
|
3223
3209
|
return to(n, async (r) => {
|
|
3224
3210
|
const o = Ke();
|
|
3225
3211
|
if (r.headers || (r.headers = {}), !(r != null && r.public)) {
|
|
@@ -3258,24 +3244,24 @@ let Yl = (t = 21) => {
|
|
|
3258
3244
|
return e;
|
|
3259
3245
|
};
|
|
3260
3246
|
const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.headers = {}), t.headers["Content-Type"] = "multipart/form-data", t.responseType = "blob", t)), tc = or.post("upload-objects", (t) => (t.headers || (t.headers = {}), t.headers["Content-Type"] = "multipart/form-data", t.responseType = "blob", t)), rc = Xl.get("progress"), Fc = () => {
|
|
3261
|
-
let t = G(!1), e = G(""), n = G(0), r = G("normal"), o = G(!1), a, i = G(""), s = G(""), u = G(""), l = G(""), c = G(!1), p = G(""), d = "",
|
|
3247
|
+
let t = G(!1), e = G(""), n = G(0), r = G("normal"), o = G(!1), a, i = G(""), s = G(""), u = G(""), l = G(""), c = G(!1), p = G(""), d = "", v = G(""), y;
|
|
3262
3248
|
const m = () => {
|
|
3263
3249
|
s.value = "", u.value = "", l.value = "", c.value = !1, p.value = "";
|
|
3264
3250
|
}, h = async () => {
|
|
3265
3251
|
const [S, E] = await Zl().run();
|
|
3266
3252
|
return S ? { stauts: !1 } : { status: !0, data: E };
|
|
3267
3253
|
}, O = (S) => new Promise((E, T) => {
|
|
3268
|
-
const
|
|
3254
|
+
const $ = [];
|
|
3269
3255
|
let w = 0;
|
|
3270
3256
|
for (; w < S.size; ) {
|
|
3271
3257
|
const B = S.slice(w, w + 1048576);
|
|
3272
|
-
|
|
3258
|
+
$.push(B), w += 1048576;
|
|
3273
3259
|
}
|
|
3274
|
-
const q = new Blob(
|
|
3260
|
+
const q = new Blob($, { type: S.type });
|
|
3275
3261
|
E(q);
|
|
3276
|
-
}), R = async (S, E, T, P = !0,
|
|
3262
|
+
}), R = async (S, E, T, P = !0, $ = "", w = !1) => {
|
|
3277
3263
|
var ar, ir;
|
|
3278
|
-
d =
|
|
3264
|
+
d = $, v.value = "import", P && (r.value = "normal", n.value = 0, e.value = D("导入进度"), t.value = !0, i.value = ""), y = E;
|
|
3279
3265
|
const q = await h();
|
|
3280
3266
|
if (!q.status) return;
|
|
3281
3267
|
let B = q.data, k = null, { autoContentType: W, bucketName: X, importFileName: Le } = T;
|
|
@@ -3307,7 +3293,7 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3307
3293
|
const Y = await oc(Yn.data);
|
|
3308
3294
|
if (!w && (Y == null ? void 0 : Y.statusCode) != 200 || w && (Y != null && Y.some((oe) => (oe == null ? void 0 : oe.statusCode) != 200))) {
|
|
3309
3295
|
t.value = !1, (ar = window.DasMessage) == null || ar.error({
|
|
3310
|
-
message: (Y == null ? void 0 : Y.errorMsg) ||
|
|
3296
|
+
message: (Y == null ? void 0 : Y.errorMsg) || D("上传失败"),
|
|
3311
3297
|
grouping: !0,
|
|
3312
3298
|
repeatNum: 1
|
|
3313
3299
|
});
|
|
@@ -3319,31 +3305,31 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3319
3305
|
t.value = !1, r.value = "error";
|
|
3320
3306
|
return;
|
|
3321
3307
|
}
|
|
3322
|
-
e.value =
|
|
3308
|
+
e.value = D("导入进度"), t.value = !0, x(ft.taskId, "import", "");
|
|
3323
3309
|
} else {
|
|
3324
3310
|
if (!ft.status) return;
|
|
3325
3311
|
r.value = "success", (ir = window.DasMessage) == null || ir.success({
|
|
3326
|
-
message:
|
|
3312
|
+
message: D("导入成功"),
|
|
3327
3313
|
grouping: !0,
|
|
3328
3314
|
repeatNum: 1
|
|
3329
3315
|
});
|
|
3330
3316
|
}
|
|
3331
|
-
},
|
|
3332
|
-
r.value = "normal", n.value = 0, e.value = T ||
|
|
3317
|
+
}, g = async (S, E = "", T = "") => {
|
|
3318
|
+
r.value = "normal", n.value = 0, e.value = T || D("导出进度"), t.value = !0;
|
|
3333
3319
|
const P = await (S == null ? void 0 : S());
|
|
3334
3320
|
if (!P.status) {
|
|
3335
3321
|
t.value = !1, r.value = "error";
|
|
3336
3322
|
return;
|
|
3337
3323
|
}
|
|
3338
3324
|
x(P.taskId, "action", "");
|
|
3339
|
-
},
|
|
3340
|
-
|
|
3341
|
-
const
|
|
3342
|
-
if (
|
|
3325
|
+
}, N = async (S, E = "", T = "", P = !0) => {
|
|
3326
|
+
v.value = "export", P && (r.value = "normal", n.value = 0, e.value = D("导出进度"), t.value = !0);
|
|
3327
|
+
const $ = await (S == null ? void 0 : S());
|
|
3328
|
+
if (!$.status) {
|
|
3343
3329
|
t.value = !1, r.value = "error";
|
|
3344
3330
|
return;
|
|
3345
3331
|
}
|
|
3346
|
-
et().format("YYYYMMDDHHmmss") + "", x(
|
|
3332
|
+
et().format("YYYYMMDDHHmmss") + "", x($.taskId, "export", E || "", T);
|
|
3347
3333
|
}, x = async (S, E, T, P = "") => {
|
|
3348
3334
|
o.value = !0, M(S, E, T, P), a = setTimeout(() => {
|
|
3349
3335
|
}, 50);
|
|
@@ -3351,10 +3337,10 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3351
3337
|
clearTimeout(a), a = null, t.value = !1;
|
|
3352
3338
|
}, M = async (S, E = "export", T, P = "") => {
|
|
3353
3339
|
var q, B, k;
|
|
3354
|
-
const [
|
|
3340
|
+
const [$, w] = await rc("", {
|
|
3355
3341
|
url: `progress/${S}`
|
|
3356
3342
|
}).run();
|
|
3357
|
-
if (
|
|
3343
|
+
if ($) {
|
|
3358
3344
|
o.value = !1;
|
|
3359
3345
|
return;
|
|
3360
3346
|
}
|
|
@@ -3366,7 +3352,7 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3366
3352
|
const X = ((q = W == null ? void 0 : W.split("/")) == null ? void 0 : q.pop()) || "";
|
|
3367
3353
|
let Le = T || X;
|
|
3368
3354
|
Vr(`${Ke().baseURL}/oss${w.filePath}`, Le, P), o.value = !1;
|
|
3369
|
-
} else w.status == 2 && (l.value = w.message || (E == "export" ?
|
|
3355
|
+
} else w.status == 2 && (l.value = w.message || (E == "export" ? D("导出失败") : D("导入失败")), (B = window.DasMessage) == null || B.error({
|
|
3370
3356
|
message: l.value,
|
|
3371
3357
|
grouping: !0,
|
|
3372
3358
|
repeatNum: 1
|
|
@@ -3376,7 +3362,7 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3376
3362
|
r.value = "error", c.value = !0;
|
|
3377
3363
|
let W = await sr(`/oss/${w == null ? void 0 : w.filePath}`);
|
|
3378
3364
|
const X = ((k = W == null ? void 0 : W.split("/")) == null ? void 0 : k.pop()) || "";
|
|
3379
|
-
s.value = d || X, u.value = y.sizeText, l.value =
|
|
3365
|
+
s.value = d || X, u.value = y.sizeText, l.value = D("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${Ke().baseURL}/oss/${w == null ? void 0 : w.filePath}`;
|
|
3380
3366
|
}
|
|
3381
3367
|
z(w.status, E, w.message);
|
|
3382
3368
|
} else E == "action" && (r.value = "success");
|
|
@@ -3385,17 +3371,17 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3385
3371
|
M(S, E, T, P);
|
|
3386
3372
|
}, 50) : (i.value = w, o.value = !1, z(w.status, E, w.message), L(), c.value = !0, l.value = (w == null ? void 0 : w.message) || "");
|
|
3387
3373
|
}, z = (S, E = "export", T) => {
|
|
3388
|
-
var P,
|
|
3374
|
+
var P, $, w;
|
|
3389
3375
|
S == 1 ? (r.value = "success", (P = window.DasMessage) == null || P.success({
|
|
3390
|
-
message: E == "export" ?
|
|
3376
|
+
message: E == "export" ? D("导出成功") : D("导入成功"),
|
|
3391
3377
|
grouping: !0,
|
|
3392
3378
|
repeatNum: 1
|
|
3393
|
-
}), s.value = "", u.value = "", l.value = "") : S == 2 ? (r.value = "error", (
|
|
3394
|
-
message: T || (E == "export" ?
|
|
3379
|
+
}), s.value = "", u.value = "", l.value = "") : S == 2 ? (r.value = "error", ($ = window.DasMessage) == null || $.error({
|
|
3380
|
+
message: T || (E == "export" ? D("导出失败") : D("导入失败")),
|
|
3395
3381
|
grouping: !0,
|
|
3396
3382
|
repeatNum: 1
|
|
3397
|
-
}), l.value = T ||
|
|
3398
|
-
message: E == "export" ?
|
|
3383
|
+
}), l.value = T || D("部分数据校验不通过,请下载附件并修改,重新导入!")) : S == 3 && (r.value = "error", (w = window.DasMessage) == null || w.error({
|
|
3384
|
+
message: E == "export" ? D("部分导出失败") : D("部分导入失败"),
|
|
3399
3385
|
grouping: !0,
|
|
3400
3386
|
repeatNum: 1
|
|
3401
3387
|
}));
|
|
@@ -3413,8 +3399,8 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3413
3399
|
errorImport: c,
|
|
3414
3400
|
errorFilePath: p,
|
|
3415
3401
|
fileImport: R,
|
|
3416
|
-
fileExport:
|
|
3417
|
-
fileAction:
|
|
3402
|
+
fileExport: N,
|
|
3403
|
+
fileAction: g,
|
|
3418
3404
|
generateUniqueName: (S) => {
|
|
3419
3405
|
const E = S == null ? void 0 : S.match(/(.*?)(\.[^.]*$|$)/), T = E.length ? E[2] : "";
|
|
3420
3406
|
return `${E.length ? E[1] : S}${Yl()}${T}`;
|
|
@@ -3422,7 +3408,7 @@ const Zl = or.get("token"), ec = or.post("put-object", (t) => (t.headers || (t.h
|
|
|
3422
3408
|
downloadFile: Vr,
|
|
3423
3409
|
resetStataus: m,
|
|
3424
3410
|
checkProgress: x,
|
|
3425
|
-
fileHandleType:
|
|
3411
|
+
fileHandleType: v
|
|
3426
3412
|
};
|
|
3427
3413
|
}, nc = (t) => {
|
|
3428
3414
|
let e = t == null ? void 0 : t.toLocaleLowerCase();
|