@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 zr, t as N } from "@das-fed/web/packages/i18n/index";
1
+ import { setI18nRule as zr, t as C } from "@das-fed/web/packages/i18n/index";
2
2
  import { curringHttp as zn } from "@das-fed/utils/curring-http";
3
3
  import { getToken as qn, getQuery as Hn, login as Wn, getTokenParams as Kn, real_uri as Gn } from "@das-fed/utils/create-api-service/sso";
4
4
  import Ze from "dayjs";
@@ -2858,7 +2858,7 @@ var Tn = Ae, Oe = xi, is = ji, ss = De, Ue = Tn("%WeakMap%", !0), Me = Tn("%Map%
2858
2858
  }
2859
2859
  var d = i.join(r.delimiter), g = r.addQueryPrefix === !0 ? "?" : "";
2860
2860
  return r.charsetSentinel && (r.charset === "iso-8859-1" ? g += "utf8=%26%2310003%3B&" : g += "utf8=%E2%9C%93&"), d.length > 0 ? g + d : "";
2861
- }, we = $n, Ut = Object.prototype.hasOwnProperty, Us = Array.isArray, C = {
2861
+ }, we = $n, Ut = Object.prototype.hasOwnProperty, Us = Array.isArray, N = {
2862
2862
  allowDots: !1,
2863
2863
  allowEmptyArrays: !1,
2864
2864
  allowPrototypes: !1,
@@ -2895,10 +2895,10 @@ var Tn = Ae, Oe = xi, is = ji, ss = De, Ue = Tn("%WeakMap%", !0), Me = Tn("%Map%
2895
2895
  for (u = 0; u < i.length; ++u)
2896
2896
  if (u !== s) {
2897
2897
  var c = i[u], p = c.indexOf("]="), d = p === -1 ? c.indexOf("=") : p + 1, g, y;
2898
- 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 = we.maybeMap(
2898
+ 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 = we.maybeMap(
2899
2899
  Dn(c.slice(d + 1), n),
2900
2900
  function(m) {
2901
- return n.decoder(m, C.decoder, l, "value");
2901
+ return n.decoder(m, N.decoder, l, "value");
2902
2902
  }
2903
2903
  )), y && n.interpretNumericEntities && l === "iso-8859-1" && (y = Ms(y)), c.indexOf("[]=") > -1 && (y = Us(y) ? [y] : y);
2904
2904
  var h = Ut.call(r, g);
@@ -2940,7 +2940,7 @@ var Tn = Ae, Oe = xi, is = ji, ss = De, Ue = Tn("%WeakMap%", !0), Me = Tn("%Map%
2940
2940
  }
2941
2941
  }, Ws = function(e) {
2942
2942
  if (!e)
2943
- return C;
2943
+ return N;
2944
2944
  if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2945
2945
  throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2946
2946
  if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
@@ -2949,32 +2949,32 @@ var Tn = Ae, Oe = xi, is = ji, ss = De, Ue = Tn("%WeakMap%", !0), Me = Tn("%Map%
2949
2949
  throw new TypeError("Decoder has to be a function.");
2950
2950
  if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2951
2951
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2952
- var n = typeof e.charset > "u" ? C.charset : e.charset, r = typeof e.duplicates > "u" ? C.duplicates : e.duplicates;
2952
+ var n = typeof e.charset > "u" ? N.charset : e.charset, r = typeof e.duplicates > "u" ? N.duplicates : e.duplicates;
2953
2953
  if (r !== "combine" && r !== "first" && r !== "last")
2954
2954
  throw new TypeError("The duplicates option must be either combine, first, or last");
2955
- var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : C.allowDots : !!e.allowDots;
2955
+ var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : N.allowDots : !!e.allowDots;
2956
2956
  return {
2957
2957
  allowDots: o,
2958
- allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : C.allowEmptyArrays,
2959
- allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : C.allowPrototypes,
2960
- allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : C.allowSparse,
2961
- arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : C.arrayLimit,
2958
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : N.allowEmptyArrays,
2959
+ allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : N.allowPrototypes,
2960
+ allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : N.allowSparse,
2961
+ arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : N.arrayLimit,
2962
2962
  charset: n,
2963
- charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : C.charsetSentinel,
2964
- comma: typeof e.comma == "boolean" ? e.comma : C.comma,
2965
- decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : C.decodeDotInKeys,
2966
- decoder: typeof e.decoder == "function" ? e.decoder : C.decoder,
2967
- delimiter: typeof e.delimiter == "string" || we.isRegExp(e.delimiter) ? e.delimiter : C.delimiter,
2963
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : N.charsetSentinel,
2964
+ comma: typeof e.comma == "boolean" ? e.comma : N.comma,
2965
+ decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : N.decodeDotInKeys,
2966
+ decoder: typeof e.decoder == "function" ? e.decoder : N.decoder,
2967
+ delimiter: typeof e.delimiter == "string" || we.isRegExp(e.delimiter) ? e.delimiter : N.delimiter,
2968
2968
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2969
- depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : C.depth,
2969
+ depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : N.depth,
2970
2970
  duplicates: r,
2971
2971
  ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
2972
- interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : C.interpretNumericEntities,
2973
- parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : C.parameterLimit,
2972
+ interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : N.interpretNumericEntities,
2973
+ parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : N.parameterLimit,
2974
2974
  parseArrays: e.parseArrays !== !1,
2975
- plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : C.plainObjects,
2976
- strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : C.strictDepth,
2977
- strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : C.strictNullHandling
2975
+ plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : N.plainObjects,
2976
+ strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : N.strictDepth,
2977
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : N.strictNullHandling
2978
2978
  };
2979
2979
  }, Ks = function(t, e) {
2980
2980
  var n = Ws(e);
@@ -3084,18 +3084,31 @@ const In = Ke(), _n = In.sso ?? !0, Bn = In.noRedireLogin ?? !1, Ln = () => {
3084
3084
  }, rl = async (t, e) => {
3085
3085
  var u, l, c, p, d;
3086
3086
  let n = ((u = t.response) == null ? void 0 : u.status) || 500, r = (l = t.response) == null ? void 0 : l.message, o = {};
3087
- const a = { 400: N("参数校验错误"), 404: N("接口地址未找到"), 500: N("服务器内部错误") };
3087
+ const a = { 400: C("参数校验错误"), 404: C("接口地址未找到"), 500: C("服务器内部错误") };
3088
3088
  let i = ((c = t == null ? void 0 : t.response) == null ? void 0 : c.data) || {};
3089
- return !(Hn("code") || "") && !Bn && (n === 401 || (i == null ? void 0 : i.code) === 401) ? (_n ? Wn({ ...Kn, redirect_uri: Gn }) : Ln(), o = i) : (t.response ? (i instanceof Blob && (i = await new Promise((g) => {
3090
- const y = new FileReader();
3091
- y.readAsText(i, "utf-8"), y.onload = () => {
3092
- try {
3093
- g(JSON.parse(y.result || "{}"));
3094
- } catch {
3095
- g({ code: 400, msg: N("blob解析错误") });
3089
+ if (!(Hn("code") || "") && !Bn && (n === 401 || (i == null ? void 0 : i.code) === 401))
3090
+ _n ? Wn({ ...Kn, redirect_uri: Gn }) : Ln(), o = i;
3091
+ else {
3092
+ if (t.response) {
3093
+ if (i instanceof Blob && (i = await new Promise((g) => {
3094
+ const y = new FileReader();
3095
+ y.readAsText(i, "utf-8"), y.onload = () => {
3096
+ try {
3097
+ g(JSON.parse(y.result || "{}"));
3098
+ } catch {
3099
+ g({ code: 400, msg: C("blob解析错误") });
3100
+ }
3101
+ };
3102
+ })), i.code) {
3103
+ n = i.code;
3104
+ const g = (i == null ? void 0 : i.status) ?? "错误提示";
3105
+ r = !(i != null && i.data) || !i.data.length ? C(g) : C(g, ...i.data), o = i;
3096
3106
  }
3097
- };
3098
- })), 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 };
3107
+ r || (r = a[t.response.status] || t.message);
3108
+ } 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("请求配置异常");
3109
+ 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 }));
3110
+ }
3111
+ return { ...o, code: n, msg: r, error: t };
3099
3112
  }, b = (t, e) => {
3100
3113
  const n = I.create();
3101
3114
  return zn(n, async (r) => {
@@ -3170,7 +3183,7 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3170
3183
  O(k);
3171
3184
  }), P = async (E, O, $, T = !0, F = "", w = !1) => {
3172
3185
  var tr, rr;
3173
- d = F, g.value = "import", T && (r.value = "normal", n.value = 0, e.value = N("导入进度"), t.value = !0, i.value = ""), y = O;
3186
+ d = F, g.value = "import", T && (r.value = "normal", n.value = 0, e.value = C("导入进度"), t.value = !0, i.value = ""), y = O;
3174
3187
  const k = await m();
3175
3188
  if (!k.status) return;
3176
3189
  let j = k.data, z = null, { autoContentType: ee, bucketName: te, importFileName: er } = $;
@@ -3202,7 +3215,7 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3202
3215
  const ie = await ml(jn.data);
3203
3216
  if ((ie == null ? void 0 : ie.statusCode) != 200) {
3204
3217
  t.value = !1, (tr = window.DasMessage) == null || tr.error({
3205
- message: (ie == null ? void 0 : ie.errorMsg) || N("上传失败"),
3218
+ message: (ie == null ? void 0 : ie.errorMsg) || C("上传失败"),
3206
3219
  grouping: !0,
3207
3220
  repeatNum: 1
3208
3221
  });
@@ -3214,17 +3227,17 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3214
3227
  t.value = !1, r.value = "error";
3215
3228
  return;
3216
3229
  }
3217
- e.value = N("导入进度"), t.value = !0, x(it.taskId, "import", "");
3230
+ e.value = C("导入进度"), t.value = !0, x(it.taskId, "import", "");
3218
3231
  } else {
3219
3232
  if (!it.status) return;
3220
3233
  r.value = "success", (rr = window.DasMessage) == null || rr.success({
3221
- message: N("导入成功"),
3234
+ message: C("导入成功"),
3222
3235
  grouping: !0,
3223
3236
  repeatNum: 1
3224
3237
  });
3225
3238
  }
3226
3239
  }, v = async (E, O = "", $ = "") => {
3227
- r.value = "normal", n.value = 0, e.value = $ || N("导出进度"), t.value = !0;
3240
+ r.value = "normal", n.value = 0, e.value = $ || C("导出进度"), t.value = !0;
3228
3241
  const T = await (E == null ? void 0 : E());
3229
3242
  if (!T.status) {
3230
3243
  t.value = !1, r.value = "error";
@@ -3232,7 +3245,7 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3232
3245
  }
3233
3246
  x(T.taskId, "action", "");
3234
3247
  }, D = async (E, O = "", $ = "", T = !0) => {
3235
- g.value = "export", T && (r.value = "normal", n.value = 0, e.value = N("导出进度"), t.value = !0);
3248
+ g.value = "export", T && (r.value = "normal", n.value = 0, e.value = C("导出进度"), t.value = !0);
3236
3249
  const F = await (E == null ? void 0 : E());
3237
3250
  if (!F.status) {
3238
3251
  t.value = !1, r.value = "error";
@@ -3254,11 +3267,11 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3254
3267
  return;
3255
3268
  }
3256
3269
  n.value = w.percentage;
3257
- const k = O == "export" ? N("导出") : N("导入");
3270
+ const k = O == "export" ? C("导出") : C("导入");
3258
3271
  if (n.value == 100)
3259
3272
  if (i.value = w, o.value = !1, L(), O == "export")
3260
- w.status == 1 ? (r.value = "success", jr(`${Ke().baseURL}/oss${w.filePath}`, $, T), o.value = !1) : w.status == 2 && (l.value = w.message || `${k}${N("失败")}`, (j = window.DasMessage) == null || j.error({
3261
- message: w.message || `${k}${N("失败")}`,
3273
+ w.status == 1 ? (r.value = "success", jr(`${Ke().baseURL}/oss${w.filePath}`, $, T), o.value = !1) : w.status == 2 && (l.value = w.message || `${k}${C("失败")}`, (j = window.DasMessage) == null || j.error({
3274
+ message: w.message || `${k}${C("失败")}`,
3262
3275
  grouping: !0,
3263
3276
  repeatNum: 1
3264
3277
  }));
@@ -3267,7 +3280,7 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3267
3280
  r.value = "error", c.value = !0;
3268
3281
  let ee = await Zn(`/oss/${w == null ? void 0 : w.filePath}`);
3269
3282
  const te = ((z = ee == null ? void 0 : ee.split("/")) == null ? void 0 : z.pop()) || "";
3270
- s.value = d || te, u.value = y.sizeText, l.value = N("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${Ke().baseURL}/oss/${w == null ? void 0 : w.filePath}`;
3283
+ s.value = d || te, u.value = y.sizeText, l.value = C("部分数据校验不通过,请下载附件并修改,重新导入!"), p.value = `${Ke().baseURL}/oss/${w == null ? void 0 : w.filePath}`;
3271
3284
  }
3272
3285
  K(w.status, k, w.message);
3273
3286
  } else O == "action" && (r.value = "success");
@@ -3278,15 +3291,15 @@ const ul = Yt.get("token"), fl = Yt.post("put-object", (t) => (t.headers || (t.h
3278
3291
  }, K = (E, O, $) => {
3279
3292
  var T, F, w;
3280
3293
  E == 1 ? (r.value = "success", (T = window.DasMessage) == null || T.success({
3281
- message: `${O}${N("成功")}`,
3294
+ message: `${O}${C("成功")}`,
3282
3295
  grouping: !0,
3283
3296
  repeatNum: 1
3284
3297
  }), s.value = "", u.value = "", l.value = "") : E == 2 ? (r.value = "error", (F = window.DasMessage) == null || F.error({
3285
- message: $ || `${O}${N("失败")}`,
3298
+ message: $ || `${O}${C("失败")}`,
3286
3299
  grouping: !0,
3287
3300
  repeatNum: 1
3288
- }), l.value = $ || N("部分数据校验不通过,请下载附件并修改,重新导入!")) : E == 3 && (r.value = "error", (w = window.DasMessage) == null || w.error({
3289
- message: `${N("部分")}${O}${N("失败")}`,
3301
+ }), l.value = $ || C("部分数据校验不通过,请下载附件并修改,重新导入!")) : E == 3 && (r.value = "error", (w = window.DasMessage) == null || w.error({
3302
+ message: `${C("部分")}${O}${C("失败")}`,
3290
3303
  grouping: !0,
3291
3304
  repeatNum: 1
3292
3305
  }));
Binary file