joy-admin-components 0.2.21 → 0.2.23
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/joy-admin-components.es.js +278 -275
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as
|
|
2
|
-
import { defineComponent as ot, ref as R, onMounted as lt, h as
|
|
1
|
+
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as Ft, ElText as It, ElLink as Je } from "element-plus";
|
|
2
|
+
import { defineComponent as ot, ref as R, onMounted as lt, h as Te, mergeModels as Xe, useAttrs as Lt, useModel as Tt, computed as se, watch as Pe, resolveComponent as O, unref as K, openBlock as I, createBlock as H, mergeProps as he, createSlots as at, withCtx as D, createElementVNode as ae, toDisplayString as J, renderSlot as X, createVNode as z, createTextVNode as Q, createCommentVNode as ce, createElementBlock as re, Fragment as Oe, renderList as rt, withModifiers as Me, nextTick as Se, resolveDynamicComponent as st, withKeys as Dt, normalizeStyle as zt, normalizeClass as Ve, reactive as $e, onUpdated as Ot, onUnmounted as Mt, withDirectives as Vt, isVNode as qt } from "vue";
|
|
3
3
|
import { saveAs as it } from "file-saver";
|
|
4
|
-
import
|
|
4
|
+
import Ee from "exceljs";
|
|
5
5
|
import ke from "dayjs";
|
|
6
6
|
import { createI18n as At, useI18n as me } from "vue-i18n";
|
|
7
7
|
import { debounce as Re, cloneDeep as ct, isArray as Qe } from "lodash";
|
|
@@ -11,26 +11,26 @@ import { VxeUI as Ce } from "vxe-pc-ui";
|
|
|
11
11
|
const Vn = ot({
|
|
12
12
|
name: "LayOutForm",
|
|
13
13
|
setup(t, { slots: e, attrs: n, emit: a }) {
|
|
14
|
-
const
|
|
15
|
-
(
|
|
14
|
+
const r = R(null), o = () => e.default ? e.default().filter((s) => s.type !== Symbol.for("v-cmt")).map((s) => s.type === Symbol.for("v-fgt") ? s.children : s).flat().map(
|
|
15
|
+
(s) => {
|
|
16
16
|
var i;
|
|
17
|
-
return
|
|
17
|
+
return Te(
|
|
18
18
|
St,
|
|
19
|
-
{ span: ((i =
|
|
19
|
+
{ span: ((i = s.props) == null ? void 0 : i.span) || 24 },
|
|
20
20
|
{
|
|
21
|
-
default: () =>
|
|
21
|
+
default: () => s
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
26
|
lt(() => {
|
|
27
|
-
a("ref",
|
|
27
|
+
a("ref", r.value);
|
|
28
28
|
});
|
|
29
29
|
function l() {
|
|
30
|
-
return
|
|
30
|
+
return Te(
|
|
31
31
|
_t,
|
|
32
|
-
{ ...n, ref:
|
|
33
|
-
() =>
|
|
32
|
+
{ ...n, ref: r },
|
|
33
|
+
() => Te($t, { gutter: n.gutter ?? 20 }, { default: () => o() })
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
return l;
|
|
@@ -45,17 +45,17 @@ var ht = { exports: {} };
|
|
|
45
45
|
(function(n, a) {
|
|
46
46
|
t.exports = a();
|
|
47
47
|
})(dt, function() {
|
|
48
|
-
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g,
|
|
49
|
-
return function(o, l,
|
|
48
|
+
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
49
|
+
return function(o, l, s) {
|
|
50
50
|
var i = l.prototype;
|
|
51
|
-
|
|
51
|
+
s.utc = function(u) {
|
|
52
52
|
var h = { date: u, utc: !0, args: arguments };
|
|
53
53
|
return new l(h);
|
|
54
54
|
}, i.utc = function(u) {
|
|
55
|
-
var h =
|
|
55
|
+
var h = s(this.toDate(), { locale: this.$L, utc: !0 });
|
|
56
56
|
return u ? h.add(this.utcOffset(), n) : h;
|
|
57
57
|
}, i.local = function() {
|
|
58
|
-
return
|
|
58
|
+
return s(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
60
60
|
var v = i.parse;
|
|
61
61
|
i.parse = function(u) {
|
|
@@ -79,7 +79,7 @@ var ht = { exports: {} };
|
|
|
79
79
|
var B = E.match(a);
|
|
80
80
|
if (!B)
|
|
81
81
|
return null;
|
|
82
|
-
var
|
|
82
|
+
var L = ("" + B[0]).match(r) || ["-", 0, 0], d = L[0], C = 60 * +L[1] + +L[2];
|
|
83
83
|
return C === 0 ? 0 : d === "+" ? C : -C;
|
|
84
84
|
}(u), u === null))
|
|
85
85
|
return this;
|
|
@@ -108,13 +108,13 @@ var ht = { exports: {} };
|
|
|
108
108
|
};
|
|
109
109
|
var g = i.toDate;
|
|
110
110
|
i.toDate = function(u) {
|
|
111
|
-
return u === "s" && this.$offset ?
|
|
111
|
+
return u === "s" && this.$offset ? s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
|
|
112
112
|
};
|
|
113
113
|
var m = i.diff;
|
|
114
114
|
i.diff = function(u, h, k) {
|
|
115
115
|
if (u && this.$u === u.$u)
|
|
116
116
|
return m.call(this, u, h, k);
|
|
117
|
-
var _ = this.local(), x =
|
|
117
|
+
var _ = this.local(), x = s(u).local();
|
|
118
118
|
return m.call(_, x, h, k);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
@@ -128,8 +128,8 @@ var mt = { exports: {} };
|
|
|
128
128
|
t.exports = a();
|
|
129
129
|
})(dt, function() {
|
|
130
130
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
131
|
-
return function(
|
|
132
|
-
var
|
|
131
|
+
return function(r, o, l) {
|
|
132
|
+
var s, i = function(p, g, m) {
|
|
133
133
|
m === void 0 && (m = {});
|
|
134
134
|
var u = new Date(p), h = function(k, _) {
|
|
135
135
|
_ === void 0 && (_ = {});
|
|
@@ -142,11 +142,11 @@ var mt = { exports: {} };
|
|
|
142
142
|
var k = m[h], _ = k.type, x = k.value, S = n[_];
|
|
143
143
|
S >= 0 && (u[S] = parseInt(x, 10));
|
|
144
144
|
}
|
|
145
|
-
var E = u[3], B = E === 24 ? 0 : E,
|
|
146
|
-
return (l.utc(
|
|
145
|
+
var E = u[3], B = E === 24 ? 0 : E, L = u[0] + "-" + u[1] + "-" + u[2] + " " + B + ":" + u[4] + ":" + u[5] + ":000", d = +p;
|
|
146
|
+
return (l.utc(L).valueOf() - (d -= d % 1e3)) / 6e4;
|
|
147
147
|
}, w = o.prototype;
|
|
148
148
|
w.tz = function(p, g) {
|
|
149
|
-
p === void 0 && (p =
|
|
149
|
+
p === void 0 && (p = s);
|
|
150
150
|
var m, u = this.utcOffset(), h = this.toDate(), k = h.toLocaleString("en-US", { timeZone: p }), _ = Math.round((h - new Date(k)) / 1e3 / 60), x = 15 * -Math.round(h.getTimezoneOffset() / 15) - _;
|
|
151
151
|
if (!Number(x))
|
|
152
152
|
m = this.utcOffset(0, g);
|
|
@@ -168,21 +168,21 @@ var mt = { exports: {} };
|
|
|
168
168
|
var m = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
169
|
return b.call(m, p, g).tz(this.$x.$timezone, !0);
|
|
170
170
|
}, l.tz = function(p, g, m) {
|
|
171
|
-
var u = m && g, h = m || g ||
|
|
171
|
+
var u = m && g, h = m || g || s, k = v(+l(), h);
|
|
172
172
|
if (typeof p != "string")
|
|
173
173
|
return l(p).tz(h);
|
|
174
|
-
var _ = function(B,
|
|
175
|
-
var C = B - 60 *
|
|
176
|
-
if (
|
|
177
|
-
return [C,
|
|
178
|
-
var A = v(C -= 60 * (M -
|
|
174
|
+
var _ = function(B, L, d) {
|
|
175
|
+
var C = B - 60 * L * 1e3, M = v(C, d);
|
|
176
|
+
if (L === M)
|
|
177
|
+
return [C, L];
|
|
178
|
+
var A = v(C -= 60 * (M - L) * 1e3, d);
|
|
179
179
|
return M === A ? [C, M] : [B - 60 * Math.min(M, A) * 1e3, Math.max(M, A)];
|
|
180
180
|
}(l.utc(p, u).valueOf(), k, h), x = _[0], S = _[1], E = l(x).utcOffset(S);
|
|
181
181
|
return E.$x.$timezone = h, E;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
184
|
}, l.tz.setDefault = function(p) {
|
|
185
|
-
|
|
185
|
+
s = p;
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
});
|
|
@@ -289,10 +289,10 @@ async function qn(t, e) {
|
|
|
289
289
|
const l = ve();
|
|
290
290
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
291
291
|
}
|
|
292
|
-
let
|
|
293
|
-
await
|
|
292
|
+
let r = new Ee.Workbook();
|
|
293
|
+
await r.xlsx.load(t);
|
|
294
294
|
const o = {};
|
|
295
|
-
return
|
|
295
|
+
return r.eachSheet(function(l, s) {
|
|
296
296
|
const i = [];
|
|
297
297
|
l.eachRow(function(v, w) {
|
|
298
298
|
if (w > a) {
|
|
@@ -303,7 +303,7 @@ async function qn(t, e) {
|
|
|
303
303
|
}), p || i.push(b);
|
|
304
304
|
}
|
|
305
305
|
}), o[l._name] = i;
|
|
306
|
-
}),
|
|
306
|
+
}), r = null, o;
|
|
307
307
|
}
|
|
308
308
|
const gt = {
|
|
309
309
|
columnWidth: 30
|
|
@@ -311,12 +311,12 @@ const gt = {
|
|
|
311
311
|
async function An(t, e, n = [], a = {}) {
|
|
312
312
|
if (!t || !e)
|
|
313
313
|
return;
|
|
314
|
-
const { columnStyle:
|
|
314
|
+
const { columnStyle: r } = a, { columnWidth: o } = gt;
|
|
315
315
|
e.forEach((i) => {
|
|
316
316
|
i.width = i.width ? i.width : o;
|
|
317
317
|
});
|
|
318
|
-
const { workbook: l, worksheet:
|
|
319
|
-
|
|
318
|
+
const { workbook: l, worksheet: s } = Gt();
|
|
319
|
+
s.columns = e, s.addRows(n), r && await Jt(l, s, r);
|
|
320
320
|
try {
|
|
321
321
|
const i = await l.xlsx.writeBuffer(), v = new File([i], t, {
|
|
322
322
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
@@ -327,55 +327,55 @@ async function An(t, e, n = [], a = {}) {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
function Gt() {
|
|
330
|
-
const t = new
|
|
330
|
+
const t = new Ee.Workbook();
|
|
331
331
|
t.creator = "distributor System", t.lastModifiedBy = "distributor System", t.created = /* @__PURE__ */ new Date(), t.modified = /* @__PURE__ */ new Date(), t.lastPrinted = /* @__PURE__ */ new Date();
|
|
332
332
|
const e = t.addWorksheet("Sheet1");
|
|
333
333
|
return { workbook: t, worksheet: e };
|
|
334
334
|
}
|
|
335
335
|
async function Jt(t, e, n) {
|
|
336
336
|
const a = Object.keys(n);
|
|
337
|
-
for (const
|
|
338
|
-
const o = n[
|
|
337
|
+
for (const r of a) {
|
|
338
|
+
const o = n[r], { type: l } = o;
|
|
339
339
|
switch (l) {
|
|
340
340
|
case "IMG":
|
|
341
|
-
await Xt(t, e,
|
|
341
|
+
await Xt(t, e, r);
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
async function Xt(t, e, n, a) {
|
|
347
|
-
const
|
|
348
|
-
e.getColumn(n).width = 20, e.eachRow((l,
|
|
349
|
-
|
|
347
|
+
const r = e.getColumn(n), o = r.values;
|
|
348
|
+
e.getColumn(n).width = 20, e.eachRow((l, s) => {
|
|
349
|
+
s > 1 && (l.height = 40);
|
|
350
350
|
});
|
|
351
|
-
for (let l = 0,
|
|
351
|
+
for (let l = 0, s = o.length; l < s; l++) {
|
|
352
352
|
if (l < 2)
|
|
353
353
|
continue;
|
|
354
354
|
let i = o[l];
|
|
355
|
-
i && (e.getCell(
|
|
355
|
+
i && (e.getCell(r.letter + l).value = "", await Qt(t, e, i, {
|
|
356
356
|
width: 100,
|
|
357
357
|
height: 50,
|
|
358
|
-
col:
|
|
358
|
+
col: r._number - 1,
|
|
359
359
|
row: l - 1
|
|
360
360
|
}));
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function Qt(t, e, n, a) {
|
|
364
|
-
const { col:
|
|
364
|
+
const { col: r, row: o, width: l, height: s } = a, { success: i, base64: v } = await en(n, 0.3);
|
|
365
365
|
if (i) {
|
|
366
366
|
const w = t.addImage({
|
|
367
367
|
base64: v,
|
|
368
368
|
extension: "jpeg"
|
|
369
369
|
});
|
|
370
370
|
e.addImage(w, {
|
|
371
|
-
tl: { col:
|
|
372
|
-
ext: { width: l, height:
|
|
371
|
+
tl: { col: r, row: o },
|
|
372
|
+
ext: { width: l, height: s }
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
function en(t, e = 1) {
|
|
377
377
|
const n = new Image();
|
|
378
|
-
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((a,
|
|
378
|
+
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((a, r) => {
|
|
379
379
|
n.onload = () => {
|
|
380
380
|
const o = document.createElement("canvas");
|
|
381
381
|
o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, o.width, o.height), a({
|
|
@@ -395,16 +395,16 @@ async function tn(t, e) {
|
|
|
395
395
|
const l = ve();
|
|
396
396
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
397
397
|
}
|
|
398
|
-
let
|
|
399
|
-
await
|
|
398
|
+
let r = new Ee.Workbook();
|
|
399
|
+
await r.xlsx.load(t);
|
|
400
400
|
const o = {};
|
|
401
|
-
return
|
|
401
|
+
return r.eachSheet(function(l, s) {
|
|
402
402
|
if (l.state == "visible") {
|
|
403
403
|
const i = [], v = n[l._name];
|
|
404
404
|
if (v) {
|
|
405
405
|
let w = Object.values(v).some((p) => p.includes("image")), b = {};
|
|
406
406
|
w && (l.getImages().forEach((g) => {
|
|
407
|
-
const { tl: m } = g.range, u =
|
|
407
|
+
const { tl: m } = g.range, u = r.model.media.find((h) => h.index === g.imageId);
|
|
408
408
|
if (u) {
|
|
409
409
|
const h = u.buffer.toString("base64"), k = `data:image/${u.extension};base64,${h}`, _ = `${Math.ceil(m.row)}_${Math.ceil(m.col)}`;
|
|
410
410
|
b[_] ? b[_].push(k) : b[_] = [k];
|
|
@@ -418,24 +418,24 @@ async function tn(t, e) {
|
|
|
418
418
|
const x = p.getCell(k);
|
|
419
419
|
let S;
|
|
420
420
|
if (_ == "image" && w) {
|
|
421
|
-
const B = x._column._number,
|
|
422
|
-
S = b[
|
|
421
|
+
const B = x._column._number, L = `${g}_${B}`;
|
|
422
|
+
S = b[L] || "";
|
|
423
423
|
} else
|
|
424
|
-
x.result != null ? S = x.result : (E = x.value) != null && E.richText ? S = x.value.richText.reduce((B,
|
|
424
|
+
x.result != null ? S = x.result : (E = x.value) != null && E.richText ? S = x.value.richText.reduce((B, L) => B + L.text, "") : x.type == 4 && x.value ? S = ke(x.value).utc().format("YYYY-MM-DD HH:mm:ss") : S = x.value;
|
|
425
425
|
S && _ == "option" && (S = S.split(je)[1]), m[h] = S, S && (u = !1);
|
|
426
426
|
}), u || i.push(m);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
431
|
+
}), r = null, o;
|
|
432
432
|
}
|
|
433
433
|
async function nn(t, e) {
|
|
434
434
|
if (!t || e.length == 0)
|
|
435
435
|
return;
|
|
436
436
|
const n = on(e);
|
|
437
|
-
n.eachSheet(function(a,
|
|
438
|
-
const { columnWidth: o } = gt, { tableHeader: l, tableData:
|
|
437
|
+
n.eachSheet(function(a, r) {
|
|
438
|
+
const { columnWidth: o } = gt, { tableHeader: l, tableData: s } = e[a._name];
|
|
439
439
|
l.forEach((i) => {
|
|
440
440
|
if (i.required) {
|
|
441
441
|
const v = i.style || {}, { font: w = {} } = v;
|
|
@@ -449,7 +449,7 @@ async function nn(t, e) {
|
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
}), a.columns = l, a.addRows(
|
|
452
|
+
}), a.columns = l, a.addRows(s), l.forEach((i) => {
|
|
453
453
|
const { header: v, key: w, width: b, option: p } = i, g = a.getColumn(w);
|
|
454
454
|
if (g.width = b || o, p) {
|
|
455
455
|
const m = n.addWorksheet(w);
|
|
@@ -470,22 +470,22 @@ async function nn(t, e) {
|
|
|
470
470
|
});
|
|
471
471
|
});
|
|
472
472
|
try {
|
|
473
|
-
const a = await n.xlsx.writeBuffer(),
|
|
473
|
+
const a = await n.xlsx.writeBuffer(), r = new File([a], t, {
|
|
474
474
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
475
475
|
});
|
|
476
|
-
it(
|
|
476
|
+
it(r);
|
|
477
477
|
} catch (a) {
|
|
478
478
|
console.log(a);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
function on(t) {
|
|
482
|
-
const e = ve(), n = new
|
|
483
|
-
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(t).sort((
|
|
484
|
-
const l = t[
|
|
485
|
-
return l -
|
|
486
|
-
}).forEach((
|
|
487
|
-
let o =
|
|
488
|
-
/[\\/:*?\[\]]/g.test(
|
|
482
|
+
const e = ve(), n = new Ee.Workbook();
|
|
483
|
+
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(t).sort((r, o) => {
|
|
484
|
+
const l = t[r].sort ?? 0, s = t[o].sort ?? 0;
|
|
485
|
+
return l - s;
|
|
486
|
+
}).forEach((r) => {
|
|
487
|
+
let o = r, l = !1;
|
|
488
|
+
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), l = !0), r.length > 31 && (r = r.substring(0, 31).trim(), l = !0, console.warn(e("excel.sheetNameTooLong", [o, r]))), l && (t[r] = t[o], delete t[o]), n.addWorksheet(r);
|
|
489
489
|
}), n;
|
|
490
490
|
}
|
|
491
491
|
function ln(t) {
|
|
@@ -507,17 +507,17 @@ function Un(t) {
|
|
|
507
507
|
return JSON.parse(JSON.stringify(t));
|
|
508
508
|
}
|
|
509
509
|
function Pn(t) {
|
|
510
|
-
let e = [], n = {}, a = (
|
|
511
|
-
for (const
|
|
512
|
-
n[
|
|
513
|
-
...
|
|
510
|
+
let e = [], n = {}, a = (r, o) => Object.prototype.hasOwnProperty.call(r, o);
|
|
511
|
+
for (const r of t) {
|
|
512
|
+
n[r.id] = {
|
|
513
|
+
...r,
|
|
514
514
|
// 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
|
|
515
|
-
children: a(n,
|
|
515
|
+
children: a(n, r.id) ? n[r.id].children : []
|
|
516
516
|
};
|
|
517
|
-
const o = n[
|
|
518
|
-
|
|
517
|
+
const o = n[r.id];
|
|
518
|
+
r.pid == -1 ? e.push(o) : (a(n, r.pid) || (n[r.pid] = {
|
|
519
519
|
children: []
|
|
520
|
-
}), n[
|
|
520
|
+
}), n[r.pid].children.push(o));
|
|
521
521
|
}
|
|
522
522
|
return e;
|
|
523
523
|
}
|
|
@@ -536,8 +536,8 @@ class et {
|
|
|
536
536
|
getName(e) {
|
|
537
537
|
if (!this.has(e))
|
|
538
538
|
return "-";
|
|
539
|
-
const n = Ye().global.locale, { label: a, labelEn:
|
|
540
|
-
return (n.value == "zh_cn" ? a :
|
|
539
|
+
const n = Ye().global.locale, { label: a, labelEn: r } = this.map.get(e);
|
|
540
|
+
return (n.value == "zh_cn" ? a : r) || a || "-";
|
|
541
541
|
}
|
|
542
542
|
getTag(e) {
|
|
543
543
|
if (!this.has(e))
|
|
@@ -562,13 +562,13 @@ function Rn(t, e = [], n = "i18nName") {
|
|
|
562
562
|
if (t.length == 0)
|
|
563
563
|
return new et([]);
|
|
564
564
|
if (e.length < 2) {
|
|
565
|
-
const
|
|
566
|
-
throw new Error(
|
|
565
|
+
const r = ve();
|
|
566
|
+
throw new Error(r("tools.keysLengthError"));
|
|
567
567
|
}
|
|
568
|
-
let a = t.map((
|
|
568
|
+
let a = t.map((r) => {
|
|
569
569
|
let o = {};
|
|
570
|
-
return n && (o.labelEn =
|
|
571
|
-
|
|
570
|
+
return n && (o.labelEn = r[n]), e.forEach((l, s) => {
|
|
571
|
+
s === 0 ? o.label = r[l] : s === 1 ? o.value = r[l] : o[l] = r[l];
|
|
572
572
|
}), o;
|
|
573
573
|
});
|
|
574
574
|
return new et(a);
|
|
@@ -589,8 +589,8 @@ function Hn(t) {
|
|
|
589
589
|
function Nn(t) {
|
|
590
590
|
let e = {};
|
|
591
591
|
return t.map((n, a) => {
|
|
592
|
-
let { key:
|
|
593
|
-
o ? e[
|
|
592
|
+
let { key: r, option: o, type: l } = n, s = ln(a);
|
|
593
|
+
o ? e[r] = `${s}---option` : l === "image" ? e[r] = `${s}---image` : e[r] = s;
|
|
594
594
|
}), e;
|
|
595
595
|
}
|
|
596
596
|
function Wn(t, e) {
|
|
@@ -598,10 +598,10 @@ function Wn(t, e) {
|
|
|
598
598
|
}
|
|
599
599
|
const _e = (t, e) => {
|
|
600
600
|
const n = t.__vccOpts || t;
|
|
601
|
-
for (const [a,
|
|
602
|
-
n[a] =
|
|
601
|
+
for (const [a, r] of e)
|
|
602
|
+
n[a] = r;
|
|
603
603
|
return n;
|
|
604
|
-
}, an = ["onClick"],
|
|
604
|
+
}, an = ["onClick"], rn = {
|
|
605
605
|
__name: "index",
|
|
606
606
|
props: /* @__PURE__ */ Xe({
|
|
607
607
|
api: {
|
|
@@ -641,7 +641,7 @@ const _e = (t, e) => {
|
|
|
641
641
|
}),
|
|
642
642
|
emits: /* @__PURE__ */ Xe(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
643
643
|
setup(t, { emit: e }) {
|
|
644
|
-
const n = t, a =
|
|
644
|
+
const n = t, a = Lt(), { t: r, locale: o } = me(), l = Tt(t, "modelValue"), s = se(() => a["value-key"] != null), i = R(""), v = se(() => {
|
|
645
645
|
if (a.remote !== void 0)
|
|
646
646
|
return n.data;
|
|
647
647
|
const d = pt(i.value), { data: C, labelValue: M } = n, A = C || p.value;
|
|
@@ -657,7 +657,7 @@ const _e = (t, e) => {
|
|
|
657
657
|
(be) => ie[y].toLowerCase() == be.toLowerCase()
|
|
658
658
|
), pe;
|
|
659
659
|
});
|
|
660
|
-
}), w =
|
|
660
|
+
}), w = se({
|
|
661
661
|
get() {
|
|
662
662
|
return a.multiple == null || l.value == null ? !1 : l.value.length == v.value.length;
|
|
663
663
|
},
|
|
@@ -675,7 +675,7 @@ const _e = (t, e) => {
|
|
|
675
675
|
const u = n.labelValue.label.split("-"), h = (d) => {
|
|
676
676
|
if (u.length == 1) {
|
|
677
677
|
if (n.changeLocal)
|
|
678
|
-
return
|
|
678
|
+
return r(d[n.labelValue.label]);
|
|
679
679
|
let C = o.value == "en_us" ? d[n.labelValue.labelEn || "i18nName"] : d[n.labelValue.label];
|
|
680
680
|
return C = C || d[n.labelValue.label], C;
|
|
681
681
|
} else {
|
|
@@ -688,13 +688,13 @@ const _e = (t, e) => {
|
|
|
688
688
|
function k(d) {
|
|
689
689
|
let C = n.data ? n.data : p.value;
|
|
690
690
|
l.value = d ? C.map(
|
|
691
|
-
(M) =>
|
|
691
|
+
(M) => s.value ? M : M[n.labelValue.value]
|
|
692
692
|
) : [], Se(() => {
|
|
693
693
|
b("change", l.value), b("changeAll", l.value, C);
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
function _(d) {
|
|
697
|
-
n.optionClick && n.optionClick(d), b("change",
|
|
697
|
+
n.optionClick && n.optionClick(d), b("change", s.value ? d : d[n.labelValue.value]);
|
|
698
698
|
}
|
|
699
699
|
function x(d) {
|
|
700
700
|
return l.value.length >= n.maxLimit && !l.value.includes(d[n.labelValue.value]);
|
|
@@ -703,7 +703,7 @@ const _e = (t, e) => {
|
|
|
703
703
|
return d.map((C) => ({
|
|
704
704
|
...C,
|
|
705
705
|
label: h(C),
|
|
706
|
-
value:
|
|
706
|
+
value: s.value ? C : C[n.labelValue.value]
|
|
707
707
|
}));
|
|
708
708
|
}
|
|
709
709
|
const E = R([]), B = n.data ? n.data : p.value;
|
|
@@ -726,12 +726,12 @@ const _e = (t, e) => {
|
|
|
726
726
|
},
|
|
727
727
|
{ deep: !0 }
|
|
728
728
|
);
|
|
729
|
-
const
|
|
729
|
+
const L = se(() => E.value);
|
|
730
730
|
return (d, C) => {
|
|
731
731
|
const M = O("el-checkbox"), A = O("el-select-v2"), oe = O("el-option"), ue = O("el-select");
|
|
732
|
-
return K(a).v2 != null ? (
|
|
732
|
+
return K(a).v2 != null ? (I(), H(A, he({
|
|
733
733
|
key: 0,
|
|
734
|
-
options:
|
|
734
|
+
options: L.value,
|
|
735
735
|
modelValue: l.value,
|
|
736
736
|
"onUpdate:modelValue": C[1] || (C[1] = (y) => l.value = y)
|
|
737
737
|
}, K(a), {
|
|
@@ -768,7 +768,7 @@ const _e = (t, e) => {
|
|
|
768
768
|
]),
|
|
769
769
|
key: "0"
|
|
770
770
|
} : void 0
|
|
771
|
-
]), 1040, ["options", "modelValue"])) : (
|
|
771
|
+
]), 1040, ["options", "modelValue"])) : (I(), H(ue, he({
|
|
772
772
|
key: 1,
|
|
773
773
|
modelValue: l.value,
|
|
774
774
|
"onUpdate:modelValue": C[3] || (C[3] = (y) => l.value = y),
|
|
@@ -792,19 +792,19 @@ const _e = (t, e) => {
|
|
|
792
792
|
_: 1
|
|
793
793
|
}, 8, ["modelValue"])
|
|
794
794
|
], !0) : ce("", !0),
|
|
795
|
-
(
|
|
795
|
+
(I(!0), re(Oe, null, rt(v.value, (y, ge) => (I(), H(oe, {
|
|
796
796
|
key: ge,
|
|
797
797
|
label: h(y),
|
|
798
798
|
disabled: K(a).multiple != null && t.maxLimit > 0 ? x(y) : !1,
|
|
799
|
-
onClick:
|
|
800
|
-
value:
|
|
799
|
+
onClick: Me((ie) => _(y), ["stop"]),
|
|
800
|
+
value: s.value ? y : y[t.labelValue.value]
|
|
801
801
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
802
802
|
]),
|
|
803
803
|
_: 3
|
|
804
804
|
}, 16, ["modelValue", "filter-method", "onClear"]));
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
},
|
|
807
|
+
}, sn = /* @__PURE__ */ _e(rn, [["__scopeId", "data-v-d12f3c20"]]);
|
|
808
808
|
const cn = ot({
|
|
809
809
|
props: {
|
|
810
810
|
name: {
|
|
@@ -813,11 +813,11 @@ const cn = ot({
|
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
});
|
|
816
|
-
function un(t, e, n, a,
|
|
816
|
+
function un(t, e, n, a, r, o) {
|
|
817
817
|
const l = O("el-icon");
|
|
818
|
-
return
|
|
818
|
+
return I(), H(l, { class: "cmp-icon" }, {
|
|
819
819
|
default: D(() => [
|
|
820
|
-
(
|
|
820
|
+
(I(), H(st(t.name)))
|
|
821
821
|
]),
|
|
822
822
|
_: 1
|
|
823
823
|
});
|
|
@@ -829,24 +829,22 @@ const yt = /* @__PURE__ */ _e(cn, [["render", un], ["__scopeId", "data-v-733f9da
|
|
|
829
829
|
const n = e, a = Re(() => {
|
|
830
830
|
n("ok");
|
|
831
831
|
}, 500);
|
|
832
|
-
function
|
|
832
|
+
function r() {
|
|
833
833
|
n("no");
|
|
834
834
|
}
|
|
835
835
|
return (o, l) => {
|
|
836
|
-
const
|
|
837
|
-
return
|
|
838
|
-
|
|
839
|
-
}, [
|
|
840
|
-
z(r, he(o.$attrs, {
|
|
836
|
+
const s = O("el-popconfirm");
|
|
837
|
+
return I(), re("span", null, [
|
|
838
|
+
z(s, he(o.$attrs, {
|
|
841
839
|
onConfirm: K(a),
|
|
842
|
-
onCancel:
|
|
840
|
+
onCancel: r
|
|
843
841
|
}), {
|
|
844
842
|
reference: D(() => [
|
|
845
843
|
X(o.$slots, "default")
|
|
846
844
|
]),
|
|
847
845
|
_: 3
|
|
848
846
|
}, 16, ["onConfirm"])
|
|
849
|
-
]
|
|
847
|
+
]);
|
|
850
848
|
};
|
|
851
849
|
}
|
|
852
850
|
};
|
|
@@ -868,26 +866,26 @@ const dn = ["accept"], fn = {
|
|
|
868
866
|
},
|
|
869
867
|
emits: ["fileChange"],
|
|
870
868
|
setup(t, { emit: e }) {
|
|
871
|
-
const n = t, a = R(null),
|
|
869
|
+
const n = t, a = R(null), r = R(!1);
|
|
872
870
|
async function o(l) {
|
|
873
|
-
|
|
874
|
-
let
|
|
875
|
-
const i = await tn(
|
|
876
|
-
|
|
871
|
+
r.value = !0;
|
|
872
|
+
let s = l.target.files[0];
|
|
873
|
+
const i = await tn(s, n.fields).catch(() => {
|
|
874
|
+
r.value = !1;
|
|
877
875
|
}).finally(() => {
|
|
878
876
|
a.value.value = null;
|
|
879
877
|
});
|
|
880
878
|
await n.fileChange(i).finally(() => {
|
|
881
|
-
|
|
879
|
+
r.value = !1;
|
|
882
880
|
});
|
|
883
881
|
}
|
|
884
|
-
return (l,
|
|
882
|
+
return (l, s) => {
|
|
885
883
|
const i = O("el-button");
|
|
886
|
-
return
|
|
884
|
+
return I(), re("span", null, [
|
|
887
885
|
z(i, {
|
|
888
|
-
loading:
|
|
886
|
+
loading: r.value,
|
|
889
887
|
class: "mgr10",
|
|
890
|
-
onClick:
|
|
888
|
+
onClick: s[0] || (s[0] = (v) => a.value.click())
|
|
891
889
|
}, {
|
|
892
890
|
default: D(() => [
|
|
893
891
|
Q(J(l.$t("dao-ru")), 1)
|
|
@@ -909,15 +907,15 @@ const dn = ["accept"], fn = {
|
|
|
909
907
|
function Ue(t) {
|
|
910
908
|
let e = {};
|
|
911
909
|
return t.forEach((n) => {
|
|
912
|
-
const { key: a, type:
|
|
910
|
+
const { key: a, type: r, option: o = {}, value: l, dateType: s = "date" } = n;
|
|
913
911
|
if (a)
|
|
914
|
-
if (
|
|
912
|
+
if (r == "input" && (o != null && o.multiple))
|
|
915
913
|
e[a] = pt(l);
|
|
916
|
-
else if (
|
|
917
|
-
if (
|
|
914
|
+
else if (r == "date")
|
|
915
|
+
if (s.includes("range")) {
|
|
918
916
|
const [i, v] = a;
|
|
919
917
|
let [w, b] = l || [];
|
|
920
|
-
w &&
|
|
918
|
+
w && s == "daterange" && (w = ke(w).format("YYYY-MM-DD 00:00:00"), b = ke(b).format("YYYY-MM-DD 23:59:59")), e[i] = w, e[v] = b;
|
|
921
919
|
} else
|
|
922
920
|
e[a] = l;
|
|
923
921
|
else
|
|
@@ -934,18 +932,18 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
934
932
|
},
|
|
935
933
|
emits: ["confirm", "reset", "visibleChange"],
|
|
936
934
|
setup(t, { expose: e, emit: n }) {
|
|
937
|
-
const a = t,
|
|
935
|
+
const a = t, r = n, o = R(!0), l = R(null), { t: s } = me(), i = se(() => o.value ? s("guan-bi") : s("zhan-kai"));
|
|
938
936
|
function v() {
|
|
939
|
-
|
|
937
|
+
r("confirm");
|
|
940
938
|
}
|
|
941
939
|
function w(h) {
|
|
942
|
-
h.option.onClear && h.option.onClear(),
|
|
940
|
+
h.option.onClear && h.option.onClear(), r("confirm");
|
|
943
941
|
}
|
|
944
942
|
function b() {
|
|
945
|
-
|
|
943
|
+
r("reset");
|
|
946
944
|
}
|
|
947
945
|
function p() {
|
|
948
|
-
|
|
946
|
+
r("confirm");
|
|
949
947
|
}
|
|
950
948
|
function g() {
|
|
951
949
|
return Ue(a.form.items);
|
|
@@ -958,8 +956,8 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
958
956
|
});
|
|
959
957
|
}
|
|
960
958
|
return e({ getPrm: g, reset: u }), (h, k) => {
|
|
961
|
-
const _ = O("el-input"), x = O("el-date-picker"), S = O("el-form-item"), E = O("el-form"), B = O("el-link"),
|
|
962
|
-
return
|
|
959
|
+
const _ = O("el-input"), x = O("el-date-picker"), S = O("el-form-item"), E = O("el-form"), B = O("el-link"), L = O("el-button");
|
|
960
|
+
return I(), re("div", {
|
|
963
961
|
class: "searchBar-container mgt10 mgb10",
|
|
964
962
|
onKeydown: Dt(v, ["enter"])
|
|
965
963
|
}, [
|
|
@@ -972,25 +970,25 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
972
970
|
model: t.form.data
|
|
973
971
|
}, {
|
|
974
972
|
default: D(() => [
|
|
975
|
-
(
|
|
973
|
+
(I(!0), re(Oe, null, rt(t.form.items.filter((d) => !d.hidden), (d) => (I(), re(Oe, {
|
|
976
974
|
key: d.key
|
|
977
975
|
}, [
|
|
978
|
-
d.type == "br" ? (
|
|
976
|
+
d.type == "br" ? (I(), re("br", hn)) : (I(), H(S, {
|
|
979
977
|
key: 1,
|
|
980
978
|
label: d.name
|
|
981
979
|
}, {
|
|
982
980
|
default: D(() => {
|
|
983
981
|
var C, M;
|
|
984
982
|
return [
|
|
985
|
-
d.type === "input" ? (
|
|
983
|
+
d.type === "input" ? (I(), H(_, {
|
|
986
984
|
key: 0,
|
|
987
985
|
modelValue: d.value,
|
|
988
986
|
"onUpdate:modelValue": (A) => d.value = A,
|
|
989
|
-
class:
|
|
987
|
+
class: Ve(((C = d.option) == null ? void 0 : C.class) || "w150"),
|
|
990
988
|
placeholder: h.$t("qing-shu-ru"),
|
|
991
989
|
clearable: ""
|
|
992
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (
|
|
993
|
-
d.type === "select" ? (
|
|
990
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (I(), H(st(d.render), { key: 1 })) : ce("", !0),
|
|
991
|
+
d.type === "select" ? (I(), H(sn, he({
|
|
994
992
|
key: 2,
|
|
995
993
|
class: ((M = d.option) == null ? void 0 : M.class) || "w150",
|
|
996
994
|
modelValue: d.value,
|
|
@@ -999,9 +997,9 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
999
997
|
onChange: v,
|
|
1000
998
|
onClear: (A) => w(d)
|
|
1001
999
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
|
|
1002
|
-
d.type === "date" ? (
|
|
1000
|
+
d.type === "date" ? (I(), H(x, {
|
|
1003
1001
|
key: 3,
|
|
1004
|
-
class:
|
|
1002
|
+
class: Ve({ datetimerange: "w300", daterange: "w200" }[d.dateType] || "w100"),
|
|
1005
1003
|
modelValue: d.value,
|
|
1006
1004
|
"onUpdate:modelValue": (A) => d.value = A,
|
|
1007
1005
|
"value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[d.dateType] || "YYYY-MM-DD",
|
|
@@ -1030,7 +1028,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1030
1028
|
underline: "never",
|
|
1031
1029
|
class: "mgr10",
|
|
1032
1030
|
onClick: k[0] || (k[0] = () => {
|
|
1033
|
-
|
|
1031
|
+
r("visibleChange", !o.value), o.value = !o.value;
|
|
1034
1032
|
})
|
|
1035
1033
|
}, {
|
|
1036
1034
|
default: D(() => [
|
|
@@ -1041,7 +1039,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1041
1039
|
]),
|
|
1042
1040
|
_: 1
|
|
1043
1041
|
}),
|
|
1044
|
-
z(
|
|
1042
|
+
z(L, {
|
|
1045
1043
|
type: "primary",
|
|
1046
1044
|
onClick: v
|
|
1047
1045
|
}, {
|
|
@@ -1050,7 +1048,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1050
1048
|
]),
|
|
1051
1049
|
_: 1
|
|
1052
1050
|
}),
|
|
1053
|
-
z(
|
|
1051
|
+
z(L, {
|
|
1054
1052
|
type: "primary",
|
|
1055
1053
|
onClick: b
|
|
1056
1054
|
}, {
|
|
@@ -1149,10 +1147,10 @@ const wn = { class: "center" }, Cn = {
|
|
|
1149
1147
|
}
|
|
1150
1148
|
},
|
|
1151
1149
|
setup(t, { expose: e }) {
|
|
1152
|
-
const { t: n, locale: a } = me(),
|
|
1153
|
-
l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []);
|
|
1154
|
-
const v =
|
|
1155
|
-
const f =
|
|
1150
|
+
const { t: n, locale: a } = me(), r = jt(), o = bn(), l = t, s = R(!1), i = R([]);
|
|
1151
|
+
console.log("globalConfig", o), console.log("props.searchForm", l.searchForm), l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []), console.log("props.searchForm-2", l.searchForm);
|
|
1152
|
+
const v = se(() => {
|
|
1153
|
+
const f = r.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1156
1154
|
return l.id ? `listPageId-${f}-${l.id}` : `listPageId-${f}`;
|
|
1157
1155
|
}), w = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, p = l.searchForm.pageSizeKey || o.pageSizeKey, g = $e({
|
|
1158
1156
|
[b]: 1,
|
|
@@ -1174,7 +1172,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1174
1172
|
if (!f || !f.$el)
|
|
1175
1173
|
return !1;
|
|
1176
1174
|
const c = f.$el;
|
|
1177
|
-
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown",
|
|
1175
|
+
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Ie), c.addEventListener("mousedown", ie), c.addEventListener("mousemove", pe), c.addEventListener("mouseup", be), c.addEventListener("keydown", Ie), !0;
|
|
1178
1176
|
};
|
|
1179
1177
|
lt(() => {
|
|
1180
1178
|
k(), window.addEventListener("resize", _), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
|
|
@@ -1190,17 +1188,17 @@ const wn = { class: "center" }, Cn = {
|
|
|
1190
1188
|
const f = m.value;
|
|
1191
1189
|
if (f && f.$el) {
|
|
1192
1190
|
const c = f.$el;
|
|
1193
|
-
c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown",
|
|
1191
|
+
c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Ie);
|
|
1194
1192
|
}
|
|
1195
1193
|
}
|
|
1196
1194
|
});
|
|
1197
|
-
const S =
|
|
1195
|
+
const S = se(() => ue.value.height || h.value);
|
|
1198
1196
|
let E;
|
|
1199
1197
|
async function B(f) {
|
|
1200
1198
|
const { dataFormat: c } = l.tableConfig;
|
|
1201
|
-
f[b] != 1 && (f.nextSearchAfter = E),
|
|
1199
|
+
f[b] != 1 && (f.nextSearchAfter = E), s.value = !0;
|
|
1202
1200
|
const { code: $, data: T = {} } = await l.api(f).finally(() => {
|
|
1203
|
-
|
|
1201
|
+
s.value = !1, l.searchForm.selections = [];
|
|
1204
1202
|
});
|
|
1205
1203
|
if ($ == 200) {
|
|
1206
1204
|
let U = [];
|
|
@@ -1222,18 +1220,23 @@ const wn = { class: "center" }, Cn = {
|
|
|
1222
1220
|
});
|
|
1223
1221
|
}
|
|
1224
1222
|
}
|
|
1225
|
-
function
|
|
1223
|
+
function L(f = {}) {
|
|
1226
1224
|
const { searchData: c = () => ({}) } = l.tableConfig, $ = c();
|
|
1227
|
-
B({
|
|
1225
|
+
B({
|
|
1226
|
+
...g,
|
|
1227
|
+
...Ue(l.searchForm.items),
|
|
1228
|
+
...f,
|
|
1229
|
+
...$
|
|
1230
|
+
});
|
|
1228
1231
|
}
|
|
1229
1232
|
function d() {
|
|
1230
1233
|
const { reset: f } = l.tableConfig;
|
|
1231
1234
|
f && f(), l.searchForm.items.forEach((c) => {
|
|
1232
1235
|
const $ = w.find((T) => Qe(c.key) && Qe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
|
|
1233
1236
|
$ && (c.value = $.value);
|
|
1234
|
-
}),
|
|
1237
|
+
}), L();
|
|
1235
1238
|
}
|
|
1236
|
-
l.api && l.immediate &&
|
|
1239
|
+
l.api && l.immediate && L();
|
|
1237
1240
|
function C() {
|
|
1238
1241
|
return { ...g, ...Ue(l.searchForm.items) };
|
|
1239
1242
|
}
|
|
@@ -1246,7 +1249,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1246
1249
|
drag: !0,
|
|
1247
1250
|
resizable: !0,
|
|
1248
1251
|
maxFixedSize: 0
|
|
1249
|
-
}), ue =
|
|
1252
|
+
}), ue = se(() => {
|
|
1250
1253
|
const { customConfig: f, columnConfig: c, ...$ } = l.tableConfig;
|
|
1251
1254
|
return {
|
|
1252
1255
|
headerAlign: "left",
|
|
@@ -1293,24 +1296,24 @@ const wn = { class: "center" }, Cn = {
|
|
|
1293
1296
|
return null;
|
|
1294
1297
|
let V = -1;
|
|
1295
1298
|
const le = c.getAttribute("data-colid");
|
|
1296
|
-
if (le && (V = T.getColumns().findIndex((
|
|
1297
|
-
const
|
|
1299
|
+
if (le && (V = T.getColumns().findIndex((F) => F.id === le)), V < 0) {
|
|
1300
|
+
const F = Array.from($.querySelectorAll(".vxe-body--column")).indexOf(c), Y = !!c.closest(".vxe-table--fixed-left-wrapper"), Z = !!c.closest(".vxe-table--fixed-right-wrapper"), P = T.getColumns();
|
|
1298
1301
|
if (Y) {
|
|
1299
1302
|
const G = P.filter((N) => N.fixed === "left");
|
|
1300
|
-
|
|
1303
|
+
F < G.length && (V = P.indexOf(G[F]));
|
|
1301
1304
|
} else if (Z) {
|
|
1302
1305
|
const G = P.filter((N) => N.fixed === "right");
|
|
1303
|
-
|
|
1306
|
+
F < G.length && (V = P.indexOf(G[F]));
|
|
1304
1307
|
} else {
|
|
1305
1308
|
const G = l.searchForm.showCheckBox ? 1 : 0;
|
|
1306
|
-
V = P.filter((ee) => ee.fixed === "left").length +
|
|
1309
|
+
V = P.filter((ee) => ee.fixed === "left").length + F - G;
|
|
1307
1310
|
}
|
|
1308
1311
|
}
|
|
1309
1312
|
return V < 0 ? null : { rowIndex: U, colIndex: V, cell: c };
|
|
1310
1313
|
}, ie = (f) => {
|
|
1311
1314
|
const c = ge(f.target);
|
|
1312
1315
|
if (!c) {
|
|
1313
|
-
|
|
1316
|
+
Fe();
|
|
1314
1317
|
return;
|
|
1315
1318
|
}
|
|
1316
1319
|
y.isSelecting = !0, y.startCell = {
|
|
@@ -1327,7 +1330,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1327
1330
|
}, Ke(), He());
|
|
1328
1331
|
}, be = () => {
|
|
1329
1332
|
y.isSelecting = !1;
|
|
1330
|
-
},
|
|
1333
|
+
}, Fe = () => {
|
|
1331
1334
|
y.selectedCells = [], y.startCell = null, y.endCell = null;
|
|
1332
1335
|
const f = m.value;
|
|
1333
1336
|
if (!f)
|
|
@@ -1351,10 +1354,10 @@ const wn = { class: "center" }, Cn = {
|
|
|
1351
1354
|
const f = y.startCell.rowIndex, c = y.endCell.rowIndex, $ = y.startCell.colIndex, T = y.endCell.colIndex, U = Math.min(f, c), W = Math.max(f, c), V = Math.min($, T), le = Math.max($, T);
|
|
1352
1355
|
y.selectedCells = [];
|
|
1353
1356
|
for (let q = U; q <= W; q++)
|
|
1354
|
-
for (let
|
|
1357
|
+
for (let F = V; F <= le; F++)
|
|
1355
1358
|
y.selectedCells.push({
|
|
1356
1359
|
rowIndex: q,
|
|
1357
|
-
colIndex:
|
|
1360
|
+
colIndex: F
|
|
1358
1361
|
});
|
|
1359
1362
|
}, He = () => {
|
|
1360
1363
|
Se(() => {
|
|
@@ -1374,7 +1377,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1374
1377
|
);
|
|
1375
1378
|
}), y.selectedCells.length === 0)
|
|
1376
1379
|
return;
|
|
1377
|
-
const $ = f.getColumns(), T = y.selectedCells.map((Y) => Y.rowIndex), U = y.selectedCells.map((Y) => Y.colIndex), W = Math.min(...T), V = Math.max(...T), le = Math.min(...U), q = Math.max(...U),
|
|
1380
|
+
const $ = f.getColumns(), T = y.selectedCells.map((Y) => Y.rowIndex), U = y.selectedCells.map((Y) => Y.colIndex), W = Math.min(...T), V = Math.max(...T), le = Math.min(...U), q = Math.max(...U), F = [
|
|
1378
1381
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1379
1382
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1380
1383
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
@@ -1384,7 +1387,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1384
1387
|
if (!P)
|
|
1385
1388
|
return;
|
|
1386
1389
|
const G = P.fixed === "left", N = P.fixed === "right";
|
|
1387
|
-
for (const ee of
|
|
1390
|
+
for (const ee of F) {
|
|
1388
1391
|
const we = ee.querySelectorAll(".vxe-body--row")[Y];
|
|
1389
1392
|
if (!we)
|
|
1390
1393
|
continue;
|
|
@@ -1397,7 +1400,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1397
1400
|
const te = $.filter((ne) => ne.fixed === "right").indexOf(P);
|
|
1398
1401
|
j = de[te];
|
|
1399
1402
|
} else if (!G && !N && ee.closest(".vxe-table--body-wrapper")) {
|
|
1400
|
-
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((
|
|
1403
|
+
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Le) => Le.fixed === "left").length, ne = Z - te;
|
|
1401
1404
|
j = de[ne + fe];
|
|
1402
1405
|
}
|
|
1403
1406
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
@@ -1414,20 +1417,20 @@ const wn = { class: "center" }, Cn = {
|
|
|
1414
1417
|
if (!f)
|
|
1415
1418
|
return;
|
|
1416
1419
|
const c = f.$el, $ = f.getColumns(), T = [...new Set(y.selectedCells.map((q) => q.rowIndex))].sort(
|
|
1417
|
-
(q,
|
|
1420
|
+
(q, F) => q - F
|
|
1418
1421
|
), U = [...new Set(y.selectedCells.map((q) => q.colIndex))].sort(
|
|
1419
|
-
(q,
|
|
1422
|
+
(q, F) => q - F
|
|
1420
1423
|
), W = [
|
|
1421
1424
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1422
1425
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1423
1426
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1424
1427
|
].filter(Boolean), V = [];
|
|
1425
1428
|
T.forEach((q) => {
|
|
1426
|
-
const
|
|
1429
|
+
const F = [];
|
|
1427
1430
|
U.forEach((Y) => {
|
|
1428
1431
|
const Z = $[Y];
|
|
1429
1432
|
if (!Z) {
|
|
1430
|
-
|
|
1433
|
+
F.push("");
|
|
1431
1434
|
return;
|
|
1432
1435
|
}
|
|
1433
1436
|
const P = Z.fixed === "left", G = Z.fixed === "right";
|
|
@@ -1445,7 +1448,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1445
1448
|
const te = $.filter((ne) => ne.fixed === "right").indexOf(Z);
|
|
1446
1449
|
j = de[te];
|
|
1447
1450
|
} else if (!P && !G && ee.closest(".vxe-table--body-wrapper")) {
|
|
1448
|
-
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((
|
|
1451
|
+
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Le) => Le.fixed === "left").length, ne = Y - te;
|
|
1449
1452
|
j = de[ne + fe];
|
|
1450
1453
|
}
|
|
1451
1454
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
@@ -1453,8 +1456,8 @@ const wn = { class: "center" }, Cn = {
|
|
|
1453
1456
|
break;
|
|
1454
1457
|
}
|
|
1455
1458
|
}
|
|
1456
|
-
|
|
1457
|
-
}), V.push(
|
|
1459
|
+
F.push(N);
|
|
1460
|
+
}), V.push(F.join(" "));
|
|
1458
1461
|
});
|
|
1459
1462
|
const le = V.join(`
|
|
1460
1463
|
`);
|
|
@@ -1463,19 +1466,19 @@ const wn = { class: "center" }, Cn = {
|
|
|
1463
1466
|
} catch (q) {
|
|
1464
1467
|
console.error("复制失败:", q);
|
|
1465
1468
|
}
|
|
1466
|
-
},
|
|
1467
|
-
l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? y.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" &&
|
|
1469
|
+
}, Ie = (f) => {
|
|
1470
|
+
l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? y.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" && Fe());
|
|
1468
1471
|
}, Ne = () => {
|
|
1469
1472
|
y.isSelecting = !1;
|
|
1470
1473
|
}, We = (f) => {
|
|
1471
1474
|
const c = m.value;
|
|
1472
1475
|
if (!c || !c.$el)
|
|
1473
1476
|
return;
|
|
1474
|
-
c.$el.contains(f.target) ||
|
|
1477
|
+
c.$el.contains(f.target) || Fe();
|
|
1475
1478
|
}, Ct = (f) => {
|
|
1476
|
-
g[b] = f,
|
|
1479
|
+
g[b] = f, L();
|
|
1477
1480
|
}, xt = (f) => {
|
|
1478
|
-
g[p] = f, g[b] = 1,
|
|
1481
|
+
g[p] = f, g[b] = 1, L();
|
|
1479
1482
|
};
|
|
1480
1483
|
function Ze() {
|
|
1481
1484
|
const f = m.value.getCheckboxRecords();
|
|
@@ -1489,17 +1492,17 @@ const wn = { class: "center" }, Cn = {
|
|
|
1489
1492
|
l.searchForm.selections = $;
|
|
1490
1493
|
}
|
|
1491
1494
|
};
|
|
1492
|
-
return e({ tableRef: m, getList:
|
|
1495
|
+
return e({ tableRef: m, getList: L, getPrm: C, clearSort: M, calculateTableHeight: k }), (f, c) => {
|
|
1493
1496
|
var q;
|
|
1494
1497
|
const $ = O("el-button"), T = O("el-checkbox"), U = O("el-text"), W = O("vxe-column"), V = O("VxeTable"), le = O("el-pagination");
|
|
1495
|
-
return
|
|
1496
|
-
class:
|
|
1498
|
+
return I(), re("div", {
|
|
1499
|
+
class: Ve({ box: t.searchForm.showShadow })
|
|
1497
1500
|
}, [
|
|
1498
|
-
t.searchForm.showSearch ? (
|
|
1501
|
+
t.searchForm.showSearch ? (I(), H(vn, {
|
|
1499
1502
|
key: 0,
|
|
1500
1503
|
form: t.searchForm,
|
|
1501
1504
|
onReset: d,
|
|
1502
|
-
onConfirm: c[1] || (c[1] = (
|
|
1505
|
+
onConfirm: c[1] || (c[1] = (F) => L()),
|
|
1503
1506
|
onVisibleChange: K(k)
|
|
1504
1507
|
}, {
|
|
1505
1508
|
btn: D(() => [
|
|
@@ -1508,7 +1511,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1508
1511
|
z($, {
|
|
1509
1512
|
class: "mgl10",
|
|
1510
1513
|
round: "",
|
|
1511
|
-
onClick: c[0] || (c[0] = (
|
|
1514
|
+
onClick: c[0] || (c[0] = (F) => m.value.openCustom())
|
|
1512
1515
|
}, {
|
|
1513
1516
|
default: D(() => [
|
|
1514
1517
|
z(yt, { name: "Tools" })
|
|
@@ -1527,7 +1530,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1527
1530
|
id: v.value,
|
|
1528
1531
|
ref_key: "tableRef",
|
|
1529
1532
|
ref: m,
|
|
1530
|
-
loading: t.loading ||
|
|
1533
|
+
loading: t.loading || s.value,
|
|
1531
1534
|
data: t.api ? i.value : t.data,
|
|
1532
1535
|
border: ""
|
|
1533
1536
|
}, ue.value, {
|
|
@@ -1537,34 +1540,34 @@ const wn = { class: "center" }, Cn = {
|
|
|
1537
1540
|
onSortChange: (q = ue.value["sort-config"]) == null ? void 0 : q.sortChange
|
|
1538
1541
|
}), {
|
|
1539
1542
|
default: D(() => [
|
|
1540
|
-
t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (
|
|
1543
|
+
t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (I(), H(W, {
|
|
1541
1544
|
key: 0,
|
|
1542
1545
|
type: "checkbox",
|
|
1543
1546
|
width: K(a) == "zh_cn" ? 80 : 150,
|
|
1544
1547
|
title: f.$t("xu-hao"),
|
|
1545
1548
|
fixed: "left"
|
|
1546
1549
|
}, {
|
|
1547
|
-
checkbox: D(({ rowIndex:
|
|
1550
|
+
checkbox: D(({ rowIndex: F, row: Y, checked: Z, disabled: P, indeterminate: G }) => [
|
|
1548
1551
|
ae("div", wn, [
|
|
1549
|
-
Z ? (
|
|
1552
|
+
Z ? (I(), H(T, {
|
|
1550
1553
|
key: 0,
|
|
1551
1554
|
checked: !0,
|
|
1552
1555
|
disabled: P,
|
|
1553
1556
|
size: "default",
|
|
1554
|
-
onClick:
|
|
1555
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1557
|
+
onClick: Me((N) => !P && Ge(Y), ["stop"])
|
|
1558
|
+
}, null, 8, ["disabled", "onClick"])) : (I(), H(T, {
|
|
1556
1559
|
key: 1,
|
|
1557
1560
|
disabled: P,
|
|
1558
1561
|
checked: !1,
|
|
1559
1562
|
size: "default",
|
|
1560
|
-
onClick:
|
|
1563
|
+
onClick: Me((N) => !P && Ge(Y), ["stop"])
|
|
1561
1564
|
}, null, 8, ["disabled", "onClick"])),
|
|
1562
1565
|
z(U, {
|
|
1563
1566
|
type: "info",
|
|
1564
1567
|
class: "mgl5"
|
|
1565
1568
|
}, {
|
|
1566
1569
|
default: D(() => [
|
|
1567
|
-
Q(J(
|
|
1570
|
+
Q(J(F + 1), 1)
|
|
1568
1571
|
]),
|
|
1569
1572
|
_: 2
|
|
1570
1573
|
}, 1024)
|
|
@@ -1577,10 +1580,10 @@ const wn = { class: "center" }, Cn = {
|
|
|
1577
1580
|
_: 3
|
|
1578
1581
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1579
1582
|
], 512),
|
|
1580
|
-
t.searchForm.showPage ? (
|
|
1583
|
+
t.searchForm.showPage ? (I(), H(le, {
|
|
1581
1584
|
key: 1,
|
|
1582
1585
|
"current-page": g[K(b)],
|
|
1583
|
-
"onUpdate:currentPage": c[2] || (c[2] = (
|
|
1586
|
+
"onUpdate:currentPage": c[2] || (c[2] = (F) => g[K(b)] = F),
|
|
1584
1587
|
class: "myPagination mgt10",
|
|
1585
1588
|
background: "",
|
|
1586
1589
|
layout: "total, sizes, prev, pager, next",
|
|
@@ -1593,7 +1596,7 @@ const wn = { class: "center" }, Cn = {
|
|
|
1593
1596
|
], 2);
|
|
1594
1597
|
};
|
|
1595
1598
|
}
|
|
1596
|
-
}, Qn = /* @__PURE__ */ _e(Cn, [["__scopeId", "data-v-
|
|
1599
|
+
}, Qn = /* @__PURE__ */ _e(Cn, [["__scopeId", "data-v-175693fb"]]), eo = {
|
|
1597
1600
|
__name: "index",
|
|
1598
1601
|
props: {
|
|
1599
1602
|
sheetsConfig: {
|
|
@@ -1610,9 +1613,9 @@ const wn = { class: "center" }, Cn = {
|
|
|
1610
1613
|
function n() {
|
|
1611
1614
|
nn(e.fileName, e.sheetsConfig);
|
|
1612
1615
|
}
|
|
1613
|
-
return (a,
|
|
1616
|
+
return (a, r) => {
|
|
1614
1617
|
const o = O("el-link");
|
|
1615
|
-
return
|
|
1618
|
+
return I(), H(o, he({
|
|
1616
1619
|
type: "primary",
|
|
1617
1620
|
underline: "never"
|
|
1618
1621
|
}, a.$attrs, { onClick: n }), {
|
|
@@ -1641,7 +1644,7 @@ async function tt(t) {
|
|
|
1641
1644
|
return;
|
|
1642
1645
|
const n = t.querySelector(".el-dialog__header"), a = t.querySelector(".el-overlay");
|
|
1643
1646
|
a.style.cssText += "overflow: hidden;", n.style.cursor = "move";
|
|
1644
|
-
let
|
|
1647
|
+
let r = !1, o = {
|
|
1645
1648
|
// 数据源,不变部分为:window信息、dialog信息、mouse初始值信息,可变部分为:拖拽坐标位移
|
|
1646
1649
|
window: {
|
|
1647
1650
|
// window信息
|
|
@@ -1669,9 +1672,9 @@ async function tt(t) {
|
|
|
1669
1672
|
};
|
|
1670
1673
|
n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", w), window.addEventListener("resize", b);
|
|
1671
1674
|
function l() {
|
|
1672
|
-
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height),
|
|
1675
|
+
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height), s();
|
|
1673
1676
|
}
|
|
1674
|
-
function
|
|
1677
|
+
function s() {
|
|
1675
1678
|
let g = o.drag.y - o.mouse.y + o.dialog.y, m = o.drag.x - o.mouse.x + o.dialog.x;
|
|
1676
1679
|
e.style.cssText += `position: absolute; top: calc(${g}px - ${o.dialog.marginTop}); left: ${m}px;`;
|
|
1677
1680
|
}
|
|
@@ -1682,16 +1685,16 @@ async function tt(t) {
|
|
|
1682
1685
|
}, o.dialog = e.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(e).marginTop, o.mouse = {
|
|
1683
1686
|
x: g.clientX,
|
|
1684
1687
|
y: g.clientY
|
|
1685
|
-
},
|
|
1688
|
+
}, r = !0);
|
|
1686
1689
|
}
|
|
1687
1690
|
function v(g) {
|
|
1688
|
-
|
|
1691
|
+
r && (o.drag = {
|
|
1689
1692
|
x: g.clientX,
|
|
1690
1693
|
y: g.clientY
|
|
1691
1694
|
}, a.style.userSelect = "none", l());
|
|
1692
1695
|
}
|
|
1693
1696
|
function w(g) {
|
|
1694
|
-
a.style.userSelect = "auto",
|
|
1697
|
+
a.style.userSelect = "auto", r = !1;
|
|
1695
1698
|
}
|
|
1696
1699
|
function b(g) {
|
|
1697
1700
|
}
|
|
@@ -1730,20 +1733,20 @@ const kn = {
|
|
|
1730
1733
|
},
|
|
1731
1734
|
emits: ["confirm"],
|
|
1732
1735
|
setup(t, { emit: e }) {
|
|
1733
|
-
const n = t, a = e, { t:
|
|
1736
|
+
const n = t, a = e, { t: r } = me(), o = Re(() => {
|
|
1734
1737
|
a("confirm");
|
|
1735
1738
|
}, 300);
|
|
1736
1739
|
async function l() {
|
|
1737
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Et.confirm(
|
|
1738
|
-
confirmButtonText:
|
|
1739
|
-
cancelButtonText:
|
|
1740
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Et.confirm(r("que-ding-guan-bi-ma"), {
|
|
1741
|
+
confirmButtonText: r("que-ding"),
|
|
1742
|
+
cancelButtonText: r("qu-xiao"),
|
|
1740
1743
|
type: "warning"
|
|
1741
1744
|
}).catch(() => {
|
|
1742
1745
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1743
1746
|
}
|
|
1744
|
-
return (
|
|
1747
|
+
return (s, i) => {
|
|
1745
1748
|
const v = O("el-button"), w = O("el-drawer"), b = O("el-dialog");
|
|
1746
|
-
return t.layer.type ? (
|
|
1749
|
+
return t.layer.type ? (I(), H(w, {
|
|
1747
1750
|
key: 0,
|
|
1748
1751
|
modelValue: t.layer.show,
|
|
1749
1752
|
"onUpdate:modelValue": i[0] || (i[0] = (p) => t.layer.show = p),
|
|
@@ -1755,13 +1758,13 @@ const kn = {
|
|
|
1755
1758
|
class: "drawer-content"
|
|
1756
1759
|
}, {
|
|
1757
1760
|
default: D(() => [
|
|
1758
|
-
X(
|
|
1761
|
+
X(s.$slots, "default"),
|
|
1759
1762
|
i[2] || (i[2] = ae("p", { class: "mgt50" }, null, -1)),
|
|
1760
|
-
t.layer.showButton ? (
|
|
1761
|
-
X(
|
|
1763
|
+
t.layer.showButton ? (I(), re("div", kn, [
|
|
1764
|
+
X(s.$slots, "btn", {}, () => [
|
|
1762
1765
|
z(v, { onClick: l }, {
|
|
1763
1766
|
default: D(() => [
|
|
1764
|
-
Q(J(
|
|
1767
|
+
Q(J(s.$t("qu-xiao")), 1)
|
|
1765
1768
|
]),
|
|
1766
1769
|
_: 1
|
|
1767
1770
|
}),
|
|
@@ -1771,7 +1774,7 @@ const kn = {
|
|
|
1771
1774
|
onClick: K(o)
|
|
1772
1775
|
}, {
|
|
1773
1776
|
default: D(() => [
|
|
1774
|
-
Q(J(
|
|
1777
|
+
Q(J(s.$t("ti-jiao")), 1)
|
|
1775
1778
|
]),
|
|
1776
1779
|
_: 1
|
|
1777
1780
|
}, 8, ["loading", "onClick"])
|
|
@@ -1779,7 +1782,7 @@ const kn = {
|
|
|
1779
1782
|
])) : ce("", !0)
|
|
1780
1783
|
]),
|
|
1781
1784
|
_: 3
|
|
1782
|
-
}, 8, ["modelValue", "size", "title"])) : Vt((
|
|
1785
|
+
}, 8, ["modelValue", "size", "title"])) : Vt((I(), re("div", _n, [
|
|
1783
1786
|
z(b, {
|
|
1784
1787
|
"close-on-click-modal": !1,
|
|
1785
1788
|
modelValue: t.layer.show,
|
|
@@ -1789,17 +1792,17 @@ const kn = {
|
|
|
1789
1792
|
center: ""
|
|
1790
1793
|
}, at({
|
|
1791
1794
|
default: D(() => [
|
|
1792
|
-
X(
|
|
1795
|
+
X(s.$slots, "default")
|
|
1793
1796
|
]),
|
|
1794
1797
|
_: 2
|
|
1795
1798
|
}, [
|
|
1796
1799
|
t.layer.showButton ? {
|
|
1797
1800
|
name: "footer",
|
|
1798
1801
|
fn: D(() => [
|
|
1799
|
-
X(
|
|
1802
|
+
X(s.$slots, "btn", {}, () => [
|
|
1800
1803
|
z(v, { onClick: l }, {
|
|
1801
1804
|
default: D(() => [
|
|
1802
|
-
Q(J(
|
|
1805
|
+
Q(J(s.$t("qu-xiao")), 1)
|
|
1803
1806
|
]),
|
|
1804
1807
|
_: 1
|
|
1805
1808
|
}),
|
|
@@ -1808,7 +1811,7 @@ const kn = {
|
|
|
1808
1811
|
onClick: K(o)
|
|
1809
1812
|
}, {
|
|
1810
1813
|
default: D(() => [
|
|
1811
|
-
Q(J(
|
|
1814
|
+
Q(J(s.$t("ti-jiao")), 1)
|
|
1812
1815
|
]),
|
|
1813
1816
|
_: 1
|
|
1814
1817
|
}, 8, ["onClick"])
|
|
@@ -1828,18 +1831,18 @@ function no(t, e = {}) {
|
|
|
1828
1831
|
inForm: !0,
|
|
1829
1832
|
required: !0,
|
|
1830
1833
|
...e
|
|
1831
|
-
},
|
|
1834
|
+
}, r = {
|
|
1832
1835
|
phone: /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
|
|
1833
1836
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1834
1837
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1835
|
-
}[t], { inForm: o, value: l, required:
|
|
1838
|
+
}[t], { inForm: o, value: l, required: s, msg: i = n("validate.invalidInput") } = a;
|
|
1836
1839
|
return o ? function(v, w, b) {
|
|
1837
|
-
if (
|
|
1838
|
-
|
|
1840
|
+
if (s) {
|
|
1841
|
+
r.test(w) ? b() : b(new Error(i));
|
|
1839
1842
|
return;
|
|
1840
1843
|
}
|
|
1841
|
-
w && !
|
|
1842
|
-
} :
|
|
1844
|
+
w && !r.test(w) ? b(new Error(i)) : b();
|
|
1845
|
+
} : r.test(l);
|
|
1843
1846
|
}
|
|
1844
1847
|
class oo {
|
|
1845
1848
|
constructor(e = {}) {
|
|
@@ -1988,10 +1991,10 @@ class oo {
|
|
|
1988
1991
|
};
|
|
1989
1992
|
a.headers.appId = this.config.clientCode, this.token && (a.headers.Authorization = `Bearer ${this.token}`);
|
|
1990
1993
|
try {
|
|
1991
|
-
const
|
|
1992
|
-
return
|
|
1993
|
-
} catch (
|
|
1994
|
-
throw this.log("请求失败:",
|
|
1994
|
+
const r = await fetch(e, a);
|
|
1995
|
+
return r.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : r;
|
|
1996
|
+
} catch (r) {
|
|
1997
|
+
throw this.log("请求失败:", r), r;
|
|
1995
1998
|
}
|
|
1996
1999
|
}
|
|
1997
2000
|
/**
|
|
@@ -2054,52 +2057,52 @@ function lo(t, e = {}) {
|
|
|
2054
2057
|
log: !1,
|
|
2055
2058
|
params: null,
|
|
2056
2059
|
format: null
|
|
2057
|
-
}, e), { manual:
|
|
2060
|
+
}, e), { manual: r, log: o, params: l = {}, cb: s, format: i } = a, v = R([]), w = R(!1), b = (p) => {
|
|
2058
2061
|
const g = p || l;
|
|
2059
2062
|
w.value = !0, t(g).then((m) => {
|
|
2060
2063
|
const { code: u, data: h, msg: k } = m;
|
|
2061
|
-
if (
|
|
2064
|
+
if (s) {
|
|
2062
2065
|
const { records: _, rows: x } = h || {}, S = _ || x ? _ || x : h;
|
|
2063
|
-
v.value =
|
|
2066
|
+
v.value = De(S, i), s(m);
|
|
2064
2067
|
}
|
|
2065
2068
|
if (h) {
|
|
2066
2069
|
if (h.records != null || h.rows != null) {
|
|
2067
2070
|
const { records: _, rows: x, total: S = 0 } = h || {};
|
|
2068
|
-
g && g.total != null && (l.total = parseInt(S)), v.value =
|
|
2071
|
+
g && g.total != null && (l.total = parseInt(S)), v.value = De(_ || x || [], i);
|
|
2069
2072
|
} else
|
|
2070
|
-
v.value =
|
|
2073
|
+
v.value = De(h, i);
|
|
2071
2074
|
o && console.log("useRequest-res", v.value);
|
|
2072
2075
|
}
|
|
2073
2076
|
}).catch((m) => {
|
|
2074
|
-
|
|
2077
|
+
s && (console.log("useRequestErr", m), s({ code: 500 }));
|
|
2075
2078
|
}).finally(() => {
|
|
2076
2079
|
w.value = !1;
|
|
2077
2080
|
});
|
|
2078
2081
|
};
|
|
2079
|
-
return
|
|
2082
|
+
return r || b(), [w, v, b];
|
|
2080
2083
|
}
|
|
2081
2084
|
function ao(t) {
|
|
2082
2085
|
const e = R(t), n = R(""), a = R("");
|
|
2083
|
-
return Pe(e, (
|
|
2084
|
-
const o =
|
|
2086
|
+
return Pe(e, (r) => {
|
|
2087
|
+
const o = r || ["", ""];
|
|
2085
2088
|
n.value = o[0], a.value = o[1];
|
|
2086
2089
|
}), [e, n, a];
|
|
2087
2090
|
}
|
|
2088
|
-
function
|
|
2091
|
+
function ro(t) {
|
|
2089
2092
|
return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
|
|
2090
2093
|
}
|
|
2091
|
-
function
|
|
2094
|
+
function De(t, e) {
|
|
2092
2095
|
if (!e)
|
|
2093
2096
|
return t;
|
|
2094
2097
|
if (t instanceof Array)
|
|
2095
2098
|
return t.map((a) => {
|
|
2096
|
-
let
|
|
2097
|
-
return e.forEach((o) =>
|
|
2099
|
+
let r = {};
|
|
2100
|
+
return e.forEach((o) => r[o] = a[o]), r;
|
|
2098
2101
|
});
|
|
2099
2102
|
let n = {};
|
|
2100
2103
|
return e.forEach((a) => n[a] = t[a]), n;
|
|
2101
2104
|
}
|
|
2102
|
-
function
|
|
2105
|
+
function so(t, e = []) {
|
|
2103
2106
|
const { locale: n } = me(), a = R(t());
|
|
2104
2107
|
return Pe(
|
|
2105
2108
|
[n, ...e],
|
|
@@ -2128,19 +2131,19 @@ function fo(t, e) {
|
|
|
2128
2131
|
return typeof t == "string" && t.length > 0 && (n = Be(t).mapActions), $n(e, n);
|
|
2129
2132
|
}
|
|
2130
2133
|
function bt(t, e) {
|
|
2131
|
-
const n = ut(), a = e(t),
|
|
2134
|
+
const n = ut(), a = e(t), r = {};
|
|
2132
2135
|
return Object.keys(a).forEach((o) => {
|
|
2133
2136
|
const l = a[o].bind({ $store: n });
|
|
2134
|
-
|
|
2135
|
-
}),
|
|
2137
|
+
r[o] = se(l);
|
|
2138
|
+
}), r;
|
|
2136
2139
|
}
|
|
2137
2140
|
function $n(t, e) {
|
|
2138
|
-
const n = ut(), a = e(t),
|
|
2141
|
+
const n = ut(), a = e(t), r = {};
|
|
2139
2142
|
return Object.keys(a).forEach((o) => {
|
|
2140
|
-
|
|
2141
|
-
}),
|
|
2143
|
+
r[o] = a[o].bind({ $store: n });
|
|
2144
|
+
}), r;
|
|
2142
2145
|
}
|
|
2143
|
-
function
|
|
2146
|
+
function ze(t) {
|
|
2144
2147
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !qt(t);
|
|
2145
2148
|
}
|
|
2146
2149
|
function ho() {
|
|
@@ -2152,21 +2155,21 @@ function ho() {
|
|
|
2152
2155
|
return "-";
|
|
2153
2156
|
const a = e.row[e.column.field];
|
|
2154
2157
|
if (t.type == "tag") {
|
|
2155
|
-
let
|
|
2158
|
+
let r;
|
|
2156
2159
|
return z(O("el-text"), {
|
|
2157
2160
|
type: t.enum.getTag(a)
|
|
2158
|
-
},
|
|
2159
|
-
default: () => [
|
|
2161
|
+
}, ze(r = t.enum.getName(a)) ? r : {
|
|
2162
|
+
default: () => [r]
|
|
2160
2163
|
});
|
|
2161
2164
|
}
|
|
2162
|
-
return z(O("el-text"), null,
|
|
2165
|
+
return z(O("el-text"), null, ze(n = t.enum.getName(a)) ? n : {
|
|
2163
2166
|
default: () => [n]
|
|
2164
2167
|
});
|
|
2165
2168
|
}
|
|
2166
2169
|
}), Ce.renderer.add("InputNumber", {
|
|
2167
2170
|
// 默认显示模板
|
|
2168
2171
|
renderTableDefault(t, e) {
|
|
2169
|
-
return z(
|
|
2172
|
+
return z(Ft, he({
|
|
2170
2173
|
modelValue: e.row[e.column.field],
|
|
2171
2174
|
"onUpdate:modelValue": (n) => e.row[e.column.field] = n
|
|
2172
2175
|
}, t.props, {
|
|
@@ -2181,7 +2184,7 @@ function ho() {
|
|
|
2181
2184
|
locale: n
|
|
2182
2185
|
} = me();
|
|
2183
2186
|
let a = n.value == "zh_cn";
|
|
2184
|
-
return z(
|
|
2187
|
+
return z(It, {
|
|
2185
2188
|
type: e.row[e.column.field] ? "success" : "danger"
|
|
2186
2189
|
}, {
|
|
2187
2190
|
default: () => [e.row[e.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2199,13 +2202,13 @@ function ho() {
|
|
|
2199
2202
|
}), Ce.renderer.add("Link", {
|
|
2200
2203
|
// 默认显示模板
|
|
2201
2204
|
renderTableDefault(t, e) {
|
|
2202
|
-
var
|
|
2205
|
+
var s;
|
|
2203
2206
|
let n = e.column.field;
|
|
2204
2207
|
const a = Ut(), {
|
|
2205
|
-
multiple:
|
|
2208
|
+
multiple: r,
|
|
2206
2209
|
to: o
|
|
2207
2210
|
} = t;
|
|
2208
|
-
if (!
|
|
2211
|
+
if (!r)
|
|
2209
2212
|
return z(Je, {
|
|
2210
2213
|
underline: "never",
|
|
2211
2214
|
type: "primary",
|
|
@@ -2218,7 +2221,7 @@ function ho() {
|
|
|
2218
2221
|
}, {
|
|
2219
2222
|
default: () => [e.row[n]]
|
|
2220
2223
|
});
|
|
2221
|
-
const l = ((
|
|
2224
|
+
const l = ((s = e.row[n]) == null ? void 0 : s.split(",")) || [];
|
|
2222
2225
|
return l.map((i, v) => z("span", null, [z(Je, {
|
|
2223
2226
|
underline: "never",
|
|
2224
2227
|
type: "primary",
|
|
@@ -2228,14 +2231,14 @@ function ho() {
|
|
|
2228
2231
|
[n]: i
|
|
2229
2232
|
}
|
|
2230
2233
|
})
|
|
2231
|
-
},
|
|
2234
|
+
}, ze(i) ? i : {
|
|
2232
2235
|
default: () => [i]
|
|
2233
2236
|
}), v < l.length - 1 ? "," : ""]));
|
|
2234
2237
|
}
|
|
2235
2238
|
});
|
|
2236
2239
|
}
|
|
2237
2240
|
export {
|
|
2238
|
-
|
|
2241
|
+
sn as CmpDictionary,
|
|
2239
2242
|
yt as CmpIcon,
|
|
2240
2243
|
Zn as ConfrimButton,
|
|
2241
2244
|
eo as DownExcelTemp,
|
|
@@ -2247,7 +2250,7 @@ export {
|
|
|
2247
2250
|
vn as SearchBar,
|
|
2248
2251
|
et as StatusMap,
|
|
2249
2252
|
Un as _toRaw,
|
|
2250
|
-
|
|
2253
|
+
ro as _typeOf,
|
|
2251
2254
|
Rn as arrToStatusMap,
|
|
2252
2255
|
Pn as arrayToTree,
|
|
2253
2256
|
Kn as checkFileSize,
|
|
@@ -2274,7 +2277,7 @@ export {
|
|
|
2274
2277
|
fo as useActions,
|
|
2275
2278
|
ao as useDatePicker,
|
|
2276
2279
|
uo as useGetters,
|
|
2277
|
-
|
|
2280
|
+
so as useI18nReState,
|
|
2278
2281
|
lo as useRequest,
|
|
2279
2282
|
co as useState,
|
|
2280
2283
|
qe as zh_cn
|