joy-admin-components 0.2.93 → 0.2.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CmpIcon/index.d.ts +13 -23
- package/dist/components/ConfrimButton/index.d.ts +9 -0
- package/dist/components/ImportButton/index.d.ts +18 -0
- package/dist/joy-admin-components.css +1 -1
- package/dist/joy-admin-components.es.js +572 -460
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/locales/index.d.ts +7 -2
- package/package.json +1 -1
|
@@ -1,24 +1,24 @@
|
|
|
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 E, onUpdated as D, openBlock as O, reactive as k, ref as A, renderList as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
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 E, onUpdated as D, openBlock as O, reactive as k, ref as A, renderList as ee, renderSlot as j, resolveComponent as M, resolveDynamicComponent as N, toDisplayString as P, unref as F, useAttrs as te, useModel as ne, watch as re, withCtx as I, withDirectives as L, withKeys as ie, withModifiers as ae } from "vue";
|
|
3
|
+
import { saveAs as R } from "file-saver";
|
|
4
|
+
import z from "exceljs";
|
|
5
|
+
import B from "dayjs";
|
|
6
|
+
import { createI18n as oe, useI18n as V } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as se, debounce as ce, isArray as le } from "lodash";
|
|
8
|
+
import { createNamespacedHelpers as ue, mapActions as de, mapGetters as fe, mapState as H, useStore as pe } from "vuex";
|
|
9
|
+
import { VxeUI as U } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as W } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var G = Object.create, me = Object.defineProperty, K = Object.getOwnPropertyDescriptor, he = Object.getOwnPropertyNames, ge = Object.getPrototypeOf, _e = Object.prototype.hasOwnProperty, q = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ve = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = he(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !_e.call(e, s) && s !== n && me(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = K(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, ye = (e, t, n) => (n = e == null ? {} : G(ge(e)), ve(t || !e || !e.__esModule ? me(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), be = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
24
|
let s = A(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
@@ -36,7 +36,7 @@ var de = Object.create, Y = Object.defineProperty, fe = Object.getOwnPropertyDes
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), J = /* @__PURE__ */ q(((e, t) => {
|
|
40
40
|
(function(n, r) {
|
|
41
41
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_utc = r();
|
|
42
42
|
})(e, (function() {
|
|
@@ -120,7 +120,7 @@ var de = Object.create, Y = Object.defineProperty, fe = Object.getOwnPropertyDes
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), xe = /* @__PURE__ */ q(((e, t) => {
|
|
124
124
|
(function(n, r) {
|
|
125
125
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_timezone = r();
|
|
126
126
|
})(e, (function() {
|
|
@@ -196,7 +196,7 @@ var de = Object.create, Y = Object.defineProperty, fe = Object.getOwnPropertyDes
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), Se = /* @__PURE__ */ ye(J()), Ce = /* @__PURE__ */ ye(xe()), Y = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -224,7 +224,7 @@ var de = Object.create, Y = Object.defineProperty, fe = Object.getOwnPropertyDes
|
|
|
224
224
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
227
|
+
}, X = {
|
|
228
228
|
"dao-ru": "Import",
|
|
229
229
|
"quan-xuan": "Select All",
|
|
230
230
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -252,36 +252,36 @@ var de = Object.create, Y = Object.defineProperty, fe = Object.getOwnPropertyDes
|
|
|
252
252
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
253
253
|
validate: { invalidInput: "Please enter valid content" },
|
|
254
254
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
255
|
-
},
|
|
256
|
-
zh_cn:
|
|
257
|
-
en_us:
|
|
258
|
-
},
|
|
259
|
-
function
|
|
255
|
+
}, we = {
|
|
256
|
+
zh_cn: Y,
|
|
257
|
+
en_us: X
|
|
258
|
+
}, Te = null;
|
|
259
|
+
function Ee(e = null) {
|
|
260
260
|
if (e) {
|
|
261
261
|
let { global: t } = e;
|
|
262
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
262
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", Y) : t.setLocaleMessage("zh_cn", Y), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", X) : t.setLocaleMessage("en_us", X), Te = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return Te ||= oe({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
270
|
-
}
|
|
271
|
-
function Oe() {
|
|
272
|
-
return Ee || De();
|
|
268
|
+
messages: we
|
|
269
|
+
}), Te;
|
|
273
270
|
}
|
|
274
271
|
function Z() {
|
|
275
|
-
return
|
|
272
|
+
return Te || Ee();
|
|
273
|
+
}
|
|
274
|
+
function Q() {
|
|
275
|
+
return Z().global.t;
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
async function
|
|
277
|
+
B.extend(Se.default), B.extend(Ce.default);
|
|
278
|
+
async function De(e, t) {
|
|
279
279
|
let { fields: n, range: r = 1 } = t;
|
|
280
280
|
if (!n) {
|
|
281
|
-
let e =
|
|
281
|
+
let e = Q();
|
|
282
282
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
283
283
|
}
|
|
284
|
-
let i = new
|
|
284
|
+
let i = new z.Workbook();
|
|
285
285
|
await i.xlsx.load(e);
|
|
286
286
|
let a = {};
|
|
287
287
|
return i.eachSheet(function(e, t) {
|
|
@@ -297,41 +297,41 @@ async function ke(e, t) {
|
|
|
297
297
|
}), a[e._name] = i;
|
|
298
298
|
}), i = null, a;
|
|
299
299
|
}
|
|
300
|
-
var
|
|
301
|
-
async function
|
|
300
|
+
var Oe = { columnWidth: 30 };
|
|
301
|
+
async function ke(e, t, n = [], r = {}) {
|
|
302
302
|
if (!e || !t) return;
|
|
303
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
303
|
+
let { columnStyle: i } = r, { columnWidth: a } = Oe;
|
|
304
304
|
t.forEach((e) => {
|
|
305
305
|
e.width = e.width ? e.width : a;
|
|
306
306
|
});
|
|
307
|
-
let { workbook: o, worksheet: s } =
|
|
308
|
-
s.columns = t, s.addRows(n), i && await
|
|
307
|
+
let { workbook: o, worksheet: s } = Ae();
|
|
308
|
+
s.columns = t, s.addRows(n), i && await je(o, s, i);
|
|
309
309
|
try {
|
|
310
310
|
let t = await o.xlsx.writeBuffer();
|
|
311
|
-
|
|
311
|
+
R(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
312
312
|
} catch (e) {
|
|
313
313
|
console.log(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
let e = new
|
|
316
|
+
function Ae() {
|
|
317
|
+
let e = new z.Workbook();
|
|
318
318
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
319
319
|
workbook: e,
|
|
320
320
|
worksheet: e.addWorksheet("Sheet1")
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
async function
|
|
323
|
+
async function je(e, t, n) {
|
|
324
324
|
let r = Object.keys(n);
|
|
325
325
|
for (let i of r) {
|
|
326
326
|
let r = n[i], { type: a } = r;
|
|
327
327
|
switch (a) {
|
|
328
328
|
case "IMG":
|
|
329
|
-
await
|
|
329
|
+
await Me(e, t, i, r);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
async function
|
|
334
|
+
async function Me(e, t, n, r) {
|
|
335
335
|
let i = t.getColumn(n), a = i.values;
|
|
336
336
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
337
337
|
t > 1 && (e.height = 40);
|
|
@@ -339,7 +339,7 @@ async function Pe(e, t, n, r) {
|
|
|
339
339
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
340
340
|
if (n < 2) continue;
|
|
341
341
|
let r = a[n];
|
|
342
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
342
|
+
r && (t.getCell(i.letter + n).value = "", await Ne(e, t, r, {
|
|
343
343
|
width: 100,
|
|
344
344
|
height: 50,
|
|
345
345
|
col: i._number - 1,
|
|
@@ -347,8 +347,8 @@ async function Pe(e, t, n, r) {
|
|
|
347
347
|
}));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
async function
|
|
351
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
350
|
+
async function Ne(e, t, n, r) {
|
|
351
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Pe(n, .3);
|
|
352
352
|
if (c) {
|
|
353
353
|
let n = e.addImage({
|
|
354
354
|
base64: l,
|
|
@@ -366,7 +366,7 @@ async function Fe(e, t, n, r) {
|
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Pe(e, t = 1) {
|
|
370
370
|
let n = new Image();
|
|
371
371
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
372
372
|
n.onload = () => {
|
|
@@ -380,14 +380,14 @@ function Ie(e, t = 1) {
|
|
|
380
380
|
};
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
|
-
var
|
|
384
|
-
async function
|
|
383
|
+
var Fe = "---";
|
|
384
|
+
async function Ie(e, t) {
|
|
385
385
|
let { fields: n, range: r = 1 } = t;
|
|
386
386
|
if (!n) {
|
|
387
|
-
let e =
|
|
387
|
+
let e = Q();
|
|
388
388
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
389
389
|
}
|
|
390
|
-
let i = new
|
|
390
|
+
let i = new z.Workbook();
|
|
391
391
|
await i.xlsx.load(e);
|
|
392
392
|
let a = {};
|
|
393
393
|
return i.eachSheet(function(e, t) {
|
|
@@ -405,8 +405,8 @@ async function Re(e, t) {
|
|
|
405
405
|
if (i > r) {
|
|
406
406
|
let r = { _excelRowNumber: i }, a = !0;
|
|
407
407
|
Object.keys(o).forEach((t) => {
|
|
408
|
-
let [c, l] = o[t].split(
|
|
409
|
-
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ?
|
|
408
|
+
let [c, l] = o[t].split(Fe), u = e.getCell(c), d;
|
|
409
|
+
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? B(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Fe)[1]), r[t] = d, d && (a = !1);
|
|
410
410
|
}), a || t.push(r);
|
|
411
411
|
}
|
|
412
412
|
}), a[e._name] = t;
|
|
@@ -414,16 +414,16 @@ async function Re(e, t) {
|
|
|
414
414
|
}
|
|
415
415
|
}), i = null, a;
|
|
416
416
|
}
|
|
417
|
-
var
|
|
417
|
+
var Le = {
|
|
418
418
|
date: "yyyy-mm-dd",
|
|
419
419
|
number: "0",
|
|
420
420
|
string: "@"
|
|
421
421
|
};
|
|
422
|
-
async function
|
|
422
|
+
async function Re(e, t) {
|
|
423
423
|
if (!e || t.length == 0) return;
|
|
424
|
-
let n =
|
|
424
|
+
let n = ze(t);
|
|
425
425
|
for (let e of n.worksheets) {
|
|
426
|
-
let { columnWidth: r } =
|
|
426
|
+
let { columnWidth: r } = Oe, i = t[e.name];
|
|
427
427
|
if (!i) continue;
|
|
428
428
|
let { tableHeader: a, tableData: o } = i;
|
|
429
429
|
a.forEach((e) => {
|
|
@@ -437,11 +437,11 @@ async function Be(e, t) {
|
|
|
437
437
|
};
|
|
438
438
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
439
439
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
440
|
-
if (d.numFmt =
|
|
440
|
+
if (d.numFmt = Le[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
441
441
|
let t = n.addWorksheet(a);
|
|
442
|
-
t.state = "hidden", u ||= (e) => `${e.label}${
|
|
442
|
+
t.state = "hidden", u ||= (e) => `${e.label}${Fe}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
443
443
|
if (n > 0) {
|
|
444
|
-
let t =
|
|
444
|
+
let t = Q();
|
|
445
445
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
446
446
|
type: "list",
|
|
447
447
|
formulae: [`${a}!$A$1:$A$${s.length}`],
|
|
@@ -460,34 +460,34 @@ async function Be(e, t) {
|
|
|
460
460
|
}
|
|
461
461
|
try {
|
|
462
462
|
let t = await n.xlsx.writeBuffer();
|
|
463
|
-
|
|
463
|
+
R(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
464
464
|
} catch (e) {
|
|
465
465
|
console.log(e);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
let t =
|
|
468
|
+
function ze(e) {
|
|
469
|
+
let t = Q(), n = new z.Workbook();
|
|
470
470
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((t, n) => (e[t].sort ?? 0) - (e[n].sort ?? 0)).forEach((r) => {
|
|
471
471
|
let i = r, a = !1;
|
|
472
472
|
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), a = !0), r.length > 31 && (r = r.substring(0, 31).trim(), a = !0, console.warn(t("excel.sheetNameTooLong", [i, r]))), a && (e[r] = e[i], delete e[i]), n.addWorksheet(r);
|
|
473
473
|
}), n;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Be(e) {
|
|
476
476
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
477
477
|
}
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/utils/tools/tools.js
|
|
480
|
-
function
|
|
480
|
+
function Ve(e) {
|
|
481
481
|
return new Promise((t) => {
|
|
482
482
|
setTimeout(() => {
|
|
483
483
|
t();
|
|
484
484
|
}, e);
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function He(e) {
|
|
488
488
|
return JSON.parse(JSON.stringify(e));
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Ue(e) {
|
|
491
491
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
492
492
|
for (let i of e) {
|
|
493
493
|
n[i.id] = {
|
|
@@ -499,10 +499,10 @@ function Ge(e) {
|
|
|
499
499
|
}
|
|
500
500
|
return t;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function We(e, t = " ") {
|
|
503
503
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
504
504
|
}
|
|
505
|
-
var
|
|
505
|
+
var Ge = class {
|
|
506
506
|
constructor(e, t = [
|
|
507
507
|
"label",
|
|
508
508
|
"value",
|
|
@@ -517,7 +517,7 @@ var qe = class {
|
|
|
517
517
|
}
|
|
518
518
|
getName(e) {
|
|
519
519
|
if (!this.has(e)) return "-";
|
|
520
|
-
let t =
|
|
520
|
+
let t = Z().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
521
521
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
522
522
|
}
|
|
523
523
|
getTag(e) {
|
|
@@ -537,49 +537,49 @@ var qe = class {
|
|
|
537
537
|
return this.map.has(e);
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
|
-
function
|
|
541
|
-
if (e.length == 0) return new
|
|
540
|
+
function Ke(e, t = [], n = "i18nName") {
|
|
541
|
+
if (e.length == 0) return new Ge([]);
|
|
542
542
|
if (t.length < 2) {
|
|
543
|
-
let e =
|
|
543
|
+
let e = Q();
|
|
544
544
|
throw Error(e("tools.keysLengthError"));
|
|
545
545
|
}
|
|
546
|
-
return new
|
|
546
|
+
return new Ge(e.map((e) => {
|
|
547
547
|
let r = {};
|
|
548
548
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
549
549
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
550
550
|
}), r;
|
|
551
551
|
}));
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function qe(e) {
|
|
554
554
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function Je(e) {
|
|
557
557
|
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)))) : "";
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Ye(e, t = 10) {
|
|
560
560
|
let n = 1024 * 1024 * t;
|
|
561
561
|
return !(e.size > n);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Xe(e) {
|
|
564
564
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function Ze(e) {
|
|
567
567
|
let t = {};
|
|
568
568
|
return e.map((e, n) => {
|
|
569
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
569
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = Be(n);
|
|
570
570
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
571
571
|
}), t;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Qe(e, t) {
|
|
574
574
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region \0plugin-vue:export-helper
|
|
578
|
-
var
|
|
578
|
+
var $ = (e, t) => {
|
|
579
579
|
let n = e.__vccOpts || e;
|
|
580
580
|
for (let [e, r] of t) n[e] = r;
|
|
581
581
|
return n;
|
|
582
|
-
},
|
|
582
|
+
}, $e = ["onClick"], et = /* @__PURE__ */ $({
|
|
583
583
|
__name: "index",
|
|
584
584
|
props: /* @__PURE__ */ b({
|
|
585
585
|
api: { type: Function },
|
|
@@ -622,9 +622,9 @@ var Q = (e, t) => {
|
|
|
622
622
|
"changeAll"
|
|
623
623
|
], ["update:modelValue"]),
|
|
624
624
|
setup(e, { emit: t }) {
|
|
625
|
-
let n = e, r =
|
|
625
|
+
let n = e, r = te(), { t: i, locale: a } = V(), o = ne(e, "modelValue"), s = l(() => r["value-key"] != null), _ = A(""), v = l(() => {
|
|
626
626
|
if (r.remote !== void 0) return n.data;
|
|
627
|
-
let e =
|
|
627
|
+
let e = We(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
628
628
|
if (e.length == 0) return o;
|
|
629
629
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
630
630
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -658,7 +658,7 @@ var Q = (e, t) => {
|
|
|
658
658
|
function D(e) {
|
|
659
659
|
T.value = e;
|
|
660
660
|
}
|
|
661
|
-
let k = n.labelValue.label.split("-"),
|
|
661
|
+
let k = n.labelValue.label.split("-"), N = (e) => {
|
|
662
662
|
if (k.length == 1) {
|
|
663
663
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
664
664
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
@@ -670,70 +670,70 @@ var Q = (e, t) => {
|
|
|
670
670
|
}), t.join("-");
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
|
-
function
|
|
673
|
+
function L(e) {
|
|
674
674
|
let t = n.data ? n.data : C.value;
|
|
675
675
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
676
676
|
b("change", o.value), b("changeAll", o.value, t);
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function ie(e) {
|
|
680
680
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
681
681
|
n.optionClick && n.optionClick(e);
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function R(e) {
|
|
685
685
|
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);
|
|
686
686
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function z(e) {
|
|
689
689
|
return e.map((e) => ({
|
|
690
690
|
...e,
|
|
691
|
-
label:
|
|
691
|
+
label: N(e),
|
|
692
692
|
value: s.value ? e : e[n.labelValue.value]
|
|
693
693
|
}));
|
|
694
694
|
}
|
|
695
|
-
let
|
|
696
|
-
|
|
697
|
-
let t =
|
|
698
|
-
if (t.length !==
|
|
695
|
+
let B = A([]);
|
|
696
|
+
B.value = z(n.data ? n.data : C.value), re(() => n.data ? n.data : C.value, (e) => {
|
|
697
|
+
let t = z(e);
|
|
698
|
+
if (t.length !== B.value.length) B.value = t;
|
|
699
699
|
else {
|
|
700
700
|
let e = !1;
|
|
701
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
701
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== B.value[n]?.value) {
|
|
702
702
|
e = !0;
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
705
|
-
e && (
|
|
705
|
+
e && (B.value = t);
|
|
706
706
|
}
|
|
707
707
|
}, { deep: !0 });
|
|
708
|
-
let
|
|
708
|
+
let oe = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? B.value.map((e) => ({
|
|
709
709
|
...e,
|
|
710
|
-
disabled:
|
|
711
|
-
})) :
|
|
710
|
+
disabled: R(e)
|
|
711
|
+
})) : B.value);
|
|
712
712
|
return (t, n) => {
|
|
713
|
-
let i =
|
|
714
|
-
return
|
|
713
|
+
let i = M("el-checkbox"), a = M("el-select-v2"), l = M("el-option"), b = M("el-select");
|
|
714
|
+
return F(r).v2 == null ? (O(), u(b, x({
|
|
715
715
|
key: 1,
|
|
716
716
|
modelValue: o.value,
|
|
717
717
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
718
718
|
filterable: "",
|
|
719
719
|
"collapse-tags": "",
|
|
720
720
|
"collapse-tags-tooltip": "",
|
|
721
|
-
"filter-method":
|
|
721
|
+
"filter-method": F(r).remote == null ? (e) => _.value = e : void 0,
|
|
722
722
|
clearable: ""
|
|
723
|
-
},
|
|
724
|
-
default:
|
|
723
|
+
}, F(r), { onClear: E }), {
|
|
724
|
+
default: I(() => [F(r).multiple != null && e.showCheckAll && e.maxLimit == null ? j(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
725
725
|
class: "mgl20",
|
|
726
726
|
modelValue: y.value,
|
|
727
727
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
728
|
-
onChange:
|
|
728
|
+
onChange: L
|
|
729
729
|
}, {
|
|
730
|
-
default:
|
|
730
|
+
default: I(() => [h(P(t.$t("quan-xuan")), 1)]),
|
|
731
731
|
_: 1
|
|
732
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (O(!0), f(c, null,
|
|
732
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (O(!0), f(c, null, ee(v.value, (t, n) => (O(), u(l, {
|
|
733
733
|
key: n,
|
|
734
|
-
label:
|
|
735
|
-
disabled:
|
|
736
|
-
onClick:
|
|
734
|
+
label: N(t),
|
|
735
|
+
disabled: F(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? R(t) : !1,
|
|
736
|
+
onClick: ae((e) => ie(t), ["stop"]),
|
|
737
737
|
value: s.value ? t : t[e.labelValue.value]
|
|
738
738
|
}, null, 8, [
|
|
739
739
|
"label",
|
|
@@ -744,66 +744,66 @@ var Q = (e, t) => {
|
|
|
744
744
|
_: 3
|
|
745
745
|
}, 16, ["modelValue", "filter-method"])) : (O(), u(a, x({
|
|
746
746
|
key: 0,
|
|
747
|
-
options:
|
|
747
|
+
options: oe.value,
|
|
748
748
|
modelValue: o.value,
|
|
749
749
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
750
|
-
},
|
|
750
|
+
}, F(r), {
|
|
751
751
|
filterable: "",
|
|
752
752
|
"collapse-tags": "",
|
|
753
753
|
"collapse-tags-tooltip": "",
|
|
754
754
|
clearable: "",
|
|
755
755
|
onChange: w
|
|
756
756
|
}), m({
|
|
757
|
-
default:
|
|
757
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => D(e) }, P(e.label), 9, $e)]),
|
|
758
758
|
_: 2
|
|
759
|
-
}, [
|
|
759
|
+
}, [F(r).multiple == null ? void 0 : {
|
|
760
760
|
name: "header",
|
|
761
|
-
fn:
|
|
761
|
+
fn: I(() => [j(t.$slots, "header", {}, () => [g(i, {
|
|
762
762
|
class: "mgl20",
|
|
763
763
|
modelValue: y.value,
|
|
764
764
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
765
|
-
onChange:
|
|
765
|
+
onChange: L
|
|
766
766
|
}, {
|
|
767
|
-
default:
|
|
767
|
+
default: I(() => [h(P(t.$t("quan-xuan")), 1)]),
|
|
768
768
|
_: 1
|
|
769
769
|
}, 8, ["modelValue"])], !0)]),
|
|
770
770
|
key: "0"
|
|
771
771
|
}]), 1040, ["options", "modelValue"]));
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
774
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), tt = _({ props: { name: {
|
|
775
775
|
tyepe: String,
|
|
776
776
|
required: !0
|
|
777
777
|
} } });
|
|
778
|
-
function
|
|
779
|
-
let o =
|
|
778
|
+
function nt(e, t, n, r, i, a) {
|
|
779
|
+
let o = M("el-icon");
|
|
780
780
|
return O(), u(o, { class: "cmp-icon" }, {
|
|
781
|
-
default:
|
|
781
|
+
default: I(() => [(O(), u(N(e.name)))]),
|
|
782
782
|
_: 1
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
var
|
|
785
|
+
var rt = /* @__PURE__ */ $(tt, [["render", nt], ["__scopeId", "data-v-733f9daa"]]), it = { class: "confirm-button-wrapper" }, at = /* @__PURE__ */ $({
|
|
786
786
|
__name: "index",
|
|
787
787
|
emits: ["ok", "no"],
|
|
788
788
|
setup(e, { emit: t }) {
|
|
789
|
-
let n = t, r =
|
|
789
|
+
let n = t, r = ce(() => {
|
|
790
790
|
n("ok");
|
|
791
791
|
}, 500);
|
|
792
792
|
function i() {
|
|
793
793
|
n("no");
|
|
794
794
|
}
|
|
795
795
|
return (e, t) => {
|
|
796
|
-
let n =
|
|
797
|
-
return O(), f("span",
|
|
798
|
-
onConfirm:
|
|
796
|
+
let n = M("el-popconfirm");
|
|
797
|
+
return O(), f("span", it, [g(n, x(e.$attrs, {
|
|
798
|
+
onConfirm: F(r),
|
|
799
799
|
onCancel: i
|
|
800
800
|
}), {
|
|
801
|
-
reference:
|
|
801
|
+
reference: I(() => [j(e.$slots, "default", {}, void 0, !0)]),
|
|
802
802
|
_: 3
|
|
803
803
|
}, 16, ["onConfirm"])]);
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
806
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), ot = { class: "ImportButton" }, st = ["accept"], ct = /* @__PURE__ */ $({
|
|
807
807
|
__name: "index",
|
|
808
808
|
props: {
|
|
809
809
|
accept: {
|
|
@@ -824,7 +824,7 @@ var at = /* @__PURE__ */ Q(rt, [["render", it], ["__scopeId", "data-v-733f9daa"]
|
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
826
|
setup(e) {
|
|
827
|
-
let { t } =
|
|
827
|
+
let { t } = V(), n = e, r = A(null), a = A(!1);
|
|
828
828
|
function o(e) {
|
|
829
829
|
let t = e.match(/__v(\d+)/);
|
|
830
830
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -839,7 +839,7 @@ var at = /* @__PURE__ */ Q(rt, [["render", it], ["__scopeId", "data-v-733f9daa"]
|
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
let c = await
|
|
842
|
+
let c = await Ie(s, n.fields).catch(() => {
|
|
843
843
|
a.value = !1;
|
|
844
844
|
}).finally(() => {
|
|
845
845
|
r.value.value = null;
|
|
@@ -849,14 +849,14 @@ var at = /* @__PURE__ */ Q(rt, [["render", it], ["__scopeId", "data-v-733f9daa"]
|
|
|
849
849
|
});
|
|
850
850
|
}
|
|
851
851
|
return (t, n) => {
|
|
852
|
-
let i =
|
|
853
|
-
return O(), f("div",
|
|
852
|
+
let i = M("el-button");
|
|
853
|
+
return O(), f("div", ot, [g(i, x({
|
|
854
854
|
type: "primary",
|
|
855
855
|
loading: a.value,
|
|
856
856
|
class: "mgr10",
|
|
857
857
|
onClick: n[0] ||= (e) => r.value.click()
|
|
858
858
|
}, t.$attrs), {
|
|
859
|
-
default:
|
|
859
|
+
default: I(() => [j(t.$slots, "default", {}, () => [h(P(t.$t("dao-ru")), 1)], !0)]),
|
|
860
860
|
_: 3
|
|
861
861
|
}, 16, ["loading"]), p("input", {
|
|
862
862
|
onChange: s,
|
|
@@ -870,27 +870,27 @@ var at = /* @__PURE__ */ Q(rt, [["render", it], ["__scopeId", "data-v-733f9daa"]
|
|
|
870
870
|
opacity: "0"
|
|
871
871
|
},
|
|
872
872
|
type: "file"
|
|
873
|
-
}, null, 40,
|
|
873
|
+
}, null, 40, st)]);
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
876
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
877
877
|
//#endregion
|
|
878
878
|
//#region src/components/SearchBar/tools.js
|
|
879
|
-
function
|
|
879
|
+
function lt(e) {
|
|
880
880
|
let t = {};
|
|
881
881
|
return e.forEach((e) => {
|
|
882
882
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date" } = e;
|
|
883
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
883
|
+
if (n) if (r == "input" && i?.multiple) t[n] = We(a);
|
|
884
884
|
else if (r == "date") if (o.includes("range")) {
|
|
885
885
|
let [e, r] = n, [i, s] = a || [];
|
|
886
|
-
i && o == "daterange" && (i =
|
|
886
|
+
i && o == "daterange" && (i = B(i).format("YYYY-MM-DD 00:00:00"), s = B(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
887
887
|
} else t[n] = a;
|
|
888
888
|
else t[n] = a;
|
|
889
889
|
}), t;
|
|
890
890
|
}
|
|
891
891
|
//#endregion
|
|
892
892
|
//#region src/components/SearchBar/index.vue
|
|
893
|
-
var
|
|
893
|
+
var ut = { key: 0 }, dt = { class: "btns" }, ft = { class: "left" }, pt = { class: "right" }, mt = /* @__PURE__ */ $({
|
|
894
894
|
__name: "index",
|
|
895
895
|
props: { form: {
|
|
896
896
|
type: Object,
|
|
@@ -902,7 +902,7 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
902
902
|
"visibleChange"
|
|
903
903
|
],
|
|
904
904
|
setup(e, { expose: t, emit: n }) {
|
|
905
|
-
let r = e, i = n, a = A(!0), o = A(null), { t: s } =
|
|
905
|
+
let r = e, i = n, a = A(!0), o = A(null), { t: s } = V(), m = {
|
|
906
906
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
907
907
|
daterange: "YYYY-MM-DD",
|
|
908
908
|
month: "YYYY-MM"
|
|
@@ -920,9 +920,9 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
920
920
|
i("confirm");
|
|
921
921
|
}
|
|
922
922
|
function T() {
|
|
923
|
-
return
|
|
923
|
+
return lt(r.form.items);
|
|
924
924
|
}
|
|
925
|
-
let E =
|
|
925
|
+
let E = se(r.form.items);
|
|
926
926
|
function D() {
|
|
927
927
|
r.form.items.forEach((e) => {
|
|
928
928
|
let t = E.find((t) => t.key == e.key);
|
|
@@ -933,10 +933,10 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
933
933
|
getPrm: T,
|
|
934
934
|
reset: D
|
|
935
935
|
}), (t, n) => {
|
|
936
|
-
let r =
|
|
936
|
+
let r = M("el-input"), s = M("el-date-picker"), l = M("el-form-item"), T = M("el-form"), E = M("el-link"), D = M("el-button");
|
|
937
937
|
return O(), f("div", {
|
|
938
938
|
class: "searchBar-container mgt10 mgb10",
|
|
939
|
-
onKeydown:
|
|
939
|
+
onKeydown: ie(v, ["enter"])
|
|
940
940
|
}, [p("div", {
|
|
941
941
|
class: "searchBar",
|
|
942
942
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -944,11 +944,11 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
944
944
|
inline: "",
|
|
945
945
|
model: e.form.data
|
|
946
946
|
}, {
|
|
947
|
-
default:
|
|
947
|
+
default: I(() => [(O(!0), f(c, null, ee(e.form.items.filter((e) => !e.hidden), (e) => (O(), f(c, { key: e.key }, [e.type == "br" ? (O(), f("br", ut)) : (O(), u(l, {
|
|
948
948
|
key: 1,
|
|
949
949
|
label: e.name
|
|
950
950
|
}, {
|
|
951
|
-
default:
|
|
951
|
+
default: I(() => [
|
|
952
952
|
e.type === "input" ? (O(), u(r, {
|
|
953
953
|
key: 0,
|
|
954
954
|
modelValue: e.value,
|
|
@@ -961,8 +961,8 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
961
961
|
"onUpdate:modelValue",
|
|
962
962
|
"class",
|
|
963
963
|
"placeholder"
|
|
964
|
-
])) : e.type === "custom" ? (O(), u(
|
|
965
|
-
e.type === "select" ? (O(), u(
|
|
964
|
+
])) : e.type === "custom" ? (O(), u(N(e.render), { key: 1 })) : d("", !0),
|
|
965
|
+
e.type === "select" ? (O(), u(et, x({
|
|
966
966
|
key: 2,
|
|
967
967
|
class: e.option?.class || "w150",
|
|
968
968
|
modelValue: e.value,
|
|
@@ -1009,7 +1009,7 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
1009
1009
|
_: 2
|
|
1010
1010
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1011
1011
|
_: 1
|
|
1012
|
-
}, 8, ["model"])], 4), p("div",
|
|
1012
|
+
}, 8, ["model"])], 4), p("div", dt, [p("div", ft, [j(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", pt, [
|
|
1013
1013
|
g(E, {
|
|
1014
1014
|
underline: "never",
|
|
1015
1015
|
class: "mgr10",
|
|
@@ -1017,28 +1017,28 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
1017
1017
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1018
1018
|
}
|
|
1019
1019
|
}, {
|
|
1020
|
-
default:
|
|
1020
|
+
default: I(() => [g(rt, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + P(_.value), 1)]),
|
|
1021
1021
|
_: 1
|
|
1022
1022
|
}),
|
|
1023
1023
|
g(D, {
|
|
1024
1024
|
type: "primary",
|
|
1025
1025
|
onClick: v
|
|
1026
1026
|
}, {
|
|
1027
|
-
default:
|
|
1027
|
+
default: I(() => [h(P(t.$t("shai-xuan")), 1)]),
|
|
1028
1028
|
_: 1
|
|
1029
1029
|
}),
|
|
1030
1030
|
g(D, {
|
|
1031
1031
|
type: "primary",
|
|
1032
1032
|
onClick: b
|
|
1033
1033
|
}, {
|
|
1034
|
-
default:
|
|
1034
|
+
default: I(() => [h(P(t.$t("chong-zhi")), 1)]),
|
|
1035
1035
|
_: 1
|
|
1036
1036
|
}),
|
|
1037
|
-
|
|
1037
|
+
j(t.$slots, "btn", {}, void 0, !0)
|
|
1038
1038
|
])])], 32);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
}, [["__scopeId", "data-v-db6f71dd"]]),
|
|
1041
|
+
}, [["__scopeId", "data-v-db6f71dd"]]), ht = {
|
|
1042
1042
|
pageNoKey: "pageNo",
|
|
1043
1043
|
pageSizeKey: "pageSize",
|
|
1044
1044
|
totalKey: "total",
|
|
@@ -1062,26 +1062,26 @@ var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { clas
|
|
|
1062
1062
|
showShadow: !1,
|
|
1063
1063
|
showCheckBox: !1,
|
|
1064
1064
|
enableCellCopy: !0
|
|
1065
|
-
},
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1068
|
-
|
|
1065
|
+
}, gt = { ...ht };
|
|
1066
|
+
function _t(e) {
|
|
1067
|
+
gt = {
|
|
1068
|
+
...gt,
|
|
1069
1069
|
...e,
|
|
1070
1070
|
responseDataKeys: {
|
|
1071
|
-
|
|
1071
|
+
...gt.responseDataKeys,
|
|
1072
1072
|
...e.responseDataKeys || {}
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1076
|
+
function vt() {
|
|
1077
|
+
return gt;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
|
|
1079
|
+
function yt() {
|
|
1080
|
+
gt = { ...ht };
|
|
1081
1081
|
}
|
|
1082
1082
|
//#endregion
|
|
1083
1083
|
//#region src/components/ListPage/index.vue
|
|
1084
|
-
var
|
|
1084
|
+
var bt = { class: "center" }, xt = 0, St = 20, Ct = .3, wt = /* @__PURE__ */ $({
|
|
1085
1085
|
__name: "index",
|
|
1086
1086
|
props: {
|
|
1087
1087
|
id: {
|
|
@@ -1111,124 +1111,124 @@ var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
|
1111
1111
|
}
|
|
1112
1112
|
},
|
|
1113
1113
|
setup(e, { expose: t }) {
|
|
1114
|
-
let { t: n, locale: r } =
|
|
1115
|
-
|
|
1116
|
-
let
|
|
1117
|
-
let e =
|
|
1118
|
-
return
|
|
1119
|
-
}),
|
|
1120
|
-
[
|
|
1121
|
-
[
|
|
1114
|
+
let { t: n, locale: r } = V(), i = vt(), a = e, o = A(!1), s = A([]);
|
|
1115
|
+
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 = []);
|
|
1116
|
+
let c = l(() => {
|
|
1117
|
+
let e = "default-table";
|
|
1118
|
+
return a.id ? `listPageId-${e}-${a.id}` : `listPageId-${e}`;
|
|
1119
|
+
}), m = se(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = k({
|
|
1120
|
+
[_]: 1,
|
|
1121
|
+
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1122
1122
|
total: 0
|
|
1123
|
-
}),
|
|
1123
|
+
}), b = A(null), w = A(null), ee = A(450), N = ce(() => {
|
|
1124
1124
|
S(() => {
|
|
1125
|
-
if (!
|
|
1126
|
-
let e =
|
|
1127
|
-
|
|
1125
|
+
if (!w.value) return;
|
|
1126
|
+
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1127
|
+
ee.value = Math.max(t, 200);
|
|
1128
1128
|
});
|
|
1129
|
-
}, 100),
|
|
1130
|
-
|
|
1131
|
-
},
|
|
1132
|
-
if (!
|
|
1133
|
-
let e =
|
|
1129
|
+
}, 100), te = () => {
|
|
1130
|
+
N();
|
|
1131
|
+
}, ne = () => {
|
|
1132
|
+
if (!a.searchForm.enableCellCopy && !i.enableCellCopy) return !1;
|
|
1133
|
+
let e = b.value;
|
|
1134
1134
|
if (!e || !e.$el) return !1;
|
|
1135
1135
|
let t = e.$el;
|
|
1136
|
-
return t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1136
|
+
return t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", ge), t.removeEventListener("mousemove", _e), t.removeEventListener("mouseup", q), t.removeEventListener("keydown", Ce), t.addEventListener("mousedown", ge), t.addEventListener("mousemove", _e), t.addEventListener("mouseup", q), t.addEventListener("keydown", Ce), !0;
|
|
1137
1137
|
};
|
|
1138
1138
|
T(() => {
|
|
1139
|
-
|
|
1140
|
-
|
|
1139
|
+
N(), window.addEventListener("resize", te), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", Y), document.addEventListener("mousedown", X), setTimeout(() => {
|
|
1140
|
+
ne();
|
|
1141
1141
|
}, 500));
|
|
1142
1142
|
}), D(() => {
|
|
1143
|
-
(
|
|
1144
|
-
|
|
1143
|
+
(a.searchForm.enableCellCopy || i.enableCellCopy) && setTimeout(() => {
|
|
1144
|
+
ne();
|
|
1145
1145
|
}, 500);
|
|
1146
1146
|
}), E(() => {
|
|
1147
|
-
if (window.removeEventListener("resize",
|
|
1148
|
-
document.removeEventListener("mouseup",
|
|
1149
|
-
let e =
|
|
1147
|
+
if (window.removeEventListener("resize", te), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1148
|
+
document.removeEventListener("mouseup", Y), document.removeEventListener("mousedown", X), document.removeEventListener("mousemove", G), K(), J && cancelAnimationFrame(J);
|
|
1149
|
+
let e = b.value;
|
|
1150
1150
|
if (e && e.$el) {
|
|
1151
1151
|
let t = e.$el;
|
|
1152
|
-
t.removeEventListener("mousedown",
|
|
1152
|
+
t.removeEventListener("mousedown", ge), t.removeEventListener("mousemove", _e), t.removeEventListener("mouseup", q), t.removeEventListener("keydown", Ce);
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
});
|
|
1156
|
-
let
|
|
1157
|
-
async function
|
|
1158
|
-
let t =
|
|
1159
|
-
e[
|
|
1160
|
-
let { code: r, data:
|
|
1161
|
-
|
|
1156
|
+
let re = l(() => fe.value.height || ee.value), L;
|
|
1157
|
+
async function ie(e) {
|
|
1158
|
+
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1159
|
+
e[_] != 1 && (e.nextSearchAfter = L), o.value = !0;
|
|
1160
|
+
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1161
|
+
o.value = !1, a.searchForm.selections = [];
|
|
1162
1162
|
});
|
|
1163
1163
|
if (r == 200) {
|
|
1164
|
-
|
|
1164
|
+
a.searchForm?.apiCallBack?.({
|
|
1165
1165
|
code: r,
|
|
1166
|
-
data:
|
|
1166
|
+
data: c
|
|
1167
1167
|
});
|
|
1168
1168
|
let e = [];
|
|
1169
1169
|
for (let n of t.rows) {
|
|
1170
|
-
let t =
|
|
1170
|
+
let t = Qe(c, n);
|
|
1171
1171
|
if (t) {
|
|
1172
1172
|
e = t;
|
|
1173
1173
|
break;
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
let
|
|
1176
|
+
let o = 0;
|
|
1177
1177
|
for (let e of t.total) {
|
|
1178
|
-
let t =
|
|
1178
|
+
let t = Qe(c, e);
|
|
1179
1179
|
if (t !== void 0) {
|
|
1180
|
-
|
|
1180
|
+
o = t;
|
|
1181
1181
|
break;
|
|
1182
1182
|
}
|
|
1183
1183
|
}
|
|
1184
|
-
|
|
1184
|
+
s.value = n ? n(e) : e, y.total = o, L = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && S(() => {
|
|
1185
1185
|
setTimeout(() => {
|
|
1186
|
-
|
|
1186
|
+
ne();
|
|
1187
1187
|
}, 100);
|
|
1188
1188
|
});
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1192
|
-
let { searchData: t = () => ({}) } =
|
|
1193
|
-
|
|
1194
|
-
...
|
|
1195
|
-
...
|
|
1191
|
+
function R(e = {}) {
|
|
1192
|
+
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1193
|
+
ie({
|
|
1194
|
+
...y,
|
|
1195
|
+
...lt(a.searchForm.items),
|
|
1196
1196
|
...e,
|
|
1197
1197
|
...n
|
|
1198
1198
|
});
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1201
|
-
let { reset: e } =
|
|
1202
|
-
e && e(),
|
|
1203
|
-
let t =
|
|
1200
|
+
function z() {
|
|
1201
|
+
let { reset: e } = a.tableConfig;
|
|
1202
|
+
e && e(), a.searchForm.items.forEach((e) => {
|
|
1203
|
+
let t = m.find((t) => le(e.key) && le(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1204
1204
|
t && (e.value = t.value);
|
|
1205
|
-
}),
|
|
1205
|
+
}), R();
|
|
1206
1206
|
}
|
|
1207
|
-
|
|
1208
|
-
function
|
|
1207
|
+
a.api && a.immediate && R();
|
|
1208
|
+
function B() {
|
|
1209
1209
|
return {
|
|
1210
|
-
...
|
|
1211
|
-
...
|
|
1210
|
+
...y,
|
|
1211
|
+
...lt(a.searchForm.items)
|
|
1212
1212
|
};
|
|
1213
1213
|
}
|
|
1214
|
-
let
|
|
1215
|
-
let e =
|
|
1214
|
+
let oe = () => {
|
|
1215
|
+
let e = b.value;
|
|
1216
1216
|
e && e.clearSort();
|
|
1217
|
-
},
|
|
1217
|
+
}, ue = k({ storage: !0 }), de = k({
|
|
1218
1218
|
drag: !0,
|
|
1219
1219
|
resizable: !0,
|
|
1220
1220
|
maxFixedSize: 0
|
|
1221
|
-
}),
|
|
1222
|
-
let { customConfig: e, columnConfig: t, ...n } =
|
|
1221
|
+
}), fe = l(() => {
|
|
1222
|
+
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1223
1223
|
return {
|
|
1224
1224
|
headerAlign: "left",
|
|
1225
1225
|
align: "center",
|
|
1226
1226
|
customConfig: {
|
|
1227
|
-
...
|
|
1227
|
+
...ue,
|
|
1228
1228
|
...e
|
|
1229
1229
|
},
|
|
1230
1230
|
columnConfig: {
|
|
1231
|
-
...
|
|
1231
|
+
...de,
|
|
1232
1232
|
...t
|
|
1233
1233
|
},
|
|
1234
1234
|
"virtual-x-config": {
|
|
@@ -1241,36 +1241,39 @@ var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
|
1241
1241
|
},
|
|
1242
1242
|
...n
|
|
1243
1243
|
};
|
|
1244
|
-
}),
|
|
1244
|
+
}), H = k({
|
|
1245
1245
|
isSelecting: !1,
|
|
1246
1246
|
startCell: null,
|
|
1247
1247
|
endCell: null,
|
|
1248
1248
|
selectedCells: []
|
|
1249
|
-
}),
|
|
1249
|
+
}), pe = (e) => {
|
|
1250
1250
|
let t = e.closest(".vxe-body--column");
|
|
1251
1251
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1252
1252
|
let n = t.closest(".vxe-body--row");
|
|
1253
1253
|
if (!n) return null;
|
|
1254
|
-
let r =
|
|
1254
|
+
let r = b.value;
|
|
1255
1255
|
if (!r) return null;
|
|
1256
|
-
let i = -1,
|
|
1257
|
-
if (
|
|
1258
|
-
|
|
1256
|
+
let i = -1, o = n.getAttribute("rowid");
|
|
1257
|
+
if (o != null) {
|
|
1258
|
+
let e = r.getRowById(o);
|
|
1259
|
+
e && (i = r.getTableData().fullData.indexOf(e));
|
|
1260
|
+
}
|
|
1261
|
+
if (i < 0) {
|
|
1259
1262
|
let e = n.parentElement;
|
|
1260
1263
|
i = Array.from(e.querySelectorAll(".vxe-body--row")).indexOf(n);
|
|
1261
1264
|
}
|
|
1262
1265
|
if (i < 0) return null;
|
|
1263
|
-
let s = -1, c = t.getAttribute("
|
|
1266
|
+
let s = -1, c = t.getAttribute("colid");
|
|
1264
1267
|
if (c && (s = r.getColumns().findIndex((e) => e.id === c)), s < 0) {
|
|
1265
|
-
let e = Array.from(n.querySelectorAll(".vxe-body--column")).indexOf(t), i = !!t.closest(".vxe-table--fixed-left-wrapper"),
|
|
1268
|
+
let e = Array.from(n.querySelectorAll(".vxe-body--column")).indexOf(t), i = !!t.closest(".vxe-table--fixed-left-wrapper"), o = !!t.closest(".vxe-table--fixed-right-wrapper"), c = r.getColumns();
|
|
1266
1269
|
if (i) {
|
|
1267
1270
|
let t = c.filter((e) => e.fixed === "left");
|
|
1268
1271
|
e < t.length && (s = c.indexOf(t[e]));
|
|
1269
|
-
} else if (
|
|
1272
|
+
} else if (o) {
|
|
1270
1273
|
let t = c.filter((e) => e.fixed === "right");
|
|
1271
1274
|
e < t.length && (s = c.indexOf(t[e]));
|
|
1272
1275
|
} else {
|
|
1273
|
-
let t =
|
|
1276
|
+
let t = a.searchForm.showCheckBox ? 1 : 0;
|
|
1274
1277
|
s = c.filter((e) => e.fixed === "left").length + e - t;
|
|
1275
1278
|
}
|
|
1276
1279
|
}
|
|
@@ -1279,217 +1282,326 @@ var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
|
1279
1282
|
colIndex: s,
|
|
1280
1283
|
cell: t
|
|
1281
1284
|
};
|
|
1282
|
-
},
|
|
1283
|
-
|
|
1285
|
+
}, U = null, W = 0, G = (e) => {
|
|
1286
|
+
if (!H.isSelecting) return;
|
|
1287
|
+
W = e.clientY;
|
|
1288
|
+
let t = b.value;
|
|
1289
|
+
if (!t || !t.$el) return;
|
|
1290
|
+
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1291
|
+
if (!r) return;
|
|
1292
|
+
let i = r.getBoundingClientRect();
|
|
1293
|
+
e.clientY < i.top - xt || e.clientY > i.bottom + xt ? U || me() : K();
|
|
1294
|
+
}, me = () => {
|
|
1295
|
+
let e = () => {
|
|
1296
|
+
if (!H.isSelecting) {
|
|
1297
|
+
K();
|
|
1298
|
+
return;
|
|
1299
|
+
}
|
|
1300
|
+
let t = b.value;
|
|
1301
|
+
if (!t || !t.$el) {
|
|
1302
|
+
K();
|
|
1303
|
+
return;
|
|
1304
|
+
}
|
|
1305
|
+
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1306
|
+
if (!r) {
|
|
1307
|
+
K();
|
|
1308
|
+
return;
|
|
1309
|
+
}
|
|
1310
|
+
let i = r.getBoundingClientRect(), a = 0;
|
|
1311
|
+
if (W < i.top) {
|
|
1312
|
+
let e = i.top - W;
|
|
1313
|
+
a = -Math.min(St, Math.max(2, e * Ct));
|
|
1314
|
+
} else if (W > i.bottom) {
|
|
1315
|
+
let e = W - i.bottom;
|
|
1316
|
+
a = Math.min(St, Math.max(2, e * Ct));
|
|
1317
|
+
} else {
|
|
1318
|
+
K();
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), he(r, i), U = requestAnimationFrame(e);
|
|
1322
|
+
};
|
|
1323
|
+
U = requestAnimationFrame(e);
|
|
1324
|
+
}, K = () => {
|
|
1325
|
+
U &&= (cancelAnimationFrame(U), null);
|
|
1326
|
+
}, he = (e, t) => {
|
|
1327
|
+
let n = b.value;
|
|
1328
|
+
if (!n) return;
|
|
1329
|
+
let r = n.getTableData().fullData;
|
|
1330
|
+
if (!r || r.length === 0) return;
|
|
1331
|
+
let i = n.$el.querySelector(".vxe-table--body-wrapper tbody") || e.querySelector("tbody");
|
|
1332
|
+
if (!i) return;
|
|
1333
|
+
let a = i.querySelectorAll(".vxe-body--row");
|
|
1334
|
+
if (a.length === 0) return;
|
|
1335
|
+
let o = null;
|
|
1336
|
+
if (W < t.top ? o = a[0] : W > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1337
|
+
let s = o.getAttribute("rowid");
|
|
1338
|
+
if (s == null) return;
|
|
1339
|
+
let c = -1, l = n.getRowById(s);
|
|
1340
|
+
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1341
|
+
let u = H.endCell ? H.endCell.colIndex : H.startCell ? H.startCell.colIndex : 0;
|
|
1342
|
+
H.endCell = {
|
|
1343
|
+
rowIndex: c,
|
|
1344
|
+
colIndex: u
|
|
1345
|
+
}, ye(), be();
|
|
1346
|
+
}, ge = (e) => {
|
|
1347
|
+
let t = pe(e.target);
|
|
1284
1348
|
if (!t) {
|
|
1285
|
-
|
|
1349
|
+
ve();
|
|
1286
1350
|
return;
|
|
1287
1351
|
}
|
|
1288
|
-
|
|
1352
|
+
H.isSelecting = !0, H.startCell = {
|
|
1289
1353
|
rowIndex: t.rowIndex,
|
|
1290
1354
|
colIndex: t.colIndex
|
|
1291
|
-
},
|
|
1292
|
-
},
|
|
1293
|
-
if (!
|
|
1294
|
-
let t =
|
|
1295
|
-
t && (
|
|
1355
|
+
}, H.endCell = { ...H.startCell }, document.addEventListener("mousemove", G), ye(), be();
|
|
1356
|
+
}, _e = (e) => {
|
|
1357
|
+
if (!H.isSelecting) return;
|
|
1358
|
+
let t = pe(e.target);
|
|
1359
|
+
t && (H.endCell = {
|
|
1296
1360
|
rowIndex: t.rowIndex,
|
|
1297
1361
|
colIndex: t.colIndex
|
|
1298
|
-
},
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1301
|
-
},
|
|
1302
|
-
|
|
1303
|
-
let e =
|
|
1362
|
+
}, ye(), be());
|
|
1363
|
+
}, q = () => {
|
|
1364
|
+
H.isSelecting = !1, K(), document.removeEventListener("mousemove", G);
|
|
1365
|
+
}, ve = () => {
|
|
1366
|
+
H.selectedCells = [], H.startCell = null, H.endCell = null;
|
|
1367
|
+
let e = b.value;
|
|
1304
1368
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1305
1369
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1306
1370
|
});
|
|
1307
|
-
},
|
|
1308
|
-
if (!
|
|
1309
|
-
|
|
1371
|
+
}, ye = () => {
|
|
1372
|
+
if (!H.startCell || !H.endCell) {
|
|
1373
|
+
H.selectedCells = [];
|
|
1310
1374
|
return;
|
|
1311
1375
|
}
|
|
1312
|
-
let e =
|
|
1313
|
-
|
|
1314
|
-
for (let e = i; e <= a; e++) for (let t = o; t <= s; t++)
|
|
1376
|
+
let e = H.startCell.rowIndex, t = H.endCell.rowIndex, n = H.startCell.colIndex, r = H.endCell.colIndex, i = Math.min(e, t), a = Math.max(e, t), o = Math.min(n, r), s = Math.max(n, r);
|
|
1377
|
+
H.selectedCells = [];
|
|
1378
|
+
for (let e = i; e <= a; e++) for (let t = o; t <= s; t++) H.selectedCells.push({
|
|
1315
1379
|
rowIndex: e,
|
|
1316
1380
|
colIndex: t
|
|
1317
1381
|
});
|
|
1318
|
-
},
|
|
1382
|
+
}, be = () => {
|
|
1319
1383
|
S(() => {
|
|
1320
|
-
let e =
|
|
1384
|
+
let e = b.value;
|
|
1321
1385
|
if (!e) return;
|
|
1322
1386
|
let t = e.$el;
|
|
1323
1387
|
if (t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1324
1388
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1325
|
-
}),
|
|
1326
|
-
let n = e.getColumns(), r =
|
|
1389
|
+
}), H.selectedCells.length === 0) return;
|
|
1390
|
+
let n = e.getColumns(), r = H.selectedCells.map((e) => e.rowIndex), i = H.selectedCells.map((e) => e.colIndex), o = Math.min(...r), s = Math.max(...r), c = Math.min(...i), l = Math.max(...i), u = e.getTableData().fullData, d = /* @__PURE__ */ new Map();
|
|
1391
|
+
H.selectedCells.forEach(({ rowIndex: t }) => {
|
|
1392
|
+
if (d.has(t)) return;
|
|
1393
|
+
let n = u[t];
|
|
1394
|
+
if (n) {
|
|
1395
|
+
let r = e.getRowid(n);
|
|
1396
|
+
r != null && d.set(String(r), t);
|
|
1397
|
+
}
|
|
1398
|
+
});
|
|
1399
|
+
let f = [
|
|
1327
1400
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1328
1401
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1329
1402
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1330
|
-
].filter(Boolean);
|
|
1331
|
-
|
|
1332
|
-
let r =
|
|
1333
|
-
if (
|
|
1334
|
-
let i =
|
|
1335
|
-
|
|
1336
|
-
let
|
|
1337
|
-
if (!
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1403
|
+
].filter(Boolean), p = new Set(H.selectedCells.map(({ rowIndex: e, colIndex: t }) => `${e}_${t}`));
|
|
1404
|
+
for (let e of f) e.querySelectorAll(".vxe-body--row").forEach((t) => {
|
|
1405
|
+
let r = t.getAttribute("rowid");
|
|
1406
|
+
if (r == null) return;
|
|
1407
|
+
let i = d.get(String(r));
|
|
1408
|
+
if (i === void 0) {
|
|
1409
|
+
let e = parseInt(r, 10);
|
|
1410
|
+
if (!isNaN(e) && p.has(`${e}_${c}`)) i = e;
|
|
1411
|
+
else return;
|
|
1412
|
+
}
|
|
1413
|
+
let u = Array.from(t.querySelectorAll(".vxe-body--column"));
|
|
1414
|
+
for (let t = c; t <= l; t++) {
|
|
1415
|
+
if (!p.has(`${i}_${t}`)) continue;
|
|
1416
|
+
let r = n[t];
|
|
1417
|
+
if (!r) continue;
|
|
1418
|
+
let d = r.fixed === "left", f = r.fixed === "right", m = null;
|
|
1419
|
+
if (d && e.closest(".vxe-table--fixed-left-wrapper")) m = u[n.filter((e) => e.fixed === "left").indexOf(r)];
|
|
1420
|
+
else if (f && e.closest(".vxe-table--fixed-right-wrapper")) m = u[n.filter((e) => e.fixed === "right").indexOf(r)];
|
|
1421
|
+
else if (!d && !f && e.closest(".vxe-table--body-wrapper")) {
|
|
1422
|
+
let e = a.searchForm.showCheckBox ? 1 : 0, r = n.filter((e) => e.fixed === "left").length;
|
|
1423
|
+
m = u[t - r + e];
|
|
1348
1424
|
}
|
|
1425
|
+
m && !m.classList.contains("col--checkbox") && !m.classList.contains("col--seq") && (m.classList.add("cell-selected"), i === o && m.classList.add("cell-border-top"), i === s && m.classList.add("cell-border-bottom"), t === c && m.classList.add("cell-border-left"), t === l && m.classList.add("cell-border-right"));
|
|
1349
1426
|
}
|
|
1350
1427
|
});
|
|
1351
1428
|
});
|
|
1352
|
-
},
|
|
1353
|
-
|
|
1354
|
-
|
|
1429
|
+
}, J = null, xe = () => {
|
|
1430
|
+
H.selectedCells.length !== 0 && (J && cancelAnimationFrame(J), J = requestAnimationFrame(() => {
|
|
1431
|
+
be(), J = null;
|
|
1432
|
+
}));
|
|
1433
|
+
}, Se = async () => {
|
|
1434
|
+
if (H.selectedCells.length === 0) return;
|
|
1435
|
+
let e = b.value;
|
|
1355
1436
|
if (!e) return;
|
|
1356
|
-
let t = e.$el, n = e.getColumns(), r = [...new Set(
|
|
1437
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, i = [...new Set(H.selectedCells.map((e) => e.rowIndex))].sort((e, t) => e - t), o = [...new Set(H.selectedCells.map((e) => e.colIndex))].sort((e, t) => e - t), s = /* @__PURE__ */ new Map(), c = [
|
|
1357
1438
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1358
1439
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1359
1440
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1360
|
-
].filter(Boolean)
|
|
1361
|
-
|
|
1362
|
-
let
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1441
|
+
].filter(Boolean);
|
|
1442
|
+
for (let e of c) e.querySelectorAll(".vxe-body--row").forEach((t) => {
|
|
1443
|
+
let n = t.getAttribute("rowid");
|
|
1444
|
+
n != null && (s.has(n) || s.set(n, []), s.get(n).push({
|
|
1445
|
+
rowEl: t,
|
|
1446
|
+
tbody: e
|
|
1447
|
+
}));
|
|
1448
|
+
});
|
|
1449
|
+
let l = [];
|
|
1450
|
+
i.forEach((t) => {
|
|
1451
|
+
let i = r[t], c = [];
|
|
1452
|
+
o.forEach((t) => {
|
|
1453
|
+
let r = n[t];
|
|
1454
|
+
if (!r) {
|
|
1455
|
+
c.push("");
|
|
1367
1456
|
return;
|
|
1368
1457
|
}
|
|
1369
|
-
let
|
|
1370
|
-
|
|
1371
|
-
let
|
|
1372
|
-
if (
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1458
|
+
let o = "", l = r.field;
|
|
1459
|
+
if (r.slots && (r.slots.default || r.slots.content)) {
|
|
1460
|
+
let c = i ? e.getRowid(i) : null, u = !1;
|
|
1461
|
+
if (c != null && s.has(String(c))) {
|
|
1462
|
+
let e = s.get(String(c)), i = r.fixed === "left", l = r.fixed === "right";
|
|
1463
|
+
for (let { rowEl: s, tbody: c } of e) {
|
|
1464
|
+
let e = Array.from(s.querySelectorAll(".vxe-body--column")), d = null;
|
|
1465
|
+
if (i && c.closest(".vxe-table--fixed-left-wrapper")) d = e[n.filter((e) => e.fixed === "left").indexOf(r)];
|
|
1466
|
+
else if (l && c.closest(".vxe-table--fixed-right-wrapper")) d = e[n.filter((e) => e.fixed === "right").indexOf(r)];
|
|
1467
|
+
else if (!i && !l && c.closest(".vxe-table--body-wrapper")) {
|
|
1468
|
+
let r = a.searchForm.showCheckBox ? 1 : 0;
|
|
1469
|
+
d = e[t - n.filter((e) => e.fixed === "left").length + r];
|
|
1470
|
+
}
|
|
1471
|
+
if (d && !d.classList.contains("col--checkbox") && !d.classList.contains("col--seq")) {
|
|
1472
|
+
o = (d.innerText || d.textContent || "").trim().replace(/\n/g, " ").replace(/\s+/g, " "), u = !0;
|
|
1473
|
+
break;
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1379
1476
|
}
|
|
1380
|
-
if (
|
|
1381
|
-
|
|
1382
|
-
|
|
1477
|
+
if (!u && i && l) {
|
|
1478
|
+
let e = i[l];
|
|
1479
|
+
o = e == null ? "" : String(e);
|
|
1383
1480
|
}
|
|
1481
|
+
} else if (r.formatter && i) try {
|
|
1482
|
+
let e = r.formatter({
|
|
1483
|
+
cellValue: i[l],
|
|
1484
|
+
row: i,
|
|
1485
|
+
column: r
|
|
1486
|
+
});
|
|
1487
|
+
o = e == null ? "" : String(e);
|
|
1488
|
+
} catch {
|
|
1489
|
+
let e = i ? i[l] : "";
|
|
1490
|
+
o = e == null ? "" : String(e);
|
|
1384
1491
|
}
|
|
1385
|
-
|
|
1386
|
-
|
|
1492
|
+
else if (i && l) {
|
|
1493
|
+
let e = i[l];
|
|
1494
|
+
o = e == null ? "" : String(e);
|
|
1495
|
+
}
|
|
1496
|
+
c.push(o);
|
|
1497
|
+
}), l.push(c.join(" "));
|
|
1387
1498
|
});
|
|
1388
|
-
let
|
|
1499
|
+
let u = l.join("\n");
|
|
1389
1500
|
try {
|
|
1390
|
-
await navigator.clipboard.writeText(
|
|
1501
|
+
await navigator.clipboard.writeText(u);
|
|
1391
1502
|
} catch (e) {
|
|
1392
1503
|
console.error("复制失败:", e);
|
|
1393
1504
|
}
|
|
1505
|
+
}, Ce = (e) => {
|
|
1506
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H.selectedCells.length > 0 && (e.preventDefault(), e.stopPropagation(), Se()) : e.key === "Escape" && ve());
|
|
1507
|
+
}, Y = () => {
|
|
1508
|
+
H.isSelecting = !1, K(), document.removeEventListener("mousemove", G);
|
|
1394
1509
|
}, X = (e) => {
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
}, ve = (e) => {
|
|
1402
|
-
b[v] = e, H();
|
|
1403
|
-
}, ye = (e) => {
|
|
1404
|
-
b[y] = e, b[v] = 1, H();
|
|
1510
|
+
let t = b.value;
|
|
1511
|
+
!t || !t.$el || t.$el.contains(e.target) || ve();
|
|
1512
|
+
}, we = (e) => {
|
|
1513
|
+
y[_] = e, R();
|
|
1514
|
+
}, Te = (e) => {
|
|
1515
|
+
y[v] = e, y[_] = 1, R();
|
|
1405
1516
|
};
|
|
1406
|
-
function
|
|
1407
|
-
let e =
|
|
1408
|
-
|
|
1517
|
+
function Ee() {
|
|
1518
|
+
let e = b.value.getCheckboxRecords();
|
|
1519
|
+
a.searchForm.selections = e;
|
|
1409
1520
|
}
|
|
1410
|
-
let
|
|
1411
|
-
let t =
|
|
1521
|
+
let Z = (e) => {
|
|
1522
|
+
let t = b.value;
|
|
1412
1523
|
if (t) {
|
|
1413
1524
|
t.toggleCheckboxRow(e);
|
|
1414
|
-
let n =
|
|
1415
|
-
|
|
1525
|
+
let n = b.value.getCheckboxRecords();
|
|
1526
|
+
a.searchForm.selections = n;
|
|
1416
1527
|
}
|
|
1417
1528
|
};
|
|
1418
1529
|
return t({
|
|
1419
|
-
tableRef:
|
|
1420
|
-
getList:
|
|
1421
|
-
getPrm:
|
|
1422
|
-
clearSort:
|
|
1423
|
-
calculateTableHeight:
|
|
1530
|
+
tableRef: b,
|
|
1531
|
+
getList: R,
|
|
1532
|
+
getPrm: B,
|
|
1533
|
+
clearSort: oe,
|
|
1534
|
+
calculateTableHeight: N
|
|
1424
1535
|
}), (t, n) => {
|
|
1425
|
-
let
|
|
1536
|
+
let a = M("el-button"), l = M("el-checkbox"), m = M("el-text"), S = M("vxe-column"), T = M("VxeTable"), E = M("el-pagination");
|
|
1426
1537
|
return O(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1427
|
-
e.searchForm.showSearch ? (O(), u(
|
|
1538
|
+
e.searchForm.showSearch ? (O(), u(mt, {
|
|
1428
1539
|
key: 0,
|
|
1429
1540
|
form: e.searchForm,
|
|
1430
|
-
onReset:
|
|
1431
|
-
onConfirm: n[1] ||= (e) =>
|
|
1432
|
-
onVisibleChange:
|
|
1541
|
+
onReset: z,
|
|
1542
|
+
onConfirm: n[1] ||= (e) => R(),
|
|
1543
|
+
onVisibleChange: F(N)
|
|
1433
1544
|
}, {
|
|
1434
|
-
btn:
|
|
1545
|
+
btn: I(() => [
|
|
1435
1546
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1436
|
-
|
|
1437
|
-
g(
|
|
1547
|
+
j(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1548
|
+
g(a, {
|
|
1438
1549
|
class: "mgl10",
|
|
1439
1550
|
round: "",
|
|
1440
|
-
onClick: n[0] ||= (e) =>
|
|
1551
|
+
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1441
1552
|
}, {
|
|
1442
|
-
default:
|
|
1553
|
+
default: I(() => [g(rt, { name: "Tools" })]),
|
|
1443
1554
|
_: 1
|
|
1444
1555
|
})
|
|
1445
1556
|
]),
|
|
1446
1557
|
_: 3
|
|
1447
1558
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1448
|
-
|
|
1559
|
+
j(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1449
1560
|
p("div", {
|
|
1450
1561
|
ref_key: "tableContentRef",
|
|
1451
|
-
ref:
|
|
1452
|
-
}, [g(
|
|
1453
|
-
id:
|
|
1562
|
+
ref: w
|
|
1563
|
+
}, [g(T, x({
|
|
1564
|
+
id: c.value,
|
|
1454
1565
|
ref_key: "tableRef",
|
|
1455
|
-
ref:
|
|
1456
|
-
loading: e.loading ||
|
|
1457
|
-
data: e.api ?
|
|
1566
|
+
ref: b,
|
|
1567
|
+
loading: e.loading || o.value,
|
|
1568
|
+
data: e.api ? s.value : e.data,
|
|
1458
1569
|
border: ""
|
|
1459
|
-
},
|
|
1460
|
-
height:
|
|
1461
|
-
onCheckboxChange:
|
|
1462
|
-
onCheckboxAll:
|
|
1463
|
-
onSortChange:
|
|
1570
|
+
}, fe.value, {
|
|
1571
|
+
height: re.value,
|
|
1572
|
+
onCheckboxChange: Ee,
|
|
1573
|
+
onCheckboxAll: Ee,
|
|
1574
|
+
onSortChange: fe.value["sort-config"]?.sortChange,
|
|
1575
|
+
onScroll: xe
|
|
1464
1576
|
}), {
|
|
1465
|
-
default:
|
|
1577
|
+
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (O(), u(S, {
|
|
1466
1578
|
key: 0,
|
|
1467
1579
|
type: "checkbox",
|
|
1468
|
-
width:
|
|
1580
|
+
width: F(r) == "zh_cn" ? 80 : 150,
|
|
1469
1581
|
title: t.$t("xu-hao"),
|
|
1470
1582
|
fixed: "left"
|
|
1471
1583
|
}, {
|
|
1472
|
-
checkbox:
|
|
1584
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", bt, [n ? (O(), u(l, {
|
|
1473
1585
|
key: 0,
|
|
1474
1586
|
checked: !0,
|
|
1475
1587
|
disabled: r,
|
|
1476
1588
|
size: "default",
|
|
1477
|
-
onClick:
|
|
1478
|
-
}, null, 8, ["disabled", "onClick"])) : (O(), u(
|
|
1589
|
+
onClick: ae((e) => !r && Z(t), ["stop"])
|
|
1590
|
+
}, null, 8, ["disabled", "onClick"])) : (O(), u(l, {
|
|
1479
1591
|
key: 1,
|
|
1480
1592
|
disabled: r,
|
|
1481
1593
|
checked: !1,
|
|
1482
1594
|
size: "default",
|
|
1483
|
-
onClick:
|
|
1484
|
-
}, null, 8, ["disabled", "onClick"])), g(
|
|
1595
|
+
onClick: ae((e) => !r && Z(t), ["stop"])
|
|
1596
|
+
}, null, 8, ["disabled", "onClick"])), g(m, {
|
|
1485
1597
|
type: "info",
|
|
1486
1598
|
class: "mgl5"
|
|
1487
1599
|
}, {
|
|
1488
|
-
default:
|
|
1600
|
+
default: I(() => [h(P(e + 1), 1)]),
|
|
1489
1601
|
_: 2
|
|
1490
1602
|
}, 1024)])]),
|
|
1491
1603
|
_: 1
|
|
1492
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1604
|
+
}, 8, ["width", "title"])) : d("", !0), j(t.$slots, "default", {}, void 0, !0)]),
|
|
1493
1605
|
_: 3
|
|
1494
1606
|
}, 16, [
|
|
1495
1607
|
"id",
|
|
@@ -1498,18 +1610,18 @@ var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
|
1498
1610
|
"height",
|
|
1499
1611
|
"onSortChange"
|
|
1500
1612
|
])], 512),
|
|
1501
|
-
e.searchForm.showPage ? (O(), u(
|
|
1613
|
+
e.searchForm.showPage ? (O(), u(E, {
|
|
1502
1614
|
key: 1,
|
|
1503
|
-
"current-page":
|
|
1504
|
-
"onUpdate:currentPage": n[2] ||= (e) =>
|
|
1615
|
+
"current-page": y[F(_)],
|
|
1616
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[F(_)] = e,
|
|
1505
1617
|
class: "myPagination mgt10",
|
|
1506
1618
|
background: "",
|
|
1507
1619
|
layout: "total, sizes, prev, pager, next",
|
|
1508
|
-
total:
|
|
1509
|
-
"page-size":
|
|
1510
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1511
|
-
onCurrentChange:
|
|
1512
|
-
onSizeChange:
|
|
1620
|
+
total: y.total,
|
|
1621
|
+
"page-size": y[F(v)],
|
|
1622
|
+
"page-sizes": e.searchForm.pageSizes || F(i).pageSizes,
|
|
1623
|
+
onCurrentChange: we,
|
|
1624
|
+
onSizeChange: Te
|
|
1513
1625
|
}, null, 8, [
|
|
1514
1626
|
"current-page",
|
|
1515
1627
|
"total",
|
|
@@ -1519,7 +1631,7 @@ var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
|
1519
1631
|
], 2);
|
|
1520
1632
|
};
|
|
1521
1633
|
}
|
|
1522
|
-
}, [["__scopeId", "data-v-
|
|
1634
|
+
}, [["__scopeId", "data-v-de9ed315"]]), Tt = {
|
|
1523
1635
|
__name: "index",
|
|
1524
1636
|
props: {
|
|
1525
1637
|
sheetsConfig: {
|
|
@@ -1538,31 +1650,31 @@ var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
|
1538
1650
|
setup(e) {
|
|
1539
1651
|
let t = e;
|
|
1540
1652
|
function n() {
|
|
1541
|
-
|
|
1653
|
+
Re(t.fileName + (t.version ? `__v${t.version}` : ""), t.sheetsConfig);
|
|
1542
1654
|
}
|
|
1543
1655
|
return (e, t) => {
|
|
1544
|
-
let r =
|
|
1656
|
+
let r = M("el-link");
|
|
1545
1657
|
return O(), u(r, x({
|
|
1546
1658
|
type: "primary",
|
|
1547
1659
|
underline: "never"
|
|
1548
1660
|
}, e.$attrs, { onClick: n }), {
|
|
1549
|
-
default:
|
|
1661
|
+
default: I(() => [j(e.$slots, "default", {}, () => [h(P(e.$t("xia-zai-dao-ru-mo-ban")), 1)])]),
|
|
1550
1662
|
_: 3
|
|
1551
1663
|
}, 16);
|
|
1552
1664
|
};
|
|
1553
1665
|
}
|
|
1554
|
-
},
|
|
1666
|
+
}, Et = {
|
|
1555
1667
|
mounted(e, t) {
|
|
1556
|
-
t.value &&
|
|
1668
|
+
t.value && Dt(e);
|
|
1557
1669
|
},
|
|
1558
1670
|
updated(e, t) {
|
|
1559
|
-
t.value ?
|
|
1671
|
+
t.value ? Dt(e) : Ot(e);
|
|
1560
1672
|
},
|
|
1561
1673
|
beforeUnmount(e) {
|
|
1562
|
-
|
|
1674
|
+
Ot(e);
|
|
1563
1675
|
}
|
|
1564
1676
|
};
|
|
1565
|
-
async function
|
|
1677
|
+
async function Dt(e) {
|
|
1566
1678
|
await f();
|
|
1567
1679
|
let t = e.querySelector(".el-dialog");
|
|
1568
1680
|
if (!t) return;
|
|
@@ -1625,15 +1737,15 @@ async function Tt(e) {
|
|
|
1625
1737
|
}
|
|
1626
1738
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1627
1739
|
}
|
|
1628
|
-
function
|
|
1740
|
+
function Ot(e) {
|
|
1629
1741
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1630
1742
|
}
|
|
1631
1743
|
//#endregion
|
|
1632
1744
|
//#region src/components/Layer/index.vue
|
|
1633
|
-
var
|
|
1745
|
+
var kt = {
|
|
1634
1746
|
key: 0,
|
|
1635
1747
|
class: "drawer-btn"
|
|
1636
|
-
},
|
|
1748
|
+
}, At = { key: 1 }, jt = {
|
|
1637
1749
|
__name: "index",
|
|
1638
1750
|
props: {
|
|
1639
1751
|
layer: {
|
|
@@ -1653,7 +1765,7 @@ var Dt = {
|
|
|
1653
1765
|
},
|
|
1654
1766
|
emits: ["confirm"],
|
|
1655
1767
|
setup(e, { emit: t }) {
|
|
1656
|
-
let n = e, r = t, { t: i } =
|
|
1768
|
+
let n = e, r = t, { t: i } = V(), o = ce(() => {
|
|
1657
1769
|
r("confirm");
|
|
1658
1770
|
}, 300);
|
|
1659
1771
|
async function s() {
|
|
@@ -1664,7 +1776,7 @@ var Dt = {
|
|
|
1664
1776
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1665
1777
|
}
|
|
1666
1778
|
return (t, n) => {
|
|
1667
|
-
let r =
|
|
1779
|
+
let r = M("el-button"), i = M("el-drawer"), a = M("el-dialog");
|
|
1668
1780
|
return e.layer.type ? (O(), u(i, {
|
|
1669
1781
|
key: 0,
|
|
1670
1782
|
modelValue: e.layer.show,
|
|
@@ -1676,18 +1788,18 @@ var Dt = {
|
|
|
1676
1788
|
"before-close": s,
|
|
1677
1789
|
class: "drawer-content"
|
|
1678
1790
|
}, {
|
|
1679
|
-
default:
|
|
1680
|
-
|
|
1791
|
+
default: I(() => [
|
|
1792
|
+
j(t.$slots, "default"),
|
|
1681
1793
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1682
|
-
e.layer.showButton ? (O(), f("div",
|
|
1683
|
-
default:
|
|
1794
|
+
e.layer.showButton ? (O(), f("div", kt, [j(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1795
|
+
default: I(() => [h(P(t.$t("qu-xiao")), 1)]),
|
|
1684
1796
|
_: 1
|
|
1685
1797
|
}), g(r, {
|
|
1686
1798
|
type: "primary",
|
|
1687
1799
|
loading: e.loading,
|
|
1688
|
-
onClick:
|
|
1800
|
+
onClick: F(o)
|
|
1689
1801
|
}, {
|
|
1690
|
-
default:
|
|
1802
|
+
default: I(() => [h(P(t.$t("ti-jiao")), 1)]),
|
|
1691
1803
|
_: 1
|
|
1692
1804
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1693
1805
|
]),
|
|
@@ -1696,7 +1808,7 @@ var Dt = {
|
|
|
1696
1808
|
"modelValue",
|
|
1697
1809
|
"size",
|
|
1698
1810
|
"title"
|
|
1699
|
-
])) :
|
|
1811
|
+
])) : L((O(), f("div", At, [g(a, {
|
|
1700
1812
|
"close-on-click-modal": !1,
|
|
1701
1813
|
modelValue: e.layer.show,
|
|
1702
1814
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1704,18 +1816,18 @@ var Dt = {
|
|
|
1704
1816
|
width: e.layer.width || 500,
|
|
1705
1817
|
center: ""
|
|
1706
1818
|
}, m({
|
|
1707
|
-
default:
|
|
1819
|
+
default: I(() => [j(t.$slots, "default")]),
|
|
1708
1820
|
_: 2
|
|
1709
1821
|
}, [e.layer.showButton ? {
|
|
1710
1822
|
name: "footer",
|
|
1711
|
-
fn:
|
|
1712
|
-
default:
|
|
1823
|
+
fn: I(() => [j(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1824
|
+
default: I(() => [h(P(t.$t("qu-xiao")), 1)]),
|
|
1713
1825
|
_: 1
|
|
1714
1826
|
}), g(r, {
|
|
1715
1827
|
type: "primary",
|
|
1716
|
-
onClick:
|
|
1828
|
+
onClick: F(o)
|
|
1717
1829
|
}, {
|
|
1718
|
-
default:
|
|
1830
|
+
default: I(() => [h(P(t.$t("ti-jiao")), 1)]),
|
|
1719
1831
|
_: 1
|
|
1720
1832
|
}, 8, ["onClick"])])]),
|
|
1721
1833
|
key: "0"
|
|
@@ -1723,14 +1835,14 @@ var Dt = {
|
|
|
1723
1835
|
"modelValue",
|
|
1724
1836
|
"title",
|
|
1725
1837
|
"width"
|
|
1726
|
-
])])), [[
|
|
1838
|
+
])])), [[F(Et), e.layer.show]]);
|
|
1727
1839
|
};
|
|
1728
1840
|
}
|
|
1729
1841
|
};
|
|
1730
1842
|
//#endregion
|
|
1731
1843
|
//#region src/utils/tools/validate.js
|
|
1732
|
-
function
|
|
1733
|
-
let n =
|
|
1844
|
+
function Mt(e, t = {}) {
|
|
1845
|
+
let n = Q(), r = {
|
|
1734
1846
|
inForm: !0,
|
|
1735
1847
|
required: !0,
|
|
1736
1848
|
...t
|
|
@@ -1749,7 +1861,7 @@ function At(e, t = {}) {
|
|
|
1749
1861
|
}
|
|
1750
1862
|
//#endregion
|
|
1751
1863
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1752
|
-
var
|
|
1864
|
+
var Nt = class {
|
|
1753
1865
|
constructor(e = {}) {
|
|
1754
1866
|
this.config = {
|
|
1755
1867
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -1896,24 +2008,24 @@ var jt = class {
|
|
|
1896
2008
|
};
|
|
1897
2009
|
//#endregion
|
|
1898
2010
|
//#region src/utils/tools/format.js
|
|
1899
|
-
function
|
|
2011
|
+
function Pt(e, t = 2, n = ".", r = ",") {
|
|
1900
2012
|
(e == null || e === "") && (e = 0);
|
|
1901
2013
|
let i = Number(e);
|
|
1902
2014
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
1903
2015
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
1904
2016
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
1905
2017
|
}
|
|
1906
|
-
function
|
|
1907
|
-
return
|
|
2018
|
+
function Ft(e, t = 2) {
|
|
2019
|
+
return Pt(e, t);
|
|
1908
2020
|
}
|
|
1909
|
-
function
|
|
2021
|
+
function It(e, t = 2) {
|
|
1910
2022
|
(e == null || e === "") && (e = 0);
|
|
1911
2023
|
let n = Number(e);
|
|
1912
|
-
return e = isNaN(n) ? 0 : n,
|
|
2024
|
+
return e = isNaN(n) ? 0 : n, Pt(e * 100, t) + "%";
|
|
1913
2025
|
}
|
|
1914
2026
|
//#endregion
|
|
1915
2027
|
//#region src/utils/hook/common.js
|
|
1916
|
-
function
|
|
2028
|
+
function Lt(e, t = {}) {
|
|
1917
2029
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
1918
2030
|
manual: !1,
|
|
1919
2031
|
log: !1,
|
|
@@ -1925,13 +2037,13 @@ function Ft(e, t = {}) {
|
|
|
1925
2037
|
let { code: t, data: c, msg: l } = e;
|
|
1926
2038
|
if (a) {
|
|
1927
2039
|
let { records: t, rows: n } = c || {};
|
|
1928
|
-
s.value =
|
|
2040
|
+
s.value = Bt(t || n ? t || n : c, o), a(e);
|
|
1929
2041
|
}
|
|
1930
2042
|
if (c) {
|
|
1931
2043
|
if (c.records != null || c.rows != null) {
|
|
1932
2044
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
1933
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
1934
|
-
} else s.value =
|
|
2045
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Bt(e || t || [], o);
|
|
2046
|
+
} else s.value = Bt(c, o);
|
|
1935
2047
|
r && console.log("useRequest-res", s.value);
|
|
1936
2048
|
}
|
|
1937
2049
|
}).catch((e) => {
|
|
@@ -1946,9 +2058,9 @@ function Ft(e, t = {}) {
|
|
|
1946
2058
|
l
|
|
1947
2059
|
];
|
|
1948
2060
|
}
|
|
1949
|
-
function
|
|
2061
|
+
function Rt(e) {
|
|
1950
2062
|
let t = A(e), n = A(""), r = A("");
|
|
1951
|
-
return
|
|
2063
|
+
return re(t, (e) => {
|
|
1952
2064
|
let t = e || ["", ""];
|
|
1953
2065
|
n.value = t[0], r.value = t[1];
|
|
1954
2066
|
}), [
|
|
@@ -1957,10 +2069,10 @@ function It(e) {
|
|
|
1957
2069
|
r
|
|
1958
2070
|
];
|
|
1959
2071
|
}
|
|
1960
|
-
function
|
|
2072
|
+
function zt(e) {
|
|
1961
2073
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
1962
2074
|
}
|
|
1963
|
-
function
|
|
2075
|
+
function Bt(e, t) {
|
|
1964
2076
|
if (!t) return e;
|
|
1965
2077
|
if (e instanceof Array) return e.map((e) => {
|
|
1966
2078
|
let n = {};
|
|
@@ -1971,58 +2083,58 @@ function Rt(e, t) {
|
|
|
1971
2083
|
}
|
|
1972
2084
|
//#endregion
|
|
1973
2085
|
//#region src/utils/hook/i18n.js
|
|
1974
|
-
function
|
|
1975
|
-
let { locale: n } =
|
|
1976
|
-
return
|
|
2086
|
+
function Vt(e, t = []) {
|
|
2087
|
+
let { locale: n } = V(), r = A(e());
|
|
2088
|
+
return re([n, ...t], () => {
|
|
1977
2089
|
r.value = e();
|
|
1978
2090
|
}, { immediate: !0 }), r;
|
|
1979
2091
|
}
|
|
1980
|
-
function
|
|
2092
|
+
function Ht(e, t = "zh_cn", n = "en_us") {
|
|
1981
2093
|
return e && (e[{
|
|
1982
2094
|
en_us: n,
|
|
1983
2095
|
zh_cn: t
|
|
1984
|
-
}[
|
|
2096
|
+
}[Z().global.locale.value]] || e[t]) || "-";
|
|
1985
2097
|
}
|
|
1986
2098
|
//#endregion
|
|
1987
2099
|
//#region src/utils/hook/storeHook.js
|
|
1988
|
-
function Vt(e, t) {
|
|
1989
|
-
let n = q;
|
|
1990
|
-
return typeof e == "string" && e.length > 0 && (n = G(e).mapState), Wt(t, n);
|
|
1991
|
-
}
|
|
1992
|
-
function Ht(e, t) {
|
|
1993
|
-
let n = K;
|
|
1994
|
-
return typeof e == "string" && e.length > 0 && (n = G(e).mapGetters), Wt(t, n);
|
|
1995
|
-
}
|
|
1996
2100
|
function Ut(e, t) {
|
|
1997
|
-
let n =
|
|
1998
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2101
|
+
let n = H;
|
|
2102
|
+
return typeof e == "string" && e.length > 0 && (n = ue(e).mapState), Kt(t, n);
|
|
1999
2103
|
}
|
|
2000
2104
|
function Wt(e, t) {
|
|
2001
|
-
let n =
|
|
2105
|
+
let n = fe;
|
|
2106
|
+
return typeof e == "string" && e.length > 0 && (n = ue(e).mapGetters), Kt(t, n);
|
|
2107
|
+
}
|
|
2108
|
+
function Gt(e, t) {
|
|
2109
|
+
let n = de;
|
|
2110
|
+
return typeof e == "string" && e.length > 0 && (n = ue(e).mapActions), qt(t, n);
|
|
2111
|
+
}
|
|
2112
|
+
function Kt(e, t) {
|
|
2113
|
+
let n = pe(), r = t(e), i = {};
|
|
2002
2114
|
return Object.keys(r).forEach((e) => {
|
|
2003
2115
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2004
2116
|
}), i;
|
|
2005
2117
|
}
|
|
2006
|
-
function
|
|
2007
|
-
let n =
|
|
2118
|
+
function qt(e, t) {
|
|
2119
|
+
let n = pe(), r = t(e), i = {};
|
|
2008
2120
|
return Object.keys(r).forEach((e) => {
|
|
2009
2121
|
i[e] = r[e].bind({ $store: n });
|
|
2010
2122
|
}), i;
|
|
2011
2123
|
}
|
|
2012
2124
|
//#endregion
|
|
2013
2125
|
//#region src/components/CmpTag/index.vue
|
|
2014
|
-
var
|
|
2126
|
+
var Jt = {
|
|
2015
2127
|
__name: "index",
|
|
2016
2128
|
props: { fontColor: String },
|
|
2017
2129
|
setup(e) {
|
|
2018
2130
|
return (t, n) => {
|
|
2019
|
-
let r =
|
|
2131
|
+
let r = M("el-tag");
|
|
2020
2132
|
return O(), u(r, x(t.$attrs, { style: {
|
|
2021
2133
|
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
2022
2134
|
color: e.fontColor,
|
|
2023
2135
|
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
2024
2136
|
} }), {
|
|
2025
|
-
default:
|
|
2137
|
+
default: I(() => [j(t.$slots, "default")]),
|
|
2026
2138
|
_: 3
|
|
2027
2139
|
}, 16, ["style"]);
|
|
2028
2140
|
};
|
|
@@ -2030,40 +2142,40 @@ var Kt = {
|
|
|
2030
2142
|
};
|
|
2031
2143
|
//#endregion
|
|
2032
2144
|
//#region src/components/VxeTable/index.jsx
|
|
2033
|
-
function
|
|
2145
|
+
function Yt(e) {
|
|
2034
2146
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2035
2147
|
}
|
|
2036
|
-
function
|
|
2037
|
-
|
|
2038
|
-
return Mt(e, t);
|
|
2039
|
-
} }), J.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2040
|
-
return Nt(e, t);
|
|
2041
|
-
} }), J.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2148
|
+
function Xt() {
|
|
2149
|
+
U.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2042
2150
|
return Pt(e, t);
|
|
2151
|
+
} }), U.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2152
|
+
return Ft(e, t);
|
|
2153
|
+
} }), U.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2154
|
+
return It(e, t);
|
|
2043
2155
|
} });
|
|
2044
2156
|
}
|
|
2045
|
-
function
|
|
2046
|
-
|
|
2157
|
+
function Zt() {
|
|
2158
|
+
U.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2047
2159
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2048
|
-
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } =
|
|
2049
|
-
return e.type == "tag" ? o ? g(
|
|
2160
|
+
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } = V(), c = s.value == "zh_cn" ? r : i;
|
|
2161
|
+
return e.type == "tag" ? o ? g(Jt, { fontColor: o }, { default: () => [
|
|
2050
2162
|
h(" "),
|
|
2051
2163
|
c,
|
|
2052
2164
|
h(" ")
|
|
2053
|
-
] }) : g(
|
|
2165
|
+
] }) : g(Jt, { type: a }, { default: () => [
|
|
2054
2166
|
h(" "),
|
|
2055
2167
|
c,
|
|
2056
2168
|
h(" ")
|
|
2057
|
-
] }) : e.type == "text" ? g(
|
|
2169
|
+
] }) : e.type == "text" ? g(M("el-text"), { type: a }, { default: () => [
|
|
2058
2170
|
h(" "),
|
|
2059
2171
|
c,
|
|
2060
2172
|
h(" ")
|
|
2061
|
-
] }) : g(
|
|
2173
|
+
] }) : g(M("el-text"), null, { default: () => [
|
|
2062
2174
|
h(" "),
|
|
2063
2175
|
c,
|
|
2064
2176
|
h(" ")
|
|
2065
2177
|
] });
|
|
2066
|
-
} }),
|
|
2178
|
+
} }), U.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2067
2179
|
return g(n, x({
|
|
2068
2180
|
modelValue: t.row[t.column.field],
|
|
2069
2181
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2071,14 +2183,14 @@ function Yt() {
|
|
|
2071
2183
|
"step-strictly": !0,
|
|
2072
2184
|
"value-on-clear": 0
|
|
2073
2185
|
}), null);
|
|
2074
|
-
} }),
|
|
2075
|
-
let { locale: n } =
|
|
2186
|
+
} }), U.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2187
|
+
let { locale: n } = V(), r = n.value == "zh_cn";
|
|
2076
2188
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2077
|
-
} }),
|
|
2078
|
-
let { locale: n } =
|
|
2189
|
+
} }), U.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2190
|
+
let { locale: n } = V(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2079
2191
|
return t.row[r] || t.row[t.column.field];
|
|
2080
|
-
} }),
|
|
2081
|
-
let n = t.column.field, i =
|
|
2192
|
+
} }), U.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2193
|
+
let n = t.column.field, i = W(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2082
2194
|
function l(e, t) {
|
|
2083
2195
|
s == "blank" ? window.open(e) : i.push({
|
|
2084
2196
|
path: e,
|
|
@@ -2091,17 +2203,17 @@ function Yt() {
|
|
|
2091
2203
|
underline: "never",
|
|
2092
2204
|
type: "primary",
|
|
2093
2205
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2094
|
-
},
|
|
2206
|
+
}, Yt(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2095
2207
|
}
|
|
2096
2208
|
return g(r, {
|
|
2097
2209
|
underline: "never",
|
|
2098
2210
|
type: "primary",
|
|
2099
2211
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2100
|
-
},
|
|
2212
|
+
}, Yt(c) ? c : { default: () => [c] });
|
|
2101
2213
|
} });
|
|
2102
2214
|
}
|
|
2103
|
-
function
|
|
2104
|
-
|
|
2215
|
+
function Qt() {
|
|
2216
|
+
Xt(), Zt();
|
|
2105
2217
|
}
|
|
2106
2218
|
//#endregion
|
|
2107
|
-
export {
|
|
2219
|
+
export { et as CmpDictionary, rt as CmpIcon, at as ConfrimButton, Tt as DownExcelTemp, ct as ImportButton, be as LayOutForm, jt as Layer, wt as ListPage, Nt as OnePortalCasSDK, mt as SearchBar, Ge as StatusMap, He as _toRaw, zt as _typeOf, Ke as arrToStatusMap, Ue as arrayToTree, Ye as checkFileSize, Mt as creatValidator, Ze as createImportFields, Xe as createListPageId, X as en_us, ke as exportExcel, Re as exportExcelMuilti, Ft as formatMoney, Pt as formatNumber, It as formatPercent, Z as getI18n, Q as getI18nT, vt as getListPageConfig, Ht as getLocaleValue, Qe as getValueBykey, De as importExcel, Ie as importExcelMuilti, we as messages, Xt as registerVxeFormatters, Qt as registerVxePlugins, Zt as registerVxeRenderers, yt as resetListPageConfig, _t as setListPageConfig, Ee as setupI18n, Ve as sleep, We as stringToArray, qe as stripHtmlTags, Je as unicode2Str, Gt as useActions, Rt as useDatePicker, Wt as useGetters, Vt as useI18nReState, Lt as useRequest, Ut as useState, Y as zh_cn };
|