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