@glodon-aiot/dataset-annotation 3.10.0-alpha.15 → 3.10.0-alpha.16
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/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +1 -1
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +1 -1
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +43 -45
- package/dist/es/components/PicZipImportModal/index.mjs +106 -105
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +174 -173
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +3 -3
- package/package.json +2 -2
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/ImageDetail/index.d.ts +0 -16
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +0 -12
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +0 -21
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/LableEditor.d.ts +0 -16
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/OCRBoxMaker/index.d.ts +0 -19
|
@@ -1,52 +1,51 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ml = Object.defineProperty;
|
|
2
2
|
var Ve = Object.getOwnPropertySymbols;
|
|
3
|
-
var
|
|
4
|
-
var Pe = (z, e,
|
|
5
|
-
for (var
|
|
6
|
-
|
|
3
|
+
var fl = Object.prototype.hasOwnProperty, hl = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var Pe = (z, e, i) => e in z ? ml(z, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : z[e] = i, Me = (z, e) => {
|
|
5
|
+
for (var i in e || (e = {}))
|
|
6
|
+
fl.call(e, i) && Pe(z, i, e[i]);
|
|
7
7
|
if (Ve)
|
|
8
|
-
for (var
|
|
9
|
-
|
|
8
|
+
for (var i of Ve(e))
|
|
9
|
+
hl.call(e, i) && Pe(z, i, e[i]);
|
|
10
10
|
return z;
|
|
11
11
|
};
|
|
12
|
-
var ce = (z, e,
|
|
12
|
+
var ce = (z, e, i) => new Promise((m, K) => {
|
|
13
13
|
var _ = (N) => {
|
|
14
14
|
try {
|
|
15
|
-
T(
|
|
15
|
+
T(i.next(N));
|
|
16
16
|
} catch (v) {
|
|
17
17
|
K(v);
|
|
18
18
|
}
|
|
19
19
|
}, h = (N) => {
|
|
20
20
|
try {
|
|
21
|
-
T(
|
|
21
|
+
T(i.throw(N));
|
|
22
22
|
} catch (v) {
|
|
23
23
|
K(v);
|
|
24
24
|
}
|
|
25
25
|
}, T = (N) => N.done ? m(N.value) : Promise.resolve(N.value).then(_, h);
|
|
26
|
-
T((
|
|
26
|
+
T((i = i.apply(z, e)).next());
|
|
27
27
|
});
|
|
28
28
|
import { jsxs as d, Fragment as de, jsx as l } from "react/jsx-runtime";
|
|
29
|
-
import { useContext as
|
|
30
|
-
import { Form as V, message as $, Modal as H, Button as P, Radio as k, Tooltip as
|
|
29
|
+
import { useContext as gl, useState as r, useRef as Cl, useEffect as O } from "react";
|
|
30
|
+
import { Form as V, message as $, Modal as H, Button as P, Radio as k, Tooltip as bl, Space as je, Upload as De, Row as pe, Col as yl, Spin as Sl, Result as Ke } from "antd";
|
|
31
31
|
import "./style.less.mjs";
|
|
32
|
-
import { InfoCircleOutlined as
|
|
33
|
-
import
|
|
34
|
-
import { initMinio as
|
|
35
|
-
import xl from "antd/lib/upload/Dragger";
|
|
32
|
+
import { InfoCircleOutlined as zl, CloudUploadOutlined as wl, PaperClipOutlined as El, DeleteOutlined as Nl, PlusOutlined as vl } from "@ant-design/icons";
|
|
33
|
+
import xl from "browser-md5-file";
|
|
34
|
+
import { initMinio as _e, putObjectBuffer as Ze } from "@glodon-aiot/minio";
|
|
36
35
|
import Al from "./pic_zip.svg.mjs";
|
|
37
36
|
import Fl from "./pic_zip_json.svg.mjs";
|
|
38
37
|
import Rl from "./pic_vlm_json_zip.svg.mjs";
|
|
39
38
|
import Bl from "./pic_vlm_zip.svg.mjs";
|
|
40
|
-
import { MB as
|
|
39
|
+
import { MB as Ge, GB as $l } from "../../constant.mjs";
|
|
41
40
|
import { fileSuffixToLowerCase as kl } from "../../utils/index.mjs";
|
|
42
41
|
import Tl from "../../DatasetContext/index.mjs";
|
|
43
42
|
import { EXAMPLE_SRC_ROOT as Ul, VLM_EXAMPLE_SRC_ROOT as Ll } from "../../featuresConfig.mjs";
|
|
44
43
|
import { getImportConfig as Ol } from "./config.mjs";
|
|
45
44
|
let f = 0, G = 0, M = 0, I = 0;
|
|
46
|
-
const
|
|
45
|
+
const nt = (z) => {
|
|
47
46
|
const {
|
|
48
47
|
datasetIam: e,
|
|
49
|
-
datasetId:
|
|
48
|
+
datasetId: i,
|
|
50
49
|
currentVersion: m,
|
|
51
50
|
tenCode: K,
|
|
52
51
|
isVisible: _,
|
|
@@ -69,33 +68,35 @@ const ot = (z) => {
|
|
|
69
68
|
exampleSrcRoot: Ul,
|
|
70
69
|
vlmExampleSrcRoot: Ll
|
|
71
70
|
}
|
|
72
|
-
} =
|
|
71
|
+
} = gl(Tl), [w, Ie] = r(0), [E, qe] = r(0), [Y, Xe] = r([]), [j, Je] = r(), [ge, Vl] = r([]), [ee, X] = r(!1), [Ce, le] = r(!1), [Z, te] = r(!1), [se, We] = r(0), [be, He] = r(0), [J, ye] = r(-1), [ie, Pl] = r([]), [Se, Ml] = r([]), [ze, ne] = r(!1), Qe = new xl(), [W] = V.useForm(), n = V.useWatch("acceptType", W), F = V.useWatch("labelState", W), [C, we] = r([]), [R, Ee] = r([]), [B, Ye] = r(), [Ne, ve] = r(0), [xe, Ae] = r(!1), [jl, Fe] = r(""), [el, Re] = r(!1), [Be, ll] = r(
|
|
73
72
|
"unlabeled"
|
|
74
73
|
/* Unlabeled */
|
|
75
|
-
), oe =
|
|
74
|
+
), oe = Cl(!0), {
|
|
75
|
+
Dragger: tl
|
|
76
|
+
} = De, g = Ol(h), ae = g.imageMimeTypes, $e = g.imageAccept, re = g.maxImageSize;
|
|
76
77
|
O(() => {
|
|
77
78
|
f = 0, G = 0, M = 0, I = 0, te(!1), _ && (oe.current = !1, q && q());
|
|
78
79
|
}, [_]);
|
|
79
|
-
const ke = (t,
|
|
80
|
+
const ke = (t, s) => {
|
|
80
81
|
var o;
|
|
81
82
|
if (n === "image") {
|
|
82
83
|
ne(!0);
|
|
83
84
|
let a = 0;
|
|
84
|
-
if (f = f + 1, G = G + 1,
|
|
85
|
+
if (f = f + 1, G = G + 1, s.length === 0)
|
|
85
86
|
return;
|
|
86
87
|
let u = 0;
|
|
87
|
-
const [...c] =
|
|
88
|
+
const [...c] = s, y = window.URL || window.webkitURL, S = new Image();
|
|
88
89
|
S.src = y.createObjectURL(t), S.onload = () => {
|
|
89
90
|
Y.push({
|
|
90
91
|
name: t.name,
|
|
91
92
|
src: S.src,
|
|
92
93
|
width: S.width,
|
|
93
94
|
height: S.height
|
|
94
|
-
}),
|
|
95
|
-
},
|
|
95
|
+
}), Xe(Y);
|
|
96
|
+
}, s.map((x) => {
|
|
96
97
|
const A = ae.some((L) => L === x.type), U = x.size <= re;
|
|
97
98
|
A ? U || (a = a + 1, c.splice(c.findIndex((L) => L.name === x.name), 1)) : (u = u + 1, c.splice(c.findIndex((L) => L.name === x.name), 1));
|
|
98
|
-
}), c.length > 100 && c.splice(100, c.length),
|
|
99
|
+
}), c.length > 100 && c.splice(100, c.length), Ie(u), qe(a), G === s.length && (ne(!0), G = 0);
|
|
99
100
|
const b = ae.some((x) => x === t.type), D = t.size <= re;
|
|
100
101
|
if (b) {
|
|
101
102
|
if (!D)
|
|
@@ -113,54 +114,54 @@ const ot = (z) => {
|
|
|
113
114
|
return !1;
|
|
114
115
|
};
|
|
115
116
|
O(() => {
|
|
116
|
-
ze !== !1 && (!w && !E && !f || (f = f - I - w - E, f < 101 ? w > 0 && E > 0 ? ($.error(`${w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f - w - E) : w > 0 && E === 0 ? $.error(`${w}个文件添加失败,格式不符合要求`) : w === 0 && E > 0 ? $.error(`${E}个文件添加失败,单张图片超过${g.maxImageSize /
|
|
117
|
+
ze !== !1 && (!w && !E && !f || (f = f - I - w - E, f < 101 ? w > 0 && E > 0 ? ($.error(`${w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f - w - E) : w > 0 && E === 0 ? $.error(`${w}个文件添加失败,格式不符合要求`) : w === 0 && E > 0 ? $.error(`${E}个文件添加失败,单张图片超过${g.maxImageSize / Ge}M`) : w === 0 && E === 0 && $.success("校验成功") : w + E === 0 ? ($.error(`${f - 100}个文件添加失败,超过数量限制`), f = 100) : ($.error(`${f - 100 + w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f < 101 ? f : 100), ne(!1)));
|
|
117
118
|
}, [ze]);
|
|
118
|
-
const
|
|
119
|
-
const
|
|
119
|
+
const sl = (t) => {
|
|
120
|
+
const s = t.originFileObj;
|
|
120
121
|
return new Promise((o, a) => {
|
|
121
|
-
|
|
122
|
-
u && a(u),
|
|
122
|
+
Qe.md5(s, (u, c) => {
|
|
123
|
+
u && a(u), nl(c, s), o(c);
|
|
123
124
|
});
|
|
124
125
|
});
|
|
125
|
-
},
|
|
126
|
+
}, il = () => ce(void 0, null, function* () {
|
|
126
127
|
if (!C)
|
|
127
128
|
return;
|
|
128
129
|
const t = [];
|
|
129
|
-
for (let
|
|
130
|
-
const o = C[
|
|
130
|
+
for (let s = 0; s < C.length; s++) {
|
|
131
|
+
const o = C[s], a = yield sl(o);
|
|
131
132
|
t.push(a);
|
|
132
133
|
}
|
|
133
|
-
!
|
|
134
|
-
|
|
134
|
+
!i || t.length === 0 || p == null || p.getDeduplication(t, i).then((s) => {
|
|
135
|
+
Je(s), Re(!1);
|
|
135
136
|
});
|
|
136
137
|
});
|
|
137
138
|
O(() => {
|
|
138
|
-
|
|
139
|
+
il();
|
|
139
140
|
}, [C]);
|
|
140
|
-
const
|
|
141
|
-
|
|
141
|
+
const nl = (t, s) => {
|
|
142
|
+
s.md5 = t, ge.push(s);
|
|
142
143
|
}, Te = ({
|
|
143
144
|
fileList: t
|
|
144
145
|
}) => {
|
|
145
146
|
if (n === "zip")
|
|
146
147
|
return;
|
|
147
148
|
Re(!0);
|
|
148
|
-
const
|
|
149
|
-
|
|
149
|
+
const s = t.filter((o) => o.size && o.size <= re ? ae.some((a) => o.type === a) : !1);
|
|
150
|
+
s.splice(100, s.length), s.length < C.length ? (we(s), I++) : (M = M - I, I = 0, M++, M == s.length && we(s), M > s.length && (M = s.length));
|
|
150
151
|
}, Ue = () => {
|
|
151
152
|
n === "zip" && (oe.current = !0), T(!1);
|
|
152
|
-
},
|
|
153
|
+
}, ol = () => {
|
|
153
154
|
if (n === "image") {
|
|
154
155
|
if (!j)
|
|
155
156
|
return;
|
|
156
|
-
let t = 0,
|
|
157
|
+
let t = 0, s = 0;
|
|
157
158
|
if (j.duplicated.length !== 0 && j.duplicated.map((o, a) => {
|
|
158
159
|
var y;
|
|
159
160
|
const u = j.duplicatedMd5[a], c = ((y = C.find((S) => {
|
|
160
161
|
var b;
|
|
161
162
|
return ((b = S.originFileObj) == null ? void 0 : b.md5) === u;
|
|
162
163
|
})) == null ? void 0 : y.name) || "";
|
|
163
|
-
|
|
164
|
+
ie.push({
|
|
164
165
|
labels: [],
|
|
165
166
|
fileKey: o,
|
|
166
167
|
sampleFileName: {
|
|
@@ -176,17 +177,17 @@ const ot = (z) => {
|
|
|
176
177
|
"Content-Type": "application/octet-stream",
|
|
177
178
|
"X-Amz-Meta-Width": b == null ? void 0 : b.width,
|
|
178
179
|
"X-Amz-Meta-Height": b == null ? void 0 : b.height
|
|
179
|
-
}, x = `dataset/${
|
|
180
|
+
}, x = `dataset/${i}/sample/${a}${kl(S)}`;
|
|
180
181
|
delete c.md5;
|
|
181
182
|
const A = new FileReader();
|
|
182
183
|
A.readAsArrayBuffer(c), A.onload = (U) => {
|
|
183
|
-
|
|
184
|
+
_e({
|
|
184
185
|
endPoint: e == null ? void 0 : e.endpoints[0],
|
|
185
186
|
useSSL: e == null ? void 0 : e.useSSL,
|
|
186
187
|
accessKey: e == null ? void 0 : e.accessKey,
|
|
187
188
|
secretKey: e == null ? void 0 : e.secretKey
|
|
188
|
-
}),
|
|
189
|
-
X(!0),
|
|
189
|
+
}), Ze(K, x, U.target.result, D, (L, Dl) => {
|
|
190
|
+
X(!0), s += 1, L && (t += 1, He(t)), We(s), Se.push({
|
|
190
191
|
labels: [],
|
|
191
192
|
fileKey: `${K}/${x}`,
|
|
192
193
|
sampleFileName: {
|
|
@@ -197,31 +198,31 @@ const ot = (z) => {
|
|
|
197
198
|
};
|
|
198
199
|
}));
|
|
199
200
|
Promise.all(o).then(() => {
|
|
200
|
-
!
|
|
201
|
-
p == null || p.postDatasetsIdVersionsVidSamples(
|
|
202
|
-
samples: Se.concat(
|
|
201
|
+
!i || !m || setTimeout(() => {
|
|
202
|
+
p == null || p.postDatasetsIdVersionsVidSamples(i, m.id, {
|
|
203
|
+
samples: Se.concat(ie)
|
|
203
204
|
}).then(() => {
|
|
204
|
-
p.getDatasetsIdVersionsVid(
|
|
205
|
+
p.getDatasetsIdVersionsVid(i, m.id).then((a) => {
|
|
205
206
|
ye(a.samplesCount - m.samplesCount);
|
|
206
207
|
}), Q(!0), v && v(!1);
|
|
207
208
|
});
|
|
208
209
|
}, 100);
|
|
209
210
|
});
|
|
210
211
|
} else {
|
|
211
|
-
if (!
|
|
212
|
+
if (!i || !m)
|
|
212
213
|
return;
|
|
213
|
-
p == null || p.postDatasetsIdVersionsVidSamples(
|
|
214
|
-
samples:
|
|
214
|
+
p == null || p.postDatasetsIdVersionsVidSamples(i, m.id, {
|
|
215
|
+
samples: ie
|
|
215
216
|
}).then(() => {
|
|
216
|
-
p.getDatasetsIdVersionsVid(
|
|
217
|
+
p.getDatasetsIdVersionsVid(i, m.id).then((o) => {
|
|
217
218
|
ye(o.samplesCount - m.samplesCount);
|
|
218
219
|
}), Q(!0), v && v(!1);
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
222
|
} else
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
!
|
|
223
|
+
al(R);
|
|
224
|
+
}, al = (t) => {
|
|
225
|
+
!i || !m || t.map((s, o) => {
|
|
225
226
|
var S;
|
|
226
227
|
const a = {
|
|
227
228
|
"Content-Type": "application/octet-stream"
|
|
@@ -231,19 +232,19 @@ const ot = (z) => {
|
|
|
231
232
|
accessKey: e == null ? void 0 : e.accessKey,
|
|
232
233
|
secretKey: e == null ? void 0 : e.secretKey
|
|
233
234
|
}, c = (e == null ? void 0 : e.prefix) + ((S = t[0]) == null ? void 0 : S.name), y = new FileReader();
|
|
234
|
-
y.readAsArrayBuffer(
|
|
235
|
-
|
|
235
|
+
y.readAsArrayBuffer(s), y.onload = (b) => {
|
|
236
|
+
_e(u), Ze(e == null ? void 0 : e.bucket, c, b.target.result, a, (D, x) => {
|
|
236
237
|
if (D)
|
|
237
238
|
console.log(D);
|
|
238
239
|
else {
|
|
239
240
|
if (oe.current)
|
|
240
241
|
return;
|
|
241
|
-
X(!0), h === "vlm" ? p == null || p.postVlmUploadPicsZip(
|
|
242
|
+
X(!0), h === "vlm" ? p == null || p.postVlmUploadPicsZip(i, m.id, {
|
|
242
243
|
zipUrl: (e == null ? void 0 : e.bucket) + "/" + c,
|
|
243
244
|
type: F === "labeled" ? 2 : 1
|
|
244
245
|
}).then((A) => {
|
|
245
246
|
Le(A), Fe(A);
|
|
246
|
-
}) : p == null || p.postUploadPicsZip(
|
|
247
|
+
}) : p == null || p.postUploadPicsZip(i, m.id, Me({
|
|
247
248
|
zipUrls: [(e == null ? void 0 : e.bucket) + "/" + c]
|
|
248
249
|
}, (h === "ocr" || h === "vlm") && {
|
|
249
250
|
type: F === "labeled" ? 1 : 0
|
|
@@ -255,17 +256,17 @@ const ot = (z) => {
|
|
|
255
256
|
};
|
|
256
257
|
});
|
|
257
258
|
}, Le = (t) => ce(void 0, null, function* () {
|
|
258
|
-
var
|
|
259
|
-
if (!(!
|
|
259
|
+
var s;
|
|
260
|
+
if (!(!i || !m || !p))
|
|
260
261
|
try {
|
|
261
|
-
const o = yield p.checkFileResult(
|
|
262
|
+
const o = yield p.checkFileResult(i, m.id, {
|
|
262
263
|
taskId: t
|
|
263
264
|
}, 5e3, h, (a) => {
|
|
264
265
|
ve(a);
|
|
265
266
|
});
|
|
266
|
-
o &&
|
|
267
|
+
o && Ye(JSON.parse(o));
|
|
267
268
|
} catch (o) {
|
|
268
|
-
if (((
|
|
269
|
+
if (((s = o.cause) == null ? void 0 : s.code) === -101) {
|
|
269
270
|
Ae(!0);
|
|
270
271
|
return;
|
|
271
272
|
}
|
|
@@ -274,27 +275,27 @@ const ot = (z) => {
|
|
|
274
275
|
O(() => {
|
|
275
276
|
B && (ve(100), le(!0));
|
|
276
277
|
}, [B]), O(() => {
|
|
277
|
-
|
|
278
|
-
}, [
|
|
278
|
+
se !== 0 && (Q(!1), v && v(!0));
|
|
279
|
+
}, [se]), O(() => {
|
|
279
280
|
J !== -1 && (le(!0), te(!1));
|
|
280
281
|
}, [J]);
|
|
281
|
-
const
|
|
282
|
+
const rl = () => {
|
|
282
283
|
Oe(), le(!1), me && me();
|
|
283
284
|
}, Oe = () => {
|
|
284
285
|
N(), X(!1), T(!1), ue && ue(), q && q();
|
|
285
|
-
},
|
|
286
|
-
children: [/* @__PURE__ */ l(
|
|
286
|
+
}, cl = /* @__PURE__ */ d("div", {
|
|
287
|
+
children: [/* @__PURE__ */ l(vl, {}), /* @__PURE__ */ l("div", {
|
|
287
288
|
style: {
|
|
288
289
|
marginTop: 8
|
|
289
290
|
},
|
|
290
291
|
children: "添加图片"
|
|
291
292
|
})]
|
|
292
|
-
}),
|
|
293
|
-
const
|
|
294
|
-
Ee(
|
|
295
|
-
},
|
|
293
|
+
}), dl = (t) => {
|
|
294
|
+
const s = R.filter((o) => o.uid !== t.uid);
|
|
295
|
+
Ee(s);
|
|
296
|
+
}, pl = () => {
|
|
296
297
|
F === "labeled" ? h === "vlm" ? window.location.href = `${he}/%E6%9C%89%E6%A0%87%E6%B3%A8%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${fe}/%E6%A0%87%E6%B3%A8%E6%A0%BC%E5%BC%8F%E7%A4%BA%E4%BE%8B.zip` : h === "vlm" ? window.location.href = `${he}/%E6%97%A0%E6%A0%87%E6%B3%A8%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${fe}/%E7%A4%BA%E4%BE%8B%E5%8E%8B%E7%BC%A9%E5%8C%85.zip`;
|
|
297
|
-
},
|
|
298
|
+
}, ul = () => {
|
|
298
299
|
N(), Ae(!1), X(!1), T(!1);
|
|
299
300
|
};
|
|
300
301
|
return O(() => {
|
|
@@ -320,10 +321,10 @@ const ot = (z) => {
|
|
|
320
321
|
type: "primary",
|
|
321
322
|
htmlType: "submit",
|
|
322
323
|
form: "importModal",
|
|
323
|
-
disabled: n === "image" && !C.length || n === "zip" && !R.length || ee && Ne == 0 ||
|
|
324
|
+
disabled: n === "image" && !C.length || n === "zip" && !R.length || ee && Ne == 0 || el,
|
|
324
325
|
loading: Z == !0,
|
|
325
326
|
onClick: () => {
|
|
326
|
-
|
|
327
|
+
ol(), te(!0);
|
|
327
328
|
},
|
|
328
329
|
children: "导入"
|
|
329
330
|
}, "confirm")],
|
|
@@ -353,16 +354,16 @@ const ot = (z) => {
|
|
|
353
354
|
children: /* @__PURE__ */ d(k.Group, {
|
|
354
355
|
disabled: Z,
|
|
355
356
|
onChange: (t) => {
|
|
356
|
-
|
|
357
|
+
ll(t.target.value);
|
|
357
358
|
},
|
|
358
359
|
children: [/* @__PURE__ */ l(k, {
|
|
359
360
|
value: "unlabeled",
|
|
360
361
|
children: "无标注信息"
|
|
361
362
|
}), /* @__PURE__ */ d(k, {
|
|
362
363
|
value: "labeled",
|
|
363
|
-
children: ["有标注信息", h === "vlm" && /* @__PURE__ */ l(
|
|
364
|
+
children: ["有标注信息", h === "vlm" && /* @__PURE__ */ l(bl, {
|
|
364
365
|
title: "支持上传带OCR标注信息的数据",
|
|
365
|
-
children: /* @__PURE__ */ l(
|
|
366
|
+
children: /* @__PURE__ */ l(zl, {
|
|
366
367
|
style: {
|
|
367
368
|
cursor: "pointer",
|
|
368
369
|
marginLeft: 4,
|
|
@@ -405,7 +406,7 @@ const ot = (z) => {
|
|
|
405
406
|
})
|
|
406
407
|
}), /* @__PURE__ */ d("div", {
|
|
407
408
|
className: "file-upload",
|
|
408
|
-
children: [(n === "image" && !C.length || n === "zip") && /* @__PURE__ */ d(
|
|
409
|
+
children: [(n === "image" && !C.length || n === "zip") && /* @__PURE__ */ d(tl, {
|
|
409
410
|
name: "file",
|
|
410
411
|
showUploadList: !1,
|
|
411
412
|
multiple: !0,
|
|
@@ -416,7 +417,7 @@ const ot = (z) => {
|
|
|
416
417
|
disabled: n === "zip" ? R.length === 1 : !1,
|
|
417
418
|
children: [/* @__PURE__ */ l("span", {
|
|
418
419
|
className: "file-upload-icon",
|
|
419
|
-
children: /* @__PURE__ */ l(
|
|
420
|
+
children: /* @__PURE__ */ l(wl, {})
|
|
420
421
|
}), /* @__PURE__ */ d(je, {
|
|
421
422
|
className: "file-upload-action",
|
|
422
423
|
children: [n === "image" && "拖拽图片至此,或者", n === "zip" && "拖拽包含“图片”的压缩包至此,或者", /* @__PURE__ */ l(P, {
|
|
@@ -434,7 +435,7 @@ const ot = (z) => {
|
|
|
434
435
|
},
|
|
435
436
|
children: [/* @__PURE__ */ d("div", {
|
|
436
437
|
className: "item-upload-desc item-upload-desc__1",
|
|
437
|
-
children: ["1. 支持", g.imageFormatsText, "格式,单张图片不超过", g.maxImageSize /
|
|
438
|
+
children: ["1. 支持", g.imageFormatsText, "格式,单张图片不超过", g.maxImageSize / Ge, "M;"]
|
|
438
439
|
}), /* @__PURE__ */ l("div", {
|
|
439
440
|
className: "item-upload-desc",
|
|
440
441
|
children: "2. 单次上传最多可选择100个文件。"
|
|
@@ -448,10 +449,10 @@ const ot = (z) => {
|
|
|
448
449
|
className: "item-upload-desc item-upload-desc__1",
|
|
449
450
|
children: "1. 仅支持.zip格式,单个压缩包不超过2G;"
|
|
450
451
|
}), F === "labeled" ? /* @__PURE__ */ l(de, {
|
|
451
|
-
children: g.zipUploadTexts.labeled.description.map((t,
|
|
452
|
+
children: g.zipUploadTexts.labeled.description.map((t, s) => /* @__PURE__ */ d("div", {
|
|
452
453
|
className: "item-upload-desc",
|
|
453
|
-
children: [
|
|
454
|
-
},
|
|
454
|
+
children: [s + 2, ". ", t]
|
|
455
|
+
}, s))
|
|
455
456
|
}) : /* @__PURE__ */ d("div", {
|
|
456
457
|
className: "item-upload-desc",
|
|
457
458
|
children: ["2. ", g.zipUploadTexts.unlabeled.description[0]]
|
|
@@ -462,7 +463,7 @@ const ot = (z) => {
|
|
|
462
463
|
})]
|
|
463
464
|
}), n === "image" && C.length ? /* @__PURE__ */ l("div", {
|
|
464
465
|
className: "picture-upload",
|
|
465
|
-
children: /* @__PURE__ */ l(
|
|
466
|
+
children: /* @__PURE__ */ l(De, {
|
|
466
467
|
listType: "picture-card",
|
|
467
468
|
fileList: C,
|
|
468
469
|
multiple: !0,
|
|
@@ -472,7 +473,7 @@ const ot = (z) => {
|
|
|
472
473
|
beforeUpload: ke,
|
|
473
474
|
accept: $e,
|
|
474
475
|
onChange: Te,
|
|
475
|
-
children: C.length < 100 ?
|
|
476
|
+
children: C.length < 100 ? cl : null
|
|
476
477
|
})
|
|
477
478
|
}) : /* @__PURE__ */ l(de, {}), n === "zip" && /* @__PURE__ */ d("div", {
|
|
478
479
|
className: "upload-wrapper",
|
|
@@ -481,7 +482,7 @@ const ot = (z) => {
|
|
|
481
482
|
children: /* @__PURE__ */ l(pe, {
|
|
482
483
|
gutter: [24, 8],
|
|
483
484
|
className: "upload-pannel",
|
|
484
|
-
children: R.map((t) => /* @__PURE__ */ l(
|
|
485
|
+
children: R.map((t) => /* @__PURE__ */ l(yl, {
|
|
485
486
|
span: 24,
|
|
486
487
|
className: "upload-item",
|
|
487
488
|
children: /* @__PURE__ */ d(pe, {
|
|
@@ -491,7 +492,7 @@ const ot = (z) => {
|
|
|
491
492
|
align: "middle",
|
|
492
493
|
children: [/* @__PURE__ */ l("span", {
|
|
493
494
|
className: "upload-item-file-icon",
|
|
494
|
-
children: /* @__PURE__ */ l(
|
|
495
|
+
children: /* @__PURE__ */ l(El, {})
|
|
495
496
|
}), /* @__PURE__ */ l("span", {
|
|
496
497
|
className: "upload-item-name",
|
|
497
498
|
children: t.name
|
|
@@ -500,8 +501,8 @@ const ot = (z) => {
|
|
|
500
501
|
className: "upload-item-upload-delete",
|
|
501
502
|
type: "link",
|
|
502
503
|
disabled: Z,
|
|
503
|
-
onClick: () =>
|
|
504
|
-
children: /* @__PURE__ */ l(
|
|
504
|
+
onClick: () => dl(t),
|
|
505
|
+
children: /* @__PURE__ */ l(Nl, {})
|
|
505
506
|
})]
|
|
506
507
|
})
|
|
507
508
|
}, t.uid))
|
|
@@ -520,7 +521,7 @@ const ot = (z) => {
|
|
|
520
521
|
padding: 0
|
|
521
522
|
},
|
|
522
523
|
onClick: (t) => {
|
|
523
|
-
t.stopPropagation(),
|
|
524
|
+
t.stopPropagation(), pl();
|
|
524
525
|
},
|
|
525
526
|
children: "下载示例 >"
|
|
526
527
|
})]
|
|
@@ -548,8 +549,8 @@ const ot = (z) => {
|
|
|
548
549
|
footer: null,
|
|
549
550
|
children: /* @__PURE__ */ l("div", {
|
|
550
551
|
className: "upload-spin",
|
|
551
|
-
children: /* @__PURE__ */ l(
|
|
552
|
-
tip: n === "image" ? `数据导入中(${
|
|
552
|
+
children: /* @__PURE__ */ l(Sl, {
|
|
553
|
+
tip: n === "image" ? `数据导入中(${se}/${C.length}),请耐心等待` : `处理中(${Ne}/100%),请耐心等待`,
|
|
553
554
|
size: "large",
|
|
554
555
|
children: /* @__PURE__ */ l("div", {
|
|
555
556
|
className: "content"
|
|
@@ -565,11 +566,11 @@ const ot = (z) => {
|
|
|
565
566
|
footer: null,
|
|
566
567
|
children: /* @__PURE__ */ l("div", {
|
|
567
568
|
className: "upload-result",
|
|
568
|
-
children: /* @__PURE__ */ l(
|
|
569
|
+
children: /* @__PURE__ */ l(Ke, {
|
|
569
570
|
status: "success",
|
|
570
571
|
title: n === "image" ? `数据导入完成,成功${J}个,失败${be}个,去重${C.length - J - be}个` : B && `数据导入完成,格式不符合的图片${B.formatErrorCount || 0}个,成功${B.successCount || 0}个,去重${B.repeatCount || 0}个,失败${B.failedCount || 0}个` + (F === "labeled" ? `(${(g.labelFormat || "json").toUpperCase()}格式不符合${B.labelErrorCount}个)` : ""),
|
|
571
572
|
extra: [/* @__PURE__ */ l(P, {
|
|
572
|
-
onClick:
|
|
573
|
+
onClick: rl,
|
|
573
574
|
children: "关闭"
|
|
574
575
|
}, "close")]
|
|
575
576
|
})
|
|
@@ -583,11 +584,11 @@ const ot = (z) => {
|
|
|
583
584
|
footer: null,
|
|
584
585
|
children: /* @__PURE__ */ l("div", {
|
|
585
586
|
className: "upload-result",
|
|
586
|
-
children: /* @__PURE__ */ l(
|
|
587
|
+
children: /* @__PURE__ */ l(Ke, {
|
|
587
588
|
status: "error",
|
|
588
589
|
title: "文件处理失败",
|
|
589
590
|
extra: [/* @__PURE__ */ l(P, {
|
|
590
|
-
onClick:
|
|
591
|
+
onClick: ul,
|
|
591
592
|
children: "关闭"
|
|
592
593
|
}, "close")]
|
|
593
594
|
})
|
|
@@ -596,5 +597,5 @@ const ot = (z) => {
|
|
|
596
597
|
});
|
|
597
598
|
};
|
|
598
599
|
export {
|
|
599
|
-
|
|
600
|
+
nt as default
|
|
600
601
|
};
|