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