joy-admin-components 0.2.102 → 0.2.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CmpDictionary/index.d.ts +8 -0
- package/dist/components/CmpTag/index.d.ts +29 -0
- package/dist/components/ConfrimButton/index.d.ts +18 -17
- package/dist/components/DownExcelTemp/index.d.ts +33 -7
- package/dist/components/ImportButton/index.d.ts +23 -27
- package/dist/directive/index.d.ts +86 -0
- package/dist/index.d.ts +4 -2
- package/dist/joy-admin-components.es.js +407 -383
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/utils/index.d.ts +78 -12
- package/package.json +1 -1
- package/src/components/CmpTag/index.d.ts +30 -0
- package/src/components/DownExcelTemp/index.d.ts +33 -7
- package/src/components/ImportButton/index.d.ts +23 -9
- package/src/index.d.ts +2 -0
- package/src/utils/index.d.ts +77 -11
|
@@ -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 E, openBlock as D, reactive as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as le, useI18n 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 E, openBlock as D, reactive as O, ref as k, renderList as te, renderSlot as A, resolveComponent as j, resolveDirective as ne, resolveDynamicComponent as M, toDisplayString as N, toValue as re, unref as P, useAttrs as F, useModel as ie, watch as ae, withCtx as I, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
|
|
3
|
+
import { saveAs as L } from "file-saver";
|
|
4
|
+
import R from "exceljs";
|
|
5
|
+
import z from "dayjs";
|
|
6
|
+
import { createI18n as le, useI18n as B } from "vue-i18n";
|
|
7
7
|
import { cloneDeep as ue, debounce as de, isArray as fe } from "lodash";
|
|
8
|
-
import { createNamespacedHelpers as pe, mapActions as me, mapGetters as he, mapState as ge, useStore as
|
|
9
|
-
import { VxeUI as
|
|
10
|
-
import { useRouter as
|
|
8
|
+
import { createNamespacedHelpers as pe, mapActions as me, mapGetters as he, mapState as ge, useStore as V } from "vuex";
|
|
9
|
+
import { VxeUI as H } from "vxe-pc-ui";
|
|
10
|
+
import { useRouter as _e } from "vue-router";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i = be(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !
|
|
12
|
+
var U = Object.create, ve = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, be = Object.getOwnPropertyNames, xe = Object.getPrototypeOf, W = Object.prototype.hasOwnProperty, G = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), Se = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = be(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !W.call(e, s) && s !== n && ve(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
15
|
enumerable: !(r = ye(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, Ce = (e, t, n) => (n = e == null ? {} : U(xe(e)), Se(t || !e || !e.__esModule ? ve(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), K = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
|
-
let s =
|
|
24
|
+
let s = k(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
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, H = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), we = /* @__PURE__ */ G(((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, H = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), Te = /* @__PURE__ */ G(((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, H = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), q = /* @__PURE__ */ Ce(we()), Ee = /* @__PURE__ */ Ce(Te()), J = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -252,36 +252,36 @@ var ve = Object.create, H = Object.defineProperty, ye = Object.getOwnPropertyDes
|
|
|
252
252
|
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
253
253
|
validate: { invalidInput: "Please enter valid content" },
|
|
254
254
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
255
|
-
},
|
|
255
|
+
}, De = {
|
|
256
256
|
zh_cn: J,
|
|
257
257
|
en_us: Y
|
|
258
|
-
},
|
|
259
|
-
function
|
|
258
|
+
}, X = null;
|
|
259
|
+
function Z(e = null) {
|
|
260
260
|
if (e) {
|
|
261
261
|
let { global: t } = e;
|
|
262
|
-
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", J) : t.setLocaleMessage("zh_cn", J), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", Y) : t.setLocaleMessage("en_us", Y),
|
|
262
|
+
return t.messages.value?.zh_cn ? t.mergeLocaleMessage("zh_cn", J) : t.setLocaleMessage("zh_cn", J), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", Y) : t.setLocaleMessage("en_us", Y), X = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return X ||= le({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
268
|
+
messages: De
|
|
269
|
+
}), X;
|
|
270
270
|
}
|
|
271
271
|
function Q() {
|
|
272
|
-
return
|
|
272
|
+
return X || Z();
|
|
273
273
|
}
|
|
274
274
|
function $() {
|
|
275
275
|
return Q().global.t;
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
async function
|
|
277
|
+
z.extend(q.default), z.extend(Ee.default);
|
|
278
|
+
async function Oe(e, t) {
|
|
279
279
|
let { fields: n, range: r = 1 } = t;
|
|
280
280
|
if (!n) {
|
|
281
281
|
let e = $();
|
|
282
282
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
283
283
|
}
|
|
284
|
-
let i = new
|
|
284
|
+
let i = new R.Workbook();
|
|
285
285
|
await i.xlsx.load(e);
|
|
286
286
|
let a = {};
|
|
287
287
|
return i.eachSheet(function(e, t) {
|
|
@@ -291,47 +291,47 @@ async function De(e, t) {
|
|
|
291
291
|
let t = {}, r = !0;
|
|
292
292
|
Object.keys(n).forEach((i) => {
|
|
293
293
|
let a = e.getCell(n[i]).value;
|
|
294
|
-
t[i] = a, a && (r = !1);
|
|
294
|
+
typeof a == "string" && (a = a.trim()), t[i] = a, a && (r = !1);
|
|
295
295
|
}), r || i.push(t);
|
|
296
296
|
}
|
|
297
297
|
}), a[e._name] = i;
|
|
298
298
|
}), i = null, a;
|
|
299
299
|
}
|
|
300
|
-
var
|
|
301
|
-
async function
|
|
300
|
+
var ke = { columnWidth: 30 };
|
|
301
|
+
async function Ae(e, t, n = [], r = {}) {
|
|
302
302
|
if (!e || !t) return;
|
|
303
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
303
|
+
let { columnStyle: i } = r, { columnWidth: a } = ke;
|
|
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 } = je();
|
|
308
|
+
s.columns = t, s.addRows(n), i && await Me(o, s, i);
|
|
309
309
|
try {
|
|
310
310
|
let t = await o.xlsx.writeBuffer();
|
|
311
|
-
|
|
311
|
+
L(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
312
312
|
} catch (e) {
|
|
313
313
|
console.log(e);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
let e = new
|
|
316
|
+
function je() {
|
|
317
|
+
let e = new R.Workbook();
|
|
318
318
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
319
319
|
workbook: e,
|
|
320
320
|
worksheet: e.addWorksheet("Sheet1")
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
async function
|
|
323
|
+
async function Me(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 Ne(e, t, i, r);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
async function
|
|
334
|
+
async function Ne(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 Me(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 Pe(e, t, r, {
|
|
343
343
|
width: 100,
|
|
344
344
|
height: 50,
|
|
345
345
|
col: i._number - 1,
|
|
@@ -347,8 +347,8 @@ async function Me(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 Pe(e, t, n, r) {
|
|
351
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Fe(n, .3);
|
|
352
352
|
if (c) {
|
|
353
353
|
let n = e.addImage({
|
|
354
354
|
base64: l,
|
|
@@ -366,7 +366,7 @@ async function Ne(e, t, n, r) {
|
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function Fe(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 Pe(e, t = 1) {
|
|
|
380
380
|
};
|
|
381
381
|
});
|
|
382
382
|
}
|
|
383
|
-
var
|
|
384
|
-
async function
|
|
383
|
+
var Ie = "---";
|
|
384
|
+
async function Le(e, t) {
|
|
385
385
|
let { fields: n, range: r = 1 } = t;
|
|
386
386
|
if (!n) {
|
|
387
387
|
let e = $();
|
|
388
388
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
389
389
|
}
|
|
390
|
-
let i = new
|
|
390
|
+
let i = new R.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 Ie(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(Ie), u = e.getCell(c), d;
|
|
409
|
+
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? z(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Ie)[1]), typeof d == "string" && (d = d.trim()), r[t] = d, d && (a = !1);
|
|
410
410
|
}), a || t.push(r);
|
|
411
411
|
}
|
|
412
412
|
}), a[e._name] = t;
|
|
@@ -414,16 +414,16 @@ async function Ie(e, t) {
|
|
|
414
414
|
}
|
|
415
415
|
}), i = null, a;
|
|
416
416
|
}
|
|
417
|
-
var
|
|
417
|
+
var Re = {
|
|
418
418
|
date: "yyyy-mm-dd",
|
|
419
419
|
number: "0",
|
|
420
420
|
string: "@"
|
|
421
421
|
};
|
|
422
|
-
async function
|
|
422
|
+
async function ze(e, t) {
|
|
423
423
|
if (!e || t.length == 0) return;
|
|
424
|
-
let n =
|
|
424
|
+
let n = Be(t);
|
|
425
425
|
for (let e of n.worksheets) {
|
|
426
|
-
let { columnWidth: r } =
|
|
426
|
+
let { columnWidth: r } = ke, i = t[e.name];
|
|
427
427
|
if (!i) continue;
|
|
428
428
|
let { tableHeader: a, tableData: o } = i;
|
|
429
429
|
a.forEach((e) => {
|
|
@@ -437,9 +437,9 @@ async function Re(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 = Re[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}${Ie}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
443
443
|
if (n > 0) {
|
|
444
444
|
let t = $();
|
|
445
445
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
@@ -460,34 +460,49 @@ async function Re(e, t) {
|
|
|
460
460
|
}
|
|
461
461
|
try {
|
|
462
462
|
let t = await n.xlsx.writeBuffer();
|
|
463
|
-
|
|
463
|
+
L(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 = $(), n = new
|
|
468
|
+
function Be(e) {
|
|
469
|
+
let t = $(), n = new R.Workbook();
|
|
470
470
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((t, n) => (e[t].sort ?? 0) - (e[n].sort ?? 0)).forEach((r) => {
|
|
471
471
|
let i = r, a = !1;
|
|
472
472
|
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), a = !0), r.length > 31 && (r = r.substring(0, 31).trim(), a = !0, console.warn(t("excel.sheetNameTooLong", [i, r]))), a && (e[r] = e[i], delete e[i]), n.addWorksheet(r);
|
|
473
473
|
}), n;
|
|
474
474
|
}
|
|
475
|
-
function
|
|
475
|
+
function Ve(e) {
|
|
476
476
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
477
477
|
}
|
|
478
|
+
function He(e) {
|
|
479
|
+
let t = e.split(";base64,"), n = t[0].split(":")[1], r = window.atob(t[1]), i = r.length, a = new Uint8Array(i);
|
|
480
|
+
for (let e = 0; e < i; ++e) a[e] = r.charCodeAt(e);
|
|
481
|
+
return new Blob([a], { type: n });
|
|
482
|
+
}
|
|
483
|
+
function Ue(e, t = "image.png") {
|
|
484
|
+
let n = He(e);
|
|
485
|
+
return new File([n], t, { type: n.type });
|
|
486
|
+
}
|
|
487
|
+
function We(e, t) {
|
|
488
|
+
let n = e.match(/^data:image\/(\w+);base64,/), r = n ? n[1] : "png";
|
|
489
|
+
t ||= `image_${Date.now()}.${r}`;
|
|
490
|
+
let i = Ue(e, t), a = new FormData();
|
|
491
|
+
return a.append("file", i), a;
|
|
492
|
+
}
|
|
478
493
|
//#endregion
|
|
479
494
|
//#region src/utils/tools/tools.js
|
|
480
|
-
function
|
|
495
|
+
function Ge(e) {
|
|
481
496
|
return new Promise((t) => {
|
|
482
497
|
setTimeout(() => {
|
|
483
498
|
t();
|
|
484
499
|
}, e);
|
|
485
500
|
});
|
|
486
501
|
}
|
|
487
|
-
function
|
|
502
|
+
function Ke(e) {
|
|
488
503
|
return JSON.parse(JSON.stringify(e));
|
|
489
504
|
}
|
|
490
|
-
function
|
|
505
|
+
function qe(e) {
|
|
491
506
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
492
507
|
for (let i of e) {
|
|
493
508
|
n[i.id] = {
|
|
@@ -499,10 +514,10 @@ function Ue(e) {
|
|
|
499
514
|
}
|
|
500
515
|
return t;
|
|
501
516
|
}
|
|
502
|
-
function
|
|
517
|
+
function Je(e, t = " ") {
|
|
503
518
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
504
519
|
}
|
|
505
|
-
var
|
|
520
|
+
var Ye = class {
|
|
506
521
|
constructor(e, t = [
|
|
507
522
|
"label",
|
|
508
523
|
"value",
|
|
@@ -546,49 +561,49 @@ var Ge = class {
|
|
|
546
561
|
return this.labelMap.get(e) ?? null;
|
|
547
562
|
}
|
|
548
563
|
};
|
|
549
|
-
function
|
|
550
|
-
if (e.length == 0) return new
|
|
564
|
+
function Xe(e, t = [], n = "i18nName") {
|
|
565
|
+
if (e.length == 0) return new Ye([]);
|
|
551
566
|
if (t.length < 2) {
|
|
552
567
|
let e = $();
|
|
553
568
|
throw Error(e("tools.keysLengthError"));
|
|
554
569
|
}
|
|
555
|
-
return new
|
|
570
|
+
return new Ye(e.map((e) => {
|
|
556
571
|
let r = {};
|
|
557
572
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
558
573
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
559
574
|
}), r;
|
|
560
575
|
}));
|
|
561
576
|
}
|
|
562
|
-
function
|
|
577
|
+
function Ze(e) {
|
|
563
578
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
564
579
|
}
|
|
565
|
-
function
|
|
580
|
+
function Qe(e) {
|
|
566
581
|
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)))) : "";
|
|
567
582
|
}
|
|
568
|
-
function
|
|
583
|
+
function $e(e, t = 10) {
|
|
569
584
|
let n = 1024 * 1024 * t;
|
|
570
585
|
return !(e.size > n);
|
|
571
586
|
}
|
|
572
|
-
function
|
|
587
|
+
function et(e) {
|
|
573
588
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
574
589
|
}
|
|
575
|
-
function
|
|
590
|
+
function tt(e) {
|
|
576
591
|
let t = {};
|
|
577
592
|
return e.map((e, n) => {
|
|
578
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
593
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = Ve(n);
|
|
579
594
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
580
595
|
}), t;
|
|
581
596
|
}
|
|
582
|
-
function
|
|
597
|
+
function nt(e, t) {
|
|
583
598
|
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
584
599
|
}
|
|
585
600
|
//#endregion
|
|
586
601
|
//#region \0plugin-vue:export-helper
|
|
587
|
-
var
|
|
602
|
+
var rt = (e, t) => {
|
|
588
603
|
let n = e.__vccOpts || e;
|
|
589
604
|
for (let [e, r] of t) n[e] = r;
|
|
590
605
|
return n;
|
|
591
|
-
},
|
|
606
|
+
}, it = ["onClick"], at = /* @__PURE__ */ rt({
|
|
592
607
|
__name: "index",
|
|
593
608
|
props: /* @__PURE__ */ b({
|
|
594
609
|
api: { type: Function },
|
|
@@ -631,9 +646,9 @@ var $e = (e, t) => {
|
|
|
631
646
|
"changeAll"
|
|
632
647
|
], ["update:modelValue"]),
|
|
633
648
|
setup(e, { emit: t }) {
|
|
634
|
-
let n = e, r =
|
|
649
|
+
let n = e, r = F(), { t: i, locale: a } = B(), o = ie(e, "modelValue"), s = l(() => r["value-key"] != null), _ = k(""), v = l(() => {
|
|
635
650
|
if (r.remote !== void 0) return n.data;
|
|
636
|
-
let e =
|
|
651
|
+
let e = Je(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
637
652
|
if (e.length == 0) return o;
|
|
638
653
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
639
654
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -647,7 +662,7 @@ var $e = (e, t) => {
|
|
|
647
662
|
set(e) {
|
|
648
663
|
return e;
|
|
649
664
|
}
|
|
650
|
-
}), b = t, C =
|
|
665
|
+
}), b = t, C = k([]);
|
|
651
666
|
n.api && (async () => {
|
|
652
667
|
let { data: e } = await n.api();
|
|
653
668
|
C.value = [...e], b("success", C);
|
|
@@ -657,7 +672,7 @@ var $e = (e, t) => {
|
|
|
657
672
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
658
673
|
});
|
|
659
674
|
}
|
|
660
|
-
let T =
|
|
675
|
+
let T = k(null);
|
|
661
676
|
function ee() {
|
|
662
677
|
let e = r.multiple === void 0 ? void 0 : [];
|
|
663
678
|
b("change", e), S(() => {
|
|
@@ -667,43 +682,43 @@ var $e = (e, t) => {
|
|
|
667
682
|
function E(e) {
|
|
668
683
|
T.value = e;
|
|
669
684
|
}
|
|
670
|
-
let
|
|
671
|
-
if (
|
|
685
|
+
let O = n.labelValue.label.split("-"), ne = (e) => {
|
|
686
|
+
if (O.length == 1) {
|
|
672
687
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
673
688
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
674
689
|
return t ||= e[n.labelValue.label], t + "";
|
|
675
690
|
} else {
|
|
676
691
|
let t = [];
|
|
677
|
-
return
|
|
692
|
+
return O.forEach((n) => {
|
|
678
693
|
t.push(e[n]);
|
|
679
694
|
}), t.join("-");
|
|
680
695
|
}
|
|
681
696
|
};
|
|
682
|
-
function
|
|
697
|
+
function M(e) {
|
|
683
698
|
let t = n.data ? n.data : C.value;
|
|
684
699
|
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
685
700
|
b("change", o.value), b("changeAll", o.value, t);
|
|
686
701
|
});
|
|
687
702
|
}
|
|
688
|
-
function
|
|
703
|
+
function re(e) {
|
|
689
704
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
690
705
|
n.optionClick && n.optionClick(e);
|
|
691
706
|
});
|
|
692
707
|
}
|
|
693
|
-
function
|
|
708
|
+
function oe(e) {
|
|
694
709
|
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);
|
|
695
710
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
696
711
|
}
|
|
697
|
-
function
|
|
712
|
+
function se(e) {
|
|
698
713
|
return e.map((e) => ({
|
|
699
714
|
...e,
|
|
700
|
-
label:
|
|
715
|
+
label: ne(e),
|
|
701
716
|
value: s.value ? e : e[n.labelValue.value]
|
|
702
717
|
}));
|
|
703
718
|
}
|
|
704
|
-
let L =
|
|
705
|
-
L.value =
|
|
706
|
-
let t =
|
|
719
|
+
let L = k([]);
|
|
720
|
+
L.value = se(n.data ? n.data : C.value), ae(() => n.data ? n.data : C.value, (e) => {
|
|
721
|
+
let t = se(e);
|
|
707
722
|
if (t.length !== L.value.length) L.value = t;
|
|
708
723
|
else {
|
|
709
724
|
let e = !1;
|
|
@@ -716,33 +731,33 @@ var $e = (e, t) => {
|
|
|
716
731
|
}, { deep: !0 });
|
|
717
732
|
let R = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? L.value.map((e) => ({
|
|
718
733
|
...e,
|
|
719
|
-
disabled:
|
|
734
|
+
disabled: oe(e)
|
|
720
735
|
})) : L.value);
|
|
721
736
|
return (t, n) => {
|
|
722
|
-
let i =
|
|
723
|
-
return
|
|
737
|
+
let i = j("el-checkbox"), a = j("el-select-v2"), l = j("el-option"), b = j("el-select");
|
|
738
|
+
return P(r).v2 == null ? (D(), u(b, x({
|
|
724
739
|
key: 1,
|
|
725
740
|
modelValue: o.value,
|
|
726
741
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
727
742
|
filterable: "",
|
|
728
743
|
"collapse-tags": "",
|
|
729
744
|
"collapse-tags-tooltip": "",
|
|
730
|
-
"filter-method":
|
|
745
|
+
"filter-method": P(r).remote == null ? (e) => _.value = e : void 0,
|
|
731
746
|
clearable: ""
|
|
732
|
-
},
|
|
733
|
-
default:
|
|
747
|
+
}, P(r), { onClear: ee }), {
|
|
748
|
+
default: I(() => [P(r).multiple != null && e.showCheckAll && e.maxLimit == null ? A(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
734
749
|
class: "mgl20",
|
|
735
750
|
modelValue: y.value,
|
|
736
751
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
737
|
-
onChange:
|
|
752
|
+
onChange: M
|
|
738
753
|
}, {
|
|
739
|
-
default:
|
|
754
|
+
default: I(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
740
755
|
_: 1
|
|
741
|
-
}, 8, ["modelValue"])], !0) : d("", !0), (D(!0), f(c, null,
|
|
756
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (D(!0), f(c, null, te(v.value, (t, n) => (D(), u(l, {
|
|
742
757
|
key: n,
|
|
743
|
-
label:
|
|
744
|
-
disabled:
|
|
745
|
-
onClick: ce((e) =>
|
|
758
|
+
label: ne(t),
|
|
759
|
+
disabled: P(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? oe(t) : !1,
|
|
760
|
+
onClick: ce((e) => re(t), ["stop"]),
|
|
746
761
|
value: s.value ? t : t[e.labelValue.value]
|
|
747
762
|
}, null, 8, [
|
|
748
763
|
"label",
|
|
@@ -756,42 +771,58 @@ var $e = (e, t) => {
|
|
|
756
771
|
options: R.value,
|
|
757
772
|
modelValue: o.value,
|
|
758
773
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
759
|
-
},
|
|
774
|
+
}, P(r), {
|
|
760
775
|
filterable: "",
|
|
761
776
|
"collapse-tags": "",
|
|
762
777
|
"collapse-tags-tooltip": "",
|
|
763
778
|
clearable: "",
|
|
764
779
|
onChange: w
|
|
765
780
|
}), m({
|
|
766
|
-
default:
|
|
781
|
+
default: I(({ item: e }) => [p("div", { onClick: (t) => E(e) }, N(e.label), 9, it)]),
|
|
767
782
|
_: 2
|
|
768
|
-
}, [
|
|
783
|
+
}, [P(r).multiple == null ? void 0 : {
|
|
769
784
|
name: "header",
|
|
770
|
-
fn:
|
|
785
|
+
fn: I(() => [A(t.$slots, "header", {}, () => [g(i, {
|
|
771
786
|
class: "mgl20",
|
|
772
787
|
modelValue: y.value,
|
|
773
788
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
774
|
-
onChange:
|
|
789
|
+
onChange: M
|
|
775
790
|
}, {
|
|
776
|
-
default:
|
|
791
|
+
default: I(() => [h(N(t.$t("quan-xuan")), 1)]),
|
|
777
792
|
_: 1
|
|
778
793
|
}, 8, ["modelValue"])], !0)]),
|
|
779
794
|
key: "0"
|
|
780
795
|
}]), 1040, ["options", "modelValue"]));
|
|
781
796
|
};
|
|
782
797
|
}
|
|
783
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
798
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), ot = _({ props: { name: {
|
|
784
799
|
tyepe: String,
|
|
785
800
|
required: !0
|
|
786
801
|
} } });
|
|
787
|
-
function
|
|
788
|
-
let o =
|
|
802
|
+
function st(e, t, n, r, i, a) {
|
|
803
|
+
let o = j("el-icon");
|
|
789
804
|
return D(), u(o, { class: "cmp-icon" }, {
|
|
790
|
-
default:
|
|
805
|
+
default: I(() => [(D(), u(M(e.name)))]),
|
|
791
806
|
_: 1
|
|
792
807
|
});
|
|
793
808
|
}
|
|
794
|
-
var
|
|
809
|
+
var ct = /* @__PURE__ */ rt(ot, [["render", st], ["__scopeId", "data-v-733f9daa"]]), lt = {
|
|
810
|
+
__name: "index",
|
|
811
|
+
props: { fontColor: String },
|
|
812
|
+
setup(e) {
|
|
813
|
+
return (t, n) => {
|
|
814
|
+
let r = j("el-tag");
|
|
815
|
+
return D(), u(r, x(t.$attrs, { style: {
|
|
816
|
+
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
817
|
+
color: e.fontColor,
|
|
818
|
+
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
819
|
+
} }), {
|
|
820
|
+
default: I(() => [A(t.$slots, "default")]),
|
|
821
|
+
_: 3
|
|
822
|
+
}, 16, ["style"]);
|
|
823
|
+
};
|
|
824
|
+
}
|
|
825
|
+
}, ut = { class: "confirm-button-wrapper" }, dt = /* @__PURE__ */ rt({
|
|
795
826
|
__name: "index",
|
|
796
827
|
emits: ["ok", "no"],
|
|
797
828
|
setup(e, { emit: t }) {
|
|
@@ -802,17 +833,17 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
802
833
|
n("no");
|
|
803
834
|
}
|
|
804
835
|
return (e, t) => {
|
|
805
|
-
let n =
|
|
806
|
-
return D(), f("span",
|
|
807
|
-
onConfirm:
|
|
836
|
+
let n = j("el-popconfirm");
|
|
837
|
+
return D(), f("span", ut, [g(n, x(e.$attrs, {
|
|
838
|
+
onConfirm: P(r),
|
|
808
839
|
onCancel: i
|
|
809
840
|
}), {
|
|
810
|
-
reference:
|
|
841
|
+
reference: I(() => [A(e.$slots, "default", {}, void 0, !0)]),
|
|
811
842
|
_: 3
|
|
812
843
|
}, 16, ["onConfirm"])]);
|
|
813
844
|
};
|
|
814
845
|
}
|
|
815
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
846
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), ft = { class: "ImportButton" }, pt = ["accept"], mt = /* @__PURE__ */ rt({
|
|
816
847
|
__name: "index",
|
|
817
848
|
props: {
|
|
818
849
|
accept: {
|
|
@@ -833,7 +864,7 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
833
864
|
}
|
|
834
865
|
},
|
|
835
866
|
setup(e) {
|
|
836
|
-
let { t } =
|
|
867
|
+
let { t } = B(), n = e, r = k(null), a = k(!1);
|
|
837
868
|
function o(e) {
|
|
838
869
|
let t = e.match(/__v(\d+)/);
|
|
839
870
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -848,7 +879,7 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
848
879
|
return;
|
|
849
880
|
}
|
|
850
881
|
}
|
|
851
|
-
let c = await
|
|
882
|
+
let c = await Le(s, n.fields).catch(() => {
|
|
852
883
|
a.value = !1;
|
|
853
884
|
}).finally(() => {
|
|
854
885
|
r.value.value = null;
|
|
@@ -858,14 +889,14 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
858
889
|
});
|
|
859
890
|
}
|
|
860
891
|
return (t, n) => {
|
|
861
|
-
let i =
|
|
862
|
-
return D(), f("div",
|
|
892
|
+
let i = j("el-button");
|
|
893
|
+
return D(), f("div", ft, [g(i, x({
|
|
863
894
|
type: "primary",
|
|
864
895
|
loading: a.value,
|
|
865
896
|
class: "mgr10",
|
|
866
897
|
onClick: n[0] ||= (e) => r.value.click()
|
|
867
898
|
}, t.$attrs), {
|
|
868
|
-
default:
|
|
899
|
+
default: I(() => [A(t.$slots, "default", {}, () => [h(N(t.$t("dao-ru")), 1)], !0)]),
|
|
869
900
|
_: 3
|
|
870
901
|
}, 16, ["loading"]), p("input", {
|
|
871
902
|
onChange: s,
|
|
@@ -879,27 +910,27 @@ var it = /* @__PURE__ */ $e(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"
|
|
|
879
910
|
opacity: "0"
|
|
880
911
|
},
|
|
881
912
|
type: "file"
|
|
882
|
-
}, null, 40,
|
|
913
|
+
}, null, 40, pt)]);
|
|
883
914
|
};
|
|
884
915
|
}
|
|
885
916
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
886
917
|
//#endregion
|
|
887
918
|
//#region src/components/SearchBar/tools.js
|
|
888
|
-
function
|
|
919
|
+
function ht(e) {
|
|
889
920
|
let t = {};
|
|
890
921
|
return e.forEach((e) => {
|
|
891
922
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date" } = e;
|
|
892
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
923
|
+
if (n) if (r == "input" && i?.multiple) t[n] = Je(a);
|
|
893
924
|
else if (r == "date") if (o.includes("range")) {
|
|
894
925
|
let [e, r] = n, [i, s] = a || [];
|
|
895
|
-
i && o == "daterange" && (i =
|
|
926
|
+
i && o == "daterange" && (i = z(i).format("YYYY-MM-DD 00:00:00"), s = z(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
896
927
|
} else t[n] = a;
|
|
897
928
|
else t[n] = a;
|
|
898
929
|
}), t;
|
|
899
930
|
}
|
|
900
931
|
//#endregion
|
|
901
932
|
//#region src/components/SearchBar/index.vue
|
|
902
|
-
var
|
|
933
|
+
var gt = { key: 0 }, _t = { class: "btns" }, vt = { class: "left" }, yt = { class: "right" }, bt = /* @__PURE__ */ rt({
|
|
903
934
|
__name: "index",
|
|
904
935
|
props: { form: {
|
|
905
936
|
type: Object,
|
|
@@ -911,7 +942,7 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
911
942
|
"visibleChange"
|
|
912
943
|
],
|
|
913
944
|
setup(e, { expose: t, emit: n }) {
|
|
914
|
-
let r = e, i = n, a =
|
|
945
|
+
let r = e, i = n, a = k(!0), o = k(null), { t: s } = B(), m = {
|
|
915
946
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
916
947
|
daterange: "YYYY-MM-DD",
|
|
917
948
|
month: "YYYY-MM"
|
|
@@ -929,7 +960,7 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
929
960
|
i("confirm");
|
|
930
961
|
}
|
|
931
962
|
function T() {
|
|
932
|
-
return
|
|
963
|
+
return ht(r.form.items);
|
|
933
964
|
}
|
|
934
965
|
let ee = ue(r.form.items);
|
|
935
966
|
function E() {
|
|
@@ -942,7 +973,7 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
942
973
|
getPrm: T,
|
|
943
974
|
reset: E
|
|
944
975
|
}), (t, n) => {
|
|
945
|
-
let r =
|
|
976
|
+
let r = j("el-input"), s = j("el-date-picker"), l = j("el-form-item"), T = j("el-form"), ee = j("el-link"), E = j("el-button");
|
|
946
977
|
return D(), f("div", {
|
|
947
978
|
class: "searchBar-container mgt10 mgb10",
|
|
948
979
|
onKeydown: se(v, ["enter"])
|
|
@@ -953,11 +984,11 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
953
984
|
inline: "",
|
|
954
985
|
model: e.form.data
|
|
955
986
|
}, {
|
|
956
|
-
default:
|
|
987
|
+
default: I(() => [(D(!0), f(c, null, te(e.form.items.filter((e) => !e.hidden), (e) => (D(), f(c, { key: e.key }, [e.type == "br" ? (D(), f("br", gt)) : (D(), u(l, {
|
|
957
988
|
key: 1,
|
|
958
989
|
label: e.name
|
|
959
990
|
}, {
|
|
960
|
-
default:
|
|
991
|
+
default: I(() => [
|
|
961
992
|
e.type === "input" ? (D(), u(r, {
|
|
962
993
|
key: 0,
|
|
963
994
|
modelValue: e.value,
|
|
@@ -970,8 +1001,8 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
970
1001
|
"onUpdate:modelValue",
|
|
971
1002
|
"class",
|
|
972
1003
|
"placeholder"
|
|
973
|
-
])) : e.type === "custom" ? (D(), u(
|
|
974
|
-
e.type === "select" ? (D(), u(
|
|
1004
|
+
])) : e.type === "custom" ? (D(), u(M(e.render), { key: 1 })) : d("", !0),
|
|
1005
|
+
e.type === "select" ? (D(), u(at, x({
|
|
975
1006
|
key: 2,
|
|
976
1007
|
class: e.option?.class || "w150",
|
|
977
1008
|
modelValue: e.value,
|
|
@@ -1018,7 +1049,7 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
1018
1049
|
_: 2
|
|
1019
1050
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1020
1051
|
_: 1
|
|
1021
|
-
}, 8, ["model"])], 4), p("div",
|
|
1052
|
+
}, 8, ["model"])], 4), p("div", _t, [p("div", vt, [A(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", yt, [
|
|
1022
1053
|
g(ee, {
|
|
1023
1054
|
underline: "never",
|
|
1024
1055
|
class: "mgr10",
|
|
@@ -1026,28 +1057,28 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
1026
1057
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1027
1058
|
}
|
|
1028
1059
|
}, {
|
|
1029
|
-
default:
|
|
1060
|
+
default: I(() => [g(ct, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + N(_.value), 1)]),
|
|
1030
1061
|
_: 1
|
|
1031
1062
|
}),
|
|
1032
1063
|
g(E, {
|
|
1033
1064
|
type: "primary",
|
|
1034
1065
|
onClick: v
|
|
1035
1066
|
}, {
|
|
1036
|
-
default:
|
|
1067
|
+
default: I(() => [h(N(t.$t("shai-xuan")), 1)]),
|
|
1037
1068
|
_: 1
|
|
1038
1069
|
}),
|
|
1039
1070
|
g(E, {
|
|
1040
1071
|
type: "primary",
|
|
1041
1072
|
onClick: b
|
|
1042
1073
|
}, {
|
|
1043
|
-
default:
|
|
1074
|
+
default: I(() => [h(N(t.$t("chong-zhi")), 1)]),
|
|
1044
1075
|
_: 1
|
|
1045
1076
|
}),
|
|
1046
|
-
|
|
1077
|
+
A(t.$slots, "btn", {}, void 0, !0)
|
|
1047
1078
|
])])], 32);
|
|
1048
1079
|
};
|
|
1049
1080
|
}
|
|
1050
|
-
}, [["__scopeId", "data-v-db6f71dd"]]),
|
|
1081
|
+
}, [["__scopeId", "data-v-db6f71dd"]]), xt = {
|
|
1051
1082
|
pageNoKey: "pageNo",
|
|
1052
1083
|
pageSizeKey: "pageSize",
|
|
1053
1084
|
totalKey: "total",
|
|
@@ -1071,26 +1102,26 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
1071
1102
|
showShadow: !1,
|
|
1072
1103
|
showCheckBox: !1,
|
|
1073
1104
|
enableCellCopy: !0
|
|
1074
|
-
},
|
|
1075
|
-
function
|
|
1076
|
-
|
|
1077
|
-
...
|
|
1105
|
+
}, St = { ...xt };
|
|
1106
|
+
function Ct(e) {
|
|
1107
|
+
St = {
|
|
1108
|
+
...St,
|
|
1078
1109
|
...e,
|
|
1079
1110
|
responseDataKeys: {
|
|
1080
|
-
...
|
|
1111
|
+
...St.responseDataKeys,
|
|
1081
1112
|
...e.responseDataKeys || {}
|
|
1082
1113
|
}
|
|
1083
1114
|
};
|
|
1084
1115
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return
|
|
1116
|
+
function wt() {
|
|
1117
|
+
return St;
|
|
1087
1118
|
}
|
|
1088
|
-
function
|
|
1089
|
-
|
|
1119
|
+
function Tt() {
|
|
1120
|
+
St = { ...xt };
|
|
1090
1121
|
}
|
|
1091
1122
|
//#endregion
|
|
1092
1123
|
//#region src/components/ListPage/index.vue
|
|
1093
|
-
var
|
|
1124
|
+
var Et = { class: "center" }, Dt = 0, Ot = 20, kt = .3, At = /* @__PURE__ */ rt({
|
|
1094
1125
|
__name: "index",
|
|
1095
1126
|
props: {
|
|
1096
1127
|
id: {
|
|
@@ -1120,24 +1151,24 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1120
1151
|
}
|
|
1121
1152
|
},
|
|
1122
1153
|
setup(e, { expose: t }) {
|
|
1123
|
-
let { t: n, locale: r } =
|
|
1154
|
+
let { t: n, locale: r } = B(), i = wt(), a = e, o = k(!1), s = k([]);
|
|
1124
1155
|
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 = []);
|
|
1125
1156
|
let c = l(() => {
|
|
1126
1157
|
let e = "default-table";
|
|
1127
1158
|
return a.id ? `listPageId-${e}-${a.id}` : `listPageId-${e}`;
|
|
1128
|
-
}), m = ue(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y =
|
|
1159
|
+
}), m = ue(a.searchForm.items), _ = a.searchForm.pageNoKey || i.pageNoKey, v = a.searchForm.pageSizeKey || i.pageSizeKey, y = O({
|
|
1129
1160
|
[_]: 1,
|
|
1130
1161
|
[v]: a.searchForm.defaultPageSize || i.defaultPageSize,
|
|
1131
1162
|
total: 0
|
|
1132
|
-
}), b =
|
|
1163
|
+
}), b = k(null), w = k(null), te = k(450), M = de(() => {
|
|
1133
1164
|
S(() => {
|
|
1134
1165
|
if (!w.value) return;
|
|
1135
1166
|
let e = w.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1136
|
-
|
|
1167
|
+
te.value = Math.max(t, 200);
|
|
1137
1168
|
});
|
|
1138
|
-
}, 100),
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1169
|
+
}, 100), re = () => {
|
|
1170
|
+
M();
|
|
1171
|
+
}, F = () => {
|
|
1141
1172
|
if (b.value) return b.value;
|
|
1142
1173
|
let e = w.value;
|
|
1143
1174
|
if (e) {
|
|
@@ -1145,39 +1176,39 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1145
1176
|
if (t && t.__vueParentComponent) return t.__vueParentComponent.proxy;
|
|
1146
1177
|
}
|
|
1147
1178
|
return null;
|
|
1148
|
-
},
|
|
1179
|
+
}, ie = () => {
|
|
1149
1180
|
if (!a.searchForm.enableCellCopy && !i.enableCellCopy) return !1;
|
|
1150
|
-
let e =
|
|
1181
|
+
let e = F();
|
|
1151
1182
|
if (!e || !e.$el) return !1;
|
|
1152
1183
|
let t = e.$el;
|
|
1153
|
-
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove",
|
|
1184
|
+
t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove", Ee), t.removeEventListener("mouseup", J), t.removeEventListener("keydown", Me), t.addEventListener("mousedown", Te), t.addEventListener("mousemove", Ee), t.addEventListener("mouseup", J), t.addEventListener("keydown", Me);
|
|
1154
1185
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1155
1186
|
return n && (n.__cellCopyScrollBound && n.removeEventListener("scroll", Ae), n.addEventListener("scroll", Ae), n.__cellCopyScrollBound = !0), Oe(), !0;
|
|
1156
1187
|
};
|
|
1157
1188
|
T(() => {
|
|
1158
|
-
|
|
1159
|
-
|
|
1189
|
+
M(), window.addEventListener("resize", re), (a.searchForm.enableCellCopy || i.enableCellCopy) && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", Pe), setTimeout(() => {
|
|
1190
|
+
ie();
|
|
1160
1191
|
}, 500));
|
|
1161
1192
|
}), E(() => {
|
|
1162
1193
|
(a.searchForm.enableCellCopy || i.enableCellCopy) && setTimeout(() => {
|
|
1163
|
-
|
|
1194
|
+
ie();
|
|
1164
1195
|
}, 500);
|
|
1165
1196
|
}), ee(() => {
|
|
1166
|
-
if (window.removeEventListener("resize",
|
|
1167
|
-
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove",
|
|
1168
|
-
let e =
|
|
1197
|
+
if (window.removeEventListener("resize", re), a.searchForm.enableCellCopy || i.enableCellCopy) {
|
|
1198
|
+
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", Pe), document.removeEventListener("mousemove", Se), K(), ke();
|
|
1199
|
+
let e = F();
|
|
1169
1200
|
if (e && e.$el) {
|
|
1170
1201
|
let t = e.$el;
|
|
1171
|
-
t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove",
|
|
1202
|
+
t.removeEventListener("mousedown", Te), t.removeEventListener("mousemove", Ee), t.removeEventListener("mouseup", J), t.removeEventListener("keydown", Me);
|
|
1172
1203
|
let n = t.querySelector(".vxe-table--body-inner-wrapper");
|
|
1173
1204
|
n && (n.removeEventListener("scroll", Ae), n.__cellCopyScrollBound = !1);
|
|
1174
1205
|
}
|
|
1175
1206
|
}
|
|
1176
1207
|
});
|
|
1177
|
-
let
|
|
1208
|
+
let ae = l(() => ge.value.height || te.value), se;
|
|
1178
1209
|
async function L(e) {
|
|
1179
1210
|
let t = a.searchForm.responseDataKeys || i.responseDataKeys, { dataFormat: n } = a.tableConfig;
|
|
1180
|
-
e[_] != 1 && (e.nextSearchAfter =
|
|
1211
|
+
e[_] != 1 && (e.nextSearchAfter = se), o.value = !0;
|
|
1181
1212
|
let { code: r, data: c = {} } = await a.api(e).finally(() => {
|
|
1182
1213
|
o.value = !1, a.searchForm.selections = [];
|
|
1183
1214
|
});
|
|
@@ -1188,7 +1219,7 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1188
1219
|
});
|
|
1189
1220
|
let e = [];
|
|
1190
1221
|
for (let n of t.rows) {
|
|
1191
|
-
let t =
|
|
1222
|
+
let t = nt(c, n);
|
|
1192
1223
|
if (t) {
|
|
1193
1224
|
e = t;
|
|
1194
1225
|
break;
|
|
@@ -1196,15 +1227,15 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1196
1227
|
}
|
|
1197
1228
|
let o = 0;
|
|
1198
1229
|
for (let e of t.total) {
|
|
1199
|
-
let t =
|
|
1230
|
+
let t = nt(c, e);
|
|
1200
1231
|
if (t !== void 0) {
|
|
1201
1232
|
o = t;
|
|
1202
1233
|
break;
|
|
1203
1234
|
}
|
|
1204
1235
|
}
|
|
1205
|
-
s.value = n ? n(e) : e, y.total = o,
|
|
1236
|
+
s.value = n ? n(e) : e, y.total = o, se = c.nextSearchAfter, (a.searchForm.enableCellCopy || i.enableCellCopy) && (Y(), U = /* @__PURE__ */ new WeakMap(), ve = null, S(() => {
|
|
1206
1237
|
setTimeout(() => {
|
|
1207
|
-
|
|
1238
|
+
ie();
|
|
1208
1239
|
}, 500);
|
|
1209
1240
|
}));
|
|
1210
1241
|
}
|
|
@@ -1213,12 +1244,12 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1213
1244
|
let { searchData: t = () => ({}) } = a.tableConfig, n = t();
|
|
1214
1245
|
L({
|
|
1215
1246
|
...y,
|
|
1216
|
-
...
|
|
1247
|
+
...ht(a.searchForm.items),
|
|
1217
1248
|
...e,
|
|
1218
1249
|
...n
|
|
1219
1250
|
});
|
|
1220
1251
|
}
|
|
1221
|
-
function
|
|
1252
|
+
function z() {
|
|
1222
1253
|
let { reset: e } = a.tableConfig;
|
|
1223
1254
|
e && e(), a.searchForm.items.forEach((e) => {
|
|
1224
1255
|
let t = m.find((t) => fe(e.key) && fe(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
@@ -1226,30 +1257,30 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1226
1257
|
}), R();
|
|
1227
1258
|
}
|
|
1228
1259
|
a.api && a.immediate && R();
|
|
1229
|
-
function
|
|
1260
|
+
function le() {
|
|
1230
1261
|
return {
|
|
1231
1262
|
...y,
|
|
1232
|
-
...
|
|
1263
|
+
...ht(a.searchForm.items)
|
|
1233
1264
|
};
|
|
1234
1265
|
}
|
|
1235
|
-
let
|
|
1266
|
+
let pe = () => {
|
|
1236
1267
|
let e = b.value;
|
|
1237
1268
|
e && e.clearSort();
|
|
1238
|
-
},
|
|
1269
|
+
}, me = O({ storage: !0 }), he = O({
|
|
1239
1270
|
drag: !0,
|
|
1240
1271
|
resizable: !0,
|
|
1241
1272
|
maxFixedSize: 0
|
|
1242
|
-
}),
|
|
1273
|
+
}), ge = l(() => {
|
|
1243
1274
|
let { customConfig: e, columnConfig: t, ...n } = a.tableConfig;
|
|
1244
1275
|
return {
|
|
1245
1276
|
headerAlign: "left",
|
|
1246
1277
|
align: "center",
|
|
1247
1278
|
customConfig: {
|
|
1248
|
-
...
|
|
1279
|
+
...me,
|
|
1249
1280
|
...e
|
|
1250
1281
|
},
|
|
1251
1282
|
columnConfig: {
|
|
1252
|
-
...
|
|
1283
|
+
...he,
|
|
1253
1284
|
...t
|
|
1254
1285
|
},
|
|
1255
1286
|
"virtual-x-config": {
|
|
@@ -1262,18 +1293,18 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1262
1293
|
},
|
|
1263
1294
|
...n
|
|
1264
1295
|
};
|
|
1265
|
-
}),
|
|
1296
|
+
}), V = O({
|
|
1266
1297
|
isSelecting: !1,
|
|
1267
1298
|
startCell: null,
|
|
1268
1299
|
endCell: null,
|
|
1269
1300
|
selectedCells: []
|
|
1270
|
-
}),
|
|
1271
|
-
if (!
|
|
1272
|
-
|
|
1301
|
+
}), H = null, _e = () => {
|
|
1302
|
+
if (!V.startCell || !V.endCell) {
|
|
1303
|
+
H = null, V.selectedCells = [];
|
|
1273
1304
|
return;
|
|
1274
1305
|
}
|
|
1275
|
-
let e = Math.min(
|
|
1276
|
-
|
|
1306
|
+
let e = Math.min(V.startCell.rowIndex, V.endCell.rowIndex), t = Math.max(V.startCell.rowIndex, V.endCell.rowIndex), n = Math.min(V.startCell.colIndex, V.endCell.colIndex), r = Math.max(V.startCell.colIndex, V.endCell.colIndex);
|
|
1307
|
+
H = {
|
|
1277
1308
|
minRow: e,
|
|
1278
1309
|
maxRow: t,
|
|
1279
1310
|
minCol: n,
|
|
@@ -1284,25 +1315,25 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1284
1315
|
rowIndex: a,
|
|
1285
1316
|
colIndex: e
|
|
1286
1317
|
});
|
|
1287
|
-
|
|
1288
|
-
},
|
|
1318
|
+
V.selectedCells = i;
|
|
1319
|
+
}, U = /* @__PURE__ */ new WeakMap(), ve = null, ye = 0, be = (e, t) => {
|
|
1289
1320
|
let n = e.getTableData().fullData;
|
|
1290
|
-
if (n !==
|
|
1291
|
-
|
|
1292
|
-
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" &&
|
|
1321
|
+
if (n !== ve || n.length !== ye) {
|
|
1322
|
+
U = /* @__PURE__ */ new WeakMap(), ve = n, ye = n.length;
|
|
1323
|
+
for (let e = 0; e < n.length; e++) n[e] && typeof n[e] == "object" && U.set(n[e], e);
|
|
1293
1324
|
}
|
|
1294
|
-
return
|
|
1295
|
-
},
|
|
1325
|
+
return U.has(t) ? U.get(t) : -1;
|
|
1326
|
+
}, xe = (e) => {
|
|
1296
1327
|
let t = e.closest(".vxe-body--column");
|
|
1297
1328
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1298
1329
|
let n = t.closest(".vxe-body--row");
|
|
1299
1330
|
if (!n) return null;
|
|
1300
|
-
let r =
|
|
1331
|
+
let r = F();
|
|
1301
1332
|
if (!r) return null;
|
|
1302
1333
|
let i = -1, a = n.getAttribute("rowid");
|
|
1303
1334
|
if (a != null) {
|
|
1304
1335
|
let e = r.getRowById(a);
|
|
1305
|
-
e && (i =
|
|
1336
|
+
e && (i = be(r, e));
|
|
1306
1337
|
}
|
|
1307
1338
|
if (i < 0) {
|
|
1308
1339
|
let e = n.parentElement;
|
|
@@ -1315,22 +1346,22 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1315
1346
|
colIndex: o,
|
|
1316
1347
|
cell: t
|
|
1317
1348
|
};
|
|
1318
|
-
},
|
|
1319
|
-
if (!
|
|
1320
|
-
|
|
1321
|
-
let t =
|
|
1349
|
+
}, W = null, G = 0, Se = (e) => {
|
|
1350
|
+
if (!V.isSelecting) return;
|
|
1351
|
+
G = e.clientY;
|
|
1352
|
+
let t = F();
|
|
1322
1353
|
if (!t || !t.$el) return;
|
|
1323
1354
|
let n = t.$el, r = n.querySelector(".vxe-table--body-inner-wrapper") || n.querySelector(".vxe-table--body-wrapper");
|
|
1324
1355
|
if (!r) return;
|
|
1325
1356
|
let i = r.getBoundingClientRect();
|
|
1326
|
-
e.clientY < i.top -
|
|
1357
|
+
e.clientY < i.top - Dt || e.clientY > i.bottom + Dt ? W || Ce() : K();
|
|
1327
1358
|
}, Ce = () => {
|
|
1328
1359
|
let e = () => {
|
|
1329
|
-
if (!
|
|
1360
|
+
if (!V.isSelecting) {
|
|
1330
1361
|
K();
|
|
1331
1362
|
return;
|
|
1332
1363
|
}
|
|
1333
|
-
let t =
|
|
1364
|
+
let t = F();
|
|
1334
1365
|
if (!t || !t.$el) {
|
|
1335
1366
|
K();
|
|
1336
1367
|
return;
|
|
@@ -1341,23 +1372,23 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1341
1372
|
return;
|
|
1342
1373
|
}
|
|
1343
1374
|
let i = r.getBoundingClientRect(), a = 0;
|
|
1344
|
-
if (
|
|
1345
|
-
let e = i.top -
|
|
1346
|
-
a = -Math.min(
|
|
1347
|
-
} else if (
|
|
1348
|
-
let e =
|
|
1349
|
-
a = Math.min(
|
|
1375
|
+
if (G < i.top) {
|
|
1376
|
+
let e = i.top - G;
|
|
1377
|
+
a = -Math.min(Ot, Math.max(2, e * kt));
|
|
1378
|
+
} else if (G > i.bottom) {
|
|
1379
|
+
let e = G - i.bottom;
|
|
1380
|
+
a = Math.min(Ot, Math.max(2, e * kt));
|
|
1350
1381
|
} else {
|
|
1351
1382
|
K();
|
|
1352
1383
|
return;
|
|
1353
1384
|
}
|
|
1354
|
-
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), we(r, i),
|
|
1385
|
+
r.scrollTop = Math.max(0, Math.min(r.scrollHeight - r.clientHeight, r.scrollTop + a)), we(r, i), W = requestAnimationFrame(e);
|
|
1355
1386
|
};
|
|
1356
|
-
|
|
1387
|
+
W = requestAnimationFrame(e);
|
|
1357
1388
|
}, K = () => {
|
|
1358
|
-
|
|
1389
|
+
W &&= (cancelAnimationFrame(W), null);
|
|
1359
1390
|
}, we = (e, t) => {
|
|
1360
|
-
let n =
|
|
1391
|
+
let n = F();
|
|
1361
1392
|
if (!n) return;
|
|
1362
1393
|
let r = n.getTableData().fullData;
|
|
1363
1394
|
if (!r || r.length === 0) return;
|
|
@@ -1366,53 +1397,53 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1366
1397
|
let a = i.querySelectorAll(".vxe-body--row");
|
|
1367
1398
|
if (a.length === 0) return;
|
|
1368
1399
|
let o = null;
|
|
1369
|
-
if (
|
|
1400
|
+
if (G < t.top ? o = a[0] : G > t.bottom && (o = a[a.length - 1]), !o) return;
|
|
1370
1401
|
let s = o.getAttribute("rowid");
|
|
1371
1402
|
if (s == null) return;
|
|
1372
1403
|
let c = -1, l = n.getRowById(s);
|
|
1373
1404
|
if (l && (c = r.indexOf(l)), c < 0) return;
|
|
1374
|
-
let u =
|
|
1375
|
-
|
|
1405
|
+
let u = V.endCell ? V.endCell.colIndex : V.startCell ? V.startCell.colIndex : 0;
|
|
1406
|
+
V.endCell = {
|
|
1376
1407
|
rowIndex: c,
|
|
1377
1408
|
colIndex: u
|
|
1378
|
-
},
|
|
1409
|
+
}, _e(), X();
|
|
1379
1410
|
}, Te = (e) => {
|
|
1380
|
-
let t =
|
|
1411
|
+
let t = xe(e.target);
|
|
1381
1412
|
if (!t) {
|
|
1382
|
-
|
|
1413
|
+
Y();
|
|
1383
1414
|
return;
|
|
1384
1415
|
}
|
|
1385
|
-
let n =
|
|
1386
|
-
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"),
|
|
1416
|
+
let n = F();
|
|
1417
|
+
n && n.$el && !n.$el.classList.contains("cell-copy-enabled") && n.$el.classList.add("cell-copy-enabled"), V.isSelecting = !0, V.startCell = {
|
|
1387
1418
|
rowIndex: t.rowIndex,
|
|
1388
1419
|
colIndex: t.colIndex
|
|
1389
|
-
},
|
|
1390
|
-
}, q = null,
|
|
1391
|
-
|
|
1392
|
-
if (q = null, !
|
|
1393
|
-
let t =
|
|
1394
|
-
t && (
|
|
1420
|
+
}, V.endCell = { ...V.startCell }, document.addEventListener("mousemove", Se), _e(), X();
|
|
1421
|
+
}, q = null, Ee = (e) => {
|
|
1422
|
+
V.isSelecting && (q ||= requestAnimationFrame(() => {
|
|
1423
|
+
if (q = null, !V.isSelecting) return;
|
|
1424
|
+
let t = xe(e.target);
|
|
1425
|
+
t && (V.endCell && V.endCell.rowIndex === t.rowIndex && V.endCell.colIndex === t.colIndex || (V.endCell = {
|
|
1395
1426
|
rowIndex: t.rowIndex,
|
|
1396
1427
|
colIndex: t.colIndex
|
|
1397
|
-
},
|
|
1428
|
+
}, _e(), X()));
|
|
1398
1429
|
}));
|
|
1430
|
+
}, J = () => {
|
|
1431
|
+
V.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", Se);
|
|
1399
1432
|
}, Y = () => {
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
B.selectedCells = [], B.startCell = null, B.endCell = null, V = null;
|
|
1403
|
-
let e = P();
|
|
1433
|
+
V.selectedCells = [], V.startCell = null, V.endCell = null, H = null;
|
|
1434
|
+
let e = F();
|
|
1404
1435
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1405
1436
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1406
1437
|
});
|
|
1407
|
-
},
|
|
1408
|
-
let e =
|
|
1438
|
+
}, De = () => {
|
|
1439
|
+
let e = F();
|
|
1409
1440
|
if (!e) return;
|
|
1410
1441
|
let t = e.$el;
|
|
1411
1442
|
t.classList.contains("cell-copy-enabled") || t.classList.add("cell-copy-enabled");
|
|
1412
1443
|
let n = t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left");
|
|
1413
1444
|
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");
|
|
1414
|
-
if (!
|
|
1415
|
-
let { minRow: r, maxRow: i, minCol: a, maxCol: o } =
|
|
1445
|
+
if (!H) return;
|
|
1446
|
+
let { minRow: r, maxRow: i, minCol: a, maxCol: o } = H, s = e.getColumns(), c = e.getTableData().fullData, l = /* @__PURE__ */ new Map();
|
|
1416
1447
|
for (let t = r; t <= i; t++) {
|
|
1417
1448
|
let n = c[t];
|
|
1418
1449
|
if (n) {
|
|
@@ -1433,7 +1464,7 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1433
1464
|
let d = l.get(String(u));
|
|
1434
1465
|
if (d === void 0) {
|
|
1435
1466
|
let t = e.getRowById(u);
|
|
1436
|
-
if (t && (d =
|
|
1467
|
+
if (t && (d = be(e, t), d >= 0 && l.set(String(u), d)), d === void 0 || d < 0) continue;
|
|
1437
1468
|
}
|
|
1438
1469
|
if (d < r || d > i) continue;
|
|
1439
1470
|
let f = c.querySelectorAll(".vxe-body--column");
|
|
@@ -1444,33 +1475,33 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1444
1475
|
}
|
|
1445
1476
|
}
|
|
1446
1477
|
}
|
|
1447
|
-
},
|
|
1478
|
+
}, X = () => {
|
|
1448
1479
|
S(() => {
|
|
1449
|
-
|
|
1480
|
+
De();
|
|
1450
1481
|
});
|
|
1451
|
-
},
|
|
1452
|
-
|
|
1453
|
-
|
|
1482
|
+
}, Z = null, Q = null, $ = () => {
|
|
1483
|
+
Q ||= requestAnimationFrame(() => {
|
|
1484
|
+
Q = null, De();
|
|
1454
1485
|
});
|
|
1455
1486
|
}, Oe = () => {
|
|
1456
|
-
let e =
|
|
1487
|
+
let e = F();
|
|
1457
1488
|
if (!e || !e.$el) return;
|
|
1458
1489
|
let t = e.$el.querySelector(".vxe-table--body-wrapper tbody");
|
|
1459
|
-
t && (ke(),
|
|
1460
|
-
|
|
1461
|
-
}),
|
|
1490
|
+
t && (ke(), Z = new MutationObserver(() => {
|
|
1491
|
+
H && $();
|
|
1492
|
+
}), Z.observe(t, {
|
|
1462
1493
|
childList: !0,
|
|
1463
1494
|
subtree: !1
|
|
1464
1495
|
}));
|
|
1465
1496
|
}, ke = () => {
|
|
1466
|
-
|
|
1497
|
+
Z &&= (Z.disconnect(), null), Q &&= (cancelAnimationFrame(Q), null);
|
|
1467
1498
|
}, Ae = () => {
|
|
1468
|
-
|
|
1499
|
+
H && $();
|
|
1469
1500
|
}, je = async () => {
|
|
1470
|
-
if (!
|
|
1471
|
-
let e =
|
|
1501
|
+
if (!H) return;
|
|
1502
|
+
let e = F();
|
|
1472
1503
|
if (!e) return;
|
|
1473
|
-
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } =
|
|
1504
|
+
let t = e.$el, n = e.getColumns(), r = e.getTableData().fullData, { minRow: i, maxRow: a, minCol: o, maxCol: s } = H, c = [];
|
|
1474
1505
|
for (let e = i; e <= a; e++) c.push(e);
|
|
1475
1506
|
let l = [];
|
|
1476
1507
|
for (let e = o; e <= s; e++) l.push(e);
|
|
@@ -1537,12 +1568,12 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1537
1568
|
console.error("复制失败:", e);
|
|
1538
1569
|
}
|
|
1539
1570
|
}, Me = (e) => {
|
|
1540
|
-
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1571
|
+
!a.searchForm.enableCellCopy && !i.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? H && (e.preventDefault(), e.stopPropagation(), je()) : e.key === "Escape" && Y());
|
|
1541
1572
|
}, Ne = () => {
|
|
1542
|
-
|
|
1573
|
+
V.isSelecting = !1, K(), q &&= (cancelAnimationFrame(q), null), document.removeEventListener("mousemove", Se);
|
|
1543
1574
|
}, Pe = (e) => {
|
|
1544
|
-
let t =
|
|
1545
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1575
|
+
let t = F();
|
|
1576
|
+
!t || !t.$el || t.$el.contains(e.target) || Y();
|
|
1546
1577
|
}, Fe = (e) => {
|
|
1547
1578
|
y[_] = e, R();
|
|
1548
1579
|
}, Ie = (e) => {
|
|
@@ -1563,38 +1594,38 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1563
1594
|
return t({
|
|
1564
1595
|
tableRef: b,
|
|
1565
1596
|
getList: R,
|
|
1566
|
-
getPrm:
|
|
1567
|
-
clearSort:
|
|
1568
|
-
calculateTableHeight:
|
|
1597
|
+
getPrm: le,
|
|
1598
|
+
clearSort: pe,
|
|
1599
|
+
calculateTableHeight: M
|
|
1569
1600
|
}), (t, n) => {
|
|
1570
|
-
let a =
|
|
1601
|
+
let a = j("el-button"), l = j("el-checkbox"), m = j("el-text"), S = j("vxe-column"), T = j("VxeTable"), ee = j("el-pagination"), E = ne("loading");
|
|
1571
1602
|
return D(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1572
|
-
e.searchForm.showSearch ? (D(), u(
|
|
1603
|
+
e.searchForm.showSearch ? (D(), u(bt, {
|
|
1573
1604
|
key: 0,
|
|
1574
1605
|
form: e.searchForm,
|
|
1575
|
-
onReset:
|
|
1606
|
+
onReset: z,
|
|
1576
1607
|
onConfirm: n[1] ||= (e) => R(),
|
|
1577
|
-
onVisibleChange:
|
|
1608
|
+
onVisibleChange: P(M)
|
|
1578
1609
|
}, {
|
|
1579
|
-
btn:
|
|
1610
|
+
btn: I(() => [
|
|
1580
1611
|
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1581
|
-
|
|
1612
|
+
A(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1582
1613
|
g(a, {
|
|
1583
1614
|
class: "mgl10",
|
|
1584
1615
|
round: "",
|
|
1585
1616
|
onClick: n[0] ||= (e) => b.value.openCustom()
|
|
1586
1617
|
}, {
|
|
1587
|
-
default:
|
|
1618
|
+
default: I(() => [g(ct, { name: "Tools" })]),
|
|
1588
1619
|
_: 1
|
|
1589
1620
|
})
|
|
1590
1621
|
]),
|
|
1591
1622
|
_: 3
|
|
1592
1623
|
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1593
|
-
|
|
1624
|
+
A(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1594
1625
|
oe((D(), f("div", {
|
|
1595
1626
|
ref_key: "tableContentRef",
|
|
1596
1627
|
ref: w,
|
|
1597
|
-
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy ||
|
|
1628
|
+
class: C({ "cell-copy-enabled": e.searchForm.enableCellCopy || P(i).enableCellCopy })
|
|
1598
1629
|
}, [g(T, x({
|
|
1599
1630
|
id: c.value,
|
|
1600
1631
|
ref_key: "tableRef",
|
|
@@ -1602,21 +1633,21 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1602
1633
|
loading: e.loading || o.value,
|
|
1603
1634
|
data: e.api ? s.value : e.data,
|
|
1604
1635
|
border: ""
|
|
1605
|
-
},
|
|
1606
|
-
height:
|
|
1636
|
+
}, ge.value, {
|
|
1637
|
+
height: ae.value,
|
|
1607
1638
|
onCheckboxChange: Le,
|
|
1608
1639
|
onCheckboxAll: Le,
|
|
1609
|
-
onSortChange:
|
|
1640
|
+
onSortChange: ge.value["sort-config"]?.sortChange,
|
|
1610
1641
|
onScroll: Ae
|
|
1611
1642
|
}), {
|
|
1612
|
-
default:
|
|
1643
|
+
default: I(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (D(), u(S, {
|
|
1613
1644
|
key: 0,
|
|
1614
1645
|
type: "checkbox",
|
|
1615
|
-
width:
|
|
1646
|
+
width: P(r) == "zh_cn" ? 80 : 150,
|
|
1616
1647
|
title: t.$t("xu-hao"),
|
|
1617
1648
|
fixed: "left"
|
|
1618
1649
|
}, {
|
|
1619
|
-
checkbox:
|
|
1650
|
+
checkbox: I(({ rowIndex: e, row: t, checked: n, disabled: r }) => [p("div", Et, [n ? (D(), u(l, {
|
|
1620
1651
|
key: 0,
|
|
1621
1652
|
checked: !0,
|
|
1622
1653
|
disabled: r,
|
|
@@ -1632,11 +1663,11 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1632
1663
|
type: "info",
|
|
1633
1664
|
class: "mgl5"
|
|
1634
1665
|
}, {
|
|
1635
|
-
default:
|
|
1666
|
+
default: I(() => [h(N(e + 1), 1)]),
|
|
1636
1667
|
_: 2
|
|
1637
1668
|
}, 1024)])]),
|
|
1638
1669
|
_: 1
|
|
1639
|
-
}, 8, ["width", "title"])) : d("", !0),
|
|
1670
|
+
}, 8, ["width", "title"])) : d("", !0), A(t.$slots, "default", {}, void 0, !0)]),
|
|
1640
1671
|
_: 3
|
|
1641
1672
|
}, 16, [
|
|
1642
1673
|
"id",
|
|
@@ -1647,14 +1678,14 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1647
1678
|
])], 2)), [[E, e.loading || o.value]]),
|
|
1648
1679
|
e.searchForm.showPage ? (D(), u(ee, {
|
|
1649
1680
|
key: 1,
|
|
1650
|
-
"current-page": y[
|
|
1651
|
-
"onUpdate:currentPage": n[2] ||= (e) => y[
|
|
1681
|
+
"current-page": y[P(_)],
|
|
1682
|
+
"onUpdate:currentPage": n[2] ||= (e) => y[P(_)] = e,
|
|
1652
1683
|
class: "myPagination mgt10",
|
|
1653
1684
|
background: "",
|
|
1654
1685
|
layout: "total, sizes, prev, pager, next",
|
|
1655
1686
|
total: y.total,
|
|
1656
|
-
"page-size": y[
|
|
1657
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1687
|
+
"page-size": y[P(v)],
|
|
1688
|
+
"page-sizes": e.searchForm.pageSizes || P(i).pageSizes,
|
|
1658
1689
|
onCurrentChange: Fe,
|
|
1659
1690
|
onSizeChange: Ie
|
|
1660
1691
|
}, null, 8, [
|
|
@@ -1666,7 +1697,7 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1666
1697
|
], 2);
|
|
1667
1698
|
};
|
|
1668
1699
|
}
|
|
1669
|
-
}, [["__scopeId", "data-v-d87fbf92"]]),
|
|
1700
|
+
}, [["__scopeId", "data-v-d87fbf92"]]), jt = {
|
|
1670
1701
|
__name: "index",
|
|
1671
1702
|
props: {
|
|
1672
1703
|
sheetsConfig: {
|
|
@@ -1685,31 +1716,31 @@ var xt = { class: "center" }, St = 0, Ct = 20, wt = .3, Tt = /* @__PURE__ */ $e(
|
|
|
1685
1716
|
setup(e) {
|
|
1686
1717
|
let t = e;
|
|
1687
1718
|
function n() {
|
|
1688
|
-
|
|
1719
|
+
ze(t.fileName + (t.version ? `__v${t.version}` : ""), t.sheetsConfig);
|
|
1689
1720
|
}
|
|
1690
1721
|
return (e, t) => {
|
|
1691
|
-
let r =
|
|
1722
|
+
let r = j("el-link");
|
|
1692
1723
|
return D(), u(r, x({
|
|
1693
1724
|
type: "primary",
|
|
1694
1725
|
underline: "never"
|
|
1695
1726
|
}, e.$attrs, { onClick: n }), {
|
|
1696
|
-
default:
|
|
1727
|
+
default: I(() => [A(e.$slots, "default", {}, () => [h(N(e.$t("xia-zai-dao-ru-mo-ban")), 1)])]),
|
|
1697
1728
|
_: 3
|
|
1698
1729
|
}, 16);
|
|
1699
1730
|
};
|
|
1700
1731
|
}
|
|
1701
|
-
},
|
|
1732
|
+
}, Mt = {
|
|
1702
1733
|
mounted(e, t) {
|
|
1703
|
-
t.value &&
|
|
1734
|
+
t.value && Nt(e);
|
|
1704
1735
|
},
|
|
1705
1736
|
updated(e, t) {
|
|
1706
|
-
t.value ?
|
|
1737
|
+
t.value ? Nt(e) : Pt(e);
|
|
1707
1738
|
},
|
|
1708
1739
|
beforeUnmount(e) {
|
|
1709
|
-
|
|
1740
|
+
Pt(e);
|
|
1710
1741
|
}
|
|
1711
1742
|
};
|
|
1712
|
-
async function
|
|
1743
|
+
async function Nt(e) {
|
|
1713
1744
|
await f();
|
|
1714
1745
|
let t = e.querySelector(".el-dialog");
|
|
1715
1746
|
if (!t) return;
|
|
@@ -1772,15 +1803,15 @@ async function Ot(e) {
|
|
|
1772
1803
|
}
|
|
1773
1804
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1774
1805
|
}
|
|
1775
|
-
function
|
|
1806
|
+
function Pt(e) {
|
|
1776
1807
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1777
1808
|
}
|
|
1778
1809
|
//#endregion
|
|
1779
1810
|
//#region src/components/Layer/index.vue
|
|
1780
|
-
var
|
|
1811
|
+
var Ft = {
|
|
1781
1812
|
key: 0,
|
|
1782
1813
|
class: "drawer-btn"
|
|
1783
|
-
},
|
|
1814
|
+
}, It = { key: 1 }, Lt = {
|
|
1784
1815
|
__name: "index",
|
|
1785
1816
|
props: {
|
|
1786
1817
|
layer: {
|
|
@@ -1800,7 +1831,7 @@ var At = {
|
|
|
1800
1831
|
},
|
|
1801
1832
|
emits: ["confirm"],
|
|
1802
1833
|
setup(e, { emit: t }) {
|
|
1803
|
-
let n = e, r = t, { t: i } =
|
|
1834
|
+
let n = e, r = t, { t: i } = B(), o = de(() => {
|
|
1804
1835
|
r("confirm");
|
|
1805
1836
|
}, 300);
|
|
1806
1837
|
async function s() {
|
|
@@ -1811,7 +1842,7 @@ var At = {
|
|
|
1811
1842
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1812
1843
|
}
|
|
1813
1844
|
return (t, n) => {
|
|
1814
|
-
let r =
|
|
1845
|
+
let r = j("el-button"), i = j("el-drawer"), a = j("el-dialog");
|
|
1815
1846
|
return e.layer.type ? (D(), u(i, {
|
|
1816
1847
|
key: 0,
|
|
1817
1848
|
modelValue: e.layer.show,
|
|
@@ -1823,18 +1854,18 @@ var At = {
|
|
|
1823
1854
|
"before-close": s,
|
|
1824
1855
|
class: "drawer-content"
|
|
1825
1856
|
}, {
|
|
1826
|
-
default:
|
|
1827
|
-
|
|
1857
|
+
default: I(() => [
|
|
1858
|
+
A(t.$slots, "default"),
|
|
1828
1859
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1829
|
-
e.layer.showButton ? (D(), f("div",
|
|
1830
|
-
default:
|
|
1860
|
+
e.layer.showButton ? (D(), f("div", Ft, [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1861
|
+
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1831
1862
|
_: 1
|
|
1832
1863
|
}), g(r, {
|
|
1833
1864
|
type: "primary",
|
|
1834
1865
|
loading: e.loading,
|
|
1835
|
-
onClick:
|
|
1866
|
+
onClick: P(o)
|
|
1836
1867
|
}, {
|
|
1837
|
-
default:
|
|
1868
|
+
default: I(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1838
1869
|
_: 1
|
|
1839
1870
|
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1840
1871
|
]),
|
|
@@ -1843,7 +1874,7 @@ var At = {
|
|
|
1843
1874
|
"modelValue",
|
|
1844
1875
|
"size",
|
|
1845
1876
|
"title"
|
|
1846
|
-
])) : oe((D(), f("div",
|
|
1877
|
+
])) : oe((D(), f("div", It, [g(a, {
|
|
1847
1878
|
"close-on-click-modal": !1,
|
|
1848
1879
|
modelValue: e.layer.show,
|
|
1849
1880
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1851,32 +1882,33 @@ var At = {
|
|
|
1851
1882
|
width: e.layer.width || 500,
|
|
1852
1883
|
center: ""
|
|
1853
1884
|
}, m({
|
|
1854
|
-
default:
|
|
1885
|
+
default: I(() => [A(t.$slots, "default")]),
|
|
1855
1886
|
_: 2
|
|
1856
1887
|
}, [e.layer.showButton ? {
|
|
1857
1888
|
name: "footer",
|
|
1858
|
-
fn:
|
|
1859
|
-
default:
|
|
1889
|
+
fn: I(() => [A(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1890
|
+
default: I(() => [h(N(t.$t("qu-xiao")), 1)]),
|
|
1860
1891
|
_: 1
|
|
1861
1892
|
}), g(r, {
|
|
1862
1893
|
type: "primary",
|
|
1863
|
-
|
|
1894
|
+
loading: e.loading,
|
|
1895
|
+
onClick: P(o)
|
|
1864
1896
|
}, {
|
|
1865
|
-
default:
|
|
1897
|
+
default: I(() => [h(N(t.$t("ti-jiao")), 1)]),
|
|
1866
1898
|
_: 1
|
|
1867
|
-
}, 8, ["onClick"])])]),
|
|
1899
|
+
}, 8, ["loading", "onClick"])])]),
|
|
1868
1900
|
key: "0"
|
|
1869
1901
|
} : void 0]), 1032, [
|
|
1870
1902
|
"modelValue",
|
|
1871
1903
|
"title",
|
|
1872
1904
|
"width"
|
|
1873
|
-
])])), [[
|
|
1905
|
+
])])), [[P(Mt), e.layer.show]]);
|
|
1874
1906
|
};
|
|
1875
1907
|
}
|
|
1876
1908
|
};
|
|
1877
1909
|
//#endregion
|
|
1878
1910
|
//#region src/utils/tools/validate.js
|
|
1879
|
-
function
|
|
1911
|
+
function Rt(e, t = {}) {
|
|
1880
1912
|
let n = $(), r = {
|
|
1881
1913
|
inForm: !0,
|
|
1882
1914
|
required: !0,
|
|
@@ -1896,7 +1928,7 @@ function Nt(e, t = {}) {
|
|
|
1896
1928
|
}
|
|
1897
1929
|
//#endregion
|
|
1898
1930
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1899
|
-
var
|
|
1931
|
+
var zt = class {
|
|
1900
1932
|
constructor(e = {}) {
|
|
1901
1933
|
this.config = {
|
|
1902
1934
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -2043,42 +2075,42 @@ var Pt = class {
|
|
|
2043
2075
|
};
|
|
2044
2076
|
//#endregion
|
|
2045
2077
|
//#region src/utils/tools/format.js
|
|
2046
|
-
function
|
|
2078
|
+
function Bt(e, t = 2, n = ".", r = ",") {
|
|
2047
2079
|
(e == null || e === "") && (e = 0);
|
|
2048
2080
|
let i = Number(e);
|
|
2049
2081
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
2050
2082
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
2051
2083
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
2052
2084
|
}
|
|
2053
|
-
function
|
|
2054
|
-
return
|
|
2085
|
+
function Vt(e, t = 2) {
|
|
2086
|
+
return Bt(e, t);
|
|
2055
2087
|
}
|
|
2056
|
-
function
|
|
2088
|
+
function Ht(e, t = 2) {
|
|
2057
2089
|
(e == null || e === "") && (e = 0);
|
|
2058
2090
|
let n = Number(e);
|
|
2059
|
-
return e = isNaN(n) ? 0 : n,
|
|
2091
|
+
return e = isNaN(n) ? 0 : n, Bt(e * 100, t) + "%";
|
|
2060
2092
|
}
|
|
2061
2093
|
//#endregion
|
|
2062
2094
|
//#region src/utils/hook/common.js
|
|
2063
|
-
function
|
|
2095
|
+
function Ut(e, t = {}) {
|
|
2064
2096
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
2065
2097
|
manual: !1,
|
|
2066
2098
|
log: !1,
|
|
2067
2099
|
params: null,
|
|
2068
2100
|
format: null
|
|
2069
|
-
}, t), s =
|
|
2101
|
+
}, t), s = k([]), c = k(!1), l = (t) => {
|
|
2070
2102
|
let n = t || i;
|
|
2071
2103
|
c.value = !0, e(n).then((e) => {
|
|
2072
2104
|
let { code: t, data: c, msg: l } = e;
|
|
2073
2105
|
if (a) {
|
|
2074
2106
|
let { records: t, rows: n } = c || {};
|
|
2075
|
-
s.value =
|
|
2107
|
+
s.value = Kt(t || n ? t || n : c, o), a(e);
|
|
2076
2108
|
}
|
|
2077
2109
|
if (c) {
|
|
2078
2110
|
if (c.records != null || c.rows != null) {
|
|
2079
2111
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
2080
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
2081
|
-
} else s.value =
|
|
2112
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Kt(e || t || [], o);
|
|
2113
|
+
} else s.value = Kt(c, o);
|
|
2082
2114
|
r && console.log("useRequest-res", s.value);
|
|
2083
2115
|
}
|
|
2084
2116
|
}).catch((e) => {
|
|
@@ -2093,8 +2125,8 @@ function Rt(e, t = {}) {
|
|
|
2093
2125
|
l
|
|
2094
2126
|
];
|
|
2095
2127
|
}
|
|
2096
|
-
function
|
|
2097
|
-
let t =
|
|
2128
|
+
function Wt(e) {
|
|
2129
|
+
let t = k(e), n = k(""), r = k("");
|
|
2098
2130
|
return ae(t, (e) => {
|
|
2099
2131
|
let t = e || ["", ""];
|
|
2100
2132
|
n.value = t[0], r.value = t[1];
|
|
@@ -2104,10 +2136,10 @@ function zt(e) {
|
|
|
2104
2136
|
r
|
|
2105
2137
|
];
|
|
2106
2138
|
}
|
|
2107
|
-
function
|
|
2139
|
+
function Gt(e) {
|
|
2108
2140
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2109
2141
|
}
|
|
2110
|
-
function
|
|
2142
|
+
function Kt(e, t) {
|
|
2111
2143
|
if (!t) return e;
|
|
2112
2144
|
if (e instanceof Array) return e.map((e) => {
|
|
2113
2145
|
let n = {};
|
|
@@ -2118,13 +2150,13 @@ function Vt(e, t) {
|
|
|
2118
2150
|
}
|
|
2119
2151
|
//#endregion
|
|
2120
2152
|
//#region src/utils/hook/i18n.js
|
|
2121
|
-
function
|
|
2122
|
-
let { locale: n } =
|
|
2153
|
+
function qt(e, t = []) {
|
|
2154
|
+
let { locale: n } = B(), r = k(e());
|
|
2123
2155
|
return ae([n, ...t], () => {
|
|
2124
2156
|
r.value = e();
|
|
2125
2157
|
}, { immediate: !0 }), r;
|
|
2126
2158
|
}
|
|
2127
|
-
function
|
|
2159
|
+
function Jt(e, t = "zh_cn", n = "en_us") {
|
|
2128
2160
|
return e && (e[{
|
|
2129
2161
|
en_us: n,
|
|
2130
2162
|
zh_cn: t
|
|
@@ -2132,85 +2164,77 @@ function Ut(e, t = "zh_cn", n = "en_us") {
|
|
|
2132
2164
|
}
|
|
2133
2165
|
//#endregion
|
|
2134
2166
|
//#region src/utils/hook/storeHook.js
|
|
2135
|
-
function
|
|
2167
|
+
function Yt(e, t) {
|
|
2136
2168
|
let n = ge;
|
|
2137
|
-
return typeof e == "string" && e.length > 0 && (n = pe(e).mapState),
|
|
2169
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapState), Qt(t, n);
|
|
2138
2170
|
}
|
|
2139
|
-
function
|
|
2171
|
+
function Xt(e, t) {
|
|
2140
2172
|
let n = he;
|
|
2141
|
-
return typeof e == "string" && e.length > 0 && (n = pe(e).mapGetters),
|
|
2173
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapGetters), Qt(t, n);
|
|
2142
2174
|
}
|
|
2143
|
-
function
|
|
2175
|
+
function Zt(e, t) {
|
|
2144
2176
|
let n = me;
|
|
2145
|
-
return typeof e == "string" && e.length > 0 && (n = pe(e).mapActions),
|
|
2177
|
+
return typeof e == "string" && e.length > 0 && (n = pe(e).mapActions), $t(t, n);
|
|
2146
2178
|
}
|
|
2147
|
-
function
|
|
2148
|
-
let n =
|
|
2179
|
+
function Qt(e, t) {
|
|
2180
|
+
let n = V(), r = t(e), i = {};
|
|
2149
2181
|
return Object.keys(r).forEach((e) => {
|
|
2150
2182
|
i[e] = l(r[e].bind({ $store: n }));
|
|
2151
2183
|
}), i;
|
|
2152
2184
|
}
|
|
2153
|
-
function
|
|
2154
|
-
let n =
|
|
2185
|
+
function $t(e, t) {
|
|
2186
|
+
let n = V(), r = t(e), i = {};
|
|
2155
2187
|
return Object.keys(r).forEach((e) => {
|
|
2156
2188
|
i[e] = r[e].bind({ $store: n });
|
|
2157
2189
|
}), i;
|
|
2158
2190
|
}
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
return D(), u(r, x(t.$attrs, { style: {
|
|
2168
|
-
backgroundColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0,
|
|
2169
|
-
color: e.fontColor,
|
|
2170
|
-
borderColor: e.fontColor ? `color-mix(in srgb, ${e.fontColor} 5%, transparent)` : void 0
|
|
2171
|
-
} }), {
|
|
2172
|
-
default: F(() => [k(t.$slots, "default")]),
|
|
2173
|
-
_: 3
|
|
2174
|
-
}, 16, ["style"]);
|
|
2191
|
+
function en(e, t = []) {
|
|
2192
|
+
let [n, r, i] = t, { locale: a } = B();
|
|
2193
|
+
return l(() => re(e).map((e) => {
|
|
2194
|
+
let t = a.value === "zh_cn" ? e[n || "label"] : e[i || "labelEn"];
|
|
2195
|
+
return {
|
|
2196
|
+
...e,
|
|
2197
|
+
label: t || e[n || "label"],
|
|
2198
|
+
value: e[r || "value"]
|
|
2175
2199
|
};
|
|
2176
|
-
}
|
|
2177
|
-
}
|
|
2200
|
+
}));
|
|
2201
|
+
}
|
|
2178
2202
|
//#endregion
|
|
2179
2203
|
//#region src/components/VxeTable/index.jsx
|
|
2180
|
-
function
|
|
2204
|
+
function tn(e) {
|
|
2181
2205
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2182
2206
|
}
|
|
2183
|
-
function
|
|
2184
|
-
|
|
2185
|
-
return
|
|
2186
|
-
} }),
|
|
2187
|
-
return
|
|
2188
|
-
} }),
|
|
2189
|
-
return
|
|
2207
|
+
function nn() {
|
|
2208
|
+
H.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2209
|
+
return Bt(e, t);
|
|
2210
|
+
} }), H.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2211
|
+
return Vt(e, t);
|
|
2212
|
+
} }), H.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2213
|
+
return Ht(e, t);
|
|
2190
2214
|
} });
|
|
2191
2215
|
}
|
|
2192
|
-
function
|
|
2193
|
-
|
|
2216
|
+
function rn() {
|
|
2217
|
+
H.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2194
2218
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2195
|
-
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } =
|
|
2196
|
-
return e.type == "tag" ? o ? g(
|
|
2219
|
+
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } = B(), c = s.value == "zh_cn" ? r : i;
|
|
2220
|
+
return e.type == "tag" ? o ? g(lt, { fontColor: o }, { default: () => [
|
|
2197
2221
|
h(" "),
|
|
2198
2222
|
c,
|
|
2199
2223
|
h(" ")
|
|
2200
|
-
] }) : g(
|
|
2224
|
+
] }) : g(lt, { type: a }, { default: () => [
|
|
2201
2225
|
h(" "),
|
|
2202
2226
|
c,
|
|
2203
2227
|
h(" ")
|
|
2204
|
-
] }) : e.type == "text" ? g(
|
|
2228
|
+
] }) : e.type == "text" ? g(j("el-text"), { type: a }, { default: () => [
|
|
2205
2229
|
h(" "),
|
|
2206
2230
|
c,
|
|
2207
2231
|
h(" ")
|
|
2208
|
-
] }) : g(
|
|
2232
|
+
] }) : g(j("el-text"), null, { default: () => [
|
|
2209
2233
|
h(" "),
|
|
2210
2234
|
c,
|
|
2211
2235
|
h(" ")
|
|
2212
2236
|
] });
|
|
2213
|
-
} }),
|
|
2237
|
+
} }), H.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2214
2238
|
return g(n, x({
|
|
2215
2239
|
modelValue: t.row[t.column.field],
|
|
2216
2240
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2218,14 +2242,14 @@ function Qt() {
|
|
|
2218
2242
|
"step-strictly": !0,
|
|
2219
2243
|
"value-on-clear": 0
|
|
2220
2244
|
}), null);
|
|
2221
|
-
} }),
|
|
2222
|
-
let { locale: n } =
|
|
2245
|
+
} }), H.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2246
|
+
let { locale: n } = B(), r = n.value == "zh_cn";
|
|
2223
2247
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2224
|
-
} }),
|
|
2225
|
-
let { locale: n } =
|
|
2248
|
+
} }), H.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2249
|
+
let { locale: n } = B(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2226
2250
|
return t.row[r] || t.row[t.column.field];
|
|
2227
|
-
} }),
|
|
2228
|
-
let n = t.column.field, i =
|
|
2251
|
+
} }), H.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2252
|
+
let n = t.column.field, i = _e(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2229
2253
|
function l(e, t) {
|
|
2230
2254
|
s == "blank" ? window.open(e) : i.push({
|
|
2231
2255
|
path: e,
|
|
@@ -2238,17 +2262,17 @@ function Qt() {
|
|
|
2238
2262
|
underline: "never",
|
|
2239
2263
|
type: "primary",
|
|
2240
2264
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2241
|
-
},
|
|
2265
|
+
}, tn(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2242
2266
|
}
|
|
2243
2267
|
return g(r, {
|
|
2244
2268
|
underline: "never",
|
|
2245
2269
|
type: "primary",
|
|
2246
2270
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2247
|
-
},
|
|
2271
|
+
}, tn(c) ? c : { default: () => [c] });
|
|
2248
2272
|
} });
|
|
2249
2273
|
}
|
|
2250
|
-
function
|
|
2251
|
-
|
|
2274
|
+
function an() {
|
|
2275
|
+
nn(), rn();
|
|
2252
2276
|
}
|
|
2253
2277
|
//#endregion
|
|
2254
|
-
export {
|
|
2278
|
+
export { at as CmpDictionary, ct as CmpIcon, lt as CmpTag, dt as ConfrimButton, jt as DownExcelTemp, mt as ImportButton, K as LayOutForm, Lt as Layer, At as ListPage, zt as OnePortalCasSDK, bt as SearchBar, Ye as StatusMap, Ke as _toRaw, Gt as _typeOf, Xe as arrToStatusMap, qe as arrayToTree, He as base64ToBlob, Ue as base64ToFile, We as base64ToFormData, $e as checkFileSize, Rt as creatValidator, tt as createImportFields, et as createListPageId, Y as en_us, Ae as exportExcel, ze as exportExcelMuilti, Vt as formatMoney, Bt as formatNumber, Ht as formatPercent, Ve as getColumnLetterByIndex, Q as getI18n, $ as getI18nT, wt as getListPageConfig, Jt as getLocaleValue, nt as getValueBykey, Oe as importExcel, Le as importExcelMuilti, De as messages, nn as registerVxeFormatters, an as registerVxePlugins, rn as registerVxeRenderers, Tt as resetListPageConfig, Ct as setListPageConfig, Z as setupI18n, Ge as sleep, Je as stringToArray, Ze as stripHtmlTags, Qe as unicode2Str, Zt as useActions, Wt as useDatePicker, Xt as useGetters, qt as useI18nReState, Ut as useRequest, Yt as useState, en as useVxeEditRenderStatus, J as zh_cn };
|