@das-fed/ui 6.4.0-dev.54.8 → 6.4.0-dev.55
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.
- package/package.json +5 -5
- package/packages/business-components/change-enterprises/i18n/index.d.ts +3 -3
- package/packages/business-components/change-pwd/i18n/index.d.ts +26 -34
- package/packages/business-components/change-pwd/index.js +66 -65
- package/packages/business-components/change-pwd/index.js.gz +0 -0
- package/packages/business-components/device-panel/i18n/index.d.ts +172 -0
- package/packages/business-components/device-panel/index.js +331 -261
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/export-button/i18n/index.d.ts +16 -20
- package/packages/business-components/export-button/index.js +88 -86
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/i18n/index.d.ts +34 -30
- package/packages/business-components/import-button/index.js +148 -144
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/i18n/index.d.ts +6 -6
- package/packages/business-components/model-table-dialog/index.js +82 -83
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/src/ModelTable.vue.d.ts +17 -49
- package/packages/business-components/model-table-dialog/style.css +1 -1
- package/packages/business-components/model-table-dialog/style.css.gz +0 -0
- package/packages/business-components/process-configuration/i18n/index.d.ts +37 -29
- package/packages/business-components/process-configuration/index.js +103 -92
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-form/i18n/index.d.ts +109 -69
- package/packages/business-components/process-form/index.js +621 -580
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/style.css +1 -1
- package/packages/business-components/process-log/i18n/index.d.ts +4 -0
- package/packages/business-components/process-log/index.js +29 -28
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-search-form/i18n/index.d.ts +9 -9
- package/packages/business-components/process-search-form/index.js +77 -80
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/i18n/index.d.ts +8 -8
- package/packages/business-components/process-table/index.js +36 -36
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/business-components/upload-file/i18n/index.d.ts +2 -2
- package/packages/business-components/upload-file/index.js +45 -42
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/urgent-panel/i18n/index.d.ts +28 -0
- package/packages/business-components/urgent-panel/index.js +595 -576
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/user-org-dialog/i18n/index.d.ts +7 -3
- package/packages/business-components/user-org-dialog/index.js +92 -91
- package/packages/business-components/user-org-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/i18n/index.d.ts +29 -17
- package/packages/business-components/video-dialog/index.js +116 -113
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/components/button/index.js +54 -56
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/image-upload/i18n/index.d.ts +9 -21
- package/packages/components/image-upload/index.js +92 -92
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/i18n/index.d.ts +1 -30
- package/packages/components/image-viewer/index.js +213 -219
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/input/i18n/index.d.ts +3 -3
- package/packages/components/input/index.js +1 -1
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input-dialog-select/i18n/index.d.ts +1 -6
- package/packages/components/input-dialog-select/index.js +49 -51
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/live-player/i18n/index.d.ts +3 -7
- package/packages/components/live-player/index.js +7 -5
- package/packages/components/live-player/index.js.gz +0 -0
- package/packages/components/live-player/style.css +1 -1
- package/packages/components/loading/i18n/index.d.ts +1 -1
- package/packages/components/loading/index.js +1 -3
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/map/i18n/index.d.ts +7 -11
- package/packages/components/map/index.js +168 -167
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/i18n/index.d.ts +1 -1
- package/packages/components/menu-aside/index.js +1 -3
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/message/i18n/index.d.ts +1 -1
- package/packages/components/message/index.js +1 -3
- package/packages/components/message/index.js.gz +0 -0
- package/packages/components/notification/i18n/index.d.ts +1 -1
- package/packages/components/notification/index.js +1 -3
- package/packages/components/notification/index.js.gz +0 -0
- package/packages/components/pagination/index.js +1 -1
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/popover/i18n/index.d.ts +2 -2
- package/packages/components/preview/i18n/index.d.ts +1 -1
- package/packages/components/preview/index.js +6 -7
- package/packages/components/preview/index.js.gz +0 -0
- package/packages/components/preview/style.css +1 -1
- package/packages/components/scrollbar/index.js +2 -2
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/scrollbar/style.css +1 -1
- package/packages/components/scrollbar/style.css.gz +0 -0
- package/packages/components/search/index.js +26 -36
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search/style.css +1 -1
- package/packages/components/search/style.css.gz +0 -0
- package/packages/components/{search → search-form}/i18n/index.d.ts +6 -10
- package/packages/components/search-form/index.js +426 -418
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/spin/i18n/index.d.ts +1 -1
- package/packages/components/spin/index.js +1 -3
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/table/i18n/index.d.ts +19 -19
- package/packages/components/table/index.js +7 -7
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/style.css +1 -1
- package/packages/components/table/style.css.gz +0 -0
- package/packages/components/tabs/i18n/index.d.ts +3 -3
- package/packages/components/time-line/index.js +36 -40
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tooltip/i18n/index.d.ts +1 -1
- package/packages/components/tooltip/index.js +1 -3
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tree/i18n/index.d.ts +8 -12
- package/packages/components/tree/index.js +141 -137
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree/src/App.vue.d.ts +26 -36
- package/packages/components/upload/i18n/index.d.ts +5 -5
- package/packages/components/upload/index.js +1 -1
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/virtual-tree/i18n/index.d.ts +1 -1
- package/packages/components/virtual-tree/index.js +1 -3
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/button/i18n/index.d.ts +0 -2
- package/packages/components/time-line/i18n/index.d.ts +0 -7
|
@@ -1,12 +1,12 @@
|
|
|
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 x, defineComponent as ge, watch as ve, openBlock as he, createElementBlock as xe, createElementVNode as
|
|
4
|
-
import { t as
|
|
3
|
+
import { ref as x, defineComponent as ge, watch as ve, openBlock as he, createElementBlock as xe, createElementVNode as _, unref as l, renderSlot as se, createVNode as U, withCtx as E, createTextVNode as K, toDisplayString as A, createCommentVNode as oe, isRef as Q } from "vue";
|
|
4
|
+
import { t as c, i18n as M, setI18nRule as ye } from "@das-fed/web/packages/i18n/index";
|
|
5
5
|
import { DasDialog as re } from "@das-fed/ui/packages/components/dialog/index";
|
|
6
|
-
import { DasUpload as
|
|
7
|
-
import { DasProgress as
|
|
6
|
+
import { DasUpload as Ne } from "@das-fed/ui/packages/components/upload/index";
|
|
7
|
+
import { DasProgress as be } 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
|
|
9
|
+
import { iotMinio as ae, iotProgress as we } from "@das-fed/utils/api-services/modules/iot";
|
|
10
10
|
import { DasMessage as L } from "@das-fed/ui/packages/components/message/index";
|
|
11
11
|
import Ce from "dayjs";
|
|
12
12
|
import { getConfig as ne } from "@das-fed/utils/config";
|
|
@@ -14,41 +14,41 @@ import { extractFilename as ze } from "@das-fed/utils/common-tools";
|
|
|
14
14
|
import { getUserInfo as Te } from "@das-fed/utils/common-info/index";
|
|
15
15
|
import { pureImageSrc as ie } from "@das-fed/utils/pure-image-src";
|
|
16
16
|
let te = (e = 21) => {
|
|
17
|
-
let
|
|
17
|
+
let p = "", m = crypto.getRandomValues(new Uint8Array(e));
|
|
18
18
|
for (; e--; ) {
|
|
19
19
|
let n = m[e] & 63;
|
|
20
|
-
n < 36 ?
|
|
20
|
+
n < 36 ? p += n.toString(36) : n < 62 ? p += (n - 26).toString(36).toUpperCase() : n < 63 ? p += "_" : p += "-";
|
|
21
21
|
}
|
|
22
|
-
return
|
|
22
|
+
return p;
|
|
23
23
|
};
|
|
24
|
-
const ke = ae.get("token"),
|
|
25
|
-
let
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
},
|
|
24
|
+
const ke = 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)), Pe = we.get("progress"), Se = (e) => {
|
|
25
|
+
let p = x(!1), m = x(!1), n = x(""), h = x(0), u = x("normal"), y = x(!1), g, T = x(""), $ = x(""), I = x(""), z = x(""), P = x(!1), j = x(""), k = "", F = x(""), S;
|
|
26
|
+
const N = () => {
|
|
27
|
+
$.value = "", I.value = "", z.value = "", P.value = !1, j.value = "";
|
|
28
|
+
}, R = async () => {
|
|
29
29
|
const [s, o] = await ke().run();
|
|
30
30
|
return s ? { stauts: !1 } : { status: !0, data: o };
|
|
31
31
|
}, V = (s) => new Promise((o, a) => {
|
|
32
32
|
const i = [];
|
|
33
33
|
let t = 0;
|
|
34
34
|
for (; t < s.size; ) {
|
|
35
|
-
const
|
|
36
|
-
i.push(
|
|
35
|
+
const w = s.slice(t, t + 1048576);
|
|
36
|
+
i.push(w), t += 1048576;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
o(
|
|
38
|
+
const b = new Blob(i, { type: s.type });
|
|
39
|
+
o(b);
|
|
40
40
|
}), B = async (s, o, a, r = !1, i = !0, t = "") => {
|
|
41
|
-
k = t,
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
let
|
|
45
|
-
const me = r ? Ie :
|
|
41
|
+
k = t, F.value = "import", i && (u.value = "normal", h.value = 0, n.value = c("导入进度"), m.value = !0, T.value = ""), S = o;
|
|
42
|
+
const b = await R();
|
|
43
|
+
if (!b.status) return;
|
|
44
|
+
let w = b.data, C = null, { autoContentType: Y, bucketName: H, importFileName: J } = a;
|
|
45
|
+
const me = r ? Ie : Fe;
|
|
46
46
|
if (r) {
|
|
47
47
|
let X = [];
|
|
48
48
|
await o.forEach(async (G) => {
|
|
49
49
|
let ee = await V(G);
|
|
50
50
|
X.push(ee);
|
|
51
|
-
}), C = new FormData(), C.append("accessKeyId",
|
|
51
|
+
}), C = new FormData(), C.append("accessKeyId", w.accessKeyId), C.append("secretAccessKey", w.secretAccessKey), C.append("sessionToken", w.sessionToken), C.append("bucketName", H), o.forEach((G, ee) => {
|
|
52
52
|
C.append("file", X[ee]);
|
|
53
53
|
}), J.forEach((G) => {
|
|
54
54
|
C.append("filePaths", G);
|
|
@@ -56,9 +56,9 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
56
56
|
} else {
|
|
57
57
|
const X = await V(o);
|
|
58
58
|
C = {
|
|
59
|
-
accessKeyId:
|
|
60
|
-
secretAccessKey:
|
|
61
|
-
sessionToken:
|
|
59
|
+
accessKeyId: w.accessKeyId,
|
|
60
|
+
secretAccessKey: w.secretAccessKey,
|
|
61
|
+
sessionToken: w.sessionToken,
|
|
62
62
|
file: X,
|
|
63
63
|
bucketName: H,
|
|
64
64
|
filePath: J,
|
|
@@ -67,31 +67,31 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
67
67
|
}
|
|
68
68
|
const [pe, ce] = await me(C).run();
|
|
69
69
|
if (pe) return;
|
|
70
|
-
const de = await
|
|
70
|
+
const de = await De(ce.data), Z = await (s == null ? void 0 : s(de));
|
|
71
71
|
if (i) {
|
|
72
72
|
if (!Z.status) {
|
|
73
73
|
m.value = !1, u.value = "error";
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
n.value =
|
|
76
|
+
n.value = c("导入进度"), m.value = !0, d(Z.taskId, "import", "");
|
|
77
77
|
} else {
|
|
78
78
|
if (!Z.status) return;
|
|
79
79
|
u.value = "success", L.success({
|
|
80
|
-
message:
|
|
80
|
+
message: c("导入成功"),
|
|
81
81
|
grouping: !0,
|
|
82
82
|
repeatNum: 1
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}, O = async (s, o = "", a = "") => {
|
|
86
|
-
u.value = "normal", h.value = 0, n.value = a ||
|
|
86
|
+
u.value = "normal", h.value = 0, n.value = a || c("导出进度"), m.value = !0;
|
|
87
87
|
const r = await (s == null ? void 0 : s());
|
|
88
88
|
if (!r.status) {
|
|
89
89
|
m.value = !1, u.value = "error";
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
92
|
d(r.taskId, "action", "");
|
|
93
|
-
},
|
|
94
|
-
|
|
93
|
+
}, D = async (s, o = "", a = "xlsx") => {
|
|
94
|
+
F.value = "export", u.value = "normal", h.value = 0, n.value = c("导出进度"), m.value = !0;
|
|
95
95
|
const r = await (s == null ? void 0 : s());
|
|
96
96
|
if (!r.status) {
|
|
97
97
|
m.value = !1, u.value = "error";
|
|
@@ -104,8 +104,8 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
104
104
|
}, f = () => {
|
|
105
105
|
clearTimeout(g), g = null, m.value = !1;
|
|
106
106
|
}, v = async (s, o = "export", a, r = "") => {
|
|
107
|
-
var
|
|
108
|
-
const [i, t] = await
|
|
107
|
+
var w, C;
|
|
108
|
+
const [i, t] = await Pe("", {
|
|
109
109
|
url: `progress/${s}`
|
|
110
110
|
}).run();
|
|
111
111
|
if (i) {
|
|
@@ -113,71 +113,71 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
h.value = t.percentage;
|
|
116
|
-
const
|
|
116
|
+
const b = o == "export" ? c("导出") : c("导入");
|
|
117
117
|
if (h.value == 100)
|
|
118
118
|
if (T.value = t, y.value = !1, f(), o == "export")
|
|
119
|
-
t.status == 1 ? (u.value = "success", ue(`${ne().baseURL}/oss${t.filePath}`, a, r), y.value = !1) : t.status == 2 && (z.value = t.message || `${
|
|
120
|
-
message: t.message || `${
|
|
119
|
+
t.status == 1 ? (u.value = "success", ue(`${ne().baseURL}/oss${t.filePath}`, a, r), y.value = !1) : t.status == 2 && (z.value = t.message || `${b}${c("失败")}`, L.error({
|
|
120
|
+
message: t.message || `${b}${c("失败")}`,
|
|
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 Y = (
|
|
128
|
-
Y.length && Y[2],
|
|
127
|
+
const Y = (w = S.name) == null ? void 0 : w.match(/(.*?)(\.[^.]*$|$)/);
|
|
128
|
+
Y.length && Y[2], P.value = !0;
|
|
129
129
|
let H = await ze(`/oss/${t == null ? void 0 : t.filePath}`);
|
|
130
130
|
const J = ((C = H == null ? void 0 : H.split("/")) == null ? void 0 : C.pop()) || "";
|
|
131
|
-
|
|
131
|
+
$.value = k || J, I.value = S.sizeText, z.value = c("部分数据校验不通过,请下载附件并修改,重新导入!"), j.value = `${ne().baseURL}/oss/${t == null ? void 0 : t.filePath}`;
|
|
132
132
|
}
|
|
133
|
-
q(t.status,
|
|
133
|
+
q(t.status, b, t.message), t.status == 1 && (p.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) : (T.value = t, y.value = !1, q(t.status,
|
|
138
|
+
}, 50) : (T.value = t, y.value = !1, q(t.status, b, t.message), f(), P.value = !0, z.value = (t == null ? void 0 : t.message) || "", e("error", t));
|
|
139
139
|
}, q = (s, o, a) => {
|
|
140
140
|
s == 1 ? (u.value = "success", L.success({
|
|
141
|
-
message:
|
|
141
|
+
message: c("business-components_export-success-tip", o),
|
|
142
142
|
grouping: !0,
|
|
143
143
|
repeatNum: 1
|
|
144
|
-
}),
|
|
145
|
-
message:
|
|
144
|
+
}), $.value = "", I.value = "", z.value = "") : s == 2 ? (u.value = "error", L.error({
|
|
145
|
+
message: c("business-components_export-failure-tip", o),
|
|
146
146
|
grouping: !0,
|
|
147
147
|
repeatNum: 1
|
|
148
148
|
})) : s == 3 && (u.value = "error", L.error({
|
|
149
|
-
message:
|
|
149
|
+
message: c("business-components_export-partially-failure-tip", o),
|
|
150
150
|
grouping: !0,
|
|
151
151
|
repeatNum: 1
|
|
152
152
|
}));
|
|
153
153
|
};
|
|
154
154
|
return {
|
|
155
|
-
importDialog:
|
|
155
|
+
importDialog: p,
|
|
156
156
|
showProgressDialog: m,
|
|
157
157
|
progressTitle: n,
|
|
158
158
|
percent: h,
|
|
159
159
|
progressStatus: u,
|
|
160
160
|
progressLoading: y,
|
|
161
161
|
progressResult: T,
|
|
162
|
-
errorFileName:
|
|
162
|
+
errorFileName: $,
|
|
163
163
|
errorFileSize: I,
|
|
164
164
|
errorMessage: z,
|
|
165
|
-
errorImport:
|
|
165
|
+
errorImport: P,
|
|
166
166
|
errorFilePath: j,
|
|
167
|
-
fileHandleType:
|
|
167
|
+
fileHandleType: F,
|
|
168
168
|
fileImport: B,
|
|
169
|
-
fileExport:
|
|
169
|
+
fileExport: D,
|
|
170
170
|
fileAction: O,
|
|
171
171
|
generateUniqueName: (s) => {
|
|
172
172
|
const o = s == null ? void 0 : s.match(/(.*?)(\.[^.]*$|$)/), a = o.length ? o[2] : "";
|
|
173
173
|
return `${o.length ? o[1] : s}${te()}${a}`;
|
|
174
174
|
},
|
|
175
175
|
downloadFile: ue,
|
|
176
|
-
resetStataus:
|
|
176
|
+
resetStataus: N,
|
|
177
177
|
checkProgress: d
|
|
178
178
|
};
|
|
179
|
-
},
|
|
180
|
-
let
|
|
179
|
+
}, $e = (e) => {
|
|
180
|
+
let p = e == null ? void 0 : e.toLocaleLowerCase();
|
|
181
181
|
return {
|
|
182
182
|
excel: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
183
183
|
pdf: "application/pdf",
|
|
@@ -204,27 +204,27 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
204
204
|
crt: "application/x-x509-ca-cert",
|
|
205
205
|
der: "application/x-x509-ca-cert",
|
|
206
206
|
cer: "application/pkix-cert"
|
|
207
|
-
}[
|
|
208
|
-
}, ue = (e,
|
|
207
|
+
}[p];
|
|
208
|
+
}, ue = (e, p, m = "excel") => {
|
|
209
209
|
const n = new XMLHttpRequest();
|
|
210
210
|
n.open("get", e), n.setRequestHeader("Content-Type", "application/json; charset=UTF-8"), n.responseType = "blob", n.onload = function(h) {
|
|
211
211
|
const u = new Blob([this.response], {
|
|
212
|
-
type:
|
|
212
|
+
type: $e(m)
|
|
213
213
|
}), y = URL.createObjectURL(u);
|
|
214
214
|
if (window.navigator.msSaveOrOpenBlob)
|
|
215
|
-
navigator.msSaveBlob(u,
|
|
215
|
+
navigator.msSaveBlob(u, p);
|
|
216
216
|
else {
|
|
217
217
|
const g = document.createElement("a");
|
|
218
|
-
g.href = y, g.download =
|
|
218
|
+
g.href = y, g.download = p, g.click(), window.URL.revokeObjectURL(y);
|
|
219
219
|
}
|
|
220
220
|
}, n.send();
|
|
221
|
-
},
|
|
221
|
+
}, De = (e) => new Promise((p, m) => {
|
|
222
222
|
var n = new FileReader();
|
|
223
223
|
n.onload = function(h) {
|
|
224
224
|
let u = "";
|
|
225
|
-
typeof n.result == "string" && (u = JSON.parse(n.result)),
|
|
225
|
+
typeof n.result == "string" && (u = JSON.parse(n.result)), p(u);
|
|
226
226
|
}, n.readAsText(e);
|
|
227
|
-
}), Ue = (e,
|
|
227
|
+
}), Ue = (e, p) => {
|
|
228
228
|
var o;
|
|
229
229
|
const {
|
|
230
230
|
importDialog: m,
|
|
@@ -234,36 +234,36 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
234
234
|
progressStatus: y,
|
|
235
235
|
progressLoading: g,
|
|
236
236
|
errorFileName: T,
|
|
237
|
-
errorFileSize:
|
|
237
|
+
errorFileSize: $,
|
|
238
238
|
errorMessage: I,
|
|
239
239
|
errorImport: z,
|
|
240
|
-
errorFilePath:
|
|
240
|
+
errorFilePath: P,
|
|
241
241
|
fileHandleType: j,
|
|
242
242
|
fileImport: k,
|
|
243
|
-
fileExport:
|
|
244
|
-
downloadFile:
|
|
245
|
-
} =
|
|
246
|
-
let
|
|
243
|
+
fileExport: F,
|
|
244
|
+
downloadFile: S
|
|
245
|
+
} = Se(p);
|
|
246
|
+
let N = x([]), R = (o = Te()) == null ? void 0 : o.tenantId;
|
|
247
247
|
const V = () => {
|
|
248
|
-
|
|
248
|
+
N.value = [], z.value = !1, T.value = "", $.value = "", I.value = "", m.value = !0, P.value = "", p("open");
|
|
249
249
|
};
|
|
250
250
|
let B;
|
|
251
251
|
const O = (a) => {
|
|
252
|
-
const r = e.fileType.split(","), i = a.name.substring(a.name.lastIndexOf(".")), t =
|
|
252
|
+
const r = e.fileType.split(","), i = a.name.substring(a.name.lastIndexOf(".")), t = D(a.sizeText), b = D(e.fileMaxSize);
|
|
253
253
|
if (!r.includes(i)) {
|
|
254
|
-
L.warning(
|
|
255
|
-
|
|
254
|
+
L.warning(c("文件格式错误,请重新上传!")), setTimeout(() => {
|
|
255
|
+
N.value = [];
|
|
256
256
|
});
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
|
-
if (t >
|
|
260
|
-
L.warning(`${
|
|
261
|
-
|
|
259
|
+
if (t > b) {
|
|
260
|
+
L.warning(`${c("文件大小不超过")}${e.fileMaxSize}`), setTimeout(() => {
|
|
261
|
+
N.value = [];
|
|
262
262
|
});
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
B = a.name;
|
|
266
|
-
},
|
|
266
|
+
}, D = (a) => {
|
|
267
267
|
let r = a.match(/\d+(\.\d+)?/)[0], i = a.match(/[a-zA-z]+/gi)[0], t = 0;
|
|
268
268
|
return r = parseFloat(r), i = i.toLowerCase(), i === "gb" || i === "g" ? t = (r * 1024 * 1024 * 1024).toFixed(2) : i === "mb" || i === "m" ? t = (r * 1024 * 1024).toFixed(2) : i === "kb" || i === "k" ? t = (r * 1024).toFixed(2) : i === "b" && (t = r), parseFloat(t);
|
|
269
269
|
}, d = async (a) => {
|
|
@@ -274,19 +274,19 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
274
274
|
filePath: a.value,
|
|
275
275
|
taskId: i,
|
|
276
276
|
...e.importParams
|
|
277
|
-
},
|
|
278
|
-
return
|
|
277
|
+
}, b = e.importParamsPosition === "params" ? e.importFun("", { params: t }) : e.importFun(t), [w, C] = await b.run();
|
|
278
|
+
return w ? { status: !1 } : { status: !0, taskId: i };
|
|
279
279
|
}, f = async () => {
|
|
280
|
-
if (!
|
|
280
|
+
if (!N.value.length) return L.warning(c("请上传文件"));
|
|
281
281
|
const a = {
|
|
282
282
|
bucketName: e.bucketName,
|
|
283
|
-
importFileName: `${
|
|
284
|
-
}, r = e.maxCount > 1, i = e.maxCount > 1 ?
|
|
283
|
+
importFileName: `${R}/${e.ossName}/${B}`
|
|
284
|
+
}, r = e.maxCount > 1, i = e.maxCount > 1 ? N.value : N.value[0];
|
|
285
285
|
await k(d, i, a, r);
|
|
286
286
|
}, v = () => {
|
|
287
|
-
P
|
|
287
|
+
S(P.value, T.value);
|
|
288
288
|
}, q = () => {
|
|
289
|
-
|
|
289
|
+
F(le, e.templateName);
|
|
290
290
|
}, le = async () => {
|
|
291
291
|
let a = te();
|
|
292
292
|
const [r, i] = await e.templateFun({ taskId: a }).run();
|
|
@@ -299,11 +299,11 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
299
299
|
progressStatus: y,
|
|
300
300
|
progressLoading: g,
|
|
301
301
|
errorFileName: T,
|
|
302
|
-
errorFileSize:
|
|
302
|
+
errorFileSize: $,
|
|
303
303
|
errorMessage: I,
|
|
304
304
|
errorImport: z,
|
|
305
305
|
importDialog: m,
|
|
306
|
-
fileList:
|
|
306
|
+
fileList: N,
|
|
307
307
|
fileHandleType: j,
|
|
308
308
|
showImportHandle: V,
|
|
309
309
|
confirmImport: f,
|
|
@@ -312,7 +312,7 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
312
312
|
downTemplate: async () => {
|
|
313
313
|
let a = "";
|
|
314
314
|
if (e.templateUrl)
|
|
315
|
-
a = e.templateUrl,
|
|
315
|
+
a = e.templateUrl, S(ie(a), e.templateName);
|
|
316
316
|
else if (e.templateFun) {
|
|
317
317
|
if (e.templateType === "static") {
|
|
318
318
|
if (e.templateUrl)
|
|
@@ -321,13 +321,13 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
321
321
|
const [r, i] = await e.templateFun().run();
|
|
322
322
|
a = i;
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
S(ie(a), e.templateName);
|
|
325
325
|
}
|
|
326
326
|
e.templateType === "dynamic" && e.templateFun && q();
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
};
|
|
330
|
-
}, Me = { class: "das-import-button" }, Le = { class: "tip-box" }, je = { class: "first-line" },
|
|
330
|
+
}, Me = { class: "das-import-button" }, Le = { class: "tip-box" }, je = { class: "first-line" }, Ee = { class: "second-line" }, Re = /* @__PURE__ */ ge({
|
|
331
331
|
__name: "App",
|
|
332
332
|
props: {
|
|
333
333
|
importFun: {},
|
|
@@ -348,44 +348,44 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
348
348
|
multiple: { type: Boolean, default: !1 }
|
|
349
349
|
},
|
|
350
350
|
emits: ["open", "success", "error"],
|
|
351
|
-
setup(e, { expose:
|
|
351
|
+
setup(e, { expose: p, emit: m }) {
|
|
352
352
|
const n = e, h = m, {
|
|
353
353
|
showProgressDialog: u,
|
|
354
354
|
progressTitle: y,
|
|
355
355
|
percent: g,
|
|
356
356
|
progressStatus: T,
|
|
357
|
-
progressLoading:
|
|
357
|
+
progressLoading: $,
|
|
358
358
|
errorFileName: I,
|
|
359
359
|
errorFileSize: z,
|
|
360
|
-
errorMessage:
|
|
360
|
+
errorMessage: P,
|
|
361
361
|
errorImport: j,
|
|
362
362
|
importDialog: k,
|
|
363
|
-
fileList:
|
|
364
|
-
fileHandleType:
|
|
365
|
-
showImportHandle:
|
|
366
|
-
confirmImport:
|
|
363
|
+
fileList: F,
|
|
364
|
+
fileHandleType: S,
|
|
365
|
+
showImportHandle: N,
|
|
366
|
+
confirmImport: R,
|
|
367
367
|
fileUpload: V,
|
|
368
368
|
errorFileDownload: B,
|
|
369
369
|
downTemplate: O
|
|
370
370
|
} = Ue(n, h);
|
|
371
|
-
let
|
|
372
|
-
return ve(
|
|
373
|
-
d.includes("import") ?
|
|
374
|
-
}),
|
|
375
|
-
confirmImport:
|
|
376
|
-
showImportHandle:
|
|
371
|
+
let D;
|
|
372
|
+
return ve(S, (d) => {
|
|
373
|
+
d.includes("import") ? D = [c("正在导入中..."), c("导入失败"), c("导入成功")] : D = [c("正在导出中..."), c("导出失败"), c("导出成功")];
|
|
374
|
+
}), p({
|
|
375
|
+
confirmImport: R,
|
|
376
|
+
showImportHandle: N
|
|
377
377
|
}), (d, f) => (he(), xe("div", Me, [
|
|
378
|
-
|
|
378
|
+
_("div", {
|
|
379
379
|
onClick: f[0] || (f[0] = //@ts-ignore
|
|
380
|
-
(...v) => l(
|
|
380
|
+
(...v) => l(N) && l(N)(...v))
|
|
381
381
|
}, [
|
|
382
382
|
se(d.$slots, "default", {}, () => [
|
|
383
383
|
U(l(W), {
|
|
384
384
|
size: "middle",
|
|
385
385
|
"btn-type": "primary"
|
|
386
386
|
}, {
|
|
387
|
-
default:
|
|
388
|
-
|
|
387
|
+
default: E(() => [
|
|
388
|
+
K(
|
|
389
389
|
A(l(M)("导入").value),
|
|
390
390
|
1
|
|
391
391
|
/* TEXT */
|
|
@@ -405,14 +405,14 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
405
405
|
width: "610px",
|
|
406
406
|
height: "500px"
|
|
407
407
|
}, {
|
|
408
|
-
footer:
|
|
409
|
-
|
|
408
|
+
footer: E(() => [
|
|
409
|
+
_("div", null, [
|
|
410
410
|
U(l(W), {
|
|
411
411
|
size: "middle",
|
|
412
412
|
onClick: f[2] || (f[2] = (v) => k.value = !1)
|
|
413
413
|
}, {
|
|
414
|
-
default:
|
|
415
|
-
|
|
414
|
+
default: E(() => [
|
|
415
|
+
K(
|
|
416
416
|
A(l(M)("取消").value),
|
|
417
417
|
1
|
|
418
418
|
/* TEXT */
|
|
@@ -424,12 +424,12 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
424
424
|
U(l(W), {
|
|
425
425
|
size: "middle",
|
|
426
426
|
"btn-type": "primary",
|
|
427
|
-
disabled: d.openDisabled && l(
|
|
427
|
+
disabled: d.openDisabled && l(F).length === 0,
|
|
428
428
|
style: { "margin-left": "12px" },
|
|
429
|
-
onClick: l(
|
|
429
|
+
onClick: l(R)
|
|
430
430
|
}, {
|
|
431
|
-
default:
|
|
432
|
-
|
|
431
|
+
default: E(() => [
|
|
432
|
+
K(
|
|
433
433
|
A(l(M)(`${d.confirmButtonName}`).value),
|
|
434
434
|
1
|
|
435
435
|
/* TEXT */
|
|
@@ -440,11 +440,11 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
440
440
|
}, 8, ["disabled", "onClick"])
|
|
441
441
|
])
|
|
442
442
|
]),
|
|
443
|
-
default:
|
|
443
|
+
default: E(() => [
|
|
444
444
|
se(d.$slots, "tip", {}, () => [
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
_("div", Le, [
|
|
446
|
+
_("div", je, [
|
|
447
|
+
K(
|
|
448
448
|
A(l(M)("1、点击下载 ").value),
|
|
449
449
|
1
|
|
450
450
|
/* TEXT */
|
|
@@ -455,8 +455,8 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
455
455
|
block: "",
|
|
456
456
|
onClick: l(O)
|
|
457
457
|
}, {
|
|
458
|
-
default:
|
|
459
|
-
|
|
458
|
+
default: E(() => [
|
|
459
|
+
K(
|
|
460
460
|
A(l(M)(`${d.templateName}`).value),
|
|
461
461
|
1
|
|
462
462
|
/* TEXT */
|
|
@@ -466,22 +466,22 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
466
466
|
/* STABLE */
|
|
467
467
|
}, 8, ["onClick"])
|
|
468
468
|
]),
|
|
469
|
-
|
|
469
|
+
_(
|
|
470
470
|
"div",
|
|
471
|
-
|
|
471
|
+
Ee,
|
|
472
472
|
A(l(M)("2、仅支持上传Excel文件,重复数据以最后一条为准").value),
|
|
473
473
|
1
|
|
474
474
|
/* TEXT */
|
|
475
475
|
)
|
|
476
476
|
])
|
|
477
477
|
], !0),
|
|
478
|
-
U(l(
|
|
479
|
-
modelValue: l(
|
|
480
|
-
"onUpdate:modelValue": f[1] || (f[1] = (v) => Q(
|
|
478
|
+
U(l(Ne), {
|
|
479
|
+
modelValue: l(F),
|
|
480
|
+
"onUpdate:modelValue": f[1] || (f[1] = (v) => Q(F) ? F.value = v : null),
|
|
481
481
|
error: l(j),
|
|
482
482
|
"error-file-name": l(I),
|
|
483
483
|
"error-file-size": l(z),
|
|
484
|
-
"error-message": l(
|
|
484
|
+
"error-message": l(P),
|
|
485
485
|
accept: d.fileType,
|
|
486
486
|
maxCount: d.maxCount,
|
|
487
487
|
multiple: d.multiple,
|
|
@@ -501,14 +501,14 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
501
501
|
"onUpdate:modelValue": f[5] || (f[5] = (v) => Q(u) ? u.value = v : null),
|
|
502
502
|
type: "feedback"
|
|
503
503
|
}, {
|
|
504
|
-
default:
|
|
505
|
-
U(l(
|
|
504
|
+
default: E(() => [
|
|
505
|
+
U(l(be), {
|
|
506
506
|
modelValue: l(g),
|
|
507
507
|
"onUpdate:modelValue": f[4] || (f[4] = (v) => Q(g) ? g.value = v : null),
|
|
508
508
|
style: { "margin-top": "35px" },
|
|
509
509
|
type: "circle",
|
|
510
510
|
status: l(T),
|
|
511
|
-
textMap: l(
|
|
511
|
+
textMap: l(D)
|
|
512
512
|
}, null, 8, ["modelValue", "status", "textMap"])
|
|
513
513
|
]),
|
|
514
514
|
_: 1
|
|
@@ -516,37 +516,41 @@ const ke = ae.get("token"), $e = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
516
516
|
}, 8, ["title", "modelValue"])
|
|
517
517
|
]));
|
|
518
518
|
}
|
|
519
|
-
}), Ve = (e,
|
|
519
|
+
}), Ve = (e, p) => {
|
|
520
520
|
const m = e.__vccOpts || e;
|
|
521
|
-
for (const [n, h] of
|
|
521
|
+
for (const [n, h] of p)
|
|
522
522
|
m[n] = h;
|
|
523
523
|
return m;
|
|
524
|
-
}, Be = /* @__PURE__ */ Ve(
|
|
524
|
+
}, Be = /* @__PURE__ */ Ve(Re, [["__scopeId", "data-v-3fab7506"]]), He = {
|
|
525
525
|
点击下载: { "zh-CN": "点击下载", en: "Click to download" },
|
|
526
526
|
仅支持上传: { "zh-CN": "仅支持上传", en: "Only support uploading" },
|
|
527
|
-
文件: { "zh-CN": "文件", en: "
|
|
527
|
+
文件: { "zh-CN": "文件", en: "File" },
|
|
528
528
|
重复数据以最后一条为准: { "zh-CN": "重复数据以最后一条为准", en: "Duplicate data is subject to the last entry" },
|
|
529
529
|
取消: { "zh-CN": "取消", en: "Cancel" },
|
|
530
530
|
正在导入中: { "zh-CN": "正在导入中", en: "Importing" },
|
|
531
|
-
导入失败: { "zh-CN": "导入失败", en: "Import
|
|
531
|
+
导入失败: { "zh-CN": "导入失败", en: "Import Failed" },
|
|
532
532
|
正在导出中: { "zh-CN": "正在导出中", en: "Exporting" },
|
|
533
|
-
导出失败: { "zh-CN": "导出失败", en: "Export
|
|
534
|
-
导出成功: { "zh-CN": "导出成功", en: "Export
|
|
533
|
+
导出失败: { "zh-CN": "导出失败", en: "Export Failed" },
|
|
534
|
+
导出成功: { "zh-CN": "导出成功", en: "Export Successful" },
|
|
535
535
|
文件格式错误: { "zh-CN": "文件格式错误", en: "File format error" },
|
|
536
536
|
请重新上传: { "zh-CN": "请重新上传", en: "Please upload again" },
|
|
537
|
-
文件大小不超过: { "zh-CN": "文件大小不超过", en: "File size
|
|
538
|
-
请上传文件: { "zh-CN": "请上传文件", en: "Please upload file" },
|
|
539
|
-
导入进度: { "zh-CN": "导入进度", en: "Import
|
|
540
|
-
导入成功: { "zh-CN": "导入成功", en: "Import
|
|
541
|
-
导出进度: { "zh-CN": "导出进度", en: "Export
|
|
537
|
+
文件大小不超过: { "zh-CN": "文件大小不超过", en: "File size must not exceed" },
|
|
538
|
+
请上传文件: { "zh-CN": "请上传文件", en: "Please upload the file" },
|
|
539
|
+
导入进度: { "zh-CN": "导入进度", en: "Import Progress" },
|
|
540
|
+
导入成功: { "zh-CN": "导入成功", en: "Import Successful" },
|
|
541
|
+
导出进度: { "zh-CN": "导出进度", en: "Export Progress" },
|
|
542
542
|
导出: { "zh-CN": "导出", en: "Export" },
|
|
543
543
|
导入: { "zh-CN": "导入", en: "Import" },
|
|
544
544
|
失败: { "zh-CN": "失败", en: "Failure" },
|
|
545
|
-
部分数据校验不通过: { "zh-CN": "部分数据校验不通过", en: "Some data validation failed" },
|
|
546
|
-
请下载附件并修改: { "zh-CN": "请下载附件并修改", en: "Please download the attachment and modify it" },
|
|
547
|
-
重新导入: { "zh-CN": "重新导入", en: "Re-import" },
|
|
548
545
|
成功: { "zh-CN": "成功", en: "Success" },
|
|
549
|
-
部分: { "zh-CN": "部分", en: "Partial" }
|
|
546
|
+
部分: { "zh-CN": "部分", en: "Partial" },
|
|
547
|
+
"部分数据校验不通过,请下载附件并修改,重新导入!": {
|
|
548
|
+
"zh-CN": "部分数据校验不通过,请下载附件并修改,重新导入!",
|
|
549
|
+
en: "Some data validation failed, please download the attachment, modify, and re-import!"
|
|
550
|
+
},
|
|
551
|
+
"文件格式错误,请重新上传!": { "zh-CN": "文件格式错误,请重新上传!", en: "File format error, please re-upload!" },
|
|
552
|
+
"正在导入中...": { "zh-CN": "正在导入中...", en: "Importing..." },
|
|
553
|
+
"正在导出中...": { "zh-CN": "正在导出中...", en: "Exporting..." }
|
|
550
554
|
};
|
|
551
555
|
ye(He);
|
|
552
556
|
const at = fe(Be);
|
|
Binary file
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
全部: {
|
|
3
|
-
|
|
3
|
+
'zh-CN': string;
|
|
4
4
|
en: string;
|
|
5
5
|
};
|
|
6
6
|
请输入关键词: {
|
|
7
|
-
|
|
7
|
+
'zh-CN': string;
|
|
8
8
|
en: string;
|
|
9
9
|
};
|
|
10
10
|
取消: {
|
|
11
|
-
|
|
11
|
+
'zh-CN': string;
|
|
12
12
|
en: string;
|
|
13
13
|
};
|
|
14
14
|
确定: {
|
|
15
|
-
|
|
15
|
+
'zh-CN': string;
|
|
16
16
|
en: string;
|
|
17
17
|
};
|
|
18
18
|
标题: {
|
|
19
|
-
|
|
19
|
+
'zh-CN': string;
|
|
20
20
|
en: string;
|
|
21
21
|
};
|
|
22
22
|
提交成功: {
|
|
23
|
-
|
|
23
|
+
'zh-CN': string;
|
|
24
24
|
en: string;
|
|
25
25
|
};
|
|
26
26
|
};
|