joy-admin-components 0.2.124 → 0.2.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { ElCol as e, ElForm as t, ElInputNumber as n, ElLink as r, ElMessage as i, ElMessageBox as a, ElRow as o, ElText as s } from "element-plus";
|
|
2
|
-
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import { createNamespacedHelpers as
|
|
9
|
-
import { VxeUI as
|
|
10
|
-
import { useRouter as
|
|
2
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as ee, onUpdated as te, openBlock as E, reactive as D, ref as O, renderList as ne, renderSlot as k, resolveComponent as A, resolveDynamicComponent as j, toDisplayString as M, toValue as re, unref as N, useAttrs as P, useModel as ie, watch as ae, withCtx as F, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
|
|
3
|
+
import { saveAs as I } from "file-saver";
|
|
4
|
+
import L from "exceljs";
|
|
5
|
+
import R from "dayjs";
|
|
6
|
+
import { createI18n as le, useI18n as z } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as ue, debounce as de, isArray as fe, without as pe } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as me, mapActions as he, mapGetters as B, mapState as V, useStore as ge } from "vuex";
|
|
9
|
+
import { VxeUI as H } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as _e } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var ve = Object.create, ye = Object.defineProperty, be = Object.getOwnPropertyDescriptor, U = Object.getOwnPropertyNames, W = Object.getPrototypeOf, xe = Object.prototype.hasOwnProperty, Se = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), G = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = U(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !xe.call(e, s) && s !== n && ye(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = be(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, Ce = (e, t, n) => (n = e == null ? {} : ve(W(e)), G(t || !e || !e.__esModule ? ye(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), we = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
|
-
let s =
|
|
24
|
+
let s = O(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
25
25
|
span: t.props?.span || t.props?.colProps?.span || 24,
|
|
26
26
|
...t.props?.colProps
|
|
27
27
|
}, { default: () => t })) : null;
|
|
@@ -36,7 +36,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), K = /* @__PURE__ */ Se(((e, t) => {
|
|
40
40
|
(function(n, r) {
|
|
41
41
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_utc = r();
|
|
42
42
|
})(e, (function() {
|
|
@@ -120,7 +120,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), Te = /* @__PURE__ */ Se(((e, t) => {
|
|
124
124
|
(function(n, r) {
|
|
125
125
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_timezone = r();
|
|
126
126
|
})(e, (function() {
|
|
@@ -196,7 +196,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), Ee = /* @__PURE__ */ Ce(K()), De = /* @__PURE__ */ Ce(Te()), q = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -225,7 +225,7 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
225
225
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
226
226
|
validate: { invalidInput: "请输入正确内容" },
|
|
227
227
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
228
|
-
},
|
|
228
|
+
}, J = {
|
|
229
229
|
"dao-ru": "Import",
|
|
230
230
|
"quan-xuan": "Select All",
|
|
231
231
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -254,36 +254,36 @@ var _e = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDe
|
|
|
254
254
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
255
255
|
validate: { invalidInput: "Please enter valid content" },
|
|
256
256
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
257
|
-
},
|
|
258
|
-
zh_cn:
|
|
259
|
-
en_us:
|
|
260
|
-
},
|
|
261
|
-
function
|
|
257
|
+
}, Y = {
|
|
258
|
+
zh_cn: q,
|
|
259
|
+
en_us: J
|
|
260
|
+
}, X = null;
|
|
261
|
+
function Oe(e = null) {
|
|
262
262
|
if (e) {
|
|
263
263
|
let { global: t } = e;
|
|
264
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
264
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", q) : t.setLocaleMessage("zh_cn", q), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", J) : t.setLocaleMessage("en_us", J), X = e, e;
|
|
265
265
|
}
|
|
266
|
-
return
|
|
266
|
+
return X ||= le({
|
|
267
267
|
legacy: !1,
|
|
268
268
|
locale: "zh_cn",
|
|
269
269
|
fallbackLocale: "zh_cn",
|
|
270
|
-
messages:
|
|
271
|
-
}),
|
|
270
|
+
messages: Y
|
|
271
|
+
}), X;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
return
|
|
273
|
+
function ke() {
|
|
274
|
+
return X || Oe();
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
276
|
+
function Z() {
|
|
277
|
+
return ke().global.t;
|
|
278
278
|
}
|
|
279
|
-
|
|
280
|
-
async function
|
|
279
|
+
R.extend(Ee.default), R.extend(De.default);
|
|
280
|
+
async function Ae(e, t) {
|
|
281
281
|
let { fields: n, range: r = 1 } = t;
|
|
282
282
|
if (!n) {
|
|
283
|
-
let e =
|
|
283
|
+
let e = Z();
|
|
284
284
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
285
285
|
}
|
|
286
|
-
let i = new
|
|
286
|
+
let i = new L.Workbook();
|
|
287
287
|
await i.xlsx.load(e);
|
|
288
288
|
let a = {};
|
|
289
289
|
return i.eachSheet(function(e, t) {
|
|
@@ -299,41 +299,41 @@ async function ke(e, t) {
|
|
|
299
299
|
}), a[e._name] = i;
|
|
300
300
|
}), i = null, a;
|
|
301
301
|
}
|
|
302
|
-
var
|
|
303
|
-
async function
|
|
302
|
+
var je = { columnWidth: 30 };
|
|
303
|
+
async function Me(e, t, n = [], r = {}) {
|
|
304
304
|
if (!e || !t) return;
|
|
305
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
305
|
+
let { columnStyle: i } = r, { columnWidth: a } = je;
|
|
306
306
|
t.forEach((e) => {
|
|
307
307
|
e.width = e.width ? e.width : a;
|
|
308
308
|
});
|
|
309
|
-
let { workbook: o, worksheet: s } =
|
|
310
|
-
s.columns = t, s.addRows(n), i && await
|
|
309
|
+
let { workbook: o, worksheet: s } = Ne();
|
|
310
|
+
s.columns = t, s.addRows(n), i && await Pe(o, s, i);
|
|
311
311
|
try {
|
|
312
312
|
let t = await o.xlsx.writeBuffer();
|
|
313
|
-
|
|
313
|
+
I(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
314
314
|
} catch (e) {
|
|
315
315
|
console.log(e);
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
let e = new
|
|
318
|
+
function Ne() {
|
|
319
|
+
let e = new L.Workbook();
|
|
320
320
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
321
321
|
workbook: e,
|
|
322
322
|
worksheet: e.addWorksheet("Sheet1")
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
async function
|
|
325
|
+
async function Pe(e, t, n) {
|
|
326
326
|
let r = Object.keys(n);
|
|
327
327
|
for (let i of r) {
|
|
328
328
|
let r = n[i], { type: a } = r;
|
|
329
329
|
switch (a) {
|
|
330
330
|
case "IMG":
|
|
331
|
-
await
|
|
331
|
+
await Fe(e, t, i, r);
|
|
332
332
|
break;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
336
|
+
async function Fe(e, t, n, r) {
|
|
337
337
|
let i = t.getColumn(n), a = i.values;
|
|
338
338
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
339
339
|
t > 1 && (e.height = 40);
|
|
@@ -341,7 +341,7 @@ async function Pe(e, t, n, r) {
|
|
|
341
341
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
342
342
|
if (n < 2) continue;
|
|
343
343
|
let r = a[n];
|
|
344
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
344
|
+
r && (t.getCell(i.letter + n).value = "", await Ie(e, t, r, {
|
|
345
345
|
width: 100,
|
|
346
346
|
height: 50,
|
|
347
347
|
col: i._number - 1,
|
|
@@ -349,8 +349,8 @@ async function Pe(e, t, n, r) {
|
|
|
349
349
|
}));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
async function
|
|
353
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
352
|
+
async function Ie(e, t, n, r) {
|
|
353
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Le(n, .3);
|
|
354
354
|
if (c) {
|
|
355
355
|
let n = e.addImage({
|
|
356
356
|
base64: l,
|
|
@@ -368,7 +368,7 @@ async function Fe(e, t, n, r) {
|
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Le(e, t = 1) {
|
|
372
372
|
let n = new Image();
|
|
373
373
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
374
374
|
n.onload = () => {
|
|
@@ -382,14 +382,25 @@ function Ie(e, t = 1) {
|
|
|
382
382
|
};
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
|
|
385
|
+
var Q = "---";
|
|
386
|
+
function Re(e, t) {
|
|
387
|
+
let n = `${e}${t}`.replace(/[\\/:*?\[\]]/g, "_");
|
|
388
|
+
return n.length > 31 && (n = n.substring(0, 31)), n;
|
|
389
|
+
}
|
|
390
|
+
function ze(e) {
|
|
391
|
+
return e.option ? e.option : e.cascadeOption ? Object.values(e.cascadeOption.groups).flat() : null;
|
|
392
|
+
}
|
|
393
|
+
var Be = "|";
|
|
394
|
+
function Ve(e) {
|
|
395
|
+
return `MID(${e},FIND("${Q}",${e})+3,999)`;
|
|
396
|
+
}
|
|
397
|
+
async function He(e, t) {
|
|
387
398
|
let { fields: n, range: r = 1 } = t;
|
|
388
399
|
if (!n) {
|
|
389
|
-
let e =
|
|
400
|
+
let e = Z();
|
|
390
401
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
391
402
|
}
|
|
392
|
-
let i = new
|
|
403
|
+
let i = new L.Workbook();
|
|
393
404
|
await i.xlsx.load(e);
|
|
394
405
|
let a = {};
|
|
395
406
|
return i.eachSheet(function(e, t) {
|
|
@@ -407,8 +418,8 @@ async function Re(e, t) {
|
|
|
407
418
|
if (i > r) {
|
|
408
419
|
let r = { _excelRowNumber: i }, a = !0;
|
|
409
420
|
Object.keys(o).forEach((t) => {
|
|
410
|
-
let [c, l] = o[t].split(
|
|
411
|
-
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ?
|
|
421
|
+
let [c, l] = o[t].split(Q), u = e.getCell(c), d;
|
|
422
|
+
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? R(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Q)[1]), typeof d == "string" && (d = d.trim()), r[t] = d, d && (a = !1);
|
|
412
423
|
}), a || t.push(r);
|
|
413
424
|
}
|
|
414
425
|
}), a[e._name] = t;
|
|
@@ -416,16 +427,16 @@ async function Re(e, t) {
|
|
|
416
427
|
}
|
|
417
428
|
}), i = null, a;
|
|
418
429
|
}
|
|
419
|
-
var
|
|
430
|
+
var Ue = {
|
|
420
431
|
date: "yyyy-mm-dd",
|
|
421
432
|
number: "0",
|
|
422
433
|
string: "@"
|
|
423
434
|
};
|
|
424
|
-
async function
|
|
435
|
+
async function We(e, t) {
|
|
425
436
|
if (!e || t.length == 0) return;
|
|
426
|
-
let n =
|
|
437
|
+
let n = Ge(t);
|
|
427
438
|
for (let e of n.worksheets) {
|
|
428
|
-
let { columnWidth: r } =
|
|
439
|
+
let { columnWidth: r } = je, i = t[e.name];
|
|
429
440
|
if (!i) continue;
|
|
430
441
|
let { tableHeader: a, tableData: o } = i;
|
|
431
442
|
a.forEach((e) => {
|
|
@@ -439,11 +450,11 @@ async function Be(e, t) {
|
|
|
439
450
|
};
|
|
440
451
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
441
452
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
442
|
-
if (d.numFmt =
|
|
453
|
+
if (d.numFmt = Ue[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
443
454
|
let t = n.addWorksheet(a);
|
|
444
|
-
t.state = "hidden", u ||= (e) => `${e.label}${
|
|
455
|
+
t.state = "hidden", u ||= (e) => `${e.label}${Q}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
445
456
|
if (n > 0) {
|
|
446
|
-
let t =
|
|
457
|
+
let t = Z();
|
|
447
458
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
448
459
|
type: "list",
|
|
449
460
|
formulae: [`${a}!$A$1:$A$${s.length}`],
|
|
@@ -455,6 +466,69 @@ async function Be(e, t) {
|
|
|
455
466
|
}
|
|
456
467
|
});
|
|
457
468
|
}
|
|
469
|
+
}), a.forEach((t) => {
|
|
470
|
+
let { key: r, cascadeOption: i } = t;
|
|
471
|
+
if (!i) return;
|
|
472
|
+
let { parentKey: o, groups: s } = i, c = Array.isArray(o), l = c ? o : [o], u = l.map((e) => a.find((t) => t.key === e));
|
|
473
|
+
if (u.some((e) => !e)) return;
|
|
474
|
+
let d = e.getColumn(r), f = Re("_cas_", r), p = n.addWorksheet(f);
|
|
475
|
+
p.state = "hidden";
|
|
476
|
+
let m = t.optionFormater || ((e) => `${e.label}${Q}${e.value}`), h = 0;
|
|
477
|
+
if (c) {
|
|
478
|
+
let t = Object.keys(s);
|
|
479
|
+
if (t.length === 0) return;
|
|
480
|
+
let i = Re("_mrf_", r), a = n.addWorksheet(i);
|
|
481
|
+
if (a.state = "hidden", a.getColumn(1).values = t, t.forEach((e, t) => {
|
|
482
|
+
let n = s[e] || [];
|
|
483
|
+
h = Math.max(h, n.length), n.forEach((e, n) => {
|
|
484
|
+
p.getCell(n + 1, t + 1).value = m(e);
|
|
485
|
+
});
|
|
486
|
+
}), h === 0) return;
|
|
487
|
+
let o = Z();
|
|
488
|
+
Array(100).fill("").forEach((n, r) => {
|
|
489
|
+
if (r > 0) {
|
|
490
|
+
let n = `OFFSET('${f}'!$A$1,0,MATCH(${l.map((t) => Ve(`${e.getColumn(t).letter}${r}`)).join(`&"${Be}"&`)},'${i}'!$A$1:$A$${t.length},0)-1,${h},1)`;
|
|
491
|
+
e.getCell(`${d.letter}${r}`).dataValidation = {
|
|
492
|
+
type: "list",
|
|
493
|
+
formulae: [n],
|
|
494
|
+
showErrorMessage: !0,
|
|
495
|
+
error: o("excel.invalidInput"),
|
|
496
|
+
errorStyle: "stop",
|
|
497
|
+
errorMessage: o("excel.invalidOption")
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
} else {
|
|
502
|
+
let t = u[0], r = ze(t);
|
|
503
|
+
if (!r || r.length === 0) return;
|
|
504
|
+
let i = e.getColumn(l[0]), a = l[0];
|
|
505
|
+
if (!t.option && t.cascadeOption && (a = Re("_ref_", l[0]), !n.getWorksheet(a))) {
|
|
506
|
+
let e = n.addWorksheet(a);
|
|
507
|
+
e.state = "hidden";
|
|
508
|
+
let i = t.optionFormater || ((e) => `${e.label}${Q}${e.value}`);
|
|
509
|
+
e.getColumn(1).values = r.map(i);
|
|
510
|
+
}
|
|
511
|
+
if (r.forEach((e, t) => {
|
|
512
|
+
let n = s[e.value] || [];
|
|
513
|
+
h = Math.max(h, n.length), n.forEach((e, n) => {
|
|
514
|
+
p.getCell(n + 1, t + 1).value = m(e);
|
|
515
|
+
});
|
|
516
|
+
}), h === 0) return;
|
|
517
|
+
let o = r.length, c = Z();
|
|
518
|
+
Array(100).fill("").forEach((t, n) => {
|
|
519
|
+
if (n > 0) {
|
|
520
|
+
let t = `OFFSET('${f}'!$A$1,0,MATCH(${i.letter}${n},'${a}'!$A$1:$A$${o},0)-1,${h},1)`;
|
|
521
|
+
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
522
|
+
type: "list",
|
|
523
|
+
formulae: [t],
|
|
524
|
+
showErrorMessage: !0,
|
|
525
|
+
error: c("excel.invalidInput"),
|
|
526
|
+
errorStyle: "stop",
|
|
527
|
+
errorMessage: c("excel.invalidOption")
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
}
|
|
458
532
|
}), a.some((e) => e.locked) && await e.protect("6737187214", {
|
|
459
533
|
selectLockedCells: !0,
|
|
460
534
|
selectUnlockedCells: !0
|
|
@@ -462,53 +536,53 @@ async function Be(e, t) {
|
|
|
462
536
|
}
|
|
463
537
|
try {
|
|
464
538
|
let t = await n.xlsx.writeBuffer();
|
|
465
|
-
|
|
539
|
+
I(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
466
540
|
} catch (e) {
|
|
467
541
|
console.log(e);
|
|
468
542
|
}
|
|
469
543
|
}
|
|
470
|
-
function
|
|
471
|
-
let t =
|
|
544
|
+
function Ge(e) {
|
|
545
|
+
let t = Z(), n = new L.Workbook();
|
|
472
546
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((t, n) => (e[t].sort ?? 0) - (e[n].sort ?? 0)).forEach((r) => {
|
|
473
547
|
let i = r, a = !1;
|
|
474
548
|
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), a = !0), r.length > 31 && (r = r.substring(0, 31).trim(), a = !0, console.warn(t("excel.sheetNameTooLong", [i, r]))), a && (e[r] = e[i], delete e[i]), n.addWorksheet(r);
|
|
475
549
|
}), n;
|
|
476
550
|
}
|
|
477
|
-
function
|
|
551
|
+
function Ke(e) {
|
|
478
552
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
479
553
|
}
|
|
480
|
-
function
|
|
554
|
+
function qe(e) {
|
|
481
555
|
let t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
|
|
482
556
|
for (let e = 0; e < i; ++e) a[e] = r.charCodeAt(e);
|
|
483
557
|
return new Blob([a], { type: n });
|
|
484
558
|
}
|
|
485
|
-
function
|
|
486
|
-
let n =
|
|
559
|
+
function Je(e, t = "image.png") {
|
|
560
|
+
let n = qe(e);
|
|
487
561
|
return new File([n], t, { type: n.type });
|
|
488
562
|
}
|
|
489
|
-
function
|
|
563
|
+
function Ye(e, t) {
|
|
490
564
|
let n = e.match(/^data:image\/(\w+);base64,/), r = n ? n[1] : "png";
|
|
491
565
|
t ||= `image_${Date.now()}.${r}`;
|
|
492
|
-
let i =
|
|
566
|
+
let i = Je(e, t), a = new FormData();
|
|
493
567
|
return a.append("file", i), a;
|
|
494
568
|
}
|
|
495
|
-
function
|
|
569
|
+
function Xe(e) {
|
|
496
570
|
let { sortData: t = {}, visibleData: n = {} } = JSON.parse(localStorage.getItem("VXE_CUSTOM_STORE") || "{}")[e ? `listPageId-${e}` : "listPageId-default"] || {}, r = Object.keys(t), i = Object.keys(n);
|
|
497
|
-
return i.push("type=checkbox", "action", "actions"),
|
|
571
|
+
return i.push("type=checkbox", "action", "actions"), pe(r, ...i);
|
|
498
572
|
}
|
|
499
573
|
//#endregion
|
|
500
574
|
//#region src/utils/tools/tools.js
|
|
501
|
-
function
|
|
575
|
+
function Ze(e) {
|
|
502
576
|
return new Promise((t) => {
|
|
503
577
|
setTimeout(() => {
|
|
504
578
|
t();
|
|
505
579
|
}, e);
|
|
506
580
|
});
|
|
507
581
|
}
|
|
508
|
-
function
|
|
582
|
+
function Qe(e) {
|
|
509
583
|
return JSON.parse(JSON.stringify(e));
|
|
510
584
|
}
|
|
511
|
-
function
|
|
585
|
+
function $e(e) {
|
|
512
586
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
513
587
|
for (let i of e) {
|
|
514
588
|
n[i.id] = {
|
|
@@ -520,10 +594,10 @@ function Ye(e) {
|
|
|
520
594
|
}
|
|
521
595
|
return t;
|
|
522
596
|
}
|
|
523
|
-
function
|
|
597
|
+
function et(e, t = " ") {
|
|
524
598
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
525
599
|
}
|
|
526
|
-
var
|
|
600
|
+
var tt = class {
|
|
527
601
|
constructor(e, t = [
|
|
528
602
|
"label",
|
|
529
603
|
"value",
|
|
@@ -541,7 +615,7 @@ var Ze = class {
|
|
|
541
615
|
}
|
|
542
616
|
getName(e) {
|
|
543
617
|
if (!this.has(e)) return "-";
|
|
544
|
-
let t =
|
|
618
|
+
let t = ke().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
545
619
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
546
620
|
}
|
|
547
621
|
getTag(e) {
|
|
@@ -567,40 +641,40 @@ var Ze = class {
|
|
|
567
641
|
return this.labelMap.get(e) ?? null;
|
|
568
642
|
}
|
|
569
643
|
};
|
|
570
|
-
function
|
|
571
|
-
if (e.length == 0) return new
|
|
644
|
+
function nt(e, t = [], n = "i18nName") {
|
|
645
|
+
if (e.length == 0) return new tt([]);
|
|
572
646
|
if (t.length < 2) {
|
|
573
|
-
let e =
|
|
647
|
+
let e = Z();
|
|
574
648
|
throw Error(e("tools.keysLengthError"));
|
|
575
649
|
}
|
|
576
|
-
return new
|
|
650
|
+
return new tt(e.map((e) => {
|
|
577
651
|
let r = {};
|
|
578
652
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
579
653
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
580
654
|
}), r;
|
|
581
655
|
}));
|
|
582
656
|
}
|
|
583
|
-
function
|
|
657
|
+
function rt(e) {
|
|
584
658
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
585
659
|
}
|
|
586
|
-
function
|
|
660
|
+
function it(e) {
|
|
587
661
|
return e ? (e.includes("\\\\u") && (e = e.replace(/\\/g, "")), e.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
|
|
588
662
|
}
|
|
589
|
-
function
|
|
663
|
+
function at(e, t = 10) {
|
|
590
664
|
let n = 1024 * 1024 * t;
|
|
591
665
|
return !(e.size > n);
|
|
592
666
|
}
|
|
593
|
-
function
|
|
667
|
+
function ot(e) {
|
|
594
668
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
595
669
|
}
|
|
596
|
-
function
|
|
670
|
+
function st(e) {
|
|
597
671
|
let t = {};
|
|
598
672
|
return e.map((e, n) => {
|
|
599
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
673
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = Ke(n);
|
|
600
674
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
601
675
|
}), t;
|
|
602
676
|
}
|
|
603
|
-
function
|
|
677
|
+
function ct(e, t) {
|
|
604
678
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
605
679
|
}
|
|
606
680
|
//#endregion
|
|
@@ -609,7 +683,7 @@ var $ = (e, t) => {
|
|
|
609
683
|
let n = e.__vccOpts || e;
|
|
610
684
|
for (let [e, r] of t) n[e] = r;
|
|
611
685
|
return n;
|
|
612
|
-
},
|
|
686
|
+
}, lt = ["onClick"], ut = /* @__PURE__ */ $({
|
|
613
687
|
__name: "index",
|
|
614
688
|
props: /* @__PURE__ */ b({
|
|
615
689
|
api: { type: Function },
|
|
@@ -652,9 +726,9 @@ var $ = (e, t) => {
|
|
|
652
726
|
"changeAll"
|
|
653
727
|
], ["update:modelValue"]),
|
|
654
728
|
setup(e, { emit: t }) {
|
|
655
|
-
let n = e, r =
|
|
729
|
+
let n = e, r = P(), { t: i, locale: a } = z(), o = ie(e, "modelValue"), s = l(() => r["value-key"] != null), _ = O(""), v = l(() => {
|
|
656
730
|
if (r.remote !== void 0) return n.data;
|
|
657
|
-
let e =
|
|
731
|
+
let e = et(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
658
732
|
if (e.length == 0) return o;
|
|
659
733
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
660
734
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -668,7 +742,7 @@ var $ = (e, t) => {
|
|
|
668
742
|
set(e) {
|
|
669
743
|
return e;
|
|
670
744
|
}
|
|
671
|
-
}), b = t, C =
|
|
745
|
+
}), b = t, C = O([]);
|
|
672
746
|
n.api && (async () => {
|
|
673
747
|
let { data: e } = await n.api();
|
|
674
748
|
C.value = [...e], b("success", C);
|
|
@@ -678,92 +752,92 @@ var $ = (e, t) => {
|
|
|
678
752
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
679
753
|
});
|
|
680
754
|
}
|
|
681
|
-
let T =
|
|
682
|
-
function
|
|
755
|
+
let T = O(null);
|
|
756
|
+
function ee() {
|
|
683
757
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
684
758
|
b("change", e), S(() => {
|
|
685
759
|
n.optionClick && n.optionClick(e);
|
|
686
760
|
});
|
|
687
761
|
}
|
|
688
|
-
function
|
|
762
|
+
function te(e) {
|
|
689
763
|
T.value = e;
|
|
690
764
|
}
|
|
691
|
-
let
|
|
692
|
-
if (
|
|
765
|
+
let D = n.labelValue.label.split("-"), j = (e) => {
|
|
766
|
+
if (D.length == 1) {
|
|
693
767
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
694
768
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
695
769
|
return t ||= e[n.labelValue.label], t + "";
|
|
696
770
|
} else {
|
|
697
771
|
let t = [];
|
|
698
|
-
return
|
|
772
|
+
return D.forEach((n) => {
|
|
699
773
|
t.push(e[n]);
|
|
700
774
|
}), t.join("-");
|
|
701
775
|
}
|
|
702
776
|
};
|
|
703
|
-
function
|
|
777
|
+
function re(e) {
|
|
704
778
|
let t = n.data ? n.data : C.value;
|
|
705
779
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
706
780
|
b("change", o.value), b("changeAll", o.value, t);
|
|
707
781
|
});
|
|
708
782
|
}
|
|
709
|
-
function
|
|
783
|
+
function oe(e) {
|
|
710
784
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
711
785
|
n.optionClick && n.optionClick(e);
|
|
712
786
|
});
|
|
713
787
|
}
|
|
714
|
-
function
|
|
788
|
+
function se(e) {
|
|
715
789
|
let t = s.value ? e : e[n.labelValue.value], r = s.value ? o.value.some((t) => t[n.labelValue.value] === e[n.labelValue.value]) : o.value.includes(t);
|
|
716
790
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
717
791
|
}
|
|
718
|
-
function
|
|
792
|
+
function I(e) {
|
|
719
793
|
return e.map((e) => ({
|
|
720
794
|
...e,
|
|
721
|
-
label:
|
|
795
|
+
label: j(e),
|
|
722
796
|
value: s.value ? e : e[n.labelValue.value]
|
|
723
797
|
}));
|
|
724
798
|
}
|
|
725
|
-
let
|
|
726
|
-
|
|
727
|
-
let t =
|
|
728
|
-
if (t.length !==
|
|
799
|
+
let L = O([]);
|
|
800
|
+
L.value = I(n.data ? n.data : C.value), ae(() => n.data ? n.data : C.value, (e) => {
|
|
801
|
+
let t = I(e);
|
|
802
|
+
if (t.length !== L.value.length) L.value = t;
|
|
729
803
|
else {
|
|
730
804
|
let e = !1;
|
|
731
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
805
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== L.value[n]?.value) {
|
|
732
806
|
e = !0;
|
|
733
807
|
break;
|
|
734
808
|
}
|
|
735
|
-
e && (
|
|
809
|
+
e && (L.value = t);
|
|
736
810
|
}
|
|
737
811
|
}, { deep: !0 });
|
|
738
|
-
let
|
|
812
|
+
let R = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? L.value.map((e) => ({
|
|
739
813
|
...e,
|
|
740
|
-
disabled:
|
|
741
|
-
})) :
|
|
814
|
+
disabled: se(e)
|
|
815
|
+
})) : L.value);
|
|
742
816
|
return (t, n) => {
|
|
743
|
-
let i =
|
|
744
|
-
return
|
|
817
|
+
let i = A("el-checkbox"), a = A("el-select-v2"), l = A("el-option"), b = A("el-select");
|
|
818
|
+
return N(r).v2 == null ? (E(), u(b, x({
|
|
745
819
|
key: 1,
|
|
746
820
|
modelValue: o.value,
|
|
747
821
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
748
822
|
filterable: "",
|
|
749
823
|
"collapse-tags": "",
|
|
750
824
|
"collapse-tags-tooltip": "",
|
|
751
|
-
"filter-method":
|
|
825
|
+
"filter-method": N(r).remote == null ? (e) => _.value = e : void 0,
|
|
752
826
|
clearable: ""
|
|
753
|
-
},
|
|
754
|
-
default:
|
|
827
|
+
}, N(r), { onClear: ee }), {
|
|
828
|
+
default: F(() => [N(r).multiple != null && e.showCheckAll && e.maxLimit == null ? k(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
755
829
|
class: "mgl20",
|
|
756
830
|
modelValue: y.value,
|
|
757
831
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
758
|
-
onChange:
|
|
832
|
+
onChange: re
|
|
759
833
|
}, {
|
|
760
|
-
default:
|
|
834
|
+
default: F(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
761
835
|
_: 1
|
|
762
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (
|
|
836
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (E(!0), f(c, null, ne(v.value, (t, n) => (E(), u(l, {
|
|
763
837
|
key: n,
|
|
764
|
-
label:
|
|
765
|
-
disabled:
|
|
766
|
-
onClick:
|
|
838
|
+
label: j(t),
|
|
839
|
+
disabled: N(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? se(t) : !1,
|
|
840
|
+
onClick: ce((e) => oe(t), ["stop"]),
|
|
767
841
|
value: s.value ? t : t[e.labelValue.value]
|
|
768
842
|
}, null, 8, [
|
|
769
843
|
"label",
|
|
@@ -772,84 +846,84 @@ var $ = (e, t) => {
|
|
|
772
846
|
"value"
|
|
773
847
|
]))), 128))]),
|
|
774
848
|
_: 3
|
|
775
|
-
}, 16, ["modelValue", "filter-method"])) : (
|
|
849
|
+
}, 16, ["modelValue", "filter-method"])) : (E(), u(a, x({
|
|
776
850
|
key: 0,
|
|
777
|
-
options:
|
|
851
|
+
options: R.value,
|
|
778
852
|
modelValue: o.value,
|
|
779
853
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
780
|
-
},
|
|
854
|
+
}, N(r), {
|
|
781
855
|
filterable: "",
|
|
782
856
|
"collapse-tags": "",
|
|
783
857
|
"collapse-tags-tooltip": "",
|
|
784
858
|
clearable: "",
|
|
785
859
|
onChange: w
|
|
786
860
|
}), m({
|
|
787
|
-
default:
|
|
861
|
+
default: F(({ item: e }) => [p("div", { onClick: (t) => te(e) }, M(e.label), 9, lt)]),
|
|
788
862
|
_: 2
|
|
789
|
-
}, [
|
|
863
|
+
}, [N(r).multiple == null ? void 0 : {
|
|
790
864
|
name: "header",
|
|
791
|
-
fn:
|
|
865
|
+
fn: F(() => [k(t.$slots, "header", {}, () => [g(i, {
|
|
792
866
|
class: "mgl20",
|
|
793
867
|
modelValue: y.value,
|
|
794
868
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
795
|
-
onChange:
|
|
869
|
+
onChange: re
|
|
796
870
|
}, {
|
|
797
|
-
default:
|
|
871
|
+
default: F(() => [h(M(t.$t("quan-xuan")), 1)]),
|
|
798
872
|
_: 1
|
|
799
873
|
}, 8, ["modelValue"])], !0)]),
|
|
800
874
|
key: "0"
|
|
801
875
|
}]), 1040, ["options", "modelValue"]));
|
|
802
876
|
};
|
|
803
877
|
}
|
|
804
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
878
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), dt = _({ props: { name: {
|
|
805
879
|
tyepe: String,
|
|
806
880
|
required: !0
|
|
807
881
|
} } });
|
|
808
|
-
function
|
|
809
|
-
let o =
|
|
810
|
-
return
|
|
811
|
-
default:
|
|
882
|
+
function ft(e, t, n, r, i, a) {
|
|
883
|
+
let o = A("el-icon");
|
|
884
|
+
return E(), u(o, { class: "cmp-icon" }, {
|
|
885
|
+
default: F(() => [(E(), u(j(e.name)))]),
|
|
812
886
|
_: 1
|
|
813
887
|
});
|
|
814
888
|
}
|
|
815
|
-
var
|
|
889
|
+
var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]]), mt = {
|
|
816
890
|
__name: "index",
|
|
817
891
|
props: { fontColor: String },
|
|
818
892
|
setup(e) {
|
|
819
893
|
return (t, n) => {
|
|
820
|
-
let r =
|
|
821
|
-
return
|
|
894
|
+
let r = A("el-tag");
|
|
895
|
+
return E(), u(r, x(t.$attrs, { style: {
|
|
822
896
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
823
897
|
color: e.fontColor,
|
|
824
898
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
825
899
|
} }), {
|
|
826
|
-
default:
|
|
900
|
+
default: F(() => [k(t.$slots, "default")]),
|
|
827
901
|
_: 3
|
|
828
902
|
}, 16, ["style"]);
|
|
829
903
|
};
|
|
830
904
|
}
|
|
831
|
-
},
|
|
905
|
+
}, ht = { class: "confirm-button-wrapper" }, gt = /* @__PURE__ */ $({
|
|
832
906
|
__name: "index",
|
|
833
907
|
emits: ["ok", "no"],
|
|
834
908
|
setup(e, { emit: t }) {
|
|
835
|
-
let n = t, r =
|
|
909
|
+
let n = t, r = de(() => {
|
|
836
910
|
n("ok");
|
|
837
911
|
}, 500);
|
|
838
912
|
function i() {
|
|
839
913
|
n("no");
|
|
840
914
|
}
|
|
841
915
|
return (e, t) => {
|
|
842
|
-
let n =
|
|
843
|
-
return
|
|
844
|
-
onConfirm:
|
|
916
|
+
let n = A("el-popconfirm");
|
|
917
|
+
return E(), f("span", ht, [g(n, x(e.$attrs, {
|
|
918
|
+
onConfirm: N(r),
|
|
845
919
|
onCancel: i
|
|
846
920
|
}), {
|
|
847
|
-
reference:
|
|
921
|
+
reference: F(() => [k(e.$slots, "default", {}, void 0, !0)]),
|
|
848
922
|
_: 3
|
|
849
923
|
}, 16, ["onConfirm"])]);
|
|
850
924
|
};
|
|
851
925
|
}
|
|
852
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
926
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), _t = { class: "ImportButton" }, vt = ["accept"], yt = /* @__PURE__ */ $({
|
|
853
927
|
__name: "index",
|
|
854
928
|
props: {
|
|
855
929
|
accept: {
|
|
@@ -870,7 +944,7 @@ var lt = /* @__PURE__ */ $(st, [["render", ct], ["__scopeId", "data-v-733f9daa"]
|
|
|
870
944
|
}
|
|
871
945
|
},
|
|
872
946
|
setup(e) {
|
|
873
|
-
let { t } =
|
|
947
|
+
let { t } = z(), n = e, r = O(null), a = O(!1);
|
|
874
948
|
function o(e) {
|
|
875
949
|
let t = e.match(/__v(\d+)/);
|
|
876
950
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -885,7 +959,7 @@ var lt = /* @__PURE__ */ $(st, [["render", ct], ["__scopeId", "data-v-733f9daa"]
|
|
|
885
959
|
return;
|
|
886
960
|
}
|
|
887
961
|
}
|
|
888
|
-
let c = await
|
|
962
|
+
let c = await He(s, n.fields).catch(() => {
|
|
889
963
|
a.value = !1;
|
|
890
964
|
}).finally(() => {
|
|
891
965
|
r.value.value = null;
|
|
@@ -895,14 +969,14 @@ var lt = /* @__PURE__ */ $(st, [["render", ct], ["__scopeId", "data-v-733f9daa"]
|
|
|
895
969
|
});
|
|
896
970
|
}
|
|
897
971
|
return (t, n) => {
|
|
898
|
-
let i =
|
|
899
|
-
return
|
|
972
|
+
let i = A("el-button");
|
|
973
|
+
return E(), f("div", _t, [g(i, x({
|
|
900
974
|
type: "primary",
|
|
901
975
|
loading: a.value,
|
|
902
976
|
class: "mgr10",
|
|
903
977
|
onClick: n[0] ||= (e) => r.value.click()
|
|
904
978
|
}, t.$attrs), {
|
|
905
|
-
default:
|
|
979
|
+
default: F(() => [k(t.$slots, "default", {}, () => [h(M(t.$t("dao-ru")), 1)], !0)]),
|
|
906
980
|
_: 3
|
|
907
981
|
}, 16, ["loading"]), p("input", {
|
|
908
982
|
onChange: s,
|
|
@@ -916,27 +990,27 @@ var lt = /* @__PURE__ */ $(st, [["render", ct], ["__scopeId", "data-v-733f9daa"]
|
|
|
916
990
|
opacity: "0"
|
|
917
991
|
},
|
|
918
992
|
type: "file"
|
|
919
|
-
}, null, 40,
|
|
993
|
+
}, null, 40, vt)]);
|
|
920
994
|
};
|
|
921
995
|
}
|
|
922
996
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
923
997
|
//#endregion
|
|
924
998
|
//#region src/components/SearchBar/tools.js
|
|
925
|
-
function
|
|
999
|
+
function bt(e) {
|
|
926
1000
|
let t = {};
|
|
927
1001
|
return e?.forEach((e) => {
|
|
928
1002
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date", format: s = (e) => e } = e;
|
|
929
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
1003
|
+
if (n) if (r == "input" && i?.multiple) t[n] = et(a);
|
|
930
1004
|
else if (r == "date") if (o.includes("range")) {
|
|
931
1005
|
let [e, r] = n, [i, s] = a || [];
|
|
932
|
-
i && o == "daterange" && (i =
|
|
1006
|
+
i && o == "daterange" && (i = R(i).format("YYYY-MM-DD 00:00:00"), s = R(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
933
1007
|
} else t[n] = s(a);
|
|
934
1008
|
else t[n] = a;
|
|
935
1009
|
}), t;
|
|
936
1010
|
}
|
|
937
1011
|
//#endregion
|
|
938
1012
|
//#region src/components/SearchBar/index.vue
|
|
939
|
-
var
|
|
1013
|
+
var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { class: "right" }, Tt = /* @__PURE__ */ $({
|
|
940
1014
|
__name: "index",
|
|
941
1015
|
props: { form: {
|
|
942
1016
|
type: Object,
|
|
@@ -948,7 +1022,7 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
948
1022
|
"visibleChange"
|
|
949
1023
|
],
|
|
950
1024
|
setup(e, { expose: t, emit: n }) {
|
|
951
|
-
let r = e, i = n, a =
|
|
1025
|
+
let r = e, i = n, a = O(!0), o = O(null), { t: s } = z(), m = {
|
|
952
1026
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
953
1027
|
daterange: "YYYY-MM-DD",
|
|
954
1028
|
month: "YYYY-MM"
|
|
@@ -966,23 +1040,23 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
966
1040
|
i("confirm");
|
|
967
1041
|
}
|
|
968
1042
|
function T() {
|
|
969
|
-
return
|
|
1043
|
+
return bt(r.form.items);
|
|
970
1044
|
}
|
|
971
|
-
let
|
|
972
|
-
function
|
|
1045
|
+
let ee = ue(r.form.items);
|
|
1046
|
+
function te() {
|
|
973
1047
|
r.form?.items?.forEach((e) => {
|
|
974
|
-
let t =
|
|
1048
|
+
let t = ee.find((t) => t.key == e.key);
|
|
975
1049
|
t && (e.value = t.value);
|
|
976
1050
|
});
|
|
977
1051
|
}
|
|
978
1052
|
return t({
|
|
979
1053
|
getPrm: T,
|
|
980
|
-
reset:
|
|
1054
|
+
reset: te
|
|
981
1055
|
}), (t, n) => {
|
|
982
|
-
let r =
|
|
983
|
-
return
|
|
1056
|
+
let r = A("el-input"), s = A("el-date-picker"), l = A("el-form-item"), T = A("el-form"), ee = A("el-link"), te = A("el-button");
|
|
1057
|
+
return E(), f("div", {
|
|
984
1058
|
class: "searchBar-container mgt10 mgb10",
|
|
985
|
-
onKeydown:
|
|
1059
|
+
onKeydown: se(v, ["enter"])
|
|
986
1060
|
}, [p("div", {
|
|
987
1061
|
class: "searchBar",
|
|
988
1062
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -990,12 +1064,12 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
990
1064
|
inline: "",
|
|
991
1065
|
model: e.form.data
|
|
992
1066
|
}, {
|
|
993
|
-
default:
|
|
1067
|
+
default: F(() => [(E(!0), f(c, null, ne(e.form?.items?.filter((e) => !e.hidden), (e) => (E(), f(c, { key: e.key }, [e.type == "br" ? (E(), f("br", xt)) : (E(), u(l, {
|
|
994
1068
|
key: 1,
|
|
995
1069
|
label: e.name
|
|
996
1070
|
}, {
|
|
997
|
-
default:
|
|
998
|
-
e.type === "input" ? (
|
|
1071
|
+
default: F(() => [
|
|
1072
|
+
e.type === "input" ? (E(), u(r, {
|
|
999
1073
|
key: 0,
|
|
1000
1074
|
modelValue: e.value,
|
|
1001
1075
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
@@ -1007,8 +1081,8 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
1007
1081
|
"onUpdate:modelValue",
|
|
1008
1082
|
"class",
|
|
1009
1083
|
"placeholder"
|
|
1010
|
-
])) : e.type === "custom" ? (
|
|
1011
|
-
e.type === "select" ? (
|
|
1084
|
+
])) : e.type === "custom" ? (E(), u(j(e.render), { key: 1 })) : d("", !0),
|
|
1085
|
+
e.type === "select" ? (E(), u(ut, x({
|
|
1012
1086
|
key: 2,
|
|
1013
1087
|
class: e.option?.class || "w150",
|
|
1014
1088
|
modelValue: e.value,
|
|
@@ -1024,7 +1098,7 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
1024
1098
|
"onClear",
|
|
1025
1099
|
"placeholder"
|
|
1026
1100
|
])) : d("", !0),
|
|
1027
|
-
e.type === "date" ? (
|
|
1101
|
+
e.type === "date" ? (E(), u(s, x({
|
|
1028
1102
|
key: 3,
|
|
1029
1103
|
class: {
|
|
1030
1104
|
datetimerange: "w300",
|
|
@@ -1055,36 +1129,36 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
1055
1129
|
_: 2
|
|
1056
1130
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1057
1131
|
_: 1
|
|
1058
|
-
}, 8, ["model"])], 4), p("div",
|
|
1059
|
-
g(
|
|
1132
|
+
}, 8, ["model"])], 4), p("div", St, [p("div", Ct, [k(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", wt, [
|
|
1133
|
+
g(ee, {
|
|
1060
1134
|
underline: "never",
|
|
1061
1135
|
class: "mgr10",
|
|
1062
1136
|
onClick: n[0] ||= () => {
|
|
1063
1137
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1064
1138
|
}
|
|
1065
1139
|
}, {
|
|
1066
|
-
default:
|
|
1140
|
+
default: F(() => [g(pt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + M(_.value), 1)]),
|
|
1067
1141
|
_: 1
|
|
1068
1142
|
}),
|
|
1069
|
-
g(
|
|
1143
|
+
g(te, {
|
|
1070
1144
|
type: "primary",
|
|
1071
1145
|
onClick: v
|
|
1072
1146
|
}, {
|
|
1073
|
-
default:
|
|
1147
|
+
default: F(() => [h(M(t.$t("shai-xuan")), 1)]),
|
|
1074
1148
|
_: 1
|
|
1075
1149
|
}),
|
|
1076
|
-
g(
|
|
1150
|
+
g(te, {
|
|
1077
1151
|
type: "primary",
|
|
1078
1152
|
onClick: b
|
|
1079
1153
|
}, {
|
|
1080
|
-
default:
|
|
1154
|
+
default: F(() => [h(M(t.$t("chong-zhi")), 1)]),
|
|
1081
1155
|
_: 1
|
|
1082
1156
|
}),
|
|
1083
|
-
|
|
1157
|
+
k(t.$slots, "btn", {}, void 0, !0)
|
|
1084
1158
|
])])], 32);
|
|
1085
1159
|
};
|
|
1086
1160
|
}
|
|
1087
|
-
}, [["__scopeId", "data-v-3e596b3b"]]),
|
|
1161
|
+
}, [["__scopeId", "data-v-3e596b3b"]]), Et = {
|
|
1088
1162
|
pageNoKey: "pageNo",
|
|
1089
1163
|
pageSizeKey: "pageSize",
|
|
1090
1164
|
totalKey: "total",
|
|
@@ -1108,26 +1182,26 @@ var _t = { key: 0 }, vt = { class: "btns" }, yt = { class: "left" }, bt = { clas
|
|
|
1108
1182
|
showShadow: !1,
|
|
1109
1183
|
showCheckBox: !1,
|
|
1110
1184
|
enableCellCopy: !0
|
|
1111
|
-
},
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1114
|
-
...
|
|
1185
|
+
}, Dt = { ...Et };
|
|
1186
|
+
function Ot(e) {
|
|
1187
|
+
Dt = {
|
|
1188
|
+
...Dt,
|
|
1115
1189
|
...e,
|
|
1116
1190
|
responseDataKeys: {
|
|
1117
|
-
...
|
|
1191
|
+
...Dt.responseDataKeys,
|
|
1118
1192
|
...e.responseDataKeys || {}
|
|
1119
1193
|
}
|
|
1120
1194
|
};
|
|
1121
1195
|
}
|
|
1122
|
-
function
|
|
1123
|
-
return
|
|
1196
|
+
function kt() {
|
|
1197
|
+
return Dt;
|
|
1124
1198
|
}
|
|
1125
|
-
function
|
|
1126
|
-
|
|
1199
|
+
function At() {
|
|
1200
|
+
Dt = { ...Et };
|
|
1127
1201
|
}
|
|
1128
1202
|
//#endregion
|
|
1129
1203
|
//#region src/components/ListPage/index.vue
|
|
1130
|
-
var
|
|
1204
|
+
var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
1131
1205
|
__name: "index",
|
|
1132
1206
|
props: {
|
|
1133
1207
|
id: {
|
|
@@ -1157,21 +1231,21 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1157
1231
|
}
|
|
1158
1232
|
},
|
|
1159
1233
|
setup(e, { expose: t }) {
|
|
1160
|
-
let { t: n, locale: r } =
|
|
1234
|
+
let { t: n, locale: r } = z(), i = kt(), a = e, o = O(!1), s = O([]);
|
|
1161
1235
|
a.searchForm.showSearch === void 0 && (a.searchForm.showSearch = i.showSearch), a.searchForm.showPage === void 0 && (a.searchForm.showPage = i.showPage), a.searchForm.showShadow === void 0 && (a.searchForm.showShadow = i.showShadow), a.searchForm.showCheckBox === void 0 && (a.searchForm.showCheckBox = i.showCheckBox), a.searchForm.enableCellCopy === void 0 && (a.searchForm.enableCellCopy = i.enableCellCopy), a.searchForm.selections || (a.searchForm.selections = []);
|
|
1162
|
-
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m =
|
|
1236
|
+
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 = D({
|
|
1163
1237
|
[_]: 1,
|
|
1164
1238
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1165
1239
|
total: 0
|
|
1166
|
-
}), b =
|
|
1240
|
+
}), b = O(null), w = O(null), ne = O(450), j = de(() => {
|
|
1167
1241
|
S(() => {
|
|
1168
1242
|
if (!w.value) return;
|
|
1169
1243
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1170
|
-
|
|
1244
|
+
ne.value = Math.max(t, 200);
|
|
1171
1245
|
});
|
|
1172
|
-
}, 100),
|
|
1173
|
-
|
|
1174
|
-
},
|
|
1246
|
+
}, 100), re = () => {
|
|
1247
|
+
j();
|
|
1248
|
+
}, P = () => {
|
|
1175
1249
|
if (b.value) return b.value;
|
|
1176
1250
|
let e = w.value;
|
|
1177
1251
|
if (e) {
|
|
@@ -1179,39 +1253,39 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1179
1253
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1180
1254
|
}
|
|
1181
1255
|
return null;
|
|
1182
|
-
},
|
|
1256
|
+
}, ie = () => {
|
|
1183
1257
|
if (!a.searchForm.enableCellCopy) return !1;
|
|
1184
|
-
let e =
|
|
1258
|
+
let e = P();
|
|
1185
1259
|
if (!e || !e.$el) return !1;
|
|
1186
1260
|
let t = e.$el;
|
|
1187
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1261
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", we), t.removeEventListener("mousemove", Te), t.removeEventListener("mouseup", Ee), t.removeEventListener("keydown", Ne), t.addEventListener("mousedown", we), t.addEventListener("mousemove", Te), t.addEventListener("mouseup", Ee), t.addEventListener("keydown", Ne);
|
|
1188
1262
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1189
|
-
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll",
|
|
1263
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", Ae), n.addEventListener("scroll", Ae), n.__cellCopyScrollBound = !0), ke(), !0;
|
|
1190
1264
|
};
|
|
1191
1265
|
T(() => {
|
|
1192
|
-
|
|
1193
|
-
|
|
1266
|
+
j(), window.addEventListener("resize", re), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Pe), document.addEventListener("mousedown", Fe), setTimeout(() => {
|
|
1267
|
+
ie();
|
|
1194
1268
|
}, 500));
|
|
1195
|
-
}),
|
|
1269
|
+
}), te(() => {
|
|
1196
1270
|
a.searchForm.enableCellCopy && setTimeout(() => {
|
|
1197
|
-
|
|
1271
|
+
ie();
|
|
1198
1272
|
}, 500);
|
|
1199
|
-
}),
|
|
1200
|
-
if (window.removeEventListener("resize",
|
|
1201
|
-
document.removeEventListener("mouseup",
|
|
1202
|
-
let e =
|
|
1273
|
+
}), ee(() => {
|
|
1274
|
+
if (window.removeEventListener("resize", re), a.searchForm.enableCellCopy) {
|
|
1275
|
+
document.removeEventListener("mouseup", Pe), document.removeEventListener("mousedown", Fe), document.removeEventListener("mousemove", xe), G(), Z();
|
|
1276
|
+
let e = P();
|
|
1203
1277
|
if (e && e.$el) {
|
|
1204
1278
|
let t = e.$el;
|
|
1205
|
-
t.removeEventListener("mousedown",
|
|
1279
|
+
t.removeEventListener("mousedown", we), t.removeEventListener("mousemove", Te), t.removeEventListener("mouseup", Ee), t.removeEventListener("keydown", Ne);
|
|
1206
1280
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1207
|
-
n && (n.removeEventListener("scroll",
|
|
1281
|
+
n && (n.removeEventListener("scroll", Ae), n.__cellCopyScrollBound = !1);
|
|
1208
1282
|
}
|
|
1209
1283
|
}
|
|
1210
1284
|
});
|
|
1211
|
-
let
|
|
1212
|
-
async function
|
|
1285
|
+
let ae = l(() => he.value.height || ne.value), oe;
|
|
1286
|
+
async function se(e) {
|
|
1213
1287
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1214
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1288
|
+
e[_] != 1 && (e.nextSearchAfter = oe), o.value = !0;
|
|
1215
1289
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1216
1290
|
o.value = !1, a.searchForm.selections = [];
|
|
1217
1291
|
});
|
|
@@ -1222,7 +1296,7 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1222
1296
|
});
|
|
1223
1297
|
let e = [];
|
|
1224
1298
|
for (let n of t.rows) {
|
|
1225
|
-
let t =
|
|
1299
|
+
let t = ct(c, n);
|
|
1226
1300
|
if (t) {
|
|
1227
1301
|
e = t;
|
|
1228
1302
|
break;
|
|
@@ -1230,60 +1304,60 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1230
1304
|
}
|
|
1231
1305
|
let i = 0;
|
|
1232
1306
|
for (let e of t.total) {
|
|
1233
|
-
let t =
|
|
1307
|
+
let t = ct(c, e);
|
|
1234
1308
|
if (t !== void 0) {
|
|
1235
1309
|
i = t;
|
|
1236
1310
|
break;
|
|
1237
1311
|
}
|
|
1238
1312
|
}
|
|
1239
|
-
s.value = n ? n(e) : e, y.total = i,
|
|
1313
|
+
s.value = n ? n(e) : e, y.total = i, oe = c.nextSearchAfter, a.searchForm.enableCellCopy && (De(), H = /* @__PURE__ */ new WeakMap(), _e = null, S(() => {
|
|
1240
1314
|
setTimeout(() => {
|
|
1241
|
-
|
|
1315
|
+
ie();
|
|
1242
1316
|
}, 500);
|
|
1243
1317
|
}));
|
|
1244
1318
|
}
|
|
1245
1319
|
}
|
|
1246
|
-
function
|
|
1320
|
+
function I(e = {}) {
|
|
1247
1321
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1248
|
-
|
|
1322
|
+
se({
|
|
1249
1323
|
...y,
|
|
1250
|
-
...
|
|
1324
|
+
...bt(a.searchForm.items),
|
|
1251
1325
|
...e,
|
|
1252
1326
|
...n
|
|
1253
1327
|
});
|
|
1254
1328
|
}
|
|
1255
|
-
function
|
|
1329
|
+
function L() {
|
|
1256
1330
|
let { reset: e } = a.tableConfig;
|
|
1257
1331
|
e && e(), a.searchForm?.items?.forEach((e) => {
|
|
1258
|
-
let t = m.find((t) =>
|
|
1332
|
+
let t = m.find((t) => fe(e.key) && fe(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1259
1333
|
t && (e.value = t.value);
|
|
1260
|
-
}),
|
|
1334
|
+
}), I();
|
|
1261
1335
|
}
|
|
1262
|
-
a.api && a.immediate &&
|
|
1263
|
-
function
|
|
1336
|
+
a.api && a.immediate && I();
|
|
1337
|
+
function R() {
|
|
1264
1338
|
return {
|
|
1265
1339
|
...y,
|
|
1266
|
-
...
|
|
1340
|
+
...bt(a.searchForm.items)
|
|
1267
1341
|
};
|
|
1268
1342
|
}
|
|
1269
|
-
let
|
|
1343
|
+
let le = () => {
|
|
1270
1344
|
let e = b.value;
|
|
1271
1345
|
e && e.clearSort();
|
|
1272
|
-
},
|
|
1346
|
+
}, pe = D({ storage: !0 }), me = D({
|
|
1273
1347
|
drag: !0,
|
|
1274
1348
|
resizable: !0,
|
|
1275
1349
|
maxFixedSize: 0
|
|
1276
|
-
}),
|
|
1350
|
+
}), he = l(() => {
|
|
1277
1351
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1278
1352
|
return {
|
|
1279
1353
|
headerAlign: "left",
|
|
1280
1354
|
align: "center",
|
|
1281
1355
|
customConfig: {
|
|
1282
|
-
...
|
|
1356
|
+
...pe,
|
|
1283
1357
|
...e
|
|
1284
1358
|
},
|
|
1285
1359
|
columnConfig: {
|
|
1286
|
-
...
|
|
1360
|
+
...me,
|
|
1287
1361
|
...t
|
|
1288
1362
|
},
|
|
1289
1363
|
"virtual-x-config": {
|
|
@@ -1296,18 +1370,18 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1296
1370
|
},
|
|
1297
1371
|
...n
|
|
1298
1372
|
};
|
|
1299
|
-
}),
|
|
1373
|
+
}), B = D({
|
|
1300
1374
|
isSelecting: !1,
|
|
1301
1375
|
startCell: null,
|
|
1302
1376
|
endCell: null,
|
|
1303
1377
|
selectedCells: []
|
|
1304
|
-
}),
|
|
1305
|
-
if (!
|
|
1306
|
-
|
|
1378
|
+
}), V = null, ge = () => {
|
|
1379
|
+
if (!B.startCell || !B.endCell) {
|
|
1380
|
+
V = null, B.selectedCells = [];
|
|
1307
1381
|
return;
|
|
1308
1382
|
}
|
|
1309
|
-
let e = Math.min(
|
|
1310
|
-
|
|
1383
|
+
let e = Math.min(B.startCell.rowIndex, B.endCell.rowIndex), t = Math.max(B.startCell.rowIndex, B.endCell.rowIndex), n = Math.min(B.startCell.colIndex, B.endCell.colIndex), r = Math.max(B.startCell.colIndex, B.endCell.colIndex);
|
|
1384
|
+
V = {
|
|
1311
1385
|
minRow: e,
|
|
1312
1386
|
maxRow: t,
|
|
1313
1387
|
minCol: n,
|
|
@@ -1318,25 +1392,25 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1318
1392
|
rowIndex: a,
|
|
1319
1393
|
colIndex: e
|
|
1320
1394
|
});
|
|
1321
|
-
|
|
1322
|
-
},
|
|
1395
|
+
B.selectedCells = i;
|
|
1396
|
+
}, H = /* @__PURE__ */ new WeakMap(), _e = null, ve = 0, ye = (e, t) => {
|
|
1323
1397
|
let n = e.getTableData().fullData;
|
|
1324
|
-
if (n !==
|
|
1325
|
-
|
|
1326
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1398
|
+
if (n !== _e || n.length !== ve) {
|
|
1399
|
+
H = /* @__PURE__ */ new WeakMap(), _e = n, ve = n.length;
|
|
1400
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && H.set(n[e], e);
|
|
1327
1401
|
}
|
|
1328
|
-
return
|
|
1329
|
-
},
|
|
1402
|
+
return H.has(t) ? H.get(t) : -1;
|
|
1403
|
+
}, be = (e) => {
|
|
1330
1404
|
let t = e.closest(".vxe-body--column");
|
|
1331
1405
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1332
1406
|
let n = t.closest(".vxe-body--row");
|
|
1333
1407
|
if (!n) return null;
|
|
1334
|
-
let r =
|
|
1408
|
+
let r = P();
|
|
1335
1409
|
if (!r) return null;
|
|
1336
1410
|
let i = -1, a = n.getAttribute("rowid");
|
|
1337
1411
|
if (a != null) {
|
|
1338
1412
|
let e = r.getRowById(a);
|
|
1339
|
-
e && (i =
|
|
1413
|
+
e && (i = ye(r, e));
|
|
1340
1414
|
}
|
|
1341
1415
|
if (i < 0) {
|
|
1342
1416
|
let e = n.parentElement;
|
|
@@ -1349,49 +1423,49 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1349
1423
|
colIndex: o,
|
|
1350
1424
|
cell: t
|
|
1351
1425
|
};
|
|
1352
|
-
},
|
|
1353
|
-
if (!
|
|
1354
|
-
|
|
1355
|
-
let t =
|
|
1426
|
+
}, U = null, W = 0, xe = (e) => {
|
|
1427
|
+
if (!B.isSelecting) return;
|
|
1428
|
+
W = e.clientY;
|
|
1429
|
+
let t = P();
|
|
1356
1430
|
if (!t || !t.$el) return;
|
|
1357
1431
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1358
1432
|
if (!r) return;
|
|
1359
1433
|
let i = r.getBoundingClientRect();
|
|
1360
|
-
e.clientY < i.top -
|
|
1361
|
-
},
|
|
1434
|
+
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ? U || Se() : G();
|
|
1435
|
+
}, Se = () => {
|
|
1362
1436
|
let e = () => {
|
|
1363
|
-
if (!
|
|
1364
|
-
|
|
1437
|
+
if (!B.isSelecting) {
|
|
1438
|
+
G();
|
|
1365
1439
|
return;
|
|
1366
1440
|
}
|
|
1367
|
-
let t =
|
|
1441
|
+
let t = P();
|
|
1368
1442
|
if (!t || !t.$el) {
|
|
1369
|
-
|
|
1443
|
+
G();
|
|
1370
1444
|
return;
|
|
1371
1445
|
}
|
|
1372
1446
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1373
1447
|
if (!r) {
|
|
1374
|
-
|
|
1448
|
+
G();
|
|
1375
1449
|
return;
|
|
1376
1450
|
}
|
|
1377
1451
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1378
|
-
if (
|
|
1379
|
-
let e = i.top -
|
|
1380
|
-
a = -Math.min(
|
|
1381
|
-
} else if (
|
|
1382
|
-
let e =
|
|
1383
|
-
a = Math.min(
|
|
1452
|
+
if (W < i.top) {
|
|
1453
|
+
let e = i.top - W;
|
|
1454
|
+
a = -Math.min(Nt, Math.max(2, e * Pt));
|
|
1455
|
+
} else if (W > i.bottom) {
|
|
1456
|
+
let e = W - i.bottom;
|
|
1457
|
+
a = Math.min(Nt, Math.max(2, e * Pt));
|
|
1384
1458
|
} else {
|
|
1385
|
-
|
|
1459
|
+
G();
|
|
1386
1460
|
return;
|
|
1387
1461
|
}
|
|
1388
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)),
|
|
1462
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), Ce(r, i), U = requestAnimationFrame(e);
|
|
1389
1463
|
};
|
|
1390
|
-
|
|
1391
|
-
},
|
|
1392
|
-
|
|
1393
|
-
},
|
|
1394
|
-
let n =
|
|
1464
|
+
U = requestAnimationFrame(e);
|
|
1465
|
+
}, G = () => {
|
|
1466
|
+
U &&= (cancelAnimationFrame(U), null);
|
|
1467
|
+
}, Ce = (e, t) => {
|
|
1468
|
+
let n = P();
|
|
1395
1469
|
if (!n) return;
|
|
1396
1470
|
let r = n.getTableData().fullData;
|
|
1397
1471
|
if (!r || r.length === 0) return;
|
|
@@ -1400,53 +1474,53 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1400
1474
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1401
1475
|
if (a.length === 0) return;
|
|
1402
1476
|
let o = null;
|
|
1403
|
-
if (
|
|
1477
|
+
if (W < t.top ? o = a[0] : W > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1404
1478
|
let s = o.getAttribute("rowid");
|
|
1405
1479
|
if (s == null) return;
|
|
1406
1480
|
let c = -1, l = n.getRowById(s);
|
|
1407
1481
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1408
|
-
let u =
|
|
1409
|
-
|
|
1482
|
+
let u = B.endCell ? B.endCell.colIndex : B.startCell ? B.startCell.colIndex : 0;
|
|
1483
|
+
B.endCell = {
|
|
1410
1484
|
rowIndex: c,
|
|
1411
1485
|
colIndex: u
|
|
1412
|
-
},
|
|
1413
|
-
},
|
|
1414
|
-
let t =
|
|
1486
|
+
}, ge(), J();
|
|
1487
|
+
}, we = (e) => {
|
|
1488
|
+
let t = be(e.target);
|
|
1415
1489
|
if (!t) {
|
|
1416
|
-
|
|
1490
|
+
De();
|
|
1417
1491
|
return;
|
|
1418
1492
|
}
|
|
1419
|
-
let n =
|
|
1420
|
-
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"),
|
|
1493
|
+
let n = P();
|
|
1494
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), B.isSelecting = !0, B.startCell = {
|
|
1421
1495
|
rowIndex: t.rowIndex,
|
|
1422
1496
|
colIndex: t.colIndex
|
|
1423
|
-
},
|
|
1424
|
-
},
|
|
1425
|
-
|
|
1426
|
-
if (
|
|
1427
|
-
let t =
|
|
1428
|
-
t && (
|
|
1497
|
+
}, B.endCell = { ...B.startCell }, document.addEventListener("mousemove", xe), ge(), J();
|
|
1498
|
+
}, K = null, Te = (e) => {
|
|
1499
|
+
B.isSelecting && (K ||= requestAnimationFrame(() => {
|
|
1500
|
+
if (K = null, !B.isSelecting) return;
|
|
1501
|
+
let t = be(e.target);
|
|
1502
|
+
t && (B.endCell && B.endCell.rowIndex === t.rowIndex && B.endCell.colIndex === t.colIndex || (B.endCell = {
|
|
1429
1503
|
rowIndex: t.rowIndex,
|
|
1430
1504
|
colIndex: t.colIndex
|
|
1431
|
-
},
|
|
1505
|
+
}, ge(), J()));
|
|
1432
1506
|
}));
|
|
1433
|
-
}, Te = () => {
|
|
1434
|
-
V.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", be);
|
|
1435
1507
|
}, Ee = () => {
|
|
1436
|
-
|
|
1437
|
-
|
|
1508
|
+
B.isSelecting = !1, G(), K &&= (cancelAnimationFrame(K), null), document.removeEventListener("mousemove", xe);
|
|
1509
|
+
}, De = () => {
|
|
1510
|
+
B.selectedCells = [], B.startCell = null, B.endCell = null, V = null;
|
|
1511
|
+
let e = P();
|
|
1438
1512
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1439
1513
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1440
1514
|
});
|
|
1441
|
-
},
|
|
1442
|
-
let e =
|
|
1515
|
+
}, q = () => {
|
|
1516
|
+
let e = P();
|
|
1443
1517
|
if (!e) return;
|
|
1444
1518
|
let t = e.$el;
|
|
1445
1519
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1446
1520
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1447
1521
|
for (let e = 0; e < n.length; e++) n[e].classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1448
|
-
if (!
|
|
1449
|
-
let { minRow: r, maxRow: i, minCol: a, maxCol: o } =
|
|
1522
|
+
if (!V) return;
|
|
1523
|
+
let { minRow: r, maxRow: i, minCol: a, maxCol: o } = V, s = e.getColumns(), c = e.getTableData().fullData, l = /* @__PURE__ */ new Map();
|
|
1450
1524
|
for (let t = r; t <= i; t++) {
|
|
1451
1525
|
let n = c[t];
|
|
1452
1526
|
if (n) {
|
|
@@ -1467,7 +1541,7 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1467
1541
|
let d = l.get(String(u));
|
|
1468
1542
|
if (d === void 0) {
|
|
1469
1543
|
let t = e.getRowById(u);
|
|
1470
|
-
if (t && (d =
|
|
1544
|
+
if (t && (d = ye(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1471
1545
|
}
|
|
1472
1546
|
if (d < r || d > i) continue;
|
|
1473
1547
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1478,33 +1552,33 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1478
1552
|
}
|
|
1479
1553
|
}
|
|
1480
1554
|
}
|
|
1481
|
-
},
|
|
1555
|
+
}, J = () => {
|
|
1482
1556
|
S(() => {
|
|
1483
|
-
|
|
1557
|
+
q();
|
|
1484
1558
|
});
|
|
1485
|
-
},
|
|
1486
|
-
|
|
1487
|
-
|
|
1559
|
+
}, Y = null, X = null, Oe = () => {
|
|
1560
|
+
X ||= requestAnimationFrame(() => {
|
|
1561
|
+
X = null, q();
|
|
1488
1562
|
});
|
|
1489
|
-
},
|
|
1490
|
-
let e =
|
|
1563
|
+
}, ke = () => {
|
|
1564
|
+
let e = P();
|
|
1491
1565
|
if (!e || !e.$el) return;
|
|
1492
1566
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1493
|
-
t && (
|
|
1494
|
-
|
|
1495
|
-
}),
|
|
1567
|
+
t && (Z(), Y = new MutationObserver(() => {
|
|
1568
|
+
V && Oe();
|
|
1569
|
+
}), Y.observe(t, {
|
|
1496
1570
|
childList: !0,
|
|
1497
1571
|
subtree: !1
|
|
1498
1572
|
}));
|
|
1499
|
-
},
|
|
1500
|
-
|
|
1501
|
-
},
|
|
1502
|
-
|
|
1503
|
-
},
|
|
1504
|
-
if (!
|
|
1505
|
-
let e =
|
|
1573
|
+
}, Z = () => {
|
|
1574
|
+
Y &&= (Y.disconnect(), null), X &&= (cancelAnimationFrame(X), null);
|
|
1575
|
+
}, Ae = () => {
|
|
1576
|
+
V && Oe();
|
|
1577
|
+
}, je = (e) => e == null ? "" : typeof e == "object" ? Array.isArray(e) ? e.map((e) => typeof e == "object" && e ? e.label || e.name || e.text || e.title || JSON.stringify(e) : String(e)).join(", ") : e.label || e.name || e.text || e.title || JSON.stringify(e) : String(e), Me = async () => {
|
|
1578
|
+
if (!V) return;
|
|
1579
|
+
let e = P();
|
|
1506
1580
|
if (!e) return;
|
|
1507
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } =
|
|
1581
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } = V, c = [];
|
|
1508
1582
|
for (let e = i; e <= a; e++) c.push(e);
|
|
1509
1583
|
let l = [];
|
|
1510
1584
|
for (let e = o; e <= s; e++) l.push(e);
|
|
@@ -1548,9 +1622,9 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1548
1622
|
});
|
|
1549
1623
|
o = e == null ? "" : String(e);
|
|
1550
1624
|
} catch {
|
|
1551
|
-
o = s ?
|
|
1625
|
+
o = s ? je(i[s]) : "";
|
|
1552
1626
|
}
|
|
1553
|
-
else s && (o =
|
|
1627
|
+
else s && (o = je(i[s]));
|
|
1554
1628
|
a.push(o);
|
|
1555
1629
|
}), f.push(a.join(" "));
|
|
1556
1630
|
});
|
|
@@ -1560,19 +1634,19 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1560
1634
|
} catch (e) {
|
|
1561
1635
|
console.error("复制失败:", e);
|
|
1562
1636
|
}
|
|
1563
|
-
},
|
|
1564
|
-
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1565
|
-
},
|
|
1566
|
-
|
|
1567
|
-
}, Pe = (e) => {
|
|
1568
|
-
let t = F();
|
|
1569
|
-
!t || !t.$el || t.$el.contains(e.target) || Ee();
|
|
1637
|
+
}, Ne = (e) => {
|
|
1638
|
+
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? V && (e.preventDefault(), e.stopPropagation(), Me()) : e.key === "Escape" && De());
|
|
1639
|
+
}, Pe = () => {
|
|
1640
|
+
B.isSelecting = !1, G(), K &&= (cancelAnimationFrame(K), null), document.removeEventListener("mousemove", xe);
|
|
1570
1641
|
}, Fe = (e) => {
|
|
1571
|
-
|
|
1642
|
+
let t = P();
|
|
1643
|
+
!t || !t.$el || t.$el.contains(e.target) || De();
|
|
1572
1644
|
}, Ie = (e) => {
|
|
1573
|
-
y[
|
|
1645
|
+
y[_] = e, I();
|
|
1646
|
+
}, Le = (e) => {
|
|
1647
|
+
y[v] = e, y[_] = 1, I();
|
|
1574
1648
|
};
|
|
1575
|
-
function
|
|
1649
|
+
function Q() {
|
|
1576
1650
|
let e = b.value.getCheckboxRecords();
|
|
1577
1651
|
a.searchForm.selections = e;
|
|
1578
1652
|
}
|
|
@@ -1586,35 +1660,35 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1586
1660
|
};
|
|
1587
1661
|
return t({
|
|
1588
1662
|
tableRef: b,
|
|
1589
|
-
getList:
|
|
1590
|
-
getPrm:
|
|
1591
|
-
clearSort:
|
|
1592
|
-
calculateTableHeight:
|
|
1663
|
+
getList: I,
|
|
1664
|
+
getPrm: R,
|
|
1665
|
+
clearSort: le,
|
|
1666
|
+
calculateTableHeight: j
|
|
1593
1667
|
}), (t, n) => {
|
|
1594
|
-
let a =
|
|
1595
|
-
return
|
|
1596
|
-
e.searchForm.showSearch ? (
|
|
1668
|
+
let a = A("el-button"), l = A("el-checkbox"), m = A("el-text"), S = A("vxe-column"), T = A("VxeTable"), ee = A("el-pagination");
|
|
1669
|
+
return E(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1670
|
+
e.searchForm.showSearch ? (E(), u(Tt, {
|
|
1597
1671
|
key: 0,
|
|
1598
1672
|
form: e.searchForm,
|
|
1599
|
-
onReset:
|
|
1600
|
-
onConfirm: n[1] ||= (e) =>
|
|
1601
|
-
onVisibleChange:
|
|
1673
|
+
onReset: L,
|
|
1674
|
+
onConfirm: n[1] ||= (e) => I(),
|
|
1675
|
+
onVisibleChange: N(j)
|
|
1602
1676
|
}, {
|
|
1603
|
-
btn:
|
|
1677
|
+
btn: F(() => [
|
|
1604
1678
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1605
|
-
|
|
1679
|
+
k(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1606
1680
|
g(a, {
|
|
1607
1681
|
class: "mgl10",
|
|
1608
1682
|
round: "",
|
|
1609
1683
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1610
1684
|
}, {
|
|
1611
|
-
default:
|
|
1685
|
+
default: F(() => [g(pt, { name: "Tools" })]),
|
|
1612
1686
|
_: 1
|
|
1613
1687
|
})
|
|
1614
1688
|
]),
|
|
1615
1689
|
_: 3
|
|
1616
1690
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1617
|
-
|
|
1691
|
+
k(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1618
1692
|
p("div", {
|
|
1619
1693
|
ref_key: "tableContentRef",
|
|
1620
1694
|
ref: w,
|
|
@@ -1626,41 +1700,41 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1626
1700
|
loading: e.loading || o.value,
|
|
1627
1701
|
data: e.api ? s.value : e.data,
|
|
1628
1702
|
border: ""
|
|
1629
|
-
},
|
|
1630
|
-
height:
|
|
1631
|
-
onCheckboxChange:
|
|
1632
|
-
onCheckboxAll:
|
|
1633
|
-
onSortChange:
|
|
1634
|
-
onScroll:
|
|
1703
|
+
}, he.value, {
|
|
1704
|
+
height: ae.value,
|
|
1705
|
+
onCheckboxChange: Q,
|
|
1706
|
+
onCheckboxAll: Q,
|
|
1707
|
+
onSortChange: he.value["sort-config"]?.sortChange,
|
|
1708
|
+
onScroll: Ae
|
|
1635
1709
|
}), {
|
|
1636
|
-
default:
|
|
1710
|
+
default: F(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (E(), u(S, {
|
|
1637
1711
|
key: 0,
|
|
1638
1712
|
type: "checkbox",
|
|
1639
|
-
width:
|
|
1713
|
+
width: N(r) == "zh_cn" ? 80 : 150,
|
|
1640
1714
|
title: t.$t("xu-hao"),
|
|
1641
1715
|
fixed: "left"
|
|
1642
1716
|
}, {
|
|
1643
|
-
checkbox:
|
|
1717
|
+
checkbox: F(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", jt, [n ? (E(), u(l, {
|
|
1644
1718
|
key: 0,
|
|
1645
1719
|
checked: !0,
|
|
1646
1720
|
disabled: r,
|
|
1647
1721
|
size: "default",
|
|
1648
|
-
onClick:
|
|
1649
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1722
|
+
onClick: ce((e) => !r && Re(t), ["stop"])
|
|
1723
|
+
}, null, 8, ["disabled", "onClick"])) : (E(), u(l, {
|
|
1650
1724
|
key: 1,
|
|
1651
1725
|
disabled: r,
|
|
1652
1726
|
checked: !1,
|
|
1653
1727
|
size: "default",
|
|
1654
|
-
onClick:
|
|
1728
|
+
onClick: ce((e) => !r && Re(t), ["stop"])
|
|
1655
1729
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1656
1730
|
type: "info",
|
|
1657
1731
|
class: "mgl5"
|
|
1658
1732
|
}, {
|
|
1659
|
-
default:
|
|
1733
|
+
default: F(() => [h(M(e + 1), 1)]),
|
|
1660
1734
|
_: 2
|
|
1661
1735
|
}, 1024)])]),
|
|
1662
1736
|
_: 1
|
|
1663
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1737
|
+
}, 8, ["width", "title"])) : d("", !0), k(t.$slots, "default", {}, void 0, !0)]),
|
|
1664
1738
|
_: 3
|
|
1665
1739
|
}, 16, [
|
|
1666
1740
|
"id",
|
|
@@ -1669,18 +1743,18 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1669
1743
|
"height",
|
|
1670
1744
|
"onSortChange"
|
|
1671
1745
|
])], 2),
|
|
1672
|
-
e.searchForm.showPage ? (
|
|
1746
|
+
e.searchForm.showPage ? (E(), u(ee, {
|
|
1673
1747
|
key: 1,
|
|
1674
|
-
"current-page": y[
|
|
1675
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1748
|
+
"current-page": y[N(_)],
|
|
1749
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[N(_)] = e,
|
|
1676
1750
|
class: "myPagination mgt10",
|
|
1677
1751
|
background: "",
|
|
1678
1752
|
layout: "total, sizes, prev, pager, next",
|
|
1679
1753
|
total: y.total,
|
|
1680
|
-
"page-size": y[
|
|
1681
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1682
|
-
onCurrentChange:
|
|
1683
|
-
onSizeChange:
|
|
1754
|
+
"page-size": y[N(v)],
|
|
1755
|
+
"page-sizes": e.searchForm.pageSizes || N(i).pageSizes,
|
|
1756
|
+
onCurrentChange: Ie,
|
|
1757
|
+
onSizeChange: Le
|
|
1684
1758
|
}, null, 8, [
|
|
1685
1759
|
"current-page",
|
|
1686
1760
|
"total",
|
|
@@ -1690,10 +1764,10 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1690
1764
|
], 2);
|
|
1691
1765
|
};
|
|
1692
1766
|
}
|
|
1693
|
-
}, [["__scopeId", "data-v-257f5bc0"]]),
|
|
1767
|
+
}, [["__scopeId", "data-v-257f5bc0"]]), It = {
|
|
1694
1768
|
key: 0,
|
|
1695
1769
|
class: "down-excel-temp__spinner"
|
|
1696
|
-
},
|
|
1770
|
+
}, Lt = /* @__PURE__ */ $({
|
|
1697
1771
|
__name: "index",
|
|
1698
1772
|
props: {
|
|
1699
1773
|
sheetsConfig: {
|
|
@@ -1710,7 +1784,7 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1710
1784
|
}
|
|
1711
1785
|
},
|
|
1712
1786
|
setup(e) {
|
|
1713
|
-
let t = e, n =
|
|
1787
|
+
let t = e, n = O(!1);
|
|
1714
1788
|
async function r(e) {
|
|
1715
1789
|
let t = Object.entries(e), n = await Promise.all(t.map(async ([e, t]) => {
|
|
1716
1790
|
let { tableData: n } = t, r = n;
|
|
@@ -1725,7 +1799,7 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1725
1799
|
if (!n.value) {
|
|
1726
1800
|
n.value = !0;
|
|
1727
1801
|
try {
|
|
1728
|
-
await
|
|
1802
|
+
await We(t.fileName + (t.version ? `__v${t.version}` : ""), await r(t.sheetsConfig));
|
|
1729
1803
|
} catch (e) {
|
|
1730
1804
|
console.error("[DownExcelTemp] 导出失败:", e), i.error(e?.message || "Export failed");
|
|
1731
1805
|
} finally {
|
|
@@ -1734,29 +1808,29 @@ var Dt = { class: "center" }, Ot = 0, kt = 20, At = .3, jt = /* @__PURE__ */ $({
|
|
|
1734
1808
|
}
|
|
1735
1809
|
}
|
|
1736
1810
|
return (e, t) => {
|
|
1737
|
-
let r =
|
|
1738
|
-
return
|
|
1811
|
+
let r = A("el-link");
|
|
1812
|
+
return E(), u(r, x({
|
|
1739
1813
|
type: "primary",
|
|
1740
1814
|
underline: "never",
|
|
1741
1815
|
disabled: n.value
|
|
1742
1816
|
}, e.$attrs, { onClick: a }), {
|
|
1743
|
-
default:
|
|
1817
|
+
default: F(() => [n.value ? (E(), f("span", It)) : d("", !0), k(e.$slots, "default", {}, () => [h(M(n.value ? e.$t("jia-zai-zhong") : e.$t("xia-zai-dao-ru-mo-ban")), 1)], !0)]),
|
|
1744
1818
|
_: 3
|
|
1745
1819
|
}, 16, ["disabled"]);
|
|
1746
1820
|
};
|
|
1747
1821
|
}
|
|
1748
|
-
}, [["__scopeId", "data-v-86bece44"]]),
|
|
1822
|
+
}, [["__scopeId", "data-v-86bece44"]]), Rt = {
|
|
1749
1823
|
mounted(e, t) {
|
|
1750
|
-
t.value &&
|
|
1824
|
+
t.value && zt(e);
|
|
1751
1825
|
},
|
|
1752
1826
|
updated(e, t) {
|
|
1753
|
-
t.value ?
|
|
1827
|
+
t.value ? zt(e) : Bt(e);
|
|
1754
1828
|
},
|
|
1755
1829
|
beforeUnmount(e) {
|
|
1756
|
-
|
|
1830
|
+
Bt(e);
|
|
1757
1831
|
}
|
|
1758
1832
|
};
|
|
1759
|
-
async function
|
|
1833
|
+
async function zt(e) {
|
|
1760
1834
|
await f();
|
|
1761
1835
|
let t = e.querySelector(".el-dialog");
|
|
1762
1836
|
if (!t) return;
|
|
@@ -1819,15 +1893,15 @@ async function Ft(e) {
|
|
|
1819
1893
|
}
|
|
1820
1894
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1821
1895
|
}
|
|
1822
|
-
function
|
|
1896
|
+
function Bt(e) {
|
|
1823
1897
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1824
1898
|
}
|
|
1825
1899
|
//#endregion
|
|
1826
1900
|
//#region src/components/Layer/index.vue
|
|
1827
|
-
var
|
|
1901
|
+
var Vt = {
|
|
1828
1902
|
key: 0,
|
|
1829
1903
|
class: "drawer-btn"
|
|
1830
|
-
},
|
|
1904
|
+
}, Ht = { key: 1 }, Ut = {
|
|
1831
1905
|
__name: "index",
|
|
1832
1906
|
props: {
|
|
1833
1907
|
layer: {
|
|
@@ -1847,7 +1921,7 @@ var Lt = {
|
|
|
1847
1921
|
},
|
|
1848
1922
|
emits: ["confirm"],
|
|
1849
1923
|
setup(e, { emit: t }) {
|
|
1850
|
-
let n = e, r = t, { t: i } =
|
|
1924
|
+
let n = e, r = t, { t: i } = z(), o = de(() => {
|
|
1851
1925
|
r("confirm");
|
|
1852
1926
|
}, 300);
|
|
1853
1927
|
async function s() {
|
|
@@ -1858,8 +1932,8 @@ var Lt = {
|
|
|
1858
1932
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1859
1933
|
}
|
|
1860
1934
|
return (t, n) => {
|
|
1861
|
-
let r =
|
|
1862
|
-
return e.layer.type ? (
|
|
1935
|
+
let r = A("el-button"), i = A("el-drawer"), a = A("el-dialog");
|
|
1936
|
+
return e.layer.type ? (E(), u(i, {
|
|
1863
1937
|
key: 0,
|
|
1864
1938
|
modelValue: e.layer.show,
|
|
1865
1939
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1870,18 +1944,18 @@ var Lt = {
|
|
|
1870
1944
|
"before-close": s,
|
|
1871
1945
|
class: "drawer-content"
|
|
1872
1946
|
}, {
|
|
1873
|
-
default:
|
|
1874
|
-
|
|
1947
|
+
default: F(() => [
|
|
1948
|
+
k(t.$slots, "default"),
|
|
1875
1949
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1876
|
-
e.layer.showButton ? (
|
|
1877
|
-
default:
|
|
1950
|
+
e.layer.showButton ? (E(), f("div", Vt, [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1951
|
+
default: F(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1878
1952
|
_: 1
|
|
1879
1953
|
}), g(r, {
|
|
1880
1954
|
type: "primary",
|
|
1881
1955
|
loading: e.loading,
|
|
1882
|
-
onClick:
|
|
1956
|
+
onClick: N(o)
|
|
1883
1957
|
}, {
|
|
1884
|
-
default:
|
|
1958
|
+
default: F(() => [h(M(t.$t("ti-jiao")), 1)]),
|
|
1885
1959
|
_: 1
|
|
1886
1960
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1887
1961
|
]),
|
|
@@ -1890,7 +1964,7 @@ var Lt = {
|
|
|
1890
1964
|
"modelValue",
|
|
1891
1965
|
"size",
|
|
1892
1966
|
"title"
|
|
1893
|
-
])) :
|
|
1967
|
+
])) : oe((E(), f("div", Ht, [g(a, {
|
|
1894
1968
|
"close-on-click-modal": !1,
|
|
1895
1969
|
modelValue: e.layer.show,
|
|
1896
1970
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1898,19 +1972,19 @@ var Lt = {
|
|
|
1898
1972
|
width: e.layer.width || 500,
|
|
1899
1973
|
center: ""
|
|
1900
1974
|
}, m({
|
|
1901
|
-
default:
|
|
1975
|
+
default: F(() => [k(t.$slots, "default")]),
|
|
1902
1976
|
_: 2
|
|
1903
1977
|
}, [e.layer.showButton ? {
|
|
1904
1978
|
name: "footer",
|
|
1905
|
-
fn:
|
|
1906
|
-
default:
|
|
1979
|
+
fn: F(() => [k(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1980
|
+
default: F(() => [h(M(t.$t("qu-xiao")), 1)]),
|
|
1907
1981
|
_: 1
|
|
1908
1982
|
}), g(r, {
|
|
1909
1983
|
type: "primary",
|
|
1910
1984
|
loading: e.loading,
|
|
1911
|
-
onClick:
|
|
1985
|
+
onClick: N(o)
|
|
1912
1986
|
}, {
|
|
1913
|
-
default:
|
|
1987
|
+
default: F(() => [h(M(t.$t("ti-jiao")), 1)]),
|
|
1914
1988
|
_: 1
|
|
1915
1989
|
}, 8, ["loading", "onClick"])])]),
|
|
1916
1990
|
key: "0"
|
|
@@ -1918,14 +1992,14 @@ var Lt = {
|
|
|
1918
1992
|
"modelValue",
|
|
1919
1993
|
"title",
|
|
1920
1994
|
"width"
|
|
1921
|
-
])])), [[
|
|
1995
|
+
])])), [[N(Rt), e.layer.show]]);
|
|
1922
1996
|
};
|
|
1923
1997
|
}
|
|
1924
1998
|
};
|
|
1925
1999
|
//#endregion
|
|
1926
2000
|
//#region src/utils/tools/validate.js
|
|
1927
|
-
function
|
|
1928
|
-
let n =
|
|
2001
|
+
function Wt(e, t = {}) {
|
|
2002
|
+
let n = Z(), r = {
|
|
1929
2003
|
inForm: !0,
|
|
1930
2004
|
required: !0,
|
|
1931
2005
|
...t
|
|
@@ -1944,7 +2018,7 @@ function Bt(e, t = {}) {
|
|
|
1944
2018
|
}
|
|
1945
2019
|
//#endregion
|
|
1946
2020
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1947
|
-
var
|
|
2021
|
+
var Gt = class {
|
|
1948
2022
|
constructor(e = {}) {
|
|
1949
2023
|
this.config = {
|
|
1950
2024
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2091,42 +2165,42 @@ var Vt = class {
|
|
|
2091
2165
|
};
|
|
2092
2166
|
//#endregion
|
|
2093
2167
|
//#region src/utils/tools/format.js
|
|
2094
|
-
function
|
|
2168
|
+
function Kt(e, t = 2, n = ".", r = ",") {
|
|
2095
2169
|
(e == null || e === "") && (e = 0);
|
|
2096
2170
|
let i = Number(e);
|
|
2097
2171
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2098
2172
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2099
2173
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
2100
2174
|
}
|
|
2101
|
-
function
|
|
2102
|
-
return
|
|
2175
|
+
function qt(e, t = 2) {
|
|
2176
|
+
return Kt(e, t);
|
|
2103
2177
|
}
|
|
2104
|
-
function
|
|
2178
|
+
function Jt(e, t = 2) {
|
|
2105
2179
|
(e == null || e === "") && (e = 0);
|
|
2106
2180
|
let n = Number(e);
|
|
2107
|
-
return e = isNaN(n) ? 0 : n,
|
|
2181
|
+
return e = isNaN(n) ? 0 : n, Kt(e * 100, t) + "%";
|
|
2108
2182
|
}
|
|
2109
2183
|
//#endregion
|
|
2110
2184
|
//#region src/utils/hook/common.js
|
|
2111
|
-
function
|
|
2185
|
+
function Yt(e, t = {}) {
|
|
2112
2186
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2113
2187
|
manual: !1,
|
|
2114
2188
|
log: !1,
|
|
2115
2189
|
params: null,
|
|
2116
2190
|
format: null
|
|
2117
|
-
}, t), s =
|
|
2191
|
+
}, t), s = O([]), c = O(!1), l = (t) => {
|
|
2118
2192
|
let n = t || i;
|
|
2119
2193
|
c.value = !0, e(n).then((e) => {
|
|
2120
2194
|
let { code: t, data: c, msg: l } = e;
|
|
2121
2195
|
if (a) {
|
|
2122
2196
|
let { records: t, rows: n } = c || {};
|
|
2123
|
-
s.value =
|
|
2197
|
+
s.value = Qt(t || n ? t || n : c, o), a(e);
|
|
2124
2198
|
}
|
|
2125
2199
|
if (c) {
|
|
2126
2200
|
if (c.records != null || c.rows != null) {
|
|
2127
2201
|
let { records: e, rows: t, total: r = 0, totalRows: a = 0 } = c || {};
|
|
2128
|
-
n && n.total != null && (i.total = parseInt(r || a)), s.value =
|
|
2129
|
-
} else s.value =
|
|
2202
|
+
n && n.total != null && (i.total = parseInt(r || a)), s.value = Qt(e || t || [], o);
|
|
2203
|
+
} else s.value = Qt(c, o);
|
|
2130
2204
|
r && console.log("useRequest-res", s.value);
|
|
2131
2205
|
}
|
|
2132
2206
|
}).catch((e) => {
|
|
@@ -2141,9 +2215,9 @@ function Gt(e, t = {}) {
|
|
|
2141
2215
|
l
|
|
2142
2216
|
];
|
|
2143
2217
|
}
|
|
2144
|
-
function
|
|
2145
|
-
let t =
|
|
2146
|
-
return
|
|
2218
|
+
function Xt(e) {
|
|
2219
|
+
let t = O(e), n = O(""), r = O("");
|
|
2220
|
+
return ae(t, (e) => {
|
|
2147
2221
|
let t = e || ["", ""];
|
|
2148
2222
|
n.value = t[0], r.value = t[1];
|
|
2149
2223
|
}), [
|
|
@@ -2152,10 +2226,10 @@ function Kt(e) {
|
|
|
2152
2226
|
r
|
|
2153
2227
|
];
|
|
2154
2228
|
}
|
|
2155
|
-
function
|
|
2229
|
+
function Zt(e) {
|
|
2156
2230
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2157
2231
|
}
|
|
2158
|
-
function
|
|
2232
|
+
function Qt(e, t) {
|
|
2159
2233
|
if (!t) return e;
|
|
2160
2234
|
if (e instanceof Array) return e.map((e) => {
|
|
2161
2235
|
let n = {};
|
|
@@ -2166,47 +2240,47 @@ function Jt(e, t) {
|
|
|
2166
2240
|
}
|
|
2167
2241
|
//#endregion
|
|
2168
2242
|
//#region src/utils/hook/i18n.js
|
|
2169
|
-
function
|
|
2170
|
-
let { locale: n } =
|
|
2171
|
-
return
|
|
2243
|
+
function $t(e, t = []) {
|
|
2244
|
+
let { locale: n } = z(), r = O(e());
|
|
2245
|
+
return ae([n, ...t], () => {
|
|
2172
2246
|
r.value = e();
|
|
2173
2247
|
}, { immediate: !0 }), r;
|
|
2174
2248
|
}
|
|
2175
|
-
function
|
|
2249
|
+
function en(e, t = "zh_cn", n = "en_us") {
|
|
2176
2250
|
return e && (e[{
|
|
2177
2251
|
en_us: n,
|
|
2178
2252
|
zh_cn: t
|
|
2179
|
-
}[
|
|
2253
|
+
}[ke().global.locale.value]] || e[t]) || "-";
|
|
2180
2254
|
}
|
|
2181
2255
|
//#endregion
|
|
2182
2256
|
//#region src/utils/hook/storeHook.js
|
|
2183
|
-
function
|
|
2184
|
-
let n = H;
|
|
2185
|
-
return typeof e == "string" && e.length > 0 && (n = pe(e).mapState), en(t, n);
|
|
2186
|
-
}
|
|
2187
|
-
function Qt(e, t) {
|
|
2257
|
+
function tn(e, t) {
|
|
2188
2258
|
let n = V;
|
|
2189
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2259
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapState), an(t, n);
|
|
2260
|
+
}
|
|
2261
|
+
function nn(e, t) {
|
|
2262
|
+
let n = B;
|
|
2263
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapGetters), an(t, n);
|
|
2190
2264
|
}
|
|
2191
|
-
function
|
|
2192
|
-
let n =
|
|
2193
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2265
|
+
function rn(e, t) {
|
|
2266
|
+
let n = he;
|
|
2267
|
+
return typeof e == "string" && e.length > 0 && (n = me(e).mapActions), on(t, n);
|
|
2194
2268
|
}
|
|
2195
|
-
function
|
|
2196
|
-
let n =
|
|
2269
|
+
function an(e, t) {
|
|
2270
|
+
let n = ge(), r = t(e), i = {};
|
|
2197
2271
|
return Object.keys(r).forEach((e) => {
|
|
2198
2272
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2199
2273
|
}), i;
|
|
2200
2274
|
}
|
|
2201
|
-
function
|
|
2202
|
-
let n =
|
|
2275
|
+
function on(e, t) {
|
|
2276
|
+
let n = ge(), r = t(e), i = {};
|
|
2203
2277
|
return Object.keys(r).forEach((e) => {
|
|
2204
2278
|
i[e] = r[e].bind({ $store: n });
|
|
2205
2279
|
}), i;
|
|
2206
2280
|
}
|
|
2207
|
-
function
|
|
2208
|
-
let [n, r, i] = t, { locale: a } =
|
|
2209
|
-
return l(() =>
|
|
2281
|
+
function sn(e, t = []) {
|
|
2282
|
+
let [n, r, i] = t, { locale: a } = z();
|
|
2283
|
+
return l(() => re(e).map((e) => {
|
|
2210
2284
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2211
2285
|
return {
|
|
2212
2286
|
...e,
|
|
@@ -2217,42 +2291,42 @@ function nn(e, t = []) {
|
|
|
2217
2291
|
}
|
|
2218
2292
|
//#endregion
|
|
2219
2293
|
//#region src/components/VxeTable/index.jsx
|
|
2220
|
-
function
|
|
2294
|
+
function cn(e) {
|
|
2221
2295
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2222
2296
|
}
|
|
2223
|
-
function
|
|
2224
|
-
|
|
2225
|
-
return
|
|
2226
|
-
} }),
|
|
2227
|
-
return
|
|
2228
|
-
} }),
|
|
2229
|
-
return
|
|
2297
|
+
function ln() {
|
|
2298
|
+
H.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2299
|
+
return Kt(e, t);
|
|
2300
|
+
} }), H.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2301
|
+
return qt(e, t);
|
|
2302
|
+
} }), H.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2303
|
+
return Jt(e, t);
|
|
2230
2304
|
} });
|
|
2231
2305
|
}
|
|
2232
|
-
function
|
|
2233
|
-
|
|
2306
|
+
function un() {
|
|
2307
|
+
H.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2234
2308
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2235
2309
|
let n = t.row[t.column.field], r = e.enum.getItem(n);
|
|
2236
2310
|
if (!r) return n || "-";
|
|
2237
|
-
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } =
|
|
2238
|
-
return e.type == "tag" ? s ? g(
|
|
2311
|
+
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } = z(), l = c.value == "zh_cn" ? i : a;
|
|
2312
|
+
return e.type == "tag" ? s ? g(mt, { fontColor: s }, { default: () => [
|
|
2239
2313
|
h(" "),
|
|
2240
2314
|
l,
|
|
2241
2315
|
h(" ")
|
|
2242
|
-
] }) : g(
|
|
2316
|
+
] }) : g(mt, { type: o }, { default: () => [
|
|
2243
2317
|
h(" "),
|
|
2244
2318
|
l,
|
|
2245
2319
|
h(" ")
|
|
2246
|
-
] }) : e.type == "text" ? g(
|
|
2320
|
+
] }) : e.type == "text" ? g(A("el-text"), { type: o }, { default: () => [
|
|
2247
2321
|
h(" "),
|
|
2248
2322
|
l,
|
|
2249
2323
|
h(" ")
|
|
2250
|
-
] }) : g(
|
|
2324
|
+
] }) : g(A("el-text"), null, { default: () => [
|
|
2251
2325
|
h(" "),
|
|
2252
2326
|
l,
|
|
2253
2327
|
h(" ")
|
|
2254
2328
|
] });
|
|
2255
|
-
} }),
|
|
2329
|
+
} }), H.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2256
2330
|
return g(n, x({
|
|
2257
2331
|
modelValue: t.row[t.column.field],
|
|
2258
2332
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2260,14 +2334,14 @@ function on() {
|
|
|
2260
2334
|
"step-strictly": !0,
|
|
2261
2335
|
"value-on-clear": 0
|
|
2262
2336
|
}), null);
|
|
2263
|
-
} }),
|
|
2264
|
-
let { locale: n } =
|
|
2337
|
+
} }), H.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2338
|
+
let { locale: n } = z(), r = n.value == "zh_cn";
|
|
2265
2339
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2266
|
-
} }),
|
|
2267
|
-
let { locale: n } =
|
|
2340
|
+
} }), H.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2341
|
+
let { locale: n } = z(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2268
2342
|
return t.row[r] || t.row[t.column.field];
|
|
2269
|
-
} }),
|
|
2270
|
-
let n = t.column.field, i =
|
|
2343
|
+
} }), H.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2344
|
+
let n = t.column.field, i = _e(), { to: a, openType: o = "system" } = e, s = t.row[n];
|
|
2271
2345
|
function c(e, t) {
|
|
2272
2346
|
o == "blank" ? window.open(e) : i.push({
|
|
2273
2347
|
path: e,
|
|
@@ -2279,15 +2353,15 @@ function on() {
|
|
|
2279
2353
|
underline: "never",
|
|
2280
2354
|
type: "primary",
|
|
2281
2355
|
onclick: () => c(o == "system" ? a : e, e)
|
|
2282
|
-
},
|
|
2356
|
+
}, cn(e) ? e : { default: () => [e] })])) : g(r, {
|
|
2283
2357
|
underline: "never",
|
|
2284
2358
|
type: "primary",
|
|
2285
2359
|
onclick: () => c(o == "system" ? a : s, s)
|
|
2286
|
-
},
|
|
2360
|
+
}, cn(s) ? s : { default: () => [s] });
|
|
2287
2361
|
} });
|
|
2288
2362
|
}
|
|
2289
|
-
function
|
|
2290
|
-
|
|
2363
|
+
function dn() {
|
|
2364
|
+
ln(), un();
|
|
2291
2365
|
}
|
|
2292
2366
|
//#endregion
|
|
2293
|
-
export {
|
|
2367
|
+
export { ut as CmpDictionary, pt as CmpIcon, mt as CmpTag, gt as ConfrimButton, Lt as DownExcelTemp, yt as ImportButton, we as LayOutForm, Ut as Layer, Ft as ListPage, Gt as OnePortalCasSDK, Tt as SearchBar, tt as StatusMap, Qe as _toRaw, Zt as _typeOf, nt as arrToStatusMap, $e as arrayToTree, qe as base64ToBlob, Je as base64ToFile, Ye as base64ToFormData, at as checkFileSize, Wt as creatValidator, st as createImportFields, ot as createListPageId, J as en_us, Me as exportExcel, We as exportExcelMuilti, qt as formatMoney, Kt as formatNumber, Jt as formatPercent, Ke as getColumnLetterByIndex, ke as getI18n, Z as getI18nT, kt as getListPageConfig, en as getLocaleValue, Xe as getTableShowColumn, ct as getValueBykey, Ae as importExcel, He as importExcelMuilti, Y as messages, ln as registerVxeFormatters, dn as registerVxePlugins, un as registerVxeRenderers, At as resetListPageConfig, Ot as setListPageConfig, Oe as setupI18n, Ze as sleep, et as stringToArray, rt as stripHtmlTags, it as unicode2Str, rn as useActions, Xt as useDatePicker, nn as useGetters, $t as useI18nReState, Yt as useRequest, tn as useState, sn as useVxeEditRenderStatus, q as zh_cn };
|