joy-admin-components 0.2.100 → 0.2.102
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,24 +1,24 @@
|
|
|
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 ee, onUpdated 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 ee, onUpdated as E, openBlock as D, reactive as te, ref as O, renderList as ne, renderSlot as k, resolveComponent as A, resolveDirective as re, resolveDynamicComponent as j, toDisplayString as M, unref as N, useAttrs as ie, useModel as P, watch as ae, withCtx as F, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
|
|
3
|
+
import { saveAs as I } from "file-saver";
|
|
4
|
+
import L from "exceljs";
|
|
5
|
+
import R from "dayjs";
|
|
6
|
+
import { createI18n as le, useI18n as z } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as ue, debounce as de, isArray as fe } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as pe, mapActions as me, mapGetters as he, mapState as ge, useStore as _e } from "vuex";
|
|
9
|
+
import { VxeUI as B } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as V } 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 ve = Object.create, H = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, be = Object.getOwnPropertyNames, xe = Object.getPrototypeOf, Se = Object.prototype.hasOwnProperty, U = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), W = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = be(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Se.call(e, s) && s !== n && H(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = ye(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, G = (e, t, n) => (n = e == null ? {} : ve(xe(e)), W(t || !e || !e.__esModule ? H(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
24
|
let s = O(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, {
|
|
@@ -36,7 +36,7 @@ var _e = Object.create, U = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), K = /* @__PURE__ */ U(((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 _e = Object.create, U = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), we = /* @__PURE__ */ U(((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 _e = Object.create, U = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), Te = /* @__PURE__ */ G(K()), q = /* @__PURE__ */ G(we()), J = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -224,7 +224,7 @@ var _e = Object.create, U = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
224
224
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
227
|
+
}, Y = {
|
|
228
228
|
"dao-ru": "Import",
|
|
229
229
|
"quan-xuan": "Select All",
|
|
230
230
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -252,36 +252,36 @@ var _e = Object.create, U = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
252
252
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
253
253
|
validate: { invalidInput: "Please enter valid content" },
|
|
254
254
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
255
|
-
},
|
|
256
|
-
zh_cn:
|
|
257
|
-
en_us:
|
|
258
|
-
},
|
|
255
|
+
}, X = {
|
|
256
|
+
zh_cn: J,
|
|
257
|
+
en_us: Y
|
|
258
|
+
}, Z = null;
|
|
259
259
|
function Ee(e = null) {
|
|
260
260
|
if (e) {
|
|
261
261
|
let { global: t } = e;
|
|
262
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
262
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", J) : t.setLocaleMessage("zh_cn", J), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", Y) : t.setLocaleMessage("en_us", Y), Z = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return Z ||= le({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
268
|
+
messages: X
|
|
269
|
+
}), Z;
|
|
270
270
|
}
|
|
271
271
|
function Q() {
|
|
272
|
-
return
|
|
272
|
+
return Z || Ee();
|
|
273
273
|
}
|
|
274
274
|
function $() {
|
|
275
275
|
return Q().global.t;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
R.extend(Te.default), R.extend(q.default);
|
|
278
278
|
async function De(e, t) {
|
|
279
279
|
let { fields: n, range: r = 1 } = t;
|
|
280
280
|
if (!n) {
|
|
281
281
|
let e = $();
|
|
282
282
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
283
283
|
}
|
|
284
|
-
let i = new
|
|
284
|
+
let i = new L.Workbook();
|
|
285
285
|
await i.xlsx.load(e);
|
|
286
286
|
let a = {};
|
|
287
287
|
return i.eachSheet(function(e, t) {
|
|
@@ -308,13 +308,13 @@ async function ke(e, t, n = [], r = {}) {
|
|
|
308
308
|
s.columns = t, s.addRows(n), i && await je(o, s, i);
|
|
309
309
|
try {
|
|
310
310
|
let t = await o.xlsx.writeBuffer();
|
|
311
|
-
|
|
311
|
+
I(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
312
312
|
} catch (e) {
|
|
313
313
|
console.log(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
function Ae() {
|
|
317
|
-
let e = new
|
|
317
|
+
let e = new L.Workbook();
|
|
318
318
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
319
319
|
workbook: e,
|
|
320
320
|
worksheet: e.addWorksheet("Sheet1")
|
|
@@ -387,7 +387,7 @@ async function Ie(e, t) {
|
|
|
387
387
|
let e = $();
|
|
388
388
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
389
389
|
}
|
|
390
|
-
let i = new
|
|
390
|
+
let i = new L.Workbook();
|
|
391
391
|
await i.xlsx.load(e);
|
|
392
392
|
let a = {};
|
|
393
393
|
return i.eachSheet(function(e, t) {
|
|
@@ -406,7 +406,7 @@ async function Ie(e, t) {
|
|
|
406
406
|
let r = { _excelRowNumber: i }, a = !0;
|
|
407
407
|
Object.keys(o).forEach((t) => {
|
|
408
408
|
let [c, l] = o[t].split(Fe), u = e.getCell(c), d;
|
|
409
|
-
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 ?
|
|
409
|
+
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 ? R(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Fe)[1]), r[t] = d, d && (a = !1);
|
|
410
410
|
}), a || t.push(r);
|
|
411
411
|
}
|
|
412
412
|
}), a[e._name] = t;
|
|
@@ -460,13 +460,13 @@ async function Re(e, t) {
|
|
|
460
460
|
}
|
|
461
461
|
try {
|
|
462
462
|
let t = await n.xlsx.writeBuffer();
|
|
463
|
-
|
|
463
|
+
I(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
464
464
|
} catch (e) {
|
|
465
465
|
console.log(e);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
function ze(e) {
|
|
469
|
-
let t = $(), n = new
|
|
469
|
+
let t = $(), n = new L.Workbook();
|
|
470
470
|
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) => {
|
|
471
471
|
let i = r, a = !1;
|
|
472
472
|
/[\\/:*?\[\]]/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);
|
|
@@ -508,12 +508,15 @@ var Ge = class {
|
|
|
508
508
|
"value",
|
|
509
509
|
"labelEn"
|
|
510
510
|
]) {
|
|
511
|
-
this.list = e.map((e) =>
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
511
|
+
this.map = /* @__PURE__ */ new Map(), this.labelMap = /* @__PURE__ */ new Map(), this.list = e.map((e) => {
|
|
512
|
+
let n = {
|
|
513
|
+
...e,
|
|
514
|
+
label: e[t[0]],
|
|
515
|
+
labelEn: e[t[2]] ?? e[t[0]] ?? "",
|
|
516
|
+
value: e[t[1]]
|
|
517
|
+
};
|
|
518
|
+
return this.map.set(n.value, n), this.labelMap.set(n.label, n), n.labelEn && n.labelEn !== n.label && this.labelMap.set(n.labelEn, n), n;
|
|
519
|
+
});
|
|
517
520
|
}
|
|
518
521
|
getName(e) {
|
|
519
522
|
if (!this.has(e)) return "-";
|
|
@@ -536,6 +539,12 @@ var Ge = class {
|
|
|
536
539
|
has(e) {
|
|
537
540
|
return this.map.has(e);
|
|
538
541
|
}
|
|
542
|
+
getValue(e) {
|
|
543
|
+
return this.labelMap.has(e) ? this.labelMap.get(e).value : "-";
|
|
544
|
+
}
|
|
545
|
+
getValueItem(e) {
|
|
546
|
+
return this.labelMap.get(e) ?? null;
|
|
547
|
+
}
|
|
539
548
|
};
|
|
540
549
|
function Ke(e, t = [], n = "i18nName") {
|
|
541
550
|
if (e.length == 0) return new Ge([]);
|
|
@@ -622,7 +631,7 @@ var $e = (e, t) => {
|
|
|
622
631
|
"changeAll"
|
|
623
632
|
], ["update:modelValue"]),
|
|
624
633
|
setup(e, { emit: t }) {
|
|
625
|
-
let n = e, r = ie(), { t: i, locale: a } =
|
|
634
|
+
let n = e, r = ie(), { t: i, locale: a } = z(), o = P(e, "modelValue"), s = l(() => r["value-key"] != null), _ = O(""), v = l(() => {
|
|
626
635
|
if (r.remote !== void 0) return n.data;
|
|
627
636
|
let e = We(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
628
637
|
if (e.length == 0) return o;
|
|
@@ -655,17 +664,17 @@ var $e = (e, t) => {
|
|
|
655
664
|
n.optionClick && n.optionClick(e);
|
|
656
665
|
});
|
|
657
666
|
}
|
|
658
|
-
function
|
|
667
|
+
function E(e) {
|
|
659
668
|
T.value = e;
|
|
660
669
|
}
|
|
661
|
-
let
|
|
662
|
-
if (
|
|
670
|
+
let te = n.labelValue.label.split("-"), re = (e) => {
|
|
671
|
+
if (te.length == 1) {
|
|
663
672
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
664
673
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
665
674
|
return t ||= e[n.labelValue.label], t + "";
|
|
666
675
|
} else {
|
|
667
676
|
let t = [];
|
|
668
|
-
return
|
|
677
|
+
return te.forEach((n) => {
|
|
669
678
|
t.push(e[n]);
|
|
670
679
|
}), t.join("-");
|
|
671
680
|
}
|
|
@@ -676,42 +685,42 @@ var $e = (e, t) => {
|
|
|
676
685
|
b("change", o.value), b("changeAll", o.value, t);
|
|
677
686
|
});
|
|
678
687
|
}
|
|
679
|
-
function
|
|
688
|
+
function oe(e) {
|
|
680
689
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
681
690
|
n.optionClick && n.optionClick(e);
|
|
682
691
|
});
|
|
683
692
|
}
|
|
684
|
-
function
|
|
693
|
+
function se(e) {
|
|
685
694
|
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);
|
|
686
695
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
687
696
|
}
|
|
688
|
-
function
|
|
697
|
+
function I(e) {
|
|
689
698
|
return e.map((e) => ({
|
|
690
699
|
...e,
|
|
691
700
|
label: re(e),
|
|
692
701
|
value: s.value ? e : e[n.labelValue.value]
|
|
693
702
|
}));
|
|
694
703
|
}
|
|
695
|
-
let
|
|
696
|
-
|
|
697
|
-
let t =
|
|
698
|
-
if (t.length !==
|
|
704
|
+
let L = O([]);
|
|
705
|
+
L.value = I(n.data ? n.data : C.value), ae(() => n.data ? n.data : C.value, (e) => {
|
|
706
|
+
let t = I(e);
|
|
707
|
+
if (t.length !== L.value.length) L.value = t;
|
|
699
708
|
else {
|
|
700
709
|
let e = !1;
|
|
701
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
710
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== L.value[n]?.value) {
|
|
702
711
|
e = !0;
|
|
703
712
|
break;
|
|
704
713
|
}
|
|
705
|
-
e && (
|
|
714
|
+
e && (L.value = t);
|
|
706
715
|
}
|
|
707
716
|
}, { deep: !0 });
|
|
708
|
-
let
|
|
717
|
+
let R = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? L.value.map((e) => ({
|
|
709
718
|
...e,
|
|
710
|
-
disabled:
|
|
711
|
-
})) :
|
|
719
|
+
disabled: se(e)
|
|
720
|
+
})) : L.value);
|
|
712
721
|
return (t, n) => {
|
|
713
722
|
let i = A("el-checkbox"), a = A("el-select-v2"), l = A("el-option"), b = A("el-select");
|
|
714
|
-
return N(r).v2 == null ? (
|
|
723
|
+
return N(r).v2 == null ? (D(), u(b, x({
|
|
715
724
|
key: 1,
|
|
716
725
|
modelValue: o.value,
|
|
717
726
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
@@ -721,19 +730,19 @@ var $e = (e, t) => {
|
|
|
721
730
|
"filter-method": N(r).remote == null ? (e) => _.value = e : void 0,
|
|
722
731
|
clearable: ""
|
|
723
732
|
}, N(r), { onClear: ee }), {
|
|
724
|
-
default:
|
|
733
|
+
default: F(() => [N(r).multiple != null && e.showCheckAll && e.maxLimit == null ? k(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
725
734
|
class: "mgl20",
|
|
726
735
|
modelValue: y.value,
|
|
727
736
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
728
737
|
onChange: j
|
|
729
738
|
}, {
|
|
730
|
-
default:
|
|
739
|
+
default: F(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
731
740
|
_: 1
|
|
732
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (
|
|
741
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (D(!0), f(c, null, ne(v.value, (t, n) => (D(), u(l, {
|
|
733
742
|
key: n,
|
|
734
743
|
label: re(t),
|
|
735
|
-
disabled: N(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ?
|
|
736
|
-
onClick:
|
|
744
|
+
disabled: N(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? se(t) : !1,
|
|
745
|
+
onClick: ce((e) => oe(t), ["stop"]),
|
|
737
746
|
value: s.value ? t : t[e.labelValue.value]
|
|
738
747
|
}, null, 8, [
|
|
739
748
|
"label",
|
|
@@ -742,9 +751,9 @@ var $e = (e, t) => {
|
|
|
742
751
|
"value"
|
|
743
752
|
]))), 128))]),
|
|
744
753
|
_: 3
|
|
745
|
-
}, 16, ["modelValue", "filter-method"])) : (
|
|
754
|
+
}, 16, ["modelValue", "filter-method"])) : (D(), u(a, x({
|
|
746
755
|
key: 0,
|
|
747
|
-
options:
|
|
756
|
+
options: R.value,
|
|
748
757
|
modelValue: o.value,
|
|
749
758
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
750
759
|
}, N(r), {
|
|
@@ -754,17 +763,17 @@ var $e = (e, t) => {
|
|
|
754
763
|
clearable: "",
|
|
755
764
|
onChange: w
|
|
756
765
|
}), m({
|
|
757
|
-
default:
|
|
766
|
+
default: F(({ item: e }) => [p("div", { onClick: (t) => E(e) }, M(e.label), 9, et)]),
|
|
758
767
|
_: 2
|
|
759
768
|
}, [N(r).multiple == null ? void 0 : {
|
|
760
769
|
name: "header",
|
|
761
|
-
fn:
|
|
770
|
+
fn: F(() => [k(t.$slots, "header", {}, () => [g(i, {
|
|
762
771
|
class: "mgl20",
|
|
763
772
|
modelValue: y.value,
|
|
764
773
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
765
774
|
onChange: j
|
|
766
775
|
}, {
|
|
767
|
-
default:
|
|
776
|
+
default: F(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
768
777
|
_: 1
|
|
769
778
|
}, 8, ["modelValue"])], !0)]),
|
|
770
779
|
key: "0"
|
|
@@ -777,8 +786,8 @@ var $e = (e, t) => {
|
|
|
777
786
|
} } });
|
|
778
787
|
function rt(e, t, n, r, i, a) {
|
|
779
788
|
let o = A("el-icon");
|
|
780
|
-
return
|
|
781
|
-
default:
|
|
789
|
+
return D(), u(o, { class: "cmp-icon" }, {
|
|
790
|
+
default: F(() => [(D(), u(j(e.name)))]),
|
|
782
791
|
_: 1
|
|
783
792
|
});
|
|
784
793
|
}
|
|
@@ -786,7 +795,7 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
786
795
|
__name: "index",
|
|
787
796
|
emits: ["ok", "no"],
|
|
788
797
|
setup(e, { emit: t }) {
|
|
789
|
-
let n = t, r =
|
|
798
|
+
let n = t, r = de(() => {
|
|
790
799
|
n("ok");
|
|
791
800
|
}, 500);
|
|
792
801
|
function i() {
|
|
@@ -794,11 +803,11 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
794
803
|
}
|
|
795
804
|
return (e, t) => {
|
|
796
805
|
let n = A("el-popconfirm");
|
|
797
|
-
return
|
|
806
|
+
return D(), f("span", at, [g(n, x(e.$attrs, {
|
|
798
807
|
onConfirm: N(r),
|
|
799
808
|
onCancel: i
|
|
800
809
|
}), {
|
|
801
|
-
reference:
|
|
810
|
+
reference: F(() => [k(e.$slots, "default", {}, void 0, !0)]),
|
|
802
811
|
_: 3
|
|
803
812
|
}, 16, ["onConfirm"])]);
|
|
804
813
|
};
|
|
@@ -824,7 +833,7 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
824
833
|
}
|
|
825
834
|
},
|
|
826
835
|
setup(e) {
|
|
827
|
-
let { t } =
|
|
836
|
+
let { t } = z(), n = e, r = O(null), a = O(!1);
|
|
828
837
|
function o(e) {
|
|
829
838
|
let t = e.match(/__v(\d+)/);
|
|
830
839
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -850,13 +859,13 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
850
859
|
}
|
|
851
860
|
return (t, n) => {
|
|
852
861
|
let i = A("el-button");
|
|
853
|
-
return
|
|
862
|
+
return D(), f("div", st, [g(i, x({
|
|
854
863
|
type: "primary",
|
|
855
864
|
loading: a.value,
|
|
856
865
|
class: "mgr10",
|
|
857
866
|
onClick: n[0] ||= (e) => r.value.click()
|
|
858
867
|
}, t.$attrs), {
|
|
859
|
-
default:
|
|
868
|
+
default: F(() => [k(t.$slots, "default", {}, () => [h(M(t.$t("dao-ru")), 1)], !0)]),
|
|
860
869
|
_: 3
|
|
861
870
|
}, 16, ["loading"]), p("input", {
|
|
862
871
|
onChange: s,
|
|
@@ -883,7 +892,7 @@ function ut(e) {
|
|
|
883
892
|
if (n) if (r == "input" && i?.multiple) t[n] = We(a);
|
|
884
893
|
else if (r == "date") if (o.includes("range")) {
|
|
885
894
|
let [e, r] = n, [i, s] = a || [];
|
|
886
|
-
i && o == "daterange" && (i =
|
|
895
|
+
i && o == "daterange" && (i = R(i).format("YYYY-MM-DD 00:00:00"), s = R(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
887
896
|
} else t[n] = a;
|
|
888
897
|
else t[n] = a;
|
|
889
898
|
}), t;
|
|
@@ -902,7 +911,7 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
902
911
|
"visibleChange"
|
|
903
912
|
],
|
|
904
913
|
setup(e, { expose: t, emit: n }) {
|
|
905
|
-
let r = e, i = n, a = O(!0), o = O(null), { t: s } =
|
|
914
|
+
let r = e, i = n, a = O(!0), o = O(null), { t: s } = z(), m = {
|
|
906
915
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
907
916
|
daterange: "YYYY-MM-DD",
|
|
908
917
|
month: "YYYY-MM"
|
|
@@ -922,8 +931,8 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
922
931
|
function T() {
|
|
923
932
|
return ut(r.form.items);
|
|
924
933
|
}
|
|
925
|
-
let ee =
|
|
926
|
-
function
|
|
934
|
+
let ee = ue(r.form.items);
|
|
935
|
+
function E() {
|
|
927
936
|
r.form.items.forEach((e) => {
|
|
928
937
|
let t = ee.find((t) => t.key == e.key);
|
|
929
938
|
t && (e.value = t.value);
|
|
@@ -931,12 +940,12 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
931
940
|
}
|
|
932
941
|
return t({
|
|
933
942
|
getPrm: T,
|
|
934
|
-
reset:
|
|
943
|
+
reset: E
|
|
935
944
|
}), (t, n) => {
|
|
936
|
-
let r = A("el-input"), s = A("el-date-picker"), l = A("el-form-item"), T = A("el-form"), ee = A("el-link"),
|
|
937
|
-
return
|
|
945
|
+
let r = A("el-input"), s = A("el-date-picker"), l = A("el-form-item"), T = A("el-form"), ee = A("el-link"), E = A("el-button");
|
|
946
|
+
return D(), f("div", {
|
|
938
947
|
class: "searchBar-container mgt10 mgb10",
|
|
939
|
-
onKeydown:
|
|
948
|
+
onKeydown: se(v, ["enter"])
|
|
940
949
|
}, [p("div", {
|
|
941
950
|
class: "searchBar",
|
|
942
951
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -944,12 +953,12 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
944
953
|
inline: "",
|
|
945
954
|
model: e.form.data
|
|
946
955
|
}, {
|
|
947
|
-
default:
|
|
956
|
+
default: F(() => [(D(!0), f(c, null, ne(e.form.items.filter((e) => !e.hidden), (e) => (D(), f(c, { key: e.key }, [e.type == "br" ? (D(), f("br", dt)) : (D(), u(l, {
|
|
948
957
|
key: 1,
|
|
949
958
|
label: e.name
|
|
950
959
|
}, {
|
|
951
|
-
default:
|
|
952
|
-
e.type === "input" ? (
|
|
960
|
+
default: F(() => [
|
|
961
|
+
e.type === "input" ? (D(), u(r, {
|
|
953
962
|
key: 0,
|
|
954
963
|
modelValue: e.value,
|
|
955
964
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
@@ -961,8 +970,8 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
961
970
|
"onUpdate:modelValue",
|
|
962
971
|
"class",
|
|
963
972
|
"placeholder"
|
|
964
|
-
])) : e.type === "custom" ? (
|
|
965
|
-
e.type === "select" ? (
|
|
973
|
+
])) : e.type === "custom" ? (D(), u(j(e.render), { key: 1 })) : d("", !0),
|
|
974
|
+
e.type === "select" ? (D(), u(tt, x({
|
|
966
975
|
key: 2,
|
|
967
976
|
class: e.option?.class || "w150",
|
|
968
977
|
modelValue: e.value,
|
|
@@ -978,7 +987,7 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
978
987
|
"onClear",
|
|
979
988
|
"placeholder"
|
|
980
989
|
])) : d("", !0),
|
|
981
|
-
e.type === "date" ? (
|
|
990
|
+
e.type === "date" ? (D(), u(s, x({
|
|
982
991
|
key: 3,
|
|
983
992
|
class: {
|
|
984
993
|
datetimerange: "w300",
|
|
@@ -1017,21 +1026,21 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
1017
1026
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1018
1027
|
}
|
|
1019
1028
|
}, {
|
|
1020
|
-
default:
|
|
1029
|
+
default: F(() => [g(it, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + M(_.value), 1)]),
|
|
1021
1030
|
_: 1
|
|
1022
1031
|
}),
|
|
1023
|
-
g(
|
|
1032
|
+
g(E, {
|
|
1024
1033
|
type: "primary",
|
|
1025
1034
|
onClick: v
|
|
1026
1035
|
}, {
|
|
1027
|
-
default:
|
|
1036
|
+
default: F(() => [h(M(t.$t("shai-xuan")), 1)]),
|
|
1028
1037
|
_: 1
|
|
1029
1038
|
}),
|
|
1030
|
-
g(
|
|
1039
|
+
g(E, {
|
|
1031
1040
|
type: "primary",
|
|
1032
1041
|
onClick: b
|
|
1033
1042
|
}, {
|
|
1034
|
-
default:
|
|
1043
|
+
default: F(() => [h(M(t.$t("chong-zhi")), 1)]),
|
|
1035
1044
|
_: 1
|
|
1036
1045
|
}),
|
|
1037
1046
|
k(t.$slots, "btn", {}, void 0, !0)
|
|
@@ -1111,16 +1120,16 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1111
1120
|
}
|
|
1112
1121
|
},
|
|
1113
1122
|
setup(e, { expose: t }) {
|
|
1114
|
-
let { t: n, locale: r } =
|
|
1123
|
+
let { t: n, locale: r } = z(), i = yt(), a = e, o = O(!1), s = O([]);
|
|
1115
1124
|
a.searchForm.showSearch === void 0 && (a.searchForm.showSearch = i.showSearch), a.searchForm.showPage === void 0 && (a.searchForm.showPage = i.showPage), a.searchForm.showShadow === void 0 && (a.searchForm.showShadow = i.showShadow), a.searchForm.showCheckBox === void 0 && (a.searchForm.showCheckBox = i.showCheckBox), a.searchForm.enableCellCopy === void 0 && (a.searchForm.enableCellCopy = i.enableCellCopy), a.searchForm.selections || (a.searchForm.selections = []);
|
|
1116
1125
|
let c = l(() => {
|
|
1117
1126
|
let e = "default-table";
|
|
1118
1127
|
return a.id ? `listPageId-${e}-${a.id}` : `listPageId-${e}`;
|
|
1119
|
-
}), m =
|
|
1128
|
+
}), m = ue(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = te({
|
|
1120
1129
|
[_]: 1,
|
|
1121
1130
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1122
1131
|
total: 0
|
|
1123
|
-
}), b = O(null), w = O(null), ne = O(450), j =
|
|
1132
|
+
}), b = O(null), w = O(null), ne = O(450), j = de(() => {
|
|
1124
1133
|
S(() => {
|
|
1125
1134
|
if (!w.value) return;
|
|
1126
1135
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
@@ -1136,39 +1145,39 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1136
1145
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1137
1146
|
}
|
|
1138
1147
|
return null;
|
|
1139
|
-
},
|
|
1148
|
+
}, ae = () => {
|
|
1140
1149
|
if (!a.searchForm.enableCellCopy && !i.enableCellCopy) return !1;
|
|
1141
1150
|
let e = P();
|
|
1142
1151
|
if (!e || !e.$el) return !1;
|
|
1143
1152
|
let t = e.$el;
|
|
1144
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1153
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove", J), t.removeEventListener("mouseup", Y), t.removeEventListener("keydown", Me), t.addEventListener("mousedown", Te), t.addEventListener("mousemove", J), t.addEventListener("mouseup", Y), t.addEventListener("keydown", Me);
|
|
1145
1154
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1146
1155
|
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", Ae), n.addEventListener("scroll", Ae), n.__cellCopyScrollBound = !0), Oe(), !0;
|
|
1147
1156
|
};
|
|
1148
1157
|
T(() => {
|
|
1149
1158
|
j(), window.addEventListener("resize", ie), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", Pe), setTimeout(() => {
|
|
1150
|
-
|
|
1159
|
+
ae();
|
|
1151
1160
|
}, 500));
|
|
1152
|
-
}),
|
|
1161
|
+
}), E(() => {
|
|
1153
1162
|
(a.searchForm.enableCellCopy || i.enableCellCopy) && setTimeout(() => {
|
|
1154
|
-
|
|
1163
|
+
ae();
|
|
1155
1164
|
}, 500);
|
|
1156
1165
|
}), ee(() => {
|
|
1157
1166
|
if (window.removeEventListener("resize", ie), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1158
|
-
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove",
|
|
1167
|
+
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove", G), K(), ke();
|
|
1159
1168
|
let e = P();
|
|
1160
1169
|
if (e && e.$el) {
|
|
1161
1170
|
let t = e.$el;
|
|
1162
|
-
t.removeEventListener("mousedown",
|
|
1171
|
+
t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove", J), t.removeEventListener("mouseup", Y), t.removeEventListener("keydown", Me);
|
|
1163
1172
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1164
1173
|
n && (n.removeEventListener("scroll", Ae), n.__cellCopyScrollBound = !1);
|
|
1165
1174
|
}
|
|
1166
1175
|
}
|
|
1167
1176
|
});
|
|
1168
|
-
let
|
|
1169
|
-
async function
|
|
1177
|
+
let se = l(() => _e.value.height || ne.value), I;
|
|
1178
|
+
async function L(e) {
|
|
1170
1179
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1171
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1180
|
+
e[_] != 1 && (e.nextSearchAfter = I), o.value = !0;
|
|
1172
1181
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1173
1182
|
o.value = !1, a.searchForm.selections = [];
|
|
1174
1183
|
});
|
|
@@ -1193,54 +1202,54 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1193
1202
|
break;
|
|
1194
1203
|
}
|
|
1195
1204
|
}
|
|
1196
|
-
s.value = n ? n(e) : e, y.total = o,
|
|
1205
|
+
s.value = n ? n(e) : e, y.total = o, I = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && (X(), H = /* @__PURE__ */ new WeakMap(), ye = null, S(() => {
|
|
1197
1206
|
setTimeout(() => {
|
|
1198
|
-
|
|
1207
|
+
ae();
|
|
1199
1208
|
}, 500);
|
|
1200
1209
|
}));
|
|
1201
1210
|
}
|
|
1202
1211
|
}
|
|
1203
|
-
function
|
|
1212
|
+
function R(e = {}) {
|
|
1204
1213
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1205
|
-
|
|
1214
|
+
L({
|
|
1206
1215
|
...y,
|
|
1207
1216
|
...ut(a.searchForm.items),
|
|
1208
1217
|
...e,
|
|
1209
1218
|
...n
|
|
1210
1219
|
});
|
|
1211
1220
|
}
|
|
1212
|
-
function
|
|
1221
|
+
function le() {
|
|
1213
1222
|
let { reset: e } = a.tableConfig;
|
|
1214
1223
|
e && e(), a.searchForm.items.forEach((e) => {
|
|
1215
|
-
let t = m.find((t) =>
|
|
1224
|
+
let t = m.find((t) => fe(e.key) && fe(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1216
1225
|
t && (e.value = t.value);
|
|
1217
|
-
}),
|
|
1226
|
+
}), R();
|
|
1218
1227
|
}
|
|
1219
|
-
a.api && a.immediate &&
|
|
1220
|
-
function
|
|
1228
|
+
a.api && a.immediate && R();
|
|
1229
|
+
function pe() {
|
|
1221
1230
|
return {
|
|
1222
1231
|
...y,
|
|
1223
1232
|
...ut(a.searchForm.items)
|
|
1224
1233
|
};
|
|
1225
1234
|
}
|
|
1226
|
-
let
|
|
1235
|
+
let me = () => {
|
|
1227
1236
|
let e = b.value;
|
|
1228
1237
|
e && e.clearSort();
|
|
1229
|
-
},
|
|
1238
|
+
}, he = te({ storage: !0 }), ge = te({
|
|
1230
1239
|
drag: !0,
|
|
1231
1240
|
resizable: !0,
|
|
1232
1241
|
maxFixedSize: 0
|
|
1233
|
-
}),
|
|
1242
|
+
}), _e = l(() => {
|
|
1234
1243
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1235
1244
|
return {
|
|
1236
1245
|
headerAlign: "left",
|
|
1237
1246
|
align: "center",
|
|
1238
1247
|
customConfig: {
|
|
1239
|
-
...
|
|
1248
|
+
...he,
|
|
1240
1249
|
...e
|
|
1241
1250
|
},
|
|
1242
1251
|
columnConfig: {
|
|
1243
|
-
...
|
|
1252
|
+
...ge,
|
|
1244
1253
|
...t
|
|
1245
1254
|
},
|
|
1246
1255
|
"virtual-x-config": {
|
|
@@ -1253,18 +1262,18 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1253
1262
|
},
|
|
1254
1263
|
...n
|
|
1255
1264
|
};
|
|
1256
|
-
}),
|
|
1265
|
+
}), B = te({
|
|
1257
1266
|
isSelecting: !1,
|
|
1258
1267
|
startCell: null,
|
|
1259
1268
|
endCell: null,
|
|
1260
1269
|
selectedCells: []
|
|
1261
|
-
}),
|
|
1262
|
-
if (!
|
|
1263
|
-
|
|
1270
|
+
}), V = null, ve = () => {
|
|
1271
|
+
if (!B.startCell || !B.endCell) {
|
|
1272
|
+
V = null, B.selectedCells = [];
|
|
1264
1273
|
return;
|
|
1265
1274
|
}
|
|
1266
|
-
let e = Math.min(
|
|
1267
|
-
|
|
1275
|
+
let e = Math.min(B.startCell.rowIndex, B.endCell.rowIndex), t = Math.max(B.startCell.rowIndex, B.endCell.rowIndex), n = Math.min(B.startCell.colIndex, B.endCell.colIndex), r = Math.max(B.startCell.colIndex, B.endCell.colIndex);
|
|
1276
|
+
V = {
|
|
1268
1277
|
minRow: e,
|
|
1269
1278
|
maxRow: t,
|
|
1270
1279
|
minCol: n,
|
|
@@ -1275,92 +1284,79 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1275
1284
|
rowIndex: a,
|
|
1276
1285
|
colIndex: e
|
|
1277
1286
|
});
|
|
1278
|
-
|
|
1279
|
-
},
|
|
1287
|
+
B.selectedCells = i;
|
|
1288
|
+
}, H = /* @__PURE__ */ new WeakMap(), ye = null, be = 0, xe = (e, t) => {
|
|
1280
1289
|
let n = e.getTableData().fullData;
|
|
1281
|
-
if (n !==
|
|
1282
|
-
|
|
1283
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1290
|
+
if (n !== ye || n.length !== be) {
|
|
1291
|
+
H = /* @__PURE__ */ new WeakMap(), ye = n, be = n.length;
|
|
1292
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && H.set(n[e], e);
|
|
1284
1293
|
}
|
|
1285
|
-
return
|
|
1286
|
-
},
|
|
1294
|
+
return H.has(t) ? H.get(t) : -1;
|
|
1295
|
+
}, Se = (e) => {
|
|
1287
1296
|
let t = e.closest(".vxe-body--column");
|
|
1288
1297
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1289
1298
|
let n = t.closest(".vxe-body--row");
|
|
1290
1299
|
if (!n) return null;
|
|
1291
1300
|
let r = P();
|
|
1292
1301
|
if (!r) return null;
|
|
1293
|
-
let i = -1,
|
|
1294
|
-
if (
|
|
1295
|
-
let e = r.getRowById(
|
|
1296
|
-
e && (i =
|
|
1302
|
+
let i = -1, a = n.getAttribute("rowid");
|
|
1303
|
+
if (a != null) {
|
|
1304
|
+
let e = r.getRowById(a);
|
|
1305
|
+
e && (i = xe(r, e));
|
|
1297
1306
|
}
|
|
1298
1307
|
if (i < 0) {
|
|
1299
1308
|
let e = n.parentElement;
|
|
1300
1309
|
i = Array.from(e.querySelectorAll(".vxe-body--row")).indexOf(n);
|
|
1301
1310
|
}
|
|
1302
1311
|
if (i < 0) return null;
|
|
1303
|
-
let
|
|
1304
|
-
|
|
1305
|
-
let e = Array.from(n.querySelectorAll(".vxe-body--column")).indexOf(t), i = !!t.closest(".vxe-table--fixed-left-wrapper"), o = !!t.closest(".vxe-table--fixed-right-wrapper"), c = r.getColumns();
|
|
1306
|
-
if (i) {
|
|
1307
|
-
let t = c.filter((e) => e.fixed === "left");
|
|
1308
|
-
e < t.length && (s = c.indexOf(t[e]));
|
|
1309
|
-
} else if (o) {
|
|
1310
|
-
let t = c.filter((e) => e.fixed === "right");
|
|
1311
|
-
e < t.length && (s = c.indexOf(t[e]));
|
|
1312
|
-
} else {
|
|
1313
|
-
let t = a.searchForm.showCheckBox ? 1 : 0;
|
|
1314
|
-
s = c.filter((e) => e.fixed === "left").length + e - t;
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
return s < 0 ? null : {
|
|
1312
|
+
let o = -1, s = t.getAttribute("colid");
|
|
1313
|
+
return s && (o = r.getColumns().findIndex((e) => e.id === s)), o < 0 && (o = Array.from(n.querySelectorAll(".vxe-body--column")).indexOf(t)), o < 0 ? null : {
|
|
1318
1314
|
rowIndex: i,
|
|
1319
|
-
colIndex:
|
|
1315
|
+
colIndex: o,
|
|
1320
1316
|
cell: t
|
|
1321
1317
|
};
|
|
1322
|
-
},
|
|
1323
|
-
if (!
|
|
1324
|
-
|
|
1318
|
+
}, U = null, W = 0, G = (e) => {
|
|
1319
|
+
if (!B.isSelecting) return;
|
|
1320
|
+
W = e.clientY;
|
|
1325
1321
|
let t = P();
|
|
1326
1322
|
if (!t || !t.$el) return;
|
|
1327
1323
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1328
1324
|
if (!r) return;
|
|
1329
1325
|
let i = r.getBoundingClientRect();
|
|
1330
|
-
e.clientY < i.top - St || e.clientY > i.bottom + St ?
|
|
1331
|
-
},
|
|
1326
|
+
e.clientY < i.top - St || e.clientY > i.bottom + St ? U || Ce() : K();
|
|
1327
|
+
}, Ce = () => {
|
|
1332
1328
|
let e = () => {
|
|
1333
|
-
if (!
|
|
1334
|
-
|
|
1329
|
+
if (!B.isSelecting) {
|
|
1330
|
+
K();
|
|
1335
1331
|
return;
|
|
1336
1332
|
}
|
|
1337
1333
|
let t = P();
|
|
1338
1334
|
if (!t || !t.$el) {
|
|
1339
|
-
|
|
1335
|
+
K();
|
|
1340
1336
|
return;
|
|
1341
1337
|
}
|
|
1342
1338
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1343
1339
|
if (!r) {
|
|
1344
|
-
|
|
1340
|
+
K();
|
|
1345
1341
|
return;
|
|
1346
1342
|
}
|
|
1347
1343
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1348
|
-
if (
|
|
1349
|
-
let e = i.top -
|
|
1344
|
+
if (W < i.top) {
|
|
1345
|
+
let e = i.top - W;
|
|
1350
1346
|
a = -Math.min(Ct, Math.max(2, e * wt));
|
|
1351
|
-
} else if (
|
|
1352
|
-
let e =
|
|
1347
|
+
} else if (W > i.bottom) {
|
|
1348
|
+
let e = W - i.bottom;
|
|
1353
1349
|
a = Math.min(Ct, Math.max(2, e * wt));
|
|
1354
1350
|
} else {
|
|
1355
|
-
|
|
1351
|
+
K();
|
|
1356
1352
|
return;
|
|
1357
1353
|
}
|
|
1358
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)),
|
|
1354
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), we(r, i), U = requestAnimationFrame(e);
|
|
1359
1355
|
};
|
|
1360
|
-
|
|
1361
|
-
},
|
|
1362
|
-
|
|
1363
|
-
},
|
|
1356
|
+
U = requestAnimationFrame(e);
|
|
1357
|
+
}, K = () => {
|
|
1358
|
+
U &&= (cancelAnimationFrame(U), null);
|
|
1359
|
+
}, we = (e, t) => {
|
|
1364
1360
|
let n = P();
|
|
1365
1361
|
if (!n) return;
|
|
1366
1362
|
let r = n.getTableData().fullData;
|
|
@@ -1370,99 +1366,98 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1370
1366
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1371
1367
|
if (a.length === 0) return;
|
|
1372
1368
|
let o = null;
|
|
1373
|
-
if (
|
|
1369
|
+
if (W < t.top ? o = a[0] : W > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1374
1370
|
let s = o.getAttribute("rowid");
|
|
1375
1371
|
if (s == null) return;
|
|
1376
1372
|
let c = -1, l = n.getRowById(s);
|
|
1377
1373
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1378
|
-
let u =
|
|
1379
|
-
|
|
1374
|
+
let u = B.endCell ? B.endCell.colIndex : B.startCell ? B.startCell.colIndex : 0;
|
|
1375
|
+
B.endCell = {
|
|
1380
1376
|
rowIndex: c,
|
|
1381
1377
|
colIndex: u
|
|
1382
|
-
},
|
|
1383
|
-
},
|
|
1384
|
-
let t =
|
|
1378
|
+
}, ve(), Ee();
|
|
1379
|
+
}, Te = (e) => {
|
|
1380
|
+
let t = Se(e.target);
|
|
1385
1381
|
if (!t) {
|
|
1386
|
-
|
|
1382
|
+
X();
|
|
1387
1383
|
return;
|
|
1388
1384
|
}
|
|
1389
1385
|
let n = P();
|
|
1390
|
-
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"),
|
|
1386
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), B.isSelecting = !0, B.startCell = {
|
|
1391
1387
|
rowIndex: t.rowIndex,
|
|
1392
1388
|
colIndex: t.colIndex
|
|
1393
|
-
},
|
|
1394
|
-
},
|
|
1395
|
-
|
|
1396
|
-
if (
|
|
1397
|
-
let t =
|
|
1398
|
-
t && (
|
|
1389
|
+
}, B.endCell = { ...B.startCell }, document.addEventListener("mousemove", G), ve(), Ee();
|
|
1390
|
+
}, q = null, J = (e) => {
|
|
1391
|
+
B.isSelecting && (q ||= requestAnimationFrame(() => {
|
|
1392
|
+
if (q = null, !B.isSelecting) return;
|
|
1393
|
+
let t = Se(e.target);
|
|
1394
|
+
t && (B.endCell && B.endCell.rowIndex === t.rowIndex && B.endCell.colIndex === t.colIndex || (B.endCell = {
|
|
1399
1395
|
rowIndex: t.rowIndex,
|
|
1400
1396
|
colIndex: t.colIndex
|
|
1401
|
-
},
|
|
1397
|
+
}, ve(), Ee()));
|
|
1402
1398
|
}));
|
|
1399
|
+
}, Y = () => {
|
|
1400
|
+
B.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", G);
|
|
1403
1401
|
}, X = () => {
|
|
1404
|
-
|
|
1405
|
-
}, Z = () => {
|
|
1406
|
-
V.selectedCells = [], V.startCell = null, V.endCell = null, H = null;
|
|
1402
|
+
B.selectedCells = [], B.startCell = null, B.endCell = null, V = null;
|
|
1407
1403
|
let e = P();
|
|
1408
1404
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1409
1405
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1410
1406
|
});
|
|
1411
|
-
},
|
|
1407
|
+
}, Z = () => {
|
|
1412
1408
|
let e = P();
|
|
1413
1409
|
if (!e) return;
|
|
1414
1410
|
let t = e.$el;
|
|
1415
1411
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1416
1412
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1417
1413
|
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");
|
|
1418
|
-
if (!
|
|
1419
|
-
let { minRow: r, maxRow: i, minCol:
|
|
1414
|
+
if (!V) return;
|
|
1415
|
+
let { minRow: r, maxRow: i, minCol: a, maxCol: o } = V, s = e.getColumns(), c = e.getTableData().fullData, l = /* @__PURE__ */ new Map();
|
|
1420
1416
|
for (let t = r; t <= i; t++) {
|
|
1421
|
-
let n =
|
|
1417
|
+
let n = c[t];
|
|
1422
1418
|
if (n) {
|
|
1423
1419
|
let r = e.getRowid(n);
|
|
1424
|
-
r != null &&
|
|
1420
|
+
r != null && l.set(String(r), t);
|
|
1425
1421
|
}
|
|
1426
1422
|
}
|
|
1427
|
-
let
|
|
1423
|
+
let u = [
|
|
1428
1424
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1429
1425
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1430
1426
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1431
1427
|
].filter(Boolean);
|
|
1432
|
-
for (let t of
|
|
1433
|
-
let n =
|
|
1434
|
-
for (let t = 0; t <
|
|
1435
|
-
let
|
|
1436
|
-
if (
|
|
1437
|
-
let
|
|
1438
|
-
if (
|
|
1439
|
-
let t = e.getRowById(
|
|
1440
|
-
if (t && (
|
|
1428
|
+
for (let t of u) {
|
|
1429
|
+
let n = t.querySelectorAll(".vxe-body--row");
|
|
1430
|
+
for (let t = 0; t < n.length; t++) {
|
|
1431
|
+
let c = n[t], u = c.getAttribute("rowid");
|
|
1432
|
+
if (u == null) continue;
|
|
1433
|
+
let d = l.get(String(u));
|
|
1434
|
+
if (d === void 0) {
|
|
1435
|
+
let t = e.getRowById(u);
|
|
1436
|
+
if (t && (d = xe(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1441
1437
|
}
|
|
1442
|
-
if (
|
|
1443
|
-
let
|
|
1444
|
-
for (let e =
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
f && n ? m = _[c.filter((e) => e.fixed === "left").indexOf(t)] : p && a ? m = _[c.filter((e) => e.fixed === "right").indexOf(t)] : !f && !p && d && (m = _[e - l + u]), m && !m.classList.contains("col--checkbox") && !m.classList.contains("col--seq") && (m.classList.add("cell-selected"), g === r && m.classList.add("cell-border-top"), g === i && m.classList.add("cell-border-bottom"), e === o && m.classList.add("cell-border-left"), e === s && m.classList.add("cell-border-right"));
|
|
1438
|
+
if (d < r || d > i) continue;
|
|
1439
|
+
let f = c.querySelectorAll(".vxe-body--column");
|
|
1440
|
+
for (let e = a; e <= o; e++) {
|
|
1441
|
+
if (!s[e]) continue;
|
|
1442
|
+
let t = f[e];
|
|
1443
|
+
t && !t.classList.contains("col--checkbox") && !t.classList.contains("col--seq") && (t.classList.add("cell-selected"), d === r && t.classList.add("cell-border-top"), d === i && t.classList.add("cell-border-bottom"), e === a && t.classList.add("cell-border-left"), e === o && t.classList.add("cell-border-right"));
|
|
1449
1444
|
}
|
|
1450
1445
|
}
|
|
1451
1446
|
}
|
|
1452
1447
|
}, Ee = () => {
|
|
1453
1448
|
S(() => {
|
|
1454
|
-
|
|
1449
|
+
Z();
|
|
1455
1450
|
});
|
|
1456
1451
|
}, Q = null, $ = null, De = () => {
|
|
1457
1452
|
$ ||= requestAnimationFrame(() => {
|
|
1458
|
-
$ = null,
|
|
1453
|
+
$ = null, Z();
|
|
1459
1454
|
});
|
|
1460
1455
|
}, Oe = () => {
|
|
1461
1456
|
let e = P();
|
|
1462
1457
|
if (!e || !e.$el) return;
|
|
1463
1458
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1464
1459
|
t && (ke(), Q = new MutationObserver(() => {
|
|
1465
|
-
|
|
1460
|
+
V && De();
|
|
1466
1461
|
}), Q.observe(t, {
|
|
1467
1462
|
childList: !0,
|
|
1468
1463
|
subtree: !1
|
|
@@ -1470,94 +1465,88 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1470
1465
|
}, ke = () => {
|
|
1471
1466
|
Q &&= (Q.disconnect(), null), $ &&= (cancelAnimationFrame($), null);
|
|
1472
1467
|
}, Ae = () => {
|
|
1473
|
-
|
|
1468
|
+
V && De();
|
|
1474
1469
|
}, je = async () => {
|
|
1475
|
-
if (!
|
|
1470
|
+
if (!V) return;
|
|
1476
1471
|
let e = P();
|
|
1477
1472
|
if (!e) return;
|
|
1478
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow:
|
|
1479
|
-
for (let e = i; e <=
|
|
1480
|
-
let
|
|
1481
|
-
for (let e =
|
|
1482
|
-
let
|
|
1473
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } = V, c = [];
|
|
1474
|
+
for (let e = i; e <= a; e++) c.push(e);
|
|
1475
|
+
let l = [];
|
|
1476
|
+
for (let e = o; e <= s; e++) l.push(e);
|
|
1477
|
+
let u = /* @__PURE__ */ new Map(), d = [
|
|
1483
1478
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1484
1479
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1485
1480
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1486
1481
|
].filter(Boolean);
|
|
1487
|
-
for (let e of
|
|
1482
|
+
for (let e of d) e.querySelectorAll(".vxe-body--row").forEach((t) => {
|
|
1488
1483
|
let n = t.getAttribute("rowid");
|
|
1489
|
-
n != null && (
|
|
1484
|
+
n != null && (u.has(n) || u.set(n, []), u.get(n).push({
|
|
1490
1485
|
rowEl: t,
|
|
1491
1486
|
tbody: e
|
|
1492
1487
|
}));
|
|
1493
1488
|
});
|
|
1494
|
-
let
|
|
1495
|
-
|
|
1496
|
-
let i = r[t],
|
|
1497
|
-
|
|
1489
|
+
let f = [];
|
|
1490
|
+
c.forEach((t) => {
|
|
1491
|
+
let i = r[t], a = [];
|
|
1492
|
+
l.forEach((t) => {
|
|
1498
1493
|
let r = n[t];
|
|
1499
1494
|
if (!r) {
|
|
1500
|
-
|
|
1495
|
+
a.push("");
|
|
1501
1496
|
return;
|
|
1502
1497
|
}
|
|
1503
|
-
let
|
|
1498
|
+
let o = "", s = r.field;
|
|
1504
1499
|
if (r.slots && (r.slots.default || r.slots.content)) {
|
|
1505
|
-
let
|
|
1506
|
-
if (
|
|
1507
|
-
let e =
|
|
1508
|
-
for (let { rowEl:
|
|
1509
|
-
let e = Array.from(
|
|
1510
|
-
if (
|
|
1511
|
-
|
|
1512
|
-
else if (!i && !c && u.closest(".vxe-table--body-wrapper")) {
|
|
1513
|
-
let r = a.searchForm.showCheckBox ? 1 : 0;
|
|
1514
|
-
d = e[t - n.filter((e) => e.fixed === "left").length + r];
|
|
1515
|
-
}
|
|
1516
|
-
if (d && !d.classList.contains("col--checkbox") && !d.classList.contains("col--seq")) {
|
|
1517
|
-
s = (d.innerText || d.textContent || "").trim().replace(/\n/g, " ").replace(/\s+/g, " "), l = !0;
|
|
1500
|
+
let n = i ? e.getRowid(i) : null, r = !1;
|
|
1501
|
+
if (n != null && u.has(String(n))) {
|
|
1502
|
+
let e = u.get(String(n));
|
|
1503
|
+
for (let { rowEl: n } of e) {
|
|
1504
|
+
let e = Array.from(n.querySelectorAll(".vxe-body--column"))[t];
|
|
1505
|
+
if (e && !e.classList.contains("col--checkbox") && !e.classList.contains("col--seq")) {
|
|
1506
|
+
o = (e.innerText || e.textContent || "").trim().replace(/\n/g, " ").replace(/\s+/g, " "), r = !0;
|
|
1518
1507
|
break;
|
|
1519
1508
|
}
|
|
1520
1509
|
}
|
|
1521
1510
|
}
|
|
1522
|
-
if (!
|
|
1523
|
-
let e = i[
|
|
1524
|
-
|
|
1511
|
+
if (!r && i && s) {
|
|
1512
|
+
let e = i[s];
|
|
1513
|
+
o = e == null ? "" : String(e);
|
|
1525
1514
|
}
|
|
1526
1515
|
} else if (r.formatter && i) try {
|
|
1527
1516
|
let e = r.formatter({
|
|
1528
|
-
cellValue: i[
|
|
1517
|
+
cellValue: i[s],
|
|
1529
1518
|
row: i,
|
|
1530
1519
|
column: r
|
|
1531
1520
|
});
|
|
1532
|
-
|
|
1521
|
+
o = e == null ? "" : String(e);
|
|
1533
1522
|
} catch {
|
|
1534
|
-
let e = i ? i[
|
|
1535
|
-
|
|
1523
|
+
let e = i ? i[s] : "";
|
|
1524
|
+
o = e == null ? "" : String(e);
|
|
1536
1525
|
}
|
|
1537
|
-
else if (i &&
|
|
1538
|
-
let e = i[
|
|
1539
|
-
|
|
1526
|
+
else if (i && s) {
|
|
1527
|
+
let e = i[s];
|
|
1528
|
+
o = e == null ? "" : String(e);
|
|
1540
1529
|
}
|
|
1541
|
-
|
|
1542
|
-
}),
|
|
1530
|
+
a.push(o);
|
|
1531
|
+
}), f.push(a.join(" "));
|
|
1543
1532
|
});
|
|
1544
|
-
let
|
|
1533
|
+
let p = f.join("\n");
|
|
1545
1534
|
try {
|
|
1546
|
-
await navigator.clipboard.writeText(
|
|
1535
|
+
await navigator.clipboard.writeText(p);
|
|
1547
1536
|
} catch (e) {
|
|
1548
1537
|
console.error("复制失败:", e);
|
|
1549
1538
|
}
|
|
1550
1539
|
}, Me = (e) => {
|
|
1551
|
-
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1540
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? V && (e.preventDefault(), e.stopPropagation(), je()) : e.key === "Escape" && X());
|
|
1552
1541
|
}, Ne = () => {
|
|
1553
|
-
|
|
1542
|
+
B.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", G);
|
|
1554
1543
|
}, Pe = (e) => {
|
|
1555
1544
|
let t = P();
|
|
1556
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1545
|
+
!t || !t.$el || t.$el.contains(e.target) || X();
|
|
1557
1546
|
}, Fe = (e) => {
|
|
1558
|
-
y[_] = e,
|
|
1547
|
+
y[_] = e, R();
|
|
1559
1548
|
}, Ie = (e) => {
|
|
1560
|
-
y[v] = e, y[_] = 1,
|
|
1549
|
+
y[v] = e, y[_] = 1, R();
|
|
1561
1550
|
};
|
|
1562
1551
|
function Le() {
|
|
1563
1552
|
let e = b.value.getCheckboxRecords();
|
|
@@ -1573,21 +1562,21 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1573
1562
|
};
|
|
1574
1563
|
return t({
|
|
1575
1564
|
tableRef: b,
|
|
1576
|
-
getList:
|
|
1577
|
-
getPrm:
|
|
1578
|
-
clearSort:
|
|
1565
|
+
getList: R,
|
|
1566
|
+
getPrm: pe,
|
|
1567
|
+
clearSort: me,
|
|
1579
1568
|
calculateTableHeight: j
|
|
1580
1569
|
}), (t, n) => {
|
|
1581
|
-
let a = A("el-button"), l = A("el-checkbox"), m = A("el-text"), S = A("vxe-column"), T = A("VxeTable"), ee = A("el-pagination"),
|
|
1582
|
-
return
|
|
1583
|
-
e.searchForm.showSearch ? (
|
|
1570
|
+
let a = A("el-button"), l = A("el-checkbox"), m = A("el-text"), S = A("vxe-column"), T = A("VxeTable"), ee = A("el-pagination"), E = re("loading");
|
|
1571
|
+
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1572
|
+
e.searchForm.showSearch ? (D(), u(ht, {
|
|
1584
1573
|
key: 0,
|
|
1585
1574
|
form: e.searchForm,
|
|
1586
|
-
onReset:
|
|
1587
|
-
onConfirm: n[1] ||= (e) =>
|
|
1575
|
+
onReset: le,
|
|
1576
|
+
onConfirm: n[1] ||= (e) => R(),
|
|
1588
1577
|
onVisibleChange: N(j)
|
|
1589
1578
|
}, {
|
|
1590
|
-
btn:
|
|
1579
|
+
btn: F(() => [
|
|
1591
1580
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1592
1581
|
k(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1593
1582
|
g(a, {
|
|
@@ -1595,14 +1584,14 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1595
1584
|
round: "",
|
|
1596
1585
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1597
1586
|
}, {
|
|
1598
|
-
default:
|
|
1587
|
+
default: F(() => [g(it, { name: "Tools" })]),
|
|
1599
1588
|
_: 1
|
|
1600
1589
|
})
|
|
1601
1590
|
]),
|
|
1602
1591
|
_: 3
|
|
1603
1592
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1604
1593
|
k(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1605
|
-
|
|
1594
|
+
oe((D(), f("div", {
|
|
1606
1595
|
ref_key: "tableContentRef",
|
|
1607
1596
|
ref: w,
|
|
1608
1597
|
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy || N(i).enableCellCopy })
|
|
@@ -1613,37 +1602,37 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1613
1602
|
loading: e.loading || o.value,
|
|
1614
1603
|
data: e.api ? s.value : e.data,
|
|
1615
1604
|
border: ""
|
|
1616
|
-
},
|
|
1617
|
-
height:
|
|
1605
|
+
}, _e.value, {
|
|
1606
|
+
height: se.value,
|
|
1618
1607
|
onCheckboxChange: Le,
|
|
1619
1608
|
onCheckboxAll: Le,
|
|
1620
|
-
onSortChange:
|
|
1609
|
+
onSortChange: _e.value["sort-config"]?.sortChange,
|
|
1621
1610
|
onScroll: Ae
|
|
1622
1611
|
}), {
|
|
1623
|
-
default:
|
|
1612
|
+
default: F(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1624
1613
|
key: 0,
|
|
1625
1614
|
type: "checkbox",
|
|
1626
1615
|
width: N(r) == "zh_cn" ? 80 : 150,
|
|
1627
1616
|
title: t.$t("xu-hao"),
|
|
1628
1617
|
fixed: "left"
|
|
1629
1618
|
}, {
|
|
1630
|
-
checkbox:
|
|
1619
|
+
checkbox: F(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", xt, [n ? (D(), u(l, {
|
|
1631
1620
|
key: 0,
|
|
1632
1621
|
checked: !0,
|
|
1633
1622
|
disabled: r,
|
|
1634
1623
|
size: "default",
|
|
1635
|
-
onClick:
|
|
1636
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1624
|
+
onClick: ce((e) => !r && Re(t), ["stop"])
|
|
1625
|
+
}, null, 8, ["disabled", "onClick"])) : (D(), u(l, {
|
|
1637
1626
|
key: 1,
|
|
1638
1627
|
disabled: r,
|
|
1639
1628
|
checked: !1,
|
|
1640
1629
|
size: "default",
|
|
1641
|
-
onClick:
|
|
1630
|
+
onClick: ce((e) => !r && Re(t), ["stop"])
|
|
1642
1631
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1643
1632
|
type: "info",
|
|
1644
1633
|
class: "mgl5"
|
|
1645
1634
|
}, {
|
|
1646
|
-
default:
|
|
1635
|
+
default: F(() => [h(M(e + 1), 1)]),
|
|
1647
1636
|
_: 2
|
|
1648
1637
|
}, 1024)])]),
|
|
1649
1638
|
_: 1
|
|
@@ -1655,8 +1644,8 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1655
1644
|
"data",
|
|
1656
1645
|
"height",
|
|
1657
1646
|
"onSortChange"
|
|
1658
|
-
])], 2)), [[
|
|
1659
|
-
e.searchForm.showPage ? (
|
|
1647
|
+
])], 2)), [[E, e.loading || o.value]]),
|
|
1648
|
+
e.searchForm.showPage ? (D(), u(ee, {
|
|
1660
1649
|
key: 1,
|
|
1661
1650
|
"current-page": y[N(_)],
|
|
1662
1651
|
"onUpdate:currentPage": n[2] ||= (e) => y[N(_)] = e,
|
|
@@ -1677,7 +1666,7 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1677
1666
|
], 2);
|
|
1678
1667
|
};
|
|
1679
1668
|
}
|
|
1680
|
-
}, [["__scopeId", "data-v-
|
|
1669
|
+
}, [["__scopeId", "data-v-d87fbf92"]]), Et = {
|
|
1681
1670
|
__name: "index",
|
|
1682
1671
|
props: {
|
|
1683
1672
|
sheetsConfig: {
|
|
@@ -1700,11 +1689,11 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1700
1689
|
}
|
|
1701
1690
|
return (e, t) => {
|
|
1702
1691
|
let r = A("el-link");
|
|
1703
|
-
return
|
|
1692
|
+
return D(), u(r, x({
|
|
1704
1693
|
type: "primary",
|
|
1705
1694
|
underline: "never"
|
|
1706
1695
|
}, e.$attrs, { onClick: n }), {
|
|
1707
|
-
default:
|
|
1696
|
+
default: F(() => [k(e.$slots, "default", {}, () => [h(M(e.$t("xia-zai-dao-ru-mo-ban")), 1)])]),
|
|
1708
1697
|
_: 3
|
|
1709
1698
|
}, 16);
|
|
1710
1699
|
};
|
|
@@ -1811,7 +1800,7 @@ var At = {
|
|
|
1811
1800
|
},
|
|
1812
1801
|
emits: ["confirm"],
|
|
1813
1802
|
setup(e, { emit: t }) {
|
|
1814
|
-
let n = e, r = t, { t: i } =
|
|
1803
|
+
let n = e, r = t, { t: i } = z(), o = de(() => {
|
|
1815
1804
|
r("confirm");
|
|
1816
1805
|
}, 300);
|
|
1817
1806
|
async function s() {
|
|
@@ -1823,7 +1812,7 @@ var At = {
|
|
|
1823
1812
|
}
|
|
1824
1813
|
return (t, n) => {
|
|
1825
1814
|
let r = A("el-button"), i = A("el-drawer"), a = A("el-dialog");
|
|
1826
|
-
return e.layer.type ? (
|
|
1815
|
+
return e.layer.type ? (D(), u(i, {
|
|
1827
1816
|
key: 0,
|
|
1828
1817
|
modelValue: e.layer.show,
|
|
1829
1818
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1834,18 +1823,18 @@ var At = {
|
|
|
1834
1823
|
"before-close": s,
|
|
1835
1824
|
class: "drawer-content"
|
|
1836
1825
|
}, {
|
|
1837
|
-
default:
|
|
1826
|
+
default: F(() => [
|
|
1838
1827
|
k(t.$slots, "default"),
|
|
1839
1828
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1840
|
-
e.layer.showButton ? (
|
|
1841
|
-
default:
|
|
1829
|
+
e.layer.showButton ? (D(), f("div", At, [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1830
|
+
default: F(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1842
1831
|
_: 1
|
|
1843
1832
|
}), g(r, {
|
|
1844
1833
|
type: "primary",
|
|
1845
1834
|
loading: e.loading,
|
|
1846
1835
|
onClick: N(o)
|
|
1847
1836
|
}, {
|
|
1848
|
-
default:
|
|
1837
|
+
default: F(() => [h(M(t.$t("ti-jiao")), 1)]),
|
|
1849
1838
|
_: 1
|
|
1850
1839
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1851
1840
|
]),
|
|
@@ -1854,7 +1843,7 @@ var At = {
|
|
|
1854
1843
|
"modelValue",
|
|
1855
1844
|
"size",
|
|
1856
1845
|
"title"
|
|
1857
|
-
])) :
|
|
1846
|
+
])) : oe((D(), f("div", jt, [g(a, {
|
|
1858
1847
|
"close-on-click-modal": !1,
|
|
1859
1848
|
modelValue: e.layer.show,
|
|
1860
1849
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1862,18 +1851,18 @@ var At = {
|
|
|
1862
1851
|
width: e.layer.width || 500,
|
|
1863
1852
|
center: ""
|
|
1864
1853
|
}, m({
|
|
1865
|
-
default:
|
|
1854
|
+
default: F(() => [k(t.$slots, "default")]),
|
|
1866
1855
|
_: 2
|
|
1867
1856
|
}, [e.layer.showButton ? {
|
|
1868
1857
|
name: "footer",
|
|
1869
|
-
fn:
|
|
1870
|
-
default:
|
|
1858
|
+
fn: F(() => [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1859
|
+
default: F(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1871
1860
|
_: 1
|
|
1872
1861
|
}), g(r, {
|
|
1873
1862
|
type: "primary",
|
|
1874
1863
|
onClick: N(o)
|
|
1875
1864
|
}, {
|
|
1876
|
-
default:
|
|
1865
|
+
default: F(() => [h(M(t.$t("ti-jiao")), 1)]),
|
|
1877
1866
|
_: 1
|
|
1878
1867
|
}, 8, ["onClick"])])]),
|
|
1879
1868
|
key: "0"
|
|
@@ -2106,7 +2095,7 @@ function Rt(e, t = {}) {
|
|
|
2106
2095
|
}
|
|
2107
2096
|
function zt(e) {
|
|
2108
2097
|
let t = O(e), n = O(""), r = O("");
|
|
2109
|
-
return
|
|
2098
|
+
return ae(t, (e) => {
|
|
2110
2099
|
let t = e || ["", ""];
|
|
2111
2100
|
n.value = t[0], r.value = t[1];
|
|
2112
2101
|
}), [
|
|
@@ -2130,8 +2119,8 @@ function Vt(e, t) {
|
|
|
2130
2119
|
//#endregion
|
|
2131
2120
|
//#region src/utils/hook/i18n.js
|
|
2132
2121
|
function Ht(e, t = []) {
|
|
2133
|
-
let { locale: n } =
|
|
2134
|
-
return
|
|
2122
|
+
let { locale: n } = z(), r = O(e());
|
|
2123
|
+
return ae([n, ...t], () => {
|
|
2135
2124
|
r.value = e();
|
|
2136
2125
|
}, { immediate: !0 }), r;
|
|
2137
2126
|
}
|
|
@@ -2144,25 +2133,25 @@ function Ut(e, t = "zh_cn", n = "en_us") {
|
|
|
2144
2133
|
//#endregion
|
|
2145
2134
|
//#region src/utils/hook/storeHook.js
|
|
2146
2135
|
function Wt(e, t) {
|
|
2147
|
-
let n =
|
|
2148
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2136
|
+
let n = ge;
|
|
2137
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapState), qt(t, n);
|
|
2149
2138
|
}
|
|
2150
2139
|
function Gt(e, t) {
|
|
2151
|
-
let n =
|
|
2152
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2140
|
+
let n = he;
|
|
2141
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapGetters), qt(t, n);
|
|
2153
2142
|
}
|
|
2154
2143
|
function Kt(e, t) {
|
|
2155
|
-
let n =
|
|
2156
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2144
|
+
let n = me;
|
|
2145
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapActions), Jt(t, n);
|
|
2157
2146
|
}
|
|
2158
2147
|
function qt(e, t) {
|
|
2159
|
-
let n =
|
|
2148
|
+
let n = _e(), r = t(e), i = {};
|
|
2160
2149
|
return Object.keys(r).forEach((e) => {
|
|
2161
2150
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2162
2151
|
}), i;
|
|
2163
2152
|
}
|
|
2164
2153
|
function Jt(e, t) {
|
|
2165
|
-
let n =
|
|
2154
|
+
let n = _e(), r = t(e), i = {};
|
|
2166
2155
|
return Object.keys(r).forEach((e) => {
|
|
2167
2156
|
i[e] = r[e].bind({ $store: n });
|
|
2168
2157
|
}), i;
|
|
@@ -2175,12 +2164,12 @@ var Yt = {
|
|
|
2175
2164
|
setup(e) {
|
|
2176
2165
|
return (t, n) => {
|
|
2177
2166
|
let r = A("el-tag");
|
|
2178
|
-
return
|
|
2167
|
+
return D(), u(r, x(t.$attrs, { style: {
|
|
2179
2168
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
2180
2169
|
color: e.fontColor,
|
|
2181
2170
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
2182
2171
|
} }), {
|
|
2183
|
-
default:
|
|
2172
|
+
default: F(() => [k(t.$slots, "default")]),
|
|
2184
2173
|
_: 3
|
|
2185
2174
|
}, 16, ["style"]);
|
|
2186
2175
|
};
|
|
@@ -2192,18 +2181,18 @@ function Xt(e) {
|
|
|
2192
2181
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2193
2182
|
}
|
|
2194
2183
|
function Zt() {
|
|
2195
|
-
|
|
2184
|
+
B.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2196
2185
|
return Ft(e, t);
|
|
2197
|
-
} }),
|
|
2186
|
+
} }), B.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2198
2187
|
return It(e, t);
|
|
2199
|
-
} }),
|
|
2188
|
+
} }), B.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2200
2189
|
return Lt(e, t);
|
|
2201
2190
|
} });
|
|
2202
2191
|
}
|
|
2203
2192
|
function Qt() {
|
|
2204
|
-
|
|
2193
|
+
B.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2205
2194
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2206
|
-
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } =
|
|
2195
|
+
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } = z(), c = s.value == "zh_cn" ? r : i;
|
|
2207
2196
|
return e.type == "tag" ? o ? g(Yt, { fontColor: o }, { default: () => [
|
|
2208
2197
|
h(" "),
|
|
2209
2198
|
c,
|
|
@@ -2221,7 +2210,7 @@ function Qt() {
|
|
|
2221
2210
|
c,
|
|
2222
2211
|
h(" ")
|
|
2223
2212
|
] });
|
|
2224
|
-
} }),
|
|
2213
|
+
} }), B.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2225
2214
|
return g(n, x({
|
|
2226
2215
|
modelValue: t.row[t.column.field],
|
|
2227
2216
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2229,14 +2218,14 @@ function Qt() {
|
|
|
2229
2218
|
"step-strictly": !0,
|
|
2230
2219
|
"value-on-clear": 0
|
|
2231
2220
|
}), null);
|
|
2232
|
-
} }),
|
|
2233
|
-
let { locale: n } =
|
|
2221
|
+
} }), B.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2222
|
+
let { locale: n } = z(), r = n.value == "zh_cn";
|
|
2234
2223
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2235
|
-
} }),
|
|
2236
|
-
let { locale: n } =
|
|
2224
|
+
} }), B.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2225
|
+
let { locale: n } = z(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2237
2226
|
return t.row[r] || t.row[t.column.field];
|
|
2238
|
-
} }),
|
|
2239
|
-
let n = t.column.field, i =
|
|
2227
|
+
} }), B.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2228
|
+
let n = t.column.field, i = V(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2240
2229
|
function l(e, t) {
|
|
2241
2230
|
s == "blank" ? window.open(e) : i.push({
|
|
2242
2231
|
path: e,
|
|
@@ -2262,4 +2251,4 @@ function $t() {
|
|
|
2262
2251
|
Zt(), Qt();
|
|
2263
2252
|
}
|
|
2264
2253
|
//#endregion
|
|
2265
|
-
export { tt as CmpDictionary, it as CmpIcon, ot as ConfrimButton, Et as DownExcelTemp, lt as ImportButton,
|
|
2254
|
+
export { tt as CmpDictionary, it as CmpIcon, ot as ConfrimButton, Et as DownExcelTemp, lt as ImportButton, Ce as LayOutForm, Mt as Layer, Tt as ListPage, Pt as OnePortalCasSDK, ht as SearchBar, Ge as StatusMap, He as _toRaw, Bt as _typeOf, Ke as arrToStatusMap, Ue as arrayToTree, Ye as checkFileSize, Nt as creatValidator, Ze as createImportFields, Xe as createListPageId, Y as en_us, ke as exportExcel, Re as exportExcelMuilti, It as formatMoney, Ft as formatNumber, Lt as formatPercent, Q as getI18n, $ as getI18nT, yt as getListPageConfig, Ut as getLocaleValue, Qe as getValueBykey, De as importExcel, Ie as importExcelMuilti, X as messages, Zt as registerVxeFormatters, $t as registerVxePlugins, Qt as registerVxeRenderers, bt as resetListPageConfig, vt as setListPageConfig, Ee as setupI18n, Ve as sleep, We as stringToArray, qe as stripHtmlTags, Je as unicode2Str, Kt as useActions, zt as useDatePicker, Gt as useGetters, Ht as useI18nReState, Rt as useRequest, Wt as useState, J as zh_cn };
|