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