joy-admin-components 0.2.107 → 0.2.108
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/ConfrimButton/index.d.ts +9 -0
- package/dist/components/DownExcelTemp/index.d.ts +51 -18
- package/dist/joy-admin-components.css +1 -1
- package/dist/joy-admin-components.es.js +205 -180
- package/dist/joy-admin-components.umd.js +2 -2
- package/package.json +1 -1
- package/src/components/DownExcelTemp/index.d.ts +51 -18
- /package/src/components/{Layer → layer}/index.d.ts +0 -0
|
@@ -214,6 +214,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
214
214
|
"que-ding": "确定",
|
|
215
215
|
"que-ding-guan-bi-ma": "确定关闭吗",
|
|
216
216
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
217
|
+
"jia-zai-zhong": "加载中",
|
|
217
218
|
excel: {
|
|
218
219
|
fieldsMappingRequired: "请输入列字段映射",
|
|
219
220
|
invalidInput: "非法输入",
|
|
@@ -224,7 +225,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
224
225
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
226
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
227
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
228
|
+
}, Ee = {
|
|
228
229
|
"dao-ru": "Import",
|
|
229
230
|
"quan-xuan": "Select All",
|
|
230
231
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -242,6 +243,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
242
243
|
"que-ding": "Confirm",
|
|
243
244
|
"que-ding-guan-bi-ma": "Are you sure to close?",
|
|
244
245
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
246
|
+
"jia-zai-zhong": "Loading",
|
|
245
247
|
excel: {
|
|
246
248
|
fieldsMappingRequired: "Please enter column field mapping",
|
|
247
249
|
invalidInput: "Invalid input",
|
|
@@ -252,33 +254,33 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
252
254
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
253
255
|
validate: { invalidInput: "Please enter valid content" },
|
|
254
256
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
255
|
-
},
|
|
257
|
+
}, De = {
|
|
256
258
|
zh_cn: X,
|
|
257
|
-
en_us:
|
|
258
|
-
},
|
|
259
|
-
function
|
|
259
|
+
en_us: Ee
|
|
260
|
+
}, Z = null;
|
|
261
|
+
function Oe(e = null) {
|
|
260
262
|
if (e) {
|
|
261
263
|
let { global: t } = e;
|
|
262
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", X) : t.setLocaleMessage("zh_cn", X), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us",
|
|
264
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", X) : t.setLocaleMessage("zh_cn", X), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", Ee) : t.setLocaleMessage("en_us", Ee), Z = e, e;
|
|
263
265
|
}
|
|
264
|
-
return
|
|
266
|
+
return Z ||= le({
|
|
265
267
|
legacy: !1,
|
|
266
268
|
locale: "zh_cn",
|
|
267
269
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
270
|
+
messages: De
|
|
271
|
+
}), Z;
|
|
270
272
|
}
|
|
271
|
-
function
|
|
272
|
-
return
|
|
273
|
+
function ke() {
|
|
274
|
+
return Z || Oe();
|
|
273
275
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
276
|
+
function Q() {
|
|
277
|
+
return ke().global.t;
|
|
276
278
|
}
|
|
277
279
|
z.extend(we.default), z.extend(Te.default);
|
|
278
|
-
async function
|
|
280
|
+
async function Ae(e, t) {
|
|
279
281
|
let { fields: n, range: r = 1 } = t;
|
|
280
282
|
if (!n) {
|
|
281
|
-
let e =
|
|
283
|
+
let e = Q();
|
|
282
284
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
283
285
|
}
|
|
284
286
|
let i = new R.Workbook();
|
|
@@ -297,15 +299,15 @@ async function ke(e, t) {
|
|
|
297
299
|
}), a[e._name] = i;
|
|
298
300
|
}), i = null, a;
|
|
299
301
|
}
|
|
300
|
-
var
|
|
301
|
-
async function
|
|
302
|
+
var je = { columnWidth: 30 };
|
|
303
|
+
async function Me(e, t, n = [], r = {}) {
|
|
302
304
|
if (!e || !t) return;
|
|
303
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
305
|
+
let { columnStyle: i } = r, { columnWidth: a } = je;
|
|
304
306
|
t.forEach((e) => {
|
|
305
307
|
e.width = e.width ? e.width : a;
|
|
306
308
|
});
|
|
307
|
-
let { workbook: o, worksheet: s } =
|
|
308
|
-
s.columns = t, s.addRows(n), i && await
|
|
309
|
+
let { workbook: o, worksheet: s } = Ne();
|
|
310
|
+
s.columns = t, s.addRows(n), i && await Pe(o, s, i);
|
|
309
311
|
try {
|
|
310
312
|
let t = await o.xlsx.writeBuffer();
|
|
311
313
|
L(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
@@ -313,25 +315,25 @@ async function je(e, t, n = [], r = {}) {
|
|
|
313
315
|
console.log(e);
|
|
314
316
|
}
|
|
315
317
|
}
|
|
316
|
-
function
|
|
318
|
+
function Ne() {
|
|
317
319
|
let e = new R.Workbook();
|
|
318
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(), {
|
|
319
321
|
workbook: e,
|
|
320
322
|
worksheet: e.addWorksheet("Sheet1")
|
|
321
323
|
};
|
|
322
324
|
}
|
|
323
|
-
async function
|
|
325
|
+
async function Pe(e, t, n) {
|
|
324
326
|
let r = Object.keys(n);
|
|
325
327
|
for (let i of r) {
|
|
326
328
|
let r = n[i], { type: a } = r;
|
|
327
329
|
switch (a) {
|
|
328
330
|
case "IMG":
|
|
329
|
-
await
|
|
331
|
+
await Fe(e, t, i, r);
|
|
330
332
|
break;
|
|
331
333
|
}
|
|
332
334
|
}
|
|
333
335
|
}
|
|
334
|
-
async function
|
|
336
|
+
async function Fe(e, t, n, r) {
|
|
335
337
|
let i = t.getColumn(n), a = i.values;
|
|
336
338
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
337
339
|
t > 1 && (e.height = 40);
|
|
@@ -339,7 +341,7 @@ async function Pe(e, t, n, r) {
|
|
|
339
341
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
340
342
|
if (n < 2) continue;
|
|
341
343
|
let r = a[n];
|
|
342
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
344
|
+
r && (t.getCell(i.letter + n).value = "", await Ie(e, t, r, {
|
|
343
345
|
width: 100,
|
|
344
346
|
height: 50,
|
|
345
347
|
col: i._number - 1,
|
|
@@ -347,8 +349,8 @@ async function Pe(e, t, n, r) {
|
|
|
347
349
|
}));
|
|
348
350
|
}
|
|
349
351
|
}
|
|
350
|
-
async function
|
|
351
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
352
|
+
async function Ie(e, t, n, r) {
|
|
353
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Le(n, .3);
|
|
352
354
|
if (c) {
|
|
353
355
|
let n = e.addImage({
|
|
354
356
|
base64: l,
|
|
@@ -366,7 +368,7 @@ async function Fe(e, t, n, r) {
|
|
|
366
368
|
});
|
|
367
369
|
}
|
|
368
370
|
}
|
|
369
|
-
function
|
|
371
|
+
function Le(e, t = 1) {
|
|
370
372
|
let n = new Image();
|
|
371
373
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
372
374
|
n.onload = () => {
|
|
@@ -380,11 +382,11 @@ function Ie(e, t = 1) {
|
|
|
380
382
|
};
|
|
381
383
|
});
|
|
382
384
|
}
|
|
383
|
-
var
|
|
384
|
-
async function
|
|
385
|
+
var Re = "---";
|
|
386
|
+
async function ze(e, t) {
|
|
385
387
|
let { fields: n, range: r = 1 } = t;
|
|
386
388
|
if (!n) {
|
|
387
|
-
let e =
|
|
389
|
+
let e = Q();
|
|
388
390
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
389
391
|
}
|
|
390
392
|
let i = new R.Workbook();
|
|
@@ -405,8 +407,8 @@ async function Re(e, t) {
|
|
|
405
407
|
if (i > r) {
|
|
406
408
|
let r = { _excelRowNumber: i }, a = !0;
|
|
407
409
|
Object.keys(o).forEach((t) => {
|
|
408
|
-
let [c, l] = o[t].split(
|
|
409
|
-
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? z(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(
|
|
410
|
+
let [c, l] = o[t].split(Re), 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(Re)[1]), typeof d == "string" && (d = d.trim()), r[t] = d, d && (a = !1);
|
|
410
412
|
}), a || t.push(r);
|
|
411
413
|
}
|
|
412
414
|
}), a[e._name] = t;
|
|
@@ -414,16 +416,16 @@ async function Re(e, t) {
|
|
|
414
416
|
}
|
|
415
417
|
}), i = null, a;
|
|
416
418
|
}
|
|
417
|
-
var
|
|
419
|
+
var Be = {
|
|
418
420
|
date: "yyyy-mm-dd",
|
|
419
421
|
number: "0",
|
|
420
422
|
string: "@"
|
|
421
423
|
};
|
|
422
|
-
async function
|
|
424
|
+
async function Ve(e, t) {
|
|
423
425
|
if (!e || t.length == 0) return;
|
|
424
|
-
let n =
|
|
426
|
+
let n = He(t);
|
|
425
427
|
for (let e of n.worksheets) {
|
|
426
|
-
let { columnWidth: r } =
|
|
428
|
+
let { columnWidth: r } = je, i = t[e.name];
|
|
427
429
|
if (!i) continue;
|
|
428
430
|
let { tableHeader: a, tableData: o } = i;
|
|
429
431
|
a.forEach((e) => {
|
|
@@ -437,11 +439,11 @@ async function Be(e, t) {
|
|
|
437
439
|
};
|
|
438
440
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
439
441
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
440
|
-
if (d.numFmt =
|
|
442
|
+
if (d.numFmt = Be[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
441
443
|
let t = n.addWorksheet(a);
|
|
442
|
-
t.state = "hidden", u ||= (e) => `${e.label}${
|
|
444
|
+
t.state = "hidden", u ||= (e) => `${e.label}${Re}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
443
445
|
if (n > 0) {
|
|
444
|
-
let t =
|
|
446
|
+
let t = Q();
|
|
445
447
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
446
448
|
type: "list",
|
|
447
449
|
formulae: [`${a}!$A$1:$A$${s.length}`],
|
|
@@ -465,48 +467,48 @@ async function Be(e, t) {
|
|
|
465
467
|
console.log(e);
|
|
466
468
|
}
|
|
467
469
|
}
|
|
468
|
-
function
|
|
469
|
-
let t =
|
|
470
|
+
function He(e) {
|
|
471
|
+
let t = Q(), n = new R.Workbook();
|
|
470
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) => {
|
|
471
473
|
let i = r, a = !1;
|
|
472
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);
|
|
473
475
|
}), n;
|
|
474
476
|
}
|
|
475
|
-
function
|
|
477
|
+
function Ue(e) {
|
|
476
478
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
477
479
|
}
|
|
478
|
-
function
|
|
480
|
+
function We(e) {
|
|
479
481
|
let t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
|
|
480
482
|
for (let e = 0; e < i; ++e) a[e] = r.charCodeAt(e);
|
|
481
483
|
return new Blob([a], { type: n });
|
|
482
484
|
}
|
|
483
|
-
function
|
|
484
|
-
let n =
|
|
485
|
+
function Ge(e, t = "image.png") {
|
|
486
|
+
let n = We(e);
|
|
485
487
|
return new File([n], t, { type: n.type });
|
|
486
488
|
}
|
|
487
|
-
function
|
|
489
|
+
function Ke(e, t) {
|
|
488
490
|
let n = e.match(/^data:image\/(\w+);base64,/), r = n ? n[1] : "png";
|
|
489
491
|
t ||= `image_${Date.now()}.${r}`;
|
|
490
|
-
let i =
|
|
492
|
+
let i = Ge(e, t), a = new FormData();
|
|
491
493
|
return a.append("file", i), a;
|
|
492
494
|
}
|
|
493
|
-
function
|
|
495
|
+
function qe(e) {
|
|
494
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);
|
|
495
497
|
return i.push("type=checkbox", "action", "actions"), pe(r, ...i);
|
|
496
498
|
}
|
|
497
499
|
//#endregion
|
|
498
500
|
//#region src/utils/tools/tools.js
|
|
499
|
-
function
|
|
501
|
+
function Je(e) {
|
|
500
502
|
return new Promise((t) => {
|
|
501
503
|
setTimeout(() => {
|
|
502
504
|
t();
|
|
503
505
|
}, e);
|
|
504
506
|
});
|
|
505
507
|
}
|
|
506
|
-
function
|
|
508
|
+
function Ye(e) {
|
|
507
509
|
return JSON.parse(JSON.stringify(e));
|
|
508
510
|
}
|
|
509
|
-
function
|
|
511
|
+
function Xe(e) {
|
|
510
512
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
511
513
|
for (let i of e) {
|
|
512
514
|
n[i.id] = {
|
|
@@ -518,10 +520,10 @@ function Ye(e) {
|
|
|
518
520
|
}
|
|
519
521
|
return t;
|
|
520
522
|
}
|
|
521
|
-
function
|
|
523
|
+
function Ze(e, t = " ") {
|
|
522
524
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
523
525
|
}
|
|
524
|
-
var
|
|
526
|
+
var Qe = class {
|
|
525
527
|
constructor(e, t = [
|
|
526
528
|
"label",
|
|
527
529
|
"value",
|
|
@@ -539,7 +541,7 @@ var Ze = class {
|
|
|
539
541
|
}
|
|
540
542
|
getName(e) {
|
|
541
543
|
if (!this.has(e)) return "-";
|
|
542
|
-
let t =
|
|
544
|
+
let t = ke().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
543
545
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
544
546
|
}
|
|
545
547
|
getTag(e) {
|
|
@@ -565,49 +567,49 @@ var Ze = class {
|
|
|
565
567
|
return this.labelMap.get(e) ?? null;
|
|
566
568
|
}
|
|
567
569
|
};
|
|
568
|
-
function
|
|
569
|
-
if (e.length == 0) return new
|
|
570
|
+
function $e(e, t = [], n = "i18nName") {
|
|
571
|
+
if (e.length == 0) return new Qe([]);
|
|
570
572
|
if (t.length < 2) {
|
|
571
|
-
let e =
|
|
573
|
+
let e = Q();
|
|
572
574
|
throw Error(e("tools.keysLengthError"));
|
|
573
575
|
}
|
|
574
|
-
return new
|
|
576
|
+
return new Qe(e.map((e) => {
|
|
575
577
|
let r = {};
|
|
576
578
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
577
579
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
578
580
|
}), r;
|
|
579
581
|
}));
|
|
580
582
|
}
|
|
581
|
-
function
|
|
583
|
+
function et(e) {
|
|
582
584
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
583
585
|
}
|
|
584
|
-
function
|
|
586
|
+
function tt(e) {
|
|
585
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)))) : "";
|
|
586
588
|
}
|
|
587
|
-
function
|
|
589
|
+
function nt(e, t = 10) {
|
|
588
590
|
let n = 1024 * 1024 * t;
|
|
589
591
|
return !(e.size > n);
|
|
590
592
|
}
|
|
591
|
-
function
|
|
593
|
+
function rt(e) {
|
|
592
594
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
593
595
|
}
|
|
594
|
-
function
|
|
596
|
+
function it(e) {
|
|
595
597
|
let t = {};
|
|
596
598
|
return e.map((e, n) => {
|
|
597
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
599
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = Ue(n);
|
|
598
600
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
599
601
|
}), t;
|
|
600
602
|
}
|
|
601
|
-
function
|
|
603
|
+
function at(e, t) {
|
|
602
604
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
603
605
|
}
|
|
604
606
|
//#endregion
|
|
605
607
|
//#region \0plugin-vue:export-helper
|
|
606
|
-
var
|
|
608
|
+
var $ = (e, t) => {
|
|
607
609
|
let n = e.__vccOpts || e;
|
|
608
610
|
for (let [e, r] of t) n[e] = r;
|
|
609
611
|
return n;
|
|
610
|
-
}, ot = ["onClick"], st = /* @__PURE__ */
|
|
612
|
+
}, ot = ["onClick"], st = /* @__PURE__ */ $({
|
|
611
613
|
__name: "index",
|
|
612
614
|
props: /* @__PURE__ */ b({
|
|
613
615
|
api: { type: Function },
|
|
@@ -652,7 +654,7 @@ var at = (e, t) => {
|
|
|
652
654
|
setup(e, { emit: t }) {
|
|
653
655
|
let n = e, r = F(), { t: i, locale: a } = B(), o = ie(e, "modelValue"), s = l(() => r["value-key"] != null), _ = k(""), v = l(() => {
|
|
654
656
|
if (r.remote !== void 0) return n.data;
|
|
655
|
-
let e =
|
|
657
|
+
let e = Ze(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
656
658
|
if (e.length == 0) return o;
|
|
657
659
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
658
660
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -810,7 +812,7 @@ function lt(e, t, n, r, i, a) {
|
|
|
810
812
|
_: 1
|
|
811
813
|
});
|
|
812
814
|
}
|
|
813
|
-
var ut = /* @__PURE__ */
|
|
815
|
+
var ut = /* @__PURE__ */ $(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]]), dt = {
|
|
814
816
|
__name: "index",
|
|
815
817
|
props: { fontColor: String },
|
|
816
818
|
setup(e) {
|
|
@@ -826,7 +828,7 @@ var ut = /* @__PURE__ */ at(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"
|
|
|
826
828
|
}, 16, ["style"]);
|
|
827
829
|
};
|
|
828
830
|
}
|
|
829
|
-
}, ft = { class: "confirm-button-wrapper" }, pt = /* @__PURE__ */
|
|
831
|
+
}, ft = { class: "confirm-button-wrapper" }, pt = /* @__PURE__ */ $({
|
|
830
832
|
__name: "index",
|
|
831
833
|
emits: ["ok", "no"],
|
|
832
834
|
setup(e, { emit: t }) {
|
|
@@ -847,7 +849,7 @@ var ut = /* @__PURE__ */ at(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"
|
|
|
847
849
|
}, 16, ["onConfirm"])]);
|
|
848
850
|
};
|
|
849
851
|
}
|
|
850
|
-
}, [["__scopeId", "data-v-24cb35fd"]]), mt = { class: "ImportButton" }, ht = ["accept"], gt = /* @__PURE__ */
|
|
852
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), mt = { class: "ImportButton" }, ht = ["accept"], gt = /* @__PURE__ */ $({
|
|
851
853
|
__name: "index",
|
|
852
854
|
props: {
|
|
853
855
|
accept: {
|
|
@@ -883,7 +885,7 @@ var ut = /* @__PURE__ */ at(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"
|
|
|
883
885
|
return;
|
|
884
886
|
}
|
|
885
887
|
}
|
|
886
|
-
let c = await
|
|
888
|
+
let c = await ze(s, n.fields).catch(() => {
|
|
887
889
|
a.value = !1;
|
|
888
890
|
}).finally(() => {
|
|
889
891
|
r.value.value = null;
|
|
@@ -924,7 +926,7 @@ function _t(e) {
|
|
|
924
926
|
let t = {};
|
|
925
927
|
return e.forEach((e) => {
|
|
926
928
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date", format: s = (e) => e } = e;
|
|
927
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
929
|
+
if (n) if (r == "input" && i?.multiple) t[n] = Ze(a);
|
|
928
930
|
else if (r == "date") if (o.includes("range")) {
|
|
929
931
|
let [e, r] = n, [i, s] = a || [];
|
|
930
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;
|
|
@@ -934,7 +936,7 @@ function _t(e) {
|
|
|
934
936
|
}
|
|
935
937
|
//#endregion
|
|
936
938
|
//#region src/components/SearchBar/index.vue
|
|
937
|
-
var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { class: "right" }, St = /* @__PURE__ */
|
|
939
|
+
var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { class: "right" }, St = /* @__PURE__ */ $({
|
|
938
940
|
__name: "index",
|
|
939
941
|
props: { form: {
|
|
940
942
|
type: Object,
|
|
@@ -1125,7 +1127,7 @@ function Dt() {
|
|
|
1125
1127
|
}
|
|
1126
1128
|
//#endregion
|
|
1127
1129
|
//#region src/components/ListPage/index.vue
|
|
1128
|
-
var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */
|
|
1130
|
+
var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ $({
|
|
1129
1131
|
__name: "index",
|
|
1130
1132
|
props: {
|
|
1131
1133
|
id: {
|
|
@@ -1178,31 +1180,31 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1178
1180
|
}
|
|
1179
1181
|
return null;
|
|
1180
1182
|
}, ie = () => {
|
|
1181
|
-
if (!a.searchForm.enableCellCopy
|
|
1183
|
+
if (!a.searchForm.enableCellCopy) return !1;
|
|
1182
1184
|
let e = F();
|
|
1183
1185
|
if (!e || !e.$el) return !1;
|
|
1184
1186
|
let t = e.$el;
|
|
1185
|
-
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", Ne), t.addEventListener("mousedown", Ce), t.addEventListener("mousemove", we), t.addEventListener("mouseup", Te), t.addEventListener("keydown", Ne);
|
|
1186
1188
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1187
|
-
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll",
|
|
1189
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", je), n.addEventListener("scroll", je), n.__cellCopyScrollBound = !0), Q(), !0;
|
|
1188
1190
|
};
|
|
1189
1191
|
T(() => {
|
|
1190
|
-
M(), window.addEventListener("resize", re),
|
|
1192
|
+
M(), window.addEventListener("resize", re), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Pe), document.addEventListener("mousedown", Fe), setTimeout(() => {
|
|
1191
1193
|
ie();
|
|
1192
1194
|
}, 500));
|
|
1193
1195
|
}), E(() => {
|
|
1194
|
-
|
|
1196
|
+
a.searchForm.enableCellCopy && setTimeout(() => {
|
|
1195
1197
|
ie();
|
|
1196
1198
|
}, 500);
|
|
1197
1199
|
}), ee(() => {
|
|
1198
|
-
if (window.removeEventListener("resize", re), a.searchForm.enableCellCopy
|
|
1199
|
-
document.removeEventListener("mouseup",
|
|
1200
|
+
if (window.removeEventListener("resize", re), a.searchForm.enableCellCopy) {
|
|
1201
|
+
document.removeEventListener("mouseup", Pe), document.removeEventListener("mousedown", Fe), document.removeEventListener("mousemove", q), J(), Ae();
|
|
1200
1202
|
let e = F();
|
|
1201
1203
|
if (e && e.$el) {
|
|
1202
1204
|
let t = e.$el;
|
|
1203
|
-
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", Ne);
|
|
1204
1206
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1205
|
-
n && (n.removeEventListener("scroll",
|
|
1207
|
+
n && (n.removeEventListener("scroll", je), n.__cellCopyScrollBound = !1);
|
|
1206
1208
|
}
|
|
1207
1209
|
}
|
|
1208
1210
|
});
|
|
@@ -1220,21 +1222,21 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1220
1222
|
});
|
|
1221
1223
|
let e = [];
|
|
1222
1224
|
for (let n of t.rows) {
|
|
1223
|
-
let t =
|
|
1225
|
+
let t = at(c, n);
|
|
1224
1226
|
if (t) {
|
|
1225
1227
|
e = t;
|
|
1226
1228
|
break;
|
|
1227
1229
|
}
|
|
1228
1230
|
}
|
|
1229
|
-
let
|
|
1231
|
+
let i = 0;
|
|
1230
1232
|
for (let e of t.total) {
|
|
1231
|
-
let t =
|
|
1233
|
+
let t = at(c, e);
|
|
1232
1234
|
if (t !== void 0) {
|
|
1233
|
-
|
|
1235
|
+
i = t;
|
|
1234
1236
|
break;
|
|
1235
1237
|
}
|
|
1236
1238
|
}
|
|
1237
|
-
s.value = n ? n(e) : e, y.total =
|
|
1239
|
+
s.value = n ? n(e) : e, y.total = i, se = c.nextSearchAfter, a.searchForm.enableCellCopy && (X(), W = /* @__PURE__ */ new WeakMap(), _e = null, S(() => {
|
|
1238
1240
|
setTimeout(() => {
|
|
1239
1241
|
ie();
|
|
1240
1242
|
}, 500);
|
|
@@ -1407,7 +1409,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1407
1409
|
V.endCell = {
|
|
1408
1410
|
rowIndex: c,
|
|
1409
1411
|
colIndex: u
|
|
1410
|
-
}, U(),
|
|
1412
|
+
}, U(), De();
|
|
1411
1413
|
}, Ce = (e) => {
|
|
1412
1414
|
let t = be(e.target);
|
|
1413
1415
|
if (!t) {
|
|
@@ -1418,7 +1420,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1418
1420
|
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), V.isSelecting = !0, V.startCell = {
|
|
1419
1421
|
rowIndex: t.rowIndex,
|
|
1420
1422
|
colIndex: t.colIndex
|
|
1421
|
-
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove", q), U(),
|
|
1423
|
+
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove", q), U(), De();
|
|
1422
1424
|
}, Y = null, we = (e) => {
|
|
1423
1425
|
V.isSelecting && (Y ||= requestAnimationFrame(() => {
|
|
1424
1426
|
if (Y = null, !V.isSelecting) return;
|
|
@@ -1426,7 +1428,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1426
1428
|
t && (V.endCell && V.endCell.rowIndex === t.rowIndex && V.endCell.colIndex === t.colIndex || (V.endCell = {
|
|
1427
1429
|
rowIndex: t.rowIndex,
|
|
1428
1430
|
colIndex: t.colIndex
|
|
1429
|
-
}, U(),
|
|
1431
|
+
}, U(), De()));
|
|
1430
1432
|
}));
|
|
1431
1433
|
}, Te = () => {
|
|
1432
1434
|
V.isSelecting = !1, J(), Y &&= (cancelAnimationFrame(Y), null), document.removeEventListener("mousemove", q);
|
|
@@ -1436,7 +1438,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1436
1438
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1437
1439
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1438
1440
|
});
|
|
1439
|
-
},
|
|
1441
|
+
}, Ee = () => {
|
|
1440
1442
|
let e = F();
|
|
1441
1443
|
if (!e) return;
|
|
1442
1444
|
let t = e.$el;
|
|
@@ -1476,29 +1478,29 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1476
1478
|
}
|
|
1477
1479
|
}
|
|
1478
1480
|
}
|
|
1479
|
-
},
|
|
1481
|
+
}, De = () => {
|
|
1480
1482
|
S(() => {
|
|
1481
|
-
|
|
1483
|
+
Ee();
|
|
1482
1484
|
});
|
|
1483
|
-
},
|
|
1484
|
-
|
|
1485
|
-
|
|
1485
|
+
}, Z = null, Oe = null, ke = () => {
|
|
1486
|
+
Oe ||= requestAnimationFrame(() => {
|
|
1487
|
+
Oe = null, Ee();
|
|
1486
1488
|
});
|
|
1487
|
-
},
|
|
1489
|
+
}, Q = () => {
|
|
1488
1490
|
let e = F();
|
|
1489
1491
|
if (!e || !e.$el) return;
|
|
1490
1492
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1491
|
-
t && (
|
|
1492
|
-
H &&
|
|
1493
|
-
}),
|
|
1493
|
+
t && (Ae(), Z = new MutationObserver(() => {
|
|
1494
|
+
H && ke();
|
|
1495
|
+
}), Z.observe(t, {
|
|
1494
1496
|
childList: !0,
|
|
1495
1497
|
subtree: !1
|
|
1496
1498
|
}));
|
|
1497
|
-
}, ke = () => {
|
|
1498
|
-
Q &&= (Q.disconnect(), null), De &&= (cancelAnimationFrame(De), null);
|
|
1499
1499
|
}, Ae = () => {
|
|
1500
|
-
|
|
1501
|
-
}, je =
|
|
1500
|
+
Z &&= (Z.disconnect(), null), Oe &&= (cancelAnimationFrame(Oe), null);
|
|
1501
|
+
}, je = () => {
|
|
1502
|
+
H && ke();
|
|
1503
|
+
}, Me = async () => {
|
|
1502
1504
|
if (!H) return;
|
|
1503
1505
|
let e = F();
|
|
1504
1506
|
if (!e) return;
|
|
@@ -1568,23 +1570,23 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1568
1570
|
} catch (e) {
|
|
1569
1571
|
console.error("复制失败:", e);
|
|
1570
1572
|
}
|
|
1571
|
-
},
|
|
1572
|
-
|
|
1573
|
-
},
|
|
1573
|
+
}, Ne = (e) => {
|
|
1574
|
+
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), Me()) : e.key === "Escape" && X());
|
|
1575
|
+
}, Pe = () => {
|
|
1574
1576
|
V.isSelecting = !1, J(), Y &&= (cancelAnimationFrame(Y), null), document.removeEventListener("mousemove", q);
|
|
1575
|
-
},
|
|
1577
|
+
}, Fe = (e) => {
|
|
1576
1578
|
let t = F();
|
|
1577
1579
|
!t || !t.$el || t.$el.contains(e.target) || X();
|
|
1578
|
-
}, Fe = (e) => {
|
|
1579
|
-
y[_] = e, R();
|
|
1580
1580
|
}, Ie = (e) => {
|
|
1581
|
+
y[_] = e, R();
|
|
1582
|
+
}, Le = (e) => {
|
|
1581
1583
|
y[v] = e, y[_] = 1, R();
|
|
1582
1584
|
};
|
|
1583
|
-
function
|
|
1585
|
+
function Re() {
|
|
1584
1586
|
let e = b.value.getCheckboxRecords();
|
|
1585
1587
|
a.searchForm.selections = e;
|
|
1586
1588
|
}
|
|
1587
|
-
let
|
|
1589
|
+
let ze = (e) => {
|
|
1588
1590
|
let t = b.value;
|
|
1589
1591
|
if (t) {
|
|
1590
1592
|
t.toggleCheckboxRow(e);
|
|
@@ -1626,7 +1628,7 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1626
1628
|
oe((D(), f("div", {
|
|
1627
1629
|
ref_key: "tableContentRef",
|
|
1628
1630
|
ref: w,
|
|
1629
|
-
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy
|
|
1631
|
+
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy })
|
|
1630
1632
|
}, [g(T, x({
|
|
1631
1633
|
id: c.value,
|
|
1632
1634
|
ref_key: "tableRef",
|
|
@@ -1636,10 +1638,10 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1636
1638
|
border: ""
|
|
1637
1639
|
}, ge.value, {
|
|
1638
1640
|
height: ae.value,
|
|
1639
|
-
onCheckboxChange:
|
|
1640
|
-
onCheckboxAll:
|
|
1641
|
+
onCheckboxChange: Re,
|
|
1642
|
+
onCheckboxAll: Re,
|
|
1641
1643
|
onSortChange: ge.value["sort-config"]?.sortChange,
|
|
1642
|
-
onScroll:
|
|
1644
|
+
onScroll: je
|
|
1643
1645
|
}), {
|
|
1644
1646
|
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1645
1647
|
key: 0,
|
|
@@ -1653,13 +1655,13 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1653
1655
|
checked: !0,
|
|
1654
1656
|
disabled: r,
|
|
1655
1657
|
size: "default",
|
|
1656
|
-
onClick: ce((e) => !r &&
|
|
1658
|
+
onClick: ce((e) => !r && ze(t), ["stop"])
|
|
1657
1659
|
}, null, 8, ["disabled", "onClick"])) : (D(), u(l, {
|
|
1658
1660
|
key: 1,
|
|
1659
1661
|
disabled: r,
|
|
1660
1662
|
checked: !1,
|
|
1661
1663
|
size: "default",
|
|
1662
|
-
onClick: ce((e) => !r &&
|
|
1664
|
+
onClick: ce((e) => !r && ze(t), ["stop"])
|
|
1663
1665
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1664
1666
|
type: "info",
|
|
1665
1667
|
class: "mgl5"
|
|
@@ -1687,8 +1689,8 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1687
1689
|
total: y.total,
|
|
1688
1690
|
"page-size": y[P(v)],
|
|
1689
1691
|
"page-sizes": e.searchForm.pageSizes || P(i).pageSizes,
|
|
1690
|
-
onCurrentChange:
|
|
1691
|
-
onSizeChange:
|
|
1692
|
+
onCurrentChange: Ie,
|
|
1693
|
+
onSizeChange: Le
|
|
1692
1694
|
}, null, 8, [
|
|
1693
1695
|
"current-page",
|
|
1694
1696
|
"total",
|
|
@@ -1698,7 +1700,10 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1698
1700
|
], 2);
|
|
1699
1701
|
};
|
|
1700
1702
|
}
|
|
1701
|
-
}, [["__scopeId", "data-v-
|
|
1703
|
+
}, [["__scopeId", "data-v-4b6daddc"]]), Nt = {
|
|
1704
|
+
key: 0,
|
|
1705
|
+
class: "down-excel-temp__spinner"
|
|
1706
|
+
}, Pt = /* @__PURE__ */ $({
|
|
1702
1707
|
__name: "index",
|
|
1703
1708
|
props: {
|
|
1704
1709
|
sheetsConfig: {
|
|
@@ -1715,33 +1720,53 @@ var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at(
|
|
|
1715
1720
|
}
|
|
1716
1721
|
},
|
|
1717
1722
|
setup(e) {
|
|
1718
|
-
let t = e;
|
|
1719
|
-
function
|
|
1720
|
-
|
|
1723
|
+
let t = e, n = k(!1);
|
|
1724
|
+
async function r(e) {
|
|
1725
|
+
let t = Object.entries(e), n = await Promise.all(t.map(async ([e, t]) => {
|
|
1726
|
+
let { tableData: n } = t, r = n;
|
|
1727
|
+
return typeof n == "function" && (r = await Promise.resolve(n())), [e, {
|
|
1728
|
+
...t,
|
|
1729
|
+
tableData: Array.isArray(r) ? r : []
|
|
1730
|
+
}];
|
|
1731
|
+
}));
|
|
1732
|
+
return Object.fromEntries(n);
|
|
1733
|
+
}
|
|
1734
|
+
async function a() {
|
|
1735
|
+
if (!n.value) {
|
|
1736
|
+
n.value = !0;
|
|
1737
|
+
try {
|
|
1738
|
+
await Ve(t.fileName + (t.version ? `__v${t.version}` : ""), await r(t.sheetsConfig));
|
|
1739
|
+
} catch (e) {
|
|
1740
|
+
console.error("[DownExcelTemp] 导出失败:", e), i.error(e?.message || "Export failed");
|
|
1741
|
+
} finally {
|
|
1742
|
+
n.value = !1;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1721
1745
|
}
|
|
1722
1746
|
return (e, t) => {
|
|
1723
1747
|
let r = j("el-link");
|
|
1724
1748
|
return D(), u(r, x({
|
|
1725
1749
|
type: "primary",
|
|
1726
|
-
underline: "never"
|
|
1727
|
-
|
|
1728
|
-
|
|
1750
|
+
underline: "never",
|
|
1751
|
+
disabled: n.value
|
|
1752
|
+
}, e.$attrs, { onClick: a }), {
|
|
1753
|
+
default: I(() => [n.value ? (D(), f("span", Nt)) : 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)]),
|
|
1729
1754
|
_: 3
|
|
1730
|
-
}, 16);
|
|
1755
|
+
}, 16, ["disabled"]);
|
|
1731
1756
|
};
|
|
1732
1757
|
}
|
|
1733
|
-
},
|
|
1758
|
+
}, [["__scopeId", "data-v-86bece44"]]), Ft = {
|
|
1734
1759
|
mounted(e, t) {
|
|
1735
|
-
t.value &&
|
|
1760
|
+
t.value && It(e);
|
|
1736
1761
|
},
|
|
1737
1762
|
updated(e, t) {
|
|
1738
|
-
t.value ?
|
|
1763
|
+
t.value ? It(e) : Lt(e);
|
|
1739
1764
|
},
|
|
1740
1765
|
beforeUnmount(e) {
|
|
1741
|
-
|
|
1766
|
+
Lt(e);
|
|
1742
1767
|
}
|
|
1743
1768
|
};
|
|
1744
|
-
async function
|
|
1769
|
+
async function It(e) {
|
|
1745
1770
|
await f();
|
|
1746
1771
|
let t = e.querySelector(".el-dialog");
|
|
1747
1772
|
if (!t) return;
|
|
@@ -1804,15 +1829,15 @@ async function Ft(e) {
|
|
|
1804
1829
|
}
|
|
1805
1830
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1806
1831
|
}
|
|
1807
|
-
function
|
|
1832
|
+
function Lt(e) {
|
|
1808
1833
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1809
1834
|
}
|
|
1810
1835
|
//#endregion
|
|
1811
1836
|
//#region src/components/Layer/index.vue
|
|
1812
|
-
var
|
|
1837
|
+
var Rt = {
|
|
1813
1838
|
key: 0,
|
|
1814
1839
|
class: "drawer-btn"
|
|
1815
|
-
},
|
|
1840
|
+
}, zt = { key: 1 }, Bt = {
|
|
1816
1841
|
__name: "index",
|
|
1817
1842
|
props: {
|
|
1818
1843
|
layer: {
|
|
@@ -1858,7 +1883,7 @@ var Lt = {
|
|
|
1858
1883
|
default: I(() => [
|
|
1859
1884
|
A(t.$slots, "default"),
|
|
1860
1885
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1861
|
-
e.layer.showButton ? (D(), f("div",
|
|
1886
|
+
e.layer.showButton ? (D(), f("div", Rt, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1862
1887
|
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1863
1888
|
_: 1
|
|
1864
1889
|
}), g(r, {
|
|
@@ -1875,7 +1900,7 @@ var Lt = {
|
|
|
1875
1900
|
"modelValue",
|
|
1876
1901
|
"size",
|
|
1877
1902
|
"title"
|
|
1878
|
-
])) : oe((D(), f("div",
|
|
1903
|
+
])) : oe((D(), f("div", zt, [g(a, {
|
|
1879
1904
|
"close-on-click-modal": !1,
|
|
1880
1905
|
modelValue: e.layer.show,
|
|
1881
1906
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1903,14 +1928,14 @@ var Lt = {
|
|
|
1903
1928
|
"modelValue",
|
|
1904
1929
|
"title",
|
|
1905
1930
|
"width"
|
|
1906
|
-
])])), [[P(
|
|
1931
|
+
])])), [[P(Ft), e.layer.show]]);
|
|
1907
1932
|
};
|
|
1908
1933
|
}
|
|
1909
1934
|
};
|
|
1910
1935
|
//#endregion
|
|
1911
1936
|
//#region src/utils/tools/validate.js
|
|
1912
|
-
function
|
|
1913
|
-
let n =
|
|
1937
|
+
function Vt(e, t = {}) {
|
|
1938
|
+
let n = Q(), r = {
|
|
1914
1939
|
inForm: !0,
|
|
1915
1940
|
required: !0,
|
|
1916
1941
|
...t
|
|
@@ -1929,7 +1954,7 @@ function Bt(e, t = {}) {
|
|
|
1929
1954
|
}
|
|
1930
1955
|
//#endregion
|
|
1931
1956
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1932
|
-
var
|
|
1957
|
+
var Ht = class {
|
|
1933
1958
|
constructor(e = {}) {
|
|
1934
1959
|
this.config = {
|
|
1935
1960
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2076,24 +2101,24 @@ var Vt = class {
|
|
|
2076
2101
|
};
|
|
2077
2102
|
//#endregion
|
|
2078
2103
|
//#region src/utils/tools/format.js
|
|
2079
|
-
function
|
|
2104
|
+
function Ut(e, t = 2, n = ".", r = ",") {
|
|
2080
2105
|
(e == null || e === "") && (e = 0);
|
|
2081
2106
|
let i = Number(e);
|
|
2082
2107
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2083
2108
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2084
2109
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
2085
2110
|
}
|
|
2086
|
-
function Ut(e, t = 2) {
|
|
2087
|
-
return Ht(e, t);
|
|
2088
|
-
}
|
|
2089
2111
|
function Wt(e, t = 2) {
|
|
2112
|
+
return Ut(e, t);
|
|
2113
|
+
}
|
|
2114
|
+
function Gt(e, t = 2) {
|
|
2090
2115
|
(e == null || e === "") && (e = 0);
|
|
2091
2116
|
let n = Number(e);
|
|
2092
|
-
return e = isNaN(n) ? 0 : n,
|
|
2117
|
+
return e = isNaN(n) ? 0 : n, Ut(e * 100, t) + "%";
|
|
2093
2118
|
}
|
|
2094
2119
|
//#endregion
|
|
2095
2120
|
//#region src/utils/hook/common.js
|
|
2096
|
-
function
|
|
2121
|
+
function Kt(e, t = {}) {
|
|
2097
2122
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2098
2123
|
manual: !1,
|
|
2099
2124
|
log: !1,
|
|
@@ -2105,13 +2130,13 @@ function Gt(e, t = {}) {
|
|
|
2105
2130
|
let { code: t, data: c, msg: l } = e;
|
|
2106
2131
|
if (a) {
|
|
2107
2132
|
let { records: t, rows: n } = c || {};
|
|
2108
|
-
s.value =
|
|
2133
|
+
s.value = Yt(t || n ? t || n : c, o), a(e);
|
|
2109
2134
|
}
|
|
2110
2135
|
if (c) {
|
|
2111
2136
|
if (c.records != null || c.rows != null) {
|
|
2112
2137
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
2113
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
2114
|
-
} else s.value =
|
|
2138
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Yt(e || t || [], o);
|
|
2139
|
+
} else s.value = Yt(c, o);
|
|
2115
2140
|
r && console.log("useRequest-res", s.value);
|
|
2116
2141
|
}
|
|
2117
2142
|
}).catch((e) => {
|
|
@@ -2126,7 +2151,7 @@ function Gt(e, t = {}) {
|
|
|
2126
2151
|
l
|
|
2127
2152
|
];
|
|
2128
2153
|
}
|
|
2129
|
-
function
|
|
2154
|
+
function qt(e) {
|
|
2130
2155
|
let t = k(e), n = k(""), r = k("");
|
|
2131
2156
|
return ae(t, (e) => {
|
|
2132
2157
|
let t = e || ["", ""];
|
|
@@ -2137,10 +2162,10 @@ function Kt(e) {
|
|
|
2137
2162
|
r
|
|
2138
2163
|
];
|
|
2139
2164
|
}
|
|
2140
|
-
function
|
|
2165
|
+
function Jt(e) {
|
|
2141
2166
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2142
2167
|
}
|
|
2143
|
-
function
|
|
2168
|
+
function Yt(e, t) {
|
|
2144
2169
|
if (!t) return e;
|
|
2145
2170
|
if (e instanceof Array) return e.map((e) => {
|
|
2146
2171
|
let n = {};
|
|
@@ -2151,45 +2176,45 @@ function Jt(e, t) {
|
|
|
2151
2176
|
}
|
|
2152
2177
|
//#endregion
|
|
2153
2178
|
//#region src/utils/hook/i18n.js
|
|
2154
|
-
function
|
|
2179
|
+
function Xt(e, t = []) {
|
|
2155
2180
|
let { locale: n } = B(), r = k(e());
|
|
2156
2181
|
return ae([n, ...t], () => {
|
|
2157
2182
|
r.value = e();
|
|
2158
2183
|
}, { immediate: !0 }), r;
|
|
2159
2184
|
}
|
|
2160
|
-
function
|
|
2185
|
+
function Zt(e, t = "zh_cn", n = "en_us") {
|
|
2161
2186
|
return e && (e[{
|
|
2162
2187
|
en_us: n,
|
|
2163
2188
|
zh_cn: t
|
|
2164
|
-
}[
|
|
2189
|
+
}[ke().global.locale.value]] || e[t]) || "-";
|
|
2165
2190
|
}
|
|
2166
2191
|
//#endregion
|
|
2167
2192
|
//#region src/utils/hook/storeHook.js
|
|
2168
|
-
function
|
|
2193
|
+
function Qt(e, t) {
|
|
2169
2194
|
let n = V;
|
|
2170
|
-
return typeof e == "string" && e.length > 0 && (n = me(e).mapState),
|
|
2195
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapState), tn(t, n);
|
|
2171
2196
|
}
|
|
2172
|
-
function
|
|
2197
|
+
function $t(e, t) {
|
|
2173
2198
|
let n = ge;
|
|
2174
|
-
return typeof e == "string" && e.length > 0 && (n = me(e).mapGetters),
|
|
2199
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapGetters), tn(t, n);
|
|
2175
2200
|
}
|
|
2176
|
-
function
|
|
2201
|
+
function en(e, t) {
|
|
2177
2202
|
let n = he;
|
|
2178
|
-
return typeof e == "string" && e.length > 0 && (n = me(e).mapActions),
|
|
2203
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapActions), nn(t, n);
|
|
2179
2204
|
}
|
|
2180
|
-
function
|
|
2205
|
+
function tn(e, t) {
|
|
2181
2206
|
let n = H(), r = t(e), i = {};
|
|
2182
2207
|
return Object.keys(r).forEach((e) => {
|
|
2183
2208
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2184
2209
|
}), i;
|
|
2185
2210
|
}
|
|
2186
|
-
function
|
|
2211
|
+
function nn(e, t) {
|
|
2187
2212
|
let n = H(), r = t(e), i = {};
|
|
2188
2213
|
return Object.keys(r).forEach((e) => {
|
|
2189
2214
|
i[e] = r[e].bind({ $store: n });
|
|
2190
2215
|
}), i;
|
|
2191
2216
|
}
|
|
2192
|
-
function
|
|
2217
|
+
function rn(e, t = []) {
|
|
2193
2218
|
let [n, r, i] = t, { locale: a } = B();
|
|
2194
2219
|
return l(() => re(e).map((e) => {
|
|
2195
2220
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
@@ -2202,19 +2227,19 @@ function nn(e, t = []) {
|
|
|
2202
2227
|
}
|
|
2203
2228
|
//#endregion
|
|
2204
2229
|
//#region src/components/VxeTable/index.jsx
|
|
2205
|
-
function
|
|
2230
|
+
function an(e) {
|
|
2206
2231
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2207
2232
|
}
|
|
2208
|
-
function
|
|
2233
|
+
function on() {
|
|
2209
2234
|
U.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2210
|
-
return Ht(e, t);
|
|
2211
|
-
} }), U.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2212
2235
|
return Ut(e, t);
|
|
2213
|
-
} }), U.formats.add("
|
|
2236
|
+
} }), U.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2214
2237
|
return Wt(e, t);
|
|
2238
|
+
} }), U.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2239
|
+
return Gt(e, t);
|
|
2215
2240
|
} });
|
|
2216
2241
|
}
|
|
2217
|
-
function
|
|
2242
|
+
function sn() {
|
|
2218
2243
|
U.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2219
2244
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2220
2245
|
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;
|
|
@@ -2263,17 +2288,17 @@ function on() {
|
|
|
2263
2288
|
underline: "never",
|
|
2264
2289
|
type: "primary",
|
|
2265
2290
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2266
|
-
},
|
|
2291
|
+
}, an(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2267
2292
|
}
|
|
2268
2293
|
return g(r, {
|
|
2269
2294
|
underline: "never",
|
|
2270
2295
|
type: "primary",
|
|
2271
2296
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2272
|
-
},
|
|
2297
|
+
}, an(c) ? c : { default: () => [c] });
|
|
2273
2298
|
} });
|
|
2274
2299
|
}
|
|
2275
|
-
function
|
|
2276
|
-
|
|
2300
|
+
function cn() {
|
|
2301
|
+
on(), sn();
|
|
2277
2302
|
}
|
|
2278
2303
|
//#endregion
|
|
2279
|
-
export { st as CmpDictionary, ut as CmpIcon, dt as CmpTag, pt as ConfrimButton,
|
|
2304
|
+
export { st as CmpDictionary, ut as CmpIcon, dt as CmpTag, pt as ConfrimButton, Pt as DownExcelTemp, gt as ImportButton, Se as LayOutForm, Bt as Layer, Mt as ListPage, Ht as OnePortalCasSDK, St as SearchBar, Qe as StatusMap, Ye as _toRaw, Jt as _typeOf, $e as arrToStatusMap, Xe as arrayToTree, We as base64ToBlob, Ge as base64ToFile, Ke as base64ToFormData, nt as checkFileSize, Vt as creatValidator, it as createImportFields, rt as createListPageId, Ee as en_us, Me as exportExcel, Ve as exportExcelMuilti, Wt as formatMoney, Ut as formatNumber, Gt as formatPercent, Ue as getColumnLetterByIndex, ke as getI18n, Q as getI18nT, Et as getListPageConfig, Zt as getLocaleValue, qe as getTableShowColumn, at as getValueBykey, Ae as importExcel, ze as importExcelMuilti, De as messages, on as registerVxeFormatters, cn as registerVxePlugins, sn as registerVxeRenderers, Dt as resetListPageConfig, Tt as setListPageConfig, Oe as setupI18n, Je as sleep, Ze as stringToArray, et as stripHtmlTags, tt as unicode2Str, en as useActions, qt as useDatePicker, $t as useGetters, Xt as useI18nReState, Kt as useRequest, Qt as useState, rn as useVxeEditRenderStatus, X as zh_cn };
|