@das-fed/ui 6.4.0-hot.22 → 6.4.0-hot.24

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 (90) hide show
  1. package/package.json +6 -6
  2. package/packages/business-components/device-panel/index.js +37397 -37395
  3. package/packages/business-components/device-panel/index.js.gz +0 -0
  4. package/packages/business-components/device-panel/style.css +1 -1
  5. package/packages/business-components/device-panel/style.css.gz +0 -0
  6. package/packages/business-components/export-button/index.js +60 -60
  7. package/packages/business-components/export-button/index.js.gz +0 -0
  8. package/packages/business-components/export-button/style.css +1 -1
  9. package/packages/business-components/import-button/hooks/file.d.ts +1 -0
  10. package/packages/business-components/import-button/hooks/useImport.d.ts +1 -0
  11. package/packages/business-components/import-button/index.js +239 -235
  12. package/packages/business-components/import-button/index.js.gz +0 -0
  13. package/packages/business-components/import-button/style.css +1 -1
  14. package/packages/business-components/model-table-dialog/index.js +37 -37
  15. package/packages/business-components/model-table-dialog/index.js.gz +0 -0
  16. package/packages/business-components/model-table-dialog/style.css +1 -1
  17. package/packages/business-components/model-table-dialog/style.css.gz +0 -0
  18. package/packages/business-components/process-configuration/index.js +176 -176
  19. package/packages/business-components/process-configuration/index.js.gz +0 -0
  20. package/packages/business-components/process-configuration/style.css +1 -1
  21. package/packages/business-components/process-configuration/style.css.gz +0 -0
  22. package/packages/business-components/process-log/index.js +252 -252
  23. package/packages/business-components/process-log/index.js.gz +0 -0
  24. package/packages/business-components/process-log/style.css +1 -1
  25. package/packages/business-components/process-log/style.css.gz +0 -0
  26. package/packages/business-components/urgent-panel/index.js +1319 -1322
  27. package/packages/business-components/urgent-panel/index.js.gz +0 -0
  28. package/packages/business-components/urgent-panel/src/components/urgentPanelModal/urgentMonitorPanel.vue.d.ts +8 -3
  29. package/packages/business-components/urgent-panel/style.css +1 -1
  30. package/packages/business-components/urgent-panel/style.css.gz +0 -0
  31. package/packages/business-components/user-org-dialog/index.js +3 -3
  32. package/packages/business-components/user-org-dialog/index.js.gz +0 -0
  33. package/packages/business-components/user-org-dialog/style.css +1 -1
  34. package/packages/business-components/user-org-dialog/style.css.gz +0 -0
  35. package/packages/business-components/video-dialog/index.js +301 -273
  36. package/packages/business-components/video-dialog/index.js.gz +0 -0
  37. package/packages/business-components/video-dialog/style.css +1 -1
  38. package/packages/business-components/video-dialog/style.css.gz +0 -0
  39. package/packages/components/calendar/index.js +56 -56
  40. package/packages/components/calendar/index.js.gz +0 -0
  41. package/packages/components/color-picker/index.js +41 -41
  42. package/packages/components/color-picker/index.js.gz +0 -0
  43. package/packages/components/color-picker/style.css +1 -1
  44. package/packages/components/color-picker/style.css.gz +0 -0
  45. package/packages/components/date-picker/index.js +444 -444
  46. package/packages/components/date-picker/index.js.gz +0 -0
  47. package/packages/components/date-picker/style.css +1 -1
  48. package/packages/components/date-picker/style.css.gz +0 -0
  49. package/packages/components/dimple-layout/index.js +2299 -2293
  50. package/packages/components/dimple-layout/index.js.gz +0 -0
  51. package/packages/components/dropdown/index.js +26 -25
  52. package/packages/components/dropdown/index.js.gz +0 -0
  53. package/packages/components/input/index.js +73 -73
  54. package/packages/components/input/index.js.gz +0 -0
  55. package/packages/components/input/style.css +1 -1
  56. package/packages/components/input/style.css.gz +0 -0
  57. package/packages/components/loading/index.js +66 -65
  58. package/packages/components/loading/index.js.gz +0 -0
  59. package/packages/components/map/index.js +358 -355
  60. package/packages/components/map/index.js.gz +0 -0
  61. package/packages/components/map/src/hooks/use-map.d.ts +1 -2
  62. package/packages/components/map/style.css +1 -1
  63. package/packages/components/message/index.js +20 -19
  64. package/packages/components/message/index.js.gz +0 -0
  65. package/packages/components/notification/index.js +22 -21
  66. package/packages/components/notification/index.js.gz +0 -0
  67. package/packages/components/progress/index.js +80 -80
  68. package/packages/components/progress/index.js.gz +0 -0
  69. package/packages/components/progress/style.css +1 -1
  70. package/packages/components/progress/style.css.gz +0 -0
  71. package/packages/components/select/index.js +102 -102
  72. package/packages/components/select/index.js.gz +0 -0
  73. package/packages/components/select/style.css +1 -1
  74. package/packages/components/select/style.css.gz +0 -0
  75. package/packages/components/spin/index.js +31 -30
  76. package/packages/components/spin/index.js.gz +0 -0
  77. package/packages/components/table/index.js +2419 -2418
  78. package/packages/components/table/index.js.gz +0 -0
  79. package/packages/components/table/style.css +1 -1
  80. package/packages/components/table/style.css.gz +0 -0
  81. package/packages/components/tooltip/index.js +23 -22
  82. package/packages/components/tooltip/index.js.gz +0 -0
  83. package/packages/components/tree/index.js +1428 -1427
  84. package/packages/components/tree/index.js.gz +0 -0
  85. package/packages/components/tree/src/App.vue.d.ts +9 -11
  86. package/packages/components/tree-select/index.js +274 -274
  87. package/packages/components/tree-select/index.js.gz +0 -0
  88. package/packages/components/virtual-tree/index.js +64 -64
  89. package/packages/components/virtual-tree/index.js.gz +0 -0
  90. package/packages/components/virtual-tree/src/App.vue.d.ts +4 -12
