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