@das-fed/utils 6.4.0-dev.53 → 6.4.0-dev.54
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 +39 -39
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +49 -49
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +49 -49
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +49 -49
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +49 -49
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +49 -49
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +49 -49
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +39 -39
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +49 -49
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +39 -39
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +49 -49
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +49 -49
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +49 -49
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +49 -49
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +49 -49
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +54 -54
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +49 -49
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +49 -49
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +49 -49
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +49 -49
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +49 -49
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +49 -49
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +49 -49
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +49 -49
- package/api-services/src/create-service/index.js.gz +0 -0
- package/create-api-service/index.js +49 -49
- package/create-api-service/index.js.gz +0 -0
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setI18nRule as bn, t as
|
|
1
|
+
import { setI18nRule as bn, t as V } from "@das-fed/web/packages/i18n/index";
|
|
2
2
|
import { curringHttp as wn } from "@das-fed/utils/curring-http";
|
|
3
3
|
import { getToken as Sn, getQuery as En, login as An, getTokenParams as On, real_uri as Rn } from "@das-fed/utils/create-api-service/sso";
|
|
4
4
|
import Ot from "dayjs";
|
|
@@ -57,7 +57,7 @@ function Pr(t, e) {
|
|
|
57
57
|
return o;
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
|
-
const
|
|
60
|
+
const X = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Tr = (t) => !we(t) && t !== X;
|
|
61
61
|
function ct() {
|
|
62
62
|
const { caseless: t } = Tr(this) && this || {}, e = {}, n = (r, o) => {
|
|
63
63
|
const a = t && Pr(e, o) || o;
|
|
@@ -174,14 +174,14 @@ const po = (t) => {
|
|
|
174
174
|
return r;
|
|
175
175
|
};
|
|
176
176
|
return n(t, 0);
|
|
177
|
-
}, yo = B("AsyncFunction"), ho = (t) => t && (je(t) || _(t)) && _(t.then) && _(t.catch), Cr = ((t, e) => t ? setImmediate : e ? ((n, r) => (
|
|
178
|
-
o ===
|
|
177
|
+
}, yo = B("AsyncFunction"), ho = (t) => t && (je(t) || _(t)) && _(t.then) && _(t.catch), Cr = ((t, e) => t ? setImmediate : e ? ((n, r) => (X.addEventListener("message", ({ source: o, data: a }) => {
|
|
178
|
+
o === X && a === n && r.length && r.shift()();
|
|
179
179
|
}, !1), (o) => {
|
|
180
|
-
r.push(o),
|
|
180
|
+
r.push(o), X.postMessage(n, "*");
|
|
181
181
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
182
182
|
typeof setImmediate == "function",
|
|
183
|
-
_(
|
|
184
|
-
), mo = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
183
|
+
_(X.postMessage)
|
|
184
|
+
), mo = typeof queueMicrotask < "u" ? queueMicrotask.bind(X) : typeof process < "u" && process.nextTick || Cr, f = {
|
|
185
185
|
isArray: ue,
|
|
186
186
|
isArrayBuffer: Or,
|
|
187
187
|
isBuffer: Dn,
|
|
@@ -230,7 +230,7 @@ const po = (t) => {
|
|
|
230
230
|
noop: lo,
|
|
231
231
|
toFiniteNumber: co,
|
|
232
232
|
findKey: Pr,
|
|
233
|
-
global:
|
|
233
|
+
global: X,
|
|
234
234
|
isContextDefined: Tr,
|
|
235
235
|
ALPHABET: Fr,
|
|
236
236
|
generateString: uo,
|
|
@@ -949,7 +949,7 @@ function Mr(t, e) {
|
|
|
949
949
|
return t && !Ho(e) ? Wo(t, e) : e;
|
|
950
950
|
}
|
|
951
951
|
const Gt = (t) => t instanceof I ? { ...t } : t;
|
|
952
|
-
function
|
|
952
|
+
function te(t, e) {
|
|
953
953
|
e = e || {};
|
|
954
954
|
const n = {};
|
|
955
955
|
function r(l, c, p) {
|
|
@@ -1014,7 +1014,7 @@ function ee(t, e) {
|
|
|
1014
1014
|
}), n;
|
|
1015
1015
|
}
|
|
1016
1016
|
const qr = (t) => {
|
|
1017
|
-
const e =
|
|
1017
|
+
const e = te({}, t);
|
|
1018
1018
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: i, auth: s } = e;
|
|
1019
1019
|
e.headers = i = I.from(i), e.url = $r(Mr(e.baseURL, e.url), t.params, t.paramsSerializer), s && i.set(
|
|
1020
1020
|
"Authorization",
|
|
@@ -1407,7 +1407,7 @@ const yt = {
|
|
|
1407
1407
|
assertOptions: oa,
|
|
1408
1408
|
validators: xt
|
|
1409
1409
|
}, W = yt.validators;
|
|
1410
|
-
class
|
|
1410
|
+
class Z {
|
|
1411
1411
|
constructor(e) {
|
|
1412
1412
|
this.defaults = e, this.interceptors = {
|
|
1413
1413
|
request: new jt(),
|
|
@@ -1440,7 +1440,7 @@ class X {
|
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
_request(e, n) {
|
|
1443
|
-
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n =
|
|
1443
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = te(this.defaults, n);
|
|
1444
1444
|
const { transitional: r, paramsSerializer: o, headers: a } = n;
|
|
1445
1445
|
r !== void 0 && yt.assertOptions(r, {
|
|
1446
1446
|
silentJSONParsing: W.transitional(W.boolean),
|
|
@@ -1499,14 +1499,14 @@ class X {
|
|
|
1499
1499
|
return c;
|
|
1500
1500
|
}
|
|
1501
1501
|
getUri(e) {
|
|
1502
|
-
e =
|
|
1502
|
+
e = te(this.defaults, e);
|
|
1503
1503
|
const n = Mr(e.baseURL, e.url);
|
|
1504
1504
|
return $r(n, e.params, e.paramsSerializer);
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
1508
|
-
|
|
1509
|
-
return this.request(
|
|
1508
|
+
Z.prototype[e] = function(n, r) {
|
|
1509
|
+
return this.request(te(r || {}, {
|
|
1510
1510
|
method: e,
|
|
1511
1511
|
url: n,
|
|
1512
1512
|
data: (r || {}).data
|
|
@@ -1516,7 +1516,7 @@ f.forEach(["delete", "get", "head", "options"], function(e) {
|
|
|
1516
1516
|
f.forEach(["post", "put", "patch"], function(e) {
|
|
1517
1517
|
function n(r) {
|
|
1518
1518
|
return function(a, i, s) {
|
|
1519
|
-
return this.request(
|
|
1519
|
+
return this.request(te(s || {}, {
|
|
1520
1520
|
method: e,
|
|
1521
1521
|
headers: r ? {
|
|
1522
1522
|
"Content-Type": "multipart/form-data"
|
|
@@ -1526,7 +1526,7 @@ f.forEach(["post", "put", "patch"], function(e) {
|
|
|
1526
1526
|
}));
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
|
-
|
|
1529
|
+
Z.prototype[e] = n(), Z.prototype[e + "Form"] = n(!0);
|
|
1530
1530
|
});
|
|
1531
1531
|
class Ft {
|
|
1532
1532
|
constructor(e) {
|
|
@@ -1678,13 +1678,13 @@ Object.entries(ht).forEach(([t, e]) => {
|
|
|
1678
1678
|
ht[e] = t;
|
|
1679
1679
|
});
|
|
1680
1680
|
function Gr(t) {
|
|
1681
|
-
const e = new
|
|
1682
|
-
return f.extend(n,
|
|
1683
|
-
return Gr(
|
|
1681
|
+
const e = new Z(t), n = Ar(Z.prototype.request, e);
|
|
1682
|
+
return f.extend(n, Z.prototype, e, { allOwnKeys: !0 }), f.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1683
|
+
return Gr(te(t, o));
|
|
1684
1684
|
}, n;
|
|
1685
1685
|
}
|
|
1686
1686
|
const R = Gr(Ee);
|
|
1687
|
-
R.Axios =
|
|
1687
|
+
R.Axios = Z;
|
|
1688
1688
|
R.CanceledError = fe;
|
|
1689
1689
|
R.CancelToken = Ft;
|
|
1690
1690
|
R.isCancel = Lr;
|
|
@@ -1697,7 +1697,7 @@ R.all = function(e) {
|
|
|
1697
1697
|
};
|
|
1698
1698
|
R.spread = aa;
|
|
1699
1699
|
R.isAxiosError = ia;
|
|
1700
|
-
R.mergeConfig =
|
|
1700
|
+
R.mergeConfig = te;
|
|
1701
1701
|
R.AxiosHeaders = I;
|
|
1702
1702
|
R.formToJSON = (t) => Ur(f.isHTMLForm(t) ? new FormData(t) : t);
|
|
1703
1703
|
R.getAdapter = Hr.getAdapter;
|
|
@@ -1799,28 +1799,28 @@ var ca = Error, ua = EvalError, fa = RangeError, pa = ReferenceError, Jr = Synta
|
|
|
1799
1799
|
return Kr('"use strict"; return (' + t + ").constructor;")();
|
|
1800
1800
|
} catch {
|
|
1801
1801
|
}
|
|
1802
|
-
},
|
|
1803
|
-
if (
|
|
1802
|
+
}, Y = Object.getOwnPropertyDescriptor;
|
|
1803
|
+
if (Y)
|
|
1804
1804
|
try {
|
|
1805
|
-
|
|
1805
|
+
Y({}, "");
|
|
1806
1806
|
} catch {
|
|
1807
|
-
|
|
1807
|
+
Y = null;
|
|
1808
1808
|
}
|
|
1809
1809
|
var Ye = function() {
|
|
1810
1810
|
throw new ie();
|
|
1811
|
-
}, Ba =
|
|
1811
|
+
}, Ba = Y ? function() {
|
|
1812
1812
|
try {
|
|
1813
1813
|
return arguments.callee, Ye;
|
|
1814
1814
|
} catch {
|
|
1815
1815
|
try {
|
|
1816
|
-
return
|
|
1816
|
+
return Y(arguments, "callee").get;
|
|
1817
1817
|
} catch {
|
|
1818
1818
|
return Ye;
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
1821
|
}() : Ye, ne = ma(), Ua = va(), x = Object.getPrototypeOf || (Ua ? function(t) {
|
|
1822
1822
|
return t.__proto__;
|
|
1823
|
-
} : null), ae = {}, La = typeof Uint8Array > "u" || !x ? w : x(Uint8Array),
|
|
1823
|
+
} : null), ae = {}, La = typeof Uint8Array > "u" || !x ? w : x(Uint8Array), ee = {
|
|
1824
1824
|
__proto__: null,
|
|
1825
1825
|
"%AggregateError%": typeof AggregateError > "u" ? w : AggregateError,
|
|
1826
1826
|
"%Array%": Array,
|
|
@@ -1895,7 +1895,7 @@ if (x)
|
|
|
1895
1895
|
null.error;
|
|
1896
1896
|
} catch (t) {
|
|
1897
1897
|
var ka = x(x(t));
|
|
1898
|
-
|
|
1898
|
+
ee["%Error.prototype%"] = ka;
|
|
1899
1899
|
}
|
|
1900
1900
|
var Ma = function t(e) {
|
|
1901
1901
|
var n;
|
|
@@ -1912,7 +1912,7 @@ var Ma = function t(e) {
|
|
|
1912
1912
|
var o = t("%AsyncGenerator%");
|
|
1913
1913
|
o && x && (n = x(o.prototype));
|
|
1914
1914
|
}
|
|
1915
|
-
return
|
|
1915
|
+
return ee[e] = n, n;
|
|
1916
1916
|
}, tr = {
|
|
1917
1917
|
__proto__: null,
|
|
1918
1918
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
@@ -1978,8 +1978,8 @@ var Ma = function t(e) {
|
|
|
1978
1978
|
}), o;
|
|
1979
1979
|
}, Ja = function(e, n) {
|
|
1980
1980
|
var r = e, o;
|
|
1981
|
-
if (Be(tr, r) && (o = tr[r], r = "%" + o[0] + "%"), Be(
|
|
1982
|
-
var a =
|
|
1981
|
+
if (Be(tr, r) && (o = tr[r], r = "%" + o[0] + "%"), Be(ee, r)) {
|
|
1982
|
+
var a = ee[r];
|
|
1983
1983
|
if (a === ae && (a = Ma(r)), typeof a > "u" && !n)
|
|
1984
1984
|
throw new ie("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
1985
1985
|
return {
|
|
@@ -2002,20 +2002,20 @@ var Ma = function t(e) {
|
|
|
2002
2002
|
var d = r[c], v = Ue(d, 0, 1), y = Ue(d, -1);
|
|
2003
2003
|
if ((v === '"' || v === "'" || v === "`" || y === '"' || y === "'" || y === "`") && v !== y)
|
|
2004
2004
|
throw new se("property names with quotes must have matching quotes");
|
|
2005
|
-
if ((d === "constructor" || !p) && (u = !0), o += "." + d, i = "%" + o + "%", Be(
|
|
2006
|
-
s =
|
|
2005
|
+
if ((d === "constructor" || !p) && (u = !0), o += "." + d, i = "%" + o + "%", Be(ee, i))
|
|
2006
|
+
s = ee[i];
|
|
2007
2007
|
else if (s != null) {
|
|
2008
2008
|
if (!(d in s)) {
|
|
2009
2009
|
if (!n)
|
|
2010
2010
|
throw new ie("base intrinsic for " + e + " exists, but the property is not available.");
|
|
2011
2011
|
return;
|
|
2012
2012
|
}
|
|
2013
|
-
if (
|
|
2014
|
-
var m =
|
|
2013
|
+
if (Y && c + 1 >= r.length) {
|
|
2014
|
+
var m = Y(s, d);
|
|
2015
2015
|
p = !!m, p && "get" in m && !("originalValue" in m.get) ? s = m.get : s = s[d];
|
|
2016
2016
|
} else
|
|
2017
2017
|
p = Be(s, d), s = s[d];
|
|
2018
|
-
p && !u && (
|
|
2018
|
+
p && !u && (ee[i] = s);
|
|
2019
2019
|
}
|
|
2020
2020
|
}
|
|
2021
2021
|
return s;
|
|
@@ -2250,8 +2250,8 @@ var bt = si, gr = bt.custom, vr = nn(gr) ? gr : null, gi = function t(e, n, r, o
|
|
|
2250
2250
|
if (typeof globalThis < "u" && e === globalThis || typeof Zt < "u" && e === Zt)
|
|
2251
2251
|
return "{ [object globalThis] }";
|
|
2252
2252
|
if (!bi(e) && !br(e)) {
|
|
2253
|
-
var N = Pe(e, d), q = hr ? hr(e) === Object.prototype : e instanceof Object || e.constructor === Object, U = e instanceof Object ? "" : "null prototype", j = !q && F && Object(e) === e && F in e ? _t.call(K(e), 8, -1) : U ? "Object" : "", Re = q || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "",
|
|
2254
|
-
return N.length === 0 ?
|
|
2253
|
+
var N = Pe(e, d), q = hr ? hr(e) === Object.prototype : e instanceof Object || e.constructor === Object, U = e instanceof Object ? "" : "null prototype", j = !q && F && Object(e) === e && F in e ? _t.call(K(e), 8, -1) : U ? "Object" : "", Re = q || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", re = Re + (j || U ? "[" + M.call(dr.call([], j || [], U || []), ": ") + "] " : "");
|
|
2254
|
+
return N.length === 0 ? re + "{}" : p ? re + "{" + St(N, p) + "}" : re + "{ " + M.call(N, ", ") + " }";
|
|
2255
2255
|
}
|
|
2256
2256
|
return String(e);
|
|
2257
2257
|
};
|
|
@@ -2542,14 +2542,14 @@ var sn = pe, de = oi, Bi = gi, Ui = Ae, Te = sn("%WeakMap%", !0), xe = sn("%Map%
|
|
|
2542
2542
|
},
|
|
2543
2543
|
RFC1738: at.RFC1738,
|
|
2544
2544
|
RFC3986: at.RFC3986
|
|
2545
|
-
}, Qi = Bt, it = Object.prototype.hasOwnProperty,
|
|
2545
|
+
}, Qi = Bt, it = Object.prototype.hasOwnProperty, Q = Array.isArray, L = function() {
|
|
2546
2546
|
for (var t = [], e = 0; e < 256; ++e)
|
|
2547
2547
|
t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
|
|
2548
2548
|
return t;
|
|
2549
2549
|
}(), Xi = function(e) {
|
|
2550
2550
|
for (; e.length > 1; ) {
|
|
2551
2551
|
var n = e.pop(), r = n.obj[n.prop];
|
|
2552
|
-
if (
|
|
2552
|
+
if (Q(r)) {
|
|
2553
2553
|
for (var o = [], a = 0; a < r.length; ++a)
|
|
2554
2554
|
typeof r[a] < "u" && o.push(r[a]);
|
|
2555
2555
|
n.obj[n.prop] = o;
|
|
@@ -2563,7 +2563,7 @@ var sn = pe, de = oi, Bi = gi, Ui = Ae, Te = sn("%WeakMap%", !0), xe = sn("%Map%
|
|
|
2563
2563
|
if (!n)
|
|
2564
2564
|
return e;
|
|
2565
2565
|
if (typeof n != "object") {
|
|
2566
|
-
if (
|
|
2566
|
+
if (Q(e))
|
|
2567
2567
|
e.push(n);
|
|
2568
2568
|
else if (e && typeof e == "object")
|
|
2569
2569
|
(r && (r.plainObjects || r.allowPrototypes) || !it.call(Object.prototype, n)) && (e[n] = !0);
|
|
@@ -2574,7 +2574,7 @@ var sn = pe, de = oi, Bi = gi, Ui = Ae, Te = sn("%WeakMap%", !0), xe = sn("%Map%
|
|
|
2574
2574
|
if (!e || typeof e != "object")
|
|
2575
2575
|
return [e].concat(n);
|
|
2576
2576
|
var o = e;
|
|
2577
|
-
return
|
|
2577
|
+
return Q(e) && !Q(n) && (o = ln(e, r)), Q(e) && Q(n) ? (n.forEach(function(a, i) {
|
|
2578
2578
|
if (it.call(e, i)) {
|
|
2579
2579
|
var s = e[i];
|
|
2580
2580
|
s && typeof s == "object" && a && typeof a == "object" ? e[i] = t(s, a, r) : e.push(a);
|
|
@@ -2643,7 +2643,7 @@ var sn = pe, de = oi, Bi = gi, Ui = Ae, Te = sn("%WeakMap%", !0), xe = sn("%Map%
|
|
|
2643
2643
|
}, as = function(e, n) {
|
|
2644
2644
|
return [].concat(e, n);
|
|
2645
2645
|
}, is = function(e, n) {
|
|
2646
|
-
if (
|
|
2646
|
+
if (Q(e)) {
|
|
2647
2647
|
for (var r = [], o = 0; o < e.length; o += 1)
|
|
2648
2648
|
r.push(n(e[o]));
|
|
2649
2649
|
return r;
|
|
@@ -2732,7 +2732,7 @@ var sn = pe, de = oi, Bi = gi, Ui = Ae, Te = sn("%WeakMap%", !0), xe = sn("%Map%
|
|
|
2732
2732
|
var Re = Object.keys(g);
|
|
2733
2733
|
j = p ? Re.sort(p) : Re;
|
|
2734
2734
|
}
|
|
2735
|
-
var
|
|
2735
|
+
var re = u ? n.replace(/\./g, "%2E") : n, $ = o && k(g) && g.length === 1 ? re + "[]" : re;
|
|
2736
2736
|
if (a && k(g) && g.length === 0)
|
|
2737
2737
|
return $ + "[]";
|
|
2738
2738
|
for (var z = 0; z < j.length; ++z) {
|
|
@@ -3068,7 +3068,7 @@ const yn = Er(), hn = yn.sso ?? !0, mn = yn.noRedireLogin ?? !1, gn = () => {
|
|
|
3068
3068
|
}, Ds = async (t, e) => {
|
|
3069
3069
|
var u, l, c, p, d;
|
|
3070
3070
|
let n = ((u = t.response) == null ? void 0 : u.status) || 500, r = (l = t.response) == null ? void 0 : l.message, o = {};
|
|
3071
|
-
const a = { 400:
|
|
3071
|
+
const a = { 400: V("参数校验错误"), 404: V("接口地址未找到"), 500: V("服务器内部错误") };
|
|
3072
3072
|
let i = ((c = t == null ? void 0 : t.response) == null ? void 0 : c.data) || {};
|
|
3073
3073
|
return !(En("code") || "") && !mn && (n === 401 || (i == null ? void 0 : i.code) === 401) ? (hn ? An({ ...On, redirect_uri: Rn }) : gn(), o = i) : (t.response ? (i instanceof Blob && (i = await new Promise((v) => {
|
|
3074
3074
|
const y = new FileReader();
|
|
@@ -3076,10 +3076,10 @@ const yn = Er(), hn = yn.sso ?? !0, mn = yn.noRedireLogin ?? !1, gn = () => {
|
|
|
3076
3076
|
try {
|
|
3077
3077
|
v(JSON.parse(y.result || "{}"));
|
|
3078
3078
|
} catch {
|
|
3079
|
-
v({ code: 400, msg:
|
|
3079
|
+
v({ code: 400, msg: V("blob解析错误") });
|
|
3080
3080
|
}
|
|
3081
3081
|
};
|
|
3082
|
-
})), i.code && (n = i.code, r = i.
|
|
3082
|
+
})), i.code && (n = i.code, r = V(i.status, ...i.data), o = i), r || (r = a[t.response.status] || t.message)) : t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = V("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = V("请求配置异常"), e != null && e.customErrorMessage && (r = e == null ? void 0 : e.customErrorMessage(r, t)), !(e != null && e.ignoreErrorMessage) && r && ((d = (p = window.DasMessage) == null ? void 0 : p.error) == null || d.call(p, { message: r, showClose: !0 }))), { ...o, code: n, msg: r, error: t };
|
|
3083
3083
|
}, Is = (t, e) => {
|
|
3084
3084
|
const n = R.create();
|
|
3085
3085
|
return wn(n, async (r) => {
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { setI18nRule as _n, t as
|
|
1
|
+
import { setI18nRule as _n, t as C } from "@das-fed/web/packages/i18n/index";
|
|
2
2
|
import { curringHttp as Bn } from "@das-fed/utils/curring-http";
|
|
3
3
|
import { getToken as Ln, getQuery as Un, login as kn, getTokenParams as Mn, real_uri as jn } from "@das-fed/utils/create-api-service/sso";
|
|
4
4
|
import Xe from "dayjs";
|
|
@@ -2844,7 +2844,7 @@ var Sn = Ee, Ae = Si, Zi = Ii, es = De, Le = Sn("%WeakMap%", !0), Ue = Sn("%Map%
|
|
|
2844
2844
|
}
|
|
2845
2845
|
var d = i.join(r.delimiter), g = r.addQueryPrefix === !0 ? "?" : "";
|
|
2846
2846
|
return r.charsetSentinel && (r.charset === "iso-8859-1" ? g += "utf8=%26%2310003%3B&" : g += "utf8=%E2%9C%93&"), d.length > 0 ? g + d : "";
|
|
2847
|
-
}, be = An, It = Object.prototype.hasOwnProperty, Fs = Array.isArray,
|
|
2847
|
+
}, be = An, It = Object.prototype.hasOwnProperty, Fs = Array.isArray, N = {
|
|
2848
2848
|
allowDots: !1,
|
|
2849
2849
|
allowEmptyArrays: !1,
|
|
2850
2850
|
allowPrototypes: !1,
|
|
@@ -2881,10 +2881,10 @@ var Sn = Ee, Ae = Si, Zi = Ii, es = De, Le = Sn("%WeakMap%", !0), Ue = Sn("%Map%
|
|
|
2881
2881
|
for (u = 0; u < i.length; ++u)
|
|
2882
2882
|
if (u !== s) {
|
|
2883
2883
|
var c = i[u], p = c.indexOf("]="), d = p === -1 ? c.indexOf("=") : p + 1, g, y;
|
|
2884
|
-
d === -1 ? (g = n.decoder(c,
|
|
2884
|
+
d === -1 ? (g = n.decoder(c, N.decoder, l, "key"), y = n.strictNullHandling ? null : "") : (g = n.decoder(c.slice(0, d), N.decoder, l, "key"), y = be.maybeMap(
|
|
2885
2885
|
Tn(c.slice(d + 1), n),
|
|
2886
2886
|
function(h) {
|
|
2887
|
-
return n.decoder(h,
|
|
2887
|
+
return n.decoder(h, N.decoder, l, "value");
|
|
2888
2888
|
}
|
|
2889
2889
|
)), y && n.interpretNumericEntities && l === "iso-8859-1" && (y = Ds(y)), c.indexOf("[]=") > -1 && (y = Fs(y) ? [y] : y);
|
|
2890
2890
|
var m = It.call(r, g);
|
|
@@ -2926,7 +2926,7 @@ var Sn = Ee, Ae = Si, Zi = Ii, es = De, Le = Sn("%WeakMap%", !0), Ue = Sn("%Map%
|
|
|
2926
2926
|
}
|
|
2927
2927
|
}, Us = function(e) {
|
|
2928
2928
|
if (!e)
|
|
2929
|
-
return
|
|
2929
|
+
return N;
|
|
2930
2930
|
if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
|
|
2931
2931
|
throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
|
|
2932
2932
|
if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
|
|
@@ -2935,32 +2935,32 @@ var Sn = Ee, Ae = Si, Zi = Ii, es = De, Le = Sn("%WeakMap%", !0), Ue = Sn("%Map%
|
|
|
2935
2935
|
throw new TypeError("Decoder has to be a function.");
|
|
2936
2936
|
if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
|
|
2937
2937
|
throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
|
|
2938
|
-
var n = typeof e.charset > "u" ?
|
|
2938
|
+
var n = typeof e.charset > "u" ? N.charset : e.charset, r = typeof e.duplicates > "u" ? N.duplicates : e.duplicates;
|
|
2939
2939
|
if (r !== "combine" && r !== "first" && r !== "last")
|
|
2940
2940
|
throw new TypeError("The duplicates option must be either combine, first, or last");
|
|
2941
|
-
var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 :
|
|
2941
|
+
var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : N.allowDots : !!e.allowDots;
|
|
2942
2942
|
return {
|
|
2943
2943
|
allowDots: o,
|
|
2944
|
-
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays :
|
|
2945
|
-
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes :
|
|
2946
|
-
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse :
|
|
2947
|
-
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit :
|
|
2944
|
+
allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : N.allowEmptyArrays,
|
|
2945
|
+
allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : N.allowPrototypes,
|
|
2946
|
+
allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : N.allowSparse,
|
|
2947
|
+
arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : N.arrayLimit,
|
|
2948
2948
|
charset: n,
|
|
2949
|
-
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel :
|
|
2950
|
-
comma: typeof e.comma == "boolean" ? e.comma :
|
|
2951
|
-
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys :
|
|
2952
|
-
decoder: typeof e.decoder == "function" ? e.decoder :
|
|
2953
|
-
delimiter: typeof e.delimiter == "string" || be.isRegExp(e.delimiter) ? e.delimiter :
|
|
2949
|
+
charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : N.charsetSentinel,
|
|
2950
|
+
comma: typeof e.comma == "boolean" ? e.comma : N.comma,
|
|
2951
|
+
decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : N.decodeDotInKeys,
|
|
2952
|
+
decoder: typeof e.decoder == "function" ? e.decoder : N.decoder,
|
|
2953
|
+
delimiter: typeof e.delimiter == "string" || be.isRegExp(e.delimiter) ? e.delimiter : N.delimiter,
|
|
2954
2954
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
2955
|
-
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth :
|
|
2955
|
+
depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : N.depth,
|
|
2956
2956
|
duplicates: r,
|
|
2957
2957
|
ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
|
|
2958
|
-
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities :
|
|
2959
|
-
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit :
|
|
2958
|
+
interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : N.interpretNumericEntities,
|
|
2959
|
+
parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : N.parameterLimit,
|
|
2960
2960
|
parseArrays: e.parseArrays !== !1,
|
|
2961
|
-
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects :
|
|
2962
|
-
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth :
|
|
2963
|
-
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling :
|
|
2961
|
+
plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : N.plainObjects,
|
|
2962
|
+
strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : N.strictDepth,
|
|
2963
|
+
strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : N.strictNullHandling
|
|
2964
2964
|
};
|
|
2965
2965
|
}, ks = function(t, e) {
|
|
2966
2966
|
var n = Us(e);
|
|
@@ -3070,7 +3070,7 @@ const xn = He(), Cn = xn.sso ?? !0, Nn = xn.noRedireLogin ?? !1, Fn = () => {
|
|
|
3070
3070
|
}, Vs = async (t, e) => {
|
|
3071
3071
|
var u, l, c, p, d;
|
|
3072
3072
|
let n = ((u = t.response) == null ? void 0 : u.status) || 500, r = (l = t.response) == null ? void 0 : l.message, o = {};
|
|
3073
|
-
const a = { 400:
|
|
3073
|
+
const a = { 400: C("参数校验错误"), 404: C("接口地址未找到"), 500: C("服务器内部错误") };
|
|
3074
3074
|
let i = ((c = t == null ? void 0 : t.response) == null ? void 0 : c.data) || {};
|
|
3075
3075
|
return !(Un("code") || "") && !Nn && (n === 401 || (i == null ? void 0 : i.code) === 401) ? (Cn ? kn({ ...Mn, redirect_uri: jn }) : Fn(), o = i) : (t.response ? (i instanceof Blob && (i = await new Promise((g) => {
|
|
3076
3076
|
const y = new FileReader();
|
|
@@ -3078,10 +3078,10 @@ const xn = He(), Cn = xn.sso ?? !0, Nn = xn.noRedireLogin ?? !1, Fn = () => {
|
|
|
3078
3078
|
try {
|
|
3079
3079
|
g(JSON.parse(y.result || "{}"));
|
|
3080
3080
|
} catch {
|
|
3081
|
-
g({ code: 400, msg:
|
|
3081
|
+
g({ code: 400, msg: C("blob解析错误") });
|
|
3082
3082
|
}
|
|
3083
3083
|
};
|
|
3084
|
-
})), i.code && (n = i.code, r = i.
|
|
3084
|
+
})), i.code && (n = i.code, r = C(i.status, ...i.data), o = i), r || (r = a[t.response.status] || t.message)) : t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("请求配置异常"), e != null && e.customErrorMessage && (r = e == null ? void 0 : e.customErrorMessage(r, t)), !(e != null && e.ignoreErrorMessage) && r && ((d = (p = window.DasMessage) == null ? void 0 : p.error) == null || d.call(p, { message: r, showClose: !0 }))), { ...o, code: n, msg: r, error: t };
|
|
3085
3085
|
}, Y = (t, e) => {
|
|
3086
3086
|
const n = $.create();
|
|
3087
3087
|
return Bn(n, async (r) => {
|
|
@@ -3138,7 +3138,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3138
3138
|
A(k);
|
|
3139
3139
|
}), R = async (S, A, x, P = !0, F = "", b = !1) => {
|
|
3140
3140
|
var Qt, Xt;
|
|
3141
|
-
d = F, g.value = "import", P && (r.value = "normal", n.value = 0, e.value =
|
|
3141
|
+
d = F, g.value = "import", P && (r.value = "normal", n.value = 0, e.value = C("导入进度"), t.value = !0, i.value = ""), y = A;
|
|
3142
3142
|
const k = await h();
|
|
3143
3143
|
if (!k.status) return;
|
|
3144
3144
|
let M = k.data, j = null, { autoContentType: ee, bucketName: te, importFileName: Vt } = x;
|
|
@@ -3170,7 +3170,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3170
3170
|
const ie = await nl(In.data);
|
|
3171
3171
|
if ((ie == null ? void 0 : ie.statusCode) != 200) {
|
|
3172
3172
|
t.value = !1, (Qt = window.DasMessage) == null || Qt.error({
|
|
3173
|
-
message: (ie == null ? void 0 : ie.errorMsg) ||
|
|
3173
|
+
message: (ie == null ? void 0 : ie.errorMsg) || C("上传失败"),
|
|
3174
3174
|
grouping: !0,
|
|
3175
3175
|
repeatNum: 1
|
|
3176
3176
|
});
|
|
@@ -3182,17 +3182,17 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3182
3182
|
t.value = !1, r.value = "error";
|
|
3183
3183
|
return;
|
|
3184
3184
|
}
|
|
3185
|
-
e.value =
|
|
3185
|
+
e.value = C("导入进度"), t.value = !0, T(nt.taskId, "import", "");
|
|
3186
3186
|
} else {
|
|
3187
3187
|
if (!nt.status) return;
|
|
3188
3188
|
r.value = "success", (Xt = window.DasMessage) == null || Xt.success({
|
|
3189
|
-
message:
|
|
3189
|
+
message: C("导入成功"),
|
|
3190
3190
|
grouping: !0,
|
|
3191
3191
|
repeatNum: 1
|
|
3192
3192
|
});
|
|
3193
3193
|
}
|
|
3194
3194
|
}, v = async (S, A = "", x = "") => {
|
|
3195
|
-
r.value = "normal", n.value = 0, e.value = x ||
|
|
3195
|
+
r.value = "normal", n.value = 0, e.value = x || C("导出进度"), t.value = !0;
|
|
3196
3196
|
const P = await (S == null ? void 0 : S());
|
|
3197
3197
|
if (!P.status) {
|
|
3198
3198
|
t.value = !1, r.value = "error";
|
|
@@ -3200,7 +3200,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3200
3200
|
}
|
|
3201
3201
|
T(P.taskId, "action", "");
|
|
3202
3202
|
}, D = async (S, A = "", x = "", P = !0) => {
|
|
3203
|
-
g.value = "export", P && (r.value = "normal", n.value = 0, e.value =
|
|
3203
|
+
g.value = "export", P && (r.value = "normal", n.value = 0, e.value = C("导出进度"), t.value = !0);
|
|
3204
3204
|
const F = await (S == null ? void 0 : S());
|
|
3205
3205
|
if (!F.status) {
|
|
3206
3206
|
t.value = !1, r.value = "error";
|
|
@@ -3222,11 +3222,11 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3222
3222
|
return;
|
|
3223
3223
|
}
|
|
3224
3224
|
n.value = b.percentage;
|
|
3225
|
-
const k = A == "export" ?
|
|
3225
|
+
const k = A == "export" ? C("导出") : C("导入");
|
|
3226
3226
|
if (n.value == 100)
|
|
3227
3227
|
if (i.value = b, o.value = !1, B(), A == "export")
|
|
3228
|
-
b.status == 1 ? (r.value = "success", Br(`${He().baseURL}/oss${b.filePath}`, x, P), o.value = !1) : b.status == 2 && (l.value = b.message || `${k}${
|
|
3229
|
-
message: b.message || `${k}${
|
|
3228
|
+
b.status == 1 ? (r.value = "success", Br(`${He().baseURL}/oss${b.filePath}`, x, P), o.value = !1) : b.status == 2 && (l.value = b.message || `${k}${C("失败")}`, (M = window.DasMessage) == null || M.error({
|
|
3229
|
+
message: b.message || `${k}${C("失败")}`,
|
|
3230
3230
|
grouping: !0,
|
|
3231
3231
|
repeatNum: 1
|
|
3232
3232
|
}));
|
|
@@ -3235,7 +3235,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3235
3235
|
r.value = "error", c.value = !0;
|
|
3236
3236
|
let ee = await Gn(`/oss/${b == null ? void 0 : b.filePath}`);
|
|
3237
3237
|
const te = ((j = ee == null ? void 0 : ee.split("/")) == null ? void 0 : j.pop()) || "";
|
|
3238
|
-
s.value = d || te, u.value = y.sizeText, l.value =
|
|
3238
|
+
s.value = d || te, u.value = y.sizeText, l.value = C("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${He().baseURL}/oss/${b == null ? void 0 : b.filePath}`;
|
|
3239
3239
|
}
|
|
3240
3240
|
W(b.status, k, b.message);
|
|
3241
3241
|
} else A == "action" && (r.value = "success");
|
|
@@ -3246,15 +3246,15 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
|
|
|
3246
3246
|
}, W = (S, A, x) => {
|
|
3247
3247
|
var P, F, b;
|
|
3248
3248
|
S == 1 ? (r.value = "success", (P = window.DasMessage) == null || P.success({
|
|
3249
|
-
message: `${A}${
|
|
3249
|
+
message: `${A}${C("成功")}`,
|
|
3250
3250
|
grouping: !0,
|
|
3251
3251
|
repeatNum: 1
|
|
3252
3252
|
}), s.value = "", u.value = "", l.value = "") : S == 2 ? (r.value = "error", (F = window.DasMessage) == null || F.error({
|
|
3253
|
-
message: x || `${A}${
|
|
3253
|
+
message: x || `${A}${C("失败")}`,
|
|
3254
3254
|
grouping: !0,
|
|
3255
3255
|
repeatNum: 1
|
|
3256
|
-
}), l.value = x ||
|
|
3257
|
-
message: `${
|
|
3256
|
+
}), l.value = x || C("部分数据校验不通过,请下载附件并修改,重新导入!")) : S == 3 && (r.value = "error", (b = window.DasMessage) == null || b.error({
|
|
3257
|
+
message: `${C("部分")}${A}${C("失败")}`,
|
|
3258
3258
|
grouping: !0,
|
|
3259
3259
|
repeatNum: 1
|
|
3260
3260
|
}));
|
|
Binary file
|