@glodon-aiot/dataset-annotation 3.24.0-alpha.4 → 3.24.0-alpha.6
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/MarkVLMBoxModal/QADetail/QAGenerationConfig.mjs +169 -149
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +83 -83
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +4 -4
- package/package.json +2 -2
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var Xt = Object.defineProperty, Jt = Object.defineProperties;
|
|
2
|
+
var Qt = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var st = Object.getOwnPropertySymbols;
|
|
4
|
+
var Yt = Object.prototype.hasOwnProperty, en = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ct = (L, g, a) => g in L ? Xt(L, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : L[g] = a, b = (L, g) => {
|
|
6
6
|
for (var a in g || (g = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var a of
|
|
10
|
-
|
|
7
|
+
Yt.call(g, a) && ct(L, a, g[a]);
|
|
8
|
+
if (st)
|
|
9
|
+
for (var a of st(g))
|
|
10
|
+
en.call(g, a) && ct(L, a, g[a]);
|
|
11
11
|
return L;
|
|
12
|
-
}, S = (L, g) =>
|
|
13
|
-
var Fe = (L, g, a) => new Promise((
|
|
12
|
+
}, S = (L, g) => Jt(L, Qt(g));
|
|
13
|
+
var Fe = (L, g, a) => new Promise((Q, ve) => {
|
|
14
14
|
var ye = (x) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
17
|
-
} catch (
|
|
18
|
-
ve(
|
|
16
|
+
oe(a.next(x));
|
|
17
|
+
} catch (le) {
|
|
18
|
+
ve(le);
|
|
19
19
|
}
|
|
20
20
|
}, R = (x) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
ve(
|
|
22
|
+
oe(a.throw(x));
|
|
23
|
+
} catch (le) {
|
|
24
|
+
ve(le);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, oe = (x) => x.done ? Q(x.value) : Promise.resolve(x.value).then(ye, R);
|
|
27
|
+
oe((a = a.apply(L, g)).next());
|
|
28
28
|
});
|
|
29
|
-
import { jsx as c, jsxs as m, Fragment as
|
|
30
|
-
import { useRef as j, useState as p, useLayoutEffect as
|
|
31
|
-
import { message as D, ConfigProvider as
|
|
32
|
-
import
|
|
33
|
-
import { UploadZipsStatus as
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
29
|
+
import { jsx as c, jsxs as m, Fragment as at } from "react/jsx-runtime";
|
|
30
|
+
import { useRef as j, useState as p, useLayoutEffect as tn, useEffect as I, useCallback as nn } from "react";
|
|
31
|
+
import { message as D, ConfigProvider as rn, Space as be, Select as on, Button as re, Dropdown as dt, Tabs as ln, Checkbox as ft, Col as sn, Tooltip as cn, Empty as an, Spin as dn, Modal as Le } from "antd";
|
|
32
|
+
import fn from "rc-virtual-list";
|
|
33
|
+
import { UploadZipsStatus as ie, PreLabelTaskStatus as hn } from "@glodon-aiot/apis";
|
|
34
|
+
import un from "antd/es/locale/zh_CN";
|
|
35
|
+
import gn from "../../DatasetContext/index.mjs";
|
|
36
|
+
import pn from "./icon_item_empty.svg.mjs";
|
|
37
37
|
import "./style.less.mjs";
|
|
38
|
-
import { tagColors as
|
|
39
|
-
import
|
|
40
|
-
import { useKeyPress as
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import { DownOutlined as
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import { Prompt as
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import { DEFAULT_FILTER_SWITCH as
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
var
|
|
57
|
-
const
|
|
38
|
+
import { tagColors as ht } from "../../utils/index.mjs";
|
|
39
|
+
import mn from "./components/Labels/index.mjs";
|
|
40
|
+
import { useKeyPress as bn } from "ahooks";
|
|
41
|
+
import ut from "./components/DisabledTooltip/index.mjs";
|
|
42
|
+
import vn from "./PreSamplesPage/index.mjs";
|
|
43
|
+
import { DownOutlined as gt, SearchOutlined as yn } from "@ant-design/icons";
|
|
44
|
+
import Sn from "../../Common/Page/index.mjs";
|
|
45
|
+
import Cn from "../PicZipImportModal/index.mjs";
|
|
46
|
+
import In from "../PageNav/index.mjs";
|
|
47
|
+
import xn from "../Thumbnail/index.mjs";
|
|
48
|
+
import kn from "../CompositionInput/index.mjs";
|
|
49
|
+
import { Prompt as Ln } from "../hooks/Prompt.mjs";
|
|
50
|
+
import wn from "../PreLabelOCR/index.mjs";
|
|
51
|
+
import Dn from "lodash/merge";
|
|
52
|
+
import { DEFAULT_FILTER_SWITCH as Nn } from "../../constant.mjs";
|
|
53
|
+
import Rn from "../DetectionStatus/index.mjs";
|
|
54
|
+
import Tn from "./components/ImageModal/index.mjs";
|
|
55
|
+
import Pn from "./hooks/useSamplePreload.mjs";
|
|
56
|
+
var Vn = /* @__PURE__ */ ((L) => (L.Next = "NEXT", L.Prev = "PREV", L.Confirm = "CONFIRM", L.Save = "Save", L))(Vn || {});
|
|
57
|
+
const ar = (L) => {
|
|
58
58
|
const {
|
|
59
59
|
services: g,
|
|
60
60
|
datasetId: a,
|
|
61
|
-
versionId:
|
|
61
|
+
versionId: Q,
|
|
62
62
|
backTo: ve,
|
|
63
63
|
labelManager: ye = !1,
|
|
64
64
|
datasetManager: R = !1,
|
|
65
|
-
annotation:
|
|
65
|
+
annotation: oe,
|
|
66
66
|
header: x = {
|
|
67
67
|
versionSelect: !1
|
|
68
68
|
},
|
|
69
|
-
exampleSrcRoot:
|
|
70
|
-
} = L,
|
|
71
|
-
|
|
72
|
-
const Se = !!(R && R.delete),
|
|
69
|
+
exampleSrcRoot: le
|
|
70
|
+
} = L, se = b({}, Nn);
|
|
71
|
+
Dn(se, L.filterSwitch);
|
|
72
|
+
const Se = !!(R && R.delete), G = !!(R && R.label), we = Se || G, ce = j(null), De = j(null), [pt, mt] = p(0), [k, Oe] = p(), [o, ae] = p(), [Ce, bt] = p([]), [He, Ue] = p(!1), [de, qe] = p(0), [fe, Ke] = p(0), [h, Ne] = p(""), [Y, We] = p(0), [vt, yt] = p(), [$e, Re] = p(!1), [je, St] = p(!1), [Ge, Ct] = p(!0), [It, xt] = p(!1), [O, Ze] = p([]), [v, U] = p([]), [he, Z] = p(!1), [ee, ue] = p(!1), [M, V] = p(-1), [u, N] = p(), [kt, _e] = p(), [f, z] = p(), [l, T] = p({
|
|
73
73
|
current: 0,
|
|
74
74
|
pageSize: 100
|
|
75
|
-
}), [W, Te] = p([]), [
|
|
76
|
-
|
|
75
|
+
}), [W, Te] = p([]), [_, Lt] = p(""), [wt, Dt] = p(!1), [Xe, Je] = p(), [Ie, Pe] = p(null), [H, Qe] = p(!1), [Nt, Rt] = p(!1), [zn, Tt] = p(0), [An, Ve] = p(""), [ge, Pt] = p(""), pe = j({}), ze = j(!1), me = j(0), Ye = j(0), $ = j(0), [P, Ae] = p(/* @__PURE__ */ new Set()), [Vt, xe] = p(!1), et = j(-1);
|
|
76
|
+
tn(() => {
|
|
77
77
|
const e = ce.current;
|
|
78
78
|
if (!e)
|
|
79
79
|
return;
|
|
@@ -81,7 +81,7 @@ const sr = (L) => {
|
|
|
81
81
|
const n = () => {
|
|
82
82
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
83
83
|
const s = e.clientHeight, d = Math.max(1, Math.round(s));
|
|
84
|
-
d !== et.current && (et.current = d,
|
|
84
|
+
d !== et.current && (et.current = d, mt(d));
|
|
85
85
|
});
|
|
86
86
|
};
|
|
87
87
|
n();
|
|
@@ -92,17 +92,17 @@ const sr = (L) => {
|
|
|
92
92
|
cancelAnimationFrame(t), r == null || r.disconnect(), i == null || i.removeEventListener("resize", n), window.removeEventListener("resize", n);
|
|
93
93
|
};
|
|
94
94
|
}, [k]);
|
|
95
|
-
const
|
|
96
|
-
N(void 0), z(void 0), V(-1),
|
|
95
|
+
const te = () => {
|
|
96
|
+
N(void 0), z(void 0), V(-1), Z(!1), q(), setTimeout(() => {
|
|
97
97
|
T((e) => S(b({}, e), {
|
|
98
98
|
current: 1,
|
|
99
99
|
type: void 0
|
|
100
100
|
}));
|
|
101
101
|
}, 10);
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
bn("Esc", te), I(() => {
|
|
104
104
|
a && g.cvforceDatahub.getS3Iam(a).then((e) => {
|
|
105
|
-
|
|
105
|
+
yt(e);
|
|
106
106
|
});
|
|
107
107
|
}, [a]), I(() => {
|
|
108
108
|
w();
|
|
@@ -114,22 +114,22 @@ const sr = (L) => {
|
|
|
114
114
|
}),
|
|
115
115
|
// 版本列表
|
|
116
116
|
g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
|
|
117
|
-
|
|
117
|
+
bt(e.recordList), ae(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
|
|
118
118
|
})
|
|
119
119
|
]).finally(() => Ue(!1)));
|
|
120
|
-
}, [a,
|
|
120
|
+
}, [a, Q]);
|
|
121
121
|
const tt = () => {
|
|
122
122
|
!a || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(a, o.id).then((e) => {
|
|
123
|
-
ae(e),
|
|
123
|
+
ae(e), Lt(e.versionAsyncTask.state);
|
|
124
124
|
});
|
|
125
125
|
};
|
|
126
126
|
I(() => {
|
|
127
|
-
|
|
128
|
-
}, [
|
|
127
|
+
_ !== ie.Pending && _ !== ie.Started || D.warning("文件导入中,请刷新页面再试");
|
|
128
|
+
}, [_]), I(() => {
|
|
129
129
|
ae(void 0), T(S(b({}, l), {
|
|
130
130
|
current: 1
|
|
131
131
|
})), U([]), tt();
|
|
132
|
-
}, [a,
|
|
132
|
+
}, [a, Q]), I(() => {
|
|
133
133
|
a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
|
|
134
134
|
Oe(e);
|
|
135
135
|
});
|
|
@@ -166,7 +166,7 @@ const sr = (L) => {
|
|
|
166
166
|
current: 1,
|
|
167
167
|
total: void 0
|
|
168
168
|
})), t.then((n) => {
|
|
169
|
-
if (n && !(!u && !
|
|
169
|
+
if (n && !(!u && !ee))
|
|
170
170
|
if (Array.isArray(n) && n.length) {
|
|
171
171
|
const r = pe.current[h], i = r == null ? void 0 : r.index, s = i !== void 0 && i >= 0 && i < n.length ? i : 0;
|
|
172
172
|
V(s), N(n[s]), z(void 0);
|
|
@@ -181,14 +181,14 @@ const sr = (L) => {
|
|
|
181
181
|
}, [h]), I(() => {
|
|
182
182
|
var t;
|
|
183
183
|
let e;
|
|
184
|
-
if (!
|
|
184
|
+
if (!ee) {
|
|
185
185
|
const n = u !== void 0, r = u == null ? void 0 : u.id, i = M;
|
|
186
|
-
N(void 0), z(void 0),
|
|
187
|
-
var F,
|
|
186
|
+
N(void 0), z(void 0), Z(!1), V(-1), _e(void 0), q(), n && ((t = De.current) == null || t.fetchLabels()), w(), r !== void 0 && (e = requestAnimationFrame(() => {
|
|
187
|
+
var F, J;
|
|
188
188
|
const s = (F = ce.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
|
|
189
189
|
if (!s)
|
|
190
190
|
return;
|
|
191
|
-
const d = Array.from(s.querySelectorAll("[data-sample-id]")), y = (
|
|
191
|
+
const d = Array.from(s.querySelectorAll("[data-sample-id]")), y = (J = d.find((B) => B.dataset.sampleId === String(r))) != null ? J : i >= 0 ? d[i] : void 0;
|
|
192
192
|
if (!y)
|
|
193
193
|
return;
|
|
194
194
|
const C = s.getBoundingClientRect(), E = y.getBoundingClientRect(), K = s.scrollTop + E.top - C.top - Math.max(0, (s.clientHeight - E.height) / 2);
|
|
@@ -200,17 +200,17 @@ const sr = (L) => {
|
|
|
200
200
|
return () => {
|
|
201
201
|
e !== void 0 && cancelAnimationFrame(e);
|
|
202
202
|
};
|
|
203
|
-
}, [
|
|
204
|
-
const
|
|
203
|
+
}, [ee]);
|
|
204
|
+
const zt = nn((e, t) => {
|
|
205
205
|
_e(e ? void 0 : t);
|
|
206
206
|
}, []);
|
|
207
|
-
|
|
207
|
+
Pn({
|
|
208
208
|
samples: v,
|
|
209
209
|
currentIndex: M,
|
|
210
|
-
active:
|
|
211
|
-
loadedImageUrl:
|
|
210
|
+
active: ee,
|
|
211
|
+
loadedImageUrl: kt
|
|
212
212
|
}), I(() => {
|
|
213
|
-
|
|
213
|
+
xt(!Ge && je);
|
|
214
214
|
}, [Ge, je]), I(() => {
|
|
215
215
|
if (!a) {
|
|
216
216
|
Ie && (clearTimeout(Ie), Pe(null)), Je(void 0);
|
|
@@ -219,7 +219,7 @@ const sr = (L) => {
|
|
|
219
219
|
Be();
|
|
220
220
|
}, [a, o == null ? void 0 : o.id]), I(() => {
|
|
221
221
|
Be();
|
|
222
|
-
}, [
|
|
222
|
+
}, [wt]), I(() => {
|
|
223
223
|
Ee();
|
|
224
224
|
}, [H, a, o]), I(() => {
|
|
225
225
|
me.current++, $.current++, A(S(b({}, l), {
|
|
@@ -241,12 +241,12 @@ const sr = (L) => {
|
|
|
241
241
|
pageSize: 1e3,
|
|
242
242
|
confirmStatus: 1
|
|
243
243
|
}).then((e) => {
|
|
244
|
-
|
|
244
|
+
Tt(e.recordList.length);
|
|
245
245
|
});
|
|
246
246
|
}, Be = () => {
|
|
247
247
|
!a || !o || g.cvforceDatahub.getPreLabelTask(a, o.id).then((e) => {
|
|
248
248
|
const t = e[0];
|
|
249
|
-
if (Je(t), Ie && (clearTimeout(Ie), Pe(null)), !(t != null && t.state) || t.state !==
|
|
249
|
+
if (Je(t), Ie && (clearTimeout(Ie), Pe(null)), !(t != null && t.state) || t.state !== hn.Started) {
|
|
250
250
|
Qe(!1), w();
|
|
251
251
|
return;
|
|
252
252
|
} else
|
|
@@ -285,7 +285,7 @@ const sr = (L) => {
|
|
|
285
285
|
return 2;
|
|
286
286
|
}
|
|
287
287
|
};
|
|
288
|
-
return n === 1 &&
|
|
288
|
+
return n === 1 && Ut(), T(S(b({}, l), {
|
|
289
289
|
current: n,
|
|
290
290
|
pageSize: r
|
|
291
291
|
})), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
|
|
@@ -319,13 +319,13 @@ const sr = (L) => {
|
|
|
319
319
|
T(h === "nocode" ? S(b({}, l), {
|
|
320
320
|
total: de
|
|
321
321
|
}) : h === "" ? S(b({}, l), {
|
|
322
|
-
total:
|
|
322
|
+
total: Y
|
|
323
323
|
}) : h === "pending" ? S(b({}, l), {
|
|
324
324
|
total: fe
|
|
325
325
|
}) : S(b({}, l), {
|
|
326
|
-
total:
|
|
326
|
+
total: Y - de - fe
|
|
327
327
|
}));
|
|
328
|
-
}, [de,
|
|
328
|
+
}, [de, Y, fe]);
|
|
329
329
|
const w = () => {
|
|
330
330
|
!a || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
|
|
331
331
|
label: "allcode",
|
|
@@ -352,15 +352,15 @@ const sr = (L) => {
|
|
|
352
352
|
count: s.count,
|
|
353
353
|
boxCount: (y = s.boxCount) != null ? y : 0,
|
|
354
354
|
id: s.id,
|
|
355
|
-
color:
|
|
355
|
+
color: ht[d % 40]
|
|
356
356
|
};
|
|
357
357
|
});
|
|
358
358
|
return Ze(i), n;
|
|
359
359
|
});
|
|
360
|
-
},
|
|
360
|
+
}, At = (e) => {
|
|
361
361
|
if (!v)
|
|
362
362
|
return;
|
|
363
|
-
|
|
363
|
+
Z(!1), V(e);
|
|
364
364
|
const t = v[e];
|
|
365
365
|
N(t), z(void 0), ue(!0), h !== void 0 && (pe.current[h] = {
|
|
366
366
|
index: e,
|
|
@@ -379,7 +379,7 @@ const sr = (L) => {
|
|
|
379
379
|
labels: e
|
|
380
380
|
}));
|
|
381
381
|
}, [O]);
|
|
382
|
-
const
|
|
382
|
+
const X = (e, t, n, r) => {
|
|
383
383
|
setTimeout(() => {
|
|
384
384
|
r === $.current && (V(t), N(e[t]), z(void 0), h !== void 0 && (pe.current[h] = {
|
|
385
385
|
index: t,
|
|
@@ -394,15 +394,15 @@ const sr = (L) => {
|
|
|
394
394
|
U((r) => {
|
|
395
395
|
var y;
|
|
396
396
|
if (!Array.isArray(r) || !r.length)
|
|
397
|
-
return
|
|
397
|
+
return te(), r;
|
|
398
398
|
const i = M + 1, d = !!W.length ? r.length : (y = l.total) != null ? y : r.length;
|
|
399
399
|
return i >= r.length ? i >= d ? D.error("已经是最后一个了") : A({
|
|
400
400
|
current: l.current + 1,
|
|
401
401
|
pageSize: l.pageSize,
|
|
402
402
|
type: "next"
|
|
403
403
|
}, r).then((C) => {
|
|
404
|
-
Array.isArray(C) &&
|
|
405
|
-
}) :
|
|
404
|
+
Array.isArray(C) && X(C, i, l.current + 1, n);
|
|
405
|
+
}) : X(r, i, l.current || 1, n), r;
|
|
406
406
|
});
|
|
407
407
|
return;
|
|
408
408
|
}
|
|
@@ -411,8 +411,8 @@ const sr = (L) => {
|
|
|
411
411
|
let s;
|
|
412
412
|
if (Array.isArray(i)) {
|
|
413
413
|
if (!i.length)
|
|
414
|
-
return
|
|
415
|
-
const C = h === "", E = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && h === "hascode",
|
|
414
|
+
return te(), i;
|
|
415
|
+
const C = h === "", E = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && h === "hascode", J = C || K || F || E ? M + 1 : M;
|
|
416
416
|
if (f) {
|
|
417
417
|
if (f.labels.length && h === "nocode" || !f.labels.length && h === "hascode" || t === "CONFIRM" && h === "pending") {
|
|
418
418
|
const B = i.findIndex((Me) => Me.id === f.id);
|
|
@@ -422,11 +422,11 @@ const sr = (L) => {
|
|
|
422
422
|
const B = i.findIndex((Me) => Me.id === (u == null ? void 0 : u.id));
|
|
423
423
|
B > -1 && (i.splice(B, 1), s = [...i], l.total && (l.total = l.total - 1));
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
426
|
-
if (l.total &&
|
|
425
|
+
if (J >= i.length)
|
|
426
|
+
if (l.total && J >= l.total) {
|
|
427
427
|
if (i.length > 0) {
|
|
428
428
|
const B = i.length - 1;
|
|
429
|
-
|
|
429
|
+
X(i, B, l.current || 1, n);
|
|
430
430
|
}
|
|
431
431
|
D.error("已经是最后一个了");
|
|
432
432
|
} else
|
|
@@ -435,23 +435,23 @@ const sr = (L) => {
|
|
|
435
435
|
pageSize: l.pageSize,
|
|
436
436
|
type: "next"
|
|
437
437
|
}, i).then((B) => {
|
|
438
|
-
Array.isArray(B) &&
|
|
438
|
+
Array.isArray(B) && X(B, J, l.current + 1, n);
|
|
439
439
|
});
|
|
440
440
|
else
|
|
441
|
-
|
|
441
|
+
X(i, J, l.current || 1, n);
|
|
442
442
|
}
|
|
443
443
|
return s || i;
|
|
444
444
|
})), r));
|
|
445
|
-
},
|
|
445
|
+
}, Et = (e) => {
|
|
446
446
|
if (!v)
|
|
447
447
|
return;
|
|
448
448
|
const t = ++$.current;
|
|
449
449
|
if (!he) {
|
|
450
450
|
U((n) => {
|
|
451
451
|
if (!Array.isArray(n) || !n.length)
|
|
452
|
-
return
|
|
452
|
+
return te(), n;
|
|
453
453
|
const r = M - 1;
|
|
454
|
-
return r < 0 ? D.error("已经是第一个了") :
|
|
454
|
+
return r < 0 ? D.error("已经是第一个了") : X(n, r, l.current || 1, t), n;
|
|
455
455
|
});
|
|
456
456
|
return;
|
|
457
457
|
}
|
|
@@ -460,7 +460,7 @@ const sr = (L) => {
|
|
|
460
460
|
let i;
|
|
461
461
|
if (Array.isArray(r)) {
|
|
462
462
|
if (!r.length)
|
|
463
|
-
return
|
|
463
|
+
return te(), r;
|
|
464
464
|
const s = M - 1;
|
|
465
465
|
if (s < 0)
|
|
466
466
|
s < 0 ? D.error("已经是第一个了") : T({
|
|
@@ -473,16 +473,16 @@ const sr = (L) => {
|
|
|
473
473
|
const d = r.findIndex((y) => y.id === f.id);
|
|
474
474
|
d > -1 && (r.splice(d, 1), i = [...r], l.total && (l.total = l.total - 1));
|
|
475
475
|
}
|
|
476
|
-
|
|
476
|
+
X(r, s, l.current || 1, t);
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
return i || r;
|
|
480
480
|
}));
|
|
481
481
|
});
|
|
482
|
-
},
|
|
482
|
+
}, Bt = (e) => {
|
|
483
483
|
const t = Object.keys(e.labels.reduce((n, r) => (n[r.label] ? ++n[r.label] : n[r.label] = 1, n), {})).length;
|
|
484
484
|
return t >= 2 ? `+${t - 1}` : null;
|
|
485
|
-
},
|
|
485
|
+
}, Mt = (e) => {
|
|
486
486
|
var C, E;
|
|
487
487
|
const {
|
|
488
488
|
scrollTop: t,
|
|
@@ -526,23 +526,23 @@ const sr = (L) => {
|
|
|
526
526
|
const s = i.findIndex((d) => d.id === (u == null ? void 0 : u.id));
|
|
527
527
|
return s > -1 && (i[s] = u), [...i];
|
|
528
528
|
}), N(b({}, u)), !0)).catch(() => !1)) : Promise.resolve(!0);
|
|
529
|
-
},
|
|
529
|
+
}, Ft = (e, t) => {
|
|
530
530
|
if (f && f.labels.some((n) => !n.id))
|
|
531
531
|
return D.error("所有标注需设置标签"), Promise.resolve(!1);
|
|
532
532
|
nt(e, t);
|
|
533
|
-
},
|
|
533
|
+
}, Ot = (e) => {
|
|
534
534
|
if (f && f.labels.some((t) => !t.id)) {
|
|
535
535
|
D.error("所有标注需设置标签");
|
|
536
536
|
return;
|
|
537
537
|
}
|
|
538
538
|
if (!f) {
|
|
539
|
-
|
|
539
|
+
Z(!1);
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
ke(e).then((t) => {
|
|
543
|
-
t && (z(void 0),
|
|
543
|
+
t && (z(void 0), Z(!1), w(), q());
|
|
544
544
|
});
|
|
545
|
-
},
|
|
545
|
+
}, Ht = () => {
|
|
546
546
|
Le.confirm({
|
|
547
547
|
title: "确认要删除当前数据吗?",
|
|
548
548
|
content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
|
|
@@ -564,7 +564,7 @@ const sr = (L) => {
|
|
|
564
564
|
});
|
|
565
565
|
}, rt = [{
|
|
566
566
|
key: "",
|
|
567
|
-
label: `全部(${
|
|
567
|
+
label: `全部(${Y})`,
|
|
568
568
|
children: null
|
|
569
569
|
}, {
|
|
570
570
|
key: "nocode",
|
|
@@ -576,26 +576,26 @@ const sr = (L) => {
|
|
|
576
576
|
children: null
|
|
577
577
|
}, {
|
|
578
578
|
key: "hascode",
|
|
579
|
-
label: `已标注(${
|
|
579
|
+
label: `已标注(${Y - de - fe})`,
|
|
580
580
|
children: null
|
|
581
|
-
}],
|
|
581
|
+
}], Ut = () => {
|
|
582
582
|
var e, t;
|
|
583
583
|
(t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
|
|
584
584
|
top: 0
|
|
585
585
|
});
|
|
586
|
-
},
|
|
587
|
-
|
|
586
|
+
}, qt = (e) => {
|
|
587
|
+
Pt(e), ne();
|
|
588
588
|
}, it = (e) => {
|
|
589
589
|
me.current++, $.current++, M >= 0 && h !== void 0 && h !== null && (pe.current[h] = {
|
|
590
590
|
index: M,
|
|
591
591
|
page: l.current || 1
|
|
592
|
-
}),
|
|
592
|
+
}), ne(), f ? ke(f == null ? void 0 : f.confirmStatus).then((t) => {
|
|
593
593
|
t ? (Ne(e), w()) : D.error("保存失败");
|
|
594
594
|
}) : (T(S(b({}, l), {
|
|
595
595
|
current: 1,
|
|
596
596
|
total: void 0
|
|
597
597
|
})), Ne(e)), e === "nocode" && Te([]);
|
|
598
|
-
},
|
|
598
|
+
}, Kt = () => {
|
|
599
599
|
if (console.log("一键确认", g, o), !(g != null && g.cvforceDatahub) || !(o != null && o.id))
|
|
600
600
|
return Promise.resolve(!1);
|
|
601
601
|
Le.confirm({
|
|
@@ -609,17 +609,17 @@ const sr = (L) => {
|
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
|
-
},
|
|
612
|
+
}, Wt = (e, t) => {
|
|
613
613
|
const n = new Set(P);
|
|
614
614
|
t ? n.add(e) : n.delete(e), Ae(n);
|
|
615
|
-
},
|
|
615
|
+
}, $t = (e) => {
|
|
616
616
|
const t = new Set(P);
|
|
617
617
|
e ? v.forEach((n) => {
|
|
618
618
|
t.add(n.id);
|
|
619
619
|
}) : v.forEach((n) => {
|
|
620
620
|
t.delete(n.id);
|
|
621
621
|
}), Ae(t), xe(e);
|
|
622
|
-
},
|
|
622
|
+
}, ne = () => {
|
|
623
623
|
Ae(/* @__PURE__ */ new Set()), xe(!1);
|
|
624
624
|
}, ot = () => {
|
|
625
625
|
const e = v.filter((n) => P.has(n.id)), t = {
|
|
@@ -630,7 +630,7 @@ const sr = (L) => {
|
|
|
630
630
|
return e.forEach((n) => {
|
|
631
631
|
n.confirmStatus === 1 ? t.pending++ : !n.labels || n.labels.length === 0 ? t.nocode++ : t.hascode++;
|
|
632
632
|
}), t;
|
|
633
|
-
},
|
|
633
|
+
}, jt = () => {
|
|
634
634
|
if (!Se)
|
|
635
635
|
return;
|
|
636
636
|
if (P.size === 0) {
|
|
@@ -730,7 +730,7 @@ const sr = (L) => {
|
|
|
730
730
|
return;
|
|
731
731
|
}
|
|
732
732
|
try {
|
|
733
|
-
yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"),
|
|
733
|
+
yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"), ne(), A(S(b({}, l), {
|
|
734
734
|
current: 1
|
|
735
735
|
})), w(), q();
|
|
736
736
|
} catch (d) {
|
|
@@ -738,8 +738,8 @@ const sr = (L) => {
|
|
|
738
738
|
}
|
|
739
739
|
})
|
|
740
740
|
});
|
|
741
|
-
},
|
|
742
|
-
if (!
|
|
741
|
+
}, Gt = () => {
|
|
742
|
+
if (!G)
|
|
743
743
|
return;
|
|
744
744
|
if (P.size === 0) {
|
|
745
745
|
D.warning("请先选择要清除标注的图片");
|
|
@@ -840,7 +840,7 @@ const sr = (L) => {
|
|
|
840
840
|
confirmStatus: 0,
|
|
841
841
|
isLabeled: !1
|
|
842
842
|
}));
|
|
843
|
-
yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"),
|
|
843
|
+
yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), ne(), A(S(b({}, l), {
|
|
844
844
|
current: 1
|
|
845
845
|
})), w(), q();
|
|
846
846
|
} catch (d) {
|
|
@@ -848,18 +848,18 @@ const sr = (L) => {
|
|
|
848
848
|
}
|
|
849
849
|
})
|
|
850
850
|
});
|
|
851
|
-
},
|
|
851
|
+
}, Zt = [...Se ? [{
|
|
852
852
|
key: "deleteWithAnnotations",
|
|
853
853
|
label: "删除所选图片(含标注)",
|
|
854
|
-
onClick:
|
|
855
|
-
}] : [], ...
|
|
854
|
+
onClick: jt
|
|
855
|
+
}] : [], ...G ? [{
|
|
856
856
|
key: "clearAnnotations",
|
|
857
857
|
label: "仅清除所选图片内的标注",
|
|
858
|
-
onClick:
|
|
859
|
-
}] : []];
|
|
860
|
-
return /* @__PURE__ */ c(
|
|
861
|
-
locale:
|
|
862
|
-
children: /* @__PURE__ */ c(
|
|
858
|
+
onClick: Gt
|
|
859
|
+
}] : []], lt = !u && !!(R && R.preLabel) && !!(o != null && o.id), _t = G || lt;
|
|
860
|
+
return /* @__PURE__ */ c(rn, {
|
|
861
|
+
locale: un,
|
|
862
|
+
children: /* @__PURE__ */ c(gn.Provider, {
|
|
863
863
|
value: {
|
|
864
864
|
datasetId: a,
|
|
865
865
|
versionId: (o == null ? void 0 : o.id) || "",
|
|
@@ -873,29 +873,29 @@ const sr = (L) => {
|
|
|
873
873
|
featuresConfig: {
|
|
874
874
|
labelManager: ye,
|
|
875
875
|
datasetManager: R,
|
|
876
|
-
annotation:
|
|
877
|
-
filterSwitch:
|
|
876
|
+
annotation: oe,
|
|
877
|
+
filterSwitch: se,
|
|
878
878
|
header: x,
|
|
879
|
-
exampleSrcRoot:
|
|
879
|
+
exampleSrcRoot: le
|
|
880
880
|
}
|
|
881
881
|
},
|
|
882
882
|
children: k ? k.markType === "detection" ? /* @__PURE__ */ c("div", {
|
|
883
883
|
className: "detection-version-detail",
|
|
884
|
-
children:
|
|
884
|
+
children: Nt ? o != null && o.id && R && R.preLabel ? /* @__PURE__ */ c(vn, {
|
|
885
885
|
datasetId: a,
|
|
886
886
|
versionId: o.id,
|
|
887
887
|
onClose: () => {
|
|
888
|
-
|
|
888
|
+
Rt(!1), Ee(), q(), w(), A();
|
|
889
889
|
},
|
|
890
890
|
samples: v,
|
|
891
891
|
labels: O,
|
|
892
892
|
fetchLength: Ee
|
|
893
|
-
}) : null : /* @__PURE__ */ m(
|
|
893
|
+
}) : null : /* @__PURE__ */ m(Sn, {
|
|
894
894
|
className: "product-details-page",
|
|
895
|
-
header: x === !1 ? void 0 : /* @__PURE__ */ c(
|
|
895
|
+
header: x === !1 ? void 0 : /* @__PURE__ */ c(In, {
|
|
896
896
|
backTo: ve,
|
|
897
897
|
onBackClick: x != null && x.onBackClick ? () => {
|
|
898
|
-
u &&
|
|
898
|
+
u && te(), x.onBackClick && x.onBackClick();
|
|
899
899
|
} : void 0,
|
|
900
900
|
left: !He && /* @__PURE__ */ m(be, {
|
|
901
901
|
children: [/* @__PURE__ */ c("span", {
|
|
@@ -903,7 +903,7 @@ const sr = (L) => {
|
|
|
903
903
|
fontWeight: "bold"
|
|
904
904
|
},
|
|
905
905
|
children: k == null ? void 0 : k.name
|
|
906
|
-
}), /* @__PURE__ */ c(
|
|
906
|
+
}), /* @__PURE__ */ c(on, {
|
|
907
907
|
disabled: (x == null ? void 0 : x.versionSelect) === !1,
|
|
908
908
|
value: o == null ? void 0 : o.id,
|
|
909
909
|
style: {
|
|
@@ -918,70 +918,70 @@ const sr = (L) => {
|
|
|
918
918
|
if (!k || !t)
|
|
919
919
|
return;
|
|
920
920
|
const n = Ce.find((r) => r.id === t.id);
|
|
921
|
-
ae(n),
|
|
921
|
+
ae(n), ne(), x != null && x.onVersionChange && x.onVersionChange(n);
|
|
922
922
|
}
|
|
923
923
|
})]
|
|
924
924
|
}),
|
|
925
925
|
right: /* @__PURE__ */ m(be, {
|
|
926
|
-
children: [!u && R && R.add && /* @__PURE__ */ c(
|
|
926
|
+
children: [!u && R && R.add && /* @__PURE__ */ c(ut, {
|
|
927
927
|
isPreLabel: H,
|
|
928
928
|
placement: "bottom",
|
|
929
|
-
children: /* @__PURE__ */ c(
|
|
929
|
+
children: /* @__PURE__ */ c(re, {
|
|
930
930
|
type: "default",
|
|
931
931
|
onClick: () => Re(!0),
|
|
932
|
-
disabled:
|
|
932
|
+
disabled: _ === ie.Pending || _ === ie.Started || H,
|
|
933
933
|
children: "导入数据"
|
|
934
934
|
}, "del")
|
|
935
|
-
}), /* @__PURE__ */ c(
|
|
935
|
+
}), _t && /* @__PURE__ */ c(dt, {
|
|
936
936
|
menu: {
|
|
937
|
-
items: [{
|
|
937
|
+
items: [...G ? [{
|
|
938
938
|
key: "manual",
|
|
939
|
-
label: /* @__PURE__ */ c(
|
|
939
|
+
label: /* @__PURE__ */ c(ut, {
|
|
940
940
|
isPreLabel: H,
|
|
941
941
|
children: /* @__PURE__ */ c(be, {
|
|
942
|
-
children:
|
|
942
|
+
children: /* @__PURE__ */ c(re, {
|
|
943
943
|
type: "text",
|
|
944
944
|
disabled: H,
|
|
945
945
|
onClick: () => {
|
|
946
|
-
u || Ne("nocode"),
|
|
946
|
+
u || Ne("nocode"), Z(!0), V(-1), h === "nocode" && (V(0), N(v[0])), ue(!0);
|
|
947
947
|
},
|
|
948
948
|
children: "人工标注"
|
|
949
949
|
})
|
|
950
950
|
})
|
|
951
951
|
})
|
|
952
|
-
}
|
|
952
|
+
}] : [], lt ? {
|
|
953
953
|
key: "auto",
|
|
954
|
-
label: /* @__PURE__ */ c(
|
|
954
|
+
label: /* @__PURE__ */ c(wn, {
|
|
955
955
|
buttonType: "text",
|
|
956
956
|
datasetId: a,
|
|
957
|
-
versionId: o.id,
|
|
957
|
+
versionId: (o == null ? void 0 : o.id) || "",
|
|
958
958
|
disabled: !v.length,
|
|
959
|
-
setIsTaskChange:
|
|
959
|
+
setIsTaskChange: Dt,
|
|
960
960
|
datasetType: "detection",
|
|
961
961
|
preLabelTask: Xe
|
|
962
962
|
})
|
|
963
963
|
} : null]
|
|
964
964
|
},
|
|
965
965
|
placement: "bottom",
|
|
966
|
-
children: /* @__PURE__ */ m(
|
|
966
|
+
children: /* @__PURE__ */ m(re, {
|
|
967
967
|
type: "primary",
|
|
968
|
-
children: ["开始标注", /* @__PURE__ */ c(
|
|
968
|
+
children: ["开始标注", /* @__PURE__ */ c(gt, {})]
|
|
969
969
|
})
|
|
970
|
-
}), /* @__PURE__ */ c(
|
|
971
|
-
when:
|
|
970
|
+
}), /* @__PURE__ */ c(Ln, {
|
|
971
|
+
when: It,
|
|
972
972
|
content: "确认要离开此页面吗?",
|
|
973
973
|
subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
|
|
974
|
-
}), $e && /* @__PURE__ */ c(
|
|
975
|
-
datasetIam:
|
|
974
|
+
}), $e && /* @__PURE__ */ c(Cn, {
|
|
975
|
+
datasetIam: vt,
|
|
976
976
|
datasetId: a,
|
|
977
977
|
currentVersion: o,
|
|
978
978
|
tenCode: k == null ? void 0 : k.tenantCode,
|
|
979
979
|
isVisible: $e,
|
|
980
980
|
setIsVisible: Re,
|
|
981
981
|
getVersionListRequest: w,
|
|
982
|
-
setIsConfirm:
|
|
982
|
+
setIsConfirm: Ct,
|
|
983
983
|
onUploadStatusChange: (e) => {
|
|
984
|
-
|
|
984
|
+
St(e);
|
|
985
985
|
},
|
|
986
986
|
tableReload: () => {
|
|
987
987
|
var e, t, n;
|
|
@@ -999,34 +999,34 @@ const sr = (L) => {
|
|
|
999
999
|
children: [/* @__PURE__ */ m("div", {
|
|
1000
1000
|
className: "detection-header",
|
|
1001
1001
|
children: [/* @__PURE__ */ m(be, {
|
|
1002
|
-
children: [
|
|
1002
|
+
children: [se.tabs && /* @__PURE__ */ c(ln, {
|
|
1003
1003
|
className: "header-tab",
|
|
1004
1004
|
activeKey: h,
|
|
1005
1005
|
items: rt,
|
|
1006
1006
|
onChange: it
|
|
1007
|
-
}), !u &&
|
|
1007
|
+
}), !u && se.search && /* @__PURE__ */ c(kn, {
|
|
1008
1008
|
placeholder: "请输入图片名称搜索",
|
|
1009
1009
|
style: {
|
|
1010
1010
|
width: 200
|
|
1011
1011
|
},
|
|
1012
|
-
suffix: /* @__PURE__ */ c(
|
|
1012
|
+
suffix: /* @__PURE__ */ c(yn, {}),
|
|
1013
1013
|
value: ge,
|
|
1014
|
-
onChange:
|
|
1014
|
+
onChange: qt,
|
|
1015
1015
|
allowClear: !0
|
|
1016
|
-
}), !u && we && /* @__PURE__ */ c(
|
|
1016
|
+
}), !u && we && /* @__PURE__ */ c(dt, {
|
|
1017
1017
|
menu: {
|
|
1018
|
-
items:
|
|
1018
|
+
items: Zt
|
|
1019
1019
|
},
|
|
1020
1020
|
disabled: P.size === 0,
|
|
1021
|
-
children: /* @__PURE__ */ m(
|
|
1021
|
+
children: /* @__PURE__ */ m(re, {
|
|
1022
1022
|
size: "middle",
|
|
1023
1023
|
disabled: P.size === 0,
|
|
1024
|
-
children: ["删除", /* @__PURE__ */ c(
|
|
1024
|
+
children: ["删除", /* @__PURE__ */ c(gt, {})]
|
|
1025
1025
|
})
|
|
1026
|
-
}), !u && we && /* @__PURE__ */ m(
|
|
1027
|
-
children: [/* @__PURE__ */ c(
|
|
1028
|
-
checked:
|
|
1029
|
-
onChange: (e) =>
|
|
1026
|
+
}), !u && we && /* @__PURE__ */ m(at, {
|
|
1027
|
+
children: [/* @__PURE__ */ c(ft, {
|
|
1028
|
+
checked: Vt,
|
|
1029
|
+
onChange: (e) => $t(e.target.checked),
|
|
1030
1030
|
children: "选择当前页"
|
|
1031
1031
|
}), P.size > 0 && /* @__PURE__ */ m("span", {
|
|
1032
1032
|
style: {
|
|
@@ -1036,10 +1036,10 @@ const sr = (L) => {
|
|
|
1036
1036
|
})]
|
|
1037
1037
|
})]
|
|
1038
1038
|
}), /* @__PURE__ */ c(be, {
|
|
1039
|
-
children: h === "pending" && /* @__PURE__ */ c(
|
|
1039
|
+
children: h === "pending" && G && /* @__PURE__ */ c(re, {
|
|
1040
1040
|
type: "primary",
|
|
1041
1041
|
className: "pending-confirm-button",
|
|
1042
|
-
onClick:
|
|
1042
|
+
onClick: Kt,
|
|
1043
1043
|
children: "一键确认"
|
|
1044
1044
|
})
|
|
1045
1045
|
})]
|
|
@@ -1048,9 +1048,9 @@ const sr = (L) => {
|
|
|
1048
1048
|
children: [/* @__PURE__ */ m("div", {
|
|
1049
1049
|
className: "d-right",
|
|
1050
1050
|
ref: ce,
|
|
1051
|
-
children: [
|
|
1051
|
+
children: [ee && /* @__PURE__ */ c(Tn, {
|
|
1052
1052
|
datasetId: a,
|
|
1053
|
-
isImageDetailVisible:
|
|
1053
|
+
isImageDetailVisible: ee,
|
|
1054
1054
|
setIsImageDetailVisible: ue,
|
|
1055
1055
|
currentSample: f != null ? f : u,
|
|
1056
1056
|
labels: O,
|
|
@@ -1060,14 +1060,14 @@ const sr = (L) => {
|
|
|
1060
1060
|
onFilterChange: it,
|
|
1061
1061
|
onChange: z,
|
|
1062
1062
|
onNextClick: (e) => nt(e),
|
|
1063
|
-
onPrevClick: (e) =>
|
|
1064
|
-
onSave: (e, t) =>
|
|
1065
|
-
onDeleteSample: () =>
|
|
1063
|
+
onPrevClick: (e) => Et(e),
|
|
1064
|
+
onSave: (e, t) => Ft(e, t),
|
|
1065
|
+
onDeleteSample: () => Ht(),
|
|
1066
1066
|
onEnterEdit: () => {
|
|
1067
|
-
|
|
1067
|
+
Z(!0);
|
|
1068
1068
|
},
|
|
1069
|
-
onBackToDetail: (e) =>
|
|
1070
|
-
onLoadingChange:
|
|
1069
|
+
onBackToDetail: (e) => Ot(e),
|
|
1070
|
+
onLoadingChange: zt,
|
|
1071
1071
|
onRefresh: () => {
|
|
1072
1072
|
var e;
|
|
1073
1073
|
(e = q()) == null || e.then((t) => {
|
|
@@ -1088,24 +1088,24 @@ const sr = (L) => {
|
|
|
1088
1088
|
},
|
|
1089
1089
|
isPreLabel: H,
|
|
1090
1090
|
imgCount: {
|
|
1091
|
-
total:
|
|
1091
|
+
total: Y,
|
|
1092
1092
|
index: M + 1
|
|
1093
1093
|
},
|
|
1094
1094
|
settingHide: !ye,
|
|
1095
|
-
canLabel:
|
|
1095
|
+
canLabel: G,
|
|
1096
1096
|
canDelete: Se
|
|
1097
|
-
}), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ c(
|
|
1098
|
-
children: /* @__PURE__ */ c(
|
|
1097
|
+
}), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ c(at, {
|
|
1098
|
+
children: /* @__PURE__ */ c(fn, {
|
|
1099
1099
|
innerProps: {
|
|
1100
1100
|
className: "d-right-row"
|
|
1101
1101
|
},
|
|
1102
1102
|
data: v,
|
|
1103
1103
|
itemKey: "id",
|
|
1104
|
-
height: Math.max(
|
|
1105
|
-
onScroll:
|
|
1104
|
+
height: Math.max(pt, 1),
|
|
1105
|
+
onScroll: Mt,
|
|
1106
1106
|
children: (e, t) => {
|
|
1107
1107
|
var n;
|
|
1108
|
-
return /* @__PURE__ */ c(
|
|
1108
|
+
return /* @__PURE__ */ c(sn, {
|
|
1109
1109
|
className: "d-right-col",
|
|
1110
1110
|
"data-sample-id": e.id,
|
|
1111
1111
|
children: /* @__PURE__ */ m("div", {
|
|
@@ -1114,29 +1114,29 @@ const sr = (L) => {
|
|
|
1114
1114
|
onMouseLeave: () => Ve(""),
|
|
1115
1115
|
children: [/* @__PURE__ */ c("div", {
|
|
1116
1116
|
className: "detection-status-wrapper",
|
|
1117
|
-
children: /* @__PURE__ */ c(
|
|
1117
|
+
children: /* @__PURE__ */ c(Rn, {
|
|
1118
1118
|
sample: e
|
|
1119
1119
|
})
|
|
1120
1120
|
}), we && /* @__PURE__ */ c("div", {
|
|
1121
1121
|
className: "sample-checkbox-wrapper",
|
|
1122
|
-
children: /* @__PURE__ */ c(
|
|
1122
|
+
children: /* @__PURE__ */ c(ft, {
|
|
1123
1123
|
checked: P.has(e.id),
|
|
1124
1124
|
onChange: (r) => {
|
|
1125
|
-
r.stopPropagation(),
|
|
1125
|
+
r.stopPropagation(), Wt(e.id, r.target.checked);
|
|
1126
1126
|
},
|
|
1127
1127
|
onClick: (r) => r.stopPropagation()
|
|
1128
1128
|
})
|
|
1129
1129
|
}), /* @__PURE__ */ c("div", {
|
|
1130
1130
|
className: "right-col-img",
|
|
1131
|
-
onClick: () =>
|
|
1132
|
-
children: /* @__PURE__ */ c(
|
|
1131
|
+
onClick: () => At(t),
|
|
1132
|
+
children: /* @__PURE__ */ c(xn, {
|
|
1133
1133
|
fileKey: e.fileKey,
|
|
1134
1134
|
width: 124,
|
|
1135
1135
|
thumbnailUrl: e.thumbnailUrl
|
|
1136
1136
|
})
|
|
1137
1137
|
}), /* @__PURE__ */ m("div", {
|
|
1138
1138
|
className: "right-col-text",
|
|
1139
|
-
children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ c(
|
|
1139
|
+
children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ c(cn, {
|
|
1140
1140
|
placement: "top",
|
|
1141
1141
|
title: /* @__PURE__ */ c("div", {
|
|
1142
1142
|
children: Object.keys(e.labels.reduce((r, i) => (r[i.label] ? ++r[i.label] : r[i.label] = 1, r), {})).map((r) => /* @__PURE__ */ c("div", {
|
|
@@ -1162,7 +1162,7 @@ const sr = (L) => {
|
|
|
1162
1162
|
color: "rgba(0,0,0,0.45)",
|
|
1163
1163
|
marginLeft: 5
|
|
1164
1164
|
},
|
|
1165
|
-
children:
|
|
1165
|
+
children: Bt(e)
|
|
1166
1166
|
}) : null]
|
|
1167
1167
|
})
|
|
1168
1168
|
}) : /* @__PURE__ */ c("span", {
|
|
@@ -1181,18 +1181,18 @@ const sr = (L) => {
|
|
|
1181
1181
|
})
|
|
1182
1182
|
}) : /* @__PURE__ */ c("div", {
|
|
1183
1183
|
className: "empty",
|
|
1184
|
-
children: l.total === 0 ? /* @__PURE__ */ c(
|
|
1185
|
-
image:
|
|
1184
|
+
children: l.total === 0 ? /* @__PURE__ */ c(an, {
|
|
1185
|
+
image: pn,
|
|
1186
1186
|
description: /* @__PURE__ */ m("span", {
|
|
1187
1187
|
children: ["暂无数据", h !== "hascode" && !ge && /* @__PURE__ */ c("span", {
|
|
1188
|
-
children: R && R.add && /* @__PURE__ */ m(
|
|
1188
|
+
children: R && R.add && /* @__PURE__ */ m(re, {
|
|
1189
1189
|
type: "link",
|
|
1190
1190
|
size: "small",
|
|
1191
1191
|
style: {
|
|
1192
1192
|
padding: 0
|
|
1193
1193
|
},
|
|
1194
1194
|
onClick: () => Re(!0),
|
|
1195
|
-
disabled:
|
|
1195
|
+
disabled: _ === ie.Pending || _ === ie.Started,
|
|
1196
1196
|
children: [/* @__PURE__ */ c("span", {
|
|
1197
1197
|
style: {
|
|
1198
1198
|
color: "black"
|
|
@@ -1202,18 +1202,18 @@ const sr = (L) => {
|
|
|
1202
1202
|
})
|
|
1203
1203
|
})]
|
|
1204
1204
|
})
|
|
1205
|
-
}) : /* @__PURE__ */ c(
|
|
1205
|
+
}) : /* @__PURE__ */ c(dn, {})
|
|
1206
1206
|
})]
|
|
1207
|
-
}), h !== "nocode" &&
|
|
1207
|
+
}), h !== "nocode" && se.labels && /* @__PURE__ */ c("div", {
|
|
1208
1208
|
className: "d-sider",
|
|
1209
|
-
children: /* @__PURE__ */ c(
|
|
1209
|
+
children: /* @__PURE__ */ c(mn, {
|
|
1210
1210
|
ref: De,
|
|
1211
1211
|
datasetId: a,
|
|
1212
1212
|
data: O || [],
|
|
1213
1213
|
showStatColumns: !0,
|
|
1214
1214
|
selected: W,
|
|
1215
1215
|
onSelectedChange: (e) => {
|
|
1216
|
-
|
|
1216
|
+
ne(), Te((O == null ? void 0 : O.filter((t) => e.find((n) => n.label === t.label))) || []);
|
|
1217
1217
|
},
|
|
1218
1218
|
onListChange: (e) => {
|
|
1219
1219
|
if (!o)
|
|
@@ -1229,7 +1229,7 @@ const sr = (L) => {
|
|
|
1229
1229
|
count: d.count,
|
|
1230
1230
|
boxCount: (C = d.boxCount) != null ? C : 0,
|
|
1231
1231
|
id: d.id,
|
|
1232
|
-
color:
|
|
1232
|
+
color: ht[y % 40]
|
|
1233
1233
|
};
|
|
1234
1234
|
}), s = W.filter((d) => i.some((y) => y.id === d.id));
|
|
1235
1235
|
Ze(i), W.length !== s.length && Te(s);
|
|
@@ -1251,6 +1251,6 @@ const sr = (L) => {
|
|
|
1251
1251
|
});
|
|
1252
1252
|
};
|
|
1253
1253
|
export {
|
|
1254
|
-
|
|
1255
|
-
|
|
1254
|
+
Vn as ISampleActionType,
|
|
1255
|
+
ar as default
|
|
1256
1256
|
};
|