vue-2024-ui 0.2.92 → 0.2.93
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/index.es.js +276 -274
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -183,7 +183,7 @@ function il(r) {
|
|
|
183
183
|
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
|
|
184
184
|
}
|
|
185
185
|
var dl = { exports: {} };
|
|
186
|
-
(function(r,
|
|
186
|
+
(function(r, s) {
|
|
187
187
|
(function(e, l) {
|
|
188
188
|
r.exports = l();
|
|
189
189
|
})(Bl, function() {
|
|
@@ -459,9 +459,9 @@ var dl = { exports: {} };
|
|
|
459
459
|
});
|
|
460
460
|
})(dl);
|
|
461
461
|
var Pl = dl.exports;
|
|
462
|
-
const It = /* @__PURE__ */ il(Pl), nt = (r,
|
|
462
|
+
const It = /* @__PURE__ */ il(Pl), nt = (r, s) => {
|
|
463
463
|
const e = r.__vccOpts || r;
|
|
464
|
-
for (const [l, n] of
|
|
464
|
+
for (const [l, n] of s)
|
|
465
465
|
e[l] = n;
|
|
466
466
|
return e;
|
|
467
467
|
}, Nl = { style: { width: "var(--up-width)", height: "var(--up-height)", position: "relative", "box-sizing": "border-box" } }, Wl = ["innerHTML"], Gl = ["innerHTML"], Xl = ["title"], Ql = ["innerHTML"], Zl = ["innerHTML"], Jl = ["innerHTML"], Kl = ["innerHTML"], ea = ["innerHTML"], ta = ["innerHTML"], la = ["innerHTML"], aa = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -473,21 +473,21 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
473
473
|
emits: ["update:modelValue"],
|
|
474
474
|
setup(r) {
|
|
475
475
|
var $, g, h, M, D, O, Y, le, de, ge, N, G, Ee, ke, ze, xe, He, Ne;
|
|
476
|
-
const
|
|
476
|
+
const s = r, e = re(s.item || {}), l = ot(r, "modelValue"), n = re(s.ctrlKey), i = re(s.ctrlType), t = re(s.model), d = re([]), S = re([]), f = re(!1), v = re(!1), c = re(0), o = re((g = ($ = t == null ? void 0 : t.value) == null ? void 0 : $.form) != null && g["default-placeholder"] ? (M = (h = t == null ? void 0 : t.value) == null ? void 0 : h[n == null ? void 0 : n.value]) == null ? void 0 : M.label : "");
|
|
477
477
|
!((D = i.value) != null && D.startsWith("text")) && !((O = i.value) != null && O.startsWith("link")) && !((Y = i.value) != null && Y.startsWith("tag")) && !((le = i.value) != null && le.startsWith("div")) && !((de = i.value) != null && de.startsWith("span")) && !((ge = i.value) != null && ge.startsWith("avatar")) && ((N = e.value) != null && N.style || (e.value.style = { width: ((Ee = (G = e.value) == null ? void 0 : G.style) == null ? void 0 : Ee.width) || "100%" }));
|
|
478
478
|
const m = re({ display: "flex", flex: 1 });
|
|
479
|
-
let A =
|
|
479
|
+
let A = s.t === "t" ? "center" : "flex-start";
|
|
480
480
|
((ke = e.value) == null ? void 0 : ke.align) == "right" ? A = "flex-end" : ((ze = e.value) == null ? void 0 : ze.align) == "left" ? A = "flex-start" : ((xe = e.value) == null ? void 0 : xe.align) == "center" && (A = "center");
|
|
481
481
|
const j = ((He = e.value) == null ? void 0 : He.style) || {};
|
|
482
482
|
m.value = { ...m.value, justifyContent: A, ...j };
|
|
483
483
|
const E = () => {
|
|
484
|
-
const z = Jt(), T = Object.keys(z), X = `${
|
|
484
|
+
const z = Jt(), T = Object.keys(z), X = `${s.t}-${n.value}-`;
|
|
485
485
|
return T.filter((je) => je.startsWith(X)).map((je) => je.replace(X, ""));
|
|
486
486
|
}, k = re({
|
|
487
487
|
multiple: !1,
|
|
488
488
|
"show-file-list": !1,
|
|
489
489
|
"file-list": [],
|
|
490
|
-
showDel:
|
|
490
|
+
showDel: s.t === "f"
|
|
491
491
|
});
|
|
492
492
|
Object.hasOwn(e.value, "showDel") && (k.value.showDel = e.value.showDel);
|
|
493
493
|
const Q = re(e.value.value);
|
|
@@ -532,7 +532,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
532
532
|
}), me = async (z = "options") => {
|
|
533
533
|
var T;
|
|
534
534
|
try {
|
|
535
|
-
const X = await ((T = e.value) == null ? void 0 : T.getDicts(
|
|
535
|
+
const X = await ((T = e.value) == null ? void 0 : T.getDicts(s.formInfo));
|
|
536
536
|
if (typeof X == "string")
|
|
537
537
|
S.value = [{ label: X, value: l.value }];
|
|
538
538
|
else {
|
|
@@ -548,7 +548,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
548
548
|
}
|
|
549
549
|
}, Te = () => {
|
|
550
550
|
var z, T;
|
|
551
|
-
e.value.noSearch !== !0 &&
|
|
551
|
+
e.value.noSearch !== !0 && s.t === "q" && ((T = (z = t.value) == null ? void 0 : z.table) == null || T.load());
|
|
552
552
|
}, Oe = (z) => {
|
|
553
553
|
z.preventDefault(), z.stopPropagation(), l.value = "";
|
|
554
554
|
}, he = (z) => {
|
|
@@ -601,11 +601,11 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
601
601
|
};
|
|
602
602
|
if (["radio", "radio-button", "checkbox-group", "checkbox-group-button", "select", "cascader"].includes(i.value) && z(i.value), i.value === Me.TREESELECT && await (async () => {
|
|
603
603
|
try {
|
|
604
|
-
typeof e.value.getDicts == "function" ? d.value = await e.value.getDicts(
|
|
604
|
+
typeof e.value.getDicts == "function" ? d.value = await e.value.getDicts(s.formInfo) : d.value = S.value;
|
|
605
605
|
} catch (Ze) {
|
|
606
606
|
console.error("Failed to load data for tree-select:", Ze);
|
|
607
607
|
}
|
|
608
|
-
})(),
|
|
608
|
+
})(), s.t == "q") {
|
|
609
609
|
let Be = e.value.type || i.value;
|
|
610
610
|
(Be === void 0 || i.value === "input" || Be == Me.NUMBER || Be == Me.EMAIL || Be == "url" || Be == "text") && e.value.onKeyup == null && (e.value.onKeyup = (Ze) => {
|
|
611
611
|
var Je, Ke;
|
|
@@ -639,7 +639,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
639
639
|
});
|
|
640
640
|
return (z, T) => {
|
|
641
641
|
var st, ee, ie, fe, vt, pt, it, dt, gt, W, ct, bt;
|
|
642
|
-
const X = H("el-image-viewer"), Ie = H("el-radio"), qe = H("el-radio-group"), je = H("el-radio-button"), lt = H("el-checkbox"), Be = H("el-checkbox-group"), Ze = H("el-checkbox-button"), Je = H("g-select-option"), Ke = H("el-option"), Ct = H("el-select"), xt = H("el-tree-select"), a = H("el-time-picker"),
|
|
642
|
+
const X = H("el-image-viewer"), Ie = H("el-radio"), qe = H("el-radio-group"), je = H("el-radio-button"), lt = H("el-checkbox"), Be = H("el-checkbox-group"), Ze = H("el-checkbox-button"), Je = H("g-select-option"), Ke = H("el-option"), Ct = H("el-select"), xt = H("el-tree-select"), a = H("el-time-picker"), u = H("el-time-select"), y = H("el-date-picker"), C = H("el-color-picker"), I = H("el-rate"), F = H("el-slider"), R = H("el-switch"), ye = H("el-transfer"), _e = H("el-cascader"), De = H("el-icon"), Ae = H("el-image"), Fe = H("el-tooltip"), et = H("el-upload"), ht = H("el-autocomplete"), Mt = H("el-input-number"), St = H("el-input-tag"), Z = H("el-input"), ve = H("el-link"), ae = H("el-text"), We = H("el-avatar"), tt = H("el-tag");
|
|
643
643
|
return p(), U(ne, null, [
|
|
644
644
|
J("div", null, [
|
|
645
645
|
f.value ? (p(), V(X, {
|
|
@@ -661,10 +661,10 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
661
661
|
disabled: t.value[n.value].disabled
|
|
662
662
|
}, e.value), {
|
|
663
663
|
default: _(() => [
|
|
664
|
-
x(z.$slots, `${
|
|
664
|
+
x(z.$slots, `${s.t}-${n.value}`, { data: e.value }, () => [
|
|
665
665
|
(p(!0), U(ne, null, P(S.value, (b) => (p(), V(Ie, q({ ref_for: !0 }, b), {
|
|
666
666
|
default: _(() => [
|
|
667
|
-
x(z.$slots, `${
|
|
667
|
+
x(z.$slots, `${s.t}-${n.value}-options`, { option: b }, void 0, !0)
|
|
668
668
|
]),
|
|
669
669
|
_: 2
|
|
670
670
|
}, 1040))), 256))
|
|
@@ -678,10 +678,10 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
678
678
|
disabled: t.value[n.value].disabled
|
|
679
679
|
}, e.value), {
|
|
680
680
|
default: _(() => [
|
|
681
|
-
x(z.$slots, `${
|
|
681
|
+
x(z.$slots, `${s.t}-${n.value}`, { data: e.value }, () => [
|
|
682
682
|
(p(!0), U(ne, null, P(S.value, (b) => (p(), V(je, q({ ref_for: !0 }, b), {
|
|
683
683
|
default: _(() => [
|
|
684
|
-
x(z.$slots, `${
|
|
684
|
+
x(z.$slots, `${s.t}-${n.value}-options`, { option: b }, void 0, !0)
|
|
685
685
|
]),
|
|
686
686
|
_: 2
|
|
687
687
|
}, 1040))), 256))
|
|
@@ -695,7 +695,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
695
695
|
disabled: t.value[n.value].disabled
|
|
696
696
|
}, e.value), {
|
|
697
697
|
default: _(() => [
|
|
698
|
-
x(z.$slots, `${
|
|
698
|
+
x(z.$slots, `${s.t}-${n.value}`, { data: e.value }, () => [
|
|
699
699
|
T[30] || (T[30] = Le(Se(" "), -1))
|
|
700
700
|
], !0)
|
|
701
701
|
]),
|
|
@@ -707,10 +707,10 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
707
707
|
disabled: t.value[n.value].disabled
|
|
708
708
|
}, e.value), {
|
|
709
709
|
default: _(() => [
|
|
710
|
-
x(z.$slots, `${
|
|
710
|
+
x(z.$slots, `${s.t}-${n.value}`, { data: e.value }, () => [
|
|
711
711
|
(p(!0), U(ne, null, P(S.value, (b) => (p(), V(lt, q({ ref_for: !0 }, b), {
|
|
712
712
|
default: _(() => [
|
|
713
|
-
x(z.$slots, `${
|
|
713
|
+
x(z.$slots, `${s.t}-${n.value}-options`, { option: b }, () => [
|
|
714
714
|
Le(Se(b.label), 1)
|
|
715
715
|
], !0)
|
|
716
716
|
]),
|
|
@@ -726,10 +726,10 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
726
726
|
disabled: t.value[n.value].disabled
|
|
727
727
|
}, L(Xe)(e.value, (b) => b != "type")), {
|
|
728
728
|
default: _(() => [
|
|
729
|
-
x(z.$slots, `${
|
|
729
|
+
x(z.$slots, `${s.t}-${n.value}`, { data: e.value }, () => [
|
|
730
730
|
(p(!0), U(ne, null, P(S.value, (b) => (p(), V(Ze, q({ ref_for: !0 }, b), {
|
|
731
731
|
default: _(() => [
|
|
732
|
-
x(z.$slots, `${
|
|
732
|
+
x(z.$slots, `${s.t}-${n.value}-options`, { option: b }, void 0, !0)
|
|
733
733
|
]),
|
|
734
734
|
_: 2
|
|
735
735
|
}, 1040))), 256))
|
|
@@ -741,16 +741,16 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
741
741
|
modelValue: l.value,
|
|
742
742
|
"onUpdate:modelValue": T[6] || (T[6] = (b) => l.value = b),
|
|
743
743
|
placeholder: o.value,
|
|
744
|
-
clearable:
|
|
744
|
+
clearable: s.t == "q",
|
|
745
745
|
onClear: T[7] || (T[7] = () => {
|
|
746
|
-
|
|
746
|
+
s.t == "q" && t.value.table.load();
|
|
747
747
|
}),
|
|
748
748
|
disabled: t.value[n.value].disabled
|
|
749
749
|
}, oe.value), be({
|
|
750
750
|
default: _(() => {
|
|
751
751
|
var b;
|
|
752
752
|
return [
|
|
753
|
-
((b = S.value) == null ? void 0 : b.length) > 0 ? x(z.$slots, `${
|
|
753
|
+
((b = S.value) == null ? void 0 : b.length) > 0 ? x(z.$slots, `${s.t}-${n.value}`, {
|
|
754
754
|
key: 0,
|
|
755
755
|
options: S.value
|
|
756
756
|
}, () => [
|
|
@@ -765,7 +765,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
765
765
|
default: _(() => {
|
|
766
766
|
var pe;
|
|
767
767
|
return [
|
|
768
|
-
(pe = e.value) != null && pe.columns ? x(z.$slots, `${
|
|
768
|
+
(pe = e.value) != null && pe.columns ? x(z.$slots, `${s.t}-${n.value}-options`, {
|
|
769
769
|
key: 0,
|
|
770
770
|
option: ce
|
|
771
771
|
}, () => {
|
|
@@ -774,7 +774,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
774
774
|
se(Je, {
|
|
775
775
|
columns: (at = e.value) == null ? void 0 : at.columns,
|
|
776
776
|
data: ce,
|
|
777
|
-
t:
|
|
777
|
+
t: s.t
|
|
778
778
|
}, be({ _: 2 }, [
|
|
779
779
|
P(z.$slots, ($t, Ut) => ({
|
|
780
780
|
name: Ut,
|
|
@@ -804,7 +804,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
804
804
|
default: _(() => {
|
|
805
805
|
var at;
|
|
806
806
|
return [
|
|
807
|
-
(at = e.value) != null && at.columns ? x(z.$slots, `${
|
|
807
|
+
(at = e.value) != null && at.columns ? x(z.$slots, `${s.t}-${n.value}-options`, {
|
|
808
808
|
key: 0,
|
|
809
809
|
option: pe
|
|
810
810
|
}, () => {
|
|
@@ -813,7 +813,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
813
813
|
se(Je, {
|
|
814
814
|
columns: ($t = e.value) == null ? void 0 : $t.columns,
|
|
815
815
|
data: pe,
|
|
816
|
-
t:
|
|
816
|
+
t: s.t
|
|
817
817
|
}, be({ _: 2 }, [
|
|
818
818
|
P(z.$slots, (Ut, Tt) => ({
|
|
819
819
|
name: Tt,
|
|
@@ -846,7 +846,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
846
846
|
se(Je, {
|
|
847
847
|
columns: (b = e.value) == null ? void 0 : b.columns,
|
|
848
848
|
title: !0,
|
|
849
|
-
t:
|
|
849
|
+
t: s.t
|
|
850
850
|
}, be({ _: 2 }, [
|
|
851
851
|
P(z.$slots, (ce, pe) => ({
|
|
852
852
|
name: pe,
|
|
@@ -862,7 +862,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
862
862
|
P(E(), (b) => ({
|
|
863
863
|
name: b,
|
|
864
864
|
fn: _((ce) => [
|
|
865
|
-
x(z.$slots, `${
|
|
865
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { form: r.formInfo }, void 0, !0)
|
|
866
866
|
])
|
|
867
867
|
}))
|
|
868
868
|
]), 1040, ["modelValue", "placeholder", "clearable", "disabled"])) : i.value == L(Me).TREESELECT ? (p(), V(xt, q({
|
|
@@ -875,7 +875,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
875
875
|
P(E(), (b) => ({
|
|
876
876
|
name: b,
|
|
877
877
|
fn: _((ce) => [
|
|
878
|
-
x(z.$slots, `${
|
|
878
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: ce }, void 0, !0)
|
|
879
879
|
])
|
|
880
880
|
}))
|
|
881
881
|
]), 1040, ["modelValue", "placeholder", "disabled", "data"])) : i.value == L(Me).TIME ? (p(), V(a, q({
|
|
@@ -885,7 +885,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
885
885
|
"arrow-control": "",
|
|
886
886
|
format: "HH:mm:ss",
|
|
887
887
|
disabled: t.value[n.value].disabled
|
|
888
|
-
}, e.value, { placeholder: o.value }), null, 16, ["modelValue", "disabled", "placeholder"])) : i.value == L(Me).TIMESELECT ? (p(), V(
|
|
888
|
+
}, e.value, { placeholder: o.value }), null, 16, ["modelValue", "disabled", "placeholder"])) : i.value == L(Me).TIMESELECT ? (p(), V(u, q({
|
|
889
889
|
key: 8,
|
|
890
890
|
modelValue: l.value,
|
|
891
891
|
"onUpdate:modelValue": T[10] || (T[10] = (b) => l.value = b),
|
|
@@ -908,7 +908,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
908
908
|
P(E(), (b) => ({
|
|
909
909
|
name: b,
|
|
910
910
|
fn: _((ce) => [
|
|
911
|
-
x(z.$slots, `${
|
|
911
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: ce }, void 0, !0)
|
|
912
912
|
])
|
|
913
913
|
}))
|
|
914
914
|
]), 1040, ["modelValue", "type", "format", "placeholder", "value-format", "disabled"])) : i.value == L(Me).COLOR ? (p(), V(C, q({
|
|
@@ -935,7 +935,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
935
935
|
P(E(), (b) => ({
|
|
936
936
|
name: b,
|
|
937
937
|
fn: _((ce) => [
|
|
938
|
-
x(z.$slots, `${
|
|
938
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: ce }, void 0, !0)
|
|
939
939
|
])
|
|
940
940
|
}))
|
|
941
941
|
]), 1040, ["modelValue", "disabled"])) : i.value == L(Me).TRANSFER ? (p(), V(ye, q({
|
|
@@ -946,7 +946,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
946
946
|
P(E(), (b) => ({
|
|
947
947
|
name: b,
|
|
948
948
|
fn: _((ce) => [
|
|
949
|
-
x(z.$slots, `${
|
|
949
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: ce }, void 0, !0)
|
|
950
950
|
])
|
|
951
951
|
}))
|
|
952
952
|
]), 1040, ["modelValue"])) : i.value == L(Me).CASCADER ? (p(), V(_e, q({
|
|
@@ -957,7 +957,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
957
957
|
P(E(), (b) => ({
|
|
958
958
|
name: b,
|
|
959
959
|
fn: _((ce) => [
|
|
960
|
-
x(z.$slots, `${
|
|
960
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: ce }, void 0, !0)
|
|
961
961
|
])
|
|
962
962
|
}))
|
|
963
963
|
]), 1040, ["modelValue", "options"])) : i.value == L(Me).IMAGE ? (p(), V(et, q({
|
|
@@ -992,7 +992,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
992
992
|
P(E(), (pe, at) => ({
|
|
993
993
|
name: pe,
|
|
994
994
|
fn: _(($t) => [
|
|
995
|
-
x(z.$slots, `${
|
|
995
|
+
x(z.$slots, `${s.t}-${n.value}-${pe}`, { data: $t }, void 0, !0)
|
|
996
996
|
])
|
|
997
997
|
}))
|
|
998
998
|
]), 1040, ["src"])
|
|
@@ -1040,7 +1040,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1040
1040
|
P(E(), (b, ce) => ({
|
|
1041
1041
|
name: b,
|
|
1042
1042
|
fn: _((pe) => [
|
|
1043
|
-
x(z.$slots, `${
|
|
1043
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: pe }, void 0, !0)
|
|
1044
1044
|
])
|
|
1045
1045
|
}))
|
|
1046
1046
|
]), 1040, ["file-list"])) : i.value == L(Me).AUTOCOMPLETE ? (p(), V(ht, q({
|
|
@@ -1051,7 +1051,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1051
1051
|
P(E(), (b, ce) => ({
|
|
1052
1052
|
name: b,
|
|
1053
1053
|
fn: _((pe) => [
|
|
1054
|
-
x(z.$slots, `${
|
|
1054
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: pe }, void 0, !0)
|
|
1055
1055
|
])
|
|
1056
1056
|
}))
|
|
1057
1057
|
]), 1040, ["modelValue", "placeholder"])) : i.value == L(Me).INPUTNUMBER ? (p(), V(Mt, q({
|
|
@@ -1064,7 +1064,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1064
1064
|
P(E(), (b, ce) => ({
|
|
1065
1065
|
name: b,
|
|
1066
1066
|
fn: _((pe) => [
|
|
1067
|
-
x(z.$slots, `${
|
|
1067
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, {
|
|
1068
1068
|
data: pe,
|
|
1069
1069
|
form: r.formInfo
|
|
1070
1070
|
}, void 0, !0)
|
|
@@ -1105,7 +1105,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1105
1105
|
P(E(), (b, ce) => ({
|
|
1106
1106
|
name: b,
|
|
1107
1107
|
fn: _((pe) => [
|
|
1108
|
-
x(z.$slots, `${
|
|
1108
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, {
|
|
1109
1109
|
data: pe,
|
|
1110
1110
|
form: r.formInfo
|
|
1111
1111
|
}, void 0, !0)
|
|
@@ -1134,7 +1134,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1134
1134
|
P(E(), (b, ce) => ({
|
|
1135
1135
|
name: b,
|
|
1136
1136
|
fn: _((pe) => [
|
|
1137
|
-
x(z.$slots, `${
|
|
1137
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, { data: pe }, void 0, !0)
|
|
1138
1138
|
])
|
|
1139
1139
|
}))
|
|
1140
1140
|
]), 1040, ["modelValue", "placeholder", "maxlength"])
|
|
@@ -1213,7 +1213,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1213
1213
|
return i.value == L(Me).NUMBER ? Qe(b, ((ce = e.value) == null ? void 0 : ce.precision) || 2) : b;
|
|
1214
1214
|
}),
|
|
1215
1215
|
onClear: T[29] || (T[29] = () => {
|
|
1216
|
-
|
|
1216
|
+
s.t == "q" && t.value.table.load();
|
|
1217
1217
|
}),
|
|
1218
1218
|
disabled: t.value[n.value].disabled
|
|
1219
1219
|
}, { ...L(Xe)(e.value, (b) => !["suffix", "prefix", "append", "prepend"].includes(b)), type: i.value }), be({ _: 2 }, [
|
|
@@ -1268,7 +1268,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1268
1268
|
P(E(), (b, ce) => ({
|
|
1269
1269
|
name: b,
|
|
1270
1270
|
fn: _((pe) => [
|
|
1271
|
-
x(z.$slots, `${
|
|
1271
|
+
x(z.$slots, `${s.t}-${n.value}-${b}`, {
|
|
1272
1272
|
data: pe,
|
|
1273
1273
|
form: r.formInfo
|
|
1274
1274
|
}, void 0, !0)
|
|
@@ -1289,15 +1289,15 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1289
1289
|
}),
|
|
1290
1290
|
emits: ["update:modelValue", "update:info"],
|
|
1291
1291
|
setup(r) {
|
|
1292
|
-
const
|
|
1292
|
+
const s = ot(r, "modelValue"), e = r, l = ot(r, "info"), n = (f) => {
|
|
1293
1293
|
if (typeof f.search != "function") return f.search;
|
|
1294
1294
|
try {
|
|
1295
|
-
return f.search(l.value,
|
|
1295
|
+
return f.search(l.value, s.value.table);
|
|
1296
1296
|
} catch (v) {
|
|
1297
1297
|
return console.warn("解析 search 配置时出错:", v), null;
|
|
1298
1298
|
}
|
|
1299
1299
|
}, i = (f) => {
|
|
1300
|
-
const v = Object.entries(
|
|
1300
|
+
const v = Object.entries(s.value).filter(([, c]) => {
|
|
1301
1301
|
const o = n(c);
|
|
1302
1302
|
return c.search && (o == null ? void 0 : o.more) === f && (o == null ? void 0 : o.hidden) !== !0 && (o == null ? void 0 : o.visible) !== !1;
|
|
1303
1303
|
}).sort(([c, o], [m, A]) => {
|
|
@@ -1306,13 +1306,13 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1306
1306
|
return j - E;
|
|
1307
1307
|
});
|
|
1308
1308
|
return Object.fromEntries(v);
|
|
1309
|
-
}, t = (f) => typeof f.search == "function" ? f.search(l.value,
|
|
1309
|
+
}, t = (f) => typeof f.search == "function" ? f.search(l.value, s.value.table) : f.search || {}, d = (f) => {
|
|
1310
1310
|
const v = t(f);
|
|
1311
1311
|
return (v == null ? void 0 : v.type) || f.type;
|
|
1312
1312
|
}, S = (f) => {
|
|
1313
1313
|
var o;
|
|
1314
1314
|
const v = t(f);
|
|
1315
|
-
let c = (v == null ? void 0 : v.width) || ((o =
|
|
1315
|
+
let c = (v == null ? void 0 : v.width) || ((o = s.value.queryItems) == null ? void 0 : o.width) || "100%";
|
|
1316
1316
|
return isNaN(c) || (c += "px"), c;
|
|
1317
1317
|
};
|
|
1318
1318
|
return (f, v) => {
|
|
@@ -1321,16 +1321,16 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1321
1321
|
key: m,
|
|
1322
1322
|
item: o,
|
|
1323
1323
|
queryModel: l.value,
|
|
1324
|
-
model:
|
|
1324
|
+
model: s.value
|
|
1325
1325
|
}, () => [
|
|
1326
1326
|
se(c, q({
|
|
1327
1327
|
label: o.label,
|
|
1328
1328
|
style: { width: S(o) }
|
|
1329
|
-
}, { ref_for: !0 }, { ...
|
|
1329
|
+
}, { ref_for: !0 }, { ...s.value.queryItems, ...t(o) }), {
|
|
1330
1330
|
label: _(() => [
|
|
1331
1331
|
x(f.$slots, `q-${m}-label`, {
|
|
1332
1332
|
item: o,
|
|
1333
|
-
model:
|
|
1333
|
+
model: s.value
|
|
1334
1334
|
})
|
|
1335
1335
|
]),
|
|
1336
1336
|
default: _(() => [
|
|
@@ -1340,7 +1340,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1340
1340
|
item: { getDicts: o == null ? void 0 : o.getDicts, ...o == null ? void 0 : o.editor, ...t(o) },
|
|
1341
1341
|
ctrlKey: m,
|
|
1342
1342
|
ctrlType: d(o),
|
|
1343
|
-
model:
|
|
1343
|
+
model: s.value,
|
|
1344
1344
|
t: "q",
|
|
1345
1345
|
formInfo: l.value
|
|
1346
1346
|
}, be({ _: 2 }, [
|
|
@@ -1350,7 +1350,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1350
1350
|
x(f.$slots, A, {
|
|
1351
1351
|
data: j,
|
|
1352
1352
|
item: o,
|
|
1353
|
-
model:
|
|
1353
|
+
model: s.value
|
|
1354
1354
|
})
|
|
1355
1355
|
])
|
|
1356
1356
|
}))
|
|
@@ -1373,8 +1373,8 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1373
1373
|
infoModifiers: {}
|
|
1374
1374
|
},
|
|
1375
1375
|
emits: /* @__PURE__ */ ut(["query", "reset"], ["update:modelValue", "update:info"]),
|
|
1376
|
-
setup(r, { emit:
|
|
1377
|
-
const e = ot(r, "modelValue"), l =
|
|
1376
|
+
setup(r, { emit: s }) {
|
|
1377
|
+
const e = ot(r, "modelValue"), l = s, n = Yt("options"), i = re(!1), t = ot(r, "info"), d = Pe(() => {
|
|
1378
1378
|
var Q, K, te;
|
|
1379
1379
|
const E = Ue((Q = n == null ? void 0 : n.query) == null ? void 0 : Q.btns, (te = (K = e.value) == null ? void 0 : K.query) == null ? void 0 : te.btns) || { align: "left" };
|
|
1380
1380
|
return {
|
|
@@ -1770,7 +1770,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1770
1770
|
modelModifiers: {}
|
|
1771
1771
|
}),
|
|
1772
1772
|
emits: /* @__PURE__ */ ut(["submit", "reset"], ["update:modelValue"]),
|
|
1773
|
-
setup(r, { expose:
|
|
1773
|
+
setup(r, { expose: s, emit: e }) {
|
|
1774
1774
|
var Te, Oe, he, B, Ve, Qe;
|
|
1775
1775
|
const l = ot(r, "modelValue"), n = e, i = re(null), t = Yt("options"), d = re({}), S = re(""), f = r;
|
|
1776
1776
|
l.value.form = Ue(
|
|
@@ -1997,7 +1997,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
1997
1997
|
originalOrder: 1
|
|
1998
1998
|
}
|
|
1999
1999
|
]), me = Pe(() => ue.value.filter((w) => !w.hidden).sort((w, $) => w.sort - $.sort || w.originalOrder - $.originalOrder));
|
|
2000
|
-
return
|
|
2000
|
+
return s({
|
|
2001
2001
|
submit: v,
|
|
2002
2002
|
saveSubmit: v,
|
|
2003
2003
|
reset: c,
|
|
@@ -2237,7 +2237,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
2237
2237
|
"maximize",
|
|
2238
2238
|
"restore"
|
|
2239
2239
|
],
|
|
2240
|
-
setup(r, { expose:
|
|
2240
|
+
setup(r, { expose: s, emit: e }) {
|
|
2241
2241
|
const l = r, n = zt(), i = e, t = re(l.fullscreen), d = Pe(() => l.type === "drawer" ? "el-drawer" : "el-dialog"), S = Pe(() => {
|
|
2242
2242
|
const te = {
|
|
2243
2243
|
modal: l.modal,
|
|
@@ -2283,7 +2283,7 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
2283
2283
|
function K() {
|
|
2284
2284
|
i("minimize"), o.value = !1;
|
|
2285
2285
|
}
|
|
2286
|
-
return
|
|
2286
|
+
return s({
|
|
2287
2287
|
handleClose: () => v.value.handleClose()
|
|
2288
2288
|
}), (te, oe) => (p(), U("div", da, [
|
|
2289
2289
|
o.value ? (p(), U("div", {
|
|
@@ -2386,8 +2386,8 @@ const It = /* @__PURE__ */ il(Pl), nt = (r, u) => {
|
|
|
2386
2386
|
commitText: String
|
|
2387
2387
|
},
|
|
2388
2388
|
emits: ["excel"],
|
|
2389
|
-
setup(r, { emit:
|
|
2390
|
-
const e = r, l =
|
|
2389
|
+
setup(r, { emit: s }) {
|
|
2390
|
+
const e = r, l = s, n = re(e.items), i = () => {
|
|
2391
2391
|
n.value.forEach((S) => {
|
|
2392
2392
|
S.value = !0;
|
|
2393
2393
|
});
|
|
@@ -2501,42 +2501,42 @@ we.version(_a).stores({
|
|
|
2501
2501
|
// 记录表格列显示状态
|
|
2502
2502
|
tableColsState: "++id,[page+key], page, key"
|
|
2503
2503
|
});
|
|
2504
|
-
const mt = (r,
|
|
2504
|
+
const mt = (r, s) => {
|
|
2505
2505
|
if (!r || typeof r != "string")
|
|
2506
2506
|
throw new Error("page参数必须是非空字符串");
|
|
2507
2507
|
};
|
|
2508
|
-
async function Dt(r,
|
|
2508
|
+
async function Dt(r, s, e) {
|
|
2509
2509
|
try {
|
|
2510
2510
|
const l = await we.tableColsState.where({ page: r }).first();
|
|
2511
|
-
l ? e === "add" ? l.keys.includes(
|
|
2511
|
+
l ? e === "add" ? l.keys.includes(s) || (l.keys.push(s), await we.tableColsState.put(l)) : e === "del" ? (l.keys = l.keys.filter((n) => n !== s), await we.tableColsState.put(l)) : e === "delAll" ? (l.keys = s, await we.tableColsState.put(l)) : e === "selectAll" && await we.tableColsState.where({ page: r }).delete() : e === "add" ? await we.tableColsState.add({ page: r, keys: [s] }) : e === "delAll" && await we.tableColsState.add({ page: r, keys: s });
|
|
2512
2512
|
} catch (l) {
|
|
2513
|
-
throw console.error(`处理表格列状态时出错 (page: ${r}, key: ${
|
|
2513
|
+
throw console.error(`处理表格列状态时出错 (page: ${r}, key: ${s}, state: ${e}):`, l), l;
|
|
2514
2514
|
}
|
|
2515
2515
|
}
|
|
2516
|
-
async function Ca(r,
|
|
2516
|
+
async function Ca(r, s, e) {
|
|
2517
2517
|
mt(r);
|
|
2518
2518
|
try {
|
|
2519
|
-
const l = await we.tableWidths.where({ page: r, key:
|
|
2520
|
-
return l ? (await we.tableWidths.put({ ...l, width: e }), "update success") : (await we.tableWidths.add({ page: r, key:
|
|
2519
|
+
const l = await we.tableWidths.where({ page: r, key: s }).first();
|
|
2520
|
+
return l ? (await we.tableWidths.put({ ...l, width: e }), "update success") : (await we.tableWidths.add({ page: r, key: s, width: e }), "add success");
|
|
2521
2521
|
} catch (l) {
|
|
2522
|
-
throw console.error(`保存表格项设置信息时出错 (page: ${r}, key: ${
|
|
2522
|
+
throw console.error(`保存表格项设置信息时出错 (page: ${r}, key: ${s}):`, l), l;
|
|
2523
2523
|
}
|
|
2524
2524
|
}
|
|
2525
2525
|
async function xa(r) {
|
|
2526
2526
|
mt(r);
|
|
2527
2527
|
try {
|
|
2528
2528
|
return await we.tableWidths.where({ page: r }).toArray();
|
|
2529
|
-
} catch (
|
|
2530
|
-
throw console.error(`获取表格项设置信息时出错 (page: ${r}):`,
|
|
2529
|
+
} catch (s) {
|
|
2530
|
+
throw console.error(`获取表格项设置信息时出错 (page: ${r}):`, s), s;
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
2533
|
async function Ma(r) {
|
|
2534
2534
|
mt(r);
|
|
2535
2535
|
try {
|
|
2536
|
-
const
|
|
2537
|
-
return !
|
|
2538
|
-
} catch (
|
|
2539
|
-
throw console.error(`获取表格列状态时出错 (page: ${r}):`,
|
|
2536
|
+
const s = await we.tableColsState.where({ page: r }).toArray();
|
|
2537
|
+
return !s || s.length === 0 ? [] : s[0].keys;
|
|
2538
|
+
} catch (s) {
|
|
2539
|
+
throw console.error(`获取表格列状态时出错 (page: ${r}):`, s), s;
|
|
2540
2540
|
}
|
|
2541
2541
|
}
|
|
2542
2542
|
async function Sa(r) {
|
|
@@ -2550,15 +2550,15 @@ async function Sa(r) {
|
|
|
2550
2550
|
we.tableColsState.where({ page: r }).delete()
|
|
2551
2551
|
]);
|
|
2552
2552
|
});
|
|
2553
|
-
} catch (
|
|
2554
|
-
throw console.error(`删除页面"${r}"的表格设置信息时出错:`,
|
|
2553
|
+
} catch (s) {
|
|
2554
|
+
throw console.error(`删除页面"${r}"的表格设置信息时出错:`, s), s;
|
|
2555
2555
|
}
|
|
2556
2556
|
}
|
|
2557
|
-
async function Ta({ page: r, size:
|
|
2557
|
+
async function Ta({ page: r, size: s }) {
|
|
2558
2558
|
mt(r);
|
|
2559
2559
|
try {
|
|
2560
2560
|
const e = await we.pageInfo.where({ page: r }).first();
|
|
2561
|
-
return e ? (await we.pageInfo.put({ ...e, size:
|
|
2561
|
+
return e ? (await we.pageInfo.put({ ...e, size: s }), "update success") : (await we.pageInfo.add({ page: r, size: s }), "add success");
|
|
2562
2562
|
} catch (e) {
|
|
2563
2563
|
throw console.error(`保存分页条数时出错 (page: ${r}):`, e), e;
|
|
2564
2564
|
}
|
|
@@ -2566,17 +2566,17 @@ async function Ta({ page: r, size: u }) {
|
|
|
2566
2566
|
async function Va(r) {
|
|
2567
2567
|
mt(r);
|
|
2568
2568
|
try {
|
|
2569
|
-
const
|
|
2570
|
-
return
|
|
2571
|
-
} catch (
|
|
2572
|
-
throw console.error(`获取分页条数时出错 (page: ${r}):`,
|
|
2569
|
+
const s = await we.pageInfo.where({ page: r }).first();
|
|
2570
|
+
return s == null ? void 0 : s.size;
|
|
2571
|
+
} catch (s) {
|
|
2572
|
+
throw console.error(`获取分页条数时出错 (page: ${r}):`, s), s;
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
|
-
async function Ea(r,
|
|
2575
|
+
async function Ea(r, s) {
|
|
2576
2576
|
mt(r);
|
|
2577
2577
|
try {
|
|
2578
2578
|
const e = await we.sorts.where({ page: r }).first();
|
|
2579
|
-
return e ? (await we.sorts.put({ ...e, keys:
|
|
2579
|
+
return e ? (await we.sorts.put({ ...e, keys: s }), "update success") : (await we.sorts.add({ page: r, keys: s }), "add success");
|
|
2580
2580
|
} catch (e) {
|
|
2581
2581
|
throw console.error(`保存表格字段顺序时出错 (page: ${r}):`, e), e;
|
|
2582
2582
|
}
|
|
@@ -2584,10 +2584,10 @@ async function Ea(r, u) {
|
|
|
2584
2584
|
async function Da(r) {
|
|
2585
2585
|
mt(r);
|
|
2586
2586
|
try {
|
|
2587
|
-
const
|
|
2588
|
-
return (
|
|
2589
|
-
} catch (
|
|
2590
|
-
throw console.error(`获取表格字段顺序时出错 (page: ${r}):`,
|
|
2587
|
+
const s = await we.sorts.where({ page: r }).first();
|
|
2588
|
+
return (s == null ? void 0 : s.keys) || [];
|
|
2589
|
+
} catch (s) {
|
|
2590
|
+
throw console.error(`获取表格字段顺序时出错 (page: ${r}):`, s), s;
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
2593
|
const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { style: { display: "flex", "align-items": "center", height: "30px" } }, qa = {
|
|
@@ -2608,8 +2608,8 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2608
2608
|
modelModifiers: {}
|
|
2609
2609
|
}),
|
|
2610
2610
|
emits: /* @__PURE__ */ ut(["setting-drag-end", "select-all"], ["update:modelValue"]),
|
|
2611
|
-
setup(r, { emit:
|
|
2612
|
-
const e = r, l =
|
|
2611
|
+
setup(r, { emit: s }) {
|
|
2612
|
+
const e = r, l = s;
|
|
2613
2613
|
let n = re([]);
|
|
2614
2614
|
const i = ot(r, "modelValue"), t = async (c, o) => {
|
|
2615
2615
|
c ? (i.value[o].showCol = !0, await Dt(e.tuid, o, "del")) : (i.value[o].showCol = !1, await Dt(e.tuid, o, "add"));
|
|
@@ -2751,12 +2751,12 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2751
2751
|
}
|
|
2752
2752
|
},
|
|
2753
2753
|
setup(r) {
|
|
2754
|
-
const
|
|
2755
|
-
|
|
2754
|
+
const s = r, e = () => {
|
|
2755
|
+
s.content ? (navigator.clipboard.writeText(s.content), ft.success("复制成功")) : ft.warning("没有内容可复制");
|
|
2756
2756
|
};
|
|
2757
2757
|
return (l, n) => (p(), U("div", {
|
|
2758
2758
|
class: "g-cell-toopTip",
|
|
2759
|
-
style: Ye({ width:
|
|
2759
|
+
style: Ye({ width: s.column.width + "px" })
|
|
2760
2760
|
}, [
|
|
2761
2761
|
J("div", La, [
|
|
2762
2762
|
n[0] || (n[0] = J("span", { class: "title-text" }, "内容", -1)),
|
|
@@ -2768,7 +2768,7 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2768
2768
|
se(L(Ul))
|
|
2769
2769
|
])
|
|
2770
2770
|
]),
|
|
2771
|
-
J("div", ja, Se(
|
|
2771
|
+
J("div", ja, Se(s.content), 1)
|
|
2772
2772
|
], 4));
|
|
2773
2773
|
}
|
|
2774
2774
|
}, Fa = /* @__PURE__ */ nt(Ha, [["__scopeId", "data-v-f28912da"]]), Ra = /* @__PURE__ */ Object.assign({
|
|
@@ -2792,7 +2792,7 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2792
2792
|
}
|
|
2793
2793
|
},
|
|
2794
2794
|
setup(r) {
|
|
2795
|
-
const
|
|
2795
|
+
const s = r, e = Yt("options"), l = {
|
|
2796
2796
|
border: !0,
|
|
2797
2797
|
labelWidth: "100px",
|
|
2798
2798
|
column: 2
|
|
@@ -2800,8 +2800,8 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2800
2800
|
var o, m;
|
|
2801
2801
|
return {
|
|
2802
2802
|
...l,
|
|
2803
|
-
...((m = (o = e == null ? void 0 : e.control) == null ? void 0 : o.view(
|
|
2804
|
-
...
|
|
2803
|
+
...((m = (o = e == null ? void 0 : e.control) == null ? void 0 : o.view(s.row)) == null ? void 0 : m.container) || {},
|
|
2804
|
+
...s == null ? void 0 : s.container
|
|
2805
2805
|
};
|
|
2806
2806
|
}), i = {
|
|
2807
2807
|
"label-align": "right",
|
|
@@ -2810,15 +2810,15 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2810
2810
|
var o;
|
|
2811
2811
|
return {
|
|
2812
2812
|
...i,
|
|
2813
|
-
...((o =
|
|
2813
|
+
...((o = s == null ? void 0 : s.container) == null ? void 0 : o.items) || {}
|
|
2814
2814
|
};
|
|
2815
2815
|
}), d = (o) => {
|
|
2816
|
-
const m =
|
|
2817
|
-
return { ...typeof E == "function" ? E(
|
|
2816
|
+
const m = s.m[o], A = m == null ? void 0 : m.view, j = typeof A == "function" ? A(s.row, null, 0, s.m) : A || {}, E = m == null ? void 0 : m.table;
|
|
2817
|
+
return { ...typeof E == "function" ? E(s.row) || {} : {}, ...j };
|
|
2818
2818
|
}, S = (o) => {
|
|
2819
2819
|
const m = d(o);
|
|
2820
2820
|
return (m == null ? void 0 : m.type) || "text-info";
|
|
2821
|
-
}, f = Pe(() => Object.entries(
|
|
2821
|
+
}, f = Pe(() => Object.entries(s.m).filter(([o, m]) => {
|
|
2822
2822
|
if (fl.includes(o) || (m == null ? void 0 : m.type) === "hidden") return !1;
|
|
2823
2823
|
let A = (m == null ? void 0 : m.visible) !== !1;
|
|
2824
2824
|
const j = d(o);
|
|
@@ -2836,7 +2836,7 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2836
2836
|
let E = Object.hasOwn(j, "value") ? j.value : A == null ? void 0 : A.value;
|
|
2837
2837
|
const k = j.format || v[A == null ? void 0 : A.type];
|
|
2838
2838
|
return k && E && (E = It(E).format(k)), [m, E];
|
|
2839
|
-
})), ...
|
|
2839
|
+
})), ...s.row }));
|
|
2840
2840
|
return (o, m) => {
|
|
2841
2841
|
var E;
|
|
2842
2842
|
const A = H("el-descriptions-item"), j = H("el-descriptions");
|
|
@@ -2849,21 +2849,21 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2849
2849
|
(p(!0), U(ne, null, P(f.value, ([k, Q]) => {
|
|
2850
2850
|
var K, te;
|
|
2851
2851
|
return p(), V(A, q({
|
|
2852
|
-
label: (K =
|
|
2852
|
+
label: (K = s.m[k]) == null ? void 0 : K.label
|
|
2853
2853
|
}, { ref_for: !0 }, { ...t.value, ...((te = d(k)) == null ? void 0 : te.item) || {} }, { key: k }), {
|
|
2854
2854
|
label: _(() => [
|
|
2855
2855
|
x(o.$slots, `view-${k}-label`, {
|
|
2856
|
-
row:
|
|
2856
|
+
row: s.row
|
|
2857
2857
|
}, () => {
|
|
2858
2858
|
var oe;
|
|
2859
2859
|
return [
|
|
2860
|
-
Le(Se((oe =
|
|
2860
|
+
Le(Se((oe = s.m[k]) == null ? void 0 : oe.label), 1)
|
|
2861
2861
|
];
|
|
2862
2862
|
}, !0)
|
|
2863
2863
|
]),
|
|
2864
2864
|
default: _(() => [
|
|
2865
2865
|
x(o.$slots, `view-${k}`, {
|
|
2866
|
-
row:
|
|
2866
|
+
row: s.row
|
|
2867
2867
|
}, () => [
|
|
2868
2868
|
se(kt, {
|
|
2869
2869
|
modelValue: c.value[k],
|
|
@@ -2871,8 +2871,8 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2871
2871
|
item: d(k),
|
|
2872
2872
|
ctrlKey: k,
|
|
2873
2873
|
ctrlType: S(k),
|
|
2874
|
-
model:
|
|
2875
|
-
formInfo:
|
|
2874
|
+
model: s.row,
|
|
2875
|
+
formInfo: s.row,
|
|
2876
2876
|
t: "v"
|
|
2877
2877
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "item", "ctrlKey", "ctrlType", "model", "formInfo"])
|
|
2878
2878
|
], !0)
|
|
@@ -2896,7 +2896,7 @@ const Oa = { style: { padding: "15px", "box-sizing": "border-box" } }, Ia = { st
|
|
|
2896
2896
|
}), pl = /* @__PURE__ */ nt(Ra, [["__scopeId", "data-v-4902ce5a"]]);
|
|
2897
2897
|
var ml = { exports: {} }, hl = { exports: {} };
|
|
2898
2898
|
(function() {
|
|
2899
|
-
var r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
|
|
2899
|
+
var r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", s = {
|
|
2900
2900
|
// Bit-wise rotation left
|
|
2901
2901
|
rotl: function(e, l) {
|
|
2902
2902
|
return e << l | e >>> 32 - l;
|
|
@@ -2908,9 +2908,9 @@ var ml = { exports: {} }, hl = { exports: {} };
|
|
|
2908
2908
|
// Swap big-endian to little-endian and vice versa
|
|
2909
2909
|
endian: function(e) {
|
|
2910
2910
|
if (e.constructor == Number)
|
|
2911
|
-
return
|
|
2911
|
+
return s.rotl(e, 8) & 16711935 | s.rotl(e, 24) & 4278255360;
|
|
2912
2912
|
for (var l = 0; l < e.length; l++)
|
|
2913
|
-
e[l] =
|
|
2913
|
+
e[l] = s.endian(e[l]);
|
|
2914
2914
|
return e;
|
|
2915
2915
|
},
|
|
2916
2916
|
// Generate an array of any length of random bytes
|
|
@@ -2958,7 +2958,7 @@ var ml = { exports: {} }, hl = { exports: {} };
|
|
|
2958
2958
|
return l;
|
|
2959
2959
|
}
|
|
2960
2960
|
};
|
|
2961
|
-
hl.exports =
|
|
2961
|
+
hl.exports = s;
|
|
2962
2962
|
})();
|
|
2963
2963
|
var Ba = hl.exports, Ft = {
|
|
2964
2964
|
// UTF-8 encoding
|
|
@@ -2976,15 +2976,15 @@ var Ba = hl.exports, Ft = {
|
|
|
2976
2976
|
bin: {
|
|
2977
2977
|
// Convert a string to a byte array
|
|
2978
2978
|
stringToBytes: function(r) {
|
|
2979
|
-
for (var
|
|
2980
|
-
|
|
2981
|
-
return
|
|
2979
|
+
for (var s = [], e = 0; e < r.length; e++)
|
|
2980
|
+
s.push(r.charCodeAt(e) & 255);
|
|
2981
|
+
return s;
|
|
2982
2982
|
},
|
|
2983
2983
|
// Convert a byte array to a string
|
|
2984
2984
|
bytesToString: function(r) {
|
|
2985
|
-
for (var
|
|
2986
|
-
|
|
2987
|
-
return
|
|
2985
|
+
for (var s = [], e = 0; e < r.length; e++)
|
|
2986
|
+
s.push(String.fromCharCode(r[e]));
|
|
2987
|
+
return s.join("");
|
|
2988
2988
|
}
|
|
2989
2989
|
}
|
|
2990
2990
|
}, Wt = Ft;
|
|
@@ -3004,8 +3004,8 @@ function Na(r) {
|
|
|
3004
3004
|
return typeof r.readFloatLE == "function" && typeof r.slice == "function" && yl(r.slice(0, 0));
|
|
3005
3005
|
}
|
|
3006
3006
|
(function() {
|
|
3007
|
-
var r = Ba,
|
|
3008
|
-
i.constructor == String ? t && t.encoding === "binary" ? i = l.stringToBytes(i) : i =
|
|
3007
|
+
var r = Ba, s = Wt.utf8, e = Pa, l = Wt.bin, n = function(i, t) {
|
|
3008
|
+
i.constructor == String ? t && t.encoding === "binary" ? i = l.stringToBytes(i) : i = s.stringToBytes(i) : e(i) ? i = Array.prototype.slice.call(i, 0) : !Array.isArray(i) && i.constructor !== Uint8Array && (i = i.toString());
|
|
3009
3009
|
for (var d = r.bytesToWords(i), S = i.length * 8, f = 1732584193, v = -271733879, c = -1732584194, o = 271733878, m = 0; m < d.length; m++)
|
|
3010
3010
|
d[m] = (d[m] << 8 | d[m] >>> 24) & 16711935 | (d[m] << 24 | d[m] >>> 8) & 4278255360;
|
|
3011
3011
|
d[S >>> 5] |= 128 << S % 32, d[(S + 64 >>> 9 << 4) + 14] = S;
|
|
@@ -3066,16 +3066,16 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3066
3066
|
"toggleExpand",
|
|
3067
3067
|
"node-init"
|
|
3068
3068
|
], ["update:modelValue", "update:selectedRows"]),
|
|
3069
|
-
setup(r, { expose:
|
|
3069
|
+
setup(r, { expose: s, emit: e }) {
|
|
3070
3070
|
var lt, Be, Ze, Je, Ke, Ct, xt;
|
|
3071
|
-
const l = re(""), n = r, i = e, t = ot(r, "modelValue"), d = Yt("options"), S = re({}), f = re(!0), v = Object.entries(t.value).filter(([a,
|
|
3071
|
+
const l = re(""), n = r, i = e, t = ot(r, "modelValue"), d = Yt("options"), S = re({}), f = re(!0), v = Object.entries(t.value).filter(([a, u]) => (u == null ? void 0 : u.search) !== void 0).map(([a, u]) => {
|
|
3072
3072
|
var C;
|
|
3073
3073
|
let y;
|
|
3074
|
-
if (typeof
|
|
3075
|
-
const I =
|
|
3076
|
-
y = (I == null ? void 0 : I.value) ??
|
|
3074
|
+
if (typeof u.search == "function") {
|
|
3075
|
+
const I = u.search(S.value);
|
|
3076
|
+
y = (I == null ? void 0 : I.value) ?? u.value;
|
|
3077
3077
|
} else
|
|
3078
|
-
y = ((C =
|
|
3078
|
+
y = ((C = u.search) == null ? void 0 : C.value) ?? u.value;
|
|
3079
3079
|
return [a, y];
|
|
3080
3080
|
});
|
|
3081
3081
|
S.value = Object.fromEntries(v);
|
|
@@ -3120,11 +3120,11 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3120
3120
|
load: async () => {
|
|
3121
3121
|
const a = Number(await Va(K.value));
|
|
3122
3122
|
a && a > 0 && (t.value.table.page.pageSize = a);
|
|
3123
|
-
let { currentPage:
|
|
3123
|
+
let { currentPage: u, pageSize: y } = t.value.table.page;
|
|
3124
3124
|
try {
|
|
3125
3125
|
i(
|
|
3126
3126
|
"load",
|
|
3127
|
-
{ currentPage:
|
|
3127
|
+
{ currentPage: u, pageSize: y, ...S.value },
|
|
3128
3128
|
(C = [], I = 0, { fields: F = [], sums: R = {} } = {}) => {
|
|
3129
3129
|
var ye;
|
|
3130
3130
|
if (!Array.isArray(C)) {
|
|
@@ -3143,11 +3143,11 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3143
3143
|
console.error("触发 load 事件时出现错误:", C), ft.error("数据加载时出现错误,请稍后重试。");
|
|
3144
3144
|
}
|
|
3145
3145
|
},
|
|
3146
|
-
onHeaderDragend: (a,
|
|
3146
|
+
onHeaderDragend: (a, u, y) => {
|
|
3147
3147
|
Ca(K.value, y.property, a);
|
|
3148
3148
|
},
|
|
3149
|
-
onRowDblclick: (a,
|
|
3150
|
-
t.value.table.dblclickType == "edit" ? M(a,
|
|
3149
|
+
onRowDblclick: (a, u, y) => {
|
|
3150
|
+
t.value.table.dblclickType == "edit" ? M(a, u, y, t) : t.value.table.dblclickType == "view" ? O(a, u, y, t) : t.value.table.dblclickType == "delete" ? D(a, u, y, t) : t.value.table.dblclickType(a, u, y, t);
|
|
3151
3151
|
},
|
|
3152
3152
|
style: { "min-height": "100px", backgroundColor: "var(--el-bg-color)" },
|
|
3153
3153
|
page: {
|
|
@@ -3173,8 +3173,8 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3173
3173
|
}
|
|
3174
3174
|
},
|
|
3175
3175
|
dblclickType: "edit",
|
|
3176
|
-
"summary-method": ({ columns: a, data:
|
|
3177
|
-
onSortChange: ({ column: a, prop:
|
|
3176
|
+
"summary-method": ({ columns: a, data: u }, y) => y,
|
|
3177
|
+
onSortChange: ({ column: a, prop: u, order: y }, C) => {
|
|
3178
3178
|
},
|
|
3179
3179
|
onSelectionChange: (a) => {
|
|
3180
3180
|
te.value = a;
|
|
@@ -3197,7 +3197,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3197
3197
|
fixed: "right",
|
|
3198
3198
|
style: { ...(Be = (lt = t.value) == null ? void 0 : lt.control) == null ? void 0 : Be.style },
|
|
3199
3199
|
validate: async (a) => await !0,
|
|
3200
|
-
view: (a,
|
|
3200
|
+
view: (a, u, y, C) => ({
|
|
3201
3201
|
label: "详情",
|
|
3202
3202
|
text: !0,
|
|
3203
3203
|
type: "success",
|
|
@@ -3210,7 +3210,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3210
3210
|
return !(((I = C == null ? void 0 : C.control) == null ? void 0 : I.add(a, C).inline) === !0 && y === 0);
|
|
3211
3211
|
}
|
|
3212
3212
|
}),
|
|
3213
|
-
edit: (a,
|
|
3213
|
+
edit: (a, u, y, C) => ({
|
|
3214
3214
|
label: "编辑",
|
|
3215
3215
|
text: !0,
|
|
3216
3216
|
type: "primary",
|
|
@@ -3221,7 +3221,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3221
3221
|
return ((I = C == null ? void 0 : C.control) == null ? void 0 : I.add(a, C).inline) !== !0;
|
|
3222
3222
|
}
|
|
3223
3223
|
}),
|
|
3224
|
-
delete: (a,
|
|
3224
|
+
delete: (a, u, y, C) => ({
|
|
3225
3225
|
text: !0,
|
|
3226
3226
|
label: "删除",
|
|
3227
3227
|
type: "danger",
|
|
@@ -3240,7 +3240,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
3242
|
}),
|
|
3243
|
-
save: (a,
|
|
3243
|
+
save: (a, u, y, C) => {
|
|
3244
3244
|
var I, F;
|
|
3245
3245
|
return {
|
|
3246
3246
|
label: ((I = C.control) == null ? void 0 : I.add(a, C).inline) !== !0 ? "保存" : y === 0 ? "新增" : "保存",
|
|
@@ -3254,7 +3254,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
};
|
|
3256
3256
|
},
|
|
3257
|
-
add: (a,
|
|
3257
|
+
add: (a, u) => ({
|
|
3258
3258
|
label: "新增",
|
|
3259
3259
|
text: !1,
|
|
3260
3260
|
type: "primary",
|
|
@@ -3263,7 +3263,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3263
3263
|
icon: () => Ce(jl),
|
|
3264
3264
|
auth: () => !0
|
|
3265
3265
|
}),
|
|
3266
|
-
toggleExpand: (a,
|
|
3266
|
+
toggleExpand: (a, u) => ({
|
|
3267
3267
|
label: "展开/收起",
|
|
3268
3268
|
text: !1,
|
|
3269
3269
|
type: "primary",
|
|
@@ -3271,7 +3271,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3271
3271
|
icon: () => Ce(rl),
|
|
3272
3272
|
auth: () => !1
|
|
3273
3273
|
}),
|
|
3274
|
-
batch: (a,
|
|
3274
|
+
batch: (a, u) => ({
|
|
3275
3275
|
label: "批量操作",
|
|
3276
3276
|
text: !1,
|
|
3277
3277
|
type: "primary",
|
|
@@ -3279,7 +3279,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3279
3279
|
icon: () => Ce(Ht),
|
|
3280
3280
|
auth: () => !1
|
|
3281
3281
|
}),
|
|
3282
|
-
download: (a,
|
|
3282
|
+
download: (a, u) => ({
|
|
3283
3283
|
label: "下载",
|
|
3284
3284
|
text: !1,
|
|
3285
3285
|
type: "primary",
|
|
@@ -3288,7 +3288,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3288
3288
|
excelLabel: "下载EXCEL",
|
|
3289
3289
|
auth: () => !0
|
|
3290
3290
|
}),
|
|
3291
|
-
setting: (a,
|
|
3291
|
+
setting: (a, u) => ({
|
|
3292
3292
|
label: "设置列",
|
|
3293
3293
|
text: !1,
|
|
3294
3294
|
type: "primary",
|
|
@@ -3296,7 +3296,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3296
3296
|
icon: () => Ce(Ll),
|
|
3297
3297
|
auth: () => !0
|
|
3298
3298
|
}),
|
|
3299
|
-
dropdown: (a,
|
|
3299
|
+
dropdown: (a, u, y, C) => ({
|
|
3300
3300
|
label: "编辑",
|
|
3301
3301
|
operate: "edit",
|
|
3302
3302
|
"split-button": !0,
|
|
@@ -3304,8 +3304,8 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3304
3304
|
auth: () => !(C.control.add(a, C).inline === !0 && y == 0),
|
|
3305
3305
|
onClick: () => {
|
|
3306
3306
|
var F;
|
|
3307
|
-
let I = (F = Te(a,
|
|
3308
|
-
I === "edit" ? M(a,
|
|
3307
|
+
let I = (F = Te(a, u, y, C)) == null ? void 0 : F.operate;
|
|
3308
|
+
I === "edit" ? M(a, u, y, C) : I === "delete" ? D(a, u, y, C) : I === "view" && O(a, u, y, C);
|
|
3309
3309
|
},
|
|
3310
3310
|
"button-props": { round: !0, plain: !0 }
|
|
3311
3311
|
})
|
|
@@ -3315,8 +3315,8 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3315
3315
|
d == null ? void 0 : d.control,
|
|
3316
3316
|
(Ze = t.value) == null ? void 0 : Ze.control
|
|
3317
3317
|
);
|
|
3318
|
-
const me = (a,
|
|
3319
|
-
const y = t.value.control[a], C =
|
|
3318
|
+
const me = (a, u = !0) => {
|
|
3319
|
+
const y = t.value.control[a], C = u ? (I, F, R, ye) => {
|
|
3320
3320
|
var Fe, et, ht;
|
|
3321
3321
|
if (!I || !F || R == null)
|
|
3322
3322
|
return console.warn(`merge${a.charAt(0).toUpperCase() + a.slice(1)}: 缺少必要的参数(row, column或index)`), {};
|
|
@@ -3330,18 +3330,18 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3330
3330
|
t.value.control[a] = C;
|
|
3331
3331
|
};
|
|
3332
3332
|
me("edit"), me("delete"), me("view"), me("save"), me("add", !1), me("download", !1), me("setting", !1), me("batch", !1), me("toggleExpand", !1);
|
|
3333
|
-
const Te = (a,
|
|
3333
|
+
const Te = (a, u, y, C) => {
|
|
3334
3334
|
var ye, _e, De, Ae, Fe, et;
|
|
3335
|
-
if (!a || !
|
|
3335
|
+
if (!a || !u || y == null)
|
|
3336
3336
|
return console.warn("mergeDropdown: 缺少必要的参数(row, column或index)"), {};
|
|
3337
|
-
const I = ((ye = ue.dropdown) == null ? void 0 : ye.call(ue, a,
|
|
3337
|
+
const I = ((ye = ue.dropdown) == null ? void 0 : ye.call(ue, a, u, y, C)) || {}, F = ((De = (_e = d == null ? void 0 : d.control) == null ? void 0 : _e.dropdown) == null ? void 0 : De.call(_e, a, u, y, C)) || {}, R = ((et = (Fe = (Ae = t.value) == null ? void 0 : Ae.control) == null ? void 0 : Fe.dropdown) == null ? void 0 : et.call(Fe, a, u, y, C)) || {};
|
|
3338
3338
|
return Ue(I, F, R) || {};
|
|
3339
3339
|
}, Oe = {
|
|
3340
3340
|
type: "hidden",
|
|
3341
3341
|
"min-width": 100,
|
|
3342
3342
|
align: "center",
|
|
3343
|
-
formatter: (a,
|
|
3344
|
-
"tooltip-formatter": ({ row: a, column:
|
|
3343
|
+
formatter: (a, u, y, C) => y,
|
|
3344
|
+
"tooltip-formatter": ({ row: a, column: u, cellValue: y }) => Ce(Fa, { content: y, column: u })
|
|
3345
3345
|
};
|
|
3346
3346
|
t.value.tableColumns = Ue(
|
|
3347
3347
|
Oe,
|
|
@@ -3387,11 +3387,11 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3387
3387
|
d == null ? void 0 : d.dialog,
|
|
3388
3388
|
(xt = t.value) == null ? void 0 : xt.dialog
|
|
3389
3389
|
);
|
|
3390
|
-
const Ve = (a,
|
|
3391
|
-
let y =
|
|
3392
|
-
if (a.precision && !isNaN(parseFloat(
|
|
3390
|
+
const Ve = (a, u) => {
|
|
3391
|
+
let y = u;
|
|
3392
|
+
if (a.precision && !isNaN(parseFloat(u)) && (typeof a.precision == "number" ? y = parseFloat(y).toFixed(a.precision) : typeof a.precision == "object" && a.precision.num && (a.precision.pad ? y = parseFloat(y).toFixed(a.precision.num) : y = parseFloat(
|
|
3393
3393
|
parseFloat(y).toFixed(a.precision.num)
|
|
3394
|
-
).toString())), ["date", "datetime", "time", "time-select"].includes(a.type) && It(
|
|
3394
|
+
).toString())), ["date", "datetime", "time", "time-select"].includes(a.type) && It(u).isValid()) {
|
|
3395
3395
|
const I = {
|
|
3396
3396
|
date: "YYYY-MM-DD",
|
|
3397
3397
|
datetime: "YYYY-MM-DD HH:mm:ss",
|
|
@@ -3406,52 +3406,52 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3406
3406
|
S.value = Object.fromEntries(v), t.value.table.load();
|
|
3407
3407
|
}, w = (a) => {
|
|
3408
3408
|
S.value = a, t.value.table.load();
|
|
3409
|
-
}, $ = async (a = k.value,
|
|
3409
|
+
}, $ = async (a = k.value, u) => {
|
|
3410
3410
|
var y, C;
|
|
3411
3411
|
t.value.form.modalState = "add", l.value = "add";
|
|
3412
3412
|
try {
|
|
3413
|
-
if (!await ((y = t.value.control) == null ? void 0 : y.validate("add", { row: k.value, m:
|
|
3413
|
+
if (!await ((y = t.value.control) == null ? void 0 : y.validate("add", { row: k.value, m: u, node: n.node }))) return;
|
|
3414
3414
|
} catch (I) {
|
|
3415
3415
|
console.error("验证失败:", I);
|
|
3416
3416
|
return;
|
|
3417
3417
|
}
|
|
3418
|
-
(C = t.value.control.add(k.value,
|
|
3418
|
+
(C = t.value.control.add(k.value, u)) != null && C.click ? t.value.control.add(k.value, u).click(k.value, u) : (t.value.control.add(k.value, u).inline === !0 ? (t.value.table.data.unshift({ ...k.value }), await rt(), i("open", "row-add", { row: k.value, node: n.node })) : (t.value.form.disabled = !1, t.value.dialog.mode = t.value.control.add(k.value, u).mode, t.value.dialog.title = t.value.control.add(k.value, u).title || t.value.control.add(k.value, u).label || "新增", Object.keys(k.value).forEach((I) => {
|
|
3419
3419
|
t.value[I] && (t.value[I].value = k.value[I]);
|
|
3420
|
-
}), c.value = !0, await rt(), i("open", "add", { row: k.value, node: n.node, m:
|
|
3420
|
+
}), c.value = !0, await rt(), i("open", "add", { row: k.value, node: n.node, m: u }), wt()), await rt(), i("node-init", { row: k.value, node: n.node, m: u }));
|
|
3421
3421
|
}, g = () => {
|
|
3422
3422
|
i("batch", te.value);
|
|
3423
|
-
}, h = (a,
|
|
3423
|
+
}, h = (a, u) => {
|
|
3424
3424
|
i("toggleExpand", a), console.log(t.value.table["default-expand-all"]), f.value = !1, t.value.table["default-expand-all"] = !t.value.table["default-expand-all"], rt(() => {
|
|
3425
3425
|
f.value = !0;
|
|
3426
3426
|
});
|
|
3427
|
-
}, M = async (a,
|
|
3427
|
+
}, M = async (a, u, y, C) => {
|
|
3428
3428
|
var I, F;
|
|
3429
3429
|
t.value.form.modalState = "edit", l.value = "edit";
|
|
3430
3430
|
try {
|
|
3431
|
-
if (!await ((I = t.value.control) == null ? void 0 : I.validate("edit", { row: a, column:
|
|
3431
|
+
if (!await ((I = t.value.control) == null ? void 0 : I.validate("edit", { row: a, column: u, index: y, m: C }))) return;
|
|
3432
3432
|
} catch (R) {
|
|
3433
3433
|
console.error("验证失败:", R);
|
|
3434
3434
|
return;
|
|
3435
3435
|
}
|
|
3436
|
-
(F = t.value.control.edit(a,
|
|
3436
|
+
(F = t.value.control.edit(a, u, y, C)) != null && F.click ? t.value.control.edit(a, u, y, C).click(a, u, y, C) : (t.value.form.disabled = !1, t.value.dialog.mode = t.value.control.edit(a, u, y, C).mode, t.value.dialog.title = t.value.control.edit(a, u, y, C).title || t.value.control.edit(a, u, y, C).label || "编辑", Object.keys(a).forEach((R) => {
|
|
3437
3437
|
t.value[R] && (t.value[R].value = a[R]);
|
|
3438
|
-
}), c.value = !0, await rt(), i("open", "edit", { m: C, row: a, column:
|
|
3439
|
-
}, D = async (a,
|
|
3438
|
+
}), c.value = !0, await rt(), i("open", "edit", { m: C, row: a, column: u, index: y }), wt());
|
|
3439
|
+
}, D = async (a, u, y, C) => {
|
|
3440
3440
|
var I, F;
|
|
3441
3441
|
try {
|
|
3442
|
-
if (!await ((I = t.value.control) == null ? void 0 : I.validate("delete", { row: a, column:
|
|
3442
|
+
if (!await ((I = t.value.control) == null ? void 0 : I.validate("delete", { row: a, column: u, index: y, m: C }))) return;
|
|
3443
3443
|
} catch (R) {
|
|
3444
3444
|
console.error("验证失败:", R);
|
|
3445
3445
|
return;
|
|
3446
3446
|
}
|
|
3447
|
-
if ((F = t.value.control.delete(a,
|
|
3448
|
-
t.value.control.delete(a,
|
|
3447
|
+
if ((F = t.value.control.delete(a, u, y, C)) != null && F.click)
|
|
3448
|
+
t.value.control.delete(a, u, y, C).click(a, u, y, C);
|
|
3449
3449
|
else {
|
|
3450
|
-
let { message: R, title: ye, options: _e } = t.value.control.delete(a,
|
|
3450
|
+
let { message: R, title: ye, options: _e } = t.value.control.delete(a, u, y, C).dialog;
|
|
3451
3451
|
Qt.confirm(R, ye, _e).then(() => {
|
|
3452
3452
|
i(
|
|
3453
3453
|
"delete",
|
|
3454
|
-
{ row: a, column:
|
|
3454
|
+
{ row: a, column: u, index: y, m: C },
|
|
3455
3455
|
(De = !0, Ae = !1) => {
|
|
3456
3456
|
De && (t.value.table.data.splice(y, 1), t.value.table.page.total--), Ae && t.value.table.load();
|
|
3457
3457
|
}
|
|
@@ -3459,18 +3459,18 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3459
3459
|
}).catch(() => {
|
|
3460
3460
|
});
|
|
3461
3461
|
}
|
|
3462
|
-
}, O = async (a,
|
|
3462
|
+
}, O = async (a, u, y, C) => {
|
|
3463
3463
|
var I, F, R, ye;
|
|
3464
3464
|
t.value.form.modalState = void 0, l.value = "view";
|
|
3465
3465
|
try {
|
|
3466
|
-
if (!await ((I = t.value.control) == null ? void 0 : I.validate("view", { row: a, column:
|
|
3466
|
+
if (!await ((I = t.value.control) == null ? void 0 : I.validate("view", { row: a, column: u, index: y, m: C }))) return;
|
|
3467
3467
|
} catch (_e) {
|
|
3468
3468
|
console.error("验证失败:", _e);
|
|
3469
3469
|
return;
|
|
3470
3470
|
}
|
|
3471
|
-
(F = t.value.control.view(a,
|
|
3471
|
+
(F = t.value.control.view(a, u, y, C)) != null && F.click ? t.value.control.view(a, u, y, C).click(a, u, y, C) : (t.value.form.disabled = !0, t.value.dialog.mode = t.value.control.view(a, u, y, C).mode, t.value.dialog.title = t.value.control.view(a, u, y, C).title || t.value.control.view(a, u, y, C).label || "详情", Object.keys(a).forEach((_e) => {
|
|
3472
3472
|
t.value[_e] && (t.value[_e].value = a[_e]);
|
|
3473
|
-
}), ((R = t.value.control.view(a,
|
|
3473
|
+
}), ((R = t.value.control.view(a, u, y, C)) == null ? void 0 : R["view-mode"]) === "description" ? qt({
|
|
3474
3474
|
...t.value.dialog,
|
|
3475
3475
|
type: t.value.dialog.mode,
|
|
3476
3476
|
slots: {
|
|
@@ -3479,18 +3479,18 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3479
3479
|
return Ce(pl, {
|
|
3480
3480
|
row: a,
|
|
3481
3481
|
m: C,
|
|
3482
|
-
container: ((_e = t.value.control.view(a,
|
|
3483
|
-
}, ((Ae = (De = t.value.control.view(a,
|
|
3482
|
+
container: ((_e = t.value.control.view(a, u, y, C)) == null ? void 0 : _e.container) || {}
|
|
3483
|
+
}, ((Ae = (De = t.value.control.view(a, u, y, C)) == null ? void 0 : De.container) == null ? void 0 : Ae.slots) || {});
|
|
3484
3484
|
}
|
|
3485
3485
|
}
|
|
3486
|
-
}) : ((ye = t.value.control.view(a,
|
|
3487
|
-
}, Y = (a,
|
|
3488
|
-
Object.assign(a,
|
|
3489
|
-
}, le = (a,
|
|
3490
|
-
const I = t.value.control.save(a,
|
|
3491
|
-
I != null && I.click ? I.click(a,
|
|
3486
|
+
}) : ((ye = t.value.control.view(a, u, y, C)) == null ? void 0 : ye["view-mode"]) === "readonly" && (c.value = !0, wt()), await rt(), i("open", "view", { m: C, row: a, column: u, index: y }));
|
|
3487
|
+
}, Y = (a, u = k.value) => {
|
|
3488
|
+
Object.assign(a, u);
|
|
3489
|
+
}, le = (a, u, y, C) => {
|
|
3490
|
+
const I = t.value.control.save(a, u, y, C);
|
|
3491
|
+
I != null && I.click ? I.click(a, u, y, C) : i(
|
|
3492
3492
|
"row-save",
|
|
3493
|
-
{ row: a, column:
|
|
3493
|
+
{ row: a, column: u, index: y, data: t.value.table.data },
|
|
3494
3494
|
async (F = !0, R = !0) => {
|
|
3495
3495
|
if (F && t.value.table.load(), R && y === 0) {
|
|
3496
3496
|
const ye = Object.entries(t.value).filter(
|
|
@@ -3503,27 +3503,28 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
}
|
|
3505
3505
|
);
|
|
3506
|
-
}, de = yr((a,
|
|
3507
|
-
i("submit", t.value.form.modalState, a,
|
|
3508
|
-
C && (y === 1 && (c.value = !1), Y(a),
|
|
3506
|
+
}, de = yr((a, u, y) => {
|
|
3507
|
+
i("submit", t.value.form.modalState, a, u, (C) => {
|
|
3508
|
+
C && (y === 1 && (c.value = !1), Y(a), u.table.load());
|
|
3509
3509
|
});
|
|
3510
|
-
}, 300), ge = (a,
|
|
3511
|
-
Y(a), i("reset", a,
|
|
3512
|
-
}, N = (a,
|
|
3510
|
+
}, 300), ge = (a, u) => {
|
|
3511
|
+
Y(a), i("reset", a, u);
|
|
3512
|
+
}, N = (a, u, y) => {
|
|
3513
3513
|
var C;
|
|
3514
|
-
if ((C =
|
|
3515
|
-
|
|
3514
|
+
if ((C = u.control.download(a, u)) != null && C.click)
|
|
3515
|
+
u.control.download(a, u).click(a, u, y);
|
|
3516
3516
|
else {
|
|
3517
3517
|
let I = qt(
|
|
3518
3518
|
{
|
|
3519
|
-
title:
|
|
3520
|
-
size:
|
|
3521
|
-
width:
|
|
3522
|
-
type:
|
|
3519
|
+
title: u.control.download(a, u).title || u.control.download(a, u).label || "下载",
|
|
3520
|
+
size: u.control.download(a, u).size || 480,
|
|
3521
|
+
width: u.control.download(a, u).width || 580,
|
|
3522
|
+
type: u.control.download(a, u).mode || "dialog",
|
|
3523
|
+
alignCenter: u.control.download(a, u).alignCenter || !0,
|
|
3523
3524
|
slots: {
|
|
3524
3525
|
default: () => Ce(wa, {
|
|
3525
3526
|
items: y,
|
|
3526
|
-
commitText:
|
|
3527
|
+
commitText: u.control.download(a, u).excelLabel,
|
|
3527
3528
|
onExcel: (F, R) => {
|
|
3528
3529
|
i("download", F, S.value, R), I();
|
|
3529
3530
|
}
|
|
@@ -3532,17 +3533,18 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3532
3533
|
}
|
|
3533
3534
|
);
|
|
3534
3535
|
}
|
|
3535
|
-
}, G = (a,
|
|
3536
|
+
}, G = (a, u) => {
|
|
3536
3537
|
var y;
|
|
3537
|
-
(y =
|
|
3538
|
+
(y = u.control.setting(a, u)) != null && y.click ? u.control.setting(a, u).click(a, u) : qt(
|
|
3538
3539
|
{
|
|
3539
|
-
title:
|
|
3540
|
-
size:
|
|
3541
|
-
width:
|
|
3542
|
-
type:
|
|
3540
|
+
title: u.control.setting(a, u).title || u.control.setting(a, u).label || "设置",
|
|
3541
|
+
size: u.control.setting(a, u).size || 470,
|
|
3542
|
+
width: u.control.setting(a, u).width || 600,
|
|
3543
|
+
type: u.control.setting(a, u).mode || "dialog",
|
|
3544
|
+
alignCenter: u.control.setting(a, u).alignCenter || !0,
|
|
3543
3545
|
slots: {
|
|
3544
3546
|
default: () => Ce(Ua, {
|
|
3545
|
-
modelValue:
|
|
3547
|
+
modelValue: u,
|
|
3546
3548
|
tuid: K.value,
|
|
3547
3549
|
onSettingDragEnd: async () => {
|
|
3548
3550
|
await qe(K.value);
|
|
@@ -3564,8 +3566,8 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3564
3566
|
edit: M,
|
|
3565
3567
|
delete: D,
|
|
3566
3568
|
save: le
|
|
3567
|
-
}, ze = (a,
|
|
3568
|
-
const R = Ee == null ? void 0 : Ee[F](
|
|
3569
|
+
}, ze = (a, u, y, C, I) => a.filter((F) => ke[F]).map((F) => {
|
|
3570
|
+
const R = Ee == null ? void 0 : Ee[F](u, y, C, I);
|
|
3569
3571
|
return {
|
|
3570
3572
|
name: `control-${F}`,
|
|
3571
3573
|
attr: R,
|
|
@@ -3574,14 +3576,14 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3574
3576
|
sort: (R == null ? void 0 : R.sort) || 0,
|
|
3575
3577
|
groupName: (R == null ? void 0 : R.groupName) || "default"
|
|
3576
3578
|
};
|
|
3577
|
-
}).sort((F, R) => F.sort - R.sort), xe = (a,
|
|
3579
|
+
}).sort((F, R) => F.sort - R.sort), xe = (a, u, y, C, I) => ze(a, u, y, C, I).reduce((F, R) => {
|
|
3578
3580
|
const ye = R.groupName || "default";
|
|
3579
3581
|
return F[ye] || (F[ye] = []), F[ye].push(R), F;
|
|
3580
3582
|
}, {}), He = Pe(() => Object.fromEntries(
|
|
3581
3583
|
Object.entries(t.value).filter(
|
|
3582
|
-
([a,
|
|
3583
|
-
).map(([a,
|
|
3584
|
-
)), Ne = re({}), z = (a,
|
|
3584
|
+
([a, u]) => u.type !== "hidden" && u.hidden !== !0 && u.visible !== !1 && u.showCol !== !1
|
|
3585
|
+
).map(([a, u]) => (u.sort = typeof u.sort == "number" ? u.sort : 0, [a, u])).sort((a, u) => a[1].sort - u[1].sort)
|
|
3586
|
+
)), Ne = re({}), z = (a, u) => {
|
|
3585
3587
|
const y = (C, I) => {
|
|
3586
3588
|
for (const F of C) {
|
|
3587
3589
|
if (F.value == I) return F.label;
|
|
@@ -3593,7 +3595,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3593
3595
|
return null;
|
|
3594
3596
|
};
|
|
3595
3597
|
if (a.getDicts) {
|
|
3596
|
-
const C =
|
|
3598
|
+
const C = u.toString();
|
|
3597
3599
|
return Ne.value[C] ? (a.options = Ne.value[C], a.formatter || (a.formatter = (I, F, R, ye) => a.options && y(a.options, R) || R), Promise.resolve()) : a.getDicts(t.value.table.data).then((I) => {
|
|
3598
3600
|
Ne.value[C] = I, a.options = I, a.formatter || (a.formatter = (F, R, ye, _e) => a.options && y(a.options, ye) || ye);
|
|
3599
3601
|
});
|
|
@@ -3601,16 +3603,16 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3601
3603
|
return Promise.resolve();
|
|
3602
3604
|
}, T = async () => {
|
|
3603
3605
|
try {
|
|
3604
|
-
const
|
|
3606
|
+
const u = Object.keys(t.value).filter((y) => t.value[y].getDicts).map(
|
|
3605
3607
|
(y) => z(t.value[y], y)
|
|
3606
3608
|
);
|
|
3607
|
-
await Promise.all(
|
|
3609
|
+
await Promise.all(u);
|
|
3608
3610
|
} catch (a) {
|
|
3609
3611
|
console.error("字典加载过程中发生错误:", a);
|
|
3610
3612
|
}
|
|
3611
|
-
}, X = (a,
|
|
3613
|
+
}, X = (a, u, y, C) => {
|
|
3612
3614
|
var I, F;
|
|
3613
|
-
return a.table ? (I = a.table(
|
|
3615
|
+
return a.table ? (I = a.table(u, y, C)) != null && I.auth ? (F = a.table(u, y, C)) == null ? void 0 : F.auth(u, y, C) : !0 : !1;
|
|
3614
3616
|
}, Ie = () => {
|
|
3615
3617
|
c.value = !1;
|
|
3616
3618
|
};
|
|
@@ -3619,7 +3621,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3619
3621
|
});
|
|
3620
3622
|
const qe = async () => {
|
|
3621
3623
|
try {
|
|
3622
|
-
const [a,
|
|
3624
|
+
const [a, u, y] = await Promise.all([
|
|
3623
3625
|
xa(K.value),
|
|
3624
3626
|
Da(K.value),
|
|
3625
3627
|
Ma(K.value)
|
|
@@ -3627,7 +3629,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3627
3629
|
a && Array.isArray(a) && a.forEach((C) => {
|
|
3628
3630
|
const I = t.value[C.key];
|
|
3629
3631
|
I && (I.width = C.width);
|
|
3630
|
-
}),
|
|
3632
|
+
}), u && Array.isArray(u) && u.forEach((C, I) => {
|
|
3631
3633
|
const F = t.value[C];
|
|
3632
3634
|
F && (F.sort = I);
|
|
3633
3635
|
}), y && Array.isArray(y) && y.length > 0 ? y.forEach((C) => {
|
|
@@ -3637,8 +3639,8 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3637
3639
|
t.value[C].showCol = !0;
|
|
3638
3640
|
});
|
|
3639
3641
|
} catch (a) {
|
|
3640
|
-
console.error("加载表格信息时出错:", a), Object.keys(t.value).filter((
|
|
3641
|
-
t.value[
|
|
3642
|
+
console.error("加载表格信息时出错:", a), Object.keys(t.value).filter((u) => t.value[u].type !== "control").forEach((u) => {
|
|
3643
|
+
t.value[u].showCol === void 0 && (t.value[u].showCol = !0);
|
|
3642
3644
|
});
|
|
3643
3645
|
}
|
|
3644
3646
|
}, je = () => Ga(Object.keys(t.value).toString()).toUpperCase().substring(8, 24);
|
|
@@ -3647,29 +3649,29 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3647
3649
|
}), _t(async () => {
|
|
3648
3650
|
try {
|
|
3649
3651
|
m.value = Object.entries(t.value).filter(
|
|
3650
|
-
([
|
|
3651
|
-
).map(([
|
|
3652
|
-
key:
|
|
3652
|
+
([u, y]) => y.type !== "hidden" && y.type !== "control" && y.visible !== !1
|
|
3653
|
+
).map(([u, y]) => ({
|
|
3654
|
+
key: u || "",
|
|
3653
3655
|
label: y.label,
|
|
3654
3656
|
value: !0
|
|
3655
3657
|
})), await rt();
|
|
3656
3658
|
const a = Object.entries(t.value).filter(
|
|
3657
|
-
([
|
|
3659
|
+
([u, y]) => y.type !== "control" && y.type !== "hidden"
|
|
3658
3660
|
);
|
|
3659
3661
|
k.value = Object.fromEntries(
|
|
3660
|
-
a.map(([
|
|
3662
|
+
a.map(([u, y]) => [u, y.value])
|
|
3661
3663
|
), await qe(), t.value.table.autoWatch || t.value.table.load();
|
|
3662
3664
|
} catch (a) {
|
|
3663
3665
|
console.error("Error during component initialization:", a), t.value.table.autoWatch || t.value.table.load();
|
|
3664
3666
|
}
|
|
3665
|
-
}),
|
|
3667
|
+
}), s({ addRow: $, editRow: M, deleteRow: D, readForm: O, saveRowData: le, closeDialog: Ie, formData: k }), (a, u) => {
|
|
3666
3668
|
var De, Ae, Fe, et, ht, Mt, St;
|
|
3667
3669
|
const y = H("el-button-group"), C = H("el-dropdown-item"), I = H("el-dropdown-menu"), F = H("el-dropdown"), R = H("el-table-column"), ye = H("el-table"), _e = H("el-pagination");
|
|
3668
3670
|
return p(), U(ne, null, [
|
|
3669
3671
|
c.value ? (p(), V(Bt, q({
|
|
3670
3672
|
key: 0,
|
|
3671
3673
|
modelValue: c.value,
|
|
3672
|
-
"onUpdate:modelValue":
|
|
3674
|
+
"onUpdate:modelValue": u[2] || (u[2] = (Z) => c.value = Z)
|
|
3673
3675
|
}, t.value.dialog, {
|
|
3674
3676
|
type: t.value.dialog.mode
|
|
3675
3677
|
}), be({
|
|
@@ -3677,8 +3679,8 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3677
3679
|
c.value ? (p(), V(Ge(vl), {
|
|
3678
3680
|
key: 0,
|
|
3679
3681
|
modelValue: t.value,
|
|
3680
|
-
"onUpdate:modelValue":
|
|
3681
|
-
onSubmit:
|
|
3682
|
+
"onUpdate:modelValue": u[0] || (u[0] = (Z) => t.value = Z),
|
|
3683
|
+
onSubmit: u[1] || (u[1] = (Z, ve, ae) => L(de)(Z, ve, ae)),
|
|
3682
3684
|
onReset: ge,
|
|
3683
3685
|
flag: l.value
|
|
3684
3686
|
}, be({ _: 2 }, [
|
|
@@ -3729,9 +3731,9 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3729
3731
|
x(a.$slots, "query", {}, () => [
|
|
3730
3732
|
se(ua, {
|
|
3731
3733
|
modelValue: t.value,
|
|
3732
|
-
"onUpdate:modelValue":
|
|
3734
|
+
"onUpdate:modelValue": u[3] || (u[3] = (Z) => t.value = Z),
|
|
3733
3735
|
info: S.value,
|
|
3734
|
-
"onUpdate:info":
|
|
3736
|
+
"onUpdate:info": u[4] || (u[4] = (Z) => S.value = Z),
|
|
3735
3737
|
onQuery: w,
|
|
3736
3738
|
onReset: Qe
|
|
3737
3739
|
}, be({
|
|
@@ -3824,7 +3826,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
3824
3826
|
)
|
|
3825
3827
|
}, {
|
|
3826
3828
|
"summary-method": (Z) => t.value.table["summary-method"](Z, { fields: E.value, sums: j.value }),
|
|
3827
|
-
onSortChange:
|
|
3829
|
+
onSortChange: u[5] || (u[5] = (Z) => {
|
|
3828
3830
|
var ve, ae;
|
|
3829
3831
|
t.value.table.onSortChange(Z, S.value), ((ve = Z == null ? void 0 : Z.column) == null ? void 0 : ve.sortable) === "custom" && ((ae = t.value.table) == null || ae.load());
|
|
3830
3832
|
})
|
|
@@ -4110,9 +4112,9 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
4110
4112
|
(St = (Mt = (ht = t.value) == null ? void 0 : ht.table) == null ? void 0 : Mt.page) != null && St.hidden ? $e("", !0) : x(a.$slots, "page", { key: 1 }, () => [
|
|
4111
4113
|
se(_e, q({
|
|
4112
4114
|
"page-size": t.value.table.page.pageSize,
|
|
4113
|
-
"onUpdate:pageSize":
|
|
4115
|
+
"onUpdate:pageSize": u[6] || (u[6] = (Z) => t.value.table.page.pageSize = Z),
|
|
4114
4116
|
"current-page": t.value.table.page.currentPage,
|
|
4115
|
-
"onUpdate:currentPage":
|
|
4117
|
+
"onUpdate:currentPage": u[7] || (u[7] = (Z) => t.value.table.page.currentPage = Z)
|
|
4116
4118
|
}, t.value.table.page), {
|
|
4117
4119
|
default: _(() => [
|
|
4118
4120
|
x(a.$slots, "table-page", {}, void 0, !0)
|
|
@@ -4125,7 +4127,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
4125
4127
|
], 64);
|
|
4126
4128
|
};
|
|
4127
4129
|
}
|
|
4128
|
-
}), er = /* @__PURE__ */ nt(Ka, [["__scopeId", "data-v-
|
|
4130
|
+
}), er = /* @__PURE__ */ nt(Ka, [["__scopeId", "data-v-307159fe"]]), tr = { class: "g-tree-table" }, lr = { class: "g-tree-container" }, ar = { class: "g-tree-table-container" }, rr = /* @__PURE__ */ Object.assign({
|
|
4129
4131
|
name: "g-tree-table",
|
|
4130
4132
|
inheritAttrs: !1
|
|
4131
4133
|
}, {
|
|
@@ -4135,9 +4137,9 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
4135
4137
|
modelModifiers: {}
|
|
4136
4138
|
},
|
|
4137
4139
|
emits: /* @__PURE__ */ ut(["load"], ["update:modelValue"]),
|
|
4138
|
-
setup(r, { emit:
|
|
4140
|
+
setup(r, { emit: s }) {
|
|
4139
4141
|
var m, A, j, E;
|
|
4140
|
-
const e =
|
|
4142
|
+
const e = s, l = ot(r, "modelValue"), n = zt(), i = re(
|
|
4141
4143
|
typeof ((m = n == null ? void 0 : n.tree) == null ? void 0 : m.width) == "number" ? `${n.tree.width}px` : ((A = n == null ? void 0 : n.tree) == null ? void 0 : A.width) || "180px"
|
|
4142
4144
|
), t = re(((j = n == null ? void 0 : n.tree) == null ? void 0 : j.search) === void 0 ? !0 : (E = n == null ? void 0 : n.tree) == null ? void 0 : E.search), d = re({}), S = re(""), f = re(null), v = (k, Q) => {
|
|
4143
4145
|
var te, oe;
|
|
@@ -4241,9 +4243,9 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
4241
4243
|
}
|
|
4242
4244
|
},
|
|
4243
4245
|
setup(r) {
|
|
4244
|
-
const
|
|
4245
|
-
return (e, l) =>
|
|
4246
|
-
(p(!0), U(ne, null, P(
|
|
4246
|
+
const s = r;
|
|
4247
|
+
return (e, l) => s.title ? (p(), U("div", or, [
|
|
4248
|
+
(p(!0), U(ne, null, P(s.columns, (n) => (p(), U("span", {
|
|
4247
4249
|
style: Ye({ width: (n == null ? void 0 : n.width) || Gt, ...n == null ? void 0 : n.titleStyle, textAlign: (n == null ? void 0 : n.align) || "center" }),
|
|
4248
4250
|
key: n.key
|
|
4249
4251
|
}, [
|
|
@@ -4252,7 +4254,7 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
4252
4254
|
], !0)
|
|
4253
4255
|
], 4))), 128))
|
|
4254
4256
|
])) : (p(), U("div", ur, [
|
|
4255
|
-
(p(!0), U(ne, null, P(
|
|
4257
|
+
(p(!0), U(ne, null, P(s.columns, (n) => (p(), U("span", {
|
|
4256
4258
|
style: Ye({ width: (n == null ? void 0 : n.width) || Gt, textAlign: (n == null ? void 0 : n.align) || "center", ...n == null ? void 0 : n.style }),
|
|
4257
4259
|
key: n.key,
|
|
4258
4260
|
title: r.data[n.key]
|
|
@@ -4266,18 +4268,18 @@ const Ga = /* @__PURE__ */ il(Wa), Xa = { class: "g-table-container" }, Qa = {
|
|
|
4266
4268
|
}), dr = /* @__PURE__ */ nt(ir, [["__scopeId", "data-v-c0ac6b77"]]), cr = Object.freeze({}), Pt = [er, vl, nr, dr, Bt, pl];
|
|
4267
4269
|
let At = {};
|
|
4268
4270
|
const Mr = {
|
|
4269
|
-
install: (r,
|
|
4270
|
-
At = Object.freeze({ ...cr, ...
|
|
4271
|
+
install: (r, s = {}) => {
|
|
4272
|
+
At = Object.freeze({ ...cr, ...s }), Pt.forEach((e) => {
|
|
4271
4273
|
r.component(e.name, e);
|
|
4272
4274
|
}), r.provide("options", At), r.config.globalProperties.$openModal = vr, r.config.globalProperties.$open = qt;
|
|
4273
4275
|
}
|
|
4274
|
-
}, fr = (r) => ({ dialog: wl, drawer: $l })[r] || null, vr = (r = {},
|
|
4276
|
+
}, fr = (r) => ({ dialog: wl, drawer: $l })[r] || null, vr = (r = {}, s = "dialog") => {
|
|
4275
4277
|
if (typeof document > "u") return () => {
|
|
4276
4278
|
};
|
|
4277
4279
|
const e = document.createElement("div");
|
|
4278
4280
|
let l = () => {
|
|
4279
4281
|
};
|
|
4280
|
-
const n = fr(
|
|
4282
|
+
const n = fr(s);
|
|
4281
4283
|
if (!n) return () => {
|
|
4282
4284
|
};
|
|
4283
4285
|
const i = re(!0), t = tl({
|
|
@@ -4315,18 +4317,18 @@ const Mr = {
|
|
|
4315
4317
|
}, qt = (r = {}) => {
|
|
4316
4318
|
if (typeof document > "u") return () => {
|
|
4317
4319
|
};
|
|
4318
|
-
const
|
|
4320
|
+
const s = document.createElement("div");
|
|
4319
4321
|
let e = () => {
|
|
4320
4322
|
};
|
|
4321
4323
|
const l = re(!0), n = tl({
|
|
4322
4324
|
setup() {
|
|
4323
4325
|
e = () => {
|
|
4324
4326
|
l.value = !1, setTimeout(() => {
|
|
4325
|
-
n.unmount(),
|
|
4327
|
+
n.unmount(), s.remove();
|
|
4326
4328
|
}, 300);
|
|
4327
4329
|
}, el(l, (S) => {
|
|
4328
4330
|
S || setTimeout(() => {
|
|
4329
|
-
n.unmount(),
|
|
4331
|
+
n.unmount(), s.remove();
|
|
4330
4332
|
}, 300);
|
|
4331
4333
|
});
|
|
4332
4334
|
const { close: i, ...t } = r, d = {
|
|
@@ -4343,9 +4345,9 @@ const Mr = {
|
|
|
4343
4345
|
});
|
|
4344
4346
|
return Pt.forEach((i) => {
|
|
4345
4347
|
n.component(i.name, i);
|
|
4346
|
-
}), n.provide("options", At), n.use(Xt, { locale: sl }), document.body.appendChild(
|
|
4348
|
+
}), n.provide("options", At), n.use(Xt, { locale: sl }), document.body.appendChild(s), n.mount(s), e;
|
|
4347
4349
|
};
|
|
4348
|
-
function pr(r,
|
|
4350
|
+
function pr(r, s = window.innerWidth) {
|
|
4349
4351
|
if (typeof r == "number")
|
|
4350
4352
|
return r;
|
|
4351
4353
|
if (r.endsWith("px"))
|
|
@@ -4356,9 +4358,9 @@ function pr(r, u = window.innerWidth) {
|
|
|
4356
4358
|
if (r.endsWith("vw"))
|
|
4357
4359
|
return l * parseFloat(r) / 100;
|
|
4358
4360
|
if (r.endsWith("%")) {
|
|
4359
|
-
if (typeof
|
|
4361
|
+
if (typeof s != "number")
|
|
4360
4362
|
throw new Error("Reference size is required to convert % to px");
|
|
4361
|
-
return
|
|
4363
|
+
return s * parseFloat(r) / 100;
|
|
4362
4364
|
}
|
|
4363
4365
|
if (r.startsWith("calc(") && r.endsWith(")")) {
|
|
4364
4366
|
let i = function(d) {
|
|
@@ -4367,28 +4369,28 @@ function pr(r, u = window.innerWidth) {
|
|
|
4367
4369
|
throw new Error("Invalid calc expression");
|
|
4368
4370
|
};
|
|
4369
4371
|
const n = r.slice(5, -1).trim();
|
|
4370
|
-
return i(n.replace(/([0-9.]+)([a-z%]+)/g, (d, S, f) => pr(S + f,
|
|
4372
|
+
return i(n.replace(/([0-9.]+)([a-z%]+)/g, (d, S, f) => pr(S + f, s)));
|
|
4371
4373
|
}
|
|
4372
4374
|
throw new Error("Unsupported unit in value: " + r);
|
|
4373
4375
|
}
|
|
4374
4376
|
const Ue = (...r) => {
|
|
4375
|
-
const
|
|
4377
|
+
const s = {}, e = (l, n) => (Object.keys(n).forEach((i) => {
|
|
4376
4378
|
l[i] = typeof n[i] == "object" && !Array.isArray(n[i]) ? e(l[i] || {}, n[i]) : n[i];
|
|
4377
4379
|
}), l);
|
|
4378
|
-
return r.forEach((l = {}) => e(
|
|
4380
|
+
return r.forEach((l = {}) => e(s, l)), s;
|
|
4379
4381
|
};
|
|
4380
|
-
function Xe(r,
|
|
4382
|
+
function Xe(r, s = (e, l) => l != null) {
|
|
4381
4383
|
const e = {};
|
|
4382
4384
|
for (const l in r)
|
|
4383
|
-
r.hasOwnProperty(l) &&
|
|
4385
|
+
r.hasOwnProperty(l) && s(l, r[l]) && (e[l] = r[l]);
|
|
4384
4386
|
return e;
|
|
4385
4387
|
}
|
|
4386
|
-
function mr(r,
|
|
4388
|
+
function mr(r, s, e = "value", l = "label", n = "children") {
|
|
4387
4389
|
for (const i of r) {
|
|
4388
|
-
if (i[e] ===
|
|
4390
|
+
if (i[e] === s)
|
|
4389
4391
|
return i[l];
|
|
4390
4392
|
if (i[n] && i[n].length > 0) {
|
|
4391
|
-
const t = mr(i[n],
|
|
4393
|
+
const t = mr(i[n], s, e, l, n);
|
|
4392
4394
|
if (t)
|
|
4393
4395
|
return t;
|
|
4394
4396
|
}
|
|
@@ -4397,14 +4399,14 @@ function mr(r, u, e = "value", l = "label", n = "children") {
|
|
|
4397
4399
|
}
|
|
4398
4400
|
function Rt(r) {
|
|
4399
4401
|
if (!r || isNaN(r)) return "零";
|
|
4400
|
-
const
|
|
4402
|
+
const s = ["角", "分"], e = ["零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"], l = [
|
|
4401
4403
|
["元", "万", "亿"],
|
|
4402
4404
|
["", "拾", "佰", "仟"]
|
|
4403
4405
|
], n = r < 0 ? "欠" : "";
|
|
4404
4406
|
r = Math.abs(r);
|
|
4405
4407
|
let i = "";
|
|
4406
|
-
for (let t = 0; t <
|
|
4407
|
-
i += (e[Math.floor(r * 10 * Math.pow(10, t)) % 10] +
|
|
4408
|
+
for (let t = 0; t < s.length; t++)
|
|
4409
|
+
i += (e[Math.floor(r * 10 * Math.pow(10, t)) % 10] + s[t]).replace(/零./, "");
|
|
4408
4410
|
i = i || "整", r = Math.floor(r);
|
|
4409
4411
|
for (let t = 0; t < l[0].length && r > 0; t++) {
|
|
4410
4412
|
let d = "";
|
|
@@ -4414,31 +4416,31 @@ function Rt(r) {
|
|
|
4414
4416
|
}
|
|
4415
4417
|
return n + i.replace(/(零.)*零元/, "元").replace(/(零.)+/g, "零").replace(/^整$/, "零元整");
|
|
4416
4418
|
}
|
|
4417
|
-
function hr(r,
|
|
4419
|
+
function hr(r, s = 2, e = !1) {
|
|
4418
4420
|
let l = Number(r);
|
|
4419
4421
|
if (isNaN(l) || !isFinite(l))
|
|
4420
4422
|
return "0.00";
|
|
4421
4423
|
const n = l < 0;
|
|
4422
4424
|
l = Math.abs(l);
|
|
4423
|
-
let i = l.toFixed(
|
|
4425
|
+
let i = l.toFixed(s);
|
|
4424
4426
|
e && (i = i.replace(/\.?0+$/, ""));
|
|
4425
4427
|
const [t, d] = i.split("."), S = t.replace(/\B(?=(\d{3})+(?!\d))/g, ","), f = d ? `${S}.${d}` : S;
|
|
4426
4428
|
return n ? `-${f}` : f;
|
|
4427
4429
|
}
|
|
4428
|
-
function yr(r,
|
|
4430
|
+
function yr(r, s) {
|
|
4429
4431
|
let e = null;
|
|
4430
4432
|
return function(...l) {
|
|
4431
4433
|
e && clearTimeout(e), e = setTimeout(() => {
|
|
4432
4434
|
r.apply(this, l);
|
|
4433
|
-
},
|
|
4435
|
+
}, s);
|
|
4434
4436
|
};
|
|
4435
4437
|
}
|
|
4436
|
-
function Sr(r,
|
|
4438
|
+
function Sr(r, s) {
|
|
4437
4439
|
let e = null;
|
|
4438
4440
|
return function(...l) {
|
|
4439
4441
|
e || (e = setTimeout(() => {
|
|
4440
4442
|
r.apply(this, l), e = null;
|
|
4441
|
-
},
|
|
4443
|
+
}, s));
|
|
4442
4444
|
};
|
|
4443
4445
|
}
|
|
4444
4446
|
const Me = {
|
|
@@ -4475,8 +4477,8 @@ const Me = {
|
|
|
4475
4477
|
const r = document.querySelector(".el-dialog");
|
|
4476
4478
|
if (!r || r.querySelector(".dialog-resize-handle"))
|
|
4477
4479
|
return;
|
|
4478
|
-
const
|
|
4479
|
-
r.appendChild(
|
|
4480
|
+
const s = gr();
|
|
4481
|
+
r.appendChild(s), br(r), $r(r, s);
|
|
4480
4482
|
});
|
|
4481
4483
|
}, gr = () => {
|
|
4482
4484
|
const r = document.createElement("div");
|
|
@@ -4498,7 +4500,7 @@ const Me = {
|
|
|
4498
4500
|
resize: "none"
|
|
4499
4501
|
// 防止与原生resize冲突
|
|
4500
4502
|
});
|
|
4501
|
-
}, $r = (r,
|
|
4503
|
+
}, $r = (r, s) => {
|
|
4502
4504
|
let e = !1, l, n, i, t;
|
|
4503
4505
|
const d = (v) => {
|
|
4504
4506
|
v.preventDefault(), e = !0, l = v.clientX, n = v.clientY, i = parseInt(document.defaultView.getComputedStyle(r).width), t = parseInt(document.defaultView.getComputedStyle(r).height), document.addEventListener("mousemove", S), document.addEventListener("mouseup", f);
|
|
@@ -4509,7 +4511,7 @@ const Me = {
|
|
|
4509
4511
|
}, f = () => {
|
|
4510
4512
|
e = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", f);
|
|
4511
4513
|
};
|
|
4512
|
-
|
|
4514
|
+
s.addEventListener("mousedown", d);
|
|
4513
4515
|
};
|
|
4514
4516
|
export {
|
|
4515
4517
|
Me as CT,
|