@das-fed/utils 6.4.0-dev.53 → 6.4.0-dev.54.1

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 (51) hide show
  1. package/api-services/index.js +59 -46
  2. package/api-services/index.js.gz +0 -0
  3. package/api-services/modules/app-manage/index.js +156 -143
  4. package/api-services/modules/app-manage/index.js.gz +0 -0
  5. package/api-services/modules/authentication/index.js +200 -187
  6. package/api-services/modules/authentication/index.js.gz +0 -0
  7. package/api-services/modules/bems/index.js +156 -143
  8. package/api-services/modules/bems/index.js.gz +0 -0
  9. package/api-services/modules/contract/index.js +200 -187
  10. package/api-services/modules/contract/index.js.gz +0 -0
  11. package/api-services/modules/duty-manage/index.js +156 -143
  12. package/api-services/modules/duty-manage/index.js.gz +0 -0
  13. package/api-services/modules/enterpriseright/index.js +200 -187
  14. package/api-services/modules/enterpriseright/index.js.gz +0 -0
  15. package/api-services/modules/file/index.js +59 -46
  16. package/api-services/modules/file/index.js.gz +0 -0
  17. package/api-services/modules/gateway-edge/index.js +200 -187
  18. package/api-services/modules/gateway-edge/index.js.gz +0 -0
  19. package/api-services/modules/index.js +59 -46
  20. package/api-services/modules/index.js.gz +0 -0
  21. package/api-services/modules/iot/index.js +156 -143
  22. package/api-services/modules/iot/index.js.gz +0 -0
  23. package/api-services/modules/justauth/index.js +199 -186
  24. package/api-services/modules/justauth/index.js.gz +0 -0
  25. package/api-services/modules/knowledge/index.js +156 -143
  26. package/api-services/modules/knowledge/index.js.gz +0 -0
  27. package/api-services/modules/link/index.js +156 -143
  28. package/api-services/modules/link/index.js.gz +0 -0
  29. package/api-services/modules/permission/index.js +200 -187
  30. package/api-services/modules/permission/index.js.gz +0 -0
  31. package/api-services/modules/platformManage/index.js +161 -148
  32. package/api-services/modules/platformManage/index.js.gz +0 -0
  33. package/api-services/modules/portal/index.js +200 -187
  34. package/api-services/modules/portal/index.js.gz +0 -0
  35. package/api-services/modules/space-manage/index.js +156 -143
  36. package/api-services/modules/space-manage/index.js.gz +0 -0
  37. package/api-services/modules/super-admin/index.js +199 -186
  38. package/api-services/modules/super-admin/index.js.gz +0 -0
  39. package/api-services/modules/supplier/index.js +156 -143
  40. package/api-services/modules/supplier/index.js.gz +0 -0
  41. package/api-services/modules/supplychain-manage/index.js +156 -143
  42. package/api-services/modules/supplychain-manage/index.js.gz +0 -0
  43. package/api-services/modules/systemConfiguration/index.js +200 -187
  44. package/api-services/modules/systemConfiguration/index.js.gz +0 -0
  45. package/api-services/modules/tool/index.js +200 -187
  46. package/api-services/modules/tool/index.js.gz +0 -0
  47. package/api-services/src/create-service/index.js +200 -187
  48. package/api-services/src/create-service/index.js.gz +0 -0
  49. package/create-api-service/index.js +200 -187
  50. package/create-api-service/index.js.gz +0 -0
  51. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { setI18nRule as _n, t as N } from "@das-fed/web/packages/i18n/index";
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, C = {
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, C.decoder, l, "key"), y = n.strictNullHandling ? null : "") : (g = n.decoder(c.slice(0, d), C.decoder, l, "key"), y = be.maybeMap(
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, C.decoder, l, "value");
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 C;
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" ? C.charset : e.charset, r = typeof e.duplicates > "u" ? C.duplicates : e.duplicates;
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 : C.allowDots : !!e.allowDots;
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 : C.allowEmptyArrays,
2945
- allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : C.allowPrototypes,
2946
- allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : C.allowSparse,
2947
- arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : C.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 : C.charsetSentinel,
2950
- comma: typeof e.comma == "boolean" ? e.comma : C.comma,
2951
- decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : C.decodeDotInKeys,
2952
- decoder: typeof e.decoder == "function" ? e.decoder : C.decoder,
2953
- delimiter: typeof e.delimiter == "string" || be.isRegExp(e.delimiter) ? e.delimiter : C.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 : C.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 : C.interpretNumericEntities,
2959
- parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : C.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 : C.plainObjects,
2962
- strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : C.strictDepth,
2963
- strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : C.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,18 +3070,31 @@ 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: N("参数校验错误"), 404: N("接口地址未找到"), 500: N("服务器内部错误") };
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
- 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
- const y = new FileReader();
3077
- y.readAsText(i, "utf-8"), y.onload = () => {
3078
- try {
3079
- g(JSON.parse(y.result || "{}"));
3080
- } catch {
3081
- g({ code: 400, msg: N("blob解析错误") });
3075
+ if (!(Un("code") || "") && !Nn && (n === 401 || (i == null ? void 0 : i.code) === 401))
3076
+ Cn ? kn({ ...Mn, redirect_uri: jn }) : Fn(), o = i;
3077
+ else {
3078
+ if (t.response) {
3079
+ if (i instanceof Blob && (i = await new Promise((g) => {
3080
+ const y = new FileReader();
3081
+ y.readAsText(i, "utf-8"), y.onload = () => {
3082
+ try {
3083
+ g(JSON.parse(y.result || "{}"));
3084
+ } catch {
3085
+ g({ code: 400, msg: C("blob解析错误") });
3086
+ }
3087
+ };
3088
+ })), i.code) {
3089
+ n = i.code;
3090
+ const g = (i == null ? void 0 : i.status) ?? "错误提示";
3091
+ r = !(i != null && i.data) || !i.data.length ? C(g) : C(g, ...i.data), o = i;
3082
3092
  }
3083
- };
3084
- })), i.code && (n = i.code, r = i.msg || i.message, o = i), r || (r = a[t.response.status] || t.message)) : t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = N("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = N("请求配置异常"), 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 };
3093
+ r || (r = a[t.response.status] || t.message);
3094
+ } else t.request ? t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("网络异常,请检查您的网络情况") : t.code === "ERR_CANCELED" ? t.abortReason && (r = t.abortReason) : r = C("请求配置异常");
3095
+ 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 }));
3096
+ }
3097
+ return { ...o, code: n, msg: r, error: t };
3085
3098
  }, Y = (t, e) => {
3086
3099
  const n = $.create();
3087
3100
  return Bn(n, async (r) => {
@@ -3138,7 +3151,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3138
3151
  A(k);
3139
3152
  }), R = async (S, A, x, P = !0, F = "", b = !1) => {
3140
3153
  var Qt, Xt;
3141
- d = F, g.value = "import", P && (r.value = "normal", n.value = 0, e.value = N("导入进度"), t.value = !0, i.value = ""), y = A;
3154
+ d = F, g.value = "import", P && (r.value = "normal", n.value = 0, e.value = C("导入进度"), t.value = !0, i.value = ""), y = A;
3142
3155
  const k = await h();
3143
3156
  if (!k.status) return;
3144
3157
  let M = k.data, j = null, { autoContentType: ee, bucketName: te, importFileName: Vt } = x;
@@ -3170,7 +3183,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3170
3183
  const ie = await nl(In.data);
3171
3184
  if ((ie == null ? void 0 : ie.statusCode) != 200) {
3172
3185
  t.value = !1, (Qt = window.DasMessage) == null || Qt.error({
3173
- message: (ie == null ? void 0 : ie.errorMsg) || N("上传失败"),
3186
+ message: (ie == null ? void 0 : ie.errorMsg) || C("上传失败"),
3174
3187
  grouping: !0,
3175
3188
  repeatNum: 1
3176
3189
  });
@@ -3182,17 +3195,17 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3182
3195
  t.value = !1, r.value = "error";
3183
3196
  return;
3184
3197
  }
3185
- e.value = N("导入进度"), t.value = !0, T(nt.taskId, "import", "");
3198
+ e.value = C("导入进度"), t.value = !0, T(nt.taskId, "import", "");
3186
3199
  } else {
3187
3200
  if (!nt.status) return;
3188
3201
  r.value = "success", (Xt = window.DasMessage) == null || Xt.success({
3189
- message: N("导入成功"),
3202
+ message: C("导入成功"),
3190
3203
  grouping: !0,
3191
3204
  repeatNum: 1
3192
3205
  });
3193
3206
  }
3194
3207
  }, v = async (S, A = "", x = "") => {
3195
- r.value = "normal", n.value = 0, e.value = x || N("导出进度"), t.value = !0;
3208
+ r.value = "normal", n.value = 0, e.value = x || C("导出进度"), t.value = !0;
3196
3209
  const P = await (S == null ? void 0 : S());
3197
3210
  if (!P.status) {
3198
3211
  t.value = !1, r.value = "error";
@@ -3200,7 +3213,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3200
3213
  }
3201
3214
  T(P.taskId, "action", "");
3202
3215
  }, D = async (S, A = "", x = "", P = !0) => {
3203
- g.value = "export", P && (r.value = "normal", n.value = 0, e.value = N("导出进度"), t.value = !0);
3216
+ g.value = "export", P && (r.value = "normal", n.value = 0, e.value = C("导出进度"), t.value = !0);
3204
3217
  const F = await (S == null ? void 0 : S());
3205
3218
  if (!F.status) {
3206
3219
  t.value = !1, r.value = "error";
@@ -3222,11 +3235,11 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3222
3235
  return;
3223
3236
  }
3224
3237
  n.value = b.percentage;
3225
- const k = A == "export" ? N("导出") : N("导入");
3238
+ const k = A == "export" ? C("导出") : C("导入");
3226
3239
  if (n.value == 100)
3227
3240
  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}${N("失败")}`, (M = window.DasMessage) == null || M.error({
3229
- message: b.message || `${k}${N("失败")}`,
3241
+ 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({
3242
+ message: b.message || `${k}${C("失败")}`,
3230
3243
  grouping: !0,
3231
3244
  repeatNum: 1
3232
3245
  }));
@@ -3235,7 +3248,7 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3235
3248
  r.value = "error", c.value = !0;
3236
3249
  let ee = await Gn(`/oss/${b == null ? void 0 : b.filePath}`);
3237
3250
  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 = N("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${He().baseURL}/oss/${b == null ? void 0 : b.filePath}`;
