joy-admin-components 0.2.129 → 0.2.131
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
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import { createNamespacedHelpers as
|
|
9
|
-
import { VxeUI as
|
|
10
|
-
import { useRouter 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, toValue as ne, unref as P, useAttrs as F, useModel as re, watch as ie, withCtx as I, withDirectives as ae, withKeys as oe, withModifiers as se } from "vue";
|
|
3
|
+
import { saveAs as L } from "file-saver";
|
|
4
|
+
import R from "exceljs";
|
|
5
|
+
import z from "dayjs";
|
|
6
|
+
import { createI18n as ce, useI18n as B } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as le, debounce as V, isArray as ue, without as de } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as fe, mapActions as pe, mapGetters as H, mapState as U, useStore as me } from "vuex";
|
|
9
|
+
import { VxeUI as W } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as he } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var ge = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, ye = Object.getOwnPropertyNames, G = Object.getPrototypeOf, be = Object.prototype.hasOwnProperty, xe = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), K = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = ye(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !be.call(e, s) && s !== n && _e(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = ve(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, Se = (e, t, n) => (n = e == null ? {} : ge(G(e)), K(t || !e || !e.__esModule ? _e(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), Ce = _({
|
|
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 ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDe
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), q = /* @__PURE__ */ xe(((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 ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDe
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), we = /* @__PURE__ */ xe(((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 ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDe
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), Te = /* @__PURE__ */ Se(q()), Ee = /* @__PURE__ */ Se(we()), De = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -225,7 +225,7 @@ var ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDe
|
|
|
225
225
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
226
226
|
validate: { invalidInput: "请输入正确内容" },
|
|
227
227
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
228
|
-
},
|
|
228
|
+
}, J = {
|
|
229
229
|
"dao-ru": "Import",
|
|
230
230
|
"quan-xuan": "Select All",
|
|
231
231
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -254,20 +254,20 @@ var ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDe
|
|
|
254
254
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
255
255
|
validate: { invalidInput: "Please enter valid content" },
|
|
256
256
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
257
|
-
},
|
|
258
|
-
zh_cn:
|
|
259
|
-
en_us:
|
|
257
|
+
}, Oe = {
|
|
258
|
+
zh_cn: De,
|
|
259
|
+
en_us: J
|
|
260
260
|
}, Y = null;
|
|
261
261
|
function ke(e = null) {
|
|
262
262
|
if (e) {
|
|
263
263
|
let { global: t } = e;
|
|
264
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
264
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", De) : t.setLocaleMessage("zh_cn", De), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", J) : t.setLocaleMessage("en_us", J), Y = e, e;
|
|
265
265
|
}
|
|
266
|
-
return Y ||=
|
|
266
|
+
return Y ||= ce({
|
|
267
267
|
legacy: !1,
|
|
268
268
|
locale: "zh_cn",
|
|
269
269
|
fallbackLocale: "zh_cn",
|
|
270
|
-
messages:
|
|
270
|
+
messages: Oe
|
|
271
271
|
}), Y;
|
|
272
272
|
}
|
|
273
273
|
function Ae() {
|
|
@@ -276,14 +276,14 @@ function Ae() {
|
|
|
276
276
|
function X() {
|
|
277
277
|
return Ae().global.t;
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
z.extend(Te.default), z.extend(Ee.default);
|
|
280
280
|
async function je(e, t) {
|
|
281
281
|
let { fields: n, range: r = 1 } = t;
|
|
282
282
|
if (!n) {
|
|
283
283
|
let e = X();
|
|
284
284
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
285
285
|
}
|
|
286
|
-
let i = new
|
|
286
|
+
let i = new R.Workbook();
|
|
287
287
|
await i.xlsx.load(e);
|
|
288
288
|
let a = {};
|
|
289
289
|
return i.eachSheet(function(e, t) {
|
|
@@ -310,13 +310,13 @@ async function Ne(e, t, n = [], r = {}) {
|
|
|
310
310
|
s.columns = t, s.addRows(n), i && await Fe(o, s, i);
|
|
311
311
|
try {
|
|
312
312
|
let t = await o.xlsx.writeBuffer();
|
|
313
|
-
|
|
313
|
+
L(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
314
314
|
} catch (e) {
|
|
315
315
|
console.log(e);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
function Pe() {
|
|
319
|
-
let e = new
|
|
319
|
+
let e = new R.Workbook();
|
|
320
320
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
321
321
|
workbook: e,
|
|
322
322
|
worksheet: e.addWorksheet("Sheet1")
|
|
@@ -400,7 +400,7 @@ async function He(e, t) {
|
|
|
400
400
|
let e = X();
|
|
401
401
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
402
402
|
}
|
|
403
|
-
let i = new
|
|
403
|
+
let i = new R.Workbook();
|
|
404
404
|
await i.xlsx.load(e);
|
|
405
405
|
let a = {};
|
|
406
406
|
return i.eachSheet(function(e, t) {
|
|
@@ -419,7 +419,7 @@ async function He(e, t) {
|
|
|
419
419
|
let r = { _excelRowNumber: i }, a = !0;
|
|
420
420
|
Object.keys(o).forEach((t) => {
|
|
421
421
|
let [c, l] = o[t].split(Z), u = e.getCell(c), d;
|
|
422
|
-
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ?
|
|
422
|
+
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? z(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Z)[1]), typeof d == "string" && (d = d.trim()), r[t] = d, d && (a = !1);
|
|
423
423
|
}), a || t.push(r);
|
|
424
424
|
}
|
|
425
425
|
}), a[e._name] = t;
|
|
@@ -536,13 +536,13 @@ async function We(e, t) {
|
|
|
536
536
|
}
|
|
537
537
|
try {
|
|
538
538
|
let t = await n.xlsx.writeBuffer();
|
|
539
|
-
|
|
539
|
+
L(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
540
540
|
} catch (e) {
|
|
541
541
|
console.log(e);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
function Ge(e) {
|
|
545
|
-
let t = X(), n = new
|
|
545
|
+
let t = X(), n = new R.Workbook();
|
|
546
546
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((t, n) => (e[t].sort ?? 0) - (e[n].sort ?? 0)).forEach((r) => {
|
|
547
547
|
let i = r, a = !1;
|
|
548
548
|
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), a = !0), r.length > 31 && (r = r.substring(0, 31).trim(), a = !0, console.warn(t("excel.sheetNameTooLong", [i, r]))), a && (e[r] = e[i], delete e[i]), n.addWorksheet(r);
|
|
@@ -568,7 +568,7 @@ function Ye(e, t) {
|
|
|
568
568
|
}
|
|
569
569
|
function Xe(e) {
|
|
570
570
|
let { sortData: t = {}, visibleData: n = {} } = JSON.parse(localStorage.getItem("VXE_CUSTOM_STORE") || "{}")[e ? `listPageId-${e}` : "listPageId-default"] || {}, r = Object.keys(t), i = Object.keys(n);
|
|
571
|
-
return i.push("type=checkbox", "action", "actions"),
|
|
571
|
+
return i.push("type=checkbox", "action", "actions"), de(r, ...i);
|
|
572
572
|
}
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/utils/tools/tools.js
|
|
@@ -726,62 +726,89 @@ var $ = (e, t) => {
|
|
|
726
726
|
"changeAll"
|
|
727
727
|
], ["update:modelValue"]),
|
|
728
728
|
setup(e, { emit: t }) {
|
|
729
|
-
let n = e, r =
|
|
729
|
+
let n = e, r = F(), { t: i, locale: a } = B(), o = re(e, "modelValue"), s = l(() => r["value-key"] != null), _ = k(""), v = k("");
|
|
730
|
+
function y(e) {
|
|
731
|
+
v.value = e;
|
|
732
|
+
}
|
|
733
|
+
let b = l(() => {
|
|
730
734
|
if (r.remote !== void 0) return n.data;
|
|
731
|
-
let e = et(_.value), { data: t, labelValue: i } = n, o = t ||
|
|
735
|
+
let e = et(_.value), { data: t, labelValue: i } = n, o = t || E.value;
|
|
732
736
|
if (e.length == 0) return o;
|
|
733
737
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
734
738
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
735
739
|
let n = !1;
|
|
736
740
|
return n = e.some((e) => t[l].toLowerCase() == e.toLowerCase()), n;
|
|
737
741
|
});
|
|
738
|
-
}),
|
|
742
|
+
}), C = l({
|
|
739
743
|
get() {
|
|
740
|
-
|
|
744
|
+
if (r.multiple == null || !o.value?.length) return !1;
|
|
745
|
+
let e = L.value;
|
|
746
|
+
return e.length ? e.every((e) => s.value ? o.value.some((t) => t[n.labelValue.value] === e[n.labelValue.value]) : o.value.includes(e[n.labelValue.value])) : !1;
|
|
741
747
|
},
|
|
742
748
|
set(e) {
|
|
743
749
|
return e;
|
|
744
750
|
}
|
|
745
|
-
}),
|
|
751
|
+
}), w = l(() => r.multiple == null || !o.value?.length || C.value ? !1 : L.value.some((e) => s.value ? o.value.some((t) => t[n.labelValue.value] === e[n.labelValue.value]) : o.value.includes(e[n.labelValue.value]))), T = t, E = k([]);
|
|
746
752
|
n.api && (async () => {
|
|
747
753
|
let { data: e } = await n.api();
|
|
748
|
-
|
|
754
|
+
E.value = [...e], T("success", E);
|
|
749
755
|
})();
|
|
750
|
-
function
|
|
751
|
-
|
|
752
|
-
n.optionClick && n.optionClick(
|
|
756
|
+
function ee(e) {
|
|
757
|
+
T("change", e), O.value && S(() => {
|
|
758
|
+
n.optionClick && n.optionClick(O.value), O.value = null;
|
|
753
759
|
});
|
|
754
760
|
}
|
|
755
|
-
let
|
|
756
|
-
function
|
|
761
|
+
let O = k(null);
|
|
762
|
+
function M() {
|
|
757
763
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
758
|
-
|
|
764
|
+
T("change", e), S(() => {
|
|
759
765
|
n.optionClick && n.optionClick(e);
|
|
760
766
|
});
|
|
761
767
|
}
|
|
762
|
-
function
|
|
763
|
-
|
|
768
|
+
function ne(e) {
|
|
769
|
+
O.value = e;
|
|
764
770
|
}
|
|
765
|
-
let
|
|
766
|
-
if (
|
|
771
|
+
let ae = n.labelValue.label.split("-"), oe = (e) => {
|
|
772
|
+
if (ae.length == 1) {
|
|
767
773
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
768
774
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
769
775
|
return t ||= e[n.labelValue.label], t + "";
|
|
770
776
|
} else {
|
|
771
777
|
let t = [];
|
|
772
|
-
return
|
|
778
|
+
return ae.forEach((n) => {
|
|
773
779
|
t.push(e[n]);
|
|
774
780
|
}), t.join("-");
|
|
775
781
|
}
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
782
|
+
}, L = l(() => {
|
|
783
|
+
if (r.v2 != null) {
|
|
784
|
+
let e = n.data || E.value;
|
|
785
|
+
if (r.remote != null || !v.value) return e;
|
|
786
|
+
let t = v.value.toLowerCase();
|
|
787
|
+
return e.filter((e) => oe(e).toLowerCase().includes(t));
|
|
788
|
+
}
|
|
789
|
+
return b.value;
|
|
790
|
+
});
|
|
791
|
+
function R(e) {
|
|
792
|
+
let t = L.value;
|
|
793
|
+
if (e) {
|
|
794
|
+
let e = o.value || [];
|
|
795
|
+
if (s.value) {
|
|
796
|
+
let r = new Set(e.map((e) => e[n.labelValue.value])), i = t.filter((e) => !r.has(e[n.labelValue.value]));
|
|
797
|
+
o.value = [...e, ...i];
|
|
798
|
+
} else {
|
|
799
|
+
let r = new Set(e), i = t.map((e) => e[n.labelValue.value]).filter((e) => !r.has(e));
|
|
800
|
+
o.value = [...e, ...i];
|
|
801
|
+
}
|
|
802
|
+
} else {
|
|
803
|
+
let e = new Set(t.map((e) => e[n.labelValue.value]));
|
|
804
|
+
s.value ? o.value = (o.value || []).filter((t) => !e.has(t[n.labelValue.value])) : o.value = (o.value || []).filter((t) => !e.has(t));
|
|
805
|
+
}
|
|
806
|
+
S(() => {
|
|
807
|
+
T("change", o.value), T("changeAll", o.value, t);
|
|
781
808
|
});
|
|
782
809
|
}
|
|
783
|
-
function
|
|
784
|
-
|
|
810
|
+
function z(e) {
|
|
811
|
+
T("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
785
812
|
n.optionClick && n.optionClick(e);
|
|
786
813
|
});
|
|
787
814
|
}
|
|
@@ -789,55 +816,60 @@ var $ = (e, t) => {
|
|
|
789
816
|
let t = s.value ? e : e[n.labelValue.value], r = s.value ? o.value.some((t) => t[n.labelValue.value] === e[n.labelValue.value]) : o.value.includes(t);
|
|
790
817
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
791
818
|
}
|
|
792
|
-
function
|
|
819
|
+
function le(e) {
|
|
793
820
|
return e.map((e) => ({
|
|
794
821
|
...e,
|
|
795
|
-
label:
|
|
822
|
+
label: oe(e),
|
|
796
823
|
value: s.value ? e : e[n.labelValue.value]
|
|
797
824
|
}));
|
|
798
825
|
}
|
|
799
|
-
let
|
|
800
|
-
|
|
801
|
-
let t =
|
|
802
|
-
if (t.length !==
|
|
826
|
+
let V = k([]);
|
|
827
|
+
V.value = le(n.data ? n.data : E.value), ie(() => n.data ? n.data : E.value, (e) => {
|
|
828
|
+
let t = le(e);
|
|
829
|
+
if (t.length !== V.value.length) V.value = t;
|
|
803
830
|
else {
|
|
804
831
|
let e = !1;
|
|
805
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
832
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== V.value[n]?.value) {
|
|
806
833
|
e = !0;
|
|
807
834
|
break;
|
|
808
835
|
}
|
|
809
|
-
e && (
|
|
836
|
+
e && (V.value = t);
|
|
810
837
|
}
|
|
811
838
|
}, { deep: !0 });
|
|
812
|
-
let
|
|
839
|
+
let ue = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? V.value.map((e) => ({
|
|
813
840
|
...e,
|
|
814
841
|
disabled: ce(e)
|
|
815
|
-
})) :
|
|
842
|
+
})) : V.value), de = l(() => {
|
|
843
|
+
if (r.remote != null || !v.value) return ue.value;
|
|
844
|
+
let e = v.value.toLowerCase();
|
|
845
|
+
return ue.value.filter((t) => t.label?.toLowerCase().includes(e));
|
|
846
|
+
});
|
|
816
847
|
return (t, n) => {
|
|
817
|
-
let i =
|
|
818
|
-
return
|
|
848
|
+
let i = j("el-checkbox"), a = j("el-select-v2"), l = j("el-option"), v = j("el-select");
|
|
849
|
+
return P(r).v2 == null ? (D(), u(v, x({
|
|
819
850
|
key: 1,
|
|
820
851
|
modelValue: o.value,
|
|
821
852
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
822
853
|
filterable: "",
|
|
823
854
|
"collapse-tags": "",
|
|
824
855
|
"collapse-tags-tooltip": "",
|
|
825
|
-
"filter-method":
|
|
856
|
+
"filter-method": P(r).remote == null ? (e) => _.value = e : void 0,
|
|
826
857
|
clearable: ""
|
|
827
|
-
},
|
|
828
|
-
default:
|
|
858
|
+
}, P(r), { onClear: M }), {
|
|
859
|
+
default: I(() => [P(r).multiple != null && e.showCheckAll && e.maxLimit == null ? A(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
829
860
|
class: "mgl20",
|
|
830
|
-
modelValue:
|
|
831
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
832
|
-
|
|
861
|
+
modelValue: C.value,
|
|
862
|
+
"onUpdate:modelValue": n[2] ||= (e) => C.value = e,
|
|
863
|
+
indeterminate: w.value,
|
|
864
|
+
onChange: R
|
|
833
865
|
}, {
|
|
834
|
-
default:
|
|
866
|
+
default: I(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
835
867
|
_: 1
|
|
836
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (
|
|
868
|
+
}, 8, ["modelValue", "indeterminate"])], !0) : d("", !0), (D(!0), f(c, null, te(b.value, (t, n) => (D(), u(l, {
|
|
837
869
|
key: n,
|
|
838
|
-
label:
|
|
839
|
-
disabled:
|
|
840
|
-
onClick:
|
|
870
|
+
label: oe(t),
|
|
871
|
+
disabled: P(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? ce(t) : !1,
|
|
872
|
+
onClick: se((e) => z(t), ["stop"]),
|
|
841
873
|
value: s.value ? t : t[e.labelValue.value]
|
|
842
874
|
}, null, 8, [
|
|
843
875
|
"label",
|
|
@@ -846,43 +878,49 @@ var $ = (e, t) => {
|
|
|
846
878
|
"value"
|
|
847
879
|
]))), 128))]),
|
|
848
880
|
_: 3
|
|
849
|
-
}, 16, ["modelValue", "filter-method"])) : (
|
|
881
|
+
}, 16, ["modelValue", "filter-method"])) : (D(), u(a, x({
|
|
850
882
|
key: 0,
|
|
851
|
-
options:
|
|
883
|
+
options: de.value,
|
|
852
884
|
modelValue: o.value,
|
|
853
885
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
854
|
-
},
|
|
886
|
+
}, P(r), {
|
|
855
887
|
filterable: "",
|
|
856
888
|
"collapse-tags": "",
|
|
857
889
|
"collapse-tags-tooltip": "",
|
|
858
890
|
clearable: "",
|
|
859
|
-
|
|
891
|
+
"filter-method": P(r).remote == null ? y : void 0,
|
|
892
|
+
onChange: ee
|
|
860
893
|
}), m({
|
|
861
|
-
default:
|
|
894
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => ne(e) }, N(e.label), 9, lt)]),
|
|
862
895
|
_: 2
|
|
863
|
-
}, [
|
|
896
|
+
}, [P(r).multiple == null ? void 0 : {
|
|
864
897
|
name: "header",
|
|
865
|
-
fn:
|
|
898
|
+
fn: I(() => [A(t.$slots, "header", {}, () => [g(i, {
|
|
866
899
|
class: "mgl20",
|
|
867
|
-
modelValue:
|
|
868
|
-
"onUpdate:modelValue": n[0] ||= (e) =>
|
|
869
|
-
|
|
900
|
+
modelValue: C.value,
|
|
901
|
+
"onUpdate:modelValue": n[0] ||= (e) => C.value = e,
|
|
902
|
+
indeterminate: w.value,
|
|
903
|
+
onChange: R
|
|
870
904
|
}, {
|
|
871
|
-
default:
|
|
905
|
+
default: I(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
872
906
|
_: 1
|
|
873
|
-
}, 8, ["modelValue"])], !0)]),
|
|
907
|
+
}, 8, ["modelValue", "indeterminate"])], !0)]),
|
|
874
908
|
key: "0"
|
|
875
|
-
}]), 1040, [
|
|
909
|
+
}]), 1040, [
|
|
910
|
+
"options",
|
|
911
|
+
"modelValue",
|
|
912
|
+
"filter-method"
|
|
913
|
+
]));
|
|
876
914
|
};
|
|
877
915
|
}
|
|
878
|
-
}, [["__scopeId", "data-v-
|
|
916
|
+
}, [["__scopeId", "data-v-982e480f"]]), dt = _({ props: { name: {
|
|
879
917
|
tyepe: String,
|
|
880
918
|
required: !0
|
|
881
919
|
} } });
|
|
882
920
|
function ft(e, t, n, r, i, a) {
|
|
883
|
-
let o =
|
|
884
|
-
return
|
|
885
|
-
default:
|
|
921
|
+
let o = j("el-icon");
|
|
922
|
+
return D(), u(o, { class: "cmp-icon" }, {
|
|
923
|
+
default: I(() => [(D(), u(M(e.name)))]),
|
|
886
924
|
_: 1
|
|
887
925
|
});
|
|
888
926
|
}
|
|
@@ -891,13 +929,13 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
891
929
|
props: { fontColor: String },
|
|
892
930
|
setup(e) {
|
|
893
931
|
return (t, n) => {
|
|
894
|
-
let r =
|
|
895
|
-
return
|
|
932
|
+
let r = j("el-tag");
|
|
933
|
+
return D(), u(r, x(t.$attrs, { style: {
|
|
896
934
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
897
935
|
color: e.fontColor,
|
|
898
936
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
899
937
|
} }), {
|
|
900
|
-
default:
|
|
938
|
+
default: I(() => [A(t.$slots, "default")]),
|
|
901
939
|
_: 3
|
|
902
940
|
}, 16, ["style"]);
|
|
903
941
|
};
|
|
@@ -906,19 +944,19 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
906
944
|
__name: "index",
|
|
907
945
|
emits: ["ok", "no"],
|
|
908
946
|
setup(e, { emit: t }) {
|
|
909
|
-
let n = t, r =
|
|
947
|
+
let n = t, r = V(() => {
|
|
910
948
|
n("ok");
|
|
911
949
|
}, 500);
|
|
912
950
|
function i() {
|
|
913
951
|
n("no");
|
|
914
952
|
}
|
|
915
953
|
return (e, t) => {
|
|
916
|
-
let n =
|
|
917
|
-
return
|
|
918
|
-
onConfirm:
|
|
954
|
+
let n = j("el-popconfirm");
|
|
955
|
+
return D(), f("span", ht, [g(n, x(e.$attrs, {
|
|
956
|
+
onConfirm: P(r),
|
|
919
957
|
onCancel: i
|
|
920
958
|
}), {
|
|
921
|
-
reference:
|
|
959
|
+
reference: I(() => [A(e.$slots, "default", {}, void 0, !0)]),
|
|
922
960
|
_: 3
|
|
923
961
|
}, 16, ["onConfirm"])]);
|
|
924
962
|
};
|
|
@@ -944,7 +982,7 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
944
982
|
}
|
|
945
983
|
},
|
|
946
984
|
setup(e) {
|
|
947
|
-
let { t } =
|
|
985
|
+
let { t } = B(), n = e, r = k(null), a = k(!1);
|
|
948
986
|
function o(e) {
|
|
949
987
|
let t = e.match(/__v(\d+)/);
|
|
950
988
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -969,14 +1007,14 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
969
1007
|
});
|
|
970
1008
|
}
|
|
971
1009
|
return (t, n) => {
|
|
972
|
-
let i =
|
|
973
|
-
return
|
|
1010
|
+
let i = j("el-button");
|
|
1011
|
+
return D(), f("div", _t, [g(i, x({
|
|
974
1012
|
type: "primary",
|
|
975
1013
|
loading: a.value,
|
|
976
1014
|
class: "mgr10",
|
|
977
1015
|
onClick: n[0] ||= (e) => r.value.click()
|
|
978
1016
|
}, t.$attrs), {
|
|
979
|
-
default:
|
|
1017
|
+
default: I(() => [A(t.$slots, "default", {}, () => [h(N(t.$t("dao-ru")), 1)], !0)]),
|
|
980
1018
|
_: 3
|
|
981
1019
|
}, 16, ["loading"]), p("input", {
|
|
982
1020
|
onChange: s,
|
|
@@ -1003,7 +1041,7 @@ function bt(e) {
|
|
|
1003
1041
|
if (n) if (r == "input" && i?.multiple) t[n] = et(a);
|
|
1004
1042
|
else if (r == "date") if (o.includes("range")) {
|
|
1005
1043
|
let [e, r] = n, [i, s] = a || [];
|
|
1006
|
-
i && o == "daterange" && (i =
|
|
1044
|
+
i && o == "daterange" && (i = z(i).format("YYYY-MM-DD 00:00:00"), s = z(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
1007
1045
|
} else t[n] = s(a);
|
|
1008
1046
|
else t[n] = a;
|
|
1009
1047
|
}), t;
|
|
@@ -1022,7 +1060,7 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1022
1060
|
"visibleChange"
|
|
1023
1061
|
],
|
|
1024
1062
|
setup(e, { expose: t, emit: n }) {
|
|
1025
|
-
let r = e, i = n, a =
|
|
1063
|
+
let r = e, i = n, a = k(!0), o = k(null), { t: s } = B(), m = {
|
|
1026
1064
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
1027
1065
|
daterange: "YYYY-MM-DD",
|
|
1028
1066
|
month: "YYYY-MM"
|
|
@@ -1042,21 +1080,21 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1042
1080
|
function T() {
|
|
1043
1081
|
return bt(r.form.items);
|
|
1044
1082
|
}
|
|
1045
|
-
let
|
|
1046
|
-
function
|
|
1083
|
+
let E = le(r.form.items);
|
|
1084
|
+
function ee() {
|
|
1047
1085
|
r.form?.items?.forEach((e) => {
|
|
1048
|
-
let t =
|
|
1086
|
+
let t = E.find((t) => t.key == e.key);
|
|
1049
1087
|
t && (e.value = t.value);
|
|
1050
1088
|
});
|
|
1051
1089
|
}
|
|
1052
1090
|
return t({
|
|
1053
1091
|
getPrm: T,
|
|
1054
|
-
reset:
|
|
1092
|
+
reset: ee
|
|
1055
1093
|
}), (t, n) => {
|
|
1056
|
-
let r =
|
|
1057
|
-
return
|
|
1094
|
+
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");
|
|
1095
|
+
return D(), f("div", {
|
|
1058
1096
|
class: "searchBar-container mgt10 mgb10",
|
|
1059
|
-
onKeydown:
|
|
1097
|
+
onKeydown: oe(v, ["enter"])
|
|
1060
1098
|
}, [p("div", {
|
|
1061
1099
|
class: "searchBar",
|
|
1062
1100
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -1064,12 +1102,12 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1064
1102
|
inline: "",
|
|
1065
1103
|
model: e.form.data
|
|
1066
1104
|
}, {
|
|
1067
|
-
default:
|
|
1105
|
+
default: I(() => [(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", xt)) : (D(), u(l, {
|
|
1068
1106
|
key: 1,
|
|
1069
1107
|
label: e.name
|
|
1070
1108
|
}, {
|
|
1071
|
-
default:
|
|
1072
|
-
e.type === "input" ? (
|
|
1109
|
+
default: I(() => [
|
|
1110
|
+
e.type === "input" ? (D(), u(r, {
|
|
1073
1111
|
key: 0,
|
|
1074
1112
|
modelValue: e.value,
|
|
1075
1113
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
@@ -1081,8 +1119,8 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1081
1119
|
"onUpdate:modelValue",
|
|
1082
1120
|
"class",
|
|
1083
1121
|
"placeholder"
|
|
1084
|
-
])) : e.type === "custom" ? (
|
|
1085
|
-
e.type === "select" ? (
|
|
1122
|
+
])) : e.type === "custom" ? (D(), u(M(e.render), { key: 1 })) : d("", !0),
|
|
1123
|
+
e.type === "select" ? (D(), u(ut, x({
|
|
1086
1124
|
key: 2,
|
|
1087
1125
|
class: e.option?.class || "w150",
|
|
1088
1126
|
modelValue: e.value,
|
|
@@ -1098,7 +1136,7 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1098
1136
|
"onClear",
|
|
1099
1137
|
"placeholder"
|
|
1100
1138
|
])) : d("", !0),
|
|
1101
|
-
e.type === "date" ? (
|
|
1139
|
+
e.type === "date" ? (D(), u(s, x({
|
|
1102
1140
|
key: 3,
|
|
1103
1141
|
class: {
|
|
1104
1142
|
datetimerange: "w300",
|
|
@@ -1129,32 +1167,32 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1129
1167
|
_: 2
|
|
1130
1168
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1131
1169
|
_: 1
|
|
1132
|
-
}, 8, ["model"])], 4), p("div", St, [p("div", Ct, [
|
|
1133
|
-
g(
|
|
1170
|
+
}, 8, ["model"])], 4), p("div", St, [p("div", Ct, [A(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", wt, [
|
|
1171
|
+
g(E, {
|
|
1134
1172
|
underline: "never",
|
|
1135
1173
|
class: "mgr10",
|
|
1136
1174
|
onClick: n[0] ||= () => {
|
|
1137
1175
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1138
1176
|
}
|
|
1139
1177
|
}, {
|
|
1140
|
-
default:
|
|
1178
|
+
default: I(() => [g(pt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + N(_.value), 1)]),
|
|
1141
1179
|
_: 1
|
|
1142
1180
|
}),
|
|
1143
|
-
g(
|
|
1181
|
+
g(ee, {
|
|
1144
1182
|
type: "primary",
|
|
1145
1183
|
onClick: v
|
|
1146
1184
|
}, {
|
|
1147
|
-
default:
|
|
1185
|
+
default: I(() => [h(N(t.$t("shai-xuan")), 1)]),
|
|
1148
1186
|
_: 1
|
|
1149
1187
|
}),
|
|
1150
|
-
g(
|
|
1188
|
+
g(ee, {
|
|
1151
1189
|
type: "primary",
|
|
1152
1190
|
onClick: b
|
|
1153
1191
|
}, {
|
|
1154
|
-
default:
|
|
1192
|
+
default: I(() => [h(N(t.$t("chong-zhi")), 1)]),
|
|
1155
1193
|
_: 1
|
|
1156
1194
|
}),
|
|
1157
|
-
|
|
1195
|
+
A(t.$slots, "btn", {}, void 0, !0)
|
|
1158
1196
|
])])], 32);
|
|
1159
1197
|
};
|
|
1160
1198
|
}
|
|
@@ -1231,21 +1269,21 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1231
1269
|
}
|
|
1232
1270
|
},
|
|
1233
1271
|
setup(e, { expose: t }) {
|
|
1234
|
-
let { t: n, locale: r } =
|
|
1272
|
+
let { t: n, locale: r } = B(), i = kt(), a = e, o = k(!1), s = k([]);
|
|
1235
1273
|
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 = []);
|
|
1236
|
-
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m =
|
|
1274
|
+
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m = le(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = O({
|
|
1237
1275
|
[_]: 1,
|
|
1238
1276
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1239
1277
|
total: 0
|
|
1240
|
-
}), b =
|
|
1278
|
+
}), b = k(null), w = k(null), te = k(450), M = V(() => {
|
|
1241
1279
|
S(() => {
|
|
1242
1280
|
if (!w.value) return;
|
|
1243
1281
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1244
|
-
|
|
1282
|
+
te.value = Math.max(t, 200);
|
|
1245
1283
|
});
|
|
1246
|
-
}, 100),
|
|
1247
|
-
|
|
1248
|
-
},
|
|
1284
|
+
}, 100), ne = () => {
|
|
1285
|
+
M();
|
|
1286
|
+
}, F = () => {
|
|
1249
1287
|
if (b.value) return b.value;
|
|
1250
1288
|
let e = w.value;
|
|
1251
1289
|
if (e) {
|
|
@@ -1253,39 +1291,39 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1253
1291
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1254
1292
|
}
|
|
1255
1293
|
return null;
|
|
1256
|
-
},
|
|
1294
|
+
}, re = () => {
|
|
1257
1295
|
if (!a.searchForm.enableCellCopy) return !1;
|
|
1258
|
-
let e =
|
|
1296
|
+
let e = F();
|
|
1259
1297
|
if (!e || !e.$el) return !1;
|
|
1260
1298
|
let t = e.$el;
|
|
1261
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1299
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown", Pe), t.addEventListener("mousedown", Ce), t.addEventListener("mousemove", we), t.addEventListener("mouseup", Te), t.addEventListener("keydown", Pe);
|
|
1262
1300
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1263
1301
|
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", je), n.addEventListener("scroll", je), n.__cellCopyScrollBound = !0), Ae(), !0;
|
|
1264
1302
|
};
|
|
1265
1303
|
T(() => {
|
|
1266
|
-
|
|
1267
|
-
|
|
1304
|
+
M(), window.addEventListener("resize", ne), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Fe), document.addEventListener("mousedown", Ie), setTimeout(() => {
|
|
1305
|
+
re();
|
|
1268
1306
|
}, 500));
|
|
1269
|
-
}),
|
|
1307
|
+
}), ee(() => {
|
|
1270
1308
|
a.searchForm.enableCellCopy && setTimeout(() => {
|
|
1271
|
-
|
|
1309
|
+
re();
|
|
1272
1310
|
}, 500);
|
|
1273
|
-
}),
|
|
1274
|
-
if (window.removeEventListener("resize",
|
|
1275
|
-
document.removeEventListener("mouseup", Fe), document.removeEventListener("mousedown", Ie), document.removeEventListener("mousemove",
|
|
1276
|
-
let e =
|
|
1311
|
+
}), E(() => {
|
|
1312
|
+
if (window.removeEventListener("resize", ne), a.searchForm.enableCellCopy) {
|
|
1313
|
+
document.removeEventListener("mouseup", Fe), document.removeEventListener("mousedown", Ie), document.removeEventListener("mousemove", be), K(), X();
|
|
1314
|
+
let e = F();
|
|
1277
1315
|
if (e && e.$el) {
|
|
1278
1316
|
let t = e.$el;
|
|
1279
|
-
t.removeEventListener("mousedown",
|
|
1317
|
+
t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown", Pe);
|
|
1280
1318
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1281
1319
|
n && (n.removeEventListener("scroll", je), n.__cellCopyScrollBound = !1);
|
|
1282
1320
|
}
|
|
1283
1321
|
}
|
|
1284
1322
|
});
|
|
1285
|
-
let
|
|
1286
|
-
async function
|
|
1323
|
+
let ie = l(() => pe.value.height || te.value), ae;
|
|
1324
|
+
async function oe(e) {
|
|
1287
1325
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1288
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1326
|
+
e[_] != 1 && (e.nextSearchAfter = ae), o.value = !0;
|
|
1289
1327
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1290
1328
|
o.value = !1, a.searchForm.selections = [];
|
|
1291
1329
|
});
|
|
@@ -1310,54 +1348,58 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1310
1348
|
break;
|
|
1311
1349
|
}
|
|
1312
1350
|
}
|
|
1313
|
-
s.value = n ? n(e) : e, y.total = i,
|
|
1351
|
+
s.value = n ? n(e) : e, y.total = i, ae = c.nextSearchAfter, a.searchForm.enableCellCopy && (Ee(), W = /* @__PURE__ */ new WeakMap(), he = null, S(() => {
|
|
1314
1352
|
setTimeout(() => {
|
|
1315
|
-
|
|
1353
|
+
re();
|
|
1316
1354
|
}, 500);
|
|
1317
1355
|
}));
|
|
1318
1356
|
}
|
|
1319
1357
|
}
|
|
1320
|
-
function
|
|
1358
|
+
function L(e = {}) {
|
|
1321
1359
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1322
|
-
|
|
1360
|
+
oe({
|
|
1323
1361
|
...y,
|
|
1324
1362
|
...bt(a.searchForm.items),
|
|
1325
1363
|
...e,
|
|
1326
1364
|
...n
|
|
1327
1365
|
});
|
|
1328
1366
|
}
|
|
1329
|
-
function
|
|
1367
|
+
function R() {
|
|
1330
1368
|
let { reset: e } = a.tableConfig;
|
|
1331
1369
|
e && e(), a.searchForm?.items?.forEach((e) => {
|
|
1332
|
-
let t = m.find((t) =>
|
|
1370
|
+
let t = m.find((t) => ue(e.key) && ue(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1333
1371
|
t && (e.value = t.value);
|
|
1334
|
-
}),
|
|
1372
|
+
}), L();
|
|
1335
1373
|
}
|
|
1336
|
-
a.api && a.immediate &&
|
|
1337
|
-
function
|
|
1374
|
+
a.api && a.immediate && L();
|
|
1375
|
+
function z() {
|
|
1338
1376
|
return {
|
|
1339
1377
|
...y,
|
|
1340
1378
|
...bt(a.searchForm.items)
|
|
1341
1379
|
};
|
|
1342
1380
|
}
|
|
1343
|
-
let
|
|
1381
|
+
let ce = () => {
|
|
1344
1382
|
let e = b.value;
|
|
1345
1383
|
e && e.clearSort();
|
|
1346
|
-
},
|
|
1384
|
+
}, de = O({ storage: !0 }), fe = O({
|
|
1347
1385
|
drag: !0,
|
|
1348
1386
|
resizable: !0,
|
|
1349
1387
|
maxFixedSize: 0
|
|
1350
|
-
}),
|
|
1351
|
-
let { customConfig: e, columnConfig: t,
|
|
1388
|
+
}), pe = l(() => {
|
|
1389
|
+
let { customConfig: e, columnConfig: t, "row-config": n, ...r } = a.tableConfig;
|
|
1352
1390
|
return {
|
|
1353
1391
|
headerAlign: "left",
|
|
1354
1392
|
align: "center",
|
|
1393
|
+
"row-config": {
|
|
1394
|
+
isHover: !0,
|
|
1395
|
+
...n
|
|
1396
|
+
},
|
|
1355
1397
|
customConfig: {
|
|
1356
|
-
...
|
|
1398
|
+
...de,
|
|
1357
1399
|
...e
|
|
1358
1400
|
},
|
|
1359
1401
|
columnConfig: {
|
|
1360
|
-
...
|
|
1402
|
+
...fe,
|
|
1361
1403
|
...t
|
|
1362
1404
|
},
|
|
1363
1405
|
"virtual-x-config": {
|
|
@@ -1368,20 +1410,20 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1368
1410
|
enabled: !0,
|
|
1369
1411
|
gt: 100
|
|
1370
1412
|
},
|
|
1371
|
-
...
|
|
1413
|
+
...r
|
|
1372
1414
|
};
|
|
1373
|
-
}),
|
|
1415
|
+
}), H = O({
|
|
1374
1416
|
isSelecting: !1,
|
|
1375
1417
|
startCell: null,
|
|
1376
1418
|
endCell: null,
|
|
1377
1419
|
selectedCells: []
|
|
1378
|
-
}),
|
|
1379
|
-
if (!
|
|
1380
|
-
|
|
1420
|
+
}), U = null, me = () => {
|
|
1421
|
+
if (!H.startCell || !H.endCell) {
|
|
1422
|
+
U = null, H.selectedCells = [];
|
|
1381
1423
|
return;
|
|
1382
1424
|
}
|
|
1383
|
-
let e = Math.min(
|
|
1384
|
-
|
|
1425
|
+
let e = Math.min(H.startCell.rowIndex, H.endCell.rowIndex), t = Math.max(H.startCell.rowIndex, H.endCell.rowIndex), n = Math.min(H.startCell.colIndex, H.endCell.colIndex), r = Math.max(H.startCell.colIndex, H.endCell.colIndex);
|
|
1426
|
+
U = {
|
|
1385
1427
|
minRow: e,
|
|
1386
1428
|
maxRow: t,
|
|
1387
1429
|
minCol: n,
|
|
@@ -1392,25 +1434,25 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1392
1434
|
rowIndex: a,
|
|
1393
1435
|
colIndex: e
|
|
1394
1436
|
});
|
|
1395
|
-
|
|
1396
|
-
},
|
|
1437
|
+
H.selectedCells = i;
|
|
1438
|
+
}, W = /* @__PURE__ */ new WeakMap(), he = null, ge = 0, _e = (e, t) => {
|
|
1397
1439
|
let n = e.getTableData().fullData;
|
|
1398
|
-
if (n !==
|
|
1399
|
-
|
|
1400
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1440
|
+
if (n !== he || n.length !== ge) {
|
|
1441
|
+
W = /* @__PURE__ */ new WeakMap(), he = n, ge = n.length;
|
|
1442
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && W.set(n[e], e);
|
|
1401
1443
|
}
|
|
1402
|
-
return
|
|
1403
|
-
},
|
|
1444
|
+
return W.has(t) ? W.get(t) : -1;
|
|
1445
|
+
}, ve = (e) => {
|
|
1404
1446
|
let t = e.closest(".vxe-body--column");
|
|
1405
1447
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1406
1448
|
let n = t.closest(".vxe-body--row");
|
|
1407
1449
|
if (!n) return null;
|
|
1408
|
-
let r =
|
|
1450
|
+
let r = F();
|
|
1409
1451
|
if (!r) return null;
|
|
1410
1452
|
let i = -1, a = n.getAttribute("rowid");
|
|
1411
1453
|
if (a != null) {
|
|
1412
1454
|
let e = r.getRowById(a);
|
|
1413
|
-
e && (i =
|
|
1455
|
+
e && (i = _e(r, e));
|
|
1414
1456
|
}
|
|
1415
1457
|
if (i < 0) {
|
|
1416
1458
|
let e = n.parentElement;
|
|
@@ -1423,49 +1465,49 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1423
1465
|
colIndex: o,
|
|
1424
1466
|
cell: t
|
|
1425
1467
|
};
|
|
1426
|
-
},
|
|
1427
|
-
if (!
|
|
1428
|
-
|
|
1429
|
-
let t =
|
|
1468
|
+
}, ye = null, G = 0, be = (e) => {
|
|
1469
|
+
if (!H.isSelecting) return;
|
|
1470
|
+
G = e.clientY;
|
|
1471
|
+
let t = F();
|
|
1430
1472
|
if (!t || !t.$el) return;
|
|
1431
1473
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1432
1474
|
if (!r) return;
|
|
1433
1475
|
let i = r.getBoundingClientRect();
|
|
1434
|
-
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ?
|
|
1435
|
-
},
|
|
1476
|
+
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ? ye || xe() : K();
|
|
1477
|
+
}, xe = () => {
|
|
1436
1478
|
let e = () => {
|
|
1437
|
-
if (!
|
|
1438
|
-
|
|
1479
|
+
if (!H.isSelecting) {
|
|
1480
|
+
K();
|
|
1439
1481
|
return;
|
|
1440
1482
|
}
|
|
1441
|
-
let t =
|
|
1483
|
+
let t = F();
|
|
1442
1484
|
if (!t || !t.$el) {
|
|
1443
|
-
|
|
1485
|
+
K();
|
|
1444
1486
|
return;
|
|
1445
1487
|
}
|
|
1446
1488
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1447
1489
|
if (!r) {
|
|
1448
|
-
|
|
1490
|
+
K();
|
|
1449
1491
|
return;
|
|
1450
1492
|
}
|
|
1451
1493
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1452
|
-
if (
|
|
1453
|
-
let e = i.top -
|
|
1494
|
+
if (G < i.top) {
|
|
1495
|
+
let e = i.top - G;
|
|
1454
1496
|
a = -Math.min(Nt, Math.max(2, e * Pt));
|
|
1455
|
-
} else if (
|
|
1456
|
-
let e =
|
|
1497
|
+
} else if (G > i.bottom) {
|
|
1498
|
+
let e = G - i.bottom;
|
|
1457
1499
|
a = Math.min(Nt, Math.max(2, e * Pt));
|
|
1458
1500
|
} else {
|
|
1459
|
-
|
|
1501
|
+
K();
|
|
1460
1502
|
return;
|
|
1461
1503
|
}
|
|
1462
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)),
|
|
1504
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Se(r, i), ye = requestAnimationFrame(e);
|
|
1463
1505
|
};
|
|
1464
|
-
|
|
1465
|
-
},
|
|
1466
|
-
|
|
1467
|
-
},
|
|
1468
|
-
let n =
|
|
1506
|
+
ye = requestAnimationFrame(e);
|
|
1507
|
+
}, K = () => {
|
|
1508
|
+
ye &&= (cancelAnimationFrame(ye), null);
|
|
1509
|
+
}, Se = (e, t) => {
|
|
1510
|
+
let n = F();
|
|
1469
1511
|
if (!n) return;
|
|
1470
1512
|
let r = n.getTableData().fullData;
|
|
1471
1513
|
if (!r || r.length === 0) return;
|
|
@@ -1474,53 +1516,53 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1474
1516
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1475
1517
|
if (a.length === 0) return;
|
|
1476
1518
|
let o = null;
|
|
1477
|
-
if (
|
|
1519
|
+
if (G < t.top ? o = a[0] : G > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1478
1520
|
let s = o.getAttribute("rowid");
|
|
1479
1521
|
if (s == null) return;
|
|
1480
1522
|
let c = -1, l = n.getRowById(s);
|
|
1481
1523
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1482
|
-
let u =
|
|
1483
|
-
|
|
1524
|
+
let u = H.endCell ? H.endCell.colIndex : H.startCell ? H.startCell.colIndex : 0;
|
|
1525
|
+
H.endCell = {
|
|
1484
1526
|
rowIndex: c,
|
|
1485
1527
|
colIndex: u
|
|
1486
|
-
},
|
|
1487
|
-
},
|
|
1488
|
-
let t =
|
|
1528
|
+
}, me(), J();
|
|
1529
|
+
}, Ce = (e) => {
|
|
1530
|
+
let t = ve(e.target);
|
|
1489
1531
|
if (!t) {
|
|
1490
|
-
|
|
1532
|
+
Ee();
|
|
1491
1533
|
return;
|
|
1492
1534
|
}
|
|
1493
|
-
let n =
|
|
1494
|
-
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"),
|
|
1535
|
+
let n = F();
|
|
1536
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), H.isSelecting = !0, H.startCell = {
|
|
1495
1537
|
rowIndex: t.rowIndex,
|
|
1496
1538
|
colIndex: t.colIndex
|
|
1497
|
-
},
|
|
1498
|
-
},
|
|
1499
|
-
|
|
1500
|
-
if (
|
|
1501
|
-
let t =
|
|
1502
|
-
t && (
|
|
1539
|
+
}, H.endCell = { ...H.startCell }, document.addEventListener("mousemove", be), me(), J();
|
|
1540
|
+
}, q = null, we = (e) => {
|
|
1541
|
+
H.isSelecting && (q ||= requestAnimationFrame(() => {
|
|
1542
|
+
if (q = null, !H.isSelecting) return;
|
|
1543
|
+
let t = ve(e.target);
|
|
1544
|
+
t && (H.endCell && H.endCell.rowIndex === t.rowIndex && H.endCell.colIndex === t.colIndex || (H.endCell = {
|
|
1503
1545
|
rowIndex: t.rowIndex,
|
|
1504
1546
|
colIndex: t.colIndex
|
|
1505
|
-
},
|
|
1547
|
+
}, me(), J()));
|
|
1506
1548
|
}));
|
|
1507
|
-
},
|
|
1508
|
-
|
|
1509
|
-
},
|
|
1510
|
-
|
|
1511
|
-
let e =
|
|
1549
|
+
}, Te = () => {
|
|
1550
|
+
H.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1551
|
+
}, Ee = () => {
|
|
1552
|
+
H.selectedCells = [], H.startCell = null, H.endCell = null, U = null;
|
|
1553
|
+
let e = F();
|
|
1512
1554
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1513
1555
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1514
1556
|
});
|
|
1515
|
-
},
|
|
1516
|
-
let e =
|
|
1557
|
+
}, De = () => {
|
|
1558
|
+
let e = F();
|
|
1517
1559
|
if (!e) return;
|
|
1518
1560
|
let t = e.$el;
|
|
1519
1561
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1520
1562
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1521
1563
|
for (let e = 0; e < n.length; e++) n[e].classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1522
|
-
if (!
|
|
1523
|
-
let { minRow: r, maxRow: i, minCol: a, maxCol: o } =
|
|
1564
|
+
if (!U) return;
|
|
1565
|
+
let { minRow: r, maxRow: i, minCol: a, maxCol: o } = U, s = e.getColumns(), c = e.getTableData().fullData, l = /* @__PURE__ */ new Map();
|
|
1524
1566
|
for (let t = r; t <= i; t++) {
|
|
1525
1567
|
let n = c[t];
|
|
1526
1568
|
if (n) {
|
|
@@ -1541,7 +1583,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1541
1583
|
let d = l.get(String(u));
|
|
1542
1584
|
if (d === void 0) {
|
|
1543
1585
|
let t = e.getRowById(u);
|
|
1544
|
-
if (t && (d =
|
|
1586
|
+
if (t && (d = _e(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1545
1587
|
}
|
|
1546
1588
|
if (d < r || d > i) continue;
|
|
1547
1589
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1552,33 +1594,33 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1552
1594
|
}
|
|
1553
1595
|
}
|
|
1554
1596
|
}
|
|
1555
|
-
},
|
|
1597
|
+
}, J = () => {
|
|
1556
1598
|
S(() => {
|
|
1557
|
-
|
|
1599
|
+
De();
|
|
1558
1600
|
});
|
|
1559
|
-
},
|
|
1601
|
+
}, Oe = null, Y = null, ke = () => {
|
|
1560
1602
|
Y ||= requestAnimationFrame(() => {
|
|
1561
|
-
Y = null,
|
|
1603
|
+
Y = null, De();
|
|
1562
1604
|
});
|
|
1563
1605
|
}, Ae = () => {
|
|
1564
|
-
let e =
|
|
1606
|
+
let e = F();
|
|
1565
1607
|
if (!e || !e.$el) return;
|
|
1566
1608
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1567
|
-
t && (X(),
|
|
1568
|
-
|
|
1569
|
-
}),
|
|
1609
|
+
t && (X(), Oe = new MutationObserver(() => {
|
|
1610
|
+
U && ke();
|
|
1611
|
+
}), Oe.observe(t, {
|
|
1570
1612
|
childList: !0,
|
|
1571
1613
|
subtree: !1
|
|
1572
1614
|
}));
|
|
1573
1615
|
}, X = () => {
|
|
1574
|
-
|
|
1616
|
+
Oe &&= (Oe.disconnect(), null), Y &&= (cancelAnimationFrame(Y), null);
|
|
1575
1617
|
}, je = () => {
|
|
1576
|
-
|
|
1618
|
+
U && ke();
|
|
1577
1619
|
}, Me = (e) => e == null ? "" : typeof e == "object" ? Array.isArray(e) ? e.map((e) => typeof e == "object" && e ? e.label || e.name || e.text || e.title || JSON.stringify(e) : String(e)).join(", ") : e.label || e.name || e.text || e.title || JSON.stringify(e) : String(e), Ne = async () => {
|
|
1578
|
-
if (!
|
|
1579
|
-
let e =
|
|
1620
|
+
if (!U) return;
|
|
1621
|
+
let e = F();
|
|
1580
1622
|
if (!e) return;
|
|
1581
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } =
|
|
1623
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } = U, c = [];
|
|
1582
1624
|
for (let e = i; e <= a; e++) c.push(e);
|
|
1583
1625
|
let l = [];
|
|
1584
1626
|
for (let e = o; e <= s; e++) l.push(e);
|
|
@@ -1635,16 +1677,16 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1635
1677
|
console.error("复制失败:", e);
|
|
1636
1678
|
}
|
|
1637
1679
|
}, Pe = (e) => {
|
|
1638
|
-
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1680
|
+
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? U && (e.preventDefault(), e.stopPropagation(), Ne()) : e.key === "Escape" && Ee());
|
|
1639
1681
|
}, Fe = () => {
|
|
1640
|
-
|
|
1682
|
+
H.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1641
1683
|
}, Ie = (e) => {
|
|
1642
|
-
let t =
|
|
1643
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1684
|
+
let t = F();
|
|
1685
|
+
!t || !t.$el || t.$el.contains(e.target) || Ee();
|
|
1644
1686
|
}, Le = (e) => {
|
|
1645
|
-
y[_] = e,
|
|
1687
|
+
y[_] = e, L();
|
|
1646
1688
|
}, Re = (e) => {
|
|
1647
|
-
y[v] = e, y[_] = 1,
|
|
1689
|
+
y[v] = e, y[_] = 1, L();
|
|
1648
1690
|
};
|
|
1649
1691
|
function Z() {
|
|
1650
1692
|
let e = b.value.getCheckboxRecords();
|
|
@@ -1660,35 +1702,35 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1660
1702
|
};
|
|
1661
1703
|
return t({
|
|
1662
1704
|
tableRef: b,
|
|
1663
|
-
getList:
|
|
1664
|
-
getPrm:
|
|
1665
|
-
clearSort:
|
|
1666
|
-
calculateTableHeight:
|
|
1705
|
+
getList: L,
|
|
1706
|
+
getPrm: z,
|
|
1707
|
+
clearSort: ce,
|
|
1708
|
+
calculateTableHeight: M
|
|
1667
1709
|
}), (t, n) => {
|
|
1668
|
-
let a =
|
|
1669
|
-
return
|
|
1670
|
-
e.searchForm.showSearch ? (
|
|
1710
|
+
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"), E = j("el-pagination");
|
|
1711
|
+
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1712
|
+
e.searchForm.showSearch ? (D(), u(Tt, {
|
|
1671
1713
|
key: 0,
|
|
1672
1714
|
form: e.searchForm,
|
|
1673
|
-
onReset:
|
|
1674
|
-
onConfirm: n[1] ||= (e) =>
|
|
1675
|
-
onVisibleChange: M
|
|
1715
|
+
onReset: R,
|
|
1716
|
+
onConfirm: n[1] ||= (e) => L(),
|
|
1717
|
+
onVisibleChange: P(M)
|
|
1676
1718
|
}, {
|
|
1677
|
-
btn:
|
|
1719
|
+
btn: I(() => [
|
|
1678
1720
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1679
|
-
|
|
1721
|
+
A(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1680
1722
|
g(a, {
|
|
1681
1723
|
class: "mgl10",
|
|
1682
1724
|
round: "",
|
|
1683
1725
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1684
1726
|
}, {
|
|
1685
|
-
default:
|
|
1727
|
+
default: I(() => [g(pt, { name: "Tools" })]),
|
|
1686
1728
|
_: 1
|
|
1687
1729
|
})
|
|
1688
1730
|
]),
|
|
1689
1731
|
_: 3
|
|
1690
1732
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1691
|
-
|
|
1733
|
+
A(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1692
1734
|
p("div", {
|
|
1693
1735
|
ref_key: "tableContentRef",
|
|
1694
1736
|
ref: w,
|
|
@@ -1700,41 +1742,41 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1700
1742
|
loading: e.loading || o.value,
|
|
1701
1743
|
data: e.api ? s.value : e.data,
|
|
1702
1744
|
border: ""
|
|
1703
|
-
},
|
|
1704
|
-
height:
|
|
1745
|
+
}, pe.value, {
|
|
1746
|
+
height: ie.value,
|
|
1705
1747
|
onCheckboxChange: Z,
|
|
1706
1748
|
onCheckboxAll: Z,
|
|
1707
|
-
onSortChange:
|
|
1749
|
+
onSortChange: pe.value["sort-config"]?.sortChange,
|
|
1708
1750
|
onScroll: je
|
|
1709
1751
|
}), {
|
|
1710
|
-
default:
|
|
1752
|
+
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1711
1753
|
key: 0,
|
|
1712
1754
|
type: "checkbox",
|
|
1713
|
-
width:
|
|
1755
|
+
width: P(r) == "zh_cn" ? 80 : 150,
|
|
1714
1756
|
title: t.$t("xu-hao"),
|
|
1715
1757
|
fixed: "left"
|
|
1716
1758
|
}, {
|
|
1717
|
-
checkbox:
|
|
1759
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", jt, [n ? (D(), u(l, {
|
|
1718
1760
|
key: 0,
|
|
1719
1761
|
checked: !0,
|
|
1720
1762
|
disabled: r,
|
|
1721
1763
|
size: "default",
|
|
1722
|
-
onClick:
|
|
1723
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1764
|
+
onClick: se((e) => !r && Q(t), ["stop"])
|
|
1765
|
+
}, null, 8, ["disabled", "onClick"])) : (D(), u(l, {
|
|
1724
1766
|
key: 1,
|
|
1725
1767
|
disabled: r,
|
|
1726
1768
|
checked: !1,
|
|
1727
1769
|
size: "default",
|
|
1728
|
-
onClick:
|
|
1770
|
+
onClick: se((e) => !r && Q(t), ["stop"])
|
|
1729
1771
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1730
1772
|
type: "info",
|
|
1731
1773
|
class: "mgl5"
|
|
1732
1774
|
}, {
|
|
1733
|
-
default:
|
|
1775
|
+
default: I(() => [h(N(e + 1), 1)]),
|
|
1734
1776
|
_: 2
|
|
1735
1777
|
}, 1024)])]),
|
|
1736
1778
|
_: 1
|
|
1737
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1779
|
+
}, 8, ["width", "title"])) : d("", !0), A(t.$slots, "default", {}, void 0, !0)]),
|
|
1738
1780
|
_: 3
|
|
1739
1781
|
}, 16, [
|
|
1740
1782
|
"id",
|
|
@@ -1743,16 +1785,16 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1743
1785
|
"height",
|
|
1744
1786
|
"onSortChange"
|
|
1745
1787
|
])], 2),
|
|
1746
|
-
e.searchForm.showPage ? (
|
|
1788
|
+
e.searchForm.showPage ? (D(), u(E, {
|
|
1747
1789
|
key: 1,
|
|
1748
|
-
"current-page": y[
|
|
1749
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1790
|
+
"current-page": y[P(_)],
|
|
1791
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[P(_)] = e,
|
|
1750
1792
|
class: "myPagination mgt10",
|
|
1751
1793
|
background: "",
|
|
1752
1794
|
layout: "total, sizes, prev, pager, next",
|
|
1753
1795
|
total: y.total,
|
|
1754
|
-
"page-size": y[
|
|
1755
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1796
|
+
"page-size": y[P(v)],
|
|
1797
|
+
"page-sizes": e.searchForm.pageSizes || P(i).pageSizes,
|
|
1756
1798
|
onCurrentChange: Le,
|
|
1757
1799
|
onSizeChange: Re
|
|
1758
1800
|
}, null, 8, [
|
|
@@ -1764,7 +1806,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1764
1806
|
], 2);
|
|
1765
1807
|
};
|
|
1766
1808
|
}
|
|
1767
|
-
}, [["__scopeId", "data-v-
|
|
1809
|
+
}, [["__scopeId", "data-v-2186c872"]]), It = {
|
|
1768
1810
|
key: 0,
|
|
1769
1811
|
class: "down-excel-temp__spinner"
|
|
1770
1812
|
}, Lt = /* @__PURE__ */ $({
|
|
@@ -1784,7 +1826,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1784
1826
|
}
|
|
1785
1827
|
},
|
|
1786
1828
|
setup(e) {
|
|
1787
|
-
let t = e, n =
|
|
1829
|
+
let t = e, n = k(!1);
|
|
1788
1830
|
async function r(e) {
|
|
1789
1831
|
let t = Object.entries(e), n = await Promise.all(t.map(async ([e, t]) => {
|
|
1790
1832
|
let { tableData: n } = t, r = n;
|
|
@@ -1808,13 +1850,13 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1808
1850
|
}
|
|
1809
1851
|
}
|
|
1810
1852
|
return (e, t) => {
|
|
1811
|
-
let r =
|
|
1812
|
-
return
|
|
1853
|
+
let r = j("el-link");
|
|
1854
|
+
return D(), u(r, x({
|
|
1813
1855
|
type: "primary",
|
|
1814
1856
|
underline: "never",
|
|
1815
1857
|
disabled: n.value
|
|
1816
1858
|
}, e.$attrs, { onClick: a }), {
|
|
1817
|
-
default:
|
|
1859
|
+
default: I(() => [n.value ? (D(), f("span", It)) : d("", !0), A(e.$slots, "default", {}, () => [h(N(n.value ? e.$t("jia-zai-zhong") : e.$t("xia-zai-dao-ru-mo-ban")), 1)], !0)]),
|
|
1818
1860
|
_: 3
|
|
1819
1861
|
}, 16, ["disabled"]);
|
|
1820
1862
|
};
|
|
@@ -1921,7 +1963,7 @@ var Vt = {
|
|
|
1921
1963
|
},
|
|
1922
1964
|
emits: ["confirm"],
|
|
1923
1965
|
setup(e, { emit: t }) {
|
|
1924
|
-
let n = e, r = t, { t: i } =
|
|
1966
|
+
let n = e, r = t, { t: i } = B(), o = V(() => {
|
|
1925
1967
|
r("confirm");
|
|
1926
1968
|
}, 300);
|
|
1927
1969
|
async function s() {
|
|
@@ -1932,8 +1974,8 @@ var Vt = {
|
|
|
1932
1974
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1933
1975
|
}
|
|
1934
1976
|
return (t, n) => {
|
|
1935
|
-
let r =
|
|
1936
|
-
return e.layer.type ? (
|
|
1977
|
+
let r = j("el-button"), i = j("el-drawer"), a = j("el-dialog");
|
|
1978
|
+
return e.layer.type ? (D(), u(i, {
|
|
1937
1979
|
key: 0,
|
|
1938
1980
|
modelValue: e.layer.show,
|
|
1939
1981
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1944,18 +1986,18 @@ var Vt = {
|
|
|
1944
1986
|
"before-close": s,
|
|
1945
1987
|
class: "drawer-content"
|
|
1946
1988
|
}, {
|
|
1947
|
-
default:
|
|
1948
|
-
|
|
1989
|
+
default: I(() => [
|
|
1990
|
+
A(t.$slots, "default"),
|
|
1949
1991
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1950
|
-
e.layer.showButton ? (
|
|
1951
|
-
default:
|
|
1992
|
+
e.layer.showButton ? (D(), f("div", Vt, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1993
|
+
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1952
1994
|
_: 1
|
|
1953
1995
|
}), g(r, {
|
|
1954
1996
|
type: "primary",
|
|
1955
1997
|
loading: e.loading,
|
|
1956
|
-
onClick:
|
|
1998
|
+
onClick: P(o)
|
|
1957
1999
|
}, {
|
|
1958
|
-
default:
|
|
2000
|
+
default: I(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1959
2001
|
_: 1
|
|
1960
2002
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1961
2003
|
]),
|
|
@@ -1964,7 +2006,7 @@ var Vt = {
|
|
|
1964
2006
|
"modelValue",
|
|
1965
2007
|
"size",
|
|
1966
2008
|
"title"
|
|
1967
|
-
])) :
|
|
2009
|
+
])) : ae((D(), f("div", Ht, [g(a, {
|
|
1968
2010
|
"close-on-click-modal": !1,
|
|
1969
2011
|
modelValue: e.layer.show,
|
|
1970
2012
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1972,19 +2014,19 @@ var Vt = {
|
|
|
1972
2014
|
width: e.layer.width || 500,
|
|
1973
2015
|
center: ""
|
|
1974
2016
|
}, m({
|
|
1975
|
-
default:
|
|
2017
|
+
default: I(() => [A(t.$slots, "default")]),
|
|
1976
2018
|
_: 2
|
|
1977
2019
|
}, [e.layer.showButton ? {
|
|
1978
2020
|
name: "footer",
|
|
1979
|
-
fn:
|
|
1980
|
-
default:
|
|
2021
|
+
fn: I(() => [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
2022
|
+
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1981
2023
|
_: 1
|
|
1982
2024
|
}), g(r, {
|
|
1983
2025
|
type: "primary",
|
|
1984
2026
|
loading: e.loading,
|
|
1985
|
-
onClick:
|
|
2027
|
+
onClick: P(o)
|
|
1986
2028
|
}, {
|
|
1987
|
-
default:
|
|
2029
|
+
default: I(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1988
2030
|
_: 1
|
|
1989
2031
|
}, 8, ["loading", "onClick"])])]),
|
|
1990
2032
|
key: "0"
|
|
@@ -1992,7 +2034,7 @@ var Vt = {
|
|
|
1992
2034
|
"modelValue",
|
|
1993
2035
|
"title",
|
|
1994
2036
|
"width"
|
|
1995
|
-
])])), [[
|
|
2037
|
+
])])), [[P(Rt), e.layer.show]]);
|
|
1996
2038
|
};
|
|
1997
2039
|
}
|
|
1998
2040
|
};
|
|
@@ -2188,7 +2230,7 @@ function Yt(e, t = {}) {
|
|
|
2188
2230
|
log: !1,
|
|
2189
2231
|
params: null,
|
|
2190
2232
|
format: null
|
|
2191
|
-
}, t), s =
|
|
2233
|
+
}, t), s = k([]), c = k(!1), l = (t) => {
|
|
2192
2234
|
let n = t || i;
|
|
2193
2235
|
c.value = !0, e(n).then((e) => {
|
|
2194
2236
|
let { code: t, data: c, msg: l } = e;
|
|
@@ -2216,8 +2258,8 @@ function Yt(e, t = {}) {
|
|
|
2216
2258
|
];
|
|
2217
2259
|
}
|
|
2218
2260
|
function Xt(e) {
|
|
2219
|
-
let t =
|
|
2220
|
-
return
|
|
2261
|
+
let t = k(e), n = k(""), r = k("");
|
|
2262
|
+
return ie(t, (e) => {
|
|
2221
2263
|
let t = e || ["", ""];
|
|
2222
2264
|
n.value = t[0], r.value = t[1];
|
|
2223
2265
|
}), [
|
|
@@ -2241,8 +2283,8 @@ function Qt(e, t) {
|
|
|
2241
2283
|
//#endregion
|
|
2242
2284
|
//#region src/utils/hook/i18n.js
|
|
2243
2285
|
function $t(e, t = []) {
|
|
2244
|
-
let { locale: n } =
|
|
2245
|
-
return
|
|
2286
|
+
let { locale: n } = B(), r = k(e());
|
|
2287
|
+
return ie([n, ...t], () => {
|
|
2246
2288
|
r.value = e();
|
|
2247
2289
|
}, { immediate: !0 }), r;
|
|
2248
2290
|
}
|
|
@@ -2255,32 +2297,32 @@ function en(e, t = "zh_cn", n = "en_us") {
|
|
|
2255
2297
|
//#endregion
|
|
2256
2298
|
//#region src/utils/hook/storeHook.js
|
|
2257
2299
|
function tn(e, t) {
|
|
2258
|
-
let n =
|
|
2259
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2300
|
+
let n = U;
|
|
2301
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapState), an(t, n);
|
|
2260
2302
|
}
|
|
2261
2303
|
function nn(e, t) {
|
|
2262
|
-
let n =
|
|
2263
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2304
|
+
let n = H;
|
|
2305
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapGetters), an(t, n);
|
|
2264
2306
|
}
|
|
2265
2307
|
function rn(e, t) {
|
|
2266
|
-
let n =
|
|
2267
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2308
|
+
let n = pe;
|
|
2309
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapActions), on(t, n);
|
|
2268
2310
|
}
|
|
2269
2311
|
function an(e, t) {
|
|
2270
|
-
let n =
|
|
2312
|
+
let n = me(), r = t(e), i = {};
|
|
2271
2313
|
return Object.keys(r).forEach((e) => {
|
|
2272
2314
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2273
2315
|
}), i;
|
|
2274
2316
|
}
|
|
2275
2317
|
function on(e, t) {
|
|
2276
|
-
let n =
|
|
2318
|
+
let n = me(), r = t(e), i = {};
|
|
2277
2319
|
return Object.keys(r).forEach((e) => {
|
|
2278
2320
|
i[e] = r[e].bind({ $store: n });
|
|
2279
2321
|
}), i;
|
|
2280
2322
|
}
|
|
2281
2323
|
function sn(e, t = []) {
|
|
2282
|
-
let [n, r, i] = t, { locale: a } =
|
|
2283
|
-
return l(() =>
|
|
2324
|
+
let [n, r, i] = t, { locale: a } = B();
|
|
2325
|
+
return l(() => ne(e).map((e) => {
|
|
2284
2326
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2285
2327
|
return {
|
|
2286
2328
|
...e,
|
|
@@ -2295,20 +2337,20 @@ function cn(e) {
|
|
|
2295
2337
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2296
2338
|
}
|
|
2297
2339
|
function ln() {
|
|
2298
|
-
|
|
2340
|
+
W.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2299
2341
|
return Kt(e, t);
|
|
2300
|
-
} }),
|
|
2342
|
+
} }), W.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2301
2343
|
return qt(e, t);
|
|
2302
|
-
} }),
|
|
2344
|
+
} }), W.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2303
2345
|
return Jt(e, t);
|
|
2304
2346
|
} });
|
|
2305
2347
|
}
|
|
2306
2348
|
function un() {
|
|
2307
|
-
|
|
2349
|
+
W.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2308
2350
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2309
2351
|
let n = t.row[t.column.field], r = e.enum.getItem(n);
|
|
2310
2352
|
if (!r) return n || "-";
|
|
2311
|
-
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } =
|
|
2353
|
+
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } = B(), l = c.value == "zh_cn" ? i : a;
|
|
2312
2354
|
return e.type == "tag" ? s ? g(mt, { fontColor: s }, { default: () => [
|
|
2313
2355
|
h(" "),
|
|
2314
2356
|
l,
|
|
@@ -2317,16 +2359,16 @@ function un() {
|
|
|
2317
2359
|
h(" "),
|
|
2318
2360
|
l,
|
|
2319
2361
|
h(" ")
|
|
2320
|
-
] }) : e.type == "text" ? g(
|
|
2362
|
+
] }) : e.type == "text" ? g(j("el-text"), { type: o }, { default: () => [
|
|
2321
2363
|
h(" "),
|
|
2322
2364
|
l,
|
|
2323
2365
|
h(" ")
|
|
2324
|
-
] }) : g(
|
|
2366
|
+
] }) : g(j("el-text"), null, { default: () => [
|
|
2325
2367
|
h(" "),
|
|
2326
2368
|
l,
|
|
2327
2369
|
h(" ")
|
|
2328
2370
|
] });
|
|
2329
|
-
} }),
|
|
2371
|
+
} }), W.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2330
2372
|
return g(n, x({
|
|
2331
2373
|
modelValue: t.row[t.column.field],
|
|
2332
2374
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2334,14 +2376,14 @@ function un() {
|
|
|
2334
2376
|
"step-strictly": !0,
|
|
2335
2377
|
"value-on-clear": 0
|
|
2336
2378
|
}), null);
|
|
2337
|
-
} }),
|
|
2338
|
-
let { locale: n } =
|
|
2379
|
+
} }), W.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2380
|
+
let { locale: n } = B(), r = n.value == "zh_cn";
|
|
2339
2381
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2340
|
-
} }),
|
|
2341
|
-
let { locale: n } =
|
|
2382
|
+
} }), W.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2383
|
+
let { locale: n } = B(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2342
2384
|
return t.row[r] || t.row[t.column.field];
|
|
2343
|
-
} }),
|
|
2344
|
-
let n = t.column.field, i =
|
|
2385
|
+
} }), W.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2386
|
+
let n = t.column.field, i = he(), { to: a, openType: o = "system" } = e, s = t.row[n];
|
|
2345
2387
|
function c(e, t) {
|
|
2346
2388
|
o == "blank" ? window.open(e) : i.push({
|
|
2347
2389
|
path: e,
|
|
@@ -2364,4 +2406,4 @@ function dn() {
|
|
|
2364
2406
|
ln(), un();
|
|
2365
2407
|
}
|
|
2366
2408
|
//#endregion
|
|
2367
|
-
export { ut as CmpDictionary, pt as CmpIcon, mt as CmpTag, gt as ConfrimButton, Lt as DownExcelTemp, yt as ImportButton,
|
|
2409
|
+
export { ut as CmpDictionary, pt as CmpIcon, mt as CmpTag, gt as ConfrimButton, Lt as DownExcelTemp, yt as ImportButton, Ce as LayOutForm, Ut as Layer, Ft as ListPage, Gt as OnePortalCasSDK, Tt as SearchBar, tt as StatusMap, Qe as _toRaw, Zt as _typeOf, nt as arrToStatusMap, $e as arrayToTree, qe as base64ToBlob, Je as base64ToFile, Ye as base64ToFormData, at as checkFileSize, Wt as creatValidator, st as createImportFields, ot as createListPageId, J as en_us, Ne as exportExcel, We as exportExcelMuilti, qt as formatMoney, Kt as formatNumber, Jt as formatPercent, Ke as getColumnLetterByIndex, Ae as getI18n, X as getI18nT, kt as getListPageConfig, en as getLocaleValue, Xe as getTableShowColumn, ct as getValueBykey, je as importExcel, He as importExcelMuilti, Oe as messages, ln as registerVxeFormatters, dn as registerVxePlugins, un as registerVxeRenderers, At as resetListPageConfig, Ot as setListPageConfig, ke as setupI18n, Ze as sleep, et as stringToArray, rt as stripHtmlTags, it as unicode2Str, rn as useActions, Xt as useDatePicker, nn as useGetters, $t as useI18nReState, Yt as useRequest, tn as useState, sn as useVxeEditRenderStatus, De as zh_cn };
|