@glodon-aiot/dataset-annotation 3.25.0-alpha.8 → 3.25.0
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 +410 -398
- package/dist/es/components/VLMAnnotationDetail/VLMDetail/index.mjs +235 -234
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +52 -51
- package/dist/es/components/VLMAnnotationDetail/index.mjs +318 -285
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +3 -3
- package/dist/src/components/VLMAnnotationDetail/VLMDetail/index.d.ts +1 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -2,48 +2,48 @@ var Yt = Object.defineProperty, en = Object.defineProperties;
|
|
|
2
2
|
var tn = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var at = Object.getOwnPropertySymbols;
|
|
4
4
|
var nn = Object.prototype.hasOwnProperty, rn = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var dt = (
|
|
5
|
+
var dt = (w, g, a) => g in w ? Yt(w, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : w[g] = a, b = (w, g) => {
|
|
6
6
|
for (var a in g || (g = {}))
|
|
7
|
-
nn.call(g, a) && dt(
|
|
7
|
+
nn.call(g, a) && dt(w, a, g[a]);
|
|
8
8
|
if (at)
|
|
9
9
|
for (var a of at(g))
|
|
10
|
-
rn.call(g, a) && dt(
|
|
11
|
-
return
|
|
12
|
-
}, S = (
|
|
13
|
-
var He = (
|
|
14
|
-
var
|
|
10
|
+
rn.call(g, a) && dt(w, a, g[a]);
|
|
11
|
+
return w;
|
|
12
|
+
}, S = (w, g) => en(w, tn(g));
|
|
13
|
+
var He = (w, g, a) => new Promise((Q, ye) => {
|
|
14
|
+
var Se = (I) => {
|
|
15
15
|
try {
|
|
16
16
|
oe(a.next(I));
|
|
17
17
|
} catch (le) {
|
|
18
|
-
|
|
18
|
+
ye(le);
|
|
19
19
|
}
|
|
20
20
|
}, T = (I) => {
|
|
21
21
|
try {
|
|
22
22
|
oe(a.throw(I));
|
|
23
23
|
} catch (le) {
|
|
24
|
-
|
|
24
|
+
ye(le);
|
|
25
25
|
}
|
|
26
|
-
}, oe = (I) => I.done ?
|
|
27
|
-
oe((a = a.apply(
|
|
26
|
+
}, oe = (I) => I.done ? Q(I.value) : Promise.resolve(I.value).then(Se, T);
|
|
27
|
+
oe((a = a.apply(w, g)).next());
|
|
28
28
|
});
|
|
29
|
-
import { jsx as s, jsxs as
|
|
30
|
-
import { useRef as
|
|
31
|
-
import { message as
|
|
29
|
+
import { jsx as s, jsxs as p, Fragment as ft } from "react/jsx-runtime";
|
|
30
|
+
import { useRef as W, useState as m, useLayoutEffect as on, useEffect as C, useCallback as ln } from "react";
|
|
31
|
+
import { message as k, ConfigProvider as sn, Space as ve, Select as cn, Button as re, Dropdown as ut, Tabs as an, Checkbox as ht, Col as dn, Tooltip as fn, Empty as un, Spin as hn, Modal as Ne } from "antd";
|
|
32
32
|
import gn from "rc-virtual-list";
|
|
33
|
-
import { UploadZipsStatus as ie, PreLabelTaskStatus as
|
|
34
|
-
import
|
|
33
|
+
import { UploadZipsStatus as ie, PreLabelTaskStatus as mn } from "@glodon-aiot/apis";
|
|
34
|
+
import pn from "antd/es/locale/zh_CN";
|
|
35
35
|
import bn from "../../DatasetContext/index.mjs";
|
|
36
36
|
import vn from "./icon_item_empty.svg.mjs";
|
|
37
37
|
import "./style.less.mjs";
|
|
38
38
|
import { tagColors as gt } from "../../utils/index.mjs";
|
|
39
|
-
import { scrollSampleIntoView as
|
|
39
|
+
import { scrollSampleIntoView as yn, getVirtualListHolder as Sn } from "../../utils/scrollSampleIntoView.mjs";
|
|
40
40
|
import Cn from "./components/Labels/index.mjs";
|
|
41
41
|
import { useKeyPress as In } from "ahooks";
|
|
42
|
-
import
|
|
42
|
+
import mt from "./components/DisabledTooltip/index.mjs";
|
|
43
43
|
import xn from "./PreSamplesPage/index.mjs";
|
|
44
|
-
import { DownOutlined as
|
|
45
|
-
import
|
|
46
|
-
import
|
|
44
|
+
import { DownOutlined as pt, SearchOutlined as kn } from "@ant-design/icons";
|
|
45
|
+
import wn from "../../Common/Page/index.mjs";
|
|
46
|
+
import Ln from "../PicZipImportModal/index.mjs";
|
|
47
47
|
import Dn from "../PageNav/index.mjs";
|
|
48
48
|
import Nn from "../Thumbnail/index.mjs";
|
|
49
49
|
import Tn from "../CompositionInput/index.mjs";
|
|
@@ -54,26 +54,26 @@ import { DEFAULT_FILTER_SWITCH as zn } from "../../constant.mjs";
|
|
|
54
54
|
import An from "../DetectionStatus/index.mjs";
|
|
55
55
|
import En from "./components/ImageModal/index.mjs";
|
|
56
56
|
import Fn from "./hooks/useSamplePreload.mjs";
|
|
57
|
-
var Bn = /* @__PURE__ */ ((
|
|
58
|
-
const
|
|
57
|
+
var Bn = /* @__PURE__ */ ((w) => (w.Next = "NEXT", w.Prev = "PREV", w.Confirm = "CONFIRM", w.Save = "Save", w))(Bn || {});
|
|
58
|
+
const mr = (w) => {
|
|
59
59
|
const {
|
|
60
60
|
services: g,
|
|
61
61
|
datasetId: a,
|
|
62
|
-
versionId:
|
|
63
|
-
backTo:
|
|
64
|
-
labelManager:
|
|
62
|
+
versionId: Q,
|
|
63
|
+
backTo: ye,
|
|
64
|
+
labelManager: Se = !1,
|
|
65
65
|
datasetManager: T = !1,
|
|
66
66
|
annotation: oe,
|
|
67
67
|
header: I = {
|
|
68
68
|
versionSelect: !1
|
|
69
69
|
},
|
|
70
70
|
exampleSrcRoot: le
|
|
71
|
-
} =
|
|
72
|
-
Vn(se,
|
|
73
|
-
const
|
|
71
|
+
} = w, se = b({}, zn);
|
|
72
|
+
Vn(se, w.filterSwitch);
|
|
73
|
+
const Ce = !!(T && T.delete), G = !!(T && T.label), Te = Ce || G, ce = W(null), Re = W(null), [bt, vt] = m(0), [x, Ue] = m(), [l, ae] = m(), [Ie, yt] = m([]), [qe, Ke] = m(!1), [de, We] = m(0), [fe, $e] = m(0), [u, Pe] = m(""), [Y, je] = m(0), [St, Ct] = m(), [Ge, Ve] = m(!1), [Ze, It] = m(!1), [_e, xt] = m(!0), [kt, wt] = m(!1), [B, Xe] = m([]), [v, H] = m([]), [ue, Z] = m(!1), [ee, he] = m(!1), [F, z] = m(-1), [h, N] = m(), [Lt, Je] = m(), [Dt, xe] = m(!1), [f, A] = m(), [o, R] = m({
|
|
74
74
|
current: 0,
|
|
75
75
|
pageSize: 100
|
|
76
|
-
}), [
|
|
76
|
+
}), [$, ze] = m([]), [_, Nt] = m(""), [Tt, Rt] = m(!1), [Qe, Ye] = m(), [ke, Ae] = m(null), [M, et] = m(!1), [Pt, Vt] = m(!1), [Mn, zt] = m(0), [On, Ee] = m(""), [ge, At] = m(""), X = W({}), me = W(void 0), we = W(!1), pe = W(0), tt = W(0), U = W(0), [P, Fe] = m(/* @__PURE__ */ new Set()), [Et, Le] = m(!1), nt = W(-1);
|
|
77
77
|
on(() => {
|
|
78
78
|
const e = ce.current;
|
|
79
79
|
if (!e)
|
|
@@ -86,15 +86,15 @@ const pr = (L) => {
|
|
|
86
86
|
});
|
|
87
87
|
};
|
|
88
88
|
n();
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
return
|
|
93
|
-
cancelAnimationFrame(t),
|
|
89
|
+
const i = typeof ResizeObserver != "undefined" ? new ResizeObserver(n) : null;
|
|
90
|
+
i == null || i.observe(e);
|
|
91
|
+
const r = window.visualViewport;
|
|
92
|
+
return r == null || r.addEventListener("resize", n), window.addEventListener("resize", n), () => {
|
|
93
|
+
cancelAnimationFrame(t), i == null || i.disconnect(), r == null || r.removeEventListener("resize", n), window.removeEventListener("resize", n);
|
|
94
94
|
};
|
|
95
|
-
}, [
|
|
95
|
+
}, [x]);
|
|
96
96
|
const te = () => {
|
|
97
|
-
N(void 0),
|
|
97
|
+
N(void 0), A(void 0), z(-1), Z(!1), q(), setTimeout(() => {
|
|
98
98
|
R((e) => S(b({}, e), {
|
|
99
99
|
current: 1,
|
|
100
100
|
type: void 0
|
|
@@ -106,8 +106,8 @@ const pr = (L) => {
|
|
|
106
106
|
Ct(e);
|
|
107
107
|
});
|
|
108
108
|
}, [a]), C(() => {
|
|
109
|
-
|
|
110
|
-
}, [
|
|
109
|
+
L();
|
|
110
|
+
}, [l == null ? void 0 : l.id]), C(() => {
|
|
111
111
|
a && (Ke(!0), Promise.all([
|
|
112
112
|
// 数据集
|
|
113
113
|
g.cvforceDatahub.getDatasetsId(a).then((e) => {
|
|
@@ -115,70 +115,70 @@ const pr = (L) => {
|
|
|
115
115
|
}),
|
|
116
116
|
// 版本列表
|
|
117
117
|
g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
|
|
118
|
-
|
|
118
|
+
yt(e.recordList), ae(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
|
|
119
119
|
})
|
|
120
120
|
]).finally(() => Ke(!1)));
|
|
121
|
-
}, [a,
|
|
121
|
+
}, [a, Q]);
|
|
122
122
|
const rt = () => {
|
|
123
|
-
!a || !
|
|
123
|
+
!a || !l || g.cvforceDatahub.getDatasetsIdVersionsVid(a, l.id).then((e) => {
|
|
124
124
|
ae(e), Nt(e.versionAsyncTask.state);
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
127
|
C(() => {
|
|
128
|
-
|
|
129
|
-
}, [
|
|
130
|
-
ae(void 0), R(S(b({},
|
|
128
|
+
_ !== ie.Pending && _ !== ie.Started || k.warning("文件导入中,请刷新页面再试");
|
|
129
|
+
}, [_]), C(() => {
|
|
130
|
+
ae(void 0), R(S(b({}, o), {
|
|
131
131
|
current: 1
|
|
132
132
|
})), H([]), rt();
|
|
133
|
-
}, [a,
|
|
133
|
+
}, [a, Q]), C(() => {
|
|
134
134
|
a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
|
|
135
135
|
Ue(e);
|
|
136
136
|
});
|
|
137
137
|
}, [a]), C(() => {
|
|
138
|
-
pe.current++,
|
|
139
|
-
}, [
|
|
140
|
-
|
|
141
|
-
}, [
|
|
142
|
-
!
|
|
138
|
+
pe.current++, U.current++;
|
|
139
|
+
}, [x == null ? void 0 : x.id, l == null ? void 0 : l.id, u, $]), C(() => {
|
|
140
|
+
q();
|
|
141
|
+
}, [$, l, u]), C(() => {
|
|
142
|
+
!l || !x || E(S(b({}, o), {
|
|
143
143
|
current: 1
|
|
144
144
|
})).then((e) => {
|
|
145
145
|
});
|
|
146
|
-
}, [
|
|
147
|
-
if (
|
|
148
|
-
|
|
146
|
+
}, [x == null ? void 0 : x.id, l == null ? void 0 : l.id, $]), C(() => {
|
|
147
|
+
if (we.current) {
|
|
148
|
+
we.current = !1;
|
|
149
149
|
return;
|
|
150
150
|
}
|
|
151
|
-
if (
|
|
152
|
-
|
|
151
|
+
if (me.current === o.current) {
|
|
152
|
+
me.current = void 0, L();
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
155
|
-
|
|
156
|
-
}),
|
|
157
|
-
}, [
|
|
158
|
-
|
|
155
|
+
E().then((e) => {
|
|
156
|
+
}), L();
|
|
157
|
+
}, [o.current]), C(() => {
|
|
158
|
+
M && L();
|
|
159
159
|
}, [Qe]), C(() => {
|
|
160
160
|
let e = !1;
|
|
161
|
-
const t =
|
|
161
|
+
const t = X.current[u];
|
|
162
162
|
let n;
|
|
163
|
-
return t && t.page > 1 ? n =
|
|
163
|
+
return t && t.page > 1 ? n = E(S(b({}, o), {
|
|
164
164
|
current: 1,
|
|
165
165
|
pageSize: t.page * 100,
|
|
166
166
|
// 假设默认pageSize为100
|
|
167
167
|
total: void 0
|
|
168
|
-
})).then((
|
|
168
|
+
})).then((i) => (e || (me.current = t.page, R((r) => S(b({}, r), {
|
|
169
169
|
current: t.page,
|
|
170
170
|
pageSize: 100
|
|
171
|
-
}))),
|
|
171
|
+
}))), i)) : n = E(S(b({}, o), {
|
|
172
172
|
current: 1,
|
|
173
173
|
total: void 0
|
|
174
|
-
})), n.then((
|
|
175
|
-
if (!e && (
|
|
176
|
-
if (Array.isArray(
|
|
177
|
-
const
|
|
178
|
-
|
|
174
|
+
})), n.then((i) => {
|
|
175
|
+
if (!e && (xe(!1), !!i && !(!h && !ee)))
|
|
176
|
+
if (Array.isArray(i) && i.length) {
|
|
177
|
+
const r = X.current[u], c = r == null ? void 0 : r.index, d = c !== void 0 && c >= 0 && c < i.length ? c : 0;
|
|
178
|
+
z(d), N(i[d]), A(void 0);
|
|
179
179
|
} else
|
|
180
|
-
N(void 0),
|
|
181
|
-
R((
|
|
180
|
+
N(void 0), A(void 0), z(-1), q(), setTimeout(() => {
|
|
181
|
+
R((r) => S(b({}, r), {
|
|
182
182
|
current: 1,
|
|
183
183
|
type: void 0
|
|
184
184
|
}));
|
|
@@ -189,52 +189,52 @@ const pr = (L) => {
|
|
|
189
189
|
}, [u]), C(() => {
|
|
190
190
|
var t;
|
|
191
191
|
let e;
|
|
192
|
-
if (!
|
|
193
|
-
const n = h !== void 0,
|
|
194
|
-
N(void 0),
|
|
195
|
-
Sn(
|
|
192
|
+
if (!ee) {
|
|
193
|
+
const n = h !== void 0, i = h == null ? void 0 : h.id, r = F;
|
|
194
|
+
U.current++, X.current = {}, N(void 0), A(void 0), Z(!1), z(-1), Je(void 0), xe(!1), q(), n && ((t = Re.current) == null || t.fetchLabels()), L(), i !== void 0 && (e = requestAnimationFrame(() => {
|
|
195
|
+
yn(Sn(ce.current), i, r);
|
|
196
196
|
}));
|
|
197
197
|
}
|
|
198
198
|
return () => {
|
|
199
199
|
e !== void 0 && cancelAnimationFrame(e);
|
|
200
200
|
};
|
|
201
|
-
}, [
|
|
201
|
+
}, [ee]);
|
|
202
202
|
const Ft = ln((e, t) => {
|
|
203
203
|
Je(e ? void 0 : t);
|
|
204
204
|
}, []);
|
|
205
205
|
Fn({
|
|
206
206
|
samples: v,
|
|
207
|
-
currentIndex:
|
|
208
|
-
active:
|
|
209
|
-
loadedImageUrl:
|
|
207
|
+
currentIndex: F,
|
|
208
|
+
active: ee,
|
|
209
|
+
loadedImageUrl: Lt
|
|
210
210
|
}), C(() => {
|
|
211
|
-
|
|
211
|
+
wt(!_e && Ze);
|
|
212
212
|
}, [_e, Ze]), C(() => {
|
|
213
213
|
if (!a) {
|
|
214
|
-
|
|
214
|
+
ke && (clearTimeout(ke), Ae(null)), Ye(void 0);
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
217
|
Me();
|
|
218
|
-
}, [a,
|
|
218
|
+
}, [a, l == null ? void 0 : l.id]), C(() => {
|
|
219
219
|
Me();
|
|
220
220
|
}, [Tt]), C(() => {
|
|
221
221
|
Be();
|
|
222
|
-
}, [
|
|
223
|
-
pe.current++,
|
|
222
|
+
}, [M, a, l]), C(() => {
|
|
223
|
+
pe.current++, U.current++, E(S(b({}, o), {
|
|
224
224
|
current: 1
|
|
225
|
-
})),
|
|
225
|
+
})), L();
|
|
226
226
|
}, [ge]), C(() => {
|
|
227
|
-
|
|
227
|
+
Ee("");
|
|
228
228
|
}, [h]), C(() => {
|
|
229
229
|
if (v.length === 0) {
|
|
230
|
-
|
|
230
|
+
Le(!1);
|
|
231
231
|
return;
|
|
232
232
|
}
|
|
233
233
|
const e = v.every((t) => P.has(t.id));
|
|
234
|
-
|
|
234
|
+
Le(e);
|
|
235
235
|
}, [v, P]);
|
|
236
236
|
const Be = () => {
|
|
237
|
-
|
|
237
|
+
l && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
|
|
238
238
|
pageNo: 1,
|
|
239
239
|
pageSize: 1e3,
|
|
240
240
|
confirmStatus: 1
|
|
@@ -242,26 +242,26 @@ const pr = (L) => {
|
|
|
242
242
|
zt(e.recordList.length);
|
|
243
243
|
});
|
|
244
244
|
}, Me = () => {
|
|
245
|
-
!a || !
|
|
245
|
+
!a || !l || g.cvforceDatahub.getPreLabelTask(a, l.id).then((e) => {
|
|
246
246
|
const t = e[0];
|
|
247
|
-
if (Ye(t),
|
|
248
|
-
et(!1),
|
|
247
|
+
if (Ye(t), ke && (clearTimeout(ke), Ae(null)), !(t != null && t.state) || t.state !== mn.Started) {
|
|
248
|
+
et(!1), L();
|
|
249
249
|
return;
|
|
250
250
|
} else
|
|
251
251
|
et(!0);
|
|
252
|
-
|
|
252
|
+
Ae(setTimeout(() => {
|
|
253
253
|
Me();
|
|
254
254
|
}, 1e4));
|
|
255
255
|
});
|
|
256
256
|
};
|
|
257
257
|
C(() => {
|
|
258
|
-
|
|
259
|
-
}, [
|
|
260
|
-
const
|
|
261
|
-
const n = (e == null ? void 0 : e.current) ||
|
|
262
|
-
if (!a || !
|
|
258
|
+
x && x.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
|
|
259
|
+
}, [x]);
|
|
260
|
+
const E = (e, t) => {
|
|
261
|
+
const n = (e == null ? void 0 : e.current) || o.current, i = (e == null ? void 0 : e.pageSize) || o.pageSize;
|
|
262
|
+
if (!a || !l || !n)
|
|
263
263
|
return Promise.resolve(!1);
|
|
264
|
-
const
|
|
264
|
+
const r = pe.current, c = $.map((D) => D.label), d = () => {
|
|
265
265
|
switch (u) {
|
|
266
266
|
case "nocode":
|
|
267
267
|
return "nocode";
|
|
@@ -283,67 +283,67 @@ const pr = (L) => {
|
|
|
283
283
|
return 2;
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
|
-
return n === 1 && Wt(), R(S(b({},
|
|
286
|
+
return n === 1 && Wt(), R(S(b({}, o), {
|
|
287
287
|
current: n,
|
|
288
|
-
pageSize:
|
|
289
|
-
})), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a,
|
|
288
|
+
pageSize: i
|
|
289
|
+
})), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
|
|
290
290
|
pageNo: n,
|
|
291
|
-
pageSize:
|
|
291
|
+
pageSize: i,
|
|
292
292
|
labels: d(),
|
|
293
293
|
confirmStatus: y(),
|
|
294
294
|
searchName: ge
|
|
295
|
-
}).then((
|
|
296
|
-
if (
|
|
295
|
+
}).then((D) => {
|
|
296
|
+
if (r !== pe.current)
|
|
297
297
|
return !1;
|
|
298
|
-
const
|
|
299
|
-
if (H(
|
|
298
|
+
const O = D.recordList || [], J = n === 1 ? O : [...t || v, ...O];
|
|
299
|
+
if (H(J), R(S(b({}, o), {
|
|
300
300
|
current: n,
|
|
301
|
-
pageSize:
|
|
302
|
-
total:
|
|
303
|
-
})),
|
|
304
|
-
|
|
305
|
-
const
|
|
306
|
-
N(
|
|
301
|
+
pageSize: i,
|
|
302
|
+
total: D.totalResults
|
|
303
|
+
})), o.type === "next" && O.length) {
|
|
304
|
+
z(0);
|
|
305
|
+
const j = D.recordList[0];
|
|
306
|
+
N(j);
|
|
307
307
|
}
|
|
308
|
-
if (
|
|
309
|
-
|
|
310
|
-
const
|
|
311
|
-
N(
|
|
308
|
+
if (o.type === "prev" && O.length) {
|
|
309
|
+
z(o.pageSize - 1);
|
|
310
|
+
const j = D.recordList[o.pageSize - 1];
|
|
311
|
+
N(j);
|
|
312
312
|
}
|
|
313
|
-
return ue &&
|
|
313
|
+
return ue && F < 0 && (z(0), N(O[0]), he(!0)), J;
|
|
314
314
|
}).catch(() => !1);
|
|
315
315
|
};
|
|
316
316
|
C(() => {
|
|
317
|
-
R(u === "nocode" ? S(b({},
|
|
317
|
+
$.length > 0 || R(u === "nocode" ? S(b({}, o), {
|
|
318
318
|
total: de
|
|
319
|
-
}) : u === "" ? S(b({},
|
|
320
|
-
total:
|
|
321
|
-
}) : u === "pending" ? S(b({},
|
|
319
|
+
}) : u === "" ? S(b({}, o), {
|
|
320
|
+
total: Y
|
|
321
|
+
}) : u === "pending" ? S(b({}, o), {
|
|
322
322
|
total: fe
|
|
323
|
-
}) : S(b({},
|
|
324
|
-
total:
|
|
323
|
+
}) : S(b({}, o), {
|
|
324
|
+
total: Y - de - fe
|
|
325
325
|
}));
|
|
326
|
-
}, [de,
|
|
327
|
-
const
|
|
328
|
-
!a || !
|
|
326
|
+
}, [de, Y, fe]);
|
|
327
|
+
const L = () => {
|
|
328
|
+
!a || !l || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
|
|
329
329
|
label: "allcode",
|
|
330
330
|
confirmStatus: 2,
|
|
331
331
|
searchName: ge
|
|
332
332
|
}).then((e) => {
|
|
333
|
-
const t = e.find((
|
|
334
|
-
je(t ? t.count : 0), We(n ? n.count : 0), $e(
|
|
333
|
+
const t = e.find((r) => r.id === "allcodeid"), n = e.find((r) => r.id === "nocodeid"), i = e.find((r) => r.id === "pendingid");
|
|
334
|
+
je(t ? t.count : 0), We(n ? n.count : 0), $e(i ? i.count : 0);
|
|
335
335
|
});
|
|
336
|
-
},
|
|
337
|
-
if (!a || !(
|
|
336
|
+
}, q = () => {
|
|
337
|
+
if (!a || !(l != null && l.id))
|
|
338
338
|
return;
|
|
339
339
|
const e = ++tt.current;
|
|
340
340
|
let t = 2;
|
|
341
|
-
return u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a,
|
|
341
|
+
return u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
|
|
342
342
|
confirmStatus: t
|
|
343
343
|
}).then((n) => {
|
|
344
344
|
if (e !== tt.current)
|
|
345
345
|
return;
|
|
346
|
-
const
|
|
346
|
+
const r = (n || []).filter((c) => c.label !== "nocode").map((c, d) => {
|
|
347
347
|
var y;
|
|
348
348
|
return {
|
|
349
349
|
label: c.label,
|
|
@@ -353,33 +353,33 @@ const pr = (L) => {
|
|
|
353
353
|
color: gt[d % 40]
|
|
354
354
|
};
|
|
355
355
|
});
|
|
356
|
-
return Xe(
|
|
356
|
+
return Xe(r), n;
|
|
357
357
|
});
|
|
358
358
|
}, Bt = (e) => {
|
|
359
359
|
if (!v)
|
|
360
360
|
return;
|
|
361
|
-
|
|
361
|
+
Z(!1), z(e);
|
|
362
362
|
const t = v[e];
|
|
363
|
-
N(t),
|
|
363
|
+
N(t), A(void 0), he(!0), u !== void 0 && (X.current[u] = {
|
|
364
364
|
index: e,
|
|
365
|
-
page:
|
|
365
|
+
page: o.current || 1
|
|
366
366
|
});
|
|
367
367
|
};
|
|
368
368
|
C(() => {
|
|
369
|
-
|
|
370
|
-
}, [
|
|
369
|
+
o.type || E();
|
|
370
|
+
}, [o.type]), C(() => {
|
|
371
371
|
if (!f)
|
|
372
372
|
return;
|
|
373
373
|
const e = [];
|
|
374
374
|
f == null || f.labels.forEach((t) => {
|
|
375
|
-
|
|
376
|
-
}), e.length !== f.labels.length &&
|
|
375
|
+
B != null && B.find((n) => n.id === t.id) && e.push(t);
|
|
376
|
+
}), e.length !== f.labels.length && A(S(b({}, f), {
|
|
377
377
|
labels: e
|
|
378
378
|
}));
|
|
379
|
-
}, [
|
|
380
|
-
const
|
|
379
|
+
}, [B]);
|
|
380
|
+
const K = (e, t, n, i) => {
|
|
381
381
|
setTimeout(() => {
|
|
382
|
-
|
|
382
|
+
i === U.current && (z(t), N(e[t]), A(void 0), u !== void 0 && (X.current[u] = {
|
|
383
383
|
index: t,
|
|
384
384
|
page: n
|
|
385
385
|
}));
|
|
@@ -387,171 +387,183 @@ const pr = (L) => {
|
|
|
387
387
|
}, it = (e, t) => {
|
|
388
388
|
if (!v)
|
|
389
389
|
return;
|
|
390
|
-
const n = ++
|
|
390
|
+
const n = ++U.current;
|
|
391
391
|
if (!ue) {
|
|
392
|
-
H((
|
|
393
|
-
var
|
|
394
|
-
if (!Array.isArray(
|
|
395
|
-
return te(),
|
|
396
|
-
const
|
|
397
|
-
return
|
|
398
|
-
current:
|
|
399
|
-
pageSize:
|
|
392
|
+
H((i) => {
|
|
393
|
+
var d;
|
|
394
|
+
if (!Array.isArray(i) || !i.length)
|
|
395
|
+
return te(), i;
|
|
396
|
+
const r = F + 1, c = (d = o.total) != null ? d : i.length;
|
|
397
|
+
return r >= i.length ? r >= c ? k.error("已经是最后一个了") : (me.current = o.current + 1, E({
|
|
398
|
+
current: o.current + 1,
|
|
399
|
+
pageSize: o.pageSize,
|
|
400
400
|
type: "next"
|
|
401
|
-
},
|
|
402
|
-
Array.isArray(
|
|
403
|
-
|
|
401
|
+
}, i).then((y) => {
|
|
402
|
+
if (Array.isArray(y)) {
|
|
403
|
+
if (r >= y.length) {
|
|
404
|
+
y.length > 0 && K(y, y.length - 1, o.current || 1, n), k.error("已经是最后一个了");
|
|
405
|
+
return;
|
|
406
|
+
}
|
|
407
|
+
K(y, r, o.current + 1, n);
|
|
408
|
+
}
|
|
409
|
+
})) : K(i, r, o.current || 1, n), i;
|
|
404
410
|
});
|
|
405
411
|
return;
|
|
406
412
|
}
|
|
407
|
-
return
|
|
413
|
+
return De(e, t).then((i) => (i && n === U.current && (console.log("action", t, "changedSample", f), L(), H((r) => {
|
|
408
414
|
var d, y;
|
|
409
415
|
let c;
|
|
410
|
-
if (Array.isArray(
|
|
411
|
-
if (!
|
|
412
|
-
return te(),
|
|
413
|
-
const
|
|
416
|
+
if (Array.isArray(r)) {
|
|
417
|
+
if (!r.length)
|
|
418
|
+
return te(), r;
|
|
419
|
+
const D = u === "", O = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && u === "nocode", J = t !== "CONFIRM" && u === "pending", j = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && u === "hascode", be = D || J || j || O ? F + 1 : F;
|
|
414
420
|
if (f) {
|
|
415
421
|
if (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode" || t === "CONFIRM" && u === "pending") {
|
|
416
|
-
const
|
|
417
|
-
|
|
422
|
+
const V = r.findIndex((Oe) => Oe.id === f.id);
|
|
423
|
+
V > -1 && (r.splice(V, 1), c = [...r], o.total && (o.total = o.total - 1));
|
|
418
424
|
}
|
|
419
425
|
} else if (t === "CONFIRM" && u === "pending") {
|
|
420
|
-
const
|
|
421
|
-
|
|
426
|
+
const V = r.findIndex((Oe) => Oe.id === (h == null ? void 0 : h.id));
|
|
427
|
+
V > -1 && (r.splice(V, 1), c = [...r], o.total && (o.total = o.total - 1));
|
|
422
428
|
}
|
|
423
|
-
if (
|
|
424
|
-
if (
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
|
|
429
|
+
if (be >= r.length)
|
|
430
|
+
if (o.total && be >= o.total) {
|
|
431
|
+
if (r.length > 0) {
|
|
432
|
+
const V = r.length - 1;
|
|
433
|
+
K(r, V, o.current || 1, n);
|
|
428
434
|
}
|
|
429
|
-
|
|
435
|
+
k.error("已经是最后一个了");
|
|
430
436
|
} else
|
|
431
|
-
|
|
432
|
-
current:
|
|
433
|
-
pageSize:
|
|
437
|
+
me.current = o.current + 1, E({
|
|
438
|
+
current: o.current + 1,
|
|
439
|
+
pageSize: o.pageSize,
|
|
434
440
|
type: "next"
|
|
435
|
-
},
|
|
436
|
-
Array.isArray(
|
|
441
|
+
}, r).then((V) => {
|
|
442
|
+
if (Array.isArray(V)) {
|
|
443
|
+
if (be >= V.length) {
|
|
444
|
+
V.length > 0 && K(V, V.length - 1, o.current || 1, n), k.error("已经是最后一个了");
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
K(V, be, o.current + 1, n);
|
|
448
|
+
}
|
|
437
449
|
});
|
|
438
450
|
else
|
|
439
|
-
|
|
451
|
+
K(r, be, o.current || 1, n);
|
|
440
452
|
}
|
|
441
|
-
return c ||
|
|
442
|
-
})),
|
|
453
|
+
return c || r;
|
|
454
|
+
})), i));
|
|
443
455
|
}, Mt = (e) => {
|
|
444
456
|
if (!v)
|
|
445
457
|
return;
|
|
446
|
-
const t = ++
|
|
458
|
+
const t = ++U.current;
|
|
447
459
|
if (!ue) {
|
|
448
460
|
H((n) => {
|
|
449
461
|
if (!Array.isArray(n) || !n.length)
|
|
450
462
|
return te(), n;
|
|
451
|
-
const
|
|
452
|
-
return
|
|
463
|
+
const i = F - 1;
|
|
464
|
+
return i < 0 ? k.error("已经是第一个了") : K(n, i, o.current || 1, t), n;
|
|
453
465
|
});
|
|
454
466
|
return;
|
|
455
467
|
}
|
|
456
|
-
|
|
457
|
-
n && t ===
|
|
458
|
-
let
|
|
459
|
-
if (Array.isArray(
|
|
460
|
-
if (!
|
|
461
|
-
return te(),
|
|
462
|
-
const c =
|
|
468
|
+
De(e).then((n) => {
|
|
469
|
+
n && t === U.current && (L(), H((i) => {
|
|
470
|
+
let r;
|
|
471
|
+
if (Array.isArray(i)) {
|
|
472
|
+
if (!i.length)
|
|
473
|
+
return te(), i;
|
|
474
|
+
const c = F - 1;
|
|
463
475
|
if (c < 0)
|
|
464
|
-
c < 0 ?
|
|
465
|
-
current:
|
|
466
|
-
pageSize:
|
|
476
|
+
c < 0 ? k.error("已经是第一个了") : R({
|
|
477
|
+
current: o.current - 1,
|
|
478
|
+
pageSize: o.pageSize,
|
|
467
479
|
type: "prev"
|
|
468
480
|
});
|
|
469
481
|
else {
|
|
470
482
|
if (f && (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode")) {
|
|
471
|
-
const d =
|
|
472
|
-
d > -1 && (
|
|
483
|
+
const d = i.findIndex((y) => y.id === f.id);
|
|
484
|
+
d > -1 && (i.splice(d, 1), r = [...i], o.total && (o.total = o.total - 1));
|
|
473
485
|
}
|
|
474
|
-
|
|
486
|
+
K(i, c, o.current || 1, t);
|
|
475
487
|
}
|
|
476
488
|
}
|
|
477
|
-
return
|
|
489
|
+
return r || i;
|
|
478
490
|
}));
|
|
479
491
|
});
|
|
480
492
|
}, Ot = (e) => {
|
|
481
|
-
const t = Object.keys(e.labels.reduce((n,
|
|
493
|
+
const t = Object.keys(e.labels.reduce((n, i) => (n[i.label] ? ++n[i.label] : n[i.label] = 1, n), {})).length;
|
|
482
494
|
return t >= 2 ? `+${t - 1}` : null;
|
|
483
495
|
}, Ht = (e) => {
|
|
484
|
-
var
|
|
496
|
+
var D, O;
|
|
485
497
|
const {
|
|
486
498
|
scrollTop: t,
|
|
487
499
|
scrollHeight: n,
|
|
488
|
-
clientHeight:
|
|
489
|
-
} = e.currentTarget,
|
|
490
|
-
y >= 1 && v.length > 0 && v.length < y * d || (!
|
|
491
|
-
var
|
|
492
|
-
return S(b({},
|
|
493
|
-
current: ((
|
|
500
|
+
clientHeight: i
|
|
501
|
+
} = e.currentTarget, r = n - t - i, c = 3, d = (D = o.pageSize) != null ? D : 100, y = (O = o.current) != null ? O : 0;
|
|
502
|
+
y >= 1 && v.length > 0 && v.length < y * d || (!o.total || o.total > v.length) && r <= c && R((J) => {
|
|
503
|
+
var j;
|
|
504
|
+
return S(b({}, J), {
|
|
505
|
+
current: ((j = J.current) != null ? j : 0) + 1
|
|
494
506
|
});
|
|
495
507
|
});
|
|
496
|
-
},
|
|
497
|
-
var n,
|
|
498
|
-
if (!
|
|
508
|
+
}, De = (e, t) => {
|
|
509
|
+
var n, i;
|
|
510
|
+
if (!l)
|
|
499
511
|
return Promise.resolve(!1);
|
|
500
|
-
if (f && !
|
|
501
|
-
const
|
|
512
|
+
if (f && !M) {
|
|
513
|
+
const r = S(b({}, f), {
|
|
502
514
|
labels: f.labels ? [...f.labels] : []
|
|
503
515
|
});
|
|
504
|
-
return
|
|
505
|
-
|
|
516
|
+
return r.labels && (r.labels = r.labels.filter((c) => !!c.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, l.id, [r], e).then(() => {
|
|
517
|
+
k.success({
|
|
506
518
|
content: "保存成功"
|
|
507
519
|
});
|
|
508
|
-
const c = S(b({},
|
|
509
|
-
labels:
|
|
520
|
+
const c = S(b({}, r), {
|
|
521
|
+
labels: r.labels ? [...r.labels] : []
|
|
510
522
|
});
|
|
511
523
|
return H((d) => {
|
|
512
|
-
const y = d.findIndex((
|
|
524
|
+
const y = d.findIndex((D) => D.id === (c == null ? void 0 : c.id));
|
|
513
525
|
if (y > -1) {
|
|
514
|
-
const
|
|
515
|
-
return
|
|
526
|
+
const D = [...d];
|
|
527
|
+
return D[y] = c, D;
|
|
516
528
|
}
|
|
517
529
|
return d;
|
|
518
|
-
}), N(c),
|
|
530
|
+
}), N(c), A(c), !0;
|
|
519
531
|
}).catch(() => !1);
|
|
520
532
|
} else
|
|
521
|
-
return !f && !
|
|
533
|
+
return !f && !M && h ? t !== "CONFIRM" && u === "pending" || u === "nocode" || u === "hascode" || u === "" && (h.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (h.labels && (h.labels = h.labels.filter((r) => !!r.id)), e !== void 0 && (h.confirmStatus = e, h.isLabeled = ((i = h.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(a, l.id, [h], e).then(() => (k.success({
|
|
522
534
|
content: "保存成功"
|
|
523
|
-
}), H((
|
|
524
|
-
const c =
|
|
525
|
-
return c > -1 && (
|
|
535
|
+
}), H((r) => {
|
|
536
|
+
const c = r.findIndex((d) => d.id === (h == null ? void 0 : h.id));
|
|
537
|
+
return c > -1 && (r[c] = h), [...r];
|
|
526
538
|
}), N(b({}, h)), !0)).catch(() => !1)) : Promise.resolve(!0);
|
|
527
539
|
}, Ut = (e, t) => {
|
|
528
540
|
if (f && f.labels.some((n) => !n.id))
|
|
529
|
-
return
|
|
541
|
+
return k.error("所有标注需设置标签"), Promise.resolve(!1);
|
|
530
542
|
it(e, t);
|
|
531
543
|
}, qt = (e) => {
|
|
532
544
|
if (f && f.labels.some((t) => !t.id)) {
|
|
533
|
-
|
|
545
|
+
k.error("所有标注需设置标签");
|
|
534
546
|
return;
|
|
535
547
|
}
|
|
536
548
|
if (!f) {
|
|
537
|
-
|
|
549
|
+
Z(!1);
|
|
538
550
|
return;
|
|
539
551
|
}
|
|
540
|
-
|
|
541
|
-
t && (
|
|
552
|
+
De(e).then((t) => {
|
|
553
|
+
t && (A(void 0), Z(!1), L(), q());
|
|
542
554
|
});
|
|
543
555
|
}, Kt = () => {
|
|
544
|
-
|
|
556
|
+
Ne.confirm({
|
|
545
557
|
title: "确认要删除当前数据吗?",
|
|
546
558
|
content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
|
|
547
559
|
onOk: () => {
|
|
548
|
-
!h || !
|
|
560
|
+
!h || !l || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, l.id, h.id).then(() => {
|
|
549
561
|
const e = v.findIndex((n) => n.id === h.id);
|
|
550
562
|
v.splice(e, 1);
|
|
551
563
|
const t = v.length;
|
|
552
|
-
H([...v]), R(S(b({},
|
|
553
|
-
total:
|
|
554
|
-
})), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]),
|
|
564
|
+
H([...v]), R(S(b({}, o), {
|
|
565
|
+
total: o.total ? o.total - 1 : 0
|
|
566
|
+
})), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]), z(e - 1)), L(), A(void 0), (t === 0 || o.total && o.total - 1 === 0) && (N(void 0), A(void 0), z(-1), ue || he(!1), setTimeout(() => {
|
|
555
567
|
R((n) => S(b({}, n), {
|
|
556
568
|
current: 1,
|
|
557
569
|
type: void 0
|
|
@@ -562,7 +574,7 @@ const pr = (L) => {
|
|
|
562
574
|
});
|
|
563
575
|
}, ot = [{
|
|
564
576
|
key: "",
|
|
565
|
-
label: `全部(${
|
|
577
|
+
label: `全部(${Y})`,
|
|
566
578
|
children: null
|
|
567
579
|
}, {
|
|
568
580
|
key: "nocode",
|
|
@@ -574,7 +586,7 @@ const pr = (L) => {
|
|
|
574
586
|
children: null
|
|
575
587
|
}, {
|
|
576
588
|
key: "hascode",
|
|
577
|
-
label: `已标注(${
|
|
589
|
+
label: `已标注(${Y - de - fe})`,
|
|
578
590
|
children: null
|
|
579
591
|
}], Wt = () => {
|
|
580
592
|
var e, t;
|
|
@@ -584,32 +596,32 @@ const pr = (L) => {
|
|
|
584
596
|
}, $t = (e) => {
|
|
585
597
|
At(e), ne();
|
|
586
598
|
}, lt = (e) => {
|
|
587
|
-
if (pe.current++,
|
|
588
|
-
const n =
|
|
589
|
-
!!n && n.page > 1 && (
|
|
590
|
-
index:
|
|
591
|
-
page:
|
|
599
|
+
if (pe.current++, U.current++, F >= 0 && u !== void 0 && u !== null) {
|
|
600
|
+
const n = X.current[u];
|
|
601
|
+
!!n && n.page > 1 && (o.current || 1) === 1 || (X.current[u] = {
|
|
602
|
+
index: F,
|
|
603
|
+
page: o.current || 1
|
|
592
604
|
});
|
|
593
605
|
}
|
|
594
|
-
ne(), e !== u &&
|
|
595
|
-
const t = (
|
|
596
|
-
f ?
|
|
597
|
-
n ? (
|
|
598
|
-
}) : (
|
|
606
|
+
ne(), e !== u && xe(!0);
|
|
607
|
+
const t = (o.current || 1) !== 1;
|
|
608
|
+
f ? De(f == null ? void 0 : f.confirmStatus).then((n) => {
|
|
609
|
+
n ? (we.current = t, Pe(e), L()) : (xe(!1), k.error("保存失败"));
|
|
610
|
+
}) : (we.current = t, R(S(b({}, o), {
|
|
599
611
|
current: 1,
|
|
600
612
|
total: void 0
|
|
601
|
-
})),
|
|
613
|
+
})), Pe(e)), e === "nocode" && ze([]);
|
|
602
614
|
}, jt = () => {
|
|
603
|
-
if (console.log("一键确认", g,
|
|
615
|
+
if (console.log("一键确认", g, l), !(g != null && g.cvforceDatahub) || !(l != null && l.id))
|
|
604
616
|
return Promise.resolve(!1);
|
|
605
|
-
|
|
617
|
+
Ne.confirm({
|
|
606
618
|
title: "一键保存所有标注?",
|
|
607
619
|
content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
|
|
608
620
|
onOk: () => {
|
|
609
|
-
g.cvforceDatahub.getAllConfirmSamples(a,
|
|
610
|
-
|
|
621
|
+
g.cvforceDatahub.getAllConfirmSamples(a, l.id).then((e) => {
|
|
622
|
+
k.success("保存成功"), E(S(b({}, o), {
|
|
611
623
|
current: 1
|
|
612
|
-
})),
|
|
624
|
+
})), L();
|
|
613
625
|
});
|
|
614
626
|
}
|
|
615
627
|
});
|
|
@@ -622,9 +634,9 @@ const pr = (L) => {
|
|
|
622
634
|
t.add(n.id);
|
|
623
635
|
}) : v.forEach((n) => {
|
|
624
636
|
t.delete(n.id);
|
|
625
|
-
}), Fe(t),
|
|
637
|
+
}), Fe(t), Le(e);
|
|
626
638
|
}, ne = () => {
|
|
627
|
-
Fe(/* @__PURE__ */ new Set()),
|
|
639
|
+
Fe(/* @__PURE__ */ new Set()), Le(!1);
|
|
628
640
|
}, st = () => {
|
|
629
641
|
const e = v.filter((n) => P.has(n.id)), t = {
|
|
630
642
|
nocode: 0,
|
|
@@ -635,23 +647,23 @@ const pr = (L) => {
|
|
|
635
647
|
n.confirmStatus === 1 ? t.pending++ : !n.labels || n.labels.length === 0 ? t.nocode++ : t.hascode++;
|
|
636
648
|
}), t;
|
|
637
649
|
}, _t = () => {
|
|
638
|
-
if (!
|
|
650
|
+
if (!Ce)
|
|
639
651
|
return;
|
|
640
652
|
if (P.size === 0) {
|
|
641
|
-
|
|
653
|
+
k.warning("请先选择要删除的图片");
|
|
642
654
|
return;
|
|
643
655
|
}
|
|
644
|
-
const e = st(), t = e.nocode > 0, n = e.pending > 0,
|
|
656
|
+
const e = st(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ p("div", {
|
|
645
657
|
children: [/* @__PURE__ */ s("p", {
|
|
646
658
|
style: {
|
|
647
659
|
marginBottom: 16
|
|
648
660
|
},
|
|
649
661
|
children: "所选类型下的数量统计:"
|
|
650
|
-
}), /* @__PURE__ */
|
|
662
|
+
}), /* @__PURE__ */ p("div", {
|
|
651
663
|
style: {
|
|
652
664
|
marginBottom: 16
|
|
653
665
|
},
|
|
654
|
-
children: [t && /* @__PURE__ */
|
|
666
|
+
children: [t && /* @__PURE__ */ p("div", {
|
|
655
667
|
style: {
|
|
656
668
|
display: "flex",
|
|
657
669
|
alignItems: "center",
|
|
@@ -668,10 +680,10 @@ const pr = (L) => {
|
|
|
668
680
|
fontSize: 12
|
|
669
681
|
},
|
|
670
682
|
children: "未标注"
|
|
671
|
-
}), /* @__PURE__ */
|
|
683
|
+
}), /* @__PURE__ */ p("span", {
|
|
672
684
|
children: [e.nocode, "张"]
|
|
673
685
|
})]
|
|
674
|
-
}), n && /* @__PURE__ */
|
|
686
|
+
}), n && /* @__PURE__ */ p("div", {
|
|
675
687
|
style: {
|
|
676
688
|
display: "flex",
|
|
677
689
|
alignItems: "center",
|
|
@@ -688,10 +700,10 @@ const pr = (L) => {
|
|
|
688
700
|
fontSize: 12
|
|
689
701
|
},
|
|
690
702
|
children: "待确认"
|
|
691
|
-
}), /* @__PURE__ */
|
|
703
|
+
}), /* @__PURE__ */ p("span", {
|
|
692
704
|
children: [e.pending, "张"]
|
|
693
705
|
})]
|
|
694
|
-
}),
|
|
706
|
+
}), i && /* @__PURE__ */ p("div", {
|
|
695
707
|
style: {
|
|
696
708
|
display: "flex",
|
|
697
709
|
alignItems: "center",
|
|
@@ -708,7 +720,7 @@ const pr = (L) => {
|
|
|
708
720
|
fontSize: 12
|
|
709
721
|
},
|
|
710
722
|
children: "已标注"
|
|
711
|
-
}), /* @__PURE__ */
|
|
723
|
+
}), /* @__PURE__ */ p("span", {
|
|
712
724
|
children: [e.hascode, "张"]
|
|
713
725
|
})]
|
|
714
726
|
})]
|
|
@@ -719,47 +731,47 @@ const pr = (L) => {
|
|
|
719
731
|
children: "彻底移除选中的图片文件及其关联的所有标注坐标、标签信息。数据不可恢复。"
|
|
720
732
|
})]
|
|
721
733
|
});
|
|
722
|
-
|
|
734
|
+
Ne.confirm({
|
|
723
735
|
title: "删除操作确认",
|
|
724
|
-
content:
|
|
736
|
+
content: r,
|
|
725
737
|
okText: "确定",
|
|
726
738
|
cancelText: "取消",
|
|
727
739
|
width: 500,
|
|
728
740
|
onOk: () => He(void 0, null, function* () {
|
|
729
|
-
if (!
|
|
741
|
+
if (!l)
|
|
730
742
|
return;
|
|
731
743
|
const c = Array.from(P);
|
|
732
744
|
if (c.length === 0) {
|
|
733
|
-
|
|
745
|
+
k.warning("没有选中的图片");
|
|
734
746
|
return;
|
|
735
747
|
}
|
|
736
748
|
try {
|
|
737
|
-
yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a,
|
|
749
|
+
yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, l.id, c), k.success("删除成功"), ne(), E(S(b({}, o), {
|
|
738
750
|
current: 1
|
|
739
|
-
})),
|
|
751
|
+
})), L(), q();
|
|
740
752
|
} catch (d) {
|
|
741
|
-
|
|
753
|
+
k.error("删除失败");
|
|
742
754
|
}
|
|
743
755
|
})
|
|
744
756
|
});
|
|
745
757
|
}, Xt = () => {
|
|
746
|
-
if (!
|
|
758
|
+
if (!G)
|
|
747
759
|
return;
|
|
748
760
|
if (P.size === 0) {
|
|
749
|
-
|
|
761
|
+
k.warning("请先选择要清除标注的图片");
|
|
750
762
|
return;
|
|
751
763
|
}
|
|
752
|
-
const e = st(), t = e.nocode > 0, n = e.pending > 0,
|
|
764
|
+
const e = st(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ p("div", {
|
|
753
765
|
children: [/* @__PURE__ */ s("p", {
|
|
754
766
|
style: {
|
|
755
767
|
marginBottom: 16
|
|
756
768
|
},
|
|
757
769
|
children: "所选类型下的数量统计:"
|
|
758
|
-
}), /* @__PURE__ */
|
|
770
|
+
}), /* @__PURE__ */ p("div", {
|
|
759
771
|
style: {
|
|
760
772
|
marginBottom: 16
|
|
761
773
|
},
|
|
762
|
-
children: [t && /* @__PURE__ */
|
|
774
|
+
children: [t && /* @__PURE__ */ p("div", {
|
|
763
775
|
style: {
|
|
764
776
|
display: "flex",
|
|
765
777
|
alignItems: "center",
|
|
@@ -776,10 +788,10 @@ const pr = (L) => {
|
|
|
776
788
|
fontSize: 12
|
|
777
789
|
},
|
|
778
790
|
children: "未标注"
|
|
779
|
-
}), /* @__PURE__ */
|
|
791
|
+
}), /* @__PURE__ */ p("span", {
|
|
780
792
|
children: [e.nocode, "张"]
|
|
781
793
|
})]
|
|
782
|
-
}), n && /* @__PURE__ */
|
|
794
|
+
}), n && /* @__PURE__ */ p("div", {
|
|
783
795
|
style: {
|
|
784
796
|
display: "flex",
|
|
785
797
|
alignItems: "center",
|
|
@@ -796,10 +808,10 @@ const pr = (L) => {
|
|
|
796
808
|
fontSize: 12
|
|
797
809
|
},
|
|
798
810
|
children: "待确认"
|
|
799
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ p("span", {
|
|
800
812
|
children: [e.pending, "张"]
|
|
801
813
|
})]
|
|
802
|
-
}),
|
|
814
|
+
}), i && /* @__PURE__ */ p("div", {
|
|
803
815
|
style: {
|
|
804
816
|
display: "flex",
|
|
805
817
|
alignItems: "center",
|
|
@@ -816,7 +828,7 @@ const pr = (L) => {
|
|
|
816
828
|
fontSize: 12
|
|
817
829
|
},
|
|
818
830
|
children: "已标注"
|
|
819
|
-
}), /* @__PURE__ */
|
|
831
|
+
}), /* @__PURE__ */ p("span", {
|
|
820
832
|
children: [e.hascode, "张"]
|
|
821
833
|
})]
|
|
822
834
|
})]
|
|
@@ -824,18 +836,18 @@ const pr = (L) => {
|
|
|
824
836
|
children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
|
|
825
837
|
})]
|
|
826
838
|
});
|
|
827
|
-
|
|
839
|
+
Ne.confirm({
|
|
828
840
|
title: "删除操作确认",
|
|
829
|
-
content:
|
|
841
|
+
content: r,
|
|
830
842
|
okText: "确定",
|
|
831
843
|
cancelText: "取消",
|
|
832
844
|
width: 500,
|
|
833
845
|
onOk: () => He(void 0, null, function* () {
|
|
834
|
-
if (!
|
|
846
|
+
if (!l)
|
|
835
847
|
return;
|
|
836
848
|
const c = v.filter((d) => P.has(d.id));
|
|
837
849
|
if (c.length === 0) {
|
|
838
|
-
|
|
850
|
+
k.warning("没有选中的图片");
|
|
839
851
|
return;
|
|
840
852
|
}
|
|
841
853
|
try {
|
|
@@ -844,38 +856,38 @@ const pr = (L) => {
|
|
|
844
856
|
confirmStatus: 0,
|
|
845
857
|
isLabeled: !1
|
|
846
858
|
}));
|
|
847
|
-
yield g.cvforceDatahub.updateSamples(a,
|
|
859
|
+
yield g.cvforceDatahub.updateSamples(a, l.id, d, 0), k.success("清除标注成功"), ne(), E(S(b({}, o), {
|
|
848
860
|
current: 1
|
|
849
|
-
})),
|
|
861
|
+
})), L(), q();
|
|
850
862
|
} catch (d) {
|
|
851
|
-
|
|
863
|
+
k.error("清除标注失败");
|
|
852
864
|
}
|
|
853
865
|
})
|
|
854
866
|
});
|
|
855
|
-
}, Jt = [...
|
|
867
|
+
}, Jt = [...Ce ? [{
|
|
856
868
|
key: "deleteWithAnnotations",
|
|
857
869
|
label: "删除所选图片(含标注)",
|
|
858
870
|
onClick: _t
|
|
859
|
-
}] : [], ...
|
|
871
|
+
}] : [], ...G ? [{
|
|
860
872
|
key: "clearAnnotations",
|
|
861
873
|
label: "仅清除所选图片内的标注",
|
|
862
874
|
onClick: Xt
|
|
863
|
-
}] : []], ct = !h && !!(T && T.preLabel) && !!(
|
|
875
|
+
}] : []], ct = !h && !!(T && T.preLabel) && !!(l != null && l.id), Qt = G || ct;
|
|
864
876
|
return /* @__PURE__ */ s(sn, {
|
|
865
|
-
locale:
|
|
877
|
+
locale: pn,
|
|
866
878
|
children: /* @__PURE__ */ s(bn.Provider, {
|
|
867
879
|
value: {
|
|
868
880
|
datasetId: a,
|
|
869
|
-
versionId: (
|
|
870
|
-
no: (
|
|
881
|
+
versionId: (l == null ? void 0 : l.id) || "",
|
|
882
|
+
no: (l == null ? void 0 : l.no) || "",
|
|
871
883
|
loading: qe,
|
|
872
|
-
version:
|
|
873
|
-
versions:
|
|
884
|
+
version: l,
|
|
885
|
+
versions: Ie,
|
|
874
886
|
samples: v,
|
|
875
|
-
pagination:
|
|
887
|
+
pagination: o,
|
|
876
888
|
services: g,
|
|
877
889
|
featuresConfig: {
|
|
878
|
-
labelManager:
|
|
890
|
+
labelManager: Se,
|
|
879
891
|
datasetManager: T,
|
|
880
892
|
annotation: oe,
|
|
881
893
|
filterSwitch: se,
|
|
@@ -883,71 +895,71 @@ const pr = (L) => {
|
|
|
883
895
|
exampleSrcRoot: le
|
|
884
896
|
}
|
|
885
897
|
},
|
|
886
|
-
children:
|
|
898
|
+
children: x ? x.markType === "detection" ? /* @__PURE__ */ s("div", {
|
|
887
899
|
className: "detection-version-detail",
|
|
888
|
-
children: Pt ?
|
|
900
|
+
children: Pt ? l != null && l.id && T && T.preLabel ? /* @__PURE__ */ s(xn, {
|
|
889
901
|
datasetId: a,
|
|
890
|
-
versionId:
|
|
902
|
+
versionId: l.id,
|
|
891
903
|
onClose: () => {
|
|
892
|
-
Vt(!1), Be(),
|
|
904
|
+
Vt(!1), Be(), q(), L(), E();
|
|
893
905
|
},
|
|
894
906
|
samples: v,
|
|
895
|
-
labels:
|
|
907
|
+
labels: B,
|
|
896
908
|
fetchLength: Be
|
|
897
|
-
}) : null : /* @__PURE__ */
|
|
909
|
+
}) : null : /* @__PURE__ */ p(wn, {
|
|
898
910
|
className: "product-details-page",
|
|
899
911
|
header: I === !1 ? void 0 : /* @__PURE__ */ s(Dn, {
|
|
900
|
-
backTo:
|
|
912
|
+
backTo: ye,
|
|
901
913
|
onBackClick: I != null && I.onBackClick ? () => {
|
|
902
914
|
h && te(), I.onBackClick && I.onBackClick();
|
|
903
915
|
} : void 0,
|
|
904
|
-
left: !qe && /* @__PURE__ */
|
|
916
|
+
left: !qe && /* @__PURE__ */ p(ve, {
|
|
905
917
|
children: [/* @__PURE__ */ s("span", {
|
|
906
918
|
style: {
|
|
907
919
|
fontWeight: "bold"
|
|
908
920
|
},
|
|
909
|
-
children:
|
|
921
|
+
children: x == null ? void 0 : x.name
|
|
910
922
|
}), /* @__PURE__ */ s(cn, {
|
|
911
923
|
disabled: (I == null ? void 0 : I.versionSelect) === !1,
|
|
912
|
-
value:
|
|
924
|
+
value: l == null ? void 0 : l.id,
|
|
913
925
|
style: {
|
|
914
926
|
width: 70
|
|
915
927
|
},
|
|
916
|
-
options:
|
|
928
|
+
options: Ie.map((e) => ({
|
|
917
929
|
label: e.no,
|
|
918
930
|
value: e.id
|
|
919
931
|
})),
|
|
920
932
|
onChange: (e) => {
|
|
921
|
-
const t =
|
|
922
|
-
if (!
|
|
933
|
+
const t = Ie.find((i) => i.id === e);
|
|
934
|
+
if (!x || !t)
|
|
923
935
|
return;
|
|
924
|
-
const n =
|
|
936
|
+
const n = Ie.find((i) => i.id === t.id);
|
|
925
937
|
ae(n), ne(), I != null && I.onVersionChange && I.onVersionChange(n);
|
|
926
938
|
}
|
|
927
939
|
})]
|
|
928
940
|
}),
|
|
929
|
-
right: /* @__PURE__ */
|
|
930
|
-
children: [!h && T && T.add && /* @__PURE__ */ s(
|
|
931
|
-
isPreLabel:
|
|
941
|
+
right: /* @__PURE__ */ p(ve, {
|
|
942
|
+
children: [!h && T && T.add && /* @__PURE__ */ s(mt, {
|
|
943
|
+
isPreLabel: M,
|
|
932
944
|
placement: "bottom",
|
|
933
945
|
children: /* @__PURE__ */ s(re, {
|
|
934
946
|
type: "default",
|
|
935
|
-
onClick: () =>
|
|
936
|
-
disabled:
|
|
947
|
+
onClick: () => Ve(!0),
|
|
948
|
+
disabled: _ === ie.Pending || _ === ie.Started || M,
|
|
937
949
|
children: "导入数据"
|
|
938
950
|
}, "del")
|
|
939
951
|
}), Qt && /* @__PURE__ */ s(ut, {
|
|
940
952
|
menu: {
|
|
941
|
-
items: [...
|
|
953
|
+
items: [...G ? [{
|
|
942
954
|
key: "manual",
|
|
943
|
-
label: /* @__PURE__ */ s(
|
|
944
|
-
isPreLabel:
|
|
945
|
-
children: /* @__PURE__ */ s(
|
|
955
|
+
label: /* @__PURE__ */ s(mt, {
|
|
956
|
+
isPreLabel: M,
|
|
957
|
+
children: /* @__PURE__ */ s(ve, {
|
|
946
958
|
children: /* @__PURE__ */ s(re, {
|
|
947
959
|
type: "text",
|
|
948
|
-
disabled:
|
|
960
|
+
disabled: M,
|
|
949
961
|
onClick: () => {
|
|
950
|
-
h ||
|
|
962
|
+
h || Pe("nocode"), Z(!0), z(-1), u === "nocode" && (z(0), N(v[0])), he(!0);
|
|
951
963
|
},
|
|
952
964
|
children: "人工标注"
|
|
953
965
|
})
|
|
@@ -958,7 +970,7 @@ const pr = (L) => {
|
|
|
958
970
|
label: /* @__PURE__ */ s(Pn, {
|
|
959
971
|
buttonType: "text",
|
|
960
972
|
datasetId: a,
|
|
961
|
-
versionId: (
|
|
973
|
+
versionId: (l == null ? void 0 : l.id) || "",
|
|
962
974
|
disabled: !v.length,
|
|
963
975
|
setIsTaskChange: Rt,
|
|
964
976
|
datasetType: "detection",
|
|
@@ -967,42 +979,42 @@ const pr = (L) => {
|
|
|
967
979
|
} : null]
|
|
968
980
|
},
|
|
969
981
|
placement: "bottom",
|
|
970
|
-
children: /* @__PURE__ */
|
|
982
|
+
children: /* @__PURE__ */ p(re, {
|
|
971
983
|
type: "primary",
|
|
972
|
-
children: ["开始标注", /* @__PURE__ */ s(
|
|
984
|
+
children: ["开始标注", /* @__PURE__ */ s(pt, {})]
|
|
973
985
|
})
|
|
974
986
|
}), /* @__PURE__ */ s(Rn, {
|
|
975
987
|
when: kt,
|
|
976
988
|
content: "确认要离开此页面吗?",
|
|
977
989
|
subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
|
|
978
|
-
}), Ge && /* @__PURE__ */ s(
|
|
979
|
-
datasetIam:
|
|
990
|
+
}), Ge && /* @__PURE__ */ s(Ln, {
|
|
991
|
+
datasetIam: St,
|
|
980
992
|
datasetId: a,
|
|
981
|
-
currentVersion:
|
|
982
|
-
tenCode:
|
|
993
|
+
currentVersion: l,
|
|
994
|
+
tenCode: x == null ? void 0 : x.tenantCode,
|
|
983
995
|
isVisible: Ge,
|
|
984
|
-
setIsVisible:
|
|
985
|
-
getVersionListRequest:
|
|
996
|
+
setIsVisible: Ve,
|
|
997
|
+
getVersionListRequest: L,
|
|
986
998
|
setIsConfirm: xt,
|
|
987
999
|
onUploadStatusChange: (e) => {
|
|
988
1000
|
It(e);
|
|
989
1001
|
},
|
|
990
1002
|
tableReload: () => {
|
|
991
1003
|
var e, t, n;
|
|
992
|
-
|
|
1004
|
+
l != null && l.id && ((t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
|
|
993
1005
|
top: 0
|
|
994
|
-
}),
|
|
1006
|
+
}), E(S(b({}, o), {
|
|
995
1007
|
current: 1
|
|
996
|
-
})), (n =
|
|
1008
|
+
})), (n = Re.current) == null || n.fetchLabels());
|
|
997
1009
|
},
|
|
998
1010
|
loadVersionData: rt,
|
|
999
|
-
markType:
|
|
1011
|
+
markType: x.markType
|
|
1000
1012
|
})]
|
|
1001
1013
|
})
|
|
1002
1014
|
}),
|
|
1003
|
-
children: [/* @__PURE__ */
|
|
1015
|
+
children: [/* @__PURE__ */ p("div", {
|
|
1004
1016
|
className: "detection-header",
|
|
1005
|
-
children: [/* @__PURE__ */
|
|
1017
|
+
children: [/* @__PURE__ */ p(ve, {
|
|
1006
1018
|
children: [se.tabs && /* @__PURE__ */ s(an, {
|
|
1007
1019
|
className: "header-tab",
|
|
1008
1020
|
activeKey: u,
|
|
@@ -1017,89 +1029,89 @@ const pr = (L) => {
|
|
|
1017
1029
|
value: ge,
|
|
1018
1030
|
onChange: $t,
|
|
1019
1031
|
allowClear: !0
|
|
1020
|
-
}), !h &&
|
|
1032
|
+
}), !h && Te && /* @__PURE__ */ s(ut, {
|
|
1021
1033
|
menu: {
|
|
1022
1034
|
items: Jt
|
|
1023
1035
|
},
|
|
1024
1036
|
disabled: P.size === 0,
|
|
1025
|
-
children: /* @__PURE__ */
|
|
1037
|
+
children: /* @__PURE__ */ p(re, {
|
|
1026
1038
|
size: "middle",
|
|
1027
1039
|
disabled: P.size === 0,
|
|
1028
|
-
children: ["删除", /* @__PURE__ */ s(
|
|
1040
|
+
children: ["删除", /* @__PURE__ */ s(pt, {})]
|
|
1029
1041
|
})
|
|
1030
|
-
}), !h &&
|
|
1042
|
+
}), !h && Te && /* @__PURE__ */ p(ft, {
|
|
1031
1043
|
children: [/* @__PURE__ */ s(ht, {
|
|
1032
1044
|
checked: Et,
|
|
1033
1045
|
onChange: (e) => Zt(e.target.checked),
|
|
1034
1046
|
children: "选择当前页"
|
|
1035
|
-
}), P.size > 0 && /* @__PURE__ */
|
|
1047
|
+
}), P.size > 0 && /* @__PURE__ */ p("span", {
|
|
1036
1048
|
style: {
|
|
1037
1049
|
color: "#666"
|
|
1038
1050
|
},
|
|
1039
|
-
children: ["已选中", P.size, "张,共",
|
|
1051
|
+
children: ["已选中", P.size, "张,共", o.total || 0, "张"]
|
|
1040
1052
|
})]
|
|
1041
1053
|
})]
|
|
1042
|
-
}), /* @__PURE__ */ s(
|
|
1043
|
-
children: u === "pending" &&
|
|
1054
|
+
}), /* @__PURE__ */ s(ve, {
|
|
1055
|
+
children: u === "pending" && G && /* @__PURE__ */ s(re, {
|
|
1044
1056
|
type: "primary",
|
|
1045
1057
|
className: "pending-confirm-button",
|
|
1046
1058
|
onClick: jt,
|
|
1047
1059
|
children: "一键确认"
|
|
1048
1060
|
})
|
|
1049
1061
|
})]
|
|
1050
|
-
}), /* @__PURE__ */
|
|
1062
|
+
}), /* @__PURE__ */ p("div", {
|
|
1051
1063
|
className: "d-row",
|
|
1052
|
-
children: [/* @__PURE__ */
|
|
1064
|
+
children: [/* @__PURE__ */ p("div", {
|
|
1053
1065
|
className: "d-right",
|
|
1054
1066
|
ref: ce,
|
|
1055
|
-
children: [
|
|
1067
|
+
children: [ee && /* @__PURE__ */ s(En, {
|
|
1056
1068
|
datasetId: a,
|
|
1057
|
-
isImageDetailVisible:
|
|
1069
|
+
isImageDetailVisible: ee,
|
|
1058
1070
|
setIsImageDetailVisible: he,
|
|
1059
1071
|
currentSample: f != null ? f : h,
|
|
1060
|
-
labels:
|
|
1072
|
+
labels: B,
|
|
1061
1073
|
previewMode: !ue,
|
|
1062
1074
|
filterItems: ot,
|
|
1063
1075
|
filterMode: u,
|
|
1064
1076
|
onFilterChange: lt,
|
|
1065
|
-
onChange:
|
|
1077
|
+
onChange: A,
|
|
1066
1078
|
onNextClick: (e) => it(e),
|
|
1067
1079
|
onPrevClick: (e) => Mt(e),
|
|
1068
1080
|
onSave: (e, t) => Ut(e, t),
|
|
1069
1081
|
onDeleteSample: () => Kt(),
|
|
1070
1082
|
onEnterEdit: () => {
|
|
1071
|
-
|
|
1083
|
+
Z(!0);
|
|
1072
1084
|
},
|
|
1073
1085
|
onBackToDetail: (e) => qt(e),
|
|
1074
1086
|
onLoadingChange: Ft,
|
|
1075
1087
|
switchingSample: Dt,
|
|
1076
1088
|
onRefresh: () => {
|
|
1077
1089
|
var e;
|
|
1078
|
-
(e =
|
|
1079
|
-
var n,
|
|
1090
|
+
(e = q()) == null || e.then((t) => {
|
|
1091
|
+
var n, i;
|
|
1080
1092
|
if (f) {
|
|
1081
|
-
const
|
|
1093
|
+
const r = [];
|
|
1082
1094
|
(n = f.labels) == null || n.forEach((c) => {
|
|
1083
|
-
t != null && t.find((d) => d.id === c.id) &&
|
|
1084
|
-
}), f.labels =
|
|
1095
|
+
t != null && t.find((d) => d.id === c.id) && r.push(c);
|
|
1096
|
+
}), f.labels = r, A(b({}, f));
|
|
1085
1097
|
}
|
|
1086
1098
|
if (h) {
|
|
1087
|
-
const
|
|
1088
|
-
(
|
|
1089
|
-
t != null && t.find((d) => d.id === c.id) &&
|
|
1090
|
-
}), h.labels =
|
|
1099
|
+
const r = [];
|
|
1100
|
+
(i = h.labels) == null || i.forEach((c) => {
|
|
1101
|
+
t != null && t.find((d) => d.id === c.id) && r.push(c);
|
|
1102
|
+
}), h.labels = r, N(b({}, h));
|
|
1091
1103
|
}
|
|
1092
|
-
}),
|
|
1104
|
+
}), L();
|
|
1093
1105
|
},
|
|
1094
|
-
isPreLabel:
|
|
1106
|
+
isPreLabel: M,
|
|
1095
1107
|
imgCount: {
|
|
1096
|
-
total:
|
|
1097
|
-
index:
|
|
1108
|
+
total: Y,
|
|
1109
|
+
index: F + 1
|
|
1098
1110
|
},
|
|
1099
|
-
settingHide: !
|
|
1100
|
-
canLabel:
|
|
1101
|
-
canDelete:
|
|
1102
|
-
}),
|
|
1111
|
+
settingHide: !Se,
|
|
1112
|
+
canLabel: G,
|
|
1113
|
+
canDelete: Ce
|
|
1114
|
+
}), o.total !== void 0 && o.total > 0 ? /* @__PURE__ */ s(ft, {
|
|
1103
1115
|
children: /* @__PURE__ */ s(gn, {
|
|
1104
1116
|
innerProps: {
|
|
1105
1117
|
className: "d-right-row"
|
|
@@ -1113,23 +1125,23 @@ const pr = (L) => {
|
|
|
1113
1125
|
return /* @__PURE__ */ s(dn, {
|
|
1114
1126
|
className: "d-right-col",
|
|
1115
1127
|
"data-sample-id": e.id,
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1128
|
+
children: /* @__PURE__ */ p("div", {
|
|
1117
1129
|
className: "right-col-wrapper",
|
|
1118
|
-
onMouseEnter: () =>
|
|
1119
|
-
onMouseLeave: () =>
|
|
1130
|
+
onMouseEnter: () => Ee(e.id),
|
|
1131
|
+
onMouseLeave: () => Ee(""),
|
|
1120
1132
|
children: [/* @__PURE__ */ s("div", {
|
|
1121
1133
|
className: "detection-status-wrapper",
|
|
1122
1134
|
children: /* @__PURE__ */ s(An, {
|
|
1123
1135
|
sample: e
|
|
1124
1136
|
})
|
|
1125
|
-
}),
|
|
1137
|
+
}), Te && /* @__PURE__ */ s("div", {
|
|
1126
1138
|
className: "sample-checkbox-wrapper",
|
|
1127
1139
|
children: /* @__PURE__ */ s(ht, {
|
|
1128
1140
|
checked: P.has(e.id),
|
|
1129
|
-
onChange: (
|
|
1130
|
-
|
|
1141
|
+
onChange: (i) => {
|
|
1142
|
+
i.stopPropagation(), Gt(e.id, i.target.checked);
|
|
1131
1143
|
},
|
|
1132
|
-
onClick: (
|
|
1144
|
+
onClick: (i) => i.stopPropagation()
|
|
1133
1145
|
})
|
|
1134
1146
|
}), /* @__PURE__ */ s("div", {
|
|
1135
1147
|
className: "right-col-img",
|
|
@@ -1139,16 +1151,16 @@ const pr = (L) => {
|
|
|
1139
1151
|
width: 124,
|
|
1140
1152
|
thumbnailUrl: e.thumbnailUrl
|
|
1141
1153
|
})
|
|
1142
|
-
}), /* @__PURE__ */
|
|
1154
|
+
}), /* @__PURE__ */ p("div", {
|
|
1143
1155
|
className: "right-col-text",
|
|
1144
1156
|
children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ s(fn, {
|
|
1145
1157
|
placement: "top",
|
|
1146
1158
|
title: /* @__PURE__ */ s("div", {
|
|
1147
|
-
children: Object.keys(e.labels.reduce((
|
|
1148
|
-
children:
|
|
1149
|
-
},
|
|
1159
|
+
children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ s("div", {
|
|
1160
|
+
children: i
|
|
1161
|
+
}, i))
|
|
1150
1162
|
}),
|
|
1151
|
-
children: /* @__PURE__ */
|
|
1163
|
+
children: /* @__PURE__ */ p("div", {
|
|
1152
1164
|
style: {
|
|
1153
1165
|
width: "100%",
|
|
1154
1166
|
display: "flex"
|
|
@@ -1186,18 +1198,18 @@ const pr = (L) => {
|
|
|
1186
1198
|
})
|
|
1187
1199
|
}) : /* @__PURE__ */ s("div", {
|
|
1188
1200
|
className: "empty",
|
|
1189
|
-
children:
|
|
1201
|
+
children: o.total === 0 ? /* @__PURE__ */ s(un, {
|
|
1190
1202
|
image: vn,
|
|
1191
|
-
description: /* @__PURE__ */
|
|
1203
|
+
description: /* @__PURE__ */ p("span", {
|
|
1192
1204
|
children: ["暂无数据", u !== "hascode" && !ge && /* @__PURE__ */ s("span", {
|
|
1193
|
-
children: T && T.add && /* @__PURE__ */
|
|
1205
|
+
children: T && T.add && /* @__PURE__ */ p(re, {
|
|
1194
1206
|
type: "link",
|
|
1195
1207
|
size: "small",
|
|
1196
1208
|
style: {
|
|
1197
1209
|
padding: 0
|
|
1198
1210
|
},
|
|
1199
|
-
onClick: () =>
|
|
1200
|
-
disabled:
|
|
1211
|
+
onClick: () => Ve(!0),
|
|
1212
|
+
disabled: _ === ie.Pending || _ === ie.Started,
|
|
1201
1213
|
children: [/* @__PURE__ */ s("span", {
|
|
1202
1214
|
style: {
|
|
1203
1215
|
color: "black"
|
|
@@ -1212,35 +1224,35 @@ const pr = (L) => {
|
|
|
1212
1224
|
}), u !== "nocode" && se.labels && /* @__PURE__ */ s("div", {
|
|
1213
1225
|
className: "d-sider",
|
|
1214
1226
|
children: /* @__PURE__ */ s(Cn, {
|
|
1215
|
-
ref:
|
|
1227
|
+
ref: Re,
|
|
1216
1228
|
datasetId: a,
|
|
1217
|
-
data:
|
|
1229
|
+
data: B || [],
|
|
1218
1230
|
showStatColumns: !0,
|
|
1219
|
-
selected:
|
|
1231
|
+
selected: $,
|
|
1220
1232
|
onSelectedChange: (e) => {
|
|
1221
|
-
ne(),
|
|
1233
|
+
ne(), ze((B == null ? void 0 : B.filter((t) => e.find((n) => n.label === t.label))) || []);
|
|
1222
1234
|
},
|
|
1223
1235
|
onListChange: (e) => {
|
|
1224
|
-
if (!
|
|
1236
|
+
if (!l)
|
|
1225
1237
|
return;
|
|
1226
1238
|
let t = 2;
|
|
1227
|
-
u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a,
|
|
1239
|
+
u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
|
|
1228
1240
|
confirmStatus: t
|
|
1229
1241
|
}).then((n) => {
|
|
1230
|
-
const
|
|
1231
|
-
var
|
|
1242
|
+
const r = (n || []).filter((d) => d.label !== "nocode").map((d, y) => {
|
|
1243
|
+
var D;
|
|
1232
1244
|
return {
|
|
1233
1245
|
label: d.label,
|
|
1234
1246
|
count: d.count,
|
|
1235
|
-
boxCount: (
|
|
1247
|
+
boxCount: (D = d.boxCount) != null ? D : 0,
|
|
1236
1248
|
id: d.id,
|
|
1237
1249
|
color: gt[y % 40]
|
|
1238
1250
|
};
|
|
1239
|
-
}), c =
|
|
1240
|
-
Xe(
|
|
1241
|
-
}),
|
|
1251
|
+
}), c = $.filter((d) => r.some((y) => y.id === d.id));
|
|
1252
|
+
Xe(r), $.length !== c.length && ze(c);
|
|
1253
|
+
}), L();
|
|
1242
1254
|
},
|
|
1243
|
-
isPreLabel:
|
|
1255
|
+
isPreLabel: M
|
|
1244
1256
|
})
|
|
1245
1257
|
})]
|
|
1246
1258
|
})]
|
|
@@ -1257,5 +1269,5 @@ const pr = (L) => {
|
|
|
1257
1269
|
};
|
|
1258
1270
|
export {
|
|
1259
1271
|
Bn as ISampleActionType,
|
|
1260
|
-
|
|
1272
|
+
mr as default
|
|
1261
1273
|
};
|