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