@das-fed/ui 6.4.0-test.5.1 → 6.4.0-test.6
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/device-panel/index.js +37113 -36843
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/src/apis.d.ts +0 -2
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/import-button/i18n/index.d.ts +16 -6
- package/packages/business-components/import-button/index.js +147 -141
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/import-button/style.css +1 -1
- package/packages/business-components/process-configuration/i18n/index.d.ts +5 -0
- package/packages/business-components/process-configuration/index.js +2 -1
- package/packages/business-components/process-configuration/index.js.gz +0 -0
- package/packages/business-components/process-configuration/src/hooks/useDeleteDialog.d.ts +2 -3
- package/packages/business-components/process-form/index.js +64 -63
- 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-search-form/index.js +56 -56
- package/packages/business-components/process-search-form/index.js.gz +0 -0
- package/packages/business-components/process-table/index.js +539 -528
- package/packages/business-components/process-table/index.js.gz +0 -0
- package/packages/components/autocomplete/index.d.ts +13 -4
- package/packages/components/autocomplete/index.js +135 -122
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/src/index.vue.d.ts +2 -1
- package/packages/components/autocomplete/src/type.d.ts +4 -1
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/cascader/index.js +41 -40
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/date-picker/index.js +238 -237
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/edit-table/index.d.ts +9 -9
- package/packages/components/edit-table/index.js +2010 -1658
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/edit-table/src/hooks/use-validator.d.ts +9 -3
- package/packages/components/edit-table/src/index.vue.d.ts +1 -1
- package/packages/components/edit-table/src/type.d.ts +13 -0
- package/packages/components/edit-table/src/utils.d.ts +9 -5
- package/packages/components/edit-table/style.css +1 -1
- package/packages/components/edit-table/style.css.gz +0 -0
- package/packages/components/form-item/index.js +3 -3
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/input/index.js +103 -102
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +18 -18
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-dialog-select/style.css +1 -1
- package/packages/components/input-dialog-select/style.css.gz +0 -0
- package/packages/components/input-number/index.js +63 -63
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/src/App.vue.d.ts +1 -3
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/map/index.js +388 -385
- package/packages/components/map/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +680 -606
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/search-form/i18n/index.d.ts +5 -0
- package/packages/components/search-form/index.js +44 -43
- 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/select/index.js +213 -213
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-list/index.d.ts +23 -3
- package/packages/components/select-list/index.js +599 -565
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/src/Index.vue.d.ts +9 -1
- package/packages/components/select-list/src/hooks/use-select-list.d.ts +2 -0
- package/packages/components/select-list/src/type.d.ts +22 -4
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +3 -3
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +42 -42
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/table/i18n/index.d.ts +0 -20
- package/packages/components/table/index.js +0 -4
- 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/text-tooltip/index.js +660 -651
- package/packages/components/text-tooltip/index.js.gz +0 -0
- package/packages/components/text-tooltip/src/type.d.ts +1 -62
- package/packages/components/tree/index.js +222 -222
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree/src/type.d.ts +1 -0
- package/packages/components/tree-select/index.js +374 -345
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +1 -0
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +2 -1
- package/packages/components/tree-select/src/type.d.ts +3 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
|
Binary file
|
|
@@ -4,7 +4,7 @@ declare const _default: {
|
|
|
4
4
|
en: string;
|
|
5
5
|
_appCode: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
'2\u3001\u4EC5\u652F\u6301\u4E0A\u4F20Excel\u6587\u4EF6\uFF0C\u91CD\u590D\u6570\u636E\u4EE5\u6700\u540E\u4E00\u6761\u4E3A\u51C6': {
|
|
8
8
|
'zh-CN': string;
|
|
9
9
|
en: string;
|
|
10
10
|
_appCode: string;
|
|
@@ -14,11 +14,6 @@ declare const _default: {
|
|
|
14
14
|
en: string;
|
|
15
15
|
_appCode: string;
|
|
16
16
|
};
|
|
17
|
-
重复数据以最后一条为准: {
|
|
18
|
-
'zh-CN': string;
|
|
19
|
-
en: string;
|
|
20
|
-
_appCode: string;
|
|
21
|
-
};
|
|
22
17
|
取消: {
|
|
23
18
|
'zh-CN': string;
|
|
24
19
|
en: string;
|
|
@@ -129,5 +124,20 @@ declare const _default: {
|
|
|
129
124
|
en: string;
|
|
130
125
|
_appCode: string;
|
|
131
126
|
};
|
|
127
|
+
'business-components_export-success-tip': {
|
|
128
|
+
'zh-CN': string;
|
|
129
|
+
en: string;
|
|
130
|
+
_appCode: string;
|
|
131
|
+
};
|
|
132
|
+
'business-components_export-failure-tip': {
|
|
133
|
+
'zh-CN': string;
|
|
134
|
+
en: string;
|
|
135
|
+
_appCode: string;
|
|
136
|
+
};
|
|
137
|
+
'business-components_export-partially-failure-tip': {
|
|
138
|
+
'zh-CN': string;
|
|
139
|
+
en: string;
|
|
140
|
+
_appCode: string;
|
|
141
|
+
};
|
|
132
142
|
};
|
|
133
143
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
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 w, defineComponent as ge, watch as ve, openBlock as he, createElementBlock as we, createElementVNode as O, unref as o, renderSlot as re, createVNode as
|
|
4
|
-
import { t as c, i18n as
|
|
5
|
-
import { DasDialog as
|
|
6
|
-
import { DasUpload as
|
|
7
|
-
import { DasProgress as
|
|
3
|
+
import { ref as w, defineComponent as ge, watch as ve, openBlock as he, createElementBlock as we, createElementVNode as O, unref as o, renderSlot as re, createVNode as D, withCtx as L, createTextVNode as K, toDisplayString as H, createCommentVNode as se, isRef as Q } from "vue";
|
|
4
|
+
import { t as c, i18n as U, setI18nRule as Ce } from "@das-fed/web/packages/i18n/index";
|
|
5
|
+
import { DasDialog as le } from "@das-fed/ui/packages/components/dialog/index";
|
|
6
|
+
import { DasUpload as xe } from "@das-fed/ui/packages/components/upload/index";
|
|
7
|
+
import { DasProgress as ke } from "@das-fed/ui/packages/components/progress/index";
|
|
8
8
|
import { DasButton as W } from "@das-fed/ui/packages/components/button/index";
|
|
9
9
|
import { iotMinio as ae, iotProgress as ye } from "@das-fed/utils/api-services/modules/iot";
|
|
10
10
|
import { DasMessage as M } from "@das-fed/ui/packages/components/message/index";
|
|
@@ -21,40 +21,40 @@ let te = (e = 21) => {
|
|
|
21
21
|
}
|
|
22
22
|
return m;
|
|
23
23
|
};
|
|
24
|
-
const Te = ae.get("token"),
|
|
25
|
-
let m = w(!1), u = w(!1), n = w(""), h = w(0), p = w("normal"), C = w(!1), g, z = w(""), P = w(""),
|
|
26
|
-
const
|
|
27
|
-
P.value = "",
|
|
24
|
+
const Te = ae.get("token"), _e = ae.post("put-object", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Fe = ae.post("upload-objects", (e) => (e.headers || (e.headers = {}), e.headers["Content-Type"] = "multipart/form-data", e.responseType = "blob", e)), Ie = ye.get("progress"), $e = (e) => {
|
|
25
|
+
let m = w(!1), u = w(!1), n = w(""), h = w(0), p = w("normal"), C = w(!1), g, z = w(""), P = w(""), F = w(""), b = w(""), I = w(!1), E = w(""), T = "", _ = w(""), $;
|
|
26
|
+
const x = () => {
|
|
27
|
+
P.value = "", F.value = "", b.value = "", I.value = !1, E.value = "";
|
|
28
28
|
}, j = async () => {
|
|
29
|
-
const [r,
|
|
30
|
-
return r ? { stauts: !1 } : { status: !0, data:
|
|
31
|
-
}, R = (r) => new Promise((
|
|
29
|
+
const [r, s] = await Te().run();
|
|
30
|
+
return r ? { stauts: !1 } : { status: !0, data: s };
|
|
31
|
+
}, R = (r) => new Promise((s, a) => {
|
|
32
32
|
const i = [];
|
|
33
33
|
let t = 0;
|
|
34
34
|
for (; t < r.size; ) {
|
|
35
35
|
const y = r.slice(t, t + 1048576);
|
|
36
36
|
i.push(y), t += 1048576;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
}), V = async (r,
|
|
41
|
-
T = t,
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
44
|
-
let y =
|
|
45
|
-
const ue =
|
|
46
|
-
if (
|
|
38
|
+
const k = new Blob(i, { type: r.type });
|
|
39
|
+
s(k);
|
|
40
|
+
}), V = async (r, s, a, l = !1, i = !0, t = "") => {
|
|
41
|
+
T = t, _.value = "import", i && (p.value = "normal", h.value = 0, n.value = c("导入进度"), u.value = !0, z.value = ""), $ = s;
|
|
42
|
+
const k = await j();
|
|
43
|
+
if (!k.status) return;
|
|
44
|
+
let y = k.data, N = null, { autoContentType: Y, bucketName: B, importFileName: J } = a;
|
|
45
|
+
const ue = l ? Fe : _e;
|
|
46
|
+
if (l) {
|
|
47
47
|
let X = [];
|
|
48
|
-
await
|
|
48
|
+
await s.forEach(async (G) => {
|
|
49
49
|
let ee = await R(G);
|
|
50
50
|
X.push(ee);
|
|
51
|
-
}), N = new FormData(), N.append("accessKeyId", y.accessKeyId), N.append("secretAccessKey", y.secretAccessKey), N.append("sessionToken", y.sessionToken), N.append("bucketName", B),
|
|
51
|
+
}), N = new FormData(), N.append("accessKeyId", y.accessKeyId), N.append("secretAccessKey", y.secretAccessKey), N.append("sessionToken", y.sessionToken), N.append("bucketName", B), s.forEach((G, ee) => {
|
|
52
52
|
N.append("file", X[ee]);
|
|
53
53
|
}), J.forEach((G) => {
|
|
54
54
|
N.append("filePaths", G);
|
|
55
55
|
});
|
|
56
56
|
} else {
|
|
57
|
-
const X = await R(
|
|
57
|
+
const X = await R(s);
|
|
58
58
|
N = {
|
|
59
59
|
accessKeyId: y.accessKeyId,
|
|
60
60
|
secretAccessKey: y.secretAccessKey,
|
|
@@ -67,7 +67,7 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
67
67
|
}
|
|
68
68
|
const [me, ce] = await ue(N).run();
|
|
69
69
|
if (me) return;
|
|
70
|
-
const de = await
|
|
70
|
+
const de = await Se(ce.data), Z = await (r == null ? void 0 : r(de));
|
|
71
71
|
if (i) {
|
|
72
72
|
if (!Z.status) {
|
|
73
73
|
u.value = !1, p.value = "error";
|
|
@@ -82,30 +82,30 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
82
82
|
repeatNum: 1
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
}, A = async (r,
|
|
85
|
+
}, A = async (r, s = "", a = "") => {
|
|
86
86
|
p.value = "normal", h.value = 0, n.value = a || c("导出进度"), u.value = !0;
|
|
87
|
-
const
|
|
88
|
-
if (!
|
|
87
|
+
const l = await (r == null ? void 0 : r());
|
|
88
|
+
if (!l.status) {
|
|
89
89
|
u.value = !1, p.value = "error";
|
|
90
90
|
return;
|
|
91
91
|
}
|
|
92
|
-
d(
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
if (!
|
|
92
|
+
d(l.taskId, "action", "");
|
|
93
|
+
}, S = async (r, s = "", a = "xlsx") => {
|
|
94
|
+
_.value = "export", p.value = "normal", h.value = 0, n.value = c("导出进度"), u.value = !0;
|
|
95
|
+
const l = await (r == null ? void 0 : r());
|
|
96
|
+
if (!l.status) {
|
|
97
97
|
u.value = !1, p.value = "error";
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
|
-
Ne().format("YYYYMMDDHHmmss") + "", d(
|
|
101
|
-
}, d = async (r,
|
|
102
|
-
C.value = !0, v(r,
|
|
100
|
+
Ne().format("YYYYMMDDHHmmss") + "", d(l.taskId, "export", s || "", a);
|
|
101
|
+
}, d = async (r, s, a, l = "") => {
|
|
102
|
+
C.value = !0, v(r, s, a, l), g = setTimeout(() => {
|
|
103
103
|
}, 50);
|
|
104
104
|
}, f = () => {
|
|
105
105
|
clearTimeout(g), g = null, u.value = !1;
|
|
106
|
-
}, v = async (r,
|
|
106
|
+
}, v = async (r, s = "export", a, l = "") => {
|
|
107
107
|
var y, N;
|
|
108
|
-
const [i, t] = await
|
|
108
|
+
const [i, t] = await Ie("", {
|
|
109
109
|
url: `progress/${r}`
|
|
110
110
|
}).run();
|
|
111
111
|
if (i) {
|
|
@@ -113,40 +113,40 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
h.value = t.percentage;
|
|
116
|
-
const
|
|
116
|
+
const k = s == "export" ? c("导出") : c("导入");
|
|
117
117
|
if (h.value == 100)
|
|
118
|
-
if (z.value = t, C.value = !1, f(),
|
|
119
|
-
t.status == 1 ? (p.value = "success", pe(`${ne().baseURL}/oss${t.filePath}`, a,
|
|
120
|
-
message: t.message || `${
|
|
118
|
+
if (z.value = t, C.value = !1, f(), s == "export")
|
|
119
|
+
t.status == 1 ? (p.value = "success", pe(`${ne().baseURL}/oss${t.filePath}`, a, l), C.value = !1) : t.status == 2 && (b.value = t.message || `${k}${c("失败")}`, M.error({
|
|
120
|
+
message: t.message || `${k}${c("失败")}`,
|
|
121
121
|
grouping: !0,
|
|
122
122
|
repeatNum: 1
|
|
123
123
|
}));
|
|
124
|
-
else if (
|
|
124
|
+
else if (s == "import") {
|
|
125
125
|
if (t.filePath) {
|
|
126
126
|
p.value = "error";
|
|
127
|
-
const Y = (y =
|
|
128
|
-
Y.length && Y[2],
|
|
127
|
+
const Y = (y = $.name) == null ? void 0 : y.match(/(.*?)(\.[^.]*$|$)/);
|
|
128
|
+
Y.length && Y[2], I.value = !0;
|
|
129
129
|
let B = await be(`/oss/${t == null ? void 0 : t.filePath}`);
|
|
130
130
|
const J = ((N = B == null ? void 0 : B.split("/")) == null ? void 0 : N.pop()) || "";
|
|
131
|
-
P.value = T || J,
|
|
131
|
+
P.value = T || J, F.value = $.sizeText, b.value = c("部分数据校验不通过,请下载附件并修改,重新导入!"), E.value = `${ne().baseURL}/oss/${t == null ? void 0 : t.filePath}`;
|
|
132
132
|
}
|
|
133
|
-
q(t.status,
|
|
134
|
-
} else
|
|
133
|
+
q(t.status, k, t.message), t.status == 1 && (m.value = !1), e("success");
|
|
134
|
+
} else s == "action" && (p.value = "success");
|
|
135
135
|
else
|
|
136
136
|
g && t.status != 2 ? g = setTimeout(() => {
|
|
137
|
-
v(r,
|
|
138
|
-
}, 50) : (z.value = t, C.value = !1, q(t.status,
|
|
139
|
-
}, q = (r,
|
|
137
|
+
v(r, s, a, l);
|
|
138
|
+
}, 50) : (z.value = t, C.value = !1, q(t.status, k, t.message), f(), I.value = !0, b.value = (t == null ? void 0 : t.message) || "", e("error", t));
|
|
139
|
+
}, q = (r, s, a) => {
|
|
140
140
|
r == 1 ? (p.value = "success", M.success({
|
|
141
|
-
message: c("business-components_export-success-tip",
|
|
141
|
+
message: c("business-components_export-success-tip", s),
|
|
142
142
|
grouping: !0,
|
|
143
143
|
repeatNum: 1
|
|
144
|
-
}), P.value = "",
|
|
145
|
-
message: c("business-components_export-failure-tip",
|
|
144
|
+
}), P.value = "", F.value = "", b.value = "") : r == 2 ? (p.value = "error", M.error({
|
|
145
|
+
message: c("business-components_export-failure-tip", s),
|
|
146
146
|
grouping: !0,
|
|
147
147
|
repeatNum: 1
|
|
148
148
|
})) : r == 3 && (p.value = "error", M.error({
|
|
149
|
-
message: c("business-components_export-partially-failure-tip",
|
|
149
|
+
message: c("business-components_export-partially-failure-tip", s),
|
|
150
150
|
grouping: !0,
|
|
151
151
|
repeatNum: 1
|
|
152
152
|
}));
|
|
@@ -160,20 +160,20 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
160
160
|
progressLoading: C,
|
|
161
161
|
progressResult: z,
|
|
162
162
|
errorFileName: P,
|
|
163
|
-
errorFileSize:
|
|
163
|
+
errorFileSize: F,
|
|
164
164
|
errorMessage: b,
|
|
165
|
-
errorImport:
|
|
165
|
+
errorImport: I,
|
|
166
166
|
errorFilePath: E,
|
|
167
|
-
fileHandleType:
|
|
167
|
+
fileHandleType: _,
|
|
168
168
|
fileImport: V,
|
|
169
|
-
fileExport:
|
|
169
|
+
fileExport: S,
|
|
170
170
|
fileAction: A,
|
|
171
171
|
generateUniqueName: (r) => {
|
|
172
|
-
const
|
|
173
|
-
return `${
|
|
172
|
+
const s = r == null ? void 0 : r.match(/(.*?)(\.[^.]*$|$)/), a = s.length ? s[2] : "";
|
|
173
|
+
return `${s.length ? s[1] : r}${te()}${a}`;
|
|
174
174
|
},
|
|
175
175
|
downloadFile: pe,
|
|
176
|
-
resetStataus:
|
|
176
|
+
resetStataus: x,
|
|
177
177
|
checkProgress: d
|
|
178
178
|
};
|
|
179
179
|
}, Pe = (e) => {
|
|
@@ -218,14 +218,14 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
218
218
|
g.href = C, g.download = m, g.click(), window.URL.revokeObjectURL(C);
|
|
219
219
|
}
|
|
220
220
|
}, n.send();
|
|
221
|
-
},
|
|
221
|
+
}, Se = (e) => new Promise((m, u) => {
|
|
222
222
|
var n = new FileReader();
|
|
223
223
|
n.onload = function(h) {
|
|
224
224
|
let p = "";
|
|
225
225
|
typeof n.result == "string" && (p = JSON.parse(n.result)), m(p);
|
|
226
226
|
}, n.readAsText(e);
|
|
227
|
-
}),
|
|
228
|
-
var
|
|
227
|
+
}), De = (e, m) => {
|
|
228
|
+
var s;
|
|
229
229
|
const {
|
|
230
230
|
importDialog: u,
|
|
231
231
|
showProgressDialog: n,
|
|
@@ -235,62 +235,62 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
235
235
|
progressLoading: g,
|
|
236
236
|
errorFileName: z,
|
|
237
237
|
errorFileSize: P,
|
|
238
|
-
errorMessage:
|
|
238
|
+
errorMessage: F,
|
|
239
239
|
errorImport: b,
|
|
240
|
-
errorFilePath:
|
|
240
|
+
errorFilePath: I,
|
|
241
241
|
fileHandleType: E,
|
|
242
242
|
fileImport: T,
|
|
243
|
-
fileExport:
|
|
244
|
-
downloadFile:
|
|
245
|
-
} =
|
|
246
|
-
let
|
|
243
|
+
fileExport: _,
|
|
244
|
+
downloadFile: $
|
|
245
|
+
} = $e(m);
|
|
246
|
+
let x = w([]), j = (s = ze()) == null ? void 0 : s.tenantId;
|
|
247
247
|
const R = () => {
|
|
248
|
-
|
|
248
|
+
x.value = [], b.value = !1, z.value = "", P.value = "", F.value = "", u.value = !0, I.value = "", m("open");
|
|
249
249
|
};
|
|
250
250
|
let V;
|
|
251
251
|
const A = (a) => {
|
|
252
|
-
const
|
|
253
|
-
if (!
|
|
252
|
+
const l = e.fileType.split(","), i = a.name.substring(a.name.lastIndexOf(".")), t = S(a.sizeText), k = S(e.fileMaxSize);
|
|
253
|
+
if (!l.includes(i)) {
|
|
254
254
|
M.warning(c("文件格式错误,请重新上传!")), setTimeout(() => {
|
|
255
|
-
|
|
255
|
+
x.value = [];
|
|
256
256
|
});
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
|
-
if (t >
|
|
259
|
+
if (t > k) {
|
|
260
260
|
M.warning(`${c("文件大小不超过")}${e.fileMaxSize}`), setTimeout(() => {
|
|
261
|
-
|
|
261
|
+
x.value = [];
|
|
262
262
|
});
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
V = a.name;
|
|
266
|
-
},
|
|
267
|
-
let
|
|
268
|
-
return
|
|
266
|
+
}, S = (a) => {
|
|
267
|
+
let l = a.match(/\d+(\.\d+)?/)[0], i = a.match(/[a-zA-z]+/gi)[0], t = 0;
|
|
268
|
+
return l = parseFloat(l), i = i.toLowerCase(), i === "gb" || i === "g" ? t = (l * 1024 * 1024 * 1024).toFixed(2) : i === "mb" || i === "m" ? t = (l * 1024 * 1024).toFixed(2) : i === "kb" || i === "k" ? t = (l * 1024).toFixed(2) : i === "b" && (t = l), parseFloat(t);
|
|
269
269
|
}, d = async (a) => {
|
|
270
|
-
const
|
|
270
|
+
const l = a.value.split("/");
|
|
271
271
|
let i = te();
|
|
272
272
|
const t = {
|
|
273
|
-
fileName:
|
|
273
|
+
fileName: l[l.length - 1],
|
|
274
274
|
filePath: a.value,
|
|
275
275
|
taskId: i,
|
|
276
276
|
...e.importParams
|
|
277
|
-
},
|
|
277
|
+
}, k = e.importParamsPosition === "params" ? e.importFun("", { params: t }) : e.importFun(t), [y, N] = await k.run();
|
|
278
278
|
return y ? { status: !1 } : { status: !0, taskId: i };
|
|
279
279
|
}, f = async () => {
|
|
280
|
-
if (!
|
|
280
|
+
if (!x.value.length) return M.warning(c("请上传文件"));
|
|
281
281
|
const a = {
|
|
282
282
|
bucketName: e.bucketName,
|
|
283
283
|
importFileName: `${j}/${e.ossName}/${V}`
|
|
284
|
-
},
|
|
285
|
-
await T(d, i, a,
|
|
284
|
+
}, l = e.maxCount > 1, i = e.maxCount > 1 ? x.value : x.value[0];
|
|
285
|
+
await T(d, i, a, l);
|
|
286
286
|
}, v = () => {
|
|
287
|
-
|
|
287
|
+
$(I.value, z.value);
|
|
288
288
|
}, q = () => {
|
|
289
|
-
|
|
289
|
+
_(oe, e.templateName);
|
|
290
290
|
}, oe = async () => {
|
|
291
291
|
let a = te();
|
|
292
|
-
const [
|
|
293
|
-
return
|
|
292
|
+
const [l, i] = await e.templateFun({ taskId: a }).run();
|
|
293
|
+
return l ? { status: !1 } : { status: !0, taskId: a };
|
|
294
294
|
};
|
|
295
295
|
return {
|
|
296
296
|
showProgressDialog: n,
|
|
@@ -300,10 +300,10 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
300
300
|
progressLoading: g,
|
|
301
301
|
errorFileName: z,
|
|
302
302
|
errorFileSize: P,
|
|
303
|
-
errorMessage:
|
|
303
|
+
errorMessage: F,
|
|
304
304
|
errorImport: b,
|
|
305
305
|
importDialog: u,
|
|
306
|
-
fileList:
|
|
306
|
+
fileList: x,
|
|
307
307
|
fileHandleType: E,
|
|
308
308
|
showImportHandle: R,
|
|
309
309
|
confirmImport: f,
|
|
@@ -312,22 +312,22 @@ const Te = ae.get("token"), Fe = 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, $(ie(a), e.templateName);
|
|
316
316
|
else if (e.templateFun) {
|
|
317
317
|
if (e.templateType === "static") {
|
|
318
318
|
if (e.templateUrl)
|
|
319
319
|
a = e.templateUrl;
|
|
320
320
|
else if (e.templateFun) {
|
|
321
|
-
const [
|
|
321
|
+
const [l, i] = await e.templateFun().run();
|
|
322
322
|
a = i;
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
$(ie(a), e.templateName);
|
|
325
325
|
}
|
|
326
326
|
e.templateType === "dynamic" && e.templateFun && q();
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
};
|
|
330
|
-
},
|
|
330
|
+
}, Ue = { class: "das-import-button" }, Me = { class: "tip-box" }, Ee = { class: "first-line" }, Le = { class: "second-line" }, je = /* @__PURE__ */ ge({
|
|
331
331
|
__name: "App",
|
|
332
332
|
props: {
|
|
333
333
|
importFun: {},
|
|
@@ -355,38 +355,38 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
355
355
|
percent: g,
|
|
356
356
|
progressStatus: z,
|
|
357
357
|
progressLoading: P,
|
|
358
|
-
errorFileName:
|
|
358
|
+
errorFileName: F,
|
|
359
359
|
errorFileSize: b,
|
|
360
|
-
errorMessage:
|
|
360
|
+
errorMessage: I,
|
|
361
361
|
errorImport: E,
|
|
362
362
|
importDialog: T,
|
|
363
|
-
fileList:
|
|
364
|
-
fileHandleType:
|
|
365
|
-
showImportHandle:
|
|
363
|
+
fileList: _,
|
|
364
|
+
fileHandleType: $,
|
|
365
|
+
showImportHandle: x,
|
|
366
366
|
confirmImport: j,
|
|
367
367
|
fileUpload: R,
|
|
368
368
|
errorFileDownload: V,
|
|
369
369
|
downTemplate: A
|
|
370
|
-
} =
|
|
371
|
-
let
|
|
372
|
-
return ve(
|
|
373
|
-
d.includes("import") ?
|
|
370
|
+
} = De(n, h);
|
|
371
|
+
let S;
|
|
372
|
+
return ve($, (d) => {
|
|
373
|
+
d.includes("import") ? S = [c("正在导入中..."), c("导入失败"), c("导入成功")] : S = [c("正在导出中..."), c("导出失败"), c("导出成功")];
|
|
374
374
|
}), m({
|
|
375
375
|
confirmImport: j,
|
|
376
|
-
showImportHandle:
|
|
377
|
-
}), (d, f) => (he(), we("div",
|
|
376
|
+
showImportHandle: x
|
|
377
|
+
}), (d, f) => (he(), we("div", Ue, [
|
|
378
378
|
O("div", {
|
|
379
379
|
onClick: f[0] || (f[0] = //@ts-ignore
|
|
380
|
-
(...v) => o(
|
|
380
|
+
(...v) => o(x) && o(x)(...v))
|
|
381
381
|
}, [
|
|
382
382
|
re(d.$slots, "default", {}, () => [
|
|
383
|
-
|
|
383
|
+
D(o(W), {
|
|
384
384
|
size: "middle",
|
|
385
385
|
"btn-type": "primary"
|
|
386
386
|
}, {
|
|
387
387
|
default: L(() => [
|
|
388
388
|
K(
|
|
389
|
-
H(o(
|
|
389
|
+
H(o(U)("导入").value),
|
|
390
390
|
1
|
|
391
391
|
/* TEXT */
|
|
392
392
|
)
|
|
@@ -396,9 +396,9 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
396
396
|
})
|
|
397
397
|
], !0)
|
|
398
398
|
]),
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
title: o(
|
|
399
|
+
se(" 导入弹窗 "),
|
|
400
|
+
D(o(le), {
|
|
401
|
+
title: o(U)(d.importDialogName).value,
|
|
402
402
|
modelValue: o(T),
|
|
403
403
|
"onUpdate:modelValue": f[3] || (f[3] = (v) => Q(T) ? T.value = v : null),
|
|
404
404
|
customClass: "upload-dialog",
|
|
@@ -407,13 +407,13 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
407
407
|
}, {
|
|
408
408
|
footer: L(() => [
|
|
409
409
|
O("div", null, [
|
|
410
|
-
|
|
410
|
+
D(o(W), {
|
|
411
411
|
size: "middle",
|
|
412
412
|
onClick: f[2] || (f[2] = (v) => T.value = !1)
|
|
413
413
|
}, {
|
|
414
414
|
default: L(() => [
|
|
415
415
|
K(
|
|
416
|
-
H(o(
|
|
416
|
+
H(o(U)("取消").value),
|
|
417
417
|
1
|
|
418
418
|
/* TEXT */
|
|
419
419
|
)
|
|
@@ -421,16 +421,16 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
421
421
|
_: 1
|
|
422
422
|
/* STABLE */
|
|
423
423
|
}),
|
|
424
|
-
|
|
424
|
+
D(o(W), {
|
|
425
425
|
size: "middle",
|
|
426
426
|
"btn-type": "primary",
|
|
427
|
-
disabled: d.openDisabled && o(
|
|
428
|
-
style: { "margin-left": "12px" },
|
|
427
|
+
disabled: d.openDisabled && o(_).length === 0,
|
|
428
|
+
style: { "margin-left": "12px", width: "100%" },
|
|
429
429
|
onClick: o(j)
|
|
430
430
|
}, {
|
|
431
431
|
default: L(() => [
|
|
432
432
|
K(
|
|
433
|
-
H(o(
|
|
433
|
+
H(o(U)(`${d.confirmButtonName}`).value),
|
|
434
434
|
1
|
|
435
435
|
/* TEXT */
|
|
436
436
|
)
|
|
@@ -445,11 +445,11 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
445
445
|
O("div", Me, [
|
|
446
446
|
O("div", Ee, [
|
|
447
447
|
K(
|
|
448
|
-
H(o(
|
|
448
|
+
H(o(U)("1、点击下载 ").value),
|
|
449
449
|
1
|
|
450
450
|
/* TEXT */
|
|
451
451
|
),
|
|
452
|
-
|
|
452
|
+
D(o(W), {
|
|
453
453
|
size: "large",
|
|
454
454
|
btnType: "primary-text",
|
|
455
455
|
block: "",
|
|
@@ -457,7 +457,7 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
457
457
|
}, {
|
|
458
458
|
default: L(() => [
|
|
459
459
|
K(
|
|
460
|
-
H(o(
|
|
460
|
+
H(o(U)(`${d.templateName}`).value),
|
|
461
461
|
1
|
|
462
462
|
/* TEXT */
|
|
463
463
|
)
|
|
@@ -469,19 +469,19 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
469
469
|
O(
|
|
470
470
|
"div",
|
|
471
471
|
Le,
|
|
472
|
-
H(o(
|
|
472
|
+
H(o(U)("2、仅支持上传Excel文件,重复数据以最后一条为准").value),
|
|
473
473
|
1
|
|
474
474
|
/* TEXT */
|
|
475
475
|
)
|
|
476
476
|
])
|
|
477
477
|
], !0),
|
|
478
|
-
|
|
479
|
-
modelValue: o(
|
|
480
|
-
"onUpdate:modelValue": f[1] || (f[1] = (v) => Q(
|
|
478
|
+
D(o(xe), {
|
|
479
|
+
modelValue: o(_),
|
|
480
|
+
"onUpdate:modelValue": f[1] || (f[1] = (v) => Q(_) ? _.value = v : null),
|
|
481
481
|
error: o(E),
|
|
482
|
-
"error-file-name": o(
|
|
482
|
+
"error-file-name": o(F),
|
|
483
483
|
"error-file-size": o(b),
|
|
484
|
-
"error-message": o(
|
|
484
|
+
"error-message": o(I),
|
|
485
485
|
accept: d.fileType,
|
|
486
486
|
maxCount: d.maxCount,
|
|
487
487
|
multiple: d.multiple,
|
|
@@ -492,23 +492,23 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
492
492
|
_: 3
|
|
493
493
|
/* FORWARDED */
|
|
494
494
|
}, 8, ["title", "modelValue"]),
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
se(" 进度弹窗 "),
|
|
496
|
+
D(o(le), {
|
|
497
497
|
size: "mini",
|
|
498
|
-
title: o(
|
|
498
|
+
title: o(U)(o(C)).value,
|
|
499
499
|
"is-feedback-img": !1,
|
|
500
500
|
modelValue: o(p),
|
|
501
501
|
"onUpdate:modelValue": f[5] || (f[5] = (v) => Q(p) ? p.value = v : null),
|
|
502
502
|
type: "feedback"
|
|
503
503
|
}, {
|
|
504
504
|
default: L(() => [
|
|
505
|
-
|
|
505
|
+
D(o(ke), {
|
|
506
506
|
modelValue: o(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: o(z),
|
|
511
|
-
textMap: o(
|
|
511
|
+
textMap: o(S)
|
|
512
512
|
}, null, 8, ["modelValue", "status", "textMap"])
|
|
513
513
|
]),
|
|
514
514
|
_: 1
|
|
@@ -521,15 +521,14 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
521
521
|
for (const [n, h] of m)
|
|
522
522
|
u[n] = h;
|
|
523
523
|
return u;
|
|
524
|
-
}, Ve = /* @__PURE__ */ Re(je, [["__scopeId", "data-v-
|
|
525
|
-
"1、点击下载 ": { "zh-CN": "1、点击下载 ", en: "Click to Download", _appCode: "framework" },
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
"zh-CN": "重复数据以最后一条为准",
|
|
530
|
-
en: "Duplicate data is subject to the last entry",
|
|
524
|
+
}, Ve = /* @__PURE__ */ Re(je, [["__scopeId", "data-v-85787da8"]]), Be = {
|
|
525
|
+
"1、点击下载 ": { "zh-CN": "1、点击下载 ", en: "1、Click to Download ", _appCode: "framework" },
|
|
526
|
+
"2、仅支持上传Excel文件,重复数据以最后一条为准": {
|
|
527
|
+
"zh-CN": "2、仅支持上传Excel文件,重复数据以最后一条为准",
|
|
528
|
+
en: "2、Only support uploading excel files,duplicate data is subject to the last entry",
|
|
531
529
|
_appCode: "framework"
|
|
532
530
|
},
|
|
531
|
+
文件: { "zh-CN": "文件", en: "File", _appCode: "framework" },
|
|
533
532
|
取消: { "zh-CN": "取消", en: "Cancel", _appCode: "framework" },
|
|
534
533
|
正在导入中: { "zh-CN": "正在导入中", en: "Importing", _appCode: "framework" },
|
|
535
534
|
导入失败: { "zh-CN": "导入失败", en: "Import Failed", _appCode: "framework" },
|
|
@@ -559,7 +558,14 @@ const Te = ae.get("token"), Fe = ae.post("put-object", (e) => (e.headers || (e.h
|
|
|
559
558
|
_appCode: "framework"
|
|
560
559
|
},
|
|
561
560
|
"正在导入中...": { "zh-CN": "正在导入中...", en: "Importing...", _appCode: "framework" },
|
|
562
|
-
"正在导出中...": { "zh-CN": "正在导出中...", en: "Exporting...", _appCode: "framework" }
|
|
561
|
+
"正在导出中...": { "zh-CN": "正在导出中...", en: "Exporting...", _appCode: "framework" },
|
|
562
|
+
"business-components_export-success-tip": { "zh-CN": "$0成功", en: "$0 Success", _appCode: "framework" },
|
|
563
|
+
"business-components_export-failure-tip": { "zh-CN": "$0失败", en: "$0 Failure", _appCode: "framework" },
|
|
564
|
+
"business-components_export-partially-failure-tip": {
|
|
565
|
+
"zh-CN": "部分$0失败",
|
|
566
|
+
en: "Partially $0 Failure",
|
|
567
|
+
_appCode: "framework"
|
|
568
|
+
}
|
|
563
569
|
};
|
|
564
570
|
Ce(Be);
|
|
565
571
|
const at = fe(Ve);
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.das-import-button[data-v-
|
|
1
|
+
.das-import-button[data-v-85787da8]{display:inline-block}.das-import-button .upload-dialog .second-line[data-v-85787da8]{margin-bottom:20px}.das-import-button .upload-dialog .tips[data-v-85787da8]{font-size:16px}
|