@@ -1,181 +1,182 @@
1
1
  import '@das-fed/ui/packages/business-components/import-button/style.css';
2
- import { withInstall as de } from "@das-fed/utils/with-install/index";
3
- import { ref as k, defineComponent as fe, watch as ge, openBlock as ve, createElementBlock as we, createElementVNode as O, unref as l, renderSlot as le, createVNode as S, withCtx as j, createTextVNode as K, toDisplayString as A, createCommentVNode as se, isRef as G } from "vue";
4
- import { t as m, i18n as P } from "@das-fed/web/packages/i18n/index";
5
- import { DasDialog as oe } from "@das-fed/ui/packages/components/dialog/index";
6
- import { DasUpload as xe } from "@das-fed/ui/packages/components/upload/index";
2
+ import { withInstall as fe } from "@das-fed/utils/with-install/index";
3
+ import { ref as y, defineComponent as ge, watch as ve, openBlock as xe, createElementBlock as ye, createElementVNode as K, unref as l, renderSlot as se, createVNode as P, withCtx as V, createTextVNode as _, toDisplayString as A, createCommentVNode as oe, isRef as Q } from "vue";
4
+ import { t as p, i18n as M } from "@das-fed/web/packages/i18n/index";
5
+ import { DasDialog as re } from "@das-fed/ui/packages/components/dialog/index";
6
+ import { DasUpload as we } from "@das-fed/ui/packages/components/upload/index";
7
7
  import { DasProgress as he } from "@das-fed/ui/packages/components/progress/index";
