joy-admin-components 0.2.90 → 0.2.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { ElCol as e, ElForm as t, ElInputNumber as n, ElLink as r, ElMessage as i, ElMessageBox as a, ElRow as o, ElText as s } from "element-plus";
|
|
2
|
-
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as E, onUpdated as D, openBlock as O, reactive as k, ref as A, renderList as j, renderSlot as M, resolveComponent as N, resolveDynamicComponent as P, toDisplayString as F, unref as I, useAttrs as L, useModel as ee, watch as R, withCtx as z, withDirectives as te, withKeys as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import { useRoute as
|
|
9
|
-
import { createNamespacedHelpers as
|
|
10
|
-
import { VxeUI 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 E, onUpdated as D, openBlock as O, reactive as k, ref as A, renderList as j, renderSlot as M, resolveComponent as N, resolveDynamicComponent as P, toDisplayString as F, unref as I, useAttrs as L, useModel as ee, watch as R, withCtx as z, withDirectives as te, withKeys as B, withModifiers as ne } from "vue";
|
|
3
|
+
import { saveAs as V } from "file-saver";
|
|
4
|
+
import H from "exceljs";
|
|
5
|
+
import U from "dayjs";
|
|
6
|
+
import { createI18n as re, useI18n as W } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as ie, debounce as ae, isArray as oe } from "lodash";
|
|
8
|
+
import { useRoute as se, useRouter as ce } from "vue-router";
|
|
9
|
+
import { createNamespacedHelpers as G, mapActions as le, mapGetters as K, mapState as q, useStore as ue } from "vuex";
|
|
10
|
+
import { VxeUI as J } from "vxe-pc-ui";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var de = Object.create, Y = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, pe = Object.getOwnPropertyNames, me = Object.getPrototypeOf, he = Object.prototype.hasOwnProperty, X = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ge = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = pe(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !he.call(e, s) && s !== n && Y(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = fe(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, _e = (e, t, n) => (n = e == null ? {} : de(me(e)), ge(t || !e || !e.__esModule ? Y(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), ve = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
23
|
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
24
|
let s = A(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
@@ -36,7 +36,7 @@ var fe = Object.create, J = Object.defineProperty, pe = Object.getOwnPropertyDes
|
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), ye = /* @__PURE__ */ X(((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 fe = Object.create, J = Object.defineProperty, pe = Object.getOwnPropertyDes
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), be = /* @__PURE__ */ X(((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 fe = Object.create, J = Object.defineProperty, pe = Object.getOwnPropertyDes
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), xe = /* @__PURE__ */ _e(ye()), Se = /* @__PURE__ */ _e(be()), Ce = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -224,7 +224,7 @@ var fe = Object.create, J = Object.defineProperty, pe = Object.getOwnPropertyDes
|
|
|
224
224
|
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
225
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
226
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
227
|
-
},
|
|
227
|
+
}, we = {
|
|
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 fe = Object.create, J = Object.defineProperty, pe = 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
|
+
}, Te = {
|
|
256
|
+
zh_cn: Ce,
|
|
257
|
+
en_us: we
|
|
258
|
+
}, Ee = 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", Ce) : t.setLocaleMessage("zh_cn", Ce), t.messages.value?.en_us ? t.mergeLocaleMessage("en_us", we) : t.setLocaleMessage("en_us", we), Ee = e, e;
|
|
263
263
|
}
|
|
264
|
-
return
|
|
264
|
+
return Ee ||= re({
|
|
265
265
|
legacy: !1,
|
|
266
266
|
locale: "zh_cn",
|
|
267
267
|
fallbackLocale: "zh_cn",
|
|
268
|
-
messages:
|
|
269
|
-
}),
|
|
268
|
+
messages: Te
|
|
269
|
+
}), Ee;
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return
|
|
271
|
+
function Oe() {
|
|
272
|
+
return Ee || De();
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
274
|
+
function Z() {
|
|
275
|
+
return Oe().global.t;
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
async function
|
|
277
|
+
U.extend(xe.default), U.extend(Se.default);
|
|
278
|
+
async function ke(e, t) {
|
|
279
279
|
let { fields: n, range: r = 1 } = t;
|
|
280
280
|
if (!n) {
|
|
281
|
-
let e =
|
|
281
|
+
let e = Z();
|
|
282
282
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
283
283
|
}
|
|
284
|
-
let i = new
|
|
284
|
+
let i = new H.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 Ae(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
|
+
V(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 H.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 Fe(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 Fe(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 Ie(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 Le(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
|
-
let e =
|
|
387
|
+
let e = Z();
|
|
388
388
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
389
389
|
}
|
|
390
|
-
let i = new
|
|
390
|
+
let i = new H.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 ze(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 ? U(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Le)[1]), r[t] = d, d && (a = !1);
|
|
410
410
|
}), a || t.push(r);
|
|
411
411
|
}
|
|
412
412
|
}), a[e._name] = t;
|
|
@@ -414,16 +414,16 @@ async function ze(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,11 +437,11 @@ async function Ve(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
|
-
let t =
|
|
444
|
+
let t = Z();
|
|
445
445
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
446
446
|
type: "list",
|
|
447
447
|
formulae: [`${a}!$A$1:$A$${s.length}`],
|
|
@@ -460,34 +460,34 @@ async function Ve(e, t) {
|
|
|
460
460
|
}
|
|
461
461
|
try {
|
|
462
462
|
let t = await n.xlsx.writeBuffer();
|
|
463
|
-
|
|
463
|
+
V(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
464
464
|
} catch (e) {
|
|
465
465
|
console.log(e);
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
469
|
-
let t =
|
|
468
|
+
function Ve(e) {
|
|
469
|
+
let t = Z(), n = new H.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
478
|
//#endregion
|
|
479
479
|
//#region src/utils/tools/tools.js
|
|
480
|
-
function
|
|
480
|
+
function Ue(e) {
|
|
481
481
|
return new Promise((t) => {
|
|
482
482
|
setTimeout(() => {
|
|
483
483
|
t();
|
|
484
484
|
}, e);
|
|
485
485
|
});
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function We(e) {
|
|
488
488
|
return JSON.parse(JSON.stringify(e));
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Ge(e) {
|
|
491
491
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
492
492
|
for (let i of e) {
|
|
493
493
|
n[i.id] = {
|
|
@@ -499,10 +499,10 @@ function Ke(e) {
|
|
|
499
499
|
}
|
|
500
500
|
return t;
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Ke(e, t = " ") {
|
|
503
503
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
504
504
|
}
|
|
505
|
-
var
|
|
505
|
+
var qe = class {
|
|
506
506
|
constructor(e, t = [
|
|
507
507
|
"label",
|
|
508
508
|
"value",
|
|
@@ -517,7 +517,7 @@ var Je = class {
|
|
|
517
517
|
}
|
|
518
518
|
getName(e) {
|
|
519
519
|
if (!this.has(e)) return "-";
|
|
520
|
-
let t =
|
|
520
|
+
let t = Oe().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
521
521
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
522
522
|
}
|
|
523
523
|
getTag(e) {
|
|
@@ -537,49 +537,49 @@ var Je = class {
|
|
|
537
537
|
return this.map.has(e);
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
|
-
function
|
|
541
|
-
if (e.length == 0) return new
|
|
540
|
+
function Je(e, t = [], n = "i18nName") {
|
|
541
|
+
if (e.length == 0) return new qe([]);
|
|
542
542
|
if (t.length < 2) {
|
|
543
|
-
let e =
|
|
543
|
+
let e = Z();
|
|
544
544
|
throw Error(e("tools.keysLengthError"));
|
|
545
545
|
}
|
|
546
|
-
return new
|
|
546
|
+
return new qe(e.map((e) => {
|
|
547
547
|
let r = {};
|
|
548
548
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
549
549
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
550
550
|
}), r;
|
|
551
551
|
}));
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Ye(e) {
|
|
554
554
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function Xe(e) {
|
|
557
557
|
return e ? (e.includes("\\\\u") && (e = e.replace(/\\/g, "")), e.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function Ze(e, t = 10) {
|
|
560
560
|
let n = 1024 * 1024 * t;
|
|
561
561
|
return !(e.size > n);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Qe(e) {
|
|
564
564
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function $e(e) {
|
|
567
567
|
let t = {};
|
|
568
568
|
return e.map((e, n) => {
|
|
569
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
569
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = He(n);
|
|
570
570
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
571
571
|
}), t;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
return t.split(".").reduce((e, t) => e
|
|
573
|
+
function et(e, t) {
|
|
574
|
+
if (!(!t || !e)) return t.split(".").reduce((e, t) => e?.[t], e);
|
|
575
575
|
}
|
|
576
576
|
//#endregion
|
|
577
577
|
//#region \0plugin-vue:export-helper
|
|
578
|
-
var
|
|
578
|
+
var Q = (e, t) => {
|
|
579
579
|
let n = e.__vccOpts || e;
|
|
580
580
|
for (let [e, r] of t) n[e] = r;
|
|
581
581
|
return n;
|
|
582
|
-
},
|
|
582
|
+
}, tt = ["onClick"], nt = /* @__PURE__ */ Q({
|
|
583
583
|
__name: "index",
|
|
584
584
|
props: /* @__PURE__ */ b({
|
|
585
585
|
api: { type: Function },
|
|
@@ -622,9 +622,9 @@ var Z = (e, t) => {
|
|
|
622
622
|
"changeAll"
|
|
623
623
|
], ["update:modelValue"]),
|
|
624
624
|
setup(e, { emit: t }) {
|
|
625
|
-
let n = e, r = L(), { t: i, locale: a } =
|
|
625
|
+
let n = e, r = L(), { t: i, locale: a } = W(), o = ee(e, "modelValue"), s = l(() => r["value-key"] != null), _ = A(""), v = l(() => {
|
|
626
626
|
if (r.remote !== void 0) return n.data;
|
|
627
|
-
let e =
|
|
627
|
+
let e = Ke(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
628
628
|
if (e.length == 0) return o;
|
|
629
629
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
630
630
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
@@ -676,39 +676,39 @@ var Z = (e, t) => {
|
|
|
676
676
|
b("change", o.value), b("changeAll", o.value, t);
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
function
|
|
679
|
+
function B(e) {
|
|
680
680
|
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
681
681
|
n.optionClick && n.optionClick(e);
|
|
682
682
|
});
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function V(e) {
|
|
685
685
|
let t = s.value ? e : e[n.labelValue.value], r = s.value ? o.value.some((t) => t[n.labelValue.value] === e[n.labelValue.value]) : o.value.includes(t);
|
|
686
686
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function H(e) {
|
|
689
689
|
return e.map((e) => ({
|
|
690
690
|
...e,
|
|
691
691
|
label: P(e),
|
|
692
692
|
value: s.value ? e : e[n.labelValue.value]
|
|
693
693
|
}));
|
|
694
694
|
}
|
|
695
|
-
let
|
|
696
|
-
|
|
697
|
-
let t =
|
|
698
|
-
if (t.length !==
|
|
695
|
+
let U = A([]);
|
|
696
|
+
U.value = H(n.data ? n.data : C.value), R(() => n.data ? n.data : C.value, (e) => {
|
|
697
|
+
let t = H(e);
|
|
698
|
+
if (t.length !== U.value.length) U.value = t;
|
|
699
699
|
else {
|
|
700
700
|
let e = !1;
|
|
701
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
701
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== U.value[n]?.value) {
|
|
702
702
|
e = !0;
|
|
703
703
|
break;
|
|
704
704
|
}
|
|
705
|
-
e && (
|
|
705
|
+
e && (U.value = t);
|
|
706
706
|
}
|
|
707
707
|
}, { deep: !0 });
|
|
708
|
-
let
|
|
708
|
+
let re = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? U.value.map((e) => ({
|
|
709
709
|
...e,
|
|
710
|
-
disabled:
|
|
711
|
-
})) :
|
|
710
|
+
disabled: V(e)
|
|
711
|
+
})) : U.value);
|
|
712
712
|
return (t, n) => {
|
|
713
713
|
let i = N("el-checkbox"), a = N("el-select-v2"), l = N("el-option"), b = N("el-select");
|
|
714
714
|
return I(r).v2 == null ? (O(), u(b, x({
|
|
@@ -732,8 +732,8 @@ var Z = (e, t) => {
|
|
|
732
732
|
}, 8, ["modelValue"])], !0) : d("", !0), (O(!0), f(c, null, j(v.value, (t, n) => (O(), u(l, {
|
|
733
733
|
key: n,
|
|
734
734
|
label: P(t),
|
|
735
|
-
disabled: I(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ?
|
|
736
|
-
onClick:
|
|
735
|
+
disabled: I(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? V(t) : !1,
|
|
736
|
+
onClick: ne((e) => B(t), ["stop"]),
|
|
737
737
|
value: s.value ? t : t[e.labelValue.value]
|
|
738
738
|
}, null, 8, [
|
|
739
739
|
"label",
|
|
@@ -744,7 +744,7 @@ var Z = (e, t) => {
|
|
|
744
744
|
_: 3
|
|
745
745
|
}, 16, ["modelValue", "filter-method"])) : (O(), u(a, x({
|
|
746
746
|
key: 0,
|
|
747
|
-
options:
|
|
747
|
+
options: re.value,
|
|
748
748
|
modelValue: o.value,
|
|
749
749
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
750
750
|
}, I(r), {
|
|
@@ -754,7 +754,7 @@ var Z = (e, t) => {
|
|
|
754
754
|
clearable: "",
|
|
755
755
|
onChange: w
|
|
756
756
|
}), m({
|
|
757
|
-
default: z(({ item: e }) => [p("div", { onClick: (t) => D(e) }, F(e.label), 9,
|
|
757
|
+
default: z(({ item: e }) => [p("div", { onClick: (t) => D(e) }, F(e.label), 9, tt)]),
|
|
758
758
|
_: 2
|
|
759
759
|
}, [I(r).multiple == null ? void 0 : {
|
|
760
760
|
name: "header",
|
|
@@ -771,22 +771,22 @@ var Z = (e, t) => {
|
|
|
771
771
|
}]), 1040, ["options", "modelValue"]));
|
|
772
772
|
};
|
|
773
773
|
}
|
|
774
|
-
}, [["__scopeId", "data-v-7b9ec6d8"]]),
|
|
774
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), rt = _({ props: { name: {
|
|
775
775
|
tyepe: String,
|
|
776
776
|
required: !0
|
|
777
777
|
} } });
|
|
778
|
-
function
|
|
778
|
+
function it(e, t, n, r, i, a) {
|
|
779
779
|
let o = N("el-icon");
|
|
780
780
|
return O(), u(o, { class: "cmp-icon" }, {
|
|
781
781
|
default: z(() => [(O(), u(P(e.name)))]),
|
|
782
782
|
_: 1
|
|
783
783
|
});
|
|
784
784
|
}
|
|
785
|
-
var
|
|
785
|
+
var at = /* @__PURE__ */ Q(rt, [["render", it], ["__scopeId", "data-v-733f9daa"]]), ot = { class: "confirm-button-wrapper" }, st = /* @__PURE__ */ Q({
|
|
786
786
|
__name: "index",
|
|
787
787
|
emits: ["ok", "no"],
|
|
788
788
|
setup(e, { emit: t }) {
|
|
789
|
-
let n = t, r =
|
|
789
|
+
let n = t, r = ae(() => {
|
|
790
790
|
n("ok");
|
|
791
791
|
}, 500);
|
|
792
792
|
function i() {
|
|
@@ -794,7 +794,7 @@ var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]
|
|
|
794
794
|
}
|
|
795
795
|
return (e, t) => {
|
|
796
796
|
let n = N("el-popconfirm");
|
|
797
|
-
return O(), f("span",
|
|
797
|
+
return O(), f("span", ot, [g(n, x(e.$attrs, {
|
|
798
798
|
onConfirm: I(r),
|
|
799
799
|
onCancel: i
|
|
800
800
|
}), {
|
|
@@ -803,7 +803,7 @@ var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]
|
|
|
803
803
|
}, 16, ["onConfirm"])]);
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
806
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), ct = { class: "ImportButton" }, lt = ["accept"], ut = /* @__PURE__ */ Q({
|
|
807
807
|
__name: "index",
|
|
808
808
|
props: {
|
|
809
809
|
accept: {
|
|
@@ -824,7 +824,7 @@ var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]
|
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
826
|
setup(e) {
|
|
827
|
-
let { t } =
|
|
827
|
+
let { t } = W(), n = e, r = A(null), a = A(!1);
|
|
828
828
|
function o(e) {
|
|
829
829
|
let t = e.match(/__v(\d+)/);
|
|
830
830
|
return t ? parseInt(t[1], 10) : null;
|
|
@@ -839,7 +839,7 @@ var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]
|
|
|
839
839
|
return;
|
|
840
840
|
}
|
|
841
841
|
}
|
|
842
|
-
let c = await
|
|
842
|
+
let c = await Re(s, n.fields).catch(() => {
|
|
843
843
|
a.value = !1;
|
|
844
844
|
}).finally(() => {
|
|
845
845
|
r.value.value = null;
|
|
@@ -850,7 +850,7 @@ var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]
|
|
|
850
850
|
}
|
|
851
851
|
return (t, n) => {
|
|
852
852
|
let i = N("el-button");
|
|
853
|
-
return O(), f("div",
|
|
853
|
+
return O(), f("div", ct, [g(i, x({
|
|
854
854
|
type: "primary",
|
|
855
855
|
loading: a.value,
|
|
856
856
|
class: "mgr10",
|
|
@@ -870,27 +870,27 @@ var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]
|
|
|
870
870
|
opacity: "0"
|
|
871
871
|
},
|
|
872
872
|
type: "file"
|
|
873
|
-
}, null, 40,
|
|
873
|
+
}, null, 40, lt)]);
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
876
|
}, [["__scopeId", "data-v-b8f856ea"]]);
|
|
877
877
|
//#endregion
|
|
878
878
|
//#region src/components/SearchBar/tools.js
|
|
879
|
-
function
|
|
879
|
+
function dt(e) {
|
|
880
880
|
let t = {};
|
|
881
881
|
return e.forEach((e) => {
|
|
882
882
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date" } = e;
|
|
883
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
883
|
+
if (n) if (r == "input" && i?.multiple) t[n] = Ke(a);
|
|
884
884
|
else if (r == "date") if (o.includes("range")) {
|
|
885
885
|
let [e, r] = n, [i, s] = a || [];
|
|
886
|
-
i && o == "daterange" && (i =
|
|
886
|
+
i && o == "daterange" && (i = U(i).format("YYYY-MM-DD 00:00:00"), s = U(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
887
887
|
} else t[n] = a;
|
|
888
888
|
else t[n] = a;
|
|
889
889
|
}), t;
|
|
890
890
|
}
|
|
891
891
|
//#endregion
|
|
892
892
|
//#region src/components/SearchBar/index.vue
|
|
893
|
-
var
|
|
893
|
+
var ft = { key: 0 }, pt = { class: "btns" }, mt = { class: "left" }, ht = { class: "right" }, gt = /* @__PURE__ */ Q({
|
|
894
894
|
__name: "index",
|
|
895
895
|
props: { form: {
|
|
896
896
|
type: Object,
|
|
@@ -902,7 +902,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
902
902
|
"visibleChange"
|
|
903
903
|
],
|
|
904
904
|
setup(e, { expose: t, emit: n }) {
|
|
905
|
-
let r = e, i = n, a = A(!0), o = A(null), { t: s } =
|
|
905
|
+
let r = e, i = n, a = A(!0), o = A(null), { t: s } = W(), m = {
|
|
906
906
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
907
907
|
daterange: "YYYY-MM-DD",
|
|
908
908
|
month: "YYYY-MM"
|
|
@@ -920,9 +920,9 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
920
920
|
i("confirm");
|
|
921
921
|
}
|
|
922
922
|
function T() {
|
|
923
|
-
return
|
|
923
|
+
return dt(r.form.items);
|
|
924
924
|
}
|
|
925
|
-
let E =
|
|
925
|
+
let E = ie(r.form.items);
|
|
926
926
|
function D() {
|
|
927
927
|
r.form.items.forEach((e) => {
|
|
928
928
|
let t = E.find((t) => t.key == e.key);
|
|
@@ -936,7 +936,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
936
936
|
let r = N("el-input"), s = N("el-date-picker"), l = N("el-form-item"), T = N("el-form"), E = N("el-link"), D = N("el-button");
|
|
937
937
|
return O(), f("div", {
|
|
938
938
|
class: "searchBar-container mgt10 mgb10",
|
|
939
|
-
onKeydown:
|
|
939
|
+
onKeydown: B(v, ["enter"])
|
|
940
940
|
}, [p("div", {
|
|
941
941
|
class: "searchBar",
|
|
942
942
|
style: w({ height: a.value ? "auto" : "32px" })
|
|
@@ -944,7 +944,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
944
944
|
inline: "",
|
|
945
945
|
model: e.form.data
|
|
946
946
|
}, {
|
|
947
|
-
default: z(() => [(O(!0), f(c, null, j(e.form.items.filter((e) => !e.hidden), (e) => (O(), f(c, { key: e.key }, [e.type == "br" ? (O(), f("br",
|
|
947
|
+
default: z(() => [(O(!0), f(c, null, j(e.form.items.filter((e) => !e.hidden), (e) => (O(), f(c, { key: e.key }, [e.type == "br" ? (O(), f("br", ft)) : (O(), u(l, {
|
|
948
948
|
key: 1,
|
|
949
949
|
label: e.name
|
|
950
950
|
}, {
|
|
@@ -962,7 +962,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
962
962
|
"class",
|
|
963
963
|
"placeholder"
|
|
964
964
|
])) : e.type === "custom" ? (O(), u(P(e.render), { key: 1 })) : d("", !0),
|
|
965
|
-
e.type === "select" ? (O(), u(
|
|
965
|
+
e.type === "select" ? (O(), u(nt, x({
|
|
966
966
|
key: 2,
|
|
967
967
|
class: e.option?.class || "w150",
|
|
968
968
|
modelValue: e.value,
|
|
@@ -1009,7 +1009,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
1009
1009
|
_: 2
|
|
1010
1010
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
1011
1011
|
_: 1
|
|
1012
|
-
}, 8, ["model"])], 4), p("div",
|
|
1012
|
+
}, 8, ["model"])], 4), p("div", pt, [p("div", mt, [M(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", ht, [
|
|
1013
1013
|
g(E, {
|
|
1014
1014
|
underline: "never",
|
|
1015
1015
|
class: "mgr10",
|
|
@@ -1017,7 +1017,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
1017
1017
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1018
1018
|
}
|
|
1019
1019
|
}, {
|
|
1020
|
-
default: z(() => [g(
|
|
1020
|
+
default: z(() => [g(at, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + F(_.value), 1)]),
|
|
1021
1021
|
_: 1
|
|
1022
1022
|
}),
|
|
1023
1023
|
g(D, {
|
|
@@ -1038,7 +1038,7 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
1038
1038
|
])])], 32);
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
}, [["__scopeId", "data-v-db6f71dd"]]),
|
|
1041
|
+
}, [["__scopeId", "data-v-db6f71dd"]]), _t = {
|
|
1042
1042
|
pageNoKey: "pageNo",
|
|
1043
1043
|
pageSizeKey: "pageSize",
|
|
1044
1044
|
totalKey: "total",
|
|
@@ -1062,26 +1062,26 @@ var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { clas
|
|
|
1062
1062
|
showShadow: !1,
|
|
1063
1063
|
showCheckBox: !1,
|
|
1064
1064
|
enableCellCopy: !0
|
|
1065
|
-
},
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1068
|
-
|
|
1065
|
+
}, $ = { ..._t };
|
|
1066
|
+
function vt(e) {
|
|
1067
|
+
$ = {
|
|
1068
|
+
...$,
|
|
1069
1069
|
...e,
|
|
1070
1070
|
responseDataKeys: {
|
|
1071
|
-
|
|
1071
|
+
...$.responseDataKeys,
|
|
1072
1072
|
...e.responseDataKeys || {}
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1076
|
+
function yt() {
|
|
1077
|
+
return $;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
|
|
1079
|
+
function bt() {
|
|
1080
|
+
$ = { ..._t };
|
|
1081
1081
|
}
|
|
1082
1082
|
//#endregion
|
|
1083
1083
|
//#region src/components/ListPage/index.vue
|
|
1084
|
-
var
|
|
1084
|
+
var xt = { class: "center" }, St = /* @__PURE__ */ Q({
|
|
1085
1085
|
__name: "index",
|
|
1086
1086
|
props: {
|
|
1087
1087
|
id: {
|
|
@@ -1111,16 +1111,16 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1111
1111
|
}
|
|
1112
1112
|
},
|
|
1113
1113
|
setup(e, { expose: t }) {
|
|
1114
|
-
let { t: n, locale: r } =
|
|
1114
|
+
let { t: n, locale: r } = W(), i = se(), a = yt(), o = e, s = A(!1), c = A([]);
|
|
1115
1115
|
o.searchForm.showSearch === void 0 && (o.searchForm.showSearch = a.showSearch), o.searchForm.showPage === void 0 && (o.searchForm.showPage = a.showPage), o.searchForm.showShadow === void 0 && (o.searchForm.showShadow = a.showShadow), o.searchForm.showCheckBox === void 0 && (o.searchForm.showCheckBox = a.showCheckBox), o.searchForm.enableCellCopy === void 0 && (o.searchForm.enableCellCopy = a.enableCellCopy), o.searchForm.selections || (o.searchForm.selections = []);
|
|
1116
1116
|
let m = l(() => {
|
|
1117
1117
|
let e = i?.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1118
1118
|
return o.id ? `listPageId-${e}-${o.id}` : `listPageId-${e}`;
|
|
1119
|
-
}), _ =
|
|
1119
|
+
}), _ = ie(o.searchForm.items), v = o.searchForm.pageNoKey || a.pageNoKey, y = o.searchForm.pageSizeKey || a.pageSizeKey, b = k({
|
|
1120
1120
|
[v]: 1,
|
|
1121
1121
|
[y]: o.searchForm.defaultPageSize || a.defaultPageSize,
|
|
1122
1122
|
total: 0
|
|
1123
|
-
}), w = A(null), j = A(null), P = A(450), L =
|
|
1123
|
+
}), w = A(null), j = A(null), P = A(450), L = ae(() => {
|
|
1124
1124
|
S(() => {
|
|
1125
1125
|
if (!j.value) return;
|
|
1126
1126
|
let e = j.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
@@ -1133,10 +1133,10 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1133
1133
|
let e = w.value;
|
|
1134
1134
|
if (!e || !e.$el) return !1;
|
|
1135
1135
|
let t = e.$el;
|
|
1136
|
-
return t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1136
|
+
return t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", J), t.removeEventListener("mousemove", de), t.removeEventListener("mouseup", Y), t.removeEventListener("keydown", X), t.addEventListener("mousedown", J), t.addEventListener("mousemove", de), t.addEventListener("mouseup", Y), t.addEventListener("keydown", X), !0;
|
|
1137
1137
|
};
|
|
1138
1138
|
T(() => {
|
|
1139
|
-
L(), window.addEventListener("resize", ee), (o.searchForm.enableCellCopy || a.enableCellCopy) && (document.addEventListener("mouseup",
|
|
1139
|
+
L(), window.addEventListener("resize", ee), (o.searchForm.enableCellCopy || a.enableCellCopy) && (document.addEventListener("mouseup", ge), document.addEventListener("mousedown", _e), setTimeout(() => {
|
|
1140
1140
|
R();
|
|
1141
1141
|
}, 500));
|
|
1142
1142
|
}), D(() => {
|
|
@@ -1145,80 +1145,90 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1145
1145
|
}, 500);
|
|
1146
1146
|
}), E(() => {
|
|
1147
1147
|
if (window.removeEventListener("resize", ee), o.searchForm.enableCellCopy || a.enableCellCopy) {
|
|
1148
|
-
document.removeEventListener("mouseup",
|
|
1148
|
+
document.removeEventListener("mouseup", ge), document.removeEventListener("mousedown", _e);
|
|
1149
1149
|
let e = w.value;
|
|
1150
1150
|
if (e && e.$el) {
|
|
1151
1151
|
let t = e.$el;
|
|
1152
|
-
t.removeEventListener("mousedown",
|
|
1152
|
+
t.removeEventListener("mousedown", J), t.removeEventListener("mousemove", de), t.removeEventListener("mouseup", Y), t.removeEventListener("keydown", X);
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
1155
|
});
|
|
1156
|
-
let te = l(() =>
|
|
1157
|
-
async function
|
|
1156
|
+
let te = l(() => K.value.height || P.value), B;
|
|
1157
|
+
async function V(e) {
|
|
1158
1158
|
let { dataFormat: t } = o.tableConfig;
|
|
1159
|
-
e[v] != 1 && (e.nextSearchAfter =
|
|
1159
|
+
e[v] != 1 && (e.nextSearchAfter = B), s.value = !0;
|
|
1160
1160
|
let { code: n, data: r = {} } = await o.api(e).finally(() => {
|
|
1161
1161
|
s.value = !1, o.searchForm.selections = [];
|
|
1162
1162
|
});
|
|
1163
1163
|
if (n == 200) {
|
|
1164
|
+
o.searchForm?.apiCallBack({
|
|
1165
|
+
code: n,
|
|
1166
|
+
data: r
|
|
1167
|
+
});
|
|
1164
1168
|
let e = [];
|
|
1165
|
-
for (let t of a.responseDataKeys.rows)
|
|
1166
|
-
|
|
1167
|
-
|
|
1169
|
+
for (let t of a.responseDataKeys.rows) {
|
|
1170
|
+
let n = et(r, t);
|
|
1171
|
+
if (n) {
|
|
1172
|
+
e = n;
|
|
1173
|
+
break;
|
|
1174
|
+
}
|
|
1168
1175
|
}
|
|
1169
|
-
let
|
|
1170
|
-
for (let e of a.responseDataKeys.total)
|
|
1171
|
-
|
|
1172
|
-
|
|
1176
|
+
let i = 0;
|
|
1177
|
+
for (let e of a.responseDataKeys.total) {
|
|
1178
|
+
let t = et(r, e);
|
|
1179
|
+
if (t !== void 0) {
|
|
1180
|
+
i = t;
|
|
1181
|
+
break;
|
|
1182
|
+
}
|
|
1173
1183
|
}
|
|
1174
|
-
c.value = t ? t(e) : e, b.total =
|
|
1184
|
+
c.value = t ? t(e) : e, b.total = i, B = r.nextSearchAfter, (o.searchForm.enableCellCopy || a.enableCellCopy) && S(() => {
|
|
1175
1185
|
setTimeout(() => {
|
|
1176
1186
|
R();
|
|
1177
1187
|
}, 100);
|
|
1178
1188
|
});
|
|
1179
1189
|
}
|
|
1180
1190
|
}
|
|
1181
|
-
function
|
|
1191
|
+
function H(e = {}) {
|
|
1182
1192
|
let { searchData: t = () => ({}) } = o.tableConfig, n = t();
|
|
1183
|
-
|
|
1193
|
+
V({
|
|
1184
1194
|
...b,
|
|
1185
|
-
...
|
|
1195
|
+
...dt(o.searchForm.items),
|
|
1186
1196
|
...e,
|
|
1187
1197
|
...n
|
|
1188
1198
|
});
|
|
1189
1199
|
}
|
|
1190
|
-
function
|
|
1200
|
+
function U() {
|
|
1191
1201
|
let { reset: e } = o.tableConfig;
|
|
1192
1202
|
e && e(), o.searchForm.items.forEach((e) => {
|
|
1193
|
-
let t = _.find((t) =>
|
|
1203
|
+
let t = _.find((t) => oe(e.key) && oe(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1194
1204
|
t && (e.value = t.value);
|
|
1195
|
-
}),
|
|
1205
|
+
}), H();
|
|
1196
1206
|
}
|
|
1197
|
-
o.api && o.immediate &&
|
|
1198
|
-
function
|
|
1207
|
+
o.api && o.immediate && H();
|
|
1208
|
+
function re() {
|
|
1199
1209
|
return {
|
|
1200
1210
|
...b,
|
|
1201
|
-
...
|
|
1211
|
+
...dt(o.searchForm.items)
|
|
1202
1212
|
};
|
|
1203
1213
|
}
|
|
1204
|
-
let
|
|
1214
|
+
let ce = () => {
|
|
1205
1215
|
let e = w.value;
|
|
1206
1216
|
e && e.clearSort();
|
|
1207
|
-
},
|
|
1217
|
+
}, G = k({ storage: !0 }), le = k({
|
|
1208
1218
|
drag: !0,
|
|
1209
1219
|
resizable: !0,
|
|
1210
1220
|
maxFixedSize: 0
|
|
1211
|
-
}),
|
|
1221
|
+
}), K = l(() => {
|
|
1212
1222
|
let { customConfig: e, columnConfig: t, ...n } = o.tableConfig;
|
|
1213
1223
|
return {
|
|
1214
1224
|
headerAlign: "left",
|
|
1215
1225
|
align: "center",
|
|
1216
1226
|
customConfig: {
|
|
1217
|
-
...
|
|
1227
|
+
...G,
|
|
1218
1228
|
...e
|
|
1219
1229
|
},
|
|
1220
1230
|
columnConfig: {
|
|
1221
|
-
...
|
|
1231
|
+
...le,
|
|
1222
1232
|
...t
|
|
1223
1233
|
},
|
|
1224
1234
|
"virtual-x-config": {
|
|
@@ -1231,12 +1241,12 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1231
1241
|
},
|
|
1232
1242
|
...n
|
|
1233
1243
|
};
|
|
1234
|
-
}),
|
|
1244
|
+
}), q = k({
|
|
1235
1245
|
isSelecting: !1,
|
|
1236
1246
|
startCell: null,
|
|
1237
1247
|
endCell: null,
|
|
1238
1248
|
selectedCells: []
|
|
1239
|
-
}),
|
|
1249
|
+
}), ue = (e) => {
|
|
1240
1250
|
let t = e.closest(".vxe-body--column");
|
|
1241
1251
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1242
1252
|
let n = t.closest(".vxe-body--row");
|
|
@@ -1269,56 +1279,56 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1269
1279
|
colIndex: s,
|
|
1270
1280
|
cell: t
|
|
1271
1281
|
};
|
|
1272
|
-
},
|
|
1273
|
-
let t =
|
|
1282
|
+
}, J = (e) => {
|
|
1283
|
+
let t = ue(e.target);
|
|
1274
1284
|
if (!t) {
|
|
1275
|
-
|
|
1285
|
+
fe();
|
|
1276
1286
|
return;
|
|
1277
1287
|
}
|
|
1278
|
-
|
|
1288
|
+
q.isSelecting = !0, q.startCell = {
|
|
1279
1289
|
rowIndex: t.rowIndex,
|
|
1280
1290
|
colIndex: t.colIndex
|
|
1281
|
-
},
|
|
1282
|
-
},
|
|
1283
|
-
if (!
|
|
1284
|
-
let t =
|
|
1285
|
-
t && (
|
|
1291
|
+
}, q.endCell = { ...q.startCell }, pe(), me();
|
|
1292
|
+
}, de = (e) => {
|
|
1293
|
+
if (!q.isSelecting) return;
|
|
1294
|
+
let t = ue(e.target);
|
|
1295
|
+
t && (q.endCell = {
|
|
1286
1296
|
rowIndex: t.rowIndex,
|
|
1287
1297
|
colIndex: t.colIndex
|
|
1288
|
-
},
|
|
1289
|
-
},
|
|
1290
|
-
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1298
|
+
}, pe(), me());
|
|
1299
|
+
}, Y = () => {
|
|
1300
|
+
q.isSelecting = !1;
|
|
1301
|
+
}, fe = () => {
|
|
1302
|
+
q.selectedCells = [], q.startCell = null, q.endCell = null;
|
|
1293
1303
|
let e = w.value;
|
|
1294
1304
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1295
1305
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1296
1306
|
});
|
|
1297
|
-
},
|
|
1298
|
-
if (!
|
|
1299
|
-
|
|
1307
|
+
}, pe = () => {
|
|
1308
|
+
if (!q.startCell || !q.endCell) {
|
|
1309
|
+
q.selectedCells = [];
|
|
1300
1310
|
return;
|
|
1301
1311
|
}
|
|
1302
|
-
let e =
|
|
1303
|
-
|
|
1304
|
-
for (let e = i; e <= a; e++) for (let t = o; t <= s; t++)
|
|
1312
|
+
let e = q.startCell.rowIndex, t = q.endCell.rowIndex, n = q.startCell.colIndex, r = q.endCell.colIndex, i = Math.min(e, t), a = Math.max(e, t), o = Math.min(n, r), s = Math.max(n, r);
|
|
1313
|
+
q.selectedCells = [];
|
|
1314
|
+
for (let e = i; e <= a; e++) for (let t = o; t <= s; t++) q.selectedCells.push({
|
|
1305
1315
|
rowIndex: e,
|
|
1306
1316
|
colIndex: t
|
|
1307
1317
|
});
|
|
1308
|
-
},
|
|
1318
|
+
}, me = () => {
|
|
1309
1319
|
S(() => {
|
|
1310
1320
|
let e = w.value;
|
|
1311
1321
|
if (!e) return;
|
|
1312
1322
|
let t = e.$el;
|
|
1313
1323
|
if (t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1314
1324
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1315
|
-
}),
|
|
1316
|
-
let n = e.getColumns(), r =
|
|
1325
|
+
}), q.selectedCells.length === 0) return;
|
|
1326
|
+
let n = e.getColumns(), r = q.selectedCells.map((e) => e.rowIndex), i = q.selectedCells.map((e) => e.colIndex), a = Math.min(...r), s = Math.max(...r), c = Math.min(...i), l = Math.max(...i), u = [
|
|
1317
1327
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1318
1328
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1319
1329
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1320
1330
|
].filter(Boolean);
|
|
1321
|
-
|
|
1331
|
+
q.selectedCells.forEach(({ rowIndex: e, colIndex: t }) => {
|
|
1322
1332
|
let r = n[t];
|
|
1323
1333
|
if (!r) return;
|
|
1324
1334
|
let i = r.fixed === "left", d = r.fixed === "right";
|
|
@@ -1339,11 +1349,11 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1339
1349
|
}
|
|
1340
1350
|
});
|
|
1341
1351
|
});
|
|
1342
|
-
},
|
|
1343
|
-
if (
|
|
1352
|
+
}, he = async () => {
|
|
1353
|
+
if (q.selectedCells.length === 0) return;
|
|
1344
1354
|
let e = w.value;
|
|
1345
1355
|
if (!e) return;
|
|
1346
|
-
let t = e.$el, n = e.getColumns(), r = [...new Set(
|
|
1356
|
+
let t = e.$el, n = e.getColumns(), r = [...new Set(q.selectedCells.map((e) => e.rowIndex))].sort((e, t) => e - t), i = [...new Set(q.selectedCells.map((e) => e.colIndex))].sort((e, t) => e - t), a = [
|
|
1347
1357
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1348
1358
|
t.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1349
1359
|
t.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
@@ -1381,23 +1391,23 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1381
1391
|
} catch (e) {
|
|
1382
1392
|
console.error("复制失败:", e);
|
|
1383
1393
|
}
|
|
1384
|
-
},
|
|
1385
|
-
!o.searchForm.enableCellCopy && !a.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ?
|
|
1386
|
-
},
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1394
|
+
}, X = (e) => {
|
|
1395
|
+
!o.searchForm.enableCellCopy && !a.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? q.selectedCells.length > 0 && (e.preventDefault(), e.stopPropagation(), he()) : e.key === "Escape" && fe());
|
|
1396
|
+
}, ge = () => {
|
|
1397
|
+
q.isSelecting = !1;
|
|
1398
|
+
}, _e = (e) => {
|
|
1389
1399
|
let t = w.value;
|
|
1390
|
-
!t || !t.$el || t.$el.contains(e.target) ||
|
|
1400
|
+
!t || !t.$el || t.$el.contains(e.target) || fe();
|
|
1401
|
+
}, ve = (e) => {
|
|
1402
|
+
b[v] = e, H();
|
|
1391
1403
|
}, ye = (e) => {
|
|
1392
|
-
b[
|
|
1393
|
-
}, be = (e) => {
|
|
1394
|
-
b[y] = e, b[v] = 1, V();
|
|
1404
|
+
b[y] = e, b[v] = 1, H();
|
|
1395
1405
|
};
|
|
1396
|
-
function
|
|
1406
|
+
function be() {
|
|
1397
1407
|
let e = w.value.getCheckboxRecords();
|
|
1398
1408
|
o.searchForm.selections = e;
|
|
1399
1409
|
}
|
|
1400
|
-
let
|
|
1410
|
+
let xe = (e) => {
|
|
1401
1411
|
let t = w.value;
|
|
1402
1412
|
if (t) {
|
|
1403
1413
|
t.toggleCheckboxRow(e);
|
|
@@ -1407,18 +1417,18 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1407
1417
|
};
|
|
1408
1418
|
return t({
|
|
1409
1419
|
tableRef: w,
|
|
1410
|
-
getList:
|
|
1411
|
-
getPrm:
|
|
1412
|
-
clearSort:
|
|
1420
|
+
getList: H,
|
|
1421
|
+
getPrm: re,
|
|
1422
|
+
clearSort: ce,
|
|
1413
1423
|
calculateTableHeight: L
|
|
1414
1424
|
}), (t, n) => {
|
|
1415
1425
|
let i = N("el-button"), o = N("el-checkbox"), l = N("el-text"), _ = N("vxe-column"), S = N("VxeTable"), T = N("el-pagination");
|
|
1416
1426
|
return O(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1417
|
-
e.searchForm.showSearch ? (O(), u(
|
|
1427
|
+
e.searchForm.showSearch ? (O(), u(gt, {
|
|
1418
1428
|
key: 0,
|
|
1419
1429
|
form: e.searchForm,
|
|
1420
|
-
onReset:
|
|
1421
|
-
onConfirm: n[1] ||= (e) =>
|
|
1430
|
+
onReset: U,
|
|
1431
|
+
onConfirm: n[1] ||= (e) => H(),
|
|
1422
1432
|
onVisibleChange: I(L)
|
|
1423
1433
|
}, {
|
|
1424
1434
|
btn: z(() => [
|
|
@@ -1429,7 +1439,7 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1429
1439
|
round: "",
|
|
1430
1440
|
onClick: n[0] ||= (e) => w.value.openCustom()
|
|
1431
1441
|
}, {
|
|
1432
|
-
default: z(() => [g(
|
|
1442
|
+
default: z(() => [g(at, { name: "Tools" })]),
|
|
1433
1443
|
_: 1
|
|
1434
1444
|
})
|
|
1435
1445
|
]),
|
|
@@ -1446,11 +1456,11 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1446
1456
|
loading: e.loading || s.value,
|
|
1447
1457
|
data: e.api ? c.value : e.data,
|
|
1448
1458
|
border: ""
|
|
1449
|
-
},
|
|
1459
|
+
}, K.value, {
|
|
1450
1460
|
height: te.value,
|
|
1451
|
-
onCheckboxChange:
|
|
1452
|
-
onCheckboxAll:
|
|
1453
|
-
onSortChange:
|
|
1461
|
+
onCheckboxChange: be,
|
|
1462
|
+
onCheckboxAll: be,
|
|
1463
|
+
onSortChange: K.value["sort-config"]?.sortChange
|
|
1454
1464
|
}), {
|
|
1455
1465
|
default: z(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (O(), u(_, {
|
|
1456
1466
|
key: 0,
|
|
@@ -1459,18 +1469,18 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1459
1469
|
title: t.$t("xu-hao"),
|
|
1460
1470
|
fixed: "left"
|
|
1461
1471
|
}, {
|
|
1462
|
-
checkbox: z(({ rowIndex: e, row: t, checked: n, disabled: r, indeterminate: i }) => [p("div",
|
|
1472
|
+
checkbox: z(({ rowIndex: e, row: t, checked: n, disabled: r, indeterminate: i }) => [p("div", xt, [n ? (O(), u(o, {
|
|
1463
1473
|
key: 0,
|
|
1464
1474
|
checked: !0,
|
|
1465
1475
|
disabled: r,
|
|
1466
1476
|
size: "default",
|
|
1467
|
-
onClick:
|
|
1477
|
+
onClick: ne((e) => !r && xe(t), ["stop"])
|
|
1468
1478
|
}, null, 8, ["disabled", "onClick"])) : (O(), u(o, {
|
|
1469
1479
|
key: 1,
|
|
1470
1480
|
disabled: r,
|
|
1471
1481
|
checked: !1,
|
|
1472
1482
|
size: "default",
|
|
1473
|
-
onClick:
|
|
1483
|
+
onClick: ne((e) => !r && xe(t), ["stop"])
|
|
1474
1484
|
}, null, 8, ["disabled", "onClick"])), g(l, {
|
|
1475
1485
|
type: "info",
|
|
1476
1486
|
class: "mgl5"
|
|
@@ -1498,8 +1508,8 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1498
1508
|
total: b.total,
|
|
1499
1509
|
"page-size": b[I(y)],
|
|
1500
1510
|
"page-sizes": e.searchForm.pageSizes || I(a).pageSizes,
|
|
1501
|
-
onCurrentChange:
|
|
1502
|
-
onSizeChange:
|
|
1511
|
+
onCurrentChange: ve,
|
|
1512
|
+
onSizeChange: ye
|
|
1503
1513
|
}, null, 8, [
|
|
1504
1514
|
"current-page",
|
|
1505
1515
|
"total",
|
|
@@ -1509,7 +1519,7 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1509
1519
|
], 2);
|
|
1510
1520
|
};
|
|
1511
1521
|
}
|
|
1512
|
-
}, [["__scopeId", "data-v-
|
|
1522
|
+
}, [["__scopeId", "data-v-16c62605"]]), Ct = {
|
|
1513
1523
|
__name: "index",
|
|
1514
1524
|
props: {
|
|
1515
1525
|
sheetsConfig: {
|
|
@@ -1528,7 +1538,7 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1528
1538
|
setup(e) {
|
|
1529
1539
|
let t = e;
|
|
1530
1540
|
function n() {
|
|
1531
|
-
|
|
1541
|
+
Be(t.fileName + (t.version ? `__v${t.version}` : ""), t.sheetsConfig);
|
|
1532
1542
|
}
|
|
1533
1543
|
return (e, t) => {
|
|
1534
1544
|
let r = N("el-link");
|
|
@@ -1541,18 +1551,18 @@ var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
|
1541
1551
|
}, 16);
|
|
1542
1552
|
};
|
|
1543
1553
|
}
|
|
1544
|
-
},
|
|
1554
|
+
}, wt = {
|
|
1545
1555
|
mounted(e, t) {
|
|
1546
|
-
t.value &&
|
|
1556
|
+
t.value && Tt(e);
|
|
1547
1557
|
},
|
|
1548
1558
|
updated(e, t) {
|
|
1549
|
-
t.value ?
|
|
1559
|
+
t.value ? Tt(e) : Et(e);
|
|
1550
1560
|
},
|
|
1551
1561
|
beforeUnmount(e) {
|
|
1552
|
-
|
|
1562
|
+
Et(e);
|
|
1553
1563
|
}
|
|
1554
1564
|
};
|
|
1555
|
-
async function
|
|
1565
|
+
async function Tt(e) {
|
|
1556
1566
|
await f();
|
|
1557
1567
|
let t = e.querySelector(".el-dialog");
|
|
1558
1568
|
if (!t) return;
|
|
@@ -1615,15 +1625,15 @@ async function Et(e) {
|
|
|
1615
1625
|
}
|
|
1616
1626
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1617
1627
|
}
|
|
1618
|
-
function
|
|
1628
|
+
function Et(e) {
|
|
1619
1629
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1620
1630
|
}
|
|
1621
1631
|
//#endregion
|
|
1622
1632
|
//#region src/components/Layer/index.vue
|
|
1623
|
-
var
|
|
1633
|
+
var Dt = {
|
|
1624
1634
|
key: 0,
|
|
1625
1635
|
class: "drawer-btn"
|
|
1626
|
-
},
|
|
1636
|
+
}, Ot = { key: 1 }, kt = {
|
|
1627
1637
|
__name: "index",
|
|
1628
1638
|
props: {
|
|
1629
1639
|
layer: {
|
|
@@ -1643,7 +1653,7 @@ var Ot = {
|
|
|
1643
1653
|
},
|
|
1644
1654
|
emits: ["confirm"],
|
|
1645
1655
|
setup(e, { emit: t }) {
|
|
1646
|
-
let n = e, r = t, { t: i } =
|
|
1656
|
+
let n = e, r = t, { t: i } = W(), o = ae(() => {
|
|
1647
1657
|
r("confirm");
|
|
1648
1658
|
}, 300);
|
|
1649
1659
|
async function s() {
|
|
@@ -1669,7 +1679,7 @@ var Ot = {
|
|
|
1669
1679
|
default: z(() => [
|
|
1670
1680
|
M(t.$slots, "default"),
|
|
1671
1681
|
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1672
|
-
e.layer.showButton ? (O(), f("div",
|
|
1682
|
+
e.layer.showButton ? (O(), f("div", Dt, [M(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1673
1683
|
default: z(() => [h(F(t.$t("qu-xiao")), 1)]),
|
|
1674
1684
|
_: 1
|
|
1675
1685
|
}), g(r, {
|
|
@@ -1686,7 +1696,7 @@ var Ot = {
|
|
|
1686
1696
|
"modelValue",
|
|
1687
1697
|
"size",
|
|
1688
1698
|
"title"
|
|
1689
|
-
])) : te((O(), f("div",
|
|
1699
|
+
])) : te((O(), f("div", Ot, [g(a, {
|
|
1690
1700
|
"close-on-click-modal": !1,
|
|
1691
1701
|
modelValue: e.layer.show,
|
|
1692
1702
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
@@ -1713,14 +1723,14 @@ var Ot = {
|
|
|
1713
1723
|
"modelValue",
|
|
1714
1724
|
"title",
|
|
1715
1725
|
"width"
|
|
1716
|
-
])])), [[I(
|
|
1726
|
+
])])), [[I(wt), e.layer.show]]);
|
|
1717
1727
|
};
|
|
1718
1728
|
}
|
|
1719
1729
|
};
|
|
1720
1730
|
//#endregion
|
|
1721
1731
|
//#region src/utils/tools/validate.js
|
|
1722
|
-
function
|
|
1723
|
-
let n =
|
|
1732
|
+
function At(e, t = {}) {
|
|
1733
|
+
let n = Z(), r = {
|
|
1724
1734
|
inForm: !0,
|
|
1725
1735
|
required: !0,
|
|
1726
1736
|
...t
|
|
@@ -1739,7 +1749,7 @@ function jt(e, t = {}) {
|
|
|
1739
1749
|
}
|
|
1740
1750
|
//#endregion
|
|
1741
1751
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1742
|
-
var
|
|
1752
|
+
var jt = class {
|
|
1743
1753
|
constructor(e = {}) {
|
|
1744
1754
|
this.config = {
|
|
1745
1755
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -1886,7 +1896,7 @@ var Mt = class {
|
|
|
1886
1896
|
};
|
|
1887
1897
|
//#endregion
|
|
1888
1898
|
//#region src/utils/tools/format.js
|
|
1889
|
-
function
|
|
1899
|
+
function Mt(e, t = 2, n = ".", r = ",") {
|
|
1890
1900
|
(e == null || e === "") && (e = 0);
|
|
1891
1901
|
let i = Number(e);
|
|
1892
1902
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
@@ -1894,12 +1904,12 @@ function $(e, t = 2, n = ".", r = ",") {
|
|
|
1894
1904
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
1895
1905
|
}
|
|
1896
1906
|
function Nt(e, t = 2) {
|
|
1897
|
-
return
|
|
1907
|
+
return Mt(e, t);
|
|
1898
1908
|
}
|
|
1899
1909
|
function Pt(e, t = 2) {
|
|
1900
1910
|
(e == null || e === "") && (e = 0);
|
|
1901
1911
|
let n = Number(e);
|
|
1902
|
-
return e = isNaN(n) ? 0 : n,
|
|
1912
|
+
return e = isNaN(n) ? 0 : n, Mt(e * 100, t) + "%";
|
|
1903
1913
|
}
|
|
1904
1914
|
//#endregion
|
|
1905
1915
|
//#region src/utils/hook/common.js
|
|
@@ -1962,7 +1972,7 @@ function Rt(e, t) {
|
|
|
1962
1972
|
//#endregion
|
|
1963
1973
|
//#region src/utils/hook/i18n.js
|
|
1964
1974
|
function zt(e, t = []) {
|
|
1965
|
-
let { locale: n } =
|
|
1975
|
+
let { locale: n } = W(), r = A(e());
|
|
1966
1976
|
return R([n, ...t], () => {
|
|
1967
1977
|
r.value = e();
|
|
1968
1978
|
}, { immediate: !0 }), r;
|
|
@@ -1971,30 +1981,30 @@ function Bt(e, t = "zh_cn", n = "en_us") {
|
|
|
1971
1981
|
return e && (e[{
|
|
1972
1982
|
en_us: n,
|
|
1973
1983
|
zh_cn: t
|
|
1974
|
-
}[
|
|
1984
|
+
}[Oe().global.locale.value]] || e[t]) || "-";
|
|
1975
1985
|
}
|
|
1976
1986
|
//#endregion
|
|
1977
1987
|
//#region src/utils/hook/storeHook.js
|
|
1978
1988
|
function Vt(e, t) {
|
|
1979
|
-
let n =
|
|
1980
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
1989
|
+
let n = q;
|
|
1990
|
+
return typeof e == "string" && e.length > 0 && (n = G(e).mapState), Wt(t, n);
|
|
1981
1991
|
}
|
|
1982
1992
|
function Ht(e, t) {
|
|
1983
|
-
let n =
|
|
1984
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
1993
|
+
let n = K;
|
|
1994
|
+
return typeof e == "string" && e.length > 0 && (n = G(e).mapGetters), Wt(t, n);
|
|
1985
1995
|
}
|
|
1986
1996
|
function Ut(e, t) {
|
|
1987
|
-
let n =
|
|
1988
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
1997
|
+
let n = le;
|
|
1998
|
+
return typeof e == "string" && e.length > 0 && (n = G(e).mapActions), Gt(t, n);
|
|
1989
1999
|
}
|
|
1990
2000
|
function Wt(e, t) {
|
|
1991
|
-
let n =
|
|
2001
|
+
let n = ue(), r = t(e), i = {};
|
|
1992
2002
|
return Object.keys(r).forEach((e) => {
|
|
1993
2003
|
i[e] = l(r[e].bind({ $store: n }));
|
|
1994
2004
|
}), i;
|
|
1995
2005
|
}
|
|
1996
2006
|
function Gt(e, t) {
|
|
1997
|
-
let n =
|
|
2007
|
+
let n = ue(), r = t(e), i = {};
|
|
1998
2008
|
return Object.keys(r).forEach((e) => {
|
|
1999
2009
|
i[e] = r[e].bind({ $store: n });
|
|
2000
2010
|
}), i;
|
|
@@ -2024,18 +2034,18 @@ function qt(e) {
|
|
|
2024
2034
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
2025
2035
|
}
|
|
2026
2036
|
function Jt() {
|
|
2027
|
-
|
|
2028
|
-
return
|
|
2029
|
-
} }),
|
|
2037
|
+
J.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2038
|
+
return Mt(e, t);
|
|
2039
|
+
} }), J.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2030
2040
|
return Nt(e, t);
|
|
2031
|
-
} }),
|
|
2041
|
+
} }), J.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2032
2042
|
return Pt(e, t);
|
|
2033
2043
|
} });
|
|
2034
2044
|
}
|
|
2035
2045
|
function Yt() {
|
|
2036
|
-
|
|
2046
|
+
J.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
2037
2047
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
2038
|
-
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } =
|
|
2048
|
+
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } = W(), c = s.value == "zh_cn" ? r : i;
|
|
2039
2049
|
return e.type == "tag" ? o ? g(Kt, { fontColor: o }, { default: () => [
|
|
2040
2050
|
h(" "),
|
|
2041
2051
|
c,
|
|
@@ -2053,7 +2063,7 @@ function Yt() {
|
|
|
2053
2063
|
c,
|
|
2054
2064
|
h(" ")
|
|
2055
2065
|
] });
|
|
2056
|
-
} }),
|
|
2066
|
+
} }), J.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2057
2067
|
return g(n, x({
|
|
2058
2068
|
modelValue: t.row[t.column.field],
|
|
2059
2069
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
@@ -2061,14 +2071,14 @@ function Yt() {
|
|
|
2061
2071
|
"step-strictly": !0,
|
|
2062
2072
|
"value-on-clear": 0
|
|
2063
2073
|
}), null);
|
|
2064
|
-
} }),
|
|
2065
|
-
let { locale: n } =
|
|
2074
|
+
} }), J.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2075
|
+
let { locale: n } = W(), r = n.value == "zh_cn";
|
|
2066
2076
|
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2067
|
-
} }),
|
|
2068
|
-
let { locale: n } =
|
|
2077
|
+
} }), J.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2078
|
+
let { locale: n } = W(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2069
2079
|
return t.row[r] || t.row[t.column.field];
|
|
2070
|
-
} }),
|
|
2071
|
-
let n = t.column.field, i =
|
|
2080
|
+
} }), J.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2081
|
+
let n = t.column.field, i = ce(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2072
2082
|
function l(e, t) {
|
|
2073
2083
|
s == "blank" ? window.open(e) : i.push({
|
|
2074
2084
|
path: e,
|
|
@@ -2094,4 +2104,4 @@ function Xt() {
|
|
|
2094
2104
|
Jt(), Yt();
|
|
2095
2105
|
}
|
|
2096
2106
|
//#endregion
|
|
2097
|
-
export {
|
|
2107
|
+
export { nt as CmpDictionary, at as CmpIcon, st as ConfrimButton, Ct as DownExcelTemp, ut as ImportButton, ve as LayOutForm, kt as Layer, St as ListPage, jt as OnePortalCasSDK, gt as SearchBar, qe as StatusMap, We as _toRaw, Lt as _typeOf, Je as arrToStatusMap, Ge as arrayToTree, Ze as checkFileSize, At as creatValidator, $e as createImportFields, Qe as createListPageId, we as en_us, je as exportExcel, Be as exportExcelMuilti, Nt as formatMoney, Mt as formatNumber, Pt as formatPercent, Oe as getI18n, Z as getI18nT, yt as getListPageConfig, Bt as getLocaleValue, et as getValueBykey, ke as importExcel, Re as importExcelMuilti, Te as messages, Jt as registerVxeFormatters, Xt as registerVxePlugins, Yt as registerVxeRenderers, bt as resetListPageConfig, vt as setListPageConfig, De as setupI18n, Ue as sleep, Ke as stringToArray, Ye as stripHtmlTags, Xe as unicode2Str, Ut as useActions, It as useDatePicker, Ht as useGetters, zt as useI18nReState, Ft as useRequest, Vt as useState, Ce as zh_cn };
|