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