joy-admin-components 0.2.126 → 0.2.129
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 ee, onUpdated as te, openBlock as E, reactive 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 ne, ref as D, renderList as re, renderSlot as O, resolveComponent as k, resolveDynamicComponent as A, toDisplayString as j, toValue as ie, unref as M, useAttrs as N, useModel as ae, watch as oe, withCtx as P, withDirectives as se, withKeys as ce, withModifiers as le } from "vue";
|
|
3
|
+
import { saveAs as F } from "file-saver";
|
|
4
|
+
import I from "exceljs";
|
|
5
|
+
import L from "dayjs";
|
|
6
|
+
import { createI18n as ue, useI18n as R } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as de, debounce as fe, isArray as pe, without as me } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as he, mapActions as ge, mapGetters as z, mapState as B, useStore as _e } from "vuex";
|
|
9
|
+
import { VxeUI as V } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as ve } 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 ye = Object.create, be = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, H = Object.getOwnPropertyNames, U = Object.getPrototypeOf, Se = Object.prototype.hasOwnProperty, Ce = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), W = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = H(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !Se.call(e, s) && s !== n && be(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = xe(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, we = (e, t, n) => (n = e == null ? {} : ye(U(e)), W(t || !e || !e.__esModule ? be(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), Te = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
|
-
let s =
|
|
24
|
+
let s = D(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 ve = Object.create, ye = Object.defineProperty, be = Object.getOwnPropertyDe
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), G = /* @__PURE__ */ Ce(((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 ve = Object.create, ye = Object.defineProperty, be = Object.getOwnPropertyDe
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), Ee = /* @__PURE__ */ Ce(((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 ve = Object.create, ye = Object.defineProperty, be = Object.getOwnPropertyDe
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), De = /* @__PURE__ */ we(G()), Oe = /* @__PURE__ */ we(Ee()), K = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -225,7 +225,7 @@ var ve = Object.create, ye = Object.defineProperty, be = Object.getOwnPropertyDe
|
|
|
225
225
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
226
226
|
validate: { invalidInput: "请输入正确内容" },
|
|
227
227
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
228
|
-
},
|
|
228
|
+
}, q = {
|
|
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 ve = Object.create, ye = Object.defineProperty, be = 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
|
+
}, J = {
|
|
258
|
+
zh_cn: K,
|
|
259
|
+
en_us: q
|
|
260
|
+
}, Y = null;
|
|
261
|
+
function ke(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", K) : t.setLocaleMessage("zh_cn", K), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", q) : t.setLocaleMessage("en_us", q), Y = e, e;
|
|
265
265
|
}
|
|
266
|
-
return
|
|
266
|
+
return Y ||= ue({
|
|
267
267
|
legacy: !1,
|
|
268
268
|
locale: "zh_cn",
|
|
269
269
|
fallbackLocale: "zh_cn",
|
|
270
|
-
messages:
|
|
271
|
-
}),
|
|
270
|
+
messages: J
|
|
271
|
+
}), Y;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
return
|
|
273
|
+
function Ae() {
|
|
274
|
+
return Y || ke();
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return
|
|
276
|
+
function X() {
|
|
277
|
+
return Ae().global.t;
|
|
278
278
|
}
|
|
279
|
-
|
|
280
|
-
async function
|
|
279
|
+
L.extend(De.default), L.extend(Oe.default);
|
|
280
|
+
async function je(e, t) {
|
|
281
281
|
let { fields: n, range: r = 1 } = t;
|
|
282
282
|
if (!n) {
|
|
283
|
-
let e =
|
|
283
|
+
let e = X();
|
|
284
284
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
285
285
|
}
|
|
286
|
-
let i = new
|
|
286
|
+
let i = new I.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 Ae(e, t) {
|
|
|
299
299
|
}), a[e._name] = i;
|
|
300
300
|
}), i = null, a;
|
|
301
301
|
}
|
|
302
|
-
var
|
|
303
|
-
async function
|
|
302
|
+
var Me = { columnWidth: 30 };
|
|
303
|
+
async function Ne(e, t, n = [], r = {}) {
|
|
304
304
|
if (!e || !t) return;
|
|
305
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
305
|
+
let { columnStyle: i } = r, { columnWidth: a } = Me;
|
|
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 } = Pe();
|
|
310
|
+
s.columns = t, s.addRows(n), i && await Fe(o, s, i);
|
|
311
311
|
try {
|
|
312
312
|
let t = await o.xlsx.writeBuffer();
|
|
313
|
-
|
|
313
|
+
F(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 Pe() {
|
|
319
|
+
let e = new I.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 Fe(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 Ie(e, t, i, r);
|
|
332
332
|
break;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
336
|
+
async function Ie(e, t, n, r) {
|
|
337
337
|
let i = t.getColumn(n), a = i.values;
|
|
338
338
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
339
339
|
t > 1 && (e.height = 40);
|
|
@@ -341,7 +341,7 @@ async function Fe(e, t, n, r) {
|
|
|
341
341
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
342
342
|
if (n < 2) continue;
|
|
343
343
|
let r = a[n];
|
|
344
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
344
|
+
r && (t.getCell(i.letter + n).value = "", await Le(e, t, r, {
|
|
345
345
|
width: 100,
|
|
346
346
|
height: 50,
|
|
347
347
|
col: i._number - 1,
|
|
@@ -349,8 +349,8 @@ async function Fe(e, t, n, r) {
|
|
|
349
349
|
}));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
async function
|
|
353
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
352
|
+
async function Le(e, t, n, r) {
|
|
353
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Re(n, .3);
|
|
354
354
|
if (c) {
|
|
355
355
|
let n = e.addImage({
|
|
356
356
|
base64: l,
|
|
@@ -368,7 +368,7 @@ async function Ie(e, t, n, r) {
|
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Re(e, t = 1) {
|
|
372
372
|
let n = new Image();
|
|
373
373
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
374
374
|
n.onload = () => {
|
|
@@ -382,8 +382,8 @@ function Le(e, t = 1) {
|
|
|
382
382
|
};
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
|
-
var
|
|
386
|
-
function
|
|
385
|
+
var Z = "---";
|
|
386
|
+
function Q(e, t) {
|
|
387
387
|
let n = `${e}${t}`.replace(/[\\/:*?\[\]]/g, "_");
|
|
388
388
|
return n.length > 31 && (n = n.substring(0, 31)), n;
|
|
389
389
|
}
|
|
@@ -392,15 +392,15 @@ function ze(e) {
|
|
|
392
392
|
}
|
|
393
393
|
var Be = "|";
|
|
394
394
|
function Ve(e) {
|
|
395
|
-
return `MID(${e},FIND("${
|
|
395
|
+
return `MID(${e},FIND("${Z}",${e})+3,999)`;
|
|
396
396
|
}
|
|
397
397
|
async function He(e, t) {
|
|
398
398
|
let { fields: n, range: r = 1 } = t;
|
|
399
399
|
if (!n) {
|
|
400
|
-
let e =
|
|
400
|
+
let e = X();
|
|
401
401
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
402
402
|
}
|
|
403
|
-
let i = new
|
|
403
|
+
let i = new I.Workbook();
|
|
404
404
|
await i.xlsx.load(e);
|
|
405
405
|
let a = {};
|
|
406
406
|
return i.eachSheet(function(e, t) {
|
|
@@ -418,8 +418,8 @@ async function He(e, t) {
|
|
|
418
418
|
if (i > r) {
|
|
419
419
|
let r = { _excelRowNumber: i }, a = !0;
|
|
420
420
|
Object.keys(o).forEach((t) => {
|
|
421
|
-
let [c, l] = o[t].split(
|
|
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 ?
|
|
421
|
+
let [c, l] = o[t].split(Z), 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 ? L(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Z)[1]), typeof d == "string" && (d = d.trim()), r[t] = d, d && (a = !1);
|
|
423
423
|
}), a || t.push(r);
|
|
424
424
|
}
|
|
425
425
|
}), a[e._name] = t;
|
|
@@ -436,7 +436,7 @@ async function We(e, t) {
|
|
|
436
436
|
if (!e || t.length == 0) return;
|
|
437
437
|
let n = Ge(t);
|
|
438
438
|
for (let e of n.worksheets) {
|
|
439
|
-
let { columnWidth: r } =
|
|
439
|
+
let { columnWidth: r } = Me, i = t[e.name];
|
|
440
440
|
if (!i) continue;
|
|
441
441
|
let { tableHeader: a, tableData: o } = i;
|
|
442
442
|
a.forEach((e) => {
|
|
@@ -450,18 +450,18 @@ async function We(e, t) {
|
|
|
450
450
|
};
|
|
451
451
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
452
452
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
453
|
-
if (d.numFmt = Ue[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
454
|
-
let t = n.addWorksheet(
|
|
455
|
-
|
|
456
|
-
if (
|
|
457
|
-
let
|
|
458
|
-
e.getCell(`${d.letter}${
|
|
453
|
+
if (d.numFmt = Ue[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s && s.length > 0) {
|
|
454
|
+
let t = Q(`_${e.id}_`, a), r = n.addWorksheet(t);
|
|
455
|
+
r.state = "hidden", u ||= (e) => `${e.label}${Z}${e.value}`, r.getColumn(1).values = s.map(u), Array(100).fill("").forEach((n, r) => {
|
|
456
|
+
if (r > 0) {
|
|
457
|
+
let n = X();
|
|
458
|
+
e.getCell(`${d.letter}${r}`).dataValidation = {
|
|
459
459
|
type: "list",
|
|
460
|
-
formulae: [
|
|
460
|
+
formulae: [`'${t}'!$A$1:$A$${s.length}`],
|
|
461
461
|
showErrorMessage: !0,
|
|
462
|
-
error:
|
|
462
|
+
error: n("excel.invalidInput"),
|
|
463
463
|
errorStyle: "stop",
|
|
464
|
-
errorMessage:
|
|
464
|
+
errorMessage: n("excel.invalidOption")
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
467
|
});
|
|
@@ -471,20 +471,20 @@ async function We(e, t) {
|
|
|
471
471
|
if (!i) return;
|
|
472
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
473
|
if (u.some((e) => !e)) return;
|
|
474
|
-
let d = e.getColumn(r), f =
|
|
474
|
+
let d = e.getColumn(r), f = Q(`_cas_${e.id}_`, r), p = n.addWorksheet(f);
|
|
475
475
|
p.state = "hidden";
|
|
476
|
-
let m = t.optionFormater || ((e) => `${e.label}${
|
|
476
|
+
let m = t.optionFormater || ((e) => `${e.label}${Z}${e.value}`), h = 0;
|
|
477
477
|
if (c) {
|
|
478
478
|
let t = Object.keys(s);
|
|
479
479
|
if (t.length === 0) return;
|
|
480
|
-
let i =
|
|
480
|
+
let i = Q(`_mrf_${e.id}_`, r), a = n.addWorksheet(i);
|
|
481
481
|
if (a.state = "hidden", a.getColumn(1).values = t, t.forEach((e, t) => {
|
|
482
482
|
let n = s[e] || [];
|
|
483
483
|
h = Math.max(h, n.length), n.forEach((e, n) => {
|
|
484
484
|
p.getCell(n + 1, t + 1).value = m(e);
|
|
485
485
|
});
|
|
486
486
|
}), h === 0) return;
|
|
487
|
-
let o =
|
|
487
|
+
let o = X();
|
|
488
488
|
Array(100).fill("").forEach((n, r) => {
|
|
489
489
|
if (r > 0) {
|
|
490
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)`;
|
|
@@ -501,11 +501,11 @@ async function We(e, t) {
|
|
|
501
501
|
} else {
|
|
502
502
|
let t = u[0], r = ze(t);
|
|
503
503
|
if (!r || r.length === 0) return;
|
|
504
|
-
let i = e.getColumn(l[0]), a = l[0];
|
|
505
|
-
if (!t.option && t.cascadeOption && (a =
|
|
504
|
+
let i = e.getColumn(l[0]), a = Q(`_${e.id}_`, l[0]);
|
|
505
|
+
if (!t.option && t.cascadeOption && (a = Q(`_ref_${e.id}_`, l[0]), !n.getWorksheet(a))) {
|
|
506
506
|
let e = n.addWorksheet(a);
|
|
507
507
|
e.state = "hidden";
|
|
508
|
-
let i = t.optionFormater || ((e) => `${e.label}${
|
|
508
|
+
let i = t.optionFormater || ((e) => `${e.label}${Z}${e.value}`);
|
|
509
509
|
e.getColumn(1).values = r.map(i);
|
|
510
510
|
}
|
|
511
511
|
if (r.forEach((e, t) => {
|
|
@@ -514,7 +514,7 @@ async function We(e, t) {
|
|
|
514
514
|
p.getCell(n + 1, t + 1).value = m(e);
|
|
515
515
|
});
|
|
516
516
|
}), h === 0) return;
|
|
517
|
-
let o = r.length, c =
|
|
517
|
+
let o = r.length, c = X();
|
|
518
518
|
Array(100).fill("").forEach((t, n) => {
|
|
519
519
|
if (n > 0) {
|
|
520
520
|
let t = `OFFSET('${f}'!$A$1,0,MATCH(${i.letter}${n},'${a}'!$A$1:$A$${o},0)-1,${h},1)`;
|
|
@@ -536,13 +536,13 @@ async function We(e, t) {
|
|
|
536
536
|
}
|
|
537
537
|
try {
|
|
538
538
|
let t = await n.xlsx.writeBuffer();
|
|
539
|
-
|
|
539
|
+
F(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
540
540
|
} catch (e) {
|
|
541
541
|
console.log(e);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
function Ge(e) {
|
|
545
|
-
let t =
|
|
545
|
+
let t = X(), n = new I.Workbook();
|
|
546
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) => {
|
|
547
547
|
let i = r, a = !1;
|
|
548
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);
|
|
@@ -568,7 +568,7 @@ function Ye(e, t) {
|
|
|
568
568
|
}
|
|
569
569
|
function Xe(e) {
|
|
570
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);
|
|
571
|
-
return i.push("type=checkbox", "action", "actions"),
|
|
571
|
+
return i.push("type=checkbox", "action", "actions"), me(r, ...i);
|
|
572
572
|
}
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/utils/tools/tools.js
|
|
@@ -615,7 +615,7 @@ var tt = class {
|
|
|
615
615
|
}
|
|
616
616
|
getName(e) {
|
|
617
617
|
if (!this.has(e)) return "-";
|
|
618
|
-
let t =
|
|
618
|
+
let t = Ae().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
619
619
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
620
620
|
}
|
|
621
621
|
getTag(e) {
|
|
@@ -644,7 +644,7 @@ var tt = class {
|
|
|
644
644
|
function nt(e, t = [], n = "i18nName") {
|
|
645
645
|
if (e.length == 0) return new tt([]);
|
|
646
646
|
if (t.length < 2) {
|
|
647
|
-
let e =
|
|
647
|
+
let e = X();
|
|
648
648
|
throw Error(e("tools.keysLengthError"));
|
|
649
649
|
}
|
|
650
650
|
return new tt(e.map((e) => {
|
|
@@ -726,7 +726,7 @@ var $ = (e, t) => {
|
|
|
726
726
|
"changeAll"
|
|
727
727
|
], ["update:modelValue"]),
|
|
728
728
|
setup(e, { emit: t }) {
|
|
729
|
-
let n = e, r =
|
|
729
|
+
let n = e, r = N(), { t: i, locale: a } = R(), o = ae(e, "modelValue"), s = l(() => r["value-key"] != null), _ = D(""), v = l(() => {
|
|
730
730
|
if (r.remote !== void 0) return n.data;
|
|
731
731
|
let e = et(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
732
732
|
if (e.length == 0) return o;
|
|
@@ -742,7 +742,7 @@ var $ = (e, t) => {
|
|
|
742
742
|
set(e) {
|
|
743
743
|
return e;
|
|
744
744
|
}
|
|
745
|
-
}), b = t, C =
|
|
745
|
+
}), b = t, C = D([]);
|
|
746
746
|
n.api && (async () => {
|
|
747
747
|
let { data: e } = await n.api();
|
|
748
748
|
C.value = [...e], b("success", C);
|
|
@@ -752,7 +752,7 @@ var $ = (e, t) => {
|
|
|
752
752
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
753
753
|
});
|
|
754
754
|
}
|
|
755
|
-
let T =
|
|
755
|
+
let T = D(null);
|
|
756
756
|
function ee() {
|
|
757
757
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
758
758
|
b("change", e), S(() => {
|
|
@@ -762,82 +762,82 @@ var $ = (e, t) => {
|
|
|
762
762
|
function te(e) {
|
|
763
763
|
T.value = e;
|
|
764
764
|
}
|
|
765
|
-
let
|
|
766
|
-
if (
|
|
765
|
+
let ne = n.labelValue.label.split("-"), A = (e) => {
|
|
766
|
+
if (ne.length == 1) {
|
|
767
767
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
768
768
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
769
769
|
return t ||= e[n.labelValue.label], t + "";
|
|
770
770
|
} else {
|
|
771
771
|
let t = [];
|
|
772
|
-
return
|
|
772
|
+
return ne.forEach((n) => {
|
|
773
773
|
t.push(e[n]);
|
|
774
774
|
}), t.join("-");
|
|
775
775
|
}
|
|
776
776
|
};
|
|
777
|
-
function
|
|
777
|
+
function ie(e) {
|
|
778
778
|
let t = n.data ? n.data : C.value;
|
|
779
779
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
780
780
|
b("change", o.value), b("changeAll", o.value, t);
|
|
781
781
|
});
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function se(e) {
|
|
784
784
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
785
785
|
n.optionClick && n.optionClick(e);
|
|
786
786
|
});
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function ce(e) {
|
|
789
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);
|
|
790
790
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function F(e) {
|
|
793
793
|
return e.map((e) => ({
|
|
794
794
|
...e,
|
|
795
|
-
label:
|
|
795
|
+
label: A(e),
|
|
796
796
|
value: s.value ? e : e[n.labelValue.value]
|
|
797
797
|
}));
|
|
798
798
|
}
|
|
799
|
-
let
|
|
800
|
-
|
|
801
|
-
let t =
|
|
802
|
-
if (t.length !==
|
|
799
|
+
let I = D([]);
|
|
800
|
+
I.value = F(n.data ? n.data : C.value), oe(() => n.data ? n.data : C.value, (e) => {
|
|
801
|
+
let t = F(e);
|
|
802
|
+
if (t.length !== I.value.length) I.value = t;
|
|
803
803
|
else {
|
|
804
804
|
let e = !1;
|
|
805
|
-
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 !== I.value[n]?.value) {
|
|
806
806
|
e = !0;
|
|
807
807
|
break;
|
|
808
808
|
}
|
|
809
|
-
e && (
|
|
809
|
+
e && (I.value = t);
|
|
810
810
|
}
|
|
811
811
|
}, { deep: !0 });
|
|
812
|
-
let
|
|
812
|
+
let L = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? I.value.map((e) => ({
|
|
813
813
|
...e,
|
|
814
|
-
disabled:
|
|
815
|
-
})) :
|
|
814
|
+
disabled: ce(e)
|
|
815
|
+
})) : I.value);
|
|
816
816
|
return (t, n) => {
|
|
817
|
-
let i =
|
|
818
|
-
return
|
|
817
|
+
let i = k("el-checkbox"), a = k("el-select-v2"), l = k("el-option"), b = k("el-select");
|
|
818
|
+
return M(r).v2 == null ? (E(), u(b, x({
|
|
819
819
|
key: 1,
|
|
820
820
|
modelValue: o.value,
|
|
821
821
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
822
822
|
filterable: "",
|
|
823
823
|
"collapse-tags": "",
|
|
824
824
|
"collapse-tags-tooltip": "",
|
|
825
|
-
"filter-method":
|
|
825
|
+
"filter-method": M(r).remote == null ? (e) => _.value = e : void 0,
|
|
826
826
|
clearable: ""
|
|
827
|
-
},
|
|
828
|
-
default:
|
|
827
|
+
}, M(r), { onClear: ee }), {
|
|
828
|
+
default: P(() => [M(r).multiple != null && e.showCheckAll && e.maxLimit == null ? O(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
829
829
|
class: "mgl20",
|
|
830
830
|
modelValue: y.value,
|
|
831
831
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
832
|
-
onChange:
|
|
832
|
+
onChange: ie
|
|
833
833
|
}, {
|
|
834
|
-
default:
|
|
834
|
+
default: P(() => [h(j(t.$t("quan-xuan")), 1)]),
|
|
835
835
|
_: 1
|
|
836
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (E(!0), f(c, null,
|
|
836
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (E(!0), f(c, null, re(v.value, (t, n) => (E(), u(l, {
|
|
837
837
|
key: n,
|
|
838
|
-
label:
|
|
839
|
-
disabled:
|
|
840
|
-
onClick:
|
|
838
|
+
label: A(t),
|
|
839
|
+
disabled: M(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? ce(t) : !1,
|
|
840
|
+
onClick: le((e) => se(t), ["stop"]),
|
|
841
841
|
value: s.value ? t : t[e.labelValue.value]
|
|
842
842
|
}, null, 8, [
|
|
843
843
|
"label",
|
|
@@ -848,27 +848,27 @@ var $ = (e, t) => {
|
|
|
848
848
|
_: 3
|
|
849
849
|
}, 16, ["modelValue", "filter-method"])) : (E(), u(a, x({
|
|
850
850
|
key: 0,
|
|
851
|
-
options:
|
|
851
|
+
options: L.value,
|
|
852
852
|
modelValue: o.value,
|
|
853
853
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
854
|
-
},
|
|
854
|
+
}, M(r), {
|
|
855
855
|
filterable: "",
|
|
856
856
|
"collapse-tags": "",
|
|
857
857
|
"collapse-tags-tooltip": "",
|
|
858
858
|
clearable: "",
|
|
859
859
|
onChange: w
|
|
860
860
|
}), m({
|
|
861
|
-
default:
|
|
861
|
+
default: P(({ item: e }) => [p("div", { onClick: (t) => te(e) }, j(e.label), 9, lt)]),
|
|
862
862
|
_: 2
|
|
863
|
-
}, [
|
|
863
|
+
}, [M(r).multiple == null ? void 0 : {
|
|
864
864
|
name: "header",
|
|
865
|
-
fn:
|
|
865
|
+
fn: P(() => [O(t.$slots, "header", {}, () => [g(i, {
|
|
866
866
|
class: "mgl20",
|
|
867
867
|
modelValue: y.value,
|
|
868
868
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
869
|
-
onChange:
|
|
869
|
+
onChange: ie
|
|
870
870
|
}, {
|
|
871
|
-
default:
|
|
871
|
+
default: P(() => [h(j(t.$t("quan-xuan")), 1)]),
|
|
872
872
|
_: 1
|
|
873
873
|
}, 8, ["modelValue"])], !0)]),
|
|
874
874
|
key: "0"
|
|
@@ -880,9 +880,9 @@ var $ = (e, t) => {
|
|
|
880
880
|
required: !0
|
|
881
881
|
} } });
|
|
882
882
|
function ft(e, t, n, r, i, a) {
|
|
883
|
-
let o =
|
|
883
|
+
let o = k("el-icon");
|
|
884
884
|
return E(), u(o, { class: "cmp-icon" }, {
|
|
885
|
-
default:
|
|
885
|
+
default: P(() => [(E(), u(A(e.name)))]),
|
|
886
886
|
_: 1
|
|
887
887
|
});
|
|
888
888
|
}
|
|
@@ -891,13 +891,13 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
891
891
|
props: { fontColor: String },
|
|
892
892
|
setup(e) {
|
|
893
893
|
return (t, n) => {
|
|
894
|
-
let r =
|
|
894
|
+
let r = k("el-tag");
|
|
895
895
|
return E(), u(r, x(t.$attrs, { style: {
|
|
896
896
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
897
897
|
color: e.fontColor,
|
|
898
898
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
899
899
|
} }), {
|
|
900
|
-
default:
|
|
900
|
+
default: P(() => [O(t.$slots, "default")]),
|
|
901
901
|
_: 3
|
|
902
902
|
}, 16, ["style"]);
|
|
903
903
|
};
|
|
@@ -906,19 +906,19 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
906
906
|
__name: "index",
|
|
907
907
|
emits: ["ok", "no"],
|
|
908
908
|
setup(e, { emit: t }) {
|
|
909
|
-
let n = t, r =
|
|
909
|
+
let n = t, r = fe(() => {
|
|
910
910
|
n("ok");
|
|
911
911
|
}, 500);
|
|
912
912
|
function i() {
|
|
913
913
|
n("no");
|
|
914
914
|
}
|
|
915
915
|
return (e, t) => {
|
|
916
|
-
let n =
|
|
916
|
+
let n = k("el-popconfirm");
|
|
917
917
|
return E(), f("span", ht, [g(n, x(e.$attrs, {
|
|
918
|
-
onConfirm:
|
|
918
|
+
onConfirm: M(r),
|
|
919
919
|
onCancel: i
|
|
920
920
|
}), {
|
|
921
|
-
reference:
|
|
921
|
+
reference: P(() => [O(e.$slots, "default", {}, void 0, !0)]),
|
|
922
922
|
_: 3
|
|
923
923
|
}, 16, ["onConfirm"])]);
|
|
924
924
|
};
|
|
@@ -944,7 +944,7 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
944
944
|
}
|
|
945
945
|
},
|
|
946
946
|
setup(e) {
|
|
947
|
-
let { t } =
|
|
947
|
+
let { t } = R(), n = e, r = D(null), a = D(!1);
|
|
948
948
|
function o(e) {
|
|
949
949
|
let t = e.match(/__v(\d+)/);
|
|
950
950
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -969,14 +969,14 @@ var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]
|
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
return (t, n) => {
|
|
972
|
-
let i =
|
|
972
|
+
let i = k("el-button");
|
|
973
973
|
return E(), f("div", _t, [g(i, x({
|
|
974
974
|
type: "primary",
|
|
975
975
|
loading: a.value,
|
|
976
976
|
class: "mgr10",
|
|
977
977
|
onClick: n[0] ||= (e) => r.value.click()
|
|
978
978
|
}, t.$attrs), {
|
|
979
|
-
default:
|
|
979
|
+
default: P(() => [O(t.$slots, "default", {}, () => [h(j(t.$t("dao-ru")), 1)], !0)]),
|
|
980
980
|
_: 3
|
|
981
981
|
}, 16, ["loading"]), p("input", {
|
|
982
982
|
onChange: s,
|
|
@@ -1003,7 +1003,7 @@ function bt(e) {
|
|
|
1003
1003
|
if (n) if (r == "input" && i?.multiple) t[n] = et(a);
|
|
1004
1004
|
else if (r == "date") if (o.includes("range")) {
|
|
1005
1005
|
let [e, r] = n, [i, s] = a || [];
|
|
1006
|
-
i && o == "daterange" && (i =
|
|
1006
|
+
i && o == "daterange" && (i = L(i).format("YYYY-MM-DD 00:00:00"), s = L(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
1007
1007
|
} else t[n] = s(a);
|
|
1008
1008
|
else t[n] = a;
|
|
1009
1009
|
}), t;
|
|
@@ -1022,7 +1022,7 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1022
1022
|
"visibleChange"
|
|
1023
1023
|
],
|
|
1024
1024
|
setup(e, { expose: t, emit: n }) {
|
|
1025
|
-
let r = e, i = n, a =
|
|
1025
|
+
let r = e, i = n, a = D(!0), o = D(null), { t: s } = R(), m = {
|
|
1026
1026
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
1027
1027
|
daterange: "YYYY-MM-DD",
|
|
1028
1028
|
month: "YYYY-MM"
|
|
@@ -1042,7 +1042,7 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1042
1042
|
function T() {
|
|
1043
1043
|
return bt(r.form.items);
|
|
1044
1044
|
}
|
|
1045
|
-
let ee =
|
|
1045
|
+
let ee = de(r.form.items);
|
|
1046
1046
|
function te() {
|
|
1047
1047
|
r.form?.items?.forEach((e) => {
|
|
1048
1048
|
let t = ee.find((t) => t.key == e.key);
|
|
@@ -1053,10 +1053,10 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1053
1053
|
getPrm: T,
|
|
1054
1054
|
reset: te
|
|
1055
1055
|
}), (t, n) => {
|
|
1056
|
-
let r =
|
|
1056
|
+
let r = k("el-input"), s = k("el-date-picker"), l = k("el-form-item"), T = k("el-form"), ee = k("el-link"), te = k("el-button");
|
|
1057
1057
|
return E(), f("div", {
|
|
1058
1058
|
class: "searchBar-container mgt10 mgb10",
|
|
1059
|
-
onKeydown:
|
|
1059
|
+
onKeydown: ce(v, ["enter"])
|
|
1060
1060
|
}, [p("div", {
|
|
1061
1061
|
class: "searchBar",
|
|
1062
1062
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -1064,11 +1064,11 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1064
1064
|
inline: "",
|
|
1065
1065
|
model: e.form.data
|
|
1066
1066
|
}, {
|
|
1067
|
-
default:
|
|
1067
|
+
default: P(() => [(E(!0), f(c, null, re(e.form?.items?.filter((e) => !e.hidden), (e) => (E(), f(c, { key: e.key }, [e.type == "br" ? (E(), f("br", xt)) : (E(), u(l, {
|
|
1068
1068
|
key: 1,
|
|
1069
1069
|
label: e.name
|
|
1070
1070
|
}, {
|
|
1071
|
-
default:
|
|
1071
|
+
default: P(() => [
|
|
1072
1072
|
e.type === "input" ? (E(), u(r, {
|
|
1073
1073
|
key: 0,
|
|
1074
1074
|
modelValue: e.value,
|
|
@@ -1081,7 +1081,7 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1081
1081
|
"onUpdate:modelValue",
|
|
1082
1082
|
"class",
|
|
1083
1083
|
"placeholder"
|
|
1084
|
-
])) : e.type === "custom" ? (E(), u(
|
|
1084
|
+
])) : e.type === "custom" ? (E(), u(A(e.render), { key: 1 })) : d("", !0),
|
|
1085
1085
|
e.type === "select" ? (E(), u(ut, x({
|
|
1086
1086
|
key: 2,
|
|
1087
1087
|
class: e.option?.class || "w150",
|
|
@@ -1129,7 +1129,7 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1129
1129
|
_: 2
|
|
1130
1130
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1131
1131
|
_: 1
|
|
1132
|
-
}, 8, ["model"])], 4), p("div", St, [p("div", Ct, [
|
|
1132
|
+
}, 8, ["model"])], 4), p("div", St, [p("div", Ct, [O(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", wt, [
|
|
1133
1133
|
g(ee, {
|
|
1134
1134
|
underline: "never",
|
|
1135
1135
|
class: "mgr10",
|
|
@@ -1137,24 +1137,24 @@ var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { clas
|
|
|
1137
1137
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1138
1138
|
}
|
|
1139
1139
|
}, {
|
|
1140
|
-
default:
|
|
1140
|
+
default: P(() => [g(pt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + j(_.value), 1)]),
|
|
1141
1141
|
_: 1
|
|
1142
1142
|
}),
|
|
1143
1143
|
g(te, {
|
|
1144
1144
|
type: "primary",
|
|
1145
1145
|
onClick: v
|
|
1146
1146
|
}, {
|
|
1147
|
-
default:
|
|
1147
|
+
default: P(() => [h(j(t.$t("shai-xuan")), 1)]),
|
|
1148
1148
|
_: 1
|
|
1149
1149
|
}),
|
|
1150
1150
|
g(te, {
|
|
1151
1151
|
type: "primary",
|
|
1152
1152
|
onClick: b
|
|
1153
1153
|
}, {
|
|
1154
|
-
default:
|
|
1154
|
+
default: P(() => [h(j(t.$t("chong-zhi")), 1)]),
|
|
1155
1155
|
_: 1
|
|
1156
1156
|
}),
|
|
1157
|
-
|
|
1157
|
+
O(t.$slots, "btn", {}, void 0, !0)
|
|
1158
1158
|
])])], 32);
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
@@ -1231,21 +1231,21 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1231
1231
|
}
|
|
1232
1232
|
},
|
|
1233
1233
|
setup(e, { expose: t }) {
|
|
1234
|
-
let { t: n, locale: r } =
|
|
1234
|
+
let { t: n, locale: r } = R(), i = kt(), a = e, o = D(!1), s = D([]);
|
|
1235
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 = []);
|
|
1236
|
-
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m =
|
|
1236
|
+
let c = l(() => a.id ? `listPageId-${a.id}` : "listPageId-default"), m = de(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = ne({
|
|
1237
1237
|
[_]: 1,
|
|
1238
1238
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1239
1239
|
total: 0
|
|
1240
|
-
}), b =
|
|
1240
|
+
}), b = D(null), w = D(null), re = D(450), A = fe(() => {
|
|
1241
1241
|
S(() => {
|
|
1242
1242
|
if (!w.value) return;
|
|
1243
1243
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1244
|
-
|
|
1244
|
+
re.value = Math.max(t, 200);
|
|
1245
1245
|
});
|
|
1246
|
-
}, 100),
|
|
1247
|
-
|
|
1248
|
-
},
|
|
1246
|
+
}, 100), ie = () => {
|
|
1247
|
+
A();
|
|
1248
|
+
}, N = () => {
|
|
1249
1249
|
if (b.value) return b.value;
|
|
1250
1250
|
let e = w.value;
|
|
1251
1251
|
if (e) {
|
|
@@ -1253,39 +1253,39 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1253
1253
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1254
1254
|
}
|
|
1255
1255
|
return null;
|
|
1256
|
-
},
|
|
1256
|
+
}, ae = () => {
|
|
1257
1257
|
if (!a.searchForm.enableCellCopy) return !1;
|
|
1258
|
-
let e =
|
|
1258
|
+
let e = N();
|
|
1259
1259
|
if (!e || !e.$el) return !1;
|
|
1260
1260
|
let t = e.$el;
|
|
1261
|
-
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", Te), t.removeEventListener("mousemove", Ee), t.removeEventListener("mouseup", De), t.removeEventListener("keydown", Pe), t.addEventListener("mousedown", Te), t.addEventListener("mousemove", Ee), t.addEventListener("mouseup", De), t.addEventListener("keydown", Pe);
|
|
1262
1262
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1263
|
-
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll",
|
|
1263
|
+
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", je), n.addEventListener("scroll", je), n.__cellCopyScrollBound = !0), Ae(), !0;
|
|
1264
1264
|
};
|
|
1265
1265
|
T(() => {
|
|
1266
|
-
|
|
1267
|
-
|
|
1266
|
+
A(), window.addEventListener("resize", ie), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Fe), document.addEventListener("mousedown", Ie), setTimeout(() => {
|
|
1267
|
+
ae();
|
|
1268
1268
|
}, 500));
|
|
1269
1269
|
}), te(() => {
|
|
1270
1270
|
a.searchForm.enableCellCopy && setTimeout(() => {
|
|
1271
|
-
|
|
1271
|
+
ae();
|
|
1272
1272
|
}, 500);
|
|
1273
1273
|
}), ee(() => {
|
|
1274
|
-
if (window.removeEventListener("resize",
|
|
1275
|
-
document.removeEventListener("mouseup",
|
|
1276
|
-
let e =
|
|
1274
|
+
if (window.removeEventListener("resize", ie), a.searchForm.enableCellCopy) {
|
|
1275
|
+
document.removeEventListener("mouseup", Fe), document.removeEventListener("mousedown", Ie), document.removeEventListener("mousemove", Se), W(), X();
|
|
1276
|
+
let e = N();
|
|
1277
1277
|
if (e && e.$el) {
|
|
1278
1278
|
let t = e.$el;
|
|
1279
|
-
t.removeEventListener("mousedown",
|
|
1279
|
+
t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove", Ee), t.removeEventListener("mouseup", De), t.removeEventListener("keydown", Pe);
|
|
1280
1280
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1281
|
-
n && (n.removeEventListener("scroll",
|
|
1281
|
+
n && (n.removeEventListener("scroll", je), n.__cellCopyScrollBound = !1);
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
1284
|
});
|
|
1285
|
-
let
|
|
1286
|
-
async function
|
|
1285
|
+
let oe = l(() => ge.value.height || re.value), se;
|
|
1286
|
+
async function ce(e) {
|
|
1287
1287
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1288
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1288
|
+
e[_] != 1 && (e.nextSearchAfter = se), o.value = !0;
|
|
1289
1289
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1290
1290
|
o.value = !1, a.searchForm.selections = [];
|
|
1291
1291
|
});
|
|
@@ -1310,54 +1310,54 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1310
1310
|
break;
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
|
-
s.value = n ? n(e) : e, y.total = i,
|
|
1313
|
+
s.value = n ? n(e) : e, y.total = i, se = c.nextSearchAfter, a.searchForm.enableCellCopy && (Oe(), V = /* @__PURE__ */ new WeakMap(), ve = null, S(() => {
|
|
1314
1314
|
setTimeout(() => {
|
|
1315
|
-
|
|
1315
|
+
ae();
|
|
1316
1316
|
}, 500);
|
|
1317
1317
|
}));
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function F(e = {}) {
|
|
1321
1321
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1322
|
-
|
|
1322
|
+
ce({
|
|
1323
1323
|
...y,
|
|
1324
1324
|
...bt(a.searchForm.items),
|
|
1325
1325
|
...e,
|
|
1326
1326
|
...n
|
|
1327
1327
|
});
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1329
|
+
function I() {
|
|
1330
1330
|
let { reset: e } = a.tableConfig;
|
|
1331
1331
|
e && e(), a.searchForm?.items?.forEach((e) => {
|
|
1332
|
-
let t = m.find((t) =>
|
|
1332
|
+
let t = m.find((t) => pe(e.key) && pe(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1333
1333
|
t && (e.value = t.value);
|
|
1334
|
-
}),
|
|
1334
|
+
}), F();
|
|
1335
1335
|
}
|
|
1336
|
-
a.api && a.immediate &&
|
|
1337
|
-
function
|
|
1336
|
+
a.api && a.immediate && F();
|
|
1337
|
+
function L() {
|
|
1338
1338
|
return {
|
|
1339
1339
|
...y,
|
|
1340
1340
|
...bt(a.searchForm.items)
|
|
1341
1341
|
};
|
|
1342
1342
|
}
|
|
1343
|
-
let
|
|
1343
|
+
let ue = () => {
|
|
1344
1344
|
let e = b.value;
|
|
1345
1345
|
e && e.clearSort();
|
|
1346
|
-
},
|
|
1346
|
+
}, me = ne({ storage: !0 }), he = ne({
|
|
1347
1347
|
drag: !0,
|
|
1348
1348
|
resizable: !0,
|
|
1349
1349
|
maxFixedSize: 0
|
|
1350
|
-
}),
|
|
1350
|
+
}), ge = l(() => {
|
|
1351
1351
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1352
1352
|
return {
|
|
1353
1353
|
headerAlign: "left",
|
|
1354
1354
|
align: "center",
|
|
1355
1355
|
customConfig: {
|
|
1356
|
-
...
|
|
1356
|
+
...me,
|
|
1357
1357
|
...e
|
|
1358
1358
|
},
|
|
1359
1359
|
columnConfig: {
|
|
1360
|
-
...
|
|
1360
|
+
...he,
|
|
1361
1361
|
...t
|
|
1362
1362
|
},
|
|
1363
1363
|
"virtual-x-config": {
|
|
@@ -1370,18 +1370,18 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1370
1370
|
},
|
|
1371
1371
|
...n
|
|
1372
1372
|
};
|
|
1373
|
-
}),
|
|
1373
|
+
}), z = ne({
|
|
1374
1374
|
isSelecting: !1,
|
|
1375
1375
|
startCell: null,
|
|
1376
1376
|
endCell: null,
|
|
1377
1377
|
selectedCells: []
|
|
1378
|
-
}),
|
|
1379
|
-
if (!
|
|
1380
|
-
|
|
1378
|
+
}), B = null, _e = () => {
|
|
1379
|
+
if (!z.startCell || !z.endCell) {
|
|
1380
|
+
B = null, z.selectedCells = [];
|
|
1381
1381
|
return;
|
|
1382
1382
|
}
|
|
1383
|
-
let e = Math.min(
|
|
1384
|
-
|
|
1383
|
+
let e = Math.min(z.startCell.rowIndex, z.endCell.rowIndex), t = Math.max(z.startCell.rowIndex, z.endCell.rowIndex), n = Math.min(z.startCell.colIndex, z.endCell.colIndex), r = Math.max(z.startCell.colIndex, z.endCell.colIndex);
|
|
1384
|
+
B = {
|
|
1385
1385
|
minRow: e,
|
|
1386
1386
|
maxRow: t,
|
|
1387
1387
|
minCol: n,
|
|
@@ -1392,25 +1392,25 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1392
1392
|
rowIndex: a,
|
|
1393
1393
|
colIndex: e
|
|
1394
1394
|
});
|
|
1395
|
-
|
|
1396
|
-
},
|
|
1395
|
+
z.selectedCells = i;
|
|
1396
|
+
}, V = /* @__PURE__ */ new WeakMap(), ve = null, ye = 0, be = (e, t) => {
|
|
1397
1397
|
let n = e.getTableData().fullData;
|
|
1398
|
-
if (n !==
|
|
1399
|
-
|
|
1400
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1398
|
+
if (n !== ve || n.length !== ye) {
|
|
1399
|
+
V = /* @__PURE__ */ new WeakMap(), ve = n, ye = n.length;
|
|
1400
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && V.set(n[e], e);
|
|
1401
1401
|
}
|
|
1402
|
-
return
|
|
1403
|
-
},
|
|
1402
|
+
return V.has(t) ? V.get(t) : -1;
|
|
1403
|
+
}, xe = (e) => {
|
|
1404
1404
|
let t = e.closest(".vxe-body--column");
|
|
1405
1405
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1406
1406
|
let n = t.closest(".vxe-body--row");
|
|
1407
1407
|
if (!n) return null;
|
|
1408
|
-
let r =
|
|
1408
|
+
let r = N();
|
|
1409
1409
|
if (!r) return null;
|
|
1410
1410
|
let i = -1, a = n.getAttribute("rowid");
|
|
1411
1411
|
if (a != null) {
|
|
1412
1412
|
let e = r.getRowById(a);
|
|
1413
|
-
e && (i =
|
|
1413
|
+
e && (i = be(r, e));
|
|
1414
1414
|
}
|
|
1415
1415
|
if (i < 0) {
|
|
1416
1416
|
let e = n.parentElement;
|
|
@@ -1423,49 +1423,49 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1423
1423
|
colIndex: o,
|
|
1424
1424
|
cell: t
|
|
1425
1425
|
};
|
|
1426
|
-
},
|
|
1427
|
-
if (!
|
|
1428
|
-
|
|
1429
|
-
let t =
|
|
1426
|
+
}, H = null, U = 0, Se = (e) => {
|
|
1427
|
+
if (!z.isSelecting) return;
|
|
1428
|
+
U = e.clientY;
|
|
1429
|
+
let t = N();
|
|
1430
1430
|
if (!t || !t.$el) return;
|
|
1431
1431
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1432
1432
|
if (!r) return;
|
|
1433
1433
|
let i = r.getBoundingClientRect();
|
|
1434
|
-
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ?
|
|
1435
|
-
},
|
|
1434
|
+
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ? H || Ce() : W();
|
|
1435
|
+
}, Ce = () => {
|
|
1436
1436
|
let e = () => {
|
|
1437
|
-
if (!
|
|
1438
|
-
|
|
1437
|
+
if (!z.isSelecting) {
|
|
1438
|
+
W();
|
|
1439
1439
|
return;
|
|
1440
1440
|
}
|
|
1441
|
-
let t =
|
|
1441
|
+
let t = N();
|
|
1442
1442
|
if (!t || !t.$el) {
|
|
1443
|
-
|
|
1443
|
+
W();
|
|
1444
1444
|
return;
|
|
1445
1445
|
}
|
|
1446
1446
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1447
1447
|
if (!r) {
|
|
1448
|
-
|
|
1448
|
+
W();
|
|
1449
1449
|
return;
|
|
1450
1450
|
}
|
|
1451
1451
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1452
|
-
if (
|
|
1453
|
-
let e = i.top -
|
|
1452
|
+
if (U < i.top) {
|
|
1453
|
+
let e = i.top - U;
|
|
1454
1454
|
a = -Math.min(Nt, Math.max(2, e * Pt));
|
|
1455
|
-
} else if (
|
|
1456
|
-
let e =
|
|
1455
|
+
} else if (U > i.bottom) {
|
|
1456
|
+
let e = U - i.bottom;
|
|
1457
1457
|
a = Math.min(Nt, Math.max(2, e * Pt));
|
|
1458
1458
|
} else {
|
|
1459
|
-
|
|
1459
|
+
W();
|
|
1460
1460
|
return;
|
|
1461
1461
|
}
|
|
1462
|
-
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)), we(r, i), H = requestAnimationFrame(e);
|
|
1463
1463
|
};
|
|
1464
|
-
|
|
1465
|
-
},
|
|
1466
|
-
|
|
1467
|
-
},
|
|
1468
|
-
let n =
|
|
1464
|
+
H = requestAnimationFrame(e);
|
|
1465
|
+
}, W = () => {
|
|
1466
|
+
H &&= (cancelAnimationFrame(H), null);
|
|
1467
|
+
}, we = (e, t) => {
|
|
1468
|
+
let n = N();
|
|
1469
1469
|
if (!n) return;
|
|
1470
1470
|
let r = n.getTableData().fullData;
|
|
1471
1471
|
if (!r || r.length === 0) return;
|
|
@@ -1474,53 +1474,53 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1474
1474
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1475
1475
|
if (a.length === 0) return;
|
|
1476
1476
|
let o = null;
|
|
1477
|
-
if (
|
|
1477
|
+
if (U < t.top ? o = a[0] : U > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1478
1478
|
let s = o.getAttribute("rowid");
|
|
1479
1479
|
if (s == null) return;
|
|
1480
1480
|
let c = -1, l = n.getRowById(s);
|
|
1481
1481
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1482
|
-
let u =
|
|
1483
|
-
|
|
1482
|
+
let u = z.endCell ? z.endCell.colIndex : z.startCell ? z.startCell.colIndex : 0;
|
|
1483
|
+
z.endCell = {
|
|
1484
1484
|
rowIndex: c,
|
|
1485
1485
|
colIndex: u
|
|
1486
|
-
},
|
|
1487
|
-
},
|
|
1488
|
-
let t =
|
|
1486
|
+
}, _e(), q();
|
|
1487
|
+
}, Te = (e) => {
|
|
1488
|
+
let t = xe(e.target);
|
|
1489
1489
|
if (!t) {
|
|
1490
|
-
|
|
1490
|
+
Oe();
|
|
1491
1491
|
return;
|
|
1492
1492
|
}
|
|
1493
|
-
let n =
|
|
1494
|
-
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"),
|
|
1493
|
+
let n = N();
|
|
1494
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), z.isSelecting = !0, z.startCell = {
|
|
1495
1495
|
rowIndex: t.rowIndex,
|
|
1496
1496
|
colIndex: t.colIndex
|
|
1497
|
-
},
|
|
1498
|
-
},
|
|
1499
|
-
|
|
1500
|
-
if (
|
|
1501
|
-
let t =
|
|
1502
|
-
t && (
|
|
1497
|
+
}, z.endCell = { ...z.startCell }, document.addEventListener("mousemove", Se), _e(), q();
|
|
1498
|
+
}, G = null, Ee = (e) => {
|
|
1499
|
+
z.isSelecting && (G ||= requestAnimationFrame(() => {
|
|
1500
|
+
if (G = null, !z.isSelecting) return;
|
|
1501
|
+
let t = xe(e.target);
|
|
1502
|
+
t && (z.endCell && z.endCell.rowIndex === t.rowIndex && z.endCell.colIndex === t.colIndex || (z.endCell = {
|
|
1503
1503
|
rowIndex: t.rowIndex,
|
|
1504
1504
|
colIndex: t.colIndex
|
|
1505
|
-
},
|
|
1505
|
+
}, _e(), q()));
|
|
1506
1506
|
}));
|
|
1507
|
-
}, Ee = () => {
|
|
1508
|
-
B.isSelecting = !1, G(), K &&= (cancelAnimationFrame(K), null), document.removeEventListener("mousemove", xe);
|
|
1509
1507
|
}, De = () => {
|
|
1510
|
-
|
|
1511
|
-
|
|
1508
|
+
z.isSelecting = !1, W(), G &&= (cancelAnimationFrame(G), null), document.removeEventListener("mousemove", Se);
|
|
1509
|
+
}, Oe = () => {
|
|
1510
|
+
z.selectedCells = [], z.startCell = null, z.endCell = null, B = null;
|
|
1511
|
+
let e = N();
|
|
1512
1512
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1513
1513
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1514
1514
|
});
|
|
1515
|
-
},
|
|
1516
|
-
let e =
|
|
1515
|
+
}, K = () => {
|
|
1516
|
+
let e = N();
|
|
1517
1517
|
if (!e) return;
|
|
1518
1518
|
let t = e.$el;
|
|
1519
1519
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1520
1520
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1521
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");
|
|
1522
|
-
if (!
|
|
1523
|
-
let { minRow: r, maxRow: i, minCol: a, maxCol: o } =
|
|
1522
|
+
if (!B) return;
|
|
1523
|
+
let { minRow: r, maxRow: i, minCol: a, maxCol: o } = B, s = e.getColumns(), c = e.getTableData().fullData, l = /* @__PURE__ */ new Map();
|
|
1524
1524
|
for (let t = r; t <= i; t++) {
|
|
1525
1525
|
let n = c[t];
|
|
1526
1526
|
if (n) {
|
|
@@ -1541,7 +1541,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1541
1541
|
let d = l.get(String(u));
|
|
1542
1542
|
if (d === void 0) {
|
|
1543
1543
|
let t = e.getRowById(u);
|
|
1544
|
-
if (t && (d =
|
|
1544
|
+
if (t && (d = be(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1545
1545
|
}
|
|
1546
1546
|
if (d < r || d > i) continue;
|
|
1547
1547
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1552,33 +1552,33 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
1554
|
}
|
|
1555
|
-
},
|
|
1555
|
+
}, q = () => {
|
|
1556
1556
|
S(() => {
|
|
1557
|
-
|
|
1557
|
+
K();
|
|
1558
1558
|
});
|
|
1559
|
-
},
|
|
1560
|
-
|
|
1561
|
-
|
|
1559
|
+
}, J = null, Y = null, ke = () => {
|
|
1560
|
+
Y ||= requestAnimationFrame(() => {
|
|
1561
|
+
Y = null, K();
|
|
1562
1562
|
});
|
|
1563
|
-
},
|
|
1564
|
-
let e =
|
|
1563
|
+
}, Ae = () => {
|
|
1564
|
+
let e = N();
|
|
1565
1565
|
if (!e || !e.$el) return;
|
|
1566
1566
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1567
|
-
t && (
|
|
1568
|
-
|
|
1569
|
-
}),
|
|
1567
|
+
t && (X(), J = new MutationObserver(() => {
|
|
1568
|
+
B && ke();
|
|
1569
|
+
}), J.observe(t, {
|
|
1570
1570
|
childList: !0,
|
|
1571
1571
|
subtree: !1
|
|
1572
1572
|
}));
|
|
1573
|
-
},
|
|
1574
|
-
|
|
1575
|
-
},
|
|
1576
|
-
|
|
1577
|
-
},
|
|
1578
|
-
if (!
|
|
1579
|
-
let e =
|
|
1573
|
+
}, X = () => {
|
|
1574
|
+
J &&= (J.disconnect(), null), Y &&= (cancelAnimationFrame(Y), null);
|
|
1575
|
+
}, je = () => {
|
|
1576
|
+
B && ke();
|
|
1577
|
+
}, Me = (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), Ne = async () => {
|
|
1578
|
+
if (!B) return;
|
|
1579
|
+
let e = N();
|
|
1580
1580
|
if (!e) return;
|
|
1581
|
-
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 } = B, c = [];
|
|
1582
1582
|
for (let e = i; e <= a; e++) c.push(e);
|
|
1583
1583
|
let l = [];
|
|
1584
1584
|
for (let e = o; e <= s; e++) l.push(e);
|
|
@@ -1622,9 +1622,9 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1622
1622
|
});
|
|
1623
1623
|
o = e == null ? "" : String(e);
|
|
1624
1624
|
} catch {
|
|
1625
|
-
o = s ?
|
|
1625
|
+
o = s ? Me(i[s]) : "";
|
|
1626
1626
|
}
|
|
1627
|
-
else s && (o =
|
|
1627
|
+
else s && (o = Me(i[s]));
|
|
1628
1628
|
a.push(o);
|
|
1629
1629
|
}), f.push(a.join(" "));
|
|
1630
1630
|
});
|
|
@@ -1634,23 +1634,23 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1634
1634
|
} catch (e) {
|
|
1635
1635
|
console.error("复制失败:", e);
|
|
1636
1636
|
}
|
|
1637
|
-
},
|
|
1638
|
-
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1639
|
-
},
|
|
1640
|
-
|
|
1641
|
-
}, Fe = (e) => {
|
|
1642
|
-
let t = P();
|
|
1643
|
-
!t || !t.$el || t.$el.contains(e.target) || De();
|
|
1637
|
+
}, Pe = (e) => {
|
|
1638
|
+
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ? B && (e.preventDefault(), e.stopPropagation(), Ne()) : e.key === "Escape" && Oe());
|
|
1639
|
+
}, Fe = () => {
|
|
1640
|
+
z.isSelecting = !1, W(), G &&= (cancelAnimationFrame(G), null), document.removeEventListener("mousemove", Se);
|
|
1644
1641
|
}, Ie = (e) => {
|
|
1645
|
-
|
|
1642
|
+
let t = N();
|
|
1643
|
+
!t || !t.$el || t.$el.contains(e.target) || Oe();
|
|
1646
1644
|
}, Le = (e) => {
|
|
1647
|
-
y[
|
|
1645
|
+
y[_] = e, F();
|
|
1646
|
+
}, Re = (e) => {
|
|
1647
|
+
y[v] = e, y[_] = 1, F();
|
|
1648
1648
|
};
|
|
1649
|
-
function
|
|
1649
|
+
function Z() {
|
|
1650
1650
|
let e = b.value.getCheckboxRecords();
|
|
1651
1651
|
a.searchForm.selections = e;
|
|
1652
1652
|
}
|
|
1653
|
-
let
|
|
1653
|
+
let Q = (e) => {
|
|
1654
1654
|
let t = b.value;
|
|
1655
1655
|
if (t) {
|
|
1656
1656
|
t.toggleCheckboxRow(e);
|
|
@@ -1660,35 +1660,35 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1660
1660
|
};
|
|
1661
1661
|
return t({
|
|
1662
1662
|
tableRef: b,
|
|
1663
|
-
getList:
|
|
1664
|
-
getPrm:
|
|
1665
|
-
clearSort:
|
|
1666
|
-
calculateTableHeight:
|
|
1663
|
+
getList: F,
|
|
1664
|
+
getPrm: L,
|
|
1665
|
+
clearSort: ue,
|
|
1666
|
+
calculateTableHeight: A
|
|
1667
1667
|
}), (t, n) => {
|
|
1668
|
-
let a =
|
|
1668
|
+
let a = k("el-button"), l = k("el-checkbox"), m = k("el-text"), S = k("vxe-column"), T = k("VxeTable"), ee = k("el-pagination");
|
|
1669
1669
|
return E(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1670
1670
|
e.searchForm.showSearch ? (E(), u(Tt, {
|
|
1671
1671
|
key: 0,
|
|
1672
1672
|
form: e.searchForm,
|
|
1673
|
-
onReset:
|
|
1674
|
-
onConfirm: n[1] ||= (e) =>
|
|
1675
|
-
onVisibleChange:
|
|
1673
|
+
onReset: I,
|
|
1674
|
+
onConfirm: n[1] ||= (e) => F(),
|
|
1675
|
+
onVisibleChange: M(A)
|
|
1676
1676
|
}, {
|
|
1677
|
-
btn:
|
|
1677
|
+
btn: P(() => [
|
|
1678
1678
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1679
|
-
|
|
1679
|
+
O(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1680
1680
|
g(a, {
|
|
1681
1681
|
class: "mgl10",
|
|
1682
1682
|
round: "",
|
|
1683
1683
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1684
1684
|
}, {
|
|
1685
|
-
default:
|
|
1685
|
+
default: P(() => [g(pt, { name: "Tools" })]),
|
|
1686
1686
|
_: 1
|
|
1687
1687
|
})
|
|
1688
1688
|
]),
|
|
1689
1689
|
_: 3
|
|
1690
1690
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1691
|
-
|
|
1691
|
+
O(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1692
1692
|
p("div", {
|
|
1693
1693
|
ref_key: "tableContentRef",
|
|
1694
1694
|
ref: w,
|
|
@@ -1700,41 +1700,41 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1700
1700
|
loading: e.loading || o.value,
|
|
1701
1701
|
data: e.api ? s.value : e.data,
|
|
1702
1702
|
border: ""
|
|
1703
|
-
},
|
|
1704
|
-
height:
|
|
1705
|
-
onCheckboxChange:
|
|
1706
|
-
onCheckboxAll:
|
|
1707
|
-
onSortChange:
|
|
1708
|
-
onScroll:
|
|
1703
|
+
}, ge.value, {
|
|
1704
|
+
height: oe.value,
|
|
1705
|
+
onCheckboxChange: Z,
|
|
1706
|
+
onCheckboxAll: Z,
|
|
1707
|
+
onSortChange: ge.value["sort-config"]?.sortChange,
|
|
1708
|
+
onScroll: je
|
|
1709
1709
|
}), {
|
|
1710
|
-
default:
|
|
1710
|
+
default: P(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (E(), u(S, {
|
|
1711
1711
|
key: 0,
|
|
1712
1712
|
type: "checkbox",
|
|
1713
|
-
width:
|
|
1713
|
+
width: M(r) == "zh_cn" ? 80 : 150,
|
|
1714
1714
|
title: t.$t("xu-hao"),
|
|
1715
1715
|
fixed: "left"
|
|
1716
1716
|
}, {
|
|
1717
|
-
checkbox:
|
|
1717
|
+
checkbox: P(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", jt, [n ? (E(), u(l, {
|
|
1718
1718
|
key: 0,
|
|
1719
1719
|
checked: !0,
|
|
1720
1720
|
disabled: r,
|
|
1721
1721
|
size: "default",
|
|
1722
|
-
onClick:
|
|
1722
|
+
onClick: le((e) => !r && Q(t), ["stop"])
|
|
1723
1723
|
}, null, 8, ["disabled", "onClick"])) : (E(), u(l, {
|
|
1724
1724
|
key: 1,
|
|
1725
1725
|
disabled: r,
|
|
1726
1726
|
checked: !1,
|
|
1727
1727
|
size: "default",
|
|
1728
|
-
onClick:
|
|
1728
|
+
onClick: le((e) => !r && Q(t), ["stop"])
|
|
1729
1729
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1730
1730
|
type: "info",
|
|
1731
1731
|
class: "mgl5"
|
|
1732
1732
|
}, {
|
|
1733
|
-
default:
|
|
1733
|
+
default: P(() => [h(j(e + 1), 1)]),
|
|
1734
1734
|
_: 2
|
|
1735
1735
|
}, 1024)])]),
|
|
1736
1736
|
_: 1
|
|
1737
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1737
|
+
}, 8, ["width", "title"])) : d("", !0), O(t.$slots, "default", {}, void 0, !0)]),
|
|
1738
1738
|
_: 3
|
|
1739
1739
|
}, 16, [
|
|
1740
1740
|
"id",
|
|
@@ -1745,16 +1745,16 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1745
1745
|
])], 2),
|
|
1746
1746
|
e.searchForm.showPage ? (E(), u(ee, {
|
|
1747
1747
|
key: 1,
|
|
1748
|
-
"current-page": y[
|
|
1749
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1748
|
+
"current-page": y[M(_)],
|
|
1749
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[M(_)] = e,
|
|
1750
1750
|
class: "myPagination mgt10",
|
|
1751
1751
|
background: "",
|
|
1752
1752
|
layout: "total, sizes, prev, pager, next",
|
|
1753
1753
|
total: y.total,
|
|
1754
|
-
"page-size": y[
|
|
1755
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1756
|
-
onCurrentChange:
|
|
1757
|
-
onSizeChange:
|
|
1754
|
+
"page-size": y[M(v)],
|
|
1755
|
+
"page-sizes": e.searchForm.pageSizes || M(i).pageSizes,
|
|
1756
|
+
onCurrentChange: Le,
|
|
1757
|
+
onSizeChange: Re
|
|
1758
1758
|
}, null, 8, [
|
|
1759
1759
|
"current-page",
|
|
1760
1760
|
"total",
|
|
@@ -1784,7 +1784,7 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1784
1784
|
}
|
|
1785
1785
|
},
|
|
1786
1786
|
setup(e) {
|
|
1787
|
-
let t = e, n =
|
|
1787
|
+
let t = e, n = D(!1);
|
|
1788
1788
|
async function r(e) {
|
|
1789
1789
|
let t = Object.entries(e), n = await Promise.all(t.map(async ([e, t]) => {
|
|
1790
1790
|
let { tableData: n } = t, r = n;
|
|
@@ -1808,13 +1808,13 @@ var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
|
1808
1808
|
}
|
|
1809
1809
|
}
|
|
1810
1810
|
return (e, t) => {
|
|
1811
|
-
let r =
|
|
1811
|
+
let r = k("el-link");
|
|
1812
1812
|
return E(), u(r, x({
|
|
1813
1813
|
type: "primary",
|
|
1814
1814
|
underline: "never",
|
|
1815
1815
|
disabled: n.value
|
|
1816
1816
|
}, e.$attrs, { onClick: a }), {
|
|
1817
|
-
default:
|
|
1817
|
+
default: P(() => [n.value ? (E(), f("span", It)) : d("", !0), O(e.$slots, "default", {}, () => [h(j(n.value ? e.$t("jia-zai-zhong") : e.$t("xia-zai-dao-ru-mo-ban")), 1)], !0)]),
|
|
1818
1818
|
_: 3
|
|
1819
1819
|
}, 16, ["disabled"]);
|
|
1820
1820
|
};
|
|
@@ -1921,7 +1921,7 @@ var Vt = {
|
|
|
1921
1921
|
},
|
|
1922
1922
|
emits: ["confirm"],
|
|
1923
1923
|
setup(e, { emit: t }) {
|
|
1924
|
-
let n = e, r = t, { t: i } =
|
|
1924
|
+
let n = e, r = t, { t: i } = R(), o = fe(() => {
|
|
1925
1925
|
r("confirm");
|
|
1926
1926
|
}, 300);
|
|
1927
1927
|
async function s() {
|
|
@@ -1932,7 +1932,7 @@ var Vt = {
|
|
|
1932
1932
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1933
1933
|
}
|
|
1934
1934
|
return (t, n) => {
|
|
1935
|
-
let r =
|
|
1935
|
+
let r = k("el-button"), i = k("el-drawer"), a = k("el-dialog");
|
|
1936
1936
|
return e.layer.type ? (E(), u(i, {
|
|
1937
1937
|
key: 0,
|
|
1938
1938
|
modelValue: e.layer.show,
|
|
@@ -1944,18 +1944,18 @@ var Vt = {
|
|
|
1944
1944
|
"before-close": s,
|
|
1945
1945
|
class: "drawer-content"
|
|
1946
1946
|
}, {
|
|
1947
|
-
default:
|
|
1948
|
-
|
|
1947
|
+
default: P(() => [
|
|
1948
|
+
O(t.$slots, "default"),
|
|
1949
1949
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1950
|
-
e.layer.showButton ? (E(), f("div", Vt, [
|
|
1951
|
-
default:
|
|
1950
|
+
e.layer.showButton ? (E(), f("div", Vt, [O(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1951
|
+
default: P(() => [h(j(t.$t("qu-xiao")), 1)]),
|
|
1952
1952
|
_: 1
|
|
1953
1953
|
}), g(r, {
|
|
1954
1954
|
type: "primary",
|
|
1955
1955
|
loading: e.loading,
|
|
1956
|
-
onClick:
|
|
1956
|
+
onClick: M(o)
|
|
1957
1957
|
}, {
|
|
1958
|
-
default:
|
|
1958
|
+
default: P(() => [h(j(t.$t("ti-jiao")), 1)]),
|
|
1959
1959
|
_: 1
|
|
1960
1960
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1961
1961
|
]),
|
|
@@ -1964,7 +1964,7 @@ var Vt = {
|
|
|
1964
1964
|
"modelValue",
|
|
1965
1965
|
"size",
|
|
1966
1966
|
"title"
|
|
1967
|
-
])) :
|
|
1967
|
+
])) : se((E(), f("div", Ht, [g(a, {
|
|
1968
1968
|
"close-on-click-modal": !1,
|
|
1969
1969
|
modelValue: e.layer.show,
|
|
1970
1970
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1972,19 +1972,19 @@ var Vt = {
|
|
|
1972
1972
|
width: e.layer.width || 500,
|
|
1973
1973
|
center: ""
|
|
1974
1974
|
}, m({
|
|
1975
|
-
default:
|
|
1975
|
+
default: P(() => [O(t.$slots, "default")]),
|
|
1976
1976
|
_: 2
|
|
1977
1977
|
}, [e.layer.showButton ? {
|
|
1978
1978
|
name: "footer",
|
|
1979
|
-
fn:
|
|
1980
|
-
default:
|
|
1979
|
+
fn: P(() => [O(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1980
|
+
default: P(() => [h(j(t.$t("qu-xiao")), 1)]),
|
|
1981
1981
|
_: 1
|
|
1982
1982
|
}), g(r, {
|
|
1983
1983
|
type: "primary",
|
|
1984
1984
|
loading: e.loading,
|
|
1985
|
-
onClick:
|
|
1985
|
+
onClick: M(o)
|
|
1986
1986
|
}, {
|
|
1987
|
-
default:
|
|
1987
|
+
default: P(() => [h(j(t.$t("ti-jiao")), 1)]),
|
|
1988
1988
|
_: 1
|
|
1989
1989
|
}, 8, ["loading", "onClick"])])]),
|
|
1990
1990
|
key: "0"
|
|
@@ -1992,14 +1992,14 @@ var Vt = {
|
|
|
1992
1992
|
"modelValue",
|
|
1993
1993
|
"title",
|
|
1994
1994
|
"width"
|
|
1995
|
-
])])), [[
|
|
1995
|
+
])])), [[M(Rt), e.layer.show]]);
|
|
1996
1996
|
};
|
|
1997
1997
|
}
|
|
1998
1998
|
};
|
|
1999
1999
|
//#endregion
|
|
2000
2000
|
//#region src/utils/tools/validate.js
|
|
2001
2001
|
function Wt(e, t = {}) {
|
|
2002
|
-
let n =
|
|
2002
|
+
let n = X(), r = {
|
|
2003
2003
|
inForm: !0,
|
|
2004
2004
|
required: !0,
|
|
2005
2005
|
...t
|
|
@@ -2188,7 +2188,7 @@ function Yt(e, t = {}) {
|
|
|
2188
2188
|
log: !1,
|
|
2189
2189
|
params: null,
|
|
2190
2190
|
format: null
|
|
2191
|
-
}, t), s =
|
|
2191
|
+
}, t), s = D([]), c = D(!1), l = (t) => {
|
|
2192
2192
|
let n = t || i;
|
|
2193
2193
|
c.value = !0, e(n).then((e) => {
|
|
2194
2194
|
let { code: t, data: c, msg: l } = e;
|
|
@@ -2216,8 +2216,8 @@ function Yt(e, t = {}) {
|
|
|
2216
2216
|
];
|
|
2217
2217
|
}
|
|
2218
2218
|
function Xt(e) {
|
|
2219
|
-
let t =
|
|
2220
|
-
return
|
|
2219
|
+
let t = D(e), n = D(""), r = D("");
|
|
2220
|
+
return oe(t, (e) => {
|
|
2221
2221
|
let t = e || ["", ""];
|
|
2222
2222
|
n.value = t[0], r.value = t[1];
|
|
2223
2223
|
}), [
|
|
@@ -2241,8 +2241,8 @@ function Qt(e, t) {
|
|
|
2241
2241
|
//#endregion
|
|
2242
2242
|
//#region src/utils/hook/i18n.js
|
|
2243
2243
|
function $t(e, t = []) {
|
|
2244
|
-
let { locale: n } =
|
|
2245
|
-
return
|
|
2244
|
+
let { locale: n } = R(), r = D(e());
|
|
2245
|
+
return oe([n, ...t], () => {
|
|
2246
2246
|
r.value = e();
|
|
2247
2247
|
}, { immediate: !0 }), r;
|
|
2248
2248
|
}
|
|
@@ -2250,37 +2250,37 @@ function en(e, t = "zh_cn", n = "en_us") {
|
|
|
2250
2250
|
return e && (e[{
|
|
2251
2251
|
en_us: n,
|
|
2252
2252
|
zh_cn: t
|
|
2253
|
-
}[
|
|
2253
|
+
}[Ae().global.locale.value]] || e[t]) || "-";
|
|
2254
2254
|
}
|
|
2255
2255
|
//#endregion
|
|
2256
2256
|
//#region src/utils/hook/storeHook.js
|
|
2257
2257
|
function tn(e, t) {
|
|
2258
|
-
let n =
|
|
2259
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2258
|
+
let n = B;
|
|
2259
|
+
return typeof e == "string" && e.length > 0 && (n = he(e).mapState), an(t, n);
|
|
2260
2260
|
}
|
|
2261
2261
|
function nn(e, t) {
|
|
2262
|
-
let n =
|
|
2263
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2262
|
+
let n = z;
|
|
2263
|
+
return typeof e == "string" && e.length > 0 && (n = he(e).mapGetters), an(t, n);
|
|
2264
2264
|
}
|
|
2265
2265
|
function rn(e, t) {
|
|
2266
|
-
let n =
|
|
2267
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2266
|
+
let n = ge;
|
|
2267
|
+
return typeof e == "string" && e.length > 0 && (n = he(e).mapActions), on(t, n);
|
|
2268
2268
|
}
|
|
2269
2269
|
function an(e, t) {
|
|
2270
|
-
let n =
|
|
2270
|
+
let n = _e(), r = t(e), i = {};
|
|
2271
2271
|
return Object.keys(r).forEach((e) => {
|
|
2272
2272
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2273
2273
|
}), i;
|
|
2274
2274
|
}
|
|
2275
2275
|
function on(e, t) {
|
|
2276
|
-
let n =
|
|
2276
|
+
let n = _e(), r = t(e), i = {};
|
|
2277
2277
|
return Object.keys(r).forEach((e) => {
|
|
2278
2278
|
i[e] = r[e].bind({ $store: n });
|
|
2279
2279
|
}), i;
|
|
2280
2280
|
}
|
|
2281
2281
|
function sn(e, t = []) {
|
|
2282
|
-
let [n, r, i] = t, { locale: a } =
|
|
2283
|
-
return l(() =>
|
|
2282
|
+
let [n, r, i] = t, { locale: a } = R();
|
|
2283
|
+
return l(() => ie(e).map((e) => {
|
|
2284
2284
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2285
2285
|
return {
|
|
2286
2286
|
...e,
|
|
@@ -2295,20 +2295,20 @@ function cn(e) {
|
|
|
2295
2295
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2296
2296
|
}
|
|
2297
2297
|
function ln() {
|
|
2298
|
-
|
|
2298
|
+
V.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2299
2299
|
return Kt(e, t);
|
|
2300
|
-
} }),
|
|
2300
|
+
} }), V.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2301
2301
|
return qt(e, t);
|
|
2302
|
-
} }),
|
|
2302
|
+
} }), V.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2303
2303
|
return Jt(e, t);
|
|
2304
2304
|
} });
|
|
2305
2305
|
}
|
|
2306
2306
|
function un() {
|
|
2307
|
-
|
|
2307
|
+
V.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2308
2308
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2309
2309
|
let n = t.row[t.column.field], r = e.enum.getItem(n);
|
|
2310
2310
|
if (!r) return n || "-";
|
|
2311
|
-
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } =
|
|
2311
|
+
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } = R(), l = c.value == "zh_cn" ? i : a;
|
|
2312
2312
|
return e.type == "tag" ? s ? g(mt, { fontColor: s }, { default: () => [
|
|
2313
2313
|
h(" "),
|
|
2314
2314
|
l,
|
|
@@ -2317,16 +2317,16 @@ function un() {
|
|
|
2317
2317
|
h(" "),
|
|
2318
2318
|
l,
|
|
2319
2319
|
h(" ")
|
|
2320
|
-
] }) : e.type == "text" ? g(
|
|
2320
|
+
] }) : e.type == "text" ? g(k("el-text"), { type: o }, { default: () => [
|
|
2321
2321
|
h(" "),
|
|
2322
2322
|
l,
|
|
2323
2323
|
h(" ")
|
|
2324
|
-
] }) : g(
|
|
2324
|
+
] }) : g(k("el-text"), null, { default: () => [
|
|
2325
2325
|
h(" "),
|
|
2326
2326
|
l,
|
|
2327
2327
|
h(" ")
|
|
2328
2328
|
] });
|
|
2329
|
-
} }),
|
|
2329
|
+
} }), V.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2330
2330
|
return g(n, x({
|
|
2331
2331
|
modelValue: t.row[t.column.field],
|
|
2332
2332
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2334,14 +2334,14 @@ function un() {
|
|
|
2334
2334
|
"step-strictly": !0,
|
|
2335
2335
|
"value-on-clear": 0
|
|
2336
2336
|
}), null);
|
|
2337
|
-
} }),
|
|
2338
|
-
let { locale: n } =
|
|
2337
|
+
} }), V.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2338
|
+
let { locale: n } = R(), r = n.value == "zh_cn";
|
|
2339
2339
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2340
|
-
} }),
|
|
2341
|
-
let { locale: n } =
|
|
2340
|
+
} }), V.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2341
|
+
let { locale: n } = R(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2342
2342
|
return t.row[r] || t.row[t.column.field];
|
|
2343
|
-
} }),
|
|
2344
|
-
let n = t.column.field, i =
|
|
2343
|
+
} }), V.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2344
|
+
let n = t.column.field, i = ve(), { to: a, openType: o = "system" } = e, s = t.row[n];
|
|
2345
2345
|
function c(e, t) {
|
|
2346
2346
|
o == "blank" ? window.open(e) : i.push({
|
|
2347
2347
|
path: e,
|
|
@@ -2364,4 +2364,4 @@ function dn() {
|
|
|
2364
2364
|
ln(), un();
|
|
2365
2365
|
}
|
|
2366
2366
|
//#endregion
|
|
2367
|
-
export { ut as CmpDictionary, pt as CmpIcon, mt as CmpTag, gt as ConfrimButton, Lt as DownExcelTemp, yt as ImportButton,
|
|
2367
|
+
export { ut as CmpDictionary, pt as CmpIcon, mt as CmpTag, gt as ConfrimButton, Lt as DownExcelTemp, yt as ImportButton, Te 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, q as en_us, Ne as exportExcel, We as exportExcelMuilti, qt as formatMoney, Kt as formatNumber, Jt as formatPercent, Ke as getColumnLetterByIndex, Ae as getI18n, X as getI18nT, kt as getListPageConfig, en as getLocaleValue, Xe as getTableShowColumn, ct as getValueBykey, je as importExcel, He as importExcelMuilti, J as messages, ln as registerVxeFormatters, dn as registerVxePlugins, un as registerVxeRenderers, At as resetListPageConfig, Ot as setListPageConfig, ke 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, K as zh_cn };
|