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