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