joy-admin-components 0.2.97 → 0.2.99
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 ee, onUpdated as te, openBlock as E, reactive as D, ref as O, renderList as ne, renderSlot as k, resolveComponent as A, resolveDynamicComponent as j, toDisplayString as M, unref as N, useAttrs as re, useModel as P, watch as F, withCtx as I, withDirectives as ie, withKeys as ae, withModifiers as oe } from "vue";
|
|
3
|
+
import { saveAs as se } from "file-saver";
|
|
4
|
+
import L from "exceljs";
|
|
5
|
+
import R from "dayjs";
|
|
6
|
+
import { createI18n as ce, useI18n as z } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as le, debounce as ue, isArray as de } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as fe, mapActions as pe, mapGetters as me, mapState as he, useStore as B } from "vuex";
|
|
9
|
+
import { VxeUI as V } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as ge } 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 H = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, ye = Object.getOwnPropertyNames, be = Object.getPrototypeOf, U = Object.prototype.hasOwnProperty, W = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), xe = (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], !U.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 ? {} : H(be(e)), xe(t || !e || !e.__esModule ? _e(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), G = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
|
-
let s =
|
|
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, {
|
|
25
25
|
span: t.props?.span || t.props?.colProps?.span || 24,
|
|
26
26
|
...t.props?.colProps
|
|
27
27
|
}, { default: () => t })) : null;
|
|
@@ -36,7 +36,7 @@ var G = Object.create, K = Object.defineProperty, me = Object.getOwnPropertyDesc
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), Ce = /* @__PURE__ */ W(((e, t) => {
|
|
40
40
|
(function(n, r) {
|
|
41
41
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_utc = r();
|
|
42
42
|
})(e, (function() {
|
|
@@ -120,7 +120,7 @@ var G = Object.create, K = Object.defineProperty, me = Object.getOwnPropertyDesc
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), we = /* @__PURE__ */ W(((e, t) => {
|
|
124
124
|
(function(n, r) {
|
|
125
125
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_timezone = r();
|
|
126
126
|
})(e, (function() {
|
|
@@ -196,7 +196,7 @@ var G = Object.create, K = Object.defineProperty, me = Object.getOwnPropertyDesc
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), K = /* @__PURE__ */ Se(Ce()), Te = /* @__PURE__ */ Se(we()), q = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -224,7 +224,7 @@ var G = Object.create, K = Object.defineProperty, me = Object.getOwnPropertyDesc
|
|
|
224
224
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
227
|
+
}, J = {
|
|
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 G = Object.create, K = Object.defineProperty, me = Object.getOwnPropertyDesc
|
|
|
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
|
-
},
|
|
259
|
-
function
|
|
255
|
+
}, Ee = {
|
|
256
|
+
zh_cn: q,
|
|
257
|
+
en_us: J
|
|
258
|
+
}, Y = null;
|
|
259
|
+
function X(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", q) : t.setLocaleMessage("zh_cn", q), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", J) : t.setLocaleMessage("en_us", J), Y = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return Y ||= ce({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
268
|
+
messages: Ee
|
|
269
|
+
}), Y;
|
|
270
270
|
}
|
|
271
271
|
function Z() {
|
|
272
|
-
return
|
|
272
|
+
return Y || X();
|
|
273
273
|
}
|
|
274
274
|
function Q() {
|
|
275
275
|
return Z().global.t;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
R.extend(K.default), R.extend(Te.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 = Q();
|
|
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
|
+
se(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 = Q();
|
|
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
|
+
se(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 = Q(), n = new
|
|
469
|
+
let t = Q(), 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);
|
|
@@ -622,7 +622,7 @@ var $ = (e, t) => {
|
|
|
622
622
|
"changeAll"
|
|
623
623
|
], ["update:modelValue"]),
|
|
624
624
|
setup(e, { emit: t }) {
|
|
625
|
-
let n = e, r =
|
|
625
|
+
let n = e, r = re(), { t: i, locale: a } = z(), o = P(e, "modelValue"), s = l(() => r["value-key"] != null), _ = O(""), v = l(() => {
|
|
626
626
|
if (r.remote !== void 0) return n.data;
|
|
627
627
|
let e = We(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
628
628
|
if (e.length == 0) return o;
|
|
@@ -638,7 +638,7 @@ var $ = (e, t) => {
|
|
|
638
638
|
set(e) {
|
|
639
639
|
return e;
|
|
640
640
|
}
|
|
641
|
-
}), b = t, C =
|
|
641
|
+
}), b = t, C = O([]);
|
|
642
642
|
n.api && (async () => {
|
|
643
643
|
let { data: e } = await n.api();
|
|
644
644
|
C.value = [...e], b("success", C);
|
|
@@ -648,92 +648,92 @@ var $ = (e, t) => {
|
|
|
648
648
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
649
649
|
});
|
|
650
650
|
}
|
|
651
|
-
let T =
|
|
652
|
-
function
|
|
651
|
+
let T = O(null);
|
|
652
|
+
function ee() {
|
|
653
653
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
654
654
|
b("change", e), S(() => {
|
|
655
655
|
n.optionClick && n.optionClick(e);
|
|
656
656
|
});
|
|
657
657
|
}
|
|
658
|
-
function
|
|
658
|
+
function te(e) {
|
|
659
659
|
T.value = e;
|
|
660
660
|
}
|
|
661
|
-
let
|
|
662
|
-
if (
|
|
661
|
+
let D = n.labelValue.label.split("-"), j = (e) => {
|
|
662
|
+
if (D.length == 1) {
|
|
663
663
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
664
664
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
665
665
|
return t ||= e[n.labelValue.label], t + "";
|
|
666
666
|
} else {
|
|
667
667
|
let t = [];
|
|
668
|
-
return
|
|
668
|
+
return D.forEach((n) => {
|
|
669
669
|
t.push(e[n]);
|
|
670
670
|
}), t.join("-");
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
|
-
function
|
|
673
|
+
function ie(e) {
|
|
674
674
|
let t = n.data ? n.data : C.value;
|
|
675
675
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
676
676
|
b("change", o.value), b("changeAll", o.value, t);
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ae(e) {
|
|
680
680
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
681
681
|
n.optionClick && n.optionClick(e);
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function se(e) {
|
|
685
685
|
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
686
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function L(e) {
|
|
689
689
|
return e.map((e) => ({
|
|
690
690
|
...e,
|
|
691
|
-
label:
|
|
691
|
+
label: j(e),
|
|
692
692
|
value: s.value ? e : e[n.labelValue.value]
|
|
693
693
|
}));
|
|
694
694
|
}
|
|
695
|
-
let
|
|
696
|
-
|
|
697
|
-
let t =
|
|
698
|
-
if (t.length !==
|
|
695
|
+
let R = O([]);
|
|
696
|
+
R.value = L(n.data ? n.data : C.value), F(() => n.data ? n.data : C.value, (e) => {
|
|
697
|
+
let t = L(e);
|
|
698
|
+
if (t.length !== R.value.length) R.value = t;
|
|
699
699
|
else {
|
|
700
700
|
let e = !1;
|
|
701
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
701
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== R.value[n]?.value) {
|
|
702
702
|
e = !0;
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
705
|
-
e && (
|
|
705
|
+
e && (R.value = t);
|
|
706
706
|
}
|
|
707
707
|
}, { deep: !0 });
|
|
708
|
-
let
|
|
708
|
+
let ce = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? R.value.map((e) => ({
|
|
709
709
|
...e,
|
|
710
|
-
disabled:
|
|
711
|
-
})) :
|
|
710
|
+
disabled: se(e)
|
|
711
|
+
})) : R.value);
|
|
712
712
|
return (t, n) => {
|
|
713
|
-
let i =
|
|
714
|
-
return
|
|
713
|
+
let i = A("el-checkbox"), a = A("el-select-v2"), l = A("el-option"), b = A("el-select");
|
|
714
|
+
return N(r).v2 == null ? (E(), u(b, x({
|
|
715
715
|
key: 1,
|
|
716
716
|
modelValue: o.value,
|
|
717
717
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
718
718
|
filterable: "",
|
|
719
719
|
"collapse-tags": "",
|
|
720
720
|
"collapse-tags-tooltip": "",
|
|
721
|
-
"filter-method":
|
|
721
|
+
"filter-method": N(r).remote == null ? (e) => _.value = e : void 0,
|
|
722
722
|
clearable: ""
|
|
723
|
-
},
|
|
724
|
-
default:
|
|
723
|
+
}, N(r), { onClear: ee }), {
|
|
724
|
+
default: I(() => [N(r).multiple != null && e.showCheckAll && e.maxLimit == null ? k(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
725
725
|
class: "mgl20",
|
|
726
726
|
modelValue: y.value,
|
|
727
727
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
728
|
-
onChange:
|
|
728
|
+
onChange: ie
|
|
729
729
|
}, {
|
|
730
|
-
default:
|
|
730
|
+
default: I(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
731
731
|
_: 1
|
|
732
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (
|
|
732
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (E(!0), f(c, null, ne(v.value, (t, n) => (E(), u(l, {
|
|
733
733
|
key: n,
|
|
734
|
-
label:
|
|
735
|
-
disabled:
|
|
736
|
-
onClick:
|
|
734
|
+
label: j(t),
|
|
735
|
+
disabled: N(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? se(t) : !1,
|
|
736
|
+
onClick: oe((e) => ae(t), ["stop"]),
|
|
737
737
|
value: s.value ? t : t[e.labelValue.value]
|
|
738
738
|
}, null, 8, [
|
|
739
739
|
"label",
|
|
@@ -742,29 +742,29 @@ var $ = (e, t) => {
|
|
|
742
742
|
"value"
|
|
743
743
|
]))), 128))]),
|
|
744
744
|
_: 3
|
|
745
|
-
}, 16, ["modelValue", "filter-method"])) : (
|
|
745
|
+
}, 16, ["modelValue", "filter-method"])) : (E(), u(a, x({
|
|
746
746
|
key: 0,
|
|
747
|
-
options:
|
|
747
|
+
options: ce.value,
|
|
748
748
|
modelValue: o.value,
|
|
749
749
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
750
|
-
},
|
|
750
|
+
}, N(r), {
|
|
751
751
|
filterable: "",
|
|
752
752
|
"collapse-tags": "",
|
|
753
753
|
"collapse-tags-tooltip": "",
|
|
754
754
|
clearable: "",
|
|
755
755
|
onChange: w
|
|
756
756
|
}), m({
|
|
757
|
-
default:
|
|
757
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => te(e) }, M(e.label), 9, $e)]),
|
|
758
758
|
_: 2
|
|
759
|
-
}, [
|
|
759
|
+
}, [N(r).multiple == null ? void 0 : {
|
|
760
760
|
name: "header",
|
|
761
|
-
fn:
|
|
761
|
+
fn: I(() => [k(t.$slots, "header", {}, () => [g(i, {
|
|
762
762
|
class: "mgl20",
|
|
763
763
|
modelValue: y.value,
|
|
764
764
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
765
|
-
onChange:
|
|
765
|
+
onChange: ie
|
|
766
766
|
}, {
|
|
767
|
-
default:
|
|
767
|
+
default: I(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
768
768
|
_: 1
|
|
769
769
|
}, 8, ["modelValue"])], !0)]),
|
|
770
770
|
key: "0"
|
|
@@ -776,9 +776,9 @@ var $ = (e, t) => {
|
|
|
776
776
|
required: !0
|
|
777
777
|
} } });
|
|
778
778
|
function nt(e, t, n, r, i, a) {
|
|
779
|
-
let o =
|
|
780
|
-
return
|
|
781
|
-
default:
|
|
779
|
+
let o = A("el-icon");
|
|
780
|
+
return E(), u(o, { class: "cmp-icon" }, {
|
|
781
|
+
default: I(() => [(E(), u(j(e.name)))]),
|
|
782
782
|
_: 1
|
|
783
783
|
});
|
|
784
784
|
}
|
|
@@ -786,19 +786,19 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
786
786
|
__name: "index",
|
|
787
787
|
emits: ["ok", "no"],
|
|
788
788
|
setup(e, { emit: t }) {
|
|
789
|
-
let n = t, r =
|
|
789
|
+
let n = t, r = ue(() => {
|
|
790
790
|
n("ok");
|
|
791
791
|
}, 500);
|
|
792
792
|
function i() {
|
|
793
793
|
n("no");
|
|
794
794
|
}
|
|
795
795
|
return (e, t) => {
|
|
796
|
-
let n =
|
|
797
|
-
return
|
|
798
|
-
onConfirm:
|
|
796
|
+
let n = A("el-popconfirm");
|
|
797
|
+
return E(), f("span", it, [g(n, x(e.$attrs, {
|
|
798
|
+
onConfirm: N(r),
|
|
799
799
|
onCancel: i
|
|
800
800
|
}), {
|
|
801
|
-
reference:
|
|
801
|
+
reference: I(() => [k(e.$slots, "default", {}, void 0, !0)]),
|
|
802
802
|
_: 3
|
|
803
803
|
}, 16, ["onConfirm"])]);
|
|
804
804
|
};
|
|
@@ -824,7 +824,7 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
826
|
setup(e) {
|
|
827
|
-
let { t } =
|
|
827
|
+
let { t } = z(), n = e, r = O(null), a = O(!1);
|
|
828
828
|
function o(e) {
|
|
829
829
|
let t = e.match(/__v(\d+)/);
|
|
830
830
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -849,14 +849,14 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
849
849
|
});
|
|
850
850
|
}
|
|
851
851
|
return (t, n) => {
|
|
852
|
-
let i =
|
|
853
|
-
return
|
|
852
|
+
let i = A("el-button");
|
|
853
|
+
return E(), f("div", ot, [g(i, x({
|
|
854
854
|
type: "primary",
|
|
855
855
|
loading: a.value,
|
|
856
856
|
class: "mgr10",
|
|
857
857
|
onClick: n[0] ||= (e) => r.value.click()
|
|
858
858
|
}, t.$attrs), {
|
|
859
|
-
default:
|
|
859
|
+
default: I(() => [k(t.$slots, "default", {}, () => [h(M(t.$t("dao-ru")), 1)], !0)]),
|
|
860
860
|
_: 3
|
|
861
861
|
}, 16, ["loading"]), p("input", {
|
|
862
862
|
onChange: s,
|
|
@@ -883,7 +883,7 @@ function lt(e) {
|
|
|
883
883
|
if (n) if (r == "input" && i?.multiple) t[n] = We(a);
|
|
884
884
|
else if (r == "date") if (o.includes("range")) {
|
|
885
885
|
let [e, r] = n, [i, s] = a || [];
|
|
886
|
-
i && o == "daterange" && (i =
|
|
886
|
+
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
887
|
} else t[n] = a;
|
|
888
888
|
else t[n] = a;
|
|
889
889
|
}), t;
|
|
@@ -902,7 +902,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
902
902
|
"visibleChange"
|
|
903
903
|
],
|
|
904
904
|
setup(e, { expose: t, emit: n }) {
|
|
905
|
-
let r = e, i = n, a =
|
|
905
|
+
let r = e, i = n, a = O(!0), o = O(null), { t: s } = z(), m = {
|
|
906
906
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
907
907
|
daterange: "YYYY-MM-DD",
|
|
908
908
|
month: "YYYY-MM"
|
|
@@ -922,21 +922,21 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
922
922
|
function T() {
|
|
923
923
|
return lt(r.form.items);
|
|
924
924
|
}
|
|
925
|
-
let
|
|
926
|
-
function
|
|
925
|
+
let ee = le(r.form.items);
|
|
926
|
+
function te() {
|
|
927
927
|
r.form.items.forEach((e) => {
|
|
928
|
-
let t =
|
|
928
|
+
let t = ee.find((t) => t.key == e.key);
|
|
929
929
|
t && (e.value = t.value);
|
|
930
930
|
});
|
|
931
931
|
}
|
|
932
932
|
return t({
|
|
933
933
|
getPrm: T,
|
|
934
|
-
reset:
|
|
934
|
+
reset: te
|
|
935
935
|
}), (t, n) => {
|
|
936
|
-
let r =
|
|
937
|
-
return
|
|
936
|
+
let r = A("el-input"), s = A("el-date-picker"), l = A("el-form-item"), T = A("el-form"), ee = A("el-link"), te = A("el-button");
|
|
937
|
+
return E(), f("div", {
|
|
938
938
|
class: "searchBar-container mgt10 mgb10",
|
|
939
|
-
onKeydown:
|
|
939
|
+
onKeydown: ae(v, ["enter"])
|
|
940
940
|
}, [p("div", {
|
|
941
941
|
class: "searchBar",
|
|
942
942
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -944,12 +944,12 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
944
944
|
inline: "",
|
|
945
945
|
model: e.form.data
|
|
946
946
|
}, {
|
|
947
|
-
default:
|
|
947
|
+
default: I(() => [(E(!0), f(c, null, ne(e.form.items.filter((e) => !e.hidden), (e) => (E(), f(c, { key: e.key }, [e.type == "br" ? (E(), f("br", ut)) : (E(), u(l, {
|
|
948
948
|
key: 1,
|
|
949
949
|
label: e.name
|
|
950
950
|
}, {
|
|
951
|
-
default:
|
|
952
|
-
e.type === "input" ? (
|
|
951
|
+
default: I(() => [
|
|
952
|
+
e.type === "input" ? (E(), u(r, {
|
|
953
953
|
key: 0,
|
|
954
954
|
modelValue: e.value,
|
|
955
955
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
@@ -961,8 +961,8 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
961
961
|
"onUpdate:modelValue",
|
|
962
962
|
"class",
|
|
963
963
|
"placeholder"
|
|
964
|
-
])) : e.type === "custom" ? (
|
|
965
|
-
e.type === "select" ? (
|
|
964
|
+
])) : e.type === "custom" ? (E(), u(j(e.render), { key: 1 })) : d("", !0),
|
|
965
|
+
e.type === "select" ? (E(), u(et, x({
|
|
966
966
|
key: 2,
|
|
967
967
|
class: e.option?.class || "w150",
|
|
968
968
|
modelValue: e.value,
|
|
@@ -978,7 +978,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
978
978
|
"onClear",
|
|
979
979
|
"placeholder"
|
|
980
980
|
])) : d("", !0),
|
|
981
|
-
e.type === "date" ? (
|
|
981
|
+
e.type === "date" ? (E(), u(s, x({
|
|
982
982
|
key: 3,
|
|
983
983
|
class: {
|
|
984
984
|
datetimerange: "w300",
|
|
@@ -1009,32 +1009,32 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1009
1009
|
_: 2
|
|
1010
1010
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1011
1011
|
_: 1
|
|
1012
|
-
}, 8, ["model"])], 4), p("div", dt, [p("div", ft, [
|
|
1013
|
-
g(
|
|
1012
|
+
}, 8, ["model"])], 4), p("div", dt, [p("div", ft, [k(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", pt, [
|
|
1013
|
+
g(ee, {
|
|
1014
1014
|
underline: "never",
|
|
1015
1015
|
class: "mgr10",
|
|
1016
1016
|
onClick: n[0] ||= () => {
|
|
1017
1017
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1018
1018
|
}
|
|
1019
1019
|
}, {
|
|
1020
|
-
default:
|
|
1020
|
+
default: I(() => [g(rt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + M(_.value), 1)]),
|
|
1021
1021
|
_: 1
|
|
1022
1022
|
}),
|
|
1023
|
-
g(
|
|
1023
|
+
g(te, {
|
|
1024
1024
|
type: "primary",
|
|
1025
1025
|
onClick: v
|
|
1026
1026
|
}, {
|
|
1027
|
-
default:
|
|
1027
|
+
default: I(() => [h(M(t.$t("shai-xuan")), 1)]),
|
|
1028
1028
|
_: 1
|
|
1029
1029
|
}),
|
|
1030
|
-
g(
|
|
1030
|
+
g(te, {
|
|
1031
1031
|
type: "primary",
|
|
1032
1032
|
onClick: b
|
|
1033
1033
|
}, {
|
|
1034
|
-
default:
|
|
1034
|
+
default: I(() => [h(M(t.$t("chong-zhi")), 1)]),
|
|
1035
1035
|
_: 1
|
|
1036
1036
|
}),
|
|
1037
|
-
|
|
1037
|
+
k(t.$slots, "btn", {}, void 0, !0)
|
|
1038
1038
|
])])], 32);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
@@ -1111,24 +1111,24 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1111
1111
|
}
|
|
1112
1112
|
},
|
|
1113
1113
|
setup(e, { expose: t }) {
|
|
1114
|
-
let { t: n, locale: r } =
|
|
1114
|
+
let { t: n, locale: r } = z(), i = vt(), a = e, o = O(!1), s = O([]);
|
|
1115
1115
|
a.searchForm.showSearch === void 0 && (a.searchForm.showSearch = i.showSearch), a.searchForm.showPage === void 0 && (a.searchForm.showPage = i.showPage), a.searchForm.showShadow === void 0 && (a.searchForm.showShadow = i.showShadow), a.searchForm.showCheckBox === void 0 && (a.searchForm.showCheckBox = i.showCheckBox), a.searchForm.enableCellCopy === void 0 && (a.searchForm.enableCellCopy = i.enableCellCopy), a.searchForm.selections || (a.searchForm.selections = []);
|
|
1116
1116
|
let c = l(() => {
|
|
1117
1117
|
let e = "default-table";
|
|
1118
1118
|
return a.id ? `listPageId-${e}-${a.id}` : `listPageId-${e}`;
|
|
1119
|
-
}), m =
|
|
1119
|
+
}), m = le(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = D({
|
|
1120
1120
|
[_]: 1,
|
|
1121
1121
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1122
1122
|
total: 0
|
|
1123
|
-
}), b =
|
|
1123
|
+
}), b = O(null), w = O(null), ne = O(450), j = ue(() => {
|
|
1124
1124
|
S(() => {
|
|
1125
1125
|
if (!w.value) return;
|
|
1126
1126
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1127
|
-
|
|
1127
|
+
ne.value = Math.max(t, 200);
|
|
1128
1128
|
});
|
|
1129
|
-
}, 100),
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1129
|
+
}, 100), re = () => {
|
|
1130
|
+
j();
|
|
1131
|
+
}, P = () => {
|
|
1132
1132
|
if (b.value) return b.value;
|
|
1133
1133
|
let e = w.value;
|
|
1134
1134
|
if (e) {
|
|
@@ -1136,39 +1136,39 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1136
1136
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1137
1137
|
}
|
|
1138
1138
|
return null;
|
|
1139
|
-
},
|
|
1139
|
+
}, F = () => {
|
|
1140
1140
|
if (!a.searchForm.enableCellCopy && !i.enableCellCopy) return !1;
|
|
1141
|
-
let e =
|
|
1141
|
+
let e = P();
|
|
1142
1142
|
if (!e || !e.$el) return !1;
|
|
1143
1143
|
let t = e.$el;
|
|
1144
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1144
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", we), t.removeEventListener("mousemove", Te), t.removeEventListener("mouseup", q), t.removeEventListener("keydown", je), t.addEventListener("mousedown", we), t.addEventListener("mousemove", Te), t.addEventListener("mouseup", q), t.addEventListener("keydown", je);
|
|
1145
1145
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1146
|
-
return n &&
|
|
1146
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", ke), n.addEventListener("scroll", ke), n.__cellCopyScrollBound = !0), De(), !0;
|
|
1147
1147
|
};
|
|
1148
1148
|
T(() => {
|
|
1149
|
-
|
|
1150
|
-
|
|
1149
|
+
j(), window.addEventListener("resize", re), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", Me), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1150
|
+
F();
|
|
1151
1151
|
}, 500));
|
|
1152
|
-
}),
|
|
1152
|
+
}), te(() => {
|
|
1153
1153
|
(a.searchForm.enableCellCopy || i.enableCellCopy) && setTimeout(() => {
|
|
1154
|
-
|
|
1154
|
+
F();
|
|
1155
1155
|
}, 500);
|
|
1156
|
-
}),
|
|
1157
|
-
if (window.removeEventListener("resize",
|
|
1158
|
-
document.removeEventListener("mouseup",
|
|
1159
|
-
let e =
|
|
1156
|
+
}), ee(() => {
|
|
1157
|
+
if (window.removeEventListener("resize", re), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1158
|
+
document.removeEventListener("mouseup", Me), document.removeEventListener("mousedown", Ne), document.removeEventListener("mousemove", xe), G(), Oe();
|
|
1159
|
+
let e = P();
|
|
1160
1160
|
if (e && e.$el) {
|
|
1161
1161
|
let t = e.$el;
|
|
1162
|
-
t.removeEventListener("mousedown",
|
|
1162
|
+
t.removeEventListener("mousedown", we), t.removeEventListener("mousemove", Te), t.removeEventListener("mouseup", q), t.removeEventListener("keydown", je);
|
|
1163
1163
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1164
|
-
n && (n.removeEventListener("scroll",
|
|
1164
|
+
n && (n.removeEventListener("scroll", ke), n.__cellCopyScrollBound = !1);
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
1167
|
});
|
|
1168
|
-
let
|
|
1169
|
-
async function
|
|
1168
|
+
let ie = l(() => he.value.height || ne.value), ae;
|
|
1169
|
+
async function se(e) {
|
|
1170
1170
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1171
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1171
|
+
e[_] != 1 && (e.nextSearchAfter = ae), o.value = !0;
|
|
1172
1172
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1173
1173
|
o.value = !1, a.searchForm.selections = [];
|
|
1174
1174
|
});
|
|
@@ -1193,54 +1193,54 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1193
1193
|
break;
|
|
1194
1194
|
}
|
|
1195
1195
|
}
|
|
1196
|
-
s.value = n ? n(e) : e, y.total = o,
|
|
1196
|
+
s.value = n ? n(e) : e, y.total = o, ae = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && (J(), H = /* @__PURE__ */ new WeakMap(), _e = null, S(() => {
|
|
1197
1197
|
setTimeout(() => {
|
|
1198
|
-
|
|
1199
|
-
},
|
|
1200
|
-
});
|
|
1198
|
+
F();
|
|
1199
|
+
}, 500);
|
|
1200
|
+
}));
|
|
1201
1201
|
}
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function L(e = {}) {
|
|
1204
1204
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1205
|
-
|
|
1205
|
+
se({
|
|
1206
1206
|
...y,
|
|
1207
1207
|
...lt(a.searchForm.items),
|
|
1208
1208
|
...e,
|
|
1209
1209
|
...n
|
|
1210
1210
|
});
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function R() {
|
|
1213
1213
|
let { reset: e } = a.tableConfig;
|
|
1214
1214
|
e && e(), a.searchForm.items.forEach((e) => {
|
|
1215
|
-
let t = m.find((t) =>
|
|
1215
|
+
let t = m.find((t) => de(e.key) && de(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1216
1216
|
t && (e.value = t.value);
|
|
1217
|
-
}),
|
|
1217
|
+
}), L();
|
|
1218
1218
|
}
|
|
1219
|
-
a.api && a.immediate &&
|
|
1220
|
-
function
|
|
1219
|
+
a.api && a.immediate && L();
|
|
1220
|
+
function ce() {
|
|
1221
1221
|
return {
|
|
1222
1222
|
...y,
|
|
1223
1223
|
...lt(a.searchForm.items)
|
|
1224
1224
|
};
|
|
1225
1225
|
}
|
|
1226
|
-
let
|
|
1226
|
+
let fe = () => {
|
|
1227
1227
|
let e = b.value;
|
|
1228
1228
|
e && e.clearSort();
|
|
1229
|
-
},
|
|
1229
|
+
}, pe = D({ storage: !0 }), me = D({
|
|
1230
1230
|
drag: !0,
|
|
1231
1231
|
resizable: !0,
|
|
1232
1232
|
maxFixedSize: 0
|
|
1233
|
-
}),
|
|
1233
|
+
}), he = l(() => {
|
|
1234
1234
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1235
1235
|
return {
|
|
1236
1236
|
headerAlign: "left",
|
|
1237
1237
|
align: "center",
|
|
1238
1238
|
customConfig: {
|
|
1239
|
-
...
|
|
1239
|
+
...pe,
|
|
1240
1240
|
...e
|
|
1241
1241
|
},
|
|
1242
1242
|
columnConfig: {
|
|
1243
|
-
...
|
|
1243
|
+
...me,
|
|
1244
1244
|
...t
|
|
1245
1245
|
},
|
|
1246
1246
|
"virtual-x-config": {
|
|
@@ -1253,22 +1253,47 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1253
1253
|
},
|
|
1254
1254
|
...n
|
|
1255
1255
|
};
|
|
1256
|
-
}),
|
|
1256
|
+
}), B = D({
|
|
1257
1257
|
isSelecting: !1,
|
|
1258
1258
|
startCell: null,
|
|
1259
1259
|
endCell: null,
|
|
1260
1260
|
selectedCells: []
|
|
1261
|
-
}),
|
|
1261
|
+
}), V = null, ge = () => {
|
|
1262
|
+
if (!B.startCell || !B.endCell) {
|
|
1263
|
+
V = null, B.selectedCells = [];
|
|
1264
|
+
return;
|
|
1265
|
+
}
|
|
1266
|
+
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);
|
|
1267
|
+
V = {
|
|
1268
|
+
minRow: e,
|
|
1269
|
+
maxRow: t,
|
|
1270
|
+
minCol: n,
|
|
1271
|
+
maxCol: r
|
|
1272
|
+
};
|
|
1273
|
+
let i = [];
|
|
1274
|
+
for (let a = e; a <= t; a++) for (let e = n; e <= r; e++) i.push({
|
|
1275
|
+
rowIndex: a,
|
|
1276
|
+
colIndex: e
|
|
1277
|
+
});
|
|
1278
|
+
B.selectedCells = i;
|
|
1279
|
+
}, H = /* @__PURE__ */ new WeakMap(), _e = null, ve = 0, ye = (e, t) => {
|
|
1280
|
+
let n = e.getTableData().fullData;
|
|
1281
|
+
if (n !== _e || n.length !== ve) {
|
|
1282
|
+
H = /* @__PURE__ */ new WeakMap(), _e = n, ve = n.length;
|
|
1283
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && H.set(n[e], e);
|
|
1284
|
+
}
|
|
1285
|
+
return H.has(t) ? H.get(t) : -1;
|
|
1286
|
+
}, be = (e) => {
|
|
1262
1287
|
let t = e.closest(".vxe-body--column");
|
|
1263
1288
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1264
1289
|
let n = t.closest(".vxe-body--row");
|
|
1265
1290
|
if (!n) return null;
|
|
1266
|
-
let r =
|
|
1291
|
+
let r = P();
|
|
1267
1292
|
if (!r) return null;
|
|
1268
1293
|
let i = -1, o = n.getAttribute("rowid");
|
|
1269
1294
|
if (o != null) {
|
|
1270
1295
|
let e = r.getRowById(o);
|
|
1271
|
-
e && (i = r
|
|
1296
|
+
e && (i = ye(r, e));
|
|
1272
1297
|
}
|
|
1273
1298
|
if (i < 0) {
|
|
1274
1299
|
let e = n.parentElement;
|
|
@@ -1294,49 +1319,49 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1294
1319
|
colIndex: s,
|
|
1295
1320
|
cell: t
|
|
1296
1321
|
};
|
|
1297
|
-
},
|
|
1298
|
-
if (!
|
|
1299
|
-
|
|
1300
|
-
let t =
|
|
1322
|
+
}, U = null, W = 0, xe = (e) => {
|
|
1323
|
+
if (!B.isSelecting) return;
|
|
1324
|
+
W = e.clientY;
|
|
1325
|
+
let t = P();
|
|
1301
1326
|
if (!t || !t.$el) return;
|
|
1302
1327
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1303
1328
|
if (!r) return;
|
|
1304
1329
|
let i = r.getBoundingClientRect();
|
|
1305
|
-
e.clientY < i.top - xt || e.clientY > i.bottom + xt ?
|
|
1306
|
-
},
|
|
1330
|
+
e.clientY < i.top - xt || e.clientY > i.bottom + xt ? U || Se() : G();
|
|
1331
|
+
}, Se = () => {
|
|
1307
1332
|
let e = () => {
|
|
1308
|
-
if (!
|
|
1309
|
-
|
|
1333
|
+
if (!B.isSelecting) {
|
|
1334
|
+
G();
|
|
1310
1335
|
return;
|
|
1311
1336
|
}
|
|
1312
|
-
let t =
|
|
1337
|
+
let t = P();
|
|
1313
1338
|
if (!t || !t.$el) {
|
|
1314
|
-
|
|
1339
|
+
G();
|
|
1315
1340
|
return;
|
|
1316
1341
|
}
|
|
1317
1342
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1318
1343
|
if (!r) {
|
|
1319
|
-
|
|
1344
|
+
G();
|
|
1320
1345
|
return;
|
|
1321
1346
|
}
|
|
1322
1347
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1323
|
-
if (
|
|
1324
|
-
let e = i.top -
|
|
1348
|
+
if (W < i.top) {
|
|
1349
|
+
let e = i.top - W;
|
|
1325
1350
|
a = -Math.min(St, Math.max(2, e * Ct));
|
|
1326
|
-
} else if (
|
|
1327
|
-
let e =
|
|
1351
|
+
} else if (W > i.bottom) {
|
|
1352
|
+
let e = W - i.bottom;
|
|
1328
1353
|
a = Math.min(St, Math.max(2, e * Ct));
|
|
1329
1354
|
} else {
|
|
1330
|
-
|
|
1355
|
+
G();
|
|
1331
1356
|
return;
|
|
1332
1357
|
}
|
|
1333
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)),
|
|
1358
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Ce(r, i), U = requestAnimationFrame(e);
|
|
1334
1359
|
};
|
|
1335
|
-
|
|
1336
|
-
},
|
|
1337
|
-
|
|
1338
|
-
},
|
|
1339
|
-
let n =
|
|
1360
|
+
U = requestAnimationFrame(e);
|
|
1361
|
+
}, G = () => {
|
|
1362
|
+
U &&= (cancelAnimationFrame(U), null);
|
|
1363
|
+
}, Ce = (e, t) => {
|
|
1364
|
+
let n = P();
|
|
1340
1365
|
if (!n) return;
|
|
1341
1366
|
let r = n.getTableData().fullData;
|
|
1342
1367
|
if (!r || r.length === 0) return;
|
|
@@ -1345,192 +1370,197 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1345
1370
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1346
1371
|
if (a.length === 0) return;
|
|
1347
1372
|
let o = null;
|
|
1348
|
-
if (
|
|
1373
|
+
if (W < t.top ? o = a[0] : W > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1349
1374
|
let s = o.getAttribute("rowid");
|
|
1350
1375
|
if (s == null) return;
|
|
1351
1376
|
let c = -1, l = n.getRowById(s);
|
|
1352
1377
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1353
|
-
let u =
|
|
1354
|
-
|
|
1378
|
+
let u = B.endCell ? B.endCell.colIndex : B.startCell ? B.startCell.colIndex : 0;
|
|
1379
|
+
B.endCell = {
|
|
1355
1380
|
rowIndex: c,
|
|
1356
1381
|
colIndex: u
|
|
1357
|
-
},
|
|
1358
|
-
},
|
|
1359
|
-
let t =
|
|
1382
|
+
}, ge(), Y();
|
|
1383
|
+
}, we = (e) => {
|
|
1384
|
+
let t = be(e.target);
|
|
1360
1385
|
if (!t) {
|
|
1361
|
-
|
|
1386
|
+
J();
|
|
1362
1387
|
return;
|
|
1363
1388
|
}
|
|
1364
|
-
|
|
1389
|
+
B.isSelecting = !0, B.startCell = {
|
|
1365
1390
|
rowIndex: t.rowIndex,
|
|
1366
1391
|
colIndex: t.colIndex
|
|
1367
|
-
},
|
|
1368
|
-
},
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
rowIndex
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
},
|
|
1378
|
-
|
|
1379
|
-
|
|
1392
|
+
}, B.endCell = { ...B.startCell }, document.addEventListener("mousemove", xe), ge(), Y();
|
|
1393
|
+
}, K = null, Te = (e) => {
|
|
1394
|
+
B.isSelecting && (K ||= requestAnimationFrame(() => {
|
|
1395
|
+
if (K = null, !B.isSelecting) return;
|
|
1396
|
+
let t = be(e.target);
|
|
1397
|
+
t && (B.endCell && B.endCell.rowIndex === t.rowIndex && B.endCell.colIndex === t.colIndex || (B.endCell = {
|
|
1398
|
+
rowIndex: t.rowIndex,
|
|
1399
|
+
colIndex: t.colIndex
|
|
1400
|
+
}, ge(), Y()));
|
|
1401
|
+
}));
|
|
1402
|
+
}, q = () => {
|
|
1403
|
+
B.isSelecting = !1, G(), K &&= (cancelAnimationFrame(K), null), document.removeEventListener("mousemove", xe);
|
|
1404
|
+
}, J = () => {
|
|
1405
|
+
B.selectedCells = [], B.startCell = null, B.endCell = null, V = null;
|
|
1406
|
+
let e = P();
|
|
1380
1407
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1381
1408
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1382
1409
|
});
|
|
1383
|
-
},
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1410
|
+
}, Ee = () => {
|
|
1411
|
+
let e = P();
|
|
1412
|
+
if (!e) return;
|
|
1413
|
+
let t = e.$el, n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1414
|
+
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");
|
|
1415
|
+
if (!V) return;
|
|
1416
|
+
let { minRow: r, maxRow: i, minCol: o, maxCol: s } = V, c = e.getColumns(), l = c.filter((e) => e.fixed === "left").length, u = a.searchForm.showCheckBox ? 1 : 0, d = e.getTableData().fullData, f = /* @__PURE__ */ new Map();
|
|
1417
|
+
for (let t = r; t <= i; t++) {
|
|
1418
|
+
let n = d[t];
|
|
1419
|
+
if (n) {
|
|
1420
|
+
let r = e.getRowid(n);
|
|
1421
|
+
r != null && f.set(String(r), t);
|
|
1422
|
+
}
|
|
1387
1423
|
}
|
|
1388
|
-
let
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
let n = e.getColumns(), r = H.selectedCells.map((e) => e.rowIndex), i = H.selectedCells.map((e) => e.colIndex), o = Math.min(...r), s = Math.max(...r), c = Math.min(...i), l = Math.max(...i), u = e.getTableData().fullData, d = /* @__PURE__ */ new Map();
|
|
1403
|
-
H.selectedCells.forEach(({ rowIndex: t }) => {
|
|
1404
|
-
if (d.has(t)) return;
|
|
1405
|
-
let n = u[t];
|
|
1406
|
-
if (n) {
|
|
1407
|
-
let r = e.getRowid(n);
|
|
1408
|
-
r != null && d.set(String(r), t);
|
|
1409
|
-
}
|
|
1410
|
-
});
|
|
1411
|
-
let f = [
|
|
1412
|
-
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1413
|
-
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1414
|
-
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1415
|
-
].filter(Boolean), p = new Set(H.selectedCells.map(({ rowIndex: e, colIndex: t }) => `${e}_${t}`));
|
|
1416
|
-
for (let e of f) e.querySelectorAll(".vxe-body--row").forEach((t) => {
|
|
1417
|
-
let r = t.getAttribute("rowid");
|
|
1418
|
-
if (r == null) return;
|
|
1419
|
-
let i = d.get(String(r));
|
|
1420
|
-
if (i === void 0) {
|
|
1421
|
-
let e = parseInt(r, 10);
|
|
1422
|
-
if (!isNaN(e) && p.has(`${e}_${c}`)) i = e;
|
|
1423
|
-
else return;
|
|
1424
|
+
let p = [
|
|
1425
|
+
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1426
|
+
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1427
|
+
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1428
|
+
].filter(Boolean);
|
|
1429
|
+
for (let t of p) {
|
|
1430
|
+
let n = !!t.closest(".vxe-table--fixed-left-wrapper"), a = !!t.closest(".vxe-table--fixed-right-wrapper"), d = !!t.closest(".vxe-table--body-wrapper"), p = t.querySelectorAll(".vxe-body--row");
|
|
1431
|
+
for (let t = 0; t < p.length; t++) {
|
|
1432
|
+
let m = p[t], h = m.getAttribute("rowid");
|
|
1433
|
+
if (h == null) continue;
|
|
1434
|
+
let g = f.get(String(h));
|
|
1435
|
+
if (g === void 0) {
|
|
1436
|
+
let t = e.getRowById(h);
|
|
1437
|
+
if (t && (g = ye(e, t), g >= 0 && f.set(String(h), g)), g === void 0 || g < 0) continue;
|
|
1424
1438
|
}
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
let
|
|
1429
|
-
if (!
|
|
1430
|
-
let
|
|
1431
|
-
|
|
1432
|
-
else if (f && e.closest(".vxe-table--fixed-right-wrapper")) m = u[n.filter((e) => e.fixed === "right").indexOf(r)];
|
|
1433
|
-
else if (!d && !f && e.closest(".vxe-table--body-wrapper")) {
|
|
1434
|
-
let e = a.searchForm.showCheckBox ? 1 : 0, r = n.filter((e) => e.fixed === "left").length;
|
|
1435
|
-
m = u[t - r + e];
|
|
1436
|
-
}
|
|
1437
|
-
m && !m.classList.contains("col--checkbox") && !m.classList.contains("col--seq") && (m.classList.add("cell-selected"), i === o && m.classList.add("cell-border-top"), i === s && m.classList.add("cell-border-bottom"), t === c && m.classList.add("cell-border-left"), t === l && m.classList.add("cell-border-right"));
|
|
1439
|
+
if (g < r || g > i) continue;
|
|
1440
|
+
let _ = m.querySelectorAll(".vxe-body--column");
|
|
1441
|
+
for (let e = o; e <= s; e++) {
|
|
1442
|
+
let t = c[e];
|
|
1443
|
+
if (!t) continue;
|
|
1444
|
+
let f = t.fixed === "left", p = t.fixed === "right", m = null;
|
|
1445
|
+
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
1446
|
}
|
|
1439
|
-
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
}, Y = () => {
|
|
1450
|
+
S(() => {
|
|
1451
|
+
Ee();
|
|
1440
1452
|
});
|
|
1441
|
-
},
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
}
|
|
1445
|
-
},
|
|
1446
|
-
|
|
1447
|
-
|
|
1453
|
+
}, X = null, Z = null, Q = () => {
|
|
1454
|
+
Z ||= requestAnimationFrame(() => {
|
|
1455
|
+
Z = null, Ee();
|
|
1456
|
+
});
|
|
1457
|
+
}, De = () => {
|
|
1458
|
+
let e = P();
|
|
1459
|
+
if (!e || !e.$el) return;
|
|
1460
|
+
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1461
|
+
t && (Oe(), X = new MutationObserver(() => {
|
|
1462
|
+
V && Q();
|
|
1463
|
+
}), X.observe(t, {
|
|
1464
|
+
childList: !0,
|
|
1465
|
+
subtree: !1
|
|
1466
|
+
}));
|
|
1467
|
+
}, Oe = () => {
|
|
1468
|
+
X &&= (X.disconnect(), null), Z &&= (cancelAnimationFrame(Z), null);
|
|
1469
|
+
}, ke = () => {
|
|
1470
|
+
V && Q();
|
|
1471
|
+
}, Ae = async () => {
|
|
1472
|
+
if (!V) return;
|
|
1473
|
+
let e = P();
|
|
1448
1474
|
if (!e) return;
|
|
1449
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData,
|
|
1475
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: o, minCol: s, maxCol: c } = V, l = [];
|
|
1476
|
+
for (let e = i; e <= o; e++) l.push(e);
|
|
1477
|
+
let u = [];
|
|
1478
|
+
for (let e = s; e <= c; e++) u.push(e);
|
|
1479
|
+
let d = /* @__PURE__ */ new Map(), f = [
|
|
1450
1480
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1451
1481
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1452
1482
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1453
1483
|
].filter(Boolean);
|
|
1454
|
-
for (let e of
|
|
1484
|
+
for (let e of f) e.querySelectorAll(".vxe-body--row").forEach((t) => {
|
|
1455
1485
|
let n = t.getAttribute("rowid");
|
|
1456
|
-
n != null && (
|
|
1486
|
+
n != null && (d.has(n) || d.set(n, []), d.get(n).push({
|
|
1457
1487
|
rowEl: t,
|
|
1458
1488
|
tbody: e
|
|
1459
1489
|
}));
|
|
1460
1490
|
});
|
|
1461
|
-
let
|
|
1462
|
-
|
|
1463
|
-
let i = r[t],
|
|
1464
|
-
|
|
1491
|
+
let p = [];
|
|
1492
|
+
l.forEach((t) => {
|
|
1493
|
+
let i = r[t], o = [];
|
|
1494
|
+
u.forEach((t) => {
|
|
1465
1495
|
let r = n[t];
|
|
1466
1496
|
if (!r) {
|
|
1467
|
-
|
|
1497
|
+
o.push("");
|
|
1468
1498
|
return;
|
|
1469
1499
|
}
|
|
1470
|
-
let
|
|
1500
|
+
let s = "", c = r.field;
|
|
1471
1501
|
if (r.slots && (r.slots.default || r.slots.content)) {
|
|
1472
|
-
let
|
|
1473
|
-
if (
|
|
1474
|
-
let e =
|
|
1475
|
-
for (let { rowEl:
|
|
1476
|
-
let e = Array.from(
|
|
1477
|
-
if (i &&
|
|
1478
|
-
else if (
|
|
1479
|
-
else if (!i && !
|
|
1502
|
+
let o = i ? e.getRowid(i) : null, l = !1;
|
|
1503
|
+
if (o != null && d.has(String(o))) {
|
|
1504
|
+
let e = d.get(String(o)), i = r.fixed === "left", c = r.fixed === "right";
|
|
1505
|
+
for (let { rowEl: o, tbody: u } of e) {
|
|
1506
|
+
let e = Array.from(o.querySelectorAll(".vxe-body--column")), d = null;
|
|
1507
|
+
if (i && u.closest(".vxe-table--fixed-left-wrapper")) d = e[n.filter((e) => e.fixed === "left").indexOf(r)];
|
|
1508
|
+
else if (c && u.closest(".vxe-table--fixed-right-wrapper")) d = e[n.filter((e) => e.fixed === "right").indexOf(r)];
|
|
1509
|
+
else if (!i && !c && u.closest(".vxe-table--body-wrapper")) {
|
|
1480
1510
|
let r = a.searchForm.showCheckBox ? 1 : 0;
|
|
1481
1511
|
d = e[t - n.filter((e) => e.fixed === "left").length + r];
|
|
1482
1512
|
}
|
|
1483
1513
|
if (d && !d.classList.contains("col--checkbox") && !d.classList.contains("col--seq")) {
|
|
1484
|
-
|
|
1514
|
+
s = (d.innerText || d.textContent || "").trim().replace(/\n/g, " ").replace(/\s+/g, " "), l = !0;
|
|
1485
1515
|
break;
|
|
1486
1516
|
}
|
|
1487
1517
|
}
|
|
1488
1518
|
}
|
|
1489
|
-
if (!
|
|
1490
|
-
let e = i[
|
|
1491
|
-
|
|
1519
|
+
if (!l && i && c) {
|
|
1520
|
+
let e = i[c];
|
|
1521
|
+
s = e == null ? "" : String(e);
|
|
1492
1522
|
}
|
|
1493
1523
|
} else if (r.formatter && i) try {
|
|
1494
1524
|
let e = r.formatter({
|
|
1495
|
-
cellValue: i[
|
|
1525
|
+
cellValue: i[c],
|
|
1496
1526
|
row: i,
|
|
1497
1527
|
column: r
|
|
1498
1528
|
});
|
|
1499
|
-
|
|
1529
|
+
s = e == null ? "" : String(e);
|
|
1500
1530
|
} catch {
|
|
1501
|
-
let e = i ? i[
|
|
1502
|
-
|
|
1531
|
+
let e = i ? i[c] : "";
|
|
1532
|
+
s = e == null ? "" : String(e);
|
|
1503
1533
|
}
|
|
1504
|
-
else if (i &&
|
|
1505
|
-
let e = i[
|
|
1506
|
-
|
|
1534
|
+
else if (i && c) {
|
|
1535
|
+
let e = i[c];
|
|
1536
|
+
s = e == null ? "" : String(e);
|
|
1507
1537
|
}
|
|
1508
|
-
|
|
1509
|
-
}),
|
|
1538
|
+
o.push(s);
|
|
1539
|
+
}), p.push(o.join(" "));
|
|
1510
1540
|
});
|
|
1511
|
-
let
|
|
1541
|
+
let m = p.join("\n");
|
|
1512
1542
|
try {
|
|
1513
|
-
await navigator.clipboard.writeText(
|
|
1543
|
+
await navigator.clipboard.writeText(m);
|
|
1514
1544
|
} catch (e) {
|
|
1515
1545
|
console.error("复制失败:", e);
|
|
1516
1546
|
}
|
|
1517
|
-
},
|
|
1518
|
-
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1519
|
-
},
|
|
1520
|
-
|
|
1521
|
-
},
|
|
1522
|
-
let t =
|
|
1523
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1524
|
-
},
|
|
1525
|
-
y[_] = e,
|
|
1526
|
-
},
|
|
1527
|
-
y[v] = e, y[_] = 1,
|
|
1547
|
+
}, je = (e) => {
|
|
1548
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? V && (e.preventDefault(), e.stopPropagation(), Ae()) : e.key === "Escape" && J());
|
|
1549
|
+
}, Me = () => {
|
|
1550
|
+
B.isSelecting = !1, G(), K &&= (cancelAnimationFrame(K), null), document.removeEventListener("mousemove", xe);
|
|
1551
|
+
}, Ne = (e) => {
|
|
1552
|
+
let t = P();
|
|
1553
|
+
!t || !t.$el || t.$el.contains(e.target) || J();
|
|
1554
|
+
}, Pe = (e) => {
|
|
1555
|
+
y[_] = e, L();
|
|
1556
|
+
}, Fe = (e) => {
|
|
1557
|
+
y[v] = e, y[_] = 1, L();
|
|
1528
1558
|
};
|
|
1529
|
-
function
|
|
1559
|
+
function Ie() {
|
|
1530
1560
|
let e = b.value.getCheckboxRecords();
|
|
1531
1561
|
a.searchForm.selections = e;
|
|
1532
1562
|
}
|
|
1533
|
-
let
|
|
1563
|
+
let Le = (e) => {
|
|
1534
1564
|
let t = b.value;
|
|
1535
1565
|
if (t) {
|
|
1536
1566
|
t.toggleCheckboxRow(e);
|
|
@@ -1540,35 +1570,35 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1540
1570
|
};
|
|
1541
1571
|
return t({
|
|
1542
1572
|
tableRef: b,
|
|
1543
|
-
getList:
|
|
1544
|
-
getPrm:
|
|
1545
|
-
clearSort:
|
|
1546
|
-
calculateTableHeight:
|
|
1573
|
+
getList: L,
|
|
1574
|
+
getPrm: ce,
|
|
1575
|
+
clearSort: fe,
|
|
1576
|
+
calculateTableHeight: j
|
|
1547
1577
|
}), (t, n) => {
|
|
1548
|
-
let a =
|
|
1549
|
-
return
|
|
1550
|
-
e.searchForm.showSearch ? (
|
|
1578
|
+
let a = A("el-button"), l = A("el-checkbox"), m = A("el-text"), S = A("vxe-column"), T = A("VxeTable"), ee = A("el-pagination");
|
|
1579
|
+
return E(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1580
|
+
e.searchForm.showSearch ? (E(), u(mt, {
|
|
1551
1581
|
key: 0,
|
|
1552
1582
|
form: e.searchForm,
|
|
1553
|
-
onReset:
|
|
1554
|
-
onConfirm: n[1] ||= (e) =>
|
|
1555
|
-
onVisibleChange:
|
|
1583
|
+
onReset: R,
|
|
1584
|
+
onConfirm: n[1] ||= (e) => L(),
|
|
1585
|
+
onVisibleChange: N(j)
|
|
1556
1586
|
}, {
|
|
1557
|
-
btn:
|
|
1587
|
+
btn: I(() => [
|
|
1558
1588
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1559
|
-
|
|
1589
|
+
k(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1560
1590
|
g(a, {
|
|
1561
1591
|
class: "mgl10",
|
|
1562
1592
|
round: "",
|
|
1563
1593
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1564
1594
|
}, {
|
|
1565
|
-
default:
|
|
1595
|
+
default: I(() => [g(rt, { name: "Tools" })]),
|
|
1566
1596
|
_: 1
|
|
1567
1597
|
})
|
|
1568
1598
|
]),
|
|
1569
1599
|
_: 3
|
|
1570
1600
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1571
|
-
|
|
1601
|
+
k(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1572
1602
|
p("div", {
|
|
1573
1603
|
ref_key: "tableContentRef",
|
|
1574
1604
|
ref: w
|
|
@@ -1579,41 +1609,41 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1579
1609
|
loading: e.loading || o.value,
|
|
1580
1610
|
data: e.api ? s.value : e.data,
|
|
1581
1611
|
border: ""
|
|
1582
|
-
},
|
|
1583
|
-
height:
|
|
1584
|
-
onCheckboxChange:
|
|
1585
|
-
onCheckboxAll:
|
|
1586
|
-
onSortChange:
|
|
1587
|
-
onScroll:
|
|
1612
|
+
}, he.value, {
|
|
1613
|
+
height: ie.value,
|
|
1614
|
+
onCheckboxChange: Ie,
|
|
1615
|
+
onCheckboxAll: Ie,
|
|
1616
|
+
onSortChange: he.value["sort-config"]?.sortChange,
|
|
1617
|
+
onScroll: ke
|
|
1588
1618
|
}), {
|
|
1589
|
-
default:
|
|
1619
|
+
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (E(), u(S, {
|
|
1590
1620
|
key: 0,
|
|
1591
1621
|
type: "checkbox",
|
|
1592
|
-
width:
|
|
1622
|
+
width: N(r) == "zh_cn" ? 80 : 150,
|
|
1593
1623
|
title: t.$t("xu-hao"),
|
|
1594
1624
|
fixed: "left"
|
|
1595
1625
|
}, {
|
|
1596
|
-
checkbox:
|
|
1626
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", bt, [n ? (E(), u(l, {
|
|
1597
1627
|
key: 0,
|
|
1598
1628
|
checked: !0,
|
|
1599
1629
|
disabled: r,
|
|
1600
1630
|
size: "default",
|
|
1601
|
-
onClick:
|
|
1602
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1631
|
+
onClick: oe((e) => !r && Le(t), ["stop"])
|
|
1632
|
+
}, null, 8, ["disabled", "onClick"])) : (E(), u(l, {
|
|
1603
1633
|
key: 1,
|
|
1604
1634
|
disabled: r,
|
|
1605
1635
|
checked: !1,
|
|
1606
1636
|
size: "default",
|
|
1607
|
-
onClick:
|
|
1637
|
+
onClick: oe((e) => !r && Le(t), ["stop"])
|
|
1608
1638
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1609
1639
|
type: "info",
|
|
1610
1640
|
class: "mgl5"
|
|
1611
1641
|
}, {
|
|
1612
|
-
default:
|
|
1642
|
+
default: I(() => [h(M(e + 1), 1)]),
|
|
1613
1643
|
_: 2
|
|
1614
1644
|
}, 1024)])]),
|
|
1615
1645
|
_: 1
|
|
1616
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1646
|
+
}, 8, ["width", "title"])) : d("", !0), k(t.$slots, "default", {}, void 0, !0)]),
|
|
1617
1647
|
_: 3
|
|
1618
1648
|
}, 16, [
|
|
1619
1649
|
"id",
|
|
@@ -1622,18 +1652,18 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1622
1652
|
"height",
|
|
1623
1653
|
"onSortChange"
|
|
1624
1654
|
])], 512),
|
|
1625
|
-
e.searchForm.showPage ? (
|
|
1655
|
+
e.searchForm.showPage ? (E(), u(ee, {
|
|
1626
1656
|
key: 1,
|
|
1627
|
-
"current-page": y[
|
|
1628
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1657
|
+
"current-page": y[N(_)],
|
|
1658
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[N(_)] = e,
|
|
1629
1659
|
class: "myPagination mgt10",
|
|
1630
1660
|
background: "",
|
|
1631
1661
|
layout: "total, sizes, prev, pager, next",
|
|
1632
1662
|
total: y.total,
|
|
1633
|
-
"page-size": y[
|
|
1634
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1635
|
-
onCurrentChange:
|
|
1636
|
-
onSizeChange:
|
|
1663
|
+
"page-size": y[N(v)],
|
|
1664
|
+
"page-sizes": e.searchForm.pageSizes || N(i).pageSizes,
|
|
1665
|
+
onCurrentChange: Pe,
|
|
1666
|
+
onSizeChange: Fe
|
|
1637
1667
|
}, null, 8, [
|
|
1638
1668
|
"current-page",
|
|
1639
1669
|
"total",
|
|
@@ -1643,7 +1673,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1643
1673
|
], 2);
|
|
1644
1674
|
};
|
|
1645
1675
|
}
|
|
1646
|
-
}, [["__scopeId", "data-v-
|
|
1676
|
+
}, [["__scopeId", "data-v-696a9918"]]), Tt = {
|
|
1647
1677
|
__name: "index",
|
|
1648
1678
|
props: {
|
|
1649
1679
|
sheetsConfig: {
|
|
@@ -1665,12 +1695,12 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1665
1695
|
Re(t.fileName + (t.version ? `__v${t.version}` : ""), t.sheetsConfig);
|
|
1666
1696
|
}
|
|
1667
1697
|
return (e, t) => {
|
|
1668
|
-
let r =
|
|
1669
|
-
return
|
|
1698
|
+
let r = A("el-link");
|
|
1699
|
+
return E(), u(r, x({
|
|
1670
1700
|
type: "primary",
|
|
1671
1701
|
underline: "never"
|
|
1672
1702
|
}, e.$attrs, { onClick: n }), {
|
|
1673
|
-
default:
|
|
1703
|
+
default: I(() => [k(e.$slots, "default", {}, () => [h(M(e.$t("xia-zai-dao-ru-mo-ban")), 1)])]),
|
|
1674
1704
|
_: 3
|
|
1675
1705
|
}, 16);
|
|
1676
1706
|
};
|
|
@@ -1777,7 +1807,7 @@ var kt = {
|
|
|
1777
1807
|
},
|
|
1778
1808
|
emits: ["confirm"],
|
|
1779
1809
|
setup(e, { emit: t }) {
|
|
1780
|
-
let n = e, r = t, { t: i } =
|
|
1810
|
+
let n = e, r = t, { t: i } = z(), o = ue(() => {
|
|
1781
1811
|
r("confirm");
|
|
1782
1812
|
}, 300);
|
|
1783
1813
|
async function s() {
|
|
@@ -1788,8 +1818,8 @@ var kt = {
|
|
|
1788
1818
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1789
1819
|
}
|
|
1790
1820
|
return (t, n) => {
|
|
1791
|
-
let r =
|
|
1792
|
-
return e.layer.type ? (
|
|
1821
|
+
let r = A("el-button"), i = A("el-drawer"), a = A("el-dialog");
|
|
1822
|
+
return e.layer.type ? (E(), u(i, {
|
|
1793
1823
|
key: 0,
|
|
1794
1824
|
modelValue: e.layer.show,
|
|
1795
1825
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1800,18 +1830,18 @@ var kt = {
|
|
|
1800
1830
|
"before-close": s,
|
|
1801
1831
|
class: "drawer-content"
|
|
1802
1832
|
}, {
|
|
1803
|
-
default:
|
|
1804
|
-
|
|
1833
|
+
default: I(() => [
|
|
1834
|
+
k(t.$slots, "default"),
|
|
1805
1835
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1806
|
-
e.layer.showButton ? (
|
|
1807
|
-
default:
|
|
1836
|
+
e.layer.showButton ? (E(), f("div", kt, [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1837
|
+
default: I(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1808
1838
|
_: 1
|
|
1809
1839
|
}), g(r, {
|
|
1810
1840
|
type: "primary",
|
|
1811
1841
|
loading: e.loading,
|
|
1812
|
-
onClick:
|
|
1842
|
+
onClick: N(o)
|
|
1813
1843
|
}, {
|
|
1814
|
-
default:
|
|
1844
|
+
default: I(() => [h(M(t.$t("ti-jiao")), 1)]),
|
|
1815
1845
|
_: 1
|
|
1816
1846
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1817
1847
|
]),
|
|
@@ -1820,7 +1850,7 @@ var kt = {
|
|
|
1820
1850
|
"modelValue",
|
|
1821
1851
|
"size",
|
|
1822
1852
|
"title"
|
|
1823
|
-
])) :
|
|
1853
|
+
])) : ie((E(), f("div", At, [g(a, {
|
|
1824
1854
|
"close-on-click-modal": !1,
|
|
1825
1855
|
modelValue: e.layer.show,
|
|
1826
1856
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1828,18 +1858,18 @@ var kt = {
|
|
|
1828
1858
|
width: e.layer.width || 500,
|
|
1829
1859
|
center: ""
|
|
1830
1860
|
}, m({
|
|
1831
|
-
default:
|
|
1861
|
+
default: I(() => [k(t.$slots, "default")]),
|
|
1832
1862
|
_: 2
|
|
1833
1863
|
}, [e.layer.showButton ? {
|
|
1834
1864
|
name: "footer",
|
|
1835
|
-
fn:
|
|
1836
|
-
default:
|
|
1865
|
+
fn: I(() => [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1866
|
+
default: I(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1837
1867
|
_: 1
|
|
1838
1868
|
}), g(r, {
|
|
1839
1869
|
type: "primary",
|
|
1840
|
-
onClick:
|
|
1870
|
+
onClick: N(o)
|
|
1841
1871
|
}, {
|
|
1842
|
-
default:
|
|
1872
|
+
default: I(() => [h(M(t.$t("ti-jiao")), 1)]),
|
|
1843
1873
|
_: 1
|
|
1844
1874
|
}, 8, ["onClick"])])]),
|
|
1845
1875
|
key: "0"
|
|
@@ -1847,7 +1877,7 @@ var kt = {
|
|
|
1847
1877
|
"modelValue",
|
|
1848
1878
|
"title",
|
|
1849
1879
|
"width"
|
|
1850
|
-
])])), [[
|
|
1880
|
+
])])), [[N(Et), e.layer.show]]);
|
|
1851
1881
|
};
|
|
1852
1882
|
}
|
|
1853
1883
|
};
|
|
@@ -2043,7 +2073,7 @@ function Lt(e, t = {}) {
|
|
|
2043
2073
|
log: !1,
|
|
2044
2074
|
params: null,
|
|
2045
2075
|
format: null
|
|
2046
|
-
}, t), s =
|
|
2076
|
+
}, t), s = O([]), c = O(!1), l = (t) => {
|
|
2047
2077
|
let n = t || i;
|
|
2048
2078
|
c.value = !0, e(n).then((e) => {
|
|
2049
2079
|
let { code: t, data: c, msg: l } = e;
|
|
@@ -2071,8 +2101,8 @@ function Lt(e, t = {}) {
|
|
|
2071
2101
|
];
|
|
2072
2102
|
}
|
|
2073
2103
|
function Rt(e) {
|
|
2074
|
-
let t =
|
|
2075
|
-
return
|
|
2104
|
+
let t = O(e), n = O(""), r = O("");
|
|
2105
|
+
return F(t, (e) => {
|
|
2076
2106
|
let t = e || ["", ""];
|
|
2077
2107
|
n.value = t[0], r.value = t[1];
|
|
2078
2108
|
}), [
|
|
@@ -2096,8 +2126,8 @@ function Bt(e, t) {
|
|
|
2096
2126
|
//#endregion
|
|
2097
2127
|
//#region src/utils/hook/i18n.js
|
|
2098
2128
|
function Vt(e, t = []) {
|
|
2099
|
-
let { locale: n } =
|
|
2100
|
-
return
|
|
2129
|
+
let { locale: n } = z(), r = O(e());
|
|
2130
|
+
return F([n, ...t], () => {
|
|
2101
2131
|
r.value = e();
|
|
2102
2132
|
}, { immediate: !0 }), r;
|
|
2103
2133
|
}
|
|
@@ -2110,25 +2140,25 @@ function Ht(e, t = "zh_cn", n = "en_us") {
|
|
|
2110
2140
|
//#endregion
|
|
2111
2141
|
//#region src/utils/hook/storeHook.js
|
|
2112
2142
|
function Ut(e, t) {
|
|
2113
|
-
let n =
|
|
2114
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2143
|
+
let n = he;
|
|
2144
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapState), Kt(t, n);
|
|
2115
2145
|
}
|
|
2116
2146
|
function Wt(e, t) {
|
|
2117
|
-
let n =
|
|
2118
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2147
|
+
let n = me;
|
|
2148
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapGetters), Kt(t, n);
|
|
2119
2149
|
}
|
|
2120
2150
|
function Gt(e, t) {
|
|
2121
|
-
let n =
|
|
2122
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2151
|
+
let n = pe;
|
|
2152
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapActions), qt(t, n);
|
|
2123
2153
|
}
|
|
2124
2154
|
function Kt(e, t) {
|
|
2125
|
-
let n =
|
|
2155
|
+
let n = B(), r = t(e), i = {};
|
|
2126
2156
|
return Object.keys(r).forEach((e) => {
|
|
2127
2157
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2128
2158
|
}), i;
|
|
2129
2159
|
}
|
|
2130
2160
|
function qt(e, t) {
|
|
2131
|
-
let n =
|
|
2161
|
+
let n = B(), r = t(e), i = {};
|
|
2132
2162
|
return Object.keys(r).forEach((e) => {
|
|
2133
2163
|
i[e] = r[e].bind({ $store: n });
|
|
2134
2164
|
}), i;
|
|
@@ -2140,13 +2170,13 @@ var Jt = {
|
|
|
2140
2170
|
props: { fontColor: String },
|
|
2141
2171
|
setup(e) {
|
|
2142
2172
|
return (t, n) => {
|
|
2143
|
-
let r =
|
|
2144
|
-
return
|
|
2173
|
+
let r = A("el-tag");
|
|
2174
|
+
return E(), u(r, x(t.$attrs, { style: {
|
|
2145
2175
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
2146
2176
|
color: e.fontColor,
|
|
2147
2177
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
2148
2178
|
} }), {
|
|
2149
|
-
default:
|
|
2179
|
+
default: I(() => [k(t.$slots, "default")]),
|
|
2150
2180
|
_: 3
|
|
2151
2181
|
}, 16, ["style"]);
|
|
2152
2182
|
};
|
|
@@ -2158,18 +2188,18 @@ function Yt(e) {
|
|
|
2158
2188
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2159
2189
|
}
|
|
2160
2190
|
function Xt() {
|
|
2161
|
-
|
|
2191
|
+
V.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2162
2192
|
return Pt(e, t);
|
|
2163
|
-
} }),
|
|
2193
|
+
} }), V.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2164
2194
|
return Ft(e, t);
|
|
2165
|
-
} }),
|
|
2195
|
+
} }), V.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2166
2196
|
return It(e, t);
|
|
2167
2197
|
} });
|
|
2168
2198
|
}
|
|
2169
2199
|
function Zt() {
|
|
2170
|
-
|
|
2200
|
+
V.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2171
2201
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2172
|
-
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } =
|
|
2202
|
+
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;
|
|
2173
2203
|
return e.type == "tag" ? o ? g(Jt, { fontColor: o }, { default: () => [
|
|
2174
2204
|
h(" "),
|
|
2175
2205
|
c,
|
|
@@ -2178,16 +2208,16 @@ function Zt() {
|
|
|
2178
2208
|
h(" "),
|
|
2179
2209
|
c,
|
|
2180
2210
|
h(" ")
|
|
2181
|
-
] }) : e.type == "text" ? g(
|
|
2211
|
+
] }) : e.type == "text" ? g(A("el-text"), { type: a }, { default: () => [
|
|
2182
2212
|
h(" "),
|
|
2183
2213
|
c,
|
|
2184
2214
|
h(" ")
|
|
2185
|
-
] }) : g(
|
|
2215
|
+
] }) : g(A("el-text"), null, { default: () => [
|
|
2186
2216
|
h(" "),
|
|
2187
2217
|
c,
|
|
2188
2218
|
h(" ")
|
|
2189
2219
|
] });
|
|
2190
|
-
} }),
|
|
2220
|
+
} }), V.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2191
2221
|
return g(n, x({
|
|
2192
2222
|
modelValue: t.row[t.column.field],
|
|
2193
2223
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2195,14 +2225,14 @@ function Zt() {
|
|
|
2195
2225
|
"step-strictly": !0,
|
|
2196
2226
|
"value-on-clear": 0
|
|
2197
2227
|
}), null);
|
|
2198
|
-
} }),
|
|
2199
|
-
let { locale: n } =
|
|
2228
|
+
} }), V.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2229
|
+
let { locale: n } = z(), r = n.value == "zh_cn";
|
|
2200
2230
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2201
|
-
} }),
|
|
2202
|
-
let { locale: n } =
|
|
2231
|
+
} }), V.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2232
|
+
let { locale: n } = z(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2203
2233
|
return t.row[r] || t.row[t.column.field];
|
|
2204
|
-
} }),
|
|
2205
|
-
let n = t.column.field, i =
|
|
2234
|
+
} }), V.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2235
|
+
let n = t.column.field, i = ge(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2206
2236
|
function l(e, t) {
|
|
2207
2237
|
s == "blank" ? window.open(e) : i.push({
|
|
2208
2238
|
path: e,
|
|
@@ -2228,4 +2258,4 @@ function Qt() {
|
|
|
2228
2258
|
Xt(), Zt();
|
|
2229
2259
|
}
|
|
2230
2260
|
//#endregion
|
|
2231
|
-
export { et as CmpDictionary, rt as CmpIcon, at as ConfrimButton, Tt as DownExcelTemp, ct as ImportButton,
|
|
2261
|
+
export { et as CmpDictionary, rt as CmpIcon, at as ConfrimButton, Tt as DownExcelTemp, ct as ImportButton, G as LayOutForm, jt as Layer, wt as ListPage, Nt as OnePortalCasSDK, mt as SearchBar, Ge as StatusMap, He as _toRaw, zt as _typeOf, Ke as arrToStatusMap, Ue as arrayToTree, Ye as checkFileSize, Mt as creatValidator, Ze as createImportFields, Xe as createListPageId, J as en_us, ke as exportExcel, Re as exportExcelMuilti, Ft as formatMoney, Pt as formatNumber, It as formatPercent, Z as getI18n, Q as getI18nT, vt as getListPageConfig, Ht as getLocaleValue, Qe as getValueBykey, De as importExcel, Ie as importExcelMuilti, Ee as messages, Xt as registerVxeFormatters, Qt as registerVxePlugins, Zt as registerVxeRenderers, yt as resetListPageConfig, _t as setListPageConfig, X as setupI18n, Ve as sleep, We as stringToArray, qe as stripHtmlTags, Je as unicode2Str, Gt as useActions, Rt as useDatePicker, Wt as useGetters, Vt as useI18nReState, Lt as useRequest, Ut as useState, q as zh_cn };
|