8
- import { DasButton as Q } from "@das-fed/ui/packages/components/button/index";
9
- import { iotMinio as te, iotProgress as ye } from "@das-fed/utils/api-services/modules/iot";
10
- import { DasMessage as M } from "@das-fed/ui/packages/components/message/index";
11
- import be from "dayjs";
12
- import { getConfig as re } from "@das-fed/utils/config";
13
- import { extractFilename as Te } from "@das-fed/utils/common-tools";
14
- import { getUserInfo as ke } from "@das-fed/utils/common-info/index";
15
- import { pureImageSrc as ie } from "@das-fed/utils/pure-image-src";
16
- let ee = (e = 21) => {
17
- let c = "", p = crypto.getRandomValues(new Uint8Array(e));
8
+ import { DasButton as W } from "@das-fed/ui/packages/components/button/index";
9
+ import { iotMinio as ae, iotProgress as be } from "@das-fed/utils/api-services/modules/iot";
10
+ import { DasMessage as L } from "@das-fed/ui/packages/components/message/index";
11
+ import Te from "dayjs";
12
+ import { getConfig as ie } from "@das-fed/utils/config";
13
+ import { extractFilename as ke } from "@das-fed/utils/common-tools";
14
+ import { getUserInfo as $e } from "@das-fed/utils/common-info/index";
15
+ import { pureImageSrc as ne } from "@das-fed/utils/pure-image-src";
16
+ let te = (e = 21) => {
17
+ let c = "", m = crypto.getRandomValues(new Uint8Array(e));
18
18
  for (; e--; ) {
19
- let i = p[e] & 63;
19
+ let i = m[e] & 63;
20
20
  i < 36 ? c += i.toString(36) : i < 62 ? c += (i - 26).toString(36).toUpperCase() : i < 63 ? c += "_" : c += "-";
21
21
  }
22
22
  return c;
23
23
  };
24
- const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Fe = te.post("upload-objects", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Ie = ye.get("progress"), Ue = (e) => {
25
- let c = k(!1), p = k(!1), i = k(""), w = k(0), u = k("normal"), x = k(!1), g, F = k(""), D = k(""), U = k(""), N = k(""), C = k(!1), L = k(""), I = "", $;
24
+ const Ne = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Ie = ae.post("upload-objects", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Ue = be.get("progress"), Ce = (e) => {
25
+ let c = y(!1), m = y(!1), i = y(""), x = y(0), u = y("normal"), w = y(!1), g, N = y(""), z = y(""), U = y(""), $ = y(""), C = y(!1), j = y(""), F = "", I = y(""), D;
26
26
  const h = () => {
27
- D.value = "", U.value = "", N.value = "", C.value = !1, L.value = "";
28
- }, V = async () => {
29
- const [s, o] = await $e().run();
27
+ z.value = "", U.value = "", $.value = "", C.value = !1, j.value = "";
28
+ }, B = async () => {
29
+ const [s, o] = await Ne().run();
30
30
  return s ? { stauts: !1 } : { status: !0, data: o };
31
- }, B = (s) => new Promise((o, a) => {
31
+ }, R = (s) => new Promise((o, a) => {
32
32
  const n = [];
33
33
  let t = 0;
34
34
  for (; t < s.size; ) {
35
- const b = s.slice(t, t + 1048576);
36
- n.push(b), t += 1048576;
35
+ const T = s.slice(t, t + 1048576);
36
+ n.push(T), t += 1048576;
37
37
  }
38
- const y = new Blob(n, { type: s.type });
39
- o(y);
40
- }), R = async (s, o, a, r = !1, n = !0, t = "") => {
41
- I = t, n && (u.value = "normal", w.value = 0, i.value = m("导入进度"), p.value = !0, F.value = ""), $ = o;
42
- const y = await V();
43
- if (!y.status) return;
44
- let b = y.data, T = null, { autoContentType: q, bucketName: E, importFileName: Y } = a;
45
- const ue = r ? Fe : Ne;
38
+ const b = new Blob(n, { type: s.type });
39
+ o(b);
40
+ }), E = async (s, o, a, r = !1, n = !0, t = "") => {
41
+ F = t, I.value = "import", n && (u.value = "normal", x.value = 0, i.value = p("导入进度"), m.value = !0, N.value = ""), D = o;
42
+ const b = await B();
43
+ if (!b.status) return;
44
+ let T = b.data, k = null, { autoContentType: Y, bucketName: H, importFileName: J } = a;
45
+ const me = r ? Ie : Fe;
46
46
  if (r) {
47
- let J = [];
48
- await o.forEach(async (X) => {
49
- let Z = await B(X);
50
- J.push(Z);
51
- }), T = new FormData(), T.append("accessKeyId", b.accessKeyId), T.append("secretAccessKey", b.secretAccessKey), T.append("sessionToken", b.sessionToken), T.append("bucketName", E), o.forEach((X, Z) => {
52
- T.append("file", J[Z]);
53
- }), Y.forEach((X) => {
54
- T.append("filePaths", X);
47
+ let X = [];
48
+ await o.forEach(async (G) => {
49
+ let ee = await R(G);
50
+ X.push(ee);
51
+ }), k = new FormData(), k.append("accessKeyId", T.accessKeyId), k.append("secretAccessKey", T.secretAccessKey), k.append("sessionToken", T.sessionToken), k.append("bucketName", H), o.forEach((G, ee) => {
52
+ k.append("file", X[ee]);
53
+ }), J.forEach((G) => {
54
+ k.append("filePaths", G);
55
55
  });
56
56
  } else {
57
- const J = await B(o);
58
- T = {
59
- accessKeyId: b.accessKeyId,
60
- secretAccessKey: b.secretAccessKey,
61
- sessionToken: b.sessionToken,
62
- file: J,
63
- bucketName: E,
64
- filePath: Y,
65
- autoContentType: q
57
+ const X = await R(o);
58
+ k = {
59
+ accessKeyId: T.accessKeyId,
60
+ secretAccessKey: T.secretAccessKey,
61
+ sessionToken: T.sessionToken,
62
+ file: X,
63
+ bucketName: H,
64
+ filePath: J,
65
+ autoContentType: Y
66
66
  };
67
67
  }
68
- const [me, pe] = await ue(T).run();
69
- if (me) return;
70
- const ce = await De(pe.data), W = await (s == null ? void 0 : s(ce));
68
+ const [pe, ce] = await me(k).run();
69
+ if (pe) return;
70
+ const de = await ze(ce.data), Z = await (s == null ? void 0 : s(de));
71
71
  if (n) {
72
- if (!W.status) {
73
- p.value = !1, u.value = "error";
72
+ if (!Z.status) {
73
+ m.value = !1, u.value = "error";
74
74
  return;
75
75
  }
76
- i.value = m("导入进度"), p.value = !0, d(W.taskId, "import", "");
76
+ i.value = p("导入进度"), m.value = !0, d(Z.taskId, "import", "");
77
77
  } else {
78
- if (!W.status) return;
79
- u.value = "success", M.success({
80
- message: m("导入成功"),
78
+ if (!Z.status) return;
79
+ u.value = "success", L.success({
80
+ message: p("导入成功"),
81
81
  grouping: !0,
82
82
  repeatNum: 1
83
83
  });
84
84
  }
85
- }, H = async (s, o = "", a = "") => {
86
- u.value = "normal", w.value = 0, i.value = a || m("导出进度"), p.value = !0;
85
+ }, O = async (s, o = "", a = "") => {
86
+ u.value = "normal", x.value = 0, i.value = a || p("导出进度"), m.value = !0;
87
87
  const r = await (s == null ? void 0 : s());
88
88
  if (!r.status) {
89
- p.value = !1, u.value = "error";
89
+ m.value = !1, u.value = "error";
90
90
  return;
91
91
  }
92
92
  d(r.taskId, "action", "");
93
- }, z = async (s, o = "", a = "xlsx") => {
94
- u.value = "normal", w.value = 0, i.value = m("导出进度"), p.value = !0;
93
+ }, S = async (s, o = "", a = "xlsx") => {
94
+ I.value = "export", u.value = "normal", x.value = 0, i.value = p("导出进度"), m.value = !0;
95
95
  const r = await (s == null ? void 0 : s());
96
96
  if (!r.status) {
97
- p.value = !1, u.value = "error";
97
+ m.value = !1, u.value = "error";
98
98
  return;
99
99
  }
100
- be().format("YYYYMMDDHHmmss") + "", d(r.taskId, "export", o || "", a);
100
+ Te().format("YYYYMMDDHHmmss") + "", d(r.taskId, "export", o || "", a);
101
101
  }, d = async (s, o, a, r = "") => {
102
- x.value = !0, v(s, o, a, r), g = setTimeout(() => {
102
+ w.value = !0, v(s, o, a, r), g = setTimeout(() => {
103
103
  }, 50);
104
104
  }, f = () => {
105
- clearTimeout(g), g = null, p.value = !1;
105
+ clearTimeout(g), g = null, m.value = !1;
106
106
  }, v = async (s, o = "export", a, r = "") => {
107
- var b, T;
108
- const [n, t] = await Ie("", {
107
+ var T, k;
108
+ const [n, t] = await Ue("", {
109
109
  url: `progress/${s}`
110
110
  }).run();
111
111
  if (n) {
112
- x.value = !1;
112
+ w.value = !1;
113
113
  return;
114
114
  }
115
- w.value = t.percentage;
116
- const y = o == "export" ? m("导出") : m("导入");
117
- if (w.value == 100)
118
- if (F.value = t, x.value = !1, f(), o == "export")
119
- t.status == 1 ? (u.value = "success", ne(`${re().baseURL}/oss${t.filePath}`, a, r), x.value = !1) : t.status == 2 && (N.value = t.message || `${y}${m("失败")}`, M.error({
120
- message: t.message || `${y}${m("失败")}`,
115
+ x.value = t.percentage;
116
+ const b = o == "export" ? p("导出") : p("导入");
117
+ if (x.value == 100)
118
+ if (N.value = t, w.value = !1, f(), o == "export")
119
+ t.status == 1 ? (u.value = "success", ue(`${ie().baseURL}/oss${t.filePath}`, a, r), w.value = !1) : t.status == 2 && ($.value = t.message || `${b}${p("失败")}`, L.error({
120
+ message: t.message || `${b}${p("失败")}`,
121
121
  grouping: !0,
122
122
  repeatNum: 1
123
123
  }));
124
124
  else if (o == "import") {
125
125
  if (t.filePath) {
126
126
  u.value = "error";
127
- const q = (b = $.name) == null ? void 0 : b.match(/(.*?)(\.[^.]*$|$)/);
128
- q.length && q[2], C.value = !0;
129
- let E = await Te(`/oss/${t == null ? void 0 : t.filePath}`);
130
- const Y = ((T = E == null ? void 0 : E.split("/")) == null ? void 0 : T.pop()) || "";
131
- D.value = I || Y, U.value = $.sizeText, N.value = m("部分数据校验不通过,请下载附件并修改,重新导入!"), L.value = `${re().baseURL}/oss/${t == null ? void 0 : t.filePath}`;
127
+ const Y = (T = D.name) == null ? void 0 : T.match(/(.*?)(\.[^.]*$|$)/);
128
+ Y.length && Y[2], C.value = !0;
129
+ let H = await ke(`/oss/${t == null ? void 0 : t.filePath}`);
130
+ const J = ((k = H == null ? void 0 : H.split("/")) == null ? void 0 : k.pop()) || "";
131
+ z.value = F || J, U.value = D.sizeText, $.value = p("部分数据校验不通过,请下载附件并修改,重新导入!"), j.value = `${ie().baseURL}/oss/${t == null ? void 0 : t.filePath}`;
132
132
  }
133
- _(t.status, y, t.message), t.status == 1 && (c.value = !1), e("success");
133
+ q(t.status, b, t.message), t.status == 1 && (c.value = !1), e("success");
134
134
  } else o == "action" && (u.value = "success");
135
135
  else
136
136
  g && t.status != 2 ? g = setTimeout(() => {
137
137
  v(s, o, a, r);
138
- }, 50) : (F.value = t, x.value = !1, _(t.status, y, t.message), f(), C.value = !0, N.value = (t == null ? void 0 : t.message) || "", e("error", t));
139
- }, _ = (s, o, a) => {
140
- s == 1 ? (u.value = "success", M.success({
141
- message: `${o}${m("成功")}`,
138
+ }, 50) : (N.value = t, w.value = !1, q(t.status, b, t.message), f(), C.value = !0, $.value = (t == null ? void 0 : t.message) || "", e("error", t));
139
+ }, q = (s, o, a) => {
140
+ s == 1 ? (u.value = "success", L.success({
141
+ message: `${o}${p("成功")}`,
142
142
  grouping: !0,
143
143
  repeatNum: 1
144
- }), D.value = "", U.value = "", N.value = "") : s == 2 ? (u.value = "error", M.error({
145
- message: a || `${o}${m("失败")}`,
144
+ }), z.value = "", U.value = "", $.value = "") : s == 2 ? (u.value = "error", L.error({
145
+ message: a || `${o}${p("失败")}`,
146
146
  grouping: !0,
147
147
  repeatNum: 1
148
- })) : s == 3 && (u.value = "error", M.error({
149
- message: `${m("部分")}${o}${m("失败")}`,
148
+ })) : s == 3 && (u.value = "error", L.error({
149
+ message: `${p("部分")}${o}${p("失败")}`,
150
150
  grouping: !0,
151
151
  repeatNum: 1
152
152
  }));
153
153
  };
154
154
  return {
155
155
  importDialog: c,
156
- showProgressDialog: p,
156
+ showProgressDialog: m,
157
157
  progressTitle: i,
158
- percent: w,
158
+ percent: x,
159
159
  progressStatus: u,
160
- progressLoading: x,
161
- progressResult: F,
162
- errorFileName: D,
160
+ progressLoading: w,
161
+ progressResult: N,
162
+ errorFileName: z,
163
163
  errorFileSize: U,
164
- errorMessage: N,
164
+ errorMessage: $,
165
165
  errorImport: C,
166
- errorFilePath: L,
167
- fileImport: R,
168
- fileExport: z,
169
- fileAction: H,
166
+ errorFilePath: j,
167
+ fileHandleType: I,
168
+ fileImport: E,
169
+ fileExport: S,
170
+ fileAction: O,
170
171
  generateUniqueName: (s) => {
171
172
  const o = s == null ? void 0 : s.match(/(.*?)(\.[^.]*$|$)/), a = o.length ? o[2] : "";
172
- return `${o.length ? o[1] : s}${ee()}${a}`;
173
+ return `${o.length ? o[1] : s}${te()}${a}`;
173
174
  },
174
- downloadFile: ne,
175
+ downloadFile: ue,
175
176
  resetStataus: h,
176
177
  checkProgress: d
177
178
  };
178
- }, Ce = (e) => {
179
+ }, De = (e) => {
179
180
  let c = e == null ? void 0 : e.toLocaleLowerCase();
180
181
  return {
181
182
  excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
@@ -204,112 +205,114 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
204
205
  der: "application/x-x509-ca-cert",
205
206
  cer: "application/pkix-cert"
206
207
  }[c];
207
- }, ne = (e, c, p = "excel") => {
208
+ }, ue = (e, c, m = "excel") => {
208
209
  const i = new XMLHttpRequest();
209
- i.open("get", e), i.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), i.responseType = "blob", i.onload = function(w) {
210
+ i.open("get", e), i.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), i.responseType = "blob", i.onload = function(x) {
210
211
  const u = new Blob([this.response], {
211
- type: Ce(p)
212
- }), x = URL.createObjectURL(u);
212
+ type: De(m)
213
+ }), w = URL.createObjectURL(u);
213
214
  if (window.navigator.msSaveOrOpenBlob)
214
215
  navigator.msSaveBlob(u, c);
215
216
  else {
216
217
  const g = document.createElement("a");
217
- g.href = x, g.download = c, g.click(), window.URL.revokeObjectURL(x);
218
+ g.href = w, g.download = c, g.click(), window.URL.revokeObjectURL(w);
218
219
  }
219
220
  }, i.send();
220
- }, De = (e) => new Promise((c, p) => {
221
+ }, ze = (e) => new Promise((c, m) => {
221
222
  var i = new FileReader();
222
- i.onload = function(w) {
223
+ i.onload = function(x) {
223
224
  let u = "";
224
225
  typeof i.result == "string" && (u = JSON.parse(i.result)), c(u);
225
226
  }, i.readAsText(e);
226
- }), ze = (e, c) => {
227
+ }), Se = (e, c) => {
227
228
  var o;
228
229
  const {
229
- importDialog: p,
230
+ importDialog: m,
230
231
  showProgressDialog: i,
231
- progressTitle: w,
232
+ progressTitle: x,
232
233
  percent: u,
233
- progressStatus: x,
234
+ progressStatus: w,
234
235
  progressLoading: g,
235
- errorFileName: F,
236
- errorFileSize: D,
236
+ errorFileName: N,
237
+ errorFileSize: z,
237
238
  errorMessage: U,
238
- errorImport: N,
239
+ errorImport: $,
239
240
  errorFilePath: C,
240
- fileImport: L,
241
+ fileHandleType: j,
242
+ fileImport: F,
241
243
  fileExport: I,
242
- downloadFile: $
243
- } = Ue(c);
244
- let h = k([]), V = (o = ke()) == null ? void 0 : o.tenantId;
245
- const B = () => {
246
- h.value = [], N.value = !1, F.value = "", D.value = "", U.value = "", p.value = !0, C.value = "", c("open");
244
+ downloadFile: D
245
+ } = Ce(c);
246
+ let h = y([]), B = (o = $e()) == null ? void 0 : o.tenantId;
247
+ const R = () => {
248
+ h.value = [], $.value = !1, N.value = "", z.value = "", U.value = "", m.value = !0, C.value = "", c("open");
247
249
  };
248
- let R;
249
- const H = (a) => {
250
- const r = e.fileType.split(","), n = a.name.substring(a.name.lastIndexOf(".")), t = z(a.sizeText), y = z(e.fileMaxSize);
250
+ let E;
251
+ const O = (a) => {
252
+ const r = e.fileType.split(","), n = a.name.substring(a.name.lastIndexOf(".")), t = S(a.sizeText), b = S(e.fileMaxSize);
251
253
  if (!r.includes(n)) {
252
- M.warning(m("文件格式错误,请重新上传!")), setTimeout(() => {
254
+ L.warning(p("文件格式错误,请重新上传!")), setTimeout(() => {
253
255
  h.value = [];
254
256
  });
255
257
  return;
256
258
  }
257
- if (t > y) {
258
- M.warning(`${m("文件大小不超过")}${e.fileMaxSize}`), setTimeout(() => {
259
+ if (t > b) {
260
+ L.warning(`${p("文件大小不超过")}${e.fileMaxSize}`), setTimeout(() => {
259
261
  h.value = [];
260
262
  });
261
263
  return;
262
264
  }
263
- R = a.name;
264
- }, z = (a) => {
265
+ E = a.name;
266
+ }, S = (a) => {
265
267
  let r = a.match(/\d+(\.\d+)?/)[0], n = a.match(/[a-zA-z]+/gi)[0], t = 0;
266
268
  return r = parseFloat(r), n = n.toLowerCase(), n === "gb" || n === "g" ? t = (r * 1024 * 1024 * 1024).toFixed(2) : n === "mb" || n === "m" ? t = (r * 1024 * 1024).toFixed(2) : n === "kb" || n === "k" ? t = (r * 1024).toFixed(2) : n === "b" && (t = r), parseFloat(t);
267
269
  }, d = async (a) => {
268
270
  const r = a.value.split("/");
269
- let n = ee();
271
+ let n = te();
270
272
  const t = {
271
273
  fileName: r[r.length - 1],
272
274
  filePath: a.value,
273
275
  taskId: n,
274
276
  ...e.importParams
275
- }, y = e.importParamsPosition === "params" ? e.importFun("", { params: t }) : e.importFun(t), [b, T] = await y.run();
276
- return b ? { status: !1 } : { status: !0, taskId: n };
277
+ }, b = e.importParamsPosition === "params" ? e.importFun("", { params: t }) : e.importFun(t), [T, k] = await b.run();
278
+ return T ? { status: !1 } : { status: !0, taskId: n };
277
279
  }, f = async () => {
278
- if (!h.value.length) return M.warning(m("请上传文件"));
280
+ if (!h.value.length) return L.warning(p("请上传文件"));
279
281
  const a = {
280
282
  bucketName: e.bucketName,
281
- importFileName: `${V}/${e.ossName}/${R}`
283
+ importFileName: `${B}/${e.ossName}/${E}`
282
284
  }, r = e.maxCount > 1, n = e.maxCount > 1 ? h.value : h.value[0];
283
- await L(d, n, a, r);
285
+ await F(d, n, a, r);
284
286
  }, v = () => {
285
- $(C.value, F.value);
286
- }, _ = () => {
287
- I(ae, e.templateName);
288
- }, ae = async () => {
289
- let a = ee();
287
+ D(C.value, N.value);
288
+ }, q = () => {
289
+ I(le, e.templateName);
290
+ }, le = async () => {
291
+ let a = te();
290
292
  const [r, n] = await e.templateFun({ taskId: a }).run();
291
293
  return r ? { status: !1 } : { status: !0, taskId: a };
292
294
  };
293
295
  return {
294
296
  showProgressDialog: i,
295
- progressTitle: w,
297
+ progressTitle: x,
296
298
  percent: u,
297
- progressStatus: x,
299
+ progressStatus: w,
298
300
  progressLoading: g,
299
- errorFileName: F,
300
- errorFileSize: D,
301
+ errorFileName: N,
302
+ errorFileSize: z,
301
303
  errorMessage: U,
302
- errorImport: N,
303
- importDialog: p,
304
+ errorImport: $,
305
+ importDialog: m,
304
306
  fileList: h,
305
- showImportHandle: B,
307
+ fileHandleType: j,
308
+ showImportHandle: R,
306
309
  confirmImport: f,
307
- fileUpload: H,
310
+ fileUpload: O,
308
311
  errorFileDownload: v,
309
312
  downTemplate: async () => {
310
313
  let a = "";
311
314
  if (e.templateUrl)
312
- a = e.templateUrl, $(ie(a), e.templateName);
315
+ a = e.templateUrl, D(ne(a), e.templateName);
313
316
  else if (e.templateFun) {
314
317
  if (e.templateType === "static") {
315
318
  if (e.templateUrl)
@@ -318,13 +321,13 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
318
321
  const [r, n] = await e.templateFun().run();
319
322
  a = n;
320
323
  }
321
- $(ie(a), e.templateName);
324
+ D(ne(a), e.templateName);
322
325
  }
323
- e.templateType === "dynamic" && e.templateFun && _();
326
+ e.templateType === "dynamic" && e.templateFun && q();
324
327
  }
325
328
  }
326
329
  };
327
- }, Se = { class: "das-import-button" }, Pe = { class: "tip-box" }, Me = { class: "first-line" }, Le = { class: "second-line" }, je = /* @__PURE__ */ fe({
330
+ }, Pe = { class: "das-import-button" }, Me = { class: "tip-box" }, Le = { class: "first-line" }, je = { class: "second-line" }, Ve = /* @__PURE__ */ ge({
328
331
  __name: "App",
329
332
  props: {
330
333
  importFun: {},
@@ -345,44 +348,45 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
345
348
  multiple: { type: Boolean, default: !1 }
346
349
  },
347
350
  emits: ["open", "success", "error"],
348
- setup(e, { expose: c, emit: p }) {
349
- const i = e, w = p, {
351
+ setup(e, { expose: c, emit: m }) {
352
+ const i = e, x = m, {
350
353
  showProgressDialog: u,
351
- progressTitle: x,
354
+ progressTitle: w,
352
355
  percent: g,
353
- progressStatus: F,
354
- progressLoading: D,
356
+ progressStatus: N,
357
+ progressLoading: z,
355
358
  errorFileName: U,
356
- errorFileSize: N,
359
+ errorFileSize: $,
357
360
  errorMessage: C,
358
- errorImport: L,
359
- importDialog: I,
360
- fileList: $,
361
+ errorImport: j,
362
+ importDialog: F,
363
+ fileList: I,
364
+ fileHandleType: D,
361
365
  showImportHandle: h,
362
- confirmImport: V,
363
- fileUpload: B,
364
- errorFileDownload: R,
365
- downTemplate: H
366
- } = ze(i, w);
367
- let z;
368
- return ge(x, (d) => {
369
- d.includes(m("导入")) ? z = [m("正在导入中..."), m("导入失败"), m("导入成功")] : z = [m("正在导出中..."), m("导出失败"), m("导出成功")];
366
+ confirmImport: B,
367
+ fileUpload: R,
368
+ errorFileDownload: E,
369
+ downTemplate: O
370
+ } = Se(i, x);
371
+ let S;
372
+ return ve(D, (d) => {
373
+ d.includes("import") ? S = [p("正在导入中..."), p("导入失败"), p("导入成功")] : S = [p("正在导出中..."), p("导出失败"), p("导出成功")];
370
374
  }), c({
371
- confirmImport: V,
375
+ confirmImport: B,
372
376
  showImportHandle: h
373
- }), (d, f) => (ve(), we("div", Se, [
374
- O("div", {
377
+ }), (d, f) => (xe(), ye("div", Pe, [
378
+ K("div", {
375
379
  onClick: f[0] || (f[0] = //@ts-ignore
376
380
  (...v) => l(h) && l(h)(...v))
377
381
  }, [
378
- le(d.$slots, "default", {}, () => [
379
- S(l(Q), {
382
+ se(d.$slots, "default", {}, () => [
383
+ P(l(W), {
380
384
  size: "middle",
381
385
  "btn-type": "primary"
382
386
  }, {
383
- default: j(() => [
384
- K(
385
- A(l(P)("导入").value),
387
+ default: V(() => [
388
+ _(
389
+ A(l(M)("导入").value),
386
390
  1
387
391
  /* TEXT */
388
392
  )
@@ -392,24 +396,24 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
392
396
  })
393
397
  ], !0)
394
398
  ]),
395
- se(" 导入弹窗 "),
396
- S(l(oe), {
397
- title: l(P)(d.importDialogName).value,
398
- modelValue: l(I),
399
- "onUpdate:modelValue": f[3] || (f[3] = (v) => G(I) ? I.value = v : null),
399
+ oe(" 导入弹窗 "),
400
+ P(l(re), {
401
+ title: l(M)(d.importDialogName).value,
402
+ modelValue: l(F),
403
+ "onUpdate:modelValue": f[3] || (f[3] = (v) => Q(F) ? F.value = v : null),
400
404
  customClass: "upload-dialog",
401
405
  width: "610px",
402
406
  height: "500px"
403
407
  }, {
404
- footer: j(() => [
405
- O("div", null, [
406
- S(l(Q), {
408
+ footer: V(() => [
409
+ K("div", null, [
410
+ P(l(W), {
407
411
  size: "middle",
408
- onClick: f[2] || (f[2] = (v) => I.value = !1)
412
+ onClick: f[2] || (f[2] = (v) => F.value = !1)
409
413
  }, {
410
- default: j(() => [
411
- K(
412
- A(l(P)("取消").value),
414
+ default: V(() => [
415
+ _(
416
+ A(l(M)("取消").value),
413
417
  1
414
418
  /* TEXT */
415
419
  )
@@ -417,16 +421,16 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
417
421
  _: 1
418
422
  /* STABLE */
419
423
  }),
420
- S(l(Q), {
424
+ P(l(W), {
421
425
  size: "middle",
422
426
  "btn-type": "primary",
423
- disabled: d.openDisabled && l($).length === 0,
427
+ disabled: d.openDisabled && l(I).length === 0,
424
428
  style: { "margin-left": "12px" },
425
- onClick: l(V)
429
+ onClick: l(B)
426
430
  }, {
427
- default: j(() => [
428
- K(
429
- A(l(P)(`${d.confirmButtonName}`).value),
431
+ default: V(() => [
432
+ _(
433
+ A(l(M)(`${d.confirmButtonName}`).value),
430
434
  1
431
435
  /* TEXT */
432
436
  )
@@ -436,24 +440,24 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
436
440
  }, 8, ["disabled", "onClick"])
437
441
  ])
438
442
  ]),
439
- default: j(() => [
440
- le(d.$slots, "tip", {}, () => [
441
- O("div", Pe, [
442
- O("div", Me, [
443
- K(
444
- A(l(P)("1、点击下载 ").value),
443
+ default: V(() => [
444
+ se(d.$slots, "tip", {}, () => [
445
+ K("div", Me, [
446
+ K("div", Le, [
447
+ _(
448
+ A(l(M)("1、点击下载 ").value),
445
449
  1
446
450
  /* TEXT */
447
451
  ),
448
- S(l(Q), {
452
+ P(l(W), {
449
453
  size: "large",
450
454
  btnType: "primary-text",
451
455
  block: "",
452
- onClick: l(H)
456
+ onClick: l(O)
453
457
  }, {
454
- default: j(() => [
455
- K(
456
- A(l(P)(`${d.templateName}`).value),
458
+ default: V(() => [
459
+ _(
460
+ A(l(M)(`${d.templateName}`).value),
457
461
  1
458
462
  /* TEXT */
459
463
  )
@@ -462,49 +466,49 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
462
466
  /* STABLE */
463
467
  }, 8, ["onClick"])
464
468
  ]),
465
- O(
469
+ K(
466
470
  "div",
467
- Le,
468
- A(l(P)("2、仅支持上传Excel文件,重复数据以最后一条为准").value),
471
+ je,
472
+ A(l(M)("2、仅支持上传Excel文件,重复数据以最后一条为准").value),
469
473
  1
470
474
  /* TEXT */
471
475
  )
472
476
  ])
473
477
  ], !0),
474
- S(l(xe), {
475
- modelValue: l($),
476
- "onUpdate:modelValue": f[1] || (f[1] = (v) => G($) ? $.value = v : null),
477
- error: l(L),
478
+ P(l(we), {
479
+ modelValue: l(I),
480
+ "onUpdate:modelValue": f[1] || (f[1] = (v) => Q(I) ? I.value = v : null),
481
+ error: l(j),
478
482
  "error-file-name": l(U),
479
- "error-file-size": l(N),
483
+ "error-file-size": l($),
480
484
  "error-message": l(C),
481
485
  accept: d.fileType,
482
486
  maxCount: d.maxCount,
483
487
  multiple: d.multiple,
484
- onErrorFileDownload: l(R),
485
- onFileUpload: l(B)
488
+ onErrorFileDownload: l(E),
489
+ onFileUpload: l(R)
486
490
  }, null, 8, ["modelValue", "error", "error-file-name", "error-file-size", "error-message", "accept", "maxCount", "multiple", "onErrorFileDownload", "onFileUpload"])
487
491
  ]),
488
492
  _: 3
489
493
  /* FORWARDED */
490
494
  }, 8, ["title", "modelValue"]),
491
- se(" 进度弹窗 "),
492
- S(l(oe), {
495
+ oe(" 进度弹窗 "),
496
+ P(l(re), {
493
497
  size: "mini",
494
- title: l(P)(l(x)).value,
498
+ title: l(M)(l(w)).value,
495
499
  "is-feedback-img": !1,
496
500
  modelValue: l(u),
497
- "onUpdate:modelValue": f[5] || (f[5] = (v) => G(u) ? u.value = v : null),
501
+ "onUpdate:modelValue": f[5] || (f[5] = (v) => Q(u) ? u.value = v : null),
498
502
  type: "feedback"
499
503
  }, {
500
- default: j(() => [
501
- S(l(he), {
504
+ default: V(() => [
505
+ P(l(he), {
502
506
  modelValue: l(g),
503
- "onUpdate:modelValue": f[4] || (f[4] = (v) => G(g) ? g.value = v : null),
507
+ "onUpdate:modelValue": f[4] || (f[4] = (v) => Q(g) ? g.value = v : null),
504
508
  style: { "margin-top": "35px" },
505
509
  type: "circle",
506
- status: l(F),
507
- textMap: l(z)
510
+ status: l(N),
511
+ textMap: l(S)
508
512
  }, null, 8, ["modelValue", "status", "textMap"])
509
513
  ]),
510
514
  _: 1
@@ -512,13 +516,13 @@ const $e = te.get("token"), Ne = te.post("put-object", (e) => (e.headers || (e.h
512
516
  }, 8, ["title", "modelValue"])
513
517
  ]));
514
518
  }
515
- }), Ve = (e, c) => {
516
- const p = e.__vccOpts || e;
517
- for (const [i, w] of c)
518
- p[i] = w;
519
- return p;
520
- }, Be = /* @__PURE__ */ Ve(je, [["__scopeId", "data-v-484f1c47"]]), Ze = de(Be);
519
+ }), Be = (e, c) => {
520
+ const m = e.__vccOpts || e;
521
+ for (const [i, x] of c)
522
+ m[i] = x;
523
+ return m;
524
+ }, Re = /* @__PURE__ */ Be(Ve, [["__scopeId", "data-v-a38bd509"]]), et = fe(Re);
521
525
  export {
522
- Ze as DasImportButton,
523
- Ze as default
526
+ et as DasImportButton,
527
+ et as default
524
528
  };