@yzsf2e/render-core 1.0.2-alpha.39 → 1.0.2-alpha.40
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 +250 -250
- package/dist/render-core.umd.js +2 -2
- package/package.json +1 -1
package/dist/render-core.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as we, ref as D, computed as H, openBlock as L, createBlock as V, resolveDynamicComponent as en, effectScope as Zo, unref as ea, onMounted as mt, nextTick as Ve, getCurrentScope as ta, onScopeDispose as na, readonly as ra, getCurrentInstance as ht, watch as ge, shallowRef as St, resolveComponent as j, withCtx as M, createVNode as x, renderSlot as qt, createElementVNode as Oe, createElementBlock as J, createTextVNode as de, createCommentVNode as pe, toRefs as Ue, reactive as Ne, mergeProps as ft, toDisplayString as ue, toRaw as _e, inject as
|
|
1
|
+
import { defineComponent as we, ref as D, computed as H, openBlock as L, createBlock as V, resolveDynamicComponent as en, effectScope as Zo, unref as ea, onMounted as mt, nextTick as Ve, getCurrentScope as ta, onScopeDispose as na, readonly as ra, getCurrentInstance as ht, watch as ge, shallowRef as St, resolveComponent as j, withCtx as M, createVNode as x, renderSlot as qt, createElementVNode as Oe, createElementBlock as J, createTextVNode as de, createCommentVNode as pe, toRefs as Ue, reactive as Ne, mergeProps as ft, toDisplayString as ue, toRaw as _e, inject as ve, h as Ke, Fragment as ce, renderList as Ie, withDirectives as Fn, vShow as Wr, withModifiers as qr, resolveDirective as oa, createSlots as aa, watchEffect as dt, onRenderTriggered as ia, normalizeProps as An, normalizeClass as sa, normalizeStyle as la, onUnmounted as tn, isRef as ua, provide as zt } from "vue";
|
|
2
2
|
import { DatePicker as Vr, Modal as Xr, Button as nn, Space as It, message as he, Input as ca, Select as Ut, RangePicker as fa, Col as da, Row as pa, Form as kn, Menu as ga, MenuItem as ma, Dropdown as ha, Pagination as va, DropdownButton as ya, Alert as tr, Spin as ba, Table as wa, Transfer as Sa, ConfigProvider as Ca } from "ant-design-vue";
|
|
3
3
|
import * as $a from "@ant-design/icons-vue";
|
|
4
4
|
import { CloseOutlined as Ta, ShrinkOutlined as _a, ArrowsAltOutlined as Oa, DownOutlined as Qr, UpOutlined as Ea, SettingOutlined as Aa, LoadingOutlined as Jr, FilterOutlined as Pa } from "@ant-design/icons-vue";
|
|
5
5
|
import { useRouter as Ia } from "vue-router";
|
|
6
6
|
/*!
|
|
7
|
-
* @yzsf2e/render-core v0.0.2-alpha.25
|
|
7
|
+
* @yzsf2e/render-core v0.0.2-alpha.25 Wed Apr 24 2024 18:10:56 GMT+0800 (中国标准时间)
|
|
8
8
|
* (c) 2023 @yzsf2e.
|
|
9
9
|
*/
|
|
10
10
|
const Na = Object.assign;
|
|
@@ -286,7 +286,7 @@ function ai(e, t, n, r = {}) {
|
|
|
286
286
|
}
|
|
287
287
|
if (!n)
|
|
288
288
|
return d;
|
|
289
|
-
const
|
|
289
|
+
const b = Bn(t), h = ri(b), w = (o = r.serializer) != null ? o : oi[h], { pause: m, resume: v } = Va(
|
|
290
290
|
d,
|
|
291
291
|
() => S(d.value),
|
|
292
292
|
{ flush: a, deep: s, eventFilter: f }
|
|
@@ -299,7 +299,7 @@ function ai(e, t, n, r = {}) {
|
|
|
299
299
|
if (T == null)
|
|
300
300
|
n.removeItem(e);
|
|
301
301
|
else {
|
|
302
|
-
const $ =
|
|
302
|
+
const $ = w.write(T), P = n.getItem(e);
|
|
303
303
|
P !== $ && (n.setItem(e, $), c && c.dispatchEvent(new CustomEvent(rr, {
|
|
304
304
|
detail: {
|
|
305
305
|
key: e,
|
|
@@ -316,12 +316,12 @@ function ai(e, t, n, r = {}) {
|
|
|
316
316
|
function y(T) {
|
|
317
317
|
const $ = T ? T.newValue : n.getItem(e);
|
|
318
318
|
if ($ == null)
|
|
319
|
-
return l &&
|
|
319
|
+
return l && b != null && n.setItem(e, w.write(b)), b;
|
|
320
320
|
if (!T && u) {
|
|
321
|
-
const P =
|
|
322
|
-
return typeof u == "function" ? u(P,
|
|
321
|
+
const P = w.read($);
|
|
322
|
+
return typeof u == "function" ? u(P, b) : h === "object" && !Array.isArray(P) ? { ...b, ...P } : P;
|
|
323
323
|
} else
|
|
324
|
-
return typeof $ != "string" ? $ :
|
|
324
|
+
return typeof $ != "string" ? $ : w.read($);
|
|
325
325
|
}
|
|
326
326
|
function O(T) {
|
|
327
327
|
_(T.detail);
|
|
@@ -329,13 +329,13 @@ function ai(e, t, n, r = {}) {
|
|
|
329
329
|
function _(T) {
|
|
330
330
|
if (!(T && T.storageArea !== n)) {
|
|
331
331
|
if (T && T.key == null) {
|
|
332
|
-
d.value =
|
|
332
|
+
d.value = b;
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
335
|
if (!(T && T.key !== e)) {
|
|
336
336
|
m();
|
|
337
337
|
try {
|
|
338
|
-
(T == null ? void 0 : T.newValue) !==
|
|
338
|
+
(T == null ? void 0 : T.newValue) !== w.write(d.value) && (d.value = y(T));
|
|
339
339
|
} catch ($) {
|
|
340
340
|
g($);
|
|
341
341
|
} finally {
|
|
@@ -380,7 +380,7 @@ function no(e, t, n, r = {}) {
|
|
|
380
380
|
} = r, g = ht(), C = n || (g == null ? void 0 : g.emit) || ((o = g == null ? void 0 : g.$emit) == null ? void 0 : o.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));
|
|
381
381
|
let d = u;
|
|
382
382
|
t || (t = "modelValue"), d = d || `update:${t.toString()}`;
|
|
383
|
-
const
|
|
383
|
+
const b = (m) => i ? typeof i == "function" ? i(m) : Za(m) : m, h = () => xa(e[t]) ? b(e[t]) : c, w = (m) => {
|
|
384
384
|
f ? f(m) && C(d, m) : C(d, m);
|
|
385
385
|
};
|
|
386
386
|
if (l) {
|
|
@@ -389,12 +389,12 @@ function no(e, t, n, r = {}) {
|
|
|
389
389
|
return ge(
|
|
390
390
|
() => e[t],
|
|
391
391
|
(y) => {
|
|
392
|
-
S || (S = !0, v.value =
|
|
392
|
+
S || (S = !0, v.value = b(y), Ve(() => S = !1));
|
|
393
393
|
}
|
|
394
394
|
), ge(
|
|
395
395
|
v,
|
|
396
396
|
(y) => {
|
|
397
|
-
!S && (y !== e[t] || p) &&
|
|
397
|
+
!S && (y !== e[t] || p) && w(y);
|
|
398
398
|
},
|
|
399
399
|
{ deep: p }
|
|
400
400
|
), v;
|
|
@@ -404,7 +404,7 @@ function no(e, t, n, r = {}) {
|
|
|
404
404
|
return h();
|
|
405
405
|
},
|
|
406
406
|
set(m) {
|
|
407
|
-
|
|
407
|
+
w(m);
|
|
408
408
|
}
|
|
409
409
|
});
|
|
410
410
|
}
|
|
@@ -450,12 +450,12 @@ const si = we({
|
|
|
450
450
|
handleMouseDown: (f) => {
|
|
451
451
|
let g = !1;
|
|
452
452
|
g = !0;
|
|
453
|
-
const C = f.clientX, d = o.value,
|
|
453
|
+
const C = f.clientX, d = o.value, b = (l == null ? void 0 : l.clientWidth) || document.body.clientWidth;
|
|
454
454
|
document.body.classList.add("disable-select-in-dragging"), window.onmousemove = function(h) {
|
|
455
455
|
if (g == !1)
|
|
456
456
|
return;
|
|
457
457
|
const m = h.clientX - C, v = typeof d == "number" ? d - m : window.innerWidth - h.x;
|
|
458
|
-
o.value = Math.min(v < u ? u : v,
|
|
458
|
+
o.value = Math.min(v < u ? u : v, b);
|
|
459
459
|
}, window.onmouseup = () => {
|
|
460
460
|
window.onmousemove = null, document.body.classList.remove("disable-select-in-dragging");
|
|
461
461
|
};
|
|
@@ -552,26 +552,26 @@ const ci = /* @__PURE__ */ ke(si, [["render", ui]]), fi = rn(ci), di = we({
|
|
|
552
552
|
a.value = !0;
|
|
553
553
|
const f = ((g = s.value) == null ? void 0 : g.finish) || (() => Promise.resolve({ success: !0 }));
|
|
554
554
|
(C = s.value) != null && C.finish || console.warn("form组件没有提供finish方法"), f().then((d) => {
|
|
555
|
-
const { needFeedback:
|
|
556
|
-
a.value = !1, d && d.success && (
|
|
555
|
+
const { needFeedback: b = !0, needRefresh: h = !0, successMsg: w = "操作成功" } = r.value;
|
|
556
|
+
a.value = !1, d && d.success && (b && he.success(w), c(), h && n("refresh"));
|
|
557
557
|
}).catch((d) => {
|
|
558
558
|
var h;
|
|
559
559
|
if (a.value = !1, console.log("[PageRendererFormModal handleOk Error]: ", d), typeof d == "string")
|
|
560
560
|
return he.warn(d);
|
|
561
|
-
const { errorFields:
|
|
562
|
-
|
|
561
|
+
const { errorFields: b } = d;
|
|
562
|
+
b && b.length && he.warn((h = b[0]) == null ? void 0 : h.errors.join("、"));
|
|
563
563
|
});
|
|
564
564
|
};
|
|
565
565
|
ge(o, (f) => {
|
|
566
566
|
f && Ve(() => {
|
|
567
567
|
const g = document.querySelector(".ant-modal-root"), C = g == null ? void 0 : g.querySelector(".ant-modal-header"), d = g == null ? void 0 : g.querySelector(".ant-modal");
|
|
568
568
|
C.style.cursor = "move";
|
|
569
|
-
const
|
|
569
|
+
const b = d.currentStyle || window.getComputedStyle(d, null);
|
|
570
570
|
C.onmousedown = (h) => {
|
|
571
|
-
const
|
|
571
|
+
const w = h.clientX - C.offsetLeft, m = h.clientY - C.offsetTop;
|
|
572
572
|
let v, S;
|
|
573
|
-
|
|
574
|
-
const O = y.clientX -
|
|
573
|
+
b.left.includes("%") ? (v = +document.body.clientWidth * (+b.left.replace(/%/g, "") / 100), S = +document.body.clientHeight * (+b.top.replace(/%/g, "") / 100)) : (v = +b.left.replace(/\px/g, ""), S = +b.top.replace(/\px/g, "")), document.onmousemove = function(y) {
|
|
574
|
+
const O = y.clientX - w, _ = y.clientY - m;
|
|
575
575
|
d.style.left = `${O + v}px`, d.style.top = `${_ + S}px`;
|
|
576
576
|
}, document.onmouseup = function() {
|
|
577
577
|
document.onmousemove = null, document.onmouseup = null;
|
|
@@ -669,7 +669,7 @@ var oo = { exports: {} };
|
|
|
669
669
|
(function(n, r) {
|
|
670
670
|
e.exports = r();
|
|
671
671
|
})(hi, function() {
|
|
672
|
-
var n = 1e3, r = 6e4, o = 36e5, a = "millisecond", s = "second", i = "minute", l = "hour", u = "day", p = "week", c = "month", f = "quarter", g = "year", C = "date", d = "Invalid Date",
|
|
672
|
+
var n = 1e3, r = 6e4, o = 36e5, a = "millisecond", s = "second", i = "minute", l = "hour", u = "day", p = "week", c = "month", f = "quarter", g = "year", C = "date", d = "Invalid Date", b = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|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, w = { 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(N) {
|
|
673
673
|
var A = ["th", "st", "nd", "rd"], E = N % 100;
|
|
674
674
|
return "[" + N + (A[(E - 20) % 10] || A[E] || A[0]) + "]";
|
|
675
675
|
} }, m = function(N, A, E) {
|
|
@@ -690,7 +690,7 @@ var oo = { exports: {} };
|
|
|
690
690
|
}, u: function(N) {
|
|
691
691
|
return N === void 0;
|
|
692
692
|
} }, S = "en", y = {};
|
|
693
|
-
y[S] =
|
|
693
|
+
y[S] = w;
|
|
694
694
|
var O = "$isDayjsObject", _ = function(N) {
|
|
695
695
|
return N instanceof Y || !(!N || !N[O]);
|
|
696
696
|
}, T = function N(A, E, R) {
|
|
@@ -732,7 +732,7 @@ var oo = { exports: {} };
|
|
|
732
732
|
if (I instanceof Date)
|
|
733
733
|
return new Date(I);
|
|
734
734
|
if (typeof I == "string" && !/Z$/i.test(I)) {
|
|
735
|
-
var G = I.match(
|
|
735
|
+
var G = I.match(b);
|
|
736
736
|
if (G) {
|
|
737
737
|
var Z = G[2] - 1 || 0, oe = (G[7] || "0").substring(0, 3);
|
|
738
738
|
return z ? new Date(Date.UTC(G[1], Z, G[3] || 1, G[4] || 0, G[5] || 0, G[6] || 0, oe)) : new Date(G[1], Z, G[3] || 1, G[4] || 0, G[5] || 0, G[6] || 0, oe);
|
|
@@ -762,8 +762,8 @@ var oo = { exports: {} };
|
|
|
762
762
|
return this.$d.getTime();
|
|
763
763
|
}, A.startOf = function(E, R) {
|
|
764
764
|
var I = this, z = !!P.u(R) || R, G = P.p(E), Z = function(Ce, se) {
|
|
765
|
-
var
|
|
766
|
-
return z ?
|
|
765
|
+
var be = P.w(I.$u ? Date.UTC(I.$y, se, Ce) : new Date(I.$y, se, Ce), I);
|
|
766
|
+
return z ? be : be.endOf(u);
|
|
767
767
|
}, oe = function(Ce, se) {
|
|
768
768
|
return P.w(I.toDate()[Ce].apply(I.toDate("s"), (z ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(se)), I);
|
|
769
769
|
}, te = this.$W, ae = this.$M, le = this.$D, Se = "set" + (this.$u ? "UTC" : "");
|
|
@@ -773,7 +773,7 @@ var oo = { exports: {} };
|
|
|
773
773
|
case c:
|
|
774
774
|
return z ? Z(1, ae) : Z(0, ae + 1);
|
|
775
775
|
case p:
|
|
776
|
-
var
|
|
776
|
+
var ye = this.$locale().weekStart || 0, Ae = (te < ye ? te + 7 : te) - ye;
|
|
777
777
|
return Z(z ? le - Ae : le + (6 - Ae), ae);
|
|
778
778
|
case u:
|
|
779
779
|
case C:
|
|
@@ -824,16 +824,16 @@ var oo = { exports: {} };
|
|
|
824
824
|
var R = this, I = this.$locale();
|
|
825
825
|
if (!this.isValid())
|
|
826
826
|
return I.invalidDate || d;
|
|
827
|
-
var z = E || "YYYY-MM-DDTHH:mm:ssZ", G = P.z(this), Z = this.$H, oe = this.$m, te = this.$M, ae = I.weekdays, le = I.months, Se = I.meridiem,
|
|
828
|
-
return se && (se[
|
|
827
|
+
var z = E || "YYYY-MM-DDTHH:mm:ssZ", G = P.z(this), Z = this.$H, oe = this.$m, te = this.$M, ae = I.weekdays, le = I.months, Se = I.meridiem, ye = function(se, be, je, We) {
|
|
828
|
+
return se && (se[be] || se(R, z)) || je[be].slice(0, We);
|
|
829
829
|
}, Ae = function(se) {
|
|
830
830
|
return P.s(Z % 12 || 12, se, "0");
|
|
831
|
-
}, Ce = Se || function(se,
|
|
831
|
+
}, Ce = Se || function(se, be, je) {
|
|
832
832
|
var We = se < 12 ? "AM" : "PM";
|
|
833
833
|
return je ? We.toLowerCase() : We;
|
|
834
834
|
};
|
|
835
|
-
return z.replace(h, function(se,
|
|
836
|
-
return
|
|
835
|
+
return z.replace(h, function(se, be) {
|
|
836
|
+
return be || function(je) {
|
|
837
837
|
switch (je) {
|
|
838
838
|
case "YY":
|
|
839
839
|
return String(R.$y).slice(-2);
|
|
@@ -844,9 +844,9 @@ var oo = { exports: {} };
|
|
|
844
844
|
case "MM":
|
|
845
845
|
return P.s(te + 1, 2, "0");
|
|
846
846
|
case "MMM":
|
|
847
|
-
return
|
|
847
|
+
return ye(I.monthsShort, te, le, 3);
|
|
848
848
|
case "MMMM":
|
|
849
|
-
return
|
|
849
|
+
return ye(le, te);
|
|
850
850
|
case "D":
|
|
851
851
|
return R.$D;
|
|
852
852
|
case "DD":
|
|
@@ -854,9 +854,9 @@ var oo = { exports: {} };
|
|
|
854
854
|
case "d":
|
|
855
855
|
return String(R.$W);
|
|
856
856
|
case "dd":
|
|
857
|
-
return
|
|
857
|
+
return ye(I.weekdaysMin, R.$W, ae, 2);
|
|
858
858
|
case "ddd":
|
|
859
|
-
return
|
|
859
|
+
return ye(I.weekdaysShort, R.$W, ae, 3);
|
|
860
860
|
case "dddd":
|
|
861
861
|
return ae[R.$W];
|
|
862
862
|
case "H":
|
|
@@ -1700,14 +1700,14 @@ function Gt(e, t, n, r, o, a) {
|
|
|
1700
1700
|
var g = a.get(e);
|
|
1701
1701
|
if (g)
|
|
1702
1702
|
return g;
|
|
1703
|
-
a.set(e, s), pc(e) ? e.forEach(function(
|
|
1704
|
-
s.add(Gt(
|
|
1705
|
-
}) : uc(e) && e.forEach(function(
|
|
1706
|
-
s.set(h, Gt(
|
|
1703
|
+
a.set(e, s), pc(e) ? e.forEach(function(b) {
|
|
1704
|
+
s.add(Gt(b, t, n, b, e, a));
|
|
1705
|
+
}) : uc(e) && e.forEach(function(b, h) {
|
|
1706
|
+
s.set(h, Gt(b, t, n, h, e, a));
|
|
1707
1707
|
});
|
|
1708
1708
|
var C = u ? l ? Eo : Dn : l ? Gn : yt, d = p ? void 0 : C(e);
|
|
1709
|
-
return gs(d || e, function(
|
|
1710
|
-
d && (h =
|
|
1709
|
+
return gs(d || e, function(b, h) {
|
|
1710
|
+
d && (h = b, b = e[h]), xn(s, h, Gt(b, t, n, h, e, a));
|
|
1711
1711
|
}), s;
|
|
1712
1712
|
}
|
|
1713
1713
|
var Kc = 1, xc = 4;
|
|
@@ -1749,17 +1749,17 @@ function Do(e, t, n, r, o, a) {
|
|
|
1749
1749
|
for (a.set(e, t), a.set(t, e); ++c < i; ) {
|
|
1750
1750
|
var C = e[c], d = t[c];
|
|
1751
1751
|
if (r)
|
|
1752
|
-
var
|
|
1753
|
-
if (
|
|
1754
|
-
if (
|
|
1752
|
+
var b = s ? r(d, C, c, t, e, a) : r(C, d, c, e, t, a);
|
|
1753
|
+
if (b !== void 0) {
|
|
1754
|
+
if (b)
|
|
1755
1755
|
continue;
|
|
1756
1756
|
f = !1;
|
|
1757
1757
|
break;
|
|
1758
1758
|
}
|
|
1759
1759
|
if (g) {
|
|
1760
|
-
if (!Yc(t, function(h,
|
|
1761
|
-
if (!No(g,
|
|
1762
|
-
return g.push(
|
|
1760
|
+
if (!Yc(t, function(h, w) {
|
|
1761
|
+
if (!No(g, w) && (C === h || o(C, h, n, r, a)))
|
|
1762
|
+
return g.push(w);
|
|
1763
1763
|
})) {
|
|
1764
1764
|
f = !1;
|
|
1765
1765
|
break;
|
|
@@ -1834,18 +1834,18 @@ function pf(e, t, n, r, o, a) {
|
|
|
1834
1834
|
return g == t && C == e;
|
|
1835
1835
|
var d = !0;
|
|
1836
1836
|
a.set(e, t), a.set(t, e);
|
|
1837
|
-
for (var
|
|
1837
|
+
for (var b = s; ++c < l; ) {
|
|
1838
1838
|
f = i[c];
|
|
1839
|
-
var h = e[f],
|
|
1839
|
+
var h = e[f], w = t[f];
|
|
1840
1840
|
if (r)
|
|
1841
|
-
var m = s ? r(
|
|
1842
|
-
if (!(m === void 0 ? h ===
|
|
1841
|
+
var m = s ? r(w, h, f, t, e, a) : r(h, w, f, e, t, a);
|
|
1842
|
+
if (!(m === void 0 ? h === w || o(h, w, n, r, a) : m)) {
|
|
1843
1843
|
d = !1;
|
|
1844
1844
|
break;
|
|
1845
1845
|
}
|
|
1846
|
-
|
|
1846
|
+
b || (b = f == "constructor");
|
|
1847
1847
|
}
|
|
1848
|
-
if (d && !
|
|
1848
|
+
if (d && !b) {
|
|
1849
1849
|
var v = e.constructor, S = t.constructor;
|
|
1850
1850
|
v != S && "constructor" in e && "constructor" in t && !(typeof v == "function" && v instanceof v && typeof S == "function" && S instanceof S) && (d = !1);
|
|
1851
1851
|
}
|
|
@@ -1866,8 +1866,8 @@ function hf(e, t, n, r, o, a) {
|
|
|
1866
1866
|
if (!(n & gf)) {
|
|
1867
1867
|
var g = p && Dr.call(e, "__wrapped__"), C = c && Dr.call(t, "__wrapped__");
|
|
1868
1868
|
if (g || C) {
|
|
1869
|
-
var d = g ? e.value() : e,
|
|
1870
|
-
return a || (a = new Re()), o(d,
|
|
1869
|
+
var d = g ? e.value() : e, b = C ? t.value() : t;
|
|
1870
|
+
return a || (a = new Re()), o(d, b, n, r, a);
|
|
1871
1871
|
}
|
|
1872
1872
|
}
|
|
1873
1873
|
return f ? (a || (a = new Re()), pf(e, t, n, r, o, a)) : !1;
|
|
@@ -2028,27 +2028,27 @@ function Rr(e, t, n) {
|
|
|
2028
2028
|
var O = y - l, _ = y - u, T = t - O;
|
|
2029
2029
|
return c ? Uf(T, a - _) : T;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2031
|
+
function b(y) {
|
|
2032
2032
|
var O = y - l, _ = y - u;
|
|
2033
2033
|
return l === void 0 || O >= t || O < 0 || c && _ >= a;
|
|
2034
2034
|
}
|
|
2035
2035
|
function h() {
|
|
2036
2036
|
var y = Cn();
|
|
2037
|
-
if (
|
|
2038
|
-
return
|
|
2037
|
+
if (b(y))
|
|
2038
|
+
return w(y);
|
|
2039
2039
|
i = setTimeout(h, d(y));
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2041
|
+
function w(y) {
|
|
2042
2042
|
return i = void 0, f && r ? g(y) : (r = o = void 0, s);
|
|
2043
2043
|
}
|
|
2044
2044
|
function m() {
|
|
2045
2045
|
i !== void 0 && clearTimeout(i), u = 0, r = l = o = i = void 0;
|
|
2046
2046
|
}
|
|
2047
2047
|
function v() {
|
|
2048
|
-
return i === void 0 ? s :
|
|
2048
|
+
return i === void 0 ? s : w(Cn());
|
|
2049
2049
|
}
|
|
2050
2050
|
function S() {
|
|
2051
|
-
var y = Cn(), O =
|
|
2051
|
+
var y = Cn(), O = b(y);
|
|
2052
2052
|
if (r = arguments, o = this, l = y, O) {
|
|
2053
2053
|
if (i === void 0)
|
|
2054
2054
|
return C(l);
|
|
@@ -2293,16 +2293,16 @@ const vn = jn(() => {
|
|
|
2293
2293
|
if (i.status === "fulfilled") {
|
|
2294
2294
|
const { value: u } = i, { labelKey: p, valueKey: c, dataKey: f, groupKey: g } = r[o[l]];
|
|
2295
2295
|
if (u.success) {
|
|
2296
|
-
const C = pn(u, f || "data"), d = (
|
|
2297
|
-
Object.prototype.toString.call(
|
|
2296
|
+
const C = pn(u, f || "data"), d = (b) => {
|
|
2297
|
+
Object.prototype.toString.call(b) === "[object Array]" ? e[o[l]] = [
|
|
2298
2298
|
..._e(e[o[l]] || []),
|
|
2299
|
-
...
|
|
2299
|
+
...b.map((h) => ({
|
|
2300
2300
|
...g ? { group: h[g] } : {},
|
|
2301
2301
|
label: h[p],
|
|
2302
2302
|
value: h[c]
|
|
2303
2303
|
}))
|
|
2304
|
-
] : Object.prototype.toString.call(
|
|
2305
|
-
d(
|
|
2304
|
+
] : Object.prototype.toString.call(b) === "[object Object]" && Object.keys(b).forEach((h) => {
|
|
2305
|
+
d(b[h]);
|
|
2306
2306
|
});
|
|
2307
2307
|
};
|
|
2308
2308
|
d(C);
|
|
@@ -2355,7 +2355,7 @@ const vn = jn(() => {
|
|
|
2355
2355
|
), g = D([]), C = xe(
|
|
2356
2356
|
r.value.filterUrl || `/duckbill-data-query-server/table/column/${r.value.filterKey}`,
|
|
2357
2357
|
r.value.filterMethod || "post"
|
|
2358
|
-
), d =
|
|
2358
|
+
), d = ve("transformFuzzy", {})[r.value.fieldName], b = (m, v) => {
|
|
2359
2359
|
var y;
|
|
2360
2360
|
const S = r.value.filterKey || "label";
|
|
2361
2361
|
return v[S] || console.warn(`not found key 【${S}】 in option`), ((y = v[S]) == null ? void 0 : y.indexOf(m.toString())) > -1;
|
|
@@ -2385,7 +2385,7 @@ const vn = jn(() => {
|
|
|
2385
2385
|
default:
|
|
2386
2386
|
return null;
|
|
2387
2387
|
}
|
|
2388
|
-
}),
|
|
2388
|
+
}), w = H(() => {
|
|
2389
2389
|
switch (r.value.type) {
|
|
2390
2390
|
case "Select":
|
|
2391
2391
|
return f.value;
|
|
@@ -2404,14 +2404,14 @@ const vn = jn(() => {
|
|
|
2404
2404
|
(m.keyCode === wd || m.key === bd) && t("pressEnter");
|
|
2405
2405
|
},
|
|
2406
2406
|
// for fuzzy query select
|
|
2407
|
-
filterOption: [$n, Kt].includes(r.value.type) ? !1 :
|
|
2407
|
+
filterOption: [$n, Kt].includes(r.value.type) ? !1 : b,
|
|
2408
2408
|
...lt(
|
|
2409
2409
|
{ notFoundContent: Kt === r.value.type ? null : !0 },
|
|
2410
2410
|
nd
|
|
2411
2411
|
),
|
|
2412
2412
|
onSearch: h.value,
|
|
2413
2413
|
// for selection components
|
|
2414
|
-
options:
|
|
2414
|
+
options: w.value,
|
|
2415
2415
|
// all other props
|
|
2416
2416
|
...u
|
|
2417
2417
|
}) : Ke("span", "Invalid Type");
|
|
@@ -2469,13 +2469,13 @@ const vn = jn(() => {
|
|
|
2469
2469
|
},
|
|
2470
2470
|
emits: ["search", "changeExpand", "update:current", "update:sorts", "resetSearch"],
|
|
2471
2471
|
setup(e, { emit: t, expose: n }) {
|
|
2472
|
-
const { config: a, immediateQuery: s } = Ue(e), i =
|
|
2472
|
+
const { config: a, immediateQuery: s } = Ue(e), i = ve("pageName", ""), l = H(
|
|
2473
2473
|
() => a.value.length > 6 * 3
|
|
2474
2474
|
), u = D(!l.value), { formState: p, dispatchFormState: c } = Rt(), { resetFields: f, validate: g, validateInfos: C } = $d(p[i]);
|
|
2475
2475
|
ge(
|
|
2476
2476
|
() => e.defaultQuery,
|
|
2477
|
-
(
|
|
2478
|
-
c(
|
|
2477
|
+
(w) => {
|
|
2478
|
+
c(w, i), t("search");
|
|
2479
2479
|
},
|
|
2480
2480
|
{
|
|
2481
2481
|
deep: !0,
|
|
@@ -2483,10 +2483,10 @@ const vn = jn(() => {
|
|
|
2483
2483
|
}
|
|
2484
2484
|
);
|
|
2485
2485
|
const d = () => {
|
|
2486
|
-
g().then(() => e.current === 1 ? t("search") : t("update:current", 1)).catch((
|
|
2487
|
-
console.log(
|
|
2486
|
+
g().then(() => e.current === 1 ? t("search") : t("update:current", 1)).catch((w) => {
|
|
2487
|
+
console.log(w);
|
|
2488
2488
|
});
|
|
2489
|
-
},
|
|
2489
|
+
}, b = (w) => w.label.slice(0, 10);
|
|
2490
2490
|
ge(u, () => t("changeExpand"));
|
|
2491
2491
|
const h = H(() => u.value || !l.value ? (6 - a.value.length % 6) * 4 : 24);
|
|
2492
2492
|
return n({ resetFields: f }), {
|
|
@@ -2499,7 +2499,7 @@ const vn = jn(() => {
|
|
|
2499
2499
|
AVAILIABLE_EXPAND_LINE: 3,
|
|
2500
2500
|
CONDITION_COUNT_PER_LINE: 6,
|
|
2501
2501
|
onSubmit: d,
|
|
2502
|
-
getItemLabel:
|
|
2502
|
+
getItemLabel: b
|
|
2503
2503
|
};
|
|
2504
2504
|
}
|
|
2505
2505
|
});
|
|
@@ -2513,7 +2513,7 @@ function _d(e, t, n, r, o, a) {
|
|
|
2513
2513
|
default: M(() => [
|
|
2514
2514
|
x(g, { gutter: 24 }, {
|
|
2515
2515
|
default: M(() => [
|
|
2516
|
-
(L(!0), J(ce, null, Ie(e.config, (d,
|
|
2516
|
+
(L(!0), J(ce, null, Ie(e.config, (d, b) => {
|
|
2517
2517
|
var h;
|
|
2518
2518
|
return Fn((L(), V(l, {
|
|
2519
2519
|
key: d.fieldName,
|
|
@@ -2521,11 +2521,11 @@ function _d(e, t, n, r, o, a) {
|
|
|
2521
2521
|
class: "conditions-item-col"
|
|
2522
2522
|
}, {
|
|
2523
2523
|
default: M(() => {
|
|
2524
|
-
var
|
|
2524
|
+
var w, m;
|
|
2525
2525
|
return [
|
|
2526
2526
|
x(i, ft(e.validateInfos[d.fieldName], {
|
|
2527
2527
|
colon: !1,
|
|
2528
|
-
"label-col": (
|
|
2528
|
+
"label-col": (w = d.otherProps) == null ? void 0 : w.labelCol,
|
|
2529
2529
|
"wrapper-col": (m = d.otherProps) == null ? void 0 : m.wrapperCol,
|
|
2530
2530
|
label: e.getItemLabel(d),
|
|
2531
2531
|
class: {
|
|
@@ -2547,7 +2547,7 @@ function _d(e, t, n, r, o, a) {
|
|
|
2547
2547
|
}),
|
|
2548
2548
|
_: 2
|
|
2549
2549
|
}, 1032, ["span"])), [
|
|
2550
|
-
[Wr, e.expand || !e.showAvailiableTrigger ||
|
|
2550
|
+
[Wr, e.expand || !e.showAvailiableTrigger || b < e.CONDITION_COUNT_PER_LINE]
|
|
2551
2551
|
]);
|
|
2552
2552
|
}), 128)),
|
|
2553
2553
|
x(l, { span: e.serachSpan }, {
|
|
@@ -2679,7 +2679,7 @@ const Od = /* @__PURE__ */ ke(Td, [["render", _d]]), Mt = jn(() => {
|
|
|
2679
2679
|
emits: ["buttonClick", "update:current", "update:pageSize", "customizeSetting", "refresh"],
|
|
2680
2680
|
setup(e, { emit: t }) {
|
|
2681
2681
|
var v, S, y, O;
|
|
2682
|
-
const { current: n, pageSize: r, exportConfig: o, importConfig: a } = Ue(e), s = D(!1), i = D(!1), l =
|
|
2682
|
+
const { current: n, pageSize: r, exportConfig: o, importConfig: a } = Ue(e), s = D(!1), i = D(!1), l = ve("pageName", ""), { selectedRows: u } = Mt(), p = (_, T) => {
|
|
2683
2683
|
if (_.needSelectRows) {
|
|
2684
2684
|
if (!u[l].length) {
|
|
2685
2685
|
he.warn("请选择数据");
|
|
@@ -2700,12 +2700,12 @@ const Od = /* @__PURE__ */ ke(Td, [["render", _d]]), Mt = jn(() => {
|
|
|
2700
2700
|
const T = Math.ceil(e.total / _);
|
|
2701
2701
|
c.value > T && (c.value = T), t("update:pageSize", _);
|
|
2702
2702
|
}
|
|
2703
|
-
}), g =
|
|
2703
|
+
}), g = ve("paramsGuard", (_) => _), C = (v = o.value) != null && v.url ? xe((S = o.value) == null ? void 0 : S.url, "post", {
|
|
2704
2704
|
responseType: "blob",
|
|
2705
2705
|
...o.value.requestOptions
|
|
2706
2706
|
}) : null, d = (O = (y = a.value) == null ? void 0 : y.children) != null && O.length ? a.value.children.map((_) => xe(_.url, "post", {
|
|
2707
2707
|
..._.requestOptions
|
|
2708
|
-
})) : [],
|
|
2708
|
+
})) : [], b = async () => {
|
|
2709
2709
|
var $;
|
|
2710
2710
|
const { formState: _ } = Rt(), T = o.value ? Qn({
|
|
2711
2711
|
conditions: _e(_[l]),
|
|
@@ -2736,7 +2736,7 @@ const Od = /* @__PURE__ */ ke(Td, [["render", _d]]), Mt = jn(() => {
|
|
|
2736
2736
|
window.open(_);
|
|
2737
2737
|
break;
|
|
2738
2738
|
}
|
|
2739
|
-
},
|
|
2739
|
+
}, w = async ({ accept: _, feedback: T = !0, needRefresh: $ = !0 }, P) => {
|
|
2740
2740
|
const Y = /^\.[a-zA-Z]+$/, q = _ == null ? void 0 : _.reduce(
|
|
2741
2741
|
(E, R) => {
|
|
2742
2742
|
if (!Y.test(R))
|
|
@@ -2785,25 +2785,25 @@ const Od = /* @__PURE__ */ ke(Td, [["render", _d]]), Mt = jn(() => {
|
|
|
2785
2785
|
return;
|
|
2786
2786
|
}
|
|
2787
2787
|
if (["IMPORT"].includes($)) {
|
|
2788
|
-
|
|
2788
|
+
w(_, T);
|
|
2789
2789
|
return;
|
|
2790
2790
|
}
|
|
2791
2791
|
he.warn(`请确认ImportConfigItem.type是否正确: ${$}`);
|
|
2792
2792
|
},
|
|
2793
|
-
handleApiConfigExport:
|
|
2793
|
+
handleApiConfigExport: b,
|
|
2794
2794
|
handleButtonClick: p
|
|
2795
2795
|
};
|
|
2796
2796
|
}
|
|
2797
2797
|
});
|
|
2798
2798
|
const Nd = { class: "page-renderer-buttons" }, Dd = { class: "page-renderer-buttons-left" }, Rd = { class: "page-renderer-setting-trigger" }, Md = { href: "javascript:;" };
|
|
2799
2799
|
function Ld(e, t, n, r, o, a) {
|
|
2800
|
-
const s = j("aicon"), i = j("MenuItem"), l = j("Menu"), u = j("Space"), p = j("Button"), c = j("Dropdown"), f = j("DownOutlined"), g = j("Pagination"), C = j("Select"), d = j("SettingOutlined"),
|
|
2800
|
+
const s = j("aicon"), i = j("MenuItem"), l = j("Menu"), u = j("Space"), p = j("Button"), c = j("Dropdown"), f = j("DownOutlined"), g = j("Pagination"), C = j("Select"), d = j("SettingOutlined"), b = oa("permission");
|
|
2801
2801
|
return L(), J("div", Nd, [
|
|
2802
2802
|
Oe("div", Dd, [
|
|
2803
2803
|
x(u, null, {
|
|
2804
2804
|
default: M(() => [
|
|
2805
|
-
(L(!0), J(ce, null, Ie(e.config, (h,
|
|
2806
|
-
key: `${h.type}${
|
|
2805
|
+
(L(!0), J(ce, null, Ie(e.config, (h, w) => Fn((L(), V(en(h.type), ft(h.otherProps, {
|
|
2806
|
+
key: `${h.type}${w}`,
|
|
2807
2807
|
onClick: (m) => e.handleButtonClick(h, m)
|
|
2808
2808
|
}), aa({
|
|
2809
2809
|
overlay: M(() => [
|
|
@@ -2837,7 +2837,7 @@ function Ld(e, t, n, r, o, a) {
|
|
|
2837
2837
|
key: "0"
|
|
2838
2838
|
} : void 0
|
|
2839
2839
|
]), 1040, ["onClick"])), [
|
|
2840
|
-
[
|
|
2840
|
+
[b, h.permissions]
|
|
2841
2841
|
])), 128))
|
|
2842
2842
|
]),
|
|
2843
2843
|
_: 1
|
|
@@ -2846,7 +2846,7 @@ function Ld(e, t, n, r, o, a) {
|
|
|
2846
2846
|
Oe("div", null, [
|
|
2847
2847
|
x(u, null, {
|
|
2848
2848
|
default: M(() => {
|
|
2849
|
-
var h,
|
|
2849
|
+
var h, w;
|
|
2850
2850
|
return [
|
|
2851
2851
|
e.hasApiConfig ? (L(), J(ce, { key: 0 }, [
|
|
2852
2852
|
(h = e.importConfig) != null && h.children ? (L(), V(c, {
|
|
@@ -2897,7 +2897,7 @@ function Ld(e, t, n, r, o, a) {
|
|
|
2897
2897
|
_: 1
|
|
2898
2898
|
}, 8, ["loading"])) : pe("", !0)
|
|
2899
2899
|
], 64)) : (L(), J(ce, { key: 1 }, [
|
|
2900
|
-
(
|
|
2900
|
+
(w = e.importConfig) != null && w.sublist ? (L(), V(c, {
|
|
2901
2901
|
key: 0,
|
|
2902
2902
|
trigger: ["click"],
|
|
2903
2903
|
disabled: e.importLoading
|
|
@@ -3027,32 +3027,32 @@ const Fd = /* @__PURE__ */ ke(Id, [["render", Ld]]), kd = we({
|
|
|
3027
3027
|
}
|
|
3028
3028
|
},
|
|
3029
3029
|
setup(e, { expose: t }) {
|
|
3030
|
-
const { config: n } = Ue(e), { template: r } = n.value, o = D(!1), { formState: a } = Rt(), s =
|
|
3031
|
-
const
|
|
3032
|
-
let
|
|
3033
|
-
for (; (
|
|
3034
|
-
|
|
3035
|
-
return
|
|
3036
|
-
})()),
|
|
3037
|
-
const
|
|
3030
|
+
const { config: n } = Ue(e), { template: r } = n.value, o = D(!1), { formState: a } = Rt(), s = ve("pageName", ""), i = ve("paramsGuard", (g) => g), u = Ne((() => {
|
|
3031
|
+
const g = /\{\{(.+?)\}\}/g;
|
|
3032
|
+
let C = {}, d = [];
|
|
3033
|
+
for (; (d = g.exec(r)) !== null; )
|
|
3034
|
+
C[d[1].trim()] = " - ";
|
|
3035
|
+
return C;
|
|
3036
|
+
})()), p = xe(n.value.url), c = async () => {
|
|
3037
|
+
const g = Qn({
|
|
3038
3038
|
conditions: a[s],
|
|
3039
3039
|
apiConfig: n.value
|
|
3040
3040
|
});
|
|
3041
|
-
o.value = !0,
|
|
3042
|
-
Object.keys(
|
|
3043
|
-
const
|
|
3044
|
-
|
|
3041
|
+
i(g, s), o.value = !0, p(g).then((C) => {
|
|
3042
|
+
Object.keys(u).forEach((d) => {
|
|
3043
|
+
const b = pn(C, `${n.value.dataKey}.${d}`);
|
|
3044
|
+
u[d] = Et(b) ? " - " : b;
|
|
3045
3045
|
});
|
|
3046
3046
|
}).finally(() => o.value = !1);
|
|
3047
|
-
},
|
|
3048
|
-
data: () => _e(
|
|
3047
|
+
}, f = {
|
|
3048
|
+
data: () => _e(u),
|
|
3049
3049
|
template: r
|
|
3050
3050
|
};
|
|
3051
|
-
return t({ fetchSummary:
|
|
3051
|
+
return t({ fetchSummary: c }), () => Ke(
|
|
3052
3052
|
tr,
|
|
3053
3053
|
{ class: "page-renderer-summary-bar" },
|
|
3054
3054
|
{
|
|
3055
|
-
message: () => o.value ? Ke(ba, { size: "small", style: { height: "20px" } }) : Ke(
|
|
3055
|
+
message: () => o.value ? Ke(ba, { size: "small", style: { height: "20px" } }) : Ke(f)
|
|
3056
3056
|
}
|
|
3057
3057
|
);
|
|
3058
3058
|
}
|
|
@@ -3201,13 +3201,13 @@ ee.div = function(e) {
|
|
|
3201
3201
|
throw Error(Bo);
|
|
3202
3202
|
if (!r[0])
|
|
3203
3203
|
return e.s = a, e.c = [e.e = 0], e;
|
|
3204
|
-
var i, l, u, p, c, f = o.slice(), g = i = o.length, C = r.length, d = r.slice(0, i),
|
|
3205
|
-
for (h.s = a, a = v < 0 ? 0 : v, f.unshift(0);
|
|
3204
|
+
var i, l, u, p, c, f = o.slice(), g = i = o.length, C = r.length, d = r.slice(0, i), b = d.length, h = e, w = h.c = [], m = 0, v = s + (h.e = t.e - e.e) + 1;
|
|
3205
|
+
for (h.s = a, a = v < 0 ? 0 : v, f.unshift(0); b++ < i; )
|
|
3206
3206
|
d.push(0);
|
|
3207
3207
|
do {
|
|
3208
3208
|
for (u = 0; u < 10; u++) {
|
|
3209
|
-
if (i != (
|
|
3210
|
-
p = i >
|
|
3209
|
+
if (i != (b = d.length))
|
|
3210
|
+
p = i > b ? 1 : -1;
|
|
3211
3211
|
else
|
|
3212
3212
|
for (c = -1, p = 0; ++c < i; )
|
|
3213
3213
|
if (o[c] != d[c]) {
|
|
@@ -3215,22 +3215,22 @@ ee.div = function(e) {
|
|
|
3215
3215
|
break;
|
|
3216
3216
|
}
|
|
3217
3217
|
if (p < 0) {
|
|
3218
|
-
for (l =
|
|
3219
|
-
if (d[--
|
|
3220
|
-
for (c =
|
|
3218
|
+
for (l = b == i ? o : f; b; ) {
|
|
3219
|
+
if (d[--b] < l[b]) {
|
|
3220
|
+
for (c = b; c && !d[--c]; )
|
|
3221
3221
|
d[c] = 9;
|
|
3222
|
-
--d[c], d[
|
|
3222
|
+
--d[c], d[b] += 10;
|
|
3223
3223
|
}
|
|
3224
|
-
d[
|
|
3224
|
+
d[b] -= l[b];
|
|
3225
3225
|
}
|
|
3226
3226
|
for (; !d[0]; )
|
|
3227
3227
|
d.shift();
|
|
3228
3228
|
} else
|
|
3229
3229
|
break;
|
|
3230
3230
|
}
|
|
3231
|
-
|
|
3231
|
+
w[m++] = p ? u : ++u, d[0] && p ? d[b] = r[g] || 0 : d = [r[g]];
|
|
3232
3232
|
} while ((g++ < C || d[0] !== Me) && a--);
|
|
3233
|
-
return !
|
|
3233
|
+
return !w[0] && m != 1 && (w.shift(), h.e--, v--), m > v && it(h, v, n.RM, d[0] !== Me), h;
|
|
3234
3234
|
};
|
|
3235
3235
|
ee.eq = function(e) {
|
|
3236
3236
|
return this.cmp(e) === 0;
|
|
@@ -3405,7 +3405,7 @@ ee.valueOf = function() {
|
|
|
3405
3405
|
var Wd = Ko();
|
|
3406
3406
|
const qd = {
|
|
3407
3407
|
sum: (e) => {
|
|
3408
|
-
const { selectedRows: t } = Mt(), n =
|
|
3408
|
+
const { selectedRows: t } = Mt(), n = ve("pageName", "");
|
|
3409
3409
|
return t[n].reduce((r, o) => r = r.plus(Number(o[e.dataIndex])), new Wd(0));
|
|
3410
3410
|
}
|
|
3411
3411
|
}, Vd = (e, t) => qd[e](t), Xd = {
|
|
@@ -3465,7 +3465,7 @@ const qd = {
|
|
|
3465
3465
|
});
|
|
3466
3466
|
};
|
|
3467
3467
|
mt(r);
|
|
3468
|
-
const { enumerations: o } = vn(), a = D(0), s = "filter_", i = "_index", { config: l, conditions: u, hasApiConfig: p, rowKey: c, data: f, total: g } = Ue(e), C = D(null), d =
|
|
3468
|
+
const { enumerations: o } = vn(), a = D(0), s = "filter_", i = "_index", { config: l, conditions: u, hasApiConfig: p, rowKey: c, data: f, total: g } = Ue(e), C = D(null), d = ve("pageName", ""), b = D(), h = D([]), w = D([]), m = D([]), v = D({}), S = D([]), { selectedRows: y, selectedRowKeys: O, selectedErrorRowKeys: _ } = Mt();
|
|
3469
3469
|
_[d] || (_[d] = []);
|
|
3470
3470
|
const T = H(() => O[d].length > 0), $ = H(() => {
|
|
3471
3471
|
if (p.value)
|
|
@@ -3484,7 +3484,7 @@ const qd = {
|
|
|
3484
3484
|
}), K), []);
|
|
3485
3485
|
return Fr(B, "columnKey");
|
|
3486
3486
|
}
|
|
3487
|
-
}), P = D(!0), Y =
|
|
3487
|
+
}), P = D(!0), Y = ve("tableCellSlots", {}), q = () => {
|
|
3488
3488
|
P.value = !P.value;
|
|
3489
3489
|
}, N = ({
|
|
3490
3490
|
text: B,
|
|
@@ -3509,7 +3509,7 @@ const qd = {
|
|
|
3509
3509
|
return K && (K.style.minHeight = `${B}px`), B;
|
|
3510
3510
|
});
|
|
3511
3511
|
dt(() => {
|
|
3512
|
-
const B =
|
|
3512
|
+
const B = b.value || {};
|
|
3513
3513
|
S.value = [
|
|
3514
3514
|
{
|
|
3515
3515
|
align: "center",
|
|
@@ -3543,7 +3543,7 @@ const qd = {
|
|
|
3543
3543
|
filterable: Pe,
|
|
3544
3544
|
sortable: $e
|
|
3545
3545
|
} = K;
|
|
3546
|
-
Be === "Link" && h.value.push(W), Be === "HTML" &&
|
|
3546
|
+
Be === "Link" && h.value.push(W), Be === "HTML" && w.value.push(W), Xe === "slot" && m.value.push(W), Xe === "map" && F && (v.value[W] = K);
|
|
3547
3547
|
const st = W !== "action" && Array.isArray(X), Qe = st ? (
|
|
3548
3548
|
// 目前有表头分组配置时,不渲染表头筛选组件
|
|
3549
3549
|
X.map((qe) => ({
|
|
@@ -3614,11 +3614,11 @@ const qd = {
|
|
|
3614
3614
|
$.value[B].type === "Input" ? ae() : Ve(te);
|
|
3615
3615
|
}, Se = (B, K, k) => {
|
|
3616
3616
|
var Q;
|
|
3617
|
-
|
|
3617
|
+
b.value = k, Array.isArray(k) || ((Q = k.column) == null ? void 0 : Q.sorter) === !0 && k.columnKey && k.order && n("update:sorts", {
|
|
3618
3618
|
[k.columnKey]: Xd[k.order]
|
|
3619
3619
|
});
|
|
3620
|
-
},
|
|
3621
|
-
|
|
3620
|
+
}, ye = () => {
|
|
3621
|
+
b.value = null;
|
|
3622
3622
|
}, Ae = H(() => Object.keys(v.value)), Ce = H(() => {
|
|
3623
3623
|
const B = S.value.filter((k) => k.action !== void 0 || k.key === "action").reduce((k, Q) => {
|
|
3624
3624
|
var W;
|
|
@@ -3654,14 +3654,14 @@ const qd = {
|
|
|
3654
3654
|
})) : [];
|
|
3655
3655
|
}), se = (B, K) => {
|
|
3656
3656
|
K.width = B, K.children && K.children.length > 0 && (K.children[K.children.length - 1].width = B);
|
|
3657
|
-
},
|
|
3657
|
+
}, be = (B, K) => {
|
|
3658
3658
|
var k;
|
|
3659
3659
|
return ((k = l.value.find((Q) => Q.columnKey === K.dataIndex)) == null ? void 0 : k[B]) || "";
|
|
3660
3660
|
}, je = (B, K, k, Q) => {
|
|
3661
|
-
const W =
|
|
3661
|
+
const W = be("action", K) || Q;
|
|
3662
3662
|
B[xt][`${W}Loading`] = !0, n(
|
|
3663
3663
|
"linkClick",
|
|
3664
|
-
|
|
3664
|
+
be("action", K) || Q,
|
|
3665
3665
|
k,
|
|
3666
3666
|
[{ ...B }],
|
|
3667
3667
|
() => B[xt][`${W}Loading`] = !1
|
|
@@ -3674,7 +3674,7 @@ const qd = {
|
|
|
3674
3674
|
};
|
|
3675
3675
|
return ia((B) => {
|
|
3676
3676
|
}), t({
|
|
3677
|
-
clearSort:
|
|
3677
|
+
clearSort: ye,
|
|
3678
3678
|
toggleTableHeight: r
|
|
3679
3679
|
}), {
|
|
3680
3680
|
h: Ke,
|
|
@@ -3689,7 +3689,7 @@ const qd = {
|
|
|
3689
3689
|
LOADING_SIGN: xt,
|
|
3690
3690
|
tableWrapper: C,
|
|
3691
3691
|
linkCellKeys: h,
|
|
3692
|
-
htmlCellKeys:
|
|
3692
|
+
htmlCellKeys: w,
|
|
3693
3693
|
slotCellKeys: m,
|
|
3694
3694
|
tableCellSlots: Y,
|
|
3695
3695
|
selectedRows: y,
|
|
@@ -3715,7 +3715,7 @@ const qd = {
|
|
|
3715
3715
|
transformSummary: Vd,
|
|
3716
3716
|
transformCellText: N,
|
|
3717
3717
|
handleResizeColumn: se,
|
|
3718
|
-
findConfigByColumnKey:
|
|
3718
|
+
findConfigByColumnKey: be
|
|
3719
3719
|
};
|
|
3720
3720
|
}
|
|
3721
3721
|
});
|
|
@@ -3730,9 +3730,9 @@ const Zd = {
|
|
|
3730
3730
|
class: "table-summary-cell-text"
|
|
3731
3731
|
}, lp = /* @__PURE__ */ Oe("span", { class: "table-summary-cell-text" }, "总计", -1), up = { class: "table-summary-cell-text" };
|
|
3732
3732
|
function cp(e, t, n, r, o, a) {
|
|
3733
|
-
const s = j("a-button"), i = j("a-tooltip"), l = j("ConditionBuilder"), u = j("a-input"), p = j("LoadingOutlined"), c = j("Space"), f = j("TableCell"), g = j("a-table-summary-cell"), C = j("a-table-summary-row"), d = j("a-table-summary"),
|
|
3733
|
+
const s = j("a-button"), i = j("a-tooltip"), l = j("ConditionBuilder"), u = j("a-input"), p = j("LoadingOutlined"), c = j("Space"), f = j("TableCell"), g = j("a-table-summary-cell"), C = j("a-table-summary-row"), d = j("a-table-summary"), b = j("Table");
|
|
3734
3734
|
return L(), J("div", Zd, [
|
|
3735
|
-
x(
|
|
3735
|
+
x(b, {
|
|
3736
3736
|
bordered: "",
|
|
3737
3737
|
size: "small",
|
|
3738
3738
|
"data-source": e.dataSource,
|
|
@@ -3742,7 +3742,7 @@ function cp(e, t, n, r, o, a) {
|
|
|
3742
3742
|
scroll: { y: e.computedY },
|
|
3743
3743
|
"row-key": e.rowKey,
|
|
3744
3744
|
"custom-row": e.customRow,
|
|
3745
|
-
"row-class-name": (h,
|
|
3745
|
+
"row-class-name": (h, w) => `${w % 2 === 1 ? "table-striped-row" : ""} ${e.selectedErrorRowKeys[e.pageName].includes(h[e.rowKey]) ? "table-error-row" : ""}`,
|
|
3746
3746
|
"row-selection": {
|
|
3747
3747
|
fixed: !0,
|
|
3748
3748
|
columnWidth: 40,
|
|
@@ -3756,7 +3756,7 @@ function cp(e, t, n, r, o, a) {
|
|
|
3756
3756
|
headerCell: M(({ column: h }) => [
|
|
3757
3757
|
h.key === e.DATA_SOURCE_INDEX_KEY ? (L(), J("div", {
|
|
3758
3758
|
key: 0,
|
|
3759
|
-
onClick: t[0] || (t[0] = (...
|
|
3759
|
+
onClick: t[0] || (t[0] = (...w) => e.headerFilterSwitch && e.headerFilterSwitch(...w))
|
|
3760
3760
|
}, [
|
|
3761
3761
|
x(i, {
|
|
3762
3762
|
title: e.isHeaderFilterable ? "关闭筛选表头" : "开启筛选表头"
|
|
@@ -3783,7 +3783,7 @@ function cp(e, t, n, r, o, a) {
|
|
|
3783
3783
|
e.fieldNameConditionsByKey[h.dataIndex] ? (L(), V(l, {
|
|
3784
3784
|
key: 0,
|
|
3785
3785
|
value: e.formState[e.pageName][h.dataIndex],
|
|
3786
|
-
"onUpdate:value": (
|
|
3786
|
+
"onUpdate:value": (w) => e.formState[e.pageName][h.dataIndex] = w,
|
|
3787
3787
|
materials: e.fieldNameConditionsByKey[h.dataIndex],
|
|
3788
3788
|
onChange: () => {
|
|
3789
3789
|
e.onConditionChange(h.dataIndex);
|
|
@@ -3795,28 +3795,28 @@ function cp(e, t, n, r, o, a) {
|
|
|
3795
3795
|
disabled: "",
|
|
3796
3796
|
size: "small",
|
|
3797
3797
|
value: e.formState[e.pageName][h.dataIndex],
|
|
3798
|
-
"onUpdate:value": (
|
|
3798
|
+
"onUpdate:value": (w) => e.formState[e.pageName][h.dataIndex] = w,
|
|
3799
3799
|
onChange: e.onHeaderFilterChange,
|
|
3800
3800
|
onPressEnter: e.onSubmit
|
|
3801
3801
|
}, null, 8, ["value", "onUpdate:value", "onChange", "onPressEnter"]))
|
|
3802
3802
|
])) : pe("", !0)
|
|
3803
3803
|
]))
|
|
3804
3804
|
]),
|
|
3805
|
-
bodyCell: M(({ text: h, record:
|
|
3805
|
+
bodyCell: M(({ text: h, record: w, index: m, column: v }) => [
|
|
3806
3806
|
v.dataIndex === "action" ? (L(), V(c, { key: 0 }, {
|
|
3807
3807
|
default: M(() => [
|
|
3808
3808
|
(L(!0), J(ce, null, Ie(v.childActions, (S) => (L(), J(ce, {
|
|
3809
3809
|
key: S.action
|
|
3810
3810
|
}, [
|
|
3811
|
-
S.show === void 0 || e.actionVisible(S.show,
|
|
3812
|
-
|
|
3811
|
+
S.show === void 0 || e.actionVisible(S.show, w) ? (L(), J(ce, { key: 0 }, [
|
|
3812
|
+
w[e.LOADING_SIGN][`${S.action}Loading`] ? (L(), V(p, {
|
|
3813
3813
|
key: 1,
|
|
3814
3814
|
style: { color: "#1890ff" }
|
|
3815
3815
|
})) : (L(), J("a", {
|
|
3816
3816
|
key: 0,
|
|
3817
3817
|
onClick: qr(
|
|
3818
3818
|
(y) => {
|
|
3819
|
-
e.handleLinkClick(
|
|
3819
|
+
e.handleLinkClick(w, v, y, S.action);
|
|
3820
3820
|
},
|
|
3821
3821
|
["stop"]
|
|
3822
3822
|
)
|
|
@@ -3829,15 +3829,15 @@ function cp(e, t, n, r, o, a) {
|
|
|
3829
3829
|
e.slotCellKeys.includes(v.dataIndex) ? (L(), J(ce, { key: 1 }, [
|
|
3830
3830
|
e.tableCellSlots[v.dataIndex].component ? (L(), V(en(e.tableCellSlots[v.dataIndex].component), An(ft({ key: 0 }, {
|
|
3831
3831
|
text: h,
|
|
3832
|
-
row:
|
|
3832
|
+
row: w,
|
|
3833
3833
|
index: m,
|
|
3834
3834
|
column: v,
|
|
3835
3835
|
...e.tableCellSlots[v.dataIndex].props
|
|
3836
3836
|
})), null, 16)) : pe("", !0)
|
|
3837
3837
|
], 64)) : [...e.linkCellKeys, ...e.keywords, ...e.htmlCellKeys].includes(v.dataIndex) ? (L(), V(f, An(ft({ key: 2 }, {
|
|
3838
|
-
row:
|
|
3838
|
+
row: w,
|
|
3839
3839
|
column: v,
|
|
3840
|
-
loading:
|
|
3840
|
+
loading: w[e.LOADING_SIGN][`${v.action}Loading`],
|
|
3841
3841
|
keywords: e.keywords,
|
|
3842
3842
|
linkCellKeys: e.linkCellKeys,
|
|
3843
3843
|
handleLinkClick: e.handleLinkClick
|
|
@@ -3854,13 +3854,13 @@ function cp(e, t, n, r, o, a) {
|
|
|
3854
3854
|
]),
|
|
3855
3855
|
_: 1
|
|
3856
3856
|
}),
|
|
3857
|
-
(L(!0), J(ce, null, Ie(e.columns, (h,
|
|
3857
|
+
(L(!0), J(ce, null, Ie(e.columns, (h, w) => (L(), V(g, {
|
|
3858
3858
|
key: h.key,
|
|
3859
|
-
index:
|
|
3859
|
+
index: w + 1,
|
|
3860
3860
|
style: { "text-align": "center" }
|
|
3861
3861
|
}, {
|
|
3862
3862
|
default: M(() => [
|
|
3863
|
-
|
|
3863
|
+
w === 0 ? (L(), J("span", ip, ue(e.selectedRowKeys[e.pageName].length), 1)) : (L(), J("span", sp, ue(h.summary ? e.transformSummary(h.summary, h) : null), 1))
|
|
3864
3864
|
]),
|
|
3865
3865
|
_: 2
|
|
3866
3866
|
}, 1032, ["index"]))), 128))
|
|
@@ -3877,9 +3877,9 @@ function cp(e, t, n, r, o, a) {
|
|
|
3877
3877
|
]),
|
|
3878
3878
|
_: 1
|
|
3879
3879
|
}),
|
|
3880
|
-
(L(!0), J(ce, null, Ie(e.totalList, (h,
|
|
3881
|
-
key:
|
|
3882
|
-
index:
|
|
3880
|
+
(L(!0), J(ce, null, Ie(e.totalList, (h, w) => (L(), V(g, {
|
|
3881
|
+
key: w,
|
|
3882
|
+
index: w + 1,
|
|
3883
3883
|
style: { "text-align": "center" }
|
|
3884
3884
|
}, {
|
|
3885
3885
|
default: M(() => [
|
|
@@ -3935,8 +3935,8 @@ const pp = {
|
|
|
3935
3935
|
emits: ["change", "update:visible"],
|
|
3936
3936
|
setup(e, { emit: t }) {
|
|
3937
3937
|
const n = hn(), r = Jn(), o = no(e, "visible", t), a = D(!1), s = D([]), i = Ne({ dataSource: [] });
|
|
3938
|
-
ge(o, (
|
|
3939
|
-
|
|
3938
|
+
ge(o, (w) => {
|
|
3939
|
+
w ? i.dataSource = Vn(_e(e.columns)).map((m) => (m.show !== !1 && s.value.push(m.columnKey), {
|
|
3940
3940
|
...m,
|
|
3941
3941
|
disabled: m.columnKey === "action" || m.fixed !== void 0 || m.disabled,
|
|
3942
3942
|
key: m.columnKey,
|
|
@@ -3949,7 +3949,7 @@ const pp = {
|
|
|
3949
3949
|
dataIndex: "title"
|
|
3950
3950
|
}
|
|
3951
3951
|
], u = async () => {
|
|
3952
|
-
const
|
|
3952
|
+
const w = _e(s.value), { dataSource: m } = i, { category: v, tab: S } = n.meta, y = w.map((O) => {
|
|
3953
3953
|
const _ = {}, T = m.find(($) => $.columnKey === O);
|
|
3954
3954
|
if (_.entityId = T.entityId, _.columnKey = T.columnKey, e.type === "SORT_SETTING") {
|
|
3955
3955
|
const [$, P] = T.columnKey.split("@");
|
|
@@ -3969,13 +3969,13 @@ const pp = {
|
|
|
3969
3969
|
a.value = !1;
|
|
3970
3970
|
}
|
|
3971
3971
|
}, p = () => o.value = !1, c = ({
|
|
3972
|
-
disabled:
|
|
3972
|
+
disabled: w,
|
|
3973
3973
|
selectedKeys: m,
|
|
3974
3974
|
onItemSelectAll: v,
|
|
3975
3975
|
onItemSelect: S
|
|
3976
3976
|
}) => ({
|
|
3977
3977
|
getCheckboxProps: (y) => ({
|
|
3978
|
-
disabled:
|
|
3978
|
+
disabled: w || y.disabled
|
|
3979
3979
|
}),
|
|
3980
3980
|
onSelectAll(y, O) {
|
|
3981
3981
|
const _ = O.filter((T) => !T.disabled).map(({ key: T }) => T);
|
|
@@ -3987,7 +3987,7 @@ const pp = {
|
|
|
3987
3987
|
selectedRowKeys: m
|
|
3988
3988
|
});
|
|
3989
3989
|
let f = "", g = "";
|
|
3990
|
-
const C = (
|
|
3990
|
+
const C = (w, m, v, S) => ({
|
|
3991
3991
|
style: {
|
|
3992
3992
|
cursor: "move"
|
|
3993
3993
|
},
|
|
@@ -3995,11 +3995,11 @@ const pp = {
|
|
|
3995
3995
|
onMouseenter: (y) => {
|
|
3996
3996
|
var _;
|
|
3997
3997
|
const O = y || window.event;
|
|
3998
|
-
|
|
3998
|
+
w.key === "action" || (_ = e.columns.find((T) => T.columnKey === w.key)) != null && _.fixed || (O.target.draggable = !0);
|
|
3999
3999
|
},
|
|
4000
4000
|
// 开始拖拽
|
|
4001
4001
|
onDragstart: (y) => {
|
|
4002
|
-
(y || window.event).stopPropagation(), f =
|
|
4002
|
+
(y || window.event).stopPropagation(), f = w.key, document.querySelectorAll(".drag-modal-wrapper .source-table .ant-table-row")[m].classList.add("source");
|
|
4003
4003
|
},
|
|
4004
4004
|
// 拖动元素经过的元素
|
|
4005
4005
|
onDragover: (y) => {
|
|
@@ -4012,7 +4012,7 @@ const pp = {
|
|
|
4012
4012
|
if (i.dataSource[m].disabled)
|
|
4013
4013
|
return;
|
|
4014
4014
|
const T = document.querySelectorAll(".ant-table-row.target");
|
|
4015
|
-
T.length && T[0].classList.remove("target"), _[m + (i.dataSource.length - s.value.length)].classList.add("target"), g =
|
|
4015
|
+
T.length && T[0].classList.remove("target"), _[m + (i.dataSource.length - s.value.length)].classList.add("target"), g = w.key;
|
|
4016
4016
|
},
|
|
4017
4017
|
// 鼠标松开
|
|
4018
4018
|
onDrop: (y) => {
|
|
@@ -4028,31 +4028,31 @@ const pp = {
|
|
|
4028
4028
|
$.splice(q, 0, Y), Object.assign(i, { dataSource: $ });
|
|
4029
4029
|
},
|
|
4030
4030
|
onClick: () => {
|
|
4031
|
-
const { key: y, disabled: O } =
|
|
4031
|
+
const { key: y, disabled: O } = w;
|
|
4032
4032
|
O || S(y, !v.includes(y));
|
|
4033
4033
|
},
|
|
4034
4034
|
ondblclick: () => {
|
|
4035
|
-
const { key: y, disabled: O } =
|
|
4035
|
+
const { key: y, disabled: O } = w;
|
|
4036
4036
|
if (O)
|
|
4037
4037
|
return;
|
|
4038
4038
|
const _ = s.value.indexOf(y);
|
|
4039
4039
|
_ > -1 ? s.value.splice(_, 1) : s.value.push(y);
|
|
4040
4040
|
}
|
|
4041
|
-
}), d = (
|
|
4041
|
+
}), d = (w, m, v, S) => ({
|
|
4042
4042
|
onClick: () => {
|
|
4043
|
-
const { key: y, disabled: O } =
|
|
4043
|
+
const { key: y, disabled: O } = w;
|
|
4044
4044
|
O || S(y, !v.includes(y));
|
|
4045
4045
|
},
|
|
4046
4046
|
ondblclick: () => {
|
|
4047
|
-
const { key: y, disabled: O } =
|
|
4047
|
+
const { key: y, disabled: O } = w;
|
|
4048
4048
|
if (O)
|
|
4049
4049
|
return;
|
|
4050
4050
|
const _ = s.value.indexOf(y);
|
|
4051
4051
|
_ > -1 ? s.value.splice(_, 1) : s.value.push(y);
|
|
4052
4052
|
}
|
|
4053
|
-
}),
|
|
4054
|
-
return ge(o, (
|
|
4055
|
-
|
|
4053
|
+
}), b = () => document.querySelector(".page-renderer-wrapper");
|
|
4054
|
+
return ge(o, (w) => {
|
|
4055
|
+
w && Ve(() => {
|
|
4056
4056
|
const m = document.querySelector(".ant-modal-root"), v = m == null ? void 0 : m.querySelector(".ant-modal-header"), S = m == null ? void 0 : m.querySelector(".ant-modal");
|
|
4057
4057
|
v.style.cursor = "move";
|
|
4058
4058
|
const y = S.currentStyle || window.getComputedStyle(S, null);
|
|
@@ -4075,10 +4075,10 @@ const pp = {
|
|
|
4075
4075
|
state: i,
|
|
4076
4076
|
toKeys: s,
|
|
4077
4077
|
tableColumn: l,
|
|
4078
|
-
handleChange: (
|
|
4079
|
-
const S =
|
|
4078
|
+
handleChange: (w, m, v) => {
|
|
4079
|
+
const S = w.map((y) => y.split("@")[0]);
|
|
4080
4080
|
if (S.length !== md(S).length) {
|
|
4081
|
-
s.value =
|
|
4081
|
+
s.value = w.filter((y) => !v.includes(y)), he.warn("同一字段不能同时设置升序和降序!");
|
|
4082
4082
|
return;
|
|
4083
4083
|
}
|
|
4084
4084
|
},
|
|
@@ -4086,7 +4086,7 @@ const pp = {
|
|
|
4086
4086
|
customRowRight: C,
|
|
4087
4087
|
customRowLeft: d,
|
|
4088
4088
|
handleClose: p,
|
|
4089
|
-
getContainer:
|
|
4089
|
+
getContainer: b,
|
|
4090
4090
|
getRowSelection: c
|
|
4091
4091
|
};
|
|
4092
4092
|
}
|
|
@@ -4157,11 +4157,11 @@ function mp(e, t, n, r, o, a) {
|
|
|
4157
4157
|
}),
|
|
4158
4158
|
"show-expand-column": !1,
|
|
4159
4159
|
columns: e.tableColumn,
|
|
4160
|
-
"data-source": c === "left" ? e.state.dataSource.filter((
|
|
4160
|
+
"data-source": c === "left" ? e.state.dataSource.filter((b) => !e.toKeys.includes(b.key)) : e.state.dataSource.filter((b) => e.toKeys.includes(b.key)),
|
|
4161
4161
|
pagination: !1,
|
|
4162
4162
|
scroll: { y: 300 },
|
|
4163
4163
|
style: la({ pointerEvents: g ? "none" : null }),
|
|
4164
|
-
"custom-row": (
|
|
4164
|
+
"custom-row": (b, h) => c === "left" ? e.customRowLeft(b, h, f, d) : e.customRowRight(b, h, f, d)
|
|
4165
4165
|
}, null, 8, ["class", "row-selection", "columns", "data-source", "style", "custom-row"])
|
|
4166
4166
|
]),
|
|
4167
4167
|
_: 1
|
|
@@ -4207,7 +4207,7 @@ function Go(e, t, n) {
|
|
|
4207
4207
|
function d($, P) {
|
|
4208
4208
|
return g ? (window.cancelAnimationFrame(i), window.requestAnimationFrame($)) : setTimeout($, P);
|
|
4209
4209
|
}
|
|
4210
|
-
function
|
|
4210
|
+
function b($) {
|
|
4211
4211
|
if (g)
|
|
4212
4212
|
return window.cancelAnimationFrame($);
|
|
4213
4213
|
clearTimeout($);
|
|
@@ -4215,7 +4215,7 @@ function Go(e, t, n) {
|
|
|
4215
4215
|
function h($) {
|
|
4216
4216
|
return u = $, i = d(v, t), p ? C($) : s;
|
|
4217
4217
|
}
|
|
4218
|
-
function
|
|
4218
|
+
function w($) {
|
|
4219
4219
|
const P = $ - l, Y = $ - u, q = t - P;
|
|
4220
4220
|
return c ? Math.min(q, a - Y) : q;
|
|
4221
4221
|
}
|
|
@@ -4227,13 +4227,13 @@ function Go(e, t, n) {
|
|
|
4227
4227
|
const $ = Date.now();
|
|
4228
4228
|
if (m($))
|
|
4229
4229
|
return S($);
|
|
4230
|
-
i = d(v,
|
|
4230
|
+
i = d(v, w($));
|
|
4231
4231
|
}
|
|
4232
4232
|
function S($) {
|
|
4233
4233
|
return i = void 0, f && r ? C($) : (r = o = void 0, s);
|
|
4234
4234
|
}
|
|
4235
4235
|
function y() {
|
|
4236
|
-
i !== void 0 &&
|
|
4236
|
+
i !== void 0 && b(i), u = 0, r = l = o = i = void 0;
|
|
4237
4237
|
}
|
|
4238
4238
|
function O() {
|
|
4239
4239
|
return i === void 0 ? s : S(Date.now());
|
|
@@ -4325,8 +4325,8 @@ var Op = He((e, t) => {
|
|
|
4325
4325
|
}, p = H(() => {
|
|
4326
4326
|
if (i.value)
|
|
4327
4327
|
return i.value;
|
|
4328
|
-
const g = 1e3, C = 1, d = 9,
|
|
4329
|
-
return g *
|
|
4328
|
+
const g = 1e3, C = 1, d = 9, b = Math.floor(Math.random() * 2 ** Math.min(a.value, d) + C);
|
|
4329
|
+
return g * b;
|
|
4330
4330
|
}), c = () => {
|
|
4331
4331
|
let g;
|
|
4332
4332
|
const C = s.value === -1, d = a.value < s.value;
|
|
@@ -4425,13 +4425,13 @@ const Np = (e, t) => (n) => {
|
|
|
4425
4425
|
onError: i,
|
|
4426
4426
|
onBefore: l,
|
|
4427
4427
|
onAfter: u
|
|
4428
|
-
} = t, p = D((r = n == null ? void 0 : n.loading) !== null && r !== void 0 ? r : !1), c = St((o = n == null ? void 0 : n.data) !== null && o !== void 0 ? o : a), f = St(n == null ? void 0 : n.error), g = D(n == null ? void 0 : n.params), C = D([]), d = St("pending"),
|
|
4428
|
+
} = t, p = D((r = n == null ? void 0 : n.loading) !== null && r !== void 0 ? r : !1), c = St((o = n == null ? void 0 : n.data) !== null && o !== void 0 ? o : a), f = St(n == null ? void 0 : n.error), g = D(n == null ? void 0 : n.params), C = D([]), d = St("pending"), b = {}, h = Np({
|
|
4429
4429
|
status: d,
|
|
4430
4430
|
loading: p,
|
|
4431
4431
|
data: c,
|
|
4432
4432
|
error: f,
|
|
4433
4433
|
params: g
|
|
4434
|
-
}, []),
|
|
4434
|
+
}, []), w = function(v) {
|
|
4435
4435
|
for (var S = arguments.length, y = new Array(S > 1 ? S - 1 : 0), O = 1; O < S; O++)
|
|
4436
4436
|
y[O - 1] = arguments[O];
|
|
4437
4437
|
if (v === "onQuery") {
|
|
@@ -4447,7 +4447,7 @@ const Np = (e, t) => (n) => {
|
|
|
4447
4447
|
return Object.assign({}, ..._);
|
|
4448
4448
|
}
|
|
4449
4449
|
}, m = D(0);
|
|
4450
|
-
return
|
|
4450
|
+
return b.runAsync = async function() {
|
|
4451
4451
|
for (var v = arguments.length, S = new Array(v), y = 0; y < v; y++)
|
|
4452
4452
|
S[y] = arguments[y];
|
|
4453
4453
|
h({
|
|
@@ -4458,7 +4458,7 @@ const Np = (e, t) => (n) => {
|
|
|
4458
4458
|
const O = m.value, {
|
|
4459
4459
|
isBreak: _,
|
|
4460
4460
|
breakResult: T = Tn()
|
|
4461
|
-
} =
|
|
4461
|
+
} = w("onBefore", S);
|
|
4462
4462
|
if (_)
|
|
4463
4463
|
return h({
|
|
4464
4464
|
status: "settled"
|
|
@@ -4468,7 +4468,7 @@ const Np = (e, t) => (n) => {
|
|
|
4468
4468
|
const $ = () => new Promise((q) => q(e(...g.value)));
|
|
4469
4469
|
let {
|
|
4470
4470
|
servicePromise: P
|
|
4471
|
-
} =
|
|
4471
|
+
} = w("onQuery", $);
|
|
4472
4472
|
P || (P = $());
|
|
4473
4473
|
const Y = await P;
|
|
4474
4474
|
return O !== m.value ? Tn() : (h({
|
|
@@ -4476,7 +4476,7 @@ const Np = (e, t) => (n) => {
|
|
|
4476
4476
|
loading: !1,
|
|
4477
4477
|
error: void 0,
|
|
4478
4478
|
status: "settled"
|
|
4479
|
-
}),
|
|
4479
|
+
}), w("onSuccess", Y, S), s == null || s(Y, S), O === m.value && w("onAfter", S, Y, void 0), u == null || u(S), Y);
|
|
4480
4480
|
} catch ($) {
|
|
4481
4481
|
if (O !== m.value)
|
|
4482
4482
|
return Tn();
|
|
@@ -4484,23 +4484,23 @@ const Np = (e, t) => (n) => {
|
|
|
4484
4484
|
loading: !1,
|
|
4485
4485
|
error: $,
|
|
4486
4486
|
status: "settled"
|
|
4487
|
-
}),
|
|
4487
|
+
}), w("onError", $, S), i == null || i($, S), O === m.value && w("onAfter", S, void 0, $), u == null || u(S), $;
|
|
4488
4488
|
}
|
|
4489
|
-
},
|
|
4490
|
-
|
|
4489
|
+
}, b.run = function() {
|
|
4490
|
+
b.runAsync(...arguments).catch((v) => {
|
|
4491
4491
|
i || console.error(v);
|
|
4492
4492
|
});
|
|
4493
|
-
},
|
|
4493
|
+
}, b.cancel = () => {
|
|
4494
4494
|
m.value += 1, h({
|
|
4495
4495
|
loading: !1
|
|
4496
|
-
}),
|
|
4497
|
-
},
|
|
4498
|
-
|
|
4499
|
-
},
|
|
4496
|
+
}), w("onCancel");
|
|
4497
|
+
}, b.refresh = () => {
|
|
4498
|
+
b.run(...g.value || []);
|
|
4499
|
+
}, b.refreshAsync = () => b.runAsync(...g.value || []), b.mutate = (v) => {
|
|
4500
4500
|
const S = Zn(v) ? v(c.value) : v, y = Cp(S);
|
|
4501
4501
|
h({
|
|
4502
4502
|
data: y
|
|
4503
|
-
}),
|
|
4503
|
+
}), w("onMutate", y);
|
|
4504
4504
|
}, {
|
|
4505
4505
|
status: d,
|
|
4506
4506
|
loading: p,
|
|
@@ -4508,12 +4508,12 @@ const Np = (e, t) => (n) => {
|
|
|
4508
4508
|
error: f,
|
|
4509
4509
|
params: g,
|
|
4510
4510
|
plugins: C,
|
|
4511
|
-
context:
|
|
4511
|
+
context: b
|
|
4512
4512
|
};
|
|
4513
4513
|
};
|
|
4514
4514
|
function Mp(e) {
|
|
4515
4515
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 ? arguments[2] : void 0;
|
|
4516
|
-
const r =
|
|
4516
|
+
const r = ve(xo, {}), o = {
|
|
4517
4517
|
...zo(),
|
|
4518
4518
|
...r,
|
|
4519
4519
|
...t
|
|
@@ -4563,19 +4563,19 @@ var Bp = He((e, t) => {
|
|
|
4563
4563
|
const i = Zn(n) ? n : () => n, l = D(() => {
|
|
4564
4564
|
});
|
|
4565
4565
|
let u;
|
|
4566
|
-
const p = (h) => a ? a(h) : $p(h), c = (h,
|
|
4567
|
-
s ? s(h, m) : Tp(h,
|
|
4568
|
-
}, f = (h) => o === -1 || h + o > (/* @__PURE__ */ new Date()).getTime(), g = (h,
|
|
4569
|
-
const
|
|
4570
|
-
return jp(
|
|
4566
|
+
const p = (h) => a ? a(h) : $p(h), c = (h, w, m) => {
|
|
4567
|
+
s ? s(h, m) : Tp(h, w, m), kp(h, m.data);
|
|
4568
|
+
}, f = (h) => o === -1 || h + o > (/* @__PURE__ */ new Date()).getTime(), g = (h, w) => Object.prototype.hasOwnProperty.call(h, w), C = (h) => {
|
|
4569
|
+
const w = i(h);
|
|
4570
|
+
return jp(w, (m) => {
|
|
4571
4571
|
e.data.value = m;
|
|
4572
4572
|
});
|
|
4573
|
-
}, d = i(),
|
|
4574
|
-
return
|
|
4573
|
+
}, d = i(), b = p(d);
|
|
4574
|
+
return b && g(b, "data") && (e.data.value = b.data, e.params.value = b.params), d && (l.value = C()), tn(() => {
|
|
4575
4575
|
l.value();
|
|
4576
4576
|
}), {
|
|
4577
4577
|
onBefore(h) {
|
|
4578
|
-
const
|
|
4578
|
+
const w = i(h), m = p(w);
|
|
4579
4579
|
if (!m || !g(m, "data"))
|
|
4580
4580
|
return {};
|
|
4581
4581
|
if (f(m.time))
|
|
@@ -4586,21 +4586,21 @@ var Bp = He((e, t) => {
|
|
|
4586
4586
|
e.data.value = m.data;
|
|
4587
4587
|
},
|
|
4588
4588
|
onQuery(h) {
|
|
4589
|
-
const
|
|
4589
|
+
const w = e.params.value, m = i(w);
|
|
4590
4590
|
let v = Fp(m);
|
|
4591
4591
|
return v && v !== u ? () => v : (v = h(), u = v, Lp(m, v), () => v);
|
|
4592
4592
|
},
|
|
4593
|
-
onSuccess(h,
|
|
4594
|
-
const m = i(
|
|
4593
|
+
onSuccess(h, w) {
|
|
4594
|
+
const m = i(w);
|
|
4595
4595
|
m && (l.value(), c(m, r, {
|
|
4596
4596
|
data: h,
|
|
4597
|
-
params:
|
|
4597
|
+
params: w,
|
|
4598
4598
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
4599
|
-
}), l.value = C(
|
|
4599
|
+
}), l.value = C(w));
|
|
4600
4600
|
},
|
|
4601
4601
|
onMutate(h) {
|
|
4602
|
-
const
|
|
4603
|
-
|
|
4602
|
+
const w = i(e.params.value);
|
|
4603
|
+
w && (l.value(), c(w, r, {
|
|
4604
4604
|
data: h,
|
|
4605
4605
|
params: e.params.value,
|
|
4606
4606
|
time: (/* @__PURE__ */ new Date()).getTime()
|
|
@@ -4708,15 +4708,15 @@ var zp = He((e, t) => {
|
|
|
4708
4708
|
), g = (d) => {
|
|
4709
4709
|
if (e.error.value && u.value !== 0)
|
|
4710
4710
|
return;
|
|
4711
|
-
let
|
|
4711
|
+
let b;
|
|
4712
4712
|
if (!Ft(l.value) && l.value >= 0)
|
|
4713
4713
|
if (f())
|
|
4714
|
-
|
|
4714
|
+
b = setTimeout(d, l.value);
|
|
4715
4715
|
else {
|
|
4716
4716
|
i.value = !0;
|
|
4717
4717
|
return;
|
|
4718
4718
|
}
|
|
4719
|
-
return () =>
|
|
4719
|
+
return () => b && clearTimeout(b);
|
|
4720
4720
|
}, C = () => {
|
|
4721
4721
|
i.value && f() && (e.context.refresh(), i.value = !1);
|
|
4722
4722
|
};
|
|
@@ -4775,7 +4775,7 @@ function xr(e) {
|
|
|
4775
4775
|
pageSizeKey: "pageSize",
|
|
4776
4776
|
totalKey: "total",
|
|
4777
4777
|
totalPageKey: "totalPage"
|
|
4778
|
-
}, r =
|
|
4778
|
+
}, r = ve(xo, {}), {
|
|
4779
4779
|
pagination: o,
|
|
4780
4780
|
...a
|
|
4781
4781
|
} = t, {
|
|
@@ -4799,7 +4799,7 @@ function xr(e) {
|
|
|
4799
4799
|
...O
|
|
4800
4800
|
}, ...T];
|
|
4801
4801
|
g(...P);
|
|
4802
|
-
},
|
|
4802
|
+
}, b = (O) => {
|
|
4803
4803
|
d({
|
|
4804
4804
|
[s]: O
|
|
4805
4805
|
});
|
|
@@ -4807,7 +4807,7 @@ function xr(e) {
|
|
|
4807
4807
|
d({
|
|
4808
4808
|
[i]: O
|
|
4809
4809
|
});
|
|
4810
|
-
},
|
|
4810
|
+
}, w = (O, _) => {
|
|
4811
4811
|
d({
|
|
4812
4812
|
[s]: O,
|
|
4813
4813
|
[i]: _
|
|
@@ -4821,7 +4821,7 @@ function xr(e) {
|
|
|
4821
4821
|
);
|
|
4822
4822
|
},
|
|
4823
4823
|
set: (O) => {
|
|
4824
|
-
|
|
4824
|
+
b(O);
|
|
4825
4825
|
}
|
|
4826
4826
|
}), S = H({
|
|
4827
4827
|
get: () => {
|
|
@@ -4843,9 +4843,9 @@ function xr(e) {
|
|
|
4843
4843
|
total: m,
|
|
4844
4844
|
totalPage: y,
|
|
4845
4845
|
run: g,
|
|
4846
|
-
changeCurrent:
|
|
4846
|
+
changeCurrent: b,
|
|
4847
4847
|
changePageSize: h,
|
|
4848
|
-
changePagination:
|
|
4848
|
+
changePagination: w,
|
|
4849
4849
|
...C
|
|
4850
4850
|
};
|
|
4851
4851
|
}
|
|
@@ -4869,18 +4869,18 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
4869
4869
|
}
|
|
4870
4870
|
},
|
|
4871
4871
|
setup(e, { expose: t }) {
|
|
4872
|
-
const n = hn(), { page: r } = Ue(e), { apiConfig: o, buttons: a, data: s, page_size: i } = r.value, l = D(r.value.total), u = D(o == null ? void 0 : o.summary), p = D(s), c = D(s), f = D({}), g = D(!1), C = D(!1), d = D([]),
|
|
4873
|
-
导入:
|
|
4872
|
+
const n = hn(), { page: r } = Ue(e), { apiConfig: o, buttons: a, data: s, page_size: i } = r.value, l = D(r.value.total), u = D(o == null ? void 0 : o.summary), p = D(s), c = D(s), f = D({}), g = D(!1), C = D(!1), d = D([]), b = D([]), h = D(), w = D(), m = D(), v = {
|
|
4873
|
+
导入: w,
|
|
4874
4874
|
导出: h
|
|
4875
4875
|
}, S = H(() => ({
|
|
4876
4876
|
COLUMN_SETTING: r.value.fieldShowConfigList,
|
|
4877
4877
|
FILTER_SETTING: r.value.fieldFilterConfigList,
|
|
4878
4878
|
SORT_SETTING: r.value.fieldSortConfigList
|
|
4879
|
-
})), y = D(), O =
|
|
4879
|
+
})), y = D(), O = ve(
|
|
4880
4880
|
"transformData",
|
|
4881
4881
|
// eslint-disable-next-line
|
|
4882
4882
|
(F, U) => F
|
|
4883
|
-
), _ =
|
|
4883
|
+
), _ = ve("refreshPage", () => {
|
|
4884
4884
|
}), T = () => {
|
|
4885
4885
|
c.value = Mr(p.value, (F) => Wf(te, (U, X) => {
|
|
4886
4886
|
var ne;
|
|
@@ -4950,7 +4950,7 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
4950
4950
|
})(), dt(() => {
|
|
4951
4951
|
a.forEach((F) => {
|
|
4952
4952
|
const U = v[F.children];
|
|
4953
|
-
U ? U.value = F : F.columnAction ?
|
|
4953
|
+
U ? U.value = F : F.columnAction ? b.value.push(F) : d.value.push(F);
|
|
4954
4954
|
});
|
|
4955
4955
|
});
|
|
4956
4956
|
const { initFormState: oe } = Rt(), te = oe(
|
|
@@ -4958,18 +4958,18 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
4958
4958
|
r.value.defaultQuery,
|
|
4959
4959
|
// TODO: 后端接口支持默认查询条件
|
|
4960
4960
|
r.value.name
|
|
4961
|
-
), ae = D(i), le = D(1), { selectedRows: Se, selectedRowKeys:
|
|
4962
|
-
Se[e.page.name] = [],
|
|
4961
|
+
), ae = D(i), le = D(1), { selectedRows: Se, selectedRowKeys: ye } = Mt(), Ae = () => {
|
|
4962
|
+
Se[e.page.name] = [], ye[e.page.name] = [];
|
|
4963
4963
|
};
|
|
4964
4964
|
c.value && Ae();
|
|
4965
|
-
const Ce =
|
|
4965
|
+
const Ce = ve("paramsGuard", (F) => F), se = (F) => !Et(F) && F !== "", be = () => {
|
|
4966
4966
|
if (o) {
|
|
4967
4967
|
const F = kr({
|
|
4968
4968
|
conditions: lt({ ..._e(te) }, se),
|
|
4969
4969
|
pager: { pageNo: le.value, pageSize: ae.value },
|
|
4970
4970
|
listApiConfig: o.list
|
|
4971
4971
|
});
|
|
4972
|
-
y.value.run(F), Se[e.page.name] = [],
|
|
4972
|
+
y.value.run(F), Se[e.page.name] = [], ye[e.page.name] = [];
|
|
4973
4973
|
} else {
|
|
4974
4974
|
const { category: F, tab: U } = n.meta;
|
|
4975
4975
|
y.value.run({
|
|
@@ -4986,11 +4986,11 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
4986
4986
|
}, je = async (F) => {
|
|
4987
4987
|
let U;
|
|
4988
4988
|
if (F === "SELECTED") {
|
|
4989
|
-
if (
|
|
4989
|
+
if (ye[e.page.name] && ye[e.page.name].length === 0) {
|
|
4990
4990
|
he.warn("至少选中一条数据!");
|
|
4991
4991
|
return;
|
|
4992
4992
|
}
|
|
4993
|
-
U =
|
|
4993
|
+
U = ye[e.page.name];
|
|
4994
4994
|
}
|
|
4995
4995
|
const { category: X, tab: ne } = n.meta, fe = await m.value({
|
|
4996
4996
|
category: X,
|
|
@@ -5017,7 +5017,7 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
5017
5017
|
}, K = () => {
|
|
5018
5018
|
var F;
|
|
5019
5019
|
return (F = q.value) == null ? void 0 : F.fetchSummary();
|
|
5020
|
-
}, k =
|
|
5020
|
+
}, k = ve("emitHandler", () => {
|
|
5021
5021
|
});
|
|
5022
5022
|
zt("pageName", e.page.name);
|
|
5023
5023
|
const Q = (F, U, X, ne) => {
|
|
@@ -5036,15 +5036,15 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
5036
5036
|
const ne = I.value.indexOf(U.columnKey), fe = I.value.indexOf(X.columnKey);
|
|
5037
5037
|
return ne - fe;
|
|
5038
5038
|
});
|
|
5039
|
-
localStorage.removeItem(zr),
|
|
5039
|
+
localStorage.removeItem(zr), b.value.length > 0 && F.unshift({
|
|
5040
5040
|
title: "操作",
|
|
5041
5041
|
align: "center",
|
|
5042
5042
|
columnKey: "action",
|
|
5043
|
-
children:
|
|
5043
|
+
children: b.value.map((U) => ({
|
|
5044
5044
|
text: U.children,
|
|
5045
5045
|
action: U.action
|
|
5046
5046
|
})),
|
|
5047
|
-
width:
|
|
5047
|
+
width: b.value.reduce((U, X) => U + Number(X.columnActionWidth || 50), 0)
|
|
5048
5048
|
}), z.value = F;
|
|
5049
5049
|
}), mt(async () => {
|
|
5050
5050
|
P(e.page.enumerations), await $(e.page.enumapi), C.value = !0, Ve().then(() => {
|
|
@@ -5103,7 +5103,7 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
5103
5103
|
}, []);
|
|
5104
5104
|
R.columns = ud(U, ["disabled"], ["asc"]), R.type = F, R.title = jo[F], R.visible = !0;
|
|
5105
5105
|
};
|
|
5106
|
-
return t({ run:
|
|
5106
|
+
return t({ run: be }), {
|
|
5107
5107
|
apiConfig: o,
|
|
5108
5108
|
tableData: c,
|
|
5109
5109
|
rowKey: G,
|
|
@@ -5111,7 +5111,7 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
5111
5111
|
loaded: C,
|
|
5112
5112
|
buttonsConfig: d,
|
|
5113
5113
|
exportConfig: h,
|
|
5114
|
-
importConfig:
|
|
5114
|
+
importConfig: w,
|
|
5115
5115
|
summary: u,
|
|
5116
5116
|
current: le,
|
|
5117
5117
|
pageSize: ae,
|
|
@@ -5123,7 +5123,7 @@ const zr = "COLUMN_SCHEME", Ur = {
|
|
|
5123
5123
|
sortedColumns: z,
|
|
5124
5124
|
columnSettingState: R,
|
|
5125
5125
|
columnSettingVisible: g,
|
|
5126
|
-
handleSearch:
|
|
5126
|
+
handleSearch: be,
|
|
5127
5127
|
handleExport: je,
|
|
5128
5128
|
resetSearch: We,
|
|
5129
5129
|
headerFilterHandle: T,
|
|
@@ -5535,7 +5535,7 @@ const lg = sg, ug = we({
|
|
|
5535
5535
|
}
|
|
5536
5536
|
},
|
|
5537
5537
|
setup(e, { expose: t }) {
|
|
5538
|
-
const n = hn(), r = D(null), o = D(null), a = D(""), s = D(null), i = D([]), l = D(), u = { title: "", component: null }, { selectedErrorRowKeys: p } = Mt(), c = St(u), f = D(e.options), g = D(!1), C =
|
|
5538
|
+
const n = hn(), r = D(null), o = D(null), a = D(""), s = D(null), i = D([]), l = D(), u = { title: "", component: null }, { selectedErrorRowKeys: p } = Mt(), c = St(u), f = D(e.options), g = D(!1), C = ve(
|
|
5539
5539
|
"actionGuard",
|
|
5540
5540
|
null
|
|
5541
5541
|
);
|
|
@@ -5553,14 +5553,14 @@ const lg = sg, ug = we({
|
|
|
5553
5553
|
), mt(() => {
|
|
5554
5554
|
h();
|
|
5555
5555
|
});
|
|
5556
|
-
const
|
|
5556
|
+
const b = xe(
|
|
5557
5557
|
`/duckbill-data-query-server/table/search/${n.meta.category}`
|
|
5558
5558
|
), h = async () => {
|
|
5559
5559
|
const { category: v, tab: S } = n.meta;
|
|
5560
5560
|
if (!e.options && v && S) {
|
|
5561
5561
|
g.value = !0;
|
|
5562
5562
|
try {
|
|
5563
|
-
const y = await
|
|
5563
|
+
const y = await b({
|
|
5564
5564
|
category: v,
|
|
5565
5565
|
tab: S,
|
|
5566
5566
|
pageNumber: 1,
|
|
@@ -5576,7 +5576,7 @@ const lg = sg, ug = we({
|
|
|
5576
5576
|
g.value = !1;
|
|
5577
5577
|
}
|
|
5578
5578
|
}
|
|
5579
|
-
},
|
|
5579
|
+
}, w = {
|
|
5580
5580
|
locale: lg,
|
|
5581
5581
|
transformCellText: ({
|
|
5582
5582
|
text: v,
|
|
@@ -5643,7 +5643,7 @@ const lg = sg, ug = we({
|
|
|
5643
5643
|
extraData: l,
|
|
5644
5644
|
activePageName: a,
|
|
5645
5645
|
currentComponent: c,
|
|
5646
|
-
getPopupContainer:
|
|
5646
|
+
getPopupContainer: w,
|
|
5647
5647
|
rendererOptions: f
|
|
5648
5648
|
};
|
|
5649
5649
|
}
|