@glodon-aiot/dataset-annotation 3.11.1-shapshot.1765331459 → 3.13.0-alpha.28
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 +6 -3
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +94 -91
- package/dist/es/components/DetectionAnnotation/components/ImageModal/index.mjs +129 -0
- package/dist/es/components/DetectionAnnotation/components/ImageModal/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +37 -28
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +136 -108
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +197 -162
- package/dist/es/components/DetectionAnnotation/index.mjs +424 -395
- 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 +43 -45
- package/dist/es/components/PicZipImportModal/config.mjs +47 -0
- package/dist/es/components/PicZipImportModal/index.mjs +308 -293
- package/dist/es/components/PicZipImportModal/pic_vlm_json_zip.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/pic_vlm_zip.svg.mjs +4 -0
- package/dist/es/components/PreLabelOCR/index.mjs +1 -1
- package/dist/es/components/VLMAnnotation/RegionItem.mjs +94 -0
- package/dist/es/components/VLMAnnotation/TextAnnotationPanel.mjs +83 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.mjs +116 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.mjs +115 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.mjs +42 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.mjs +55 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.mjs +51 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.mjs +47 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.mjs +248 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.mjs +106 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.mjs +68 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.mjs +38 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.mjs +141 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.mjs +72 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.mjs +113 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.mjs +103 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.mjs +156 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/icons/del.png.mjs +4 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/index.mjs +526 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.mjs +33 -0
- package/dist/es/components/VLMAnnotation/components/DragButton.mjs +18 -0
- package/dist/es/components/VLMAnnotation/components/FitToScreenButton.mjs +16 -0
- package/dist/es/components/VLMAnnotation/components/RectangleButton.mjs +30 -0
- package/dist/es/components/VLMAnnotation/components/Toolbar.mjs +40 -0
- package/dist/es/components/VLMAnnotation/components/ZoomControls.mjs +44 -0
- package/dist/es/components/VLMAnnotation/constants.mjs +50 -0
- package/dist/es/components/VLMAnnotation/index.mjs +242 -0
- package/dist/es/components/VLMAnnotation/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.mjs +343 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +240 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.mjs +201 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/index.mjs +455 -0
- package/dist/es/components/VLMAnnotationDetail/MarkVLMBoxModal/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +149 -0
- package/dist/es/components/VLMAnnotationDetail/VlmModal/style.less.mjs +4 -0
- package/dist/es/components/VLMAnnotationDetail/index.mjs +449 -0
- package/dist/es/components/VLMAnnotationDetail/style.less.mjs +4 -0
- package/dist/es/constant.mjs +3 -3
- package/dist/es/createVlmtasetAnnotation/index.mjs +131 -0
- package/dist/es/featuresConfig.mjs +13 -9
- package/dist/es/index.mjs +11 -7
- package/dist/lib/index.js +4 -3
- package/dist/src/DatasetContext/index.d.ts +2 -0
- package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +1 -0
- package/dist/src/components/DetectionAnnotation/components/ImageModal/index.d.ts +34 -0
- package/dist/src/components/Iconfont/font_4439177_tgvowh6bmlb.d.ts +0 -0
- package/dist/src/components/PicZipImportModal/config.d.ts +23 -0
- package/dist/src/components/VLMAnnotation/ImageAnnotationDebugger.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/RegionItem.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/TextAnnotationPanel.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasDrag.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasSetup.d.ts +38 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCanvasZoom.d.ts +18 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useCropRegionImage.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteControl.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDeleteRegion.d.ts +21 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useDrawingMode.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRLoadingIcon.d.ts +11 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useOCRRecognition.d.ts +28 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionHover.d.ts +13 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionLoader.d.ts +37 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionNameText.d.ts +12 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionSelection.d.ts +15 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useRegionUpdate.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/hooks/useTextLayouts.d.ts +25 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/index.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/VLMLabelMaker/utils/coordinateUtils.d.ts +32 -0
- package/dist/src/components/VLMAnnotation/components/DragButton.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/components/FitToScreenButton.d.ts +6 -0
- package/dist/src/components/VLMAnnotation/components/RectangleButton.d.ts +7 -0
- package/dist/src/components/VLMAnnotation/components/Toolbar.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/components/ZoomControls.d.ts +4 -0
- package/dist/src/components/VLMAnnotation/constants.d.ts +97 -0
- package/dist/src/components/VLMAnnotation/index.d.ts +6 -0
- package/dist/src/components/VLMAnnotation/types.d.ts +172 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/AttributeDetail/index.d.ts +14 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/QAGenerationConfig.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/QADetail/index.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/MarkVLMBoxModal/index.d.ts +12 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +17 -0
- package/dist/src/components/VLMAnnotationDetail/index.d.ts +6 -0
- package/dist/src/constant.d.ts +1 -1
- package/dist/src/createVlmtasetAnnotation/index.d.ts +16 -0
- package/dist/src/featuresConfig.d.ts +4 -0
- package/dist/src/index.d.ts +3 -0
- package/package.json +2 -2
- package/dist/dataset-annotation.js +0 -123598
- package/dist/dataset-annotation.umd.cjs +0 -1017
- package/dist/example/DatasetAnnotationDemo.d.ts +0 -3
- package/dist/example/DemoTabs.d.ts +0 -3
- package/dist/example/DetectionDatasetDemo.d.ts +0 -5
- package/dist/example/DetectionImageDemo.d.ts +0 -5
- package/dist/example/OcrDatasetDemo.d.ts +0 -5
- package/dist/example/OcrImageDemo.d.ts +0 -5
- package/dist/example/OcrkvcDatasetDemo.d.ts +0 -5
- package/dist/example/constant.local.d.ts +0 -6
- package/dist/example/index.d.ts +0 -1
- package/dist/src/utils/reactCompatibility.d.ts +0 -5
|
@@ -1,176 +1,177 @@
|
|
|
1
|
-
var ft = Object.defineProperty,
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var mt = Object.prototype.hasOwnProperty,
|
|
5
|
-
var Ee = (
|
|
6
|
-
for (var
|
|
7
|
-
mt.call(f,
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { useRef as
|
|
15
|
-
import { message as
|
|
16
|
-
import
|
|
1
|
+
var ft = Object.defineProperty, ut = Object.defineProperties;
|
|
2
|
+
var ht = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Ae = Object.getOwnPropertySymbols;
|
|
4
|
+
var mt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ee = (N, f, o) => f in N ? ft(N, f, { enumerable: !0, configurable: !0, writable: !0, value: o }) : N[f] = o, m = (N, f) => {
|
|
6
|
+
for (var o in f || (f = {}))
|
|
7
|
+
mt.call(f, o) && Ee(N, o, f[o]);
|
|
8
|
+
if (Ae)
|
|
9
|
+
for (var o of Ae(f))
|
|
10
|
+
gt.call(f, o) && Ee(N, o, f[o]);
|
|
11
|
+
return N;
|
|
12
|
+
}, S = (N, f) => ut(N, ht(f));
|
|
13
|
+
import { jsx as s, jsxs as V, Fragment as ze } from "react/jsx-runtime";
|
|
14
|
+
import { useRef as pt, useState as d, useEffect as u } from "react";
|
|
15
|
+
import { message as z, ConfigProvider as bt, Space as te, Select as vt, Button as ie, Tabs as St, Col as Ct, Tooltip as yt, Empty as It, Spin as Lt, Modal as Dt } from "antd";
|
|
16
|
+
import kt from "rc-virtual-list";
|
|
17
17
|
import { UploadZipsStatus as U, PreLabelTaskStatus as Tt } from "@glodon-aiot/apis";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
18
|
+
import xt from "antd/es/locale/zh_CN";
|
|
19
|
+
import Vt from "../../DatasetContext/index.mjs";
|
|
20
20
|
import Nt from "./icon_item_empty.svg.mjs";
|
|
21
21
|
import "./style.less.mjs";
|
|
22
|
-
import { tagColors as
|
|
23
|
-
import Pt from "./components/
|
|
24
|
-
import wt from "
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import Mt from "
|
|
30
|
-
import Rt from "../
|
|
31
|
-
import Bt from "../
|
|
32
|
-
import Ot from "../
|
|
33
|
-
import Ht from "../CompositionInput/index.mjs";
|
|
22
|
+
import { tagColors as Me } from "../../utils/index.mjs";
|
|
23
|
+
import Pt from "./components/Labels/index.mjs";
|
|
24
|
+
import { useKeyPress as wt } from "ahooks";
|
|
25
|
+
import Re from "./components/DisabledTooltip/index.mjs";
|
|
26
|
+
import At from "./PreSamplesPage/index.mjs";
|
|
27
|
+
import { SearchOutlined as Et } from "@ant-design/icons";
|
|
28
|
+
import zt from "../../Common/Page/index.mjs";
|
|
29
|
+
import Mt from "../PicZipImportModal/index.mjs";
|
|
30
|
+
import Rt from "../PageNav/index.mjs";
|
|
31
|
+
import Bt from "../Thumbnail/index.mjs";
|
|
32
|
+
import Ot from "../CompositionInput/index.mjs";
|
|
34
33
|
import { Prompt as Ft } from "../hooks/Prompt.mjs";
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import { DEFAULT_FILTER_SWITCH as
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
import Ht from "../PreLabelOCR/index.mjs";
|
|
35
|
+
import Kt from "lodash/merge";
|
|
36
|
+
import { DEFAULT_FILTER_SWITCH as Ut } from "../../constant.mjs";
|
|
37
|
+
import jt from "./components/ImageModal/index.mjs";
|
|
38
|
+
const bi = (N) => {
|
|
39
|
+
var Pe;
|
|
40
40
|
const {
|
|
41
41
|
services: f,
|
|
42
|
-
datasetId:
|
|
43
|
-
versionId:
|
|
44
|
-
backTo:
|
|
42
|
+
datasetId: o,
|
|
43
|
+
versionId: Q,
|
|
44
|
+
backTo: Be,
|
|
45
45
|
labelManager: ue = !1,
|
|
46
|
-
datasetManager:
|
|
47
|
-
annotation:
|
|
48
|
-
header:
|
|
46
|
+
datasetManager: I = !1,
|
|
47
|
+
annotation: Oe,
|
|
48
|
+
header: D = {
|
|
49
49
|
versionSelect: !1
|
|
50
50
|
},
|
|
51
|
-
exampleSrcRoot:
|
|
52
|
-
} =
|
|
53
|
-
|
|
54
|
-
const Z =
|
|
51
|
+
exampleSrcRoot: Fe
|
|
52
|
+
} = N, j = m({}, Ut);
|
|
53
|
+
Kt(j, N.filterSwitch);
|
|
54
|
+
const Z = pt(null), [C, he] = d(), [i, $] = d(), [X, He] = d([]), [me, ge] = d(!1), [B, pe] = d(0), [L, ne] = d(""), [O, be] = d(0), [Ke, Ue] = d(), [ve, re] = d(!1), [Se, je] = d(!1), [Ce, Ze] = d(!0), [$e, We] = d(!1), [P, ye] = d([]), [b, E] = d([]), [W, q] = d(!1), [Y, _] = d(!1), [M, p] = d(-1), [v, g] = d(), [a, y] = d(), [n, T] = d({
|
|
55
55
|
current: 0,
|
|
56
56
|
pageSize: 100
|
|
57
|
-
}), [F,
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
}), [F, oe] = d([]), [R, qe] = d(""), [_e, Ge] = d(!1), [Ie, Le] = d(), [ee, le] = d(null), [w, De] = d(!1), [Je, ke] = d(!1), [Qe, Xe] = d(0), [Zt, se] = d(""), [G, Ye] = d(""), [et, tt] = d(), H = () => {
|
|
58
|
+
g(void 0), y(void 0), p(-1), q(!1), K(), setTimeout(() => {
|
|
59
|
+
T((e) => S(m({}, e), {
|
|
60
60
|
current: 1,
|
|
61
61
|
type: void 0
|
|
62
62
|
}));
|
|
63
63
|
}, 10);
|
|
64
64
|
};
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
wt("Esc", H), u(() => {
|
|
66
|
+
o && f.cvforceDatahub.getS3Iam(o).then((e) => {
|
|
67
|
+
Ue(e);
|
|
68
68
|
});
|
|
69
|
-
}, [
|
|
70
|
-
f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) =>
|
|
71
|
-
}, [f.cvforceDatahub]),
|
|
72
|
-
|
|
73
|
-
}, [i == null ? void 0 : i.id]),
|
|
74
|
-
|
|
69
|
+
}, [o]), u(() => {
|
|
70
|
+
f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) => tt(e));
|
|
71
|
+
}, [f.cvforceDatahub]), u(() => {
|
|
72
|
+
x();
|
|
73
|
+
}, [i == null ? void 0 : i.id]), u(() => {
|
|
74
|
+
o && (ge(!0), Promise.all([
|
|
75
75
|
// 数据集
|
|
76
|
-
f.cvforceDatahub.getDatasetsId(
|
|
77
|
-
|
|
76
|
+
f.cvforceDatahub.getDatasetsId(o).then((e) => {
|
|
77
|
+
he(e);
|
|
78
78
|
}),
|
|
79
79
|
// 版本列表
|
|
80
|
-
f.cvforceDatahub.getDatasetsIdVersions(
|
|
81
|
-
|
|
80
|
+
f.cvforceDatahub.getDatasetsIdVersions(o, 1, 1e3).then((e) => {
|
|
81
|
+
He(e.recordList), $(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
|
|
82
82
|
})
|
|
83
|
-
]).finally(() =>
|
|
84
|
-
}, [
|
|
85
|
-
const
|
|
86
|
-
!
|
|
87
|
-
$(e),
|
|
83
|
+
]).finally(() => ge(!1)));
|
|
84
|
+
}, [o, Q]);
|
|
85
|
+
const Te = () => {
|
|
86
|
+
!o || !i || f.cvforceDatahub.getDatasetsIdVersionsVid(o, i.id).then((e) => {
|
|
87
|
+
$(e), qe(e.versionAsyncTask.state);
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
R !== U.Pending && R !== U.Started ||
|
|
92
|
-
}, [R]),
|
|
93
|
-
$(void 0),
|
|
90
|
+
u(() => {
|
|
91
|
+
R !== U.Pending && R !== U.Started || z.warning("文件导入中,请刷新页面再试");
|
|
92
|
+
}, [R]), u(() => {
|
|
93
|
+
$(void 0), T(S(m({}, n), {
|
|
94
94
|
current: 1
|
|
95
|
-
})),
|
|
96
|
-
}, [
|
|
97
|
-
|
|
98
|
-
|
|
95
|
+
})), E([]), Te();
|
|
96
|
+
}, [o, Q]), u(() => {
|
|
97
|
+
o && f.cvforceDatahub.getDatasetsId(o).then((e) => {
|
|
98
|
+
he(e);
|
|
99
99
|
});
|
|
100
|
-
}, [
|
|
101
|
-
|
|
102
|
-
}, [F, i]),
|
|
103
|
-
!i || !C || A(
|
|
100
|
+
}, [o]), u(() => {
|
|
101
|
+
K();
|
|
102
|
+
}, [F, i]), u(() => {
|
|
103
|
+
!i || !C || A(S(m({}, n), {
|
|
104
104
|
current: 1
|
|
105
105
|
})).then((e) => {
|
|
106
106
|
});
|
|
107
|
-
}, [C == null ? void 0 : C.id, i == null ? void 0 : i.id, F]),
|
|
107
|
+
}, [C == null ? void 0 : C.id, i == null ? void 0 : i.id, F]), u(() => {
|
|
108
108
|
A().then((e) => {
|
|
109
|
-
}),
|
|
110
|
-
}, [
|
|
111
|
-
|
|
112
|
-
}, [
|
|
113
|
-
A(
|
|
109
|
+
}), x();
|
|
110
|
+
}, [n.current]), u(() => {
|
|
111
|
+
w && x();
|
|
112
|
+
}, [Ie]), u(() => {
|
|
113
|
+
A(S(m({}, n), {
|
|
114
114
|
current: 1,
|
|
115
115
|
total: void 0
|
|
116
116
|
})).then((e) => {
|
|
117
|
-
e &&
|
|
117
|
+
e && v && (Array.isArray(e) && e.length ? (p(0), g(e[0]), y(void 0)) : (g(void 0), y(void 0), p(-1), K(), setTimeout(() => {
|
|
118
|
+
T((t) => S(m({}, t), {
|
|
119
|
+
current: 1,
|
|
120
|
+
type: void 0
|
|
121
|
+
}));
|
|
122
|
+
}, 10)));
|
|
118
123
|
});
|
|
119
|
-
}, [
|
|
120
|
-
|
|
121
|
-
}, [
|
|
122
|
-
!
|
|
123
|
-
}, [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
Ze(!ye && Se);
|
|
127
|
-
}, [ye, Se]), h(() => {
|
|
128
|
-
if (!l) {
|
|
129
|
-
X && (clearTimeout(X), oe(null)), ke(void 0);
|
|
124
|
+
}, [L]), u(() => {
|
|
125
|
+
Y || (g(void 0), y(void 0), q(!1), p(-1));
|
|
126
|
+
}, [Y]), u(() => {
|
|
127
|
+
We(!Ce && Se);
|
|
128
|
+
}, [Ce, Se]), u(() => {
|
|
129
|
+
if (!o) {
|
|
130
|
+
ee && (clearTimeout(ee), le(null)), Le(void 0);
|
|
130
131
|
return;
|
|
131
132
|
}
|
|
132
133
|
ce();
|
|
133
|
-
}, [
|
|
134
|
+
}, [o, i == null ? void 0 : i.id]), u(() => {
|
|
134
135
|
ce();
|
|
135
|
-
}, [
|
|
136
|
+
}, [_e]), u(() => {
|
|
136
137
|
ae();
|
|
137
|
-
}, [
|
|
138
|
-
A(
|
|
138
|
+
}, [w, o, i]), u(() => {
|
|
139
|
+
A(S(m({}, n), {
|
|
139
140
|
current: 1
|
|
140
|
-
})),
|
|
141
|
-
}, [
|
|
141
|
+
})), x();
|
|
142
|
+
}, [G]), u(() => {
|
|
142
143
|
se("");
|
|
143
|
-
}, [
|
|
144
|
+
}, [v]);
|
|
144
145
|
const ae = () => {
|
|
145
|
-
i && f.cvforceDatahub.getDatasetsIdVersionsVidSamples(
|
|
146
|
+
i && f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
|
|
146
147
|
pageNo: 1,
|
|
147
148
|
pageSize: 1e3,
|
|
148
149
|
confirmStatus: 1
|
|
149
150
|
}).then((e) => {
|
|
150
|
-
|
|
151
|
+
Xe(e.recordList.length);
|
|
151
152
|
});
|
|
152
153
|
}, ce = () => {
|
|
153
|
-
!
|
|
154
|
+
!o || !i || f.cvforceDatahub.getPreLabelTask(o, i.id).then((e) => {
|
|
154
155
|
const t = e[0];
|
|
155
|
-
if (
|
|
156
|
-
De(!1),
|
|
156
|
+
if (Le(t), ee && (clearTimeout(ee), le(null)), !(t != null && t.state) || t.state !== Tt.Started) {
|
|
157
|
+
De(!1), x();
|
|
157
158
|
return;
|
|
158
159
|
} else
|
|
159
160
|
De(!0);
|
|
160
|
-
|
|
161
|
+
le(setTimeout(() => {
|
|
161
162
|
ce();
|
|
162
163
|
}, 1e4));
|
|
163
164
|
});
|
|
164
165
|
};
|
|
165
|
-
|
|
166
|
+
u(() => {
|
|
166
167
|
C && C.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
|
|
167
168
|
}, [C]);
|
|
168
169
|
const A = (e, t) => {
|
|
169
|
-
const
|
|
170
|
-
if (!
|
|
170
|
+
const l = (e == null ? void 0 : e.current) || n.current, r = (e == null ? void 0 : e.pageSize) || n.pageSize;
|
|
171
|
+
if (!o || !i || !l)
|
|
171
172
|
return Promise.resolve(!1);
|
|
172
|
-
const c = F.map((k) => k.label),
|
|
173
|
-
switch (
|
|
173
|
+
const c = F.map((k) => k.label), h = () => {
|
|
174
|
+
switch (L) {
|
|
174
175
|
case "nocode":
|
|
175
176
|
return "nocode";
|
|
176
177
|
case "hascode":
|
|
@@ -179,166 +180,208 @@ const bi = (T) => {
|
|
|
179
180
|
return c.length ? c : void 0;
|
|
180
181
|
}
|
|
181
182
|
};
|
|
182
|
-
return
|
|
183
|
-
current:
|
|
184
|
-
pageSize:
|
|
185
|
-
})), f.cvforceDatahub.getDatasetsIdVersionsVidSamples(
|
|
186
|
-
pageNo:
|
|
187
|
-
pageSize:
|
|
188
|
-
labels:
|
|
189
|
-
searchName:
|
|
183
|
+
return l === 1 && at(), T(S(m({}, n), {
|
|
184
|
+
current: l,
|
|
185
|
+
pageSize: r
|
|
186
|
+
})), f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
|
|
187
|
+
pageNo: l,
|
|
188
|
+
pageSize: r,
|
|
189
|
+
labels: h(),
|
|
190
|
+
searchName: G
|
|
190
191
|
}).then((k) => {
|
|
191
|
-
const
|
|
192
|
-
if (
|
|
193
|
-
current:
|
|
194
|
-
pageSize:
|
|
192
|
+
const J = k.recordList || [], we = l === 1 ? J : [...t || b, ...J];
|
|
193
|
+
if (E(we), T(S(m({}, n), {
|
|
194
|
+
current: l,
|
|
195
|
+
pageSize: r,
|
|
195
196
|
total: k.totalResults
|
|
196
|
-
})),
|
|
197
|
-
|
|
197
|
+
})), n.type === "next" && J.length) {
|
|
198
|
+
p(0);
|
|
198
199
|
const fe = k.recordList[0];
|
|
199
|
-
|
|
200
|
+
g(fe);
|
|
200
201
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
const fe = k.recordList[
|
|
204
|
-
|
|
202
|
+
if (n.type === "prev" && J.length) {
|
|
203
|
+
p(n.pageSize - 1);
|
|
204
|
+
const fe = k.recordList[n.pageSize - 1];
|
|
205
|
+
g(fe);
|
|
205
206
|
}
|
|
206
|
-
return
|
|
207
|
+
return W && M < 0 && (p(0), g(J[0]), _(!0)), we;
|
|
207
208
|
}).catch(() => !1);
|
|
208
209
|
};
|
|
209
|
-
|
|
210
|
-
|
|
210
|
+
u(() => {
|
|
211
|
+
T(L === "nocode" ? S(m({}, n), {
|
|
211
212
|
total: B
|
|
212
|
-
}) :
|
|
213
|
+
}) : L === "" ? S(m({}, n), {
|
|
213
214
|
total: O
|
|
214
|
-
}) :
|
|
215
|
+
}) : S(m({}, n), {
|
|
215
216
|
total: O - B
|
|
216
217
|
}));
|
|
217
218
|
}, [B, O]);
|
|
218
|
-
const
|
|
219
|
-
!
|
|
219
|
+
const x = () => {
|
|
220
|
+
!o || !i || f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id, {
|
|
220
221
|
label: "allcode",
|
|
221
|
-
searchName:
|
|
222
|
+
searchName: G
|
|
222
223
|
}).then((e) => {
|
|
223
|
-
const t = e.find((
|
|
224
|
-
|
|
224
|
+
const t = e.find((r) => r.id === "allcodeid"), l = e.find((r) => r.id === "nocodeid");
|
|
225
|
+
be(t ? t.count : 0), pe(l ? l.count : 0);
|
|
225
226
|
});
|
|
226
|
-
},
|
|
227
|
-
if (!(!
|
|
228
|
-
return f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(
|
|
229
|
-
const
|
|
230
|
-
label:
|
|
231
|
-
count:
|
|
232
|
-
id:
|
|
233
|
-
color:
|
|
227
|
+
}, K = () => {
|
|
228
|
+
if (!(!o || !(i != null && i.id)))
|
|
229
|
+
return f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((e) => {
|
|
230
|
+
const l = (e || []).filter((r) => r.label !== "nocode").map((r, c) => ({
|
|
231
|
+
label: r.label,
|
|
232
|
+
count: r.count,
|
|
233
|
+
id: r.id,
|
|
234
|
+
color: Me[c % 40]
|
|
234
235
|
}));
|
|
235
|
-
return
|
|
236
|
+
return ye(l), e;
|
|
236
237
|
});
|
|
237
|
-
},
|
|
238
|
+
}, it = (e) => {
|
|
238
239
|
if (!b)
|
|
239
240
|
return;
|
|
240
|
-
|
|
241
|
+
q(!1), p(e);
|
|
241
242
|
const t = b[e];
|
|
242
|
-
|
|
243
|
+
g(t), y(void 0), _(!0);
|
|
243
244
|
};
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}, [
|
|
245
|
+
u(() => {
|
|
246
|
+
n.type || A();
|
|
247
|
+
}, [n.type]), u(() => {
|
|
247
248
|
if (!a)
|
|
248
249
|
return;
|
|
249
250
|
const e = [];
|
|
250
251
|
a == null || a.labels.forEach((t) => {
|
|
251
|
-
P != null && P.find((
|
|
252
|
-
}), a.labels = e,
|
|
252
|
+
P != null && P.find((l) => l.id === t.id) && e.push(t);
|
|
253
|
+
}), a.labels = e, y(a);
|
|
253
254
|
}, [P]);
|
|
254
255
|
const xe = () => {
|
|
255
|
-
if (b)
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
if (b) {
|
|
257
|
+
if (!W) {
|
|
258
|
+
E((e) => {
|
|
259
|
+
if (!Array.isArray(e) || !e.length)
|
|
260
|
+
return H(), e;
|
|
261
|
+
const t = M + 1;
|
|
262
|
+
return t >= e.length ? n.total && t >= n.total ? z.error("已经是最后一个了") : A({
|
|
263
|
+
current: n.current + 1,
|
|
264
|
+
pageSize: n.pageSize,
|
|
265
|
+
type: "next"
|
|
266
|
+
}, e).then((l) => {
|
|
267
|
+
p(t);
|
|
268
|
+
const r = l[t];
|
|
269
|
+
g(r), y(void 0);
|
|
270
|
+
}) : setTimeout(() => {
|
|
271
|
+
p(t);
|
|
272
|
+
const l = e[t];
|
|
273
|
+
g(l), y(void 0);
|
|
274
|
+
}, 200), e;
|
|
275
|
+
});
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
return de().then((e) => (e && (x(), E((t) => {
|
|
279
|
+
let l;
|
|
258
280
|
if (Array.isArray(t)) {
|
|
259
281
|
if (!t.length)
|
|
260
|
-
return
|
|
261
|
-
const
|
|
262
|
-
if (a && (a.labels.length &&
|
|
263
|
-
const c = t.findIndex((
|
|
264
|
-
c > -1 && (t.splice(c, 1),
|
|
282
|
+
return H(), t;
|
|
283
|
+
const r = !a || a.labels.length && L === "hascode" || !a.labels.length && L === "nocode" || L === "" ? M + 1 : M;
|
|
284
|
+
if (a && (a.labels.length && L === "nocode" || !a.labels.length && L === "hascode")) {
|
|
285
|
+
const c = t.findIndex((h) => h.id === a.id);
|
|
286
|
+
c > -1 && (t.splice(c, 1), l = [...t], n.total && (n.total = n.total - 1));
|
|
265
287
|
}
|
|
266
|
-
|
|
267
|
-
current:
|
|
268
|
-
pageSize:
|
|
288
|
+
r >= t.length ? n.total && r >= n.total ? z.error("已经是最后一个了") : A({
|
|
289
|
+
current: n.current + 1,
|
|
290
|
+
pageSize: n.pageSize,
|
|
269
291
|
type: "next"
|
|
270
292
|
}, t).then((c) => {
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
|
|
293
|
+
p(r);
|
|
294
|
+
const h = c[r];
|
|
295
|
+
g(h), y(void 0);
|
|
274
296
|
}) : setTimeout(() => {
|
|
275
|
-
|
|
276
|
-
const c = t[
|
|
277
|
-
|
|
297
|
+
p(r);
|
|
298
|
+
const c = t[r];
|
|
299
|
+
g(c), y(void 0);
|
|
278
300
|
}, 200);
|
|
279
301
|
}
|
|
280
|
-
return
|
|
302
|
+
return l || t;
|
|
281
303
|
})), e));
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
if (!
|
|
288
|
-
return
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
304
|
+
}
|
|
305
|
+
}, nt = () => {
|
|
306
|
+
if (b) {
|
|
307
|
+
if (!W) {
|
|
308
|
+
E((e) => {
|
|
309
|
+
if (!Array.isArray(e) || !e.length)
|
|
310
|
+
return H(), e;
|
|
311
|
+
const t = M - 1;
|
|
312
|
+
return t < 0 ? z.error("已经是第一个了") : setTimeout(() => {
|
|
313
|
+
p(t);
|
|
314
|
+
const l = e[t];
|
|
315
|
+
g(l), y(void 0);
|
|
316
|
+
}, 200), e;
|
|
317
|
+
});
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
de().then((e) => {
|
|
321
|
+
e && (x(), E((t) => {
|
|
322
|
+
let l;
|
|
323
|
+
if (Array.isArray(t)) {
|
|
324
|
+
if (!t.length)
|
|
325
|
+
return H(), t;
|
|
326
|
+
const r = M - 1;
|
|
327
|
+
if (r < 0)
|
|
328
|
+
r < 0 ? z.error("已经是第一个了") : T({
|
|
329
|
+
current: n.current - 1,
|
|
330
|
+
pageSize: n.pageSize,
|
|
331
|
+
type: "prev"
|
|
332
|
+
});
|
|
333
|
+
else {
|
|
334
|
+
if (a && (a.labels.length && L === "nocode" || !a.labels.length && L === "hascode")) {
|
|
335
|
+
const c = t.findIndex((h) => h.id === a.id);
|
|
336
|
+
c > -1 && (t.splice(c, 1), l = [...t], n.total && (n.total = n.total - 1));
|
|
337
|
+
}
|
|
338
|
+
setTimeout(() => {
|
|
339
|
+
p(r);
|
|
340
|
+
const c = t[r];
|
|
341
|
+
g(c), y(void 0);
|
|
342
|
+
}, 200);
|
|
300
343
|
}
|
|
301
|
-
setTimeout(() => {
|
|
302
|
-
V(n);
|
|
303
|
-
const c = t[n];
|
|
304
|
-
L(c), E(void 0);
|
|
305
|
-
}, 200);
|
|
306
344
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
})
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
const t = Object.keys(e.labels.reduce((
|
|
345
|
+
return l || t;
|
|
346
|
+
}));
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
}, rt = (e) => {
|
|
350
|
+
const t = Object.keys(e.labels.reduce((l, r) => (l[r.label] ? ++l[r.label] : l[r.label] = 1, l), {})).length;
|
|
313
351
|
return t >= 2 ? `+${t - 1}` : null;
|
|
314
|
-
},
|
|
352
|
+
}, ot = (e) => {
|
|
315
353
|
var t;
|
|
316
|
-
(!
|
|
317
|
-
current:
|
|
354
|
+
(!n.total || n.total > b.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((t = Z.current) == null ? void 0 : t.clientHeight) && T(S(m({}, n), {
|
|
355
|
+
current: n.current + 1
|
|
318
356
|
}));
|
|
319
|
-
}, de = () => i ? a && !
|
|
357
|
+
}, de = () => i ? a && !w ? (a.labels && (a.labels = a.labels.filter((e) => !!e.id)), f.cvforceDatahub.updateSamples(o, i.id, [a], 0).then(() => (z.success({
|
|
320
358
|
content: "保存成功"
|
|
321
|
-
}),
|
|
322
|
-
const t = e.findIndex((
|
|
359
|
+
}), E((e) => {
|
|
360
|
+
const t = e.findIndex((l) => l.id === (a == null ? void 0 : a.id));
|
|
323
361
|
return t > -1 && (e[t] = a), [...e];
|
|
324
|
-
}), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1),
|
|
362
|
+
}), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1), lt = () => {
|
|
325
363
|
if (a && a.labels.some((e) => !e.id))
|
|
326
|
-
return
|
|
364
|
+
return z.error("所有标注需设置标签"), Promise.resolve(!1);
|
|
327
365
|
xe();
|
|
328
|
-
},
|
|
329
|
-
|
|
366
|
+
}, st = () => {
|
|
367
|
+
Dt.confirm({
|
|
330
368
|
title: "确认要删除当前数据吗?",
|
|
331
369
|
content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
|
|
332
370
|
onOk: () => {
|
|
333
|
-
!
|
|
334
|
-
const e = b.findIndex((t) => t.id ===
|
|
335
|
-
b.splice(e, 1),
|
|
336
|
-
total:
|
|
337
|
-
})), e <= b.length - 1 ?
|
|
371
|
+
!v || !i || f.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(o, i.id, v.id).then(() => {
|
|
372
|
+
const e = b.findIndex((t) => t.id === v.id);
|
|
373
|
+
b.splice(e, 1), E([...b]), T(S(m({}, n), {
|
|
374
|
+
total: n.total ? n.total - 1 : 0
|
|
375
|
+
})), e <= b.length - 1 ? g(b[e]) : (g(b[e - 1]), p(e - 1)), x(), y(void 0), n.total && n.total - 1 === 0 && (g(void 0), y(void 0), p(-1), W || _(!1), K(), setTimeout(() => {
|
|
376
|
+
T((t) => S(m({}, t), {
|
|
377
|
+
current: 1,
|
|
378
|
+
type: void 0
|
|
379
|
+
}));
|
|
380
|
+
}, 10));
|
|
338
381
|
});
|
|
339
382
|
}
|
|
340
383
|
});
|
|
341
|
-
},
|
|
384
|
+
}, Ve = [{
|
|
342
385
|
key: "",
|
|
343
386
|
label: `全部(${O})`,
|
|
344
387
|
children: null
|
|
@@ -356,264 +399,250 @@ const bi = (T) => {
|
|
|
356
399
|
top: 0
|
|
357
400
|
});
|
|
358
401
|
}, ct = () => {
|
|
359
|
-
|
|
402
|
+
ke(!0);
|
|
360
403
|
}, dt = (e) => {
|
|
361
|
-
|
|
404
|
+
Ye(e);
|
|
405
|
+
}, Ne = (e) => {
|
|
406
|
+
a ? de().then((t) => {
|
|
407
|
+
t ? (ne(e), x()) : z.error("保存失败");
|
|
408
|
+
}) : (T(S(m({}, n), {
|
|
409
|
+
current: 1,
|
|
410
|
+
total: void 0
|
|
411
|
+
})), ne(e)), e === "nocode" && oe([]);
|
|
362
412
|
};
|
|
363
|
-
return /* @__PURE__ */
|
|
364
|
-
locale:
|
|
365
|
-
children: /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ s(bt, {
|
|
414
|
+
locale: xt,
|
|
415
|
+
children: /* @__PURE__ */ s(Vt.Provider, {
|
|
366
416
|
value: {
|
|
367
|
-
datasetId:
|
|
417
|
+
datasetId: o,
|
|
368
418
|
versionId: (i == null ? void 0 : i.id) || "",
|
|
369
419
|
no: (i == null ? void 0 : i.no) || "",
|
|
370
|
-
loading:
|
|
420
|
+
loading: me,
|
|
371
421
|
version: i,
|
|
372
|
-
versions:
|
|
422
|
+
versions: X,
|
|
373
423
|
samples: b,
|
|
374
|
-
pagination:
|
|
424
|
+
pagination: n,
|
|
375
425
|
services: f,
|
|
376
426
|
featuresConfig: {
|
|
377
427
|
labelManager: ue,
|
|
378
|
-
datasetManager:
|
|
379
|
-
annotation:
|
|
428
|
+
datasetManager: I,
|
|
429
|
+
annotation: Oe,
|
|
380
430
|
filterSwitch: j,
|
|
381
|
-
header:
|
|
382
|
-
exampleSrcRoot:
|
|
431
|
+
header: D,
|
|
432
|
+
exampleSrcRoot: Fe
|
|
383
433
|
}
|
|
384
434
|
},
|
|
385
|
-
children: C ? C.markType === "detection" ? /* @__PURE__ */
|
|
435
|
+
children: C ? C.markType === "detection" ? /* @__PURE__ */ s("div", {
|
|
386
436
|
className: "detection-version-detail",
|
|
387
|
-
children:
|
|
388
|
-
datasetId:
|
|
437
|
+
children: Je ? i != null && i.id && I && I.preLabel ? /* @__PURE__ */ s(At, {
|
|
438
|
+
datasetId: o,
|
|
389
439
|
versionId: i.id,
|
|
390
440
|
onClose: () => {
|
|
391
|
-
|
|
441
|
+
ke(!1), ae(), K(), x(), A();
|
|
392
442
|
},
|
|
393
443
|
samples: b,
|
|
394
444
|
labels: P,
|
|
395
445
|
fetchLength: ae
|
|
396
|
-
}) : null : /* @__PURE__ */
|
|
446
|
+
}) : null : /* @__PURE__ */ V(zt, {
|
|
397
447
|
className: "product-details-page",
|
|
398
|
-
header:
|
|
399
|
-
backTo:
|
|
400
|
-
onBackClick:
|
|
401
|
-
|
|
448
|
+
header: D === !1 ? void 0 : /* @__PURE__ */ s(Rt, {
|
|
449
|
+
backTo: Be,
|
|
450
|
+
onBackClick: D != null && D.onBackClick ? () => {
|
|
451
|
+
v && H(), D.onBackClick && D.onBackClick();
|
|
402
452
|
} : void 0,
|
|
403
|
-
left: !
|
|
404
|
-
children: [/* @__PURE__ */
|
|
453
|
+
left: !me && /* @__PURE__ */ V(te, {
|
|
454
|
+
children: [/* @__PURE__ */ s("span", {
|
|
405
455
|
style: {
|
|
406
456
|
fontWeight: "bold"
|
|
407
457
|
},
|
|
408
458
|
children: C == null ? void 0 : C.name
|
|
409
|
-
}), /* @__PURE__ */
|
|
410
|
-
disabled:
|
|
459
|
+
}), /* @__PURE__ */ s(vt, {
|
|
460
|
+
disabled: (D == null ? void 0 : D.versionSelect) === !1,
|
|
411
461
|
value: i == null ? void 0 : i.id,
|
|
412
462
|
style: {
|
|
413
463
|
width: 70
|
|
414
464
|
},
|
|
415
|
-
options:
|
|
465
|
+
options: X.map((e) => ({
|
|
416
466
|
label: e.no,
|
|
417
467
|
value: e.id
|
|
418
468
|
})),
|
|
419
469
|
onChange: (e) => {
|
|
420
|
-
const t =
|
|
470
|
+
const t = X.find((r) => r.id === e);
|
|
421
471
|
if (!C || !t)
|
|
422
472
|
return;
|
|
423
|
-
const
|
|
424
|
-
$(
|
|
473
|
+
const l = X.find((r) => r.id === t.id);
|
|
474
|
+
$(l), D != null && D.onVersionChange && D.onVersionChange(l);
|
|
425
475
|
}
|
|
426
476
|
})]
|
|
427
477
|
}),
|
|
428
|
-
right: /* @__PURE__ */
|
|
429
|
-
children: [!
|
|
430
|
-
isPreLabel:
|
|
478
|
+
right: /* @__PURE__ */ V(te, {
|
|
479
|
+
children: [!v && I && I.add && /* @__PURE__ */ s(Re, {
|
|
480
|
+
isPreLabel: w,
|
|
431
481
|
placement: "bottom",
|
|
432
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ s(ie, {
|
|
433
483
|
type: "default",
|
|
434
|
-
onClick: () =>
|
|
435
|
-
disabled: R === U.Pending || R === U.Started ||
|
|
484
|
+
onClick: () => re(!0),
|
|
485
|
+
disabled: R === U.Pending || R === U.Started || w,
|
|
436
486
|
children: "导入数据"
|
|
437
487
|
}, "del")
|
|
438
|
-
}), !
|
|
439
|
-
children: [/* @__PURE__ */
|
|
440
|
-
datasetId:
|
|
488
|
+
}), !v && I && I.preLabel && (i != null && i.id) ? /* @__PURE__ */ V(ze, {
|
|
489
|
+
children: [/* @__PURE__ */ s(Ht, {
|
|
490
|
+
datasetId: o,
|
|
441
491
|
versionId: i.id,
|
|
442
492
|
disabled: !b.length,
|
|
443
|
-
setIsTaskChange:
|
|
493
|
+
setIsTaskChange: Ge,
|
|
444
494
|
datasetType: "detection",
|
|
445
|
-
preLabelTask:
|
|
446
|
-
}), /* @__PURE__ */
|
|
447
|
-
disabled:
|
|
495
|
+
preLabelTask: Ie
|
|
496
|
+
}), /* @__PURE__ */ s(ie, {
|
|
497
|
+
disabled: w || !Qe,
|
|
448
498
|
onClick: ct,
|
|
449
499
|
children: "待确认标注"
|
|
450
500
|
})]
|
|
451
|
-
}) : null, /* @__PURE__ */
|
|
452
|
-
when:
|
|
501
|
+
}) : null, /* @__PURE__ */ s(Ft, {
|
|
502
|
+
when: $e,
|
|
453
503
|
content: "确认要离开此页面吗?",
|
|
454
504
|
subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
|
|
455
|
-
}),
|
|
456
|
-
datasetIam:
|
|
457
|
-
datasetId:
|
|
505
|
+
}), ve && /* @__PURE__ */ s(Mt, {
|
|
506
|
+
datasetIam: Ke,
|
|
507
|
+
datasetId: o,
|
|
458
508
|
currentVersion: i,
|
|
459
509
|
tenCode: C == null ? void 0 : C.tenantCode,
|
|
460
|
-
isVisible:
|
|
461
|
-
setIsVisible:
|
|
462
|
-
getVersionListRequest:
|
|
463
|
-
setIsConfirm:
|
|
510
|
+
isVisible: ve,
|
|
511
|
+
setIsVisible: re,
|
|
512
|
+
getVersionListRequest: x,
|
|
513
|
+
setIsConfirm: Ze,
|
|
464
514
|
onUploadStatusChange: (e) => {
|
|
465
|
-
|
|
515
|
+
je(e);
|
|
466
516
|
},
|
|
467
517
|
tableReload: () => {
|
|
468
518
|
var e, t;
|
|
469
519
|
i != null && i.id && ((t = (e = Z.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
|
|
470
520
|
top: 0
|
|
471
|
-
}), A(
|
|
521
|
+
}), A(S(m({}, n), {
|
|
472
522
|
current: 1
|
|
473
523
|
})));
|
|
474
524
|
},
|
|
475
|
-
loadVersionData:
|
|
525
|
+
loadVersionData: Te
|
|
476
526
|
})]
|
|
477
527
|
})
|
|
478
528
|
}),
|
|
479
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ V("div", {
|
|
480
530
|
className: "detection-header",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
482
|
-
children: [j.tabs && /* @__PURE__ */
|
|
531
|
+
children: [/* @__PURE__ */ V(te, {
|
|
532
|
+
children: [j.tabs && /* @__PURE__ */ s(St, {
|
|
483
533
|
className: "header-tab",
|
|
484
|
-
activeKey:
|
|
485
|
-
items:
|
|
486
|
-
onChange:
|
|
487
|
-
|
|
488
|
-
t ? (te(e), D()) : K.error("保存失败");
|
|
489
|
-
}), Q(!1)) : (N(y(g({}, r), {
|
|
490
|
-
current: 1,
|
|
491
|
-
total: void 0
|
|
492
|
-
})), te(e)), e === "nocode" && re([]);
|
|
493
|
-
}
|
|
494
|
-
}), !w && !p && j.search && /* @__PURE__ */ o(Ht, {
|
|
534
|
+
activeKey: L,
|
|
535
|
+
items: Ve,
|
|
536
|
+
onChange: Ne
|
|
537
|
+
}), !v && j.search && /* @__PURE__ */ s(Ot, {
|
|
495
538
|
placeholder: "请输入图片名称搜索",
|
|
496
|
-
suffix: /* @__PURE__ */
|
|
497
|
-
value:
|
|
539
|
+
suffix: /* @__PURE__ */ s(Et, {}),
|
|
540
|
+
value: G,
|
|
498
541
|
onChange: dt,
|
|
499
542
|
allowClear: !0
|
|
500
543
|
})]
|
|
501
|
-
}), /* @__PURE__ */
|
|
502
|
-
isPreLabel:
|
|
503
|
-
children: /* @__PURE__ */
|
|
504
|
-
children:
|
|
505
|
-
children: [m && m.label ? /* @__PURE__ */ o(M, {
|
|
506
|
-
type: "primary",
|
|
507
|
-
onClick: () => rt(),
|
|
508
|
-
disabled: x,
|
|
509
|
-
children: "保存"
|
|
510
|
-
}) : null, /* @__PURE__ */ o(M, {
|
|
511
|
-
onClick: z,
|
|
512
|
-
children: "退出"
|
|
513
|
-
})]
|
|
514
|
-
}) : m && m.label && /* @__PURE__ */ o(M, {
|
|
544
|
+
}), /* @__PURE__ */ s(Re, {
|
|
545
|
+
isPreLabel: w,
|
|
546
|
+
children: /* @__PURE__ */ s(te, {
|
|
547
|
+
children: I && I.label && /* @__PURE__ */ s(ie, {
|
|
515
548
|
type: "primary",
|
|
516
|
-
disabled: !B ||
|
|
549
|
+
disabled: !B || w,
|
|
517
550
|
onClick: () => {
|
|
518
|
-
|
|
551
|
+
v || ne("nocode"), q(!0), p(-1), L === "nocode" && (p(0), g(b[0])), _(!0);
|
|
519
552
|
},
|
|
520
|
-
children: "
|
|
521
|
-
})
|
|
522
|
-
onClick: ot,
|
|
523
|
-
disabled: x,
|
|
524
|
-
children: "删除数据"
|
|
525
|
-
})]
|
|
553
|
+
children: "标注"
|
|
554
|
+
})
|
|
526
555
|
})
|
|
527
556
|
})]
|
|
528
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ V("div", {
|
|
529
558
|
className: "d-row",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ V("div", {
|
|
531
560
|
className: "d-right",
|
|
532
561
|
ref: Z,
|
|
533
|
-
children: [
|
|
534
|
-
datasetId:
|
|
535
|
-
isImageDetailVisible:
|
|
536
|
-
setIsImageDetailVisible:
|
|
537
|
-
currentSample: a != null ? a :
|
|
562
|
+
children: [Y && /* @__PURE__ */ s(jt, {
|
|
563
|
+
datasetId: o,
|
|
564
|
+
isImageDetailVisible: Y,
|
|
565
|
+
setIsImageDetailVisible: _,
|
|
566
|
+
currentSample: a != null ? a : v,
|
|
538
567
|
labels: P,
|
|
539
|
-
|
|
540
|
-
|
|
568
|
+
previewMode: !W,
|
|
569
|
+
filterItems: Ve,
|
|
570
|
+
filterMode: L,
|
|
571
|
+
onFilterChange: Ne,
|
|
572
|
+
onChange: y,
|
|
541
573
|
onNextClick: () => xe(),
|
|
542
|
-
onPrevClick: () =>
|
|
574
|
+
onPrevClick: () => nt(),
|
|
575
|
+
onSave: () => lt(),
|
|
576
|
+
onDeleteSample: () => st(),
|
|
577
|
+
onEnterEdit: () => {
|
|
578
|
+
q(!0);
|
|
579
|
+
},
|
|
543
580
|
onRefresh: () => {
|
|
544
581
|
var e;
|
|
545
|
-
(e =
|
|
546
|
-
var
|
|
582
|
+
(e = K()) == null || e.then((t) => {
|
|
583
|
+
var l, r;
|
|
547
584
|
if (a) {
|
|
548
585
|
const c = [];
|
|
549
|
-
(
|
|
550
|
-
t != null && t.find((k) => k.id ===
|
|
551
|
-
}), a.labels = c,
|
|
586
|
+
(l = a.labels) == null || l.forEach((h) => {
|
|
587
|
+
t != null && t.find((k) => k.id === h.id) && c.push(h);
|
|
588
|
+
}), a.labels = c, y(m({}, a));
|
|
552
589
|
}
|
|
553
|
-
if (
|
|
590
|
+
if (v) {
|
|
554
591
|
const c = [];
|
|
555
|
-
(
|
|
556
|
-
t != null && t.find((k) => k.id ===
|
|
557
|
-
}),
|
|
592
|
+
(r = v.labels) == null || r.forEach((h) => {
|
|
593
|
+
t != null && t.find((k) => k.id === h.id) && c.push(h);
|
|
594
|
+
}), v.labels = c, g(m({}, v));
|
|
558
595
|
}
|
|
559
|
-
}),
|
|
596
|
+
}), x();
|
|
560
597
|
},
|
|
561
|
-
isPreLabel:
|
|
598
|
+
isPreLabel: w,
|
|
562
599
|
imgCount: {
|
|
563
600
|
total: O,
|
|
564
|
-
index:
|
|
601
|
+
index: M + 1
|
|
565
602
|
},
|
|
566
603
|
settingHide: !ue,
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
604
|
+
canLabel: !!(I && I.label),
|
|
605
|
+
canDelete: !!(I && I.delete)
|
|
606
|
+
}), v ? /* @__PURE__ */ s("div", {}) : n.total !== void 0 && n.total > 0 ? /* @__PURE__ */ s(ze, {
|
|
607
|
+
children: /* @__PURE__ */ s(kt, {
|
|
570
608
|
innerProps: {
|
|
571
609
|
className: "d-right-row"
|
|
572
610
|
},
|
|
573
611
|
data: b,
|
|
574
612
|
itemKey: "id",
|
|
575
|
-
height: (
|
|
576
|
-
onScroll:
|
|
613
|
+
height: (Pe = Z.current) == null ? void 0 : Pe.clientHeight,
|
|
614
|
+
onScroll: ot,
|
|
577
615
|
children: (e, t) => {
|
|
578
|
-
var
|
|
579
|
-
return /* @__PURE__ */
|
|
616
|
+
var l;
|
|
617
|
+
return /* @__PURE__ */ s(Ct, {
|
|
580
618
|
className: "d-right-col",
|
|
581
|
-
|
|
619
|
+
onClick: () => it(t),
|
|
620
|
+
children: /* @__PURE__ */ V("div", {
|
|
582
621
|
className: "right-col-wrapper",
|
|
583
622
|
onMouseEnter: () => se(e.id),
|
|
584
623
|
onMouseLeave: () => se(""),
|
|
585
|
-
children: [/* @__PURE__ */
|
|
624
|
+
children: [/* @__PURE__ */ s("div", {
|
|
586
625
|
className: "right-col-img",
|
|
587
|
-
children:
|
|
626
|
+
children: /* @__PURE__ */ s(Bt, {
|
|
588
627
|
fileKey: e.fileKey,
|
|
589
628
|
width: 124,
|
|
590
|
-
imgProxy:
|
|
591
|
-
})
|
|
592
|
-
|
|
593
|
-
children: [/* @__PURE__ */ o("div", {
|
|
594
|
-
className: "img-file-name",
|
|
595
|
-
children: e.sampleFileName.name
|
|
596
|
-
}), /* @__PURE__ */ o(M, {
|
|
597
|
-
type: "default",
|
|
598
|
-
onClick: () => tt(t),
|
|
599
|
-
children: m && m.label ? "标注" : "查看"
|
|
600
|
-
})]
|
|
601
|
-
})]
|
|
602
|
-
}), /* @__PURE__ */ v("div", {
|
|
629
|
+
imgProxy: et
|
|
630
|
+
})
|
|
631
|
+
}), /* @__PURE__ */ V("div", {
|
|
603
632
|
className: "right-col-text",
|
|
604
|
-
children: [(
|
|
633
|
+
children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(yt, {
|
|
605
634
|
placement: "top",
|
|
606
|
-
title: /* @__PURE__ */
|
|
607
|
-
children: Object.keys(e.labels.reduce((
|
|
608
|
-
children:
|
|
609
|
-
},
|
|
635
|
+
title: /* @__PURE__ */ s("div", {
|
|
636
|
+
children: Object.keys(e.labels.reduce((r, c) => (r[c.label] ? ++r[c.label] : r[c.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
|
|
637
|
+
children: r
|
|
638
|
+
}, r))
|
|
610
639
|
}),
|
|
611
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ V("div", {
|
|
612
641
|
style: {
|
|
613
642
|
width: "100%",
|
|
614
643
|
display: "flex"
|
|
615
644
|
},
|
|
616
|
-
children: [/* @__PURE__ */
|
|
645
|
+
children: [/* @__PURE__ */ s("span", {
|
|
617
646
|
style: {
|
|
618
647
|
display: "inline-block",
|
|
619
648
|
maxWidth: "calc(100% - 25px)",
|
|
@@ -622,21 +651,21 @@ const bi = (T) => {
|
|
|
622
651
|
whiteSpace: "nowrap"
|
|
623
652
|
},
|
|
624
653
|
children: e.labels[0].label
|
|
625
|
-
}), e.labels.length > 1 ? /* @__PURE__ */
|
|
654
|
+
}), e.labels.length > 1 ? /* @__PURE__ */ s("span", {
|
|
626
655
|
style: {
|
|
627
656
|
color: "rgba(0,0,0,0.45)",
|
|
628
657
|
marginLeft: 5
|
|
629
658
|
},
|
|
630
|
-
children:
|
|
659
|
+
children: rt(e)
|
|
631
660
|
}) : null]
|
|
632
661
|
})
|
|
633
|
-
}) : /* @__PURE__ */
|
|
662
|
+
}) : /* @__PURE__ */ s("span", {
|
|
634
663
|
style: {
|
|
635
664
|
color: "rgba(0,0,0,0.45)",
|
|
636
665
|
width: "100%"
|
|
637
666
|
},
|
|
638
667
|
children: "无标签"
|
|
639
|
-
}), /* @__PURE__ */
|
|
668
|
+
}), /* @__PURE__ */ s("div", {
|
|
640
669
|
children: t + 1
|
|
641
670
|
})]
|
|
642
671
|
})]
|
|
@@ -644,21 +673,21 @@ const bi = (T) => {
|
|
|
644
673
|
}, e.id);
|
|
645
674
|
}
|
|
646
675
|
})
|
|
647
|
-
}) : /* @__PURE__ */
|
|
676
|
+
}) : /* @__PURE__ */ s("div", {
|
|
648
677
|
className: "empty",
|
|
649
|
-
children:
|
|
678
|
+
children: n.total === 0 ? /* @__PURE__ */ s(It, {
|
|
650
679
|
image: Nt,
|
|
651
|
-
description: /* @__PURE__ */
|
|
652
|
-
children: ["暂无数据",
|
|
653
|
-
children:
|
|
680
|
+
description: /* @__PURE__ */ V("span", {
|
|
681
|
+
children: ["暂无数据", L !== "hascode" && !G && /* @__PURE__ */ s("span", {
|
|
682
|
+
children: I && I.add && /* @__PURE__ */ V(ie, {
|
|
654
683
|
type: "link",
|
|
655
684
|
size: "small",
|
|
656
685
|
style: {
|
|
657
686
|
padding: 0
|
|
658
687
|
},
|
|
659
|
-
onClick: () =>
|
|
688
|
+
onClick: () => re(!0),
|
|
660
689
|
disabled: R === U.Pending || R === U.Started,
|
|
661
|
-
children: [/* @__PURE__ */
|
|
690
|
+
children: [/* @__PURE__ */ s("span", {
|
|
662
691
|
style: {
|
|
663
692
|
color: "black"
|
|
664
693
|
},
|
|
@@ -667,34 +696,34 @@ const bi = (T) => {
|
|
|
667
696
|
})
|
|
668
697
|
})]
|
|
669
698
|
})
|
|
670
|
-
}) : /* @__PURE__ */
|
|
699
|
+
}) : /* @__PURE__ */ s(Lt, {})
|
|
671
700
|
})]
|
|
672
|
-
}),
|
|
701
|
+
}), !v && j.labels && /* @__PURE__ */ s("div", {
|
|
673
702
|
className: "d-sider",
|
|
674
|
-
children: /* @__PURE__ */
|
|
675
|
-
datasetId:
|
|
703
|
+
children: /* @__PURE__ */ s(Pt, {
|
|
704
|
+
datasetId: o,
|
|
676
705
|
data: P || [],
|
|
677
706
|
selected: F,
|
|
678
707
|
onSelectedChange: (e) => {
|
|
679
|
-
|
|
708
|
+
oe((P == null ? void 0 : P.filter((t) => e.find((l) => l.label === t.label))) || []);
|
|
680
709
|
},
|
|
681
710
|
onListChange: (e) => {
|
|
682
|
-
i && (f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(
|
|
683
|
-
const
|
|
684
|
-
label:
|
|
685
|
-
count:
|
|
686
|
-
id:
|
|
687
|
-
color:
|
|
688
|
-
})), c = F.filter((
|
|
689
|
-
|
|
690
|
-
}),
|
|
711
|
+
i && (f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((t) => {
|
|
712
|
+
const r = (t || []).filter((h) => h.label !== "nocode").map((h, k) => ({
|
|
713
|
+
label: h.label,
|
|
714
|
+
count: h.count,
|
|
715
|
+
id: h.id,
|
|
716
|
+
color: Me[k % 40]
|
|
717
|
+
})), c = F.filter((h) => r.some((k) => k.id === h.id));
|
|
718
|
+
ye(r), F.length !== c.length && oe(c);
|
|
719
|
+
}), x());
|
|
691
720
|
},
|
|
692
|
-
isPreLabel:
|
|
721
|
+
isPreLabel: w
|
|
693
722
|
})
|
|
694
723
|
})]
|
|
695
724
|
})]
|
|
696
725
|
})
|
|
697
|
-
}) : /* @__PURE__ */
|
|
726
|
+
}) : /* @__PURE__ */ s("div", {
|
|
698
727
|
style: {
|
|
699
728
|
color: "red",
|
|
700
729
|
textAlign: "center"
|