@glodon-aiot/dataset-annotation 3.24.0-alpha.6 → 3.25.0-alpha.7
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/ClassificationAnnotation/index.mjs +374 -325
- package/dist/es/components/DetectionAnnotation/components/ImageDetail/index.mjs +82 -78
- package/dist/es/components/DetectionAnnotation/components/ImageModal/index.mjs +28 -26
- package/dist/es/components/DetectionAnnotation/components/LabelMaker/index.mjs +173 -166
- package/dist/es/components/DetectionAnnotation/index.mjs +478 -473
- package/dist/es/components/OcrAnnotation/OCRBoxDetail/index.mjs +249 -230
- package/dist/es/components/OcrAnnotation/OcrModal/index.mjs +103 -98
- package/dist/es/components/OcrAnnotation/index.mjs +281 -248
- package/dist/es/components/VLMAnnotationDetail/VLMDetail/index.mjs +277 -272
- package/dist/es/components/VLMAnnotationDetail/VlmModal/index.mjs +42 -40
- package/dist/es/components/VLMAnnotationDetail/index.mjs +331 -278
- package/dist/es/index.mjs +1 -1
- package/dist/es/utils/checkVlmSampleLabeled.mjs +7 -0
- package/dist/es/utils/scrollSampleIntoView.mjs +16 -0
- package/dist/lib/index.js +4 -4
- package/dist/src/components/DetectionAnnotation/components/ImageDetail/index.d.ts +2 -0
- package/dist/src/components/DetectionAnnotation/components/ImageModal/index.d.ts +2 -0
- package/dist/src/components/OcrAnnotation/OCRBoxDetail/index.d.ts +2 -0
- package/dist/src/components/OcrAnnotation/OcrModal/index.d.ts +1 -0
- package/dist/src/components/VLMAnnotationDetail/VLMDetail/index.d.ts +6 -0
- package/dist/src/components/VLMAnnotationDetail/VlmModal/index.d.ts +5 -0
- package/dist/src/utils/checkVlmSampleLabeled.d.ts +8 -0
- package/dist/src/utils/scrollSampleIntoView.d.ts +9 -0
- package/package.json +2 -2
|
@@ -1,54 +1,55 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
import { jsxs as
|
|
14
|
-
import { Tabs as
|
|
15
|
-
import { useContext as
|
|
1
|
+
var Ne = Object.defineProperty, ke = Object.defineProperties;
|
|
2
|
+
var we = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var pe = Object.getOwnPropertySymbols;
|
|
4
|
+
var ze = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var Ie = (p, u, s) => u in p ? Ne(p, u, { enumerable: !0, configurable: !0, writable: !0, value: s }) : p[u] = s, k = (p, u) => {
|
|
6
|
+
for (var s in u || (u = {}))
|
|
7
|
+
ze.call(u, s) && Ie(p, s, u[s]);
|
|
8
|
+
if (pe)
|
|
9
|
+
for (var s of pe(u))
|
|
10
|
+
Le.call(u, s) && Ie(p, s, u[s]);
|
|
11
|
+
return p;
|
|
12
|
+
}, V = (p, u) => ke(p, we(u));
|
|
13
|
+
import { jsxs as P, Fragment as Ve, jsx as x } from "react/jsx-runtime";
|
|
14
|
+
import { Tabs as ye, Space as me, Button as K, Tooltip as Pe, Modal as Te, message as w } from "antd";
|
|
15
|
+
import { useContext as Oe, useRef as z, useState as I, useEffect as W } from "react";
|
|
16
16
|
import "./style.less.mjs";
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
17
|
+
import De from "../../DataEmpty/index.mjs";
|
|
18
|
+
import qe from "../../../DatasetContext/index.mjs";
|
|
19
|
+
import Je from "../MarkOCRBoxModal/ImageDetail/index.mjs";
|
|
20
20
|
const {
|
|
21
|
-
TabPane:
|
|
22
|
-
} =
|
|
23
|
-
var
|
|
21
|
+
TabPane: G
|
|
22
|
+
} = ye, Qe = (p) => {
|
|
23
|
+
var he;
|
|
24
24
|
const {
|
|
25
|
-
visible:
|
|
26
|
-
selectSampleId:
|
|
27
|
-
datasetId:
|
|
28
|
-
versionId:
|
|
29
|
-
ocrMarkTmpl:
|
|
30
|
-
onClose:
|
|
31
|
-
onSave:
|
|
32
|
-
onPending:
|
|
33
|
-
categories:
|
|
34
|
-
externalSamples:
|
|
35
|
-
externalPagination:
|
|
36
|
-
externalCurrentIndex:
|
|
37
|
-
externalFilterMode:
|
|
38
|
-
onFilterModeChange:
|
|
39
|
-
onPaginationChange:
|
|
40
|
-
|
|
25
|
+
visible: u,
|
|
26
|
+
selectSampleId: s,
|
|
27
|
+
datasetId: C,
|
|
28
|
+
versionId: R,
|
|
29
|
+
ocrMarkTmpl: Me,
|
|
30
|
+
onClose: $e,
|
|
31
|
+
onSave: j,
|
|
32
|
+
onPending: Q,
|
|
33
|
+
categories: be,
|
|
34
|
+
externalSamples: S,
|
|
35
|
+
externalPagination: J,
|
|
36
|
+
externalCurrentIndex: U,
|
|
37
|
+
externalFilterMode: ne,
|
|
38
|
+
onFilterModeChange: X,
|
|
39
|
+
onPaginationChange: Y,
|
|
40
|
+
onCurrentSampleChange: Z
|
|
41
|
+
} = p, {
|
|
41
42
|
services: {
|
|
42
|
-
cvforceDatahub:
|
|
43
|
+
cvforceDatahub: m
|
|
43
44
|
}
|
|
44
|
-
} =
|
|
45
|
+
} = Oe(qe), T = z(null), [e, h] = I(), _ = z({}), [je, M] = I(0), [y, B] = I(() => s && (S != null && S.length) ? S : []), [O, N] = I(() => s && U !== void 0 ? U : -1), [d, D] = I(() => s && J ? k({}, J) : !s && J ? {
|
|
45
46
|
current: 1,
|
|
46
|
-
pageSize:
|
|
47
|
+
pageSize: J.pageSize
|
|
47
48
|
} : {
|
|
48
49
|
current: 1,
|
|
49
50
|
pageSize: 50
|
|
50
|
-
}), [
|
|
51
|
-
switch (
|
|
51
|
+
}), [re, ie] = I(0), [se, oe] = I(0), [ce, le] = I(0), [o, ve] = I(() => s && ne ? ne : s ? "" : "nocode"), de = z(!1), ae = z(0), ee = z(0), L = z(!1), $ = z(!1), b = z({}), [E, A] = I(!1), [te, F] = I(!1), Se = () => {
|
|
52
|
+
switch (o) {
|
|
52
53
|
case "nocode":
|
|
53
54
|
case "hascode":
|
|
54
55
|
return 0;
|
|
@@ -57,8 +58,8 @@ const {
|
|
|
57
58
|
default:
|
|
58
59
|
return 2;
|
|
59
60
|
}
|
|
60
|
-
},
|
|
61
|
-
switch (
|
|
61
|
+
}, Ce = () => {
|
|
62
|
+
switch (o) {
|
|
62
63
|
case "nocode":
|
|
63
64
|
return "nocode";
|
|
64
65
|
case "pending":
|
|
@@ -69,280 +70,298 @@ const {
|
|
|
69
70
|
return;
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
|
-
|
|
73
|
-
if (!
|
|
73
|
+
W(() => {
|
|
74
|
+
if (!C || !R) {
|
|
75
|
+
L.current = !1;
|
|
74
76
|
return;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
}
|
|
78
|
+
const t = d.current || 1, n = d.pageSize || 50;
|
|
79
|
+
if (!de.current && s && (S != null && S.length) && J && U !== void 0) {
|
|
80
|
+
const c = S.find((r) => r.id === s);
|
|
81
|
+
if (c) {
|
|
82
|
+
de.current = !0, $.current = !0, L.current = !1, h(c), M(S.length), q();
|
|
80
83
|
return;
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
+
const f = ++ee.current;
|
|
87
|
+
m == null || m.getDatasetsIdVersionsVidSamples(C, R, {
|
|
88
|
+
labels: Ce(),
|
|
89
|
+
pageNo: t,
|
|
86
90
|
pageSize: n,
|
|
87
|
-
confirmStatus:
|
|
88
|
-
}).then((
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
confirmStatus: Se()
|
|
92
|
+
}).then((c) => {
|
|
93
|
+
if (f !== ee.current)
|
|
94
|
+
return;
|
|
95
|
+
const r = c.recordList || [];
|
|
96
|
+
B(r);
|
|
97
|
+
const g = V(k({}, d), {
|
|
98
|
+
current: t,
|
|
93
99
|
pageSize: n,
|
|
94
|
-
total:
|
|
100
|
+
total: c.totalResults
|
|
95
101
|
});
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
if (delete g.type, D(g), Y == null || Y({
|
|
103
|
+
current: t,
|
|
104
|
+
pageSize: n,
|
|
105
|
+
total: c.totalResults
|
|
106
|
+
}), d.type === "next" && r.length) {
|
|
107
|
+
N(0);
|
|
108
|
+
const l = c.recordList[0];
|
|
109
|
+
h(l), M(r.length), o !== void 0 && (b.current[o] = {
|
|
100
110
|
index: 0,
|
|
101
|
-
page:
|
|
111
|
+
page: t
|
|
102
112
|
});
|
|
103
|
-
const u = R({}, d);
|
|
104
|
-
delete u.type, V(u), b == null || b(u);
|
|
105
113
|
return;
|
|
106
114
|
}
|
|
107
|
-
if (
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
index:
|
|
113
|
-
page:
|
|
115
|
+
if (d.type === "prev" && r.length) {
|
|
116
|
+
const i = d.pageSize - 1;
|
|
117
|
+
N(i);
|
|
118
|
+
const l = c.recordList[i];
|
|
119
|
+
h(l), M(r.length), o !== void 0 && (b.current[o] = {
|
|
120
|
+
index: i,
|
|
121
|
+
page: t
|
|
114
122
|
});
|
|
115
|
-
const u = R({}, d);
|
|
116
|
-
delete u.type, V(u), b == null || b(u);
|
|
117
123
|
return;
|
|
118
124
|
}
|
|
119
|
-
if (
|
|
120
|
-
if (
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
index:
|
|
125
|
-
page:
|
|
125
|
+
if (r.find((i) => i.id === s) && !$.current) {
|
|
126
|
+
if (s) {
|
|
127
|
+
$.current = !0, h(r.find((l) => l.id === s));
|
|
128
|
+
const i = r.findIndex((l) => l.id === s);
|
|
129
|
+
N(i), o !== void 0 && (b.current[o] = {
|
|
130
|
+
index: i,
|
|
131
|
+
page: t
|
|
126
132
|
});
|
|
127
133
|
} else {
|
|
128
|
-
const
|
|
129
|
-
|
|
134
|
+
const i = b.current[o], l = i == null ? void 0 : i.index, a = l !== void 0 && l >= 0 && l < r.length ? l : 0;
|
|
135
|
+
h(r[a]), N(a);
|
|
130
136
|
}
|
|
131
|
-
|
|
132
|
-
} else if (
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
M(r.length);
|
|
138
|
+
} else if (s && !$.current)
|
|
139
|
+
$.current = !0, m.getDatasetsIdVersionsVidSsamplesSid(C, R, s).then((i) => {
|
|
140
|
+
h(i);
|
|
135
141
|
});
|
|
136
142
|
else {
|
|
137
|
-
const
|
|
138
|
-
|
|
143
|
+
const i = b.current[o], l = i == null ? void 0 : i.index, a = l !== void 0 && l >= 0 && l < r.length ? l : 0;
|
|
144
|
+
h(r[a]), N(a), M(r.length);
|
|
139
145
|
}
|
|
140
|
-
})
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
146
|
+
}).finally(() => {
|
|
147
|
+
f === ee.current && (L.current = !1);
|
|
148
|
+
}), q();
|
|
149
|
+
}, [d.current, o, C, R]), W(() => {
|
|
150
|
+
e != null && e.id && (Z == null || Z(e.id));
|
|
151
|
+
}, [e == null ? void 0 : e.id]);
|
|
152
|
+
const q = () => {
|
|
153
|
+
!C || !R || m == null || m.getDatasetsIdVersionsVidLabelcount(C, R, {
|
|
144
154
|
label: "allcode",
|
|
145
155
|
confirmStatus: 2
|
|
146
|
-
}).then((
|
|
147
|
-
const n =
|
|
148
|
-
|
|
156
|
+
}).then((t) => {
|
|
157
|
+
const n = t.find((r) => r.id === "allcodeid"), f = t.find((r) => r.id === "nocodeid"), c = t.find((r) => r.id === "pendingid");
|
|
158
|
+
ie(n ? n.count : 0), oe(f ? f.count : 0), le(c ? c.count : 0);
|
|
149
159
|
});
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
var
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
|
|
160
|
+
}, H = (t) => {
|
|
161
|
+
y && B((n) => {
|
|
162
|
+
var v, i;
|
|
163
|
+
const f = !!(e && ((v = e.labels) != null && v.length && o === "nocode" || !((i = e.labels) != null && i.length) && o === "hascode" || t === !0)), c = f ? O : O + 1;
|
|
164
|
+
let r = n, g = d.total;
|
|
165
|
+
if (e && f) {
|
|
166
|
+
const l = n.findIndex((a) => a.id === e.id);
|
|
167
|
+
l > -1 && (r = n.slice(0, l).concat(n.slice(l + 1)), g && (g = g - 1, D((a) => V(k({}, a), {
|
|
168
|
+
total: g
|
|
169
|
+
}))));
|
|
158
170
|
}
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
|
|
166
|
-
index:
|
|
167
|
-
page:
|
|
171
|
+
if (c >= r.length) {
|
|
172
|
+
const l = (d.current - 1) * d.pageSize + c;
|
|
173
|
+
g == null || l >= g ? (r.length > 0 && O >= r.length && setTimeout(() => {
|
|
174
|
+
const a = r.length - 1;
|
|
175
|
+
N(a);
|
|
176
|
+
const Re = r[a];
|
|
177
|
+
h(Re), o !== void 0 && (b.current[o] = {
|
|
178
|
+
index: a,
|
|
179
|
+
page: d.current || 1
|
|
168
180
|
});
|
|
169
|
-
}, 0),
|
|
170
|
-
current:
|
|
171
|
-
|
|
181
|
+
}, 0), w.error("已经是最后一个了")) : L.current || (L.current = !0, D((a) => V(k({}, a), {
|
|
182
|
+
current: a.current + 1,
|
|
183
|
+
// total 要带上,否则翻页请求回来之前判空会误报“已经是最后一个了”
|
|
184
|
+
total: g,
|
|
172
185
|
type: "next"
|
|
173
|
-
});
|
|
186
|
+
})));
|
|
174
187
|
} else
|
|
175
188
|
setTimeout(() => {
|
|
176
|
-
|
|
177
|
-
const
|
|
178
|
-
|
|
179
|
-
index:
|
|
180
|
-
page:
|
|
189
|
+
N(c);
|
|
190
|
+
const l = r[c];
|
|
191
|
+
h(l), o !== void 0 && (b.current[o] = {
|
|
192
|
+
index: c,
|
|
193
|
+
page: d.current || 1
|
|
181
194
|
});
|
|
182
195
|
}, 0);
|
|
183
|
-
return
|
|
196
|
+
return r;
|
|
184
197
|
});
|
|
185
|
-
},
|
|
186
|
-
var
|
|
187
|
-
if (!
|
|
198
|
+
}, ue = () => {
|
|
199
|
+
var r, g;
|
|
200
|
+
if (!y)
|
|
188
201
|
return;
|
|
189
|
-
let
|
|
190
|
-
if (
|
|
191
|
-
const
|
|
192
|
-
|
|
202
|
+
let t, n = d.total;
|
|
203
|
+
if (e && y && ((r = e.labels) != null && r.length && o === "nocode" || !((g = e.labels) != null && g.length) && o === "hascode")) {
|
|
204
|
+
const v = y.findIndex((i) => i.id === e.id);
|
|
205
|
+
v > -1 && (t = y.slice(0, v).concat(y.slice(v + 1)), n && (n = n - 1, D((i) => V(k({}, i), {
|
|
206
|
+
total: n
|
|
207
|
+
}))));
|
|
193
208
|
}
|
|
194
|
-
const
|
|
195
|
-
if (
|
|
196
|
-
(
|
|
197
|
-
current:
|
|
198
|
-
|
|
209
|
+
const f = t || y, c = O - 1;
|
|
210
|
+
if (c < 0)
|
|
211
|
+
(d.current - 1) * d.pageSize + c < 0 ? w.error("已经是第一个了") : L.current || (L.current = !0, D((i) => V(k({}, i), {
|
|
212
|
+
current: i.current - 1,
|
|
213
|
+
// total 要带上,否则翻页请求回来之前判空会误报“已经是最后一个了”
|
|
214
|
+
total: n,
|
|
199
215
|
type: "prev"
|
|
200
|
-
});
|
|
216
|
+
})));
|
|
201
217
|
else {
|
|
202
|
-
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
index:
|
|
206
|
-
page:
|
|
218
|
+
N(c);
|
|
219
|
+
const v = f[c];
|
|
220
|
+
h(v), o !== void 0 && (b.current[o] = {
|
|
221
|
+
index: c,
|
|
222
|
+
page: d.current || 1
|
|
207
223
|
});
|
|
208
224
|
}
|
|
209
|
-
|
|
225
|
+
t && B(t);
|
|
210
226
|
};
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
227
|
+
W(() => {
|
|
228
|
+
if (!u || !C || !R || !e)
|
|
229
|
+
return;
|
|
230
|
+
const t = ++ae.current;
|
|
231
|
+
m == null || m.getDatasetsIdVersionsVidSsamplesSid(C, R, e.id).then((n) => {
|
|
232
|
+
t === ae.current && (h(n), _.current = JSON.parse(JSON.stringify(n)));
|
|
233
|
+
});
|
|
234
|
+
}, [e == null ? void 0 : e.id]), W(() => {
|
|
235
|
+
T.current && (T.current.width = T.current.offsetWidth, T.current.height = T.current.offsetHeight);
|
|
236
|
+
}, [T.current]);
|
|
237
|
+
const fe = () => !e || !_.current ? !1 : JSON.stringify(e) !== JSON.stringify(_.current), ge = () => {
|
|
238
|
+
if (e)
|
|
239
|
+
if (fe()) {
|
|
240
|
+
A(!0);
|
|
241
|
+
const t = e.confirmStatus === 1 ? Q : j;
|
|
242
|
+
t == null || t(e).then((n) => {
|
|
243
|
+
n ? (ue(), q()) : w.error("保存失败");
|
|
225
244
|
}).finally(() => {
|
|
226
|
-
|
|
245
|
+
A(!1);
|
|
227
246
|
});
|
|
228
247
|
} else
|
|
229
|
-
|
|
230
|
-
},
|
|
231
|
-
if (
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
|
|
236
|
-
n ? (
|
|
248
|
+
ue();
|
|
249
|
+
}, xe = () => {
|
|
250
|
+
if (e)
|
|
251
|
+
if (fe()) {
|
|
252
|
+
A(!0);
|
|
253
|
+
const t = e.confirmStatus === 1 ? Q : j;
|
|
254
|
+
t == null || t(e).then((n) => {
|
|
255
|
+
n ? (H(), q()) : w.error("保存失败");
|
|
237
256
|
}).finally(() => {
|
|
238
|
-
|
|
257
|
+
A(!1);
|
|
239
258
|
});
|
|
240
259
|
} else
|
|
241
|
-
|
|
260
|
+
H();
|
|
242
261
|
};
|
|
243
|
-
return /* @__PURE__ */
|
|
244
|
-
children: [/* @__PURE__ */
|
|
262
|
+
return /* @__PURE__ */ P(Ve, {
|
|
263
|
+
children: [/* @__PURE__ */ P("div", {
|
|
245
264
|
className: "ocr-box-detail-records-content",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ P(ye, {
|
|
247
266
|
className: "ocr-box-detail-records-content-tabs",
|
|
248
|
-
activeKey:
|
|
249
|
-
onChange: (
|
|
250
|
-
|
|
251
|
-
index:
|
|
252
|
-
page:
|
|
267
|
+
activeKey: o,
|
|
268
|
+
onChange: (t) => {
|
|
269
|
+
O >= 0 && o !== void 0 && o !== null && (b.current[o] = {
|
|
270
|
+
index: O,
|
|
271
|
+
page: d.current || 1
|
|
253
272
|
});
|
|
254
|
-
const n =
|
|
255
|
-
V(
|
|
256
|
-
current:
|
|
257
|
-
})),
|
|
273
|
+
const n = b.current[t], f = (n == null ? void 0 : n.page) || 1;
|
|
274
|
+
D(V(k({}, d), {
|
|
275
|
+
current: f
|
|
276
|
+
})), ve(t), X == null || X(t);
|
|
258
277
|
},
|
|
259
|
-
children: [/* @__PURE__ */
|
|
260
|
-
tab: `全部(${
|
|
261
|
-
}, ""), /* @__PURE__ */
|
|
262
|
-
tab: `未标注(${
|
|
263
|
-
}, "nocode"), /* @__PURE__ */
|
|
264
|
-
tab: `待确认(${
|
|
265
|
-
}, "pending"), /* @__PURE__ */
|
|
266
|
-
tab: `已标注(${
|
|
278
|
+
children: [/* @__PURE__ */ x(G, {
|
|
279
|
+
tab: `全部(${re})`
|
|
280
|
+
}, ""), /* @__PURE__ */ x(G, {
|
|
281
|
+
tab: `未标注(${se})`
|
|
282
|
+
}, "nocode"), /* @__PURE__ */ x(G, {
|
|
283
|
+
tab: `待确认(${ce})`
|
|
284
|
+
}, "pending"), /* @__PURE__ */ x(G, {
|
|
285
|
+
tab: `已标注(${re - se - ce})`
|
|
267
286
|
}, "hascode")]
|
|
268
|
-
}),
|
|
269
|
-
currentSample:
|
|
270
|
-
categories:
|
|
271
|
-
onChange: (
|
|
272
|
-
|
|
273
|
-
const
|
|
274
|
-
return n[
|
|
287
|
+
}), y != null && y.length ? /* @__PURE__ */ x(Je, {
|
|
288
|
+
currentSample: e,
|
|
289
|
+
categories: be,
|
|
290
|
+
onChange: (t) => {
|
|
291
|
+
h(t), B((n) => {
|
|
292
|
+
const f = n.findIndex((c) => c.id === t.id);
|
|
293
|
+
return n[f] = t, [...n];
|
|
275
294
|
});
|
|
276
295
|
},
|
|
277
|
-
onNextClick:
|
|
278
|
-
onPrevClick:
|
|
279
|
-
}) : /* @__PURE__ */
|
|
280
|
-
}), /* @__PURE__ */
|
|
296
|
+
onNextClick: xe,
|
|
297
|
+
onPrevClick: ge
|
|
298
|
+
}) : /* @__PURE__ */ x(De, {})]
|
|
299
|
+
}), /* @__PURE__ */ P("div", {
|
|
281
300
|
className: "ocr-box-detail-footer",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ x("div", {
|
|
283
302
|
style: {
|
|
284
303
|
width: "420px"
|
|
285
304
|
}
|
|
286
|
-
}), /* @__PURE__ */
|
|
287
|
-
children: [/* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ P(me, {
|
|
306
|
+
children: [/* @__PURE__ */ x(K, {
|
|
288
307
|
type: "default",
|
|
289
|
-
onClick:
|
|
290
|
-
disabled:
|
|
308
|
+
onClick: ge,
|
|
309
|
+
disabled: E || te,
|
|
291
310
|
children: "上一张"
|
|
292
|
-
}, "prev"), /* @__PURE__ */
|
|
311
|
+
}, "prev"), /* @__PURE__ */ x(K, {
|
|
293
312
|
type: "default",
|
|
294
|
-
onClick:
|
|
295
|
-
disabled:
|
|
313
|
+
onClick: xe,
|
|
314
|
+
disabled: E || te,
|
|
296
315
|
children: "下一张"
|
|
297
316
|
}, "next")]
|
|
298
|
-
}), /* @__PURE__ */
|
|
317
|
+
}), /* @__PURE__ */ P(me, {
|
|
299
318
|
style: {
|
|
300
319
|
width: "420px",
|
|
301
320
|
justifyContent: "flex-end"
|
|
302
321
|
},
|
|
303
|
-
children: [/* @__PURE__ */
|
|
322
|
+
children: [/* @__PURE__ */ P("span", {
|
|
304
323
|
className: "ocr-modal-label-num",
|
|
305
|
-
children: ["当前图片标注框数量:", ((
|
|
306
|
-
}), (
|
|
307
|
-
title: /* @__PURE__ */
|
|
324
|
+
children: ["当前图片标注框数量:", ((he = e == null ? void 0 : e.labels) == null ? void 0 : he.length) || 0]
|
|
325
|
+
}), (e == null ? void 0 : e.confirmStatus) === 1 && /* @__PURE__ */ x(Pe, {
|
|
326
|
+
title: /* @__PURE__ */ x("span", {
|
|
308
327
|
style: {
|
|
309
328
|
color: "#ff9800"
|
|
310
329
|
},
|
|
311
330
|
children: 'AI预标注数据,请"确认标注"完成审核'
|
|
312
331
|
}),
|
|
313
332
|
placement: "top",
|
|
314
|
-
children: /* @__PURE__ */
|
|
333
|
+
children: /* @__PURE__ */ x(K, {
|
|
315
334
|
type: "primary",
|
|
316
335
|
onClick: () => {
|
|
317
|
-
|
|
336
|
+
Te.confirm({
|
|
318
337
|
title: "确认",
|
|
319
338
|
content: "是否确认当前标注?",
|
|
320
339
|
onOk: () => {
|
|
321
|
-
|
|
322
|
-
|
|
340
|
+
e && (F(!0), j(e).then((t) => {
|
|
341
|
+
t ? (w.success("保存成功"), H(!0), q()) : w.error("保存失败");
|
|
323
342
|
}).finally(() => {
|
|
324
|
-
|
|
343
|
+
F(!1);
|
|
325
344
|
}));
|
|
326
345
|
}
|
|
327
346
|
});
|
|
328
347
|
},
|
|
329
|
-
disabled: !
|
|
348
|
+
disabled: !e || E,
|
|
330
349
|
className: "ocr-confirm-label-btn",
|
|
331
350
|
children: "确认标注"
|
|
332
351
|
})
|
|
333
|
-
}), /* @__PURE__ */
|
|
334
|
-
disabled: !
|
|
352
|
+
}), /* @__PURE__ */ x(K, {
|
|
353
|
+
disabled: !e || E,
|
|
335
354
|
type: "primary",
|
|
336
|
-
loading:
|
|
355
|
+
loading: te,
|
|
337
356
|
onClick: () => {
|
|
338
|
-
if (!
|
|
357
|
+
if (!e)
|
|
339
358
|
return;
|
|
340
|
-
|
|
341
|
-
const
|
|
342
|
-
|
|
343
|
-
n ? (
|
|
359
|
+
F(!0);
|
|
360
|
+
const t = e.confirmStatus === 1 ? Q : j;
|
|
361
|
+
t == null || t(e).then((n) => {
|
|
362
|
+
n ? (w.success("保存成功"), H(), q()) : w.error("保存失败");
|
|
344
363
|
}).finally(() => {
|
|
345
|
-
|
|
364
|
+
F(!1);
|
|
346
365
|
});
|
|
347
366
|
},
|
|
348
367
|
children: "保存标注"
|
|
@@ -352,5 +371,5 @@ const {
|
|
|
352
371
|
});
|
|
353
372
|
};
|
|
354
373
|
export {
|
|
355
|
-
|
|
374
|
+
Qe as default
|
|
356
375
|
};
|