joy-admin-components 0.2.127 → 0.2.130
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;
|
|
@@ -450,7 +450,7 @@ async function We(e, t) {
|
|
|
450
450
|
};
|
|
451
451
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
452
452
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
453
|
-
if (d.numFmt = Ue[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
453
|
+
if (d.numFmt = Ue[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s && s.length > 0) {
|
|
454
454
|
let t = Q(`_${e.id}_`, a), r = n.addWorksheet(t);
|
|
455
455
|
r.state = "hidden", u ||= (e) => `${e.label}${Z}${e.value}`, r.getColumn(1).values = s.map(u), Array(100).fill("").forEach((n, r) => {
|
|
456
456
|
if (r > 0) {
|
|
@@ -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,54 @@ 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
|
-
}),
|
|
1388
|
+
}), pe = l(() => {
|
|
1351
1389
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1352
1390
|
return {
|
|
1353
1391
|
headerAlign: "left",
|
|
1354
1392
|
align: "center",
|
|
1355
1393
|
customConfig: {
|
|
1356
|
-
...
|
|
1394
|
+
...de,
|
|
1357
1395
|
...e
|
|
1358
1396
|
},
|
|
1359
1397
|
columnConfig: {
|
|
1360
|
-
...
|
|
1398
|
+
...fe,
|
|
1361
1399
|
...t
|
|
1362
1400
|
},
|
|
1363
1401
|
"virtual-x-config": {
|
|
@@ -1370,18 +1408,18 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1370
1408
|
},
|
|
1371
1409
|
...n
|
|
1372
1410
|
};
|
|
1373
|
-
}),
|
|
1411
|
+
}), H = O({
|
|
1374
1412
|
isSelecting: !1,
|
|
1375
1413
|
startCell: null,
|
|
1376
1414
|
endCell: null,
|
|
1377
1415
|
selectedCells: []
|
|
1378
|
-
}),
|
|
1379
|
-
if (!
|
|
1380
|
-
|
|
1416
|
+
}), U = null, me = () => {
|
|
1417
|
+
if (!H.startCell || !H.endCell) {
|
|
1418
|
+
U = null, H.selectedCells = [];
|
|
1381
1419
|
return;
|
|
1382
1420
|
}
|
|
1383
|
-
let e = Math.min(
|
|
1384
|
-
|
|
1421
|
+
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);
|
|
1422
|
+
U = {
|
|
1385
1423
|
minRow: e,
|
|
1386
1424
|
maxRow: t,
|
|
1387
1425
|
minCol: n,
|
|
@@ -1392,25 +1430,25 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1392
1430
|
rowIndex: a,
|
|
1393
1431
|
colIndex: e
|
|
1394
1432
|
});
|
|
1395
|
-
|
|
1396
|
-
},
|
|
1433
|
+
H.selectedCells = i;
|
|
1434
|
+
}, W = /* @__PURE__ */ new WeakMap(), he = null, ge = 0, _e = (e, t) => {
|
|
1397
1435
|
let n = e.getTableData().fullData;
|
|
1398
|
-
if (n !==
|
|
1399
|
-
|
|
1400
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1436
|
+
if (n !== he || n.length !== ge) {
|
|
1437
|
+
W = /* @__PURE__ */ new WeakMap(), he = n, ge = n.length;
|
|
1438
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && W.set(n[e], e);
|
|
1401
1439
|
}
|
|
1402
|
-
return
|
|
1403
|
-
},
|
|
1440
|
+
return W.has(t) ? W.get(t) : -1;
|
|
1441
|
+
}, ve = (e) => {
|
|
1404
1442
|
let t = e.closest(".vxe-body--column");
|
|
1405
1443
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1406
1444
|
let n = t.closest(".vxe-body--row");
|
|
1407
1445
|
if (!n) return null;
|
|
1408
|
-
let r =
|
|
1446
|
+
let r = F();
|
|
1409
1447
|
if (!r) return null;
|
|
1410
1448
|
let i = -1, a = n.getAttribute("rowid");
|
|
1411
1449
|
if (a != null) {
|
|
1412
1450
|
let e = r.getRowById(a);
|
|
1413
|
-
e && (i =
|
|
1451
|
+
e && (i = _e(r, e));
|
|
1414
1452
|
}
|
|
1415
1453
|
if (i < 0) {
|
|
1416
1454
|
let e = n.parentElement;
|
|
@@ -1423,49 +1461,49 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1423
1461
|
colIndex: o,
|
|
1424
1462
|
cell: t
|
|
1425
1463
|
};
|
|
1426
|
-
},
|
|
1427
|
-
if (!
|
|
1428
|
-
|
|
1429
|
-
let t =
|
|
1464
|
+
}, ye = null, G = 0, be = (e) => {
|
|
1465
|
+
if (!H.isSelecting) return;
|
|
1466
|
+
G = e.clientY;
|
|
1467
|
+
let t = F();
|
|
1430
1468
|
if (!t || !t.$el) return;
|
|
1431
1469
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1432
1470
|
if (!r) return;
|
|
1433
1471
|
let i = r.getBoundingClientRect();
|
|
1434
|
-
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ?
|
|
1435
|
-
},
|
|
1472
|
+
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ? ye || xe() : K();
|
|
1473
|
+
}, xe = () => {
|
|
1436
1474
|
let e = () => {
|
|
1437
|
-
if (!
|
|
1438
|
-
|
|
1475
|
+
if (!H.isSelecting) {
|
|
1476
|
+
K();
|
|
1439
1477
|
return;
|
|
1440
1478
|
}
|
|
1441
|
-
let t =
|
|
1479
|
+
let t = F();
|
|
1442
1480
|
if (!t || !t.$el) {
|
|
1443
|
-
|
|
1481
|
+
K();
|
|
1444
1482
|
return;
|
|
1445
1483
|
}
|
|
1446
1484
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1447
1485
|
if (!r) {
|
|
1448
|
-
|
|
1486
|
+
K();
|
|
1449
1487
|
return;
|
|
1450
1488
|
}
|
|
1451
1489
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1452
|
-
if (
|
|
1453
|
-
let e = i.top -
|
|
1490
|
+
if (G < i.top) {
|
|
1491
|
+
let e = i.top - G;
|
|
1454
1492
|
a = -Math.min(Nt, Math.max(2, e * Pt));
|
|
1455
|
-
} else if (
|
|
1456
|
-
let e =
|
|
1493
|
+
} else if (G > i.bottom) {
|
|
1494
|
+
let e = G - i.bottom;
|
|
1457
1495
|
a = Math.min(Nt, Math.max(2, e * Pt));
|
|
1458
1496
|
} else {
|
|
1459
|
-
|
|
1497
|
+
K();
|
|
1460
1498
|
return;
|
|
1461
1499
|
}
|
|
1462
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)),
|
|
1500
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Se(r, i), ye = requestAnimationFrame(e);
|
|
1463
1501
|
};
|
|
1464
|
-
|
|
1465
|
-
},
|
|
1466
|
-
|
|
1467
|
-
},
|
|
1468
|
-
let n =
|
|
1502
|
+
ye = requestAnimationFrame(e);
|
|
1503
|
+
}, K = () => {
|
|
1504
|
+
ye &&= (cancelAnimationFrame(ye), null);
|
|
1505
|
+
}, Se = (e, t) => {
|
|
1506
|
+
let n = F();
|
|
1469
1507
|
if (!n) return;
|
|
1470
1508
|
let r = n.getTableData().fullData;
|
|
1471
1509
|
if (!r || r.length === 0) return;
|
|
@@ -1474,53 +1512,53 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1474
1512
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1475
1513
|
if (a.length === 0) return;
|
|
1476
1514
|
let o = null;
|
|
1477
|
-
if (
|
|
1515
|
+
if (G < t.top ? o = a[0] : G > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1478
1516
|
let s = o.getAttribute("rowid");
|
|
1479
1517
|
if (s == null) return;
|
|
1480
1518
|
let c = -1, l = n.getRowById(s);
|
|
1481
1519
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1482
|
-
let u =
|
|
1483
|
-
|
|
1520
|
+
let u = H.endCell ? H.endCell.colIndex : H.startCell ? H.startCell.colIndex : 0;
|
|
1521
|
+
H.endCell = {
|
|
1484
1522
|
rowIndex: c,
|
|
1485
1523
|
colIndex: u
|
|
1486
|
-
},
|
|
1487
|
-
},
|
|
1488
|
-
let t =
|
|
1524
|
+
}, me(), J();
|
|
1525
|
+
}, Ce = (e) => {
|
|
1526
|
+
let t = ve(e.target);
|
|
1489
1527
|
if (!t) {
|
|
1490
|
-
|
|
1528
|
+
Ee();
|
|
1491
1529
|
return;
|
|
1492
1530
|
}
|
|
1493
|
-
let n =
|
|
1494
|
-
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"),
|
|
1531
|
+
let n = F();
|
|
1532
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), H.isSelecting = !0, H.startCell = {
|
|
1495
1533
|
rowIndex: t.rowIndex,
|
|
1496
1534
|
colIndex: t.colIndex
|
|
1497
|
-
},
|
|
1498
|
-
},
|
|
1499
|
-
|
|
1500
|
-
if (
|
|
1501
|
-
let t =
|
|
1502
|
-
t && (
|
|
1535
|
+
}, H.endCell = { ...H.startCell }, document.addEventListener("mousemove", be), me(), J();
|
|
1536
|
+
}, q = null, we = (e) => {
|
|
1537
|
+
H.isSelecting && (q ||= requestAnimationFrame(() => {
|
|
1538
|
+
if (q = null, !H.isSelecting) return;
|
|
1539
|
+
let t = ve(e.target);
|
|
1540
|
+
t && (H.endCell && H.endCell.rowIndex === t.rowIndex && H.endCell.colIndex === t.colIndex || (H.endCell = {
|
|
1503
1541
|
rowIndex: t.rowIndex,
|
|
1504
1542
|
colIndex: t.colIndex
|
|
1505
|
-
},
|
|
1543
|
+
}, me(), J()));
|
|
1506
1544
|
}));
|
|
1507
|
-
},
|
|
1508
|
-
|
|
1509
|
-
},
|
|
1510
|
-
|
|
1511
|
-
let e =
|
|
1545
|
+
}, Te = () => {
|
|
1546
|
+
H.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1547
|
+
}, Ee = () => {
|
|
1548
|
+
H.selectedCells = [], H.startCell = null, H.endCell = null, U = null;
|
|
1549
|
+
let e = F();
|
|
1512
1550
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1513
1551
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1514
1552
|
});
|
|
1515
|
-
},
|
|
1516
|
-
let e =
|
|
1553
|
+
}, De = () => {
|
|
1554
|
+
let e = F();
|
|
1517
1555
|
if (!e) return;
|
|
1518
1556
|
let t = e.$el;
|
|
1519
1557
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1520
1558
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1521
1559
|
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 } =
|
|
1560
|
+
if (!U) return;
|
|
1561
|
+
let { minRow: r, maxRow: i, minCol: a, maxCol: o } = U, s = e.getColumns(), c = e.getTableData().fullData, l = /* @__PURE__ */ new Map();
|
|
1524
1562
|
for (let t = r; t <= i; t++) {
|
|
1525
1563
|
let n = c[t];
|
|
1526
1564
|
if (n) {
|
|
@@ -1541,7 +1579,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1541
1579
|
let d = l.get(String(u));
|
|
1542
1580
|
if (d === void 0) {
|
|
1543
1581
|
let t = e.getRowById(u);
|
|
1544
|
-
if (t && (d =
|
|
1582
|
+
if (t && (d = _e(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1545
1583
|
}
|
|
1546
1584
|
if (d < r || d > i) continue;
|
|
1547
1585
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1552,33 +1590,33 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1552
1590
|
}
|
|
1553
1591
|
}
|
|
1554
1592
|
}
|
|
1555
|
-
},
|
|
1593
|
+
}, J = () => {
|
|
1556
1594
|
S(() => {
|
|
1557
|
-
|
|
1595
|
+
De();
|
|
1558
1596
|
});
|
|
1559
|
-
},
|
|
1597
|
+
}, Oe = null, Y = null, ke = () => {
|
|
1560
1598
|
Y ||= requestAnimationFrame(() => {
|
|
1561
|
-
Y = null,
|
|
1599
|
+
Y = null, De();
|
|
1562
1600
|
});
|
|
1563
1601
|
}, Ae = () => {
|
|
1564
|
-
let e =
|
|
1602
|
+
let e = F();
|
|
1565
1603
|
if (!e || !e.$el) return;
|
|
1566
1604
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1567
|
-
t && (X(),
|
|
1568
|
-
|
|
1569
|
-
}),
|
|
1605
|
+
t && (X(), Oe = new MutationObserver(() => {
|
|
1606
|
+
U && ke();
|
|
1607
|
+
}), Oe.observe(t, {
|
|
1570
1608
|
childList: !0,
|
|
1571
1609
|
subtree: !1
|
|
1572
1610
|
}));
|
|
1573
1611
|
}, X = () => {
|
|
1574
|
-
|
|
1612
|
+
Oe &&= (Oe.disconnect(), null), Y &&= (cancelAnimationFrame(Y), null);
|
|
1575
1613
|
}, je = () => {
|
|
1576
|
-
|
|
1614
|
+
U && ke();
|
|
1577
1615
|
}, 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 =
|
|
1616
|
+
if (!U) return;
|
|
1617
|
+
let e = F();
|
|
1580
1618
|
if (!e) return;
|
|
1581
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } =
|
|
1619
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } = U, c = [];
|
|
1582
1620
|
for (let e = i; e <= a; e++) c.push(e);
|
|
1583
1621
|
let l = [];
|
|
1584
1622
|
for (let e = o; e <= s; e++) l.push(e);
|
|
@@ -1635,16 +1673,16 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1635
1673
|
console.error("复制失败:", e);
|
|
1636
1674
|
}
|
|
1637
1675
|
}, Pe = (e) => {
|
|
1638
|
-
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1676
|
+
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? U && (e.preventDefault(), e.stopPropagation(), Ne()) : e.key === "Escape" && Ee());
|
|
1639
1677
|
}, Fe = () => {
|
|
1640
|
-
|
|
1678
|
+
H.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1641
1679
|
}, Ie = (e) => {
|
|
1642
|
-
let t =
|
|
1643
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1680
|
+
let t = F();
|
|
1681
|
+
!t || !t.$el || t.$el.contains(e.target) || Ee();
|
|
1644
1682
|
}, Le = (e) => {
|
|
1645
|
-
y[_] = e,
|
|
1683
|
+
y[_] = e, L();
|
|
1646
1684
|
}, Re = (e) => {
|
|
1647
|
-
y[v] = e, y[_] = 1,
|
|
1685
|
+
y[v] = e, y[_] = 1, L();
|
|
1648
1686
|
};
|
|
1649
1687
|
function Z() {
|
|
1650
1688
|
let e = b.value.getCheckboxRecords();
|
|
@@ -1660,35 +1698,35 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1660
1698
|
};
|
|
1661
1699
|
return t({
|
|
1662
1700
|
tableRef: b,
|
|
1663
|
-
getList:
|
|
1664
|
-
getPrm:
|
|
1665
|
-
clearSort:
|
|
1666
|
-
calculateTableHeight:
|
|
1701
|
+
getList: L,
|
|
1702
|
+
getPrm: z,
|
|
1703
|
+
clearSort: ce,
|
|
1704
|
+
calculateTableHeight: M
|
|
1667
1705
|
}), (t, n) => {
|
|
1668
|
-
let a =
|
|
1669
|
-
return
|
|
1670
|
-
e.searchForm.showSearch ? (
|
|
1706
|
+
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"), E = j("el-pagination");
|
|
1707
|
+
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1708
|
+
e.searchForm.showSearch ? (D(), u(Tt, {
|
|
1671
1709
|
key: 0,
|
|
1672
1710
|
form: e.searchForm,
|
|
1673
|
-
onReset:
|
|
1674
|
-
onConfirm: n[1] ||= (e) =>
|
|
1675
|
-
onVisibleChange: M
|
|
1711
|
+
onReset: R,
|
|
1712
|
+
onConfirm: n[1] ||= (e) => L(),
|
|
1713
|
+
onVisibleChange: P(M)
|
|
1676
1714
|
}, {
|
|
1677
|
-
btn:
|
|
1715
|
+
btn: I(() => [
|
|
1678
1716
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1679
|
-
|
|
1717
|
+
A(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1680
1718
|
g(a, {
|
|
1681
1719
|
class: "mgl10",
|
|
1682
1720
|
round: "",
|
|
1683
1721
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1684
1722
|
}, {
|
|
1685
|
-
default:
|
|
1723
|
+
default: I(() => [g(pt, { name: "Tools" })]),
|
|
1686
1724
|
_: 1
|
|
1687
1725
|
})
|
|
1688
1726
|
]),
|
|
1689
1727
|
_: 3
|
|
1690
1728
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1691
|
-
|
|
1729
|
+
A(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1692
1730
|
p("div", {
|
|
1693
1731
|
ref_key: "tableContentRef",
|
|
1694
1732
|
ref: w,
|
|
@@ -1700,41 +1738,41 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1700
1738
|
loading: e.loading || o.value,
|
|
1701
1739
|
data: e.api ? s.value : e.data,
|
|
1702
1740
|
border: ""
|
|
1703
|
-
},
|
|
1704
|
-
height:
|
|
1741
|
+
}, pe.value, {
|
|
1742
|
+
height: ie.value,
|
|
1705
1743
|
onCheckboxChange: Z,
|
|
1706
1744
|
onCheckboxAll: Z,
|
|
1707
|
-
onSortChange:
|
|
1745
|
+
onSortChange: pe.value["sort-config"]?.sortChange,
|
|
1708
1746
|
onScroll: je
|
|
1709
1747
|
}), {
|
|
1710
|
-
default:
|
|
1748
|
+
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1711
1749
|
key: 0,
|
|
1712
1750
|
type: "checkbox",
|
|
1713
|
-
width:
|
|
1751
|
+
width: P(r) == "zh_cn" ? 80 : 150,
|
|
1714
1752
|
title: t.$t("xu-hao"),
|
|
1715
1753
|
fixed: "left"
|
|
1716
1754
|
}, {
|
|
1717
|
-
checkbox:
|
|
1755
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", jt, [n ? (D(), u(l, {
|
|
1718
1756
|
key: 0,
|
|
1719
1757
|
checked: !0,
|
|
1720
1758
|
disabled: r,
|
|
1721
1759
|
size: "default",
|
|
1722
|
-
onClick:
|
|
1723
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1760
|
+
onClick: se((e) => !r && Q(t), ["stop"])
|
|
1761
|
+
}, null, 8, ["disabled", "onClick"])) : (D(), u(l, {
|
|
1724
1762
|
key: 1,
|
|
1725
1763
|
disabled: r,
|
|
1726
1764
|
checked: !1,
|
|
1727
1765
|
size: "default",
|
|
1728
|
-
onClick:
|
|
1766
|
+
onClick: se((e) => !r && Q(t), ["stop"])
|
|
1729
1767
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1730
1768
|
type: "info",
|
|
1731
1769
|
class: "mgl5"
|
|
1732
1770
|
}, {
|
|
1733
|
-
default:
|
|
1771
|
+
default: I(() => [h(N(e + 1), 1)]),
|
|
1734
1772
|
_: 2
|
|
1735
1773
|
}, 1024)])]),
|
|
1736
1774
|
_: 1
|
|
1737
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1775
|
+
}, 8, ["width", "title"])) : d("", !0), A(t.$slots, "default", {}, void 0, !0)]),
|
|
1738
1776
|
_: 3
|
|
1739
1777
|
}, 16, [
|
|
1740
1778
|
"id",
|
|
@@ -1743,16 +1781,16 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1743
1781
|
"height",
|
|
1744
1782
|
"onSortChange"
|
|
1745
1783
|
])], 2),
|
|
1746
|
-
e.searchForm.showPage ? (
|
|
1784
|
+
e.searchForm.showPage ? (D(), u(E, {
|
|
1747
1785
|
key: 1,
|
|
1748
|
-
"current-page": y[
|
|
1749
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1786
|
+
"current-page": y[P(_)],
|
|
1787
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[P(_)] = e,
|
|
1750
1788
|
class: "myPagination mgt10",
|
|
1751
1789
|
background: "",
|
|
1752
1790
|
layout: "total, sizes, prev, pager, next",
|
|
1753
1791
|
total: y.total,
|
|
1754
|
-
"page-size": y[
|
|
1755
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1792
|
+
"page-size": y[P(v)],
|
|
1793
|
+
"page-sizes": e.searchForm.pageSizes || P(i).pageSizes,
|
|
1756
1794
|
onCurrentChange: Le,
|
|
1757
1795
|
onSizeChange: Re
|
|
1758
1796
|
}, null, 8, [
|
|
@@ -1784,7 +1822,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1784
1822
|
}
|
|
1785
1823
|
},
|
|
1786
1824
|
setup(e) {
|
|
1787
|
-
let t = e, n =
|
|
1825
|
+
let t = e, n = k(!1);
|
|
1788
1826
|
async function r(e) {
|
|
1789
1827
|
let t = Object.entries(e), n = await Promise.all(t.map(async ([e, t]) => {
|
|
1790
1828
|
let { tableData: n } = t, r = n;
|
|
@@ -1808,13 +1846,13 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1808
1846
|
}
|
|
1809
1847
|
}
|
|
1810
1848
|
return (e, t) => {
|
|
1811
|
-
let r =
|
|
1812
|
-
return
|
|
1849
|
+
let r = j("el-link");
|
|
1850
|
+
return D(), u(r, x({
|
|
1813
1851
|
type: "primary",
|
|
1814
1852
|
underline: "never",
|
|
1815
1853
|
disabled: n.value
|
|
1816
1854
|
}, e.$attrs, { onClick: a }), {
|
|
1817
|
-
default:
|
|
1855
|
+
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
1856
|
_: 3
|
|
1819
1857
|
}, 16, ["disabled"]);
|
|
1820
1858
|
};
|
|
@@ -1921,7 +1959,7 @@ var Vt = {
|
|
|
1921
1959
|
},
|
|
1922
1960
|
emits: ["confirm"],
|
|
1923
1961
|
setup(e, { emit: t }) {
|
|
1924
|
-
let n = e, r = t, { t: i } =
|
|
1962
|
+
let n = e, r = t, { t: i } = B(), o = V(() => {
|
|
1925
1963
|
r("confirm");
|
|
1926
1964
|
}, 300);
|
|
1927
1965
|
async function s() {
|
|
@@ -1932,8 +1970,8 @@ var Vt = {
|
|
|
1932
1970
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1933
1971
|
}
|
|
1934
1972
|
return (t, n) => {
|
|
1935
|
-
let r =
|
|
1936
|
-
return e.layer.type ? (
|
|
1973
|
+
let r = j("el-button"), i = j("el-drawer"), a = j("el-dialog");
|
|
1974
|
+
return e.layer.type ? (D(), u(i, {
|
|
1937
1975
|
key: 0,
|
|
1938
1976
|
modelValue: e.layer.show,
|
|
1939
1977
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1944,18 +1982,18 @@ var Vt = {
|
|
|
1944
1982
|
"before-close": s,
|
|
1945
1983
|
class: "drawer-content"
|
|
1946
1984
|
}, {
|
|
1947
|
-
default:
|
|
1948
|
-
|
|
1985
|
+
default: I(() => [
|
|
1986
|
+
A(t.$slots, "default"),
|
|
1949
1987
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1950
|
-
e.layer.showButton ? (
|
|
1951
|
-
default:
|
|
1988
|
+
e.layer.showButton ? (D(), f("div", Vt, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1989
|
+
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1952
1990
|
_: 1
|
|
1953
1991
|
}), g(r, {
|
|
1954
1992
|
type: "primary",
|
|
1955
1993
|
loading: e.loading,
|
|
1956
|
-
onClick:
|
|
1994
|
+
onClick: P(o)
|
|
1957
1995
|
}, {
|
|
1958
|
-
default:
|
|
1996
|
+
default: I(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1959
1997
|
_: 1
|
|
1960
1998
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1961
1999
|
]),
|
|
@@ -1964,7 +2002,7 @@ var Vt = {
|
|
|
1964
2002
|
"modelValue",
|
|
1965
2003
|
"size",
|
|
1966
2004
|
"title"
|
|
1967
|
-
])) :
|
|
2005
|
+
])) : ae((D(), f("div", Ht, [g(a, {
|
|
1968
2006
|
"close-on-click-modal": !1,
|
|
1969
2007
|
modelValue: e.layer.show,
|
|
1970
2008
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1972,19 +2010,19 @@ var Vt = {
|
|
|
1972
2010
|
width: e.layer.width || 500,
|
|
1973
2011
|
center: ""
|
|
1974
2012
|
}, m({
|
|
1975
|
-
default:
|
|
2013
|
+
default: I(() => [A(t.$slots, "default")]),
|
|
1976
2014
|
_: 2
|
|
1977
2015
|
}, [e.layer.showButton ? {
|
|
1978
2016
|
name: "footer",
|
|
1979
|
-
fn:
|
|
1980
|
-
default:
|
|
2017
|
+
fn: I(() => [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
2018
|
+
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1981
2019
|
_: 1
|
|
1982
2020
|
}), g(r, {
|
|
1983
2021
|
type: "primary",
|
|
1984
2022
|
loading: e.loading,
|
|
1985
|
-
onClick:
|
|
2023
|
+
onClick: P(o)
|
|
1986
2024
|
}, {
|
|
1987
|
-
default:
|
|
2025
|
+
default: I(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1988
2026
|
_: 1
|
|
1989
2027
|
}, 8, ["loading", "onClick"])])]),
|
|
1990
2028
|
key: "0"
|
|
@@ -1992,7 +2030,7 @@ var Vt = {
|
|
|
1992
2030
|
"modelValue",
|
|
1993
2031
|
"title",
|
|
1994
2032
|
"width"
|
|
1995
|
-
])])), [[
|
|
2033
|
+
])])), [[P(Rt), e.layer.show]]);
|
|
1996
2034
|
};
|
|
1997
2035
|
}
|
|
1998
2036
|
};
|
|
@@ -2188,7 +2226,7 @@ function Yt(e, t = {}) {
|
|
|
2188
2226
|
log: !1,
|
|
2189
2227
|
params: null,
|
|
2190
2228
|
format: null
|
|
2191
|
-
}, t), s =
|
|
2229
|
+
}, t), s = k([]), c = k(!1), l = (t) => {
|
|
2192
2230
|
let n = t || i;
|
|
2193
2231
|
c.value = !0, e(n).then((e) => {
|
|
2194
2232
|
let { code: t, data: c, msg: l } = e;
|
|
@@ -2216,8 +2254,8 @@ function Yt(e, t = {}) {
|
|
|
2216
2254
|
];
|
|
2217
2255
|
}
|
|
2218
2256
|
function Xt(e) {
|
|
2219
|
-
let t =
|
|
2220
|
-
return
|
|
2257
|
+
let t = k(e), n = k(""), r = k("");
|
|
2258
|
+
return ie(t, (e) => {
|
|
2221
2259
|
let t = e || ["", ""];
|
|
2222
2260
|
n.value = t[0], r.value = t[1];
|
|
2223
2261
|
}), [
|
|
@@ -2241,8 +2279,8 @@ function Qt(e, t) {
|
|
|
2241
2279
|
//#endregion
|
|
2242
2280
|
//#region src/utils/hook/i18n.js
|
|
2243
2281
|
function $t(e, t = []) {
|
|
2244
|
-
let { locale: n } =
|
|
2245
|
-
return
|
|
2282
|
+
let { locale: n } = B(), r = k(e());
|
|
2283
|
+
return ie([n, ...t], () => {
|
|
2246
2284
|
r.value = e();
|
|
2247
2285
|
}, { immediate: !0 }), r;
|
|
2248
2286
|
}
|
|
@@ -2255,32 +2293,32 @@ function en(e, t = "zh_cn", n = "en_us") {
|
|
|
2255
2293
|
//#endregion
|
|
2256
2294
|
//#region src/utils/hook/storeHook.js
|
|
2257
2295
|
function tn(e, t) {
|
|
2258
|
-
let n =
|
|
2259
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2296
|
+
let n = U;
|
|
2297
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapState), an(t, n);
|
|
2260
2298
|
}
|
|
2261
2299
|
function nn(e, t) {
|
|
2262
|
-
let n =
|
|
2263
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2300
|
+
let n = H;
|
|
2301
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapGetters), an(t, n);
|
|
2264
2302
|
}
|
|
2265
2303
|
function rn(e, t) {
|
|
2266
|
-
let n =
|
|
2267
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2304
|
+
let n = pe;
|
|
2305
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapActions), on(t, n);
|
|
2268
2306
|
}
|
|
2269
2307
|
function an(e, t) {
|
|
2270
|
-
let n =
|
|
2308
|
+
let n = me(), r = t(e), i = {};
|
|
2271
2309
|
return Object.keys(r).forEach((e) => {
|
|
2272
2310
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2273
2311
|
}), i;
|
|
2274
2312
|
}
|
|
2275
2313
|
function on(e, t) {
|
|
2276
|
-
let n =
|
|
2314
|
+
let n = me(), r = t(e), i = {};
|
|
2277
2315
|
return Object.keys(r).forEach((e) => {
|
|
2278
2316
|
i[e] = r[e].bind({ $store: n });
|
|
2279
2317
|
}), i;
|
|
2280
2318
|
}
|
|
2281
2319
|
function sn(e, t = []) {
|
|
2282
|
-
let [n, r, i] = t, { locale: a } =
|
|
2283
|
-
return l(() =>
|
|
2320
|
+
let [n, r, i] = t, { locale: a } = B();
|
|
2321
|
+
return l(() => ne(e).map((e) => {
|
|
2284
2322
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2285
2323
|
return {
|
|
2286
2324
|
...e,
|
|
@@ -2295,20 +2333,20 @@ function cn(e) {
|
|
|
2295
2333
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2296
2334
|
}
|
|
2297
2335
|
function ln() {
|
|
2298
|
-
|
|
2336
|
+
W.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2299
2337
|
return Kt(e, t);
|
|
2300
|
-
} }),
|
|
2338
|
+
} }), W.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2301
2339
|
return qt(e, t);
|
|
2302
|
-
} }),
|
|
2340
|
+
} }), W.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2303
2341
|
return Jt(e, t);
|
|
2304
2342
|
} });
|
|
2305
2343
|
}
|
|
2306
2344
|
function un() {
|
|
2307
|
-
|
|
2345
|
+
W.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2308
2346
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2309
2347
|
let n = t.row[t.column.field], r = e.enum.getItem(n);
|
|
2310
2348
|
if (!r) return n || "-";
|
|
2311
|
-
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } =
|
|
2349
|
+
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } = B(), l = c.value == "zh_cn" ? i : a;
|
|
2312
2350
|
return e.type == "tag" ? s ? g(mt, { fontColor: s }, { default: () => [
|
|
2313
2351
|
h(" "),
|
|
2314
2352
|
l,
|
|
@@ -2317,16 +2355,16 @@ function un() {
|
|
|
2317
2355
|
h(" "),
|
|
2318
2356
|
l,
|
|
2319
2357
|
h(" ")
|
|
2320
|
-
] }) : e.type == "text" ? g(
|
|
2358
|
+
] }) : e.type == "text" ? g(j("el-text"), { type: o }, { default: () => [
|
|
2321
2359
|
h(" "),
|
|
2322
2360
|
l,
|
|
2323
2361
|
h(" ")
|
|
2324
|
-
] }) : g(
|
|
2362
|
+
] }) : g(j("el-text"), null, { default: () => [
|
|
2325
2363
|
h(" "),
|
|
2326
2364
|
l,
|
|
2327
2365
|
h(" ")
|
|
2328
2366
|
] });
|
|
2329
|
-
} }),
|
|
2367
|
+
} }), W.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2330
2368
|
return g(n, x({
|
|
2331
2369
|
modelValue: t.row[t.column.field],
|
|
2332
2370
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2334,14 +2372,14 @@ function un() {
|
|
|
2334
2372
|
"step-strictly": !0,
|
|
2335
2373
|
"value-on-clear": 0
|
|
2336
2374
|
}), null);
|
|
2337
|
-
} }),
|
|
2338
|
-
let { locale: n } =
|
|
2375
|
+
} }), W.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2376
|
+
let { locale: n } = B(), r = n.value == "zh_cn";
|
|
2339
2377
|
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 } =
|
|
2378
|
+
} }), W.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2379
|
+
let { locale: n } = B(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2342
2380
|
return t.row[r] || t.row[t.column.field];
|
|
2343
|
-
} }),
|
|
2344
|
-
let n = t.column.field, i =
|
|
2381
|
+
} }), W.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2382
|
+
let n = t.column.field, i = he(), { to: a, openType: o = "system" } = e, s = t.row[n];
|
|
2345
2383
|
function c(e, t) {
|
|
2346
2384
|
o == "blank" ? window.open(e) : i.push({
|
|
2347
2385
|
path: e,
|
|
@@ -2364,4 +2402,4 @@ function dn() {
|
|
|
2364
2402
|
ln(), un();
|
|
2365
2403
|
}
|
|
2366
2404
|
//#endregion
|
|
2367
|
-
export { ut as CmpDictionary, pt as CmpIcon, mt as CmpTag, gt as ConfrimButton, Lt as DownExcelTemp, yt as ImportButton,
|
|
2405
|
+
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 };
|