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