@glodon-aiot/dataset-annotation 3.14.0-alpha.31 → 3.15.0-alpha.1
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/DatasetContext/index.mjs +3 -6
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +91 -94
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +28 -37
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +101 -145
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +195 -256
- package/dist/es/components/DetectionAnnotation/index.mjs +424 -456
- package/dist/es/components/Iconfont/index.mjs +2 -2
- 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 +45 -43
- package/dist/es/components/PicZipImportModal/index.mjs +293 -308
- package/dist/es/components/PreLabelOCR/index.mjs +1 -1
- package/dist/es/constant.mjs +3 -3
- package/dist/es/featuresConfig.mjs +9 -13
- package/dist/es/index.mjs +7 -11
- package/dist/lib/index.js +3 -4
- package/dist/src/DatasetContext/index.d.ts +0 -2
- package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +0 -1
- package/dist/src/constant.d.ts +1 -1
- package/dist/src/featuresConfig.d.ts +0 -4
- package/dist/src/index.d.ts +0 -3
- package/package.json +2 -2
- package/dist/es/components/DetectionAnnotation/components/ImageModal/index.mjs +0 -129
- package/dist/es/components/DetectionAnnotation/components/ImageModal/style.less.mjs +0 -4
- package/dist/es/components/PicZipImportModal/config.mjs +0 -47
- package/dist/es/components/PicZipImportModal/pic_vlm_json_zip.svg.mjs +0 -4
- package/dist/es/components/PicZipImportModal/pic_vlm_zip.svg.mjs +0 -4
- package/dist/es/components/VLMAnnotation/RegionItem.mjs +0 -170
- package/dist/es/components/VLMAnnotation/TextAnnotationPanel.mjs +0 -94
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.mjs +0 -116
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.mjs +0 -115
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.mjs +0 -42
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.mjs +0 -55
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.mjs +0 -51
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.mjs +0 -62
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.mjs +0 -377
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRControl.mjs +0 -100
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.mjs +0 -106
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.mjs +0 -101
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionBoundaryCheck.mjs +0 -103
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.mjs +0 -38
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.mjs +0 -173
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.mjs +0 -72
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.mjs +0 -116
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.mjs +0 -98
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.mjs +0 -156
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/ai.svg.mjs +0 -4
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/del.png.mjs +0 -4
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/error.svg.mjs +0 -4
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/loading.svg.mjs +0 -4
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/star.svg.mjs +0 -4
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +0 -651
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/style.less.mjs +0 -4
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.mjs +0 -33
- package/dist/es/components/VLMAnnotation/components/DragButton.mjs +0 -18
- package/dist/es/components/VLMAnnotation/components/FitToScreenButton.mjs +0 -16
- package/dist/es/components/VLMAnnotation/components/RectangleButton.mjs +0 -30
- package/dist/es/components/VLMAnnotation/components/Toolbar.mjs +0 -40
- package/dist/es/components/VLMAnnotation/components/ZoomControls.mjs +0 -44
- package/dist/es/components/VLMAnnotation/constants.mjs +0 -57
- package/dist/es/components/VLMAnnotation/index.mjs +0 -279
- package/dist/es/components/VLMAnnotation/style.less.mjs +0 -4
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +0 -343
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/style.less.mjs +0 -4
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +0 -240
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +0 -201
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/style.less.mjs +0 -4
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +0 -455
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/style.less.mjs +0 -4
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +0 -149
- package/dist/es/components/VLMAnnotationDetail/VlmModal/style.less.mjs +0 -4
- package/dist/es/components/VLMAnnotationDetail/index.mjs +0 -449
- package/dist/es/components/VLMAnnotationDetail/style.less.mjs +0 -4
- package/dist/es/createVlmtasetAnnotation/index.mjs +0 -131
- package/dist/src/components/DetectionAnnotation/components/ImageModal/index.d.ts +0 -34
- package/dist/src/components/Iconfont/font_4439177_tgvowh6bmlb.d.ts +0 -0
- package/dist/src/components/PicZipImportModal/config.d.ts +0 -23
- package/dist/src/components/VLMAnnotation/ImageAnnotationDebugger.d.ts +0 -4
- package/dist/src/components/VLMAnnotation/RegionItem.d.ts +0 -4
- package/dist/src/components/VLMAnnotation/TextAnnotationPanel.d.ts +0 -4
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.d.ts +0 -13
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.d.ts +0 -38
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.d.ts +0 -18
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.d.ts +0 -7
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.d.ts +0 -13
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.d.ts +0 -22
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.d.ts +0 -34
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRControl.d.ts +0 -16
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.d.ts +0 -11
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.d.ts +0 -29
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionBoundaryCheck.d.ts +0 -31
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.d.ts +0 -13
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.d.ts +0 -41
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.d.ts +0 -12
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.d.ts +0 -16
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.d.ts +0 -32
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.d.ts +0 -25
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/index.d.ts +0 -4
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.d.ts +0 -32
- package/dist/src/components/VLMAnnotation/components/DragButton.d.ts +0 -7
- package/dist/src/components/VLMAnnotation/components/FitToScreenButton.d.ts +0 -6
- package/dist/src/components/VLMAnnotation/components/RectangleButton.d.ts +0 -7
- package/dist/src/components/VLMAnnotation/components/Toolbar.d.ts +0 -4
- package/dist/src/components/VLMAnnotation/components/ZoomControls.d.ts +0 -4
- package/dist/src/components/VLMAnnotation/constants.d.ts +0 -113
- package/dist/src/components/VLMAnnotation/index.d.ts +0 -6
- package/dist/src/components/VLMAnnotation/types.d.ts +0 -187
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.d.ts +0 -14
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts +0 -12
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.d.ts +0 -12
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/index.d.ts +0 -12
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +0 -17
- package/dist/src/components/VLMAnnotationDetail/index.d.ts +0 -6
- package/dist/src/createVlmtasetAnnotation/index.d.ts +0 -16
|
@@ -1,332 +1,323 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
for (var i in
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var i of
|
|
9
|
-
|
|
10
|
-
return
|
|
1
|
+
var ol = Object.defineProperty;
|
|
2
|
+
var Be = Object.getOwnPropertySymbols;
|
|
3
|
+
var rl = Object.prototype.hasOwnProperty, cl = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var Le = (y, l, i) => l in y ? ol(y, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : y[l] = i, Ae = (y, l) => {
|
|
5
|
+
for (var i in l || (l = {}))
|
|
6
|
+
rl.call(l, i) && Le(y, i, l[i]);
|
|
7
|
+
if (Be)
|
|
8
|
+
for (var i of Be(l))
|
|
9
|
+
cl.call(l, i) && Le(y, i, l[i]);
|
|
10
|
+
return y;
|
|
11
11
|
};
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var re = (y, l, i) => new Promise((f, M) => {
|
|
13
|
+
var D = (w) => {
|
|
14
14
|
try {
|
|
15
|
-
|
|
16
|
-
} catch (
|
|
17
|
-
|
|
15
|
+
F(i.next(w));
|
|
16
|
+
} catch (z) {
|
|
17
|
+
M(z);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
19
|
+
}, Z = (w) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
F(i.throw(w));
|
|
22
|
+
} catch (z) {
|
|
23
|
+
M(z);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
|
|
25
|
+
}, F = (w) => w.done ? f(w.value) : Promise.resolve(w.value).then(D, Z);
|
|
26
|
+
F((i = i.apply(y, l)).next());
|
|
27
27
|
});
|
|
28
|
-
import { jsxs as
|
|
29
|
-
import { useContext as
|
|
30
|
-
import { Form as
|
|
28
|
+
import { jsxs as p, Fragment as ce, jsx as e } from "react/jsx-runtime";
|
|
29
|
+
import { useContext as dl, useState as r, useRef as pl, useEffect as A } from "react";
|
|
30
|
+
import { Form as U, message as R, Modal as H, Button as O, Radio as x, Space as Ue, Upload as ul, Row as de, Col as ml, Spin as fl, Result as Oe } from "antd";
|
|
31
31
|
import "./style.less.mjs";
|
|
32
|
-
import {
|
|
33
|
-
import
|
|
34
|
-
import { initMinio as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
let f = 0, G = 0, P = 0, I = 0;
|
|
45
|
-
const st = (w) => {
|
|
32
|
+
import { CloudUploadOutlined as hl, PaperClipOutlined as gl, DeleteOutlined as Cl, PlusOutlined as bl } from "@ant-design/icons";
|
|
33
|
+
import yl from "browser-md5-file";
|
|
34
|
+
import { initMinio as Te, putObjectBuffer as Pe } from "@glodon-aiot/minio";
|
|
35
|
+
import Nl from "antd/lib/upload/Dragger";
|
|
36
|
+
import Sl from "./pic_zip.svg.mjs";
|
|
37
|
+
import wl from "./pic_zip_json.svg.mjs";
|
|
38
|
+
import { GB as zl, MB as jl } from "../../constant.mjs";
|
|
39
|
+
import { fileSuffixToLowerCase as kl } from "../../utils/index.mjs";
|
|
40
|
+
import vl from "../../DatasetContext/index.mjs";
|
|
41
|
+
import { EXAMPLE_SRC_ROOT as El } from "../../featuresConfig.mjs";
|
|
42
|
+
let m = 0, G = 0, T = 0, _ = 0;
|
|
43
|
+
const Wl = (y) => {
|
|
46
44
|
const {
|
|
47
|
-
datasetIam:
|
|
45
|
+
datasetIam: l,
|
|
48
46
|
datasetId: i,
|
|
49
|
-
currentVersion:
|
|
50
|
-
tenCode:
|
|
51
|
-
isVisible:
|
|
52
|
-
markType:
|
|
53
|
-
setIsVisible:
|
|
54
|
-
getVersionListRequest:
|
|
55
|
-
onUploadStatusChange:
|
|
56
|
-
setIsConfirm:
|
|
57
|
-
tableReload:
|
|
47
|
+
currentVersion: f,
|
|
48
|
+
tenCode: M,
|
|
49
|
+
isVisible: D,
|
|
50
|
+
markType: Z,
|
|
51
|
+
setIsVisible: F,
|
|
52
|
+
getVersionListRequest: w,
|
|
53
|
+
onUploadStatusChange: z,
|
|
54
|
+
setIsConfirm: I,
|
|
55
|
+
tableReload: pe,
|
|
58
56
|
loadVersionData: q,
|
|
59
|
-
actionAfterFinish:
|
|
60
|
-
} =
|
|
57
|
+
actionAfterFinish: ue
|
|
58
|
+
} = y, {
|
|
61
59
|
services: {
|
|
62
|
-
cvforceDatahub:
|
|
60
|
+
cvforceDatahub: u
|
|
63
61
|
},
|
|
64
62
|
featuresConfig: {
|
|
65
|
-
exampleSrcRoot:
|
|
63
|
+
exampleSrcRoot: me
|
|
66
64
|
} = {
|
|
67
|
-
exampleSrcRoot:
|
|
65
|
+
exampleSrcRoot: El
|
|
68
66
|
}
|
|
69
|
-
} =
|
|
67
|
+
} = dl(vl), [N, Ve] = r(0), [S, Me] = r(0), [Q, De] = r([]), [P, Ke] = r(), [fe, Rl] = r([]), [Y, J] = r(!1), [he, ee] = r(!1), [K, le] = r(!1), [te, Ge] = r(0), [ge, _e] = r(0), [W, Ce] = r(-1), [se, xl] = r([]), [be, Fl] = r([]), [ye, ie] = r(!1), Ze = new yl(), [X] = U.useForm(), n = U.useWatch("acceptType", X), v = U.useWatch("labelState", X), [h, Ne] = r([]), [k, Se] = r([]), [E, qe] = r(), [we, ze] = r(0), [je, ke] = r(!1), [$l, Je] = r(""), [We, ve] = r(!1), [Ee, Xe] = r(
|
|
70
68
|
"unlabeled"
|
|
71
69
|
/* Unlabeled */
|
|
72
|
-
),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
f = 0, G = 0, P = 0, I = 0, te(!1), Z && (ae.current = !1, q && q());
|
|
77
|
-
}, [Z]);
|
|
70
|
+
), ne = pl(!0), ae = ["image/jpeg", "image/jpg", "image/png", "image/bmp"], oe = 14 * jl;
|
|
71
|
+
A(() => {
|
|
72
|
+
m = 0, G = 0, T = 0, _ = 0, le(!1), D && (ne.current = !1, q && q());
|
|
73
|
+
}, [D]);
|
|
78
74
|
const Re = (t, s) => {
|
|
79
75
|
var a;
|
|
80
76
|
if (n === "image") {
|
|
81
|
-
|
|
77
|
+
ie(!0);
|
|
82
78
|
let o = 0;
|
|
83
|
-
if (
|
|
79
|
+
if (m = m + 1, G = G + 1, s.length === 0)
|
|
84
80
|
return;
|
|
85
|
-
let
|
|
86
|
-
const [...c] = s,
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
let d = 0;
|
|
82
|
+
const [...c] = s, C = window.URL || window.webkitURL, b = new Image();
|
|
83
|
+
b.src = C.createObjectURL(t), b.onload = () => {
|
|
84
|
+
Q.push({
|
|
89
85
|
name: t.name,
|
|
90
|
-
src:
|
|
91
|
-
width:
|
|
92
|
-
height:
|
|
93
|
-
}),
|
|
94
|
-
}, s.map((
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
}), c.length > 100 && c.splice(100, c.length),
|
|
98
|
-
const
|
|
99
|
-
if (
|
|
100
|
-
if (!
|
|
86
|
+
src: b.src,
|
|
87
|
+
width: b.width,
|
|
88
|
+
height: b.height
|
|
89
|
+
}), De(Q);
|
|
90
|
+
}, s.map((j) => {
|
|
91
|
+
const $ = ae.some((L) => L === j.type), B = j.size <= oe;
|
|
92
|
+
$ ? B || (o = o + 1, c.splice(c.findIndex((L) => L.name === j.name), 1)) : (d = d + 1, c.splice(c.findIndex((L) => L.name === j.name), 1));
|
|
93
|
+
}), c.length > 100 && c.splice(100, c.length), Ve(d), Me(o), G === s.length && (ie(!0), G = 0);
|
|
94
|
+
const g = ae.some((j) => j === t.type), V = t.size <= oe;
|
|
95
|
+
if (g) {
|
|
96
|
+
if (!V)
|
|
101
97
|
return !1;
|
|
102
98
|
} else
|
|
103
99
|
return !1;
|
|
104
100
|
} else {
|
|
105
|
-
if (t.size > 2 *
|
|
101
|
+
if (t.size > 2 * zl)
|
|
106
102
|
return R.error(`${t.name}文件总大小不能超过2G`), !1;
|
|
107
103
|
const o = (a = t.name) == null ? void 0 : a.substring(t.name.lastIndexOf("."));
|
|
108
104
|
if (n === "zip" && o !== ".zip")
|
|
109
105
|
return R.error("存在格式不正确的文件,已自动去除"), !1;
|
|
110
|
-
Se((
|
|
106
|
+
Se((d) => d.length >= 1 ? d : [...d, t]);
|
|
111
107
|
}
|
|
112
108
|
return !1;
|
|
113
109
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}, [
|
|
117
|
-
const
|
|
110
|
+
A(() => {
|
|
111
|
+
ye !== !1 && (!N && !S && !m || (m = m - _ - N - S, m < 101 ? N > 0 && S > 0 ? (R.error(`${N + S}个文件添加失败,格式、大小或数量不符合要求`), m = m - N - S) : N > 0 && S === 0 ? R.error(`${N}个文件添加失败,格式不符合要求`) : N === 0 && S > 0 ? R.error(`${S}个文件添加失败,单张图片超过14M`) : N === 0 && S === 0 && R.success("校验成功") : N + S === 0 ? (R.error(`${m - 100}个文件添加失败,超过数量限制`), m = 100) : (R.error(`${m - 100 + N + S}个文件添加失败,格式、大小或数量不符合要求`), m = m < 101 ? m : 100), ie(!1)));
|
|
112
|
+
}, [ye]);
|
|
113
|
+
const He = (t) => {
|
|
118
114
|
const s = t.originFileObj;
|
|
119
115
|
return new Promise((a, o) => {
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
Ze.md5(s, (d, c) => {
|
|
117
|
+
d && o(d), Qe(c, s), a(c);
|
|
122
118
|
});
|
|
123
119
|
});
|
|
124
|
-
},
|
|
125
|
-
if (!
|
|
120
|
+
}, Ie = () => re(void 0, null, function* () {
|
|
121
|
+
if (!h)
|
|
126
122
|
return;
|
|
127
123
|
const t = [];
|
|
128
|
-
for (let s = 0; s <
|
|
129
|
-
const a =
|
|
124
|
+
for (let s = 0; s < h.length; s++) {
|
|
125
|
+
const a = h[s], o = yield He(a);
|
|
130
126
|
t.push(o);
|
|
131
127
|
}
|
|
132
|
-
!i || t.length === 0 ||
|
|
133
|
-
|
|
128
|
+
!i || t.length === 0 || u == null || u.getDeduplication(t, i).then((s) => {
|
|
129
|
+
Ke(s), ve(!1);
|
|
134
130
|
});
|
|
135
131
|
});
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}, [
|
|
139
|
-
const
|
|
140
|
-
s.md5 = t,
|
|
141
|
-
},
|
|
132
|
+
A(() => {
|
|
133
|
+
Ie();
|
|
134
|
+
}, [h]);
|
|
135
|
+
const Qe = (t, s) => {
|
|
136
|
+
s.md5 = t, fe.push(s);
|
|
137
|
+
}, xe = ({
|
|
142
138
|
fileList: t
|
|
143
139
|
}) => {
|
|
144
140
|
if (n === "zip")
|
|
145
141
|
return;
|
|
146
|
-
|
|
147
|
-
const s = t.filter((a) => a.size && a.size <=
|
|
148
|
-
s.splice(100, s.length), s.length <
|
|
149
|
-
},
|
|
150
|
-
n === "zip" && (
|
|
151
|
-
},
|
|
142
|
+
ve(!0);
|
|
143
|
+
const s = t.filter((a) => a.size && a.size <= oe ? ae.some((o) => a.type === o) : !1);
|
|
144
|
+
s.splice(100, s.length), s.length < h.length ? (Ne(s), _++) : (T = T - _, _ = 0, T++, T == s.length && Ne(s), T > s.length && (T = s.length));
|
|
145
|
+
}, Fe = () => {
|
|
146
|
+
n === "zip" && (ne.current = !0), F(!1);
|
|
147
|
+
}, Ye = () => {
|
|
152
148
|
if (n === "image") {
|
|
153
|
-
if (!
|
|
149
|
+
if (!P)
|
|
154
150
|
return;
|
|
155
151
|
let t = 0, s = 0;
|
|
156
|
-
if (
|
|
157
|
-
var
|
|
158
|
-
const
|
|
159
|
-
var
|
|
160
|
-
return ((
|
|
161
|
-
})) == null ? void 0 :
|
|
162
|
-
|
|
152
|
+
if (P.duplicated.length !== 0 && P.duplicated.map((a, o) => {
|
|
153
|
+
var C;
|
|
154
|
+
const d = P.duplicatedMd5[o], c = ((C = h.find((b) => {
|
|
155
|
+
var g;
|
|
156
|
+
return ((g = b.originFileObj) == null ? void 0 : g.md5) === d;
|
|
157
|
+
})) == null ? void 0 : C.name) || "";
|
|
158
|
+
se.push({
|
|
163
159
|
labels: [],
|
|
164
160
|
fileKey: a,
|
|
165
161
|
sampleFileName: {
|
|
166
162
|
name: c
|
|
167
163
|
}
|
|
168
164
|
});
|
|
169
|
-
}),
|
|
170
|
-
const a =
|
|
171
|
-
const c =
|
|
165
|
+
}), P.unduplicated.length !== 0) {
|
|
166
|
+
const a = P.unduplicated.map((o) => new Promise((d) => {
|
|
167
|
+
const c = fe.find((B) => B.md5 === o);
|
|
172
168
|
if (!c)
|
|
173
|
-
return
|
|
174
|
-
const
|
|
169
|
+
return d();
|
|
170
|
+
const C = c.name, b = C.substring(C.indexOf(".")), g = Q.find((B) => B.name === C), V = {
|
|
175
171
|
"Content-Type": "application/octet-stream",
|
|
176
|
-
"X-Amz-Meta-Width":
|
|
177
|
-
"X-Amz-Meta-Height":
|
|
178
|
-
},
|
|
172
|
+
"X-Amz-Meta-Width": g == null ? void 0 : g.width,
|
|
173
|
+
"X-Amz-Meta-Height": g == null ? void 0 : g.height
|
|
174
|
+
}, j = `dataset/${i}/sample/${o}${kl(b)}`;
|
|
179
175
|
delete c.md5;
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
endPoint:
|
|
184
|
-
useSSL:
|
|
185
|
-
accessKey:
|
|
186
|
-
secretKey:
|
|
187
|
-
}),
|
|
188
|
-
J(!0), s += 1, L && (t += 1,
|
|
176
|
+
const $ = new FileReader();
|
|
177
|
+
$.readAsArrayBuffer(c), $.onload = (B) => {
|
|
178
|
+
Te({
|
|
179
|
+
endPoint: l == null ? void 0 : l.endpoints[0],
|
|
180
|
+
useSSL: l == null ? void 0 : l.useSSL,
|
|
181
|
+
accessKey: l == null ? void 0 : l.accessKey,
|
|
182
|
+
secretKey: l == null ? void 0 : l.secretKey
|
|
183
|
+
}), Pe(M, j, B.target.result, V, (L, Bl) => {
|
|
184
|
+
J(!0), s += 1, L && (t += 1, _e(t)), Ge(s), be.push({
|
|
189
185
|
labels: [],
|
|
190
|
-
fileKey: `${
|
|
186
|
+
fileKey: `${M}/${j}`,
|
|
191
187
|
sampleFileName: {
|
|
192
|
-
name:
|
|
188
|
+
name: C
|
|
193
189
|
}
|
|
194
|
-
}),
|
|
190
|
+
}), d();
|
|
195
191
|
});
|
|
196
192
|
};
|
|
197
193
|
}));
|
|
198
194
|
Promise.all(a).then(() => {
|
|
199
|
-
!i || !
|
|
200
|
-
|
|
201
|
-
samples:
|
|
195
|
+
!i || !f || setTimeout(() => {
|
|
196
|
+
u == null || u.postDatasetsIdVersionsVidSamples(i, f.id, {
|
|
197
|
+
samples: be.concat(se)
|
|
202
198
|
}).then(() => {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}),
|
|
199
|
+
u.getDatasetsIdVersionsVid(i, f.id).then((o) => {
|
|
200
|
+
Ce(o.samplesCount - f.samplesCount);
|
|
201
|
+
}), I(!0), z && z(!1);
|
|
206
202
|
});
|
|
207
203
|
}, 100);
|
|
208
204
|
});
|
|
209
205
|
} else {
|
|
210
|
-
if (!i || !
|
|
206
|
+
if (!i || !f)
|
|
211
207
|
return;
|
|
212
|
-
|
|
213
|
-
samples:
|
|
208
|
+
u == null || u.postDatasetsIdVersionsVidSamples(i, f.id, {
|
|
209
|
+
samples: se
|
|
214
210
|
}).then(() => {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}),
|
|
211
|
+
u.getDatasetsIdVersionsVid(i, f.id).then((a) => {
|
|
212
|
+
Ce(a.samplesCount - f.samplesCount);
|
|
213
|
+
}), I(!0), z && z(!1);
|
|
218
214
|
});
|
|
219
215
|
}
|
|
220
216
|
} else
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
!i || !
|
|
224
|
-
var
|
|
217
|
+
el(k);
|
|
218
|
+
}, el = (t) => {
|
|
219
|
+
!i || !f || t.map((s, a) => {
|
|
220
|
+
var b;
|
|
225
221
|
const o = {
|
|
226
222
|
"Content-Type": "application/octet-stream"
|
|
227
|
-
},
|
|
228
|
-
endPoint:
|
|
229
|
-
useSSL:
|
|
230
|
-
accessKey:
|
|
231
|
-
secretKey:
|
|
232
|
-
}, c = (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
if (
|
|
236
|
-
console.log(
|
|
223
|
+
}, d = {
|
|
224
|
+
endPoint: l == null ? void 0 : l.endpoints[0],
|
|
225
|
+
useSSL: l == null ? void 0 : l.useSSL,
|
|
226
|
+
accessKey: l == null ? void 0 : l.accessKey,
|
|
227
|
+
secretKey: l == null ? void 0 : l.secretKey
|
|
228
|
+
}, c = (l == null ? void 0 : l.prefix) + ((b = t[0]) == null ? void 0 : b.name), C = new FileReader();
|
|
229
|
+
C.readAsArrayBuffer(s), C.onload = (g) => {
|
|
230
|
+
Te(d), Pe(l == null ? void 0 : l.bucket, c, g.target.result, o, (V, j) => {
|
|
231
|
+
if (V)
|
|
232
|
+
console.log(V);
|
|
237
233
|
else {
|
|
238
|
-
if (
|
|
234
|
+
if (ne.current)
|
|
239
235
|
return;
|
|
240
|
-
J(!0),
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
zipUrls: [(e == null ? void 0 : e.bucket) + "/" + c]
|
|
247
|
-
}, (h === "ocr" || h === "vlm") && {
|
|
248
|
-
type: A === "labeled" ? 1 : 0
|
|
249
|
-
})).then((F) => {
|
|
250
|
-
Te(F), Fe(F);
|
|
236
|
+
J(!0), u == null || u.postUploadPicsZip(i, f.id, Ae({
|
|
237
|
+
zipUrls: [(l == null ? void 0 : l.bucket) + "/" + c]
|
|
238
|
+
}, Z === "ocr" && {
|
|
239
|
+
type: v === "labeled" ? 1 : 0
|
|
240
|
+
})).then(($) => {
|
|
241
|
+
ll($), Je($);
|
|
251
242
|
});
|
|
252
243
|
}
|
|
253
244
|
});
|
|
254
245
|
};
|
|
255
246
|
});
|
|
256
|
-
},
|
|
247
|
+
}, ll = (t) => re(void 0, null, function* () {
|
|
257
248
|
var s;
|
|
258
|
-
if (!(!i || !
|
|
249
|
+
if (!(!i || !f || !u))
|
|
259
250
|
try {
|
|
260
|
-
const a = yield
|
|
251
|
+
const a = yield u.checkFileResult(i, f.id, {
|
|
261
252
|
taskId: t
|
|
262
|
-
}, 5e3,
|
|
263
|
-
|
|
253
|
+
}, 5e3, (o) => {
|
|
254
|
+
ze(o);
|
|
264
255
|
});
|
|
265
|
-
a &&
|
|
256
|
+
a && qe(JSON.parse(a));
|
|
266
257
|
} catch (a) {
|
|
267
258
|
if (((s = a.cause) == null ? void 0 : s.code) === -101) {
|
|
268
|
-
|
|
259
|
+
ke(!0);
|
|
269
260
|
return;
|
|
270
261
|
}
|
|
271
262
|
}
|
|
272
263
|
});
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}, [
|
|
276
|
-
|
|
277
|
-
}, [
|
|
278
|
-
W !== -1 && (
|
|
264
|
+
A(() => {
|
|
265
|
+
E && (ze(100), ee(!0));
|
|
266
|
+
}, [E]), A(() => {
|
|
267
|
+
te !== 0 && (I(!1), z && z(!0));
|
|
268
|
+
}, [te]), A(() => {
|
|
269
|
+
W !== -1 && (ee(!0), le(!1));
|
|
279
270
|
}, [W]);
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
},
|
|
283
|
-
|
|
284
|
-
},
|
|
285
|
-
children: [/* @__PURE__ */
|
|
271
|
+
const tl = () => {
|
|
272
|
+
$e(), ee(!1), ue && ue();
|
|
273
|
+
}, $e = () => {
|
|
274
|
+
w(), J(!1), F(!1), pe && pe(), q && q();
|
|
275
|
+
}, sl = /* @__PURE__ */ p("div", {
|
|
276
|
+
children: [/* @__PURE__ */ e(bl, {}), /* @__PURE__ */ e("div", {
|
|
286
277
|
style: {
|
|
287
278
|
marginTop: 8
|
|
288
279
|
},
|
|
289
280
|
children: "添加图片"
|
|
290
281
|
})]
|
|
291
|
-
}),
|
|
292
|
-
const s =
|
|
282
|
+
}), il = (t) => {
|
|
283
|
+
const s = k.filter((a) => a.uid !== t.uid);
|
|
293
284
|
Se(s);
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
},
|
|
297
|
-
|
|
285
|
+
}, nl = () => {
|
|
286
|
+
v === "labeled" ? window.location.href = `${me}/%E6%A0%87%E6%B3%A8%E6%A0%BC%E5%BC%8F%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${me}/%E7%A4%BA%E4%BE%8B%E5%8E%8B%E7%BC%A9%E5%8C%85.zip`;
|
|
287
|
+
}, al = () => {
|
|
288
|
+
w(), ke(!1), J(!1), F(!1);
|
|
298
289
|
};
|
|
299
|
-
return
|
|
300
|
-
|
|
301
|
-
labelFormat:
|
|
290
|
+
return A(() => {
|
|
291
|
+
Ee === "labeled" && X.setFieldsValue({
|
|
292
|
+
labelFormat: "json",
|
|
302
293
|
acceptType: "zip"
|
|
303
294
|
/* Zip */
|
|
304
295
|
});
|
|
305
|
-
}, [
|
|
306
|
-
children: [/* @__PURE__ */
|
|
296
|
+
}, [Ee]), /* @__PURE__ */ p(ce, {
|
|
297
|
+
children: [/* @__PURE__ */ e(H, {
|
|
307
298
|
className: "upload-pics",
|
|
308
299
|
width: 600,
|
|
309
300
|
title: "导入数据",
|
|
310
|
-
open:
|
|
301
|
+
open: D,
|
|
311
302
|
destroyOnClose: !0,
|
|
312
|
-
onCancel: () =>
|
|
303
|
+
onCancel: () => Fe(),
|
|
313
304
|
maskClosable: !1,
|
|
314
305
|
centered: !0,
|
|
315
|
-
footer: [/* @__PURE__ */
|
|
316
|
-
onClick:
|
|
306
|
+
footer: [/* @__PURE__ */ e(O, {
|
|
307
|
+
onClick: Fe,
|
|
317
308
|
children: "取消"
|
|
318
|
-
}, "cancel"), /* @__PURE__ */
|
|
309
|
+
}, "cancel"), /* @__PURE__ */ e(O, {
|
|
319
310
|
type: "primary",
|
|
320
311
|
htmlType: "submit",
|
|
321
312
|
form: "importModal",
|
|
322
|
-
disabled: n === "image" && !
|
|
323
|
-
loading:
|
|
313
|
+
disabled: n === "image" && !h.length || n === "zip" && !k.length || Y && we == 0 || We,
|
|
314
|
+
loading: K == !0,
|
|
324
315
|
onClick: () => {
|
|
325
|
-
|
|
316
|
+
Ye(), le(!0);
|
|
326
317
|
},
|
|
327
318
|
children: "导入"
|
|
328
319
|
}, "confirm")],
|
|
329
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ p(U, {
|
|
330
321
|
className: "file-form",
|
|
331
322
|
preserve: !1,
|
|
332
323
|
form: X,
|
|
@@ -342,251 +333,245 @@ const st = (w) => {
|
|
|
342
333
|
width: 110
|
|
343
334
|
}
|
|
344
335
|
},
|
|
345
|
-
children: [
|
|
336
|
+
children: [Z === "ocr" && /* @__PURE__ */ e(U.Item, {
|
|
346
337
|
label: "数据标注状态",
|
|
347
338
|
name: "labelState",
|
|
348
339
|
rules: [{
|
|
349
340
|
required: !0,
|
|
350
341
|
message: "请选择数据标注状态"
|
|
351
342
|
}],
|
|
352
|
-
children: /* @__PURE__ */
|
|
353
|
-
disabled:
|
|
343
|
+
children: /* @__PURE__ */ p(x.Group, {
|
|
344
|
+
disabled: K,
|
|
354
345
|
onChange: (t) => {
|
|
355
|
-
|
|
346
|
+
Xe(t.target.value);
|
|
356
347
|
},
|
|
357
|
-
children: [/* @__PURE__ */
|
|
348
|
+
children: [/* @__PURE__ */ e(x, {
|
|
358
349
|
value: "unlabeled",
|
|
359
350
|
children: "无标注信息"
|
|
360
|
-
}), /* @__PURE__ */
|
|
351
|
+
}), /* @__PURE__ */ e(x, {
|
|
361
352
|
value: "labeled",
|
|
362
|
-
children:
|
|
363
|
-
title: "支持上传带OCR标注信息的数据",
|
|
364
|
-
children: /* @__PURE__ */ l(zl, {
|
|
365
|
-
style: {
|
|
366
|
-
cursor: "pointer",
|
|
367
|
-
marginLeft: 4,
|
|
368
|
-
marginTop: 2
|
|
369
|
-
}
|
|
370
|
-
})
|
|
371
|
-
})]
|
|
353
|
+
children: "有标注信息"
|
|
372
354
|
})]
|
|
373
355
|
})
|
|
374
|
-
}),
|
|
356
|
+
}), v === "labeled" && /* @__PURE__ */ e(U.Item, {
|
|
375
357
|
label: "标注格式",
|
|
376
358
|
name: "labelFormat",
|
|
377
359
|
rules: [{
|
|
378
360
|
required: !0,
|
|
379
361
|
message: "请选择标注格式"
|
|
380
362
|
}],
|
|
381
|
-
children: /* @__PURE__ */
|
|
382
|
-
disabled:
|
|
383
|
-
children: /* @__PURE__ */
|
|
384
|
-
value:
|
|
385
|
-
children:
|
|
363
|
+
children: /* @__PURE__ */ e(x.Group, {
|
|
364
|
+
disabled: K,
|
|
365
|
+
children: /* @__PURE__ */ e(x, {
|
|
366
|
+
value: "json",
|
|
367
|
+
children: "json"
|
|
386
368
|
})
|
|
387
369
|
})
|
|
388
|
-
}), /* @__PURE__ */
|
|
370
|
+
}), /* @__PURE__ */ e(U.Item, {
|
|
389
371
|
label: "导入方式",
|
|
390
372
|
name: "acceptType",
|
|
391
373
|
rules: [{
|
|
392
374
|
required: !0,
|
|
393
375
|
message: "请选择导入方式"
|
|
394
376
|
}],
|
|
395
|
-
children: /* @__PURE__ */
|
|
396
|
-
disabled:
|
|
397
|
-
children: [
|
|
377
|
+
children: /* @__PURE__ */ p(x.Group, {
|
|
378
|
+
disabled: K,
|
|
379
|
+
children: [v !== "labeled" && /* @__PURE__ */ e(x.Button, {
|
|
398
380
|
value: "image",
|
|
399
381
|
children: "上传图片"
|
|
400
|
-
}), /* @__PURE__ */
|
|
382
|
+
}), /* @__PURE__ */ e(x.Button, {
|
|
401
383
|
value: "zip",
|
|
402
384
|
children: "上传压缩包"
|
|
403
385
|
})]
|
|
404
386
|
})
|
|
405
|
-
}), /* @__PURE__ */
|
|
387
|
+
}), /* @__PURE__ */ p("div", {
|
|
406
388
|
className: "file-upload",
|
|
407
|
-
children: [(n === "image" && !
|
|
389
|
+
children: [(n === "image" && !h.length || n === "zip") && /* @__PURE__ */ p(Nl, {
|
|
408
390
|
name: "file",
|
|
409
391
|
showUploadList: !1,
|
|
410
392
|
multiple: !0,
|
|
411
393
|
beforeUpload: Re,
|
|
412
|
-
accept: n === "zip" ? ".zip" :
|
|
394
|
+
accept: n === "zip" ? ".zip" : "image/png, image/jpeg, image/jpg, image/bmp",
|
|
413
395
|
maxCount: n === "zip" ? 1 : void 0,
|
|
414
|
-
onChange:
|
|
415
|
-
disabled: n === "zip" ?
|
|
416
|
-
children: [/* @__PURE__ */
|
|
396
|
+
onChange: xe,
|
|
397
|
+
disabled: n === "zip" ? k.length === 1 : !1,
|
|
398
|
+
children: [/* @__PURE__ */ e("span", {
|
|
417
399
|
className: "file-upload-icon",
|
|
418
|
-
children: /* @__PURE__ */
|
|
419
|
-
}), /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ e(hl, {})
|
|
401
|
+
}), /* @__PURE__ */ p(Ue, {
|
|
420
402
|
className: "file-upload-action",
|
|
421
|
-
children: [n === "image" && "拖拽图片至此,或者", n === "zip" && "拖拽包含“图片”的压缩包至此,或者", /* @__PURE__ */
|
|
403
|
+
children: [n === "image" && "拖拽图片至此,或者", n === "zip" && "拖拽包含“图片”的压缩包至此,或者", /* @__PURE__ */ e(O, {
|
|
422
404
|
type: "link",
|
|
423
405
|
style: {
|
|
424
406
|
padding: 0
|
|
425
407
|
},
|
|
426
|
-
disabled: n === "zip" ?
|
|
408
|
+
disabled: n === "zip" ? k.length === 1 : !1,
|
|
427
409
|
children: n === "image" ? "上传图片" : "上传压缩包"
|
|
428
410
|
})]
|
|
429
|
-
}), n === "image" && /* @__PURE__ */
|
|
411
|
+
}), n === "image" && /* @__PURE__ */ p("div", {
|
|
430
412
|
className: "file-upload-desc",
|
|
431
413
|
style: {
|
|
432
414
|
width: 350
|
|
433
415
|
},
|
|
434
|
-
children: [/* @__PURE__ */
|
|
416
|
+
children: [/* @__PURE__ */ e("div", {
|
|
435
417
|
className: "item-upload-desc item-upload-desc__1",
|
|
436
|
-
children:
|
|
437
|
-
}), /* @__PURE__ */
|
|
418
|
+
children: "1. 支持jpg、png 、jpeg 、bmp格式,单张图片不超过14M;"
|
|
419
|
+
}), /* @__PURE__ */ e("div", {
|
|
438
420
|
className: "item-upload-desc",
|
|
439
421
|
children: "2. 单次上传最多可选择100个文件。"
|
|
440
422
|
})]
|
|
441
|
-
}), n === "zip" && /* @__PURE__ */
|
|
423
|
+
}), n === "zip" && /* @__PURE__ */ p("div", {
|
|
442
424
|
className: "file-upload-desc",
|
|
443
425
|
style: {
|
|
444
426
|
width: 350
|
|
445
427
|
},
|
|
446
|
-
children: [/* @__PURE__ */
|
|
428
|
+
children: [/* @__PURE__ */ e("div", {
|
|
447
429
|
className: "item-upload-desc item-upload-desc__1",
|
|
448
430
|
children: "1. 仅支持.zip格式,单个压缩包不超过2G;"
|
|
449
|
-
}),
|
|
450
|
-
children:
|
|
431
|
+
}), v === "labeled" ? /* @__PURE__ */ p(ce, {
|
|
432
|
+
children: [/* @__PURE__ */ e("div", {
|
|
433
|
+
className: "item-upload-desc",
|
|
434
|
+
children: "2. 压缩包内每张图片(jpg、png 、jpeg 、bmp格式)需要对应一个json文件,名称需一致,位置处在一级目录下;"
|
|
435
|
+
}), /* @__PURE__ */ e("div", {
|
|
451
436
|
className: "item-upload-desc",
|
|
452
|
-
children:
|
|
453
|
-
}
|
|
454
|
-
}) : /* @__PURE__ */
|
|
437
|
+
children: "3. json文件需包含标签、4点坐标,格式可参考样例。"
|
|
438
|
+
})]
|
|
439
|
+
}) : /* @__PURE__ */ e("div", {
|
|
455
440
|
className: "item-upload-desc",
|
|
456
|
-
children:
|
|
457
|
-
}), /* @__PURE__ */
|
|
441
|
+
children: "2. 压缩包内图片格式要求为:图片类型为jpg/png/bmp/jpeg,单张图片不超过14M;"
|
|
442
|
+
}), /* @__PURE__ */ p("div", {
|
|
458
443
|
className: "item-upload-desc",
|
|
459
|
-
children: [
|
|
444
|
+
children: [v === "labeled" ? 4 : 3, ". 单次仅可上传1个文件。"]
|
|
460
445
|
})]
|
|
461
446
|
})]
|
|
462
|
-
}), n === "image" &&
|
|
447
|
+
}), n === "image" && h.length ? /* @__PURE__ */ e("div", {
|
|
463
448
|
className: "picture-upload",
|
|
464
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ e(ul, {
|
|
465
450
|
listType: "picture-card",
|
|
466
|
-
fileList:
|
|
451
|
+
fileList: h,
|
|
467
452
|
multiple: !0,
|
|
468
453
|
showUploadList: {
|
|
469
454
|
showPreviewIcon: !1
|
|
470
455
|
},
|
|
471
456
|
beforeUpload: Re,
|
|
472
|
-
accept:
|
|
473
|
-
onChange:
|
|
474
|
-
children:
|
|
457
|
+
accept: "image/png, image/jpeg, image/jpg, image/bmp",
|
|
458
|
+
onChange: xe,
|
|
459
|
+
children: h.length < 100 ? sl : null
|
|
475
460
|
})
|
|
476
|
-
}) : /* @__PURE__ */
|
|
461
|
+
}) : /* @__PURE__ */ e(ce, {}), n === "zip" && /* @__PURE__ */ p("div", {
|
|
477
462
|
className: "upload-wrapper",
|
|
478
|
-
children: [
|
|
463
|
+
children: [k != null && k.length ? /* @__PURE__ */ e("div", {
|
|
479
464
|
className: "upload-main",
|
|
480
|
-
children: /* @__PURE__ */
|
|
465
|
+
children: /* @__PURE__ */ e(de, {
|
|
481
466
|
gutter: [24, 8],
|
|
482
467
|
className: "upload-pannel",
|
|
483
|
-
children:
|
|
468
|
+
children: k.map((t) => /* @__PURE__ */ e(ml, {
|
|
484
469
|
span: 24,
|
|
485
470
|
className: "upload-item",
|
|
486
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ p(de, {
|
|
487
472
|
justify: "space-between",
|
|
488
473
|
align: "middle",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
474
|
+
children: [/* @__PURE__ */ p(de, {
|
|
490
475
|
align: "middle",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ e("span", {
|
|
492
477
|
className: "upload-item-file-icon",
|
|
493
|
-
children: /* @__PURE__ */
|
|
494
|
-
}), /* @__PURE__ */
|
|
478
|
+
children: /* @__PURE__ */ e(gl, {})
|
|
479
|
+
}), /* @__PURE__ */ e("span", {
|
|
495
480
|
className: "upload-item-name",
|
|
496
481
|
children: t.name
|
|
497
482
|
})]
|
|
498
|
-
}), /* @__PURE__ */
|
|
483
|
+
}), /* @__PURE__ */ e(O, {
|
|
499
484
|
className: "upload-item-upload-delete",
|
|
500
485
|
type: "link",
|
|
501
|
-
disabled:
|
|
502
|
-
onClick: () =>
|
|
503
|
-
children: /* @__PURE__ */
|
|
486
|
+
disabled: K,
|
|
487
|
+
onClick: () => il(t),
|
|
488
|
+
children: /* @__PURE__ */ e(Cl, {})
|
|
504
489
|
})]
|
|
505
490
|
})
|
|
506
491
|
}, t.uid))
|
|
507
492
|
})
|
|
508
|
-
}) : null, n === "zip" && /* @__PURE__ */
|
|
493
|
+
}) : null, n === "zip" && /* @__PURE__ */ p("div", {
|
|
509
494
|
className: "upload-example",
|
|
510
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ e("div", {
|
|
511
496
|
className: "upload-example-header",
|
|
512
|
-
children: /* @__PURE__ */
|
|
513
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: /* @__PURE__ */ p(Ue, {
|
|
498
|
+
children: [/* @__PURE__ */ e("span", {
|
|
514
499
|
children: "数据示例:"
|
|
515
|
-
}), /* @__PURE__ */
|
|
500
|
+
}), /* @__PURE__ */ e(O, {
|
|
516
501
|
size: "small",
|
|
517
502
|
type: "link",
|
|
518
503
|
style: {
|
|
519
504
|
padding: 0
|
|
520
505
|
},
|
|
521
506
|
onClick: (t) => {
|
|
522
|
-
t.stopPropagation(),
|
|
507
|
+
t.stopPropagation(), nl();
|
|
523
508
|
},
|
|
524
509
|
children: "下载示例 >"
|
|
525
510
|
})]
|
|
526
511
|
})
|
|
527
|
-
}), /* @__PURE__ */
|
|
512
|
+
}), /* @__PURE__ */ e("div", {
|
|
528
513
|
className: "upload-example-main",
|
|
529
|
-
children: /* @__PURE__ */
|
|
530
|
-
src:
|
|
514
|
+
children: /* @__PURE__ */ e("img", {
|
|
515
|
+
src: v === "labeled" ? wl : Sl
|
|
531
516
|
})
|
|
532
517
|
})]
|
|
533
518
|
})]
|
|
534
519
|
})]
|
|
535
520
|
})]
|
|
536
521
|
})
|
|
537
|
-
}),
|
|
522
|
+
}), Y && /* @__PURE__ */ e(H, {
|
|
538
523
|
className: "uploading-modal",
|
|
539
524
|
width: 404,
|
|
540
525
|
title: null,
|
|
541
|
-
open:
|
|
526
|
+
open: Y,
|
|
542
527
|
maskClosable: !1,
|
|
543
528
|
closable: n !== "image",
|
|
544
529
|
onCancel: () => {
|
|
545
|
-
|
|
530
|
+
$e();
|
|
546
531
|
},
|
|
547
532
|
footer: null,
|
|
548
|
-
children: /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ e("div", {
|
|
549
534
|
className: "upload-spin",
|
|
550
|
-
children: /* @__PURE__ */
|
|
551
|
-
tip: n === "image" ? `数据导入中(${
|
|
535
|
+
children: /* @__PURE__ */ e(fl, {
|
|
536
|
+
tip: n === "image" ? `数据导入中(${te}/${h.length}),请耐心等待` : `处理中(${we}/100%),请耐心等待`,
|
|
552
537
|
size: "large",
|
|
553
|
-
children: /* @__PURE__ */
|
|
538
|
+
children: /* @__PURE__ */ e("div", {
|
|
554
539
|
className: "content"
|
|
555
540
|
})
|
|
556
541
|
})
|
|
557
542
|
})
|
|
558
|
-
}),
|
|
543
|
+
}), he && /* @__PURE__ */ e(H, {
|
|
559
544
|
className: "result",
|
|
560
545
|
width: 424,
|
|
561
546
|
title: null,
|
|
562
|
-
open:
|
|
547
|
+
open: he,
|
|
563
548
|
closable: !1,
|
|
564
549
|
footer: null,
|
|
565
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ e("div", {
|
|
566
551
|
className: "upload-result",
|
|
567
|
-
children: /* @__PURE__ */
|
|
552
|
+
children: /* @__PURE__ */ e(Oe, {
|
|
568
553
|
status: "success",
|
|
569
|
-
title: n === "image" ? `数据导入完成,成功${W}个,失败${
|
|
570
|
-
extra: [/* @__PURE__ */
|
|
571
|
-
onClick:
|
|
554
|
+
title: n === "image" ? `数据导入完成,成功${W}个,失败${ge}个,去重${h.length - W - ge}个` : E && `数据导入完成,格式不符合的图片${E.formatErrorCount || 0}个,成功${E.successCount || 0}个,去重${E.repeatCount || 0}个,失败${E.failedCount || 0}个` + (v === "labeled" ? `(Json格式不符合${E.labelErrorCount}个)` : ""),
|
|
555
|
+
extra: [/* @__PURE__ */ e(O, {
|
|
556
|
+
onClick: tl,
|
|
572
557
|
children: "关闭"
|
|
573
558
|
}, "close")]
|
|
574
559
|
})
|
|
575
560
|
})
|
|
576
|
-
}),
|
|
561
|
+
}), je && /* @__PURE__ */ e(H, {
|
|
577
562
|
className: "result",
|
|
578
563
|
width: 424,
|
|
579
564
|
title: null,
|
|
580
|
-
open:
|
|
565
|
+
open: je,
|
|
581
566
|
closable: !1,
|
|
582
567
|
footer: null,
|
|
583
|
-
children: /* @__PURE__ */
|
|
568
|
+
children: /* @__PURE__ */ e("div", {
|
|
584
569
|
className: "upload-result",
|
|
585
|
-
children: /* @__PURE__ */
|
|
570
|
+
children: /* @__PURE__ */ e(Oe, {
|
|
586
571
|
status: "error",
|
|
587
572
|
title: "文件处理失败",
|
|
588
|
-
extra: [/* @__PURE__ */
|
|
589
|
-
onClick:
|
|
573
|
+
extra: [/* @__PURE__ */ e(O, {
|
|
574
|
+
onClick: al,
|
|
590
575
|
children: "关闭"
|
|
591
576
|
}, "close")]
|
|
592
577
|
})
|
|
@@ -595,5 +580,5 @@ const st = (w) => {
|
|
|
595
580
|
});
|
|
596
581
|
};
|
|
597
582
|
export {
|
|
598
|
-
|
|
583
|
+
Wl as default
|
|
599
584
|
};
|