joy-admin-components 0.2.105 → 0.2.106
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CmpDictionary/index.d.ts +29 -43
- package/dist/components/CmpIcon/index.d.ts +13 -24
- package/dist/joy-admin-components.css +1 -1
- package/dist/joy-admin-components.es.js +243 -242
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/utils/index.d.ts +23 -0
- package/package.json +1 -1
- package/src/utils/index.d.ts +23 -0
|
@@ -4,21 +4,21 @@ import { saveAs as L } from "file-saver";
|
|
|
4
4
|
import R from "exceljs";
|
|
5
5
|
import z from "dayjs";
|
|
6
6
|
import { createI18n as le, useI18n as B } from "vue-i18n";
|
|
7
|
-
import { cloneDeep as ue, debounce as de, isArray as fe } from "lodash";
|
|
8
|
-
import { createNamespacedHelpers as
|
|
9
|
-
import { VxeUI as
|
|
10
|
-
import { useRouter as
|
|
7
|
+
import { cloneDeep as ue, debounce as de, isArray as fe, without as pe } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as me, mapActions as he, mapGetters as ge, mapState as V, useStore as H } from "vuex";
|
|
9
|
+
import { VxeUI as U } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as W } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i = be(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !
|
|
12
|
+
var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, be = Object.getOwnPropertyNames, G = Object.getPrototypeOf, K = Object.prototype.hasOwnProperty, q = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), xe = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = be(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !K.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
|
+
}, J = (e, t, n) => (n = e == null ? {} : _e(G(e)), xe(t || !e || !e.__esModule ? ve(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), Se = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
24
|
let s = 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 U = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), Ce = /* @__PURE__ */ q(((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 U = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), Y = /* @__PURE__ */ q(((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 U = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), we = /* @__PURE__ */ J(Ce()), Te = /* @__PURE__ */ J(Y()), X = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -224,7 +224,7 @@ var U = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
224
224
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
227
|
+
}, Z = {
|
|
228
228
|
"dao-ru": "Import",
|
|
229
229
|
"quan-xuan": "Select All",
|
|
230
230
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -252,30 +252,30 @@ var U = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
252
252
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
253
253
|
validate: { invalidInput: "Please enter valid content" },
|
|
254
254
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
255
|
-
},
|
|
256
|
-
zh_cn:
|
|
257
|
-
en_us:
|
|
258
|
-
},
|
|
259
|
-
function
|
|
255
|
+
}, Ee = {
|
|
256
|
+
zh_cn: X,
|
|
257
|
+
en_us: Z
|
|
258
|
+
}, Q = null;
|
|
259
|
+
function De(e = null) {
|
|
260
260
|
if (e) {
|
|
261
261
|
let { global: t } = e;
|
|
262
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
262
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", X) : t.setLocaleMessage("zh_cn", X), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", Z) : t.setLocaleMessage("en_us", Z), Q = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return Q ||= le({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
268
|
+
messages: Ee
|
|
269
|
+
}), Q;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return
|
|
271
|
+
function Oe() {
|
|
272
|
+
return Q || De();
|
|
273
273
|
}
|
|
274
274
|
function $() {
|
|
275
|
-
return
|
|
275
|
+
return Oe().global.t;
|
|
276
276
|
}
|
|
277
|
-
z.extend(
|
|
278
|
-
async function
|
|
277
|
+
z.extend(we.default), z.extend(Te.default);
|
|
278
|
+
async function ke(e, t) {
|
|
279
279
|
let { fields: n, range: r = 1 } = t;
|
|
280
280
|
if (!n) {
|
|
281
281
|
let e = $();
|
|
@@ -297,15 +297,15 @@ async function Oe(e, t) {
|
|
|
297
297
|
}), a[e._name] = i;
|
|
298
298
|
}), i = null, a;
|
|
299
299
|
}
|
|
300
|
-
var
|
|
301
|
-
async function
|
|
300
|
+
var Ae = { columnWidth: 30 };
|
|
301
|
+
async function je(e, t, n = [], r = {}) {
|
|
302
302
|
if (!e || !t) return;
|
|
303
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
303
|
+
let { columnStyle: i } = r, { columnWidth: a } = Ae;
|
|
304
304
|
t.forEach((e) => {
|
|
305
305
|
e.width = e.width ? e.width : a;
|
|
306
306
|
});
|
|
307
|
-
let { workbook: o, worksheet: s } =
|
|
308
|
-
s.columns = t, s.addRows(n), i && await
|
|
307
|
+
let { workbook: o, worksheet: s } = Me();
|
|
308
|
+
s.columns = t, s.addRows(n), i && await Ne(o, s, i);
|
|
309
309
|
try {
|
|
310
310
|
let t = await o.xlsx.writeBuffer();
|
|
311
311
|
L(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
@@ -313,25 +313,25 @@ async function Ae(e, t, n = [], r = {}) {
|
|
|
313
313
|
console.log(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function Me() {
|
|
317
317
|
let e = new R.Workbook();
|
|
318
318
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
319
319
|
workbook: e,
|
|
320
320
|
worksheet: e.addWorksheet("Sheet1")
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
async function
|
|
323
|
+
async function Ne(e, t, n) {
|
|
324
324
|
let r = Object.keys(n);
|
|
325
325
|
for (let i of r) {
|
|
326
326
|
let r = n[i], { type: a } = r;
|
|
327
327
|
switch (a) {
|
|
328
328
|
case "IMG":
|
|
329
|
-
await
|
|
329
|
+
await Pe(e, t, i, r);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
async function
|
|
334
|
+
async function Pe(e, t, n, r) {
|
|
335
335
|
let i = t.getColumn(n), a = i.values;
|
|
336
336
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
337
337
|
t > 1 && (e.height = 40);
|
|
@@ -339,7 +339,7 @@ async function Ne(e, t, n, r) {
|
|
|
339
339
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
340
340
|
if (n < 2) continue;
|
|
341
341
|
let r = a[n];
|
|
342
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
342
|
+
r && (t.getCell(i.letter + n).value = "", await Fe(e, t, r, {
|
|
343
343
|
width: 100,
|
|
344
344
|
height: 50,
|
|
345
345
|
col: i._number - 1,
|
|
@@ -347,8 +347,8 @@ async function Ne(e, t, n, r) {
|
|
|
347
347
|
}));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
async function
|
|
351
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
350
|
+
async function Fe(e, t, n, r) {
|
|
351
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Ie(n, .3);
|
|
352
352
|
if (c) {
|
|
353
353
|
let n = e.addImage({
|
|
354
354
|
base64: l,
|
|
@@ -366,7 +366,7 @@ async function Pe(e, t, n, r) {
|
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Ie(e, t = 1) {
|
|
370
370
|
let n = new Image();
|
|
371
371
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
372
372
|
n.onload = () => {
|
|
@@ -380,8 +380,8 @@ function Fe(e, t = 1) {
|
|
|
380
380
|
};
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
|
-
var
|
|
384
|
-
async function
|
|
383
|
+
var Le = "---";
|
|
384
|
+
async function Re(e, t) {
|
|
385
385
|
let { fields: n, range: r = 1 } = t;
|
|
386
386
|
if (!n) {
|
|
387
387
|
let e = $();
|
|
@@ -405,8 +405,8 @@ async function Le(e, t) {
|
|
|
405
405
|
if (i > r) {
|
|
406
406
|
let r = { _excelRowNumber: i }, a = !0;
|
|
407
407
|
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(
|
|
408
|
+
let [c, l] = o[t].split(Le), u = e.getCell(c), d;
|
|
409
|
+
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? 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);
|
|
410
410
|
}), a || t.push(r);
|
|
411
411
|
}
|
|
412
412
|
}), a[e._name] = t;
|
|
@@ -414,16 +414,16 @@ async function Le(e, t) {
|
|
|
414
414
|
}
|
|
415
415
|
}), i = null, a;
|
|
416
416
|
}
|
|
417
|
-
var
|
|
417
|
+
var ze = {
|
|
418
418
|
date: "yyyy-mm-dd",
|
|
419
419
|
number: "0",
|
|
420
420
|
string: "@"
|
|
421
421
|
};
|
|
422
|
-
async function
|
|
422
|
+
async function Be(e, t) {
|
|
423
423
|
if (!e || t.length == 0) return;
|
|
424
|
-
let n =
|
|
424
|
+
let n = Ve(t);
|
|
425
425
|
for (let e of n.worksheets) {
|
|
426
|
-
let { columnWidth: r } =
|
|
426
|
+
let { columnWidth: r } = Ae, i = t[e.name];
|
|
427
427
|
if (!i) continue;
|
|
428
428
|
let { tableHeader: a, tableData: o } = i;
|
|
429
429
|
a.forEach((e) => {
|
|
@@ -437,9 +437,9 @@ async function ze(e, t) {
|
|
|
437
437
|
};
|
|
438
438
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
439
439
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
440
|
-
if (d.numFmt =
|
|
440
|
+
if (d.numFmt = ze[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
441
441
|
let t = n.addWorksheet(a);
|
|
442
|
-
t.state = "hidden", u ||= (e) => `${e.label}${
|
|
442
|
+
t.state = "hidden", u ||= (e) => `${e.label}${Le}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
443
443
|
if (n > 0) {
|
|
444
444
|
let t = $();
|
|
445
445
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
@@ -465,44 +465,48 @@ async function ze(e, t) {
|
|
|
465
465
|
console.log(e);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ve(e) {
|
|
469
469
|
let t = $(), n = new R.Workbook();
|
|
470
470
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((t, n) => (e[t].sort ?? 0) - (e[n].sort ?? 0)).forEach((r) => {
|
|
471
471
|
let i = r, a = !1;
|
|
472
472
|
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), a = !0), r.length > 31 && (r = r.substring(0, 31).trim(), a = !0, console.warn(t("excel.sheetNameTooLong", [i, r]))), a && (e[r] = e[i], delete e[i]), n.addWorksheet(r);
|
|
473
473
|
}), n;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function He(e) {
|
|
476
476
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ue(e) {
|
|
479
479
|
let t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
|
|
480
480
|
for (let e = 0; e < i; ++e) a[e] = r.charCodeAt(e);
|
|
481
481
|
return new Blob([a], { type: n });
|
|
482
482
|
}
|
|
483
|
-
function
|
|
484
|
-
let n =
|
|
483
|
+
function We(e, t = "image.png") {
|
|
484
|
+
let n = Ue(e);
|
|
485
485
|
return new File([n], t, { type: n.type });
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function Ge(e, t) {
|
|
488
488
|
let n = e.match(/^data:image\/(\w+);base64,/), r = n ? n[1] : "png";
|
|
489
489
|
t ||= `image_${Date.now()}.${r}`;
|
|
490
|
-
let i =
|
|
490
|
+
let i = We(e, t), a = new FormData();
|
|
491
491
|
return a.append("file", i), a;
|
|
492
492
|
}
|
|
493
|
+
function Ke(e) {
|
|
494
|
+
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
|
+
return i.push("type=checkbox", "action", "actions"), pe(r, ...i);
|
|
496
|
+
}
|
|
493
497
|
//#endregion
|
|
494
498
|
//#region src/utils/tools/tools.js
|
|
495
|
-
function
|
|
499
|
+
function qe(e) {
|
|
496
500
|
return new Promise((t) => {
|
|
497
501
|
setTimeout(() => {
|
|
498
502
|
t();
|
|
499
503
|
}, e);
|
|
500
504
|
});
|
|
501
505
|
}
|
|
502
|
-
function
|
|
506
|
+
function Je(e) {
|
|
503
507
|
return JSON.parse(JSON.stringify(e));
|
|
504
508
|
}
|
|
505
|
-
function
|
|
509
|
+
function Ye(e) {
|
|
506
510
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
507
511
|
for (let i of e) {
|
|
508
512
|
n[i.id] = {
|
|
@@ -514,10 +518,10 @@ function qe(e) {
|
|
|
514
518
|
}
|
|
515
519
|
return t;
|
|
516
520
|
}
|
|
517
|
-
function
|
|
521
|
+
function Xe(e, t = " ") {
|
|
518
522
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
519
523
|
}
|
|
520
|
-
var
|
|
524
|
+
var Ze = class {
|
|
521
525
|
constructor(e, t = [
|
|
522
526
|
"label",
|
|
523
527
|
"value",
|
|
@@ -535,7 +539,7 @@ var Ye = class {
|
|
|
535
539
|
}
|
|
536
540
|
getName(e) {
|
|
537
541
|
if (!this.has(e)) return "-";
|
|
538
|
-
let t =
|
|
542
|
+
let t = Oe().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
539
543
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
540
544
|
}
|
|
541
545
|
getTag(e) {
|
|
@@ -561,49 +565,49 @@ var Ye = class {
|
|
|
561
565
|
return this.labelMap.get(e) ?? null;
|
|
562
566
|
}
|
|
563
567
|
};
|
|
564
|
-
function
|
|
565
|
-
if (e.length == 0) return new
|
|
568
|
+
function Qe(e, t = [], n = "i18nName") {
|
|
569
|
+
if (e.length == 0) return new Ze([]);
|
|
566
570
|
if (t.length < 2) {
|
|
567
571
|
let e = $();
|
|
568
572
|
throw Error(e("tools.keysLengthError"));
|
|
569
573
|
}
|
|
570
|
-
return new
|
|
574
|
+
return new Ze(e.map((e) => {
|
|
571
575
|
let r = {};
|
|
572
576
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
573
577
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
574
578
|
}), r;
|
|
575
579
|
}));
|
|
576
580
|
}
|
|
577
|
-
function
|
|
581
|
+
function $e(e) {
|
|
578
582
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
579
583
|
}
|
|
580
|
-
function
|
|
584
|
+
function et(e) {
|
|
581
585
|
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)))) : "";
|
|
582
586
|
}
|
|
583
|
-
function
|
|
587
|
+
function tt(e, t = 10) {
|
|
584
588
|
let n = 1024 * 1024 * t;
|
|
585
589
|
return !(e.size > n);
|
|
586
590
|
}
|
|
587
|
-
function
|
|
591
|
+
function nt(e) {
|
|
588
592
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
589
593
|
}
|
|
590
|
-
function
|
|
594
|
+
function rt(e) {
|
|
591
595
|
let t = {};
|
|
592
596
|
return e.map((e, n) => {
|
|
593
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
597
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = He(n);
|
|
594
598
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
595
599
|
}), t;
|
|
596
600
|
}
|
|
597
|
-
function
|
|
601
|
+
function it(e, t) {
|
|
598
602
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
599
603
|
}
|
|
600
604
|
//#endregion
|
|
601
605
|
//#region \0plugin-vue:export-helper
|
|
602
|
-
var
|
|
606
|
+
var at = (e, t) => {
|
|
603
607
|
let n = e.__vccOpts || e;
|
|
604
608
|
for (let [e, r] of t) n[e] = r;
|
|
605
609
|
return n;
|
|
606
|
-
},
|
|
610
|
+
}, ot = ["onClick"], st = /* @__PURE__ */ at({
|
|
607
611
|
__name: "index",
|
|
608
612
|
props: /* @__PURE__ */ b({
|
|
609
613
|
api: { type: Function },
|
|
@@ -648,7 +652,7 @@ var rt = (e, t) => {
|
|
|
648
652
|
setup(e, { emit: t }) {
|
|
649
653
|
let n = e, r = F(), { t: i, locale: a } = B(), o = ie(e, "modelValue"), s = l(() => r["value-key"] != null), _ = k(""), v = l(() => {
|
|
650
654
|
if (r.remote !== void 0) return n.data;
|
|
651
|
-
let e =
|
|
655
|
+
let e = Xe(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
652
656
|
if (e.length == 0) return o;
|
|
653
657
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
654
658
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -778,7 +782,7 @@ var rt = (e, t) => {
|
|
|
778
782
|
clearable: "",
|
|
779
783
|
onChange: w
|
|
780
784
|
}), m({
|
|
781
|
-
default: I(({ item: e }) => [p("div", { onClick: (t) => E(e) }, N(e.label), 9,
|
|
785
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => E(e) }, N(e.label), 9, ot)]),
|
|
782
786
|
_: 2
|
|
783
787
|
}, [P(r).multiple == null ? void 0 : {
|
|
784
788
|
name: "header",
|
|
@@ -795,18 +799,18 @@ var rt = (e, t) => {
|
|
|
795
799
|
}]), 1040, ["options", "modelValue"]));
|
|
796
800
|
};
|
|
797
801
|
}
|
|
798
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
802
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), ct = _({ props: { name: {
|
|
799
803
|
tyepe: String,
|
|
800
804
|
required: !0
|
|
801
805
|
} } });
|
|
802
|
-
function
|
|
806
|
+
function lt(e, t, n, r, i, a) {
|
|
803
807
|
let o = j("el-icon");
|
|
804
808
|
return D(), u(o, { class: "cmp-icon" }, {
|
|
805
809
|
default: I(() => [(D(), u(M(e.name)))]),
|
|
806
810
|
_: 1
|
|
807
811
|
});
|
|
808
812
|
}
|
|
809
|
-
var
|
|
813
|
+
var ut = /* @__PURE__ */ at(ct, [["render", lt], ["__scopeId", "data-v-733f9daa"]]), dt = {
|
|
810
814
|
__name: "index",
|
|
811
815
|
props: { fontColor: String },
|
|
812
816
|
setup(e) {
|
|
@@ -822,7 +826,7 @@ var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"
|
|
|
822
826
|
}, 16, ["style"]);
|
|
823
827
|
};
|
|
824
828
|
}
|
|
825
|
-
},
|
|
829
|
+
}, ft = { class: "confirm-button-wrapper" }, pt = /* @__PURE__ */ at({
|
|
826
830
|
__name: "index",
|
|
827
831
|
emits: ["ok", "no"],
|
|
828
832
|
setup(e, { emit: t }) {
|
|
@@ -834,7 +838,7 @@ var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"
|
|
|
834
838
|
}
|
|
835
839
|
return (e, t) => {
|
|
836
840
|
let n = j("el-popconfirm");
|
|
837
|
-
return D(), f("span",
|
|
841
|
+
return D(), f("span", ft, [g(n, x(e.$attrs, {
|
|
838
842
|
onConfirm: P(r),
|
|
839
843
|
onCancel: i
|
|
840
844
|
}), {
|
|
@@ -843,7 +847,7 @@ var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"
|
|
|
843
847
|
}, 16, ["onConfirm"])]);
|
|
844
848
|
};
|
|
845
849
|
}
|
|
846
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
850
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), mt = { class: "ImportButton" }, ht = ["accept"], gt = /* @__PURE__ */ at({
|
|
847
851
|
__name: "index",
|
|
848
852
|
props: {
|
|
849
853
|
accept: {
|
|
@@ -879,7 +883,7 @@ var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"
|
|
|
879
883
|
return;
|
|
880
884
|
}
|
|
881
885
|
}
|
|
882
|
-
let c = await
|
|
886
|
+
let c = await Re(s, n.fields).catch(() => {
|
|
883
887
|
a.value = !1;
|
|
884
888
|
}).finally(() => {
|
|
885
889
|
r.value.value = null;
|
|
@@ -890,7 +894,7 @@ var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"
|
|
|
890
894
|
}
|
|
891
895
|
return (t, n) => {
|
|
892
896
|
let i = j("el-button");
|
|
893
|
-
return D(), f("div",
|
|
897
|
+
return D(), f("div", mt, [g(i, x({
|
|
894
898
|
type: "primary",
|
|
895
899
|
loading: a.value,
|
|
896
900
|
class: "mgr10",
|
|
@@ -910,17 +914,17 @@ var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"
|
|
|
910
914
|
opacity: "0"
|
|
911
915
|
},
|
|
912
916
|
type: "file"
|
|
913
|
-
}, null, 40,
|
|
917
|
+
}, null, 40, ht)]);
|
|
914
918
|
};
|
|
915
919
|
}
|
|
916
920
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
917
921
|
//#endregion
|
|
918
922
|
//#region src/components/SearchBar/tools.js
|
|
919
|
-
function
|
|
923
|
+
function _t(e) {
|
|
920
924
|
let t = {};
|
|
921
925
|
return e.forEach((e) => {
|
|
922
926
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date" } = e;
|
|
923
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
927
|
+
if (n) if (r == "input" && i?.multiple) t[n] = Xe(a);
|
|
924
928
|
else if (r == "date") if (o.includes("range")) {
|
|
925
929
|
let [e, r] = n, [i, s] = a || [];
|
|
926
930
|
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;
|
|
@@ -930,7 +934,7 @@ function ht(e) {
|
|
|
930
934
|
}
|
|
931
935
|
//#endregion
|
|
932
936
|
//#region src/components/SearchBar/index.vue
|
|
933
|
-
var
|
|
937
|
+
var vt = { key: 0 }, yt = { class: "btns" }, bt = { class: "left" }, xt = { class: "right" }, St = /* @__PURE__ */ at({
|
|
934
938
|
__name: "index",
|
|
935
939
|
props: { form: {
|
|
936
940
|
type: Object,
|
|
@@ -960,7 +964,7 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
960
964
|
i("confirm");
|
|
961
965
|
}
|
|
962
966
|
function T() {
|
|
963
|
-
return
|
|
967
|
+
return _t(r.form.items);
|
|
964
968
|
}
|
|
965
969
|
let ee = ue(r.form.items);
|
|
966
970
|
function E() {
|
|
@@ -984,7 +988,7 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
984
988
|
inline: "",
|
|
985
989
|
model: e.form.data
|
|
986
990
|
}, {
|
|
987
|
-
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",
|
|
991
|
+
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", vt)) : (D(), u(l, {
|
|
988
992
|
key: 1,
|
|
989
993
|
label: e.name
|
|
990
994
|
}, {
|
|
@@ -1002,7 +1006,7 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
1002
1006
|
"class",
|
|
1003
1007
|
"placeholder"
|
|
1004
1008
|
])) : e.type === "custom" ? (D(), u(M(e.render), { key: 1 })) : d("", !0),
|
|
1005
|
-
e.type === "select" ? (D(), u(
|
|
1009
|
+
e.type === "select" ? (D(), u(st, x({
|
|
1006
1010
|
key: 2,
|
|
1007
1011
|
class: e.option?.class || "w150",
|
|
1008
1012
|
modelValue: e.value,
|
|
@@ -1049,7 +1053,7 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
1049
1053
|
_: 2
|
|
1050
1054
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1051
1055
|
_: 1
|
|
1052
|
-
}, 8, ["model"])], 4), p("div",
|
|
1056
|
+
}, 8, ["model"])], 4), p("div", yt, [p("div", bt, [A(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", xt, [
|
|
1053
1057
|
g(ee, {
|
|
1054
1058
|
underline: "never",
|
|
1055
1059
|
class: "mgr10",
|
|
@@ -1057,7 +1061,7 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
1057
1061
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1058
1062
|
}
|
|
1059
1063
|
}, {
|
|
1060
|
-
default: I(() => [g(
|
|
1064
|
+
default: I(() => [g(ut, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + N(_.value), 1)]),
|
|
1061
1065
|
_: 1
|
|
1062
1066
|
}),
|
|
1063
1067
|
g(E, {
|
|
@@ -1078,7 +1082,7 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
1078
1082
|
])])], 32);
|
|
1079
1083
|
};
|
|
1080
1084
|
}
|
|
1081
|
-
}, [["__scopeId", "data-v-db6f71dd"]]),
|
|
1085
|
+
}, [["__scopeId", "data-v-db6f71dd"]]), Ct = {
|
|
1082
1086
|
pageNoKey: "pageNo",
|
|
1083
1087
|
pageSizeKey: "pageSize",
|
|
1084
1088
|
totalKey: "total",
|
|
@@ -1102,26 +1106,26 @@ var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { clas
|
|
|
1102
1106
|
showShadow: !1,
|
|
1103
1107
|
showCheckBox: !1,
|
|
1104
1108
|
enableCellCopy: !0
|
|
1105
|
-
},
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1108
|
-
...
|
|
1109
|
+
}, wt = { ...Ct };
|
|
1110
|
+
function Tt(e) {
|
|
1111
|
+
wt = {
|
|
1112
|
+
...wt,
|
|
1109
1113
|
...e,
|
|
1110
1114
|
responseDataKeys: {
|
|
1111
|
-
...
|
|
1115
|
+
...wt.responseDataKeys,
|
|
1112
1116
|
...e.responseDataKeys || {}
|
|
1113
1117
|
}
|
|
1114
1118
|
};
|
|
1115
1119
|
}
|
|
1116
|
-
function
|
|
1117
|
-
return
|
|
1120
|
+
function Et() {
|
|
1121
|
+
return wt;
|
|
1118
1122
|
}
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1123
|
+
function Dt() {
|
|
1124
|
+
wt = { ...Ct };
|
|
1121
1125
|
}
|
|
1122
1126
|
//#endregion
|
|
1123
1127
|
//#region src/components/ListPage/index.vue
|
|
1124
|
-
var
|
|
1128
|
+
var Ot = { class: "center" }, kt = 0, At = 20, jt = .3, Mt = /* @__PURE__ */ at({
|
|
1125
1129
|
__name: "index",
|
|
1126
1130
|
props: {
|
|
1127
1131
|
id: {
|
|
@@ -1151,12 +1155,9 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1151
1155
|
}
|
|
1152
1156
|
},
|
|
1153
1157
|
setup(e, { expose: t }) {
|
|
1154
|
-
let { t: n, locale: r } = B(), i =
|
|
1158
|
+
let { t: n, locale: r } = B(), i = Et(), a = e, o = k(!1), s = k([]);
|
|
1155
1159
|
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 = []);
|
|
1156
|
-
let c = l(() => {
|
|
1157
|
-
let e = "default-table";
|
|
1158
|
-
return a.id ? `listPageId-${e}-${a.id}` : `listPageId-${e}`;
|
|
1159
|
-
}), m = ue(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = O({
|
|
1160
|
+
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m = ue(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = O({
|
|
1160
1161
|
[_]: 1,
|
|
1161
1162
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1162
1163
|
total: 0
|
|
@@ -1181,9 +1182,9 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1181
1182
|
let e = F();
|
|
1182
1183
|
if (!e || !e.$el) return !1;
|
|
1183
1184
|
let t = e.$el;
|
|
1184
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
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", Me), t.addEventListener("mousedown", Ce), t.addEventListener("mousemove", we), t.addEventListener("mouseup", Te), t.addEventListener("keydown", Me);
|
|
1185
1186
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1186
|
-
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", Ae), n.addEventListener("scroll", Ae), n.__cellCopyScrollBound = !0),
|
|
1187
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", Ae), n.addEventListener("scroll", Ae), n.__cellCopyScrollBound = !0), $(), !0;
|
|
1187
1188
|
};
|
|
1188
1189
|
T(() => {
|
|
1189
1190
|
M(), window.addEventListener("resize", re), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", Pe), setTimeout(() => {
|
|
@@ -1195,11 +1196,11 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1195
1196
|
}, 500);
|
|
1196
1197
|
}), ee(() => {
|
|
1197
1198
|
if (window.removeEventListener("resize", re), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1198
|
-
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove",
|
|
1199
|
+
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove", q), J(), ke();
|
|
1199
1200
|
let e = F();
|
|
1200
1201
|
if (e && e.$el) {
|
|
1201
1202
|
let t = e.$el;
|
|
1202
|
-
t.removeEventListener("mousedown",
|
|
1203
|
+
t.removeEventListener("mousedown", Ce), t.removeEventListener("mousemove", we), t.removeEventListener("mouseup", Te), t.removeEventListener("keydown", Me);
|
|
1203
1204
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1204
1205
|
n && (n.removeEventListener("scroll", Ae), n.__cellCopyScrollBound = !1);
|
|
1205
1206
|
}
|
|
@@ -1219,7 +1220,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1219
1220
|
});
|
|
1220
1221
|
let e = [];
|
|
1221
1222
|
for (let n of t.rows) {
|
|
1222
|
-
let t =
|
|
1223
|
+
let t = it(c, n);
|
|
1223
1224
|
if (t) {
|
|
1224
1225
|
e = t;
|
|
1225
1226
|
break;
|
|
@@ -1227,13 +1228,13 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1227
1228
|
}
|
|
1228
1229
|
let o = 0;
|
|
1229
1230
|
for (let e of t.total) {
|
|
1230
|
-
let t =
|
|
1231
|
+
let t = it(c, e);
|
|
1231
1232
|
if (t !== void 0) {
|
|
1232
1233
|
o = t;
|
|
1233
1234
|
break;
|
|
1234
1235
|
}
|
|
1235
1236
|
}
|
|
1236
|
-
s.value = n ? n(e) : e, y.total = o, se = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && (
|
|
1237
|
+
s.value = n ? n(e) : e, y.total = o, se = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && (X(), W = /* @__PURE__ */ new WeakMap(), _e = null, S(() => {
|
|
1237
1238
|
setTimeout(() => {
|
|
1238
1239
|
ie();
|
|
1239
1240
|
}, 500);
|
|
@@ -1244,7 +1245,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1244
1245
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1245
1246
|
L({
|
|
1246
1247
|
...y,
|
|
1247
|
-
...
|
|
1248
|
+
..._t(a.searchForm.items),
|
|
1248
1249
|
...e,
|
|
1249
1250
|
...n
|
|
1250
1251
|
});
|
|
@@ -1260,7 +1261,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1260
1261
|
function le() {
|
|
1261
1262
|
return {
|
|
1262
1263
|
...y,
|
|
1263
|
-
...
|
|
1264
|
+
..._t(a.searchForm.items)
|
|
1264
1265
|
};
|
|
1265
1266
|
}
|
|
1266
1267
|
let pe = () => {
|
|
@@ -1298,7 +1299,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1298
1299
|
startCell: null,
|
|
1299
1300
|
endCell: null,
|
|
1300
1301
|
selectedCells: []
|
|
1301
|
-
}), H = null,
|
|
1302
|
+
}), H = null, U = () => {
|
|
1302
1303
|
if (!V.startCell || !V.endCell) {
|
|
1303
1304
|
H = null, V.selectedCells = [];
|
|
1304
1305
|
return;
|
|
@@ -1316,14 +1317,14 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1316
1317
|
colIndex: e
|
|
1317
1318
|
});
|
|
1318
1319
|
V.selectedCells = i;
|
|
1319
|
-
},
|
|
1320
|
+
}, W = /* @__PURE__ */ new WeakMap(), _e = null, ve = 0, ye = (e, t) => {
|
|
1320
1321
|
let n = e.getTableData().fullData;
|
|
1321
|
-
if (n !==
|
|
1322
|
-
|
|
1323
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1322
|
+
if (n !== _e || n.length !== ve) {
|
|
1323
|
+
W = /* @__PURE__ */ new WeakMap(), _e = n, ve = n.length;
|
|
1324
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && W.set(n[e], e);
|
|
1324
1325
|
}
|
|
1325
|
-
return
|
|
1326
|
-
},
|
|
1326
|
+
return W.has(t) ? W.get(t) : -1;
|
|
1327
|
+
}, be = (e) => {
|
|
1327
1328
|
let t = e.closest(".vxe-body--column");
|
|
1328
1329
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1329
1330
|
let n = t.closest(".vxe-body--row");
|
|
@@ -1333,7 +1334,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1333
1334
|
let i = -1, a = n.getAttribute("rowid");
|
|
1334
1335
|
if (a != null) {
|
|
1335
1336
|
let e = r.getRowById(a);
|
|
1336
|
-
e && (i =
|
|
1337
|
+
e && (i = ye(r, e));
|
|
1337
1338
|
}
|
|
1338
1339
|
if (i < 0) {
|
|
1339
1340
|
let e = n.parentElement;
|
|
@@ -1346,48 +1347,48 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1346
1347
|
colIndex: o,
|
|
1347
1348
|
cell: t
|
|
1348
1349
|
};
|
|
1349
|
-
},
|
|
1350
|
+
}, G = null, K = 0, q = (e) => {
|
|
1350
1351
|
if (!V.isSelecting) return;
|
|
1351
|
-
|
|
1352
|
+
K = e.clientY;
|
|
1352
1353
|
let t = F();
|
|
1353
1354
|
if (!t || !t.$el) return;
|
|
1354
1355
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1355
1356
|
if (!r) return;
|
|
1356
1357
|
let i = r.getBoundingClientRect();
|
|
1357
|
-
e.clientY < i.top -
|
|
1358
|
-
},
|
|
1358
|
+
e.clientY < i.top - kt || e.clientY > i.bottom + kt ? G || xe() : J();
|
|
1359
|
+
}, xe = () => {
|
|
1359
1360
|
let e = () => {
|
|
1360
1361
|
if (!V.isSelecting) {
|
|
1361
|
-
|
|
1362
|
+
J();
|
|
1362
1363
|
return;
|
|
1363
1364
|
}
|
|
1364
1365
|
let t = F();
|
|
1365
1366
|
if (!t || !t.$el) {
|
|
1366
|
-
|
|
1367
|
+
J();
|
|
1367
1368
|
return;
|
|
1368
1369
|
}
|
|
1369
1370
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1370
1371
|
if (!r) {
|
|
1371
|
-
|
|
1372
|
+
J();
|
|
1372
1373
|
return;
|
|
1373
1374
|
}
|
|
1374
1375
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1375
|
-
if (
|
|
1376
|
-
let e = i.top -
|
|
1377
|
-
a = -Math.min(
|
|
1378
|
-
} else if (
|
|
1379
|
-
let e =
|
|
1380
|
-
a = Math.min(
|
|
1376
|
+
if (K < i.top) {
|
|
1377
|
+
let e = i.top - K;
|
|
1378
|
+
a = -Math.min(At, Math.max(2, e * jt));
|
|
1379
|
+
} else if (K > i.bottom) {
|
|
1380
|
+
let e = K - i.bottom;
|
|
1381
|
+
a = Math.min(At, Math.max(2, e * jt));
|
|
1381
1382
|
} else {
|
|
1382
|
-
|
|
1383
|
+
J();
|
|
1383
1384
|
return;
|
|
1384
1385
|
}
|
|
1385
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)),
|
|
1386
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Se(r, i), G = requestAnimationFrame(e);
|
|
1386
1387
|
};
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1389
|
-
|
|
1390
|
-
},
|
|
1388
|
+
G = requestAnimationFrame(e);
|
|
1389
|
+
}, J = () => {
|
|
1390
|
+
G &&= (cancelAnimationFrame(G), null);
|
|
1391
|
+
}, Se = (e, t) => {
|
|
1391
1392
|
let n = F();
|
|
1392
1393
|
if (!n) return;
|
|
1393
1394
|
let r = n.getTableData().fullData;
|
|
@@ -1397,7 +1398,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1397
1398
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1398
1399
|
if (a.length === 0) return;
|
|
1399
1400
|
let o = null;
|
|
1400
|
-
if (
|
|
1401
|
+
if (K < t.top ? o = a[0] : K > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1401
1402
|
let s = o.getAttribute("rowid");
|
|
1402
1403
|
if (s == null) return;
|
|
1403
1404
|
let c = -1, l = n.getRowById(s);
|
|
@@ -1406,36 +1407,36 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1406
1407
|
V.endCell = {
|
|
1407
1408
|
rowIndex: c,
|
|
1408
1409
|
colIndex: u
|
|
1409
|
-
},
|
|
1410
|
-
},
|
|
1411
|
-
let t =
|
|
1410
|
+
}, U(), Ee();
|
|
1411
|
+
}, Ce = (e) => {
|
|
1412
|
+
let t = be(e.target);
|
|
1412
1413
|
if (!t) {
|
|
1413
|
-
|
|
1414
|
+
X();
|
|
1414
1415
|
return;
|
|
1415
1416
|
}
|
|
1416
1417
|
let n = F();
|
|
1417
1418
|
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), V.isSelecting = !0, V.startCell = {
|
|
1418
1419
|
rowIndex: t.rowIndex,
|
|
1419
1420
|
colIndex: t.colIndex
|
|
1420
|
-
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove",
|
|
1421
|
-
},
|
|
1422
|
-
V.isSelecting && (
|
|
1423
|
-
if (
|
|
1424
|
-
let t =
|
|
1421
|
+
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove", q), U(), Ee();
|
|
1422
|
+
}, Y = null, we = (e) => {
|
|
1423
|
+
V.isSelecting && (Y ||= requestAnimationFrame(() => {
|
|
1424
|
+
if (Y = null, !V.isSelecting) return;
|
|
1425
|
+
let t = be(e.target);
|
|
1425
1426
|
t && (V.endCell && V.endCell.rowIndex === t.rowIndex && V.endCell.colIndex === t.colIndex || (V.endCell = {
|
|
1426
1427
|
rowIndex: t.rowIndex,
|
|
1427
1428
|
colIndex: t.colIndex
|
|
1428
|
-
},
|
|
1429
|
+
}, U(), Ee()));
|
|
1429
1430
|
}));
|
|
1430
|
-
},
|
|
1431
|
-
V.isSelecting = !1,
|
|
1432
|
-
},
|
|
1431
|
+
}, Te = () => {
|
|
1432
|
+
V.isSelecting = !1, J(), Y &&= (cancelAnimationFrame(Y), null), document.removeEventListener("mousemove", q);
|
|
1433
|
+
}, X = () => {
|
|
1433
1434
|
V.selectedCells = [], V.startCell = null, V.endCell = null, H = null;
|
|
1434
1435
|
let e = F();
|
|
1435
1436
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1436
1437
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1437
1438
|
});
|
|
1438
|
-
},
|
|
1439
|
+
}, Z = () => {
|
|
1439
1440
|
let e = F();
|
|
1440
1441
|
if (!e) return;
|
|
1441
1442
|
let t = e.$el;
|
|
@@ -1464,7 +1465,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1464
1465
|
let d = l.get(String(u));
|
|
1465
1466
|
if (d === void 0) {
|
|
1466
1467
|
let t = e.getRowById(u);
|
|
1467
|
-
if (t && (d =
|
|
1468
|
+
if (t && (d = ye(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1468
1469
|
}
|
|
1469
1470
|
if (d < r || d > i) continue;
|
|
1470
1471
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1475,28 +1476,28 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1475
1476
|
}
|
|
1476
1477
|
}
|
|
1477
1478
|
}
|
|
1478
|
-
},
|
|
1479
|
+
}, Ee = () => {
|
|
1479
1480
|
S(() => {
|
|
1480
|
-
|
|
1481
|
+
Z();
|
|
1481
1482
|
});
|
|
1482
|
-
},
|
|
1483
|
-
|
|
1484
|
-
|
|
1483
|
+
}, Q = null, De = null, Oe = () => {
|
|
1484
|
+
De ||= requestAnimationFrame(() => {
|
|
1485
|
+
De = null, Z();
|
|
1485
1486
|
});
|
|
1486
|
-
},
|
|
1487
|
+
}, $ = () => {
|
|
1487
1488
|
let e = F();
|
|
1488
1489
|
if (!e || !e.$el) return;
|
|
1489
1490
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1490
|
-
t && (ke(),
|
|
1491
|
-
H &&
|
|
1492
|
-
}),
|
|
1491
|
+
t && (ke(), Q = new MutationObserver(() => {
|
|
1492
|
+
H && Oe();
|
|
1493
|
+
}), Q.observe(t, {
|
|
1493
1494
|
childList: !0,
|
|
1494
1495
|
subtree: !1
|
|
1495
1496
|
}));
|
|
1496
1497
|
}, ke = () => {
|
|
1497
|
-
|
|
1498
|
+
Q &&= (Q.disconnect(), null), De &&= (cancelAnimationFrame(De), null);
|
|
1498
1499
|
}, Ae = () => {
|
|
1499
|
-
H &&
|
|
1500
|
+
H && Oe();
|
|
1500
1501
|
}, je = async () => {
|
|
1501
1502
|
if (!H) return;
|
|
1502
1503
|
let e = F();
|
|
@@ -1568,12 +1569,12 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1568
1569
|
console.error("复制失败:", e);
|
|
1569
1570
|
}
|
|
1570
1571
|
}, Me = (e) => {
|
|
1571
|
-
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), je()) : e.key === "Escape" &&
|
|
1572
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), je()) : e.key === "Escape" && X());
|
|
1572
1573
|
}, Ne = () => {
|
|
1573
|
-
V.isSelecting = !1,
|
|
1574
|
+
V.isSelecting = !1, J(), Y &&= (cancelAnimationFrame(Y), null), document.removeEventListener("mousemove", q);
|
|
1574
1575
|
}, Pe = (e) => {
|
|
1575
1576
|
let t = F();
|
|
1576
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1577
|
+
!t || !t.$el || t.$el.contains(e.target) || X();
|
|
1577
1578
|
}, Fe = (e) => {
|
|
1578
1579
|
y[_] = e, R();
|
|
1579
1580
|
}, Ie = (e) => {
|
|
@@ -1600,7 +1601,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1600
1601
|
}), (t, n) => {
|
|
1601
1602
|
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"), ee = j("el-pagination"), E = ne("loading");
|
|
1602
1603
|
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1603
|
-
e.searchForm.showSearch ? (D(), u(
|
|
1604
|
+
e.searchForm.showSearch ? (D(), u(St, {
|
|
1604
1605
|
key: 0,
|
|
1605
1606
|
form: e.searchForm,
|
|
1606
1607
|
onReset: z,
|
|
@@ -1615,7 +1616,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1615
1616
|
round: "",
|
|
1616
1617
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1617
1618
|
}, {
|
|
1618
|
-
default: I(() => [g(
|
|
1619
|
+
default: I(() => [g(ut, { name: "Tools" })]),
|
|
1619
1620
|
_: 1
|
|
1620
1621
|
})
|
|
1621
1622
|
]),
|
|
@@ -1647,7 +1648,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1647
1648
|
title: t.$t("xu-hao"),
|
|
1648
1649
|
fixed: "left"
|
|
1649
1650
|
}, {
|
|
1650
|
-
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div",
|
|
1651
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", Ot, [n ? (D(), u(l, {
|
|
1651
1652
|
key: 0,
|
|
1652
1653
|
checked: !0,
|
|
1653
1654
|
disabled: r,
|
|
@@ -1697,7 +1698,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1697
1698
|
], 2);
|
|
1698
1699
|
};
|
|
1699
1700
|
}
|
|
1700
|
-
}, [["__scopeId", "data-v-
|
|
1701
|
+
}, [["__scopeId", "data-v-c80f0191"]]), Nt = {
|
|
1701
1702
|
__name: "index",
|
|
1702
1703
|
props: {
|
|
1703
1704
|
sheetsConfig: {
|
|
@@ -1716,7 +1717,7 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1716
1717
|
setup(e) {
|
|
1717
1718
|
let t = e;
|
|
1718
1719
|
function n() {
|
|
1719
|
-
|
|
1720
|
+
Be(t.fileName + (t.version ? `__v${t.version}` : ""), t.sheetsConfig);
|
|
1720
1721
|
}
|
|
1721
1722
|
return (e, t) => {
|
|
1722
1723
|
let r = j("el-link");
|
|
@@ -1729,18 +1730,18 @@ var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt(
|
|
|
1729
1730
|
}, 16);
|
|
1730
1731
|
};
|
|
1731
1732
|
}
|
|
1732
|
-
},
|
|
1733
|
+
}, Pt = {
|
|
1733
1734
|
mounted(e, t) {
|
|
1734
|
-
t.value &&
|
|
1735
|
+
t.value && Ft(e);
|
|
1735
1736
|
},
|
|
1736
1737
|
updated(e, t) {
|
|
1737
|
-
t.value ?
|
|
1738
|
+
t.value ? Ft(e) : It(e);
|
|
1738
1739
|
},
|
|
1739
1740
|
beforeUnmount(e) {
|
|
1740
|
-
|
|
1741
|
+
It(e);
|
|
1741
1742
|
}
|
|
1742
1743
|
};
|
|
1743
|
-
async function
|
|
1744
|
+
async function Ft(e) {
|
|
1744
1745
|
await f();
|
|
1745
1746
|
let t = e.querySelector(".el-dialog");
|
|
1746
1747
|
if (!t) return;
|
|
@@ -1803,15 +1804,15 @@ async function Nt(e) {
|
|
|
1803
1804
|
}
|
|
1804
1805
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1805
1806
|
}
|
|
1806
|
-
function
|
|
1807
|
+
function It(e) {
|
|
1807
1808
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1808
1809
|
}
|
|
1809
1810
|
//#endregion
|
|
1810
1811
|
//#region src/components/Layer/index.vue
|
|
1811
|
-
var
|
|
1812
|
+
var Lt = {
|
|
1812
1813
|
key: 0,
|
|
1813
1814
|
class: "drawer-btn"
|
|
1814
|
-
},
|
|
1815
|
+
}, Rt = { key: 1 }, zt = {
|
|
1815
1816
|
__name: "index",
|
|
1816
1817
|
props: {
|
|
1817
1818
|
layer: {
|
|
@@ -1857,7 +1858,7 @@ var Ft = {
|
|
|
1857
1858
|
default: I(() => [
|
|
1858
1859
|
A(t.$slots, "default"),
|
|
1859
1860
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1860
|
-
e.layer.showButton ? (D(), f("div",
|
|
1861
|
+
e.layer.showButton ? (D(), f("div", Lt, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1861
1862
|
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1862
1863
|
_: 1
|
|
1863
1864
|
}), g(r, {
|
|
@@ -1874,7 +1875,7 @@ var Ft = {
|
|
|
1874
1875
|
"modelValue",
|
|
1875
1876
|
"size",
|
|
1876
1877
|
"title"
|
|
1877
|
-
])) : oe((D(), f("div",
|
|
1878
|
+
])) : oe((D(), f("div", Rt, [g(a, {
|
|
1878
1879
|
"close-on-click-modal": !1,
|
|
1879
1880
|
modelValue: e.layer.show,
|
|
1880
1881
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1902,13 +1903,13 @@ var Ft = {
|
|
|
1902
1903
|
"modelValue",
|
|
1903
1904
|
"title",
|
|
1904
1905
|
"width"
|
|
1905
|
-
])])), [[P(
|
|
1906
|
+
])])), [[P(Pt), e.layer.show]]);
|
|
1906
1907
|
};
|
|
1907
1908
|
}
|
|
1908
1909
|
};
|
|
1909
1910
|
//#endregion
|
|
1910
1911
|
//#region src/utils/tools/validate.js
|
|
1911
|
-
function
|
|
1912
|
+
function Bt(e, t = {}) {
|
|
1912
1913
|
let n = $(), r = {
|
|
1913
1914
|
inForm: !0,
|
|
1914
1915
|
required: !0,
|
|
@@ -1928,7 +1929,7 @@ function Rt(e, t = {}) {
|
|
|
1928
1929
|
}
|
|
1929
1930
|
//#endregion
|
|
1930
1931
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1931
|
-
var
|
|
1932
|
+
var Vt = class {
|
|
1932
1933
|
constructor(e = {}) {
|
|
1933
1934
|
this.config = {
|
|
1934
1935
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2075,24 +2076,24 @@ var zt = class {
|
|
|
2075
2076
|
};
|
|
2076
2077
|
//#endregion
|
|
2077
2078
|
//#region src/utils/tools/format.js
|
|
2078
|
-
function
|
|
2079
|
+
function Ht(e, t = 2, n = ".", r = ",") {
|
|
2079
2080
|
(e == null || e === "") && (e = 0);
|
|
2080
2081
|
let i = Number(e);
|
|
2081
2082
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2082
2083
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2083
2084
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
2084
2085
|
}
|
|
2085
|
-
function
|
|
2086
|
-
return
|
|
2086
|
+
function Ut(e, t = 2) {
|
|
2087
|
+
return Ht(e, t);
|
|
2087
2088
|
}
|
|
2088
|
-
function
|
|
2089
|
+
function Wt(e, t = 2) {
|
|
2089
2090
|
(e == null || e === "") && (e = 0);
|
|
2090
2091
|
let n = Number(e);
|
|
2091
|
-
return e = isNaN(n) ? 0 : n,
|
|
2092
|
+
return e = isNaN(n) ? 0 : n, Ht(e * 100, t) + "%";
|
|
2092
2093
|
}
|
|
2093
2094
|
//#endregion
|
|
2094
2095
|
//#region src/utils/hook/common.js
|
|
2095
|
-
function
|
|
2096
|
+
function Gt(e, t = {}) {
|
|
2096
2097
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2097
2098
|
manual: !1,
|
|
2098
2099
|
log: !1,
|
|
@@ -2104,13 +2105,13 @@ function Ut(e, t = {}) {
|
|
|
2104
2105
|
let { code: t, data: c, msg: l } = e;
|
|
2105
2106
|
if (a) {
|
|
2106
2107
|
let { records: t, rows: n } = c || {};
|
|
2107
|
-
s.value =
|
|
2108
|
+
s.value = Jt(t || n ? t || n : c, o), a(e);
|
|
2108
2109
|
}
|
|
2109
2110
|
if (c) {
|
|
2110
2111
|
if (c.records != null || c.rows != null) {
|
|
2111
2112
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
2112
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
2113
|
-
} else s.value =
|
|
2113
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Jt(e || t || [], o);
|
|
2114
|
+
} else s.value = Jt(c, o);
|
|
2114
2115
|
r && console.log("useRequest-res", s.value);
|
|
2115
2116
|
}
|
|
2116
2117
|
}).catch((e) => {
|
|
@@ -2125,7 +2126,7 @@ function Ut(e, t = {}) {
|
|
|
2125
2126
|
l
|
|
2126
2127
|
];
|
|
2127
2128
|
}
|
|
2128
|
-
function
|
|
2129
|
+
function Kt(e) {
|
|
2129
2130
|
let t = k(e), n = k(""), r = k("");
|
|
2130
2131
|
return ae(t, (e) => {
|
|
2131
2132
|
let t = e || ["", ""];
|
|
@@ -2136,10 +2137,10 @@ function Wt(e) {
|
|
|
2136
2137
|
r
|
|
2137
2138
|
];
|
|
2138
2139
|
}
|
|
2139
|
-
function
|
|
2140
|
+
function qt(e) {
|
|
2140
2141
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2141
2142
|
}
|
|
2142
|
-
function
|
|
2143
|
+
function Jt(e, t) {
|
|
2143
2144
|
if (!t) return e;
|
|
2144
2145
|
if (e instanceof Array) return e.map((e) => {
|
|
2145
2146
|
let n = {};
|
|
@@ -2150,45 +2151,45 @@ function Kt(e, t) {
|
|
|
2150
2151
|
}
|
|
2151
2152
|
//#endregion
|
|
2152
2153
|
//#region src/utils/hook/i18n.js
|
|
2153
|
-
function
|
|
2154
|
+
function Yt(e, t = []) {
|
|
2154
2155
|
let { locale: n } = B(), r = k(e());
|
|
2155
2156
|
return ae([n, ...t], () => {
|
|
2156
2157
|
r.value = e();
|
|
2157
2158
|
}, { immediate: !0 }), r;
|
|
2158
2159
|
}
|
|
2159
|
-
function
|
|
2160
|
+
function Xt(e, t = "zh_cn", n = "en_us") {
|
|
2160
2161
|
return e && (e[{
|
|
2161
2162
|
en_us: n,
|
|
2162
2163
|
zh_cn: t
|
|
2163
|
-
}[
|
|
2164
|
+
}[Oe().global.locale.value]] || e[t]) || "-";
|
|
2164
2165
|
}
|
|
2165
2166
|
//#endregion
|
|
2166
2167
|
//#region src/utils/hook/storeHook.js
|
|
2167
|
-
function
|
|
2168
|
+
function Zt(e, t) {
|
|
2169
|
+
let n = V;
|
|
2170
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapState), en(t, n);
|
|
2171
|
+
}
|
|
2172
|
+
function Qt(e, t) {
|
|
2168
2173
|
let n = ge;
|
|
2169
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2174
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapGetters), en(t, n);
|
|
2170
2175
|
}
|
|
2171
|
-
function
|
|
2176
|
+
function $t(e, t) {
|
|
2172
2177
|
let n = he;
|
|
2173
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2178
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapActions), tn(t, n);
|
|
2174
2179
|
}
|
|
2175
|
-
function
|
|
2176
|
-
let n =
|
|
2177
|
-
return typeof e == "string" && e.length > 0 && (n = pe(e).mapActions), $t(t, n);
|
|
2178
|
-
}
|
|
2179
|
-
function Qt(e, t) {
|
|
2180
|
-
let n = V(), r = t(e), i = {};
|
|
2180
|
+
function en(e, t) {
|
|
2181
|
+
let n = H(), r = t(e), i = {};
|
|
2181
2182
|
return Object.keys(r).forEach((e) => {
|
|
2182
2183
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2183
2184
|
}), i;
|
|
2184
2185
|
}
|
|
2185
|
-
function
|
|
2186
|
-
let n =
|
|
2186
|
+
function tn(e, t) {
|
|
2187
|
+
let n = H(), r = t(e), i = {};
|
|
2187
2188
|
return Object.keys(r).forEach((e) => {
|
|
2188
2189
|
i[e] = r[e].bind({ $store: n });
|
|
2189
2190
|
}), i;
|
|
2190
2191
|
}
|
|
2191
|
-
function
|
|
2192
|
+
function nn(e, t = []) {
|
|
2192
2193
|
let [n, r, i] = t, { locale: a } = B();
|
|
2193
2194
|
return l(() => re(e).map((e) => {
|
|
2194
2195
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
@@ -2201,27 +2202,27 @@ function en(e, t = []) {
|
|
|
2201
2202
|
}
|
|
2202
2203
|
//#endregion
|
|
2203
2204
|
//#region src/components/VxeTable/index.jsx
|
|
2204
|
-
function
|
|
2205
|
+
function rn(e) {
|
|
2205
2206
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2206
2207
|
}
|
|
2207
|
-
function
|
|
2208
|
-
|
|
2209
|
-
return Bt(e, t);
|
|
2210
|
-
} }), H.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2211
|
-
return Vt(e, t);
|
|
2212
|
-
} }), H.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2208
|
+
function an() {
|
|
2209
|
+
U.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2213
2210
|
return Ht(e, t);
|
|
2211
|
+
} }), U.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2212
|
+
return Ut(e, t);
|
|
2213
|
+
} }), U.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2214
|
+
return Wt(e, t);
|
|
2214
2215
|
} });
|
|
2215
2216
|
}
|
|
2216
|
-
function
|
|
2217
|
-
|
|
2217
|
+
function on() {
|
|
2218
|
+
U.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2218
2219
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2219
2220
|
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;
|
|
2220
|
-
return e.type == "tag" ? o ? g(
|
|
2221
|
+
return e.type == "tag" ? o ? g(dt, { fontColor: o }, { default: () => [
|
|
2221
2222
|
h(" "),
|
|
2222
2223
|
c,
|
|
2223
2224
|
h(" ")
|
|
2224
|
-
] }) : g(
|
|
2225
|
+
] }) : g(dt, { type: a }, { default: () => [
|
|
2225
2226
|
h(" "),
|
|
2226
2227
|
c,
|
|
2227
2228
|
h(" ")
|
|
@@ -2234,7 +2235,7 @@ function rn() {
|
|
|
2234
2235
|
c,
|
|
2235
2236
|
h(" ")
|
|
2236
2237
|
] });
|
|
2237
|
-
} }),
|
|
2238
|
+
} }), U.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2238
2239
|
return g(n, x({
|
|
2239
2240
|
modelValue: t.row[t.column.field],
|
|
2240
2241
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2242,14 +2243,14 @@ function rn() {
|
|
|
2242
2243
|
"step-strictly": !0,
|
|
2243
2244
|
"value-on-clear": 0
|
|
2244
2245
|
}), null);
|
|
2245
|
-
} }),
|
|
2246
|
+
} }), U.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2246
2247
|
let { locale: n } = B(), r = n.value == "zh_cn";
|
|
2247
2248
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2248
|
-
} }),
|
|
2249
|
+
} }), U.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2249
2250
|
let { locale: n } = B(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2250
2251
|
return t.row[r] || t.row[t.column.field];
|
|
2251
|
-
} }),
|
|
2252
|
-
let n = t.column.field, i =
|
|
2252
|
+
} }), U.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2253
|
+
let n = t.column.field, i = W(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2253
2254
|
function l(e, t) {
|
|
2254
2255
|
s == "blank" ? window.open(e) : i.push({
|
|
2255
2256
|
path: e,
|
|
@@ -2262,17 +2263,17 @@ function rn() {
|
|
|
2262
2263
|
underline: "never",
|
|
2263
2264
|
type: "primary",
|
|
2264
2265
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2265
|
-
},
|
|
2266
|
+
}, rn(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2266
2267
|
}
|
|
2267
2268
|
return g(r, {
|
|
2268
2269
|
underline: "never",
|
|
2269
2270
|
type: "primary",
|
|
2270
2271
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2271
|
-
},
|
|
2272
|
+
}, rn(c) ? c : { default: () => [c] });
|
|
2272
2273
|
} });
|
|
2273
2274
|
}
|
|
2274
|
-
function
|
|
2275
|
-
|
|
2275
|
+
function sn() {
|
|
2276
|
+
an(), on();
|
|
2276
2277
|
}
|
|
2277
2278
|
//#endregion
|
|
2278
|
-
export {
|
|
2279
|
+
export { st as CmpDictionary, ut as CmpIcon, dt as CmpTag, pt as ConfrimButton, Nt as DownExcelTemp, gt as ImportButton, Se as LayOutForm, zt as Layer, Mt as ListPage, Vt as OnePortalCasSDK, St 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, Z as en_us, je as exportExcel, Be as exportExcelMuilti, Ut as formatMoney, Ht as formatNumber, Wt as formatPercent, He as getColumnLetterByIndex, Oe as getI18n, $ as getI18nT, Et as getListPageConfig, Xt as getLocaleValue, Ke as getTableShowColumn, it as getValueBykey, ke as importExcel, Re as importExcelMuilti, Ee as messages, an as registerVxeFormatters, sn as registerVxePlugins, on as registerVxeRenderers, Dt as resetListPageConfig, Tt 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, X as zh_cn };
|