3251
+ s.value = d || te, u.value = y.sizeText, l.value = C("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${He().baseURL}/oss/${b == null ? void 0 : b.filePath}`;
3239
3252
  }
3240
3253
  W(b.status, k, b.message);
3241
3254
  } else A == "action" && (r.value = "success");
@@ -3246,15 +3259,15 @@ const Ys = Jt.get("token"), Zs = Jt.post("put-object", (t) => (t.headers || (t.h
3246
3259
  }, W = (S, A, x) => {
3247
3260
  var P, F, b;
3248
3261
  S == 1 ? (r.value = "success", (P = window.DasMessage) == null || P.success({
3249
- message: `${A}${N("成功")}`,
3262
+ message: `${A}${C("成功")}`,
3250
3263
  grouping: !0,
3251
3264
  repeatNum: 1
3252
3265
  }), s.value = "", u.value = "", l.value = "") : S == 2 ? (r.value = "error", (F = window.DasMessage) == null || F.error({
3253
- message: x || `${A}${N("失败")}`,
3266
+ message: x || `${A}${C("失败")}`,
3254
3267
  grouping: !0,
3255
3268
  repeatNum: 1
3256
- }), l.value = x || N("部分数据校验不通过,请下载附件并修改,重新导入!")) : S == 3 && (r.value = "error", (b = window.DasMessage) == null || b.error({
3257
- message: `${N("部分")}${A}${N("失败")}`,
3269
+ }), l.value = x || C("部分数据校验不通过,请下载附件并修改,重新导入!")) : S == 3 && (r.value = "error", (b = window.DasMessage) == null || b.error({
3270
+ message: `${C("部分")}${A}${C("失败")}`,
3258
3271
  grouping: !0,
3259
3272
  repeatNum: 1
3260
3273
  }));