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