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