@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
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setI18nRule as uo, currentLang as fo, t as
|
|
1
|
+
import { setI18nRule as uo, currentLang as fo, t as D } from "@das-fed/web/packages/i18n/index";
|
|
2
2
|
import { curringHttp as po } from "@das-fed/utils/curring-http";
|
|
3
3
|
import { getToken as yo, getQuery as mo, login as ho, real_uri as go, getTokenParams as vo } from "@das-fed/utils/create-api-service/sso";
|
|
4
4
|
import rt from "dayjs";
|
|
@@ -338,10 +338,10 @@ function it(t, e, n) {
|
|
|
338
338
|
if (f.endsWith(h, "{}"))
|
|
339
339
|
h = r ? h : h.slice(0, -2), y = JSON.stringify(y);
|
|
340
340
|
else if (f.isArray(y) && ua(y) || (f.isFileList(y) || f.endsWith(h, "[]")) && (A = f.toArray(y)))
|
|
341
|
-
return h = gn(h), A.forEach(function(v,
|
|
341
|
+
return h = gn(h), A.forEach(function(v, F) {
|
|
342
342
|
!(f.isUndefined(v) || v === null) && e.append(
|
|
343
343
|
// eslint-disable-next-line no-nested-ternary
|
|
344
|
-
i === !0 ? vr([h],
|
|
344
|
+
i === !0 ? vr([h], F, a) : i === null ? h : h + "[]",
|
|
345
345
|
l(v)
|
|
346
346
|
);
|
|
347
347
|
}), !1;
|
|
@@ -1049,16 +1049,16 @@ const Rn = (t) => {
|
|
|
1049
1049
|
}, m.onerror = function() {
|
|
1050
1050
|
r(new S("Network Error", S.ERR_NETWORK, t, m)), m = null;
|
|
1051
1051
|
}, m.ontimeout = function() {
|
|
1052
|
-
let
|
|
1052
|
+
let F = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1053
1053
|
const x = o.transitional || bn;
|
|
1054
|
-
o.timeoutErrorMessage && (
|
|
1055
|
-
|
|
1054
|
+
o.timeoutErrorMessage && (F = o.timeoutErrorMessage), r(new S(
|
|
1055
|
+
F,
|
|
1056
1056
|
x.clarifyTimeoutError ? S.ETIMEDOUT : S.ECONNABORTED,
|
|
1057
1057
|
t,
|
|
1058
1058
|
m
|
|
1059
1059
|
)), m = null;
|
|
1060
|
-
}, a === void 0 && i.setContentType(null), "setRequestHeader" in m && f.forEach(i.toJSON(), function(
|
|
1061
|
-
m.setRequestHeader(x,
|
|
1060
|
+
}, a === void 0 && i.setContentType(null), "setRequestHeader" in m && f.forEach(i.toJSON(), function(F, x) {
|
|
1061
|
+
m.setRequestHeader(x, F);
|
|
1062
1062
|
}), f.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), s && s !== "json" && (m.responseType = o.responseType), l && ([d, y] = Qe(l, !0), m.addEventListener("progress", d)), u && m.upload && ([p, g] = Qe(u), m.upload.addEventListener("progress", p), m.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (c = (v) => {
|
|
1063
1063
|
m && (r(!v || v.type ? new Ee(null, t, m) : v), m.abort(), m = null);
|
|
1064
1064
|
}, o.cancelToken && o.cancelToken.subscribe(c), o.signal && (o.signal.aborted ? c() : o.signal.addEventListener("abort", c)));
|
|
@@ -1258,10 +1258,10 @@ const Ga = async (t) => {
|
|
|
1258
1258
|
);
|
|
1259
1259
|
}
|
|
1260
1260
|
l = l || "text";
|
|
1261
|
-
let
|
|
1261
|
+
let F = await Xe[f.findKey(Xe, l) || "text"](P, t);
|
|
1262
1262
|
return !v && h && h(), await new Promise((x, L) => {
|
|
1263
1263
|
An(x, L, {
|
|
1264
|
-
data:
|
|
1264
|
+
data: F,
|
|
1265
1265
|
headers: q.from(P.headers),
|
|
1266
1266
|
status: P.status,
|
|
1267
1267
|
statusText: P.statusText,
|
|
@@ -1667,26 +1667,26 @@ function _n(t) {
|
|
|
1667
1667
|
return _n(pe(t, o));
|
|
1668
1668
|
}, n;
|
|
1669
1669
|
}
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1670
|
+
const N = _n(Fe);
|
|
1671
|
+
N.Axios = ce;
|
|
1672
|
+
N.CanceledError = Ee;
|
|
1673
|
+
N.CancelToken = Xa;
|
|
1674
|
+
N.isCancel = En;
|
|
1675
|
+
N.VERSION = $n;
|
|
1676
|
+
N.toFormData = it;
|
|
1677
|
+
N.AxiosError = S;
|
|
1678
|
+
N.Cancel = N.CanceledError;
|
|
1679
|
+
N.all = function(e) {
|
|
1680
1680
|
return Promise.all(e);
|
|
1681
1681
|
};
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1682
|
+
N.spread = Ya;
|
|
1683
|
+
N.isAxiosError = Za;
|
|
1684
|
+
N.mergeConfig = pe;
|
|
1685
|
+
N.AxiosHeaders = q;
|
|
1686
|
+
N.formToJSON = (t) => Sn(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
1687
|
+
N.getAdapter = xn.getAdapter;
|
|
1688
|
+
N.HttpStatusCode = Kt;
|
|
1689
|
+
N.default = N;
|
|
1690
1690
|
const {
|
|
1691
1691
|
Axios: Mc,
|
|
1692
1692
|
AxiosError: Lc,
|
|
@@ -1704,7 +1704,7 @@ const {
|
|
|
1704
1704
|
formToJSON: Vc,
|
|
1705
1705
|
getAdapter: Qc,
|
|
1706
1706
|
mergeConfig: Xc
|
|
1707
|
-
} =
|
|
1707
|
+
} = N;
|
|
1708
1708
|
var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1709
1709
|
function ei(t) {
|
|
1710
1710
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
@@ -1797,8 +1797,8 @@ var Qt = oi, Ur = Qt.custom, kr = Mn(Ur) ? Ur : null, Dn = {
|
|
|
1797
1797
|
o = [];
|
|
1798
1798
|
else if (Ln(o, e) >= 0)
|
|
1799
1799
|
return "[Circular]";
|
|
1800
|
-
function d(T,
|
|
1801
|
-
if (
|
|
1800
|
+
function d(T, _, w) {
|
|
1801
|
+
if (_ && (o = di.call(o), o.push(_)), w) {
|
|
1802
1802
|
var H = {
|
|
1803
1803
|
depth: a.depth
|
|
1804
1804
|
};
|
|
@@ -1826,8 +1826,8 @@ var Qt = oi, Ur = Qt.custom, kr = Mn(Ur) ? Ur : null, Dn = {
|
|
|
1826
1826
|
return p && !_i(v) ? "[" + Yt(v, p) + "]" : "[ " + re.call(v, ", ") + " ]";
|
|
1827
1827
|
}
|
|
1828
1828
|
if (gi(e)) {
|
|
1829
|
-
var
|
|
1830
|
-
return !("cause" in Error.prototype) && "cause" in e && !Fn.call(e, "cause") ? "{ [" + String(e) + "] " + re.call(Ir.call("[cause]: " + d(e.cause),
|
|
1829
|
+
var F = Ue(e, d);
|
|
1830
|
+
return !("cause" in Error.prototype) && "cause" in e && !Fn.call(e, "cause") ? "{ [" + String(e) + "] " + re.call(Ir.call("[cause]: " + d(e.cause), F), ", ") + " }" : F.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + re.call(F, ", ") + " }";
|
|
1831
1831
|
}
|
|
1832
1832
|
if (typeof e == "object" && i) {
|
|
1833
1833
|
if (kr && typeof e[kr] == "function" && Qt)
|
|
@@ -1837,8 +1837,8 @@ var Qt = oi, Ur = Qt.custom, kr = Mn(Ur) ? Ur : null, Dn = {
|
|
|
1837
1837
|
}
|
|
1838
1838
|
if (Oi(e)) {
|
|
1839
1839
|
var x = [];
|
|
1840
|
-
return _r && _r.call(e, function(T,
|
|
1841
|
-
x.push(d(
|
|
1840
|
+
return _r && _r.call(e, function(T, _) {
|
|
1841
|
+
x.push(d(_, e, !0) + " => " + d(T, e));
|
|
1842
1842
|
}), qr("Map", Ye.call(e), x, p);
|
|
1843
1843
|
}
|
|
1844
1844
|
if (Ti(e)) {
|
|
@@ -2809,14 +2809,14 @@ function() {
|
|
|
2809
2809
|
}, Nl = function(e) {
|
|
2810
2810
|
return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
|
|
2811
2811
|
}, kt = {}, Fl = function t(e, n, r, o, a, i, s, u, l, c, p, d, g, y, h, m, A, P) {
|
|
2812
|
-
for (var v = e,
|
|
2813
|
-
var B =
|
|
2812
|
+
for (var v = e, F = P, x = 0, L = !1; (F = F.get(kt)) !== void 0 && !L; ) {
|
|
2813
|
+
var B = F.get(e);
|
|
2814
2814
|
if (x += 1, typeof B < "u") {
|
|
2815
2815
|
if (B === x)
|
|
2816
2816
|
throw new RangeError("Cyclic object value");
|
|
2817
2817
|
L = !0;
|
|
2818
2818
|
}
|
|
2819
|
-
typeof
|
|
2819
|
+
typeof F.get(kt) > "u" && (x = 0);
|
|
2820
2820
|
}
|
|
2821
2821
|
if (typeof c == "function" ? v = c(n, v) : v instanceof Date ? v = g(v) : r === "comma" && te(v) && (v = Je.maybeMap(v, function(X) {
|
|
2822
2822
|
return X instanceof Date ? g(X) : X;
|
|
@@ -2847,8 +2847,8 @@ function() {
|
|
|
2847
2847
|
var $ = u ? String(n).replace(/\./g, "%2E") : String(n), T = o && te(v) && v.length === 1 ? $ + "[]" : $;
|
|
2848
2848
|
if (a && te(v) && v.length === 0)
|
|
2849
2849
|
return T + "[]";
|
|
2850
|
-
for (var
|
|
2851
|
-
var w = E[
|
|
2850
|
+
for (var _ = 0; _ < E.length; ++_) {
|
|
2851
|
+
var w = E[_], H = typeof w == "object" && w && typeof w.value < "u" ? w.value : v[w];
|
|
2852
2852
|
if (!(s && H === null)) {
|
|
2853
2853
|
var k = d && u ? String(w).replace(/\./g, "%2E") : String(w), j = te(v) ? typeof r == "function" ? r(T, k) : T : T + (d ? "." + k : "[" + k + "]");
|
|
2854
2854
|
P.set(e, x);
|
|
@@ -2954,7 +2954,7 @@ function() {
|
|
|
2954
2954
|
}
|
|
2955
2955
|
var g = i.join(r.delimiter), y = r.addQueryPrefix === !0 ? "?" : "";
|
|
2956
2956
|
return r.charsetSentinel && (r.charset === "iso-8859-1" ? y += "utf8=%26%2310003%3B&" : y += "utf8=%E2%9C%93&"), g.length > 0 ? y + g : "";
|
|
2957
|
-
}, de = Yn, Zt = Object.prototype.hasOwnProperty, on = Array.isArray,
|
|
2957
|
+
}, de = Yn, Zt = Object.prototype.hasOwnProperty, on = Array.isArray, C = {
|
|
2958
2958
|
allowDots: !1,
|
|
2959
2959
|
allowEmptyArrays: !1,
|
|
2960
2960
|
allowPrototypes: !1,
|
|
@@ -3002,14 +3002,14 @@ function() {
|
|
|
3002
3002
|
for (u = 0; u < i.length; ++u)
|
|
3003
3003
|
if (u !== s) {
|
|
3004
3004
|
var c = i[u], p = c.indexOf("]="), d = p === -1 ? c.indexOf("=") : p + 1, g, y;
|
|
3005
|
-
d === -1 ? (g = n.decoder(c,
|
|
3005
|
+
d === -1 ? (g = n.decoder(c, C.decoder, l, "key"), y = n.strictNullHandling ? null : "") : (g = n.decoder(c.slice(0, d), C.decoder, l, "key"), y = de.maybeMap(
|
|
3006
3006
|
ro(
|
|
3007
3007
|
c.slice(d + 1),
|
|
3008
3008
|
n,
|
|
3009
3009
|
on(r[g]) ? r[g].length : 0
|
|
3010
3010
|
),
|
|
3011
3011
|
function(m) {
|
|
3012
|
-
return n.decoder(m,
|
|
3012
|
+
return n.decoder(m, C.decoder, l, "value");
|
|
3013
3013
|
}
|
|
3014
3014
|
)), y && n.interpretNumericEntities && l === "iso-8859-1" && (y = Ml(String(y))), c.indexOf("[]=") > -1 && (y = on(y) ? [y] : y);
|
|
3015
3015
|
var h = Zt.call(r, g);
|
|
@@ -3056,7 +3056,7 @@ function() {
|
|
|
3056
3056
|
}
|
|
3057
3057
|
}, ql = function(e) {
|
|
3058
3058
|
if (!e)
|
|
3059
|
-
return
|
|
3059
|
+
return C;
|
|
3060
3060
|
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
|
|
3061
3061
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
3062
3062
|
if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
|
|
@@ -3067,32 +3067,32 @@ function() {
|
|
|
3067
3067
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
3068
3068
|
if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
|
|
3069
3069
|
throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
|
|
3070
|
-
var n = typeof e.charset > "u" ?
|
|
3070
|
+
var n = typeof e.charset > "u" ? C.charset : e.charset, r = typeof e.duplicates > "u" ? C.duplicates : e.duplicates;
|
|
3071
3071
|
if (r !== "combine" && r !== "first" && r !== "last")
|
|
3072
3072
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
3073
|
-
var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 :
|
|
3073
|
+
var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : C.allowDots : !!e.allowDots;
|
|
3074
3074
|
return {
|
|
3075
3075
|
allowDots: o,
|
|
3076
|
-
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays :
|
|
3077
|
-
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes :
|
|
3078
|
-
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse :
|
|
3079
|
-
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit :
|
|
3076
|
+
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : C.allowEmptyArrays,
|
|
3077
|
+
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : C.allowPrototypes,
|
|
3078
|
+
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : C.allowSparse,
|
|
3079
|
+
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : C.arrayLimit,
|
|
3080
3080
|
charset: n,
|
|
3081
|
-
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel :
|
|
3082
|
-
comma: typeof e.comma == "boolean" ? e.comma :
|
|
3083
|
-
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys :
|
|
3084
|
-
decoder: typeof e.decoder == "function" ? e.decoder :
|
|
3085
|
-
delimiter: typeof e.delimiter == "string" || de.isRegExp(e.delimiter) ? e.delimiter :
|
|
3081
|
+
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : C.charsetSentinel,
|
|
3082
|
+
comma: typeof e.comma == "boolean" ? e.comma : C.comma,
|
|
3083
|
+
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : C.decodeDotInKeys,
|
|
3084
|
+
decoder: typeof e.decoder == "function" ? e.decoder : C.decoder,
|
|
3085
|
+
delimiter: typeof e.delimiter == "string" || de.isRegExp(e.delimiter) ? e.delimiter : C.delimiter,
|
|
3086
3086
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3087
|
-
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth :
|
|
3087
|
+
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : C.depth,
|
|
3088
3088
|
duplicates: r,
|
|
3089
3089
|
ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
|
|
3090
|
-
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities :
|
|
3091
|
-
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit :
|
|
3090
|
+
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : C.interpretNumericEntities,
|
|
3091
|
+
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : C.parameterLimit,
|
|
3092
3092
|
parseArrays: e.parseArrays !== !1,
|
|
3093
|
-
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects :
|
|
3094
|
-
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth :
|
|
3095
|
-
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling :
|
|
3093
|
+
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : C.plainObjects,
|
|
3094
|
+
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : C.strictDepth,
|
|
3095
|
+
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : C.strictNullHandling,
|
|
3096
3096
|
throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
|
|
3097
3097
|
};
|
|
3098
3098
|
}, Hl = function(t, e) {
|
|
@@ -3196,48 +3196,34 @@ const Xl = {
|
|
|
3196
3196
|
uo(Xl);
|
|
3197
3197
|
rt.extend(wo);
|
|
3198
3198
|
rt.extend(bo);
|
|
3199
|
-
const ur = Ve(), no = ur.sso ?? !0
|
|
3199
|
+
const ur = Ve(), no = ur.sso ?? !0;
|
|
3200
|
+
ur.i18n;
|
|
3201
|
+
const oo = ur.noRedireLogin ?? !1, ao = () => {
|
|
3200
3202
|
if (oo) return;
|
|
3201
3203
|
const t = "/login";
|
|
3202
3204
|
location.pathname !== t && (sessionStorage.clear(), window.__isAutoCloseApp = !1, location.replace(t));
|
|
3203
|
-
}, Zl = async (t) => {
|
|
3204
|
-
var
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
if (i instanceof Blob && (i = await new Promise((g) => {
|
|
3216
|
-
const y = new FileReader();
|
|
3217
|
-
y.readAsText(i, "utf-8"), y.onload = () => {
|
|
3218
|
-
try {
|
|
3219
|
-
g(JSON.parse(y.result || "{}"));
|
|
3220
|
-
} catch {
|
|
3221
|
-
g({ code: 400, msg: C("blob解析错误") });
|
|
3222
|
-
}
|
|
3223
|
-
};
|
|
3224
|
-
})), i.code) {
|
|
3225
|
-
n = i.code;
|
|
3226
|
-
const g = (e == null ? void 0 : e.i18n) ?? !0;
|
|
3227
|
-
if (Yl && g) {
|
|
3228
|
-
const y = (i == null ? void 0 : i.status) ?? "";
|
|
3229
|
-
r = !(i != null && i.data) || !i.data.length ? C(y) : C(y, ...i.data);
|
|
3230
|
-
} else
|
|
3231
|
-
r = (i == null ? void 0 : i.msg) ?? "";
|
|
3232
|
-
o = i;
|
|
3205
|
+
}, Yl = "SUC0000", Zl = async (t) => {
|
|
3206
|
+
var i, s, u, l, c, p;
|
|
3207
|
+
let e = t.data || {};
|
|
3208
|
+
const n = e.returnCode;
|
|
3209
|
+
let r = e.errorMsg ?? "", o = {};
|
|
3210
|
+
return n !== Yl ? (!(mo("code") || "") && !oo && n === 401 ? (no ? ho({ ...vo, redirect_uri: go }) : ao(), o = e) : (e instanceof Blob && (e = await new Promise((g) => {
|
|
3211
|
+
const y = new FileReader();
|
|
3212
|
+
y.readAsText(e, "utf-8"), y.onload = () => {
|
|
3213
|
+
try {
|
|
3214
|
+
g(JSON.parse(y.result || "{}"));
|
|
3215
|
+
} catch {
|
|
3216
|
+
g({ code: 400, msg: D("blob解析错误") });
|
|
3233
3217
|
}
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3218
|
+
};
|
|
3219
|
+
})), 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 };
|
|
3220
|
+
}, ec = async (t, e) => {
|
|
3221
|
+
var o, a, i, s;
|
|
3222
|
+
let n = ((o = t == null ? void 0 : t.response) == null ? void 0 : o.data) || {}, r = (a = t.response) == null ? void 0 : a.message;
|
|
3223
|
+
if (!t.response)
|
|
3224
|
+
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 };
|
|
3239
3225
|
}, b = (t, e) => {
|
|
3240
|
-
const n =
|
|
3226
|
+
const n = N.create();
|
|
3241
3227
|
return po(n, async (r) => {
|
|
3242
3228
|
const o = Ve();
|
|
3243
3229
|
if (r.headers || (r.headers = {}), !(r != null && r.public)) {
|
|
@@ -3300,17 +3286,17 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3300
3286
|
const [E, O] = await lc().run();
|
|
3301
3287
|
return E ? { stauts: !1 } : { status: !0, data: O };
|
|
3302
3288
|
}, A = (E) => new Promise((O, $) => {
|
|
3303
|
-
const
|
|
3289
|
+
const _ = [];
|
|
3304
3290
|
let w = 0;
|
|
3305
3291
|
for (; w < E.size; ) {
|
|
3306
3292
|
const k = E.slice(w, w + 1048576);
|
|
3307
|
-
|
|
3293
|
+
_.push(k), w += 1048576;
|
|
3308
3294
|
}
|
|
3309
|
-
const H = new Blob(
|
|
3295
|
+
const H = new Blob(_, { type: E.type });
|
|
3310
3296
|
O(H);
|
|
3311
|
-
}), P = async (E, O, $, T = !0,
|
|
3297
|
+
}), P = async (E, O, $, T = !0, _ = "", w = !1) => {
|
|
3312
3298
|
var dr, yr;
|
|
3313
|
-
d =
|
|
3299
|
+
d = _, g.value = "import", T && (r.value = "normal", n.value = 0, e.value = D("导入进度"), t.value = !0, i.value = ""), y = O;
|
|
3314
3300
|
const H = await m();
|
|
3315
3301
|
if (!H.status) return;
|
|
3316
3302
|
let k = H.data, j = null, { autoContentType: G, bucketName: X, importFileName: Le } = $;
|
|
@@ -3342,7 +3328,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3342
3328
|
const Y = await dc(co.data);
|
|
3343
3329
|
if (!w && (Y == null ? void 0 : Y.statusCode) != 200 || w && (Y != null && Y.some((oe) => (oe == null ? void 0 : oe.statusCode) != 200))) {
|
|
3344
3330
|
t.value = !1, (dr = window.DasMessage) == null || dr.error({
|
|
3345
|
-
message: (Y == null ? void 0 : Y.errorMsg) ||
|
|
3331
|
+
message: (Y == null ? void 0 : Y.errorMsg) || D("上传失败"),
|
|
3346
3332
|
grouping: !0,
|
|
3347
3333
|
repeatNum: 1
|
|
3348
3334
|
});
|
|
@@ -3354,31 +3340,31 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3354
3340
|
t.value = !1, r.value = "error";
|
|
3355
3341
|
return;
|
|
3356
3342
|
}
|
|
3357
|
-
e.value =
|
|
3343
|
+
e.value = D("导入进度"), t.value = !0, x(yt.taskId, "import", "");
|
|
3358
3344
|
} else {
|
|
3359
3345
|
if (!yt.status) return;
|
|
3360
3346
|
r.value = "success", (yr = window.DasMessage) == null || yr.success({
|
|
3361
|
-
message:
|
|
3347
|
+
message: D("导入成功"),
|
|
3362
3348
|
grouping: !0,
|
|
3363
3349
|
repeatNum: 1
|
|
3364
3350
|
});
|
|
3365
3351
|
}
|
|
3366
3352
|
}, v = async (E, O = "", $ = "") => {
|
|
3367
|
-
r.value = "normal", n.value = 0, e.value = $ ||
|
|
3353
|
+
r.value = "normal", n.value = 0, e.value = $ || D("导出进度"), t.value = !0;
|
|
3368
3354
|
const T = await (E == null ? void 0 : E());
|
|
3369
3355
|
if (!T.status) {
|
|
3370
3356
|
t.value = !1, r.value = "error";
|
|
3371
3357
|
return;
|
|
3372
3358
|
}
|
|
3373
3359
|
x(T.taskId, "action", "");
|
|
3374
|
-
},
|
|
3375
|
-
g.value = "export", T && (r.value = "normal", n.value = 0, e.value =
|
|
3376
|
-
const
|
|
3377
|
-
if (!
|
|
3360
|
+
}, F = async (E, O = "", $ = "", T = !0) => {
|
|
3361
|
+
g.value = "export", T && (r.value = "normal", n.value = 0, e.value = D("导出进度"), t.value = !0);
|
|
3362
|
+
const _ = await (E == null ? void 0 : E());
|
|
3363
|
+
if (!_.status) {
|
|
3378
3364
|
t.value = !1, r.value = "error";
|
|
3379
3365
|
return;
|
|
3380
3366
|
}
|
|
3381
|
-
rt().format("YYYYMMDDHHmmss") + "", x(
|
|
3367
|
+
rt().format("YYYYMMDDHHmmss") + "", x(_.taskId, "export", O || "", $);
|
|
3382
3368
|
}, x = async (E, O, $, T = "") => {
|
|
3383
3369
|
o.value = !0, B(E, O, $, T), a = setTimeout(() => {
|
|
3384
3370
|
}, 50);
|
|
@@ -3386,10 +3372,10 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3386
3372
|
clearTimeout(a), a = null, t.value = !1;
|
|
3387
3373
|
}, B = async (E, O = "export", $, T = "") => {
|
|
3388
3374
|
var H, k, j;
|
|
3389
|
-
const [
|
|
3375
|
+
const [_, w] = await fc("", {
|
|
3390
3376
|
url: `progress/${E}`
|
|
3391
3377
|
}).run();
|
|
3392
|
-
if (
|
|
3378
|
+
if (_) {
|
|
3393
3379
|
o.value = !1;
|
|
3394
3380
|
return;
|
|
3395
3381
|
}
|
|
@@ -3401,7 +3387,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3401
3387
|
const X = ((H = G == null ? void 0 : G.split("/")) == null ? void 0 : H.pop()) || "";
|
|
3402
3388
|
let Le = $ || X;
|
|
3403
3389
|
an(`${Ve().baseURL}/oss${w.filePath}`, Le, T), o.value = !1;
|
|
3404
|
-
} else w.status == 2 && (l.value = w.message || (O == "export" ?
|
|
3390
|
+
} else w.status == 2 && (l.value = w.message || (O == "export" ? D("导出失败") : D("导入失败")), (k = window.DasMessage) == null || k.error({
|
|
3405
3391
|
message: l.value,
|
|
3406
3392
|
grouping: !0,
|
|
3407
3393
|
repeatNum: 1
|
|
@@ -3411,7 +3397,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3411
3397
|
r.value = "error", c.value = !0;
|
|
3412
3398
|
let G = await mr(`/oss/${w == null ? void 0 : w.filePath}`);
|
|
3413
3399
|
const X = ((j = G == null ? void 0 : G.split("/")) == null ? void 0 : j.pop()) || "";
|
|
3414
|
-
s.value = d || X, u.value = y.sizeText, l.value =
|
|
3400
|
+
s.value = d || X, u.value = y.sizeText, l.value = D("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${Ve().baseURL}/oss/${w == null ? void 0 : w.filePath}`;
|
|
3415
3401
|
}
|
|
3416
3402
|
W(w.status, O, w.message);
|
|
3417
3403
|
} else O == "action" && (r.value = "success");
|
|
@@ -3420,17 +3406,17 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3420
3406
|
B(E, O, $, T);
|
|
3421
3407
|
}, 50) : (i.value = w, o.value = !1, W(w.status, O, w.message), L(), c.value = !0, l.value = (w == null ? void 0 : w.message) || "");
|
|
3422
3408
|
}, W = (E, O = "export", $) => {
|
|
3423
|
-
var T,
|
|
3409
|
+
var T, _, w;
|
|
3424
3410
|
E == 1 ? (r.value = "success", (T = window.DasMessage) == null || T.success({
|
|
3425
|
-
message: O == "export" ?
|
|
3411
|
+
message: O == "export" ? D("导出成功") : D("导入成功"),
|
|
3426
3412
|
grouping: !0,
|
|
3427
3413
|
repeatNum: 1
|
|
3428
|
-
}), s.value = "", u.value = "", l.value = "") : E == 2 ? (r.value = "error", (
|
|
3429
|
-
message: $ || (O == "export" ?
|
|
3414
|
+
}), s.value = "", u.value = "", l.value = "") : E == 2 ? (r.value = "error", (_ = window.DasMessage) == null || _.error({
|
|
3415
|
+
message: $ || (O == "export" ? D("导出失败") : D("导入失败")),
|
|
3430
3416
|
grouping: !0,
|
|
3431
3417
|
repeatNum: 1
|
|
3432
|
-
}), l.value = $ ||
|
|
3433
|
-
message: O == "export" ?
|
|
3418
|
+
}), l.value = $ || D("部分数据校验不通过,请下载附件并修改,重新导入!")) : E == 3 && (r.value = "error", (w = window.DasMessage) == null || w.error({
|
|
3419
|
+
message: O == "export" ? D("部分导出失败") : D("部分导入失败"),
|
|
3434
3420
|
grouping: !0,
|
|
3435
3421
|
repeatNum: 1
|
|
3436
3422
|
}));
|
|
@@ -3448,7 +3434,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
|
|
|
3448
3434
|
errorImport: c,
|
|
3449
3435
|
errorFilePath: p,
|
|
3450
3436
|
fileImport: P,
|
|
3451
|
-
fileExport:
|
|
3437
|
+
fileExport: F,
|
|
3452
3438
|
fileAction: v,
|
|
3453
3439
|
generateUniqueName: (E) => {
|
|
3454
3440
|
const O = E == null ? void 0 : E.match(/(.*?)(\.[^.]*$|$)/), $ = O.length ? O[2] : "";
|
|
Binary file
|