@das-fed/ui 7.0.7-hot.68 → 7.0.7-hot.69

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