joy-admin-components 0.2.125 → 0.2.127
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,21 +382,25 @@ 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
|
}
|
|
390
|
-
function ze(e
|
|
390
|
+
function ze(e) {
|
|
391
391
|
return e.option ? e.option : e.cascadeOption ? Object.values(e.cascadeOption.groups).flat() : null;
|
|
392
392
|
}
|
|
393
|
-
|
|
393
|
+
var Be = "|";
|
|
394
|
+
function Ve(e) {
|
|
395
|
+
return `MID(${e},FIND("${Z}",${e})+3,999)`;
|
|
396
|
+
}
|
|
397
|
+
async function He(e, t) {
|
|
394
398
|
let { fields: n, range: r = 1 } = t;
|
|
395
399
|
if (!n) {
|
|
396
|
-
let e =
|
|
400
|
+
let e = X();
|
|
397
401
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
398
402
|
}
|
|
399
|
-
let i = new
|
|
403
|
+
let i = new I.Workbook();
|
|
400
404
|
await i.xlsx.load(e);
|
|
401
405
|
let a = {};
|
|
402
406
|
return i.eachSheet(function(e, t) {
|
|
@@ -414,8 +418,8 @@ async function Be(e, t) {
|
|
|
414
418
|
if (i > r) {
|
|
415
419
|
let r = { _excelRowNumber: i }, a = !0;
|
|
416
420
|
Object.keys(o).forEach((t) => {
|
|
417
|
-
let [c, l] = o[t].split(
|
|
418
|
-
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);
|
|
419
423
|
}), a || t.push(r);
|
|
420
424
|
}
|
|
421
425
|
}), a[e._name] = t;
|
|
@@ -423,16 +427,16 @@ async function Be(e, t) {
|
|
|
423
427
|
}
|
|
424
428
|
}), i = null, a;
|
|
425
429
|
}
|
|
426
|
-
var
|
|
430
|
+
var Ue = {
|
|
427
431
|
date: "yyyy-mm-dd",
|
|
428
432
|
number: "0",
|
|
429
433
|
string: "@"
|
|
430
434
|
};
|
|
431
|
-
async function
|
|
435
|
+
async function We(e, t) {
|
|
432
436
|
if (!e || t.length == 0) return;
|
|
433
|
-
let n =
|
|
437
|
+
let n = Ge(t);
|
|
434
438
|
for (let e of n.worksheets) {
|
|
435
|
-
let { columnWidth: r } =
|
|
439
|
+
let { columnWidth: r } = Me, i = t[e.name];
|
|
436
440
|
if (!i) continue;
|
|
437
441
|
let { tableHeader: a, tableData: o } = i;
|
|
438
442
|
a.forEach((e) => {
|
|
@@ -446,18 +450,18 @@ async function He(e, t) {
|
|
|
446
450
|
};
|
|
447
451
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
448
452
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
449
|
-
if (d.numFmt =
|
|
450
|
-
let t = n.addWorksheet(
|
|
451
|
-
|
|
452
|
-
if (
|
|
453
|
-
let
|
|
454
|
-
e.getCell(`${d.letter}${
|
|
453
|
+
if (d.numFmt = Ue[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
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 = {
|
|
455
459
|
type: "list",
|
|
456
|
-
formulae: [
|
|
460
|
+
formulae: [`'${t}'!$A$1:$A$${s.length}`],
|
|
457
461
|
showErrorMessage: !0,
|
|
458
|
-
error:
|
|
462
|
+
error: n("excel.invalidInput"),
|
|
459
463
|
errorStyle: "stop",
|
|
460
|
-
errorMessage:
|
|
464
|
+
errorMessage: n("excel.invalidOption")
|
|
461
465
|
};
|
|
462
466
|
}
|
|
463
467
|
});
|
|
@@ -465,40 +469,66 @@ async function He(e, t) {
|
|
|
465
469
|
}), a.forEach((t) => {
|
|
466
470
|
let { key: r, cascadeOption: i } = t;
|
|
467
471
|
if (!i) return;
|
|
468
|
-
let { parentKey: o, groups: s } = i, c = a.find((
|
|
469
|
-
if (!
|
|
470
|
-
let
|
|
471
|
-
|
|
472
|
-
let
|
|
473
|
-
if (
|
|
474
|
-
let
|
|
475
|
-
|
|
476
|
-
let
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
let
|
|
484
|
-
|
|
485
|
-
|
|
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 = Q(`_cas_${e.id}_`, r), p = n.addWorksheet(f);
|
|
475
|
+
p.state = "hidden";
|
|
476
|
+
let m = t.optionFormater || ((e) => `${e.label}${Z}${e.value}`), h = 0;
|
|
477
|
+
if (c) {
|
|
478
|
+
let t = Object.keys(s);
|
|
479
|
+
if (t.length === 0) return;
|
|
480
|
+
let i = Q(`_mrf_${e.id}_`, 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 = X();
|
|
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
|
+
}
|
|
486
500
|
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
e.
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
error: v("excel.invalidInput"),
|
|
497
|
-
errorStyle: "stop",
|
|
498
|
-
errorMessage: v("excel.invalidOption")
|
|
499
|
-
};
|
|
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 = Q(`_${e.id}_`, l[0]);
|
|
505
|
+
if (!t.option && t.cascadeOption && (a = Q(`_ref_${e.id}_`, l[0]), !n.getWorksheet(a))) {
|
|
506
|
+
let e = n.addWorksheet(a);
|
|
507
|
+
e.state = "hidden";
|
|
508
|
+
let i = t.optionFormater || ((e) => `${e.label}${Z}${e.value}`);
|
|
509
|
+
e.getColumn(1).values = r.map(i);
|
|
500
510
|
}
|
|
501
|
-
|
|
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 = X();
|
|
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
|
+
}
|
|
502
532
|
}), a.some((e) => e.locked) && await e.protect("6737187214", {
|
|
503
533
|
selectLockedCells: !0,
|
|
504
534
|
selectUnlockedCells: !0
|
|
@@ -506,53 +536,53 @@ async function He(e, t) {
|
|
|
506
536
|
}
|
|
507
537
|
try {
|
|
508
538
|
let t = await n.xlsx.writeBuffer();
|
|
509
|
-
|
|
539
|
+
F(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
510
540
|
} catch (e) {
|
|
511
541
|
console.log(e);
|
|
512
542
|
}
|
|
513
543
|
}
|
|
514
|
-
function
|
|
515
|
-
let t =
|
|
544
|
+
function Ge(e) {
|
|
545
|
+
let t = X(), n = new I.Workbook();
|
|
516
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) => {
|
|
517
547
|
let i = r, a = !1;
|
|
518
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);
|
|
519
549
|
}), n;
|
|
520
550
|
}
|
|
521
|
-
function
|
|
551
|
+
function Ke(e) {
|
|
522
552
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
523
553
|
}
|
|
524
|
-
function
|
|
554
|
+
function qe(e) {
|
|
525
555
|
let t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
|
|
526
556
|
for (let e = 0; e < i; ++e) a[e] = r.charCodeAt(e);
|
|
527
557
|
return new Blob([a], { type: n });
|
|
528
558
|
}
|
|
529
|
-
function
|
|
530
|
-
let n =
|
|
559
|
+
function Je(e, t = "image.png") {
|
|
560
|
+
let n = qe(e);
|
|
531
561
|
return new File([n], t, { type: n.type });
|
|
532
562
|
}
|
|
533
|
-
function
|
|
563
|
+
function Ye(e, t) {
|
|
534
564
|
let n = e.match(/^data:image\/(\w+);base64,/), r = n ? n[1] : "png";
|
|
535
565
|
t ||= `image_${Date.now()}.${r}`;
|
|
536
|
-
let i =
|
|
566
|
+
let i = Je(e, t), a = new FormData();
|
|
537
567
|
return a.append("file", i), a;
|
|
538
568
|
}
|
|
539
|
-
function
|
|
569
|
+
function Xe(e) {
|
|
540
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);
|
|
541
|
-
return i.push("type=checkbox", "action", "actions"),
|
|
571
|
+
return i.push("type=checkbox", "action", "actions"), me(r, ...i);
|
|
542
572
|
}
|
|
543
573
|
//#endregion
|
|
544
574
|
//#region src/utils/tools/tools.js
|
|
545
|
-
function
|
|
575
|
+
function Ze(e) {
|
|
546
576
|
return new Promise((t) => {
|
|
547
577
|
setTimeout(() => {
|
|
548
578
|
t();
|
|
549
579
|
}, e);
|
|
550
580
|
});
|
|
551
581
|
}
|
|
552
|
-
function
|
|
582
|
+
function Qe(e) {
|
|
553
583
|
return JSON.parse(JSON.stringify(e));
|
|
554
584
|
}
|
|
555
|
-
function
|
|
585
|
+
function $e(e) {
|
|
556
586
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
557
587
|
for (let i of e) {
|
|
558
588
|
n[i.id] = {
|
|
@@ -564,10 +594,10 @@ function Ze(e) {
|
|
|
564
594
|
}
|
|
565
595
|
return t;
|
|
566
596
|
}
|
|
567
|
-
function
|
|
597
|
+
function et(e, t = " ") {
|
|
568
598
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
569
599
|
}
|
|
570
|
-
var
|
|
600
|
+
var tt = class {
|
|
571
601
|
constructor(e, t = [
|
|
572
602
|
"label",
|
|
573
603
|
"value",
|
|
@@ -585,7 +615,7 @@ var $e = class {
|
|
|
585
615
|
}
|
|
586
616
|
getName(e) {
|
|
587
617
|
if (!this.has(e)) return "-";
|
|
588
|
-
let t =
|
|
618
|
+
let t = Ae().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
589
619
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
590
620
|
}
|
|
591
621
|
getTag(e) {
|
|
@@ -611,40 +641,40 @@ var $e = class {
|
|
|
611
641
|
return this.labelMap.get(e) ?? null;
|
|
612
642
|
}
|
|
613
643
|
};
|
|
614
|
-
function
|
|
615
|
-
if (e.length == 0) return new
|
|
644
|
+
function nt(e, t = [], n = "i18nName") {
|
|
645
|
+
if (e.length == 0) return new tt([]);
|
|
616
646
|
if (t.length < 2) {
|
|
617
|
-
let e =
|
|
647
|
+
let e = X();
|
|
618
648
|
throw Error(e("tools.keysLengthError"));
|
|
619
649
|
}
|
|
620
|
-
return new
|
|
650
|
+
return new tt(e.map((e) => {
|
|
621
651
|
let r = {};
|
|
622
652
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
623
653
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
624
654
|
}), r;
|
|
625
655
|
}));
|
|
626
656
|
}
|
|
627
|
-
function
|
|
657
|
+
function rt(e) {
|
|
628
658
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
629
659
|
}
|
|
630
|
-
function
|
|
660
|
+
function it(e) {
|
|
631
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)))) : "";
|
|
632
662
|
}
|
|
633
|
-
function
|
|
663
|
+
function at(e, t = 10) {
|
|
634
664
|
let n = 1024 * 1024 * t;
|
|
635
665
|
return !(e.size > n);
|
|
636
666
|
}
|
|
637
|
-
function
|
|
667
|
+
function ot(e) {
|
|
638
668
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
639
669
|
}
|
|
640
|
-
function
|
|
670
|
+
function st(e) {
|
|
641
671
|
let t = {};
|
|
642
672
|
return e.map((e, n) => {
|
|
643
|
-
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);
|
|
644
674
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
645
675
|
}), t;
|
|
646
676
|
}
|
|
647
|
-
function
|
|
677
|
+
function ct(e, t) {
|
|
648
678
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
649
679
|
}
|
|
650
680
|
//#endregion
|
|
@@ -653,7 +683,7 @@ var $ = (e, t) => {
|
|
|
653
683
|
let n = e.__vccOpts || e;
|
|
654
684
|
for (let [e, r] of t) n[e] = r;
|
|
655
685
|
return n;
|
|
656
|
-
},
|
|
686
|
+
}, lt = ["onClick"], ut = /* @__PURE__ */ $({
|
|
657
687
|
__name: "index",
|
|
658
688
|
props: /* @__PURE__ */ b({
|
|
659
689
|
api: { type: Function },
|
|
@@ -696,9 +726,9 @@ var $ = (e, t) => {
|
|
|
696
726
|
"changeAll"
|
|
697
727
|
], ["update:modelValue"]),
|
|
698
728
|
setup(e, { emit: t }) {
|
|
699
|
-
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(() => {
|
|
700
730
|
if (r.remote !== void 0) return n.data;
|
|
701
|
-
let e =
|
|
731
|
+
let e = et(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
702
732
|
if (e.length == 0) return o;
|
|
703
733
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
704
734
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -712,7 +742,7 @@ var $ = (e, t) => {
|
|
|
712
742
|
set(e) {
|
|
713
743
|
return e;
|
|
714
744
|
}
|
|
715
|
-
}), b = t, C =
|
|
745
|
+
}), b = t, C = D([]);
|
|
716
746
|
n.api && (async () => {
|
|
717
747
|
let { data: e } = await n.api();
|
|
718
748
|
C.value = [...e], b("success", C);
|
|
@@ -722,7 +752,7 @@ var $ = (e, t) => {
|
|
|
722
752
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
723
753
|
});
|
|
724
754
|
}
|
|
725
|
-
let T =
|
|
755
|
+
let T = D(null);
|
|
726
756
|
function ee() {
|
|
727
757
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
728
758
|
b("change", e), S(() => {
|
|
@@ -732,82 +762,82 @@ var $ = (e, t) => {
|
|
|
732
762
|
function te(e) {
|
|
733
763
|
T.value = e;
|
|
734
764
|
}
|
|
735
|
-
let
|
|
736
|
-
if (
|
|
765
|
+
let ne = n.labelValue.label.split("-"), A = (e) => {
|
|
766
|
+
if (ne.length == 1) {
|
|
737
767
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
738
768
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
739
769
|
return t ||= e[n.labelValue.label], t + "";
|
|
740
770
|
} else {
|
|
741
771
|
let t = [];
|
|
742
|
-
return
|
|
772
|
+
return ne.forEach((n) => {
|
|
743
773
|
t.push(e[n]);
|
|
744
774
|
}), t.join("-");
|
|
745
775
|
}
|
|
746
776
|
};
|
|
747
|
-
function
|
|
777
|
+
function ie(e) {
|
|
748
778
|
let t = n.data ? n.data : C.value;
|
|
749
779
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
750
780
|
b("change", o.value), b("changeAll", o.value, t);
|
|
751
781
|
});
|
|
752
782
|
}
|
|
753
|
-
function
|
|
783
|
+
function se(e) {
|
|
754
784
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
755
785
|
n.optionClick && n.optionClick(e);
|
|
756
786
|
});
|
|
757
787
|
}
|
|
758
|
-
function
|
|
788
|
+
function ce(e) {
|
|
759
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);
|
|
760
790
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
761
791
|
}
|
|
762
|
-
function
|
|
792
|
+
function F(e) {
|
|
763
793
|
return e.map((e) => ({
|
|
764
794
|
...e,
|
|
765
|
-
label:
|
|
795
|
+
label: A(e),
|
|
766
796
|
value: s.value ? e : e[n.labelValue.value]
|
|
767
797
|
}));
|
|
768
798
|
}
|
|
769
|
-
let
|
|
770
|
-
|
|
771
|
-
let t =
|
|
772
|
-
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;
|
|
773
803
|
else {
|
|
774
804
|
let e = !1;
|
|
775
|
-
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) {
|
|
776
806
|
e = !0;
|
|
777
807
|
break;
|
|
778
808
|
}
|
|
779
|
-
e && (
|
|
809
|
+
e && (I.value = t);
|
|
780
810
|
}
|
|
781
811
|
}, { deep: !0 });
|
|
782
|
-
let
|
|
812
|
+
let L = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? I.value.map((e) => ({
|
|
783
813
|
...e,
|
|
784
|
-
disabled:
|
|
785
|
-
})) :
|
|
814
|
+
disabled: ce(e)
|
|
815
|
+
})) : I.value);
|
|
786
816
|
return (t, n) => {
|
|
787
|
-
let i =
|
|
788
|
-
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({
|
|
789
819
|
key: 1,
|
|
790
820
|
modelValue: o.value,
|
|
791
821
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
792
822
|
filterable: "",
|
|
793
823
|
"collapse-tags": "",
|
|
794
824
|
"collapse-tags-tooltip": "",
|
|
795
|
-
"filter-method":
|
|
825
|
+
"filter-method": M(r).remote == null ? (e) => _.value = e : void 0,
|
|
796
826
|
clearable: ""
|
|
797
|
-
},
|
|
798
|
-
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, {
|
|
799
829
|
class: "mgl20",
|
|
800
830
|
modelValue: y.value,
|
|
801
831
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
802
|
-
onChange:
|
|
832
|
+
onChange: ie
|
|
803
833
|
}, {
|
|
804
|
-
default:
|
|
834
|
+
default: P(() => [h(j(t.$t("quan-xuan")), 1)]),
|
|
805
835
|
_: 1
|
|
806
|
-
}, 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, {
|
|
807
837
|
key: n,
|
|
808
|
-
label:
|
|
809
|
-
disabled:
|
|
810
|
-
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"]),
|
|
811
841
|
value: s.value ? t : t[e.labelValue.value]
|
|
812
842
|
}, null, 8, [
|
|
813
843
|
"label",
|
|
@@ -818,82 +848,82 @@ var $ = (e, t) => {
|
|
|
818
848
|
_: 3
|
|
819
849
|
}, 16, ["modelValue", "filter-method"])) : (E(), u(a, x({
|
|
820
850
|
key: 0,
|
|
821
|
-
options:
|
|
851
|
+
options: L.value,
|
|
822
852
|
modelValue: o.value,
|
|
823
853
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
824
|
-
},
|
|
854
|
+
}, M(r), {
|
|
825
855
|
filterable: "",
|
|
826
856
|
"collapse-tags": "",
|
|
827
857
|
"collapse-tags-tooltip": "",
|
|
828
858
|
clearable: "",
|
|
829
859
|
onChange: w
|
|
830
860
|
}), m({
|
|
831
|
-
default:
|
|
861
|
+
default: P(({ item: e }) => [p("div", { onClick: (t) => te(e) }, j(e.label), 9, lt)]),
|
|
832
862
|
_: 2
|
|
833
|
-
}, [
|
|
863
|
+
}, [M(r).multiple == null ? void 0 : {
|
|
834
864
|
name: "header",
|
|
835
|
-
fn:
|
|
865
|
+
fn: P(() => [O(t.$slots, "header", {}, () => [g(i, {
|
|
836
866
|
class: "mgl20",
|
|
837
867
|
modelValue: y.value,
|
|
838
868
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
839
|
-
onChange:
|
|
869
|
+
onChange: ie
|
|
840
870
|
}, {
|
|
841
|
-
default:
|
|
871
|
+
default: P(() => [h(j(t.$t("quan-xuan")), 1)]),
|
|
842
872
|
_: 1
|
|
843
873
|
}, 8, ["modelValue"])], !0)]),
|
|
844
874
|
key: "0"
|
|
845
875
|
}]), 1040, ["options", "modelValue"]));
|
|
846
876
|
};
|
|
847
877
|
}
|
|
848
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
878
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), dt = _({ props: { name: {
|
|
849
879
|
tyepe: String,
|
|
850
880
|
required: !0
|
|
851
881
|
} } });
|
|
852
|
-
function
|
|
853
|
-
let o =
|
|
882
|
+
function ft(e, t, n, r, i, a) {
|
|
883
|
+
let o = k("el-icon");
|
|
854
884
|
return E(), u(o, { class: "cmp-icon" }, {
|
|
855
|
-
default:
|
|
885
|
+
default: P(() => [(E(), u(A(e.name)))]),
|
|
856
886
|
_: 1
|
|
857
887
|
});
|
|
858
888
|
}
|
|
859
|
-
var
|
|
889
|
+
var pt = /* @__PURE__ */ $(dt, [["render", ft], ["__scopeId", "data-v-733f9daa"]]), mt = {
|
|
860
890
|
__name: "index",
|
|
861
891
|
props: { fontColor: String },
|
|
862
892
|
setup(e) {
|
|
863
893
|
return (t, n) => {
|
|
864
|
-
let r =
|
|
894
|
+
let r = k("el-tag");
|
|
865
895
|
return E(), u(r, x(t.$attrs, { style: {
|
|
866
896
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
867
897
|
color: e.fontColor,
|
|
868
898
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
869
899
|
} }), {
|
|
870
|
-
default:
|
|
900
|
+
default: P(() => [O(t.$slots, "default")]),
|
|
871
901
|
_: 3
|
|
872
902
|
}, 16, ["style"]);
|
|
873
903
|
};
|
|
874
904
|
}
|
|
875
|
-
},
|
|
905
|
+
}, ht = { class: "confirm-button-wrapper" }, gt = /* @__PURE__ */ $({
|
|
876
906
|
__name: "index",
|
|
877
907
|
emits: ["ok", "no"],
|
|
878
908
|
setup(e, { emit: t }) {
|
|
879
|
-
let n = t, r =
|
|
909
|
+
let n = t, r = fe(() => {
|
|
880
910
|
n("ok");
|
|
881
911
|
}, 500);
|
|
882
912
|
function i() {
|
|
883
913
|
n("no");
|
|
884
914
|
}
|
|
885
915
|
return (e, t) => {
|
|
886
|
-
let n =
|
|
887
|
-
return E(), f("span",
|
|
888
|
-
onConfirm:
|
|
916
|
+
let n = k("el-popconfirm");
|
|
917
|
+
return E(), f("span", ht, [g(n, x(e.$attrs, {
|
|
918
|
+
onConfirm: M(r),
|
|
889
919
|
onCancel: i
|
|
890
920
|
}), {
|
|
891
|
-
reference:
|
|
921
|
+
reference: P(() => [O(e.$slots, "default", {}, void 0, !0)]),
|
|
892
922
|
_: 3
|
|
893
923
|
}, 16, ["onConfirm"])]);
|
|
894
924
|
};
|
|
895
925
|
}
|
|
896
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
926
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), _t = { class: "ImportButton" }, vt = ["accept"], yt = /* @__PURE__ */ $({
|
|
897
927
|
__name: "index",
|
|
898
928
|
props: {
|
|
899
929
|
accept: {
|
|
@@ -914,7 +944,7 @@ var dt = /* @__PURE__ */ $(lt, [["render", ut], ["__scopeId", "data-v-733f9daa"]
|
|
|
914
944
|
}
|
|
915
945
|
},
|
|
916
946
|
setup(e) {
|
|
917
|
-
let { t } =
|
|
947
|
+
let { t } = R(), n = e, r = D(null), a = D(!1);
|
|
918
948
|
function o(e) {
|
|
919
949
|
let t = e.match(/__v(\d+)/);
|
|
920
950
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -929,7 +959,7 @@ var dt = /* @__PURE__ */ $(lt, [["render", ut], ["__scopeId", "data-v-733f9daa"]
|
|
|
929
959
|
return;
|
|
930
960
|
}
|
|
931
961
|
}
|
|
932
|
-
let c = await
|
|
962
|
+
let c = await He(s, n.fields).catch(() => {
|
|
933
963
|
a.value = !1;
|
|
934
964
|
}).finally(() => {
|
|
935
965
|
r.value.value = null;
|
|
@@ -939,14 +969,14 @@ var dt = /* @__PURE__ */ $(lt, [["render", ut], ["__scopeId", "data-v-733f9daa"]
|
|
|
939
969
|
});
|
|
940
970
|
}
|
|
941
971
|
return (t, n) => {
|
|
942
|
-
let i =
|
|
943
|
-
return E(), f("div",
|
|
972
|
+
let i = k("el-button");
|
|
973
|
+
return E(), f("div", _t, [g(i, x({
|
|
944
974
|
type: "primary",
|
|
945
975
|
loading: a.value,
|
|
946
976
|
class: "mgr10",
|
|
947
977
|
onClick: n[0] ||= (e) => r.value.click()
|
|
948
978
|
}, t.$attrs), {
|
|
949
|
-
default:
|
|
979
|
+
default: P(() => [O(t.$slots, "default", {}, () => [h(j(t.$t("dao-ru")), 1)], !0)]),
|
|
950
980
|
_: 3
|
|
951
981
|
}, 16, ["loading"]), p("input", {
|
|
952
982
|
onChange: s,
|
|
@@ -960,27 +990,27 @@ var dt = /* @__PURE__ */ $(lt, [["render", ut], ["__scopeId", "data-v-733f9daa"]
|
|
|
960
990
|
opacity: "0"
|
|
961
991
|
},
|
|
962
992
|
type: "file"
|
|
963
|
-
}, null, 40,
|
|
993
|
+
}, null, 40, vt)]);
|
|
964
994
|
};
|
|
965
995
|
}
|
|
966
996
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
967
997
|
//#endregion
|
|
968
998
|
//#region src/components/SearchBar/tools.js
|
|
969
|
-
function
|
|
999
|
+
function bt(e) {
|
|
970
1000
|
let t = {};
|
|
971
1001
|
return e?.forEach((e) => {
|
|
972
1002
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date", format: s = (e) => e } = e;
|
|
973
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
1003
|
+
if (n) if (r == "input" && i?.multiple) t[n] = et(a);
|
|
974
1004
|
else if (r == "date") if (o.includes("range")) {
|
|
975
1005
|
let [e, r] = n, [i, s] = a || [];
|
|
976
|
-
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;
|
|
977
1007
|
} else t[n] = s(a);
|
|
978
1008
|
else t[n] = a;
|
|
979
1009
|
}), t;
|
|
980
1010
|
}
|
|
981
1011
|
//#endregion
|
|
982
1012
|
//#region src/components/SearchBar/index.vue
|
|
983
|
-
var
|
|
1013
|
+
var xt = { key: 0 }, St = { class: "btns" }, Ct = { class: "left" }, wt = { class: "right" }, Tt = /* @__PURE__ */ $({
|
|
984
1014
|
__name: "index",
|
|
985
1015
|
props: { form: {
|
|
986
1016
|
type: Object,
|
|
@@ -992,7 +1022,7 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
992
1022
|
"visibleChange"
|
|
993
1023
|
],
|
|
994
1024
|
setup(e, { expose: t, emit: n }) {
|
|
995
|
-
let r = e, i = n, a =
|
|
1025
|
+
let r = e, i = n, a = D(!0), o = D(null), { t: s } = R(), m = {
|
|
996
1026
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
997
1027
|
daterange: "YYYY-MM-DD",
|
|
998
1028
|
month: "YYYY-MM"
|
|
@@ -1010,9 +1040,9 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1010
1040
|
i("confirm");
|
|
1011
1041
|
}
|
|
1012
1042
|
function T() {
|
|
1013
|
-
return
|
|
1043
|
+
return bt(r.form.items);
|
|
1014
1044
|
}
|
|
1015
|
-
let ee =
|
|
1045
|
+
let ee = de(r.form.items);
|
|
1016
1046
|
function te() {
|
|
1017
1047
|
r.form?.items?.forEach((e) => {
|
|
1018
1048
|
let t = ee.find((t) => t.key == e.key);
|
|
@@ -1023,10 +1053,10 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1023
1053
|
getPrm: T,
|
|
1024
1054
|
reset: te
|
|
1025
1055
|
}), (t, n) => {
|
|
1026
|
-
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");
|
|
1027
1057
|
return E(), f("div", {
|
|
1028
1058
|
class: "searchBar-container mgt10 mgb10",
|
|
1029
|
-
onKeydown:
|
|
1059
|
+
onKeydown: ce(v, ["enter"])
|
|
1030
1060
|
}, [p("div", {
|
|
1031
1061
|
class: "searchBar",
|
|
1032
1062
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -1034,11 +1064,11 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1034
1064
|
inline: "",
|
|
1035
1065
|
model: e.form.data
|
|
1036
1066
|
}, {
|
|
1037
|
-
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, {
|
|
1038
1068
|
key: 1,
|
|
1039
1069
|
label: e.name
|
|
1040
1070
|
}, {
|
|
1041
|
-
default:
|
|
1071
|
+
default: P(() => [
|
|
1042
1072
|
e.type === "input" ? (E(), u(r, {
|
|
1043
1073
|
key: 0,
|
|
1044
1074
|
modelValue: e.value,
|
|
@@ -1051,8 +1081,8 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1051
1081
|
"onUpdate:modelValue",
|
|
1052
1082
|
"class",
|
|
1053
1083
|
"placeholder"
|
|
1054
|
-
])) : e.type === "custom" ? (E(), u(
|
|
1055
|
-
e.type === "select" ? (E(), u(
|
|
1084
|
+
])) : e.type === "custom" ? (E(), u(A(e.render), { key: 1 })) : d("", !0),
|
|
1085
|
+
e.type === "select" ? (E(), u(ut, x({
|
|
1056
1086
|
key: 2,
|
|
1057
1087
|
class: e.option?.class || "w150",
|
|
1058
1088
|
modelValue: e.value,
|
|
@@ -1099,7 +1129,7 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1099
1129
|
_: 2
|
|
1100
1130
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1101
1131
|
_: 1
|
|
1102
|
-
}, 8, ["model"])], 4), p("div",
|
|
1132
|
+
}, 8, ["model"])], 4), p("div", St, [p("div", Ct, [O(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", wt, [
|
|
1103
1133
|
g(ee, {
|
|
1104
1134
|
underline: "never",
|
|
1105
1135
|
class: "mgr10",
|
|
@@ -1107,28 +1137,28 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1107
1137
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1108
1138
|
}
|
|
1109
1139
|
}, {
|
|
1110
|
-
default:
|
|
1140
|
+
default: P(() => [g(pt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + j(_.value), 1)]),
|
|
1111
1141
|
_: 1
|
|
1112
1142
|
}),
|
|
1113
1143
|
g(te, {
|
|
1114
1144
|
type: "primary",
|
|
1115
1145
|
onClick: v
|
|
1116
1146
|
}, {
|
|
1117
|
-
default:
|
|
1147
|
+
default: P(() => [h(j(t.$t("shai-xuan")), 1)]),
|
|
1118
1148
|
_: 1
|
|
1119
1149
|
}),
|
|
1120
1150
|
g(te, {
|
|
1121
1151
|
type: "primary",
|
|
1122
1152
|
onClick: b
|
|
1123
1153
|
}, {
|
|
1124
|
-
default:
|
|
1154
|
+
default: P(() => [h(j(t.$t("chong-zhi")), 1)]),
|
|
1125
1155
|
_: 1
|
|
1126
1156
|
}),
|
|
1127
|
-
|
|
1157
|
+
O(t.$slots, "btn", {}, void 0, !0)
|
|
1128
1158
|
])])], 32);
|
|
1129
1159
|
};
|
|
1130
1160
|
}
|
|
1131
|
-
}, [["__scopeId", "data-v-3e596b3b"]]),
|
|
1161
|
+
}, [["__scopeId", "data-v-3e596b3b"]]), Et = {
|
|
1132
1162
|
pageNoKey: "pageNo",
|
|
1133
1163
|
pageSizeKey: "pageSize",
|
|
1134
1164
|
totalKey: "total",
|
|
@@ -1152,26 +1182,26 @@ var yt = { key: 0 }, bt = { class: "btns" }, xt = { class: "left" }, St = { clas
|
|
|
1152
1182
|
showShadow: !1,
|
|
1153
1183
|
showCheckBox: !1,
|
|
1154
1184
|
enableCellCopy: !0
|
|
1155
|
-
},
|
|
1156
|
-
function
|
|
1157
|
-
|
|
1158
|
-
...
|
|
1185
|
+
}, Dt = { ...Et };
|
|
1186
|
+
function Ot(e) {
|
|
1187
|
+
Dt = {
|
|
1188
|
+
...Dt,
|
|
1159
1189
|
...e,
|
|
1160
1190
|
responseDataKeys: {
|
|
1161
|
-
...
|
|
1191
|
+
...Dt.responseDataKeys,
|
|
1162
1192
|
...e.responseDataKeys || {}
|
|
1163
1193
|
}
|
|
1164
1194
|
};
|
|
1165
1195
|
}
|
|
1166
|
-
function
|
|
1167
|
-
return
|
|
1196
|
+
function kt() {
|
|
1197
|
+
return Dt;
|
|
1168
1198
|
}
|
|
1169
|
-
function
|
|
1170
|
-
|
|
1199
|
+
function At() {
|
|
1200
|
+
Dt = { ...Et };
|
|
1171
1201
|
}
|
|
1172
1202
|
//#endregion
|
|
1173
1203
|
//#region src/components/ListPage/index.vue
|
|
1174
|
-
var
|
|
1204
|
+
var jt = { class: "center" }, Mt = 0, Nt = 20, Pt = .3, Ft = /* @__PURE__ */ $({
|
|
1175
1205
|
__name: "index",
|
|
1176
1206
|
props: {
|
|
1177
1207
|
id: {
|
|
@@ -1201,21 +1231,21 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1201
1231
|
}
|
|
1202
1232
|
},
|
|
1203
1233
|
setup(e, { expose: t }) {
|
|
1204
|
-
let { t: n, locale: r } =
|
|
1234
|
+
let { t: n, locale: r } = R(), i = kt(), a = e, o = D(!1), s = D([]);
|
|
1205
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 = []);
|
|
1206
|
-
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({
|
|
1207
1237
|
[_]: 1,
|
|
1208
1238
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1209
1239
|
total: 0
|
|
1210
|
-
}), b =
|
|
1240
|
+
}), b = D(null), w = D(null), re = D(450), A = fe(() => {
|
|
1211
1241
|
S(() => {
|
|
1212
1242
|
if (!w.value) return;
|
|
1213
1243
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1214
|
-
|
|
1244
|
+
re.value = Math.max(t, 200);
|
|
1215
1245
|
});
|
|
1216
|
-
}, 100),
|
|
1217
|
-
|
|
1218
|
-
},
|
|
1246
|
+
}, 100), ie = () => {
|
|
1247
|
+
A();
|
|
1248
|
+
}, N = () => {
|
|
1219
1249
|
if (b.value) return b.value;
|
|
1220
1250
|
let e = w.value;
|
|
1221
1251
|
if (e) {
|
|
@@ -1223,39 +1253,39 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1223
1253
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1224
1254
|
}
|
|
1225
1255
|
return null;
|
|
1226
|
-
},
|
|
1256
|
+
}, ae = () => {
|
|
1227
1257
|
if (!a.searchForm.enableCellCopy) return !1;
|
|
1228
|
-
let e =
|
|
1258
|
+
let e = N();
|
|
1229
1259
|
if (!e || !e.$el) return !1;
|
|
1230
1260
|
let t = e.$el;
|
|
1231
|
-
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);
|
|
1232
1262
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1233
|
-
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;
|
|
1234
1264
|
};
|
|
1235
1265
|
T(() => {
|
|
1236
|
-
|
|
1237
|
-
|
|
1266
|
+
A(), window.addEventListener("resize", ie), a.searchForm.enableCellCopy && (document.addEventListener("mouseup", Fe), document.addEventListener("mousedown", Ie), setTimeout(() => {
|
|
1267
|
+
ae();
|
|
1238
1268
|
}, 500));
|
|
1239
1269
|
}), te(() => {
|
|
1240
1270
|
a.searchForm.enableCellCopy && setTimeout(() => {
|
|
1241
|
-
|
|
1271
|
+
ae();
|
|
1242
1272
|
}, 500);
|
|
1243
1273
|
}), ee(() => {
|
|
1244
|
-
if (window.removeEventListener("resize",
|
|
1245
|
-
document.removeEventListener("mouseup",
|
|
1246
|
-
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();
|
|
1247
1277
|
if (e && e.$el) {
|
|
1248
1278
|
let t = e.$el;
|
|
1249
|
-
t.removeEventListener("mousedown",
|
|
1279
|
+
t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove", Ee), t.removeEventListener("mouseup", De), t.removeEventListener("keydown", Pe);
|
|
1250
1280
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1251
|
-
n && (n.removeEventListener("scroll",
|
|
1281
|
+
n && (n.removeEventListener("scroll", je), n.__cellCopyScrollBound = !1);
|
|
1252
1282
|
}
|
|
1253
1283
|
}
|
|
1254
1284
|
});
|
|
1255
|
-
let
|
|
1256
|
-
async function
|
|
1285
|
+
let oe = l(() => ge.value.height || re.value), se;
|
|
1286
|
+
async function ce(e) {
|
|
1257
1287
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1258
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1288
|
+
e[_] != 1 && (e.nextSearchAfter = se), o.value = !0;
|
|
1259
1289
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1260
1290
|
o.value = !1, a.searchForm.selections = [];
|
|
1261
1291
|
});
|
|
@@ -1266,7 +1296,7 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1266
1296
|
});
|
|
1267
1297
|
let e = [];
|
|
1268
1298
|
for (let n of t.rows) {
|
|
1269
|
-
let t =
|
|
1299
|
+
let t = ct(c, n);
|
|
1270
1300
|
if (t) {
|
|
1271
1301
|
e = t;
|
|
1272
1302
|
break;
|
|
@@ -1274,60 +1304,60 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1274
1304
|
}
|
|
1275
1305
|
let i = 0;
|
|
1276
1306
|
for (let e of t.total) {
|
|
1277
|
-
let t =
|
|
1307
|
+
let t = ct(c, e);
|
|
1278
1308
|
if (t !== void 0) {
|
|
1279
1309
|
i = t;
|
|
1280
1310
|
break;
|
|
1281
1311
|
}
|
|
1282
1312
|
}
|
|
1283
|
-
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(() => {
|
|
1284
1314
|
setTimeout(() => {
|
|
1285
|
-
|
|
1315
|
+
ae();
|
|
1286
1316
|
}, 500);
|
|
1287
1317
|
}));
|
|
1288
1318
|
}
|
|
1289
1319
|
}
|
|
1290
|
-
function
|
|
1320
|
+
function F(e = {}) {
|
|
1291
1321
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1292
|
-
|
|
1322
|
+
ce({
|
|
1293
1323
|
...y,
|
|
1294
|
-
...
|
|
1324
|
+
...bt(a.searchForm.items),
|
|
1295
1325
|
...e,
|
|
1296
1326
|
...n
|
|
1297
1327
|
});
|
|
1298
1328
|
}
|
|
1299
|
-
function
|
|
1329
|
+
function I() {
|
|
1300
1330
|
let { reset: e } = a.tableConfig;
|
|
1301
1331
|
e && e(), a.searchForm?.items?.forEach((e) => {
|
|
1302
|
-
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);
|
|
1303
1333
|
t && (e.value = t.value);
|
|
1304
|
-
}),
|
|
1334
|
+
}), F();
|
|
1305
1335
|
}
|
|
1306
|
-
a.api && a.immediate &&
|
|
1307
|
-
function
|
|
1336
|
+
a.api && a.immediate && F();
|
|
1337
|
+
function L() {
|
|
1308
1338
|
return {
|
|
1309
1339
|
...y,
|
|
1310
|
-
...
|
|
1340
|
+
...bt(a.searchForm.items)
|
|
1311
1341
|
};
|
|
1312
1342
|
}
|
|
1313
|
-
let
|
|
1343
|
+
let ue = () => {
|
|
1314
1344
|
let e = b.value;
|
|
1315
1345
|
e && e.clearSort();
|
|
1316
|
-
},
|
|
1346
|
+
}, me = ne({ storage: !0 }), he = ne({
|
|
1317
1347
|
drag: !0,
|
|
1318
1348
|
resizable: !0,
|
|
1319
1349
|
maxFixedSize: 0
|
|
1320
|
-
}),
|
|
1350
|
+
}), ge = l(() => {
|
|
1321
1351
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1322
1352
|
return {
|
|
1323
1353
|
headerAlign: "left",
|
|
1324
1354
|
align: "center",
|
|
1325
1355
|
customConfig: {
|
|
1326
|
-
...
|
|
1356
|
+
...me,
|
|
1327
1357
|
...e
|
|
1328
1358
|
},
|
|
1329
1359
|
columnConfig: {
|
|
1330
|
-
...
|
|
1360
|
+
...he,
|
|
1331
1361
|
...t
|
|
1332
1362
|
},
|
|
1333
1363
|
"virtual-x-config": {
|
|
@@ -1340,18 +1370,18 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1340
1370
|
},
|
|
1341
1371
|
...n
|
|
1342
1372
|
};
|
|
1343
|
-
}),
|
|
1373
|
+
}), z = ne({
|
|
1344
1374
|
isSelecting: !1,
|
|
1345
1375
|
startCell: null,
|
|
1346
1376
|
endCell: null,
|
|
1347
1377
|
selectedCells: []
|
|
1348
|
-
}),
|
|
1349
|
-
if (!
|
|
1350
|
-
|
|
1378
|
+
}), B = null, _e = () => {
|
|
1379
|
+
if (!z.startCell || !z.endCell) {
|
|
1380
|
+
B = null, z.selectedCells = [];
|
|
1351
1381
|
return;
|
|
1352
1382
|
}
|
|
1353
|
-
let e = Math.min(
|
|
1354
|
-
|
|
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 = {
|
|
1355
1385
|
minRow: e,
|
|
1356
1386
|
maxRow: t,
|
|
1357
1387
|
minCol: n,
|
|
@@ -1362,25 +1392,25 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1362
1392
|
rowIndex: a,
|
|
1363
1393
|
colIndex: e
|
|
1364
1394
|
});
|
|
1365
|
-
|
|
1366
|
-
},
|
|
1395
|
+
z.selectedCells = i;
|
|
1396
|
+
}, V = /* @__PURE__ */ new WeakMap(), ve = null, ye = 0, be = (e, t) => {
|
|
1367
1397
|
let n = e.getTableData().fullData;
|
|
1368
|
-
if (n !==
|
|
1369
|
-
|
|
1370
|
-
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);
|
|
1371
1401
|
}
|
|
1372
|
-
return
|
|
1373
|
-
},
|
|
1402
|
+
return V.has(t) ? V.get(t) : -1;
|
|
1403
|
+
}, xe = (e) => {
|
|
1374
1404
|
let t = e.closest(".vxe-body--column");
|
|
1375
1405
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1376
1406
|
let n = t.closest(".vxe-body--row");
|
|
1377
1407
|
if (!n) return null;
|
|
1378
|
-
let r =
|
|
1408
|
+
let r = N();
|
|
1379
1409
|
if (!r) return null;
|
|
1380
1410
|
let i = -1, a = n.getAttribute("rowid");
|
|
1381
1411
|
if (a != null) {
|
|
1382
1412
|
let e = r.getRowById(a);
|
|
1383
|
-
e && (i =
|
|
1413
|
+
e && (i = be(r, e));
|
|
1384
1414
|
}
|
|
1385
1415
|
if (i < 0) {
|
|
1386
1416
|
let e = n.parentElement;
|
|
@@ -1393,49 +1423,49 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1393
1423
|
colIndex: o,
|
|
1394
1424
|
cell: t
|
|
1395
1425
|
};
|
|
1396
|
-
},
|
|
1397
|
-
if (!
|
|
1398
|
-
|
|
1399
|
-
let t =
|
|
1426
|
+
}, H = null, U = 0, Se = (e) => {
|
|
1427
|
+
if (!z.isSelecting) return;
|
|
1428
|
+
U = e.clientY;
|
|
1429
|
+
let t = N();
|
|
1400
1430
|
if (!t || !t.$el) return;
|
|
1401
1431
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1402
1432
|
if (!r) return;
|
|
1403
1433
|
let i = r.getBoundingClientRect();
|
|
1404
|
-
e.clientY < i.top -
|
|
1405
|
-
},
|
|
1434
|
+
e.clientY < i.top - Mt || e.clientY > i.bottom + Mt ? H || Ce() : W();
|
|
1435
|
+
}, Ce = () => {
|
|
1406
1436
|
let e = () => {
|
|
1407
|
-
if (!
|
|
1408
|
-
|
|
1437
|
+
if (!z.isSelecting) {
|
|
1438
|
+
W();
|
|
1409
1439
|
return;
|
|
1410
1440
|
}
|
|
1411
|
-
let t =
|
|
1441
|
+
let t = N();
|
|
1412
1442
|
if (!t || !t.$el) {
|
|
1413
|
-
|
|
1443
|
+
W();
|
|
1414
1444
|
return;
|
|
1415
1445
|
}
|
|
1416
1446
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1417
1447
|
if (!r) {
|
|
1418
|
-
|
|
1448
|
+
W();
|
|
1419
1449
|
return;
|
|
1420
1450
|
}
|
|
1421
1451
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1422
|
-
if (
|
|
1423
|
-
let e = i.top -
|
|
1424
|
-
a = -Math.min(
|
|
1425
|
-
} else if (
|
|
1426
|
-
let e =
|
|
1427
|
-
a = Math.min(
|
|
1452
|
+
if (U < i.top) {
|
|
1453
|
+
let e = i.top - U;
|
|
1454
|
+
a = -Math.min(Nt, Math.max(2, e * Pt));
|
|
1455
|
+
} else if (U > i.bottom) {
|
|
1456
|
+
let e = U - i.bottom;
|
|
1457
|
+
a = Math.min(Nt, Math.max(2, e * Pt));
|
|
1428
1458
|
} else {
|
|
1429
|
-
|
|
1459
|
+
W();
|
|
1430
1460
|
return;
|
|
1431
1461
|
}
|
|
1432
|
-
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);
|
|
1433
1463
|
};
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1436
|
-
|
|
1437
|
-
},
|
|
1438
|
-
let n =
|
|
1464
|
+
H = requestAnimationFrame(e);
|
|
1465
|
+
}, W = () => {
|
|
1466
|
+
H &&= (cancelAnimationFrame(H), null);
|
|
1467
|
+
}, we = (e, t) => {
|
|
1468
|
+
let n = N();
|
|
1439
1469
|
if (!n) return;
|
|
1440
1470
|
let r = n.getTableData().fullData;
|
|
1441
1471
|
if (!r || r.length === 0) return;
|
|
@@ -1444,53 +1474,53 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1444
1474
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1445
1475
|
if (a.length === 0) return;
|
|
1446
1476
|
let o = null;
|
|
1447
|
-
if (
|
|
1477
|
+
if (U < t.top ? o = a[0] : U > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1448
1478
|
let s = o.getAttribute("rowid");
|
|
1449
1479
|
if (s == null) return;
|
|
1450
1480
|
let c = -1, l = n.getRowById(s);
|
|
1451
1481
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1452
|
-
let u =
|
|
1453
|
-
|
|
1482
|
+
let u = z.endCell ? z.endCell.colIndex : z.startCell ? z.startCell.colIndex : 0;
|
|
1483
|
+
z.endCell = {
|
|
1454
1484
|
rowIndex: c,
|
|
1455
1485
|
colIndex: u
|
|
1456
|
-
},
|
|
1457
|
-
},
|
|
1458
|
-
let t =
|
|
1486
|
+
}, _e(), q();
|
|
1487
|
+
}, Te = (e) => {
|
|
1488
|
+
let t = xe(e.target);
|
|
1459
1489
|
if (!t) {
|
|
1460
|
-
|
|
1490
|
+
Oe();
|
|
1461
1491
|
return;
|
|
1462
1492
|
}
|
|
1463
|
-
let n =
|
|
1464
|
-
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 = {
|
|
1465
1495
|
rowIndex: t.rowIndex,
|
|
1466
1496
|
colIndex: t.colIndex
|
|
1467
|
-
},
|
|
1468
|
-
},
|
|
1469
|
-
|
|
1470
|
-
if (
|
|
1471
|
-
let t =
|
|
1472
|
-
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 = {
|
|
1473
1503
|
rowIndex: t.rowIndex,
|
|
1474
1504
|
colIndex: t.colIndex
|
|
1475
|
-
},
|
|
1505
|
+
}, _e(), q()));
|
|
1476
1506
|
}));
|
|
1477
|
-
}, Ee = () => {
|
|
1478
|
-
B.isSelecting = !1, G(), K &&= (cancelAnimationFrame(K), null), document.removeEventListener("mousemove", xe);
|
|
1479
1507
|
}, De = () => {
|
|
1480
|
-
|
|
1481
|
-
|
|
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();
|
|
1482
1512
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1483
1513
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1484
1514
|
});
|
|
1485
|
-
},
|
|
1486
|
-
let e =
|
|
1515
|
+
}, K = () => {
|
|
1516
|
+
let e = N();
|
|
1487
1517
|
if (!e) return;
|
|
1488
1518
|
let t = e.$el;
|
|
1489
1519
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1490
1520
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1491
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");
|
|
1492
|
-
if (!
|
|
1493
|
-
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();
|
|
1494
1524
|
for (let t = r; t <= i; t++) {
|
|
1495
1525
|
let n = c[t];
|
|
1496
1526
|
if (n) {
|
|
@@ -1511,7 +1541,7 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1511
1541
|
let d = l.get(String(u));
|
|
1512
1542
|
if (d === void 0) {
|
|
1513
1543
|
let t = e.getRowById(u);
|
|
1514
|
-
if (t && (d =
|
|
1544
|
+
if (t && (d = be(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1515
1545
|
}
|
|
1516
1546
|
if (d < r || d > i) continue;
|
|
1517
1547
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1522,33 +1552,33 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1522
1552
|
}
|
|
1523
1553
|
}
|
|
1524
1554
|
}
|
|
1525
|
-
},
|
|
1555
|
+
}, q = () => {
|
|
1526
1556
|
S(() => {
|
|
1527
|
-
|
|
1557
|
+
K();
|
|
1528
1558
|
});
|
|
1529
|
-
},
|
|
1530
|
-
|
|
1531
|
-
|
|
1559
|
+
}, J = null, Y = null, ke = () => {
|
|
1560
|
+
Y ||= requestAnimationFrame(() => {
|
|
1561
|
+
Y = null, K();
|
|
1532
1562
|
});
|
|
1533
|
-
},
|
|
1534
|
-
let e =
|
|
1563
|
+
}, Ae = () => {
|
|
1564
|
+
let e = N();
|
|
1535
1565
|
if (!e || !e.$el) return;
|
|
1536
1566
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1537
|
-
t && (
|
|
1538
|
-
|
|
1539
|
-
}),
|
|
1567
|
+
t && (X(), J = new MutationObserver(() => {
|
|
1568
|
+
B && ke();
|
|
1569
|
+
}), J.observe(t, {
|
|
1540
1570
|
childList: !0,
|
|
1541
1571
|
subtree: !1
|
|
1542
1572
|
}));
|
|
1543
|
-
},
|
|
1544
|
-
|
|
1545
|
-
},
|
|
1546
|
-
|
|
1547
|
-
},
|
|
1548
|
-
if (!
|
|
1549
|
-
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();
|
|
1550
1580
|
if (!e) return;
|
|
1551
|
-
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 = [];
|
|
1552
1582
|
for (let e = i; e <= a; e++) c.push(e);
|
|
1553
1583
|
let l = [];
|
|
1554
1584
|
for (let e = o; e <= s; e++) l.push(e);
|
|
@@ -1592,9 +1622,9 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1592
1622
|
});
|
|
1593
1623
|
o = e == null ? "" : String(e);
|
|
1594
1624
|
} catch {
|
|
1595
|
-
o = s ?
|
|
1625
|
+
o = s ? Me(i[s]) : "";
|
|
1596
1626
|
}
|
|
1597
|
-
else s && (o =
|
|
1627
|
+
else s && (o = Me(i[s]));
|
|
1598
1628
|
a.push(o);
|
|
1599
1629
|
}), f.push(a.join(" "));
|
|
1600
1630
|
});
|
|
@@ -1604,23 +1634,23 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1604
1634
|
} catch (e) {
|
|
1605
1635
|
console.error("复制失败:", e);
|
|
1606
1636
|
}
|
|
1607
|
-
},
|
|
1608
|
-
a.searchForm.enableCellCopy && ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1609
|
-
},
|
|
1610
|
-
|
|
1611
|
-
}, Fe = (e) => {
|
|
1612
|
-
let t = P();
|
|
1613
|
-
!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);
|
|
1614
1641
|
}, Ie = (e) => {
|
|
1615
|
-
|
|
1642
|
+
let t = N();
|
|
1643
|
+
!t || !t.$el || t.$el.contains(e.target) || Oe();
|
|
1616
1644
|
}, Le = (e) => {
|
|
1617
|
-
y[
|
|
1645
|
+
y[_] = e, F();
|
|
1646
|
+
}, Re = (e) => {
|
|
1647
|
+
y[v] = e, y[_] = 1, F();
|
|
1618
1648
|
};
|
|
1619
|
-
function
|
|
1649
|
+
function Z() {
|
|
1620
1650
|
let e = b.value.getCheckboxRecords();
|
|
1621
1651
|
a.searchForm.selections = e;
|
|
1622
1652
|
}
|
|
1623
|
-
let
|
|
1653
|
+
let Q = (e) => {
|
|
1624
1654
|
let t = b.value;
|
|
1625
1655
|
if (t) {
|
|
1626
1656
|
t.toggleCheckboxRow(e);
|
|
@@ -1630,35 +1660,35 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1630
1660
|
};
|
|
1631
1661
|
return t({
|
|
1632
1662
|
tableRef: b,
|
|
1633
|
-
getList:
|
|
1634
|
-
getPrm:
|
|
1635
|
-
clearSort:
|
|
1636
|
-
calculateTableHeight:
|
|
1663
|
+
getList: F,
|
|
1664
|
+
getPrm: L,
|
|
1665
|
+
clearSort: ue,
|
|
1666
|
+
calculateTableHeight: A
|
|
1637
1667
|
}), (t, n) => {
|
|
1638
|
-
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");
|
|
1639
1669
|
return E(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1640
|
-
e.searchForm.showSearch ? (E(), u(
|
|
1670
|
+
e.searchForm.showSearch ? (E(), u(Tt, {
|
|
1641
1671
|
key: 0,
|
|
1642
1672
|
form: e.searchForm,
|
|
1643
|
-
onReset:
|
|
1644
|
-
onConfirm: n[1] ||= (e) =>
|
|
1645
|
-
onVisibleChange:
|
|
1673
|
+
onReset: I,
|
|
1674
|
+
onConfirm: n[1] ||= (e) => F(),
|
|
1675
|
+
onVisibleChange: M(A)
|
|
1646
1676
|
}, {
|
|
1647
|
-
btn:
|
|
1677
|
+
btn: P(() => [
|
|
1648
1678
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1649
|
-
|
|
1679
|
+
O(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1650
1680
|
g(a, {
|
|
1651
1681
|
class: "mgl10",
|
|
1652
1682
|
round: "",
|
|
1653
1683
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1654
1684
|
}, {
|
|
1655
|
-
default:
|
|
1685
|
+
default: P(() => [g(pt, { name: "Tools" })]),
|
|
1656
1686
|
_: 1
|
|
1657
1687
|
})
|
|
1658
1688
|
]),
|
|
1659
1689
|
_: 3
|
|
1660
1690
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1661
|
-
|
|
1691
|
+
O(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1662
1692
|
p("div", {
|
|
1663
1693
|
ref_key: "tableContentRef",
|
|
1664
1694
|
ref: w,
|
|
@@ -1670,41 +1700,41 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1670
1700
|
loading: e.loading || o.value,
|
|
1671
1701
|
data: e.api ? s.value : e.data,
|
|
1672
1702
|
border: ""
|
|
1673
|
-
},
|
|
1674
|
-
height:
|
|
1675
|
-
onCheckboxChange:
|
|
1676
|
-
onCheckboxAll:
|
|
1677
|
-
onSortChange:
|
|
1678
|
-
onScroll:
|
|
1703
|
+
}, ge.value, {
|
|
1704
|
+
height: oe.value,
|
|
1705
|
+
onCheckboxChange: Z,
|
|
1706
|
+
onCheckboxAll: Z,
|
|
1707
|
+
onSortChange: ge.value["sort-config"]?.sortChange,
|
|
1708
|
+
onScroll: je
|
|
1679
1709
|
}), {
|
|
1680
|
-
default:
|
|
1710
|
+
default: P(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (E(), u(S, {
|
|
1681
1711
|
key: 0,
|
|
1682
1712
|
type: "checkbox",
|
|
1683
|
-
width:
|
|
1713
|
+
width: M(r) == "zh_cn" ? 80 : 150,
|
|
1684
1714
|
title: t.$t("xu-hao"),
|
|
1685
1715
|
fixed: "left"
|
|
1686
1716
|
}, {
|
|
1687
|
-
checkbox:
|
|
1717
|
+
checkbox: P(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", jt, [n ? (E(), u(l, {
|
|
1688
1718
|
key: 0,
|
|
1689
1719
|
checked: !0,
|
|
1690
1720
|
disabled: r,
|
|
1691
1721
|
size: "default",
|
|
1692
|
-
onClick:
|
|
1722
|
+
onClick: le((e) => !r && Q(t), ["stop"])
|
|
1693
1723
|
}, null, 8, ["disabled", "onClick"])) : (E(), u(l, {
|
|
1694
1724
|
key: 1,
|
|
1695
1725
|
disabled: r,
|
|
1696
1726
|
checked: !1,
|
|
1697
1727
|
size: "default",
|
|
1698
|
-
onClick:
|
|
1728
|
+
onClick: le((e) => !r && Q(t), ["stop"])
|
|
1699
1729
|
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1700
1730
|
type: "info",
|
|
1701
1731
|
class: "mgl5"
|
|
1702
1732
|
}, {
|
|
1703
|
-
default:
|
|
1733
|
+
default: P(() => [h(j(e + 1), 1)]),
|
|
1704
1734
|
_: 2
|
|
1705
1735
|
}, 1024)])]),
|
|
1706
1736
|
_: 1
|
|
1707
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1737
|
+
}, 8, ["width", "title"])) : d("", !0), O(t.$slots, "default", {}, void 0, !0)]),
|
|
1708
1738
|
_: 3
|
|
1709
1739
|
}, 16, [
|
|
1710
1740
|
"id",
|
|
@@ -1715,16 +1745,16 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1715
1745
|
])], 2),
|
|
1716
1746
|
e.searchForm.showPage ? (E(), u(ee, {
|
|
1717
1747
|
key: 1,
|
|
1718
|
-
"current-page": y[
|
|
1719
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1748
|
+
"current-page": y[M(_)],
|
|
1749
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[M(_)] = e,
|
|
1720
1750
|
class: "myPagination mgt10",
|
|
1721
1751
|
background: "",
|
|
1722
1752
|
layout: "total, sizes, prev, pager, next",
|
|
1723
1753
|
total: y.total,
|
|
1724
|
-
"page-size": y[
|
|
1725
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1726
|
-
onCurrentChange:
|
|
1727
|
-
onSizeChange:
|
|
1754
|
+
"page-size": y[M(v)],
|
|
1755
|
+
"page-sizes": e.searchForm.pageSizes || M(i).pageSizes,
|
|
1756
|
+
onCurrentChange: Le,
|
|
1757
|
+
onSizeChange: Re
|
|
1728
1758
|
}, null, 8, [
|
|
1729
1759
|
"current-page",
|
|
1730
1760
|
"total",
|
|
@@ -1734,10 +1764,10 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1734
1764
|
], 2);
|
|
1735
1765
|
};
|
|
1736
1766
|
}
|
|
1737
|
-
}, [["__scopeId", "data-v-257f5bc0"]]),
|
|
1767
|
+
}, [["__scopeId", "data-v-257f5bc0"]]), It = {
|
|
1738
1768
|
key: 0,
|
|
1739
1769
|
class: "down-excel-temp__spinner"
|
|
1740
|
-
},
|
|
1770
|
+
}, Lt = /* @__PURE__ */ $({
|
|
1741
1771
|
__name: "index",
|
|
1742
1772
|
props: {
|
|
1743
1773
|
sheetsConfig: {
|
|
@@ -1754,7 +1784,7 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1754
1784
|
}
|
|
1755
1785
|
},
|
|
1756
1786
|
setup(e) {
|
|
1757
|
-
let t = e, n =
|
|
1787
|
+
let t = e, n = D(!1);
|
|
1758
1788
|
async function r(e) {
|
|
1759
1789
|
let t = Object.entries(e), n = await Promise.all(t.map(async ([e, t]) => {
|
|
1760
1790
|
let { tableData: n } = t, r = n;
|
|
@@ -1769,7 +1799,7 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1769
1799
|
if (!n.value) {
|
|
1770
1800
|
n.value = !0;
|
|
1771
1801
|
try {
|
|
1772
|
-
await
|
|
1802
|
+
await We(t.fileName + (t.version ? `__v${t.version}` : ""), await r(t.sheetsConfig));
|
|
1773
1803
|
} catch (e) {
|
|
1774
1804
|
console.error("[DownExcelTemp] 导出失败:", e), i.error(e?.message || "Export failed");
|
|
1775
1805
|
} finally {
|
|
@@ -1778,29 +1808,29 @@ var kt = { class: "center" }, At = 0, jt = 20, Mt = .3, Nt = /* @__PURE__ */ $({
|
|
|
1778
1808
|
}
|
|
1779
1809
|
}
|
|
1780
1810
|
return (e, t) => {
|
|
1781
|
-
let r =
|
|
1811
|
+
let r = k("el-link");
|
|
1782
1812
|
return E(), u(r, x({
|
|
1783
1813
|
type: "primary",
|
|
1784
1814
|
underline: "never",
|
|
1785
1815
|
disabled: n.value
|
|
1786
1816
|
}, e.$attrs, { onClick: a }), {
|
|
1787
|
-
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)]),
|
|
1788
1818
|
_: 3
|
|
1789
1819
|
}, 16, ["disabled"]);
|
|
1790
1820
|
};
|
|
1791
1821
|
}
|
|
1792
|
-
}, [["__scopeId", "data-v-86bece44"]]),
|
|
1822
|
+
}, [["__scopeId", "data-v-86bece44"]]), Rt = {
|
|
1793
1823
|
mounted(e, t) {
|
|
1794
|
-
t.value &&
|
|
1824
|
+
t.value && zt(e);
|
|
1795
1825
|
},
|
|
1796
1826
|
updated(e, t) {
|
|
1797
|
-
t.value ?
|
|
1827
|
+
t.value ? zt(e) : Bt(e);
|
|
1798
1828
|
},
|
|
1799
1829
|
beforeUnmount(e) {
|
|
1800
|
-
|
|
1830
|
+
Bt(e);
|
|
1801
1831
|
}
|
|
1802
1832
|
};
|
|
1803
|
-
async function
|
|
1833
|
+
async function zt(e) {
|
|
1804
1834
|
await f();
|
|
1805
1835
|
let t = e.querySelector(".el-dialog");
|
|
1806
1836
|
if (!t) return;
|
|
@@ -1863,15 +1893,15 @@ async function Lt(e) {
|
|
|
1863
1893
|
}
|
|
1864
1894
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1865
1895
|
}
|
|
1866
|
-
function
|
|
1896
|
+
function Bt(e) {
|
|
1867
1897
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1868
1898
|
}
|
|
1869
1899
|
//#endregion
|
|
1870
1900
|
//#region src/components/Layer/index.vue
|
|
1871
|
-
var
|
|
1901
|
+
var Vt = {
|
|
1872
1902
|
key: 0,
|
|
1873
1903
|
class: "drawer-btn"
|
|
1874
|
-
},
|
|
1904
|
+
}, Ht = { key: 1 }, Ut = {
|
|
1875
1905
|
__name: "index",
|
|
1876
1906
|
props: {
|
|
1877
1907
|
layer: {
|
|
@@ -1891,7 +1921,7 @@ var zt = {
|
|
|
1891
1921
|
},
|
|
1892
1922
|
emits: ["confirm"],
|
|
1893
1923
|
setup(e, { emit: t }) {
|
|
1894
|
-
let n = e, r = t, { t: i } =
|
|
1924
|
+
let n = e, r = t, { t: i } = R(), o = fe(() => {
|
|
1895
1925
|
r("confirm");
|
|
1896
1926
|
}, 300);
|
|
1897
1927
|
async function s() {
|
|
@@ -1902,7 +1932,7 @@ var zt = {
|
|
|
1902
1932
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1903
1933
|
}
|
|
1904
1934
|
return (t, n) => {
|
|
1905
|
-
let r =
|
|
1935
|
+
let r = k("el-button"), i = k("el-drawer"), a = k("el-dialog");
|
|
1906
1936
|
return e.layer.type ? (E(), u(i, {
|
|
1907
1937
|
key: 0,
|
|
1908
1938
|
modelValue: e.layer.show,
|
|
@@ -1914,18 +1944,18 @@ var zt = {
|
|
|
1914
1944
|
"before-close": s,
|
|
1915
1945
|
class: "drawer-content"
|
|
1916
1946
|
}, {
|
|
1917
|
-
default:
|
|
1918
|
-
|
|
1947
|
+
default: P(() => [
|
|
1948
|
+
O(t.$slots, "default"),
|
|
1919
1949
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1920
|
-
e.layer.showButton ? (E(), f("div",
|
|
1921
|
-
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)]),
|
|
1922
1952
|
_: 1
|
|
1923
1953
|
}), g(r, {
|
|
1924
1954
|
type: "primary",
|
|
1925
1955
|
loading: e.loading,
|
|
1926
|
-
onClick:
|
|
1956
|
+
onClick: M(o)
|
|
1927
1957
|
}, {
|
|
1928
|
-
default:
|
|
1958
|
+
default: P(() => [h(j(t.$t("ti-jiao")), 1)]),
|
|
1929
1959
|
_: 1
|
|
1930
1960
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1931
1961
|
]),
|
|
@@ -1934,7 +1964,7 @@ var zt = {
|
|
|
1934
1964
|
"modelValue",
|
|
1935
1965
|
"size",
|
|
1936
1966
|
"title"
|
|
1937
|
-
])) :
|
|
1967
|
+
])) : se((E(), f("div", Ht, [g(a, {
|
|
1938
1968
|
"close-on-click-modal": !1,
|
|
1939
1969
|
modelValue: e.layer.show,
|
|
1940
1970
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1942,19 +1972,19 @@ var zt = {
|
|
|
1942
1972
|
width: e.layer.width || 500,
|
|
1943
1973
|
center: ""
|
|
1944
1974
|
}, m({
|
|
1945
|
-
default:
|
|
1975
|
+
default: P(() => [O(t.$slots, "default")]),
|
|
1946
1976
|
_: 2
|
|
1947
1977
|
}, [e.layer.showButton ? {
|
|
1948
1978
|
name: "footer",
|
|
1949
|
-
fn:
|
|
1950
|
-
default:
|
|
1979
|
+
fn: P(() => [O(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1980
|
+
default: P(() => [h(j(t.$t("qu-xiao")), 1)]),
|
|
1951
1981
|
_: 1
|
|
1952
1982
|
}), g(r, {
|
|
1953
1983
|
type: "primary",
|
|
1954
1984
|
loading: e.loading,
|
|
1955
|
-
onClick:
|
|
1985
|
+
onClick: M(o)
|
|
1956
1986
|
}, {
|
|
1957
|
-
default:
|
|
1987
|
+
default: P(() => [h(j(t.$t("ti-jiao")), 1)]),
|
|
1958
1988
|
_: 1
|
|
1959
1989
|
}, 8, ["loading", "onClick"])])]),
|
|
1960
1990
|
key: "0"
|
|
@@ -1962,14 +1992,14 @@ var zt = {
|
|
|
1962
1992
|
"modelValue",
|
|
1963
1993
|
"title",
|
|
1964
1994
|
"width"
|
|
1965
|
-
])])), [[
|
|
1995
|
+
])])), [[M(Rt), e.layer.show]]);
|
|
1966
1996
|
};
|
|
1967
1997
|
}
|
|
1968
1998
|
};
|
|
1969
1999
|
//#endregion
|
|
1970
2000
|
//#region src/utils/tools/validate.js
|
|
1971
|
-
function
|
|
1972
|
-
let n =
|
|
2001
|
+
function Wt(e, t = {}) {
|
|
2002
|
+
let n = X(), r = {
|
|
1973
2003
|
inForm: !0,
|
|
1974
2004
|
required: !0,
|
|
1975
2005
|
...t
|
|
@@ -1988,7 +2018,7 @@ function Ht(e, t = {}) {
|
|
|
1988
2018
|
}
|
|
1989
2019
|
//#endregion
|
|
1990
2020
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1991
|
-
var
|
|
2021
|
+
var Gt = class {
|
|
1992
2022
|
constructor(e = {}) {
|
|
1993
2023
|
this.config = {
|
|
1994
2024
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2135,42 +2165,42 @@ var Ut = class {
|
|
|
2135
2165
|
};
|
|
2136
2166
|
//#endregion
|
|
2137
2167
|
//#region src/utils/tools/format.js
|
|
2138
|
-
function
|
|
2168
|
+
function Kt(e, t = 2, n = ".", r = ",") {
|
|
2139
2169
|
(e == null || e === "") && (e = 0);
|
|
2140
2170
|
let i = Number(e);
|
|
2141
2171
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2142
2172
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2143
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;
|
|
2144
2174
|
}
|
|
2145
|
-
function
|
|
2146
|
-
return
|
|
2175
|
+
function qt(e, t = 2) {
|
|
2176
|
+
return Kt(e, t);
|
|
2147
2177
|
}
|
|
2148
|
-
function
|
|
2178
|
+
function Jt(e, t = 2) {
|
|
2149
2179
|
(e == null || e === "") && (e = 0);
|
|
2150
2180
|
let n = Number(e);
|
|
2151
|
-
return e = isNaN(n) ? 0 : n,
|
|
2181
|
+
return e = isNaN(n) ? 0 : n, Kt(e * 100, t) + "%";
|
|
2152
2182
|
}
|
|
2153
2183
|
//#endregion
|
|
2154
2184
|
//#region src/utils/hook/common.js
|
|
2155
|
-
function
|
|
2185
|
+
function Yt(e, t = {}) {
|
|
2156
2186
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2157
2187
|
manual: !1,
|
|
2158
2188
|
log: !1,
|
|
2159
2189
|
params: null,
|
|
2160
2190
|
format: null
|
|
2161
|
-
}, t), s =
|
|
2191
|
+
}, t), s = D([]), c = D(!1), l = (t) => {
|
|
2162
2192
|
let n = t || i;
|
|
2163
2193
|
c.value = !0, e(n).then((e) => {
|
|
2164
2194
|
let { code: t, data: c, msg: l } = e;
|
|
2165
2195
|
if (a) {
|
|
2166
2196
|
let { records: t, rows: n } = c || {};
|
|
2167
|
-
s.value =
|
|
2197
|
+
s.value = Qt(t || n ? t || n : c, o), a(e);
|
|
2168
2198
|
}
|
|
2169
2199
|
if (c) {
|
|
2170
2200
|
if (c.records != null || c.rows != null) {
|
|
2171
2201
|
let { records: e, rows: t, total: r = 0, totalRows: a = 0 } = c || {};
|
|
2172
|
-
n && n.total != null && (i.total = parseInt(r || a)), s.value =
|
|
2173
|
-
} 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);
|
|
2174
2204
|
r && console.log("useRequest-res", s.value);
|
|
2175
2205
|
}
|
|
2176
2206
|
}).catch((e) => {
|
|
@@ -2185,9 +2215,9 @@ function qt(e, t = {}) {
|
|
|
2185
2215
|
l
|
|
2186
2216
|
];
|
|
2187
2217
|
}
|
|
2188
|
-
function
|
|
2189
|
-
let t =
|
|
2190
|
-
return
|
|
2218
|
+
function Xt(e) {
|
|
2219
|
+
let t = D(e), n = D(""), r = D("");
|
|
2220
|
+
return oe(t, (e) => {
|
|
2191
2221
|
let t = e || ["", ""];
|
|
2192
2222
|
n.value = t[0], r.value = t[1];
|
|
2193
2223
|
}), [
|
|
@@ -2196,10 +2226,10 @@ function Jt(e) {
|
|
|
2196
2226
|
r
|
|
2197
2227
|
];
|
|
2198
2228
|
}
|
|
2199
|
-
function
|
|
2229
|
+
function Zt(e) {
|
|
2200
2230
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2201
2231
|
}
|
|
2202
|
-
function
|
|
2232
|
+
function Qt(e, t) {
|
|
2203
2233
|
if (!t) return e;
|
|
2204
2234
|
if (e instanceof Array) return e.map((e) => {
|
|
2205
2235
|
let n = {};
|
|
@@ -2210,47 +2240,47 @@ function Xt(e, t) {
|
|
|
2210
2240
|
}
|
|
2211
2241
|
//#endregion
|
|
2212
2242
|
//#region src/utils/hook/i18n.js
|
|
2213
|
-
function
|
|
2214
|
-
let { locale: n } =
|
|
2215
|
-
return
|
|
2243
|
+
function $t(e, t = []) {
|
|
2244
|
+
let { locale: n } = R(), r = D(e());
|
|
2245
|
+
return oe([n, ...t], () => {
|
|
2216
2246
|
r.value = e();
|
|
2217
2247
|
}, { immediate: !0 }), r;
|
|
2218
2248
|
}
|
|
2219
|
-
function
|
|
2249
|
+
function en(e, t = "zh_cn", n = "en_us") {
|
|
2220
2250
|
return e && (e[{
|
|
2221
2251
|
en_us: n,
|
|
2222
2252
|
zh_cn: t
|
|
2223
|
-
}[
|
|
2253
|
+
}[Ae().global.locale.value]] || e[t]) || "-";
|
|
2224
2254
|
}
|
|
2225
2255
|
//#endregion
|
|
2226
2256
|
//#region src/utils/hook/storeHook.js
|
|
2227
|
-
function $t(e, t) {
|
|
2228
|
-
let n = V;
|
|
2229
|
-
return typeof e == "string" && e.length > 0 && (n = me(e).mapState), nn(t, n);
|
|
2230
|
-
}
|
|
2231
|
-
function en(e, t) {
|
|
2232
|
-
let n = B;
|
|
2233
|
-
return typeof e == "string" && e.length > 0 && (n = me(e).mapGetters), nn(t, n);
|
|
2234
|
-
}
|
|
2235
2257
|
function tn(e, t) {
|
|
2236
|
-
let n =
|
|
2237
|
-
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);
|
|
2238
2260
|
}
|
|
2239
2261
|
function nn(e, t) {
|
|
2240
|
-
let n =
|
|
2262
|
+
let n = z;
|
|
2263
|
+
return typeof e == "string" && e.length > 0 && (n = he(e).mapGetters), an(t, n);
|
|
2264
|
+
}
|
|
2265
|
+
function rn(e, t) {
|
|
2266
|
+
let n = ge;
|
|
2267
|
+
return typeof e == "string" && e.length > 0 && (n = he(e).mapActions), on(t, n);
|
|
2268
|
+
}
|
|
2269
|
+
function an(e, t) {
|
|
2270
|
+
let n = _e(), r = t(e), i = {};
|
|
2241
2271
|
return Object.keys(r).forEach((e) => {
|
|
2242
2272
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2243
2273
|
}), i;
|
|
2244
2274
|
}
|
|
2245
|
-
function
|
|
2246
|
-
let n =
|
|
2275
|
+
function on(e, t) {
|
|
2276
|
+
let n = _e(), r = t(e), i = {};
|
|
2247
2277
|
return Object.keys(r).forEach((e) => {
|
|
2248
2278
|
i[e] = r[e].bind({ $store: n });
|
|
2249
2279
|
}), i;
|
|
2250
2280
|
}
|
|
2251
|
-
function
|
|
2252
|
-
let [n, r, i] = t, { locale: a } =
|
|
2253
|
-
return l(() =>
|
|
2281
|
+
function sn(e, t = []) {
|
|
2282
|
+
let [n, r, i] = t, { locale: a } = R();
|
|
2283
|
+
return l(() => ie(e).map((e) => {
|
|
2254
2284
|
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2255
2285
|
return {
|
|
2256
2286
|
...e,
|
|
@@ -2261,42 +2291,42 @@ function an(e, t = []) {
|
|
|
2261
2291
|
}
|
|
2262
2292
|
//#endregion
|
|
2263
2293
|
//#region src/components/VxeTable/index.jsx
|
|
2264
|
-
function
|
|
2294
|
+
function cn(e) {
|
|
2265
2295
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2266
2296
|
}
|
|
2267
|
-
function
|
|
2268
|
-
|
|
2269
|
-
return Wt(e, t);
|
|
2270
|
-
} }), H.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2271
|
-
return Gt(e, t);
|
|
2272
|
-
} }), H.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2297
|
+
function ln() {
|
|
2298
|
+
V.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2273
2299
|
return Kt(e, t);
|
|
2300
|
+
} }), V.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2301
|
+
return qt(e, t);
|
|
2302
|
+
} }), V.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2303
|
+
return Jt(e, t);
|
|
2274
2304
|
} });
|
|
2275
2305
|
}
|
|
2276
|
-
function
|
|
2277
|
-
|
|
2306
|
+
function un() {
|
|
2307
|
+
V.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2278
2308
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2279
2309
|
let n = t.row[t.column.field], r = e.enum.getItem(n);
|
|
2280
2310
|
if (!r) return n || "-";
|
|
2281
|
-
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } =
|
|
2282
|
-
return e.type == "tag" ? s ? g(
|
|
2311
|
+
let { label: i, labelEn: a, tag: o, color: s } = r, { locale: c } = R(), l = c.value == "zh_cn" ? i : a;
|
|
2312
|
+
return e.type == "tag" ? s ? g(mt, { fontColor: s }, { default: () => [
|
|
2283
2313
|
h(" "),
|
|
2284
2314
|
l,
|
|
2285
2315
|
h(" ")
|
|
2286
|
-
] }) : g(
|
|
2316
|
+
] }) : g(mt, { type: o }, { default: () => [
|
|
2287
2317
|
h(" "),
|
|
2288
2318
|
l,
|
|
2289
2319
|
h(" ")
|
|
2290
|
-
] }) : e.type == "text" ? g(
|
|
2320
|
+
] }) : e.type == "text" ? g(k("el-text"), { type: o }, { default: () => [
|
|
2291
2321
|
h(" "),
|
|
2292
2322
|
l,
|
|
2293
2323
|
h(" ")
|
|
2294
|
-
] }) : g(
|
|
2324
|
+
] }) : g(k("el-text"), null, { default: () => [
|
|
2295
2325
|
h(" "),
|
|
2296
2326
|
l,
|
|
2297
2327
|
h(" ")
|
|
2298
2328
|
] });
|
|
2299
|
-
} }),
|
|
2329
|
+
} }), V.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2300
2330
|
return g(n, x({
|
|
2301
2331
|
modelValue: t.row[t.column.field],
|
|
2302
2332
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2304,14 +2334,14 @@ function cn() {
|
|
|
2304
2334
|
"step-strictly": !0,
|
|
2305
2335
|
"value-on-clear": 0
|
|
2306
2336
|
}), null);
|
|
2307
|
-
} }),
|
|
2308
|
-
let { locale: n } =
|
|
2337
|
+
} }), V.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2338
|
+
let { locale: n } = R(), r = n.value == "zh_cn";
|
|
2309
2339
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2310
|
-
} }),
|
|
2311
|
-
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;
|
|
2312
2342
|
return t.row[r] || t.row[t.column.field];
|
|
2313
|
-
} }),
|
|
2314
|
-
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];
|
|
2315
2345
|
function c(e, t) {
|
|
2316
2346
|
o == "blank" ? window.open(e) : i.push({
|
|
2317
2347
|
path: e,
|
|
@@ -2323,15 +2353,15 @@ function cn() {
|
|
|
2323
2353
|
underline: "never",
|
|
2324
2354
|
type: "primary",
|
|
2325
2355
|
onclick: () => c(o == "system" ? a : e, e)
|
|
2326
|
-
},
|
|
2356
|
+
}, cn(e) ? e : { default: () => [e] })])) : g(r, {
|
|
2327
2357
|
underline: "never",
|
|
2328
2358
|
type: "primary",
|
|
2329
2359
|
onclick: () => c(o == "system" ? a : s, s)
|
|
2330
|
-
},
|
|
2360
|
+
}, cn(s) ? s : { default: () => [s] });
|
|
2331
2361
|
} });
|
|
2332
2362
|
}
|
|
2333
|
-
function
|
|
2334
|
-
|
|
2363
|
+
function dn() {
|
|
2364
|
+
ln(), un();
|
|
2335
2365
|
}
|
|
2336
2366
|
//#endregion
|
|
2337
|
-
export {
|
|
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 };
|