joy-admin-components 0.2.95 → 0.2.97
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.
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { ElCol as e, ElForm as t, ElInputNumber as n, ElLink as r, ElMessage as i, ElMessageBox as a, ElRow as o, ElText as s } from "element-plus";
|
|
2
|
-
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as E, onUpdated as
|
|
2
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as E, onUpdated as ee, openBlock as D, reactive as O, ref as k, renderList as te, renderSlot as A, resolveComponent as j, resolveDynamicComponent as M, toDisplayString as N, unref as P, useAttrs as ne, useModel as F, watch as I, withCtx as L, withDirectives as re, withKeys as ie, withModifiers as ae } from "vue";
|
|
3
3
|
import { saveAs as R } from "file-saver";
|
|
4
4
|
import z from "exceljs";
|
|
5
5
|
import B from "dayjs";
|
|
6
6
|
import { createI18n as oe, useI18n as V } from "vue-i18n";
|
|
7
7
|
import { cloneDeep as se, debounce as ce, isArray as le } from "lodash";
|
|
8
|
-
import { createNamespacedHelpers as ue, mapActions as de, mapGetters as fe, mapState as
|
|
8
|
+
import { createNamespacedHelpers as ue, mapActions as de, mapGetters as fe, mapState as pe, useStore as H } from "vuex";
|
|
9
9
|
import { VxeUI as U } from "vxe-pc-ui";
|
|
10
10
|
import { useRouter as W } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var G = Object.create,
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var G = Object.create, K = Object.defineProperty, me = Object.getOwnPropertyDescriptor, q = Object.getOwnPropertyNames, he = Object.getPrototypeOf, ge = Object.prototype.hasOwnProperty, _e = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ve = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = q(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ge.call(e, s) && s !== n && K(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = me(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
}, ye = (e, t, n) => (n = e == null ? {} : G(
|
|
18
|
+
}, ye = (e, t, n) => (n = e == null ? {} : G(he(e)), ve(t || !e || !e.__esModule ? K(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
21
|
}) : n, e)), be = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
|
-
let s =
|
|
24
|
+
let s = k(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
25
25
|
span: t.props?.span || t.props?.colProps?.span || 24,
|
|
26
26
|
...t.props?.colProps
|
|
27
27
|
}, { default: () => t })) : null;
|
|
@@ -36,7 +36,7 @@ var G = Object.create, me = Object.defineProperty, K = Object.getOwnPropertyDesc
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), xe = /* @__PURE__ */ _e(((e, t) => {
|
|
40
40
|
(function(n, r) {
|
|
41
41
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_utc = r();
|
|
42
42
|
})(e, (function() {
|
|
@@ -120,7 +120,7 @@ var G = Object.create, me = Object.defineProperty, K = Object.getOwnPropertyDesc
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), J = /* @__PURE__ */ _e(((e, t) => {
|
|
124
124
|
(function(n, r) {
|
|
125
125
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_timezone = r();
|
|
126
126
|
})(e, (function() {
|
|
@@ -196,7 +196,7 @@ var G = Object.create, me = Object.defineProperty, K = Object.getOwnPropertyDesc
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})), Se = /* @__PURE__ */ ye(
|
|
199
|
+
})), Se = /* @__PURE__ */ ye(xe()), Ce = /* @__PURE__ */ ye(J()), Y = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -622,7 +622,7 @@ var $ = (e, t) => {
|
|
|
622
622
|
"changeAll"
|
|
623
623
|
], ["update:modelValue"]),
|
|
624
624
|
setup(e, { emit: t }) {
|
|
625
|
-
let n = e, r =
|
|
625
|
+
let n = e, r = ne(), { t: i, locale: a } = V(), o = F(e, "modelValue"), s = l(() => r["value-key"] != null), _ = k(""), v = l(() => {
|
|
626
626
|
if (r.remote !== void 0) return n.data;
|
|
627
627
|
let e = We(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
628
628
|
if (e.length == 0) return o;
|
|
@@ -638,7 +638,7 @@ var $ = (e, t) => {
|
|
|
638
638
|
set(e) {
|
|
639
639
|
return e;
|
|
640
640
|
}
|
|
641
|
-
}), b = t, C =
|
|
641
|
+
}), b = t, C = k([]);
|
|
642
642
|
n.api && (async () => {
|
|
643
643
|
let { data: e } = await n.api();
|
|
644
644
|
C.value = [...e], b("success", C);
|
|
@@ -648,29 +648,29 @@ var $ = (e, t) => {
|
|
|
648
648
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
let T =
|
|
651
|
+
let T = k(null);
|
|
652
652
|
function E() {
|
|
653
653
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
654
654
|
b("change", e), S(() => {
|
|
655
655
|
n.optionClick && n.optionClick(e);
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function ee(e) {
|
|
659
659
|
T.value = e;
|
|
660
660
|
}
|
|
661
|
-
let
|
|
662
|
-
if (
|
|
661
|
+
let O = n.labelValue.label.split("-"), M = (e) => {
|
|
662
|
+
if (O.length == 1) {
|
|
663
663
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
664
664
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
665
665
|
return t ||= e[n.labelValue.label], t + "";
|
|
666
666
|
} else {
|
|
667
667
|
let t = [];
|
|
668
|
-
return
|
|
668
|
+
return O.forEach((n) => {
|
|
669
669
|
t.push(e[n]);
|
|
670
670
|
}), t.join("-");
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
|
-
function
|
|
673
|
+
function re(e) {
|
|
674
674
|
let t = n.data ? n.data : C.value;
|
|
675
675
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
676
676
|
b("change", o.value), b("changeAll", o.value, t);
|
|
@@ -688,12 +688,12 @@ var $ = (e, t) => {
|
|
|
688
688
|
function z(e) {
|
|
689
689
|
return e.map((e) => ({
|
|
690
690
|
...e,
|
|
691
|
-
label:
|
|
691
|
+
label: M(e),
|
|
692
692
|
value: s.value ? e : e[n.labelValue.value]
|
|
693
693
|
}));
|
|
694
694
|
}
|
|
695
|
-
let B =
|
|
696
|
-
B.value = z(n.data ? n.data : C.value),
|
|
695
|
+
let B = k([]);
|
|
696
|
+
B.value = z(n.data ? n.data : C.value), I(() => n.data ? n.data : C.value, (e) => {
|
|
697
697
|
let t = z(e);
|
|
698
698
|
if (t.length !== B.value.length) B.value = t;
|
|
699
699
|
else {
|
|
@@ -710,29 +710,29 @@ var $ = (e, t) => {
|
|
|
710
710
|
disabled: R(e)
|
|
711
711
|
})) : B.value);
|
|
712
712
|
return (t, n) => {
|
|
713
|
-
let i =
|
|
714
|
-
return
|
|
713
|
+
let i = j("el-checkbox"), a = j("el-select-v2"), l = j("el-option"), b = j("el-select");
|
|
714
|
+
return P(r).v2 == null ? (D(), u(b, x({
|
|
715
715
|
key: 1,
|
|
716
716
|
modelValue: o.value,
|
|
717
717
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
718
718
|
filterable: "",
|
|
719
719
|
"collapse-tags": "",
|
|
720
720
|
"collapse-tags-tooltip": "",
|
|
721
|
-
"filter-method":
|
|
721
|
+
"filter-method": P(r).remote == null ? (e) => _.value = e : void 0,
|
|
722
722
|
clearable: ""
|
|
723
|
-
},
|
|
724
|
-
default:
|
|
723
|
+
}, P(r), { onClear: E }), {
|
|
724
|
+
default: L(() => [P(r).multiple != null && e.showCheckAll && e.maxLimit == null ? A(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
725
725
|
class: "mgl20",
|
|
726
726
|
modelValue: y.value,
|
|
727
727
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
728
|
-
onChange:
|
|
728
|
+
onChange: re
|
|
729
729
|
}, {
|
|
730
|
-
default:
|
|
730
|
+
default: L(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
731
731
|
_: 1
|
|
732
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (
|
|
732
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (D(!0), f(c, null, te(v.value, (t, n) => (D(), u(l, {
|
|
733
733
|
key: n,
|
|
734
|
-
label:
|
|
735
|
-
disabled:
|
|
734
|
+
label: M(t),
|
|
735
|
+
disabled: P(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? R(t) : !1,
|
|
736
736
|
onClick: ae((e) => ie(t), ["stop"]),
|
|
737
737
|
value: s.value ? t : t[e.labelValue.value]
|
|
738
738
|
}, null, 8, [
|
|
@@ -742,29 +742,29 @@ var $ = (e, t) => {
|
|
|
742
742
|
"value"
|
|
743
743
|
]))), 128))]),
|
|
744
744
|
_: 3
|
|
745
|
-
}, 16, ["modelValue", "filter-method"])) : (
|
|
745
|
+
}, 16, ["modelValue", "filter-method"])) : (D(), u(a, x({
|
|
746
746
|
key: 0,
|
|
747
747
|
options: oe.value,
|
|
748
748
|
modelValue: o.value,
|
|
749
749
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
750
|
-
},
|
|
750
|
+
}, P(r), {
|
|
751
751
|
filterable: "",
|
|
752
752
|
"collapse-tags": "",
|
|
753
753
|
"collapse-tags-tooltip": "",
|
|
754
754
|
clearable: "",
|
|
755
755
|
onChange: w
|
|
756
756
|
}), m({
|
|
757
|
-
default:
|
|
757
|
+
default: L(({ item: e }) => [p("div", { onClick: (t) => ee(e) }, N(e.label), 9, $e)]),
|
|
758
758
|
_: 2
|
|
759
|
-
}, [
|
|
759
|
+
}, [P(r).multiple == null ? void 0 : {
|
|
760
760
|
name: "header",
|
|
761
|
-
fn:
|
|
761
|
+
fn: L(() => [A(t.$slots, "header", {}, () => [g(i, {
|
|
762
762
|
class: "mgl20",
|
|
763
763
|
modelValue: y.value,
|
|
764
764
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
765
|
-
onChange:
|
|
765
|
+
onChange: re
|
|
766
766
|
}, {
|
|
767
|
-
default:
|
|
767
|
+
default: L(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
768
768
|
_: 1
|
|
769
769
|
}, 8, ["modelValue"])], !0)]),
|
|
770
770
|
key: "0"
|
|
@@ -776,9 +776,9 @@ var $ = (e, t) => {
|
|
|
776
776
|
required: !0
|
|
777
777
|
} } });
|
|
778
778
|
function nt(e, t, n, r, i, a) {
|
|
779
|
-
let o =
|
|
780
|
-
return
|
|
781
|
-
default:
|
|
779
|
+
let o = j("el-icon");
|
|
780
|
+
return D(), u(o, { class: "cmp-icon" }, {
|
|
781
|
+
default: L(() => [(D(), u(M(e.name)))]),
|
|
782
782
|
_: 1
|
|
783
783
|
});
|
|
784
784
|
}
|
|
@@ -793,12 +793,12 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
793
793
|
n("no");
|
|
794
794
|
}
|
|
795
795
|
return (e, t) => {
|
|
796
|
-
let n =
|
|
797
|
-
return
|
|
798
|
-
onConfirm:
|
|
796
|
+
let n = j("el-popconfirm");
|
|
797
|
+
return D(), f("span", it, [g(n, x(e.$attrs, {
|
|
798
|
+
onConfirm: P(r),
|
|
799
799
|
onCancel: i
|
|
800
800
|
}), {
|
|
801
|
-
reference:
|
|
801
|
+
reference: L(() => [A(e.$slots, "default", {}, void 0, !0)]),
|
|
802
802
|
_: 3
|
|
803
803
|
}, 16, ["onConfirm"])]);
|
|
804
804
|
};
|
|
@@ -824,7 +824,7 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
826
|
setup(e) {
|
|
827
|
-
let { t } = V(), n = e, r =
|
|
827
|
+
let { t } = V(), n = e, r = k(null), a = k(!1);
|
|
828
828
|
function o(e) {
|
|
829
829
|
let t = e.match(/__v(\d+)/);
|
|
830
830
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -849,14 +849,14 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
849
849
|
});
|
|
850
850
|
}
|
|
851
851
|
return (t, n) => {
|
|
852
|
-
let i =
|
|
853
|
-
return
|
|
852
|
+
let i = j("el-button");
|
|
853
|
+
return D(), f("div", ot, [g(i, x({
|
|
854
854
|
type: "primary",
|
|
855
855
|
loading: a.value,
|
|
856
856
|
class: "mgr10",
|
|
857
857
|
onClick: n[0] ||= (e) => r.value.click()
|
|
858
858
|
}, t.$attrs), {
|
|
859
|
-
default:
|
|
859
|
+
default: L(() => [A(t.$slots, "default", {}, () => [h(N(t.$t("dao-ru")), 1)], !0)]),
|
|
860
860
|
_: 3
|
|
861
861
|
}, 16, ["loading"]), p("input", {
|
|
862
862
|
onChange: s,
|
|
@@ -902,7 +902,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
902
902
|
"visibleChange"
|
|
903
903
|
],
|
|
904
904
|
setup(e, { expose: t, emit: n }) {
|
|
905
|
-
let r = e, i = n, a =
|
|
905
|
+
let r = e, i = n, a = k(!0), o = k(null), { t: s } = V(), m = {
|
|
906
906
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
907
907
|
daterange: "YYYY-MM-DD",
|
|
908
908
|
month: "YYYY-MM"
|
|
@@ -923,7 +923,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
923
923
|
return lt(r.form.items);
|
|
924
924
|
}
|
|
925
925
|
let E = se(r.form.items);
|
|
926
|
-
function
|
|
926
|
+
function ee() {
|
|
927
927
|
r.form.items.forEach((e) => {
|
|
928
928
|
let t = E.find((t) => t.key == e.key);
|
|
929
929
|
t && (e.value = t.value);
|
|
@@ -931,10 +931,10 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
931
931
|
}
|
|
932
932
|
return t({
|
|
933
933
|
getPrm: T,
|
|
934
|
-
reset:
|
|
934
|
+
reset: ee
|
|
935
935
|
}), (t, n) => {
|
|
936
|
-
let r =
|
|
937
|
-
return
|
|
936
|
+
let r = j("el-input"), s = j("el-date-picker"), l = j("el-form-item"), T = j("el-form"), E = j("el-link"), ee = j("el-button");
|
|
937
|
+
return D(), f("div", {
|
|
938
938
|
class: "searchBar-container mgt10 mgb10",
|
|
939
939
|
onKeydown: ie(v, ["enter"])
|
|
940
940
|
}, [p("div", {
|
|
@@ -944,12 +944,12 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
944
944
|
inline: "",
|
|
945
945
|
model: e.form.data
|
|
946
946
|
}, {
|
|
947
|
-
default:
|
|
947
|
+
default: L(() => [(D(!0), f(c, null, te(e.form.items.filter((e) => !e.hidden), (e) => (D(), f(c, { key: e.key }, [e.type == "br" ? (D(), f("br", ut)) : (D(), u(l, {
|
|
948
948
|
key: 1,
|
|
949
949
|
label: e.name
|
|
950
950
|
}, {
|
|
951
|
-
default:
|
|
952
|
-
e.type === "input" ? (
|
|
951
|
+
default: L(() => [
|
|
952
|
+
e.type === "input" ? (D(), u(r, {
|
|
953
953
|
key: 0,
|
|
954
954
|
modelValue: e.value,
|
|
955
955
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
@@ -961,8 +961,8 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
961
961
|
"onUpdate:modelValue",
|
|
962
962
|
"class",
|
|
963
963
|
"placeholder"
|
|
964
|
-
])) : e.type === "custom" ? (
|
|
965
|
-
e.type === "select" ? (
|
|
964
|
+
])) : e.type === "custom" ? (D(), u(M(e.render), { key: 1 })) : d("", !0),
|
|
965
|
+
e.type === "select" ? (D(), u(et, x({
|
|
966
966
|
key: 2,
|
|
967
967
|
class: e.option?.class || "w150",
|
|
968
968
|
modelValue: e.value,
|
|
@@ -978,7 +978,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
978
978
|
"onClear",
|
|
979
979
|
"placeholder"
|
|
980
980
|
])) : d("", !0),
|
|
981
|
-
e.type === "date" ? (
|
|
981
|
+
e.type === "date" ? (D(), u(s, x({
|
|
982
982
|
key: 3,
|
|
983
983
|
class: {
|
|
984
984
|
datetimerange: "w300",
|
|
@@ -1009,7 +1009,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1009
1009
|
_: 2
|
|
1010
1010
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1011
1011
|
_: 1
|
|
1012
|
-
}, 8, ["model"])], 4), p("div", dt, [p("div", ft, [
|
|
1012
|
+
}, 8, ["model"])], 4), p("div", dt, [p("div", ft, [A(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", pt, [
|
|
1013
1013
|
g(E, {
|
|
1014
1014
|
underline: "never",
|
|
1015
1015
|
class: "mgr10",
|
|
@@ -1017,24 +1017,24 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1017
1017
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1018
1018
|
}
|
|
1019
1019
|
}, {
|
|
1020
|
-
default:
|
|
1020
|
+
default: L(() => [g(rt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + N(_.value), 1)]),
|
|
1021
1021
|
_: 1
|
|
1022
1022
|
}),
|
|
1023
|
-
g(
|
|
1023
|
+
g(ee, {
|
|
1024
1024
|
type: "primary",
|
|
1025
1025
|
onClick: v
|
|
1026
1026
|
}, {
|
|
1027
|
-
default:
|
|
1027
|
+
default: L(() => [h(N(t.$t("shai-xuan")), 1)]),
|
|
1028
1028
|
_: 1
|
|
1029
1029
|
}),
|
|
1030
|
-
g(
|
|
1030
|
+
g(ee, {
|
|
1031
1031
|
type: "primary",
|
|
1032
1032
|
onClick: b
|
|
1033
1033
|
}, {
|
|
1034
|
-
default:
|
|
1034
|
+
default: L(() => [h(N(t.$t("chong-zhi")), 1)]),
|
|
1035
1035
|
_: 1
|
|
1036
1036
|
}),
|
|
1037
|
-
|
|
1037
|
+
A(t.$slots, "btn", {}, void 0, !0)
|
|
1038
1038
|
])])], 32);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
@@ -1111,56 +1111,64 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1111
1111
|
}
|
|
1112
1112
|
},
|
|
1113
1113
|
setup(e, { expose: t }) {
|
|
1114
|
-
let { t: n, locale: r } = V(), i = vt(), a = e, o =
|
|
1114
|
+
let { t: n, locale: r } = V(), i = vt(), a = e, o = k(!1), s = k([]);
|
|
1115
1115
|
a.searchForm.showSearch === void 0 && (a.searchForm.showSearch = i.showSearch), a.searchForm.showPage === void 0 && (a.searchForm.showPage = i.showPage), a.searchForm.showShadow === void 0 && (a.searchForm.showShadow = i.showShadow), a.searchForm.showCheckBox === void 0 && (a.searchForm.showCheckBox = i.showCheckBox), a.searchForm.enableCellCopy === void 0 && (a.searchForm.enableCellCopy = i.enableCellCopy), a.searchForm.selections || (a.searchForm.selections = []);
|
|
1116
1116
|
let c = l(() => {
|
|
1117
1117
|
let e = "default-table";
|
|
1118
1118
|
return a.id ? `listPageId-${e}-${a.id}` : `listPageId-${e}`;
|
|
1119
|
-
}), m = se(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y =
|
|
1119
|
+
}), m = se(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = O({
|
|
1120
1120
|
[_]: 1,
|
|
1121
1121
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1122
1122
|
total: 0
|
|
1123
|
-
}), b =
|
|
1123
|
+
}), b = k(null), w = k(null), te = k(450), M = ce(() => {
|
|
1124
1124
|
S(() => {
|
|
1125
1125
|
if (!w.value) return;
|
|
1126
1126
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1127
|
-
|
|
1127
|
+
te.value = Math.max(t, 200);
|
|
1128
1128
|
});
|
|
1129
|
-
}, 100),
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1129
|
+
}, 100), ne = () => {
|
|
1130
|
+
M();
|
|
1131
|
+
}, F = () => {
|
|
1132
|
+
if (b.value) return b.value;
|
|
1133
|
+
let e = w.value;
|
|
1134
|
+
if (e) {
|
|
1135
|
+
let t = e.querySelector(".vxe-table");
|
|
1136
|
+
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1137
|
+
}
|
|
1138
|
+
return null;
|
|
1139
|
+
}, I = () => {
|
|
1132
1140
|
if (!a.searchForm.enableCellCopy && !i.enableCellCopy) return !1;
|
|
1133
|
-
let e =
|
|
1141
|
+
let e = F();
|
|
1134
1142
|
if (!e || !e.$el) return !1;
|
|
1135
1143
|
let t = e.$el;
|
|
1136
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", ge), t.removeEventListener("mousemove", _e), t.removeEventListener("mouseup",
|
|
1144
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", ge), t.removeEventListener("mousemove", _e), t.removeEventListener("mouseup", ve), t.removeEventListener("keydown", Y), t.addEventListener("mousedown", ge), t.addEventListener("mousemove", _e), t.addEventListener("mouseup", ve), t.addEventListener("keydown", Y);
|
|
1137
1145
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1138
|
-
return n && !n.__cellCopyScrollBound && (n.addEventListener("scroll",
|
|
1146
|
+
return n && !n.__cellCopyScrollBound && (n.addEventListener("scroll", Se), n.__cellCopyScrollBound = !0), !0;
|
|
1139
1147
|
};
|
|
1140
1148
|
T(() => {
|
|
1141
|
-
|
|
1142
|
-
|
|
1149
|
+
M(), window.addEventListener("resize", ne), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", X), document.addEventListener("mousedown", we), setTimeout(() => {
|
|
1150
|
+
I();
|
|
1143
1151
|
}, 500));
|
|
1144
|
-
}),
|
|
1152
|
+
}), ee(() => {
|
|
1145
1153
|
(a.searchForm.enableCellCopy || i.enableCellCopy) && setTimeout(() => {
|
|
1146
|
-
|
|
1154
|
+
I();
|
|
1147
1155
|
}, 500);
|
|
1148
1156
|
}), E(() => {
|
|
1149
|
-
if (window.removeEventListener("resize",
|
|
1150
|
-
document.removeEventListener("mouseup",
|
|
1151
|
-
let e =
|
|
1157
|
+
if (window.removeEventListener("resize", ne), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1158
|
+
document.removeEventListener("mouseup", X), document.removeEventListener("mousedown", we), document.removeEventListener("mousemove", K), q(), J && clearTimeout(J);
|
|
1159
|
+
let e = F();
|
|
1152
1160
|
if (e && e.$el) {
|
|
1153
1161
|
let t = e.$el;
|
|
1154
|
-
t.removeEventListener("mousedown", ge), t.removeEventListener("mousemove", _e), t.removeEventListener("mouseup",
|
|
1162
|
+
t.removeEventListener("mousedown", ge), t.removeEventListener("mousemove", _e), t.removeEventListener("mouseup", ve), t.removeEventListener("keydown", Y);
|
|
1155
1163
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1156
|
-
n && (n.removeEventListener("scroll",
|
|
1164
|
+
n && (n.removeEventListener("scroll", Se), n.__cellCopyScrollBound = !1);
|
|
1157
1165
|
}
|
|
1158
1166
|
}
|
|
1159
1167
|
});
|
|
1160
|
-
let re = l(() =>
|
|
1161
|
-
async function
|
|
1168
|
+
let re = l(() => pe.value.height || te.value), ie;
|
|
1169
|
+
async function R(e) {
|
|
1162
1170
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1163
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1171
|
+
e[_] != 1 && (e.nextSearchAfter = ie), o.value = !0;
|
|
1164
1172
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1165
1173
|
o.value = !1, a.searchForm.selections = [];
|
|
1166
1174
|
});
|
|
@@ -1185,54 +1193,54 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1185
1193
|
break;
|
|
1186
1194
|
}
|
|
1187
1195
|
}
|
|
1188
|
-
s.value = n ? n(e) : e, y.total = o,
|
|
1196
|
+
s.value = n ? n(e) : e, y.total = o, ie = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && S(() => {
|
|
1189
1197
|
setTimeout(() => {
|
|
1190
|
-
|
|
1198
|
+
I();
|
|
1191
1199
|
}, 100);
|
|
1192
1200
|
});
|
|
1193
1201
|
}
|
|
1194
1202
|
}
|
|
1195
|
-
function
|
|
1203
|
+
function z(e = {}) {
|
|
1196
1204
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1197
|
-
|
|
1205
|
+
R({
|
|
1198
1206
|
...y,
|
|
1199
1207
|
...lt(a.searchForm.items),
|
|
1200
1208
|
...e,
|
|
1201
1209
|
...n
|
|
1202
1210
|
});
|
|
1203
1211
|
}
|
|
1204
|
-
function
|
|
1212
|
+
function B() {
|
|
1205
1213
|
let { reset: e } = a.tableConfig;
|
|
1206
1214
|
e && e(), a.searchForm.items.forEach((e) => {
|
|
1207
1215
|
let t = m.find((t) => le(e.key) && le(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1208
1216
|
t && (e.value = t.value);
|
|
1209
|
-
}),
|
|
1217
|
+
}), z();
|
|
1210
1218
|
}
|
|
1211
|
-
a.api && a.immediate &&
|
|
1212
|
-
function
|
|
1219
|
+
a.api && a.immediate && z();
|
|
1220
|
+
function oe() {
|
|
1213
1221
|
return {
|
|
1214
1222
|
...y,
|
|
1215
1223
|
...lt(a.searchForm.items)
|
|
1216
1224
|
};
|
|
1217
1225
|
}
|
|
1218
|
-
let
|
|
1226
|
+
let ue = () => {
|
|
1219
1227
|
let e = b.value;
|
|
1220
1228
|
e && e.clearSort();
|
|
1221
|
-
},
|
|
1229
|
+
}, de = O({ storage: !0 }), fe = O({
|
|
1222
1230
|
drag: !0,
|
|
1223
1231
|
resizable: !0,
|
|
1224
1232
|
maxFixedSize: 0
|
|
1225
|
-
}),
|
|
1233
|
+
}), pe = l(() => {
|
|
1226
1234
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1227
1235
|
return {
|
|
1228
1236
|
headerAlign: "left",
|
|
1229
1237
|
align: "center",
|
|
1230
1238
|
customConfig: {
|
|
1231
|
-
...
|
|
1239
|
+
...de,
|
|
1232
1240
|
...e
|
|
1233
1241
|
},
|
|
1234
1242
|
columnConfig: {
|
|
1235
|
-
...
|
|
1243
|
+
...fe,
|
|
1236
1244
|
...t
|
|
1237
1245
|
},
|
|
1238
1246
|
"virtual-x-config": {
|
|
@@ -1245,17 +1253,17 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1245
1253
|
},
|
|
1246
1254
|
...n
|
|
1247
1255
|
};
|
|
1248
|
-
}), H =
|
|
1256
|
+
}), H = O({
|
|
1249
1257
|
isSelecting: !1,
|
|
1250
1258
|
startCell: null,
|
|
1251
1259
|
endCell: null,
|
|
1252
1260
|
selectedCells: []
|
|
1253
|
-
}),
|
|
1261
|
+
}), U = (e) => {
|
|
1254
1262
|
let t = e.closest(".vxe-body--column");
|
|
1255
1263
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1256
1264
|
let n = t.closest(".vxe-body--row");
|
|
1257
1265
|
if (!n) return null;
|
|
1258
|
-
let r =
|
|
1266
|
+
let r = F();
|
|
1259
1267
|
if (!r) return null;
|
|
1260
1268
|
let i = -1, o = n.getAttribute("rowid");
|
|
1261
1269
|
if (o != null) {
|
|
@@ -1286,49 +1294,49 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1286
1294
|
colIndex: s,
|
|
1287
1295
|
cell: t
|
|
1288
1296
|
};
|
|
1289
|
-
},
|
|
1297
|
+
}, W = null, G = 0, K = (e) => {
|
|
1290
1298
|
if (!H.isSelecting) return;
|
|
1291
|
-
|
|
1292
|
-
let t =
|
|
1299
|
+
G = e.clientY;
|
|
1300
|
+
let t = F();
|
|
1293
1301
|
if (!t || !t.$el) return;
|
|
1294
1302
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1295
1303
|
if (!r) return;
|
|
1296
1304
|
let i = r.getBoundingClientRect();
|
|
1297
|
-
e.clientY < i.top - xt || e.clientY > i.bottom + xt ?
|
|
1305
|
+
e.clientY < i.top - xt || e.clientY > i.bottom + xt ? W || me() : q();
|
|
1298
1306
|
}, me = () => {
|
|
1299
1307
|
let e = () => {
|
|
1300
1308
|
if (!H.isSelecting) {
|
|
1301
|
-
|
|
1309
|
+
q();
|
|
1302
1310
|
return;
|
|
1303
1311
|
}
|
|
1304
|
-
let t =
|
|
1312
|
+
let t = F();
|
|
1305
1313
|
if (!t || !t.$el) {
|
|
1306
|
-
|
|
1314
|
+
q();
|
|
1307
1315
|
return;
|
|
1308
1316
|
}
|
|
1309
1317
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1310
1318
|
if (!r) {
|
|
1311
|
-
|
|
1319
|
+
q();
|
|
1312
1320
|
return;
|
|
1313
1321
|
}
|
|
1314
1322
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1315
|
-
if (
|
|
1316
|
-
let e = i.top -
|
|
1323
|
+
if (G < i.top) {
|
|
1324
|
+
let e = i.top - G;
|
|
1317
1325
|
a = -Math.min(St, Math.max(2, e * Ct));
|
|
1318
|
-
} else if (
|
|
1319
|
-
let e =
|
|
1326
|
+
} else if (G > i.bottom) {
|
|
1327
|
+
let e = G - i.bottom;
|
|
1320
1328
|
a = Math.min(St, Math.max(2, e * Ct));
|
|
1321
1329
|
} else {
|
|
1322
|
-
|
|
1330
|
+
q();
|
|
1323
1331
|
return;
|
|
1324
1332
|
}
|
|
1325
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), he(r, i),
|
|
1333
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), he(r, i), W = requestAnimationFrame(e);
|
|
1326
1334
|
};
|
|
1327
|
-
|
|
1328
|
-
},
|
|
1329
|
-
|
|
1335
|
+
W = requestAnimationFrame(e);
|
|
1336
|
+
}, q = () => {
|
|
1337
|
+
W &&= (cancelAnimationFrame(W), null);
|
|
1330
1338
|
}, he = (e, t) => {
|
|
1331
|
-
let n =
|
|
1339
|
+
let n = F();
|
|
1332
1340
|
if (!n) return;
|
|
1333
1341
|
let r = n.getTableData().fullData;
|
|
1334
1342
|
if (!r || r.length === 0) return;
|
|
@@ -1337,7 +1345,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1337
1345
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1338
1346
|
if (a.length === 0) return;
|
|
1339
1347
|
let o = null;
|
|
1340
|
-
if (
|
|
1348
|
+
if (G < t.top ? o = a[0] : G > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1341
1349
|
let s = o.getAttribute("rowid");
|
|
1342
1350
|
if (s == null) return;
|
|
1343
1351
|
let c = -1, l = n.getRowById(s);
|
|
@@ -1346,33 +1354,33 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1346
1354
|
H.endCell = {
|
|
1347
1355
|
rowIndex: c,
|
|
1348
1356
|
colIndex: u
|
|
1349
|
-
},
|
|
1357
|
+
}, be(), xe();
|
|
1350
1358
|
}, ge = (e) => {
|
|
1351
|
-
let t =
|
|
1359
|
+
let t = U(e.target);
|
|
1352
1360
|
if (!t) {
|
|
1353
|
-
|
|
1361
|
+
ye();
|
|
1354
1362
|
return;
|
|
1355
1363
|
}
|
|
1356
1364
|
H.isSelecting = !0, H.startCell = {
|
|
1357
1365
|
rowIndex: t.rowIndex,
|
|
1358
1366
|
colIndex: t.colIndex
|
|
1359
|
-
}, H.endCell = { ...H.startCell }, document.addEventListener("mousemove",
|
|
1367
|
+
}, H.endCell = { ...H.startCell }, document.addEventListener("mousemove", K), be(), xe();
|
|
1360
1368
|
}, _e = (e) => {
|
|
1361
1369
|
if (!H.isSelecting) return;
|
|
1362
|
-
let t =
|
|
1370
|
+
let t = U(e.target);
|
|
1363
1371
|
t && (H.endCell = {
|
|
1364
1372
|
rowIndex: t.rowIndex,
|
|
1365
1373
|
colIndex: t.colIndex
|
|
1366
|
-
},
|
|
1367
|
-
}, q = () => {
|
|
1368
|
-
H.isSelecting = !1, K(), document.removeEventListener("mousemove", G);
|
|
1374
|
+
}, be(), xe());
|
|
1369
1375
|
}, ve = () => {
|
|
1376
|
+
H.isSelecting = !1, q(), document.removeEventListener("mousemove", K);
|
|
1377
|
+
}, ye = () => {
|
|
1370
1378
|
H.selectedCells = [], H.startCell = null, H.endCell = null;
|
|
1371
|
-
let e =
|
|
1379
|
+
let e = F();
|
|
1372
1380
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1373
1381
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1374
1382
|
});
|
|
1375
|
-
},
|
|
1383
|
+
}, be = () => {
|
|
1376
1384
|
if (!H.startCell || !H.endCell) {
|
|
1377
1385
|
H.selectedCells = [];
|
|
1378
1386
|
return;
|
|
@@ -1383,9 +1391,9 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1383
1391
|
rowIndex: e,
|
|
1384
1392
|
colIndex: t
|
|
1385
1393
|
});
|
|
1386
|
-
},
|
|
1394
|
+
}, xe = () => {
|
|
1387
1395
|
S(() => {
|
|
1388
|
-
let e =
|
|
1396
|
+
let e = F();
|
|
1389
1397
|
if (!e) return;
|
|
1390
1398
|
let t = e.$el;
|
|
1391
1399
|
if (t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
@@ -1430,13 +1438,13 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1430
1438
|
}
|
|
1431
1439
|
});
|
|
1432
1440
|
});
|
|
1433
|
-
}, J = null,
|
|
1434
|
-
H.selectedCells.length !== 0 && (J &&
|
|
1435
|
-
|
|
1436
|
-
}));
|
|
1437
|
-
},
|
|
1441
|
+
}, J = null, Se = () => {
|
|
1442
|
+
H.selectedCells.length !== 0 && (J && clearTimeout(J), J = setTimeout(() => {
|
|
1443
|
+
xe(), J = null;
|
|
1444
|
+
}, 50));
|
|
1445
|
+
}, Ce = async () => {
|
|
1438
1446
|
if (H.selectedCells.length === 0) return;
|
|
1439
|
-
let e =
|
|
1447
|
+
let e = F();
|
|
1440
1448
|
if (!e) return;
|
|
1441
1449
|
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, i = [...new Set(H.selectedCells.map((e) => e.rowIndex))].sort((e, t) => e - t), o = [...new Set(H.selectedCells.map((e) => e.colIndex))].sort((e, t) => e - t), s = /* @__PURE__ */ new Map(), c = [
|
|
1442
1450
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
@@ -1506,23 +1514,23 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1506
1514
|
} catch (e) {
|
|
1507
1515
|
console.error("复制失败:", e);
|
|
1508
1516
|
}
|
|
1509
|
-
},
|
|
1510
|
-
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H.selectedCells.length > 0 && (e.preventDefault(), e.stopPropagation(),
|
|
1511
|
-
},
|
|
1512
|
-
H.isSelecting = !1,
|
|
1513
|
-
}, X = (e) => {
|
|
1514
|
-
let t = b.value;
|
|
1515
|
-
!t || !t.$el || t.$el.contains(e.target) || ve();
|
|
1517
|
+
}, Y = (e) => {
|
|
1518
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H.selectedCells.length > 0 && (e.preventDefault(), e.stopPropagation(), Ce()) : e.key === "Escape" && ye());
|
|
1519
|
+
}, X = () => {
|
|
1520
|
+
H.isSelecting = !1, q(), document.removeEventListener("mousemove", K);
|
|
1516
1521
|
}, we = (e) => {
|
|
1517
|
-
|
|
1522
|
+
let t = F();
|
|
1523
|
+
!t || !t.$el || t.$el.contains(e.target) || ye();
|
|
1518
1524
|
}, Te = (e) => {
|
|
1519
|
-
y[
|
|
1525
|
+
y[_] = e, z();
|
|
1526
|
+
}, Ee = (e) => {
|
|
1527
|
+
y[v] = e, y[_] = 1, z();
|
|
1520
1528
|
};
|
|
1521
|
-
function
|
|
1529
|
+
function Z() {
|
|
1522
1530
|
let e = b.value.getCheckboxRecords();
|
|
1523
1531
|
a.searchForm.selections = e;
|
|
1524
1532
|
}
|
|
1525
|
-
let
|
|
1533
|
+
let Q = (e) => {
|
|
1526
1534
|
let t = b.value;
|
|
1527
1535
|
if (t) {
|
|
1528
1536
|
t.toggleCheckboxRow(e);
|
|
@@ -1532,35 +1540,35 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1532
1540
|
};
|
|
1533
1541
|
return t({
|
|
1534
1542
|
tableRef: b,
|
|
1535
|
-
getList:
|
|
1536
|
-
getPrm:
|
|
1537
|
-
clearSort:
|
|
1538
|
-
calculateTableHeight:
|
|
1543
|
+
getList: z,
|
|
1544
|
+
getPrm: oe,
|
|
1545
|
+
clearSort: ue,
|
|
1546
|
+
calculateTableHeight: M
|
|
1539
1547
|
}), (t, n) => {
|
|
1540
|
-
let a =
|
|
1541
|
-
return
|
|
1542
|
-
e.searchForm.showSearch ? (
|
|
1548
|
+
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"), E = j("el-pagination");
|
|
1549
|
+
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1550
|
+
e.searchForm.showSearch ? (D(), u(mt, {
|
|
1543
1551
|
key: 0,
|
|
1544
1552
|
form: e.searchForm,
|
|
1545
|
-
onReset:
|
|
1546
|
-
onConfirm: n[1] ||= (e) =>
|
|
1547
|
-
onVisibleChange:
|
|
1553
|
+
onReset: B,
|
|
1554
|
+
onConfirm: n[1] ||= (e) => z(),
|
|
1555
|
+
onVisibleChange: P(M)
|
|
1548
1556
|
}, {
|
|
1549
|
-
btn:
|
|
1557
|
+
btn: L(() => [
|
|
1550
1558
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1551
|
-
|
|
1559
|
+
A(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1552
1560
|
g(a, {
|
|
1553
1561
|
class: "mgl10",
|
|
1554
1562
|
round: "",
|
|
1555
1563
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1556
1564
|
}, {
|
|
1557
|
-
default:
|
|
1565
|
+
default: L(() => [g(rt, { name: "Tools" })]),
|
|
1558
1566
|
_: 1
|
|
1559
1567
|
})
|
|
1560
1568
|
]),
|
|
1561
1569
|
_: 3
|
|
1562
1570
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1563
|
-
|
|
1571
|
+
A(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1564
1572
|
p("div", {
|
|
1565
1573
|
ref_key: "tableContentRef",
|
|
1566
1574
|
ref: w
|
|
@@ -1571,41 +1579,41 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1571
1579
|
loading: e.loading || o.value,
|
|
1572
1580
|
data: e.api ? s.value : e.data,
|
|
1573
1581
|
border: ""
|
|
1574
|
-
},
|
|
1582
|
+
}, pe.value, {
|
|
1575
1583
|
height: re.value,
|
|
1576
|
-
onCheckboxChange:
|
|
1577
|
-
onCheckboxAll:
|
|
1578
|
-
onSortChange:
|
|
1579
|
-
onScroll:
|
|
1584
|
+
onCheckboxChange: Z,
|
|
1585
|
+
onCheckboxAll: Z,
|
|
1586
|
+
onSortChange: pe.value["sort-config"]?.sortChange,
|
|
1587
|
+
onScroll: Se
|
|
1580
1588
|
}), {
|
|
1581
|
-
default:
|
|
1589
|
+
default: L(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1582
1590
|
key: 0,
|
|
1583
1591
|
type: "checkbox",
|
|
1584
|
-
width:
|
|
1592
|
+
width: P(r) == "zh_cn" ? 80 : 150,
|
|
1585
1593
|
title: t.$t("xu-hao"),
|
|
1586
1594
|
fixed: "left"
|
|
1587
1595
|
}, {
|
|
1588
|
-
checkbox:
|
|
1596
|
+
checkbox: L(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", bt, [n ? (D(), u(l, {
|
|
1589
1597
|
key: 0,
|
|
1590
1598
|
checked: !0,
|
|
1591
1599
|
disabled: r,
|
|
1592
1600
|
size: "default",
|
|
1593
|
-
onClick: ae((e) => !r &&
|
|
1594
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1601
|
+
onClick: ae((e) => !r && Q(t), ["stop"])
|
|
1602
|
+
}, null, 8, ["disabled", "onClick"])) : (D(), u(l, {
|
|
1595
1603
|
key: 1,
|
|
1596
1604
|
disabled: r,
|
|
1597
1605
|
checked: !1,
|
|
1598
1606
|
size: "default",
|
|
1599
|
-
onClick: ae((e) => !r &&
|
|
1607
|
+
onClick: ae((e) => !r && Q(t), ["stop"])
|
|
1600
1608
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1601
1609
|
type: "info",
|
|
1602
1610
|
class: "mgl5"
|
|
1603
1611
|
}, {
|
|
1604
|
-
default:
|
|
1612
|
+
default: L(() => [h(N(e + 1), 1)]),
|
|
1605
1613
|
_: 2
|
|
1606
1614
|
}, 1024)])]),
|
|
1607
1615
|
_: 1
|
|
1608
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1616
|
+
}, 8, ["width", "title"])) : d("", !0), A(t.$slots, "default", {}, void 0, !0)]),
|
|
1609
1617
|
_: 3
|
|
1610
1618
|
}, 16, [
|
|
1611
1619
|
"id",
|
|
@@ -1614,18 +1622,18 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1614
1622
|
"height",
|
|
1615
1623
|
"onSortChange"
|
|
1616
1624
|
])], 512),
|
|
1617
|
-
e.searchForm.showPage ? (
|
|
1625
|
+
e.searchForm.showPage ? (D(), u(E, {
|
|
1618
1626
|
key: 1,
|
|
1619
|
-
"current-page": y[
|
|
1620
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1627
|
+
"current-page": y[P(_)],
|
|
1628
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[P(_)] = e,
|
|
1621
1629
|
class: "myPagination mgt10",
|
|
1622
1630
|
background: "",
|
|
1623
1631
|
layout: "total, sizes, prev, pager, next",
|
|
1624
1632
|
total: y.total,
|
|
1625
|
-
"page-size": y[
|
|
1626
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1627
|
-
onCurrentChange:
|
|
1628
|
-
onSizeChange:
|
|
1633
|
+
"page-size": y[P(v)],
|
|
1634
|
+
"page-sizes": e.searchForm.pageSizes || P(i).pageSizes,
|
|
1635
|
+
onCurrentChange: Te,
|
|
1636
|
+
onSizeChange: Ee
|
|
1629
1637
|
}, null, 8, [
|
|
1630
1638
|
"current-page",
|
|
1631
1639
|
"total",
|
|
@@ -1635,7 +1643,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1635
1643
|
], 2);
|
|
1636
1644
|
};
|
|
1637
1645
|
}
|
|
1638
|
-
}, [["__scopeId", "data-v-
|
|
1646
|
+
}, [["__scopeId", "data-v-93ce22be"]]), Tt = {
|
|
1639
1647
|
__name: "index",
|
|
1640
1648
|
props: {
|
|
1641
1649
|
sheetsConfig: {
|
|
@@ -1657,12 +1665,12 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1657
1665
|
Re(t.fileName + (t.version ? `__v${t.version}` : ""), t.sheetsConfig);
|
|
1658
1666
|
}
|
|
1659
1667
|
return (e, t) => {
|
|
1660
|
-
let r =
|
|
1661
|
-
return
|
|
1668
|
+
let r = j("el-link");
|
|
1669
|
+
return D(), u(r, x({
|
|
1662
1670
|
type: "primary",
|
|
1663
1671
|
underline: "never"
|
|
1664
1672
|
}, e.$attrs, { onClick: n }), {
|
|
1665
|
-
default:
|
|
1673
|
+
default: L(() => [A(e.$slots, "default", {}, () => [h(N(e.$t("xia-zai-dao-ru-mo-ban")), 1)])]),
|
|
1666
1674
|
_: 3
|
|
1667
1675
|
}, 16);
|
|
1668
1676
|
};
|
|
@@ -1780,8 +1788,8 @@ var kt = {
|
|
|
1780
1788
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1781
1789
|
}
|
|
1782
1790
|
return (t, n) => {
|
|
1783
|
-
let r =
|
|
1784
|
-
return e.layer.type ? (
|
|
1791
|
+
let r = j("el-button"), i = j("el-drawer"), a = j("el-dialog");
|
|
1792
|
+
return e.layer.type ? (D(), u(i, {
|
|
1785
1793
|
key: 0,
|
|
1786
1794
|
modelValue: e.layer.show,
|
|
1787
1795
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1792,18 +1800,18 @@ var kt = {
|
|
|
1792
1800
|
"before-close": s,
|
|
1793
1801
|
class: "drawer-content"
|
|
1794
1802
|
}, {
|
|
1795
|
-
default:
|
|
1796
|
-
|
|
1803
|
+
default: L(() => [
|
|
1804
|
+
A(t.$slots, "default"),
|
|
1797
1805
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1798
|
-
e.layer.showButton ? (
|
|
1799
|
-
default:
|
|
1806
|
+
e.layer.showButton ? (D(), f("div", kt, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1807
|
+
default: L(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1800
1808
|
_: 1
|
|
1801
1809
|
}), g(r, {
|
|
1802
1810
|
type: "primary",
|
|
1803
1811
|
loading: e.loading,
|
|
1804
|
-
onClick:
|
|
1812
|
+
onClick: P(o)
|
|
1805
1813
|
}, {
|
|
1806
|
-
default:
|
|
1814
|
+
default: L(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1807
1815
|
_: 1
|
|
1808
1816
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1809
1817
|
]),
|
|
@@ -1812,7 +1820,7 @@ var kt = {
|
|
|
1812
1820
|
"modelValue",
|
|
1813
1821
|
"size",
|
|
1814
1822
|
"title"
|
|
1815
|
-
])) :
|
|
1823
|
+
])) : re((D(), f("div", At, [g(a, {
|
|
1816
1824
|
"close-on-click-modal": !1,
|
|
1817
1825
|
modelValue: e.layer.show,
|
|
1818
1826
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1820,18 +1828,18 @@ var kt = {
|
|
|
1820
1828
|
width: e.layer.width || 500,
|
|
1821
1829
|
center: ""
|
|
1822
1830
|
}, m({
|
|
1823
|
-
default:
|
|
1831
|
+
default: L(() => [A(t.$slots, "default")]),
|
|
1824
1832
|
_: 2
|
|
1825
1833
|
}, [e.layer.showButton ? {
|
|
1826
1834
|
name: "footer",
|
|
1827
|
-
fn:
|
|
1828
|
-
default:
|
|
1835
|
+
fn: L(() => [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1836
|
+
default: L(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1829
1837
|
_: 1
|
|
1830
1838
|
}), g(r, {
|
|
1831
1839
|
type: "primary",
|
|
1832
|
-
onClick:
|
|
1840
|
+
onClick: P(o)
|
|
1833
1841
|
}, {
|
|
1834
|
-
default:
|
|
1842
|
+
default: L(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1835
1843
|
_: 1
|
|
1836
1844
|
}, 8, ["onClick"])])]),
|
|
1837
1845
|
key: "0"
|
|
@@ -1839,7 +1847,7 @@ var kt = {
|
|
|
1839
1847
|
"modelValue",
|
|
1840
1848
|
"title",
|
|
1841
1849
|
"width"
|
|
1842
|
-
])])), [[
|
|
1850
|
+
])])), [[P(Et), e.layer.show]]);
|
|
1843
1851
|
};
|
|
1844
1852
|
}
|
|
1845
1853
|
};
|
|
@@ -2035,7 +2043,7 @@ function Lt(e, t = {}) {
|
|
|
2035
2043
|
log: !1,
|
|
2036
2044
|
params: null,
|
|
2037
2045
|
format: null
|
|
2038
|
-
}, t), s =
|
|
2046
|
+
}, t), s = k([]), c = k(!1), l = (t) => {
|
|
2039
2047
|
let n = t || i;
|
|
2040
2048
|
c.value = !0, e(n).then((e) => {
|
|
2041
2049
|
let { code: t, data: c, msg: l } = e;
|
|
@@ -2063,8 +2071,8 @@ function Lt(e, t = {}) {
|
|
|
2063
2071
|
];
|
|
2064
2072
|
}
|
|
2065
2073
|
function Rt(e) {
|
|
2066
|
-
let t =
|
|
2067
|
-
return
|
|
2074
|
+
let t = k(e), n = k(""), r = k("");
|
|
2075
|
+
return I(t, (e) => {
|
|
2068
2076
|
let t = e || ["", ""];
|
|
2069
2077
|
n.value = t[0], r.value = t[1];
|
|
2070
2078
|
}), [
|
|
@@ -2088,8 +2096,8 @@ function Bt(e, t) {
|
|
|
2088
2096
|
//#endregion
|
|
2089
2097
|
//#region src/utils/hook/i18n.js
|
|
2090
2098
|
function Vt(e, t = []) {
|
|
2091
|
-
let { locale: n } = V(), r =
|
|
2092
|
-
return
|
|
2099
|
+
let { locale: n } = V(), r = k(e());
|
|
2100
|
+
return I([n, ...t], () => {
|
|
2093
2101
|
r.value = e();
|
|
2094
2102
|
}, { immediate: !0 }), r;
|
|
2095
2103
|
}
|
|
@@ -2102,7 +2110,7 @@ function Ht(e, t = "zh_cn", n = "en_us") {
|
|
|
2102
2110
|
//#endregion
|
|
2103
2111
|
//#region src/utils/hook/storeHook.js
|
|
2104
2112
|
function Ut(e, t) {
|
|
2105
|
-
let n =
|
|
2113
|
+
let n = pe;
|
|
2106
2114
|
return typeof e == "string" && e.length > 0 && (n = ue(e).mapState), Kt(t, n);
|
|
2107
2115
|
}
|
|
2108
2116
|
function Wt(e, t) {
|
|
@@ -2114,13 +2122,13 @@ function Gt(e, t) {
|
|
|
2114
2122
|
return typeof e == "string" && e.length > 0 && (n = ue(e).mapActions), qt(t, n);
|
|
2115
2123
|
}
|
|
2116
2124
|
function Kt(e, t) {
|
|
2117
|
-
let n =
|
|
2125
|
+
let n = H(), r = t(e), i = {};
|
|
2118
2126
|
return Object.keys(r).forEach((e) => {
|
|
2119
2127
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2120
2128
|
}), i;
|
|
2121
2129
|
}
|
|
2122
2130
|
function qt(e, t) {
|
|
2123
|
-
let n =
|
|
2131
|
+
let n = H(), r = t(e), i = {};
|
|
2124
2132
|
return Object.keys(r).forEach((e) => {
|
|
2125
2133
|
i[e] = r[e].bind({ $store: n });
|
|
2126
2134
|
}), i;
|
|
@@ -2132,13 +2140,13 @@ var Jt = {
|
|
|
2132
2140
|
props: { fontColor: String },
|
|
2133
2141
|
setup(e) {
|
|
2134
2142
|
return (t, n) => {
|
|
2135
|
-
let r =
|
|
2136
|
-
return
|
|
2143
|
+
let r = j("el-tag");
|
|
2144
|
+
return D(), u(r, x(t.$attrs, { style: {
|
|
2137
2145
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
2138
2146
|
color: e.fontColor,
|
|
2139
2147
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
2140
2148
|
} }), {
|
|
2141
|
-
default:
|
|
2149
|
+
default: L(() => [A(t.$slots, "default")]),
|
|
2142
2150
|
_: 3
|
|
2143
2151
|
}, 16, ["style"]);
|
|
2144
2152
|
};
|
|
@@ -2170,11 +2178,11 @@ function Zt() {
|
|
|
2170
2178
|
h(" "),
|
|
2171
2179
|
c,
|
|
2172
2180
|
h(" ")
|
|
2173
|
-
] }) : e.type == "text" ? g(
|
|
2181
|
+
] }) : e.type == "text" ? g(j("el-text"), { type: a }, { default: () => [
|
|
2174
2182
|
h(" "),
|
|
2175
2183
|
c,
|
|
2176
2184
|
h(" ")
|
|
2177
|
-
] }) : g(
|
|
2185
|
+
] }) : g(j("el-text"), null, { default: () => [
|
|
2178
2186
|
h(" "),
|
|
2179
2187
|
c,
|
|
2180
2188
|
h(" ")
|