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