@das-fed/utils 7.0.0-zhaohang.4 → 7.0.0-zhaohang.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/api-services/index.js +88 -84
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +705 -683
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +39 -35
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +735 -713
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +39 -35
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +38 -34
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +643 -635
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +911 -925
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +39 -35
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +88 -84
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +45 -41
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +704 -686
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +705 -683
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +39 -35
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +39 -35
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +42 -38
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +39 -35
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +39 -35
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +41 -37
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +734 -712
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +39 -35
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +646 -638
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +703 -685
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +38 -34
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/create-api-service/index.js +704 -682
  50. package/create-api-service/index.js.gz +0 -0
  51. package/curring-http/index.js +392 -392
  52. package/curring-http/index.js.gz +0 -0
  53. package/package.json +4 -4
@@ -1686,22 +1686,22 @@ R.getAdapter = cn.getAdapter;
1686
1686
  R.HttpStatusCode = _t;
1687
1687
  R.default = R;
1688
1688
  const {
1689
- Axios: Wl,
1690
- AxiosError: Gl,
1691
- CanceledError: Jl,
1692
- isCancel: Vl,
1693
- CancelToken: Kl,
1694
- VERSION: Ql,
1695
- all: Xl,
1696
- Cancel: Zl,
1697
- isAxiosError: Yl,
1698
- spread: ec,
1699
- toFormData: tc,
1700
- AxiosHeaders: rc,
1701
- HttpStatusCode: nc,
1702
- formToJSON: oc,
1703
- getAdapter: ac,
1704
- mergeConfig: ic
1689
+ Axios: Gl,
1690
+ AxiosError: Jl,
1691
+ CanceledError: Vl,
1692
+ isCancel: Kl,
1693
+ CancelToken: Ql,
1694
+ VERSION: Xl,
1695
+ all: Zl,
1696
+ Cancel: Yl,
1697
+ isAxiosError: ec,
1698
+ spread: tc,
1699
+ toFormData: rc,
1700
+ AxiosHeaders: nc,
1701
+ HttpStatusCode: oc,
1702
+ formToJSON: ac,
1703
+ getAdapter: ic,
1704
+ mergeConfig: sc
1705
1705
  } = R;
1706
1706
  var ur = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1707
