@glodon-aiot/dataset-annotation 3.13.0-alpha.27 → 3.13.0-alpha.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/DetectionAnnotation/components/ImageModal/index.mjs +54 -54
- package/dist/es/components/DetectionAnnotation/index.mjs +362 -359
- package/dist/es/index.mjs +1 -1
- package/dist/lib/index.js +4 -4
- package/dist/src/components/DetectionAnnotation/components/ImageModal/index.d.ts +0 -1
- package/package.json +2 -2
|
@@ -1,345 +1,344 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var ft = Object.defineProperty, ut = Object.defineProperties;
|
|
2
|
+
var ht = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var Ae = Object.getOwnPropertySymbols;
|
|
4
|
+
var mt = Object.prototype.hasOwnProperty, gt = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ee = (N, f, o) => f in N ? ft(N, f, { enumerable: !0, configurable: !0, writable: !0, value: o }) : N[f] = o, m = (N, f) => {
|
|
6
6
|
for (var o in f || (f = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var o of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
import { jsx as s, jsxs as
|
|
14
|
-
import { useRef as
|
|
15
|
-
import { message as
|
|
16
|
-
import
|
|
17
|
-
import { UploadZipsStatus as
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
7
|
+
mt.call(f, o) && Ee(N, o, f[o]);
|
|
8
|
+
if (Ae)
|
|
9
|
+
for (var o of Ae(f))
|
|
10
|
+
gt.call(f, o) && Ee(N, o, f[o]);
|
|
11
|
+
return N;
|
|
12
|
+
}, S = (N, f) => ut(N, ht(f));
|
|
13
|
+
import { jsx as s, jsxs as V, Fragment as ze } from "react/jsx-runtime";
|
|
14
|
+
import { useRef as pt, useState as d, useEffect as u } from "react";
|
|
15
|
+
import { message as z, ConfigProvider as bt, Space as te, Select as vt, Button as ie, Tabs as St, Col as Ct, Tooltip as yt, Empty as It, Spin as Lt, Modal as Dt } from "antd";
|
|
16
|
+
import kt from "rc-virtual-list";
|
|
17
|
+
import { UploadZipsStatus as U, PreLabelTaskStatus as Tt } from "@glodon-aiot/apis";
|
|
18
|
+
import xt from "antd/es/locale/zh_CN";
|
|
19
|
+
import Vt from "../../DatasetContext/index.mjs";
|
|
20
|
+
import Nt from "./icon_item_empty.svg.mjs";
|
|
21
21
|
import "./style.less.mjs";
|
|
22
|
-
import { tagColors as
|
|
23
|
-
import
|
|
24
|
-
import { useKeyPress as
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import { SearchOutlined as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import { Prompt as
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import { DEFAULT_FILTER_SWITCH as
|
|
37
|
-
import
|
|
38
|
-
const
|
|
39
|
-
var
|
|
22
|
+
import { tagColors as Me } from "../../utils/index.mjs";
|
|
23
|
+
import Pt from "./components/Labels/index.mjs";
|
|
24
|
+
import { useKeyPress as wt } from "ahooks";
|
|
25
|
+
import Re from "./components/DisabledTooltip/index.mjs";
|
|
26
|
+
import At from "./PreSamplesPage/index.mjs";
|
|
27
|
+
import { SearchOutlined as Et } from "@ant-design/icons";
|
|
28
|
+
import zt from "../../Common/Page/index.mjs";
|
|
29
|
+
import Mt from "../PicZipImportModal/index.mjs";
|
|
30
|
+
import Rt from "../PageNav/index.mjs";
|
|
31
|
+
import Bt from "../Thumbnail/index.mjs";
|
|
32
|
+
import Ot from "../CompositionInput/index.mjs";
|
|
33
|
+
import { Prompt as Ft } from "../hooks/Prompt.mjs";
|
|
34
|
+
import Ht from "../PreLabelOCR/index.mjs";
|
|
35
|
+
import Kt from "lodash/merge";
|
|
36
|
+
import { DEFAULT_FILTER_SWITCH as Ut } from "../../constant.mjs";
|
|
37
|
+
import jt from "./components/ImageModal/index.mjs";
|
|
38
|
+
const bi = (N) => {
|
|
39
|
+
var Pe;
|
|
40
40
|
const {
|
|
41
41
|
services: f,
|
|
42
42
|
datasetId: o,
|
|
43
43
|
versionId: Q,
|
|
44
|
-
backTo:
|
|
45
|
-
labelManager:
|
|
46
|
-
datasetManager:
|
|
47
|
-
annotation:
|
|
48
|
-
header:
|
|
44
|
+
backTo: Be,
|
|
45
|
+
labelManager: ue = !1,
|
|
46
|
+
datasetManager: I = !1,
|
|
47
|
+
annotation: Oe,
|
|
48
|
+
header: D = {
|
|
49
49
|
versionSelect: !1
|
|
50
50
|
},
|
|
51
|
-
exampleSrcRoot:
|
|
52
|
-
} =
|
|
53
|
-
|
|
54
|
-
const
|
|
51
|
+
exampleSrcRoot: Fe
|
|
52
|
+
} = N, j = m({}, Ut);
|
|
53
|
+
Kt(j, N.filterSwitch);
|
|
54
|
+
const Z = pt(null), [C, he] = d(), [i, $] = d(), [X, He] = d([]), [me, ge] = d(!1), [B, pe] = d(0), [L, ne] = d(""), [O, be] = d(0), [Ke, Ue] = d(), [ve, re] = d(!1), [Se, je] = d(!1), [Ce, Ze] = d(!0), [$e, We] = d(!1), [P, ye] = d([]), [b, E] = d([]), [W, q] = d(!1), [Y, _] = d(!1), [M, p] = d(-1), [v, g] = d(), [a, y] = d(), [n, T] = d({
|
|
55
55
|
current: 0,
|
|
56
56
|
pageSize: 100
|
|
57
|
-
}), [
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
}), [F, oe] = d([]), [R, qe] = d(""), [_e, Ge] = d(!1), [Ie, Le] = d(), [ee, le] = d(null), [w, De] = d(!1), [Je, ke] = d(!1), [Qe, Xe] = d(0), [Zt, se] = d(""), [G, Ye] = d(""), [et, tt] = d(), H = () => {
|
|
58
|
+
g(void 0), y(void 0), p(-1), q(!1), K(), setTimeout(() => {
|
|
59
|
+
T((e) => S(m({}, e), {
|
|
60
60
|
current: 1,
|
|
61
61
|
type: void 0
|
|
62
62
|
}));
|
|
63
63
|
}, 10);
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
wt("Esc", H), u(() => {
|
|
66
66
|
o && f.cvforceDatahub.getS3Iam(o).then((e) => {
|
|
67
|
-
|
|
67
|
+
Ue(e);
|
|
68
68
|
});
|
|
69
|
-
}, [o]),
|
|
70
|
-
f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) =>
|
|
71
|
-
}, [f.cvforceDatahub]),
|
|
69
|
+
}, [o]), u(() => {
|
|
70
|
+
f.cvforceDatahub && f.cvforceDatahub.getOptionsImgproxy().then((e) => tt(e));
|
|
71
|
+
}, [f.cvforceDatahub]), u(() => {
|
|
72
72
|
x();
|
|
73
|
-
}, [i == null ? void 0 : i.id]),
|
|
74
|
-
o && (
|
|
73
|
+
}, [i == null ? void 0 : i.id]), u(() => {
|
|
74
|
+
o && (ge(!0), Promise.all([
|
|
75
75
|
// 数据集
|
|
76
76
|
f.cvforceDatahub.getDatasetsId(o).then((e) => {
|
|
77
|
-
|
|
77
|
+
he(e);
|
|
78
78
|
}),
|
|
79
79
|
// 版本列表
|
|
80
80
|
f.cvforceDatahub.getDatasetsIdVersions(o, 1, 1e3).then((e) => {
|
|
81
|
-
|
|
81
|
+
He(e.recordList), $(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
|
|
82
82
|
})
|
|
83
|
-
]).finally(() =>
|
|
83
|
+
]).finally(() => ge(!1)));
|
|
84
84
|
}, [o, Q]);
|
|
85
|
-
const
|
|
85
|
+
const Te = () => {
|
|
86
86
|
!o || !i || f.cvforceDatahub.getDatasetsIdVersionsVid(o, i.id).then((e) => {
|
|
87
|
-
|
|
87
|
+
$(e), qe(e.versionAsyncTask.state);
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}, [
|
|
93
|
-
|
|
90
|
+
u(() => {
|
|
91
|
+
R !== U.Pending && R !== U.Started || z.warning("文件导入中,请刷新页面再试");
|
|
92
|
+
}, [R]), u(() => {
|
|
93
|
+
$(void 0), T(S(m({}, n), {
|
|
94
94
|
current: 1
|
|
95
|
-
})),
|
|
96
|
-
}, [o, Q]),
|
|
95
|
+
})), E([]), Te();
|
|
96
|
+
}, [o, Q]), u(() => {
|
|
97
97
|
o && f.cvforceDatahub.getDatasetsId(o).then((e) => {
|
|
98
|
-
|
|
98
|
+
he(e);
|
|
99
99
|
});
|
|
100
|
-
}, [o]),
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
!i || !
|
|
100
|
+
}, [o]), u(() => {
|
|
101
|
+
K();
|
|
102
|
+
}, [F, i]), u(() => {
|
|
103
|
+
!i || !C || A(S(m({}, n), {
|
|
104
104
|
current: 1
|
|
105
105
|
})).then((e) => {
|
|
106
106
|
});
|
|
107
|
-
}, [
|
|
108
|
-
|
|
107
|
+
}, [C == null ? void 0 : C.id, i == null ? void 0 : i.id, F]), u(() => {
|
|
108
|
+
A().then((e) => {
|
|
109
109
|
}), x();
|
|
110
|
-
}, [n.current]),
|
|
110
|
+
}, [n.current]), u(() => {
|
|
111
111
|
w && x();
|
|
112
|
-
}, [
|
|
113
|
-
|
|
112
|
+
}, [Ie]), u(() => {
|
|
113
|
+
A(S(m({}, n), {
|
|
114
114
|
current: 1,
|
|
115
115
|
total: void 0
|
|
116
116
|
})).then((e) => {
|
|
117
|
-
e &&
|
|
117
|
+
e && v && (Array.isArray(e) && e.length ? (p(0), g(e[0]), y(void 0)) : (g(void 0), y(void 0), p(-1), K(), setTimeout(() => {
|
|
118
|
+
T((t) => S(m({}, t), {
|
|
119
|
+
current: 1,
|
|
120
|
+
type: void 0
|
|
121
|
+
}));
|
|
122
|
+
}, 10)));
|
|
118
123
|
});
|
|
119
|
-
}, [
|
|
120
|
-
|
|
121
|
-
}, [
|
|
122
|
-
!
|
|
123
|
-
}, [
|
|
124
|
-
!m.length && R && A();
|
|
125
|
-
}, [m.length, R]), h(() => {
|
|
126
|
-
R && j(!1);
|
|
127
|
-
}, [R]), h(() => {
|
|
128
|
-
_e(!Ie && ye);
|
|
129
|
-
}, [Ie, ye]), h(() => {
|
|
124
|
+
}, [L]), u(() => {
|
|
125
|
+
Y || (g(void 0), y(void 0), q(!1), p(-1));
|
|
126
|
+
}, [Y]), u(() => {
|
|
127
|
+
We(!Ce && Se);
|
|
128
|
+
}, [Ce, Se]), u(() => {
|
|
130
129
|
if (!o) {
|
|
131
|
-
ee && (clearTimeout(ee),
|
|
130
|
+
ee && (clearTimeout(ee), le(null)), Le(void 0);
|
|
132
131
|
return;
|
|
133
132
|
}
|
|
134
|
-
|
|
135
|
-
}, [o, i == null ? void 0 : i.id]),
|
|
136
|
-
|
|
137
|
-
}, [
|
|
138
|
-
|
|
139
|
-
}, [w, o, i]),
|
|
140
|
-
|
|
133
|
+
ce();
|
|
134
|
+
}, [o, i == null ? void 0 : i.id]), u(() => {
|
|
135
|
+
ce();
|
|
136
|
+
}, [_e]), u(() => {
|
|
137
|
+
ae();
|
|
138
|
+
}, [w, o, i]), u(() => {
|
|
139
|
+
A(S(m({}, n), {
|
|
141
140
|
current: 1
|
|
142
141
|
})), x();
|
|
143
|
-
}, [G]),
|
|
144
|
-
|
|
145
|
-
}, [
|
|
146
|
-
const
|
|
142
|
+
}, [G]), u(() => {
|
|
143
|
+
se("");
|
|
144
|
+
}, [v]);
|
|
145
|
+
const ae = () => {
|
|
147
146
|
i && f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
|
|
148
147
|
pageNo: 1,
|
|
149
148
|
pageSize: 1e3,
|
|
150
149
|
confirmStatus: 1
|
|
151
150
|
}).then((e) => {
|
|
152
|
-
|
|
151
|
+
Xe(e.recordList.length);
|
|
153
152
|
});
|
|
154
|
-
},
|
|
153
|
+
}, ce = () => {
|
|
155
154
|
!o || !i || f.cvforceDatahub.getPreLabelTask(o, i.id).then((e) => {
|
|
156
155
|
const t = e[0];
|
|
157
|
-
if (
|
|
158
|
-
|
|
156
|
+
if (Le(t), ee && (clearTimeout(ee), le(null)), !(t != null && t.state) || t.state !== Tt.Started) {
|
|
157
|
+
De(!1), x();
|
|
159
158
|
return;
|
|
160
159
|
} else
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
De(!0);
|
|
161
|
+
le(setTimeout(() => {
|
|
162
|
+
ce();
|
|
164
163
|
}, 1e4));
|
|
165
164
|
});
|
|
166
165
|
};
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
const
|
|
166
|
+
u(() => {
|
|
167
|
+
C && C.markType !== "detection" && console.error("当前数据集不是detection(物体检测)类型,请检查数据集类型。");
|
|
168
|
+
}, [C]);
|
|
169
|
+
const A = (e, t) => {
|
|
171
170
|
const l = (e == null ? void 0 : e.current) || n.current, r = (e == null ? void 0 : e.pageSize) || n.pageSize;
|
|
172
171
|
if (!o || !i || !l)
|
|
173
172
|
return Promise.resolve(!1);
|
|
174
|
-
const
|
|
175
|
-
switch (
|
|
173
|
+
const c = F.map((k) => k.label), h = () => {
|
|
174
|
+
switch (L) {
|
|
176
175
|
case "nocode":
|
|
177
176
|
return "nocode";
|
|
178
177
|
case "hascode":
|
|
179
|
-
return
|
|
178
|
+
return c.length ? c : "hascode";
|
|
180
179
|
default:
|
|
181
|
-
return
|
|
180
|
+
return c.length ? c : void 0;
|
|
182
181
|
}
|
|
183
182
|
};
|
|
184
|
-
return l === 1 &&
|
|
183
|
+
return l === 1 && at(), T(S(m({}, n), {
|
|
185
184
|
current: l,
|
|
186
185
|
pageSize: r
|
|
187
186
|
})), f.cvforceDatahub.getDatasetsIdVersionsVidSamples(o, i.id, {
|
|
188
187
|
pageNo: l,
|
|
189
188
|
pageSize: r,
|
|
190
|
-
labels:
|
|
189
|
+
labels: h(),
|
|
191
190
|
searchName: G
|
|
192
191
|
}).then((k) => {
|
|
193
|
-
const J = k.recordList || [],
|
|
194
|
-
if (
|
|
192
|
+
const J = k.recordList || [], we = l === 1 ? J : [...t || b, ...J];
|
|
193
|
+
if (E(we), T(S(m({}, n), {
|
|
195
194
|
current: l,
|
|
196
195
|
pageSize: r,
|
|
197
196
|
total: k.totalResults
|
|
198
197
|
})), n.type === "next" && J.length) {
|
|
199
|
-
|
|
200
|
-
const
|
|
201
|
-
|
|
198
|
+
p(0);
|
|
199
|
+
const fe = k.recordList[0];
|
|
200
|
+
g(fe);
|
|
202
201
|
}
|
|
203
202
|
if (n.type === "prev" && J.length) {
|
|
204
|
-
|
|
205
|
-
const
|
|
206
|
-
|
|
203
|
+
p(n.pageSize - 1);
|
|
204
|
+
const fe = k.recordList[n.pageSize - 1];
|
|
205
|
+
g(fe);
|
|
207
206
|
}
|
|
208
|
-
return
|
|
207
|
+
return W && M < 0 && (p(0), g(J[0]), _(!0)), we;
|
|
209
208
|
}).catch(() => !1);
|
|
210
209
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
total:
|
|
214
|
-
}) :
|
|
215
|
-
total:
|
|
216
|
-
}) :
|
|
217
|
-
total:
|
|
210
|
+
u(() => {
|
|
211
|
+
T(L === "nocode" ? S(m({}, n), {
|
|
212
|
+
total: B
|
|
213
|
+
}) : L === "" ? S(m({}, n), {
|
|
214
|
+
total: O
|
|
215
|
+
}) : S(m({}, n), {
|
|
216
|
+
total: O - B
|
|
218
217
|
}));
|
|
219
|
-
}, [
|
|
218
|
+
}, [B, O]);
|
|
220
219
|
const x = () => {
|
|
221
220
|
!o || !i || f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id, {
|
|
222
221
|
label: "allcode",
|
|
223
222
|
searchName: G
|
|
224
223
|
}).then((e) => {
|
|
225
224
|
const t = e.find((r) => r.id === "allcodeid"), l = e.find((r) => r.id === "nocodeid");
|
|
226
|
-
|
|
225
|
+
be(t ? t.count : 0), pe(l ? l.count : 0);
|
|
227
226
|
});
|
|
228
|
-
},
|
|
227
|
+
}, K = () => {
|
|
229
228
|
if (!(!o || !(i != null && i.id)))
|
|
230
229
|
return f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((e) => {
|
|
231
|
-
const l = (e || []).filter((r) => r.label !== "nocode").map((r,
|
|
230
|
+
const l = (e || []).filter((r) => r.label !== "nocode").map((r, c) => ({
|
|
232
231
|
label: r.label,
|
|
233
232
|
count: r.count,
|
|
234
233
|
id: r.id,
|
|
235
|
-
color:
|
|
234
|
+
color: Me[c % 40]
|
|
236
235
|
}));
|
|
237
|
-
return
|
|
236
|
+
return ye(l), e;
|
|
238
237
|
});
|
|
239
|
-
},
|
|
240
|
-
if (!
|
|
238
|
+
}, it = (e) => {
|
|
239
|
+
if (!b)
|
|
241
240
|
return;
|
|
242
|
-
|
|
243
|
-
const t =
|
|
244
|
-
|
|
241
|
+
q(!1), p(e);
|
|
242
|
+
const t = b[e];
|
|
243
|
+
g(t), y(void 0), _(!0);
|
|
245
244
|
};
|
|
246
|
-
|
|
247
|
-
n.type ||
|
|
248
|
-
}, [n.type]),
|
|
245
|
+
u(() => {
|
|
246
|
+
n.type || A();
|
|
247
|
+
}, [n.type]), u(() => {
|
|
249
248
|
if (!a)
|
|
250
249
|
return;
|
|
251
250
|
const e = [];
|
|
252
251
|
a == null || a.labels.forEach((t) => {
|
|
253
252
|
P != null && P.find((l) => l.id === t.id) && e.push(t);
|
|
254
|
-
}), a.labels = e,
|
|
253
|
+
}), a.labels = e, y(a);
|
|
255
254
|
}, [P]);
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
258
|
-
if (
|
|
259
|
-
|
|
255
|
+
const xe = () => {
|
|
256
|
+
if (b) {
|
|
257
|
+
if (!W) {
|
|
258
|
+
E((e) => {
|
|
260
259
|
if (!Array.isArray(e) || !e.length)
|
|
261
|
-
return
|
|
262
|
-
const t =
|
|
263
|
-
return t >= e.length ? n.total && t >= n.total ?
|
|
260
|
+
return H(), e;
|
|
261
|
+
const t = M + 1;
|
|
262
|
+
return t >= e.length ? n.total && t >= n.total ? z.error("已经是最后一个了") : A({
|
|
264
263
|
current: n.current + 1,
|
|
265
264
|
pageSize: n.pageSize,
|
|
266
265
|
type: "next"
|
|
267
266
|
}, e).then((l) => {
|
|
268
|
-
|
|
267
|
+
p(t);
|
|
269
268
|
const r = l[t];
|
|
270
|
-
|
|
269
|
+
g(r), y(void 0);
|
|
271
270
|
}) : setTimeout(() => {
|
|
272
|
-
|
|
271
|
+
p(t);
|
|
273
272
|
const l = e[t];
|
|
274
|
-
|
|
273
|
+
g(l), y(void 0);
|
|
275
274
|
}, 200), e;
|
|
276
275
|
});
|
|
277
276
|
return;
|
|
278
277
|
}
|
|
279
|
-
return
|
|
278
|
+
return de().then((e) => (e && (x(), E((t) => {
|
|
280
279
|
let l;
|
|
281
280
|
if (Array.isArray(t)) {
|
|
282
281
|
if (!t.length)
|
|
283
|
-
return
|
|
284
|
-
const r = !a || a.labels.length &&
|
|
285
|
-
if (a && (a.labels.length &&
|
|
286
|
-
const
|
|
287
|
-
|
|
282
|
+
return H(), t;
|
|
283
|
+
const r = !a || a.labels.length && L === "hascode" || !a.labels.length && L === "nocode" || L === "" ? M + 1 : M;
|
|
284
|
+
if (a && (a.labels.length && L === "nocode" || !a.labels.length && L === "hascode")) {
|
|
285
|
+
const c = t.findIndex((h) => h.id === a.id);
|
|
286
|
+
c > -1 && (t.splice(c, 1), l = [...t], n.total && (n.total = n.total - 1));
|
|
288
287
|
}
|
|
289
|
-
r >= t.length ? n.total && r >= n.total ?
|
|
288
|
+
r >= t.length ? n.total && r >= n.total ? z.error("已经是最后一个了") : A({
|
|
290
289
|
current: n.current + 1,
|
|
291
290
|
pageSize: n.pageSize,
|
|
292
291
|
type: "next"
|
|
293
|
-
}, t).then((
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
|
|
292
|
+
}, t).then((c) => {
|
|
293
|
+
p(r);
|
|
294
|
+
const h = c[r];
|
|
295
|
+
g(h), y(void 0);
|
|
297
296
|
}) : setTimeout(() => {
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
|
|
297
|
+
p(r);
|
|
298
|
+
const c = t[r];
|
|
299
|
+
g(c), y(void 0);
|
|
301
300
|
}, 200);
|
|
302
301
|
}
|
|
303
302
|
return l || t;
|
|
304
303
|
})), e));
|
|
305
304
|
}
|
|
306
|
-
},
|
|
307
|
-
if (
|
|
308
|
-
if (
|
|
309
|
-
|
|
305
|
+
}, nt = () => {
|
|
306
|
+
if (b) {
|
|
307
|
+
if (!W) {
|
|
308
|
+
E((e) => {
|
|
310
309
|
if (!Array.isArray(e) || !e.length)
|
|
311
|
-
return
|
|
312
|
-
const t =
|
|
313
|
-
return t < 0 ?
|
|
314
|
-
|
|
310
|
+
return H(), e;
|
|
311
|
+
const t = M - 1;
|
|
312
|
+
return t < 0 ? z.error("已经是第一个了") : setTimeout(() => {
|
|
313
|
+
p(t);
|
|
315
314
|
const l = e[t];
|
|
316
|
-
|
|
315
|
+
g(l), y(void 0);
|
|
317
316
|
}, 200), e;
|
|
318
317
|
});
|
|
319
318
|
return;
|
|
320
319
|
}
|
|
321
|
-
|
|
322
|
-
e && (x(),
|
|
320
|
+
de().then((e) => {
|
|
321
|
+
e && (x(), E((t) => {
|
|
323
322
|
let l;
|
|
324
323
|
if (Array.isArray(t)) {
|
|
325
324
|
if (!t.length)
|
|
326
|
-
return
|
|
327
|
-
const r =
|
|
325
|
+
return H(), t;
|
|
326
|
+
const r = M - 1;
|
|
328
327
|
if (r < 0)
|
|
329
|
-
r < 0 ?
|
|
328
|
+
r < 0 ? z.error("已经是第一个了") : T({
|
|
330
329
|
current: n.current - 1,
|
|
331
330
|
pageSize: n.pageSize,
|
|
332
331
|
type: "prev"
|
|
333
332
|
});
|
|
334
333
|
else {
|
|
335
|
-
if (a && (a.labels.length &&
|
|
336
|
-
const
|
|
337
|
-
|
|
334
|
+
if (a && (a.labels.length && L === "nocode" || !a.labels.length && L === "hascode")) {
|
|
335
|
+
const c = t.findIndex((h) => h.id === a.id);
|
|
336
|
+
c > -1 && (t.splice(c, 1), l = [...t], n.total && (n.total = n.total - 1));
|
|
338
337
|
}
|
|
339
338
|
setTimeout(() => {
|
|
340
|
-
|
|
341
|
-
const
|
|
342
|
-
|
|
339
|
+
p(r);
|
|
340
|
+
const c = t[r];
|
|
341
|
+
g(c), y(void 0);
|
|
343
342
|
}, 200);
|
|
344
343
|
}
|
|
345
344
|
}
|
|
@@ -347,113 +346,118 @@ const Si = (V) => {
|
|
|
347
346
|
}));
|
|
348
347
|
});
|
|
349
348
|
}
|
|
350
|
-
},
|
|
349
|
+
}, rt = (e) => {
|
|
351
350
|
const t = Object.keys(e.labels.reduce((l, r) => (l[r.label] ? ++l[r.label] : l[r.label] = 1, l), {})).length;
|
|
352
351
|
return t >= 2 ? `+${t - 1}` : null;
|
|
353
|
-
},
|
|
352
|
+
}, ot = (e) => {
|
|
354
353
|
var t;
|
|
355
|
-
(!n.total || n.total >
|
|
354
|
+
(!n.total || n.total > b.length) && e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ((t = Z.current) == null ? void 0 : t.clientHeight) && T(S(m({}, n), {
|
|
356
355
|
current: n.current + 1
|
|
357
356
|
}));
|
|
358
|
-
},
|
|
357
|
+
}, de = () => i ? a && !w ? (a.labels && (a.labels = a.labels.filter((e) => !!e.id)), f.cvforceDatahub.updateSamples(o, i.id, [a], 0).then(() => (z.success({
|
|
359
358
|
content: "保存成功"
|
|
360
|
-
}),
|
|
359
|
+
}), E((e) => {
|
|
361
360
|
const t = e.findIndex((l) => l.id === (a == null ? void 0 : a.id));
|
|
362
361
|
return t > -1 && (e[t] = a), [...e];
|
|
363
|
-
}), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1),
|
|
362
|
+
}), !0)).catch(() => !1)) : Promise.resolve(!0) : Promise.resolve(!1), lt = () => {
|
|
364
363
|
if (a && a.labels.some((e) => !e.id))
|
|
365
|
-
return
|
|
366
|
-
|
|
367
|
-
},
|
|
368
|
-
|
|
364
|
+
return z.error("所有标注需设置标签"), Promise.resolve(!1);
|
|
365
|
+
xe();
|
|
366
|
+
}, st = () => {
|
|
367
|
+
Dt.confirm({
|
|
369
368
|
title: "确认要删除当前数据吗?",
|
|
370
369
|
content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
|
|
371
370
|
onOk: () => {
|
|
372
|
-
!
|
|
373
|
-
const e =
|
|
374
|
-
|
|
371
|
+
!v || !i || f.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(o, i.id, v.id).then(() => {
|
|
372
|
+
const e = b.findIndex((t) => t.id === v.id);
|
|
373
|
+
b.splice(e, 1), E([...b]), T(S(m({}, n), {
|
|
375
374
|
total: n.total ? n.total - 1 : 0
|
|
376
|
-
})), e <=
|
|
375
|
+
})), e <= b.length - 1 ? g(b[e]) : (g(b[e - 1]), p(e - 1)), x(), y(void 0), n.total && n.total - 1 === 0 && (g(void 0), y(void 0), p(-1), W || _(!1), K(), setTimeout(() => {
|
|
376
|
+
T((t) => S(m({}, t), {
|
|
377
|
+
current: 1,
|
|
378
|
+
type: void 0
|
|
379
|
+
}));
|
|
380
|
+
}, 10));
|
|
377
381
|
});
|
|
378
382
|
}
|
|
379
383
|
});
|
|
380
|
-
},
|
|
384
|
+
}, Ve = [{
|
|
381
385
|
key: "",
|
|
382
|
-
label: `全部(${
|
|
386
|
+
label: `全部(${O})`,
|
|
383
387
|
children: null
|
|
384
388
|
}, {
|
|
385
389
|
key: "nocode",
|
|
386
|
-
label: `未标注(${
|
|
390
|
+
label: `未标注(${B})`,
|
|
387
391
|
children: null
|
|
388
392
|
}, {
|
|
389
393
|
key: "hascode",
|
|
390
|
-
label: `已标注(${
|
|
394
|
+
label: `已标注(${O - B})`,
|
|
391
395
|
children: null
|
|
392
|
-
}],
|
|
396
|
+
}], at = () => {
|
|
393
397
|
var e, t;
|
|
394
|
-
(t = (e =
|
|
398
|
+
(t = (e = Z.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
|
|
395
399
|
top: 0
|
|
396
400
|
});
|
|
397
|
-
},
|
|
398
|
-
|
|
399
|
-
},
|
|
400
|
-
|
|
401
|
-
},
|
|
402
|
-
a ? (
|
|
403
|
-
t ? (
|
|
404
|
-
})
|
|
401
|
+
}, ct = () => {
|
|
402
|
+
ke(!0);
|
|
403
|
+
}, dt = (e) => {
|
|
404
|
+
Ye(e);
|
|
405
|
+
}, Ne = (e) => {
|
|
406
|
+
a ? de().then((t) => {
|
|
407
|
+
t ? (ne(e), x()) : z.error("保存失败");
|
|
408
|
+
}) : (T(S(m({}, n), {
|
|
405
409
|
current: 1,
|
|
406
410
|
total: void 0
|
|
407
|
-
})),
|
|
411
|
+
})), ne(e)), e === "nocode" && oe([]);
|
|
408
412
|
};
|
|
409
|
-
return /* @__PURE__ */ s(
|
|
410
|
-
locale:
|
|
411
|
-
children: /* @__PURE__ */ s(
|
|
413
|
+
return /* @__PURE__ */ s(bt, {
|
|
414
|
+
locale: xt,
|
|
415
|
+
children: /* @__PURE__ */ s(Vt.Provider, {
|
|
412
416
|
value: {
|
|
413
417
|
datasetId: o,
|
|
414
418
|
versionId: (i == null ? void 0 : i.id) || "",
|
|
415
419
|
no: (i == null ? void 0 : i.no) || "",
|
|
416
|
-
loading:
|
|
420
|
+
loading: me,
|
|
417
421
|
version: i,
|
|
418
422
|
versions: X,
|
|
419
|
-
samples:
|
|
423
|
+
samples: b,
|
|
420
424
|
pagination: n,
|
|
421
425
|
services: f,
|
|
422
426
|
featuresConfig: {
|
|
423
|
-
labelManager:
|
|
424
|
-
datasetManager:
|
|
425
|
-
annotation:
|
|
426
|
-
filterSwitch:
|
|
427
|
-
header:
|
|
428
|
-
exampleSrcRoot:
|
|
427
|
+
labelManager: ue,
|
|
428
|
+
datasetManager: I,
|
|
429
|
+
annotation: Oe,
|
|
430
|
+
filterSwitch: j,
|
|
431
|
+
header: D,
|
|
432
|
+
exampleSrcRoot: Fe
|
|
429
433
|
}
|
|
430
434
|
},
|
|
431
|
-
children:
|
|
435
|
+
children: C ? C.markType === "detection" ? /* @__PURE__ */ s("div", {
|
|
432
436
|
className: "detection-version-detail",
|
|
433
|
-
children:
|
|
437
|
+
children: Je ? i != null && i.id && I && I.preLabel ? /* @__PURE__ */ s(At, {
|
|
434
438
|
datasetId: o,
|
|
435
439
|
versionId: i.id,
|
|
436
440
|
onClose: () => {
|
|
437
|
-
|
|
441
|
+
ke(!1), ae(), K(), x(), A();
|
|
438
442
|
},
|
|
439
|
-
samples:
|
|
443
|
+
samples: b,
|
|
440
444
|
labels: P,
|
|
441
|
-
fetchLength:
|
|
442
|
-
}) : null : /* @__PURE__ */
|
|
445
|
+
fetchLength: ae
|
|
446
|
+
}) : null : /* @__PURE__ */ V(zt, {
|
|
443
447
|
className: "product-details-page",
|
|
444
|
-
header:
|
|
445
|
-
backTo:
|
|
446
|
-
onBackClick:
|
|
447
|
-
|
|
448
|
+
header: D === !1 ? void 0 : /* @__PURE__ */ s(Rt, {
|
|
449
|
+
backTo: Be,
|
|
450
|
+
onBackClick: D != null && D.onBackClick ? () => {
|
|
451
|
+
v && H(), D.onBackClick && D.onBackClick();
|
|
448
452
|
} : void 0,
|
|
449
|
-
left: !
|
|
453
|
+
left: !me && /* @__PURE__ */ V(te, {
|
|
450
454
|
children: [/* @__PURE__ */ s("span", {
|
|
451
455
|
style: {
|
|
452
456
|
fontWeight: "bold"
|
|
453
457
|
},
|
|
454
|
-
children:
|
|
455
|
-
}), /* @__PURE__ */ s(
|
|
456
|
-
disabled: (
|
|
458
|
+
children: C == null ? void 0 : C.name
|
|
459
|
+
}), /* @__PURE__ */ s(vt, {
|
|
460
|
+
disabled: (D == null ? void 0 : D.versionSelect) === !1,
|
|
457
461
|
value: i == null ? void 0 : i.id,
|
|
458
462
|
style: {
|
|
459
463
|
width: 70
|
|
@@ -464,177 +468,176 @@ const Si = (V) => {
|
|
|
464
468
|
})),
|
|
465
469
|
onChange: (e) => {
|
|
466
470
|
const t = X.find((r) => r.id === e);
|
|
467
|
-
if (!
|
|
471
|
+
if (!C || !t)
|
|
468
472
|
return;
|
|
469
473
|
const l = X.find((r) => r.id === t.id);
|
|
470
|
-
|
|
474
|
+
$(l), D != null && D.onVersionChange && D.onVersionChange(l);
|
|
471
475
|
}
|
|
472
476
|
})]
|
|
473
477
|
}),
|
|
474
|
-
right: /* @__PURE__ */
|
|
475
|
-
children: [!
|
|
478
|
+
right: /* @__PURE__ */ V(te, {
|
|
479
|
+
children: [!v && I && I.add && /* @__PURE__ */ s(Re, {
|
|
476
480
|
isPreLabel: w,
|
|
477
481
|
placement: "bottom",
|
|
478
|
-
children: /* @__PURE__ */ s(
|
|
482
|
+
children: /* @__PURE__ */ s(ie, {
|
|
479
483
|
type: "default",
|
|
480
|
-
onClick: () =>
|
|
481
|
-
disabled:
|
|
484
|
+
onClick: () => re(!0),
|
|
485
|
+
disabled: R === U.Pending || R === U.Started || w,
|
|
482
486
|
children: "导入数据"
|
|
483
487
|
}, "del")
|
|
484
|
-
}), !
|
|
485
|
-
children: [/* @__PURE__ */ s(
|
|
488
|
+
}), !v && I && I.preLabel && (i != null && i.id) ? /* @__PURE__ */ V(ze, {
|
|
489
|
+
children: [/* @__PURE__ */ s(Ht, {
|
|
486
490
|
datasetId: o,
|
|
487
491
|
versionId: i.id,
|
|
488
|
-
disabled: !
|
|
489
|
-
setIsTaskChange:
|
|
492
|
+
disabled: !b.length,
|
|
493
|
+
setIsTaskChange: Ge,
|
|
490
494
|
datasetType: "detection",
|
|
491
|
-
preLabelTask:
|
|
492
|
-
}), /* @__PURE__ */ s(
|
|
493
|
-
disabled: w || !
|
|
494
|
-
onClick:
|
|
495
|
+
preLabelTask: Ie
|
|
496
|
+
}), /* @__PURE__ */ s(ie, {
|
|
497
|
+
disabled: w || !Qe,
|
|
498
|
+
onClick: ct,
|
|
495
499
|
children: "待确认标注"
|
|
496
500
|
})]
|
|
497
|
-
}) : null, /* @__PURE__ */ s(
|
|
498
|
-
when:
|
|
501
|
+
}) : null, /* @__PURE__ */ s(Ft, {
|
|
502
|
+
when: $e,
|
|
499
503
|
content: "确认要离开此页面吗?",
|
|
500
504
|
subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
|
|
501
|
-
}),
|
|
502
|
-
datasetIam:
|
|
505
|
+
}), ve && /* @__PURE__ */ s(Mt, {
|
|
506
|
+
datasetIam: Ke,
|
|
503
507
|
datasetId: o,
|
|
504
508
|
currentVersion: i,
|
|
505
|
-
tenCode:
|
|
506
|
-
isVisible:
|
|
507
|
-
setIsVisible:
|
|
509
|
+
tenCode: C == null ? void 0 : C.tenantCode,
|
|
510
|
+
isVisible: ve,
|
|
511
|
+
setIsVisible: re,
|
|
508
512
|
getVersionListRequest: x,
|
|
509
|
-
setIsConfirm:
|
|
513
|
+
setIsConfirm: Ze,
|
|
510
514
|
onUploadStatusChange: (e) => {
|
|
511
|
-
|
|
515
|
+
je(e);
|
|
512
516
|
},
|
|
513
517
|
tableReload: () => {
|
|
514
518
|
var e, t;
|
|
515
|
-
i != null && i.id && ((t = (e =
|
|
519
|
+
i != null && i.id && ((t = (e = Z.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
|
|
516
520
|
top: 0
|
|
517
|
-
}),
|
|
521
|
+
}), A(S(m({}, n), {
|
|
518
522
|
current: 1
|
|
519
523
|
})));
|
|
520
524
|
},
|
|
521
|
-
loadVersionData:
|
|
525
|
+
loadVersionData: Te
|
|
522
526
|
})]
|
|
523
527
|
})
|
|
524
528
|
}),
|
|
525
|
-
children: [/* @__PURE__ */
|
|
529
|
+
children: [/* @__PURE__ */ V("div", {
|
|
526
530
|
className: "detection-header",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
528
|
-
children: [
|
|
531
|
+
children: [/* @__PURE__ */ V(te, {
|
|
532
|
+
children: [j.tabs && /* @__PURE__ */ s(St, {
|
|
529
533
|
className: "header-tab",
|
|
530
|
-
activeKey:
|
|
531
|
-
items:
|
|
532
|
-
onChange:
|
|
533
|
-
}), !
|
|
534
|
+
activeKey: L,
|
|
535
|
+
items: Ve,
|
|
536
|
+
onChange: Ne
|
|
537
|
+
}), !v && j.search && /* @__PURE__ */ s(Ot, {
|
|
534
538
|
placeholder: "请输入图片名称搜索",
|
|
535
|
-
suffix: /* @__PURE__ */ s(
|
|
539
|
+
suffix: /* @__PURE__ */ s(Et, {}),
|
|
536
540
|
value: G,
|
|
537
|
-
onChange:
|
|
541
|
+
onChange: dt,
|
|
538
542
|
allowClear: !0
|
|
539
543
|
})]
|
|
540
|
-
}), /* @__PURE__ */ s(
|
|
544
|
+
}), /* @__PURE__ */ s(Re, {
|
|
541
545
|
isPreLabel: w,
|
|
542
|
-
children: /* @__PURE__ */ s(
|
|
543
|
-
children:
|
|
546
|
+
children: /* @__PURE__ */ s(te, {
|
|
547
|
+
children: I && I.label && /* @__PURE__ */ s(ie, {
|
|
544
548
|
type: "primary",
|
|
545
|
-
disabled: !
|
|
549
|
+
disabled: !B || w,
|
|
546
550
|
onClick: () => {
|
|
547
|
-
|
|
551
|
+
v || ne("nocode"), q(!0), p(-1), L === "nocode" && (p(0), g(b[0])), _(!0);
|
|
548
552
|
},
|
|
549
553
|
children: "标注"
|
|
550
554
|
})
|
|
551
555
|
})
|
|
552
556
|
})]
|
|
553
|
-
}), /* @__PURE__ */
|
|
557
|
+
}), /* @__PURE__ */ V("div", {
|
|
554
558
|
className: "d-row",
|
|
555
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ V("div", {
|
|
556
560
|
className: "d-right",
|
|
557
|
-
ref:
|
|
558
|
-
children: [
|
|
561
|
+
ref: Z,
|
|
562
|
+
children: [Y && /* @__PURE__ */ s(jt, {
|
|
559
563
|
datasetId: o,
|
|
560
|
-
isImageDetailVisible:
|
|
561
|
-
setIsImageDetailVisible:
|
|
562
|
-
currentSample: a != null ? a :
|
|
564
|
+
isImageDetailVisible: Y,
|
|
565
|
+
setIsImageDetailVisible: _,
|
|
566
|
+
currentSample: a != null ? a : v,
|
|
563
567
|
labels: P,
|
|
564
|
-
|
|
565
|
-
filterItems:
|
|
566
|
-
filterMode:
|
|
567
|
-
onFilterChange:
|
|
568
|
-
onChange:
|
|
569
|
-
onNextClick: () =>
|
|
570
|
-
onPrevClick: () =>
|
|
571
|
-
onSave: () =>
|
|
572
|
-
onDeleteSample: () =>
|
|
568
|
+
previewMode: !W,
|
|
569
|
+
filterItems: Ve,
|
|
570
|
+
filterMode: L,
|
|
571
|
+
onFilterChange: Ne,
|
|
572
|
+
onChange: y,
|
|
573
|
+
onNextClick: () => xe(),
|
|
574
|
+
onPrevClick: () => nt(),
|
|
575
|
+
onSave: () => lt(),
|
|
576
|
+
onDeleteSample: () => st(),
|
|
573
577
|
onEnterEdit: () => {
|
|
574
|
-
|
|
578
|
+
q(!0);
|
|
575
579
|
},
|
|
576
580
|
onRefresh: () => {
|
|
577
581
|
var e;
|
|
578
|
-
(e =
|
|
582
|
+
(e = K()) == null || e.then((t) => {
|
|
579
583
|
var l, r;
|
|
580
584
|
if (a) {
|
|
581
|
-
const
|
|
582
|
-
(l = a.labels) == null || l.forEach((
|
|
583
|
-
t != null && t.find((k) => k.id ===
|
|
584
|
-
}), a.labels =
|
|
585
|
+
const c = [];
|
|
586
|
+
(l = a.labels) == null || l.forEach((h) => {
|
|
587
|
+
t != null && t.find((k) => k.id === h.id) && c.push(h);
|
|
588
|
+
}), a.labels = c, y(m({}, a));
|
|
585
589
|
}
|
|
586
|
-
if (
|
|
587
|
-
const
|
|
588
|
-
(r =
|
|
589
|
-
t != null && t.find((k) => k.id ===
|
|
590
|
-
}),
|
|
590
|
+
if (v) {
|
|
591
|
+
const c = [];
|
|
592
|
+
(r = v.labels) == null || r.forEach((h) => {
|
|
593
|
+
t != null && t.find((k) => k.id === h.id) && c.push(h);
|
|
594
|
+
}), v.labels = c, g(m({}, v));
|
|
591
595
|
}
|
|
592
596
|
}), x();
|
|
593
597
|
},
|
|
594
598
|
isPreLabel: w,
|
|
595
599
|
imgCount: {
|
|
596
|
-
total:
|
|
597
|
-
index:
|
|
600
|
+
total: O,
|
|
601
|
+
index: M + 1
|
|
598
602
|
},
|
|
599
|
-
settingHide: !
|
|
600
|
-
canLabel: !!(
|
|
601
|
-
canDelete: !!(
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
children: /* @__PURE__ */ s(Tt, {
|
|
603
|
+
settingHide: !ue,
|
|
604
|
+
canLabel: !!(I && I.label),
|
|
605
|
+
canDelete: !!(I && I.delete)
|
|
606
|
+
}), v ? /* @__PURE__ */ s("div", {}) : n.total !== void 0 && n.total > 0 ? /* @__PURE__ */ s(ze, {
|
|
607
|
+
children: /* @__PURE__ */ s(kt, {
|
|
605
608
|
innerProps: {
|
|
606
609
|
className: "d-right-row"
|
|
607
610
|
},
|
|
608
|
-
data:
|
|
611
|
+
data: b,
|
|
609
612
|
itemKey: "id",
|
|
610
|
-
height: (
|
|
611
|
-
onScroll:
|
|
613
|
+
height: (Pe = Z.current) == null ? void 0 : Pe.clientHeight,
|
|
614
|
+
onScroll: ot,
|
|
612
615
|
children: (e, t) => {
|
|
613
616
|
var l;
|
|
614
|
-
return /* @__PURE__ */ s(
|
|
617
|
+
return /* @__PURE__ */ s(Ct, {
|
|
615
618
|
className: "d-right-col",
|
|
616
|
-
onClick: () =>
|
|
617
|
-
children: /* @__PURE__ */
|
|
619
|
+
onClick: () => it(t),
|
|
620
|
+
children: /* @__PURE__ */ V("div", {
|
|
618
621
|
className: "right-col-wrapper",
|
|
619
|
-
onMouseEnter: () =>
|
|
620
|
-
onMouseLeave: () =>
|
|
622
|
+
onMouseEnter: () => se(e.id),
|
|
623
|
+
onMouseLeave: () => se(""),
|
|
621
624
|
children: [/* @__PURE__ */ s("div", {
|
|
622
625
|
className: "right-col-img",
|
|
623
|
-
children: /* @__PURE__ */ s(
|
|
626
|
+
children: /* @__PURE__ */ s(Bt, {
|
|
624
627
|
fileKey: e.fileKey,
|
|
625
628
|
width: 124,
|
|
626
|
-
imgProxy:
|
|
629
|
+
imgProxy: et
|
|
627
630
|
})
|
|
628
|
-
}), /* @__PURE__ */
|
|
631
|
+
}), /* @__PURE__ */ V("div", {
|
|
629
632
|
className: "right-col-text",
|
|
630
|
-
children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(
|
|
633
|
+
children: [(l = e.labels) != null && l.length ? /* @__PURE__ */ s(yt, {
|
|
631
634
|
placement: "top",
|
|
632
635
|
title: /* @__PURE__ */ s("div", {
|
|
633
|
-
children: Object.keys(e.labels.reduce((r,
|
|
636
|
+
children: Object.keys(e.labels.reduce((r, c) => (r[c.label] ? ++r[c.label] : r[c.label] = 1, r), {})).map((r) => /* @__PURE__ */ s("div", {
|
|
634
637
|
children: r
|
|
635
638
|
}, r))
|
|
636
639
|
}),
|
|
637
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ V("div", {
|
|
638
641
|
style: {
|
|
639
642
|
width: "100%",
|
|
640
643
|
display: "flex"
|
|
@@ -653,7 +656,7 @@ const Si = (V) => {
|
|
|
653
656
|
color: "rgba(0,0,0,0.45)",
|
|
654
657
|
marginLeft: 5
|
|
655
658
|
},
|
|
656
|
-
children:
|
|
659
|
+
children: rt(e)
|
|
657
660
|
}) : null]
|
|
658
661
|
})
|
|
659
662
|
}) : /* @__PURE__ */ s("span", {
|
|
@@ -672,18 +675,18 @@ const Si = (V) => {
|
|
|
672
675
|
})
|
|
673
676
|
}) : /* @__PURE__ */ s("div", {
|
|
674
677
|
className: "empty",
|
|
675
|
-
children: n.total === 0 ? /* @__PURE__ */ s(
|
|
676
|
-
image:
|
|
677
|
-
description: /* @__PURE__ */
|
|
678
|
-
children: ["暂无数据",
|
|
679
|
-
children:
|
|
678
|
+
children: n.total === 0 ? /* @__PURE__ */ s(It, {
|
|
679
|
+
image: Nt,
|
|
680
|
+
description: /* @__PURE__ */ V("span", {
|
|
681
|
+
children: ["暂无数据", L !== "hascode" && !G && /* @__PURE__ */ s("span", {
|
|
682
|
+
children: I && I.add && /* @__PURE__ */ V(ie, {
|
|
680
683
|
type: "link",
|
|
681
684
|
size: "small",
|
|
682
685
|
style: {
|
|
683
686
|
padding: 0
|
|
684
687
|
},
|
|
685
|
-
onClick: () =>
|
|
686
|
-
disabled:
|
|
688
|
+
onClick: () => re(!0),
|
|
689
|
+
disabled: R === U.Pending || R === U.Started,
|
|
687
690
|
children: [/* @__PURE__ */ s("span", {
|
|
688
691
|
style: {
|
|
689
692
|
color: "black"
|
|
@@ -693,26 +696,26 @@ const Si = (V) => {
|
|
|
693
696
|
})
|
|
694
697
|
})]
|
|
695
698
|
})
|
|
696
|
-
}) : /* @__PURE__ */ s(
|
|
699
|
+
}) : /* @__PURE__ */ s(Lt, {})
|
|
697
700
|
})]
|
|
698
|
-
}), !
|
|
701
|
+
}), !v && j.labels && /* @__PURE__ */ s("div", {
|
|
699
702
|
className: "d-sider",
|
|
700
|
-
children: /* @__PURE__ */ s(
|
|
703
|
+
children: /* @__PURE__ */ s(Pt, {
|
|
701
704
|
datasetId: o,
|
|
702
705
|
data: P || [],
|
|
703
|
-
selected:
|
|
706
|
+
selected: F,
|
|
704
707
|
onSelectedChange: (e) => {
|
|
705
|
-
|
|
708
|
+
oe((P == null ? void 0 : P.filter((t) => e.find((l) => l.label === t.label))) || []);
|
|
706
709
|
},
|
|
707
710
|
onListChange: (e) => {
|
|
708
711
|
i && (f.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(o, i.id).then((t) => {
|
|
709
|
-
const r = (t || []).filter((
|
|
710
|
-
label:
|
|
711
|
-
count:
|
|
712
|
-
id:
|
|
713
|
-
color:
|
|
714
|
-
})),
|
|
715
|
-
|
|
712
|
+
const r = (t || []).filter((h) => h.label !== "nocode").map((h, k) => ({
|
|
713
|
+
label: h.label,
|
|
714
|
+
count: h.count,
|
|
715
|
+
id: h.id,
|
|
716
|
+
color: Me[k % 40]
|
|
717
|
+
})), c = F.filter((h) => r.some((k) => k.id === h.id));
|
|
718
|
+
ye(r), F.length !== c.length && oe(c);
|
|
716
719
|
}), x());
|
|
717
720
|
},
|
|
718
721
|
isPreLabel: w
|
|
@@ -731,5 +734,5 @@ const Si = (V) => {
|
|
|
731
734
|
});
|
|
732
735
|
};
|
|
733
736
|
export {
|
|
734
|
-
|
|
737
|
+
bi as default
|
|
735
738
|
};
|