joy-admin-components 0.2.99 → 0.2.101
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 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
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as ce, useI18n 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, resolveDirective as re, resolveDynamicComponent as j, toDisplayString as M, unref as N, useAttrs as ie, useModel as P, watch as F, withCtx as I, withDirectives as ae, withKeys as oe, withModifiers as se } from "vue";
|
|
3
|
+
import { saveAs as L } from "file-saver";
|
|
4
|
+
import R from "exceljs";
|
|
5
|
+
import z from "dayjs";
|
|
6
|
+
import { createI18n as ce, useI18n as B } from "vue-i18n";
|
|
7
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
|
|
8
|
+
import { createNamespacedHelpers as fe, mapActions as pe, mapGetters as me, mapState as he, useStore as ge } from "vuex";
|
|
9
9
|
import { VxeUI as V } from "vxe-pc-ui";
|
|
10
|
-
import { useRouter as
|
|
10
|
+
import { useRouter as H } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
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], !
|
|
12
|
+
var _e = Object.create, U = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, ye = Object.getOwnPropertyNames, be = Object.getPrototypeOf, xe = Object.prototype.hasOwnProperty, W = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), G = (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], !xe.call(e, s) && s !== n && U(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
15
|
enumerable: !(r = ve(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, K = (e, t, n) => (n = e == null ? {} : _e(be(e)), G(t || !e || !e.__esModule ? U(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), Se = _({
|
|
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 H = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), q = /* @__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 H = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), Ce = /* @__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 H = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), we = /* @__PURE__ */ K(q()), J = /* @__PURE__ */ K(Ce()), Y = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -224,7 +224,7 @@ var H = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDes
|
|
|
224
224
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
227
|
+
}, X = {
|
|
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 H = Object.create, _e = 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
|
-
},
|
|
259
|
-
function
|
|
255
|
+
}, Z = {
|
|
256
|
+
zh_cn: Y,
|
|
257
|
+
en_us: X
|
|
258
|
+
}, Te = null;
|
|
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", Y) : t.setLocaleMessage("zh_cn", Y), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", X) : t.setLocaleMessage("en_us", X), Te = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return Te ||= ce({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
270
|
-
}
|
|
271
|
-
function Z() {
|
|
272
|
-
return Y || X();
|
|
268
|
+
messages: Z
|
|
269
|
+
}), Te;
|
|
273
270
|
}
|
|
274
271
|
function Q() {
|
|
275
|
-
return
|
|
272
|
+
return Te || Ee();
|
|
273
|
+
}
|
|
274
|
+
function $() {
|
|
275
|
+
return Q().global.t;
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
z.extend(we.default), z.extend(J.default);
|
|
278
278
|
async function De(e, t) {
|
|
279
279
|
let { fields: n, range: r = 1 } = t;
|
|
280
280
|
if (!n) {
|
|
281
|
-
let e =
|
|
281
|
+
let e = $();
|
|
282
282
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
283
283
|
}
|
|
284
|
-
let i = new
|
|
284
|
+
let i = new R.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
|
+
L(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 R.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")
|
|
@@ -384,10 +384,10 @@ var Fe = "---";
|
|
|
384
384
|
async function Ie(e, t) {
|
|
385
385
|
let { fields: n, range: r = 1 } = t;
|
|
386
386
|
if (!n) {
|
|
387
|
-
let e =
|
|
387
|
+
let e = $();
|
|
388
388
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
389
389
|
}
|
|
390
|
-
let i = new
|
|
390
|
+
let i = new R.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 ? z(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;
|
|
@@ -441,7 +441,7 @@ async function Re(e, t) {
|
|
|
441
441
|
let t = n.addWorksheet(a);
|
|
442
442
|
t.state = "hidden", u ||= (e) => `${e.label}${Fe}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
443
443
|
if (n > 0) {
|
|
444
|
-
let t =
|
|
444
|
+
let t = $();
|
|
445
445
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
446
446
|
type: "list",
|
|
447
447
|
formulae: [`${a}!$A$1:$A$${s.length}`],
|
|
@@ -460,13 +460,13 @@ async function Re(e, t) {
|
|
|
460
460
|
}
|
|
461
461
|
try {
|
|
462
462
|
let t = await n.xlsx.writeBuffer();
|
|
463
|
-
|
|
463
|
+
L(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 =
|
|
469
|
+
let t = $(), n = new R.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,16 +508,19 @@ 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 "-";
|
|
520
|
-
let t =
|
|
523
|
+
let t = Q().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
521
524
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
522
525
|
}
|
|
523
526
|
getTag(e) {
|
|
@@ -536,11 +539,17 @@ 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([]);
|
|
542
551
|
if (t.length < 2) {
|
|
543
|
-
let e =
|
|
552
|
+
let e = $();
|
|
544
553
|
throw Error(e("tools.keysLengthError"));
|
|
545
554
|
}
|
|
546
555
|
return new Ge(e.map((e) => {
|
|
@@ -575,11 +584,11 @@ function Qe(e, t) {
|
|
|
575
584
|
}
|
|
576
585
|
//#endregion
|
|
577
586
|
//#region \0plugin-vue:export-helper
|
|
578
|
-
var $ = (e, t) => {
|
|
587
|
+
var $e = (e, t) => {
|
|
579
588
|
let n = e.__vccOpts || e;
|
|
580
589
|
for (let [e, r] of t) n[e] = r;
|
|
581
590
|
return n;
|
|
582
|
-
},
|
|
591
|
+
}, et = ["onClick"], tt = /* @__PURE__ */ $e({
|
|
583
592
|
__name: "index",
|
|
584
593
|
props: /* @__PURE__ */ b({
|
|
585
594
|
api: { type: Function },
|
|
@@ -622,7 +631,7 @@ var $ = (e, t) => {
|
|
|
622
631
|
"changeAll"
|
|
623
632
|
], ["update:modelValue"]),
|
|
624
633
|
setup(e, { emit: t }) {
|
|
625
|
-
let n = e, r =
|
|
634
|
+
let n = e, r = ie(), { t: i, locale: a } = B(), 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;
|
|
@@ -658,7 +667,7 @@ var $ = (e, t) => {
|
|
|
658
667
|
function te(e) {
|
|
659
668
|
T.value = e;
|
|
660
669
|
}
|
|
661
|
-
let D = n.labelValue.label.split("-"),
|
|
670
|
+
let D = n.labelValue.label.split("-"), re = (e) => {
|
|
662
671
|
if (D.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];
|
|
@@ -670,7 +679,7 @@ var $ = (e, t) => {
|
|
|
670
679
|
}), t.join("-");
|
|
671
680
|
}
|
|
672
681
|
};
|
|
673
|
-
function
|
|
682
|
+
function j(e) {
|
|
674
683
|
let t = n.data ? n.data : C.value;
|
|
675
684
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
676
685
|
b("change", o.value), b("changeAll", o.value, t);
|
|
@@ -681,14 +690,14 @@ var $ = (e, t) => {
|
|
|
681
690
|
n.optionClick && n.optionClick(e);
|
|
682
691
|
});
|
|
683
692
|
}
|
|
684
|
-
function
|
|
693
|
+
function oe(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
697
|
function L(e) {
|
|
689
698
|
return e.map((e) => ({
|
|
690
699
|
...e,
|
|
691
|
-
label:
|
|
700
|
+
label: re(e),
|
|
692
701
|
value: s.value ? e : e[n.labelValue.value]
|
|
693
702
|
}));
|
|
694
703
|
}
|
|
@@ -705,9 +714,9 @@ var $ = (e, t) => {
|
|
|
705
714
|
e && (R.value = t);
|
|
706
715
|
}
|
|
707
716
|
}, { deep: !0 });
|
|
708
|
-
let
|
|
717
|
+
let z = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? R.value.map((e) => ({
|
|
709
718
|
...e,
|
|
710
|
-
disabled:
|
|
719
|
+
disabled: oe(e)
|
|
711
720
|
})) : R.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");
|
|
@@ -725,15 +734,15 @@ var $ = (e, t) => {
|
|
|
725
734
|
class: "mgl20",
|
|
726
735
|
modelValue: y.value,
|
|
727
736
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
728
|
-
onChange:
|
|
737
|
+
onChange: j
|
|
729
738
|
}, {
|
|
730
739
|
default: I(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
731
740
|
_: 1
|
|
732
741
|
}, 8, ["modelValue"])], !0) : d("", !0), (E(!0), f(c, null, ne(v.value, (t, n) => (E(), u(l, {
|
|
733
742
|
key: n,
|
|
734
|
-
label:
|
|
735
|
-
disabled: N(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ?
|
|
736
|
-
onClick:
|
|
743
|
+
label: re(t),
|
|
744
|
+
disabled: N(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? oe(t) : !1,
|
|
745
|
+
onClick: se((e) => ae(t), ["stop"]),
|
|
737
746
|
value: s.value ? t : t[e.labelValue.value]
|
|
738
747
|
}, null, 8, [
|
|
739
748
|
"label",
|
|
@@ -744,7 +753,7 @@ var $ = (e, t) => {
|
|
|
744
753
|
_: 3
|
|
745
754
|
}, 16, ["modelValue", "filter-method"])) : (E(), u(a, x({
|
|
746
755
|
key: 0,
|
|
747
|
-
options:
|
|
756
|
+
options: z.value,
|
|
748
757
|
modelValue: o.value,
|
|
749
758
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
750
759
|
}, N(r), {
|
|
@@ -754,7 +763,7 @@ var $ = (e, t) => {
|
|
|
754
763
|
clearable: "",
|
|
755
764
|
onChange: w
|
|
756
765
|
}), m({
|
|
757
|
-
default: I(({ item: e }) => [p("div", { onClick: (t) => te(e) }, M(e.label), 9,
|
|
766
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => te(e) }, M(e.label), 9, et)]),
|
|
758
767
|
_: 2
|
|
759
768
|
}, [N(r).multiple == null ? void 0 : {
|
|
760
769
|
name: "header",
|
|
@@ -762,7 +771,7 @@ var $ = (e, t) => {
|
|
|
762
771
|
class: "mgl20",
|
|
763
772
|
modelValue: y.value,
|
|
764
773
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
765
|
-
onChange:
|
|
774
|
+
onChange: j
|
|
766
775
|
}, {
|
|
767
776
|
default: I(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
768
777
|
_: 1
|
|
@@ -771,18 +780,18 @@ var $ = (e, t) => {
|
|
|
771
780
|
}]), 1040, ["options", "modelValue"]));
|
|
772
781
|
};
|
|
773
782
|
}
|
|
774
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
783
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), nt = _({ props: { name: {
|
|
775
784
|
tyepe: String,
|
|
776
785
|
required: !0
|
|
777
786
|
} } });
|
|
778
|
-
function
|
|
787
|
+
function rt(e, t, n, r, i, a) {
|
|
779
788
|
let o = A("el-icon");
|
|
780
789
|
return E(), u(o, { class: "cmp-icon" }, {
|
|
781
790
|
default: I(() => [(E(), u(j(e.name)))]),
|
|
782
791
|
_: 1
|
|
783
792
|
});
|
|
784
793
|
}
|
|
785
|
-
var
|
|
794
|
+
var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"]]), at = { class: "confirm-button-wrapper" }, ot = /* @__PURE__ */ $e({
|
|
786
795
|
__name: "index",
|
|
787
796
|
emits: ["ok", "no"],
|
|
788
797
|
setup(e, { emit: t }) {
|
|
@@ -794,7 +803,7 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
794
803
|
}
|
|
795
804
|
return (e, t) => {
|
|
796
805
|
let n = A("el-popconfirm");
|
|
797
|
-
return E(), f("span",
|
|
806
|
+
return E(), f("span", at, [g(n, x(e.$attrs, {
|
|
798
807
|
onConfirm: N(r),
|
|
799
808
|
onCancel: i
|
|
800
809
|
}), {
|
|
@@ -803,7 +812,7 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
803
812
|
}, 16, ["onConfirm"])]);
|
|
804
813
|
};
|
|
805
814
|
}
|
|
806
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
815
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), st = { class: "ImportButton" }, ct = ["accept"], lt = /* @__PURE__ */ $e({
|
|
807
816
|
__name: "index",
|
|
808
817
|
props: {
|
|
809
818
|
accept: {
|
|
@@ -824,7 +833,7 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
824
833
|
}
|
|
825
834
|
},
|
|
826
835
|
setup(e) {
|
|
827
|
-
let { t } =
|
|
836
|
+
let { t } = B(), 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,7 +859,7 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
850
859
|
}
|
|
851
860
|
return (t, n) => {
|
|
852
861
|
let i = A("el-button");
|
|
853
|
-
return E(), f("div",
|
|
862
|
+
return E(), f("div", st, [g(i, x({
|
|
854
863
|
type: "primary",
|
|
855
864
|
loading: a.value,
|
|
856
865
|
class: "mgr10",
|
|
@@ -870,27 +879,27 @@ var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]
|
|
|
870
879
|
opacity: "0"
|
|
871
880
|
},
|
|
872
881
|
type: "file"
|
|
873
|
-
}, null, 40,
|
|
882
|
+
}, null, 40, ct)]);
|
|
874
883
|
};
|
|
875
884
|
}
|
|
876
885
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
877
886
|
//#endregion
|
|
878
887
|
//#region src/components/SearchBar/tools.js
|
|
879
|
-
function
|
|
888
|
+
function ut(e) {
|
|
880
889
|
let t = {};
|
|
881
890
|
return e.forEach((e) => {
|
|
882
891
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date" } = 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 = z(i).format("YYYY-MM-DD 00:00:00"), s = z(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
887
896
|
} else t[n] = a;
|
|
888
897
|
else t[n] = a;
|
|
889
898
|
}), t;
|
|
890
899
|
}
|
|
891
900
|
//#endregion
|
|
892
901
|
//#region src/components/SearchBar/index.vue
|
|
893
|
-
var
|
|
902
|
+
var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { class: "right" }, ht = /* @__PURE__ */ $e({
|
|
894
903
|
__name: "index",
|
|
895
904
|
props: { form: {
|
|
896
905
|
type: Object,
|
|
@@ -902,7 +911,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { 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 } = B(), m = {
|
|
906
915
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
907
916
|
daterange: "YYYY-MM-DD",
|
|
908
917
|
month: "YYYY-MM"
|
|
@@ -920,7 +929,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
920
929
|
i("confirm");
|
|
921
930
|
}
|
|
922
931
|
function T() {
|
|
923
|
-
return
|
|
932
|
+
return ut(r.form.items);
|
|
924
933
|
}
|
|
925
934
|
let ee = le(r.form.items);
|
|
926
935
|
function te() {
|
|
@@ -936,7 +945,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
936
945
|
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
946
|
return E(), f("div", {
|
|
938
947
|
class: "searchBar-container mgt10 mgb10",
|
|
939
|
-
onKeydown:
|
|
948
|
+
onKeydown: oe(v, ["enter"])
|
|
940
949
|
}, [p("div", {
|
|
941
950
|
class: "searchBar",
|
|
942
951
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -944,7 +953,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
944
953
|
inline: "",
|
|
945
954
|
model: e.form.data
|
|
946
955
|
}, {
|
|
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",
|
|
956
|
+
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", dt)) : (E(), u(l, {
|
|
948
957
|
key: 1,
|
|
949
958
|
label: e.name
|
|
950
959
|
}, {
|
|
@@ -962,7 +971,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
962
971
|
"class",
|
|
963
972
|
"placeholder"
|
|
964
973
|
])) : e.type === "custom" ? (E(), u(j(e.render), { key: 1 })) : d("", !0),
|
|
965
|
-
e.type === "select" ? (E(), u(
|
|
974
|
+
e.type === "select" ? (E(), u(tt, x({
|
|
966
975
|
key: 2,
|
|
967
976
|
class: e.option?.class || "w150",
|
|
968
977
|
modelValue: e.value,
|
|
@@ -1009,7 +1018,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1009
1018
|
_: 2
|
|
1010
1019
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1011
1020
|
_: 1
|
|
1012
|
-
}, 8, ["model"])], 4), p("div",
|
|
1021
|
+
}, 8, ["model"])], 4), p("div", ft, [p("div", pt, [k(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", mt, [
|
|
1013
1022
|
g(ee, {
|
|
1014
1023
|
underline: "never",
|
|
1015
1024
|
class: "mgr10",
|
|
@@ -1017,7 +1026,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1017
1026
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1018
1027
|
}
|
|
1019
1028
|
}, {
|
|
1020
|
-
default: I(() => [g(
|
|
1029
|
+
default: I(() => [g(it, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + M(_.value), 1)]),
|
|
1021
1030
|
_: 1
|
|
1022
1031
|
}),
|
|
1023
1032
|
g(te, {
|
|
@@ -1038,7 +1047,7 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1038
1047
|
])])], 32);
|
|
1039
1048
|
};
|
|
1040
1049
|
}
|
|
1041
|
-
}, [["__scopeId", "data-v-db6f71dd"]]),
|
|
1050
|
+
}, [["__scopeId", "data-v-db6f71dd"]]), gt = {
|
|
1042
1051
|
pageNoKey: "pageNo",
|
|
1043
1052
|
pageSizeKey: "pageSize",
|
|
1044
1053
|
totalKey: "total",
|
|
@@ -1062,26 +1071,26 @@ var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { clas
|
|
|
1062
1071
|
showShadow: !1,
|
|
1063
1072
|
showCheckBox: !1,
|
|
1064
1073
|
enableCellCopy: !0
|
|
1065
|
-
},
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1068
|
-
...
|
|
1074
|
+
}, _t = { ...gt };
|
|
1075
|
+
function vt(e) {
|
|
1076
|
+
_t = {
|
|
1077
|
+
..._t,
|
|
1069
1078
|
...e,
|
|
1070
1079
|
responseDataKeys: {
|
|
1071
|
-
...
|
|
1080
|
+
..._t.responseDataKeys,
|
|
1072
1081
|
...e.responseDataKeys || {}
|
|
1073
1082
|
}
|
|
1074
1083
|
};
|
|
1075
1084
|
}
|
|
1076
|
-
function vt() {
|
|
1077
|
-
return gt;
|
|
1078
|
-
}
|
|
1079
1085
|
function yt() {
|
|
1080
|
-
|
|
1086
|
+
return _t;
|
|
1087
|
+
}
|
|
1088
|
+
function bt() {
|
|
1089
|
+
_t = { ...gt };
|
|
1081
1090
|
}
|
|
1082
1091
|
//#endregion
|
|
1083
1092
|
//#region src/components/ListPage/index.vue
|
|
1084
|
-
var
|
|
1093
|
+
var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e({
|
|
1085
1094
|
__name: "index",
|
|
1086
1095
|
props: {
|
|
1087
1096
|
id: {
|
|
@@ -1111,7 +1120,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1111
1120
|
}
|
|
1112
1121
|
},
|
|
1113
1122
|
setup(e, { expose: t }) {
|
|
1114
|
-
let { t: n, locale: r } =
|
|
1123
|
+
let { t: n, locale: r } = B(), 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";
|
|
@@ -1126,7 +1135,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1126
1135
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1127
1136
|
ne.value = Math.max(t, 200);
|
|
1128
1137
|
});
|
|
1129
|
-
}, 100),
|
|
1138
|
+
}, 100), ie = () => {
|
|
1130
1139
|
j();
|
|
1131
1140
|
}, P = () => {
|
|
1132
1141
|
if (b.value) return b.value;
|
|
@@ -1141,12 +1150,12 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
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", we), t.removeEventListener("mousemove",
|
|
1153
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", we), t.removeEventListener("mousemove", Y), t.removeEventListener("mouseup", X), t.removeEventListener("keydown", Me), t.addEventListener("mousedown", we), t.addEventListener("mousemove", Y), t.addEventListener("mouseup", X), t.addEventListener("keydown", Me);
|
|
1145
1154
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1146
|
-
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll",
|
|
1155
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", Ae), n.addEventListener("scroll", Ae), n.__cellCopyScrollBound = !0), Oe(), !0;
|
|
1147
1156
|
};
|
|
1148
1157
|
T(() => {
|
|
1149
|
-
j(), window.addEventListener("resize",
|
|
1158
|
+
j(), window.addEventListener("resize", ie), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", Pe), setTimeout(() => {
|
|
1150
1159
|
F();
|
|
1151
1160
|
}, 500));
|
|
1152
1161
|
}), te(() => {
|
|
@@ -1154,21 +1163,21 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1154
1163
|
F();
|
|
1155
1164
|
}, 500);
|
|
1156
1165
|
}), ee(() => {
|
|
1157
|
-
if (window.removeEventListener("resize",
|
|
1158
|
-
document.removeEventListener("mouseup",
|
|
1166
|
+
if (window.removeEventListener("resize", ie), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1167
|
+
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove", K), q(), ke();
|
|
1159
1168
|
let e = P();
|
|
1160
1169
|
if (e && e.$el) {
|
|
1161
1170
|
let t = e.$el;
|
|
1162
|
-
t.removeEventListener("mousedown", we), t.removeEventListener("mousemove",
|
|
1171
|
+
t.removeEventListener("mousedown", we), t.removeEventListener("mousemove", Y), t.removeEventListener("mouseup", X), t.removeEventListener("keydown", Me);
|
|
1163
1172
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1164
|
-
n && (n.removeEventListener("scroll",
|
|
1173
|
+
n && (n.removeEventListener("scroll", Ae), n.__cellCopyScrollBound = !1);
|
|
1165
1174
|
}
|
|
1166
1175
|
}
|
|
1167
1176
|
});
|
|
1168
|
-
let
|
|
1169
|
-
async function
|
|
1177
|
+
let oe = l(() => ge.value.height || ne.value), L;
|
|
1178
|
+
async function R(e) {
|
|
1170
1179
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1171
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1180
|
+
e[_] != 1 && (e.nextSearchAfter = L), 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 bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
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, L = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && (Z(), U = /* @__PURE__ */ new WeakMap(), ve = null, S(() => {
|
|
1197
1206
|
setTimeout(() => {
|
|
1198
1207
|
F();
|
|
1199
1208
|
}, 500);
|
|
1200
1209
|
}));
|
|
1201
1210
|
}
|
|
1202
1211
|
}
|
|
1203
|
-
function
|
|
1212
|
+
function z(e = {}) {
|
|
1204
1213
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1205
|
-
|
|
1214
|
+
R({
|
|
1206
1215
|
...y,
|
|
1207
|
-
...
|
|
1216
|
+
...ut(a.searchForm.items),
|
|
1208
1217
|
...e,
|
|
1209
1218
|
...n
|
|
1210
1219
|
});
|
|
1211
1220
|
}
|
|
1212
|
-
function
|
|
1221
|
+
function ce() {
|
|
1213
1222
|
let { reset: e } = a.tableConfig;
|
|
1214
1223
|
e && e(), a.searchForm.items.forEach((e) => {
|
|
1215
1224
|
let t = m.find((t) => de(e.key) && de(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1216
1225
|
t && (e.value = t.value);
|
|
1217
|
-
}),
|
|
1226
|
+
}), z();
|
|
1218
1227
|
}
|
|
1219
|
-
a.api && a.immediate &&
|
|
1220
|
-
function
|
|
1228
|
+
a.api && a.immediate && z();
|
|
1229
|
+
function fe() {
|
|
1221
1230
|
return {
|
|
1222
1231
|
...y,
|
|
1223
|
-
...
|
|
1232
|
+
...ut(a.searchForm.items)
|
|
1224
1233
|
};
|
|
1225
1234
|
}
|
|
1226
|
-
let
|
|
1235
|
+
let pe = () => {
|
|
1227
1236
|
let e = b.value;
|
|
1228
1237
|
e && e.clearSort();
|
|
1229
|
-
},
|
|
1238
|
+
}, me = D({ storage: !0 }), he = D({
|
|
1230
1239
|
drag: !0,
|
|
1231
1240
|
resizable: !0,
|
|
1232
1241
|
maxFixedSize: 0
|
|
1233
|
-
}),
|
|
1242
|
+
}), ge = 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
|
+
...me,
|
|
1240
1249
|
...e
|
|
1241
1250
|
},
|
|
1242
1251
|
columnConfig: {
|
|
1243
|
-
...
|
|
1252
|
+
...he,
|
|
1244
1253
|
...t
|
|
1245
1254
|
},
|
|
1246
1255
|
"virtual-x-config": {
|
|
@@ -1253,18 +1262,18 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1253
1262
|
},
|
|
1254
1263
|
...n
|
|
1255
1264
|
};
|
|
1256
|
-
}),
|
|
1265
|
+
}), V = D({
|
|
1257
1266
|
isSelecting: !1,
|
|
1258
1267
|
startCell: null,
|
|
1259
1268
|
endCell: null,
|
|
1260
1269
|
selectedCells: []
|
|
1261
|
-
}),
|
|
1262
|
-
if (!
|
|
1263
|
-
|
|
1270
|
+
}), H = null, _e = () => {
|
|
1271
|
+
if (!V.startCell || !V.endCell) {
|
|
1272
|
+
H = null, V.selectedCells = [];
|
|
1264
1273
|
return;
|
|
1265
1274
|
}
|
|
1266
|
-
let e = Math.min(
|
|
1267
|
-
|
|
1275
|
+
let e = Math.min(V.startCell.rowIndex, V.endCell.rowIndex), t = Math.max(V.startCell.rowIndex, V.endCell.rowIndex), n = Math.min(V.startCell.colIndex, V.endCell.colIndex), r = Math.max(V.startCell.colIndex, V.endCell.colIndex);
|
|
1276
|
+
H = {
|
|
1268
1277
|
minRow: e,
|
|
1269
1278
|
maxRow: t,
|
|
1270
1279
|
minCol: n,
|
|
@@ -1275,15 +1284,15 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1275
1284
|
rowIndex: a,
|
|
1276
1285
|
colIndex: e
|
|
1277
1286
|
});
|
|
1278
|
-
|
|
1279
|
-
},
|
|
1287
|
+
V.selectedCells = i;
|
|
1288
|
+
}, U = /* @__PURE__ */ new WeakMap(), ve = null, ye = 0, be = (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 !== ve || n.length !== ye) {
|
|
1291
|
+
U = /* @__PURE__ */ new WeakMap(), ve = n, ye = n.length;
|
|
1292
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && U.set(n[e], e);
|
|
1284
1293
|
}
|
|
1285
|
-
return
|
|
1286
|
-
},
|
|
1294
|
+
return U.has(t) ? U.get(t) : -1;
|
|
1295
|
+
}, xe = (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");
|
|
@@ -1293,7 +1302,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1293
1302
|
let i = -1, o = n.getAttribute("rowid");
|
|
1294
1303
|
if (o != null) {
|
|
1295
1304
|
let e = r.getRowById(o);
|
|
1296
|
-
e && (i =
|
|
1305
|
+
e && (i = be(r, e));
|
|
1297
1306
|
}
|
|
1298
1307
|
if (i < 0) {
|
|
1299
1308
|
let e = n.parentElement;
|
|
@@ -1319,47 +1328,47 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1319
1328
|
colIndex: s,
|
|
1320
1329
|
cell: t
|
|
1321
1330
|
};
|
|
1322
|
-
},
|
|
1323
|
-
if (!
|
|
1324
|
-
|
|
1331
|
+
}, W = null, G = 0, K = (e) => {
|
|
1332
|
+
if (!V.isSelecting) return;
|
|
1333
|
+
G = e.clientY;
|
|
1325
1334
|
let t = P();
|
|
1326
1335
|
if (!t || !t.$el) return;
|
|
1327
1336
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1328
1337
|
if (!r) return;
|
|
1329
1338
|
let i = r.getBoundingClientRect();
|
|
1330
|
-
e.clientY < i.top -
|
|
1339
|
+
e.clientY < i.top - St || e.clientY > i.bottom + St ? W || Se() : q();
|
|
1331
1340
|
}, Se = () => {
|
|
1332
1341
|
let e = () => {
|
|
1333
|
-
if (!
|
|
1334
|
-
|
|
1342
|
+
if (!V.isSelecting) {
|
|
1343
|
+
q();
|
|
1335
1344
|
return;
|
|
1336
1345
|
}
|
|
1337
1346
|
let t = P();
|
|
1338
1347
|
if (!t || !t.$el) {
|
|
1339
|
-
|
|
1348
|
+
q();
|
|
1340
1349
|
return;
|
|
1341
1350
|
}
|
|
1342
1351
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1343
1352
|
if (!r) {
|
|
1344
|
-
|
|
1353
|
+
q();
|
|
1345
1354
|
return;
|
|
1346
1355
|
}
|
|
1347
1356
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1348
|
-
if (
|
|
1349
|
-
let e = i.top -
|
|
1350
|
-
a = -Math.min(
|
|
1351
|
-
} else if (
|
|
1352
|
-
let e =
|
|
1353
|
-
a = Math.min(
|
|
1357
|
+
if (G < i.top) {
|
|
1358
|
+
let e = i.top - G;
|
|
1359
|
+
a = -Math.min(Ct, Math.max(2, e * wt));
|
|
1360
|
+
} else if (G > i.bottom) {
|
|
1361
|
+
let e = G - i.bottom;
|
|
1362
|
+
a = Math.min(Ct, Math.max(2, e * wt));
|
|
1354
1363
|
} else {
|
|
1355
|
-
|
|
1364
|
+
q();
|
|
1356
1365
|
return;
|
|
1357
1366
|
}
|
|
1358
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Ce(r, i),
|
|
1367
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Ce(r, i), W = requestAnimationFrame(e);
|
|
1359
1368
|
};
|
|
1360
|
-
|
|
1361
|
-
},
|
|
1362
|
-
|
|
1369
|
+
W = requestAnimationFrame(e);
|
|
1370
|
+
}, q = () => {
|
|
1371
|
+
W &&= (cancelAnimationFrame(W), null);
|
|
1363
1372
|
}, Ce = (e, t) => {
|
|
1364
1373
|
let n = P();
|
|
1365
1374
|
if (!n) return;
|
|
@@ -1370,50 +1379,53 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1370
1379
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1371
1380
|
if (a.length === 0) return;
|
|
1372
1381
|
let o = null;
|
|
1373
|
-
if (
|
|
1382
|
+
if (G < t.top ? o = a[0] : G > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1374
1383
|
let s = o.getAttribute("rowid");
|
|
1375
1384
|
if (s == null) return;
|
|
1376
1385
|
let c = -1, l = n.getRowById(s);
|
|
1377
1386
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1378
|
-
let u =
|
|
1379
|
-
|
|
1387
|
+
let u = V.endCell ? V.endCell.colIndex : V.startCell ? V.startCell.colIndex : 0;
|
|
1388
|
+
V.endCell = {
|
|
1380
1389
|
rowIndex: c,
|
|
1381
1390
|
colIndex: u
|
|
1382
|
-
},
|
|
1391
|
+
}, _e(), Ee();
|
|
1383
1392
|
}, we = (e) => {
|
|
1384
|
-
let t =
|
|
1393
|
+
let t = xe(e.target);
|
|
1385
1394
|
if (!t) {
|
|
1386
|
-
|
|
1395
|
+
Z();
|
|
1387
1396
|
return;
|
|
1388
1397
|
}
|
|
1389
|
-
|
|
1398
|
+
let n = P();
|
|
1399
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), V.isSelecting = !0, V.startCell = {
|
|
1390
1400
|
rowIndex: t.rowIndex,
|
|
1391
1401
|
colIndex: t.colIndex
|
|
1392
|
-
},
|
|
1393
|
-
},
|
|
1394
|
-
|
|
1395
|
-
if (
|
|
1396
|
-
let t =
|
|
1397
|
-
t && (
|
|
1402
|
+
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove", K), _e(), Ee();
|
|
1403
|
+
}, J = null, Y = (e) => {
|
|
1404
|
+
V.isSelecting && (J ||= requestAnimationFrame(() => {
|
|
1405
|
+
if (J = null, !V.isSelecting) return;
|
|
1406
|
+
let t = xe(e.target);
|
|
1407
|
+
t && (V.endCell && V.endCell.rowIndex === t.rowIndex && V.endCell.colIndex === t.colIndex || (V.endCell = {
|
|
1398
1408
|
rowIndex: t.rowIndex,
|
|
1399
1409
|
colIndex: t.colIndex
|
|
1400
|
-
},
|
|
1410
|
+
}, _e(), Ee()));
|
|
1401
1411
|
}));
|
|
1402
|
-
},
|
|
1403
|
-
|
|
1404
|
-
},
|
|
1405
|
-
|
|
1412
|
+
}, X = () => {
|
|
1413
|
+
V.isSelecting = !1, q(), J &&= (cancelAnimationFrame(J), null), document.removeEventListener("mousemove", K);
|
|
1414
|
+
}, Z = () => {
|
|
1415
|
+
V.selectedCells = [], V.startCell = null, V.endCell = null, H = null;
|
|
1406
1416
|
let e = P();
|
|
1407
1417
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1408
1418
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1409
1419
|
});
|
|
1410
|
-
},
|
|
1420
|
+
}, Te = () => {
|
|
1411
1421
|
let e = P();
|
|
1412
1422
|
if (!e) return;
|
|
1413
|
-
let t = e.$el
|
|
1423
|
+
let t = e.$el;
|
|
1424
|
+
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1425
|
+
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1414
1426
|
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 (!
|
|
1416
|
-
let { minRow: r, maxRow: i, minCol: o, maxCol: s } =
|
|
1427
|
+
if (!H) return;
|
|
1428
|
+
let { minRow: r, maxRow: i, minCol: o, maxCol: s } = H, 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
1429
|
for (let t = r; t <= i; t++) {
|
|
1418
1430
|
let n = d[t];
|
|
1419
1431
|
if (n) {
|
|
@@ -1434,7 +1446,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1434
1446
|
let g = f.get(String(h));
|
|
1435
1447
|
if (g === void 0) {
|
|
1436
1448
|
let t = e.getRowById(h);
|
|
1437
|
-
if (t && (g =
|
|
1449
|
+
if (t && (g = be(e, t), g >= 0 && f.set(String(h), g)), g === void 0 || g < 0) continue;
|
|
1438
1450
|
}
|
|
1439
1451
|
if (g < r || g > i) continue;
|
|
1440
1452
|
let _ = m.querySelectorAll(".vxe-body--column");
|
|
@@ -1446,33 +1458,33 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1446
1458
|
}
|
|
1447
1459
|
}
|
|
1448
1460
|
}
|
|
1449
|
-
},
|
|
1461
|
+
}, Ee = () => {
|
|
1450
1462
|
S(() => {
|
|
1451
|
-
|
|
1463
|
+
Te();
|
|
1452
1464
|
});
|
|
1453
|
-
},
|
|
1454
|
-
|
|
1455
|
-
|
|
1465
|
+
}, Q = null, $ = null, De = () => {
|
|
1466
|
+
$ ||= requestAnimationFrame(() => {
|
|
1467
|
+
$ = null, Te();
|
|
1456
1468
|
});
|
|
1457
|
-
},
|
|
1469
|
+
}, Oe = () => {
|
|
1458
1470
|
let e = P();
|
|
1459
1471
|
if (!e || !e.$el) return;
|
|
1460
1472
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1461
|
-
t && (
|
|
1462
|
-
|
|
1463
|
-
}),
|
|
1473
|
+
t && (ke(), Q = new MutationObserver(() => {
|
|
1474
|
+
H && De();
|
|
1475
|
+
}), Q.observe(t, {
|
|
1464
1476
|
childList: !0,
|
|
1465
1477
|
subtree: !1
|
|
1466
1478
|
}));
|
|
1467
|
-
}, Oe = () => {
|
|
1468
|
-
X &&= (X.disconnect(), null), Z &&= (cancelAnimationFrame(Z), null);
|
|
1469
1479
|
}, ke = () => {
|
|
1470
|
-
|
|
1471
|
-
}, Ae =
|
|
1472
|
-
|
|
1480
|
+
Q &&= (Q.disconnect(), null), $ &&= (cancelAnimationFrame($), null);
|
|
1481
|
+
}, Ae = () => {
|
|
1482
|
+
H && De();
|
|
1483
|
+
}, je = async () => {
|
|
1484
|
+
if (!H) return;
|
|
1473
1485
|
let e = P();
|
|
1474
1486
|
if (!e) return;
|
|
1475
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: o, minCol: s, maxCol: c } =
|
|
1487
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: o, minCol: s, maxCol: c } = H, l = [];
|
|
1476
1488
|
for (let e = i; e <= o; e++) l.push(e);
|
|
1477
1489
|
let u = [];
|
|
1478
1490
|
for (let e = s; e <= c; e++) u.push(e);
|
|
@@ -1544,23 +1556,23 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1544
1556
|
} catch (e) {
|
|
1545
1557
|
console.error("复制失败:", e);
|
|
1546
1558
|
}
|
|
1547
|
-
},
|
|
1548
|
-
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1549
|
-
},
|
|
1550
|
-
|
|
1551
|
-
}, Ne = (e) => {
|
|
1552
|
-
let t = P();
|
|
1553
|
-
!t || !t.$el || t.$el.contains(e.target) || J();
|
|
1559
|
+
}, Me = (e) => {
|
|
1560
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), je()) : e.key === "Escape" && Z());
|
|
1561
|
+
}, Ne = () => {
|
|
1562
|
+
V.isSelecting = !1, q(), J &&= (cancelAnimationFrame(J), null), document.removeEventListener("mousemove", K);
|
|
1554
1563
|
}, Pe = (e) => {
|
|
1555
|
-
|
|
1564
|
+
let t = P();
|
|
1565
|
+
!t || !t.$el || t.$el.contains(e.target) || Z();
|
|
1556
1566
|
}, Fe = (e) => {
|
|
1557
|
-
y[
|
|
1567
|
+
y[_] = e, z();
|
|
1568
|
+
}, Ie = (e) => {
|
|
1569
|
+
y[v] = e, y[_] = 1, z();
|
|
1558
1570
|
};
|
|
1559
|
-
function
|
|
1571
|
+
function Le() {
|
|
1560
1572
|
let e = b.value.getCheckboxRecords();
|
|
1561
1573
|
a.searchForm.selections = e;
|
|
1562
1574
|
}
|
|
1563
|
-
let
|
|
1575
|
+
let Re = (e) => {
|
|
1564
1576
|
let t = b.value;
|
|
1565
1577
|
if (t) {
|
|
1566
1578
|
t.toggleCheckboxRow(e);
|
|
@@ -1570,18 +1582,18 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1570
1582
|
};
|
|
1571
1583
|
return t({
|
|
1572
1584
|
tableRef: b,
|
|
1573
|
-
getList:
|
|
1574
|
-
getPrm:
|
|
1575
|
-
clearSort:
|
|
1585
|
+
getList: z,
|
|
1586
|
+
getPrm: fe,
|
|
1587
|
+
clearSort: pe,
|
|
1576
1588
|
calculateTableHeight: j
|
|
1577
1589
|
}), (t, n) => {
|
|
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");
|
|
1590
|
+
let a = A("el-button"), l = A("el-checkbox"), m = A("el-text"), S = A("vxe-column"), T = A("VxeTable"), ee = A("el-pagination"), te = re("loading");
|
|
1579
1591
|
return E(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1580
|
-
e.searchForm.showSearch ? (E(), u(
|
|
1592
|
+
e.searchForm.showSearch ? (E(), u(ht, {
|
|
1581
1593
|
key: 0,
|
|
1582
1594
|
form: e.searchForm,
|
|
1583
|
-
onReset:
|
|
1584
|
-
onConfirm: n[1] ||= (e) =>
|
|
1595
|
+
onReset: ce,
|
|
1596
|
+
onConfirm: n[1] ||= (e) => z(),
|
|
1585
1597
|
onVisibleChange: N(j)
|
|
1586
1598
|
}, {
|
|
1587
1599
|
btn: I(() => [
|
|
@@ -1592,16 +1604,17 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1592
1604
|
round: "",
|
|
1593
1605
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1594
1606
|
}, {
|
|
1595
|
-
default: I(() => [g(
|
|
1607
|
+
default: I(() => [g(it, { name: "Tools" })]),
|
|
1596
1608
|
_: 1
|
|
1597
1609
|
})
|
|
1598
1610
|
]),
|
|
1599
1611
|
_: 3
|
|
1600
1612
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1601
1613
|
k(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1602
|
-
|
|
1614
|
+
ae((E(), f("div", {
|
|
1603
1615
|
ref_key: "tableContentRef",
|
|
1604
|
-
ref: w
|
|
1616
|
+
ref: w,
|
|
1617
|
+
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy || N(i).enableCellCopy })
|
|
1605
1618
|
}, [g(T, x({
|
|
1606
1619
|
id: c.value,
|
|
1607
1620
|
ref_key: "tableRef",
|
|
@@ -1609,12 +1622,12 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1609
1622
|
loading: e.loading || o.value,
|
|
1610
1623
|
data: e.api ? s.value : e.data,
|
|
1611
1624
|
border: ""
|
|
1612
|
-
},
|
|
1613
|
-
height:
|
|
1614
|
-
onCheckboxChange:
|
|
1615
|
-
onCheckboxAll:
|
|
1616
|
-
onSortChange:
|
|
1617
|
-
onScroll:
|
|
1625
|
+
}, ge.value, {
|
|
1626
|
+
height: oe.value,
|
|
1627
|
+
onCheckboxChange: Le,
|
|
1628
|
+
onCheckboxAll: Le,
|
|
1629
|
+
onSortChange: ge.value["sort-config"]?.sortChange,
|
|
1630
|
+
onScroll: Ae
|
|
1618
1631
|
}), {
|
|
1619
1632
|
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (E(), u(S, {
|
|
1620
1633
|
key: 0,
|
|
@@ -1623,18 +1636,18 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1623
1636
|
title: t.$t("xu-hao"),
|
|
1624
1637
|
fixed: "left"
|
|
1625
1638
|
}, {
|
|
1626
|
-
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div",
|
|
1639
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", xt, [n ? (E(), u(l, {
|
|
1627
1640
|
key: 0,
|
|
1628
1641
|
checked: !0,
|
|
1629
1642
|
disabled: r,
|
|
1630
1643
|
size: "default",
|
|
1631
|
-
onClick:
|
|
1644
|
+
onClick: se((e) => !r && Re(t), ["stop"])
|
|
1632
1645
|
}, null, 8, ["disabled", "onClick"])) : (E(), u(l, {
|
|
1633
1646
|
key: 1,
|
|
1634
1647
|
disabled: r,
|
|
1635
1648
|
checked: !1,
|
|
1636
1649
|
size: "default",
|
|
1637
|
-
onClick:
|
|
1650
|
+
onClick: se((e) => !r && Re(t), ["stop"])
|
|
1638
1651
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1639
1652
|
type: "info",
|
|
1640
1653
|
class: "mgl5"
|
|
@@ -1651,7 +1664,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1651
1664
|
"data",
|
|
1652
1665
|
"height",
|
|
1653
1666
|
"onSortChange"
|
|
1654
|
-
])],
|
|
1667
|
+
])], 2)), [[te, e.loading || o.value]]),
|
|
1655
1668
|
e.searchForm.showPage ? (E(), u(ee, {
|
|
1656
1669
|
key: 1,
|
|
1657
1670
|
"current-page": y[N(_)],
|
|
@@ -1662,8 +1675,8 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1662
1675
|
total: y.total,
|
|
1663
1676
|
"page-size": y[N(v)],
|
|
1664
1677
|
"page-sizes": e.searchForm.pageSizes || N(i).pageSizes,
|
|
1665
|
-
onCurrentChange:
|
|
1666
|
-
onSizeChange:
|
|
1678
|
+
onCurrentChange: Fe,
|
|
1679
|
+
onSizeChange: Ie
|
|
1667
1680
|
}, null, 8, [
|
|
1668
1681
|
"current-page",
|
|
1669
1682
|
"total",
|
|
@@ -1673,7 +1686,7 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1673
1686
|
], 2);
|
|
1674
1687
|
};
|
|
1675
1688
|
}
|
|
1676
|
-
}, [["__scopeId", "data-v-
|
|
1689
|
+
}, [["__scopeId", "data-v-996419c0"]]), Et = {
|
|
1677
1690
|
__name: "index",
|
|
1678
1691
|
props: {
|
|
1679
1692
|
sheetsConfig: {
|
|
@@ -1705,18 +1718,18 @@ var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
|
1705
1718
|
}, 16);
|
|
1706
1719
|
};
|
|
1707
1720
|
}
|
|
1708
|
-
},
|
|
1721
|
+
}, Dt = {
|
|
1709
1722
|
mounted(e, t) {
|
|
1710
|
-
t.value &&
|
|
1723
|
+
t.value && Ot(e);
|
|
1711
1724
|
},
|
|
1712
1725
|
updated(e, t) {
|
|
1713
|
-
t.value ?
|
|
1726
|
+
t.value ? Ot(e) : kt(e);
|
|
1714
1727
|
},
|
|
1715
1728
|
beforeUnmount(e) {
|
|
1716
|
-
|
|
1729
|
+
kt(e);
|
|
1717
1730
|
}
|
|
1718
1731
|
};
|
|
1719
|
-
async function
|
|
1732
|
+
async function Ot(e) {
|
|
1720
1733
|
await f();
|
|
1721
1734
|
let t = e.querySelector(".el-dialog");
|
|
1722
1735
|
if (!t) return;
|
|
@@ -1779,15 +1792,15 @@ async function Dt(e) {
|
|
|
1779
1792
|
}
|
|
1780
1793
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1781
1794
|
}
|
|
1782
|
-
function
|
|
1795
|
+
function kt(e) {
|
|
1783
1796
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1784
1797
|
}
|
|
1785
1798
|
//#endregion
|
|
1786
1799
|
//#region src/components/Layer/index.vue
|
|
1787
|
-
var
|
|
1800
|
+
var At = {
|
|
1788
1801
|
key: 0,
|
|
1789
1802
|
class: "drawer-btn"
|
|
1790
|
-
},
|
|
1803
|
+
}, jt = { key: 1 }, Mt = {
|
|
1791
1804
|
__name: "index",
|
|
1792
1805
|
props: {
|
|
1793
1806
|
layer: {
|
|
@@ -1807,7 +1820,7 @@ var kt = {
|
|
|
1807
1820
|
},
|
|
1808
1821
|
emits: ["confirm"],
|
|
1809
1822
|
setup(e, { emit: t }) {
|
|
1810
|
-
let n = e, r = t, { t: i } =
|
|
1823
|
+
let n = e, r = t, { t: i } = B(), o = ue(() => {
|
|
1811
1824
|
r("confirm");
|
|
1812
1825
|
}, 300);
|
|
1813
1826
|
async function s() {
|
|
@@ -1833,7 +1846,7 @@ var kt = {
|
|
|
1833
1846
|
default: I(() => [
|
|
1834
1847
|
k(t.$slots, "default"),
|
|
1835
1848
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1836
|
-
e.layer.showButton ? (E(), f("div",
|
|
1849
|
+
e.layer.showButton ? (E(), f("div", At, [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1837
1850
|
default: I(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1838
1851
|
_: 1
|
|
1839
1852
|
}), g(r, {
|
|
@@ -1850,7 +1863,7 @@ var kt = {
|
|
|
1850
1863
|
"modelValue",
|
|
1851
1864
|
"size",
|
|
1852
1865
|
"title"
|
|
1853
|
-
])) :
|
|
1866
|
+
])) : ae((E(), f("div", jt, [g(a, {
|
|
1854
1867
|
"close-on-click-modal": !1,
|
|
1855
1868
|
modelValue: e.layer.show,
|
|
1856
1869
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1877,14 +1890,14 @@ var kt = {
|
|
|
1877
1890
|
"modelValue",
|
|
1878
1891
|
"title",
|
|
1879
1892
|
"width"
|
|
1880
|
-
])])), [[N(
|
|
1893
|
+
])])), [[N(Dt), e.layer.show]]);
|
|
1881
1894
|
};
|
|
1882
1895
|
}
|
|
1883
1896
|
};
|
|
1884
1897
|
//#endregion
|
|
1885
1898
|
//#region src/utils/tools/validate.js
|
|
1886
|
-
function
|
|
1887
|
-
let n =
|
|
1899
|
+
function Nt(e, t = {}) {
|
|
1900
|
+
let n = $(), r = {
|
|
1888
1901
|
inForm: !0,
|
|
1889
1902
|
required: !0,
|
|
1890
1903
|
...t
|
|
@@ -1903,7 +1916,7 @@ function Mt(e, t = {}) {
|
|
|
1903
1916
|
}
|
|
1904
1917
|
//#endregion
|
|
1905
1918
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1906
|
-
var
|
|
1919
|
+
var Pt = class {
|
|
1907
1920
|
constructor(e = {}) {
|
|
1908
1921
|
this.config = {
|
|
1909
1922
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2050,24 +2063,24 @@ var Nt = class {
|
|
|
2050
2063
|
};
|
|
2051
2064
|
//#endregion
|
|
2052
2065
|
//#region src/utils/tools/format.js
|
|
2053
|
-
function
|
|
2066
|
+
function Ft(e, t = 2, n = ".", r = ",") {
|
|
2054
2067
|
(e == null || e === "") && (e = 0);
|
|
2055
2068
|
let i = Number(e);
|
|
2056
2069
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2057
2070
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2058
2071
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
2059
2072
|
}
|
|
2060
|
-
function Ft(e, t = 2) {
|
|
2061
|
-
return Pt(e, t);
|
|
2062
|
-
}
|
|
2063
2073
|
function It(e, t = 2) {
|
|
2074
|
+
return Ft(e, t);
|
|
2075
|
+
}
|
|
2076
|
+
function Lt(e, t = 2) {
|
|
2064
2077
|
(e == null || e === "") && (e = 0);
|
|
2065
2078
|
let n = Number(e);
|
|
2066
|
-
return e = isNaN(n) ? 0 : n,
|
|
2079
|
+
return e = isNaN(n) ? 0 : n, Ft(e * 100, t) + "%";
|
|
2067
2080
|
}
|
|
2068
2081
|
//#endregion
|
|
2069
2082
|
//#region src/utils/hook/common.js
|
|
2070
|
-
function
|
|
2083
|
+
function Rt(e, t = {}) {
|
|
2071
2084
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2072
2085
|
manual: !1,
|
|
2073
2086
|
log: !1,
|
|
@@ -2079,13 +2092,13 @@ function Lt(e, t = {}) {
|
|
|
2079
2092
|
let { code: t, data: c, msg: l } = e;
|
|
2080
2093
|
if (a) {
|
|
2081
2094
|
let { records: t, rows: n } = c || {};
|
|
2082
|
-
s.value =
|
|
2095
|
+
s.value = Vt(t || n ? t || n : c, o), a(e);
|
|
2083
2096
|
}
|
|
2084
2097
|
if (c) {
|
|
2085
2098
|
if (c.records != null || c.rows != null) {
|
|
2086
2099
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
2087
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
2088
|
-
} else s.value =
|
|
2100
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Vt(e || t || [], o);
|
|
2101
|
+
} else s.value = Vt(c, o);
|
|
2089
2102
|
r && console.log("useRequest-res", s.value);
|
|
2090
2103
|
}
|
|
2091
2104
|
}).catch((e) => {
|
|
@@ -2100,7 +2113,7 @@ function Lt(e, t = {}) {
|
|
|
2100
2113
|
l
|
|
2101
2114
|
];
|
|
2102
2115
|
}
|
|
2103
|
-
function
|
|
2116
|
+
function zt(e) {
|
|
2104
2117
|
let t = O(e), n = O(""), r = O("");
|
|
2105
2118
|
return F(t, (e) => {
|
|
2106
2119
|
let t = e || ["", ""];
|
|
@@ -2111,10 +2124,10 @@ function Rt(e) {
|
|
|
2111
2124
|
r
|
|
2112
2125
|
];
|
|
2113
2126
|
}
|
|
2114
|
-
function
|
|
2127
|
+
function Bt(e) {
|
|
2115
2128
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2116
2129
|
}
|
|
2117
|
-
function
|
|
2130
|
+
function Vt(e, t) {
|
|
2118
2131
|
if (!t) return e;
|
|
2119
2132
|
if (e instanceof Array) return e.map((e) => {
|
|
2120
2133
|
let n = {};
|
|
@@ -2125,47 +2138,47 @@ function Bt(e, t) {
|
|
|
2125
2138
|
}
|
|
2126
2139
|
//#endregion
|
|
2127
2140
|
//#region src/utils/hook/i18n.js
|
|
2128
|
-
function
|
|
2129
|
-
let { locale: n } =
|
|
2141
|
+
function Ht(e, t = []) {
|
|
2142
|
+
let { locale: n } = B(), r = O(e());
|
|
2130
2143
|
return F([n, ...t], () => {
|
|
2131
2144
|
r.value = e();
|
|
2132
2145
|
}, { immediate: !0 }), r;
|
|
2133
2146
|
}
|
|
2134
|
-
function
|
|
2147
|
+
function Ut(e, t = "zh_cn", n = "en_us") {
|
|
2135
2148
|
return e && (e[{
|
|
2136
2149
|
en_us: n,
|
|
2137
2150
|
zh_cn: t
|
|
2138
|
-
}[
|
|
2151
|
+
}[Q().global.locale.value]] || e[t]) || "-";
|
|
2139
2152
|
}
|
|
2140
2153
|
//#endregion
|
|
2141
2154
|
//#region src/utils/hook/storeHook.js
|
|
2142
|
-
function
|
|
2155
|
+
function Wt(e, t) {
|
|
2143
2156
|
let n = he;
|
|
2144
|
-
return typeof e == "string" && e.length > 0 && (n = fe(e).mapState),
|
|
2157
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapState), qt(t, n);
|
|
2145
2158
|
}
|
|
2146
|
-
function
|
|
2159
|
+
function Gt(e, t) {
|
|
2147
2160
|
let n = me;
|
|
2148
|
-
return typeof e == "string" && e.length > 0 && (n = fe(e).mapGetters),
|
|
2161
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapGetters), qt(t, n);
|
|
2149
2162
|
}
|
|
2150
|
-
function
|
|
2163
|
+
function Kt(e, t) {
|
|
2151
2164
|
let n = pe;
|
|
2152
|
-
return typeof e == "string" && e.length > 0 && (n = fe(e).mapActions),
|
|
2165
|
+
return typeof e == "string" && e.length > 0 && (n = fe(e).mapActions), Jt(t, n);
|
|
2153
2166
|
}
|
|
2154
|
-
function
|
|
2155
|
-
let n =
|
|
2167
|
+
function qt(e, t) {
|
|
2168
|
+
let n = ge(), r = t(e), i = {};
|
|
2156
2169
|
return Object.keys(r).forEach((e) => {
|
|
2157
2170
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2158
2171
|
}), i;
|
|
2159
2172
|
}
|
|
2160
|
-
function
|
|
2161
|
-
let n =
|
|
2173
|
+
function Jt(e, t) {
|
|
2174
|
+
let n = ge(), r = t(e), i = {};
|
|
2162
2175
|
return Object.keys(r).forEach((e) => {
|
|
2163
2176
|
i[e] = r[e].bind({ $store: n });
|
|
2164
2177
|
}), i;
|
|
2165
2178
|
}
|
|
2166
2179
|
//#endregion
|
|
2167
2180
|
//#region src/components/CmpTag/index.vue
|
|
2168
|
-
var
|
|
2181
|
+
var Yt = {
|
|
2169
2182
|
__name: "index",
|
|
2170
2183
|
props: { fontColor: String },
|
|
2171
2184
|
setup(e) {
|
|
@@ -2184,27 +2197,27 @@ var Jt = {
|
|
|
2184
2197
|
};
|
|
2185
2198
|
//#endregion
|
|
2186
2199
|
//#region src/components/VxeTable/index.jsx
|
|
2187
|
-
function
|
|
2200
|
+
function Xt(e) {
|
|
2188
2201
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2189
2202
|
}
|
|
2190
|
-
function
|
|
2203
|
+
function Zt() {
|
|
2191
2204
|
V.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2192
|
-
return Pt(e, t);
|
|
2193
|
-
} }), V.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2194
2205
|
return Ft(e, t);
|
|
2195
|
-
} }), V.formats.add("
|
|
2206
|
+
} }), V.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2196
2207
|
return It(e, t);
|
|
2208
|
+
} }), V.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2209
|
+
return Lt(e, t);
|
|
2197
2210
|
} });
|
|
2198
2211
|
}
|
|
2199
|
-
function
|
|
2212
|
+
function Qt() {
|
|
2200
2213
|
V.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2201
2214
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2202
|
-
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } =
|
|
2203
|
-
return e.type == "tag" ? o ? g(
|
|
2215
|
+
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } = B(), c = s.value == "zh_cn" ? r : i;
|
|
2216
|
+
return e.type == "tag" ? o ? g(Yt, { fontColor: o }, { default: () => [
|
|
2204
2217
|
h(" "),
|
|
2205
2218
|
c,
|
|
2206
2219
|
h(" ")
|
|
2207
|
-
] }) : g(
|
|
2220
|
+
] }) : g(Yt, { type: a }, { default: () => [
|
|
2208
2221
|
h(" "),
|
|
2209
2222
|
c,
|
|
2210
2223
|
h(" ")
|
|
@@ -2226,13 +2239,13 @@ function Zt() {
|
|
|
2226
2239
|
"value-on-clear": 0
|
|
2227
2240
|
}), null);
|
|
2228
2241
|
} }), V.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2229
|
-
let { locale: n } =
|
|
2242
|
+
let { locale: n } = B(), r = n.value == "zh_cn";
|
|
2230
2243
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2231
2244
|
} }), V.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2232
|
-
let { locale: n } =
|
|
2245
|
+
let { locale: n } = B(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2233
2246
|
return t.row[r] || t.row[t.column.field];
|
|
2234
2247
|
} }), V.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2235
|
-
let n = t.column.field, i =
|
|
2248
|
+
let n = t.column.field, i = H(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2236
2249
|
function l(e, t) {
|
|
2237
2250
|
s == "blank" ? window.open(e) : i.push({
|
|
2238
2251
|
path: e,
|
|
@@ -2245,17 +2258,17 @@ function Zt() {
|
|
|
2245
2258
|
underline: "never",
|
|
2246
2259
|
type: "primary",
|
|
2247
2260
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2248
|
-
},
|
|
2261
|
+
}, Xt(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2249
2262
|
}
|
|
2250
2263
|
return g(r, {
|
|
2251
2264
|
underline: "never",
|
|
2252
2265
|
type: "primary",
|
|
2253
2266
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2254
|
-
},
|
|
2267
|
+
}, Xt(c) ? c : { default: () => [c] });
|
|
2255
2268
|
} });
|
|
2256
2269
|
}
|
|
2257
|
-
function
|
|
2258
|
-
|
|
2270
|
+
function $t() {
|
|
2271
|
+
Zt(), Qt();
|
|
2259
2272
|
}
|
|
2260
2273
|
//#endregion
|
|
2261
|
-
export {
|
|
2274
|
+
export { tt as CmpDictionary, it as CmpIcon, ot as ConfrimButton, Et as DownExcelTemp, lt as ImportButton, Se 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, X 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, Z 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, Y as zh_cn };
|