@glodon-aiot/dataset-annotation 3.2.2-beta.3 → 3.2.10-beta.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/dataset-annotation.js +12191 -12198
- package/dist/dataset-annotation.umd.cjs +135 -135
- package/dist/es/Common/Page/index.mjs +29 -0
- package/dist/es/Common/Page/style.less.mjs +4 -0
- package/dist/es/Common/PageContent/index.mjs +18 -0
- package/dist/es/Common/PageHeader/index.mjs +39 -0
- package/dist/es/Common/PageHeader/style.less.mjs +4 -0
- package/dist/es/DatasetContext/index.mjs +11 -0
- package/dist/es/access/images/data_empty.svg.mjs +4 -0
- package/dist/es/components/CompositionInput/index.mjs +53 -0
- package/dist/es/components/DataEmpty/index.mjs +51 -0
- package/dist/es/components/DataEmpty/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/PreSamplesPage/index.mjs +292 -0
- package/dist/es/components/DetectionAnnotation/PreSamplesPage/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/DisabledTooltip/index.mjs +23 -0
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +166 -0
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/Drawable.mjs +51 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/FabricCustomize.mjs +42 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/RectLabel.mjs +283 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/icons/delete-icon.svg.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +315 -0
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/Labels/index.mjs +201 -0
- package/dist/es/components/DetectionAnnotation/components/Labels/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/components/TagItem/index.mjs +144 -0
- package/dist/es/components/DetectionAnnotation/components/TagItem/style.less.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/icon_item_empty.svg.mjs +4 -0
- package/dist/es/components/DetectionAnnotation/index.mjs +713 -0
- package/dist/es/components/DetectionAnnotation/style.less.mjs +4 -0
- package/dist/es/components/DetectionImageAnnotation/index.mjs +62 -0
- package/dist/es/components/DetectionImageAnnotation/style.less.mjs +4 -0
- package/dist/es/components/Iconfont/index.mjs +16 -0
- package/dist/es/components/MarkDescriptions/index.mjs +66 -0
- package/dist/es/components/MarkDescriptions/style.less.mjs +4 -0
- package/dist/es/components/OCRImageViewer/index.mjs +213 -0
- package/dist/es/components/OCRImageViewer/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/CategoryDrawer.mjs +136 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.mjs +57 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.mjs +73 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.mjs +55 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/index.mjs +366 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/index.mjs +255 -0
- package/dist/es/components/OcrAnnotation/MarkKVOCRModal/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.mjs +101 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/images/delete.png.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.mjs +756 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/index.mjs +231 -0
- package/dist/es/components/OcrAnnotation/MarkOCRBoxModal/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +180 -0
- package/dist/es/components/OcrAnnotation/OcrModal/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/PreLabelOCR/PreLabelModal.mjs +281 -0
- package/dist/es/components/OcrAnnotation/PreLabelOCR/index.mjs +44 -0
- package/dist/es/components/OcrAnnotation/PreLabelOCR/style.less.mjs +4 -0
- package/dist/es/components/OcrAnnotation/constant.mjs +5 -0
- package/dist/es/components/OcrAnnotation/index.mjs +382 -0
- package/dist/es/components/OcrAnnotation/style.less.mjs +4 -0
- package/dist/es/components/OcrImageAnnotation/index.mjs +40 -0
- package/dist/es/components/OcrImageAnnotation/style.less.mjs +4 -0
- package/dist/es/components/PageNav/index.mjs +30 -0
- package/dist/es/components/PageNav/style.less.mjs +4 -0
- package/dist/es/components/PicZipImportModal/index.mjs +584 -0
- package/dist/es/components/PicZipImportModal/pic_zip.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/pic_zip_json.svg.mjs +4 -0
- package/dist/es/components/PicZipImportModal/style.less.mjs +4 -0
- package/dist/es/components/PreLabelOCR/PreLabelModal.mjs +276 -0
- package/dist/es/components/PreLabelOCR/index.mjs +44 -0
- package/dist/es/components/PreLabelOCR/style.less.mjs +4 -0
- package/dist/es/components/ScanTable/index.mjs +97 -0
- package/dist/es/components/ScanTable/style.less.mjs +4 -0
- package/dist/es/components/Thumbnail/default.png.mjs +4 -0
- package/dist/es/components/Thumbnail/index.mjs +31 -0
- package/dist/es/components/Thumbnail/style.less.mjs +4 -0
- package/dist/es/components/hooks/Prompt.mjs +33 -0
- package/dist/es/constant.mjs +13 -0
- package/dist/es/createDatasetAnnotation/index.mjs +133 -0
- package/dist/es/createDetectionDatasetAnnotation/index.mjs +129 -0
- package/dist/es/createDetectionImageAnnotation/index.mjs +31 -0
- package/dist/es/createOcrDatasetAnnotation/index.mjs +129 -0
- package/dist/es/createOcrImageAnnotation/index.mjs +33 -0
- package/dist/es/featuresConfig.mjs +79 -0
- package/dist/es/index.mjs +13 -0
- package/dist/es/utils/color.mjs +30 -0
- package/dist/es/utils/index.mjs +22 -0
- package/dist/es/utils/sign.mjs +33 -0
- package/dist/lib/index.js +3 -0
- package/dist/src/Common/Page/index.d.ts +1 -2
- package/dist/src/Common/PageHeader/index.d.ts +0 -1
- package/dist/src/DatasetContext/index.d.ts +3 -4
- package/dist/src/components/CompositionInput/index.d.ts +2 -2
- package/dist/src/components/DataEmpty/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/PreSamplesPage/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/components/DisabledTooltip/index.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/Drawable.d.ts +2 -2
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/RectLabel.d.ts +6 -5
- package/dist/src/components/DetectionAnnotation/components/LabelMaker/index.d.ts +0 -1
- package/dist/src/components/DetectionAnnotation/components/Labels/index.d.ts +0 -1
- package/dist/src/components/DetectionAnnotation/components/TagItem/index.d.ts +1 -2
- package/dist/src/components/DetectionAnnotation/index.d.ts +1 -2
- package/dist/src/components/DetectionImageAnnotation/index.d.ts +0 -2
- package/dist/src/components/Iconfont/font_3140028_iptomfpgyu.d.ts +0 -0
- package/dist/src/components/Iconfont/font_3454453_gu5ijeufyng.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4108228_3slzqhoow93.d.ts +0 -0
- package/dist/src/components/Iconfont/font_4439177_k3mjwv7kzfd.d.ts +0 -0
- package/dist/src/components/Iconfont/index.d.ts +1 -2
- package/dist/src/components/MarkDescriptions/index.d.ts +0 -1
- package/dist/src/components/OCRImageViewer/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorInput.d.ts +2 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LabelEditorItem.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/KVOCRLabelMaker/LableEditor.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkKVOCRModal/index.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/ImageDetail/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorInput.d.ts +2 -2
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LabelEditorItem.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/LableEditor.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/OCRBoxMaker/index.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/MarkOCRBoxModal/index.d.ts +0 -1
- package/dist/src/components/OcrAnnotation/OcrModal/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/PreLabelOCR/PreLabelModal.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/PreLabelOCR/index.d.ts +1 -2
- package/dist/src/components/OcrAnnotation/index.d.ts +1 -2
- package/dist/src/components/OcrImageAnnotation/index.d.ts +0 -2
- package/dist/src/components/PageNav/index.d.ts +1 -2
- package/dist/src/components/PicZipImportModal/index.d.ts +1 -2
- package/dist/src/components/PreLabelOCR/PreLabelModal.d.ts +1 -2
- package/dist/src/components/PreLabelOCR/index.d.ts +1 -2
- package/dist/src/components/ScanTable/index.d.ts +1 -2
- package/dist/src/components/Thumbnail/index.d.ts +1 -2
- package/dist/src/components/hooks/Prompt.d.ts +0 -1
- package/dist/src/components/hooks/useBlocker.d.ts +1 -1
- package/dist/src/featuresConfig.d.ts +1 -1
- package/dist/src/utils/sign.d.ts +1 -1
- package/package.json +18 -8
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
var x = (I, c, i) => new Promise((V, y) => {
|
|
2
|
+
var T = (d) => {
|
|
3
|
+
try {
|
|
4
|
+
m(i.next(d));
|
|
5
|
+
} catch (N) {
|
|
6
|
+
y(N);
|
|
7
|
+
}
|
|
8
|
+
}, t = (d) => {
|
|
9
|
+
try {
|
|
10
|
+
m(i.throw(d));
|
|
11
|
+
} catch (N) {
|
|
12
|
+
y(N);
|
|
13
|
+
}
|
|
14
|
+
}, m = (d) => d.done ? V(d.value) : Promise.resolve(d.value).then(T, t);
|
|
15
|
+
m((i = i.apply(I, c)).next());
|
|
16
|
+
});
|
|
17
|
+
import { jsx as a, jsxs as v } from "react/jsx-runtime";
|
|
18
|
+
import { useState as f, useContext as Y, useEffect as O } from "react";
|
|
19
|
+
import { Form as h, Modal as Z, Button as C, Select as E, Tooltip as G, Tag as ee, InputNumber as te, Space as z, Spin as ae } from "antd";
|
|
20
|
+
import { LoadingOutlined as ne } from "@ant-design/icons";
|
|
21
|
+
import "./style.less.mjs";
|
|
22
|
+
import { detectionPreService as le, ocrPreService as se } from "../constant.mjs";
|
|
23
|
+
import { PreLabelTaskStatus as p } from "@glodon-aiot/apis";
|
|
24
|
+
import ie from "../../../DatasetContext/index.mjs";
|
|
25
|
+
const re = [{
|
|
26
|
+
index: 0,
|
|
27
|
+
key: "PENDING",
|
|
28
|
+
color: "#0F64FF",
|
|
29
|
+
name: "待确认"
|
|
30
|
+
}, {
|
|
31
|
+
index: 1,
|
|
32
|
+
key: "STARTED",
|
|
33
|
+
color: "#0F64FF",
|
|
34
|
+
name: "进行中"
|
|
35
|
+
}, {
|
|
36
|
+
index: 2,
|
|
37
|
+
key: "SUCCESS",
|
|
38
|
+
color: "#2DC159",
|
|
39
|
+
name: "已完成"
|
|
40
|
+
}], ve = (I) => {
|
|
41
|
+
var j;
|
|
42
|
+
const {
|
|
43
|
+
datasetId: c,
|
|
44
|
+
versionId: i,
|
|
45
|
+
isVisible: V,
|
|
46
|
+
onClose: y,
|
|
47
|
+
setIsTaskChange: T,
|
|
48
|
+
record: t,
|
|
49
|
+
datasetType: m
|
|
50
|
+
} = I, [d, N] = f([]), [A, M] = f([]), [S] = h.useForm(), [l, L] = f(), [F, q] = f(), [b, R] = f(""), k = h.useWatch("service", S), [B, _] = f(!1), {
|
|
51
|
+
services: {
|
|
52
|
+
cvforceDatahub: r,
|
|
53
|
+
cvforceModelService: g
|
|
54
|
+
},
|
|
55
|
+
featuresConfig: {
|
|
56
|
+
labelManager: oe
|
|
57
|
+
} = {
|
|
58
|
+
labelManager: !1
|
|
59
|
+
}
|
|
60
|
+
} = Y(ie), J = m === "detection" ? le : se, P = () => {
|
|
61
|
+
y();
|
|
62
|
+
};
|
|
63
|
+
O(() => {
|
|
64
|
+
$(), H();
|
|
65
|
+
}, []), O(() => {
|
|
66
|
+
t && L(t), t != null && t.lastTaskResult && q(JSON.parse(t == null ? void 0 : t.lastTaskResult));
|
|
67
|
+
}, [t]), O(() => {
|
|
68
|
+
var e, n, s, o, u;
|
|
69
|
+
S.setFieldsValue({
|
|
70
|
+
service: {
|
|
71
|
+
value: (e = l == null ? void 0 : l.params) == null ? void 0 : e.serviceId,
|
|
72
|
+
label: (n = l == null ? void 0 : l.params) == null ? void 0 : n.serviceName
|
|
73
|
+
},
|
|
74
|
+
data: (s = l == null ? void 0 : l.params) == null ? void 0 : s.data,
|
|
75
|
+
confidence: (u = (o = l == null ? void 0 : l.params) == null ? void 0 : o.confidence) != null ? u : 0.6
|
|
76
|
+
}), R((l == null ? void 0 : l.state) || "PENDING");
|
|
77
|
+
}, [l]), O(() => {
|
|
78
|
+
!k || !k.value || m !== "ocr" && Promise.all([U(), W(k.value)]).then(([e, n]) => {
|
|
79
|
+
if (!e)
|
|
80
|
+
return;
|
|
81
|
+
const s = e.filter((o) => {
|
|
82
|
+
if (!(n != null && n.find((u) => u === o)))
|
|
83
|
+
return o;
|
|
84
|
+
});
|
|
85
|
+
_(!!s.length), S.validateFields(["service"]);
|
|
86
|
+
});
|
|
87
|
+
}, [k]);
|
|
88
|
+
const U = () => {
|
|
89
|
+
if (!(!c || !i))
|
|
90
|
+
return r == null ? void 0 : r.getDatasetsIdVersionsVidLabelcount(c, i).then((e) => e.filter((s) => s.label !== "nocode").map((s) => s.label));
|
|
91
|
+
}, W = (e) => g == null ? void 0 : g.getModelServiceById(e).then((n) => {
|
|
92
|
+
const s = n.deployOptions.confidence;
|
|
93
|
+
return s == null ? void 0 : s.map((u) => u.label);
|
|
94
|
+
}), $ = () => {
|
|
95
|
+
g == null || g.openModelServices({
|
|
96
|
+
signName: J,
|
|
97
|
+
state: "Running"
|
|
98
|
+
}).then((e) => {
|
|
99
|
+
const s = (e || []).map((o) => {
|
|
100
|
+
var u;
|
|
101
|
+
return {
|
|
102
|
+
label: o.name,
|
|
103
|
+
value: o.id,
|
|
104
|
+
confidence: ((u = o.deployOptions.confidence) == null ? void 0 : u.map((X) => X.label)) || []
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
N(s);
|
|
108
|
+
});
|
|
109
|
+
}, H = () => {
|
|
110
|
+
!c || !i || r == null || r.getDatasetsIdVersionsVidSamples(c, i, {
|
|
111
|
+
labels: "nocode",
|
|
112
|
+
pageNo: 1,
|
|
113
|
+
pageSize: 1
|
|
114
|
+
}).then((e) => {
|
|
115
|
+
const n = e.recordList || [];
|
|
116
|
+
M([{
|
|
117
|
+
label: "未标注",
|
|
118
|
+
value: "nolabel",
|
|
119
|
+
disabled: !n.length
|
|
120
|
+
}]);
|
|
121
|
+
});
|
|
122
|
+
}, w = () => {
|
|
123
|
+
!c || !i || !(l != null && l.taskId) || r == null || r.delPreLabelTask(c, i, l.taskId).then((e) => {
|
|
124
|
+
T((n) => !n), R("PENDING");
|
|
125
|
+
});
|
|
126
|
+
}, K = () => {
|
|
127
|
+
w();
|
|
128
|
+
}, Q = () => {
|
|
129
|
+
w(), S.resetFields(), L(void 0);
|
|
130
|
+
}, D = (e) => {
|
|
131
|
+
if (!c || !i || !e.service)
|
|
132
|
+
return;
|
|
133
|
+
const n = {
|
|
134
|
+
serviceId: e.service.value,
|
|
135
|
+
serviceName: e.service.label,
|
|
136
|
+
data: "nolabel",
|
|
137
|
+
confidence: e.confidence
|
|
138
|
+
};
|
|
139
|
+
r == null || r.postPreLabelTask(c, i, n).then((s) => {
|
|
140
|
+
T((o) => !o);
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
return /* @__PURE__ */ a(Z, {
|
|
144
|
+
title: "批量预标注",
|
|
145
|
+
wrapClassName: "batch-ocr-modal-wrap",
|
|
146
|
+
className: "batch-ocr-modal",
|
|
147
|
+
open: V,
|
|
148
|
+
destroyOnClose: !0,
|
|
149
|
+
onCancel: P,
|
|
150
|
+
maskClosable: !1,
|
|
151
|
+
centered: !0,
|
|
152
|
+
footer: b === p.Pending ? [/* @__PURE__ */ a(C, {
|
|
153
|
+
onClick: P,
|
|
154
|
+
children: "取消"
|
|
155
|
+
}, "cancel"), /* @__PURE__ */ a(C, {
|
|
156
|
+
type: "primary",
|
|
157
|
+
htmlType: "submit",
|
|
158
|
+
form: "preLabelForm",
|
|
159
|
+
onClick: D,
|
|
160
|
+
children: "确定"
|
|
161
|
+
}, "confirm")] : (t == null ? void 0 : t.state) === p.Started ? [/* @__PURE__ */ a(C, {
|
|
162
|
+
onClick: K,
|
|
163
|
+
children: "终止"
|
|
164
|
+
}, "abort"), /* @__PURE__ */ a(C, {
|
|
165
|
+
onClick: P,
|
|
166
|
+
children: "返回"
|
|
167
|
+
}, "cancel")] : [/* @__PURE__ */ a(C, {
|
|
168
|
+
onClick: Q,
|
|
169
|
+
children: "新建任务"
|
|
170
|
+
}, "abort"), /* @__PURE__ */ a(C, {
|
|
171
|
+
onClick: P,
|
|
172
|
+
children: "返回"
|
|
173
|
+
}, "cancel")],
|
|
174
|
+
children: /* @__PURE__ */ v(h, {
|
|
175
|
+
onFinish: D,
|
|
176
|
+
name: "preLabelForm",
|
|
177
|
+
labelAlign: "right",
|
|
178
|
+
labelCol: {
|
|
179
|
+
style: {
|
|
180
|
+
width: 80
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
form: S,
|
|
184
|
+
children: [/* @__PURE__ */ a(h.Item, {
|
|
185
|
+
label: "选择服务",
|
|
186
|
+
name: "service",
|
|
187
|
+
rules: [{
|
|
188
|
+
required: !0
|
|
189
|
+
}, {
|
|
190
|
+
validator: (e, n) => x(void 0, null, function* () {
|
|
191
|
+
const s = S.getFieldValue("service");
|
|
192
|
+
if (!s.value || !s.label)
|
|
193
|
+
return Promise.reject(new Error("请选择服务"));
|
|
194
|
+
})
|
|
195
|
+
}, {
|
|
196
|
+
validator: (e, n) => x(void 0, null, function* () {
|
|
197
|
+
if (B && m === "detection")
|
|
198
|
+
return Promise.reject(new Error("所选服务与当前数据集标签不符"));
|
|
199
|
+
})
|
|
200
|
+
}],
|
|
201
|
+
children: /* @__PURE__ */ a(E, {
|
|
202
|
+
labelInValue: !0,
|
|
203
|
+
disabled: (t == null ? void 0 : t.state) === p.Started,
|
|
204
|
+
children: d.map((e) => /* @__PURE__ */ a(E.Option, {
|
|
205
|
+
value: e.value,
|
|
206
|
+
disabled: e.disabled,
|
|
207
|
+
children: /* @__PURE__ */ a(G, {
|
|
208
|
+
title: e.confidence.length ? e.confidence.map((n) => /* @__PURE__ */ a(ee, {
|
|
209
|
+
children: n
|
|
210
|
+
}, n)) : null,
|
|
211
|
+
overlayClassName: "service-tag-tooltip",
|
|
212
|
+
children: e.label
|
|
213
|
+
})
|
|
214
|
+
}, e.value))
|
|
215
|
+
})
|
|
216
|
+
}), m === "detection" && /* @__PURE__ */ a(h.Item, {
|
|
217
|
+
label: "置信度",
|
|
218
|
+
name: "confidence",
|
|
219
|
+
initialValue: 0.6,
|
|
220
|
+
children: /* @__PURE__ */ a(te, {
|
|
221
|
+
max: 1,
|
|
222
|
+
min: 0,
|
|
223
|
+
precision: 2,
|
|
224
|
+
step: 0.01,
|
|
225
|
+
disabled: (t == null ? void 0 : t.state) === p.Started
|
|
226
|
+
})
|
|
227
|
+
}), /* @__PURE__ */ a(h.Item, {
|
|
228
|
+
label: "选择数据",
|
|
229
|
+
name: "data",
|
|
230
|
+
rules: [{
|
|
231
|
+
required: !0,
|
|
232
|
+
message: "请选择数据"
|
|
233
|
+
}],
|
|
234
|
+
initialValue: "nolabel",
|
|
235
|
+
children: /* @__PURE__ */ a(E, {
|
|
236
|
+
disabled: (t == null ? void 0 : t.state) === p.Started,
|
|
237
|
+
children: A.map((e) => /* @__PURE__ */ a(E.Option, {
|
|
238
|
+
value: e.value,
|
|
239
|
+
disabled: e.disabled,
|
|
240
|
+
children: /* @__PURE__ */ a(G, {
|
|
241
|
+
title: e.disabled ? "该数据集下不存在未标注的数据" : "当前数据集版本下所有未标注的数据",
|
|
242
|
+
children: e.label
|
|
243
|
+
})
|
|
244
|
+
}, e.value))
|
|
245
|
+
})
|
|
246
|
+
}), /* @__PURE__ */ a(h.Item, {
|
|
247
|
+
label: "标注状态",
|
|
248
|
+
children: /* @__PURE__ */ v(z, {
|
|
249
|
+
className: "mark-status",
|
|
250
|
+
children: [b === p.Started ? /* @__PURE__ */ a(ae, {
|
|
251
|
+
indicator: /* @__PURE__ */ a(ne, {
|
|
252
|
+
style: {
|
|
253
|
+
fontSize: 12
|
|
254
|
+
},
|
|
255
|
+
spin: !0
|
|
256
|
+
})
|
|
257
|
+
}) : /* @__PURE__ */ a("span", {
|
|
258
|
+
className: `status-tip status-tip-${b || "PENDING"}`
|
|
259
|
+
}), /* @__PURE__ */ a("span", {
|
|
260
|
+
children: ((j = re.find((e) => e.key == b)) == null ? void 0 : j.name) || "待确认"
|
|
261
|
+
}), (b === p.Started || b === p.Success) && /* @__PURE__ */ v(z, {
|
|
262
|
+
style: {
|
|
263
|
+
marginLeft: 14
|
|
264
|
+
},
|
|
265
|
+
size: 14,
|
|
266
|
+
children: [/* @__PURE__ */ v("span", {
|
|
267
|
+
children: [F.successCount || 0, "/", F.allCount || 0]
|
|
268
|
+
}), /* @__PURE__ */ v("span", {
|
|
269
|
+
children: ["已标注数据:", F.successCount || 0, " 张"]
|
|
270
|
+
})]
|
|
271
|
+
}), b === p.Success && /* @__PURE__ */ v("span", {
|
|
272
|
+
children: [",失败:", F.failCount || 0, " 张"]
|
|
273
|
+
})]
|
|
274
|
+
})
|
|
275
|
+
})]
|
|
276
|
+
})
|
|
277
|
+
});
|
|
278
|
+
};
|
|
279
|
+
export {
|
|
280
|
+
ve as default
|
|
281
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c } from "react";
|
|
3
|
+
import { Button as f, Spin as b } from "antd";
|
|
4
|
+
import p from "./PreLabelModal.mjs";
|
|
5
|
+
import { LoadingOutlined as h } from "@ant-design/icons";
|
|
6
|
+
import "./style.less.mjs";
|
|
7
|
+
import { PreLabelTaskStatus as u } from "@glodon-aiot/apis";
|
|
8
|
+
const B = (o) => {
|
|
9
|
+
const {
|
|
10
|
+
datasetId: i,
|
|
11
|
+
versionId: r,
|
|
12
|
+
disabled: l,
|
|
13
|
+
setIsTaskChange: n,
|
|
14
|
+
preLabelTask: t,
|
|
15
|
+
datasetType: d
|
|
16
|
+
} = o, [a, s] = c(!1);
|
|
17
|
+
return /* @__PURE__ */ m("div", {
|
|
18
|
+
className: "batch-btn-panel",
|
|
19
|
+
children: [/* @__PURE__ */ e(f, {
|
|
20
|
+
className: "batch-mark-btn",
|
|
21
|
+
onClick: () => s(!0),
|
|
22
|
+
disabled: l,
|
|
23
|
+
children: "批量预标注"
|
|
24
|
+
}), (t == null ? void 0 : t.state) === u.Started && /* @__PURE__ */ e(b, {
|
|
25
|
+
indicator: /* @__PURE__ */ e(h, {
|
|
26
|
+
style: {
|
|
27
|
+
fontSize: 15,
|
|
28
|
+
marginLeft: 4
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
}), a && /* @__PURE__ */ e(p, {
|
|
32
|
+
datasetId: i,
|
|
33
|
+
versionId: r,
|
|
34
|
+
isVisible: a,
|
|
35
|
+
onClose: () => s(!1),
|
|
36
|
+
setIsTaskChange: n,
|
|
37
|
+
record: t,
|
|
38
|
+
datasetType: d
|
|
39
|
+
})]
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
B as default
|
|
44
|
+
};
|