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