@yzsf2e/render-core 1.0.2-alpha.52 → 1.0.2-alpha.53
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/render-core.mjs +800 -797
- package/dist/render-core.umd.js +3 -3
- package/package.json +1 -1
package/dist/render-core.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import * as Ys from "@ant-design/icons-vue";
|
|
|
4
4
|
import { CloseOutlined as Vs, ShrinkOutlined as Hs, ArrowsAltOutlined as Ws, HolderOutlined as Gs, DownOutlined as Za, UpOutlined as qs, SettingOutlined as Xs, LoadingOutlined as Ja, FilterOutlined as Qs } from "@ant-design/icons-vue";
|
|
5
5
|
import { useRouter as Zs } from "vue-router";
|
|
6
6
|
/*!
|
|
7
|
-
* @yzsf2e/render-core v0.0.2-alpha.25 Mon
|
|
7
|
+
* @yzsf2e/render-core v0.0.2-alpha.25 Mon Jun 03 2024 11:03:12 GMT+0800 (中国标准时间)
|
|
8
8
|
* (c) 2023 @yzsf2e.
|
|
9
9
|
*/
|
|
10
10
|
const Js = Object.assign;
|
|
@@ -218,7 +218,7 @@ function Jt(...e) {
|
|
|
218
218
|
return;
|
|
219
219
|
const d = fl(c) ? { ...c } : c;
|
|
220
220
|
a.push(
|
|
221
|
-
...n.flatMap((g) => r.map((
|
|
221
|
+
...n.flatMap((g) => r.map((w) => o(f, g, w, d)))
|
|
222
222
|
);
|
|
223
223
|
},
|
|
224
224
|
{ immediate: !0, flush: "post" }
|
|
@@ -295,76 +295,76 @@ function Al(e, t, n, r = {}) {
|
|
|
295
295
|
shallow: f,
|
|
296
296
|
window: c = an,
|
|
297
297
|
eventFilter: d,
|
|
298
|
-
onError: g = (
|
|
299
|
-
console.error(
|
|
298
|
+
onError: g = (S) => {
|
|
299
|
+
console.error(S);
|
|
300
300
|
},
|
|
301
|
-
initOnMounted:
|
|
302
|
-
} = r,
|
|
301
|
+
initOnMounted: w
|
|
302
|
+
} = r, p = (f ? Zt : P)(typeof t == "function" ? t() : t);
|
|
303
303
|
if (!n)
|
|
304
304
|
try {
|
|
305
305
|
n = Ol("getDefaultStorage", () => {
|
|
306
|
-
var
|
|
307
|
-
return (
|
|
306
|
+
var S;
|
|
307
|
+
return (S = an) == null ? void 0 : S.localStorage;
|
|
308
308
|
})();
|
|
309
|
-
} catch (
|
|
310
|
-
g(
|
|
309
|
+
} catch (S) {
|
|
310
|
+
g(S);
|
|
311
311
|
}
|
|
312
312
|
if (!n)
|
|
313
|
-
return
|
|
314
|
-
const y = ke(t),
|
|
315
|
-
|
|
316
|
-
() =>
|
|
313
|
+
return p;
|
|
314
|
+
const y = ke(t), T = _l(y), v = (i = r.serializer) != null ? i : $l[T], { pause: h, resume: _ } = vl(
|
|
315
|
+
p,
|
|
316
|
+
() => O(p.value),
|
|
317
317
|
{ flush: a, deep: s, eventFilter: d }
|
|
318
318
|
);
|
|
319
319
|
return c && o && bl(() => {
|
|
320
|
-
Jt(c, "storage",
|
|
321
|
-
}),
|
|
322
|
-
function
|
|
320
|
+
Jt(c, "storage", E), Jt(c, bi, m), w && E();
|
|
321
|
+
}), w || E(), p;
|
|
322
|
+
function O(S) {
|
|
323
323
|
try {
|
|
324
|
-
if (
|
|
324
|
+
if (S == null)
|
|
325
325
|
n.removeItem(e);
|
|
326
326
|
else {
|
|
327
|
-
const
|
|
328
|
-
I !==
|
|
327
|
+
const C = v.write(S), I = n.getItem(e);
|
|
328
|
+
I !== C && (n.setItem(e, C), c && c.dispatchEvent(new CustomEvent(bi, {
|
|
329
329
|
detail: {
|
|
330
330
|
key: e,
|
|
331
331
|
oldValue: I,
|
|
332
|
-
newValue:
|
|
332
|
+
newValue: C,
|
|
333
333
|
storageArea: n
|
|
334
334
|
}
|
|
335
335
|
})));
|
|
336
336
|
}
|
|
337
|
-
} catch (
|
|
338
|
-
g(
|
|
337
|
+
} catch (C) {
|
|
338
|
+
g(C);
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
function b(
|
|
342
|
-
const
|
|
343
|
-
if (
|
|
344
|
-
return u && y != null && n.setItem(e,
|
|
345
|
-
if (!
|
|
346
|
-
const I =
|
|
347
|
-
return typeof l == "function" ? l(I, y) :
|
|
341
|
+
function b(S) {
|
|
342
|
+
const C = S ? S.newValue : n.getItem(e);
|
|
343
|
+
if (C == null)
|
|
344
|
+
return u && y != null && n.setItem(e, v.write(y)), y;
|
|
345
|
+
if (!S && l) {
|
|
346
|
+
const I = v.read(C);
|
|
347
|
+
return typeof l == "function" ? l(I, y) : T === "object" && !Array.isArray(I) ? { ...y, ...I } : I;
|
|
348
348
|
} else
|
|
349
|
-
return typeof
|
|
349
|
+
return typeof C != "string" ? C : v.read(C);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
S
|
|
351
|
+
function m(S) {
|
|
352
|
+
E(S.detail);
|
|
353
353
|
}
|
|
354
|
-
function S
|
|
355
|
-
if (!(
|
|
356
|
-
if (
|
|
357
|
-
|
|
354
|
+
function E(S) {
|
|
355
|
+
if (!(S && S.storageArea !== n)) {
|
|
356
|
+
if (S && S.key == null) {
|
|
357
|
+
p.value = y;
|
|
358
358
|
return;
|
|
359
359
|
}
|
|
360
|
-
if (!(
|
|
361
|
-
|
|
360
|
+
if (!(S && S.key !== e)) {
|
|
361
|
+
h();
|
|
362
362
|
try {
|
|
363
|
-
(
|
|
364
|
-
} catch (
|
|
365
|
-
g(
|
|
363
|
+
(S == null ? void 0 : S.newValue) !== v.write(p.value) && (p.value = b(S));
|
|
364
|
+
} catch (C) {
|
|
365
|
+
g(C);
|
|
366
366
|
} finally {
|
|
367
|
-
|
|
367
|
+
S ? Ge(_) : _();
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
}
|
|
@@ -383,42 +383,42 @@ function Pl(e, t = {}) {
|
|
|
383
383
|
initialValue: c,
|
|
384
384
|
axis: d = "both",
|
|
385
385
|
draggingElement: g = an,
|
|
386
|
-
containerElement:
|
|
387
|
-
handle:
|
|
386
|
+
containerElement: w,
|
|
387
|
+
handle: p = e
|
|
388
388
|
} = t, y = P(
|
|
389
389
|
(n = ke(c)) != null ? n : { x: 0, y: 0 }
|
|
390
|
-
),
|
|
391
|
-
ke(a) &&
|
|
392
|
-
}, _ = (
|
|
393
|
-
var
|
|
394
|
-
if (!m
|
|
390
|
+
), T = P(), v = (m) => i ? i.includes(m.pointerType) : !0, h = (m) => {
|
|
391
|
+
ke(a) && m.preventDefault(), ke(s) && m.stopPropagation();
|
|
392
|
+
}, _ = (m) => {
|
|
393
|
+
var E;
|
|
394
|
+
if (!v(m) || ke(o) && m.target !== ke(e))
|
|
395
395
|
return;
|
|
396
|
-
const
|
|
397
|
-
x:
|
|
398
|
-
y:
|
|
396
|
+
const S = ke(w), C = (E = S == null ? void 0 : S.getBoundingClientRect) == null ? void 0 : E.call(S), I = ke(e).getBoundingClientRect(), K = {
|
|
397
|
+
x: m.clientX - (S ? I.left - C.left : I.left),
|
|
398
|
+
y: m.clientY - (S ? I.top - C.top : I.top)
|
|
399
399
|
};
|
|
400
|
-
(f == null ? void 0 : f(K,
|
|
401
|
-
},
|
|
402
|
-
var
|
|
403
|
-
if (!m
|
|
400
|
+
(f == null ? void 0 : f(K, m)) !== !1 && (T.value = K, h(m));
|
|
401
|
+
}, O = (m) => {
|
|
402
|
+
var E;
|
|
403
|
+
if (!v(m) || !T.value)
|
|
404
404
|
return;
|
|
405
|
-
const
|
|
405
|
+
const S = ke(w), C = (E = S == null ? void 0 : S.getBoundingClientRect) == null ? void 0 : E.call(S), I = ke(e).getBoundingClientRect();
|
|
406
406
|
let { x: K, y: J } = y.value;
|
|
407
|
-
(d === "x" || d === "both") && (K =
|
|
407
|
+
(d === "x" || d === "both") && (K = m.clientX - T.value.x, S && (K = Math.min(Math.max(0, K), C.width - I.width))), (d === "y" || d === "both") && (J = m.clientY - T.value.y, S && (J = Math.min(Math.max(0, J), C.height - I.height))), y.value = {
|
|
408
408
|
x: K,
|
|
409
409
|
y: J
|
|
410
|
-
}, u == null || u(y.value,
|
|
411
|
-
}, b = (
|
|
412
|
-
m
|
|
410
|
+
}, u == null || u(y.value, m), h(m);
|
|
411
|
+
}, b = (m) => {
|
|
412
|
+
v(m) && T.value && (T.value = void 0, l == null || l(y.value, m), h(m));
|
|
413
413
|
};
|
|
414
414
|
if (no) {
|
|
415
|
-
const
|
|
416
|
-
Jt(
|
|
415
|
+
const m = { capture: (r = t.capture) != null ? r : !0 };
|
|
416
|
+
Jt(p, "pointerdown", _, m), Jt(g, "pointermove", O, m), Jt(g, "pointerup", b, m);
|
|
417
417
|
}
|
|
418
418
|
return {
|
|
419
419
|
...yl(y),
|
|
420
420
|
position: y,
|
|
421
|
-
isDragging: G(() => !!
|
|
421
|
+
isDragging: G(() => !!T.value),
|
|
422
422
|
style: G(
|
|
423
423
|
() => `left:${y.value.x}px;top:${y.value.y}px;`
|
|
424
424
|
)
|
|
@@ -456,34 +456,34 @@ function io(e, t, n, r = {}) {
|
|
|
456
456
|
deep: f = !1,
|
|
457
457
|
defaultValue: c,
|
|
458
458
|
shouldEmit: d
|
|
459
|
-
} = r, g = Vt(),
|
|
460
|
-
let
|
|
461
|
-
t || (t = "modelValue"),
|
|
462
|
-
const y = (
|
|
463
|
-
d ? d(
|
|
459
|
+
} = r, g = Vt(), w = n || (g == null ? void 0 : g.emit) || ((i = g == null ? void 0 : g.$emit) == null ? void 0 : i.bind(g)) || ((s = (a = g == null ? void 0 : g.proxy) == null ? void 0 : a.$emit) == null ? void 0 : s.bind(g == null ? void 0 : g.proxy));
|
|
460
|
+
let p = l;
|
|
461
|
+
t || (t = "modelValue"), p = p || `update:${t.toString()}`;
|
|
462
|
+
const y = (h) => o ? typeof o == "function" ? o(h) : El(h) : h, T = () => ul(e[t]) ? y(e[t]) : c, v = (h) => {
|
|
463
|
+
d ? d(h) && w(p, h) : w(p, h);
|
|
464
464
|
};
|
|
465
465
|
if (u) {
|
|
466
|
-
const
|
|
467
|
-
let
|
|
466
|
+
const h = T(), _ = P(h);
|
|
467
|
+
let O = !1;
|
|
468
468
|
return ve(
|
|
469
469
|
() => e[t],
|
|
470
470
|
(b) => {
|
|
471
|
-
|
|
471
|
+
O || (O = !0, _.value = y(b), Ge(() => O = !1));
|
|
472
472
|
}
|
|
473
473
|
), ve(
|
|
474
474
|
_,
|
|
475
475
|
(b) => {
|
|
476
|
-
!
|
|
476
|
+
!O && (b !== e[t] || f) && v(b);
|
|
477
477
|
},
|
|
478
478
|
{ deep: f }
|
|
479
479
|
), _;
|
|
480
480
|
} else
|
|
481
481
|
return G({
|
|
482
482
|
get() {
|
|
483
|
-
return
|
|
483
|
+
return T();
|
|
484
484
|
},
|
|
485
|
-
set(
|
|
486
|
-
|
|
485
|
+
set(h) {
|
|
486
|
+
v(h);
|
|
487
487
|
}
|
|
488
488
|
});
|
|
489
489
|
}
|
|
@@ -529,11 +529,11 @@ const [Dl] = bn("drag-drawer"), Nl = Ae({
|
|
|
529
529
|
handleMouseDown: (d) => {
|
|
530
530
|
let g = !1;
|
|
531
531
|
g = !0;
|
|
532
|
-
const
|
|
533
|
-
document.body.classList.add("disable-select-in-dragging"), window.onmousemove = function(
|
|
532
|
+
const w = d.clientX, p = i.value, y = (u == null ? void 0 : u.clientWidth) || document.body.clientWidth;
|
|
533
|
+
document.body.classList.add("disable-select-in-dragging"), window.onmousemove = function(T) {
|
|
534
534
|
if (g == !1)
|
|
535
535
|
return;
|
|
536
|
-
const
|
|
536
|
+
const h = T.clientX - w, _ = typeof p == "number" ? p - h : window.innerWidth - T.x;
|
|
537
537
|
i.value = Math.min(_ < l ? l : _, y);
|
|
538
538
|
}, window.onmouseup = () => {
|
|
539
539
|
window.onmousemove = null, document.body.classList.remove("disable-select-in-dragging");
|
|
@@ -620,52 +620,55 @@ const Ll = /* @__PURE__ */ Qe(Nl, [["render", Ml]]), xl = wn(Ll), [kl] = bn("pag
|
|
|
620
620
|
},
|
|
621
621
|
extraData: {
|
|
622
622
|
type: Object
|
|
623
|
+
},
|
|
624
|
+
getContainer: {
|
|
625
|
+
type: Function,
|
|
626
|
+
default: () => document.querySelector(".page-renderer-wrapper")
|
|
623
627
|
}
|
|
624
628
|
},
|
|
625
629
|
emits: ["refresh"],
|
|
626
630
|
setup(e, { expose: t, emit: n }) {
|
|
627
631
|
const { form: r } = Xe(e), i = P(!1), a = P(!1), s = P(null), o = qe({
|
|
628
632
|
showOk: !0
|
|
629
|
-
}), u =
|
|
630
|
-
var
|
|
633
|
+
}), u = async () => {
|
|
634
|
+
var d, g;
|
|
631
635
|
a.value = !0;
|
|
632
|
-
const
|
|
633
|
-
(
|
|
634
|
-
const { needFeedback:
|
|
635
|
-
a.value = !1,
|
|
636
|
-
}).catch((
|
|
637
|
-
var
|
|
638
|
-
if (a.value = !1, console.log("[PageRendererFormModal handleOk Error]: ",
|
|
639
|
-
return je.warn(
|
|
640
|
-
const { errorFields:
|
|
641
|
-
|
|
636
|
+
const c = ((d = s.value) == null ? void 0 : d.finish) || (() => Promise.resolve({ success: !0 }));
|
|
637
|
+
(g = s.value) != null && g.finish || console.warn("form组件没有提供finish方法"), c().then((w) => {
|
|
638
|
+
const { needFeedback: p = !0, needRefresh: y = !0, successMsg: T = "操作成功" } = r.value;
|
|
639
|
+
a.value = !1, w && w.success && (p && je.success(T), f(), y && n("refresh"));
|
|
640
|
+
}).catch((w) => {
|
|
641
|
+
var y;
|
|
642
|
+
if (a.value = !1, console.log("[PageRendererFormModal handleOk Error]: ", w), typeof w == "string")
|
|
643
|
+
return je.warn(w);
|
|
644
|
+
const { errorFields: p } = w;
|
|
645
|
+
p && p.length && je.warn((y = p[0]) == null ? void 0 : y.errors.join("、"));
|
|
642
646
|
});
|
|
643
647
|
};
|
|
644
|
-
ve(i, (
|
|
645
|
-
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
let
|
|
652
|
-
|
|
653
|
-
const
|
|
654
|
-
|
|
648
|
+
ve(i, (c) => {
|
|
649
|
+
c && Ge(() => {
|
|
650
|
+
const d = document.querySelector(".ant-modal-root"), g = d == null ? void 0 : d.querySelector(".ant-modal-header"), w = d == null ? void 0 : d.querySelector(".ant-modal");
|
|
651
|
+
g.style.cursor = "move";
|
|
652
|
+
const p = w.currentStyle || window.getComputedStyle(w, null);
|
|
653
|
+
g.onmousedown = (y) => {
|
|
654
|
+
const T = y.clientX - g.offsetLeft, v = y.clientY - g.offsetTop;
|
|
655
|
+
let h, _;
|
|
656
|
+
p.left.includes("%") ? (h = +document.body.clientWidth * (+p.left.replace(/%/g, "") / 100), _ = +document.body.clientHeight * (+p.top.replace(/%/g, "") / 100)) : (h = +p.left.replace(/\px/g, ""), _ = +p.top.replace(/\px/g, "")), document.onmousemove = function(O) {
|
|
657
|
+
const b = O.clientX - T, m = O.clientY - v;
|
|
658
|
+
w.style.left = `${b + h}px`, w.style.top = `${m + _}px`;
|
|
655
659
|
}, document.onmouseup = function() {
|
|
656
660
|
document.onmousemove = null, document.onmouseup = null;
|
|
657
661
|
};
|
|
658
662
|
};
|
|
659
663
|
});
|
|
660
664
|
});
|
|
661
|
-
const
|
|
662
|
-
var
|
|
663
|
-
(
|
|
665
|
+
const l = () => i.value = !0, f = () => {
|
|
666
|
+
var c, d;
|
|
667
|
+
(d = (c = s.value) == null ? void 0 : c.reset) == null || d.call(c), i.value = !1;
|
|
664
668
|
};
|
|
665
|
-
return t({ openModal:
|
|
666
|
-
handleOk:
|
|
667
|
-
closeModal:
|
|
668
|
-
getContainer: u,
|
|
669
|
+
return t({ openModal: l }), {
|
|
670
|
+
handleOk: u,
|
|
671
|
+
closeModal: f,
|
|
669
672
|
visible: i,
|
|
670
673
|
modalConfig: o,
|
|
671
674
|
currentForm: s,
|
|
@@ -1297,8 +1300,8 @@ var fu = {
|
|
|
1297
1300
|
if (u || f) {
|
|
1298
1301
|
var c = document.createElement("li"), d = document.createElement("img");
|
|
1299
1302
|
fe(r.inheritedAttributes, function(g) {
|
|
1300
|
-
var
|
|
1301
|
-
|
|
1303
|
+
var w = s.getAttribute(g);
|
|
1304
|
+
w !== null && d.setAttribute(g, w);
|
|
1302
1305
|
}), r.navbar && (d.src = u || f), d.alt = l, d.setAttribute("data-original-url", f || u), c.setAttribute("data-index", o), c.setAttribute("data-viewer-action", "view"), c.setAttribute("role", "button"), r.keyboard && c.setAttribute("tabindex", 0), c.appendChild(d), i.appendChild(c), a.push(c);
|
|
1303
1306
|
}
|
|
1304
1307
|
}), this.items = a, fe(a, function(s) {
|
|
@@ -1342,22 +1345,22 @@ var fu = {
|
|
|
1342
1345
|
f.onload = null;
|
|
1343
1346
|
}
|
|
1344
1347
|
}, f = uo(i, r, function(c, d) {
|
|
1345
|
-
var g = c / d,
|
|
1346
|
-
n.imageInitializing = !1, u * g > o ? y = o / g :
|
|
1347
|
-
var
|
|
1348
|
-
left:
|
|
1349
|
-
top:
|
|
1350
|
-
x:
|
|
1351
|
-
y:
|
|
1352
|
-
width:
|
|
1348
|
+
var g = c / d, w = Math.max(0, Math.min(1, r.initialCoverage)), p = o, y = u;
|
|
1349
|
+
n.imageInitializing = !1, u * g > o ? y = o / g : p = u * g, w = me(w) ? w : 0.9, p = Math.min(p * w, c), y = Math.min(y * w, d);
|
|
1350
|
+
var T = (o - p) / 2, v = (u - y) / 2, h = {
|
|
1351
|
+
left: T,
|
|
1352
|
+
top: v,
|
|
1353
|
+
x: T,
|
|
1354
|
+
y: v,
|
|
1355
|
+
width: p,
|
|
1353
1356
|
height: y,
|
|
1354
1357
|
oldRatio: 1,
|
|
1355
|
-
ratio:
|
|
1358
|
+
ratio: p / c,
|
|
1356
1359
|
aspectRatio: g,
|
|
1357
1360
|
naturalWidth: c,
|
|
1358
1361
|
naturalHeight: d
|
|
1359
|
-
}, _ = ze({},
|
|
1360
|
-
r.rotatable && (
|
|
1362
|
+
}, _ = ze({}, h);
|
|
1363
|
+
r.rotatable && (h.rotate = l.rotate || 0, _.rotate = 0), r.scalable && (h.scaleX = l.scaleX || 1, h.scaleY = l.scaleY || 1, _.scaleX = 1, _.scaleY = 1), n.imageData = h, n.initialImageData = _, t && t();
|
|
1361
1364
|
});
|
|
1362
1365
|
},
|
|
1363
1366
|
renderImage: function(t) {
|
|
@@ -1662,8 +1665,8 @@ var fu = {
|
|
|
1662
1665
|
this.viewing && this.viewing.abort();
|
|
1663
1666
|
var r = this.element, i = this.options, a = this.title, s = this.canvas, o = this.items[n], u = o.querySelector("img"), l = xt(u, "originalUrl"), f = u.getAttribute("alt"), c = document.createElement("img");
|
|
1664
1667
|
if (fe(i.inheritedAttributes, function(y) {
|
|
1665
|
-
var
|
|
1666
|
-
|
|
1668
|
+
var T = u.getAttribute(y);
|
|
1669
|
+
T !== null && c.setAttribute(y, T);
|
|
1667
1670
|
}), c.src = l, c.alt = f, se(i.view) && W(r, Fi, i.view, {
|
|
1668
1671
|
once: !0
|
|
1669
1672
|
}), Se(r, Fi, {
|
|
@@ -1675,21 +1678,21 @@ var fu = {
|
|
|
1675
1678
|
var d = this.items[this.index];
|
|
1676
1679
|
d && (te(d, In), d.removeAttribute("aria-selected")), V(o, In), o.setAttribute("aria-selected", !0), i.focus && o.focus(), this.image = c, this.viewed = !1, this.index = n, this.imageData = {}, V(c, en), i.loading && V(s, Ft), s.innerHTML = "", s.appendChild(c), this.renderList(), a.innerHTML = "";
|
|
1677
1680
|
var g = function() {
|
|
1678
|
-
var
|
|
1679
|
-
a.innerHTML = au(se(
|
|
1680
|
-
},
|
|
1681
|
+
var T = t.imageData, v = Array.isArray(i.title) ? i.title[1] : i.title;
|
|
1682
|
+
a.innerHTML = au(se(v) ? v.call(t, c, T) : "".concat(f, " (").concat(T.naturalWidth, " × ").concat(T.naturalHeight, ")"));
|
|
1683
|
+
}, w, p;
|
|
1681
1684
|
return W(r, on, g, {
|
|
1682
1685
|
once: !0
|
|
1683
1686
|
}), this.viewing = {
|
|
1684
1687
|
abort: function() {
|
|
1685
|
-
le(r, on, g), c.complete ? t.imageRendering ? t.imageRendering.abort() : t.imageInitializing && t.imageInitializing.abort() : (c.src = "", le(c, Ue,
|
|
1688
|
+
le(r, on, g), c.complete ? t.imageRendering ? t.imageRendering.abort() : t.imageInitializing && t.imageInitializing.abort() : (c.src = "", le(c, Ue, w), t.timeout && clearTimeout(t.timeout));
|
|
1686
1689
|
}
|
|
1687
|
-
}, c.complete ? this.load() : (W(c, Ue,
|
|
1688
|
-
le(c, bt,
|
|
1690
|
+
}, c.complete ? this.load() : (W(c, Ue, w = function() {
|
|
1691
|
+
le(c, bt, p), t.load();
|
|
1689
1692
|
}, {
|
|
1690
1693
|
once: !0
|
|
1691
|
-
}), W(c, bt,
|
|
1692
|
-
le(c, Ue,
|
|
1694
|
+
}), W(c, bt, p = function() {
|
|
1695
|
+
le(c, Ue, w), t.timeout && (clearTimeout(t.timeout), t.timeout = !1), te(c, en), i.loading && te(t.canvas, Ft);
|
|
1693
1696
|
}, {
|
|
1694
1697
|
once: !0
|
|
1695
1698
|
}), this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(function() {
|
|
@@ -1876,11 +1879,11 @@ var fu = {
|
|
|
1876
1879
|
* @returns {Viewer} this
|
|
1877
1880
|
*/
|
|
1878
1881
|
zoomTo: function(t) {
|
|
1879
|
-
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, o = this.element, u = this.options, l = this.pointers, f = this.imageData, c = f.x, d = f.y, g = f.width,
|
|
1882
|
+
var n = this, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, o = this.element, u = this.options, l = this.pointers, f = this.imageData, c = f.x, d = f.y, g = f.width, w = f.height, p = f.naturalWidth, y = f.naturalHeight;
|
|
1880
1883
|
if (t = Math.max(0, t), me(t) && this.viewed && !this.played && (s || u.zoomable)) {
|
|
1881
1884
|
if (!s) {
|
|
1882
|
-
var
|
|
1883
|
-
t = Math.min(Math.max(t,
|
|
1885
|
+
var T = Math.max(0.01, u.minZoomRatio), v = Math.min(100, u.maxZoomRatio);
|
|
1886
|
+
t = Math.min(Math.max(t, T), v);
|
|
1884
1887
|
}
|
|
1885
1888
|
if (a)
|
|
1886
1889
|
switch (a.type) {
|
|
@@ -1893,29 +1896,29 @@ var fu = {
|
|
|
1893
1896
|
t > 0.99 && t < 1.01 && (t = 1);
|
|
1894
1897
|
break;
|
|
1895
1898
|
}
|
|
1896
|
-
var
|
|
1899
|
+
var h = p * t, _ = y * t, O = h - g, b = _ - w, m = f.ratio;
|
|
1897
1900
|
if (se(u.zoom) && W(o, Vi, u.zoom, {
|
|
1898
1901
|
once: !0
|
|
1899
1902
|
}), Se(o, Vi, {
|
|
1900
1903
|
ratio: t,
|
|
1901
|
-
oldRatio:
|
|
1904
|
+
oldRatio: m,
|
|
1902
1905
|
originalEvent: a
|
|
1903
1906
|
}) === !1)
|
|
1904
1907
|
return this;
|
|
1905
1908
|
if (this.zooming = !0, a) {
|
|
1906
|
-
var
|
|
1909
|
+
var E = su(this.viewer), S = l && Object.keys(l).length > 0 ? cu(l) : {
|
|
1907
1910
|
pageX: a.pageX,
|
|
1908
1911
|
pageY: a.pageY
|
|
1909
1912
|
};
|
|
1910
|
-
f.x -=
|
|
1913
|
+
f.x -= O * ((S.pageX - E.left - c) / g), f.y -= b * ((S.pageY - E.top - d) / w);
|
|
1911
1914
|
} else
|
|
1912
|
-
Lt(i) && me(i.x) && me(i.y) ? (f.x -=
|
|
1913
|
-
f.left = f.x, f.top = f.y, f.width =
|
|
1915
|
+
Lt(i) && me(i.x) && me(i.y) ? (f.x -= O * ((i.x - c) / g), f.y -= b * ((i.y - d) / w)) : (f.x -= O / 2, f.y -= b / 2);
|
|
1916
|
+
f.left = f.x, f.top = f.y, f.width = h, f.height = _, f.oldRatio = m, f.ratio = t, this.renderImage(function() {
|
|
1914
1917
|
n.zooming = !1, se(u.zoomed) && W(o, Hi, u.zoomed, {
|
|
1915
1918
|
once: !0
|
|
1916
1919
|
}), Se(o, Hi, {
|
|
1917
1920
|
ratio: t,
|
|
1918
|
-
oldRatio:
|
|
1921
|
+
oldRatio: m,
|
|
1919
1922
|
originalEvent: a
|
|
1920
1923
|
}, {
|
|
1921
1924
|
cancelable: !1
|
|
@@ -1940,10 +1943,10 @@ var fu = {
|
|
|
1940
1943
|
return this;
|
|
1941
1944
|
var a = this.player, s = this.loadImage.bind(this), o = [], u = 0, l = 0;
|
|
1942
1945
|
if (this.played = !0, this.onLoadWhenPlay = s, n && this.requestFullscreen(n), V(a, It), fe(this.items, function(d, g) {
|
|
1943
|
-
var
|
|
1944
|
-
|
|
1946
|
+
var w = d.querySelector("img"), p = document.createElement("img");
|
|
1947
|
+
p.src = xt(w, "originalUrl"), p.alt = w.getAttribute("alt"), p.referrerPolicy = w.referrerPolicy, u += 1, V(p, zn), ln(p, ye, i.transition), Nt(d, In) && (V(p, Be), l = g), o.push(p), W(p, Ue, s, {
|
|
1945
1948
|
once: !0
|
|
1946
|
-
}), a.appendChild(
|
|
1949
|
+
}), a.appendChild(p);
|
|
1947
1950
|
}), me(i.interval) && i.interval > 0) {
|
|
1948
1951
|
var f = function d() {
|
|
1949
1952
|
clearTimeout(t.playing.timeout), te(o[l], Be), l -= 1, l = l >= 0 ? l : u - 1, V(o[l], Be), t.playing.timeout = setTimeout(d, i.interval);
|
|
@@ -2213,23 +2216,23 @@ var fu = {
|
|
|
2213
2216
|
var n = this.element, r = this.options, i = n.parentNode, a = document.createElement("div");
|
|
2214
2217
|
a.innerHTML = Hl;
|
|
2215
2218
|
var s = a.querySelector(".".concat(Q, "-container")), o = s.querySelector(".".concat(Q, "-title")), u = s.querySelector(".".concat(Q, "-toolbar")), l = s.querySelector(".".concat(Q, "-navbar")), f = s.querySelector(".".concat(Q, "-button")), c = s.querySelector(".".concat(Q, "-canvas"));
|
|
2216
|
-
if (this.parent = i, this.viewer = s, this.title = o, this.toolbar = u, this.navbar = l, this.button = f, this.canvas = c, this.footer = s.querySelector(".".concat(Q, "-footer")), this.tooltipBox = s.querySelector(".".concat(Q, "-tooltip")), this.player = s.querySelector(".".concat(Q, "-player")), this.list = s.querySelector(".".concat(Q, "-list")), s.id = "".concat(Q).concat(this.id), o.id = "".concat(Q, "Title").concat(this.id), V(o, r.title ? Nn(Array.isArray(r.title) ? r.title[0] : r.title) : vt), V(l, r.navbar ? Nn(r.navbar) : vt), ln(f, vt, !r.button), r.keyboard && f.setAttribute("tabindex", 0), r.backdrop && (V(s, "".concat(Q, "-backdrop")), !r.inline && r.backdrop !== "static" && Lr(c, Hn, "hide")), sn(r.className) && r.className && r.className.split(qr).forEach(function(
|
|
2217
|
-
V(s,
|
|
2219
|
+
if (this.parent = i, this.viewer = s, this.title = o, this.toolbar = u, this.navbar = l, this.button = f, this.canvas = c, this.footer = s.querySelector(".".concat(Q, "-footer")), this.tooltipBox = s.querySelector(".".concat(Q, "-tooltip")), this.player = s.querySelector(".".concat(Q, "-player")), this.list = s.querySelector(".".concat(Q, "-list")), s.id = "".concat(Q).concat(this.id), o.id = "".concat(Q, "Title").concat(this.id), V(o, r.title ? Nn(Array.isArray(r.title) ? r.title[0] : r.title) : vt), V(l, r.navbar ? Nn(r.navbar) : vt), ln(f, vt, !r.button), r.keyboard && f.setAttribute("tabindex", 0), r.backdrop && (V(s, "".concat(Q, "-backdrop")), !r.inline && r.backdrop !== "static" && Lr(c, Hn, "hide")), sn(r.className) && r.className && r.className.split(qr).forEach(function(h) {
|
|
2220
|
+
V(s, h);
|
|
2218
2221
|
}), r.toolbar) {
|
|
2219
|
-
var d = document.createElement("ul"), g = Lt(r.toolbar),
|
|
2220
|
-
g || V(u, Nn(r.toolbar)), fe(g ? r.toolbar : Dn, function(
|
|
2221
|
-
var
|
|
2222
|
-
if (!(!
|
|
2223
|
-
var
|
|
2224
|
-
r.keyboard &&
|
|
2222
|
+
var d = document.createElement("ul"), g = Lt(r.toolbar), w = Dn.slice(0, 3), p = Dn.slice(7, 9), y = Dn.slice(9);
|
|
2223
|
+
g || V(u, Nn(r.toolbar)), fe(g ? r.toolbar : Dn, function(h, _) {
|
|
2224
|
+
var O = g && Lt(h), b = g ? Xr(_) : h, m = O && !Mt(h.show) ? h.show : h;
|
|
2225
|
+
if (!(!m || !r.zoomable && w.indexOf(b) !== -1 || !r.rotatable && p.indexOf(b) !== -1 || !r.scalable && y.indexOf(b) !== -1)) {
|
|
2226
|
+
var E = O && !Mt(h.size) ? h.size : h, S = O && !Mt(h.click) ? h.click : h, C = document.createElement("li");
|
|
2227
|
+
r.keyboard && C.setAttribute("tabindex", 0), C.setAttribute("role", "button"), V(C, "".concat(Q, "-").concat(b)), se(S) || Lr(C, Hn, b), me(m) && V(C, Nn(m)), ["small", "large"].indexOf(E) !== -1 ? V(C, "".concat(Q, "-").concat(E)) : b === "play" && V(C, "".concat(Q, "-large")), se(S) && W(C, Bt, S), d.appendChild(C);
|
|
2225
2228
|
}
|
|
2226
2229
|
}), u.appendChild(d);
|
|
2227
2230
|
} else
|
|
2228
2231
|
V(u, vt);
|
|
2229
2232
|
if (!r.rotatable) {
|
|
2230
|
-
var
|
|
2231
|
-
V(
|
|
2232
|
-
u.appendChild(
|
|
2233
|
+
var T = u.querySelectorAll('li[class*="rotate"]');
|
|
2234
|
+
V(T, en), fe(T, function(h) {
|
|
2235
|
+
u.appendChild(h);
|
|
2233
2236
|
});
|
|
2234
2237
|
}
|
|
2235
2238
|
if (r.inline)
|
|
@@ -2242,8 +2245,8 @@ var fu = {
|
|
|
2242
2245
|
V(f, Wl), V(s, Rr), V(s, zn), V(s, vt), We(s, {
|
|
2243
2246
|
zIndex: r.zIndex
|
|
2244
2247
|
});
|
|
2245
|
-
var
|
|
2246
|
-
sn(
|
|
2248
|
+
var v = r.container;
|
|
2249
|
+
sn(v) && (v = n.ownerDocument.querySelector(v)), v || (v = this.body), v.appendChild(s);
|
|
2247
2250
|
}
|
|
2248
2251
|
if (r.inline && (this.render(), this.bind(), this.isShown = !0), this.ready = !0, se(r.ready) && W(n, Ri, r.ready, {
|
|
2249
2252
|
once: !0
|
|
@@ -2676,33 +2679,33 @@ const _f = /* @__PURE__ */ Tf(Ef, [["render", Of]]), $f = { style: { height: "80
|
|
|
2676
2679
|
next: !0,
|
|
2677
2680
|
rotateRight: !0
|
|
2678
2681
|
}
|
|
2679
|
-
}, i = P(!1), a = P([]), s = P(0), o = (
|
|
2680
|
-
n.value =
|
|
2681
|
-
}, u = P(null), { x: l, y: f, isDragging: c } = Pl(u), d = P(0), g = P(0),
|
|
2682
|
+
}, i = P(!1), a = P([]), s = P(0), o = (m) => {
|
|
2683
|
+
n.value = m, m.view(s.value);
|
|
2684
|
+
}, u = P(null), { x: l, y: f, isDragging: c } = Pl(u), d = P(0), g = P(0), w = P(!1), p = P(0), y = P(0), T = P(0), v = P(0), h = P({ left: 0, right: 0, top: 0, bottom: 0 });
|
|
2682
2685
|
ve([l, f], () => {
|
|
2683
|
-
if (!
|
|
2686
|
+
if (!w.value) {
|
|
2684
2687
|
d.value = l.value, g.value = f.value;
|
|
2685
|
-
const
|
|
2686
|
-
|
|
2688
|
+
const m = document.body.getBoundingClientRect(), E = u.value.getBoundingClientRect();
|
|
2689
|
+
h.value.right = m.width - E.width, h.value.bottom = m.height - E.height, T.value = p.value, v.value = y.value;
|
|
2687
2690
|
}
|
|
2688
|
-
|
|
2691
|
+
w.value = !0;
|
|
2689
2692
|
}), ve(c, () => {
|
|
2690
|
-
c || (
|
|
2693
|
+
c || (w.value = !1);
|
|
2691
2694
|
}), wt(() => {
|
|
2692
|
-
|
|
2695
|
+
w.value && (p.value = T.value + Math.min(Math.max(h.value.left, l.value), h.value.right) - d.value, y.value = v.value + Math.min(Math.max(h.value.top, f.value), h.value.bottom) - g.value);
|
|
2693
2696
|
});
|
|
2694
2697
|
const _ = G(() => ({
|
|
2695
|
-
transform: `translate(${
|
|
2696
|
-
})),
|
|
2697
|
-
a.value =
|
|
2698
|
+
transform: `translate(${p.value}px, ${y.value}px)`
|
|
2699
|
+
})), O = (m, E = 0) => {
|
|
2700
|
+
a.value = m, s.value = E, i.value = !0;
|
|
2698
2701
|
}, b = () => {
|
|
2699
2702
|
i.value = !1;
|
|
2700
2703
|
};
|
|
2701
|
-
return t({ open:
|
|
2702
|
-
const
|
|
2703
|
-
return D(), X(
|
|
2704
|
+
return t({ open: O, close: b }), (m, E) => {
|
|
2705
|
+
const S = F("a-modal");
|
|
2706
|
+
return D(), X(S, {
|
|
2704
2707
|
visible: i.value,
|
|
2705
|
-
"onUpdate:visible":
|
|
2708
|
+
"onUpdate:visible": E[0] || (E[0] = (C) => i.value = C),
|
|
2706
2709
|
"destroy-on-close": "",
|
|
2707
2710
|
centered: "",
|
|
2708
2711
|
width: 800,
|
|
@@ -2723,11 +2726,11 @@ const _f = /* @__PURE__ */ Tf(Ef, [["render", Of]]), $f = { style: { height: "80
|
|
|
2723
2726
|
Ce("预览 ")
|
|
2724
2727
|
], 512)
|
|
2725
2728
|
]),
|
|
2726
|
-
modalRender: R(({ originVNode:
|
|
2729
|
+
modalRender: R(({ originVNode: C }) => [
|
|
2727
2730
|
Ne("div", {
|
|
2728
2731
|
style: Ur(_.value)
|
|
2729
2732
|
}, [
|
|
2730
|
-
(D(), X(mn(
|
|
2733
|
+
(D(), X(mn(C)))
|
|
2731
2734
|
], 4)
|
|
2732
2735
|
]),
|
|
2733
2736
|
default: R(() => [
|
|
@@ -2736,9 +2739,9 @@ const _f = /* @__PURE__ */ Tf(Ef, [["render", Of]]), $f = { style: { height: "80
|
|
|
2736
2739
|
images: a.value,
|
|
2737
2740
|
onInited: o
|
|
2738
2741
|
}, {
|
|
2739
|
-
default: R((
|
|
2742
|
+
default: R((C) => [
|
|
2740
2743
|
Ne("div", $f, [
|
|
2741
|
-
(D(!0), Z(be, null, Fe(
|
|
2744
|
+
(D(!0), Z(be, null, Fe(C.images, (I) => (D(), Z("img", {
|
|
2742
2745
|
style: { opacity: "0" },
|
|
2743
2746
|
src: I,
|
|
2744
2747
|
key: I
|
|
@@ -2763,15 +2766,15 @@ var Ao = { exports: {} };
|
|
|
2763
2766
|
(function(n, r) {
|
|
2764
2767
|
e.exports = r();
|
|
2765
2768
|
})(Nf, function() {
|
|
2766
|
-
var n = 1e3, r = 6e4, i = 36e5, a = "millisecond", s = "second", o = "minute", u = "hour", l = "day", f = "week", c = "month", d = "quarter", g = "year",
|
|
2769
|
+
var n = 1e3, r = 6e4, i = 36e5, a = "millisecond", s = "second", o = "minute", u = "hour", l = "day", f = "week", c = "month", d = "quarter", g = "year", w = "date", p = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, T = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
|
|
2767
2770
|
var $ = ["th", "st", "nd", "rd"], A = M % 100;
|
|
2768
2771
|
return "[" + M + ($[(A - 20) % 10] || $[A] || $[0]) + "]";
|
|
2769
|
-
} },
|
|
2772
|
+
} }, h = function(M, $, A) {
|
|
2770
2773
|
var L = String(M);
|
|
2771
2774
|
return !L || L.length >= $ ? M : "" + Array($ + 1 - L.length).join(A) + M;
|
|
2772
|
-
}, _ = { s:
|
|
2775
|
+
}, _ = { s: h, z: function(M) {
|
|
2773
2776
|
var $ = -M.utcOffset(), A = Math.abs($), L = Math.floor(A / 60), N = A % 60;
|
|
2774
|
-
return ($ <= 0 ? "+" : "-") +
|
|
2777
|
+
return ($ <= 0 ? "+" : "-") + h(L, 2, "0") + ":" + h(N, 2, "0");
|
|
2775
2778
|
}, m: function M($, A) {
|
|
2776
2779
|
if ($.date() < A.date())
|
|
2777
2780
|
return -M(A, $);
|
|
@@ -2780,17 +2783,17 @@ var Ao = { exports: {} };
|
|
|
2780
2783
|
}, a: function(M) {
|
|
2781
2784
|
return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
|
|
2782
2785
|
}, p: function(M) {
|
|
2783
|
-
return { M: c, y: g, w: f, d: l, D:
|
|
2786
|
+
return { M: c, y: g, w: f, d: l, D: w, h: u, m: o, s, ms: a, Q: d }[M] || String(M || "").toLowerCase().replace(/s$/, "");
|
|
2784
2787
|
}, u: function(M) {
|
|
2785
2788
|
return M === void 0;
|
|
2786
|
-
} },
|
|
2787
|
-
b[
|
|
2788
|
-
var
|
|
2789
|
-
return M instanceof K || !(!M || !M[
|
|
2790
|
-
},
|
|
2789
|
+
} }, O = "en", b = {};
|
|
2790
|
+
b[O] = v;
|
|
2791
|
+
var m = "$isDayjsObject", E = function(M) {
|
|
2792
|
+
return M instanceof K || !(!M || !M[m]);
|
|
2793
|
+
}, S = function M($, A, L) {
|
|
2791
2794
|
var N;
|
|
2792
2795
|
if (!$)
|
|
2793
|
-
return
|
|
2796
|
+
return O;
|
|
2794
2797
|
if (typeof $ == "string") {
|
|
2795
2798
|
var j = $.toLowerCase();
|
|
2796
2799
|
b[j] && (N = j), A && (b[j] = A, N = j);
|
|
@@ -2801,19 +2804,19 @@ var Ao = { exports: {} };
|
|
|
2801
2804
|
var re = $.name;
|
|
2802
2805
|
b[re] = $, N = re;
|
|
2803
2806
|
}
|
|
2804
|
-
return !L && N && (
|
|
2805
|
-
},
|
|
2806
|
-
if (
|
|
2807
|
+
return !L && N && (O = N), N || !L && O;
|
|
2808
|
+
}, C = function(M, $) {
|
|
2809
|
+
if (E(M))
|
|
2807
2810
|
return M.clone();
|
|
2808
2811
|
var A = typeof $ == "object" ? $ : {};
|
|
2809
2812
|
return A.date = M, A.args = arguments, new K(A);
|
|
2810
2813
|
}, I = _;
|
|
2811
|
-
I.l =
|
|
2812
|
-
return
|
|
2814
|
+
I.l = S, I.i = E, I.w = function(M, $) {
|
|
2815
|
+
return C(M, { locale: $.$L, utc: $.$u, x: $.$x, $offset: $.$offset });
|
|
2813
2816
|
};
|
|
2814
2817
|
var K = function() {
|
|
2815
2818
|
function M(A) {
|
|
2816
|
-
this.$L =
|
|
2819
|
+
this.$L = S(A.locale, null, !0), this.parse(A), this.$x = this.$x || A.x || {}, this[m] = !0;
|
|
2817
2820
|
}
|
|
2818
2821
|
var $ = M.prototype;
|
|
2819
2822
|
return $.parse = function(A) {
|
|
@@ -2840,14 +2843,14 @@ var Ao = { exports: {} };
|
|
|
2840
2843
|
}, $.$utils = function() {
|
|
2841
2844
|
return I;
|
|
2842
2845
|
}, $.isValid = function() {
|
|
2843
|
-
return this.$d.toString() !==
|
|
2846
|
+
return this.$d.toString() !== p;
|
|
2844
2847
|
}, $.isSame = function(A, L) {
|
|
2845
|
-
var N =
|
|
2848
|
+
var N = C(A);
|
|
2846
2849
|
return this.startOf(L) <= N && N <= this.endOf(L);
|
|
2847
2850
|
}, $.isAfter = function(A, L) {
|
|
2848
|
-
return
|
|
2851
|
+
return C(A) < this.startOf(L);
|
|
2849
2852
|
}, $.isBefore = function(A, L) {
|
|
2850
|
-
return this.endOf(L) <
|
|
2853
|
+
return this.endOf(L) < C(A);
|
|
2851
2854
|
}, $.$g = function(A, L, N) {
|
|
2852
2855
|
return I.u(A) ? this[L] : this.set(N, A);
|
|
2853
2856
|
}, $.unix = function() {
|
|
@@ -2870,7 +2873,7 @@ var Ao = { exports: {} };
|
|
|
2870
2873
|
var Pe = this.$locale().weekStart || 0, Je = (oe < Pe ? oe + 7 : oe) - Pe;
|
|
2871
2874
|
return re(j ? we - Je : we + (6 - Je), de);
|
|
2872
2875
|
case l:
|
|
2873
|
-
case
|
|
2876
|
+
case w:
|
|
2874
2877
|
return ue(Re + "Hours", 0);
|
|
2875
2878
|
case u:
|
|
2876
2879
|
return ue(Re + "Minutes", 1);
|
|
@@ -2884,10 +2887,10 @@ var Ao = { exports: {} };
|
|
|
2884
2887
|
}, $.endOf = function(A) {
|
|
2885
2888
|
return this.startOf(A, !1);
|
|
2886
2889
|
}, $.$set = function(A, L) {
|
|
2887
|
-
var N, j = I.p(A), Y = "set" + (this.$u ? "UTC" : ""), re = (N = {}, N[l] = Y + "Date", N[
|
|
2890
|
+
var N, j = I.p(A), Y = "set" + (this.$u ? "UTC" : ""), re = (N = {}, N[l] = Y + "Date", N[w] = Y + "Date", N[c] = Y + "Month", N[g] = Y + "FullYear", N[u] = Y + "Hours", N[o] = Y + "Minutes", N[s] = Y + "Seconds", N[a] = Y + "Milliseconds", N)[j], ue = j === l ? this.$D + (L - this.$W) : L;
|
|
2888
2891
|
if (j === c || j === g) {
|
|
2889
|
-
var oe = this.clone().set(
|
|
2890
|
-
oe.$d[re](ue), oe.init(), this.$d = oe.set(
|
|
2892
|
+
var oe = this.clone().set(w, 1);
|
|
2893
|
+
oe.$d[re](ue), oe.init(), this.$d = oe.set(w, Math.min(this.$D, oe.daysInMonth())).$d;
|
|
2891
2894
|
} else
|
|
2892
2895
|
re && this.$d[re](ue);
|
|
2893
2896
|
return this.init(), this;
|
|
@@ -2899,7 +2902,7 @@ var Ao = { exports: {} };
|
|
|
2899
2902
|
var N, j = this;
|
|
2900
2903
|
A = Number(A);
|
|
2901
2904
|
var Y = I.p(L), re = function(de) {
|
|
2902
|
-
var we =
|
|
2905
|
+
var we = C(j);
|
|
2903
2906
|
return I.w(we.date(we.date() + Math.round(de * A)), j);
|
|
2904
2907
|
};
|
|
2905
2908
|
if (Y === c)
|
|
@@ -2917,7 +2920,7 @@ var Ao = { exports: {} };
|
|
|
2917
2920
|
}, $.format = function(A) {
|
|
2918
2921
|
var L = this, N = this.$locale();
|
|
2919
2922
|
if (!this.isValid())
|
|
2920
|
-
return N.invalidDate ||
|
|
2923
|
+
return N.invalidDate || p;
|
|
2921
2924
|
var j = A || "YYYY-MM-DDTHH:mm:ssZ", Y = I.z(this), re = this.$H, ue = this.$m, oe = this.$M, de = N.weekdays, we = N.months, Re = N.meridiem, Pe = function(ge, Le, Ve, dt) {
|
|
2922
2925
|
return ge && (ge[Le] || ge(L, j)) || Ve[Le].slice(0, dt);
|
|
2923
2926
|
}, Je = function(ge) {
|
|
@@ -2926,7 +2929,7 @@ var Ao = { exports: {} };
|
|
|
2926
2929
|
var dt = ge < 12 ? "AM" : "PM";
|
|
2927
2930
|
return Ve ? dt.toLowerCase() : dt;
|
|
2928
2931
|
};
|
|
2929
|
-
return j.replace(
|
|
2932
|
+
return j.replace(T, function(ge, Le) {
|
|
2930
2933
|
return Le || function(Ve) {
|
|
2931
2934
|
switch (Ve) {
|
|
2932
2935
|
case "YY":
|
|
@@ -2984,7 +2987,7 @@ var Ao = { exports: {} };
|
|
|
2984
2987
|
}, $.utcOffset = function() {
|
|
2985
2988
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
2986
2989
|
}, $.diff = function(A, L, N) {
|
|
2987
|
-
var j, Y = this, re = I.p(L), ue =
|
|
2990
|
+
var j, Y = this, re = I.p(L), ue = C(A), oe = (ue.utcOffset() - this.utcOffset()) * r, de = this - ue, we = function() {
|
|
2988
2991
|
return I.m(Y, ue);
|
|
2989
2992
|
};
|
|
2990
2993
|
switch (re) {
|
|
@@ -3023,7 +3026,7 @@ var Ao = { exports: {} };
|
|
|
3023
3026
|
}, $.locale = function(A, L) {
|
|
3024
3027
|
if (!A)
|
|
3025
3028
|
return this.$L;
|
|
3026
|
-
var N = this.clone(), j =
|
|
3029
|
+
var N = this.clone(), j = S(A, L, !0);
|
|
3027
3030
|
return j && (N.$L = j), N;
|
|
3028
3031
|
}, $.clone = function() {
|
|
3029
3032
|
return I.w(this.$d, this);
|
|
@@ -3037,15 +3040,15 @@ var Ao = { exports: {} };
|
|
|
3037
3040
|
return this.$d.toUTCString();
|
|
3038
3041
|
}, M;
|
|
3039
3042
|
}(), J = K.prototype;
|
|
3040
|
-
return
|
|
3043
|
+
return C.prototype = J, [["$ms", a], ["$s", s], ["$m", o], ["$H", u], ["$W", l], ["$M", c], ["$y", g], ["$D", w]].forEach(function(M) {
|
|
3041
3044
|
J[M[1]] = function($) {
|
|
3042
3045
|
return this.$g($, M[0], M[1]);
|
|
3043
3046
|
};
|
|
3044
|
-
}),
|
|
3045
|
-
return M.$i || (M($, K,
|
|
3046
|
-
},
|
|
3047
|
-
return
|
|
3048
|
-
},
|
|
3047
|
+
}), C.extend = function(M, $) {
|
|
3048
|
+
return M.$i || (M($, K, C), M.$i = !0), C;
|
|
3049
|
+
}, C.locale = S, C.isDayjs = E, C.unix = function(M) {
|
|
3050
|
+
return C(1e3 * M);
|
|
3051
|
+
}, C.en = b[O], C.Ls = b, C.p = {}, C;
|
|
3049
3052
|
});
|
|
3050
3053
|
})(Ao);
|
|
3051
3054
|
var Mf = Ao.exports;
|
|
@@ -3796,12 +3799,12 @@ function Kn(e, t, n, r, i, a) {
|
|
|
3796
3799
|
return g;
|
|
3797
3800
|
a.set(e, s), Pg(e) ? e.forEach(function(y) {
|
|
3798
3801
|
s.add(Kn(y, t, n, y, e, a));
|
|
3799
|
-
}) : Og(e) && e.forEach(function(y,
|
|
3800
|
-
s.set(
|
|
3802
|
+
}) : Og(e) && e.forEach(function(y, T) {
|
|
3803
|
+
s.set(T, Kn(y, t, n, T, e, a));
|
|
3801
3804
|
});
|
|
3802
|
-
var
|
|
3803
|
-
return Id(
|
|
3804
|
-
|
|
3805
|
+
var w = l ? u ? Xo : Fr : u ? oi : Wt, p = f ? void 0 : w(e);
|
|
3806
|
+
return Id(p || e, function(y, T) {
|
|
3807
|
+
p && (T = y, y = e[T]), ri(s, T, Kn(y, t, n, T, e, a));
|
|
3805
3808
|
}), s;
|
|
3806
3809
|
}
|
|
3807
3810
|
var nm = 1, rm = 4;
|
|
@@ -3841,9 +3844,9 @@ function ts(e, t, n, r, i, a) {
|
|
|
3841
3844
|
return l == t && f == e;
|
|
3842
3845
|
var c = -1, d = !0, g = n & um ? new dn() : void 0;
|
|
3843
3846
|
for (a.set(e, t), a.set(t, e); ++c < o; ) {
|
|
3844
|
-
var
|
|
3847
|
+
var w = e[c], p = t[c];
|
|
3845
3848
|
if (r)
|
|
3846
|
-
var y = s ? r(
|
|
3849
|
+
var y = s ? r(p, w, c, t, e, a) : r(w, p, c, e, t, a);
|
|
3847
3850
|
if (y !== void 0) {
|
|
3848
3851
|
if (y)
|
|
3849
3852
|
continue;
|
|
@@ -3851,14 +3854,14 @@ function ts(e, t, n, r, i, a) {
|
|
|
3851
3854
|
break;
|
|
3852
3855
|
}
|
|
3853
3856
|
if (g) {
|
|
3854
|
-
if (!sm(t, function(
|
|
3855
|
-
if (!es(g,
|
|
3856
|
-
return g.push(
|
|
3857
|
+
if (!sm(t, function(T, v) {
|
|
3858
|
+
if (!es(g, v) && (w === T || i(w, T, n, r, a)))
|
|
3859
|
+
return g.push(v);
|
|
3857
3860
|
})) {
|
|
3858
3861
|
d = !1;
|
|
3859
3862
|
break;
|
|
3860
3863
|
}
|
|
3861
|
-
} else if (!(
|
|
3864
|
+
} else if (!(w === p || i(w, p, n, r, a))) {
|
|
3862
3865
|
d = !1;
|
|
3863
3866
|
break;
|
|
3864
3867
|
}
|
|
@@ -3923,27 +3926,27 @@ function Am(e, t, n, r, i, a) {
|
|
|
3923
3926
|
if (!(s ? d in t : $m.call(t, d)))
|
|
3924
3927
|
return !1;
|
|
3925
3928
|
}
|
|
3926
|
-
var g = a.get(e),
|
|
3927
|
-
if (g &&
|
|
3928
|
-
return g == t &&
|
|
3929
|
-
var
|
|
3929
|
+
var g = a.get(e), w = a.get(t);
|
|
3930
|
+
if (g && w)
|
|
3931
|
+
return g == t && w == e;
|
|
3932
|
+
var p = !0;
|
|
3930
3933
|
a.set(e, t), a.set(t, e);
|
|
3931
3934
|
for (var y = s; ++c < u; ) {
|
|
3932
3935
|
d = o[c];
|
|
3933
|
-
var
|
|
3936
|
+
var T = e[d], v = t[d];
|
|
3934
3937
|
if (r)
|
|
3935
|
-
var
|
|
3936
|
-
if (!(
|
|
3937
|
-
|
|
3938
|
+
var h = s ? r(v, T, d, t, e, a) : r(T, v, d, e, t, a);
|
|
3939
|
+
if (!(h === void 0 ? T === v || i(T, v, n, r, a) : h)) {
|
|
3940
|
+
p = !1;
|
|
3938
3941
|
break;
|
|
3939
3942
|
}
|
|
3940
3943
|
y || (y = d == "constructor");
|
|
3941
3944
|
}
|
|
3942
|
-
if (
|
|
3943
|
-
var _ = e.constructor,
|
|
3944
|
-
_ !=
|
|
3945
|
+
if (p && !y) {
|
|
3946
|
+
var _ = e.constructor, O = t.constructor;
|
|
3947
|
+
_ != O && "constructor" in e && "constructor" in t && !(typeof _ == "function" && _ instanceof _ && typeof O == "function" && O instanceof O) && (p = !1);
|
|
3945
3948
|
}
|
|
3946
|
-
return a.delete(e), a.delete(t),
|
|
3949
|
+
return a.delete(e), a.delete(t), p;
|
|
3947
3950
|
}
|
|
3948
3951
|
var Pm = 1, Pa = "[object Arguments]", Ia = "[object Array]", Mn = "[object Object]", Im = Object.prototype, Da = Im.hasOwnProperty;
|
|
3949
3952
|
function Dm(e, t, n, r, i, a) {
|
|
@@ -3958,10 +3961,10 @@ function Dm(e, t, n, r, i, a) {
|
|
|
3958
3961
|
if (d && !f)
|
|
3959
3962
|
return a || (a = new et()), s || zo(e) ? ts(e, t, n, r, i, a) : Cm(e, t, u, n, r, i, a);
|
|
3960
3963
|
if (!(n & Pm)) {
|
|
3961
|
-
var g = f && Da.call(e, "__wrapped__"),
|
|
3962
|
-
if (g ||
|
|
3963
|
-
var
|
|
3964
|
-
return a || (a = new et()), i(
|
|
3964
|
+
var g = f && Da.call(e, "__wrapped__"), w = c && Da.call(t, "__wrapped__");
|
|
3965
|
+
if (g || w) {
|
|
3966
|
+
var p = g ? e.value() : e, y = w ? t.value() : t;
|
|
3967
|
+
return a || (a = new et()), i(p, y, n, r, a);
|
|
3965
3968
|
}
|
|
3966
3969
|
}
|
|
3967
3970
|
return d ? (a || (a = new et()), Am(e, t, n, r, i, a)) : !1;
|
|
@@ -4112,46 +4115,46 @@ function Na(e, t, n) {
|
|
|
4112
4115
|
throw new TypeError(nv);
|
|
4113
4116
|
t = xr(t) || 0, Ye(n) && (f = !!n.leading, c = "maxWait" in n, a = c ? rv(xr(n.maxWait) || 0, t) : a, d = "trailing" in n ? !!n.trailing : d);
|
|
4114
4117
|
function g(b) {
|
|
4115
|
-
var
|
|
4116
|
-
return r = i = void 0, l = b, s = e.apply(
|
|
4118
|
+
var m = r, E = i;
|
|
4119
|
+
return r = i = void 0, l = b, s = e.apply(E, m), s;
|
|
4117
4120
|
}
|
|
4118
|
-
function
|
|
4119
|
-
return l = b, o = setTimeout(
|
|
4121
|
+
function w(b) {
|
|
4122
|
+
return l = b, o = setTimeout(T, t), f ? g(b) : s;
|
|
4120
4123
|
}
|
|
4121
|
-
function
|
|
4122
|
-
var
|
|
4123
|
-
return c ? iv(
|
|
4124
|
+
function p(b) {
|
|
4125
|
+
var m = b - u, E = b - l, S = t - m;
|
|
4126
|
+
return c ? iv(S, a - E) : S;
|
|
4124
4127
|
}
|
|
4125
4128
|
function y(b) {
|
|
4126
|
-
var
|
|
4127
|
-
return u === void 0 ||
|
|
4129
|
+
var m = b - u, E = b - l;
|
|
4130
|
+
return u === void 0 || m >= t || m < 0 || c && E >= a;
|
|
4128
4131
|
}
|
|
4129
|
-
function
|
|
4132
|
+
function T() {
|
|
4130
4133
|
var b = Cr();
|
|
4131
4134
|
if (y(b))
|
|
4132
|
-
return
|
|
4133
|
-
o = setTimeout(
|
|
4135
|
+
return v(b);
|
|
4136
|
+
o = setTimeout(T, p(b));
|
|
4134
4137
|
}
|
|
4135
|
-
function
|
|
4138
|
+
function v(b) {
|
|
4136
4139
|
return o = void 0, d && r ? g(b) : (r = i = void 0, s);
|
|
4137
4140
|
}
|
|
4138
|
-
function
|
|
4141
|
+
function h() {
|
|
4139
4142
|
o !== void 0 && clearTimeout(o), l = 0, r = u = i = o = void 0;
|
|
4140
4143
|
}
|
|
4141
4144
|
function _() {
|
|
4142
|
-
return o === void 0 ? s :
|
|
4145
|
+
return o === void 0 ? s : v(Cr());
|
|
4143
4146
|
}
|
|
4144
|
-
function
|
|
4145
|
-
var b = Cr(),
|
|
4146
|
-
if (r = arguments, i = this, u = b,
|
|
4147
|
+
function O() {
|
|
4148
|
+
var b = Cr(), m = y(b);
|
|
4149
|
+
if (r = arguments, i = this, u = b, m) {
|
|
4147
4150
|
if (o === void 0)
|
|
4148
|
-
return
|
|
4151
|
+
return w(u);
|
|
4149
4152
|
if (c)
|
|
4150
|
-
return clearTimeout(o), o = setTimeout(
|
|
4153
|
+
return clearTimeout(o), o = setTimeout(T, t), g(u);
|
|
4151
4154
|
}
|
|
4152
|
-
return o === void 0 && (o = setTimeout(
|
|
4155
|
+
return o === void 0 && (o = setTimeout(T, t)), s;
|
|
4153
4156
|
}
|
|
4154
|
-
return
|
|
4157
|
+
return O.cancel = h, O.flush = _, O;
|
|
4155
4158
|
}
|
|
4156
4159
|
function av(e, t, n) {
|
|
4157
4160
|
for (var r = -1, i = e == null ? 0 : e.length; ++r < i; )
|
|
@@ -4399,28 +4402,28 @@ const gr = Hr(() => {
|
|
|
4399
4402
|
});
|
|
4400
4403
|
(await Promise.allSettled(a)).forEach((o, u) => {
|
|
4401
4404
|
if (o.status === "fulfilled") {
|
|
4402
|
-
const { value: l } = o, { labelKey: f, valueKey: c, childrenKey: d, dataType: g, dataKey:
|
|
4405
|
+
const { value: l } = o, { labelKey: f, valueKey: c, childrenKey: d, dataType: g, dataKey: w, groupKey: p } = r[i[u]];
|
|
4403
4406
|
if (l.success) {
|
|
4404
|
-
const y = fr(l,
|
|
4405
|
-
Object.prototype.toString.call(
|
|
4407
|
+
const y = fr(l, w || "data"), T = (v) => {
|
|
4408
|
+
Object.prototype.toString.call(v) === "[object Array]" ? g === "Cascader" ? e[i[u]] = v.map((h) => Kr(h, {
|
|
4406
4409
|
[c || "value"]: "value",
|
|
4407
4410
|
[f || "label"]: "label",
|
|
4408
4411
|
[d || "children"]: "children"
|
|
4409
4412
|
})) : e[i[u]] = [
|
|
4410
4413
|
...Ke(e[i[u]] || []),
|
|
4411
|
-
...
|
|
4412
|
-
let _ =
|
|
4413
|
-
return ka.test(f) && (_ = f.replace(ka, (
|
|
4414
|
-
...
|
|
4414
|
+
...v.map((h) => {
|
|
4415
|
+
let _ = h[f];
|
|
4416
|
+
return ka.test(f) && (_ = f.replace(ka, (O, b) => h[b])), {
|
|
4417
|
+
...p ? { group: h[p] } : {},
|
|
4415
4418
|
label: _,
|
|
4416
|
-
value:
|
|
4419
|
+
value: h[c]
|
|
4417
4420
|
};
|
|
4418
4421
|
})
|
|
4419
|
-
] : Object.prototype.toString.call(
|
|
4420
|
-
|
|
4422
|
+
] : Object.prototype.toString.call(v) === "[object Object]" && Object.keys(v).forEach((h) => {
|
|
4423
|
+
T(v[h]);
|
|
4421
4424
|
});
|
|
4422
4425
|
};
|
|
4423
|
-
|
|
4426
|
+
T(y);
|
|
4424
4427
|
}
|
|
4425
4428
|
} else
|
|
4426
4429
|
console.warn(`【enumeration】: ${i[u]}: 获取失败`);
|
|
@@ -4452,53 +4455,53 @@ const gr = Hr(() => {
|
|
|
4452
4455
|
const n = pr(), { materials: r } = Xe(e), { enumerations: i } = gr(), a = Oe("materials", {});
|
|
4453
4456
|
let o = { ...Rv, ...a }[r.value.type];
|
|
4454
4457
|
const u = G(() => xv.includes(r.value.type) ? ["开始时间", "结束时间"] : "请输入"), { otherProps: l } = r.value;
|
|
4455
|
-
function f(
|
|
4456
|
-
if (!
|
|
4457
|
-
return
|
|
4458
|
-
const { style: b, ...
|
|
4458
|
+
function f(O) {
|
|
4459
|
+
if (!O || !O.style || Object.prototype.toString.call(O.style) === "[object Object]")
|
|
4460
|
+
return O;
|
|
4461
|
+
const { style: b, ...m } = O;
|
|
4459
4462
|
try {
|
|
4460
|
-
const
|
|
4461
|
-
return { ...
|
|
4462
|
-
} catch (
|
|
4463
|
-
return console.warn("Failed to parse style:",
|
|
4463
|
+
const E = JSON.parse(b);
|
|
4464
|
+
return { ...m, style: E };
|
|
4465
|
+
} catch (E) {
|
|
4466
|
+
return console.warn("Failed to parse style:", E), O;
|
|
4464
4467
|
}
|
|
4465
4468
|
}
|
|
4466
|
-
const c = f(l), d = r.value.filterGroups || [], g = r.value.refEnum || "",
|
|
4469
|
+
const c = f(l), d = r.value.filterGroups || [], g = r.value.refEnum || "", w = G(
|
|
4467
4470
|
() => {
|
|
4468
|
-
var
|
|
4471
|
+
var O, b;
|
|
4469
4472
|
return ((b = i[g]) == null ? void 0 : b.filter(
|
|
4470
|
-
(
|
|
4473
|
+
(O = r.value.filterGroups) != null && O.length ? (m) => d.includes(m.group) : () => !0
|
|
4471
4474
|
)) || [];
|
|
4472
4475
|
}
|
|
4473
|
-
),
|
|
4476
|
+
), p = P([]), y = ot(
|
|
4474
4477
|
r.value.filterUrl || `/duckbill-data-query-server/table/column/${r.value.filterKey}`,
|
|
4475
4478
|
r.value.filterMethod || "post"
|
|
4476
|
-
),
|
|
4477
|
-
var
|
|
4478
|
-
const
|
|
4479
|
-
return b[
|
|
4480
|
-
},
|
|
4479
|
+
), T = Oe("transformFuzzy", {})[r.value.fieldName], v = (O, b) => {
|
|
4480
|
+
var E;
|
|
4481
|
+
const m = r.value.filterKey || "label";
|
|
4482
|
+
return b[m] || console.warn(`not found key 【${m}】 in option`), ((E = b[m]) == null ? void 0 : E.indexOf(O.toString())) > -1;
|
|
4483
|
+
}, h = G(() => {
|
|
4481
4484
|
switch (r.value.type) {
|
|
4482
4485
|
case Or:
|
|
4483
|
-
return Na(async function(
|
|
4486
|
+
return Na(async function(O) {
|
|
4484
4487
|
const b = hi({
|
|
4485
|
-
conditions: r.value.fuzzyCode ? { key:
|
|
4488
|
+
conditions: r.value.fuzzyCode ? { key: O, code: r.value.fuzzyCode } : O,
|
|
4486
4489
|
apiConfig: {
|
|
4487
4490
|
conditionKey: r.value.conditionKey || "params",
|
|
4488
4491
|
metaKey: r.value.metaKey
|
|
4489
4492
|
}
|
|
4490
|
-
}),
|
|
4491
|
-
|
|
4493
|
+
}), m = await y(b), E = T ? T(m) : m;
|
|
4494
|
+
p.value = E;
|
|
4492
4495
|
}, 200);
|
|
4493
4496
|
case Ln:
|
|
4494
|
-
return Na(async function(
|
|
4495
|
-
const { category: b, tab:
|
|
4497
|
+
return Na(async function(O) {
|
|
4498
|
+
const { category: b, tab: m } = n.meta, E = await y({
|
|
4496
4499
|
sliceNumber: "50",
|
|
4497
4500
|
category: b,
|
|
4498
|
-
tab:
|
|
4499
|
-
code:
|
|
4501
|
+
tab: m,
|
|
4502
|
+
code: O
|
|
4500
4503
|
});
|
|
4501
|
-
r.value.fuzzyMatch ?
|
|
4504
|
+
r.value.fuzzyMatch ? p.value = E.data.map((S) => ({ value: S, label: S })) : p.value = E.data.map((S) => ({ value: S.id, label: S.name }));
|
|
4502
4505
|
}, 200);
|
|
4503
4506
|
default:
|
|
4504
4507
|
return null;
|
|
@@ -4506,30 +4509,30 @@ const gr = Hr(() => {
|
|
|
4506
4509
|
}), _ = G(() => {
|
|
4507
4510
|
switch (r.value.type) {
|
|
4508
4511
|
case "Cascader":
|
|
4509
|
-
return
|
|
4512
|
+
return w.value;
|
|
4510
4513
|
case "Select":
|
|
4511
|
-
return
|
|
4514
|
+
return w.value;
|
|
4512
4515
|
case Or:
|
|
4513
|
-
return
|
|
4516
|
+
return p.value;
|
|
4514
4517
|
case Ln:
|
|
4515
|
-
return
|
|
4518
|
+
return p.value;
|
|
4516
4519
|
default:
|
|
4517
|
-
return
|
|
4520
|
+
return w.value;
|
|
4518
4521
|
}
|
|
4519
4522
|
});
|
|
4520
4523
|
return () => o ? at(o, {
|
|
4521
4524
|
size: "small",
|
|
4522
4525
|
placeholder: u.value,
|
|
4523
|
-
onkeydown: function(
|
|
4524
|
-
["Cascader"].includes(r.value.type) || (
|
|
4526
|
+
onkeydown: function(O) {
|
|
4527
|
+
["Cascader"].includes(r.value.type) || (O.keyCode === Lv || O.key === Mv) && setTimeout(() => t("pressEnter"));
|
|
4525
4528
|
},
|
|
4526
4529
|
// for fuzzy query select
|
|
4527
|
-
filterOption: [Or, Ln].includes(r.value.type) ? !1 :
|
|
4530
|
+
filterOption: [Or, Ln].includes(r.value.type) ? !1 : v,
|
|
4528
4531
|
...Rt(
|
|
4529
4532
|
{ notFoundContent: Ln === r.value.type ? null : !0 },
|
|
4530
4533
|
vv
|
|
4531
4534
|
),
|
|
4532
|
-
onSearch:
|
|
4535
|
+
onSearch: h.value,
|
|
4533
4536
|
// for selection components
|
|
4534
4537
|
options: _.value,
|
|
4535
4538
|
// all other props
|
|
@@ -4591,41 +4594,41 @@ const gr = Hr(() => {
|
|
|
4591
4594
|
setup(e, { emit: t, expose: n }) {
|
|
4592
4595
|
const { config: a, immediateQuery: s } = Xe(e), o = Oe("pageName", ""), u = G(
|
|
4593
4596
|
() => a.value.length > 6 * 3
|
|
4594
|
-
), l = P(!u.value), { formState: f, dispatchFormState: c } = Tn(), { resetFields: d, validate: g, validateInfos:
|
|
4597
|
+
), l = P(!u.value), { formState: f, dispatchFormState: c } = Tn(), { resetFields: d, validate: g, validateInfos: w } = Fv(f[o]);
|
|
4595
4598
|
ve(
|
|
4596
4599
|
() => e.defaultQuery,
|
|
4597
|
-
(
|
|
4598
|
-
c(
|
|
4600
|
+
(v) => {
|
|
4601
|
+
c(v, o), t("search");
|
|
4599
4602
|
},
|
|
4600
4603
|
{
|
|
4601
4604
|
deep: !0,
|
|
4602
4605
|
immediate: s.value
|
|
4603
4606
|
}
|
|
4604
4607
|
);
|
|
4605
|
-
const
|
|
4606
|
-
g().then(() => e.current === 1 ? t("search") : t("update:current", 1)).catch((
|
|
4607
|
-
console.log(
|
|
4608
|
+
const p = () => {
|
|
4609
|
+
g().then(() => e.current === 1 ? t("search") : t("update:current", 1)).catch((v) => {
|
|
4610
|
+
console.log(v);
|
|
4608
4611
|
});
|
|
4609
|
-
}, y = (
|
|
4612
|
+
}, y = (v) => v.label.slice(0, 10);
|
|
4610
4613
|
ve(l, () => t("changeExpand"));
|
|
4611
|
-
const
|
|
4614
|
+
const T = G(() => l.value || !u.value ? (6 - a.value.length % 6) * 4 : 24);
|
|
4612
4615
|
return n({ resetFields: d }), {
|
|
4613
4616
|
expand: l,
|
|
4614
4617
|
pageName: o,
|
|
4615
4618
|
formState: f,
|
|
4616
|
-
serachSpan:
|
|
4617
|
-
validateInfos:
|
|
4619
|
+
serachSpan: T,
|
|
4620
|
+
validateInfos: w,
|
|
4618
4621
|
showAvailiableTrigger: u,
|
|
4619
4622
|
AVAILIABLE_EXPAND_LINE: 3,
|
|
4620
4623
|
CONDITION_COUNT_PER_LINE: 6,
|
|
4621
|
-
onSubmit:
|
|
4624
|
+
onSubmit: p,
|
|
4622
4625
|
getItemLabel: y
|
|
4623
4626
|
};
|
|
4624
4627
|
}
|
|
4625
4628
|
});
|
|
4626
4629
|
function zv(e, t, n, r, i, a) {
|
|
4627
|
-
const s = F("ConditionBuilder"), o = F("Item"), u = F("Col"), l = F("Button"), f = F("UpOutlined"), c = F("DownOutlined"), d = F("Space"), g = F("Row"),
|
|
4628
|
-
return D(), X(
|
|
4630
|
+
const s = F("ConditionBuilder"), o = F("Item"), u = F("Col"), l = F("Button"), f = F("UpOutlined"), c = F("DownOutlined"), d = F("Space"), g = F("Row"), w = F("Form");
|
|
4631
|
+
return D(), X(w, {
|
|
4629
4632
|
class: "page-renderer-conditions",
|
|
4630
4633
|
"label-col": { span: 8 },
|
|
4631
4634
|
"wrapper-col": { span: 16 }
|
|
@@ -4633,31 +4636,31 @@ function zv(e, t, n, r, i, a) {
|
|
|
4633
4636
|
default: R(() => [
|
|
4634
4637
|
B(g, { gutter: 24 }, {
|
|
4635
4638
|
default: R(() => [
|
|
4636
|
-
(D(!0), Z(be, null, Fe(e.config, (
|
|
4637
|
-
var
|
|
4639
|
+
(D(!0), Z(be, null, Fe(e.config, (p, y) => {
|
|
4640
|
+
var T;
|
|
4638
4641
|
return Yr((D(), X(u, {
|
|
4639
|
-
key:
|
|
4640
|
-
span: ((
|
|
4642
|
+
key: p.fieldName,
|
|
4643
|
+
span: ((T = p.otherProps) == null ? void 0 : T.span) || 4,
|
|
4641
4644
|
class: "conditions-item-col"
|
|
4642
4645
|
}, {
|
|
4643
4646
|
default: R(() => {
|
|
4644
|
-
var
|
|
4647
|
+
var v, h;
|
|
4645
4648
|
return [
|
|
4646
|
-
B(o, pt(e.validateInfos[
|
|
4649
|
+
B(o, pt(e.validateInfos[p.fieldName], {
|
|
4647
4650
|
colon: !1,
|
|
4648
|
-
"label-col": (
|
|
4649
|
-
"wrapper-col": (
|
|
4650
|
-
label: e.getItemLabel(
|
|
4651
|
+
"label-col": (v = p.otherProps) == null ? void 0 : v.labelCol,
|
|
4652
|
+
"wrapper-col": (h = p.otherProps) == null ? void 0 : h.wrapperCol,
|
|
4653
|
+
label: e.getItemLabel(p),
|
|
4651
4654
|
class: {
|
|
4652
|
-
"form-item-with-small-fonts": e.getItemLabel(
|
|
4653
|
-
[`form-item-words${e.getItemLabel(
|
|
4655
|
+
"form-item-with-small-fonts": e.getItemLabel(p).length > 4,
|
|
4656
|
+
[`form-item-words${e.getItemLabel(p).length}`]: !0
|
|
4654
4657
|
}
|
|
4655
4658
|
}), {
|
|
4656
4659
|
default: R(() => [
|
|
4657
4660
|
B(s, {
|
|
4658
|
-
value: e.formState[e.pageName][
|
|
4659
|
-
"onUpdate:value": (_) => e.formState[e.pageName][
|
|
4660
|
-
materials:
|
|
4661
|
+
value: e.formState[e.pageName][p.fieldName],
|
|
4662
|
+
"onUpdate:value": (_) => e.formState[e.pageName][p.fieldName] = _,
|
|
4663
|
+
materials: p,
|
|
4661
4664
|
onPressEnter: e.onSubmit
|
|
4662
4665
|
}, null, 8, ["value", "onUpdate:value", "materials", "onPressEnter"])
|
|
4663
4666
|
]),
|
|
@@ -4687,7 +4690,7 @@ function zv(e, t, n, r, i, a) {
|
|
|
4687
4690
|
}, 8, ["onClick", "loading"]),
|
|
4688
4691
|
B(l, {
|
|
4689
4692
|
size: "small",
|
|
4690
|
-
onClick: t[0] || (t[0] = (
|
|
4693
|
+
onClick: t[0] || (t[0] = (p) => e.$emit("resetSearch"))
|
|
4691
4694
|
}, {
|
|
4692
4695
|
default: R(() => [
|
|
4693
4696
|
Ce("重置")
|
|
@@ -4697,7 +4700,7 @@ function zv(e, t, n, r, i, a) {
|
|
|
4697
4700
|
e.showAvailiableTrigger ? (D(), Z("a", {
|
|
4698
4701
|
key: 0,
|
|
4699
4702
|
style: { "font-size": "12px" },
|
|
4700
|
-
onClick: t[1] || (t[1] = (
|
|
4703
|
+
onClick: t[1] || (t[1] = (p) => e.expand = !e.expand)
|
|
4701
4704
|
}, [
|
|
4702
4705
|
e.expand ? (D(), Z(be, { key: 0 }, [
|
|
4703
4706
|
B(f),
|
|
@@ -4798,47 +4801,47 @@ const Bv = /* @__PURE__ */ Qe(jv, [["render", zv]]), Cn = Hr(() => {
|
|
|
4798
4801
|
},
|
|
4799
4802
|
emits: ["buttonClick", "update:current", "update:pageSize", "customizeSetting", "refresh"],
|
|
4800
4803
|
setup(e, { emit: t }) {
|
|
4801
|
-
var _,
|
|
4802
|
-
const { current: n, pageSize: r, exportConfig: i, importConfig: a } = Xe(e), s = P(!1), o = P(!1), u = Oe("pageName", ""), { selectedRows: l } = Cn(), f = (
|
|
4803
|
-
if (
|
|
4804
|
+
var _, O, b, m;
|
|
4805
|
+
const { current: n, pageSize: r, exportConfig: i, importConfig: a } = Xe(e), s = P(!1), o = P(!1), u = Oe("pageName", ""), { selectedRows: l } = Cn(), f = (E, S) => {
|
|
4806
|
+
if (E.needSelectRows) {
|
|
4804
4807
|
if (!l[u].length) {
|
|
4805
4808
|
je.warn("请选择数据");
|
|
4806
4809
|
return;
|
|
4807
4810
|
}
|
|
4808
|
-
if (
|
|
4811
|
+
if (E.mode === "single" && l[u].length > 1) {
|
|
4809
4812
|
je.warn("只能选择一条数据");
|
|
4810
4813
|
return;
|
|
4811
4814
|
}
|
|
4812
4815
|
}
|
|
4813
|
-
t("buttonClick",
|
|
4816
|
+
t("buttonClick", E.action, S);
|
|
4814
4817
|
}, c = G({
|
|
4815
4818
|
get: () => n.value,
|
|
4816
|
-
set: (
|
|
4819
|
+
set: (E) => t("update:current", E)
|
|
4817
4820
|
}), d = G({
|
|
4818
4821
|
get: () => r.value,
|
|
4819
|
-
set: (
|
|
4820
|
-
const
|
|
4821
|
-
c.value >
|
|
4822
|
+
set: (E) => {
|
|
4823
|
+
const S = Math.ceil(e.total / E);
|
|
4824
|
+
c.value > S && (c.value = S), t("update:pageSize", E);
|
|
4822
4825
|
}
|
|
4823
|
-
}), g = Oe("paramsGuard", (
|
|
4826
|
+
}), g = Oe("paramsGuard", (E) => E), w = (_ = i.value) != null && _.url ? ot((O = i.value) == null ? void 0 : O.url, "post", {
|
|
4824
4827
|
responseType: "blob",
|
|
4825
4828
|
...i.value.requestOptions
|
|
4826
|
-
}) : null,
|
|
4827
|
-
...
|
|
4829
|
+
}) : null, p = (m = (b = a.value) == null ? void 0 : b.children) != null && m.length ? a.value.children.map((E) => ot(E.url, "post", {
|
|
4830
|
+
...E.requestOptions
|
|
4828
4831
|
})) : [], y = async () => {
|
|
4829
|
-
var
|
|
4830
|
-
const { formState:
|
|
4831
|
-
conditions: Ke(
|
|
4832
|
+
var C;
|
|
4833
|
+
const { formState: E } = Tn(), S = i.value ? hi({
|
|
4834
|
+
conditions: Ke(E[u]),
|
|
4832
4835
|
apiConfig: i.value
|
|
4833
4836
|
}) : {};
|
|
4834
|
-
g(
|
|
4837
|
+
g(S, u);
|
|
4835
4838
|
try {
|
|
4836
4839
|
s.value = !0;
|
|
4837
|
-
const I = await
|
|
4840
|
+
const I = await w(S);
|
|
4838
4841
|
if (!I)
|
|
4839
4842
|
return;
|
|
4840
4843
|
const K = /\{\{(.+?)\}\}/g;
|
|
4841
|
-
let J = ((
|
|
4844
|
+
let J = ((C = i.value) == null ? void 0 : C.fileName) || "", M = null;
|
|
4842
4845
|
for (; (M = K.exec(J)) !== null; )
|
|
4843
4846
|
M[1] === "Date" && (J = J.replace(M[0], Po().format("YYYY-MM-DD")));
|
|
4844
4847
|
const $ = document.createElement("a"), A = window.URL.createObjectURL(new Blob([I]));
|
|
@@ -4850,19 +4853,19 @@ const Bv = /* @__PURE__ */ Qe(jv, [["render", zv]]), Cn = Hr(() => {
|
|
|
4850
4853
|
} finally {
|
|
4851
4854
|
s.value = !1;
|
|
4852
4855
|
}
|
|
4853
|
-
},
|
|
4854
|
-
switch (
|
|
4856
|
+
}, T = ({ url: E, type: S }) => {
|
|
4857
|
+
switch (S) {
|
|
4855
4858
|
case "TEMPLATE_LOCAL":
|
|
4856
|
-
window.open(
|
|
4859
|
+
window.open(E);
|
|
4857
4860
|
break;
|
|
4858
4861
|
}
|
|
4859
|
-
},
|
|
4860
|
-
accept:
|
|
4862
|
+
}, v = async ({
|
|
4863
|
+
accept: E
|
|
4861
4864
|
/** feedback = true, needRefresh = true */
|
|
4862
|
-
},
|
|
4863
|
-
const
|
|
4865
|
+
}, S) => {
|
|
4866
|
+
const C = /^\.[a-zA-Z]+$/, I = E == null ? void 0 : E.reduce(
|
|
4864
4867
|
(M, $) => {
|
|
4865
|
-
if (!
|
|
4868
|
+
if (!C.test($))
|
|
4866
4869
|
throw `请提供正确的文件后缀名,是否是 【.${$}】 ?`;
|
|
4867
4870
|
return M[Kv[$]] = [$], M;
|
|
4868
4871
|
},
|
|
@@ -4879,7 +4882,7 @@ const Bv = /* @__PURE__ */ Qe(jv, [["render", zv]]), Cn = Hr(() => {
|
|
|
4879
4882
|
// multiple: false,
|
|
4880
4883
|
}), J = await K.getFile();
|
|
4881
4884
|
if (J) {
|
|
4882
|
-
const M =
|
|
4885
|
+
const M = p[S], $ = new FormData();
|
|
4883
4886
|
$.append("file", J), o.value = !0, M($).finally(() => {
|
|
4884
4887
|
o.value = !1;
|
|
4885
4888
|
});
|
|
@@ -4893,17 +4896,17 @@ const Bv = /* @__PURE__ */ Qe(jv, [["render", zv]]), Cn = Hr(() => {
|
|
|
4893
4896
|
computed_pageSize: d,
|
|
4894
4897
|
pageSizeOptions: Uv,
|
|
4895
4898
|
OPERATIONS_EXPORT_MAP: Yv,
|
|
4896
|
-
handleImport: (
|
|
4897
|
-
const { type:
|
|
4898
|
-
if (["TEMPLATE_LOCAL"].includes(
|
|
4899
|
-
|
|
4899
|
+
handleImport: (E, S) => {
|
|
4900
|
+
const { type: C } = E;
|
|
4901
|
+
if (["TEMPLATE_LOCAL"].includes(C)) {
|
|
4902
|
+
T(E);
|
|
4900
4903
|
return;
|
|
4901
4904
|
}
|
|
4902
|
-
if (["IMPORT"].includes(
|
|
4903
|
-
|
|
4905
|
+
if (["IMPORT"].includes(C)) {
|
|
4906
|
+
v(E, S);
|
|
4904
4907
|
return;
|
|
4905
4908
|
}
|
|
4906
|
-
je.warn(`请确认ImportConfigItem.type是否正确: ${
|
|
4909
|
+
je.warn(`请确认ImportConfigItem.type是否正确: ${C}`);
|
|
4907
4910
|
},
|
|
4908
4911
|
handleApiConfigExport: y,
|
|
4909
4912
|
handleButtonClick: f
|
|
@@ -4912,24 +4915,24 @@ const Bv = /* @__PURE__ */ Qe(jv, [["render", zv]]), Cn = Hr(() => {
|
|
|
4912
4915
|
});
|
|
4913
4916
|
const Hv = { class: "page-renderer-buttons" }, Wv = { class: "page-renderer-buttons-left" }, Gv = { key: 2 }, qv = { class: "page-renderer-setting-trigger" }, Xv = { href: "javascript:;" };
|
|
4914
4917
|
function Qv(e, t, n, r, i, a) {
|
|
4915
|
-
const s = F("aicon"), o = F("MenuItem"), u = F("Menu"), l = F("Space"), f = F("Button"), c = F("Dropdown"), d = F("DownOutlined"), g = F("Pagination"),
|
|
4918
|
+
const s = F("aicon"), o = F("MenuItem"), u = F("Menu"), l = F("Space"), f = F("Button"), c = F("Dropdown"), d = F("DownOutlined"), g = F("Pagination"), w = F("Select"), p = F("SettingOutlined"), y = _s("permission");
|
|
4916
4919
|
return D(), Z("div", Hv, [
|
|
4917
4920
|
Ne("div", Wv, [
|
|
4918
4921
|
B(l, null, {
|
|
4919
4922
|
default: R(() => [
|
|
4920
|
-
(D(!0), Z(be, null, Fe(e.config, (
|
|
4921
|
-
key: `${
|
|
4922
|
-
onClick: (
|
|
4923
|
+
(D(!0), Z(be, null, Fe(e.config, (T, v) => Yr((D(), X(mn(T.type), pt(T.otherProps, {
|
|
4924
|
+
key: `${T.type}${v}`,
|
|
4925
|
+
onClick: (h) => e.handleButtonClick(T, h)
|
|
4923
4926
|
}), $s({
|
|
4924
4927
|
overlay: R(() => [
|
|
4925
4928
|
B(u, null, {
|
|
4926
4929
|
default: R(() => [
|
|
4927
|
-
(D(!0), Z(be, null, Fe(
|
|
4928
|
-
key:
|
|
4929
|
-
onClick: (_) => e.handleButtonClick(
|
|
4930
|
+
(D(!0), Z(be, null, Fe(T.sublist, (h) => (D(), X(o, {
|
|
4931
|
+
key: h.action,
|
|
4932
|
+
onClick: (_) => e.handleButtonClick(h, _)
|
|
4930
4933
|
}, {
|
|
4931
4934
|
default: R(() => [
|
|
4932
|
-
Ce(Te(
|
|
4935
|
+
Ce(Te(h.children), 1)
|
|
4933
4936
|
]),
|
|
4934
4937
|
_: 2
|
|
4935
4938
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -4938,21 +4941,21 @@ function Qv(e, t, n, r, i, a) {
|
|
|
4938
4941
|
}, 1024)
|
|
4939
4942
|
]),
|
|
4940
4943
|
default: R(() => [
|
|
4941
|
-
Ce(" " + Te(
|
|
4944
|
+
Ce(" " + Te(T.children) + " ", 1)
|
|
4942
4945
|
]),
|
|
4943
4946
|
_: 2
|
|
4944
4947
|
}, [
|
|
4945
|
-
|
|
4948
|
+
T.iconType ? {
|
|
4946
4949
|
name: "icon",
|
|
4947
4950
|
fn: R(() => [
|
|
4948
4951
|
B(s, {
|
|
4949
|
-
type:
|
|
4952
|
+
type: T.iconType
|
|
4950
4953
|
}, null, 8, ["type"])
|
|
4951
4954
|
]),
|
|
4952
4955
|
key: "0"
|
|
4953
4956
|
} : void 0
|
|
4954
4957
|
]), 1040, ["onClick"])), [
|
|
4955
|
-
[y,
|
|
4958
|
+
[y, T.permissions]
|
|
4956
4959
|
])), 128))
|
|
4957
4960
|
]),
|
|
4958
4961
|
_: 1
|
|
@@ -4961,10 +4964,10 @@ function Qv(e, t, n, r, i, a) {
|
|
|
4961
4964
|
Ne("div", null, [
|
|
4962
4965
|
B(l, null, {
|
|
4963
4966
|
default: R(() => {
|
|
4964
|
-
var
|
|
4967
|
+
var T, v;
|
|
4965
4968
|
return [
|
|
4966
4969
|
e.hasApiConfig ? (D(), Z(be, { key: 0 }, [
|
|
4967
|
-
(
|
|
4970
|
+
(T = e.importConfig) != null && T.children ? (D(), X(c, {
|
|
4968
4971
|
key: 0,
|
|
4969
4972
|
trigger: ["click"],
|
|
4970
4973
|
disabled: e.importLoading
|
|
@@ -4972,12 +4975,12 @@ function Qv(e, t, n, r, i, a) {
|
|
|
4972
4975
|
overlay: R(() => [
|
|
4973
4976
|
B(u, null, {
|
|
4974
4977
|
default: R(() => [
|
|
4975
|
-
(D(!0), Z(be, null, Fe(e.importConfig.children, (
|
|
4978
|
+
(D(!0), Z(be, null, Fe(e.importConfig.children, (h, _) => (D(), X(o, {
|
|
4976
4979
|
key: _,
|
|
4977
|
-
onClick: () => e.handleImport(
|
|
4980
|
+
onClick: () => e.handleImport(h, _)
|
|
4978
4981
|
}, {
|
|
4979
4982
|
default: R(() => [
|
|
4980
|
-
Ce(Te(
|
|
4983
|
+
Ce(Te(h.title), 1)
|
|
4981
4984
|
]),
|
|
4982
4985
|
_: 2
|
|
4983
4986
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -5012,7 +5015,7 @@ function Qv(e, t, n, r, i, a) {
|
|
|
5012
5015
|
_: 1
|
|
5013
5016
|
}, 8, ["loading"])) : Ee("", !0)
|
|
5014
5017
|
], 64)) : (D(), Z(be, { key: 1 }, [
|
|
5015
|
-
(
|
|
5018
|
+
(v = e.importConfig) != null && v.sublist ? (D(), X(c, {
|
|
5016
5019
|
key: 0,
|
|
5017
5020
|
trigger: ["click"],
|
|
5018
5021
|
disabled: e.importLoading
|
|
@@ -5020,12 +5023,12 @@ function Qv(e, t, n, r, i, a) {
|
|
|
5020
5023
|
overlay: R(() => [
|
|
5021
5024
|
B(u, null, {
|
|
5022
5025
|
default: R(() => [
|
|
5023
|
-
(D(!0), Z(be, null, Fe(e.importConfig.sublist, (
|
|
5026
|
+
(D(!0), Z(be, null, Fe(e.importConfig.sublist, (h, _) => (D(), X(o, {
|
|
5024
5027
|
key: _,
|
|
5025
|
-
onClick: () => e.handleImport(
|
|
5028
|
+
onClick: () => e.handleImport(h, _)
|
|
5026
5029
|
}, {
|
|
5027
5030
|
default: R(() => [
|
|
5028
|
-
Ce(Te(
|
|
5031
|
+
Ce(Te(h.title), 1)
|
|
5029
5032
|
]),
|
|
5030
5033
|
_: 2
|
|
5031
5034
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -5050,12 +5053,12 @@ function Qv(e, t, n, r, i, a) {
|
|
|
5050
5053
|
e.exportConfig ? (D(), X(c, { key: 1 }, {
|
|
5051
5054
|
overlay: R(() => [
|
|
5052
5055
|
B(u, {
|
|
5053
|
-
onClick: t[1] || (t[1] = (
|
|
5056
|
+
onClick: t[1] || (t[1] = (h) => e.handleExport(h.key))
|
|
5054
5057
|
}, {
|
|
5055
5058
|
default: R(() => [
|
|
5056
|
-
(D(!0), Z(be, null, Fe(e.OPERATIONS_EXPORT_MAP, (
|
|
5059
|
+
(D(!0), Z(be, null, Fe(e.OPERATIONS_EXPORT_MAP, (h, _) => (D(), X(o, { key: _ }, {
|
|
5057
5060
|
default: R(() => [
|
|
5058
|
-
Ce(Te(
|
|
5061
|
+
Ce(Te(h), 1)
|
|
5059
5062
|
]),
|
|
5060
5063
|
_: 2
|
|
5061
5064
|
}, 1024))), 128))
|
|
@@ -5083,16 +5086,16 @@ function Qv(e, t, n, r, i, a) {
|
|
|
5083
5086
|
B(g, {
|
|
5084
5087
|
class: "operations-pagination-simple",
|
|
5085
5088
|
current: e.computed_current,
|
|
5086
|
-
"onUpdate:current": t[2] || (t[2] = (
|
|
5089
|
+
"onUpdate:current": t[2] || (t[2] = (h) => e.computed_current = h),
|
|
5087
5090
|
pageSize: e.computed_pageSize,
|
|
5088
|
-
"onUpdate:pageSize": t[3] || (t[3] = (
|
|
5091
|
+
"onUpdate:pageSize": t[3] || (t[3] = (h) => e.computed_pageSize = h),
|
|
5089
5092
|
size: "small",
|
|
5090
5093
|
simple: "",
|
|
5091
5094
|
total: e.total
|
|
5092
5095
|
}, null, 8, ["current", "pageSize", "total"]),
|
|
5093
|
-
B(
|
|
5096
|
+
B(w, {
|
|
5094
5097
|
value: e.computed_pageSize,
|
|
5095
|
-
"onUpdate:value": t[4] || (t[4] = (
|
|
5098
|
+
"onUpdate:value": t[4] || (t[4] = (h) => e.computed_pageSize = h),
|
|
5096
5099
|
size: "small",
|
|
5097
5100
|
options: e.pageSizeOptions
|
|
5098
5101
|
}, null, 8, ["value", "options"]),
|
|
@@ -5103,13 +5106,13 @@ function Qv(e, t, n, r, i, a) {
|
|
|
5103
5106
|
}, {
|
|
5104
5107
|
overlay: R(() => [
|
|
5105
5108
|
B(u, {
|
|
5106
|
-
onClick: t[5] || (t[5] = (
|
|
5109
|
+
onClick: t[5] || (t[5] = (h) => e.$emit("customizeSetting", h.key))
|
|
5107
5110
|
}, {
|
|
5108
5111
|
default: R(() => [
|
|
5109
|
-
(D(!0), Z(be, null, Fe(e.SETTINGS_MAP, (
|
|
5112
|
+
(D(!0), Z(be, null, Fe(e.SETTINGS_MAP, (h, _) => (D(), X(o, { key: _ }, {
|
|
5110
5113
|
default: R(() => [
|
|
5111
|
-
B(
|
|
5112
|
-
Ne("a", Xv, Te(
|
|
5114
|
+
B(p, { style: { "margin-right": "4px" } }),
|
|
5115
|
+
Ne("a", Xv, Te(h), 1)
|
|
5113
5116
|
]),
|
|
5114
5117
|
_: 2
|
|
5115
5118
|
}, 1024))), 128))
|
|
@@ -5119,7 +5122,7 @@ function Qv(e, t, n, r, i, a) {
|
|
|
5119
5122
|
]),
|
|
5120
5123
|
default: R(() => [
|
|
5121
5124
|
Ne("div", qv, [
|
|
5122
|
-
B(
|
|
5125
|
+
B(p, { style: { "font-size": "15px", transform: "translateY(2px)" } })
|
|
5123
5126
|
])
|
|
5124
5127
|
]),
|
|
5125
5128
|
_: 1
|
|
@@ -5145,19 +5148,19 @@ const Zv = /* @__PURE__ */ Qe(Vv, [["render", Qv]]), Jv = Ae({
|
|
|
5145
5148
|
setup(e, { expose: t }) {
|
|
5146
5149
|
const { config: n } = Xe(e), { template: r } = n.value, i = P(!1), { formState: a } = Tn(), s = Oe("pageName", ""), o = Oe("paramsGuard", (g) => g), l = qe((() => {
|
|
5147
5150
|
const g = /\{\{(.+?)\}\}/g;
|
|
5148
|
-
let
|
|
5149
|
-
for (; (
|
|
5150
|
-
|
|
5151
|
-
return
|
|
5151
|
+
let w = {}, p = [];
|
|
5152
|
+
for (; (p = g.exec(r)) !== null; )
|
|
5153
|
+
w[p[1].trim()] = " - ";
|
|
5154
|
+
return w;
|
|
5152
5155
|
})()), f = ot(n.value.url), c = async () => {
|
|
5153
5156
|
const g = hi({
|
|
5154
5157
|
conditions: a[s],
|
|
5155
5158
|
apiConfig: n.value
|
|
5156
5159
|
});
|
|
5157
|
-
o(g, s), i.value = !0, f(g).then((
|
|
5158
|
-
Object.keys(l).forEach((
|
|
5159
|
-
const y = fr(
|
|
5160
|
-
l[
|
|
5160
|
+
o(g, s), i.value = !0, f(g).then((w) => {
|
|
5161
|
+
Object.keys(l).forEach((p) => {
|
|
5162
|
+
const y = fr(w, `${n.value.dataKey}.${p}`);
|
|
5163
|
+
l[p] = hn(y) ? " - " : y;
|
|
5161
5164
|
});
|
|
5162
5165
|
}).finally(() => i.value = !1);
|
|
5163
5166
|
}, d = {
|
|
@@ -5352,36 +5355,36 @@ ie.div = function(e) {
|
|
|
5352
5355
|
throw Error(ls);
|
|
5353
5356
|
if (!r[0])
|
|
5354
5357
|
return e.s = a, e.c = [e.e = 0], e;
|
|
5355
|
-
var o, u, l, f, c, d = i.slice(), g = o = i.length,
|
|
5356
|
-
for (
|
|
5357
|
-
|
|
5358
|
+
var o, u, l, f, c, d = i.slice(), g = o = i.length, w = r.length, p = r.slice(0, o), y = p.length, T = e, v = T.c = [], h = 0, _ = s + (T.e = t.e - e.e) + 1;
|
|
5359
|
+
for (T.s = a, a = _ < 0 ? 0 : _, d.unshift(0); y++ < o; )
|
|
5360
|
+
p.push(0);
|
|
5358
5361
|
do {
|
|
5359
5362
|
for (l = 0; l < 10; l++) {
|
|
5360
|
-
if (o != (y =
|
|
5363
|
+
if (o != (y = p.length))
|
|
5361
5364
|
f = o > y ? 1 : -1;
|
|
5362
5365
|
else
|
|
5363
5366
|
for (c = -1, f = 0; ++c < o; )
|
|
5364
|
-
if (i[c] !=
|
|
5365
|
-
f = i[c] >
|
|
5367
|
+
if (i[c] != p[c]) {
|
|
5368
|
+
f = i[c] > p[c] ? 1 : -1;
|
|
5366
5369
|
break;
|
|
5367
5370
|
}
|
|
5368
5371
|
if (f < 0) {
|
|
5369
5372
|
for (u = y == o ? i : d; y; ) {
|
|
5370
|
-
if (
|
|
5371
|
-
for (c = y; c && !
|
|
5372
|
-
|
|
5373
|
-
--
|
|
5373
|
+
if (p[--y] < u[y]) {
|
|
5374
|
+
for (c = y; c && !p[--c]; )
|
|
5375
|
+
p[c] = 9;
|
|
5376
|
+
--p[c], p[y] += 10;
|
|
5374
5377
|
}
|
|
5375
|
-
|
|
5378
|
+
p[y] -= u[y];
|
|
5376
5379
|
}
|
|
5377
|
-
for (; !
|
|
5378
|
-
|
|
5380
|
+
for (; !p[0]; )
|
|
5381
|
+
p.shift();
|
|
5379
5382
|
} else
|
|
5380
5383
|
break;
|
|
5381
5384
|
}
|
|
5382
|
-
|
|
5383
|
-
} while ((g++ <
|
|
5384
|
-
return !
|
|
5385
|
+
v[h++] = f ? l : ++l, p[0] && f ? p[y] = r[g] || 0 : p = [r[g]];
|
|
5386
|
+
} while ((g++ < w || p[0] !== tt) && a--);
|
|
5387
|
+
return !v[0] && h != 1 && (v.shift(), T.e--, _--), h > _ && At(T, _, n.RM, p[0] !== tt), T;
|
|
5385
5388
|
};
|
|
5386
5389
|
ie.eq = function(e) {
|
|
5387
5390
|
return this.cmp(e) === 0;
|
|
@@ -5611,15 +5614,15 @@ const py = {
|
|
|
5611
5614
|
emits: ["filter", "search", "changeExpand", "update:current", "update:sorts", "linkClick"],
|
|
5612
5615
|
setup(e, { expose: t, emit: n }) {
|
|
5613
5616
|
const r = async () => {
|
|
5614
|
-
await Ge(), Il(
|
|
5617
|
+
await Ge(), Il(w, (z) => {
|
|
5615
5618
|
const U = z[0], { height: k } = U.contentRect;
|
|
5616
5619
|
a.value = k - 44 - (e.hasApiConfig ? 0 : 30);
|
|
5617
5620
|
});
|
|
5618
5621
|
};
|
|
5619
5622
|
Tt(r);
|
|
5620
|
-
const { enumerations: i } = gr(), a = P(0), s = "filter_", o = "_index", { config: u, conditions: l, hasApiConfig: f, rowKey: c, data: d, total: g } = Xe(e),
|
|
5621
|
-
|
|
5622
|
-
const
|
|
5623
|
+
const { enumerations: i } = gr(), a = P(0), s = "filter_", o = "_index", { config: u, conditions: l, hasApiConfig: f, rowKey: c, data: d, total: g } = Xe(e), w = P(null), p = Oe("pageName", ""), y = P(), T = P([]), v = P([]), h = P([]), _ = P([]), O = P({}), b = P([]), { selectedRows: m, selectedRowKeys: E, selectedErrorRowKeys: S } = Cn();
|
|
5624
|
+
S[p] || (S[p] = []);
|
|
5625
|
+
const C = G(() => E[p].length > 0), I = G(() => {
|
|
5623
5626
|
if (f.value)
|
|
5624
5627
|
return La(l.value, "fieldName");
|
|
5625
5628
|
{
|
|
@@ -5644,20 +5647,20 @@ const py = {
|
|
|
5644
5647
|
record: k,
|
|
5645
5648
|
index: ee
|
|
5646
5649
|
}) => U && U.dataIndex === o ? ee + 1 : !U || U.dataIndex === "action" ? z : hn(k[U.dataIndex]) || k[U.dataIndex] === "" ? " - " : z, A = (z, U) => {
|
|
5647
|
-
|
|
5650
|
+
E[p] = z, m[p] = U;
|
|
5648
5651
|
}, L = (z) => {
|
|
5649
5652
|
const U = window.getSelection();
|
|
5650
5653
|
if (U && (U == null ? void 0 : U.toString().length) > 0)
|
|
5651
5654
|
return;
|
|
5652
|
-
const k = [...
|
|
5653
|
-
k.indexOf(z[ee]) >= 0 ? k.splice(k.indexOf(z[ee]), 1) : k.push(z[ee]),
|
|
5655
|
+
const k = [...E[p]], ee = c.value;
|
|
5656
|
+
k.indexOf(z[ee]) >= 0 ? k.splice(k.indexOf(z[ee]), 1) : k.push(z[ee]), E[p] = k, m[p] = ge.value.filter((q) => k.includes(q[ee]));
|
|
5654
5657
|
}, N = (z) => ({
|
|
5655
5658
|
onclick: () => L(z)
|
|
5656
5659
|
}), j = G(() => {
|
|
5657
5660
|
var k;
|
|
5658
5661
|
let z = a.value;
|
|
5659
|
-
|
|
5660
|
-
const U = (k =
|
|
5662
|
+
C.value && (z -= 31), K.value && (z -= 33);
|
|
5663
|
+
const U = (k = w.value) == null ? void 0 : k.querySelector(".ant-table-body");
|
|
5661
5664
|
return U && (U.style.minHeight = `${z}px`), z;
|
|
5662
5665
|
});
|
|
5663
5666
|
wt(() => {
|
|
@@ -5695,7 +5698,7 @@ const py = {
|
|
|
5695
5698
|
filterable: De,
|
|
5696
5699
|
sortable: Pt
|
|
5697
5700
|
} = U;
|
|
5698
|
-
it === "Link" &&
|
|
5701
|
+
it === "Link" && T.value.push(q), it === "HTML" && v.value.push(q), x === "slot" && h.value.push(q), x === "img" && _.value.push(q), x === "map" && H && (O.value[q] = U);
|
|
5699
5702
|
const ht = q !== "action" && Array.isArray(ae), $n = ht ? (
|
|
5700
5703
|
// 目前有表头分组配置时,不渲染表头筛选组件
|
|
5701
5704
|
ae.map((gt) => ({
|
|
@@ -5756,7 +5759,7 @@ const py = {
|
|
|
5756
5759
|
() => Y(b.value).map(
|
|
5757
5760
|
(z) => z === o ? g.value.count : g.value[z]
|
|
5758
5761
|
)
|
|
5759
|
-
), { formState: ue } = Tn(), { validate: oe } = vy(ue[
|
|
5762
|
+
), { formState: ue } = Tn(), { validate: oe } = vy(ue[p]), de = () => {
|
|
5760
5763
|
oe().then(() => e.current === 1 ? n("search") : n("update:current", 1)).catch((z) => {
|
|
5761
5764
|
console.warn(z);
|
|
5762
5765
|
});
|
|
@@ -5771,7 +5774,7 @@ const py = {
|
|
|
5771
5774
|
});
|
|
5772
5775
|
}, Je = () => {
|
|
5773
5776
|
y.value = null;
|
|
5774
|
-
}, Me = G(() => Object.keys(
|
|
5777
|
+
}, Me = G(() => Object.keys(O.value)), ge = G(() => {
|
|
5775
5778
|
const z = b.value.filter((k) => k.action !== void 0 || k.key === "action").reduce((k, ee) => {
|
|
5776
5779
|
var q;
|
|
5777
5780
|
return ee.key === "action" ? (q = ee.child) == null || q.forEach((it) => {
|
|
@@ -5783,16 +5786,16 @@ const py = {
|
|
|
5783
5786
|
...Me.value.reduce(
|
|
5784
5787
|
(ee, q) => {
|
|
5785
5788
|
var it, x, H, ne;
|
|
5786
|
-
if (
|
|
5787
|
-
const ae = (x = (it = i[
|
|
5789
|
+
if (O.value[q].refEnumLabel) {
|
|
5790
|
+
const ae = (x = (it = i[O.value[q].refEnum]) == null ? void 0 : it.find(
|
|
5788
5791
|
(_e) => {
|
|
5789
5792
|
var Ie, De;
|
|
5790
|
-
return ((Ie = _e.id) == null ? void 0 : Ie.toString()) === ((De = k[
|
|
5793
|
+
return ((Ie = _e.id) == null ? void 0 : Ie.toString()) === ((De = k[O.value[q].refEnum]) == null ? void 0 : De.toString());
|
|
5791
5794
|
}
|
|
5792
|
-
)) == null ? void 0 : x[
|
|
5795
|
+
)) == null ? void 0 : x[O.value[q].refEnumLabel];
|
|
5793
5796
|
ee[Un][q] = ae;
|
|
5794
5797
|
} else
|
|
5795
|
-
ee[Un][q] = (ne = (H = i[
|
|
5798
|
+
ee[Un][q] = (ne = (H = i[O.value[q].refEnum]) == null ? void 0 : H.find(
|
|
5796
5799
|
(ae) => {
|
|
5797
5800
|
var _e, Ie;
|
|
5798
5801
|
return ((_e = ae.value) == null ? void 0 : _e.toString()) === ((Ie = k[q]) == null ? void 0 : Ie.toString());
|
|
@@ -5834,21 +5837,21 @@ const py = {
|
|
|
5834
5837
|
isNil: hn,
|
|
5835
5838
|
columns: b,
|
|
5836
5839
|
totalList: re,
|
|
5837
|
-
pageName:
|
|
5840
|
+
pageName: p,
|
|
5838
5841
|
keywords: Me,
|
|
5839
5842
|
computedY: j,
|
|
5840
5843
|
dataSource: ge,
|
|
5841
5844
|
LOADING_SIGN: xn,
|
|
5842
|
-
tableWrapper:
|
|
5843
|
-
linkCellKeys:
|
|
5844
|
-
htmlCellKeys:
|
|
5845
|
-
slotCellKeys:
|
|
5845
|
+
tableWrapper: w,
|
|
5846
|
+
linkCellKeys: T,
|
|
5847
|
+
htmlCellKeys: v,
|
|
5848
|
+
slotCellKeys: h,
|
|
5846
5849
|
imgCellKeys: _,
|
|
5847
5850
|
tableCellSlots: J,
|
|
5848
|
-
selectedRows:
|
|
5849
|
-
selectedRowKeys:
|
|
5850
|
-
selectedErrorRowKeys:
|
|
5851
|
-
showSelectionSummaryRow:
|
|
5851
|
+
selectedRows: m,
|
|
5852
|
+
selectedRowKeys: E,
|
|
5853
|
+
selectedErrorRowKeys: S,
|
|
5854
|
+
showSelectionSummaryRow: C,
|
|
5852
5855
|
DATA_SOURCE_FILTER_PREFIX: s,
|
|
5853
5856
|
DATA_SOURCE_INDEX_KEY: o,
|
|
5854
5857
|
formState: ue,
|
|
@@ -5883,9 +5886,9 @@ const by = {
|
|
|
5883
5886
|
class: "table-summary-cell-text"
|
|
5884
5887
|
}, Ay = /* @__PURE__ */ Ne("span", { class: "table-summary-cell-text" }, "总计", -1), Py = { class: "table-summary-cell-text" };
|
|
5885
5888
|
function Iy(e, t, n, r, i, a) {
|
|
5886
|
-
const s = F("a-button"), o = F("a-tooltip"), u = F("ConditionBuilder"), l = F("a-input"), f = F("LoadingOutlined"), c = F("Space"), d = F("TableImageCell"), g = F("TableCell"),
|
|
5889
|
+
const s = F("a-button"), o = F("a-tooltip"), u = F("ConditionBuilder"), l = F("a-input"), f = F("LoadingOutlined"), c = F("Space"), d = F("TableImageCell"), g = F("TableCell"), w = F("a-table-summary-cell"), p = F("a-table-summary-row"), y = F("a-table-summary"), T = F("Table");
|
|
5887
5890
|
return D(), Z("div", by, [
|
|
5888
|
-
B(
|
|
5891
|
+
B(T, {
|
|
5889
5892
|
bordered: "",
|
|
5890
5893
|
size: "small",
|
|
5891
5894
|
"data-source": e.dataSource,
|
|
@@ -5895,7 +5898,7 @@ function Iy(e, t, n, r, i, a) {
|
|
|
5895
5898
|
scroll: { y: e.computedY },
|
|
5896
5899
|
"row-key": e.rowKey,
|
|
5897
5900
|
"custom-row": e.customRow,
|
|
5898
|
-
"row-class-name": (
|
|
5901
|
+
"row-class-name": (v, h) => `${h % 2 === 1 ? "table-striped-row" : ""} ${e.selectedErrorRowKeys[e.pageName].includes(v[e.rowKey]) ? "table-error-row" : ""}`,
|
|
5899
5902
|
"row-selection": {
|
|
5900
5903
|
fixed: !0,
|
|
5901
5904
|
columnWidth: 40,
|
|
@@ -5906,10 +5909,10 @@ function Iy(e, t, n, r, i, a) {
|
|
|
5906
5909
|
onResizeColumn: e.handleResizeColumn,
|
|
5907
5910
|
onChange: e.onTableChange
|
|
5908
5911
|
}, {
|
|
5909
|
-
headerCell: R(({ column:
|
|
5910
|
-
|
|
5912
|
+
headerCell: R(({ column: v }) => [
|
|
5913
|
+
v.key === e.DATA_SOURCE_INDEX_KEY ? (D(), Z("div", {
|
|
5911
5914
|
key: 0,
|
|
5912
|
-
onClick: t[0] || (t[0] = (...
|
|
5915
|
+
onClick: t[0] || (t[0] = (...h) => e.headerFilterSwitch && e.headerFilterSwitch(...h))
|
|
5913
5916
|
}, [
|
|
5914
5917
|
B(o, {
|
|
5915
5918
|
title: e.isHeaderFilterable ? "关闭筛选表头" : "开启筛选表头"
|
|
@@ -5923,23 +5926,23 @@ function Iy(e, t, n, r, i, a) {
|
|
|
5923
5926
|
_: 1
|
|
5924
5927
|
}, 8, ["title"])
|
|
5925
5928
|
])) : (D(), Z("div", wy, [
|
|
5926
|
-
|
|
5929
|
+
v.sortable === !1 ? (D(), X(o, { key: 0 }, {
|
|
5927
5930
|
title: R(() => [
|
|
5928
5931
|
Ce("仅支持当前页的筛选排序,不支持跨页筛选排序。如需统计全部数据,请点[导出全部],在 excel 统计。")
|
|
5929
5932
|
]),
|
|
5930
5933
|
default: R(() => [
|
|
5931
|
-
Ne("span", Sy, Te(
|
|
5934
|
+
Ne("span", Sy, Te(v.title), 1)
|
|
5932
5935
|
]),
|
|
5933
5936
|
_: 2
|
|
5934
|
-
}, 1024)) : (D(), Z("div", Ey, Te(
|
|
5935
|
-
|
|
5936
|
-
e.fieldNameConditionsByKey[
|
|
5937
|
+
}, 1024)) : (D(), Z("div", Ey, Te(v.title), 1)),
|
|
5938
|
+
v.key.startsWith(e.DATA_SOURCE_FILTER_PREFIX) ? (D(), Z("div", Ty, [
|
|
5939
|
+
e.fieldNameConditionsByKey[v.dataIndex] ? (D(), X(u, {
|
|
5937
5940
|
key: 0,
|
|
5938
|
-
value: e.formState[e.pageName][
|
|
5939
|
-
"onUpdate:value": (
|
|
5940
|
-
materials: e.fieldNameConditionsByKey[
|
|
5941
|
+
value: e.formState[e.pageName][v.dataIndex],
|
|
5942
|
+
"onUpdate:value": (h) => e.formState[e.pageName][v.dataIndex] = h,
|
|
5943
|
+
materials: e.fieldNameConditionsByKey[v.dataIndex],
|
|
5941
5944
|
onChange: () => {
|
|
5942
|
-
e.onConditionChange(
|
|
5945
|
+
e.onConditionChange(v.dataIndex);
|
|
5943
5946
|
},
|
|
5944
5947
|
onPressEnter: e.onSubmit,
|
|
5945
5948
|
style: { width: "100%" }
|
|
@@ -5947,29 +5950,29 @@ function Iy(e, t, n, r, i, a) {
|
|
|
5947
5950
|
key: 1,
|
|
5948
5951
|
disabled: "",
|
|
5949
5952
|
size: "small",
|
|
5950
|
-
value: e.formState[e.pageName][
|
|
5951
|
-
"onUpdate:value": (
|
|
5953
|
+
value: e.formState[e.pageName][v.dataIndex],
|
|
5954
|
+
"onUpdate:value": (h) => e.formState[e.pageName][v.dataIndex] = h,
|
|
5952
5955
|
onChange: e.onHeaderFilterChange,
|
|
5953
5956
|
onPressEnter: e.onSubmit
|
|
5954
5957
|
}, null, 8, ["value", "onUpdate:value", "onChange", "onPressEnter"]))
|
|
5955
5958
|
])) : Ee("", !0)
|
|
5956
5959
|
]))
|
|
5957
5960
|
]),
|
|
5958
|
-
bodyCell: R(({ text:
|
|
5959
|
-
|
|
5961
|
+
bodyCell: R(({ text: v, record: h, index: _, column: O }) => [
|
|
5962
|
+
O.dataIndex === "action" ? (D(), X(c, { key: 0 }, {
|
|
5960
5963
|
default: R(() => [
|
|
5961
|
-
(D(!0), Z(be, null, Fe(
|
|
5964
|
+
(D(!0), Z(be, null, Fe(O.childActions, (b) => (D(), Z(be, {
|
|
5962
5965
|
key: b.action
|
|
5963
5966
|
}, [
|
|
5964
|
-
b.show === void 0 || e.actionVisible(b.show,
|
|
5965
|
-
|
|
5967
|
+
b.show === void 0 || e.actionVisible(b.show, h) ? (D(), Z(be, { key: 0 }, [
|
|
5968
|
+
h[e.LOADING_SIGN][`${b.action}Loading`] ? (D(), X(f, {
|
|
5966
5969
|
key: 1,
|
|
5967
5970
|
style: { color: "#1890ff" }
|
|
5968
5971
|
})) : (D(), Z("a", {
|
|
5969
5972
|
key: 0,
|
|
5970
5973
|
onClick: qa(
|
|
5971
|
-
(
|
|
5972
|
-
e.handleLinkClick(
|
|
5974
|
+
(m) => {
|
|
5975
|
+
e.handleLinkClick(h, O, m, b.action);
|
|
5973
5976
|
},
|
|
5974
5977
|
["stop"]
|
|
5975
5978
|
),
|
|
@@ -5980,20 +5983,20 @@ function Iy(e, t, n, r, i, a) {
|
|
|
5980
5983
|
]),
|
|
5981
5984
|
_: 2
|
|
5982
5985
|
}, 1024)) : Ee("", !0),
|
|
5983
|
-
e.slotCellKeys.includes(
|
|
5984
|
-
e.tableCellSlots[
|
|
5985
|
-
text:
|
|
5986
|
-
row:
|
|
5986
|
+
e.slotCellKeys.includes(O.dataIndex) ? (D(), Z(be, { key: 1 }, [
|
|
5987
|
+
e.tableCellSlots[O.dataIndex].component ? (D(), X(mn(e.tableCellSlots[O.dataIndex].component), kn(pt({ key: 0 }, {
|
|
5988
|
+
text: v,
|
|
5989
|
+
row: h,
|
|
5987
5990
|
index: _,
|
|
5988
|
-
column:
|
|
5989
|
-
...e.tableCellSlots[
|
|
5991
|
+
column: O,
|
|
5992
|
+
...e.tableCellSlots[O.dataIndex].props
|
|
5990
5993
|
})), null, 16)) : Ee("", !0)
|
|
5991
|
-
], 64)) : e.imgCellKeys.includes(
|
|
5992
|
-
|
|
5993
|
-
], 64)) : [...e.linkCellKeys, ...e.keywords, ...e.htmlCellKeys].includes(
|
|
5994
|
-
row:
|
|
5995
|
-
column:
|
|
5996
|
-
loading:
|
|
5994
|
+
], 64)) : e.imgCellKeys.includes(O.dataIndex) ? (D(), Z(be, { key: 2 }, [
|
|
5995
|
+
v ? (D(), X(d, kn(pt({ key: 0 }, { image: v })), null, 16)) : Ee("", !0)
|
|
5996
|
+
], 64)) : [...e.linkCellKeys, ...e.keywords, ...e.htmlCellKeys].includes(O.dataIndex) ? (D(), X(g, kn(pt({ key: 3 }, {
|
|
5997
|
+
row: h,
|
|
5998
|
+
column: O,
|
|
5999
|
+
loading: h[e.LOADING_SIGN][`${O.action}Loading`],
|
|
5997
6000
|
keywords: e.keywords,
|
|
5998
6001
|
linkCellKeys: e.linkCellKeys,
|
|
5999
6002
|
handleLinkClick: e.handleLinkClick
|
|
@@ -6002,21 +6005,21 @@ function Iy(e, t, n, r, i, a) {
|
|
|
6002
6005
|
summary: R(() => [
|
|
6003
6006
|
B(y, { fixed: "" }, {
|
|
6004
6007
|
default: R(() => [
|
|
6005
|
-
Yr(B(
|
|
6008
|
+
Yr(B(p, { class: "table-summary-selection" }, {
|
|
6006
6009
|
default: R(() => [
|
|
6007
|
-
B(
|
|
6010
|
+
B(w, { index: 0 }, {
|
|
6008
6011
|
default: R(() => [
|
|
6009
6012
|
Oy
|
|
6010
6013
|
]),
|
|
6011
6014
|
_: 1
|
|
6012
6015
|
}),
|
|
6013
|
-
(D(!0), Z(be, null, Fe(e.columns, (
|
|
6014
|
-
key:
|
|
6015
|
-
index:
|
|
6016
|
+
(D(!0), Z(be, null, Fe(e.columns, (v, h) => (D(), X(w, {
|
|
6017
|
+
key: v.key,
|
|
6018
|
+
index: h + 1,
|
|
6016
6019
|
style: { "text-align": "center" }
|
|
6017
6020
|
}, {
|
|
6018
6021
|
default: R(() => [
|
|
6019
|
-
|
|
6022
|
+
h === 0 ? (D(), Z("span", _y, Te(e.selectedRowKeys[e.pageName].length), 1)) : (D(), Z("span", $y, Te(v.summary ? e.transformSummary(v.summary, v) : null), 1))
|
|
6020
6023
|
]),
|
|
6021
6024
|
_: 2
|
|
6022
6025
|
}, 1032, ["index"]))), 128))
|
|
@@ -6025,21 +6028,21 @@ function Iy(e, t, n, r, i, a) {
|
|
|
6025
6028
|
}, 512), [
|
|
6026
6029
|
[Ga, e.showSelectionSummaryRow]
|
|
6027
6030
|
]),
|
|
6028
|
-
e.hasApiConfig ? Ee("", !0) : (D(), X(
|
|
6031
|
+
e.hasApiConfig ? Ee("", !0) : (D(), X(p, { key: 0 }, {
|
|
6029
6032
|
default: R(() => [
|
|
6030
|
-
B(
|
|
6033
|
+
B(w, { index: 0 }, {
|
|
6031
6034
|
default: R(() => [
|
|
6032
6035
|
Ay
|
|
6033
6036
|
]),
|
|
6034
6037
|
_: 1
|
|
6035
6038
|
}),
|
|
6036
|
-
(D(!0), Z(be, null, Fe(e.totalList, (
|
|
6037
|
-
key:
|
|
6038
|
-
index:
|
|
6039
|
+
(D(!0), Z(be, null, Fe(e.totalList, (v, h) => (D(), X(w, {
|
|
6040
|
+
key: h,
|
|
6041
|
+
index: h + 1,
|
|
6039
6042
|
style: { "text-align": "center" }
|
|
6040
6043
|
}, {
|
|
6041
6044
|
default: R(() => [
|
|
6042
|
-
Ne("span", Py, Te(
|
|
6045
|
+
Ne("span", Py, Te(v), 1)
|
|
6043
6046
|
]),
|
|
6044
6047
|
_: 2
|
|
6045
6048
|
}, 1032, ["index"]))), 128))
|
|
@@ -6091,11 +6094,11 @@ const Ry = {
|
|
|
6091
6094
|
emits: ["change", "update:visible"],
|
|
6092
6095
|
setup(e, { emit: t }) {
|
|
6093
6096
|
const n = pr(), r = pi(), i = io(e, "visible", t), a = P(!1), s = P([]), o = qe({ dataSource: [] });
|
|
6094
|
-
ve(i, (
|
|
6095
|
-
|
|
6096
|
-
...
|
|
6097
|
-
disabled:
|
|
6098
|
-
key:
|
|
6097
|
+
ve(i, (v) => {
|
|
6098
|
+
v ? o.dataSource = fi(Ke(e.columns)).map((h) => (h.show !== !1 && s.value.push(h.columnKey), {
|
|
6099
|
+
...h,
|
|
6100
|
+
disabled: h.columnKey === "action" || h.fixed !== void 0 || h.disabled,
|
|
6101
|
+
key: h.columnKey,
|
|
6099
6102
|
rowExpandable: !1
|
|
6100
6103
|
})) : (s.value = [], o.dataSource = []);
|
|
6101
6104
|
});
|
|
@@ -6105,57 +6108,57 @@ const Ry = {
|
|
|
6105
6108
|
dataIndex: "title"
|
|
6106
6109
|
}
|
|
6107
6110
|
], l = async () => {
|
|
6108
|
-
const
|
|
6109
|
-
const
|
|
6110
|
-
if (
|
|
6111
|
-
const [
|
|
6112
|
-
|
|
6111
|
+
const v = Ke(s.value), { dataSource: h } = o, { category: _, tab: O } = n.meta, b = v.map((m) => {
|
|
6112
|
+
const E = {}, S = h.find((C) => C.columnKey === m);
|
|
6113
|
+
if (E.entityId = S.entityId, E.columnKey = S.columnKey, e.type === "SORT_SETTING") {
|
|
6114
|
+
const [C, I] = S.columnKey.split("@");
|
|
6115
|
+
E.columnKey = C, E.sort = I;
|
|
6113
6116
|
}
|
|
6114
|
-
return
|
|
6117
|
+
return E;
|
|
6115
6118
|
});
|
|
6116
6119
|
try {
|
|
6117
6120
|
a.value = !0, await Ny(r, {
|
|
6118
6121
|
[Ry[e.type]]: b,
|
|
6119
6122
|
category: _,
|
|
6120
|
-
label:
|
|
6123
|
+
label: O
|
|
6121
6124
|
}), t("change");
|
|
6122
|
-
} catch (
|
|
6123
|
-
console.warn(
|
|
6125
|
+
} catch (m) {
|
|
6126
|
+
console.warn(m);
|
|
6124
6127
|
} finally {
|
|
6125
6128
|
a.value = !1;
|
|
6126
6129
|
}
|
|
6127
6130
|
}, f = () => i.value = !1, c = ({
|
|
6128
|
-
disabled:
|
|
6129
|
-
selectedKeys:
|
|
6131
|
+
disabled: v,
|
|
6132
|
+
selectedKeys: h,
|
|
6130
6133
|
onItemSelectAll: _,
|
|
6131
|
-
onItemSelect:
|
|
6134
|
+
onItemSelect: O
|
|
6132
6135
|
}) => ({
|
|
6133
6136
|
getCheckboxProps: (b) => ({
|
|
6134
|
-
disabled:
|
|
6137
|
+
disabled: v || b.disabled
|
|
6135
6138
|
}),
|
|
6136
|
-
onSelectAll(b,
|
|
6137
|
-
const
|
|
6138
|
-
_(
|
|
6139
|
+
onSelectAll(b, m) {
|
|
6140
|
+
const E = m.filter((S) => !S.disabled).map(({ key: S }) => S);
|
|
6141
|
+
_(E, b);
|
|
6139
6142
|
},
|
|
6140
|
-
onSelect({ key: b },
|
|
6141
|
-
|
|
6143
|
+
onSelect({ key: b }, m) {
|
|
6144
|
+
O(b, m);
|
|
6142
6145
|
},
|
|
6143
|
-
selectedRowKeys:
|
|
6146
|
+
selectedRowKeys: h
|
|
6144
6147
|
});
|
|
6145
6148
|
let d = "", g = "";
|
|
6146
|
-
const
|
|
6149
|
+
const w = (v, h, _, O) => ({
|
|
6147
6150
|
style: {
|
|
6148
6151
|
cursor: "move"
|
|
6149
6152
|
},
|
|
6150
6153
|
// 鼠标移入
|
|
6151
6154
|
onMouseenter: (b) => {
|
|
6152
|
-
var
|
|
6153
|
-
const
|
|
6154
|
-
|
|
6155
|
+
var E;
|
|
6156
|
+
const m = b || window.event;
|
|
6157
|
+
v.key === "action" || (E = e.columns.find((S) => S.columnKey === v.key)) != null && E.fixed || (m.target.draggable = !0);
|
|
6155
6158
|
},
|
|
6156
6159
|
// 开始拖拽
|
|
6157
6160
|
onDragstart: (b) => {
|
|
6158
|
-
(b || window.event).stopPropagation(), d =
|
|
6161
|
+
(b || window.event).stopPropagation(), d = v.key, document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[h].classList.add("source");
|
|
6159
6162
|
},
|
|
6160
6163
|
// 拖动元素经过的元素
|
|
6161
6164
|
onDragover: (b) => {
|
|
@@ -6164,62 +6167,62 @@ const Ry = {
|
|
|
6164
6167
|
// 拖动到达目标元素
|
|
6165
6168
|
onDragenter: (b) => {
|
|
6166
6169
|
(b || window.event).preventDefault();
|
|
6167
|
-
const
|
|
6168
|
-
if (o.dataSource[
|
|
6170
|
+
const E = document.querySelectorAll(".drag-modal-wrapper .ant-table-row");
|
|
6171
|
+
if (o.dataSource[h].disabled)
|
|
6169
6172
|
return;
|
|
6170
|
-
const
|
|
6171
|
-
|
|
6173
|
+
const S = document.querySelectorAll(".ant-table-row.target");
|
|
6174
|
+
S.length && S[0].classList.remove("target"), E[h + (o.dataSource.length - s.value.length)].classList.add("target"), g = v.key;
|
|
6172
6175
|
},
|
|
6173
6176
|
// 鼠标松开
|
|
6174
6177
|
onDrop: (b) => {
|
|
6175
6178
|
(b || window.event).stopPropagation();
|
|
6176
|
-
const
|
|
6177
|
-
|
|
6178
|
-
const
|
|
6179
|
-
if (
|
|
6179
|
+
const E = document.querySelectorAll(".ant-table-row.target");
|
|
6180
|
+
E.length && E[0].classList.remove("target");
|
|
6181
|
+
const S = document.querySelectorAll(".ant-table-row.source");
|
|
6182
|
+
if (S.length && S[0].classList.remove("source"), g === d)
|
|
6180
6183
|
return;
|
|
6181
|
-
const
|
|
6182
|
-
|
|
6183
|
-
const J =
|
|
6184
|
-
|
|
6184
|
+
const C = o.dataSource.slice(), I = C.findIndex((M) => M.key === d), K = C[I];
|
|
6185
|
+
C.splice(I, 1);
|
|
6186
|
+
const J = C.findIndex((M) => M.key === g);
|
|
6187
|
+
C.splice(J, 0, K), Object.assign(o, { dataSource: C });
|
|
6185
6188
|
},
|
|
6186
6189
|
onClick: () => {
|
|
6187
|
-
const { key: b, disabled:
|
|
6188
|
-
|
|
6190
|
+
const { key: b, disabled: m } = v;
|
|
6191
|
+
m || O(b, !_.includes(b));
|
|
6189
6192
|
},
|
|
6190
6193
|
ondblclick: () => {
|
|
6191
|
-
const { key: b, disabled:
|
|
6192
|
-
if (
|
|
6194
|
+
const { key: b, disabled: m } = v;
|
|
6195
|
+
if (m)
|
|
6193
6196
|
return;
|
|
6194
|
-
const
|
|
6195
|
-
|
|
6197
|
+
const E = s.value.indexOf(b);
|
|
6198
|
+
E > -1 ? s.value.splice(E, 1) : s.value.push(b);
|
|
6196
6199
|
}
|
|
6197
|
-
}),
|
|
6200
|
+
}), p = (v, h, _, O) => ({
|
|
6198
6201
|
onClick: () => {
|
|
6199
|
-
const { key: b, disabled:
|
|
6200
|
-
|
|
6202
|
+
const { key: b, disabled: m } = v;
|
|
6203
|
+
m || O(b, !_.includes(b));
|
|
6201
6204
|
},
|
|
6202
6205
|
ondblclick: () => {
|
|
6203
|
-
const { key: b, disabled:
|
|
6204
|
-
if (
|
|
6206
|
+
const { key: b, disabled: m } = v;
|
|
6207
|
+
if (m)
|
|
6205
6208
|
return;
|
|
6206
|
-
const
|
|
6207
|
-
|
|
6209
|
+
const E = s.value.indexOf(b);
|
|
6210
|
+
E > -1 ? s.value.splice(E, 1) : s.value.push(b);
|
|
6208
6211
|
}
|
|
6209
6212
|
}), y = () => document.querySelector(".page-renderer-wrapper");
|
|
6210
|
-
return ve(i, (
|
|
6211
|
-
|
|
6212
|
-
const
|
|
6213
|
+
return ve(i, (v) => {
|
|
6214
|
+
v && Ge(() => {
|
|
6215
|
+
const h = document.querySelector(".ant-modal-root"), _ = h == null ? void 0 : h.querySelector(".ant-modal-header"), O = h == null ? void 0 : h.querySelector(".ant-modal");
|
|
6213
6216
|
_.style.cursor = "move";
|
|
6214
|
-
const b =
|
|
6215
|
-
_.onmousedown = (
|
|
6216
|
-
const
|
|
6217
|
-
let
|
|
6218
|
-
b.left.includes("%") ? (
|
|
6217
|
+
const b = O.currentStyle || window.getComputedStyle(O, null);
|
|
6218
|
+
_.onmousedown = (m) => {
|
|
6219
|
+
const E = m.clientX - _.offsetLeft, S = m.clientY - _.offsetTop;
|
|
6220
|
+
let C, I;
|
|
6221
|
+
b.left.includes("%") ? (C = +document.body.clientWidth * // eslint-disable-next-line
|
|
6219
6222
|
(+b.left.replace(/\%/g, "") / 100), I = +document.body.clientHeight * // eslint-disable-next-line
|
|
6220
|
-
(+b.top.replace(/\%/g, "") / 100)) : (
|
|
6221
|
-
const J = K.clientX -
|
|
6222
|
-
|
|
6223
|
+
(+b.top.replace(/\%/g, "") / 100)) : (C = +b.left.replace(/\px/g, ""), I = +b.top.replace(/\px/g, "")), document.onmousemove = function(K) {
|
|
6224
|
+
const J = K.clientX - E, M = K.clientY - S;
|
|
6225
|
+
O.style.left = `${J + C}px`, O.style.top = `${M + I}px`;
|
|
6223
6226
|
}, document.onmouseup = function() {
|
|
6224
6227
|
document.onmousemove = null, document.onmouseup = null;
|
|
6225
6228
|
};
|
|
@@ -6231,16 +6234,16 @@ const Ry = {
|
|
|
6231
6234
|
state: o,
|
|
6232
6235
|
toKeys: s,
|
|
6233
6236
|
tableColumn: u,
|
|
6234
|
-
handleChange: (
|
|
6235
|
-
const
|
|
6236
|
-
if (
|
|
6237
|
-
s.value =
|
|
6237
|
+
handleChange: (v, h, _) => {
|
|
6238
|
+
const O = v.map((b) => b.split("@")[0]);
|
|
6239
|
+
if (O.length !== Iv(O).length) {
|
|
6240
|
+
s.value = v.filter((b) => !_.includes(b)), je.warn("同一字段不能同时设置升序和降序!");
|
|
6238
6241
|
return;
|
|
6239
6242
|
}
|
|
6240
6243
|
},
|
|
6241
6244
|
handleOk: l,
|
|
6242
|
-
customRowRight:
|
|
6243
|
-
customRowLeft:
|
|
6245
|
+
customRowRight: w,
|
|
6246
|
+
customRowLeft: p,
|
|
6244
6247
|
handleClose: f,
|
|
6245
6248
|
getContainer: y,
|
|
6246
6249
|
getRowSelection: c
|
|
@@ -6299,8 +6302,8 @@ function Ly(e, t, n, r, i, a) {
|
|
|
6299
6302
|
direction: c,
|
|
6300
6303
|
selectedKeys: d,
|
|
6301
6304
|
disabled: g,
|
|
6302
|
-
onItemSelectAll:
|
|
6303
|
-
onItemSelect:
|
|
6305
|
+
onItemSelectAll: w,
|
|
6306
|
+
onItemSelect: p
|
|
6304
6307
|
}) => [
|
|
6305
6308
|
B(s, {
|
|
6306
6309
|
size: "small",
|
|
@@ -6308,8 +6311,8 @@ function Ly(e, t, n, r, i, a) {
|
|
|
6308
6311
|
"row-selection": e.getRowSelection({
|
|
6309
6312
|
disabled: g,
|
|
6310
6313
|
selectedKeys: d,
|
|
6311
|
-
onItemSelectAll:
|
|
6312
|
-
onItemSelect:
|
|
6314
|
+
onItemSelectAll: w,
|
|
6315
|
+
onItemSelect: p
|
|
6313
6316
|
}),
|
|
6314
6317
|
"show-expand-column": !1,
|
|
6315
6318
|
columns: e.tableColumn,
|
|
@@ -6317,7 +6320,7 @@ function Ly(e, t, n, r, i, a) {
|
|
|
6317
6320
|
pagination: !1,
|
|
6318
6321
|
scroll: { y: 300 },
|
|
6319
6322
|
style: Ur({ pointerEvents: g ? "none" : null }),
|
|
6320
|
-
"custom-row": (y,
|
|
6323
|
+
"custom-row": (y, T) => c === "left" ? e.customRowLeft(y, T, d, p) : e.customRowRight(y, T, d, p)
|
|
6321
6324
|
}, null, 8, ["class", "row-selection", "columns", "data-source", "style", "custom-row"])
|
|
6322
6325
|
]),
|
|
6323
6326
|
_: 1
|
|
@@ -6356,60 +6359,60 @@ function hs(e, t, n) {
|
|
|
6356
6359
|
if (typeof e != "function")
|
|
6357
6360
|
throw new TypeError("Expected a function");
|
|
6358
6361
|
t = +t || 0, pn(n) && (f = !!n.leading, c = "maxWait" in n, a = c ? Math.max(+n.maxWait || 0, t) : a, d = "trailing" in n ? !!n.trailing : d);
|
|
6359
|
-
function
|
|
6362
|
+
function w(C) {
|
|
6360
6363
|
const I = r, K = i;
|
|
6361
|
-
return r = i = void 0, l =
|
|
6364
|
+
return r = i = void 0, l = C, s = e.apply(K, I), s;
|
|
6362
6365
|
}
|
|
6363
|
-
function
|
|
6364
|
-
return g ? (window.cancelAnimationFrame(o), window.requestAnimationFrame(
|
|
6366
|
+
function p(C, I) {
|
|
6367
|
+
return g ? (window.cancelAnimationFrame(o), window.requestAnimationFrame(C)) : setTimeout(C, I);
|
|
6365
6368
|
}
|
|
6366
|
-
function y(
|
|
6369
|
+
function y(C) {
|
|
6367
6370
|
if (g)
|
|
6368
|
-
return window.cancelAnimationFrame(
|
|
6369
|
-
clearTimeout(
|
|
6371
|
+
return window.cancelAnimationFrame(C);
|
|
6372
|
+
clearTimeout(C);
|
|
6370
6373
|
}
|
|
6371
|
-
function
|
|
6372
|
-
return l =
|
|
6374
|
+
function T(C) {
|
|
6375
|
+
return l = C, o = p(_, t), f ? w(C) : s;
|
|
6373
6376
|
}
|
|
6374
|
-
function
|
|
6375
|
-
const I =
|
|
6377
|
+
function v(C) {
|
|
6378
|
+
const I = C - u, K = C - l, J = t - I;
|
|
6376
6379
|
return c ? Math.min(J, a - K) : J;
|
|
6377
6380
|
}
|
|
6378
|
-
function
|
|
6379
|
-
const I =
|
|
6381
|
+
function h(C) {
|
|
6382
|
+
const I = C - u, K = C - l;
|
|
6380
6383
|
return u === void 0 || I >= t || I < 0 || c && K >= a;
|
|
6381
6384
|
}
|
|
6382
6385
|
function _() {
|
|
6383
|
-
const
|
|
6384
|
-
if (
|
|
6385
|
-
return C
|
|
6386
|
-
o =
|
|
6386
|
+
const C = Date.now();
|
|
6387
|
+
if (h(C))
|
|
6388
|
+
return O(C);
|
|
6389
|
+
o = p(_, v(C));
|
|
6387
6390
|
}
|
|
6388
|
-
function C
|
|
6389
|
-
return o = void 0, d && r ?
|
|
6391
|
+
function O(C) {
|
|
6392
|
+
return o = void 0, d && r ? w(C) : (r = i = void 0, s);
|
|
6390
6393
|
}
|
|
6391
6394
|
function b() {
|
|
6392
6395
|
o !== void 0 && y(o), l = 0, r = u = i = o = void 0;
|
|
6393
6396
|
}
|
|
6394
|
-
function
|
|
6395
|
-
return o === void 0 ? s :
|
|
6397
|
+
function m() {
|
|
6398
|
+
return o === void 0 ? s : O(Date.now());
|
|
6396
6399
|
}
|
|
6397
|
-
function
|
|
6400
|
+
function E() {
|
|
6398
6401
|
return o !== void 0;
|
|
6399
6402
|
}
|
|
6400
|
-
function
|
|
6401
|
-
const
|
|
6403
|
+
function S() {
|
|
6404
|
+
const C = Date.now(), I = h(C);
|
|
6402
6405
|
for (var K = arguments.length, J = new Array(K), M = 0; M < K; M++)
|
|
6403
6406
|
J[M] = arguments[M];
|
|
6404
|
-
if (r = J, i = this, u =
|
|
6407
|
+
if (r = J, i = this, u = C, I) {
|
|
6405
6408
|
if (o === void 0)
|
|
6406
|
-
return
|
|
6409
|
+
return T(u);
|
|
6407
6410
|
if (c)
|
|
6408
|
-
return o =
|
|
6411
|
+
return o = p(_, t), w(u);
|
|
6409
6412
|
}
|
|
6410
|
-
return o === void 0 && (o =
|
|
6413
|
+
return o === void 0 && (o = p(_, t)), s;
|
|
6411
6414
|
}
|
|
6412
|
-
return
|
|
6415
|
+
return S.cancel = b, S.flush = m, S.pending = E, S;
|
|
6413
6416
|
}
|
|
6414
6417
|
function ps(e, t) {
|
|
6415
6418
|
for (const n in t)
|
|
@@ -6454,9 +6457,9 @@ var Hy = ft((e, t) => {
|
|
|
6454
6457
|
_n(u.value) || (s.value = hs((c) => c(), u.value, o.value), e.context.runAsync = function() {
|
|
6455
6458
|
for (var c = arguments.length, d = new Array(c), g = 0; g < c; g++)
|
|
6456
6459
|
d[g] = arguments[g];
|
|
6457
|
-
return new Promise((
|
|
6458
|
-
a.value ? (a.value = !1, l.value(...d).then(
|
|
6459
|
-
l.value(...d).then(
|
|
6460
|
+
return new Promise((w, p) => {
|
|
6461
|
+
a.value ? (a.value = !1, l.value(...d).then(w).catch(p)) : s.value(() => {
|
|
6462
|
+
l.value(...d).then(w).catch(p);
|
|
6460
6463
|
});
|
|
6461
6464
|
});
|
|
6462
6465
|
}, f(() => {
|
|
@@ -6481,12 +6484,12 @@ var Hy = ft((e, t) => {
|
|
|
6481
6484
|
}, f = G(() => {
|
|
6482
6485
|
if (o.value)
|
|
6483
6486
|
return o.value;
|
|
6484
|
-
const g = 1e3,
|
|
6487
|
+
const g = 1e3, w = 1, p = 9, y = Math.floor(Math.random() * 2 ** Math.min(a.value, p) + w);
|
|
6485
6488
|
return g * y;
|
|
6486
6489
|
}), c = () => {
|
|
6487
6490
|
let g;
|
|
6488
|
-
const
|
|
6489
|
-
return (
|
|
6491
|
+
const w = s.value === -1, p = a.value < s.value;
|
|
6492
|
+
return (w || p) && (w || (a.value += 1), g = setTimeout(() => {
|
|
6490
6493
|
u = !0, e.context.refresh();
|
|
6491
6494
|
}, f.value)), () => g && clearTimeout(g);
|
|
6492
6495
|
}, d = () => {
|
|
@@ -6581,89 +6584,89 @@ const Qy = (e, t) => (n) => {
|
|
|
6581
6584
|
onError: o,
|
|
6582
6585
|
onBefore: u,
|
|
6583
6586
|
onAfter: l
|
|
6584
|
-
} = t, f = P((r = n == null ? void 0 : n.loading) !== null && r !== void 0 ? r : !1), c = Zt((i = n == null ? void 0 : n.data) !== null && i !== void 0 ? i : a), d = Zt(n == null ? void 0 : n.error), g = P(n == null ? void 0 : n.params),
|
|
6585
|
-
status:
|
|
6587
|
+
} = t, f = P((r = n == null ? void 0 : n.loading) !== null && r !== void 0 ? r : !1), c = Zt((i = n == null ? void 0 : n.data) !== null && i !== void 0 ? i : a), d = Zt(n == null ? void 0 : n.error), g = P(n == null ? void 0 : n.params), w = P([]), p = Zt("pending"), y = {}, T = Qy({
|
|
6588
|
+
status: p,
|
|
6586
6589
|
loading: f,
|
|
6587
6590
|
data: c,
|
|
6588
6591
|
error: d,
|
|
6589
6592
|
params: g
|
|
6590
|
-
}, []),
|
|
6591
|
-
for (var
|
|
6592
|
-
b[
|
|
6593
|
+
}, []), v = function(_) {
|
|
6594
|
+
for (var O = arguments.length, b = new Array(O > 1 ? O - 1 : 0), m = 1; m < O; m++)
|
|
6595
|
+
b[m - 1] = arguments[m];
|
|
6593
6596
|
if (_ === "onQuery") {
|
|
6594
|
-
const
|
|
6597
|
+
const E = w.value.map((S) => S.onQuery).filter(Boolean);
|
|
6595
6598
|
return {
|
|
6596
|
-
servicePromise: Zy(
|
|
6599
|
+
servicePromise: Zy(E, b[0])()
|
|
6597
6600
|
};
|
|
6598
6601
|
} else {
|
|
6599
|
-
const
|
|
6600
|
-
var
|
|
6601
|
-
return (
|
|
6602
|
+
const E = w.value.map((S) => {
|
|
6603
|
+
var C;
|
|
6604
|
+
return (C = S[_]) === null || C === void 0 ? void 0 : C.call(S, ...b);
|
|
6602
6605
|
});
|
|
6603
|
-
return Object.assign({}, ...
|
|
6606
|
+
return Object.assign({}, ...E);
|
|
6604
6607
|
}
|
|
6605
|
-
},
|
|
6608
|
+
}, h = P(0);
|
|
6606
6609
|
return y.runAsync = async function() {
|
|
6607
|
-
for (var _ = arguments.length,
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
+
for (var _ = arguments.length, O = new Array(_), b = 0; b < _; b++)
|
|
6611
|
+
O[b] = arguments[b];
|
|
6612
|
+
T({
|
|
6610
6613
|
loading: !0,
|
|
6611
|
-
params:
|
|
6614
|
+
params: O,
|
|
6612
6615
|
status: "pending"
|
|
6613
|
-
}),
|
|
6614
|
-
const
|
|
6615
|
-
isBreak:
|
|
6616
|
-
breakResult:
|
|
6617
|
-
} =
|
|
6618
|
-
if (
|
|
6619
|
-
return
|
|
6616
|
+
}), h.value += 1;
|
|
6617
|
+
const m = h.value, {
|
|
6618
|
+
isBreak: E,
|
|
6619
|
+
breakResult: S = _r()
|
|
6620
|
+
} = v("onBefore", O);
|
|
6621
|
+
if (E)
|
|
6622
|
+
return T({
|
|
6620
6623
|
status: "settled"
|
|
6621
|
-
}),
|
|
6622
|
-
u == null || u(
|
|
6624
|
+
}), S;
|
|
6625
|
+
u == null || u(O);
|
|
6623
6626
|
try {
|
|
6624
|
-
const
|
|
6627
|
+
const C = () => new Promise((J) => J(e(...g.value)));
|
|
6625
6628
|
let {
|
|
6626
6629
|
servicePromise: I
|
|
6627
|
-
} =
|
|
6628
|
-
I || (I =
|
|
6630
|
+
} = v("onQuery", C);
|
|
6631
|
+
I || (I = C());
|
|
6629
6632
|
const K = await I;
|
|
6630
|
-
return
|
|
6633
|
+
return m !== h.value ? _r() : (T({
|
|
6631
6634
|
data: K,
|
|
6632
6635
|
loading: !1,
|
|
6633
6636
|
error: void 0,
|
|
6634
6637
|
status: "settled"
|
|
6635
|
-
}),
|
|
6636
|
-
} catch (
|
|
6637
|
-
if (
|
|
6638
|
+
}), v("onSuccess", K, O), s == null || s(K, O), m === h.value && v("onAfter", O, K, void 0), l == null || l(O), K);
|
|
6639
|
+
} catch (C) {
|
|
6640
|
+
if (m !== h.value)
|
|
6638
6641
|
return _r();
|
|
6639
|
-
throw
|
|
6642
|
+
throw T({
|
|
6640
6643
|
loading: !1,
|
|
6641
|
-
error:
|
|
6644
|
+
error: C,
|
|
6642
6645
|
status: "settled"
|
|
6643
|
-
}),
|
|
6646
|
+
}), v("onError", C, O), o == null || o(C, O), m === h.value && v("onAfter", O, void 0, C), l == null || l(O), C;
|
|
6644
6647
|
}
|
|
6645
6648
|
}, y.run = function() {
|
|
6646
6649
|
y.runAsync(...arguments).catch((_) => {
|
|
6647
6650
|
o || console.error(_);
|
|
6648
6651
|
});
|
|
6649
6652
|
}, y.cancel = () => {
|
|
6650
|
-
|
|
6653
|
+
h.value += 1, T({
|
|
6651
6654
|
loading: !1
|
|
6652
|
-
}),
|
|
6655
|
+
}), v("onCancel");
|
|
6653
6656
|
}, y.refresh = () => {
|
|
6654
6657
|
y.run(...g.value || []);
|
|
6655
6658
|
}, y.refreshAsync = () => y.runAsync(...g.value || []), y.mutate = (_) => {
|
|
6656
|
-
const
|
|
6657
|
-
|
|
6659
|
+
const O = gi(_) ? _(c.value) : _, b = Ky(O);
|
|
6660
|
+
T({
|
|
6658
6661
|
data: b
|
|
6659
|
-
}),
|
|
6662
|
+
}), v("onMutate", b);
|
|
6660
6663
|
}, {
|
|
6661
|
-
status:
|
|
6664
|
+
status: p,
|
|
6662
6665
|
loading: f,
|
|
6663
6666
|
data: c,
|
|
6664
6667
|
error: d,
|
|
6665
6668
|
params: g,
|
|
6666
|
-
plugins:
|
|
6669
|
+
plugins: w,
|
|
6667
6670
|
context: y
|
|
6668
6671
|
};
|
|
6669
6672
|
};
|
|
@@ -6719,48 +6722,48 @@ var ab = ft((e, t) => {
|
|
|
6719
6722
|
const o = gi(n) ? n : () => n, u = P(() => {
|
|
6720
6723
|
});
|
|
6721
6724
|
let l;
|
|
6722
|
-
const f = (
|
|
6723
|
-
s ? s(
|
|
6724
|
-
}, d = (
|
|
6725
|
-
const
|
|
6726
|
-
return ib(
|
|
6727
|
-
e.data.value =
|
|
6725
|
+
const f = (T) => a ? a(T) : Uy(T), c = (T, v, h) => {
|
|
6726
|
+
s ? s(T, h) : Yy(T, v, h), rb(T, h.data);
|
|
6727
|
+
}, d = (T) => i === -1 || T + i > (/* @__PURE__ */ new Date()).getTime(), g = (T, v) => Object.prototype.hasOwnProperty.call(T, v), w = (T) => {
|
|
6728
|
+
const v = o(T);
|
|
6729
|
+
return ib(v, (h) => {
|
|
6730
|
+
e.data.value = h;
|
|
6728
6731
|
});
|
|
6729
|
-
},
|
|
6730
|
-
return y && g(y, "data") && (e.data.value = y.data, e.params.value = y.params),
|
|
6732
|
+
}, p = o(), y = f(p);
|
|
6733
|
+
return y && g(y, "data") && (e.data.value = y.data, e.params.value = y.params), p && (u.value = w()), vn(() => {
|
|
6731
6734
|
u.value();
|
|
6732
6735
|
}), {
|
|
6733
|
-
onBefore(
|
|
6734
|
-
const
|
|
6735
|
-
if (!
|
|
6736
|
+
onBefore(T) {
|
|
6737
|
+
const v = o(T), h = f(v);
|
|
6738
|
+
if (!h || !g(h, "data"))
|
|
6736
6739
|
return {};
|
|
6737
|
-
if (d(
|
|
6738
|
-
return e.data.value =
|
|
6740
|
+
if (d(h.time))
|
|
6741
|
+
return e.data.value = h.data, e.loading.value = !1, {
|
|
6739
6742
|
isBreak: !0,
|
|
6740
|
-
breakResult:
|
|
6743
|
+
breakResult: h.data
|
|
6741
6744
|
};
|
|
6742
|
-
e.data.value =
|
|
6745
|
+
e.data.value = h.data;
|
|
6743
6746
|
},
|
|
6744
|
-
onQuery(
|
|
6745
|
-
const
|
|
6746
|
-
let _ = nb(
|
|
6747
|
-
return _ && _ !== l ? () => _ : (_ =
|
|
6747
|
+
onQuery(T) {
|
|
6748
|
+
const v = e.params.value, h = o(v);
|
|
6749
|
+
let _ = nb(h);
|
|
6750
|
+
return _ && _ !== l ? () => _ : (_ = T(), l = _, tb(h, _), () => _);
|
|
6748
6751
|
},
|
|
6749
|
-
onSuccess(
|
|
6750
|
-
const
|
|
6751
|
-
|
|
6752
|
-
data:
|
|
6753
|
-
params:
|
|
6752
|
+
onSuccess(T, v) {
|
|
6753
|
+
const h = o(v);
|
|
6754
|
+
h && (u.value(), c(h, r, {
|
|
6755
|
+
data: T,
|
|
6756
|
+
params: v,
|
|
6754
6757
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
6755
|
-
}), u.value =
|
|
6758
|
+
}), u.value = w(v));
|
|
6756
6759
|
},
|
|
6757
|
-
onMutate(
|
|
6758
|
-
const
|
|
6759
|
-
|
|
6760
|
-
data:
|
|
6760
|
+
onMutate(T) {
|
|
6761
|
+
const v = o(e.params.value);
|
|
6762
|
+
v && (u.value(), c(v, r, {
|
|
6763
|
+
data: T,
|
|
6761
6764
|
params: e.params.value,
|
|
6762
6765
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
6763
|
-
}), u.value =
|
|
6766
|
+
}), u.value = w(e.params.value));
|
|
6764
6767
|
}
|
|
6765
6768
|
};
|
|
6766
6769
|
});
|
|
@@ -6810,8 +6813,8 @@ var sb = ft((e, t) => {
|
|
|
6810
6813
|
return $r() - o <= a.value && u.cancel(), Promise.reject(g);
|
|
6811
6814
|
}
|
|
6812
6815
|
}, d = Promise.allSettled([c(), u]).then((g) => {
|
|
6813
|
-
const
|
|
6814
|
-
return
|
|
6816
|
+
const w = g[0];
|
|
6817
|
+
return w.status === "fulfilled" ? w.value : Promise.reject(w.reason);
|
|
6815
6818
|
});
|
|
6816
6819
|
return () => d;
|
|
6817
6820
|
},
|
|
@@ -6855,39 +6858,39 @@ var lb = ft((e, t) => {
|
|
|
6855
6858
|
pollingWhenOffline: i = !1,
|
|
6856
6859
|
errorRetryCount: a = 0
|
|
6857
6860
|
} = t;
|
|
6858
|
-
const s = P(), o = P(!1), u = G(() => rt(n)), l = G(() => rt(a)), f = [], c = (
|
|
6859
|
-
|
|
6861
|
+
const s = P(), o = P(!1), u = G(() => rt(n)), l = G(() => rt(a)), f = [], c = (p) => {
|
|
6862
|
+
p && f.push(p);
|
|
6860
6863
|
}, d = () => (
|
|
6861
6864
|
// pollingWhenHidden = true or pollingWhenHidden = false and document is visibility
|
|
6862
6865
|
(r || ds()) && // pollingWhenOffline = true or pollingWhenOffline = false and is online
|
|
6863
6866
|
(i || By())
|
|
6864
|
-
), g = (
|
|
6867
|
+
), g = (p) => {
|
|
6865
6868
|
if (e.error.value && l.value !== 0)
|
|
6866
6869
|
return;
|
|
6867
6870
|
let y;
|
|
6868
6871
|
if (!_n(u.value) && u.value >= 0)
|
|
6869
6872
|
if (d())
|
|
6870
|
-
y = setTimeout(
|
|
6873
|
+
y = setTimeout(p, u.value);
|
|
6871
6874
|
else {
|
|
6872
6875
|
o.value = !0;
|
|
6873
6876
|
return;
|
|
6874
6877
|
}
|
|
6875
6878
|
return () => y && clearTimeout(y);
|
|
6876
|
-
},
|
|
6879
|
+
}, w = () => {
|
|
6877
6880
|
o.value && d() && (e.context.refresh(), o.value = !1);
|
|
6878
6881
|
};
|
|
6879
6882
|
return ve(u, () => {
|
|
6880
6883
|
s.value && (s.value(), s.value = g(() => e.context.refresh()));
|
|
6881
|
-
}), r || c(Zn("VISIBLE_LISTENER",
|
|
6882
|
-
f.forEach((
|
|
6884
|
+
}), r || c(Zn("VISIBLE_LISTENER", w)), i || c(Zn("RECONNECT_LISTENER", w)), vn(() => {
|
|
6885
|
+
f.forEach((p) => p());
|
|
6883
6886
|
}), {
|
|
6884
6887
|
onBefore() {
|
|
6885
|
-
var
|
|
6886
|
-
(
|
|
6888
|
+
var p;
|
|
6889
|
+
(p = s.value) === null || p === void 0 || p.call(s);
|
|
6887
6890
|
},
|
|
6888
6891
|
onCancel() {
|
|
6889
|
-
var
|
|
6890
|
-
(
|
|
6892
|
+
var p;
|
|
6893
|
+
(p = s.value) === null || p === void 0 || p.call(s);
|
|
6891
6894
|
},
|
|
6892
6895
|
onAfter() {
|
|
6893
6896
|
s.value = g(() => e.context.refresh());
|
|
@@ -6948,61 +6951,61 @@ function Ba(e) {
|
|
|
6948
6951
|
data: c,
|
|
6949
6952
|
params: d,
|
|
6950
6953
|
run: g,
|
|
6951
|
-
...
|
|
6952
|
-
} = fb(e, f),
|
|
6953
|
-
const [
|
|
6954
|
-
...
|
|
6955
|
-
...
|
|
6956
|
-
}, ...
|
|
6954
|
+
...w
|
|
6955
|
+
} = fb(e, f), p = (m) => {
|
|
6956
|
+
const [E, ...S] = d.value || [], I = [{
|
|
6957
|
+
...E,
|
|
6958
|
+
...m
|
|
6959
|
+
}, ...S];
|
|
6957
6960
|
g(...I);
|
|
6958
|
-
}, y = (
|
|
6959
|
-
|
|
6960
|
-
[s]:
|
|
6961
|
+
}, y = (m) => {
|
|
6962
|
+
p({
|
|
6963
|
+
[s]: m
|
|
6961
6964
|
});
|
|
6962
|
-
},
|
|
6963
|
-
|
|
6964
|
-
[o]:
|
|
6965
|
+
}, T = (m) => {
|
|
6966
|
+
p({
|
|
6967
|
+
[o]: m
|
|
6965
6968
|
});
|
|
6966
|
-
},
|
|
6967
|
-
|
|
6968
|
-
[s]:
|
|
6969
|
-
[o]:
|
|
6969
|
+
}, v = (m, E) => {
|
|
6970
|
+
p({
|
|
6971
|
+
[s]: m,
|
|
6972
|
+
[o]: E
|
|
6970
6973
|
});
|
|
6971
|
-
},
|
|
6974
|
+
}, h = G(() => ja(c.value, u, 0)), _ = G({
|
|
6972
6975
|
get: () => {
|
|
6973
|
-
var
|
|
6976
|
+
var m, E, S;
|
|
6974
6977
|
return (
|
|
6975
6978
|
// @ts-ignore
|
|
6976
|
-
(
|
|
6979
|
+
(m = (E = d.value) === null || E === void 0 || (S = E[0]) === null || S === void 0 ? void 0 : S[s]) !== null && m !== void 0 ? m : f.defaultParams[0][s]
|
|
6977
6980
|
);
|
|
6978
6981
|
},
|
|
6979
|
-
set: (
|
|
6980
|
-
y(
|
|
6982
|
+
set: (m) => {
|
|
6983
|
+
y(m);
|
|
6981
6984
|
}
|
|
6982
|
-
}),
|
|
6985
|
+
}), O = G({
|
|
6983
6986
|
get: () => {
|
|
6984
|
-
var
|
|
6987
|
+
var m, E, S;
|
|
6985
6988
|
return (
|
|
6986
6989
|
// @ts-ignore
|
|
6987
|
-
(
|
|
6990
|
+
(m = (E = d.value) === null || E === void 0 || (S = E[0]) === null || S === void 0 ? void 0 : S[o]) !== null && m !== void 0 ? m : f.defaultParams[0][o]
|
|
6988
6991
|
);
|
|
6989
6992
|
},
|
|
6990
|
-
set: (
|
|
6991
|
-
|
|
6993
|
+
set: (m) => {
|
|
6994
|
+
T(m);
|
|
6992
6995
|
}
|
|
6993
|
-
}), b = G(() => ja(c.value, l, Math.ceil(
|
|
6996
|
+
}), b = G(() => ja(c.value, l, Math.ceil(h.value / O.value)));
|
|
6994
6997
|
return {
|
|
6995
6998
|
data: c,
|
|
6996
6999
|
params: d,
|
|
6997
7000
|
current: _,
|
|
6998
|
-
pageSize:
|
|
6999
|
-
total:
|
|
7001
|
+
pageSize: O,
|
|
7002
|
+
total: h,
|
|
7000
7003
|
totalPage: b,
|
|
7001
7004
|
run: g,
|
|
7002
7005
|
changeCurrent: y,
|
|
7003
|
-
changePageSize:
|
|
7004
|
-
changePagination:
|
|
7005
|
-
...
|
|
7006
|
+
changePageSize: T,
|
|
7007
|
+
changePagination: v,
|
|
7008
|
+
...w
|
|
7006
7009
|
};
|
|
7007
7010
|
}
|
|
7008
7011
|
const Ka = "COLUMN_SCHEME", Ua = {
|
|
@@ -7025,19 +7028,19 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7025
7028
|
}
|
|
7026
7029
|
},
|
|
7027
7030
|
setup(e, { expose: t }) {
|
|
7028
|
-
const n = pr(), { page: r } = Xe(e), { apiConfig: i, buttons: a, data: s, page_size: o } = r.value, u = P(r.value.total), l = P(i == null ? void 0 : i.summary), f = P(s), c = P(s), d = P({}), g = P(!1),
|
|
7029
|
-
导入:
|
|
7030
|
-
导出:
|
|
7031
|
-
},
|
|
7031
|
+
const n = pr(), { page: r } = Xe(e), { apiConfig: i, buttons: a, data: s, page_size: o } = r.value, u = P(r.value.total), l = P(i == null ? void 0 : i.summary), f = P(s), c = P(s), d = P({}), g = P(!1), w = P(!1), p = P([]), y = P([]), T = P(), v = P(), h = P(), _ = {
|
|
7032
|
+
导入: v,
|
|
7033
|
+
导出: T
|
|
7034
|
+
}, O = G(() => ({
|
|
7032
7035
|
COLUMN_SETTING: r.value.fieldShowConfigList,
|
|
7033
7036
|
FILTER_SETTING: r.value.fieldFilterConfigList,
|
|
7034
7037
|
SORT_SETTING: r.value.fieldSortConfigList
|
|
7035
|
-
})), b = P(),
|
|
7038
|
+
})), b = P(), m = Oe(
|
|
7036
7039
|
"transformData",
|
|
7037
7040
|
// eslint-disable-next-line
|
|
7038
7041
|
(x, H) => x
|
|
7039
|
-
),
|
|
7040
|
-
}),
|
|
7042
|
+
), E = Oe("refreshPage", () => {
|
|
7043
|
+
}), S = () => {
|
|
7041
7044
|
c.value = Ra(f.value, (x) => lv(oe, (H, ne) => {
|
|
7042
7045
|
var ae;
|
|
7043
7046
|
return ["", void 0, null].includes(H) || Array.isArray(H) ? !0 : Object.hasOwn(x, ne) ? mv(
|
|
@@ -7047,9 +7050,9 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7047
7050
|
}));
|
|
7048
7051
|
};
|
|
7049
7052
|
ve(f, () => {
|
|
7050
|
-
|
|
7053
|
+
S();
|
|
7051
7054
|
});
|
|
7052
|
-
const { patchEnumerations:
|
|
7055
|
+
const { patchEnumerations: C, patchStaticEnumerations: I } = gr(), K = P(null), J = P(null), M = P(null), $ = Al(Ka, {}), A = P(
|
|
7053
7056
|
$.value[r.value.name] || r.value.columns
|
|
7054
7057
|
), L = qe({
|
|
7055
7058
|
type: "COLUMN_SETTING",
|
|
@@ -7075,7 +7078,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7075
7078
|
H.forEach((ne) => Me(ne, r.value.name));
|
|
7076
7079
|
},
|
|
7077
7080
|
onSuccess(H) {
|
|
7078
|
-
u.value.count = fr(H, i.list.totalKey), f.value =
|
|
7081
|
+
u.value.count = fr(H, i.list.totalKey), f.value = m(H, e.page.name);
|
|
7079
7082
|
}
|
|
7080
7083
|
});
|
|
7081
7084
|
} else {
|
|
@@ -7095,7 +7098,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7095
7098
|
onSuccess(H) {
|
|
7096
7099
|
u.value = H.data.page.total, f.value = H.data.page.data, I(H.data.page.enumerations);
|
|
7097
7100
|
}
|
|
7098
|
-
}),
|
|
7101
|
+
}), h.value = ot(
|
|
7099
7102
|
`/duckbill-data-query-server/data/export/${n.meta.category}`,
|
|
7100
7103
|
"post",
|
|
7101
7104
|
{
|
|
@@ -7106,7 +7109,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7106
7109
|
})(), wt(() => {
|
|
7107
7110
|
a.forEach((x) => {
|
|
7108
7111
|
const H = _[x.children];
|
|
7109
|
-
H ? H.value = x : x.columnAction ? y.value.push(x) :
|
|
7112
|
+
H ? H.value = x : x.columnAction ? y.value.push(x) : p.value.push(x);
|
|
7110
7113
|
});
|
|
7111
7114
|
});
|
|
7112
7115
|
const { initFormState: ue } = Tn(), oe = ue(
|
|
@@ -7148,7 +7151,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7148
7151
|
}
|
|
7149
7152
|
H = Pe[e.page.name];
|
|
7150
7153
|
}
|
|
7151
|
-
const { category: ne, tab: ae } = n.meta, _e = await
|
|
7154
|
+
const { category: ne, tab: ae } = n.meta, _e = await h.value({
|
|
7152
7155
|
category: ne,
|
|
7153
7156
|
tab: ae,
|
|
7154
7157
|
fetchMode: "BODY",
|
|
@@ -7181,7 +7184,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7181
7184
|
U(x, _e, ae);
|
|
7182
7185
|
}, ee = async () => {
|
|
7183
7186
|
L.visible = !1, setTimeout(() => {
|
|
7184
|
-
|
|
7187
|
+
E();
|
|
7185
7188
|
}, 500);
|
|
7186
7189
|
}, q = G(() => A.value.map((x) => ({
|
|
7187
7190
|
...x,
|
|
@@ -7203,7 +7206,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7203
7206
|
width: y.value.reduce((H, ne) => H + Number(ne.columnActionWidth || 50), 0)
|
|
7204
7207
|
}), j.value = x;
|
|
7205
7208
|
}), Tt(async () => {
|
|
7206
|
-
I(e.page.enumerations), await
|
|
7209
|
+
I(e.page.enumerations), await C(e.page.enumapi), w.value = !0, Ge().then(() => {
|
|
7207
7210
|
z();
|
|
7208
7211
|
});
|
|
7209
7212
|
}), i ? ve([we, de], ([x, H]) => {
|
|
@@ -7235,7 +7238,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7235
7238
|
FILTER_SETTING: !ae.filterable
|
|
7236
7239
|
};
|
|
7237
7240
|
if (x === "SORT_SETTING") {
|
|
7238
|
-
const Ie =
|
|
7241
|
+
const Ie = O.value[x].find(
|
|
7239
7242
|
(De) => De.columnKey === ae.columnKey
|
|
7240
7243
|
);
|
|
7241
7244
|
Object.keys(Ua).forEach((De) => {
|
|
@@ -7250,7 +7253,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7250
7253
|
} else
|
|
7251
7254
|
ne.push({
|
|
7252
7255
|
...ae,
|
|
7253
|
-
show: !!
|
|
7256
|
+
show: !!O.value[x].find(
|
|
7254
7257
|
(Ie) => Ie.columnKey === ae.columnKey
|
|
7255
7258
|
),
|
|
7256
7259
|
disabled: _e[x]
|
|
@@ -7264,10 +7267,10 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7264
7267
|
tableData: c,
|
|
7265
7268
|
rowKey: Y,
|
|
7266
7269
|
paginationQuery: b,
|
|
7267
|
-
loaded:
|
|
7268
|
-
buttonsConfig:
|
|
7269
|
-
exportConfig:
|
|
7270
|
-
importConfig:
|
|
7270
|
+
loaded: w,
|
|
7271
|
+
buttonsConfig: p,
|
|
7272
|
+
exportConfig: T,
|
|
7273
|
+
importConfig: v,
|
|
7271
7274
|
summary: l,
|
|
7272
7275
|
current: we,
|
|
7273
7276
|
pageSize: de,
|
|
@@ -7282,7 +7285,7 @@ const Ka = "COLUMN_SCHEME", Ua = {
|
|
|
7282
7285
|
handleSearch: Le,
|
|
7283
7286
|
handleExport: Ve,
|
|
7284
7287
|
resetSearch: dt,
|
|
7285
|
-
headerFilterHandle:
|
|
7288
|
+
headerFilterHandle: S,
|
|
7286
7289
|
handleEmitAction: k,
|
|
7287
7290
|
columnSettingChange: ee,
|
|
7288
7291
|
resizeTableHeight: vr,
|
|
@@ -7696,69 +7699,69 @@ const Ab = $b, [Pb] = bn("page-renderer"), Ib = Ae({
|
|
|
7696
7699
|
},
|
|
7697
7700
|
setup(e, { expose: t }) {
|
|
7698
7701
|
var b;
|
|
7699
|
-
const n = pr(), r = P(null), i = P(null), a = P(""), s = P(null), o = P(null), u = P([]), l = P(), f = { title: "", component: null }, { selectedErrorRowKeys: c } = Cn(), d = Zt(f), g = P(e.options),
|
|
7702
|
+
const n = pr(), r = P(null), i = P(null), a = P(""), s = P(null), o = P(null), u = P([]), l = P(), f = { title: "", component: null }, { selectedErrorRowKeys: c } = Cn(), d = Zt(f), g = P(e.options), w = P(!1), p = Oe(
|
|
7700
7703
|
"actionGuard",
|
|
7701
7704
|
null
|
|
7702
7705
|
);
|
|
7703
7706
|
pi().interceptors.response.use(
|
|
7704
|
-
(
|
|
7705
|
-
var
|
|
7706
|
-
if (
|
|
7707
|
+
(m) => {
|
|
7708
|
+
var E, S;
|
|
7709
|
+
if (m.data && ((E = m.data) == null ? void 0 : E.type) === "string" && typeof ((S = m.data) == null ? void 0 : S.value) == "string")
|
|
7707
7710
|
try {
|
|
7708
|
-
|
|
7711
|
+
m.data = JSON.parse(m.data.value);
|
|
7709
7712
|
} catch {
|
|
7710
7713
|
console.warn("response.data is not a json string");
|
|
7711
7714
|
}
|
|
7712
|
-
return
|
|
7715
|
+
return m;
|
|
7713
7716
|
}
|
|
7714
7717
|
), Tt(() => {
|
|
7715
|
-
|
|
7718
|
+
v();
|
|
7716
7719
|
});
|
|
7717
|
-
const
|
|
7720
|
+
const T = ot(
|
|
7718
7721
|
`/duckbill-data-query-server/table/search/${n.meta.category}`
|
|
7719
|
-
),
|
|
7720
|
-
const { category:
|
|
7721
|
-
if (!e.options &&
|
|
7722
|
-
|
|
7722
|
+
), v = async () => {
|
|
7723
|
+
const { category: m, tab: E } = n.meta;
|
|
7724
|
+
if (!e.options && m && E) {
|
|
7725
|
+
w.value = !0;
|
|
7723
7726
|
try {
|
|
7724
|
-
const
|
|
7725
|
-
category:
|
|
7726
|
-
tab:
|
|
7727
|
+
const S = await T({
|
|
7728
|
+
category: m,
|
|
7729
|
+
tab: E,
|
|
7727
7730
|
pageNumber: 1,
|
|
7728
7731
|
pageSize: 100,
|
|
7729
7732
|
fetchMode: "ALL",
|
|
7730
7733
|
sorts: {},
|
|
7731
7734
|
filters: {}
|
|
7732
7735
|
});
|
|
7733
|
-
g.value =
|
|
7736
|
+
g.value = S.data;
|
|
7734
7737
|
} catch {
|
|
7735
7738
|
je.error("页面配置请求失败!");
|
|
7736
7739
|
} finally {
|
|
7737
|
-
|
|
7740
|
+
w.value = !1;
|
|
7738
7741
|
}
|
|
7739
7742
|
}
|
|
7740
|
-
},
|
|
7743
|
+
}, h = {
|
|
7741
7744
|
locale: Ab,
|
|
7742
7745
|
transformCellText: ({
|
|
7743
|
-
text:
|
|
7744
|
-
column:
|
|
7745
|
-
record:
|
|
7746
|
-
}) => !
|
|
7747
|
-
}, _ = (
|
|
7748
|
-
var
|
|
7749
|
-
(
|
|
7746
|
+
text: m,
|
|
7747
|
+
column: E,
|
|
7748
|
+
record: S
|
|
7749
|
+
}) => !E || E.dataIndex === "action" ? m : hn(S[E.dataIndex]) || S[E.dataIndex] === "" ? " - " : m
|
|
7750
|
+
}, _ = (m, E) => {
|
|
7751
|
+
var S;
|
|
7752
|
+
(S = o.value) == null || S.open(m, E);
|
|
7750
7753
|
};
|
|
7751
|
-
Dt("materials", (b = e.config) == null ? void 0 : b.materials), Dt("previewMediaModalOpen", _), Dt("tableCellSlots", e.tableCellSlots || {}), Dt("refreshPage",
|
|
7754
|
+
Dt("materials", (b = e.config) == null ? void 0 : b.materials), Dt("previewMediaModalOpen", _), Dt("tableCellSlots", e.tableCellSlots || {}), Dt("refreshPage", v), Dt(
|
|
7752
7755
|
"emitHandler",
|
|
7753
|
-
(
|
|
7756
|
+
(m, E, S) => {
|
|
7754
7757
|
var I, K, J;
|
|
7755
|
-
const
|
|
7756
|
-
if (e.form === void 0 || !e.form[
|
|
7757
|
-
const M = (I = e.customEvent) == null ? void 0 : I[
|
|
7758
|
+
const C = fi(E);
|
|
7759
|
+
if (e.form === void 0 || !e.form[m]) {
|
|
7760
|
+
const M = (I = e.customEvent) == null ? void 0 : I[m];
|
|
7758
7761
|
if (!M)
|
|
7759
|
-
return
|
|
7762
|
+
return p ? p(m, C) : je.warn("没有找到自定义事件处理函数"), S == null ? void 0 : S();
|
|
7760
7763
|
try {
|
|
7761
|
-
M(
|
|
7764
|
+
M(C, ($) => {
|
|
7762
7765
|
var L;
|
|
7763
7766
|
const A = (L = g.value.page) == null ? void 0 : L.rowKey;
|
|
7764
7767
|
A && $.forEach((N) => {
|
|
@@ -7767,14 +7770,14 @@ const Ab = $b, [Pb] = bn("page-renderer"), Ib = Ae({
|
|
|
7767
7770
|
});
|
|
7768
7771
|
}).finally(() => {
|
|
7769
7772
|
setTimeout(() => {
|
|
7770
|
-
|
|
7773
|
+
S == null || S();
|
|
7771
7774
|
}, 100);
|
|
7772
7775
|
});
|
|
7773
7776
|
} catch ($) {
|
|
7774
7777
|
((K = $.message) == null ? void 0 : K.indexOf("finally")) > -1 ? je.warn("自定义事件处理函数必须返回一个Promise") : je.warn($.message);
|
|
7775
7778
|
}
|
|
7776
7779
|
} else
|
|
7777
|
-
(((J = e.customEvent) == null ? void 0 : J[
|
|
7780
|
+
(((J = e.customEvent) == null ? void 0 : J[m]) || (() => Promise.resolve()))(C, ($) => {
|
|
7778
7781
|
var L;
|
|
7779
7782
|
const A = (L = g.value.page) == null ? void 0 : L.rowKey;
|
|
7780
7783
|
A && $.forEach((N) => {
|
|
@@ -7783,23 +7786,23 @@ const Ab = $b, [Pb] = bn("page-renderer"), Ib = Ae({
|
|
|
7783
7786
|
});
|
|
7784
7787
|
}).then(($) => {
|
|
7785
7788
|
var A;
|
|
7786
|
-
l.value = $, d.value = e.form[
|
|
7789
|
+
l.value = $, d.value = e.form[m], u.value = d.value.needSelectRows === !1 ? [] : C, (A = s.value) == null || A.openModal();
|
|
7787
7790
|
}).finally(() => {
|
|
7788
7791
|
setTimeout(() => {
|
|
7789
|
-
|
|
7792
|
+
S == null || S();
|
|
7790
7793
|
}, 100);
|
|
7791
7794
|
});
|
|
7792
7795
|
}
|
|
7793
7796
|
), bb();
|
|
7794
|
-
const
|
|
7795
|
-
var
|
|
7797
|
+
const O = () => {
|
|
7798
|
+
var m, E;
|
|
7796
7799
|
return {
|
|
7797
|
-
basic: (
|
|
7798
|
-
tabs: (
|
|
7800
|
+
basic: (m = r.value) == null ? void 0 : m.run(),
|
|
7801
|
+
tabs: (E = i.value) == null ? void 0 : E.run(a.value)
|
|
7799
7802
|
}[g.value.type];
|
|
7800
7803
|
};
|
|
7801
|
-
return t({ run:
|
|
7802
|
-
run:
|
|
7804
|
+
return t({ run: O }), {
|
|
7805
|
+
run: O,
|
|
7803
7806
|
rows: u,
|
|
7804
7807
|
tabs: i,
|
|
7805
7808
|
table: r,
|
|
@@ -7808,7 +7811,7 @@ const Ab = $b, [Pb] = bn("page-renderer"), Ib = Ae({
|
|
|
7808
7811
|
extraData: l,
|
|
7809
7812
|
activePageName: a,
|
|
7810
7813
|
currentComponent: d,
|
|
7811
|
-
getPopupContainer:
|
|
7814
|
+
getPopupContainer: h,
|
|
7812
7815
|
rendererOptions: g
|
|
7813
7816
|
};
|
|
7814
7817
|
}
|