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