joy-admin-components 0.2.110 → 0.2.112
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
|
|
2
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as E, onUpdated as ee, openBlock as D, reactive as O, ref as k, renderList as te, renderSlot as A, resolveComponent as j, resolveDynamicComponent as M, toDisplayString as N, toValue as ne, unref as P, useAttrs as F, useModel as re, watch as ie, withCtx as I, withDirectives as ae, withKeys as oe, withModifiers as se } from "vue";
|
|
3
3
|
import { saveAs as L } from "file-saver";
|
|
4
4
|
import R from "exceljs";
|
|
5
5
|
import z from "dayjs";
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import { createNamespacedHelpers as
|
|
6
|
+
import { createI18n as ce, useI18n as B } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as le, debounce as ue, isArray as de, without as fe } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as pe, mapActions as me, mapGetters as V, mapState as H, useStore as he } from "vuex";
|
|
9
9
|
import { VxeUI as U } from "vxe-pc-ui";
|
|
10
|
-
import { useRouter as
|
|
10
|
+
import { useRouter as ge } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor,
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, W = Object.getOwnPropertyNames, G = Object.getPrototypeOf, be = Object.prototype.hasOwnProperty, xe = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), K = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = W(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !be.call(e, s) && s !== n && ve(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
15
|
enumerable: !(r = ye(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, Se = (e, t, n) => (n = e == null ? {} : _e(G(e)), K(t || !e || !e.__esModule ? ve(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 = k(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
@@ -36,7 +36,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), q = /* @__PURE__ */ xe(((e, t) => {
|
|
40
40
|
(function(n, r) {
|
|
41
41
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_utc = r();
|
|
42
42
|
})(e, (function() {
|
|
@@ -120,7 +120,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), we = /* @__PURE__ */ xe(((e, t) => {
|
|
124
124
|
(function(n, r) {
|
|
125
125
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_timezone = r();
|
|
126
126
|
})(e, (function() {
|
|
@@ -196,7 +196,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), Te = /* @__PURE__ */ Se(q()), Ee = /* @__PURE__ */ Se(we()), J = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -225,7 +225,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
225
225
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
226
226
|
validate: { invalidInput: "请输入正确内容" },
|
|
227
227
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
228
|
-
},
|
|
228
|
+
}, Y = {
|
|
229
229
|
"dao-ru": "Import",
|
|
230
230
|
"quan-xuan": "Select All",
|
|
231
231
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -254,30 +254,30 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
254
254
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
255
255
|
validate: { invalidInput: "Please enter valid content" },
|
|
256
256
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
257
|
-
},
|
|
258
|
-
zh_cn:
|
|
259
|
-
en_us:
|
|
257
|
+
}, X = {
|
|
258
|
+
zh_cn: J,
|
|
259
|
+
en_us: Y
|
|
260
260
|
}, Z = null;
|
|
261
|
-
function
|
|
261
|
+
function De(e = null) {
|
|
262
262
|
if (e) {
|
|
263
263
|
let { global: t } = e;
|
|
264
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
264
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", J) : t.setLocaleMessage("zh_cn", J), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", Y) : t.setLocaleMessage("en_us", Y), Z = e, e;
|
|
265
265
|
}
|
|
266
|
-
return Z ||=
|
|
266
|
+
return Z ||= ce({
|
|
267
267
|
legacy: !1,
|
|
268
268
|
locale: "zh_cn",
|
|
269
269
|
fallbackLocale: "zh_cn",
|
|
270
|
-
messages:
|
|
270
|
+
messages: X
|
|
271
271
|
}), Z;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
return Z ||
|
|
273
|
+
function Oe() {
|
|
274
|
+
return Z || De();
|
|
275
275
|
}
|
|
276
276
|
function Q() {
|
|
277
|
-
return
|
|
277
|
+
return Oe().global.t;
|
|
278
278
|
}
|
|
279
|
-
z.extend(
|
|
280
|
-
async function
|
|
279
|
+
z.extend(Te.default), z.extend(Ee.default);
|
|
280
|
+
async function ke(e, t) {
|
|
281
281
|
let { fields: n, range: r = 1 } = t;
|
|
282
282
|
if (!n) {
|
|
283
283
|
let e = Q();
|
|
@@ -299,15 +299,15 @@ async function Ae(e, t) {
|
|
|
299
299
|
}), a[e._name] = i;
|
|
300
300
|
}), i = null, a;
|
|
301
301
|
}
|
|
302
|
-
var
|
|
303
|
-
async function
|
|
302
|
+
var Ae = { columnWidth: 30 };
|
|
303
|
+
async function je(e, t, n = [], r = {}) {
|
|
304
304
|
if (!e || !t) return;
|
|
305
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
305
|
+
let { columnStyle: i } = r, { columnWidth: a } = Ae;
|
|
306
306
|
t.forEach((e) => {
|
|
307
307
|
e.width = e.width ? e.width : a;
|
|
308
308
|
});
|
|
309
|
-
let { workbook: o, worksheet: s } =
|
|
310
|
-
s.columns = t, s.addRows(n), i && await
|
|
309
|
+
let { workbook: o, worksheet: s } = Me();
|
|
310
|
+
s.columns = t, s.addRows(n), i && await Ne(o, s, i);
|
|
311
311
|
try {
|
|
312
312
|
let t = await o.xlsx.writeBuffer();
|
|
313
313
|
L(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
@@ -315,25 +315,25 @@ async function Me(e, t, n = [], r = {}) {
|
|
|
315
315
|
console.log(e);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function Me() {
|
|
319
319
|
let e = new R.Workbook();
|
|
320
320
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
321
321
|
workbook: e,
|
|
322
322
|
worksheet: e.addWorksheet("Sheet1")
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
async function
|
|
325
|
+
async function Ne(e, t, n) {
|
|
326
326
|
let r = Object.keys(n);
|
|
327
327
|
for (let i of r) {
|
|
328
328
|
let r = n[i], { type: a } = r;
|
|
329
329
|
switch (a) {
|
|
330
330
|
case "IMG":
|
|
331
|
-
await
|
|
331
|
+
await Pe(e, t, i, r);
|
|
332
332
|
break;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
336
|
+
async function Pe(e, t, n, r) {
|
|
337
337
|
let i = t.getColumn(n), a = i.values;
|
|
338
338
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
339
339
|
t > 1 && (e.height = 40);
|
|
@@ -341,7 +341,7 @@ async function Fe(e, t, n, r) {
|
|
|
341
341
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
342
342
|
if (n < 2) continue;
|
|
343
343
|
let r = a[n];
|
|
344
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
344
|
+
r && (t.getCell(i.letter + n).value = "", await Fe(e, t, r, {
|
|
345
345
|
width: 100,
|
|
346
346
|
height: 50,
|
|
347
347
|
col: i._number - 1,
|
|
@@ -349,8 +349,8 @@ async function Fe(e, t, n, r) {
|
|
|
349
349
|
}));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
async function
|
|
353
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
352
|
+
async function Fe(e, t, n, r) {
|
|
353
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Ie(n, .3);
|
|
354
354
|
if (c) {
|
|
355
355
|
let n = e.addImage({
|
|
356
356
|
base64: l,
|
|
@@ -368,7 +368,7 @@ async function Ie(e, t, n, r) {
|
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Ie(e, t = 1) {
|
|
372
372
|
let n = new Image();
|
|
373
373
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
374
374
|
n.onload = () => {
|
|
@@ -382,8 +382,8 @@ function Le(e, t = 1) {
|
|
|
382
382
|
};
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
async function
|
|
385
|
+
var Le = "---";
|
|
386
|
+
async function Re(e, t) {
|
|
387
387
|
let { fields: n, range: r = 1 } = t;
|
|
388
388
|
if (!n) {
|
|
389
389
|
let e = Q();
|
|
@@ -407,8 +407,8 @@ async function ze(e, t) {
|
|
|
407
407
|
if (i > r) {
|
|
408
408
|
let r = { _excelRowNumber: i }, a = !0;
|
|
409
409
|
Object.keys(o).forEach((t) => {
|
|
410
|
-
let [c, l] = o[t].split(
|
|
411
|
-
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(
|
|
410
|
+
let [c, l] = o[t].split(Le), u = e.getCell(c), d;
|
|
411
|
+
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(Le)[1]), typeof d == "string" && (d = d.trim()), r[t] = d, d && (a = !1);
|
|
412
412
|
}), a || t.push(r);
|
|
413
413
|
}
|
|
414
414
|
}), a[e._name] = t;
|
|
@@ -416,16 +416,16 @@ async function ze(e, t) {
|
|
|
416
416
|
}
|
|
417
417
|
}), i = null, a;
|
|
418
418
|
}
|
|
419
|
-
var
|
|
419
|
+
var ze = {
|
|
420
420
|
date: "yyyy-mm-dd",
|
|
421
421
|
number: "0",
|
|
422
422
|
string: "@"
|
|
423
423
|
};
|
|
424
|
-
async function
|
|
424
|
+
async function Be(e, t) {
|
|
425
425
|
if (!e || t.length == 0) return;
|
|
426
|
-
let n =
|
|
426
|
+
let n = Ve(t);
|
|
427
427
|
for (let e of n.worksheets) {
|
|
428
|
-
let { columnWidth: r } =
|
|
428
|
+
let { columnWidth: r } = Ae, i = t[e.name];
|
|
429
429
|
if (!i) continue;
|
|
430
430
|
let { tableHeader: a, tableData: o } = i;
|
|
431
431
|
a.forEach((e) => {
|
|
@@ -439,9 +439,9 @@ async function Ve(e, t) {
|
|
|
439
439
|
};
|
|
440
440
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
441
441
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
442
|
-
if (d.numFmt =
|
|
442
|
+
if (d.numFmt = ze[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
443
443
|
let t = n.addWorksheet(a);
|
|
444
|
-
t.state = "hidden", u ||= (e) => `${e.label}${
|
|
444
|
+
t.state = "hidden", u ||= (e) => `${e.label}${Le}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
445
445
|
if (n > 0) {
|
|
446
446
|
let t = Q();
|
|
447
447
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
@@ -467,48 +467,48 @@ async function Ve(e, t) {
|
|
|
467
467
|
console.log(e);
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Ve(e) {
|
|
471
471
|
let t = Q(), n = new R.Workbook();
|
|
472
472
|
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) => {
|
|
473
473
|
let i = r, a = !1;
|
|
474
474
|
/[\\/:*?\[\]]/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);
|
|
475
475
|
}), n;
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function He(e) {
|
|
478
478
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Ue(e) {
|
|
481
481
|
let t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
|
|
482
482
|
for (let e = 0; e < i; ++e) a[e] = r.charCodeAt(e);
|
|
483
483
|
return new Blob([a], { type: n });
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
let n =
|
|
485
|
+
function We(e, t = "image.png") {
|
|
486
|
+
let n = Ue(e);
|
|
487
487
|
return new File([n], t, { type: n.type });
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Ge(e, t) {
|
|
490
490
|
let n = e.match(/^data:image\/(\w+);base64,/), r = n ? n[1] : "png";
|
|
491
491
|
t ||= `image_${Date.now()}.${r}`;
|
|
492
|
-
let i =
|
|
492
|
+
let i = We(e, t), a = new FormData();
|
|
493
493
|
return a.append("file", i), a;
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Ke(e) {
|
|
496
496
|
let { sortData: t = {}, visibleData: n = {} } = JSON.parse(localStorage.getItem("VXE_CUSTOM_STORE") || "{}")[e ? `listPageId-${e}` : "listPageId-default"] || {}, r = Object.keys(t), i = Object.keys(n);
|
|
497
|
-
return i.push("type=checkbox", "action", "actions"),
|
|
497
|
+
return i.push("type=checkbox", "action", "actions"), fe(r, ...i);
|
|
498
498
|
}
|
|
499
499
|
//#endregion
|
|
500
500
|
//#region src/utils/tools/tools.js
|
|
501
|
-
function
|
|
501
|
+
function qe(e) {
|
|
502
502
|
return new Promise((t) => {
|
|
503
503
|
setTimeout(() => {
|
|
504
504
|
t();
|
|
505
505
|
}, e);
|
|
506
506
|
});
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Je(e) {
|
|
509
509
|
return JSON.parse(JSON.stringify(e));
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Ye(e) {
|
|
512
512
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
513
513
|
for (let i of e) {
|
|
514
514
|
n[i.id] = {
|
|
@@ -520,10 +520,10 @@ function Xe(e) {
|
|
|
520
520
|
}
|
|
521
521
|
return t;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Xe(e, t = " ") {
|
|
524
524
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
525
525
|
}
|
|
526
|
-
var
|
|
526
|
+
var Ze = class {
|
|
527
527
|
constructor(e, t = [
|
|
528
528
|
"label",
|
|
529
529
|
"value",
|
|
@@ -541,7 +541,7 @@ var Qe = class {
|
|
|
541
541
|
}
|
|
542
542
|
getName(e) {
|
|
543
543
|
if (!this.has(e)) return "-";
|
|
544
|
-
let t =
|
|
544
|
+
let t = Oe().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
545
545
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
546
546
|
}
|
|
547
547
|
getTag(e) {
|
|
@@ -567,40 +567,40 @@ var Qe = class {
|
|
|
567
567
|
return this.labelMap.get(e) ?? null;
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
|
-
function
|
|
571
|
-
if (e.length == 0) return new
|
|
570
|
+
function Qe(e, t = [], n = "i18nName") {
|
|
571
|
+
if (e.length == 0) return new Ze([]);
|
|
572
572
|
if (t.length < 2) {
|
|
573
573
|
let e = Q();
|
|
574
574
|
throw Error(e("tools.keysLengthError"));
|
|
575
575
|
}
|
|
576
|
-
return new
|
|
576
|
+
return new Ze(e.map((e) => {
|
|
577
577
|
let r = {};
|
|
578
578
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
579
579
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
580
580
|
}), r;
|
|
581
581
|
}));
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function $e(e) {
|
|
584
584
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function et(e) {
|
|
587
587
|
return e ? (e.includes("\\\\u") && (e = e.replace(/\\/g, "")), e.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
|
|
588
588
|
}
|
|
589
|
-
function
|
|
589
|
+
function tt(e, t = 10) {
|
|
590
590
|
let n = 1024 * 1024 * t;
|
|
591
591
|
return !(e.size > n);
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function nt(e) {
|
|
594
594
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
596
|
+
function rt(e) {
|
|
597
597
|
let t = {};
|
|
598
598
|
return e.map((e, n) => {
|
|
599
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
599
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = He(n);
|
|
600
600
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
601
601
|
}), t;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function it(e, t) {
|
|
604
604
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
605
605
|
}
|
|
606
606
|
//#endregion
|
|
@@ -609,7 +609,7 @@ var $ = (e, t) => {
|
|
|
609
609
|
let n = e.__vccOpts || e;
|
|
610
610
|
for (let [e, r] of t) n[e] = r;
|
|
611
611
|
return n;
|
|
612
|
-
},
|
|
612
|
+
}, at = ["onClick"], ot = /* @__PURE__ */ $({
|
|
613
613
|
__name: "index",
|
|
614
614
|
props: /* @__PURE__ */ b({
|
|
615
615
|
api: { type: Function },
|
|
@@ -652,9 +652,9 @@ var $ = (e, t) => {
|
|
|
652
652
|
"changeAll"
|
|
653
653
|
], ["update:modelValue"]),
|
|
654
654
|
setup(e, { emit: t }) {
|
|
655
|
-
let n = e, r = F(), { t: i, locale: a } = B(), o =
|
|
655
|
+
let n = e, r = F(), { t: i, locale: a } = B(), o = re(e, "modelValue"), s = l(() => r["value-key"] != null), _ = k(""), v = l(() => {
|
|
656
656
|
if (r.remote !== void 0) return n.data;
|
|
657
|
-
let e =
|
|
657
|
+
let e = Xe(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
658
658
|
if (e.length == 0) return o;
|
|
659
659
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
660
660
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -679,16 +679,16 @@ var $ = (e, t) => {
|
|
|
679
679
|
});
|
|
680
680
|
}
|
|
681
681
|
let T = k(null);
|
|
682
|
-
function
|
|
682
|
+
function E() {
|
|
683
683
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
684
684
|
b("change", e), S(() => {
|
|
685
685
|
n.optionClick && n.optionClick(e);
|
|
686
686
|
});
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function ee(e) {
|
|
689
689
|
T.value = e;
|
|
690
690
|
}
|
|
691
|
-
let O = n.labelValue.label.split("-"),
|
|
691
|
+
let O = n.labelValue.label.split("-"), M = (e) => {
|
|
692
692
|
if (O.length == 1) {
|
|
693
693
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
694
694
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
@@ -700,13 +700,13 @@ var $ = (e, t) => {
|
|
|
700
700
|
}), t.join("-");
|
|
701
701
|
}
|
|
702
702
|
};
|
|
703
|
-
function
|
|
703
|
+
function ne(e) {
|
|
704
704
|
let t = n.data ? n.data : C.value;
|
|
705
705
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
706
706
|
b("change", o.value), b("changeAll", o.value, t);
|
|
707
707
|
});
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function ae(e) {
|
|
710
710
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
711
711
|
n.optionClick && n.optionClick(e);
|
|
712
712
|
});
|
|
@@ -715,30 +715,30 @@ var $ = (e, t) => {
|
|
|
715
715
|
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);
|
|
716
716
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function L(e) {
|
|
719
719
|
return e.map((e) => ({
|
|
720
720
|
...e,
|
|
721
|
-
label:
|
|
721
|
+
label: M(e),
|
|
722
722
|
value: s.value ? e : e[n.labelValue.value]
|
|
723
723
|
}));
|
|
724
724
|
}
|
|
725
|
-
let
|
|
726
|
-
|
|
727
|
-
let t =
|
|
728
|
-
if (t.length !==
|
|
725
|
+
let R = k([]);
|
|
726
|
+
R.value = L(n.data ? n.data : C.value), ie(() => n.data ? n.data : C.value, (e) => {
|
|
727
|
+
let t = L(e);
|
|
728
|
+
if (t.length !== R.value.length) R.value = t;
|
|
729
729
|
else {
|
|
730
730
|
let e = !1;
|
|
731
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
731
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== R.value[n]?.value) {
|
|
732
732
|
e = !0;
|
|
733
733
|
break;
|
|
734
734
|
}
|
|
735
|
-
e && (
|
|
735
|
+
e && (R.value = t);
|
|
736
736
|
}
|
|
737
737
|
}, { deep: !0 });
|
|
738
|
-
let
|
|
738
|
+
let z = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? R.value.map((e) => ({
|
|
739
739
|
...e,
|
|
740
740
|
disabled: oe(e)
|
|
741
|
-
})) :
|
|
741
|
+
})) : R.value);
|
|
742
742
|
return (t, n) => {
|
|
743
743
|
let i = j("el-checkbox"), a = j("el-select-v2"), l = j("el-option"), b = j("el-select");
|
|
744
744
|
return P(r).v2 == null ? (D(), u(b, x({
|
|
@@ -750,20 +750,20 @@ var $ = (e, t) => {
|
|
|
750
750
|
"collapse-tags-tooltip": "",
|
|
751
751
|
"filter-method": P(r).remote == null ? (e) => _.value = e : void 0,
|
|
752
752
|
clearable: ""
|
|
753
|
-
}, P(r), { onClear:
|
|
753
|
+
}, P(r), { onClear: E }), {
|
|
754
754
|
default: I(() => [P(r).multiple != null && e.showCheckAll && e.maxLimit == null ? A(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
755
755
|
class: "mgl20",
|
|
756
756
|
modelValue: y.value,
|
|
757
757
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
758
|
-
onChange:
|
|
758
|
+
onChange: ne
|
|
759
759
|
}, {
|
|
760
760
|
default: I(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
761
761
|
_: 1
|
|
762
762
|
}, 8, ["modelValue"])], !0) : d("", !0), (D(!0), f(c, null, te(v.value, (t, n) => (D(), u(l, {
|
|
763
763
|
key: n,
|
|
764
|
-
label:
|
|
764
|
+
label: M(t),
|
|
765
765
|
disabled: P(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? oe(t) : !1,
|
|
766
|
-
onClick:
|
|
766
|
+
onClick: se((e) => ae(t), ["stop"]),
|
|
767
767
|
value: s.value ? t : t[e.labelValue.value]
|
|
768
768
|
}, null, 8, [
|
|
769
769
|
"label",
|
|
@@ -774,7 +774,7 @@ var $ = (e, t) => {
|
|
|
774
774
|
_: 3
|
|
775
775
|
}, 16, ["modelValue", "filter-method"])) : (D(), u(a, x({
|
|
776
776
|
key: 0,
|
|
777
|
-
options:
|
|
777
|
+
options: z.value,
|
|
778
778
|
modelValue: o.value,
|
|
779
779
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
780
780
|
}, P(r), {
|
|
@@ -784,7 +784,7 @@ var $ = (e, t) => {
|
|
|
784
784
|
clearable: "",
|
|
785
785
|
onChange: w
|
|
786
786
|
}), m({
|
|
787
|
-
default: I(({ item: e }) => [p("div", { onClick: (t) =>
|
|
787
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => ee(e) }, N(e.label), 9, at)]),
|
|
788
788
|
_: 2
|
|
789
789
|
}, [P(r).multiple == null ? void 0 : {
|
|
790
790
|
name: "header",
|
|
@@ -792,7 +792,7 @@ var $ = (e, t) => {
|
|
|
792
792
|
class: "mgl20",
|
|
793
793
|
modelValue: y.value,
|
|
794
794
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
795
|
-
onChange:
|
|
795
|
+
onChange: ne
|
|
796
796
|
}, {
|
|
797
797
|
default: I(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
798
798
|
_: 1
|
|
@@ -801,18 +801,18 @@ var $ = (e, t) => {
|
|
|
801
801
|
}]), 1040, ["options", "modelValue"]));
|
|
802
802
|
};
|
|
803
803
|
}
|
|
804
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
804
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), st = _({ props: { name: {
|
|
805
805
|
tyepe: String,
|
|
806
806
|
required: !0
|
|
807
807
|
} } });
|
|
808
|
-
function
|
|
808
|
+
function ct(e, t, n, r, i, a) {
|
|
809
809
|
let o = j("el-icon");
|
|
810
810
|
return D(), u(o, { class: "cmp-icon" }, {
|
|
811
811
|
default: I(() => [(D(), u(M(e.name)))]),
|
|
812
812
|
_: 1
|
|
813
813
|
});
|
|
814
814
|
}
|
|
815
|
-
var
|
|
815
|
+
var lt = /* @__PURE__ */ $(st, [["render", ct], ["__scopeId", "data-v-733f9daa"]]), ut = {
|
|
816
816
|
__name: "index",
|
|
817
817
|
props: { fontColor: String },
|
|
818
818
|
setup(e) {
|
|
@@ -828,11 +828,11 @@ var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]
|
|
|
828
828
|
}, 16, ["style"]);
|
|
829
829
|
};
|
|
830
830
|
}
|
|
831
|
-
},
|
|
831
|
+
}, dt = { class: "confirm-button-wrapper" }, ft = /* @__PURE__ */ $({
|
|
832
832
|
__name: "index",
|
|
833
833
|
emits: ["ok", "no"],
|
|
834
834
|
setup(e, { emit: t }) {
|
|
835
|
-
let n = t, r =
|
|
835
|
+
let n = t, r = ue(() => {
|
|
836
836
|
n("ok");
|
|
837
837
|
}, 500);
|
|
838
838
|
function i() {
|
|
@@ -840,7 +840,7 @@ var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]
|
|
|
840
840
|
}
|
|
841
841
|
return (e, t) => {
|
|
842
842
|
let n = j("el-popconfirm");
|
|
843
|
-
return D(), f("span",
|
|
843
|
+
return D(), f("span", dt, [g(n, x(e.$attrs, {
|
|
844
844
|
onConfirm: P(r),
|
|
845
845
|
onCancel: i
|
|
846
846
|
}), {
|
|
@@ -849,7 +849,7 @@ var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]
|
|
|
849
849
|
}, 16, ["onConfirm"])]);
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
852
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), pt = { class: "ImportButton" }, mt = ["accept"], ht = /* @__PURE__ */ $({
|
|
853
853
|
__name: "index",
|
|
854
854
|
props: {
|
|
855
855
|
accept: {
|
|
@@ -885,7 +885,7 @@ var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]
|
|
|
885
885
|
return;
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
let c = await
|
|
888
|
+
let c = await Re(s, n.fields).catch(() => {
|
|
889
889
|
a.value = !1;
|
|
890
890
|
}).finally(() => {
|
|
891
891
|
r.value.value = null;
|
|
@@ -896,7 +896,7 @@ var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]
|
|
|
896
896
|
}
|
|
897
897
|
return (t, n) => {
|
|
898
898
|
let i = j("el-button");
|
|
899
|
-
return D(), f("div",
|
|
899
|
+
return D(), f("div", pt, [g(i, x({
|
|
900
900
|
type: "primary",
|
|
901
901
|
loading: a.value,
|
|
902
902
|
class: "mgr10",
|
|
@@ -916,17 +916,17 @@ var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]
|
|
|
916
916
|
opacity: "0"
|
|
917
917
|
},
|
|
918
918
|
type: "file"
|
|
919
|
-
}, null, 40,
|
|
919
|
+
}, null, 40, mt)]);
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
922
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
923
923
|
//#endregion
|
|
924
924
|
//#region src/components/SearchBar/tools.js
|
|
925
|
-
function
|
|
925
|
+
function gt(e) {
|
|
926
926
|
let t = {};
|
|
927
927
|
return e?.forEach((e) => {
|
|
928
928
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date", format: s = (e) => e } = e;
|
|
929
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
929
|
+
if (n) if (r == "input" && i?.multiple) t[n] = Xe(a);
|
|
930
930
|
else if (r == "date") if (o.includes("range")) {
|
|
931
931
|
let [e, r] = n, [i, s] = a || [];
|
|
932
932
|
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;
|
|
@@ -936,7 +936,7 @@ function _t(e) {
|
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region src/components/SearchBar/index.vue
|
|
939
|
-
var
|
|
939
|
+
var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { class: "right" }, xt = /* @__PURE__ */ $({
|
|
940
940
|
__name: "index",
|
|
941
941
|
props: { form: {
|
|
942
942
|
type: Object,
|
|
@@ -966,23 +966,23 @@ var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { clas
|
|
|
966
966
|
i("confirm");
|
|
967
967
|
}
|
|
968
968
|
function T() {
|
|
969
|
-
return
|
|
969
|
+
return gt(r.form.items);
|
|
970
970
|
}
|
|
971
|
-
let
|
|
972
|
-
function
|
|
971
|
+
let E = le(r.form.items);
|
|
972
|
+
function ee() {
|
|
973
973
|
r.form?.items?.forEach((e) => {
|
|
974
|
-
let t =
|
|
974
|
+
let t = E.find((t) => t.key == e.key);
|
|
975
975
|
t && (e.value = t.value);
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
978
|
return t({
|
|
979
979
|
getPrm: T,
|
|
980
|
-
reset:
|
|
980
|
+
reset: ee
|
|
981
981
|
}), (t, n) => {
|
|
982
|
-
let r = j("el-input"), s = j("el-date-picker"), l = j("el-form-item"), T = j("el-form"),
|
|
982
|
+
let r = j("el-input"), s = j("el-date-picker"), l = j("el-form-item"), T = j("el-form"), E = j("el-link"), ee = j("el-button");
|
|
983
983
|
return D(), f("div", {
|
|
984
984
|
class: "searchBar-container mgt10 mgb10",
|
|
985
|
-
onKeydown:
|
|
985
|
+
onKeydown: oe(v, ["enter"])
|
|
986
986
|
}, [p("div", {
|
|
987
987
|
class: "searchBar",
|
|
988
988
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -990,7 +990,7 @@ var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { clas
|
|
|
990
990
|
inline: "",
|
|
991
991
|
model: e.form.data
|
|
992
992
|
}, {
|
|
993
|
-
default: I(() => [(D(!0), f(c, null, te(e.form?.items?.filter((e) => !e.hidden), (e) => (D(), f(c, { key: e.key }, [e.type == "br" ? (D(), f("br",
|
|
993
|
+
default: I(() => [(D(!0), f(c, null, te(e.form?.items?.filter((e) => !e.hidden), (e) => (D(), f(c, { key: e.key }, [e.type == "br" ? (D(), f("br", _t)) : (D(), u(l, {
|
|
994
994
|
key: 1,
|
|
995
995
|
label: e.name
|
|
996
996
|
}, {
|
|
@@ -1008,7 +1008,7 @@ var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { clas
|
|
|
1008
1008
|
"class",
|
|
1009
1009
|
"placeholder"
|
|
1010
1010
|
])) : e.type === "custom" ? (D(), u(M(e.render), { key: 1 })) : d("", !0),
|
|
1011
|
-
e.type === "select" ? (D(), u(
|
|
1011
|
+
e.type === "select" ? (D(), u(ot, x({
|
|
1012
1012
|
key: 2,
|
|
1013
1013
|
class: e.option?.class || "w150",
|
|
1014
1014
|
modelValue: e.value,
|
|
@@ -1055,25 +1055,25 @@ var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { clas
|
|
|
1055
1055
|
_: 2
|
|
1056
1056
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1057
1057
|
_: 1
|
|
1058
|
-
}, 8, ["model"])], 4), p("div",
|
|
1059
|
-
g(
|
|
1058
|
+
}, 8, ["model"])], 4), p("div", vt, [p("div", yt, [A(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", bt, [
|
|
1059
|
+
g(E, {
|
|
1060
1060
|
underline: "never",
|
|
1061
1061
|
class: "mgr10",
|
|
1062
1062
|
onClick: n[0] ||= () => {
|
|
1063
1063
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1064
1064
|
}
|
|
1065
1065
|
}, {
|
|
1066
|
-
default: I(() => [g(
|
|
1066
|
+
default: I(() => [g(lt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + N(_.value), 1)]),
|
|
1067
1067
|
_: 1
|
|
1068
1068
|
}),
|
|
1069
|
-
g(
|
|
1069
|
+
g(ee, {
|
|
1070
1070
|
type: "primary",
|
|
1071
1071
|
onClick: v
|
|
1072
1072
|
}, {
|
|
1073
1073
|
default: I(() => [h(N(t.$t("shai-xuan")), 1)]),
|
|
1074
1074
|
_: 1
|
|
1075
1075
|
}),
|
|
1076
|
-
g(
|
|
1076
|
+
g(ee, {
|
|
1077
1077
|
type: "primary",
|
|
1078
1078
|
onClick: b
|
|
1079
1079
|
}, {
|
|
@@ -1084,7 +1084,7 @@ var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { clas
|
|
|
1084
1084
|
])])], 32);
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
|
-
}, [["__scopeId", "data-v-3e596b3b"]]),
|
|
1087
|
+
}, [["__scopeId", "data-v-3e596b3b"]]), St = {
|
|
1088
1088
|
pageNoKey: "pageNo",
|
|
1089
1089
|
pageSizeKey: "pageSize",
|
|
1090
1090
|
totalKey: "total",
|
|
@@ -1108,26 +1108,26 @@ var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { clas
|
|
|
1108
1108
|
showShadow: !1,
|
|
1109
1109
|
showCheckBox: !1,
|
|
1110
1110
|
enableCellCopy: !0
|
|
1111
|
-
},
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1114
|
-
...
|
|
1111
|
+
}, Ct = { ...St };
|
|
1112
|
+
function wt(e) {
|
|
1113
|
+
Ct = {
|
|
1114
|
+
...Ct,
|
|
1115
1115
|
...e,
|
|
1116
1116
|
responseDataKeys: {
|
|
1117
|
-
...
|
|
1117
|
+
...Ct.responseDataKeys,
|
|
1118
1118
|
...e.responseDataKeys || {}
|
|
1119
1119
|
}
|
|
1120
1120
|
};
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1123
|
-
return
|
|
1122
|
+
function Tt() {
|
|
1123
|
+
return Ct;
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1126
|
-
|
|
1125
|
+
function Et() {
|
|
1126
|
+
Ct = { ...St };
|
|
1127
1127
|
}
|
|
1128
1128
|
//#endregion
|
|
1129
1129
|
//#region src/components/ListPage/index.vue
|
|
1130
|
-
var
|
|
1130
|
+
var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
1131
1131
|
__name: "index",
|
|
1132
1132
|
props: {
|
|
1133
1133
|
id: {
|
|
@@ -1157,19 +1157,19 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1157
1157
|
}
|
|
1158
1158
|
},
|
|
1159
1159
|
setup(e, { expose: t }) {
|
|
1160
|
-
let { t: n, locale: r } = B(), i =
|
|
1160
|
+
let { t: n, locale: r } = B(), i = Tt(), a = e, o = k(!1), s = k([]);
|
|
1161
1161
|
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 = []);
|
|
1162
|
-
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m =
|
|
1162
|
+
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m = le(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = O({
|
|
1163
1163
|
[_]: 1,
|
|
1164
1164
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1165
1165
|
total: 0
|
|
1166
|
-
}), b = k(null), w = k(null), te = k(450), M =
|
|
1166
|
+
}), b = k(null), w = k(null), te = k(450), M = ue(() => {
|
|
1167
1167
|
S(() => {
|
|
1168
1168
|
if (!w.value) return;
|
|
1169
1169
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1170
1170
|
te.value = Math.max(t, 200);
|
|
1171
1171
|
});
|
|
1172
|
-
}, 100),
|
|
1172
|
+
}, 100), ne = () => {
|
|
1173
1173
|
M();
|
|
1174
1174
|
}, F = () => {
|
|
1175
1175
|
if (b.value) return b.value;
|
|
@@ -1179,39 +1179,39 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1179
1179
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1180
1180
|
}
|
|
1181
1181
|
return null;
|
|
1182
|
-
},
|
|
1182
|
+
}, re = () => {
|
|
1183
1183
|
if (!a.searchForm.enableCellCopy) return !1;
|
|
1184
1184
|
let e = F();
|
|
1185
1185
|
if (!e || !e.$el) return !1;
|
|
1186
1186
|
let t = e.$el;
|
|
1187
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown",
|
|
1187
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown", Me), t.addEventListener("mousedown", Ce), t.addEventListener("mousemove", we), t.addEventListener("mouseup", Te), t.addEventListener("keydown", Me);
|
|
1188
1188
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1189
|
-
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll",
|
|
1189
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", ke), n.addEventListener("scroll", ke), n.__cellCopyScrollBound = !0), Oe(), !0;
|
|
1190
1190
|
};
|
|
1191
1191
|
T(() => {
|
|
1192
|
-
M(), window.addEventListener("resize",
|
|
1193
|
-
|
|
1192
|
+
M(), window.addEventListener("resize", ne), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", Pe), setTimeout(() => {
|
|
1193
|
+
re();
|
|
1194
1194
|
}, 500));
|
|
1195
|
-
}),
|
|
1195
|
+
}), ee(() => {
|
|
1196
1196
|
a.searchForm.enableCellCopy && setTimeout(() => {
|
|
1197
|
-
|
|
1197
|
+
re();
|
|
1198
1198
|
}, 500);
|
|
1199
|
-
}),
|
|
1200
|
-
if (window.removeEventListener("resize",
|
|
1201
|
-
document.removeEventListener("mouseup",
|
|
1199
|
+
}), E(() => {
|
|
1200
|
+
if (window.removeEventListener("resize", ne), a.searchForm.enableCellCopy) {
|
|
1201
|
+
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove", be), K(), Q();
|
|
1202
1202
|
let e = F();
|
|
1203
1203
|
if (e && e.$el) {
|
|
1204
1204
|
let t = e.$el;
|
|
1205
|
-
t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown",
|
|
1205
|
+
t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown", Me);
|
|
1206
1206
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1207
|
-
n && (n.removeEventListener("scroll",
|
|
1207
|
+
n && (n.removeEventListener("scroll", ke), n.__cellCopyScrollBound = !1);
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
1210
|
});
|
|
1211
|
-
let
|
|
1212
|
-
async function
|
|
1211
|
+
let ie = l(() => me.value.height || te.value), ae;
|
|
1212
|
+
async function oe(e) {
|
|
1213
1213
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1214
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1214
|
+
e[_] != 1 && (e.nextSearchAfter = ae), o.value = !0;
|
|
1215
1215
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1216
1216
|
o.value = !1, a.searchForm.selections = [];
|
|
1217
1217
|
});
|
|
@@ -1222,7 +1222,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1222
1222
|
});
|
|
1223
1223
|
let e = [];
|
|
1224
1224
|
for (let n of t.rows) {
|
|
1225
|
-
let t =
|
|
1225
|
+
let t = it(c, n);
|
|
1226
1226
|
if (t) {
|
|
1227
1227
|
e = t;
|
|
1228
1228
|
break;
|
|
@@ -1230,60 +1230,60 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1230
1230
|
}
|
|
1231
1231
|
let i = 0;
|
|
1232
1232
|
for (let e of t.total) {
|
|
1233
|
-
let t =
|
|
1233
|
+
let t = it(c, e);
|
|
1234
1234
|
if (t !== void 0) {
|
|
1235
1235
|
i = t;
|
|
1236
1236
|
break;
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
s.value = n ? n(e) : e, y.total = i,
|
|
1239
|
+
s.value = n ? n(e) : e, y.total = i, ae = c.nextSearchAfter, a.searchForm.enableCellCopy && (Ee(), U = /* @__PURE__ */ new WeakMap(), ge = null, S(() => {
|
|
1240
1240
|
setTimeout(() => {
|
|
1241
|
-
|
|
1241
|
+
re();
|
|
1242
1242
|
}, 500);
|
|
1243
1243
|
}));
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function L(e = {}) {
|
|
1247
1247
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1248
|
-
|
|
1248
|
+
oe({
|
|
1249
1249
|
...y,
|
|
1250
|
-
...
|
|
1250
|
+
...gt(a.searchForm.items),
|
|
1251
1251
|
...e,
|
|
1252
1252
|
...n
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function R() {
|
|
1256
1256
|
let { reset: e } = a.tableConfig;
|
|
1257
1257
|
e && e(), a.searchForm?.items?.forEach((e) => {
|
|
1258
|
-
let t = m.find((t) =>
|
|
1258
|
+
let t = m.find((t) => de(e.key) && de(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1259
1259
|
t && (e.value = t.value);
|
|
1260
|
-
}),
|
|
1260
|
+
}), L();
|
|
1261
1261
|
}
|
|
1262
|
-
a.api && a.immediate &&
|
|
1263
|
-
function
|
|
1262
|
+
a.api && a.immediate && L();
|
|
1263
|
+
function z() {
|
|
1264
1264
|
return {
|
|
1265
1265
|
...y,
|
|
1266
|
-
...
|
|
1266
|
+
...gt(a.searchForm.items)
|
|
1267
1267
|
};
|
|
1268
1268
|
}
|
|
1269
|
-
let
|
|
1269
|
+
let ce = () => {
|
|
1270
1270
|
let e = b.value;
|
|
1271
1271
|
e && e.clearSort();
|
|
1272
|
-
},
|
|
1272
|
+
}, fe = O({ storage: !0 }), pe = O({
|
|
1273
1273
|
drag: !0,
|
|
1274
1274
|
resizable: !0,
|
|
1275
1275
|
maxFixedSize: 0
|
|
1276
|
-
}),
|
|
1276
|
+
}), me = l(() => {
|
|
1277
1277
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1278
1278
|
return {
|
|
1279
1279
|
headerAlign: "left",
|
|
1280
1280
|
align: "center",
|
|
1281
1281
|
customConfig: {
|
|
1282
|
-
...
|
|
1282
|
+
...fe,
|
|
1283
1283
|
...e
|
|
1284
1284
|
},
|
|
1285
1285
|
columnConfig: {
|
|
1286
|
-
...
|
|
1286
|
+
...pe,
|
|
1287
1287
|
...t
|
|
1288
1288
|
},
|
|
1289
1289
|
"virtual-x-config": {
|
|
@@ -1301,7 +1301,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1301
1301
|
startCell: null,
|
|
1302
1302
|
endCell: null,
|
|
1303
1303
|
selectedCells: []
|
|
1304
|
-
}), H = null,
|
|
1304
|
+
}), H = null, he = () => {
|
|
1305
1305
|
if (!V.startCell || !V.endCell) {
|
|
1306
1306
|
H = null, V.selectedCells = [];
|
|
1307
1307
|
return;
|
|
@@ -1319,14 +1319,14 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1319
1319
|
colIndex: e
|
|
1320
1320
|
});
|
|
1321
1321
|
V.selectedCells = i;
|
|
1322
|
-
},
|
|
1322
|
+
}, U = /* @__PURE__ */ new WeakMap(), ge = null, _e = 0, ve = (e, t) => {
|
|
1323
1323
|
let n = e.getTableData().fullData;
|
|
1324
|
-
if (n !==
|
|
1325
|
-
|
|
1326
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1324
|
+
if (n !== ge || n.length !== _e) {
|
|
1325
|
+
U = /* @__PURE__ */ new WeakMap(), ge = n, _e = n.length;
|
|
1326
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && U.set(n[e], e);
|
|
1327
1327
|
}
|
|
1328
|
-
return
|
|
1329
|
-
},
|
|
1328
|
+
return U.has(t) ? U.get(t) : -1;
|
|
1329
|
+
}, ye = (e) => {
|
|
1330
1330
|
let t = e.closest(".vxe-body--column");
|
|
1331
1331
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1332
1332
|
let n = t.closest(".vxe-body--row");
|
|
@@ -1336,7 +1336,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1336
1336
|
let i = -1, a = n.getAttribute("rowid");
|
|
1337
1337
|
if (a != null) {
|
|
1338
1338
|
let e = r.getRowById(a);
|
|
1339
|
-
e && (i =
|
|
1339
|
+
e && (i = ve(r, e));
|
|
1340
1340
|
}
|
|
1341
1341
|
if (i < 0) {
|
|
1342
1342
|
let e = n.parentElement;
|
|
@@ -1349,47 +1349,47 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1349
1349
|
colIndex: o,
|
|
1350
1350
|
cell: t
|
|
1351
1351
|
};
|
|
1352
|
-
},
|
|
1352
|
+
}, W = null, G = 0, be = (e) => {
|
|
1353
1353
|
if (!V.isSelecting) return;
|
|
1354
|
-
|
|
1354
|
+
G = e.clientY;
|
|
1355
1355
|
let t = F();
|
|
1356
1356
|
if (!t || !t.$el) return;
|
|
1357
1357
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1358
1358
|
if (!r) return;
|
|
1359
1359
|
let i = r.getBoundingClientRect();
|
|
1360
|
-
e.clientY < i.top -
|
|
1360
|
+
e.clientY < i.top - Ot || e.clientY > i.bottom + Ot ? W || xe() : K();
|
|
1361
1361
|
}, xe = () => {
|
|
1362
1362
|
let e = () => {
|
|
1363
1363
|
if (!V.isSelecting) {
|
|
1364
|
-
|
|
1364
|
+
K();
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
1367
|
let t = F();
|
|
1368
1368
|
if (!t || !t.$el) {
|
|
1369
|
-
|
|
1369
|
+
K();
|
|
1370
1370
|
return;
|
|
1371
1371
|
}
|
|
1372
1372
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1373
1373
|
if (!r) {
|
|
1374
|
-
|
|
1374
|
+
K();
|
|
1375
1375
|
return;
|
|
1376
1376
|
}
|
|
1377
1377
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1378
|
-
if (
|
|
1379
|
-
let e = i.top -
|
|
1380
|
-
a = -Math.min(
|
|
1381
|
-
} else if (
|
|
1382
|
-
let e =
|
|
1383
|
-
a = Math.min(
|
|
1378
|
+
if (G < i.top) {
|
|
1379
|
+
let e = i.top - G;
|
|
1380
|
+
a = -Math.min(kt, Math.max(2, e * At));
|
|
1381
|
+
} else if (G > i.bottom) {
|
|
1382
|
+
let e = G - i.bottom;
|
|
1383
|
+
a = Math.min(kt, Math.max(2, e * At));
|
|
1384
1384
|
} else {
|
|
1385
|
-
|
|
1385
|
+
K();
|
|
1386
1386
|
return;
|
|
1387
1387
|
}
|
|
1388
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Se(r, i),
|
|
1388
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Se(r, i), W = requestAnimationFrame(e);
|
|
1389
1389
|
};
|
|
1390
|
-
|
|
1391
|
-
},
|
|
1392
|
-
|
|
1390
|
+
W = requestAnimationFrame(e);
|
|
1391
|
+
}, K = () => {
|
|
1392
|
+
W &&= (cancelAnimationFrame(W), null);
|
|
1393
1393
|
}, Se = (e, t) => {
|
|
1394
1394
|
let n = F();
|
|
1395
1395
|
if (!n) return;
|
|
@@ -1400,7 +1400,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1400
1400
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1401
1401
|
if (a.length === 0) return;
|
|
1402
1402
|
let o = null;
|
|
1403
|
-
if (
|
|
1403
|
+
if (G < t.top ? o = a[0] : G > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1404
1404
|
let s = o.getAttribute("rowid");
|
|
1405
1405
|
if (s == null) return;
|
|
1406
1406
|
let c = -1, l = n.getRowById(s);
|
|
@@ -1409,36 +1409,36 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1409
1409
|
V.endCell = {
|
|
1410
1410
|
rowIndex: c,
|
|
1411
1411
|
colIndex: u
|
|
1412
|
-
},
|
|
1412
|
+
}, he(), Y();
|
|
1413
1413
|
}, Ce = (e) => {
|
|
1414
|
-
let t =
|
|
1414
|
+
let t = ye(e.target);
|
|
1415
1415
|
if (!t) {
|
|
1416
|
-
|
|
1416
|
+
Ee();
|
|
1417
1417
|
return;
|
|
1418
1418
|
}
|
|
1419
1419
|
let n = F();
|
|
1420
1420
|
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), V.isSelecting = !0, V.startCell = {
|
|
1421
1421
|
rowIndex: t.rowIndex,
|
|
1422
1422
|
colIndex: t.colIndex
|
|
1423
|
-
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove",
|
|
1424
|
-
},
|
|
1425
|
-
V.isSelecting && (
|
|
1426
|
-
if (
|
|
1427
|
-
let t =
|
|
1423
|
+
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove", be), he(), Y();
|
|
1424
|
+
}, q = null, we = (e) => {
|
|
1425
|
+
V.isSelecting && (q ||= requestAnimationFrame(() => {
|
|
1426
|
+
if (q = null, !V.isSelecting) return;
|
|
1427
|
+
let t = ye(e.target);
|
|
1428
1428
|
t && (V.endCell && V.endCell.rowIndex === t.rowIndex && V.endCell.colIndex === t.colIndex || (V.endCell = {
|
|
1429
1429
|
rowIndex: t.rowIndex,
|
|
1430
1430
|
colIndex: t.colIndex
|
|
1431
|
-
},
|
|
1431
|
+
}, he(), Y()));
|
|
1432
1432
|
}));
|
|
1433
1433
|
}, Te = () => {
|
|
1434
|
-
V.isSelecting = !1,
|
|
1435
|
-
},
|
|
1434
|
+
V.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1435
|
+
}, Ee = () => {
|
|
1436
1436
|
V.selectedCells = [], V.startCell = null, V.endCell = null, H = null;
|
|
1437
1437
|
let e = F();
|
|
1438
1438
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1439
1439
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1440
1440
|
});
|
|
1441
|
-
},
|
|
1441
|
+
}, J = () => {
|
|
1442
1442
|
let e = F();
|
|
1443
1443
|
if (!e) return;
|
|
1444
1444
|
let t = e.$el;
|
|
@@ -1467,7 +1467,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1467
1467
|
let d = l.get(String(u));
|
|
1468
1468
|
if (d === void 0) {
|
|
1469
1469
|
let t = e.getRowById(u);
|
|
1470
|
-
if (t && (d =
|
|
1470
|
+
if (t && (d = ve(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1471
1471
|
}
|
|
1472
1472
|
if (d < r || d > i) continue;
|
|
1473
1473
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1478,29 +1478,29 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
}
|
|
1481
|
-
},
|
|
1481
|
+
}, Y = () => {
|
|
1482
1482
|
S(() => {
|
|
1483
|
-
|
|
1483
|
+
J();
|
|
1484
1484
|
});
|
|
1485
|
-
},
|
|
1486
|
-
|
|
1487
|
-
|
|
1485
|
+
}, X = null, Z = null, De = () => {
|
|
1486
|
+
Z ||= requestAnimationFrame(() => {
|
|
1487
|
+
Z = null, J();
|
|
1488
1488
|
});
|
|
1489
|
-
},
|
|
1489
|
+
}, Oe = () => {
|
|
1490
1490
|
let e = F();
|
|
1491
1491
|
if (!e || !e.$el) return;
|
|
1492
1492
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1493
|
-
t && (
|
|
1494
|
-
H &&
|
|
1495
|
-
}),
|
|
1493
|
+
t && (Q(), X = new MutationObserver(() => {
|
|
1494
|
+
H && De();
|
|
1495
|
+
}), X.observe(t, {
|
|
1496
1496
|
childList: !0,
|
|
1497
1497
|
subtree: !1
|
|
1498
1498
|
}));
|
|
1499
|
-
},
|
|
1500
|
-
|
|
1501
|
-
},
|
|
1502
|
-
H &&
|
|
1503
|
-
},
|
|
1499
|
+
}, Q = () => {
|
|
1500
|
+
X &&= (X.disconnect(), null), Z &&= (cancelAnimationFrame(Z), null);
|
|
1501
|
+
}, ke = () => {
|
|
1502
|
+
H && De();
|
|
1503
|
+
}, Ae = (e) => e == null ? "" : typeof e == "object" ? Array.isArray(e) ? e.map((e) => typeof e == "object" && e ? e.label || e.name || e.text || e.title || JSON.stringify(e) : String(e)).join(", ") : e.label || e.name || e.text || e.title || JSON.stringify(e) : String(e), je = async () => {
|
|
1504
1504
|
if (!H) return;
|
|
1505
1505
|
let e = F();
|
|
1506
1506
|
if (!e) return;
|
|
@@ -1540,7 +1540,18 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
|
-
!l && i
|
|
1543
|
+
if (!l && i) if (typeof r.formatter == "function") try {
|
|
1544
|
+
let e = r.formatter({
|
|
1545
|
+
cellValue: s ? i[s] : void 0,
|
|
1546
|
+
row: i,
|
|
1547
|
+
column: r
|
|
1548
|
+
});
|
|
1549
|
+
o = e == null ? "" : String(e);
|
|
1550
|
+
} catch {
|
|
1551
|
+
o = s ? Ae(i[s]) : "";
|
|
1552
|
+
}
|
|
1553
|
+
else s && (o = Ae(i[s]));
|
|
1554
|
+
a.push(o);
|
|
1544
1555
|
}), f.push(a.join(" "));
|
|
1545
1556
|
});
|
|
1546
1557
|
let p = f.join("\n");
|
|
@@ -1549,23 +1560,23 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1549
1560
|
} catch (e) {
|
|
1550
1561
|
console.error("复制失败:", e);
|
|
1551
1562
|
}
|
|
1563
|
+
}, Me = (e) => {
|
|
1564
|
+
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), je()) : e.key === "Escape" && Ee());
|
|
1565
|
+
}, Ne = () => {
|
|
1566
|
+
V.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1552
1567
|
}, Pe = (e) => {
|
|
1553
|
-
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), Ne()) : e.key === "Escape" && X());
|
|
1554
|
-
}, Fe = () => {
|
|
1555
|
-
V.isSelecting = !1, J(), Y &&= (cancelAnimationFrame(Y), null), document.removeEventListener("mousemove", q);
|
|
1556
|
-
}, Ie = (e) => {
|
|
1557
1568
|
let t = F();
|
|
1558
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1559
|
-
},
|
|
1560
|
-
y[_] = e,
|
|
1561
|
-
},
|
|
1562
|
-
y[v] = e, y[_] = 1,
|
|
1569
|
+
!t || !t.$el || t.$el.contains(e.target) || Ee();
|
|
1570
|
+
}, Fe = (e) => {
|
|
1571
|
+
y[_] = e, L();
|
|
1572
|
+
}, Ie = (e) => {
|
|
1573
|
+
y[v] = e, y[_] = 1, L();
|
|
1563
1574
|
};
|
|
1564
|
-
function
|
|
1575
|
+
function Le() {
|
|
1565
1576
|
let e = b.value.getCheckboxRecords();
|
|
1566
1577
|
a.searchForm.selections = e;
|
|
1567
1578
|
}
|
|
1568
|
-
let
|
|
1579
|
+
let Re = (e) => {
|
|
1569
1580
|
let t = b.value;
|
|
1570
1581
|
if (t) {
|
|
1571
1582
|
t.toggleCheckboxRow(e);
|
|
@@ -1575,18 +1586,18 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1575
1586
|
};
|
|
1576
1587
|
return t({
|
|
1577
1588
|
tableRef: b,
|
|
1578
|
-
getList:
|
|
1579
|
-
getPrm:
|
|
1580
|
-
clearSort:
|
|
1589
|
+
getList: L,
|
|
1590
|
+
getPrm: z,
|
|
1591
|
+
clearSort: ce,
|
|
1581
1592
|
calculateTableHeight: M
|
|
1582
1593
|
}), (t, n) => {
|
|
1583
|
-
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"),
|
|
1594
|
+
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"), E = j("el-pagination");
|
|
1584
1595
|
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1585
|
-
e.searchForm.showSearch ? (D(), u(
|
|
1596
|
+
e.searchForm.showSearch ? (D(), u(xt, {
|
|
1586
1597
|
key: 0,
|
|
1587
1598
|
form: e.searchForm,
|
|
1588
|
-
onReset:
|
|
1589
|
-
onConfirm: n[1] ||= (e) =>
|
|
1599
|
+
onReset: R,
|
|
1600
|
+
onConfirm: n[1] ||= (e) => L(),
|
|
1590
1601
|
onVisibleChange: P(M)
|
|
1591
1602
|
}, {
|
|
1592
1603
|
btn: I(() => [
|
|
@@ -1597,14 +1608,14 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1597
1608
|
round: "",
|
|
1598
1609
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1599
1610
|
}, {
|
|
1600
|
-
default: I(() => [g(
|
|
1611
|
+
default: I(() => [g(lt, { name: "Tools" })]),
|
|
1601
1612
|
_: 1
|
|
1602
1613
|
})
|
|
1603
1614
|
]),
|
|
1604
1615
|
_: 3
|
|
1605
1616
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1606
1617
|
A(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1607
|
-
|
|
1618
|
+
p("div", {
|
|
1608
1619
|
ref_key: "tableContentRef",
|
|
1609
1620
|
ref: w,
|
|
1610
1621
|
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy })
|
|
@@ -1615,12 +1626,12 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1615
1626
|
loading: e.loading || o.value,
|
|
1616
1627
|
data: e.api ? s.value : e.data,
|
|
1617
1628
|
border: ""
|
|
1618
|
-
},
|
|
1619
|
-
height:
|
|
1620
|
-
onCheckboxChange:
|
|
1621
|
-
onCheckboxAll:
|
|
1622
|
-
onSortChange:
|
|
1623
|
-
onScroll:
|
|
1629
|
+
}, me.value, {
|
|
1630
|
+
height: ie.value,
|
|
1631
|
+
onCheckboxChange: Le,
|
|
1632
|
+
onCheckboxAll: Le,
|
|
1633
|
+
onSortChange: me.value["sort-config"]?.sortChange,
|
|
1634
|
+
onScroll: ke
|
|
1624
1635
|
}), {
|
|
1625
1636
|
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1626
1637
|
key: 0,
|
|
@@ -1629,18 +1640,18 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1629
1640
|
title: t.$t("xu-hao"),
|
|
1630
1641
|
fixed: "left"
|
|
1631
1642
|
}, {
|
|
1632
|
-
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div",
|
|
1643
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", Dt, [n ? (D(), u(l, {
|
|
1633
1644
|
key: 0,
|
|
1634
1645
|
checked: !0,
|
|
1635
1646
|
disabled: r,
|
|
1636
1647
|
size: "default",
|
|
1637
|
-
onClick:
|
|
1648
|
+
onClick: se((e) => !r && Re(t), ["stop"])
|
|
1638
1649
|
}, null, 8, ["disabled", "onClick"])) : (D(), u(l, {
|
|
1639
1650
|
key: 1,
|
|
1640
1651
|
disabled: r,
|
|
1641
1652
|
checked: !1,
|
|
1642
1653
|
size: "default",
|
|
1643
|
-
onClick:
|
|
1654
|
+
onClick: se((e) => !r && Re(t), ["stop"])
|
|
1644
1655
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1645
1656
|
type: "info",
|
|
1646
1657
|
class: "mgl5"
|
|
@@ -1657,8 +1668,8 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1657
1668
|
"data",
|
|
1658
1669
|
"height",
|
|
1659
1670
|
"onSortChange"
|
|
1660
|
-
])], 2)
|
|
1661
|
-
e.searchForm.showPage ? (D(), u(
|
|
1671
|
+
])], 2),
|
|
1672
|
+
e.searchForm.showPage ? (D(), u(E, {
|
|
1662
1673
|
key: 1,
|
|
1663
1674
|
"current-page": y[P(_)],
|
|
1664
1675
|
"onUpdate:currentPage": n[2] ||= (e) => y[P(_)] = e,
|
|
@@ -1668,8 +1679,8 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1668
1679
|
total: y.total,
|
|
1669
1680
|
"page-size": y[P(v)],
|
|
1670
1681
|
"page-sizes": e.searchForm.pageSizes || P(i).pageSizes,
|
|
1671
|
-
onCurrentChange:
|
|
1672
|
-
onSizeChange:
|
|
1682
|
+
onCurrentChange: Fe,
|
|
1683
|
+
onSizeChange: Ie
|
|
1673
1684
|
}, null, 8, [
|
|
1674
1685
|
"current-page",
|
|
1675
1686
|
"total",
|
|
@@ -1679,10 +1690,10 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1679
1690
|
], 2);
|
|
1680
1691
|
};
|
|
1681
1692
|
}
|
|
1682
|
-
}, [["__scopeId", "data-v-
|
|
1693
|
+
}, [["__scopeId", "data-v-257f5bc0"]]), Mt = {
|
|
1683
1694
|
key: 0,
|
|
1684
1695
|
class: "down-excel-temp__spinner"
|
|
1685
|
-
},
|
|
1696
|
+
}, Nt = /* @__PURE__ */ $({
|
|
1686
1697
|
__name: "index",
|
|
1687
1698
|
props: {
|
|
1688
1699
|
sheetsConfig: {
|
|
@@ -1714,7 +1725,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1714
1725
|
if (!n.value) {
|
|
1715
1726
|
n.value = !0;
|
|
1716
1727
|
try {
|
|
1717
|
-
await
|
|
1728
|
+
await Be(t.fileName + (t.version ? `__v${t.version}` : ""), await r(t.sheetsConfig));
|
|
1718
1729
|
} catch (e) {
|
|
1719
1730
|
console.error("[DownExcelTemp] 导出失败:", e), i.error(e?.message || "Export failed");
|
|
1720
1731
|
} finally {
|
|
@@ -1729,23 +1740,23 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
|
1729
1740
|
underline: "never",
|
|
1730
1741
|
disabled: n.value
|
|
1731
1742
|
}, e.$attrs, { onClick: a }), {
|
|
1732
|
-
default: I(() => [n.value ? (D(), f("span",
|
|
1743
|
+
default: I(() => [n.value ? (D(), f("span", Mt)) : d("", !0), A(e.$slots, "default", {}, () => [h(N(n.value ? e.$t("jia-zai-zhong") : e.$t("xia-zai-dao-ru-mo-ban")), 1)], !0)]),
|
|
1733
1744
|
_: 3
|
|
1734
1745
|
}, 16, ["disabled"]);
|
|
1735
1746
|
};
|
|
1736
1747
|
}
|
|
1737
|
-
}, [["__scopeId", "data-v-86bece44"]]),
|
|
1748
|
+
}, [["__scopeId", "data-v-86bece44"]]), Pt = {
|
|
1738
1749
|
mounted(e, t) {
|
|
1739
|
-
t.value &&
|
|
1750
|
+
t.value && Ft(e);
|
|
1740
1751
|
},
|
|
1741
1752
|
updated(e, t) {
|
|
1742
|
-
t.value ?
|
|
1753
|
+
t.value ? Ft(e) : It(e);
|
|
1743
1754
|
},
|
|
1744
1755
|
beforeUnmount(e) {
|
|
1745
|
-
|
|
1756
|
+
It(e);
|
|
1746
1757
|
}
|
|
1747
1758
|
};
|
|
1748
|
-
async function
|
|
1759
|
+
async function Ft(e) {
|
|
1749
1760
|
await f();
|
|
1750
1761
|
let t = e.querySelector(".el-dialog");
|
|
1751
1762
|
if (!t) return;
|
|
@@ -1808,15 +1819,15 @@ async function It(e) {
|
|
|
1808
1819
|
}
|
|
1809
1820
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1810
1821
|
}
|
|
1811
|
-
function
|
|
1822
|
+
function It(e) {
|
|
1812
1823
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1813
1824
|
}
|
|
1814
1825
|
//#endregion
|
|
1815
1826
|
//#region src/components/Layer/index.vue
|
|
1816
|
-
var
|
|
1827
|
+
var Lt = {
|
|
1817
1828
|
key: 0,
|
|
1818
1829
|
class: "drawer-btn"
|
|
1819
|
-
},
|
|
1830
|
+
}, Rt = { key: 1 }, zt = {
|
|
1820
1831
|
__name: "index",
|
|
1821
1832
|
props: {
|
|
1822
1833
|
layer: {
|
|
@@ -1836,7 +1847,7 @@ var Rt = {
|
|
|
1836
1847
|
},
|
|
1837
1848
|
emits: ["confirm"],
|
|
1838
1849
|
setup(e, { emit: t }) {
|
|
1839
|
-
let n = e, r = t, { t: i } = B(), o =
|
|
1850
|
+
let n = e, r = t, { t: i } = B(), o = ue(() => {
|
|
1840
1851
|
r("confirm");
|
|
1841
1852
|
}, 300);
|
|
1842
1853
|
async function s() {
|
|
@@ -1862,7 +1873,7 @@ var Rt = {
|
|
|
1862
1873
|
default: I(() => [
|
|
1863
1874
|
A(t.$slots, "default"),
|
|
1864
1875
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1865
|
-
e.layer.showButton ? (D(), f("div",
|
|
1876
|
+
e.layer.showButton ? (D(), f("div", Lt, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1866
1877
|
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1867
1878
|
_: 1
|
|
1868
1879
|
}), g(r, {
|
|
@@ -1879,7 +1890,7 @@ var Rt = {
|
|
|
1879
1890
|
"modelValue",
|
|
1880
1891
|
"size",
|
|
1881
1892
|
"title"
|
|
1882
|
-
])) :
|
|
1893
|
+
])) : ae((D(), f("div", Rt, [g(a, {
|
|
1883
1894
|
"close-on-click-modal": !1,
|
|
1884
1895
|
modelValue: e.layer.show,
|
|
1885
1896
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1907,13 +1918,13 @@ var Rt = {
|
|
|
1907
1918
|
"modelValue",
|
|
1908
1919
|
"title",
|
|
1909
1920
|
"width"
|
|
1910
|
-
])])), [[P(
|
|
1921
|
+
])])), [[P(Pt), e.layer.show]]);
|
|
1911
1922
|
};
|
|
1912
1923
|
}
|
|
1913
1924
|
};
|
|
1914
1925
|
//#endregion
|
|
1915
1926
|
//#region src/utils/tools/validate.js
|
|
1916
|
-
function
|
|
1927
|
+
function Bt(e, t = {}) {
|
|
1917
1928
|
let n = Q(), r = {
|
|
1918
1929
|
inForm: !0,
|
|
1919
1930
|
required: !0,
|
|
@@ -1933,7 +1944,7 @@ function Vt(e, t = {}) {
|
|
|
1933
1944
|
}
|
|
1934
1945
|
//#endregion
|
|
1935
1946
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1936
|
-
var
|
|
1947
|
+
var Vt = class {
|
|
1937
1948
|
constructor(e = {}) {
|
|
1938
1949
|
this.config = {
|
|
1939
1950
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2080,24 +2091,24 @@ var Ht = class {
|
|
|
2080
2091
|
};
|
|
2081
2092
|
//#endregion
|
|
2082
2093
|
//#region src/utils/tools/format.js
|
|
2083
|
-
function
|
|
2094
|
+
function Ht(e, t = 2, n = ".", r = ",") {
|
|
2084
2095
|
(e == null || e === "") && (e = 0);
|
|
2085
2096
|
let i = Number(e);
|
|
2086
2097
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2087
2098
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2088
2099
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
2089
2100
|
}
|
|
2090
|
-
function
|
|
2091
|
-
return
|
|
2101
|
+
function Ut(e, t = 2) {
|
|
2102
|
+
return Ht(e, t);
|
|
2092
2103
|
}
|
|
2093
|
-
function
|
|
2104
|
+
function Wt(e, t = 2) {
|
|
2094
2105
|
(e == null || e === "") && (e = 0);
|
|
2095
2106
|
let n = Number(e);
|
|
2096
|
-
return e = isNaN(n) ? 0 : n,
|
|
2107
|
+
return e = isNaN(n) ? 0 : n, Ht(e * 100, t) + "%";
|
|
2097
2108
|
}
|
|
2098
2109
|
//#endregion
|
|
2099
2110
|
//#region src/utils/hook/common.js
|
|
2100
|
-
function
|
|
2111
|
+
function Gt(e, t = {}) {
|
|
2101
2112
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2102
2113
|
manual: !1,
|
|
2103
2114
|
log: !1,
|
|
@@ -2109,13 +2120,13 @@ function Kt(e, t = {}) {
|
|
|
2109
2120
|
let { code: t, data: c, msg: l } = e;
|
|
2110
2121
|
if (a) {
|
|
2111
2122
|
let { records: t, rows: n } = c || {};
|
|
2112
|
-
s.value =
|
|
2123
|
+
s.value = Jt(t || n ? t || n : c, o), a(e);
|
|
2113
2124
|
}
|
|
2114
2125
|
if (c) {
|
|
2115
2126
|
if (c.records != null || c.rows != null) {
|
|
2116
2127
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
2117
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
2118
|
-
} else s.value =
|
|
2128
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Jt(e || t || [], o);
|
|
2129
|
+
} else s.value = Jt(c, o);
|
|
2119
2130
|
r && console.log("useRequest-res", s.value);
|
|
2120
2131
|
}
|
|
2121
2132
|
}).catch((e) => {
|
|
@@ -2130,9 +2141,9 @@ function Kt(e, t = {}) {
|
|
|
2130
2141
|
l
|
|
2131
2142
|
];
|
|
2132
2143
|
}
|
|
2133
|
-
function
|
|
2144
|
+
function Kt(e) {
|
|
2134
2145
|
let t = k(e), n = k(""), r = k("");
|
|
2135
|
-
return
|
|
2146
|
+
return ie(t, (e) => {
|
|
2136
2147
|
let t = e || ["", ""];
|
|
2137
2148
|
n.value = t[0], r.value = t[1];
|
|
2138
2149
|
}), [
|
|
@@ -2141,10 +2152,10 @@ function qt(e) {
|
|
|
2141
2152
|
r
|
|
2142
2153
|
];
|
|
2143
2154
|
}
|
|
2144
|
-
function
|
|
2155
|
+
function qt(e) {
|
|
2145
2156
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2146
2157
|
}
|
|
2147
|
-
function
|
|
2158
|
+
function Jt(e, t) {
|
|
2148
2159
|
if (!t) return e;
|
|
2149
2160
|
if (e instanceof Array) return e.map((e) => {
|
|
2150
2161
|
let n = {};
|
|
@@ -2155,47 +2166,47 @@ function Yt(e, t) {
|
|
|
2155
2166
|
}
|
|
2156
2167
|
//#endregion
|
|
2157
2168
|
//#region src/utils/hook/i18n.js
|
|
2158
|
-
function
|
|
2169
|
+
function Yt(e, t = []) {
|
|
2159
2170
|
let { locale: n } = B(), r = k(e());
|
|
2160
|
-
return
|
|
2171
|
+
return ie([n, ...t], () => {
|
|
2161
2172
|
r.value = e();
|
|
2162
2173
|
}, { immediate: !0 }), r;
|
|
2163
2174
|
}
|
|
2164
|
-
function
|
|
2175
|
+
function Xt(e, t = "zh_cn", n = "en_us") {
|
|
2165
2176
|
return e && (e[{
|
|
2166
2177
|
en_us: n,
|
|
2167
2178
|
zh_cn: t
|
|
2168
|
-
}[
|
|
2179
|
+
}[Oe().global.locale.value]] || e[t]) || "-";
|
|
2169
2180
|
}
|
|
2170
2181
|
//#endregion
|
|
2171
2182
|
//#region src/utils/hook/storeHook.js
|
|
2183
|
+
function Zt(e, t) {
|
|
2184
|
+
let n = H;
|
|
2185
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapState), en(t, n);
|
|
2186
|
+
}
|
|
2172
2187
|
function Qt(e, t) {
|
|
2173
2188
|
let n = V;
|
|
2174
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2189
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapGetters), en(t, n);
|
|
2175
2190
|
}
|
|
2176
2191
|
function $t(e, t) {
|
|
2177
|
-
let n =
|
|
2178
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2192
|
+
let n = me;
|
|
2193
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapActions), tn(t, n);
|
|
2179
2194
|
}
|
|
2180
2195
|
function en(e, t) {
|
|
2181
|
-
let n = he;
|
|
2182
|
-
return typeof e == "string" && e.length > 0 && (n = me(e).mapActions), nn(t, n);
|
|
2183
|
-
}
|
|
2184
|
-
function tn(e, t) {
|
|
2185
|
-
let n = H(), r = t(e), i = {};
|
|
2196
|
+
let n = he(), r = t(e), i = {};
|
|
2186
2197
|
return Object.keys(r).forEach((e) => {
|
|
2187
2198
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2188
2199
|
}), i;
|
|
2189
2200
|
}
|
|
2190
|
-
function
|
|
2191
|
-
let n =
|
|
2201
|
+
function tn(e, t) {
|
|
2202
|
+
let n = he(), r = t(e), i = {};
|
|
2192
2203
|
return Object.keys(r).forEach((e) => {
|
|
2193
2204
|
i[e] = r[e].bind({ $store: n });
|
|
2194
2205
|
}), i;
|
|
2195
2206
|
}
|
|
2196
|
-
function
|
|
2207
|
+
function nn(e, t = []) {
|
|
2197
2208
|
let [n, r, i] = t, { locale: a } = B();
|
|
2198
|
-
return l(() =>
|
|
2209
|
+
return l(() => ne(e).map((e) => {
|
|
2199
2210
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2200
2211
|
return {
|
|
2201
2212
|
...e,
|
|
@@ -2206,27 +2217,27 @@ function rn(e, t = []) {
|
|
|
2206
2217
|
}
|
|
2207
2218
|
//#endregion
|
|
2208
2219
|
//#region src/components/VxeTable/index.jsx
|
|
2209
|
-
function
|
|
2220
|
+
function rn(e) {
|
|
2210
2221
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2211
2222
|
}
|
|
2212
|
-
function
|
|
2223
|
+
function an() {
|
|
2213
2224
|
U.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2214
|
-
return
|
|
2225
|
+
return Ht(e, t);
|
|
2215
2226
|
} }), U.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2216
|
-
return
|
|
2227
|
+
return Ut(e, t);
|
|
2217
2228
|
} }), U.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2218
|
-
return
|
|
2229
|
+
return Wt(e, t);
|
|
2219
2230
|
} });
|
|
2220
2231
|
}
|
|
2221
|
-
function
|
|
2232
|
+
function on() {
|
|
2222
2233
|
U.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2223
2234
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2224
2235
|
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;
|
|
2225
|
-
return e.type == "tag" ? o ? g(
|
|
2236
|
+
return e.type == "tag" ? o ? g(ut, { fontColor: o }, { default: () => [
|
|
2226
2237
|
h(" "),
|
|
2227
2238
|
c,
|
|
2228
2239
|
h(" ")
|
|
2229
|
-
] }) : g(
|
|
2240
|
+
] }) : g(ut, { type: a }, { default: () => [
|
|
2230
2241
|
h(" "),
|
|
2231
2242
|
c,
|
|
2232
2243
|
h(" ")
|
|
@@ -2254,7 +2265,7 @@ function sn() {
|
|
|
2254
2265
|
let { locale: n } = B(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2255
2266
|
return t.row[r] || t.row[t.column.field];
|
|
2256
2267
|
} }), U.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2257
|
-
let n = t.column.field, i =
|
|
2268
|
+
let n = t.column.field, i = ge(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2258
2269
|
function l(e, t) {
|
|
2259
2270
|
s == "blank" ? window.open(e) : i.push({
|
|
2260
2271
|
path: e,
|
|
@@ -2267,17 +2278,17 @@ function sn() {
|
|
|
2267
2278
|
underline: "never",
|
|
2268
2279
|
type: "primary",
|
|
2269
2280
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2270
|
-
},
|
|
2281
|
+
}, rn(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2271
2282
|
}
|
|
2272
2283
|
return g(r, {
|
|
2273
2284
|
underline: "never",
|
|
2274
2285
|
type: "primary",
|
|
2275
2286
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2276
|
-
},
|
|
2287
|
+
}, rn(c) ? c : { default: () => [c] });
|
|
2277
2288
|
} });
|
|
2278
2289
|
}
|
|
2279
|
-
function
|
|
2280
|
-
|
|
2290
|
+
function sn() {
|
|
2291
|
+
an(), on();
|
|
2281
2292
|
}
|
|
2282
2293
|
//#endregion
|
|
2283
|
-
export {
|
|
2294
|
+
export { ot as CmpDictionary, lt as CmpIcon, ut as CmpTag, ft as ConfrimButton, Nt as DownExcelTemp, ht as ImportButton, Ce as LayOutForm, zt as Layer, jt as ListPage, Vt as OnePortalCasSDK, xt as SearchBar, Ze as StatusMap, Je as _toRaw, qt as _typeOf, Qe as arrToStatusMap, Ye as arrayToTree, Ue as base64ToBlob, We as base64ToFile, Ge as base64ToFormData, tt as checkFileSize, Bt as creatValidator, rt as createImportFields, nt as createListPageId, Y as en_us, je as exportExcel, Be as exportExcelMuilti, Ut as formatMoney, Ht as formatNumber, Wt as formatPercent, He as getColumnLetterByIndex, Oe as getI18n, Q as getI18nT, Tt as getListPageConfig, Xt as getLocaleValue, Ke as getTableShowColumn, it as getValueBykey, ke as importExcel, Re as importExcelMuilti, X as messages, an as registerVxeFormatters, sn as registerVxePlugins, on as registerVxeRenderers, Et as resetListPageConfig, wt as setListPageConfig, De as setupI18n, qe as sleep, Xe as stringToArray, $e as stripHtmlTags, et as unicode2Str, $t as useActions, Kt as useDatePicker, Qt as useGetters, Yt as useI18nReState, Gt as useRequest, Zt as useState, nn as useVxeEditRenderStatus, J as zh_cn };
|