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