1707
  function Fa(t) {
@@ -3200,27 +3200,31 @@ const Mn = Vt.noRedireLogin ?? !1, kn = () => {
3200
3200
  if (Mn) return;
3201
3201
  const t = "/login";
3202
3202
  location.pathname !== t && (sessionStorage.clear(), window.__isAutoCloseApp = !1, location.replace(t));
3203
- }, Mr = "SUC0000", _l = async (t) => {
3204
- var i, s, u, l, c, p;
3203
+ }, Mr = "SUC0000", _l = "AUM0020401", Nl = async (t) => {
3204
+ var a, i, s, u, l, c;
3205
3205
  let e = t.data || {};
3206
3206
  const n = (e == null ? void 0 : e.returnCode) || Mr;
3207
- let r = e.errorMsg ?? "", o = {};
3208
- return n !== Mr ? (!(Gn("code") || "") && !Mn && n === 401 ? (Un ? Jn({ ...Kn, redirect_uri: Vn }) : kn(), o = e) : (e instanceof Blob && (e = await new Promise((v) => {
3209
- const y = new FileReader();
3210
- y.readAsText(e, "utf-8"), y.onload = () => {
3211
- try {
3212
- v(JSON.parse(y.result || "{}"));
3213
- } catch {
3214
- v({ code: 400, msg: Ot("blob解析错误") });
3215
- }
3216
- };
3217
- })), 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 };
3218
- }, Nl = async (t, e) => {
3207
+ let r = {};
3208
+ if (n !== Mr) {
3209
+ let p = e.errorMsg ?? "";
3210
+ return !(Gn("code") || "") && !Mn && n === _l ? (Un ? Jn({ ...Kn, redirect_uri: Vn }) : kn(), r = e) : (e instanceof Blob && (e = await new Promise((v) => {
3211
+ const y = new FileReader();
3212
+ y.readAsText(e, "utf-8"), y.onload = () => {
3213
+ try {
3214
+ v(JSON.parse(y.result || "{}"));
3215
+ } catch {
3216
+ v({ code: 400, msg: Ot("blob解析错误") });
3217
+ }
3218
+ };
3219
+ })), r = e), (a = t.config) != null && a.customErrorMessage && (p = (i = t.config) == null ? void 0 : i.customErrorMessage(p, n)), !((s = t.config) != null && s.ignoreErrorMessage) && p && ((l = (u = window.DasMessage) == null ? void 0 : u.error) == null || l.call(u, { message: p, showClose: !0 })), { data: r, code: n, msg: p };
3220
+ }
3221
+ return ((c = t.config) == null ? void 0 : c.responseType) === "blob" ? { data: t, code: n } : { data: t.data ?? t, code: n };
3222
+ }, Fl = async (t, e) => {
3219
3223
  var o, a, i, s;
3220
3224
  let n = ((o = t == null ? void 0 : t.response) == null ? void 0 : o.data) || {}, r = (a = t.response) == null ? void 0 : a.message;
3221
3225
  if (!t.response)
3222
- return t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Ot("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Ot("请求配置异常"), !(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 };
3223
- }, Fl = (t, e) => {
3226
+ return t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Ot("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Ot("请求配置异常"), !(e != null && e.ignoreErrorMessage) && r && ((s = (i = window.DasMessage) == null ? void 0 : i.error) == null || s.call(i, { message: r, showClose: !0 })), { data: n, code: t.code, msg: r, error: t };
3227
+ }, $l = (t, e) => {
3224
3228
  const n = R.create();
3225
3229
  return zn(n, async (r) => {
3226
3230
  const o = kr();
@@ -3232,7 +3236,7 @@ const Mn = Vt.noRedireLogin ?? !1, kn = () => {
3232
3236
  }
3233
3237
  Un ? l || (l = await Wn(r)) : (l || (l = eo()), l || kn()), l && !r.headers.Authorization && (r.headers.Authorization = `Bearer ${l}`);
3234
3238
  }
3235
- r.baseURL || (r.baseURL = o.baseURL || ""), r.urlPrefix || (r.urlPrefix = t), r.paramsSerializer || (r.paramsSerializer = { serialize: (l) => Pl.stringify(l, { indices: !1 }) }), r.onSuccess || (r.onSuccess = _l), r.onError || (r.onError = Nl), (r.csrf ?? !1) && (r.headers["csrf-token"] = xl.get("csrf-token"));
3239
+ r.baseURL || (r.baseURL = o.baseURL || ""), r.urlPrefix || (r.urlPrefix = t), r.paramsSerializer || (r.paramsSerializer = { serialize: (l) => Pl.stringify(l, { indices: !1 }) }), r.onSuccess || (r.onSuccess = Nl), r.onError || (r.onError = Fl), (r.csrf ?? !1) && (r.headers["csrf-token"] = xl.get("csrf-token"));
3236
3240
  const s = r.params || {};
3237
3241
  if (s.project === void 0) {
3238
3242
  let l = 0;
@@ -3245,7 +3249,7 @@ const Mn = Vt.noRedireLogin ?? !1, kn = () => {
3245
3249
  }
3246
3250
  return r.params = s, r.headers.Timezone = Ut.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] = Hn.value, r;
3247
3251
  });
3248
- }, $l = "v2", sc = Fl(`/api/edge/${$l}`);
3252
+ }, Dl = "v2", lc = $l(`/api/edge/${Dl}`);
3249
3253
  export {
3250
- sc as gatewayEdge
3254
+ lc as gatewayEdge
3251
3255
  };
@@ -1688,22 +1688,22 @@ N.getAdapter = $n.getAdapter;
1688
1688
  N.HttpStatusCode = Kt;
1689
1689
  N.default = N;
1690
1690
  const {
1691
- Axios: Mc,
1692
- AxiosError: Lc,
1693
- CanceledError: Bc,
1694
- isCancel: Uc,
1695
- CancelToken: kc,
1696
- VERSION: jc,
1697
- all: qc,
1698
- Cancel: Hc,
1699
- isAxiosError: zc,
1700
- spread: Wc,
1701
- toFormData: Gc,
1702
- AxiosHeaders: Kc,
1703
- HttpStatusCode: Jc,
1704
- formToJSON: Vc,
1705
- getAdapter: Qc,
1706
- mergeConfig: Xc
1691
+ Axios: Lc,
1692
+ AxiosError: Bc,
1693
+ CanceledError: Uc,
1694
+ isCancel: kc,
1695
+ CancelToken: jc,
1696
+ VERSION: qc,
1697
+ all: Hc,
1698
+ Cancel: zc,
1699
+ isAxiosError: Wc,
1700
+ spread: Gc,
1701
+ toFormData: Kc,
1702
+ AxiosHeaders: Jc,
1703
+ HttpStatusCode: Vc,
1704
+ formToJSON: Qc,
1705
+ getAdapter: Xc,
1706
+ mergeConfig: Yc
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 ti(t) {
@@ -3202,26 +3202,30 @@ const ao = ur.noRedireLogin ?? !1, io = () => {
3202
3202
  if (ao) return;
3203
3203
  const t = "/login";
3204
3204
  location.pathname !== t && (sessionStorage.clear(), window.__isAutoCloseApp = !1, location.replace(t));
3205
- }, an = "SUC0000", Zl = async (t) => {
3206
- var i, s, u, l, c, p;
3205
+ }, an = "SUC0000", Zl = "AUM0020401", ec = async (t) => {
3206
+ var a, i, s, u, l, c;
3207
3207
  let e = t.data || {};
3208
3208
  const n = (e == null ? void 0 : e.returnCode) || an;
3209
- let r = e.errorMsg ?? "", o = {};
3210
- return n !== an ? (!(ho("code") || "") && !ao && n === 401 ? (oo ? go({ ...wo, redirect_uri: vo }) : io(), 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解析错误") });
3217
- }
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) => {
3209
+ let r = {};
3210
+ if (n !== an) {
3211
+ let p = e.errorMsg ?? "";
3212
+ return !(ho("code") || "") && !ao && n === Zl ? (oo ? go({ ...wo, redirect_uri: vo }) : io(), r = e) : (e instanceof Blob && (e = await new Promise((g) => {
3213
+ const y = new FileReader();
3214
+ y.readAsText(e, "utf-8"), y.onload = () => {
3215
+ try {
3216
+ g(JSON.parse(y.result || "{}"));
3217
+ } catch {
3218
+ g({ code: 400, msg: D("blob解析错误") });
3219
+ }
3220
+ };
3221
+ })), r = e), (a = t.config) != null && a.customErrorMessage && (p = (i = t.config) == null ? void 0 : i.customErrorMessage(p, n)), !((s = t.config) != null && s.ignoreErrorMessage) && p && ((l = (u = window.DasMessage) == null ? void 0 : u.error) == null || l.call(u, { message: p, showClose: !0 })), { data: r, code: n, msg: p };
3222
+ }
3223
+ return ((c = t.config) == null ? void 0 : c.responseType) === "blob" ? { data: t, code: n } : { data: t.data ?? t, code: n };
3224
+ }, tc = async (t, e) => {
3221
3225
  var o, a, i, s;
3222
3226
  let n = ((o = t == null ? void 0 : t.response) == null ? void 0 : o.data) || {}, r = (a = t.response) == null ? void 0 : a.message;
3223
3227
  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 };
3228
+ 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 })), { data: n, code: t.code, msg: r, error: t };
3225
3229
  }, b = (t, e) => {
3226
3230
  const n = N.create();
3227
3231
  return yo(n, async (r) => {
@@ -3234,7 +3238,7 @@ const ao = ur.noRedireLogin ?? !1, io = () => {
3234
3238
  }
3235
3239
  oo ? l || (l = await mo(r)) : (l || (l = Oo()), l || io()), l && !r.headers.Authorization && (r.headers.Authorization = `Bearer ${l}`);
3236
3240
  }
3237
- r.baseURL || (r.baseURL = o.baseURL || ""), r.urlPrefix || (r.urlPrefix = t), r.paramsSerializer || (r.paramsSerializer = { serialize: (l) => Vl.stringify(l, { indices: !1 }) }), r.onSuccess || (r.onSuccess = Zl), r.onError || (r.onError = ec), (r.csrf ?? !1) && (r.headers["csrf-token"] = Xl.get("csrf-token"));
3241
+ r.baseURL || (r.baseURL = o.baseURL || ""), r.urlPrefix || (r.urlPrefix = t), r.paramsSerializer || (r.paramsSerializer = { serialize: (l) => Vl.stringify(l, { indices: !1 }) }), r.onSuccess || (r.onSuccess = ec), r.onError || (r.onError = tc), (r.csrf ?? !1) && (r.headers["csrf-token"] = Xl.get("csrf-token"));
3238
3242
  const s = r.params || {};
3239
3243
  if (s.project === void 0) {
3240
3244
  let l = 0;
@@ -3247,11 +3251,11 @@ const ao = ur.noRedireLogin ?? !1, io = () => {
3247
3251
  }
3248
3252
  return r.params = s, r.headers.Timezone = rt.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] = po.value, r;
3249
3253
  });
3250
- }, tc = "v1", Yc = b(`/api/app-manager/application/${tc}`), rc = "v1", Zc = b(`/api/license/admin/${rc}`), nc = "v1", jt = `/api/bems/data-manage/${nc}`, eu = {
3254
+ }, rc = "v1", Zc = b(`/api/app-manager/application/${rc}`), nc = "v1", eu = b(`/api/license/admin/${nc}`), oc = "v1", jt = `/api/bems/data-manage/${oc}`, tu = {
3251
3255
  energyType: b(`${jt}/energy-type`),
3252
3256
  energyObject: b(`${jt}/energy-object`),
3253
3257
  energyDimension: b(`${jt}/energy-dimension`)
3254
- }, oc = "v1", tu = b(`/api/supply/contract/${oc}`), qe = "v1", ru = {
3258
+ }, ac = "v1", ru = b(`/api/supply/contract/${ac}`), qe = "v1", nu = {
3255
3259
  classes: b(`/api/duty-manage/classes/${qe}`),
3256
3260
  // 班次管理
3257
3261
  group: b(`/api/duty-manage/group/${qe}`),
@@ -3260,17 +3264,17 @@ const ao = ur.noRedireLogin ?? !1, io = () => {
3260
3264
  // 排班管理
3261
3265
  shift: b(`/api/duty-manage/shift/${qe}`)
3262
3266
  // 交接班管理
3263
- }, ac = "v1", nu = b(`/api/enterpriseright/permission/${ac}`), V = "v1", ou = b(`/api/iot/${V}`), au = {
3267
+ }, ic = "v1", ou = b(`/api/enterpriseright/permission/${ic}`), V = "v1", au = b(`/api/iot/${V}`), iu = {
3264
3268
  thingmodel: b(`/api/iot-device/thingmodel/${V}`),
3265
3269
  deviceManage: b(`/api/iot-device/devicemanage/${V}`),
3266
3270
  product: b(`/api/iot-device/product/${V}`),
3267
3271
  productStorage: b(`/api/iot-device/product-storage/${V}`)
3268
- }, iu = {
3272
+ }, su = {
3269
3273
  projectDevice: b(`/api/device-relation/deviceproject/${V}`),
3270
3274
  deviceRules: b(`/api/device-relation/devicerule/${V}`),
3271
3275
  project: b(`/api/device-relation/project/${V}`)
3272
- }, fr = b(`/api/oss/minio/${V}`), ic = b(`/api/progress/accessor/${V}`), su = b(`/api/dms/analysis/${V}`);
3273
- let sc = (t = 21) => {
3276
+ }, fr = b(`/api/oss/minio/${V}`), sc = b(`/api/progress/accessor/${V}`), lu = b(`/api/dms/analysis/${V}`);
3277
+ let lc = (t = 21) => {
3274
3278
  let e = "", n = crypto.getRandomValues(new Uint8Array(t));
3275
3279
  for (; t--; ) {
3276
3280
  let r = n[t] & 63;
@@ -3278,12 +3282,12 @@ let sc = (t = 21) => {
3278
3282
  }
3279
3283
  return e;
3280
3284
  };
3281
- const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.headers = {}), t.headers["Content-Type"] = "multipart/form-data", t.responseType = "blob", t)), uc = fr.post("upload-objects", (t) => (t.headers || (t.headers = {}), t.headers["Content-Type"] = "multipart/form-data", t.responseType = "blob", t)), fc = ic.get("progress"), lu = () => {
3285
+ const cc = fr.get("token"), uc = fr.post("put-object", (t) => (t.headers || (t.headers = {}), t.headers["Content-Type"] = "multipart/form-data", t.responseType = "blob", t)), fc = fr.post("upload-objects", (t) => (t.headers || (t.headers = {}), t.headers["Content-Type"] = "multipart/form-data", t.responseType = "blob", t)), pc = sc.get("progress"), cu = () => {
3282
3286
  let t = K(!1), e = K(""), n = K(0), r = K("normal"), o = K(!1), a, i = K(""), s = K(""), u = K(""), l = K(""), c = K(!1), p = K(""), d = "", g = K(""), y;
3283
3287
  const h = () => {
3284
3288
  s.value = "", u.value = "", l.value = "", c.value = !1, p.value = "";
3285
3289
  }, m = async () => {
3286
- const [E, O] = await lc().run();
3290
+ const [E, O] = await cc().run();
3287
3291
  return E ? { stauts: !1 } : { status: !0, data: O };
3288
3292
  }, A = (E) => new Promise((O, $) => {
3289
3293
  const _ = [];
@@ -3300,7 +3304,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
3300
3304
  const H = await m();
3301
3305
  if (!H.status) return;
3302
3306
  let k = H.data, j = null, { autoContentType: G, bucketName: X, importFileName: Le } = $;
3303
- const lo = w ? uc : cc;
3307
+ const lo = w ? fc : uc;
3304
3308
  if (w) {
3305
3309
  let oe = [];
3306
3310
  await O.forEach(async (Be) => {
@@ -3325,7 +3329,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
3325
3329
  }
3326
3330
  const [co, uo] = await lo(j).run();
3327
3331
  if (co) return t.value = !1;
3328
- const Y = await dc(uo.data);
3332
+ const Y = await yc(uo.data);
3329
3333
  if (!w && (Y == null ? void 0 : Y.statusCode) != 200 || w && (Y != null && Y.some((oe) => (oe == null ? void 0 : oe.statusCode) != 200))) {
3330
3334
  t.value = !1, (dr = window.DasMessage) == null || dr.error({
3331
3335
  message: (Y == null ? void 0 : Y.errorMsg) || D("上传失败"),
@@ -3372,7 +3376,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
3372
3376
  clearTimeout(a), a = null, t.value = !1;
3373
3377
  }, B = async (E, O = "export", $, T = "") => {
3374
3378
  var H, k, j;
3375
- const [_, w] = await fc("", {
3379
+ const [_, w] = await pc("", {
3376
3380
  url: `progress/${E}`
3377
3381
  }).run();
3378
3382
  if (_) {
@@ -3438,14 +3442,14 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
3438
3442
  fileAction: v,
3439
3443
  generateUniqueName: (E) => {
3440
3444
  const O = E == null ? void 0 : E.match(/(.*?)(\.[^.]*$|$)/), $ = O.length ? O[2] : "";
3441
- return `${O.length ? O[1] : E}${sc()}${$}`;
3445
+ return `${O.length ? O[1] : E}${lc()}${$}`;
3442
3446
  },
3443
3447
  downloadFile: sn,
3444
3448
  resetStataus: h,
3445
3449
  checkProgress: x,
3446
3450
  fileHandleType: g
3447
3451
  };
3448
- }, pc = (t) => {
3452
+ }, dc = (t) => {
3449
3453
  let e = t == null ? void 0 : t.toLocaleLowerCase();
3450
3454
  return {
3451
3455
  excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -3478,7 +3482,7 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
3478
3482
  const r = new XMLHttpRequest();
3479
3483
  r.open("get", t), r.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), r.responseType = "blob", r.onload = function(o) {
3480
3484
  const a = new Blob([this.response], {
3481
- type: pc(n)
3485
+ type: dc(n)
3482
3486
  }), i = URL.createObjectURL(a);
3483
3487
  if (window.navigator.msSaveOrOpenBlob)
3484
3488
  navigator.msSaveBlob(a, e);
@@ -3487,53 +3491,53 @@ const lc = fr.get("token"), cc = fr.post("put-object", (t) => (t.headers || (t.h
3487
3491
  s.href = i, s.download = e, s.click(), window.URL.revokeObjectURL(i);
3488
3492
  }
3489
3493
  }, r.send();
3490
- }, dc = (t) => new Promise((e, n) => {
3494
+ }, yc = (t) => new Promise((e, n) => {
3491
3495
  var r = new FileReader();
3492
3496
  r.onload = function(o) {
3493
3497
  let a = "";
3494
3498
  typeof r.result == "string" && (a = JSON.parse(r.result)), e(a);
3495
3499
  }, r.readAsText(t);
3496
- }), yc = "v2", cu = b(`/api/edge/${yc}`), so = "v1", uu = b(`/api/justauth/oauth-server/${so}/visitor`), fu = b(`/api/justauth/oauth-server/${so}`), mc = "v1", pu = b(`/api/knowledge-base/knowledge/${mc}`), hc = "v1", du = b(`/api/custom-datasource/custom/${hc}`), gc = "v1", yu = b(`/api/permission/${gc}`), fe = "v1", mu = b(`/api/customer/customer/${fe}`), hu = b(`/api/customer/company/${fe}`), gu = b(`/api/customer/customer-grade/${fe}`), vu = b(`/api/customer/customer-type/${fe}`), wu = {
3500
+ }), mc = "v2", uu = b(`/api/edge/${mc}`), so = "v1", fu = b(`/api/justauth/oauth-server/${so}/visitor`), pu = b(`/api/justauth/oauth-server/${so}`), hc = "v1", du = b(`/api/knowledge-base/knowledge/${hc}`), gc = "v1", yu = b(`/api/custom-datasource/custom/${gc}`), vc = "v1", mu = b(`/api/permission/${vc}`), fe = "v1", hu = b(`/api/customer/customer/${fe}`), gu = b(`/api/customer/company/${fe}`), vu = b(`/api/customer/customer-grade/${fe}`), wu = b(`/api/customer/customer-type/${fe}`), bu = {
3497
3501
  list: b(`/api/project/${fe}/list`),
3498
3502
  app: b(`/api/project/${fe}/app`),
3499
3503
  people: b(`/api/project/${fe}/people`)
3500
- }, vc = "v1", bu = b(`/api/portal/user/${vc}`), wc = "v1", Su = b(`/api/space-manage/space-tree/${wc}`), dt = "v1", Eu = b(`/api/superadmin/portal/${dt}`), Au = b(`/api/superadmin/permission/${dt}`), Ou = b(`/api/superadmin/resource/${dt}`), Ru = b(`/api/superadmin/license/${dt}`), pr = "v1", Pu = b(`/api/supply/supplier/${pr}`), Tu = b(`/api/supplier/${pr}`), xu = b(`/api/supplier/${pr}/classification`), bc = "v1", $u = b(`/api/supply/brand/${bc}`), Sc = "v2", Cu = b(`/api/tool/${Sc}`), Ec = "v1", _u = b(`/api/system-config/${Ec}`);
3504
+ }, wc = "v1", Su = b(`/api/portal/user/${wc}`), bc = "v1", Eu = b(`/api/space-manage/space-tree/${bc}`), dt = "v1", Au = b(`/api/superadmin/portal/${dt}`), Ou = b(`/api/superadmin/permission/${dt}`), Ru = b(`/api/superadmin/resource/${dt}`), Pu = b(`/api/superadmin/license/${dt}`), pr = "v1", Tu = b(`/api/supply/supplier/${pr}`), xu = b(`/api/supplier/${pr}`), $u = b(`/api/supplier/${pr}/classification`), Sc = "v1", Cu = b(`/api/supply/brand/${Sc}`), Ec = "v2", _u = b(`/api/tool/${Ec}`), Ac = "v1", Nu = b(`/api/system-config/${Ac}`);
3501
3505
  export {
3502
- su as analyApi,
3503
- Yc as appManage,
3504
- Zc as authentication,
3505
- eu as bemsModules,
3506
- hu as company,
3507
- tu as contract,
3508
- mu as customer,
3509
- gu as customerGrade,
3510
- vu as customerType,
3511
- du as daslink,
3506
+ lu as analyApi,
3507
+ Zc as appManage,
3508
+ eu as authentication,
3509
+ tu as bemsModules,
3510
+ gu as company,
3511
+ ru as contract,
3512
+ hu as customer,
3513
+ vu as customerGrade,
3514
+ wu as customerType,
3515
+ yu as daslink,
3512
3516
  sn as downloadFile,
3513
- ru as dutyModules,
3514
- $u as enterpriseadminBrandModel,
3515
- nu as enterpriseright,
3516
- cu as gatewayEdge,
3517
- ou as iot,
3517
+ nu as dutyModules,
3518
+ Cu as enterpriseadminBrandModel,
3519
+ ou as enterpriseright,
3520
+ uu as gatewayEdge,
3521
+ au as iot,
3518
3522
  fr as iotMinio,
3519
- au as iotModules,
3520
- ic as iotProgress,
3521
- iu as iotRelationModules,
3522
- uu as justauth,
3523
- pu as knowledgeBase,
3524
- fu as oauthServer,
3525
- yu as permission,
3526
- bu as portal,
3527
- wu as projectManage,
3528
- Su as spaceManage,
3529
- Ru as superadminLicense,
3530
- Au as superadminPermission,
3531
- Eu as superadminPortal,
3532
- Ou as superadminResource,
3533
- Pu as supplier,
3534
- xu as supplierClassification,
3535
- Tu as supplierManage,
3536
- _u as systemConfiguration,
3537
- Cu as tool,
3538
- lu as useFile
3523
+ iu as iotModules,
3524
+ sc as iotProgress,
3525
+ su as iotRelationModules,
3526
+ fu as justauth,
3527
+ du as knowledgeBase,
3528
+ pu as oauthServer,
3529
+ mu as permission,
3530
+ Su as portal,
3531
+ bu as projectManage,
3532
+ Eu as spaceManage,
3533
+ Pu as superadminLicense,
3534
+ Ou as superadminPermission,
3535
+ Au as superadminPortal,
3536
+ Ru as superadminResource,
3537
+ Tu as supplier,
3538
+ $u as supplierClassification,
3539
+ xu as supplierManage,
3540
+ Nu as systemConfiguration,
3541
+ _u as tool,
3542
+ cu as useFile
3539
3543
  };
Binary file
@@ -1686,22 +1686,22 @@ R.getAdapter = fn.getAdapter;
1686
1686
  R.HttpStatusCode = Nt;
1687
1687
  R.default = R;
1688
1688
  const {
1689
- Axios: Wc,
1690
- AxiosError: Gc,
1691
- CanceledError: Jc,
1692
- isCancel: Vc,
1693
- CancelToken: Kc,
1694
- VERSION: Qc,
1695
- all: Xc,
1696
- Cancel: Zc,
1697
- isAxiosError: Yc,
1698
- spread: el,
1699
- toFormData: tl,
1700
- AxiosHeaders: rl,
1701
- HttpStatusCode: nl,
1702
- formToJSON: ol,
1703
- getAdapter: al,
1704
- mergeConfig: il
1689
+ Axios: Gc,
1690
+ AxiosError: Jc,
1691
+ CanceledError: Vc,
1692
+ isCancel: Kc,
1693
+ CancelToken: Qc,
1694
+ VERSION: Xc,
1695
+ all: Zc,
1696
+ Cancel: Yc,
1697
+ isAxiosError: el,
1698
+ spread: tl,
1699
+ toFormData: rl,
1700
+ AxiosHeaders: nl,
1701
+ HttpStatusCode: ol,
1702
+ formToJSON: al,
1703
+ getAdapter: il,
1704
+ mergeConfig: sl
1705
1705
  } = R;
1706
1706
  var pr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
1707
1707
  function Da(t) {
@@ -3200,26 +3200,30 @@ const qn = Qt.noRedireLogin ?? !1, jn = () => {
3200
3200
  if (qn) return;
3201
3201
  const t = "/login";
3202
3202
  location.pathname !== t && (sessionStorage.clear(), window.__isAutoCloseApp = !1, location.replace(t));
3203
- }, qr = "SUC0000", Nc = async (t) => {
3204
- var i, s, u, c, l, p;
3203
+ }, qr = "SUC0000", Nc = "AUM0020401", Fc = async (t) => {
3204
+ var a, i, s, u, c, l;
3205
3205
  let e = t.data || {};
3206
3206
  const n = (e == null ? void 0 : e.returnCode) || qr;
3207
- let r = e.errorMsg ?? "", o = {};
3208
- return n !== qr ? (!(Vn("code") || "") && !qn && n === 401 ? (kn ? Kn({ ...Xn, redirect_uri: Qn }) : jn(), o = e) : (e instanceof Blob && (e = await new Promise((v) => {
3209
- const y = new FileReader();
3210
- y.readAsText(e, "utf-8"), y.onload = () => {
3211
- try {
3212
- v(JSON.parse(y.result || "{}"));
3213
- } catch {
3214
- v({ code: 400, msg: Pt("blob解析错误") });
3215
- }
3216
- };
3217
- })), 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 && ((l = (c = window.DasMessage) == null ? void 0 : c.error) == null || l.call(c, { message: r, showClose: !0 })), { ...o, code: n, msg: r }) : ((p = t.config) == null ? void 0 : p.responseType) === "blob" ? t : { ...t.data ?? {}, code: n };
3218
- }, Fc = async (t, e) => {
3207
+ let r = {};
3208
+ if (n !== qr) {
3209
+ let p = e.errorMsg ?? "";
3210
+ return !(Vn("code") || "") && !qn && n === Nc ? (kn ? Kn({ ...Xn, redirect_uri: Qn }) : jn(), r = e) : (e instanceof Blob && (e = await new Promise((v) => {
3211
+ const y = new FileReader();
3212
+ y.readAsText(e, "utf-8"), y.onload = () => {
3213
+ try {
3214
+ v(JSON.parse(y.result || "{}"));
3215
+ } catch {
3216
+ v({ code: 400, msg: Pt("blob解析错误") });
3217
+ }
3218
+ };
3219
+ })), r = e), (a = t.config) != null && a.customErrorMessage && (p = (i = t.config) == null ? void 0 : i.customErrorMessage(p, n)), !((s = t.config) != null && s.ignoreErrorMessage) && p && ((c = (u = window.DasMessage) == null ? void 0 : u.error) == null || c.call(u, { message: p, showClose: !0 })), { data: r, code: n, msg: p };
3220
+ }
3221
+ return ((l = t.config) == null ? void 0 : l.responseType) === "blob" ? { data: t, code: n } : { data: t.data ?? t, code: n };
3222
+ }, Dc = async (t, e) => {
3219
3223
  var o, a, i, s;
3220
3224
  let n = ((o = t == null ? void 0 : t.response) == null ? void 0 : o.data) || {}, r = (a = t.response) == null ? void 0 : a.message;
3221
3225
  if (!t.response)
3222
- return t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Pt("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Pt("请求配置异常"), !(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 };
3226
+ return t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Pt("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = Pt("请求配置异常"), !(e != null && e.ignoreErrorMessage) && r && ((s = (i = window.DasMessage) == null ? void 0 : i.error) == null || s.call(i, { message: r, showClose: !0 })), { data: n, code: t.code, msg: r, error: t };
3223
3227
  }, I = (t, e) => {
3224
3228
  const n = R.create();
3225
3229
  return Gn(n, async (r) => {
@@ -3232,7 +3236,7 @@ const qn = Qt.noRedireLogin ?? !1, jn = () => {
3232
3236
  }
3233
3237
  kn ? c || (c = await Jn(r)) : (c || (c = ro()), c || jn()), c && !r.headers.Authorization && (r.headers.Authorization = `Bearer ${c}`);
3234
3238
  }
3235
- r.baseURL || (r.baseURL = o.baseURL || ""), r.urlPrefix || (r.urlPrefix = t), r.paramsSerializer || (r.paramsSerializer = { serialize: (c) => xc.stringify(c, { indices: !1 }) }), r.onSuccess || (r.onSuccess = Nc), r.onError || (r.onError = Fc), (r.csrf ?? !1) && (r.headers["csrf-token"] = _c.get("csrf-token"));
3239
+ r.baseURL || (r.baseURL = o.baseURL || ""), r.urlPrefix || (r.urlPrefix = t), r.paramsSerializer || (r.paramsSerializer = { serialize: (c) => xc.stringify(c, { indices: !1 }) }), r.onSuccess || (r.onSuccess = Fc), r.onError || (r.onError = Dc), (r.csrf ?? !1) && (r.headers["csrf-token"] = _c.get("csrf-token"));
3236
3240
  const s = r.params || {};
3237
3241
  if (s.project === void 0) {
3238
3242
  let c = 0;
@@ -3245,21 +3249,21 @@ const qn = Qt.noRedireLogin ?? !1, jn = () => {
3245
3249
  }
3246
3250
  return r.params = s, r.headers.Timezone = kt.tz.guess(), r.headers["X-Origin"] = location.origin, r.headers["Accept-Language"] = Wn.value, r;
3247
3251
  });
3248
- }, B = "v1", sl = I(`/api/iot/${B}`), cl = {
3252
+ }, B = "v1", cl = I(`/api/iot/${B}`), ll = {
3249
3253
  thingmodel: I(`/api/iot-device/thingmodel/${B}`),
3250
3254
  deviceManage: I(`/api/iot-device/devicemanage/${B}`),
3251
3255
  product: I(`/api/iot-device/product/${B}`),
3252
3256
  productStorage: I(`/api/iot-device/product-storage/${B}`)
3253
- }, ll = {
3257
+ }, ul = {
3254
3258
  projectDevice: I(`/api/device-relation/deviceproject/${B}`),
3255
3259
  deviceRules: I(`/api/device-relation/devicerule/${B}`),
3256
3260
  project: I(`/api/device-relation/project/${B}`)
3257
- }, ul = I(`/api/oss/minio/${B}`), fl = I(`/api/progress/accessor/${B}`), pl = I(`/api/dms/analysis/${B}`);
3261
+ }, fl = I(`/api/oss/minio/${B}`), pl = I(`/api/progress/accessor/${B}`), dl = I(`/api/dms/analysis/${B}`);
3258
3262
  export {
3259
- pl as analyApi,
3260
- sl as iot,
3261
- ul as iotMinio,
3262
- cl as iotModules,
3263
- fl as iotProgress,
3264
- ll as iotRelationModules
3263
+ dl as analyApi,
3264
+ cl as iot,
3265
+ fl as iotMinio,
3266
+ ll as iotModules,
3267
+ pl as iotProgress,
3268
+ ul as iotRelationModules
3265
3269
  };