@glodon-aiot/dataset-annotation 3.24.0-alpha.4 → 3.24.0-alpha.5
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/components/DetectionAnnotation/index.mjs +210 -210
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +33 -33
- package/dist/es/components/OcrAnnotation/index.mjs +170 -170
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +83 -83
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +3 -3
- package/package.json +2 -2
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var i in
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
1
|
+
var ze = Object.defineProperty, Ke = Object.defineProperties;
|
|
2
|
+
var Ae = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var de = Object.getOwnPropertySymbols;
|
|
4
|
+
var Be = Object.prototype.hasOwnProperty, Ee = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ue = (h, l, i) => l in h ? ze(h, l, { enumerable: !0, configurable: !0, writable: !0, value: i }) : h[l] = i, m = (h, l) => {
|
|
6
|
+
for (var i in l || (l = {}))
|
|
7
|
+
Be.call(l, i) && ue(h, i, l[i]);
|
|
8
|
+
if (de)
|
|
9
|
+
for (var i of de(l))
|
|
10
|
+
Ee.call(l, i) && ue(h, i, l[i]);
|
|
11
11
|
return h;
|
|
12
|
-
}, g = (h,
|
|
13
|
-
import { jsx as
|
|
12
|
+
}, g = (h, l) => Ke(h, Ae(l));
|
|
13
|
+
import { jsx as c, jsxs as M } from "react/jsx-runtime";
|
|
14
14
|
import { useState as s, useEffect as x } from "react";
|
|
15
|
-
import { message as K, ConfigProvider as
|
|
16
|
-
import
|
|
15
|
+
import { message as K, ConfigProvider as Ue, Space as y, Select as Fe, Dropdown as $e, Tooltip as Ze, Button as Q, Tabs as je, Row as We, Col as _e, Pagination as He, Modal as Je } from "antd";
|
|
16
|
+
import Qe from "antd/es/locale/zh_CN";
|
|
17
17
|
import "./style.less.mjs";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { UploadZipsStatus as
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import { DEFAULT_FILTER_SWITCH as
|
|
29
|
-
import
|
|
30
|
-
import { DownOutlined as
|
|
31
|
-
import
|
|
32
|
-
const
|
|
18
|
+
import qe from "./OcrModal/index.mjs";
|
|
19
|
+
import Ge from "./MarkKVOCRModal/index.mjs";
|
|
20
|
+
import Xe from "./MarkOCRBoxModal/index.mjs";
|
|
21
|
+
import Ye from "./PreLabelOCR/index.mjs";
|
|
22
|
+
import et from "lodash/merge";
|
|
23
|
+
import { UploadZipsStatus as fe, PreLabelTaskStatus as tt } from "@glodon-aiot/apis";
|
|
24
|
+
import nt from "../../Common/Page/index.mjs";
|
|
25
|
+
import ot from "../Thumbnail/index.mjs";
|
|
26
|
+
import rt from "../DataEmpty/index.mjs";
|
|
27
|
+
import it from "../../DatasetContext/index.mjs";
|
|
28
|
+
import { DEFAULT_FILTER_SWITCH as ct } from "../../constant.mjs";
|
|
29
|
+
import lt from "../PageNav/index.mjs";
|
|
30
|
+
import { DownOutlined as at } from "@ant-design/icons";
|
|
31
|
+
import st from "../DetectionStatus/index.mjs";
|
|
32
|
+
const Vt = (h) => {
|
|
33
33
|
const {
|
|
34
|
-
services:
|
|
34
|
+
services: l,
|
|
35
35
|
datasetId: i,
|
|
36
36
|
versionId: A,
|
|
37
|
-
backTo:
|
|
38
|
-
labelManager:
|
|
37
|
+
backTo: pe,
|
|
38
|
+
labelManager: me = !1,
|
|
39
39
|
datasetManager: D = !1,
|
|
40
|
-
annotation:
|
|
40
|
+
annotation: he,
|
|
41
41
|
header: p = {
|
|
42
42
|
versionSelect: !1
|
|
43
43
|
},
|
|
44
|
-
exampleSrcRoot:
|
|
45
|
-
} = h, [r,
|
|
44
|
+
exampleSrcRoot: ge
|
|
45
|
+
} = h, B = !!(D && D.label), [r, be] = s(), [t, E] = s(), [v, Ce] = s([]), [q, G] = s(!1), [L, V] = s(!1), [T, X] = s(0), [u, P] = s(), [k, b] = s(), [Y, O] = s(), [U, I] = s(-1), [a, S] = s({
|
|
46
46
|
current: 1,
|
|
47
47
|
pageSize: 50
|
|
48
|
-
}), [R,
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
O(void 0), (r == null ? void 0 : r.ocrMarkTmpl) === "StructKVCOCR" ?
|
|
52
|
-
},
|
|
48
|
+
}), [R, ee] = s(0), [te, ne] = s(0), [C, F] = s(""), [oe, $] = s(!1), [re, ie] = s(), [Z, ce] = s(!1), [N, j] = s(null), [ke, le] = s(!1), [Se, xe] = s(!1), [W, Me] = s(""), [_, z] = s("preview"), H = m({}, ct);
|
|
49
|
+
et(H, h.filterSwitch);
|
|
50
|
+
const Te = () => {
|
|
51
|
+
O(void 0), (r == null ? void 0 : r.ocrMarkTmpl) === "StructKVCOCR" ? $(!0) : (z("annotation"), V(!0), F("nocode"));
|
|
52
|
+
}, Ie = (e, n) => {
|
|
53
53
|
S({
|
|
54
54
|
current: e,
|
|
55
55
|
pageSize: n
|
|
56
56
|
});
|
|
57
|
-
},
|
|
57
|
+
}, ye = (e) => {
|
|
58
58
|
if (!u)
|
|
59
59
|
return;
|
|
60
60
|
I(e);
|
|
61
61
|
const n = u[e];
|
|
62
|
-
b(n), z("preview"),
|
|
62
|
+
b(n), z("preview"), V(!0);
|
|
63
63
|
};
|
|
64
64
|
x(() => {
|
|
65
|
-
i && (
|
|
65
|
+
i && (G(!0), Promise.all([
|
|
66
66
|
// 数据集
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
l.cvforceDatahub.getDatasetsId(i).then((e) => {
|
|
68
|
+
be(e);
|
|
69
69
|
}),
|
|
70
70
|
// 版本列表
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
l.cvforceDatahub.getDatasetsIdVersions(i, 1, 1e3).then((e) => {
|
|
72
|
+
Ce(e.recordList), E(A ? e.recordList.find((n) => n.id === A) : e.recordList[0]);
|
|
73
73
|
})
|
|
74
|
-
]).finally(() =>
|
|
74
|
+
]).finally(() => G(!1)));
|
|
75
75
|
}, [i, A]);
|
|
76
|
-
const
|
|
77
|
-
!i || !t ||
|
|
78
|
-
|
|
76
|
+
const De = () => {
|
|
77
|
+
!i || !t || l.cvforceDatahub.getDatasetsIdVersionsVid(i, t.id).then((e) => {
|
|
78
|
+
Me(e.versionAsyncTask.state);
|
|
79
79
|
});
|
|
80
80
|
};
|
|
81
81
|
x(() => {
|
|
82
|
-
|
|
82
|
+
De();
|
|
83
83
|
}, [i, t == null ? void 0 : t.id]), x(() => {
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
const
|
|
87
|
-
!i || !t ||
|
|
84
|
+
W !== fe.Pending && W !== fe.Started || K.warning("文件导入中,请刷新页面再试");
|
|
85
|
+
}, [W]);
|
|
86
|
+
const ae = () => {
|
|
87
|
+
!i || !t || l.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(i, t.id, {
|
|
88
88
|
label: "allcode",
|
|
89
89
|
confirmStatus: 2
|
|
90
90
|
}).then((e) => {
|
|
91
91
|
const n = e.find((d) => d.id === "allcodeid"), o = e.find((d) => d.id === "nocodeid"), f = e.find((d) => d.id === "pendingid");
|
|
92
|
-
|
|
92
|
+
X(n ? n.count : 0), ee(o ? o.count : 0), ne(f ? f.count : 0);
|
|
93
93
|
});
|
|
94
|
-
},
|
|
94
|
+
}, we = () => {
|
|
95
95
|
switch (C) {
|
|
96
96
|
case "nocode":
|
|
97
97
|
case "hascode":
|
|
@@ -101,7 +101,7 @@ const vt = (h) => {
|
|
|
101
101
|
default:
|
|
102
102
|
return 2;
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, ve = () => {
|
|
105
105
|
switch (C) {
|
|
106
106
|
case "nocode":
|
|
107
107
|
return "nocode";
|
|
@@ -112,13 +112,13 @@ const vt = (h) => {
|
|
|
112
112
|
default:
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, w = () => {
|
|
116
116
|
const e = a.current || 1, n = a.pageSize || 50;
|
|
117
|
-
!i || !t || (
|
|
118
|
-
labels:
|
|
117
|
+
!i || !t || (l.cvforceDatahub.getDatasetsIdVersionsVidSamples(i, t.id, {
|
|
118
|
+
labels: ve(),
|
|
119
119
|
pageNo: e,
|
|
120
120
|
pageSize: n,
|
|
121
|
-
confirmStatus:
|
|
121
|
+
confirmStatus: we()
|
|
122
122
|
}).then((o) => {
|
|
123
123
|
const f = o.recordList || [];
|
|
124
124
|
if (!f.length && o.totalResults > 0) {
|
|
@@ -139,16 +139,16 @@ const vt = (h) => {
|
|
|
139
139
|
const d = o.recordList[a.pageSize - 1];
|
|
140
140
|
b(d);
|
|
141
141
|
}
|
|
142
|
-
}),
|
|
142
|
+
}), ae());
|
|
143
143
|
};
|
|
144
|
-
x(
|
|
145
|
-
const
|
|
144
|
+
x(w, [a.current, a.pageSize, C, re, t == null ? void 0 : t.id, i]);
|
|
145
|
+
const Le = () => {
|
|
146
146
|
if (!u)
|
|
147
147
|
return;
|
|
148
|
-
const e =
|
|
148
|
+
const e = U + 1;
|
|
149
149
|
if (e >= u.length) {
|
|
150
150
|
let n = T;
|
|
151
|
-
C === "hascode" && (n = T - R), C === "nocode" && (n = R), C === "pending" && (n =
|
|
151
|
+
C === "hascode" && (n = T - R), C === "nocode" && (n = R), C === "pending" && (n = te), (a.current - 1) * a.pageSize + e >= n ? K.error("已经是最后一个了") : S({
|
|
152
152
|
current: a.current + 1,
|
|
153
153
|
pageSize: a.pageSize,
|
|
154
154
|
type: "next"
|
|
@@ -158,10 +158,10 @@ const vt = (h) => {
|
|
|
158
158
|
const n = u[e];
|
|
159
159
|
b(n);
|
|
160
160
|
}
|
|
161
|
-
},
|
|
161
|
+
}, Ve = () => {
|
|
162
162
|
if (!u)
|
|
163
163
|
return;
|
|
164
|
-
const e =
|
|
164
|
+
const e = U - 1;
|
|
165
165
|
if (e < 0)
|
|
166
166
|
(a.current - 1) * a.pageSize + e < 0 ? K.error("已经是第一个了") : S({
|
|
167
167
|
current: a.current - 1,
|
|
@@ -176,26 +176,26 @@ const vt = (h) => {
|
|
|
176
176
|
};
|
|
177
177
|
x(() => {
|
|
178
178
|
if (!i) {
|
|
179
|
-
N && (clearTimeout(N),
|
|
179
|
+
N && (clearTimeout(N), j(null)), ie(void 0);
|
|
180
180
|
return;
|
|
181
181
|
}
|
|
182
|
-
|
|
182
|
+
J();
|
|
183
183
|
}, [t == null ? void 0 : t.id]), x(() => {
|
|
184
|
-
|
|
185
|
-
}, [
|
|
186
|
-
const
|
|
187
|
-
!i || !t ||
|
|
184
|
+
J();
|
|
185
|
+
}, [Se]);
|
|
186
|
+
const J = () => {
|
|
187
|
+
!i || !t || l.cvforceDatahub.getPreLabelTask(i, t.id).then((e) => {
|
|
188
188
|
const n = e[0];
|
|
189
|
-
if (
|
|
190
|
-
|
|
189
|
+
if (ie(n), N && (clearTimeout(N), j(null)), !(n != null && n.state) || n.state !== tt.Started) {
|
|
190
|
+
ce(!1);
|
|
191
191
|
return;
|
|
192
192
|
} else
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
193
|
+
ce(!0);
|
|
194
|
+
j(setTimeout(() => {
|
|
195
|
+
J();
|
|
196
196
|
}, 1e4));
|
|
197
197
|
});
|
|
198
|
-
},
|
|
198
|
+
}, Pe = [{
|
|
199
199
|
key: "",
|
|
200
200
|
label: `全部(${T})`,
|
|
201
201
|
children: null
|
|
@@ -205,7 +205,7 @@ const vt = (h) => {
|
|
|
205
205
|
children: null
|
|
206
206
|
}, {
|
|
207
207
|
key: "pending",
|
|
208
|
-
label: `待确认(${
|
|
208
|
+
label: `待确认(${te})`,
|
|
209
209
|
children: null
|
|
210
210
|
}, {
|
|
211
211
|
key: "hascode",
|
|
@@ -213,96 +213,96 @@ const vt = (h) => {
|
|
|
213
213
|
children: null
|
|
214
214
|
}];
|
|
215
215
|
x(() => {
|
|
216
|
-
|
|
217
|
-
}, [
|
|
216
|
+
L || ((r == null ? void 0 : r.ocrMarkTmpl) === "StructKVCOCR" ? b(void 0) : (_ === "annotation" && w(), b(void 0), I(-1), O(void 0), z("preview")));
|
|
217
|
+
}, [L, _]), x(() => {
|
|
218
218
|
r && (r.markType !== "ocr" || (r == null ? void 0 : r.ocrMarkTmpl) !== "DetectionOCR") && console.error(`当前数据集不是DetectionOCR(ocr检测)类型,请检查数据集类型。
|
|
219
219
|
请检查markType是否为ocr并且ocrMarkTmpl为DetectionOCR。`);
|
|
220
220
|
}, [r]);
|
|
221
|
-
const
|
|
222
|
-
if (console.log("一键确认",
|
|
221
|
+
const Oe = (r == null ? void 0 : r.ocrMarkTmpl) === "StructKVCOCR" ? Ge : Xe, Re = () => {
|
|
222
|
+
if (console.log("一键确认", l, t), !(l != null && l.cvforceDatahub) || !(t != null && t.id))
|
|
223
223
|
return Promise.resolve(!1);
|
|
224
|
-
|
|
224
|
+
Je.confirm({
|
|
225
225
|
title: "一键保存所有标注?",
|
|
226
226
|
content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
|
|
227
227
|
onOk: () => {
|
|
228
|
-
|
|
228
|
+
l.cvforceDatahub.getAllConfirmSamples(i, t.id).then((e) => {
|
|
229
229
|
K.success("保存成功"), S(g(m({}, a), {
|
|
230
230
|
current: 1
|
|
231
|
-
})),
|
|
231
|
+
})), ae(), w();
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
|
-
};
|
|
236
|
-
return /* @__PURE__ */
|
|
237
|
-
locale:
|
|
238
|
-
children: /* @__PURE__ */
|
|
235
|
+
}, se = !k && !!(D && D.preLabel) && !!(t != null && t.id), Ne = B || se;
|
|
236
|
+
return /* @__PURE__ */ c(Ue, {
|
|
237
|
+
locale: Qe,
|
|
238
|
+
children: /* @__PURE__ */ c(it.Provider, {
|
|
239
239
|
value: {
|
|
240
240
|
datasetId: i,
|
|
241
241
|
versionId: (t == null ? void 0 : t.id) || "",
|
|
242
242
|
no: (t == null ? void 0 : t.no) || "",
|
|
243
|
-
loading:
|
|
243
|
+
loading: q,
|
|
244
244
|
version: t,
|
|
245
|
-
versions:
|
|
245
|
+
versions: v,
|
|
246
246
|
samples: u,
|
|
247
247
|
pagination: a,
|
|
248
|
-
services:
|
|
248
|
+
services: l,
|
|
249
249
|
featuresConfig: {
|
|
250
|
-
labelManager:
|
|
250
|
+
labelManager: me,
|
|
251
251
|
datasetManager: D,
|
|
252
|
-
annotation:
|
|
253
|
-
filterSwitch:
|
|
252
|
+
annotation: he,
|
|
253
|
+
filterSwitch: H,
|
|
254
254
|
header: p,
|
|
255
|
-
exampleSrcRoot:
|
|
255
|
+
exampleSrcRoot: ge
|
|
256
256
|
}
|
|
257
257
|
},
|
|
258
258
|
children: r ? r.markType === "ocr" ? /* @__PURE__ */ M("div", {
|
|
259
259
|
className: "ocr-version-detail",
|
|
260
|
-
children: [/* @__PURE__ */ M(
|
|
260
|
+
children: [/* @__PURE__ */ M(nt, {
|
|
261
261
|
className: "product-details-page",
|
|
262
|
-
header: p === !1 ? void 0 : /* @__PURE__ */
|
|
263
|
-
backTo:
|
|
262
|
+
header: p === !1 ? void 0 : /* @__PURE__ */ c(lt, {
|
|
263
|
+
backTo: pe,
|
|
264
264
|
onBackClick: p != null && p.onBackClick ? () => {
|
|
265
265
|
p.onBackClick && p.onBackClick();
|
|
266
266
|
} : void 0,
|
|
267
|
-
left: !
|
|
268
|
-
children: [/* @__PURE__ */
|
|
267
|
+
left: !q && /* @__PURE__ */ M(y, {
|
|
268
|
+
children: [/* @__PURE__ */ c("span", {
|
|
269
269
|
style: {
|
|
270
270
|
fontWeight: "bold"
|
|
271
271
|
},
|
|
272
272
|
children: r == null ? void 0 : r.name
|
|
273
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ c(Fe, {
|
|
274
274
|
disabled: (p == null ? void 0 : p.versionSelect) === !1,
|
|
275
275
|
value: t == null ? void 0 : t.id,
|
|
276
276
|
style: {
|
|
277
277
|
width: 70
|
|
278
278
|
},
|
|
279
|
-
options:
|
|
279
|
+
options: v.map((e) => ({
|
|
280
280
|
label: e.no,
|
|
281
281
|
value: e.id
|
|
282
282
|
})),
|
|
283
283
|
onChange: (e) => {
|
|
284
|
-
const n =
|
|
284
|
+
const n = v.find((f) => f.id === e);
|
|
285
285
|
if (!r || !n)
|
|
286
286
|
return;
|
|
287
|
-
const o =
|
|
288
|
-
|
|
287
|
+
const o = v.find((f) => f.id === n.id);
|
|
288
|
+
E(o), p != null && p.onVersionChange && p.onVersionChange(o);
|
|
289
289
|
}
|
|
290
290
|
})]
|
|
291
291
|
}),
|
|
292
|
-
right: /* @__PURE__ */
|
|
293
|
-
children: /* @__PURE__ */
|
|
292
|
+
right: /* @__PURE__ */ c(y, {
|
|
293
|
+
children: Ne && /* @__PURE__ */ c($e, {
|
|
294
294
|
menu: {
|
|
295
|
-
items: [{
|
|
295
|
+
items: [...B ? [{
|
|
296
296
|
key: "manual",
|
|
297
|
-
label: /* @__PURE__ */
|
|
298
|
-
children:
|
|
297
|
+
label: /* @__PURE__ */ c(y, {
|
|
298
|
+
children: /* @__PURE__ */ c(Ze, {
|
|
299
299
|
title: "预标注进行中,请任务完成后再试",
|
|
300
|
-
open:
|
|
301
|
-
children: /* @__PURE__ */
|
|
300
|
+
open: ke,
|
|
301
|
+
children: /* @__PURE__ */ c(Q, {
|
|
302
302
|
type: "text",
|
|
303
|
-
disabled: !T || (r == null ? void 0 : r.ocrMarkTmpl) !== "StructKVCOCR" && (r == null ? void 0 : r.ocrMarkTmpl) !== "DetectionOCR" ||
|
|
304
|
-
onClick:
|
|
305
|
-
onMouseEnter: () =>
|
|
303
|
+
disabled: !T || (r == null ? void 0 : r.ocrMarkTmpl) !== "StructKVCOCR" && (r == null ? void 0 : r.ocrMarkTmpl) !== "DetectionOCR" || Z,
|
|
304
|
+
onClick: Te,
|
|
305
|
+
onMouseEnter: () => Z && le(!0),
|
|
306
306
|
onMouseLeave: () => le(!1),
|
|
307
307
|
style: {
|
|
308
308
|
marginRight: "10px"
|
|
@@ -311,112 +311,112 @@ const vt = (h) => {
|
|
|
311
311
|
})
|
|
312
312
|
})
|
|
313
313
|
})
|
|
314
|
-
}
|
|
314
|
+
}] : [], se ? {
|
|
315
315
|
key: "auto",
|
|
316
|
-
label: /* @__PURE__ */
|
|
316
|
+
label: /* @__PURE__ */ c(Ye, {
|
|
317
317
|
buttonType: "text",
|
|
318
318
|
datasetId: i,
|
|
319
|
-
versionId: t.id,
|
|
319
|
+
versionId: (t == null ? void 0 : t.id) || "",
|
|
320
320
|
disabled: !T || (r == null ? void 0 : r.ocrMarkTmpl) !== "DetectionOCR",
|
|
321
|
-
setIsTaskChange:
|
|
322
|
-
preLabelTask:
|
|
321
|
+
setIsTaskChange: xe,
|
|
322
|
+
preLabelTask: re,
|
|
323
323
|
datasetType: "ocr"
|
|
324
324
|
})
|
|
325
325
|
} : null]
|
|
326
326
|
},
|
|
327
327
|
placement: "bottom",
|
|
328
|
-
children: /* @__PURE__ */ M(
|
|
328
|
+
children: /* @__PURE__ */ M(Q, {
|
|
329
329
|
type: "primary",
|
|
330
|
-
children: ["开始标注", /* @__PURE__ */
|
|
330
|
+
children: ["开始标注", /* @__PURE__ */ c(at, {})]
|
|
331
331
|
})
|
|
332
332
|
})
|
|
333
333
|
})
|
|
334
334
|
}),
|
|
335
335
|
children: [/* @__PURE__ */ M("div", {
|
|
336
336
|
className: "ocr-header",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
338
|
-
children:
|
|
337
|
+
children: [/* @__PURE__ */ c(y, {
|
|
338
|
+
children: H.tabs && /* @__PURE__ */ c(je, {
|
|
339
339
|
className: "header-tab",
|
|
340
340
|
activeKey: C,
|
|
341
341
|
onChange: (e) => {
|
|
342
342
|
S(g(m({}, a), {
|
|
343
343
|
current: 1,
|
|
344
344
|
total: 0
|
|
345
|
-
})),
|
|
345
|
+
})), F(e);
|
|
346
346
|
},
|
|
347
|
-
items:
|
|
347
|
+
items: Pe
|
|
348
348
|
})
|
|
349
|
-
}), /* @__PURE__ */
|
|
350
|
-
children: C === "pending" && /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ c(y, {
|
|
350
|
+
children: C === "pending" && B && /* @__PURE__ */ c(Q, {
|
|
351
351
|
type: "primary",
|
|
352
352
|
className: "pending-confirm-button",
|
|
353
|
-
onClick:
|
|
353
|
+
onClick: Re,
|
|
354
354
|
children: "一键确认"
|
|
355
355
|
})
|
|
356
356
|
})]
|
|
357
|
-
}), /* @__PURE__ */
|
|
357
|
+
}), /* @__PURE__ */ c("div", {
|
|
358
358
|
className: "d-row",
|
|
359
359
|
children: u != null && u.length ? /* @__PURE__ */ M(y, {
|
|
360
360
|
direction: "vertical",
|
|
361
361
|
className: "d-right",
|
|
362
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ c(We, {
|
|
363
363
|
gutter: [16, 16],
|
|
364
364
|
wrap: !0,
|
|
365
365
|
className: "d-right-row",
|
|
366
|
-
children: u == null ? void 0 : u.map((e, n) => /* @__PURE__ */
|
|
366
|
+
children: u == null ? void 0 : u.map((e, n) => /* @__PURE__ */ c(_e, {
|
|
367
367
|
className: "d-right-col",
|
|
368
|
-
onClick: () =>
|
|
368
|
+
onClick: () => ye(n),
|
|
369
369
|
children: /* @__PURE__ */ M("div", {
|
|
370
370
|
className: "right-col-wrapper",
|
|
371
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ c("div", {
|
|
372
372
|
className: "detection-status-wrapper",
|
|
373
|
-
children: /* @__PURE__ */
|
|
373
|
+
children: /* @__PURE__ */ c(st, {
|
|
374
374
|
sample: e
|
|
375
375
|
})
|
|
376
|
-
}), /* @__PURE__ */
|
|
376
|
+
}), /* @__PURE__ */ c("div", {
|
|
377
377
|
className: "right-col-img",
|
|
378
|
-
children: /* @__PURE__ */
|
|
378
|
+
children: /* @__PURE__ */ c(ot, {
|
|
379
379
|
fileKey: e.fileKey,
|
|
380
380
|
width: 124,
|
|
381
381
|
thumbnailUrl: e.thumbnailUrl
|
|
382
382
|
})
|
|
383
|
-
}), /* @__PURE__ */
|
|
383
|
+
}), /* @__PURE__ */ c("div", {
|
|
384
384
|
className: "right-col-text",
|
|
385
|
-
children: /* @__PURE__ */
|
|
385
|
+
children: /* @__PURE__ */ c("div", {
|
|
386
386
|
children: n + 1
|
|
387
387
|
})
|
|
388
388
|
})]
|
|
389
389
|
})
|
|
390
390
|
}, e.id))
|
|
391
|
-
}), /* @__PURE__ */
|
|
392
|
-
onChange:
|
|
391
|
+
}), /* @__PURE__ */ c(He, m({
|
|
392
|
+
onChange: Ie,
|
|
393
393
|
className: "d-right-pageination",
|
|
394
394
|
showQuickJumper: !0,
|
|
395
395
|
showSizeChanger: !0
|
|
396
396
|
}, a))]
|
|
397
|
-
}) : /* @__PURE__ */
|
|
397
|
+
}) : /* @__PURE__ */ c(rt, {})
|
|
398
398
|
})]
|
|
399
|
-
}),
|
|
400
|
-
mode:
|
|
401
|
-
visible:
|
|
402
|
-
onClose: () =>
|
|
399
|
+
}), L && /* @__PURE__ */ c(qe, {
|
|
400
|
+
mode: _,
|
|
401
|
+
visible: L,
|
|
402
|
+
onClose: () => V(!1),
|
|
403
403
|
record: k,
|
|
404
|
-
onNextClick: () =>
|
|
405
|
-
onPrevClick: () =>
|
|
404
|
+
onNextClick: () => Le(),
|
|
405
|
+
onPrevClick: () => Ve(),
|
|
406
406
|
ocrMarkTmpl: r == null ? void 0 : r.ocrMarkTmpl,
|
|
407
407
|
datasetId: i,
|
|
408
408
|
versionId: t == null ? void 0 : t.id,
|
|
409
409
|
handleMarkClick: (e) => {
|
|
410
|
-
O(e), (r == null ? void 0 : r.ocrMarkTmpl) === "StructKVCOCR" ? (
|
|
410
|
+
O(e), (r == null ? void 0 : r.ocrMarkTmpl) === "StructKVCOCR" ? (V(!1), $(!0)) : z("annotation");
|
|
411
411
|
},
|
|
412
|
-
updateSampleList:
|
|
413
|
-
isPreLabel:
|
|
414
|
-
selectSampleId:
|
|
412
|
+
updateSampleList: w,
|
|
413
|
+
isPreLabel: Z,
|
|
414
|
+
selectSampleId: Y,
|
|
415
415
|
onSave: (e) => {
|
|
416
416
|
var n;
|
|
417
417
|
if (!i || !t)
|
|
418
418
|
throw "datasetId or version is not exist.";
|
|
419
|
-
return
|
|
419
|
+
return l.cvforceDatahub.updateSamples(i, t.id, [g(m({}, e), {
|
|
420
420
|
labels: (n = e.labels) == null ? void 0 : n.map((o) => g(m({}, o), {
|
|
421
421
|
box: o.box.length > 4 ? o.box.splice(0, 4) : o.box
|
|
422
422
|
}))
|
|
@@ -435,7 +435,7 @@ const vt = (h) => {
|
|
|
435
435
|
var n;
|
|
436
436
|
if (!i || !t)
|
|
437
437
|
throw "datasetId or version is not exist.";
|
|
438
|
-
return
|
|
438
|
+
return l.cvforceDatahub.updateSamples(i, t.id, [g(m({}, e), {
|
|
439
439
|
labels: (n = e.labels) == null ? void 0 : n.map((o) => g(m({}, o), {
|
|
440
440
|
box: o.box.length > 4 ? o.box.splice(0, 4) : o.box
|
|
441
441
|
}))
|
|
@@ -452,33 +452,33 @@ const vt = (h) => {
|
|
|
452
452
|
},
|
|
453
453
|
filterMode: C,
|
|
454
454
|
onFilterModeChange: (e) => {
|
|
455
|
-
O(void 0),
|
|
455
|
+
O(void 0), F(e);
|
|
456
456
|
},
|
|
457
457
|
onPaginationChange: (e) => {
|
|
458
458
|
S(e);
|
|
459
459
|
},
|
|
460
460
|
samples: u,
|
|
461
461
|
pagination: a,
|
|
462
|
-
currentIndex:
|
|
463
|
-
}),
|
|
464
|
-
visible:
|
|
465
|
-
selectSampleId:
|
|
462
|
+
currentIndex: U
|
|
463
|
+
}), oe && (t == null ? void 0 : t.id) && /* @__PURE__ */ c(Oe, {
|
|
464
|
+
visible: oe,
|
|
465
|
+
selectSampleId: Y,
|
|
466
466
|
ocrMarkTmpl: r == null ? void 0 : r.ocrMarkTmpl,
|
|
467
467
|
datasetId: i,
|
|
468
468
|
versionId: t.id,
|
|
469
|
-
onClose: () =>
|
|
469
|
+
onClose: () => $(!1),
|
|
470
470
|
onSave: (e) => {
|
|
471
471
|
var n;
|
|
472
472
|
if (!i || !t)
|
|
473
473
|
throw "datasetId or version is not exist.";
|
|
474
|
-
return
|
|
474
|
+
return l.cvforceDatahub.updateSamples(i, t.id, [g(m({}, e), {
|
|
475
475
|
labels: (n = e.labels) == null ? void 0 : n.map((o) => g(m({}, o), {
|
|
476
476
|
box: o.box.length > 4 ? o.box.splice(0, 4) : o.box
|
|
477
477
|
}))
|
|
478
|
-
})]).then(() => (
|
|
478
|
+
})]).then(() => (w(), !0));
|
|
479
479
|
}
|
|
480
480
|
})]
|
|
481
|
-
}) : /* @__PURE__ */
|
|
481
|
+
}) : /* @__PURE__ */ c("div", {
|
|
482
482
|
style: {
|
|
483
483
|
color: "red",
|
|
484
484
|
textAlign: "center"
|
|
@@ -489,5 +489,5 @@ const vt = (h) => {
|
|
|
489
489
|
});
|
|
490
490
|
};
|
|
491
491
|
export {
|
|
492
|
-
|
|
492
|
+
Vt as default
|
|
493
493
|
};
|