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