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