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