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