joy-admin-components 0.1.54 → 0.1.55
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 +197 -197
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { createNamespacedHelpers as Ue, useStore as lt, mapState as Vt, mapGette
|
|
|
10
10
|
import { VxeUI as Ce } from "vxe-pc-ui";
|
|
11
11
|
const $n = Je({
|
|
12
12
|
name: "LayOutForm",
|
|
13
|
-
setup(n, { slots: e, attrs: t, emit:
|
|
13
|
+
setup(n, { slots: e, attrs: t, emit: l }) {
|
|
14
14
|
const a = q(null), r = () => e.default ? e.default().filter((u) => u.type !== Symbol.for("v-cmt")).map((u) => u.type === Symbol.for("v-fgt") ? u.children : u).flat().map(
|
|
15
15
|
(u) => {
|
|
16
16
|
var d;
|
|
@@ -24,16 +24,16 @@ const $n = Je({
|
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
26
|
Qe(() => {
|
|
27
|
-
|
|
27
|
+
l("ref", a.value);
|
|
28
28
|
});
|
|
29
|
-
function
|
|
29
|
+
function o() {
|
|
30
30
|
return Le(
|
|
31
31
|
bt,
|
|
32
32
|
{ ...t, ref: a },
|
|
33
33
|
() => Le(yt, { gutter: t.gutter ?? 20 }, { default: () => r() })
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
return
|
|
36
|
+
return o;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
var at = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -42,15 +42,15 @@ function rt(n) {
|
|
|
42
42
|
}
|
|
43
43
|
var st = { exports: {} };
|
|
44
44
|
(function(n, e) {
|
|
45
|
-
(function(t,
|
|
46
|
-
n.exports =
|
|
45
|
+
(function(t, l) {
|
|
46
|
+
n.exports = l();
|
|
47
47
|
})(at, function() {
|
|
48
|
-
var t = "minute",
|
|
49
|
-
return function(r,
|
|
50
|
-
var d =
|
|
48
|
+
var t = "minute", l = /[+-]\d\d(?::?\d\d)?/g, a = /([+-]|\d\d)/g;
|
|
49
|
+
return function(r, o, u) {
|
|
50
|
+
var d = o.prototype;
|
|
51
51
|
u.utc = function(f) {
|
|
52
52
|
var h = { date: f, utc: !0, args: arguments };
|
|
53
|
-
return new
|
|
53
|
+
return new o(h);
|
|
54
54
|
}, d.utc = function(f) {
|
|
55
55
|
var h = u(this.toDate(), { locale: this.$L, utc: !0 });
|
|
56
56
|
return f ? h.add(this.utcOffset(), t) : h;
|
|
@@ -76,7 +76,7 @@ var st = { exports: {} };
|
|
|
76
76
|
return this.$u ? 0 : _(this.$offset) ? C.call(this) : this.$offset;
|
|
77
77
|
if (typeof f == "string" && (f = function(I) {
|
|
78
78
|
I === void 0 && (I = "");
|
|
79
|
-
var W = I.match(
|
|
79
|
+
var W = I.match(l);
|
|
80
80
|
if (!W)
|
|
81
81
|
return null;
|
|
82
82
|
var M = ("" + W[0]).match(a) || ["-", 0, 0], i = M[0], p = 60 * +M[1] + +M[2];
|
|
@@ -124,17 +124,17 @@ var Pt = st.exports;
|
|
|
124
124
|
const Ut = /* @__PURE__ */ rt(Pt);
|
|
125
125
|
var it = { exports: {} };
|
|
126
126
|
(function(n, e) {
|
|
127
|
-
(function(t,
|
|
128
|
-
n.exports =
|
|
127
|
+
(function(t, l) {
|
|
128
|
+
n.exports = l();
|
|
129
129
|
})(at, function() {
|
|
130
|
-
var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 },
|
|
131
|
-
return function(a, r,
|
|
130
|
+
var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, l = {};
|
|
131
|
+
return function(a, r, o) {
|
|
132
132
|
var u, d = function(v, b, g) {
|
|
133
133
|
g === void 0 && (g = {});
|
|
134
134
|
var f = new Date(v), h = function(_, w) {
|
|
135
135
|
w === void 0 && (w = {});
|
|
136
|
-
var S = w.timeZoneName || "short", z = _ + "|" + S, I =
|
|
137
|
-
return I || (I = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: _, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: S }),
|
|
136
|
+
var S = w.timeZoneName || "short", z = _ + "|" + S, I = l[z];
|
|
137
|
+
return I || (I = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: _, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: S }), l[z] = I), I;
|
|
138
138
|
}(b, g);
|
|
139
139
|
return h.formatToParts(f);
|
|
140
140
|
}, k = function(v, b) {
|
|
@@ -143,20 +143,20 @@ var it = { exports: {} };
|
|
|
143
143
|
z >= 0 && (f[z] = parseInt(S, 10));
|
|
144
144
|
}
|
|
145
145
|
var I = f[3], W = I === 24 ? 0 : I, M = f[0] + "-" + f[1] + "-" + f[2] + " " + W + ":" + f[4] + ":" + f[5] + ":000", i = +v;
|
|
146
|
-
return (
|
|
146
|
+
return (o.utc(M).valueOf() - (i -= i % 1e3)) / 6e4;
|
|
147
147
|
}, x = r.prototype;
|
|
148
148
|
x.tz = function(v, b) {
|
|
149
149
|
v === void 0 && (v = u);
|
|
150
150
|
var g, f = this.utcOffset(), h = this.toDate(), _ = h.toLocaleString("en-US", { timeZone: v }), w = Math.round((h - new Date(_)) / 1e3 / 60), S = 15 * -Math.round(h.getTimezoneOffset() / 15) - w;
|
|
151
151
|
if (!Number(S))
|
|
152
152
|
g = this.utcOffset(0, b);
|
|
153
|
-
else if (g =
|
|
153
|
+
else if (g = o(_, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(S, !0), b) {
|
|
154
154
|
var z = g.utcOffset();
|
|
155
155
|
g = g.add(f - z, "minute");
|
|
156
156
|
}
|
|
157
157
|
return g.$x.$timezone = v, g;
|
|
158
158
|
}, x.offsetName = function(v) {
|
|
159
|
-
var b = this.$x.$timezone ||
|
|
159
|
+
var b = this.$x.$timezone || o.tz.guess(), g = d(this.valueOf(), b, { timeZoneName: v }).find(function(f) {
|
|
160
160
|
return f.type.toLowerCase() === "timezonename";
|
|
161
161
|
});
|
|
162
162
|
return g && g.value;
|
|
@@ -165,23 +165,23 @@ var it = { exports: {} };
|
|
|
165
165
|
x.startOf = function(v, b) {
|
|
166
166
|
if (!this.$x || !this.$x.$timezone)
|
|
167
167
|
return C.call(this, v, b);
|
|
168
|
-
var g =
|
|
168
|
+
var g = o(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
169
|
return C.call(g, v, b).tz(this.$x.$timezone, !0);
|
|
170
|
-
},
|
|
171
|
-
var f = g && b, h = g || b || u, _ = k(+
|
|
170
|
+
}, o.tz = function(v, b, g) {
|
|
171
|
+
var f = g && b, h = g || b || u, _ = k(+o(), h);
|
|
172
172
|
if (typeof v != "string")
|
|
173
|
-
return
|
|
173
|
+
return o(v).tz(h);
|
|
174
174
|
var w = function(W, M, i) {
|
|
175
175
|
var p = W - 60 * M * 1e3, L = k(p, i);
|
|
176
176
|
if (M === L)
|
|
177
177
|
return [p, M];
|
|
178
178
|
var O = k(p -= 60 * (L - M) * 1e3, i);
|
|
179
179
|
return L === O ? [p, L] : [W - 60 * Math.min(L, O) * 1e3, Math.max(L, O)];
|
|
180
|
-
}(
|
|
180
|
+
}(o.utc(v, f).valueOf(), _, h), S = w[0], z = w[1], I = o(S).utcOffset(z);
|
|
181
181
|
return I.$x.$timezone = h, I;
|
|
182
|
-
},
|
|
182
|
+
}, o.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
|
-
},
|
|
184
|
+
}, o.tz.setDefault = function(v) {
|
|
185
185
|
u = v;
|
|
186
186
|
};
|
|
187
187
|
};
|
|
@@ -274,41 +274,41 @@ function Re() {
|
|
|
274
274
|
Se.extend(Ut);
|
|
275
275
|
Se.extend(jt);
|
|
276
276
|
async function In(n, e) {
|
|
277
|
-
const { fields: t, range:
|
|
277
|
+
const { fields: t, range: l = 1 } = e;
|
|
278
278
|
if (!t) {
|
|
279
|
-
const
|
|
280
|
-
throw new Error(
|
|
279
|
+
const o = Re();
|
|
280
|
+
throw new Error(o("excel.fieldsMappingRequired"));
|
|
281
281
|
}
|
|
282
282
|
let a = new tt.Workbook();
|
|
283
283
|
await a.xlsx.load(n);
|
|
284
284
|
const r = {};
|
|
285
|
-
return a.eachSheet(function(
|
|
285
|
+
return a.eachSheet(function(o, u) {
|
|
286
286
|
const d = [];
|
|
287
|
-
|
|
288
|
-
if (x >
|
|
287
|
+
o.eachRow(function(k, x) {
|
|
288
|
+
if (x > l) {
|
|
289
289
|
let C = {}, v = !0;
|
|
290
290
|
Object.keys(t).forEach((b) => {
|
|
291
291
|
const g = k.getCell(t[b]).value;
|
|
292
292
|
C[b] = g, g && (v = !1);
|
|
293
293
|
}), v || d.push(C);
|
|
294
294
|
}
|
|
295
|
-
}), r[
|
|
295
|
+
}), r[o._name] = d;
|
|
296
296
|
}), a = null, r;
|
|
297
297
|
}
|
|
298
298
|
const Yt = {
|
|
299
299
|
columnWidth: 30
|
|
300
300
|
};
|
|
301
|
-
async function Kt(n, e, t = [],
|
|
301
|
+
async function Kt(n, e, t = [], l = {}) {
|
|
302
302
|
if (!n || !e)
|
|
303
303
|
return;
|
|
304
|
-
const { columnStyle: a } =
|
|
304
|
+
const { columnStyle: a } = l, { columnWidth: r } = Yt;
|
|
305
305
|
e.forEach((d) => {
|
|
306
306
|
d.width = d.width ? d.width : r;
|
|
307
307
|
});
|
|
308
|
-
const { workbook:
|
|
309
|
-
u.columns = e, u.addRows(t), a && await Nt(
|
|
308
|
+
const { workbook: o, worksheet: u } = Ht();
|
|
309
|
+
u.columns = e, u.addRows(t), a && await Nt(o, u, a);
|
|
310
310
|
try {
|
|
311
|
-
const d = await
|
|
311
|
+
const d = await o.xlsx.writeBuffer(), k = new File([d], n, {
|
|
312
312
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
313
313
|
});
|
|
314
314
|
Et(k);
|
|
@@ -323,35 +323,35 @@ function Ht() {
|
|
|
323
323
|
return { workbook: n, worksheet: e };
|
|
324
324
|
}
|
|
325
325
|
async function Nt(n, e, t) {
|
|
326
|
-
const
|
|
327
|
-
for (const a of
|
|
328
|
-
const r = t[a], { type:
|
|
329
|
-
switch (
|
|
326
|
+
const l = Object.keys(t);
|
|
327
|
+
for (const a of l) {
|
|
328
|
+
const r = t[a], { type: o } = r;
|
|
329
|
+
switch (o) {
|
|
330
330
|
case "IMG":
|
|
331
331
|
await Zt(n, e, a);
|
|
332
332
|
break;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
async function Zt(n, e, t,
|
|
336
|
+
async function Zt(n, e, t, l) {
|
|
337
337
|
const a = e.getColumn(t), r = a.values;
|
|
338
|
-
e.getColumn(t).width = 20, e.eachRow((
|
|
339
|
-
u > 1 && (
|
|
338
|
+
e.getColumn(t).width = 20, e.eachRow((o, u) => {
|
|
339
|
+
u > 1 && (o.height = 40);
|
|
340
340
|
});
|
|
341
|
-
for (let
|
|
342
|
-
if (
|
|
341
|
+
for (let o = 0, u = r.length; o < u; o++) {
|
|
342
|
+
if (o < 2)
|
|
343
343
|
continue;
|
|
344
|
-
let d = r[
|
|
345
|
-
d && (e.getCell(a.letter +
|
|
344
|
+
let d = r[o];
|
|
345
|
+
d && (e.getCell(a.letter + o).value = "", await Gt(n, e, d, {
|
|
346
346
|
width: 100,
|
|
347
347
|
height: 50,
|
|
348
348
|
col: a._number - 1,
|
|
349
|
-
row:
|
|
349
|
+
row: o - 1
|
|
350
350
|
}));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
async function Gt(n, e, t,
|
|
354
|
-
const { col: a, row: r, width:
|
|
353
|
+
async function Gt(n, e, t, l) {
|
|
354
|
+
const { col: a, row: r, width: o, height: u } = l, { success: d, base64: k } = await Wt(t, 0.3);
|
|
355
355
|
if (d) {
|
|
356
356
|
const x = n.addImage({
|
|
357
357
|
base64: k,
|
|
@@ -359,22 +359,22 @@ async function Gt(n, e, t, o) {
|
|
|
359
359
|
});
|
|
360
360
|
e.addImage(x, {
|
|
361
361
|
tl: { col: a, row: r },
|
|
362
|
-
ext: { width:
|
|
362
|
+
ext: { width: o, height: u }
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
function Wt(n, e = 1) {
|
|
367
367
|
const t = new Image();
|
|
368
|
-
return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((
|
|
368
|
+
return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((l, a) => {
|
|
369
369
|
t.onload = () => {
|
|
370
370
|
const r = document.createElement("canvas");
|
|
371
|
-
r.width = t.width, r.height = t.height, r.getContext("2d").drawImage(t, 0, 0, r.width, r.height),
|
|
371
|
+
r.width = t.width, r.height = t.height, r.getContext("2d").drawImage(t, 0, 0, r.width, r.height), l({
|
|
372
372
|
success: !0,
|
|
373
373
|
//canvas.toDataURL的方法将图片的绝对路径转换为base64编码
|
|
374
374
|
base64: r.toDataURL("image/jpeg", e)
|
|
375
375
|
});
|
|
376
376
|
}, t.onerror = () => {
|
|
377
|
-
|
|
377
|
+
l({ success: !1 });
|
|
378
378
|
};
|
|
379
379
|
});
|
|
380
380
|
}
|
|
@@ -397,15 +397,15 @@ function Ln(n) {
|
|
|
397
397
|
return JSON.parse(JSON.stringify(n));
|
|
398
398
|
}
|
|
399
399
|
function Tn(n) {
|
|
400
|
-
let e = [], t = {},
|
|
400
|
+
let e = [], t = {}, l = (a, r) => Object.prototype.hasOwnProperty.call(a, r);
|
|
401
401
|
for (const a of n) {
|
|
402
402
|
t[a.id] = {
|
|
403
403
|
...a,
|
|
404
404
|
// 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
|
|
405
|
-
children:
|
|
405
|
+
children: l(t, a.id) ? t[a.id].children : []
|
|
406
406
|
};
|
|
407
407
|
const r = t[a.id];
|
|
408
|
-
a.pid == -1 ? e.push(r) : (
|
|
408
|
+
a.pid == -1 ? e.push(r) : (l(t, a.pid) || (t[a.pid] = {
|
|
409
409
|
children: []
|
|
410
410
|
}), t[a.pid].children.push(r));
|
|
411
411
|
}
|
|
@@ -417,21 +417,21 @@ function ut(n, e = " ") {
|
|
|
417
417
|
class We {
|
|
418
418
|
constructor(e, t = ["label", "value", "labelEn"]) {
|
|
419
419
|
this.list = e, this.map = new Map(
|
|
420
|
-
e.map((
|
|
420
|
+
e.map((l) => {
|
|
421
421
|
let a = {
|
|
422
|
-
...
|
|
423
|
-
label:
|
|
424
|
-
value:
|
|
422
|
+
...l,
|
|
423
|
+
label: l[t[0]],
|
|
424
|
+
value: l[t[1]]
|
|
425
425
|
};
|
|
426
|
-
return t[2] && (a.labelEn =
|
|
426
|
+
return t[2] && (a.labelEn = l[t[2]]), [l[t[1]], a];
|
|
427
427
|
})
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
getName(e, t) {
|
|
431
431
|
if (!this.has(e))
|
|
432
432
|
return "-";
|
|
433
|
-
const { label:
|
|
434
|
-
return (t == "zh_cn" ?
|
|
433
|
+
const { label: l, labelEn: a } = this.map.get(e);
|
|
434
|
+
return (t == "zh_cn" ? l : a) || l || "-";
|
|
435
435
|
}
|
|
436
436
|
getTag(e) {
|
|
437
437
|
if (!this.has(e))
|
|
@@ -459,13 +459,13 @@ function En(n, e = [], t = "i18nName") {
|
|
|
459
459
|
const a = Re();
|
|
460
460
|
throw new Error(a("tools.keysLengthError"));
|
|
461
461
|
}
|
|
462
|
-
let
|
|
462
|
+
let l = n.map((a) => {
|
|
463
463
|
let r = {};
|
|
464
|
-
return t && (r.labelEn = a[t]), e.forEach((
|
|
465
|
-
u === 0 ? r.label = a[
|
|
464
|
+
return t && (r.labelEn = a[t]), e.forEach((o, u) => {
|
|
465
|
+
u === 0 ? r.label = a[o] : u === 1 ? r.value = a[o] : r[o] = a[o];
|
|
466
466
|
}), r;
|
|
467
467
|
});
|
|
468
|
-
return new We(
|
|
468
|
+
return new We(l);
|
|
469
469
|
}
|
|
470
470
|
function Dn(n) {
|
|
471
471
|
return n ? n.replace(/<[^>]+>/g, "") : "";
|
|
@@ -478,22 +478,22 @@ function On(n, e = 10) {
|
|
|
478
478
|
return !(n.size > t);
|
|
479
479
|
}
|
|
480
480
|
function Vn(n) {
|
|
481
|
-
return Array.from(10).fill(0).map((t,
|
|
481
|
+
return Array.from(10).fill(0).map((t, l) => n + "_" + l);
|
|
482
482
|
}
|
|
483
483
|
function Mn(n) {
|
|
484
484
|
let e = {};
|
|
485
|
-
return n.map((t,
|
|
486
|
-
let { key: a, option: r, type:
|
|
487
|
-
r ? e[a] = `${u}---option` :
|
|
485
|
+
return n.map((t, l) => {
|
|
486
|
+
let { key: a, option: r, type: o } = t, u = Jt(l);
|
|
487
|
+
r ? e[a] = `${u}---option` : o === "image" ? e[a] = `${u}---image` : e[a] = u;
|
|
488
488
|
}), e;
|
|
489
489
|
}
|
|
490
490
|
function An(n, e) {
|
|
491
|
-
return e.split(".").reduce((t,
|
|
491
|
+
return e.split(".").reduce((t, l) => t && t[l], n);
|
|
492
492
|
}
|
|
493
493
|
const we = (n, e) => {
|
|
494
494
|
const t = n.__vccOpts || n;
|
|
495
|
-
for (const [
|
|
496
|
-
t[
|
|
495
|
+
for (const [l, a] of e)
|
|
496
|
+
t[l] = a;
|
|
497
497
|
return t;
|
|
498
498
|
}, Qt = ["onClick"], Xt = {
|
|
499
499
|
__name: "index",
|
|
@@ -533,10 +533,10 @@ const we = (n, e) => {
|
|
|
533
533
|
modelValue: {},
|
|
534
534
|
modelModifiers: {}
|
|
535
535
|
}),
|
|
536
|
-
emits: /* @__PURE__ */ Ze(["success", "change"], ["update:modelValue"]),
|
|
536
|
+
emits: /* @__PURE__ */ Ze(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
537
537
|
setup(n, { emit: e }) {
|
|
538
|
-
const t = n,
|
|
539
|
-
if (
|
|
538
|
+
const t = n, l = kt(), { t: a, locale: r } = ve(), o = _t(n, "modelValue"), u = ne(() => l["value-key"] != null), d = q(""), k = ne(() => {
|
|
539
|
+
if (l.remote !== void 0)
|
|
540
540
|
return t.data;
|
|
541
541
|
const i = ut(d.value), { data: p, labelValue: L } = t, O = p || v.value;
|
|
542
542
|
if (i.length == 0)
|
|
@@ -553,7 +553,7 @@ const we = (n, e) => {
|
|
|
553
553
|
});
|
|
554
554
|
}), x = ne({
|
|
555
555
|
get() {
|
|
556
|
-
return
|
|
556
|
+
return l.multiple == null || o.value == null ? !1 : o.value.length == k.value.length;
|
|
557
557
|
},
|
|
558
558
|
set(i) {
|
|
559
559
|
return i;
|
|
@@ -581,17 +581,17 @@ const we = (n, e) => {
|
|
|
581
581
|
};
|
|
582
582
|
function _(i) {
|
|
583
583
|
let p = t.data ? t.data : v.value;
|
|
584
|
-
|
|
584
|
+
o.value = i ? p.map(
|
|
585
585
|
(L) => u.value ? L : L[t.labelValue.value]
|
|
586
586
|
) : [], _e(() => {
|
|
587
|
-
C("change",
|
|
587
|
+
C("change", o.value), C("changeAll", o.value, p);
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
function w(i) {
|
|
591
591
|
t.optionClick && t.optionClick(i), C("change", u.value ? i : i[t.labelValue.value]);
|
|
592
592
|
}
|
|
593
593
|
function S(i) {
|
|
594
|
-
return
|
|
594
|
+
return o.value.length >= t.maxLimit && !o.value.includes(i[t.labelValue.value]);
|
|
595
595
|
}
|
|
596
596
|
function z(i) {
|
|
597
597
|
return i.map((p) => ({
|
|
@@ -623,12 +623,12 @@ const we = (n, e) => {
|
|
|
623
623
|
const M = ne(() => I.value);
|
|
624
624
|
return (i, p) => {
|
|
625
625
|
const L = V("el-checkbox"), O = V("el-select-v2"), ee = V("el-option"), ie = V("el-select");
|
|
626
|
-
return G(
|
|
626
|
+
return G(l).v2 != null ? (D(), Y(O, he({
|
|
627
627
|
key: 0,
|
|
628
628
|
options: M.value,
|
|
629
|
-
modelValue:
|
|
630
|
-
"onUpdate:modelValue": p[1] || (p[1] = (m) =>
|
|
631
|
-
}, G(
|
|
629
|
+
modelValue: o.value,
|
|
630
|
+
"onUpdate:modelValue": p[1] || (p[1] = (m) => o.value = m)
|
|
631
|
+
}, G(l), {
|
|
632
632
|
filterable: "",
|
|
633
633
|
"collapse-tags": "",
|
|
634
634
|
"collapse-tags-tooltip": "",
|
|
@@ -643,7 +643,7 @@ const we = (n, e) => {
|
|
|
643
643
|
]),
|
|
644
644
|
_: 2
|
|
645
645
|
}, [
|
|
646
|
-
G(
|
|
646
|
+
G(l).multiple != null ? {
|
|
647
647
|
name: "header",
|
|
648
648
|
fn: U(() => [
|
|
649
649
|
re(i.$slots, "header", {}, () => [
|
|
@@ -664,16 +664,16 @@ const we = (n, e) => {
|
|
|
664
664
|
} : void 0
|
|
665
665
|
]), 1040, ["options", "modelValue"])) : (D(), Y(ie, he({
|
|
666
666
|
key: 1,
|
|
667
|
-
modelValue:
|
|
668
|
-
"onUpdate:modelValue": p[3] || (p[3] = (m) =>
|
|
667
|
+
modelValue: o.value,
|
|
668
|
+
"onUpdate:modelValue": p[3] || (p[3] = (m) => o.value = m),
|
|
669
669
|
filterable: "",
|
|
670
670
|
"collapse-tags": "",
|
|
671
671
|
"collapse-tags-tooltip": "",
|
|
672
|
-
"filter-method": G(
|
|
672
|
+
"filter-method": G(l).remote != null ? void 0 : (m) => d.value = m,
|
|
673
673
|
clearable: ""
|
|
674
|
-
}, G(
|
|
674
|
+
}, G(l), { onClear: n.optionClick }), {
|
|
675
675
|
default: U(() => [
|
|
676
|
-
G(
|
|
676
|
+
G(l).multiple != null && n.showCheckAll && n.maxLimit == null ? re(i.$slots, "header", { key: 0 }, () => [
|
|
677
677
|
P(L, {
|
|
678
678
|
class: "mgl20",
|
|
679
679
|
modelValue: x.value,
|
|
@@ -689,7 +689,7 @@ const we = (n, e) => {
|
|
|
689
689
|
(D(!0), de(De, null, Xe(k.value, (m, ge) => (D(), Y(ee, {
|
|
690
690
|
key: ge,
|
|
691
691
|
label: h(m),
|
|
692
|
-
disabled: G(
|
|
692
|
+
disabled: G(l).multiple != null && n.maxLimit > 0 ? S(m) : !1,
|
|
693
693
|
onClick: ze((le) => w(m), ["stop"]),
|
|
694
694
|
value: u.value ? m : m[n.labelValue.value]
|
|
695
695
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
@@ -698,7 +698,7 @@ const we = (n, e) => {
|
|
|
698
698
|
}, 16, ["modelValue", "filter-method", "onClear"]));
|
|
699
699
|
};
|
|
700
700
|
}
|
|
701
|
-
}, en = /* @__PURE__ */ we(Xt, [["__scopeId", "data-v-
|
|
701
|
+
}, en = /* @__PURE__ */ we(Xt, [["__scopeId", "data-v-d12f3c20"]]);
|
|
702
702
|
const tn = Je({
|
|
703
703
|
props: {
|
|
704
704
|
name: {
|
|
@@ -707,9 +707,9 @@ const tn = Je({
|
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
|
-
function nn(n, e, t,
|
|
711
|
-
const
|
|
712
|
-
return D(), Y(
|
|
710
|
+
function nn(n, e, t, l, a, r) {
|
|
711
|
+
const o = V("el-icon");
|
|
712
|
+
return D(), Y(o, { class: "cmp-icon" }, {
|
|
713
713
|
default: U(() => [
|
|
714
714
|
(D(), Y(et(n.name)))
|
|
715
715
|
]),
|
|
@@ -720,16 +720,16 @@ const dt = /* @__PURE__ */ we(tn, [["render", nn], ["__scopeId", "data-v-733f9da
|
|
|
720
720
|
__name: "index",
|
|
721
721
|
emits: ["ok", "no"],
|
|
722
722
|
setup(n, { emit: e }) {
|
|
723
|
-
const t = e,
|
|
723
|
+
const t = e, l = nt(() => {
|
|
724
724
|
t("ok");
|
|
725
725
|
}, 500);
|
|
726
726
|
function a() {
|
|
727
727
|
t("no");
|
|
728
728
|
}
|
|
729
|
-
return (r,
|
|
729
|
+
return (r, o) => {
|
|
730
730
|
const u = V("el-link"), d = V("el-popconfirm");
|
|
731
731
|
return D(), Y(d, he(r.$attrs, {
|
|
732
|
-
onConfirm: G(
|
|
732
|
+
onConfirm: G(l),
|
|
733
733
|
onCancel: a
|
|
734
734
|
}), {
|
|
735
735
|
reference: U(() => [
|
|
@@ -762,18 +762,18 @@ const on = ["accept"], ln = {
|
|
|
762
762
|
},
|
|
763
763
|
emits: ["fileChange"],
|
|
764
764
|
setup(n, { emit: e }) {
|
|
765
|
-
const t = e,
|
|
765
|
+
const t = e, l = q(null);
|
|
766
766
|
function a(r) {
|
|
767
|
-
let
|
|
768
|
-
t("fileChange",
|
|
767
|
+
let o = r.target.files[0];
|
|
768
|
+
t("fileChange", o), l.value.value = null;
|
|
769
769
|
}
|
|
770
|
-
return (r,
|
|
770
|
+
return (r, o) => {
|
|
771
771
|
const u = V("el-button");
|
|
772
772
|
return D(), de("span", null, [
|
|
773
773
|
P(u, {
|
|
774
774
|
loading: n.loading,
|
|
775
775
|
class: "mgr10",
|
|
776
|
-
onClick:
|
|
776
|
+
onClick: o[0] || (o[0] = (d) => l.value.click())
|
|
777
777
|
}, {
|
|
778
778
|
default: U(() => [
|
|
779
779
|
se(oe(r.$t("dao-ru")), 1)
|
|
@@ -783,7 +783,7 @@ const on = ["accept"], ln = {
|
|
|
783
783
|
ae("input", {
|
|
784
784
|
onChange: a,
|
|
785
785
|
ref_key: "input",
|
|
786
|
-
ref:
|
|
786
|
+
ref: l,
|
|
787
787
|
accept: n.accept,
|
|
788
788
|
style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
|
|
789
789
|
type: "file"
|
|
@@ -795,19 +795,19 @@ const on = ["accept"], ln = {
|
|
|
795
795
|
function Ae(n) {
|
|
796
796
|
let e = {};
|
|
797
797
|
return n.forEach((t) => {
|
|
798
|
-
const { key:
|
|
799
|
-
if (
|
|
798
|
+
const { key: l, type: a, option: r = {}, value: o, dateType: u } = t;
|
|
799
|
+
if (l)
|
|
800
800
|
if (a == "input" && (r != null && r.multiple))
|
|
801
|
-
e[
|
|
801
|
+
e[l] = ut(o);
|
|
802
802
|
else if (a == "date")
|
|
803
803
|
if (u.includes("range")) {
|
|
804
|
-
const [d, k] =
|
|
805
|
-
let [x, C] =
|
|
804
|
+
const [d, k] = l;
|
|
805
|
+
let [x, C] = o || [];
|
|
806
806
|
x && u == "daterange" && (x = Se(x).format("YYYY-MM-DD 00:00:00"), C = Se(C).format("YYYY-MM-DD 23:59:59")), e[d] = x, e[k] = C;
|
|
807
807
|
} else
|
|
808
|
-
e[
|
|
808
|
+
e[l] = o;
|
|
809
809
|
else
|
|
810
|
-
e[
|
|
810
|
+
e[l] = o;
|
|
811
811
|
}), e;
|
|
812
812
|
}
|
|
813
813
|
const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { class: "right" }, un = {
|
|
@@ -820,7 +820,7 @@ const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { cl
|
|
|
820
820
|
},
|
|
821
821
|
emits: ["confirm", "reset", "visibleChange"],
|
|
822
822
|
setup(n, { expose: e, emit: t }) {
|
|
823
|
-
const
|
|
823
|
+
const l = n, a = t, r = q(!0), o = q(null), { t: u } = ve(), d = ne(() => r.value ? u("guan-bi") : u("zhan-kai"));
|
|
824
824
|
function k() {
|
|
825
825
|
a("confirm");
|
|
826
826
|
}
|
|
@@ -834,11 +834,11 @@ const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { cl
|
|
|
834
834
|
a("confirm");
|
|
835
835
|
}
|
|
836
836
|
function b() {
|
|
837
|
-
return Ae(
|
|
837
|
+
return Ae(l.form.items);
|
|
838
838
|
}
|
|
839
|
-
const g = ot(
|
|
839
|
+
const g = ot(l.form.items);
|
|
840
840
|
function f() {
|
|
841
|
-
|
|
841
|
+
l.form.items.forEach((h) => {
|
|
842
842
|
const _ = g.find((w) => w.key == h.key);
|
|
843
843
|
_ && (h.value = _.value);
|
|
844
844
|
});
|
|
@@ -892,7 +892,7 @@ const an = { key: 0 }, rn = { class: "btns" }, sn = { class: "left" }, cn = { cl
|
|
|
892
892
|
"onUpdate:modelValue": (O) => i.value = O,
|
|
893
893
|
"value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[i.dateType] || "YYYY-MM-DD",
|
|
894
894
|
type: i.dateType || "date",
|
|
895
|
-
onFocus: (O) =>
|
|
895
|
+
onFocus: (O) => o.value = i,
|
|
896
896
|
onChange: (O) => v(),
|
|
897
897
|
placeholder: h.$t("qing-xuan-ze"),
|
|
898
898
|
"start-placeholder": h.$t("kai-shi-shi-jian"),
|
|
@@ -1035,14 +1035,14 @@ const hn = { class: "center" }, gn = {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
},
|
|
1037
1037
|
setup(n, { expose: e }) {
|
|
1038
|
-
const { t, locale:
|
|
1039
|
-
|
|
1038
|
+
const { t, locale: l } = ve(), a = zt(), r = fn(), o = n, u = q(!1), d = q([]);
|
|
1039
|
+
o.searchForm.showSearch === void 0 && (o.searchForm.showSearch = r.showSearch), o.searchForm.showPage === void 0 && (o.searchForm.showPage = r.showPage), o.searchForm.showShadow === void 0 && (o.searchForm.showShadow = r.showShadow), o.searchForm.showCheckBox === void 0 && (o.searchForm.showCheckBox = r.showCheckBox), o.searchForm.enableCellCopy === void 0 && (o.searchForm.enableCellCopy = r.enableCellCopy), o.searchForm.selections || (o.searchForm.selections = []);
|
|
1040
1040
|
const k = ne(() => {
|
|
1041
1041
|
const c = a.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1042
|
-
return
|
|
1043
|
-
}), x = ot(
|
|
1042
|
+
return o.id ? `listPageId-${c}-${o.id}` : `listPageId-${c}`;
|
|
1043
|
+
}), x = ot(o.searchForm.items), C = o.searchForm.pageNoKey || r.pageNoKey, v = o.searchForm.pageSizeKey || r.pageSizeKey, b = ke({
|
|
1044
1044
|
[C]: 1,
|
|
1045
|
-
[v]:
|
|
1045
|
+
[v]: o.searchForm.defaultPageSize || r.defaultPageSize,
|
|
1046
1046
|
total: 0
|
|
1047
1047
|
}), g = q(null), f = q(null), h = q(450), _ = nt(() => {
|
|
1048
1048
|
_e(() => {
|
|
@@ -1054,7 +1054,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1054
1054
|
}, 100), w = () => {
|
|
1055
1055
|
_();
|
|
1056
1056
|
}, S = () => {
|
|
1057
|
-
if (!
|
|
1057
|
+
if (!o.searchForm.enableCellCopy)
|
|
1058
1058
|
return !1;
|
|
1059
1059
|
const c = g.value;
|
|
1060
1060
|
if (!c || !c.$el)
|
|
@@ -1063,15 +1063,15 @@ const hn = { class: "center" }, gn = {
|
|
|
1063
1063
|
return s.classList.add("cell-copy-enabled"), s.setAttribute("tabindex", "-1"), s.removeEventListener("mousedown", le), s.removeEventListener("mousemove", me), s.removeEventListener("mouseup", be), s.removeEventListener("keydown", Ie), s.addEventListener("mousedown", le), s.addEventListener("mousemove", me), s.addEventListener("mouseup", be), s.addEventListener("keydown", Ie), !0;
|
|
1064
1064
|
};
|
|
1065
1065
|
Qe(() => {
|
|
1066
|
-
_(), window.addEventListener("resize", w),
|
|
1066
|
+
_(), window.addEventListener("resize", w), o.searchForm.enableCellCopy && (document.addEventListener("mouseup", Be), document.addEventListener("mousedown", Ye), setTimeout(() => {
|
|
1067
1067
|
S();
|
|
1068
1068
|
}, 500));
|
|
1069
1069
|
}), Ft(() => {
|
|
1070
|
-
|
|
1070
|
+
o.searchForm.enableCellCopy && setTimeout(() => {
|
|
1071
1071
|
S();
|
|
1072
1072
|
}, 500);
|
|
1073
1073
|
}), Lt(() => {
|
|
1074
|
-
if (window.removeEventListener("resize", w),
|
|
1074
|
+
if (window.removeEventListener("resize", w), o.searchForm.enableCellCopy) {
|
|
1075
1075
|
document.removeEventListener("mouseup", Be), document.removeEventListener("mousedown", Ye);
|
|
1076
1076
|
const c = g.value;
|
|
1077
1077
|
if (c && c.$el) {
|
|
@@ -1083,10 +1083,10 @@ const hn = { class: "center" }, gn = {
|
|
|
1083
1083
|
const z = ne(() => ie.value.height || h.value);
|
|
1084
1084
|
let I;
|
|
1085
1085
|
async function W(c) {
|
|
1086
|
-
const { dataFormat: s } =
|
|
1086
|
+
const { dataFormat: s } = o.tableConfig;
|
|
1087
1087
|
c[C] != 1 && (c.nextSearchAfter = I), u.value = !0;
|
|
1088
|
-
const { code: y, data: F = {} } = await
|
|
1089
|
-
u.value = !1,
|
|
1088
|
+
const { code: y, data: F = {} } = await o.api(c).finally(() => {
|
|
1089
|
+
u.value = !1, o.searchForm.selections = [];
|
|
1090
1090
|
});
|
|
1091
1091
|
if (y == 200) {
|
|
1092
1092
|
let R = [];
|
|
@@ -1101,7 +1101,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1101
1101
|
H = F[T];
|
|
1102
1102
|
break;
|
|
1103
1103
|
}
|
|
1104
|
-
d.value = s ? s(R) : R, b.total = H, I = F.nextSearchAfter,
|
|
1104
|
+
d.value = s ? s(R) : R, b.total = H, I = F.nextSearchAfter, o.searchForm.enableCellCopy && _e(() => {
|
|
1105
1105
|
setTimeout(() => {
|
|
1106
1106
|
S();
|
|
1107
1107
|
}, 100);
|
|
@@ -1109,19 +1109,19 @@ const hn = { class: "center" }, gn = {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
1111
|
function M(c = {}) {
|
|
1112
|
-
const { searchData: s = () => ({}) } =
|
|
1113
|
-
W({ ...b, ...Ae(
|
|
1112
|
+
const { searchData: s = () => ({}) } = o.tableConfig, y = s();
|
|
1113
|
+
W({ ...b, ...Ae(o.searchForm.items), ...c, ...y });
|
|
1114
1114
|
}
|
|
1115
1115
|
function i() {
|
|
1116
|
-
const { reset: c } =
|
|
1117
|
-
c && c(),
|
|
1116
|
+
const { reset: c } = o.tableConfig;
|
|
1117
|
+
c && c(), o.searchForm.items.forEach((s) => {
|
|
1118
1118
|
const y = x.find((F) => Ge(s.key) && Ge(F.key) ? s.key.join(",") == F.key.join(",") : F.key == s.key);
|
|
1119
1119
|
y && (s.value = y.value);
|
|
1120
1120
|
}), M();
|
|
1121
1121
|
}
|
|
1122
|
-
|
|
1122
|
+
o.api && o.immediate && M();
|
|
1123
1123
|
function p() {
|
|
1124
|
-
return { ...b, ...Ae(
|
|
1124
|
+
return { ...b, ...Ae(o.searchForm.items) };
|
|
1125
1125
|
}
|
|
1126
1126
|
const L = () => {
|
|
1127
1127
|
const c = g.value;
|
|
@@ -1133,7 +1133,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1133
1133
|
resizable: !0,
|
|
1134
1134
|
maxFixedSize: 0
|
|
1135
1135
|
}), ie = ne(() => {
|
|
1136
|
-
const { customConfig: c, columnConfig: s, ...y } =
|
|
1136
|
+
const { customConfig: c, columnConfig: s, ...y } = o.tableConfig;
|
|
1137
1137
|
return {
|
|
1138
1138
|
headerAlign: "left",
|
|
1139
1139
|
align: "center",
|
|
@@ -1188,7 +1188,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1188
1188
|
const Z = j.filter((K) => K.fixed === "right");
|
|
1189
1189
|
$ < Z.length && (T = j.indexOf(Z[$]));
|
|
1190
1190
|
} else {
|
|
1191
|
-
const Z =
|
|
1191
|
+
const Z = o.searchForm.showCheckBox ? 1 : 0;
|
|
1192
1192
|
T = j.filter((J) => J.fixed === "left").length + $ - Z;
|
|
1193
1193
|
}
|
|
1194
1194
|
}
|
|
@@ -1283,7 +1283,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1283
1283
|
const Q = y.filter((X) => X.fixed === "right").indexOf(j);
|
|
1284
1284
|
A = ce[Q];
|
|
1285
1285
|
} else if (!Z && !K && J.closest(".vxe-table--body-wrapper")) {
|
|
1286
|
-
const ue =
|
|
1286
|
+
const ue = o.searchForm.showCheckBox ? 1 : 0, Q = y.filter((Fe) => Fe.fixed === "left").length, X = N - Q;
|
|
1287
1287
|
A = ce[X + ue];
|
|
1288
1288
|
}
|
|
1289
1289
|
if (A && !A.classList.contains("col--checkbox") && !A.classList.contains("col--seq")) {
|
|
@@ -1331,7 +1331,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1331
1331
|
const Q = y.filter((X) => X.fixed === "right").indexOf(N);
|
|
1332
1332
|
A = ce[Q];
|
|
1333
1333
|
} else if (!j && !Z && J.closest(".vxe-table--body-wrapper")) {
|
|
1334
|
-
const ue =
|
|
1334
|
+
const ue = o.searchForm.showCheckBox ? 1 : 0, Q = y.filter((Fe) => Fe.fixed === "left").length, X = B - Q;
|
|
1335
1335
|
A = ce[X + ue];
|
|
1336
1336
|
}
|
|
1337
1337
|
if (A && !A.classList.contains("col--checkbox") && !A.classList.contains("col--seq")) {
|
|
@@ -1350,7 +1350,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1350
1350
|
console.error("复制失败:", E);
|
|
1351
1351
|
}
|
|
1352
1352
|
}, Ie = (c) => {
|
|
1353
|
-
|
|
1353
|
+
o.searchForm.enableCellCopy && ((c.ctrlKey || c.metaKey) && c.key === "c" ? m.selectedCells.length > 0 && (c.preventDefault(), c.stopPropagation(), gt()) : c.key === "Escape" && $e());
|
|
1354
1354
|
}, Be = () => {
|
|
1355
1355
|
m.isSelecting = !1;
|
|
1356
1356
|
}, Ye = (c) => {
|
|
@@ -1365,14 +1365,14 @@ const hn = { class: "center" }, gn = {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
function Ke() {
|
|
1367
1367
|
const c = g.value.getCheckboxRecords();
|
|
1368
|
-
|
|
1368
|
+
o.searchForm.selections = c;
|
|
1369
1369
|
}
|
|
1370
1370
|
const He = (c) => {
|
|
1371
1371
|
const s = g.value;
|
|
1372
1372
|
if (s) {
|
|
1373
1373
|
s.toggleCheckboxRow(c);
|
|
1374
1374
|
const y = g.value.getCheckboxRecords();
|
|
1375
|
-
|
|
1375
|
+
o.searchForm.selections = y;
|
|
1376
1376
|
}
|
|
1377
1377
|
};
|
|
1378
1378
|
return e({ tableRef: g, getList: M, getPrm: p, clearSort: L, calculateTableHeight: _ }), (c, s) => {
|
|
@@ -1424,7 +1424,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1424
1424
|
n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (D(), Y(H, {
|
|
1425
1425
|
key: 0,
|
|
1426
1426
|
type: "checkbox",
|
|
1427
|
-
width: G(
|
|
1427
|
+
width: G(l) == "zh_cn" ? 80 : 150,
|
|
1428
1428
|
title: c.$t("xu-hao"),
|
|
1429
1429
|
fixed: "left"
|
|
1430
1430
|
}, {
|
|
@@ -1494,14 +1494,14 @@ const hn = { class: "center" }, gn = {
|
|
|
1494
1494
|
function t() {
|
|
1495
1495
|
Kt(e.fileName, e.sheetsConfig);
|
|
1496
1496
|
}
|
|
1497
|
-
return (
|
|
1497
|
+
return (l, a) => {
|
|
1498
1498
|
const r = V("el-link");
|
|
1499
1499
|
return D(), Y(r, he({
|
|
1500
1500
|
type: "primary",
|
|
1501
1501
|
underline: "never"
|
|
1502
|
-
},
|
|
1502
|
+
}, l.$attrs, { onClick: t }), {
|
|
1503
1503
|
default: U(() => [
|
|
1504
|
-
se(oe(
|
|
1504
|
+
se(oe(l.$t("xia-zai-dao-ru-mo-ban")), 1)
|
|
1505
1505
|
]),
|
|
1506
1506
|
_: 1
|
|
1507
1507
|
}, 16);
|
|
@@ -1509,7 +1509,7 @@ const hn = { class: "center" }, gn = {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
};
|
|
1511
1511
|
function Yn(n, e = {}) {
|
|
1512
|
-
const t = Re(),
|
|
1512
|
+
const t = Re(), l = {
|
|
1513
1513
|
inForm: !0,
|
|
1514
1514
|
required: !0,
|
|
1515
1515
|
...e
|
|
@@ -1517,14 +1517,14 @@ function Yn(n, e = {}) {
|
|
|
1517
1517
|
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}$/,
|
|
1518
1518
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1519
1519
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1520
|
-
}[n], { inForm: r, value:
|
|
1520
|
+
}[n], { inForm: r, value: o, required: u, msg: d = t("validate.invalidInput") } = l;
|
|
1521
1521
|
return r ? function(k, x, C) {
|
|
1522
1522
|
if (u) {
|
|
1523
1523
|
a.test(x) ? C() : C(new Error(d));
|
|
1524
1524
|
return;
|
|
1525
1525
|
}
|
|
1526
1526
|
x && !a.test(x) ? C(new Error(d)) : C();
|
|
1527
|
-
} : a.test(
|
|
1527
|
+
} : a.test(o);
|
|
1528
1528
|
}
|
|
1529
1529
|
class Kn {
|
|
1530
1530
|
constructor(e = {}) {
|
|
@@ -1622,10 +1622,10 @@ class Kn {
|
|
|
1622
1622
|
});
|
|
1623
1623
|
if (!t.ok)
|
|
1624
1624
|
throw new Error(`HTTP ${t.status}: ${t.statusText}`);
|
|
1625
|
-
const
|
|
1626
|
-
if (
|
|
1627
|
-
return this.token =
|
|
1628
|
-
throw new Error(
|
|
1625
|
+
const l = await t.json();
|
|
1626
|
+
if (l.success && l.data)
|
|
1627
|
+
return this.token = l.data.token, this.user = l.data.user, this.saveToStorage(), this.clearTicketFromUrl(), this.log("ST票据验证成功,用户登录成功:", this.user), this.config.loginCallback && this.config.loginCallback(this.user, this.token), !0;
|
|
1628
|
+
throw new Error(l.message || "ST票据验证失败");
|
|
1629
1629
|
} catch (t) {
|
|
1630
1630
|
return this.log("ST票据验证失败:", t), this.handleError(t), !1;
|
|
1631
1631
|
}
|
|
@@ -1664,16 +1664,16 @@ class Kn {
|
|
|
1664
1664
|
* 发送带认证的HTTP请求
|
|
1665
1665
|
*/
|
|
1666
1666
|
async request(e, t = {}) {
|
|
1667
|
-
const
|
|
1667
|
+
const l = {
|
|
1668
1668
|
headers: {
|
|
1669
1669
|
"Content-Type": "application/json",
|
|
1670
1670
|
...t.headers
|
|
1671
1671
|
},
|
|
1672
1672
|
...t
|
|
1673
1673
|
};
|
|
1674
|
-
|
|
1674
|
+
l.headers.appId = this.config.clientCode, this.token && (l.headers.Authorization = `Bearer ${this.token}`);
|
|
1675
1675
|
try {
|
|
1676
|
-
const a = await fetch(e,
|
|
1676
|
+
const a = await fetch(e, l);
|
|
1677
1677
|
return a.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : a;
|
|
1678
1678
|
} catch (a) {
|
|
1679
1679
|
throw this.log("请求失败:", a), a;
|
|
@@ -1733,14 +1733,14 @@ class Kn {
|
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
function Hn(n, e = {}) {
|
|
1736
|
-
const
|
|
1736
|
+
const l = Object.assign({
|
|
1737
1737
|
manual: !1,
|
|
1738
1738
|
// 手动执行
|
|
1739
1739
|
log: !1,
|
|
1740
1740
|
params: null,
|
|
1741
1741
|
format: null
|
|
1742
|
-
}, e), { manual: a, log: r, params:
|
|
1743
|
-
const b = v ||
|
|
1742
|
+
}, e), { manual: a, log: r, params: o = {}, cb: u, format: d } = l, k = q([]), x = q(!1), C = (v) => {
|
|
1743
|
+
const b = v || o;
|
|
1744
1744
|
x.value = !0, n(b).then((g) => {
|
|
1745
1745
|
const { code: f, data: h, msg: _ } = g;
|
|
1746
1746
|
if (u) {
|
|
@@ -1750,7 +1750,7 @@ function Hn(n, e = {}) {
|
|
|
1750
1750
|
if (h) {
|
|
1751
1751
|
if (h.records != null || h.rows != null) {
|
|
1752
1752
|
const { records: w, rows: S, total: z = 0 } = h || {};
|
|
1753
|
-
b && b.total != null && (
|
|
1753
|
+
b && b.total != null && (o.total = parseInt(z)), k.value = Te(w || S || [], d);
|
|
1754
1754
|
} else
|
|
1755
1755
|
k.value = Te(h, d);
|
|
1756
1756
|
r && console.log("useRequest-res", k.value);
|
|
@@ -1764,11 +1764,11 @@ function Hn(n, e = {}) {
|
|
|
1764
1764
|
return a || C(), [x, k, C];
|
|
1765
1765
|
}
|
|
1766
1766
|
function Nn(n) {
|
|
1767
|
-
const e = q(n), t = q(""),
|
|
1767
|
+
const e = q(n), t = q(""), l = q("");
|
|
1768
1768
|
return Pe(e, (a) => {
|
|
1769
1769
|
const r = a || ["", ""];
|
|
1770
|
-
t.value = r[0],
|
|
1771
|
-
}), [e, t,
|
|
1770
|
+
t.value = r[0], l.value = r[1];
|
|
1771
|
+
}), [e, t, l];
|
|
1772
1772
|
}
|
|
1773
1773
|
function Zn(n) {
|
|
1774
1774
|
return Object.prototype.toString.call(n).slice(8, -1).toLowerCase();
|
|
@@ -1777,28 +1777,28 @@ function Te(n, e) {
|
|
|
1777
1777
|
if (!e)
|
|
1778
1778
|
return n;
|
|
1779
1779
|
if (n instanceof Array)
|
|
1780
|
-
return n.map((
|
|
1780
|
+
return n.map((l) => {
|
|
1781
1781
|
let a = {};
|
|
1782
|
-
return e.forEach((r) => a[r] =
|
|
1782
|
+
return e.forEach((r) => a[r] = l[r]), a;
|
|
1783
1783
|
});
|
|
1784
1784
|
let t = {};
|
|
1785
|
-
return e.forEach((
|
|
1785
|
+
return e.forEach((l) => t[l] = n[l]), t;
|
|
1786
1786
|
}
|
|
1787
1787
|
function Gn(n, e = []) {
|
|
1788
|
-
const { locale: t } = ve(),
|
|
1788
|
+
const { locale: t } = ve(), l = q(n());
|
|
1789
1789
|
return Pe(
|
|
1790
1790
|
[t, ...e],
|
|
1791
1791
|
() => {
|
|
1792
|
-
|
|
1792
|
+
l.value = n();
|
|
1793
1793
|
},
|
|
1794
1794
|
{ immediate: !0 }
|
|
1795
|
-
),
|
|
1795
|
+
), l;
|
|
1796
1796
|
}
|
|
1797
1797
|
function Wn(n, e = "zh_cn", t = "en_us") {
|
|
1798
1798
|
if (!n)
|
|
1799
1799
|
return "-";
|
|
1800
|
-
const
|
|
1801
|
-
return n[
|
|
1800
|
+
const l = { en_us: t, zh_cn: e }, r = ct().global.locale.value;
|
|
1801
|
+
return n[l[r]] || n[e] || "-";
|
|
1802
1802
|
}
|
|
1803
1803
|
function Jn(n, e) {
|
|
1804
1804
|
let t = Vt;
|
|
@@ -1813,16 +1813,16 @@ function Xn(n, e) {
|
|
|
1813
1813
|
return typeof n == "string" && n.length > 0 && (t = Ue(n).mapActions), mn(e, t);
|
|
1814
1814
|
}
|
|
1815
1815
|
function ht(n, e) {
|
|
1816
|
-
const t = lt(),
|
|
1817
|
-
return Object.keys(
|
|
1818
|
-
const
|
|
1819
|
-
a[r] = ne(
|
|
1816
|
+
const t = lt(), l = e(n), a = {};
|
|
1817
|
+
return Object.keys(l).forEach((r) => {
|
|
1818
|
+
const o = l[r].bind({ $store: t });
|
|
1819
|
+
a[r] = ne(o);
|
|
1820
1820
|
}), a;
|
|
1821
1821
|
}
|
|
1822
1822
|
function mn(n, e) {
|
|
1823
|
-
const t = lt(),
|
|
1824
|
-
return Object.keys(
|
|
1825
|
-
a[r] =
|
|
1823
|
+
const t = lt(), l = e(n), a = {};
|
|
1824
|
+
return Object.keys(l).forEach((r) => {
|
|
1825
|
+
a[r] = l[r].bind({ $store: t });
|
|
1826
1826
|
}), a;
|
|
1827
1827
|
}
|
|
1828
1828
|
function Ee(n) {
|
|
@@ -1835,16 +1835,16 @@ function eo() {
|
|
|
1835
1835
|
let t;
|
|
1836
1836
|
if ([null, void 0].includes(e.row[e.column.field]))
|
|
1837
1837
|
return "-";
|
|
1838
|
-
const
|
|
1838
|
+
const l = e.row[e.column.field];
|
|
1839
1839
|
if (n.type == "tag") {
|
|
1840
1840
|
let a;
|
|
1841
1841
|
return P(V("el-text"), {
|
|
1842
|
-
type: n.enum.getTag(
|
|
1843
|
-
}, Ee(a = n.enum.getName(
|
|
1842
|
+
type: n.enum.getTag(l)
|
|
1843
|
+
}, Ee(a = n.enum.getName(l)) ? a : {
|
|
1844
1844
|
default: () => [a]
|
|
1845
1845
|
});
|
|
1846
1846
|
}
|
|
1847
|
-
return P(V("el-text"), null, Ee(t = n.enum.getName(
|
|
1847
|
+
return P(V("el-text"), null, Ee(t = n.enum.getName(l)) ? t : {
|
|
1848
1848
|
default: () => [t]
|
|
1849
1849
|
});
|
|
1850
1850
|
}
|
|
@@ -1865,11 +1865,11 @@ function eo() {
|
|
|
1865
1865
|
const {
|
|
1866
1866
|
locale: t
|
|
1867
1867
|
} = ve();
|
|
1868
|
-
let
|
|
1868
|
+
let l = t.value == "zh_cn";
|
|
1869
1869
|
return P(wt, {
|
|
1870
1870
|
type: e.row[e.column.field] ? "success" : "danger"
|
|
1871
1871
|
}, {
|
|
1872
|
-
default: () => [e.row[e.column.field] ?
|
|
1872
|
+
default: () => [e.row[e.column.field] ? l ? "是" : "YES" : l ? "否" : "NO"]
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
1875
|
}), Ce.renderer.add("I18n", {
|
|
@@ -1878,15 +1878,15 @@ function eo() {
|
|
|
1878
1878
|
const {
|
|
1879
1879
|
locale: t
|
|
1880
1880
|
} = ve();
|
|
1881
|
-
let
|
|
1882
|
-
return e.row[
|
|
1881
|
+
let l = t.value == "zh_cn" ? e.column.field : n.fieldEn;
|
|
1882
|
+
return e.row[l] || e.row[e.column.field];
|
|
1883
1883
|
}
|
|
1884
1884
|
}), Ce.renderer.add("Link", {
|
|
1885
1885
|
// 默认显示模板
|
|
1886
1886
|
renderTableDefault(n, e) {
|
|
1887
1887
|
var u;
|
|
1888
1888
|
let t = e.column.field;
|
|
1889
|
-
const
|
|
1889
|
+
const l = Ot(), {
|
|
1890
1890
|
multiple: a,
|
|
1891
1891
|
to: r
|
|
1892
1892
|
} = n;
|
|
@@ -1894,7 +1894,7 @@ function eo() {
|
|
|
1894
1894
|
return P(Ne, {
|
|
1895
1895
|
underline: "never",
|
|
1896
1896
|
type: "primary",
|
|
1897
|
-
onclick: () =>
|
|
1897
|
+
onclick: () => l.push({
|
|
1898
1898
|
path: r,
|
|
1899
1899
|
query: {
|
|
1900
1900
|
[t]: e.row[t]
|
|
@@ -1903,11 +1903,11 @@ function eo() {
|
|
|
1903
1903
|
}, {
|
|
1904
1904
|
default: () => [e.row[t]]
|
|
1905
1905
|
});
|
|
1906
|
-
const
|
|
1907
|
-
return
|
|
1906
|
+
const o = ((u = e.row[t]) == null ? void 0 : u.split(",")) || [];
|
|
1907
|
+
return o.map((d, k) => P("span", null, [P(Ne, {
|
|
1908
1908
|
underline: "never",
|
|
1909
1909
|
type: "primary",
|
|
1910
|
-
onclick: () =>
|
|
1910
|
+
onclick: () => l.push({
|
|
1911
1911
|
path: r,
|
|
1912
1912
|
query: {
|
|
1913
1913
|
[t]: d
|
|
@@ -1915,7 +1915,7 @@ function eo() {
|
|
|
1915
1915
|
})
|
|
1916
1916
|
}, Ee(d) ? d : {
|
|
1917
1917
|
default: () => [d]
|
|
1918
|
-
}), k <
|
|
1918
|
+
}), k < o.length - 1 ? "," : ""]));
|
|
1919
1919
|
}
|
|
1920
1920
|
});
|
|
1921
1921
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(m,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("element-plus"),require("vue"),require("file-saver"),require("exceljs"),require("dayjs"),require("vue-i18n"),require("lodash"),require("vue-router"),require("vuex"),require("vxe-pc-ui")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","file-saver","exceljs","dayjs","vue-i18n","lodash","vue-router","vuex","vxe-pc-ui"],K):(m=typeof globalThis<"u"?globalThis:m||self,K(m.JoyAdminComponents={},m.ElementPlus,m.Vue,m.fileSaver,m.ExcelJS,m.dayjs,m.VueI18n,m._,m.VueRouter,m.Vuex,m.VxeUI))})(this,function(m,K,e,He,Ie,he,ee,le,Te,Q,ie){"use strict";const Ze=e.defineComponent({name:"LayOutForm",setup(o,{slots:t,attrs:n,emit:l}){const a=e.ref(null),s=()=>t.default?t.default().filter(u=>u.type!==Symbol.for("v-cmt")).map(u=>u.type===Symbol.for("v-fgt")?u.children:u).flat().map(u=>{var f;return e.h(K.ElCol,{span:((f=u.props)==null?void 0:f.span)||24},{default:()=>u})}):null;e.onMounted(()=>{l("ref",a.value)});function r(){return e.h(K.ElForm,{...n,ref:a},()=>e.h(K.ElRow,{gutter:n.gutter??20},{default:()=>s()}))}return r}});var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Le={exports:{}};(function(o,t){(function(n,l){o.exports=l()})(ve,function(){var n="minute",l=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,r,u){var f=r.prototype;u.utc=function(h){var g={date:h,utc:!0,args:arguments};return new r(g)},f.utc=function(h){var g=u(this.toDate(),{locale:this.$L,utc:!0});return h?g.add(this.utcOffset(),n):g},f.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var $=f.parse;f.parse=function(h){h.utc&&(this.$u=!0),this.$utils().u(h.$offset)||(this.$offset=h.$offset),$.call(this,h)};var S=f.init;f.init=function(){if(this.$u){var h=this.$d;this.$y=h.getUTCFullYear(),this.$M=h.getUTCMonth(),this.$D=h.getUTCDate(),this.$W=h.getUTCDay(),this.$H=h.getUTCHours(),this.$m=h.getUTCMinutes(),this.$s=h.getUTCSeconds(),this.$ms=h.getUTCMilliseconds()}else S.call(this)};var x=f.utcOffset;f.utcOffset=function(h,g){var V=this.$utils().u;if(V(h))return this.$u?0:V(this.$offset)?x.call(this):this.$offset;if(typeof h=="string"&&(h=function(v){v===void 0&&(v="");var Y=v.match(l);if(!Y)return null;var O=(""+Y[0]).match(a)||["-",0,0],c=O[0],y=60*+O[1]+ +O[2];return y===0?0:c==="+"?y:-y}(h),h===null))return this;var _=Math.abs(h)<=16?60*h:h;if(_===0)return this.utc(g);var I=this.clone();if(g)return I.$offset=_,I.$u=!1,I;var B=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(I=this.local().add(_+B,n)).$offset=_,I.$x.$localOffset=B,I};var b=f.format;f.format=function(h){var g=h||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return b.call(this,g)},f.valueOf=function(){var h=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*h},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var w=f.toDate;f.toDate=function(h){return h==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():w.call(this)};var p=f.diff;f.diff=function(h,g,V){if(h&&this.$u===h.$u)return p.call(this,h,g,V);var _=this.local(),I=u(h).local();return p.call(_,I,g,V)}}})})(Le);var Ge=Le.exports;const We=Ee(Ge);var Fe={exports:{}};(function(o,t){(function(n,l){o.exports=l()})(ve,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},l={};return function(a,s,r){var u,f=function(b,w,p){p===void 0&&(p={});var h=new Date(b),g=function(V,_){_===void 0&&(_={});var I=_.timeZoneName||"short",B=V+"|"+I,v=l[B];return v||(v=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:V,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:I}),l[B]=v),v}(w,p);return g.formatToParts(h)},$=function(b,w){for(var p=f(b,w),h=[],g=0;g<p.length;g+=1){var V=p[g],_=V.type,I=V.value,B=n[_];B>=0&&(h[B]=parseInt(I,10))}var v=h[3],Y=v===24?0:v,O=h[0]+"-"+h[1]+"-"+h[2]+" "+Y+":"+h[4]+":"+h[5]+":000",c=+b;return(r.utc(O).valueOf()-(c-=c%1e3))/6e4},S=s.prototype;S.tz=function(b,w){b===void 0&&(b=u);var p,h=this.utcOffset(),g=this.toDate(),V=g.toLocaleString("en-US",{timeZone:b}),_=Math.round((g-new Date(V))/1e3/60),I=15*-Math.round(g.getTimezoneOffset()/15)-_;if(!Number(I))p=this.utcOffset(0,w);else if(p=r(V,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(I,!0),w){var B=p.utcOffset();p=p.add(h-B,"minute")}return p.$x.$timezone=b,p},S.offsetName=function(b){var w=this.$x.$timezone||r.tz.guess(),p=f(this.valueOf(),w,{timeZoneName:b}).find(function(h){return h.type.toLowerCase()==="timezonename"});return p&&p.value};var x=S.startOf;S.startOf=function(b,w){if(!this.$x||!this.$x.$timezone)return x.call(this,b,w);var p=r(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return x.call(p,b,w).tz(this.$x.$timezone,!0)},r.tz=function(b,w,p){var h=p&&w,g=p||w||u,V=$(+r(),g);if(typeof b!="string")return r(b).tz(g);var _=function(Y,O,c){var y=Y-60*O*1e3,L=$(y,c);if(O===L)return[y,O];var z=$(y-=60*(L-O)*1e3,c);return L===z?[y,L]:[Y-60*Math.min(L,z)*1e3,Math.max(L,z)]}(r.utc(b,h).valueOf(),V,g),I=_[0],B=_[1],v=r(I).utcOffset(B);return v.$x.$timezone=g,v},r.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},r.tz.setDefault=function(b){u=b}}})})(Fe);var Je=Fe.exports;const Qe=Ee(Je),me={"dao-ru":"导入","quan-xuan":"全选","xia-zai-dao-ru-mo-ban":"下载导入模板","xu-hao":"序号","qing-shu-ru":"请输入","qing-xuan-ze":"请选择","kai-shi-shi-jian":"开始时间","jie-shu-shi-jian":"结束时间","shai-xuan":"筛选","chong-zhi":"重置","guan-bi":"关闭","zhan-kai":"展开",excel:{fieldsMappingRequired:"请输入列字段映射",invalidInput:"非法输入",invalidOption:"请输入有效选项!",copyFailed:"复制失败",sheetNameTooLong:'Sheet名称 "{0}" 长度超过31个字符,已自动截断为 "{1}"'},validate:{invalidInput:"请输入正确内容"},tools:{keysLengthError:"keys 长度必须大于2 默认前两位为 label value"}},ge={"dao-ru":"Import","quan-xuan":"Select All","xia-zai-dao-ru-mo-ban":"Download Import Template","xu-hao":"No.","qing-shu-ru":"Please enter","qing-xuan-ze":"Please select","kai-shi-shi-jian":"Start Time","jie-shu-shi-jian":"End Time","shai-xuan":"Filter","chong-zhi":"Reset","guan-bi":"Collapse","zhan-kai":"Expand",excel:{fieldsMappingRequired:"Please enter column field mapping",invalidInput:"Invalid input",invalidOption:"Please enter a valid option!",copyFailed:"Copy failed",sheetNameTooLong:'Sheet name "{0}" exceeds 31 characters, automatically truncated to "{1}"'},validate:{invalidInput:"Please enter valid content"},tools:{keysLengthError:"Keys length must be greater than 2, default first two are label and value"}},De={zh_cn:me,en:ge};let re=null;function Be(o=null){if(o){const{global:t}=o;return t.messages.value.zh_cn?t.mergeLocaleMessage("zh_cn",me):t.setLocaleMessage("zh_cn",me),t.messages.value.en?t.mergeLocaleMessage("en",ge):t.setLocaleMessage("en",ge),re=o,o}return re||(re=ee.createI18n({legacy:!1,locale:"zh_cn",fallbackLocale:"zh_cn",messages:De})),re}function Ce(){return re||Be()}function pe(){return Ce().global.t}he.extend(We),he.extend(Qe);async function Xe(o,t){const{fields:n,range:l=1}=t;if(!n){const r=pe();throw new Error(r("excel.fieldsMappingRequired"))}let a=new Ie.Workbook;await a.xlsx.load(o);const s={};return a.eachSheet(function(r,u){const f=[];r.eachRow(function($,S){if(S>l){let x={},b=!0;Object.keys(n).forEach(w=>{const p=$.getCell(n[w]).value;x[w]=p,p&&(b=!1)}),b||f.push(x)}}),s[r._name]=f}),a=null,s}const et={columnWidth:30};async function ze(o,t,n=[],l={}){if(!o||!t)return;const{columnStyle:a}=l,{columnWidth:s}=et;t.forEach(f=>{f.width=f.width?f.width:s});const{workbook:r,worksheet:u}=tt();u.columns=t,u.addRows(n),a&&await nt(r,u,a);try{const f=await r.xlsx.writeBuffer(),$=new File([f],o,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});He.saveAs($)}catch(f){console.log(f)}}function tt(){const o=new Ie.Workbook;o.creator="distributor System",o.lastModifiedBy="distributor System",o.created=new Date,o.modified=new Date,o.lastPrinted=new Date;const t=o.addWorksheet("Sheet1");return{workbook:o,worksheet:t}}async function nt(o,t,n){const l=Object.keys(n);for(const a of l){const s=n[a],{type:r}=s;switch(r){case"IMG":await ot(o,t,a);break}}}async function ot(o,t,n,l){const a=t.getColumn(n),s=a.values;t.getColumn(n).width=20,t.eachRow((r,u)=>{u>1&&(r.height=40)});for(let r=0,u=s.length;r<u;r++){if(r<2)continue;let f=s[r];f&&(t.getCell(a.letter+r).value="",await lt(o,t,f,{width:100,height:50,col:a._number-1,row:r-1}))}}async function lt(o,t,n,l){const{col:a,row:s,width:r,height:u}=l,{success:f,base64:$}=await rt(n,.3);if(f){const S=o.addImage({base64:$,extension:"jpeg"});t.addImage(S,{tl:{col:a,row:s},ext:{width:r,height:u}})}}function rt(o,t=1){const n=new Image;return n.setAttribute("crossOrigin","anonymous"),n.crossOrigin="anonymous",n.src=o,new Promise((l,a)=>{n.onload=()=>{const s=document.createElement("canvas");s.width=n.width,s.height=n.height,s.getContext("2d").drawImage(n,0,0,s.width,s.height),l({success:!0,base64:s.toDataURL("image/jpeg",t)})},n.onerror=()=>{l({success:!1})}})}function at(o){if(o<26)return String.fromCharCode(65+o);{const t=String.fromCharCode(65+Math.floor((o-26)/26)),n=String.fromCharCode(65+(o-26)%26);return t+n}}function st(o){return new Promise(t=>{setTimeout(()=>{t()},o)})}function it(o){return JSON.parse(JSON.stringify(o))}function ct(o){let t=[],n={},l=(a,s)=>Object.prototype.hasOwnProperty.call(a,s);for(const a of o){n[a.id]={...a,children:l(n,a.id)?n[a.id].children:[]};const s=n[a.id];a.pid==-1?t.push(s):(l(n,a.pid)||(n[a.pid]={children:[]}),n[a.pid].children.push(s))}return t}function ye(o,t=" "){return o?o.split(t).filter(n=>n.trim()):[]}class be{constructor(t,n=["label","value","labelEn"]){this.list=t,this.map=new Map(t.map(l=>{let a={...l,label:l[n[0]],value:l[n[1]]};return n[2]&&(a.labelEn=l[n[2]]),[l[n[1]],a]}))}getName(t,n){if(!this.has(t))return"-";const{label:l,labelEn:a}=this.map.get(t);return(n=="zh_cn"?l:a)||l||"-"}getTag(t){if(!this.has(t))return"info";const{tag:n="info"}=this.map.get(t);return n}getItem(t){return this.has(t)?this.map.get(t):null}getColor(t){if(!this.has(t))return null;const{color:n}=this.map.get(t);return n}has(t){return this.map.has(t)}}function dt(o,t=[],n="i18nName"){if(o.length==0)return new be([]);if(t.length<2){const a=pe();throw new Error(a("tools.keysLengthError"))}let l=o.map(a=>{let s={};return n&&(s.labelEn=a[n]),t.forEach((r,u)=>{u===0?s.label=a[r]:u===1?s.value=a[r]:s[r]=a[r]}),s});return new be(l)}function ut(o){return o?o.replace(/<[^>]+>/g,""):""}function ft(o){return o?(o.includes("\\\\u")&&(o=o.replace(/\\/g,"")),o.replace(/\\u[\dA-F]{4}/gi,t=>String.fromCharCode(parseInt(t.replace(/\\u/g,""),16)))):""}function ht(o,t=10){let n=1048576*t;return!(o.size>n)}function mt(o){return Array.from(10).fill(0).map((n,l)=>o+"_"+l)}function gt(o){let t={};return o.map((n,l)=>{let{key:a,option:s,type:r}=n,u=at(l);s?t[a]=`${u}---option`:r==="image"?t[a]=`${u}---image`:t[a]=u}),t}function pt(o,t){return t.split(".").reduce((n,l)=>n&&n[l],o)}const Zt="",ce=(o,t)=>{const n=o.__vccOpts||o;for(const[l,a]of t)n[l]=a;return n},Ct=["onClick"],Oe=ce({__name:"index",props:e.mergeModels({api:{type:Function},showCheckAll:{type:Boolean,default:!0},maxLimit:{type:Number,default:void 0},optionClick:{type:Function,default:()=>{}},data:{type:Array},labelValue:{type:Object,default:()=>({label:"label",labelEn:"labelEn",value:"value"})},changeLocal:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["success","change"],["update:modelValue"]),setup(o,{emit:t}){const n=o,l=e.useAttrs(),{t:a,locale:s}=ee.useI18n(),r=e.useModel(o,"modelValue"),u=e.computed(()=>l["value-key"]!=null),f=e.ref(""),$=e.computed(()=>{if(l.remote!==void 0)return n.data;const c=ye(f.value),{data:y,labelValue:L}=n,z=y||b.value;if(c.length==0)return z;const{label:W,labelEn:te}=L;let C=s.value=="en_us"?te||"i18nName":W;return c.length==1?z.filter(X=>X[C].toLowerCase().includes(c[0].toLowerCase())):z.filter(X=>{let se=!1;return se=c.some(ue=>X[C].toLowerCase()==ue.toLowerCase()),se})}),S=e.computed({get(){return l.multiple==null||r.value==null?!1:r.value.length==$.value.length},set(c){return c}}),x=t,b=e.ref([]),w=async()=>{const{data:c}=await n.api();b.value=[...c],x("success",b)};n.api&&w();function p(c){x("change",c)}const h=n.labelValue.label.split("-"),g=c=>{if(h.length==1){if(n.changeLocal)return a(c[n.labelValue.label]);let y=s.value=="en_us"?c[n.labelValue.labelEn||"i18nName"]:c[n.labelValue.label];return y=y||c[n.labelValue.label],y}else{let y=[];return h.forEach(L=>{y.push(c[L])}),y.join("-")}};function V(c){let y=n.data?n.data:b.value;r.value=c?y.map(L=>u.value?L:L[n.labelValue.value]):[],e.nextTick(()=>{x("change",r.value)})}function _(c){n.optionClick&&n.optionClick(c),x("change",u.value?c:c[n.labelValue.value])}function I(c){return r.value.length>=n.maxLimit&&!r.value.includes(c[n.labelValue.value])}function B(c){return c.map(y=>({...y,label:g(y),value:u.value?y:y[n.labelValue.value]}))}const v=e.ref([]),Y=n.data?n.data:b.value;v.value=B(Y),e.watch(()=>n.data?n.data:b.value,c=>{var L;const y=B(c);if(y.length!==v.value.length)v.value=y;else{let z=!1;for(let W=0;W<y.length;W++)if(y[W].value!==((L=v.value[W])==null?void 0:L.value)){z=!0;break}z&&(v.value=y)}},{deep:!0});const O=e.computed(()=>v.value);return(c,y)=>{const L=e.resolveComponent("el-checkbox"),z=e.resolveComponent("el-select-v2"),W=e.resolveComponent("el-option"),te=e.resolveComponent("el-select");return e.unref(l).v2!=null?(e.openBlock(),e.createBlock(z,e.mergeProps({key:0,options:O.value,modelValue:r.value,"onUpdate:modelValue":y[1]||(y[1]=C=>r.value=C)},e.unref(l),{filterable:"","collapse-tags":"","collapse-tags-tooltip":"",clearable:"",onChange:p,onClear:p}),e.createSlots({default:e.withCtx(({item:C})=>[e.createElementVNode("div",{onClick:ae=>_(C)},e.toDisplayString(C.label),9,Ct)]),_:2},[e.unref(l).multiple!=null?{name:"header",fn:e.withCtx(()=>[e.renderSlot(c.$slots,"header",{},()=>[e.createVNode(L,{class:"mgl20",modelValue:S.value,"onUpdate:modelValue":y[0]||(y[0]=C=>S.value=C),onChange:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0)]),key:"0"}:void 0]),1040,["options","modelValue"])):(e.openBlock(),e.createBlock(te,e.mergeProps({key:1,modelValue:r.value,"onUpdate:modelValue":y[3]||(y[3]=C=>r.value=C),filterable:"","collapse-tags":"","collapse-tags-tooltip":"","filter-method":e.unref(l).remote!=null?void 0:C=>f.value=C,clearable:""},e.unref(l),{onClear:o.optionClick}),{default:e.withCtx(()=>[e.unref(l).multiple!=null&&o.showCheckAll&&o.maxLimit==null?e.renderSlot(c.$slots,"header",{key:0},()=>[e.createVNode(L,{class:"mgl20",modelValue:S.value,"onUpdate:modelValue":y[2]||(y[2]=C=>S.value=C),onChange:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(C,ae)=>(e.openBlock(),e.createBlock(W,{key:ae,label:g(C),disabled:e.unref(l).multiple!=null&&o.maxLimit>0?I(C):!1,onClick:e.withModifiers(X=>_(C),["stop"]),value:u.value?C:C[o.labelValue.value]},null,8,["label","disabled","onClick","value"]))),128))]),_:3},16,["modelValue","filter-method","onClear"]))}}},[["__scopeId","data-v-439bf9d8"]]),Wt="",yt=e.defineComponent({props:{name:{tyepe:String,required:!0}}});function bt(o,t,n,l,a,s){const r=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(r,{class:"cmp-icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.name)))]),_:1})}const we=ce(yt,[["render",bt],["__scopeId","data-v-733f9daa"]]),wt={__name:"index",emits:["ok","no"],setup(o,{emit:t}){const n=t,l=le.debounce(()=>{n("ok")},500);function a(){n("no")}return(s,r)=>{const u=e.resolveComponent("el-link"),f=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createBlock(f,e.mergeProps(s.$attrs,{onConfirm:e.unref(l),onCancel:a}),{reference:e.withCtx(()=>[e.createVNode(u,{underline:"never",type:s.$attrs.type},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["type"])]),_:3},16,["onConfirm"])}}},Jt="",kt=["accept"],xt=ce({__name:"index",props:{accept:{type:String,default:".xlsx,.xls"},loading:{type:Boolean,default:!1}},emits:["fileChange"],setup(o,{emit:t}){const n=t,l=e.ref(null);function a(s){let r=s.target.files[0];n("fileChange",r),l.value.value=null}return(s,r)=>{const u=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(u,{loading:o.loading,class:"mgr10",onClick:r[0]||(r[0]=f=>l.value.click())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$t("dao-ru")),1)]),_:1},8,["loading"]),e.createElementVNode("input",{onChange:a,ref_key:"input",ref:l,accept:o.accept,style:{position:"absolute",width:"0px",height:"0px",opacity:"0"},type:"file"},null,40,kt)])}}},[["__scopeId","data-v-5f1449ad"]]);function ke(o){let t={};return o.forEach(n=>{const{key:l,type:a,option:s={},value:r,dateType:u}=n;if(l)if(a=="input"&&(s!=null&&s.multiple))t[l]=ye(r);else if(a=="date")if(u.includes("range")){const[f,$]=l;let[S,x]=r||[];S&&u=="daterange"&&(S=he(S).format("YYYY-MM-DD 00:00:00"),x=he(x).format("YYYY-MM-DD 23:59:59")),t[f]=S,t[$]=x}else t[l]=r;else t[l]=r}),t}const Xt="",St={key:0},_t={class:"btns"},$t={class:"left"},Vt={class:"right"},Ne=ce({__name:"index",props:{form:{type:Object,required:!0}},emits:["confirm","reset","visibleChange"],setup(o,{expose:t,emit:n}){const l=o,a=n,s=e.ref(!0),r=e.ref(null),{t:u}=ee.useI18n(),f=e.computed(()=>s.value?u("guan-bi"):u("zhan-kai"));function $(){a("confirm")}function S(g){g.option.onClear&&g.option.onClear(),a("confirm")}function x(){a("reset")}function b(){a("confirm")}function w(){return ke(l.form.items)}const p=le.cloneDeep(l.form.items);function h(){l.form.items.forEach(g=>{const V=p.find(_=>_.key==g.key);V&&(g.value=V.value)})}return t({getPrm:w,reset:h}),(g,V)=>{const _=e.resolveComponent("el-input"),I=e.resolveComponent("el-date-picker"),B=e.resolveComponent("el-form-item"),v=e.resolveComponent("el-form"),Y=e.resolveComponent("el-link"),O=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",{class:"searchBar-container mgt10 mgb10",onKeydown:e.withKeys($,["enter"])},[e.createElementVNode("div",{class:"searchBar",style:e.normalizeStyle({height:s.value?"auto":"42px"})},[e.createVNode(v,{inline:"",model:o.form.data},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.form.items.filter(c=>!c.hidden),c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.key},[c.type=="br"?(e.openBlock(),e.createElementBlock("br",St)):(e.openBlock(),e.createBlock(B,{key:1,label:c.name},{default:e.withCtx(()=>{var y,L;return[c.type==="input"?(e.openBlock(),e.createBlock(_,{key:0,modelValue:c.value,"onUpdate:modelValue":z=>c.value=z,class:e.normalizeClass(((y=c.option)==null?void 0:y.class)||"w150"),placeholder:g.$t("qing-shu-ru"),clearable:""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"])):c.type==="custom"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.render),{key:1})):e.createCommentVNode("",!0),c.type==="select"?(e.openBlock(),e.createBlock(Oe,e.mergeProps({key:2,class:((L=c.option)==null?void 0:L.class)||"w150",modelValue:c.value,"onUpdate:modelValue":z=>c.value=z},{ref_for:!0},c.option,{onChange:$,onClear:z=>S(c)}),null,16,["class","modelValue","onUpdate:modelValue","onClear"])):e.createCommentVNode("",!0),c.type==="date"?(e.openBlock(),e.createBlock(I,{key:3,class:e.normalizeClass({datetimerange:"w300",daterange:"w200"}[c.dateType]||"w100"),modelValue:c.value,"onUpdate:modelValue":z=>c.value=z,"value-format":{datetimerange:"YYYY-MM-DD HH:mm:ss",daterange:"YYYY-MM-DD"}[c.dateType]||"YYYY-MM-DD",type:c.dateType||"date",onFocus:z=>r.value=c,onChange:z=>b(),placeholder:g.$t("qing-xuan-ze"),"start-placeholder":g.$t("kai-shi-shi-jian"),"end-placeholder":g.$t("jie-shu-shi-jian")},null,8,["class","modelValue","onUpdate:modelValue","value-format","type","onFocus","onChange","placeholder","start-placeholder","end-placeholder"])):e.createCommentVNode("",!0)]}),_:2},1032,["label"]))],64))),128))]),_:1},8,["model"])],4),e.createElementVNode("div",_t,[e.createElementVNode("div",$t,[e.renderSlot(g.$slots,"table-header-left",{},void 0,!0)]),e.createElementVNode("div",Vt,[e.createVNode(Y,{underline:"never",class:"mgr10",onClick:V[0]||(V[0]=()=>{a("visibleChange",!s.value),s.value=!s.value})},{default:e.withCtx(()=>[e.createVNode(we,{name:s.value?"ArrowUp":"ArrowDown"},null,8,["name"]),e.createTextVNode(" "+e.toDisplayString(f.value),1)]),_:1}),e.createVNode(O,{type:"primary",onClick:$},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.$t("shai-xuan")),1)]),_:1}),e.createVNode(O,{type:"primary",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.$t("chong-zhi")),1)]),_:1}),e.renderSlot(g.$slots,"btn",{},void 0,!0)])])],32)}}},[["__scopeId","data-v-32ac9990"]]),Me={pageNoKey:"pageNo",pageSizeKey:"pageSize",totalKey:"total",defaultPageSize:10,pageSizes:[10,50,100,500],responseDataKeys:{rows:["rows","records"],total:["totalRows","total"]},showSearch:!1,showPage:!1,showShadow:!1,showCheckBox:!1,enableCellCopy:!0};let de={...Me};function It(o){de={...de,...o,responseDataKeys:{...de.responseDataKeys,...o.responseDataKeys||{}}}}function Ae(){return de}function Tt(){de={...Me}}const tn="",vt={class:"center"},Et=ce({__name:"index",props:{id:{type:String,required:!1},loading:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},searchForm:{type:Object,default:()=>({items:[],selections:[]})},api:{type:Function},data:{type:Array},tableConfig:{type:Object,default:()=>({})}},setup(o,{expose:t}){const{t:n,locale:l}=ee.useI18n(),a=Te.useRoute(),s=Ae(),r=o,u=e.ref(!1),f=e.ref([]);r.searchForm.showSearch===void 0&&(r.searchForm.showSearch=s.showSearch),r.searchForm.showPage===void 0&&(r.searchForm.showPage=s.showPage),r.searchForm.showShadow===void 0&&(r.searchForm.showShadow=s.showShadow),r.searchForm.showCheckBox===void 0&&(r.searchForm.showCheckBox=s.showCheckBox),r.searchForm.enableCellCopy===void 0&&(r.searchForm.enableCellCopy=s.enableCellCopy),r.searchForm.selections||(r.searchForm.selections=[]);const $=e.computed(()=>{const d=a.path.replace(/\//g,"-").replace(/^-/,"")||"default-table";return r.id?`listPageId-${d}-${r.id}`:`listPageId-${d}`}),S=le.cloneDeep(r.searchForm.items),x=r.searchForm.pageNoKey||s.pageNoKey,b=r.searchForm.pageSizeKey||s.pageSizeKey,w=e.reactive({[x]:1,[b]:r.searchForm.defaultPageSize||s.defaultPageSize,total:0}),p=e.ref(null),h=e.ref(null),g=e.ref(450),V=le.debounce(()=>{e.nextTick(()=>{if(!h.value)return;const i=h.value.getBoundingClientRect(),k=window.innerHeight,E=i.top,M=100,R=k-E-M,F=200;g.value=Math.max(R,F)})},100),_=()=>{V()},I=()=>{if(!r.searchForm.enableCellCopy)return!1;const d=p.value;if(!d||!d.$el)return!1;const i=d.$el;return i.classList.add("cell-copy-enabled"),i.setAttribute("tabindex","-1"),i.removeEventListener("mousedown",X),i.removeEventListener("mousemove",se),i.removeEventListener("mouseup",ue),i.removeEventListener("keydown",$e),i.addEventListener("mousedown",X),i.addEventListener("mousemove",se),i.addEventListener("mouseup",ue),i.addEventListener("keydown",$e),!0};e.onMounted(()=>{V(),window.addEventListener("resize",_),r.searchForm.enableCellCopy&&(document.addEventListener("mouseup",Ue),document.addEventListener("mousedown",je),setTimeout(()=>{I()},500))}),e.onUpdated(()=>{r.searchForm.enableCellCopy&&setTimeout(()=>{I()},500)}),e.onUnmounted(()=>{if(window.removeEventListener("resize",_),r.searchForm.enableCellCopy){document.removeEventListener("mouseup",Ue),document.removeEventListener("mousedown",je);const d=p.value;if(d&&d.$el){const i=d.$el;i.removeEventListener("mousedown",X),i.removeEventListener("mousemove",se),i.removeEventListener("mouseup",ue),i.removeEventListener("keydown",$e)}}});const B=e.computed(()=>te.value.height||g.value);let v;async function Y(d){const{dataFormat:i}=r.tableConfig;d[x]!=1&&(d.nextSearchAfter=v),u.value=!0;const{code:k,data:E={}}=await r.api(d).finally(()=>{u.value=!1,r.searchForm.selections=[]});if(k==200){let M=[];for(const F of s.responseDataKeys.rows)if(E[F]){M=E[F];break}let R=0;for(const F of s.responseDataKeys.total)if(E[F]!==void 0){R=E[F];break}f.value=i?i(M):M,w.total=R,v=E.nextSearchAfter,r.searchForm.enableCellCopy&&e.nextTick(()=>{setTimeout(()=>{I()},100)})}}function O(d={}){const{searchData:i=()=>({})}=r.tableConfig,k=i();Y({...w,...ke(r.searchForm.items),...d,...k})}function c(){const{reset:d}=r.tableConfig;d&&d(),r.searchForm.items.forEach(i=>{const k=S.find(E=>le.isArray(i.key)&&le.isArray(E.key)?i.key.join(",")==E.key.join(","):E.key==i.key);k&&(i.value=k.value)}),O()}r.api&&r.immediate&&O();function y(){return{...w,...ke(r.searchForm.items)}}const L=()=>{const d=p.value;d&&d.clearSort()},z=e.reactive({storage:!0}),W=e.reactive({drag:!0,resizable:!0,maxFixedSize:0}),te=e.computed(()=>{const{customConfig:d,columnConfig:i,...k}=r.tableConfig;return{headerAlign:"left",align:"center",customConfig:{...z,...d},columnConfig:{...W,...i},"virtual-x-config":{enabled:!1,scrollToLeftOnChange:!1},"virtual-y-config":{enabled:!0,gt:100},...k}}),C=e.reactive({isSelecting:!1,startCell:null,endCell:null,selectedCells:[]}),ae=d=>{const i=d.closest(".vxe-body--column");if(!i||i.classList.contains("col--checkbox")||i.classList.contains("col--seq"))return null;const k=i.closest(".vxe-body--row");if(!k)return null;const E=p.value;if(!E)return null;let M=-1;const R=k.getAttribute("data-rowid");if(R!=null)M=parseInt(R,10);else{const D=k.parentElement;M=Array.from(D.querySelectorAll(".vxe-body--row")).indexOf(k)}if(M<0)return null;let F=-1;const J=i.getAttribute("data-colid");if(J&&(F=E.getColumns().findIndex(T=>T.id===J)),F<0){const T=Array.from(k.querySelectorAll(".vxe-body--column")).indexOf(i),q=!!i.closest(".vxe-table--fixed-left-wrapper"),U=!!i.closest(".vxe-table--fixed-right-wrapper"),A=E.getColumns();if(q){const j=A.filter(P=>P.fixed==="left");T<j.length&&(F=A.indexOf(j[T]))}else if(U){const j=A.filter(P=>P.fixed==="right");T<j.length&&(F=A.indexOf(j[T]))}else{const j=r.searchForm.showCheckBox?1:0;F=A.filter(H=>H.fixed==="left").length+T-j}}return F<0?null:{rowIndex:M,colIndex:F,cell:i}},X=d=>{const i=ae(d.target);if(!i){_e();return}C.isSelecting=!0,C.startCell={rowIndex:i.rowIndex,colIndex:i.colIndex},C.endCell={...C.startCell},Pe(),Re()},se=d=>{if(!C.isSelecting)return;const i=ae(d.target);i&&(C.endCell={rowIndex:i.rowIndex,colIndex:i.colIndex},Pe(),Re())},ue=()=>{C.isSelecting=!1},_e=()=>{C.selectedCells=[],C.startCell=null,C.endCell=null;const d=p.value;if(!d)return;d.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(k=>{k.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")})},Pe=()=>{if(!C.startCell||!C.endCell){C.selectedCells=[];return}const d=C.startCell.rowIndex,i=C.endCell.rowIndex,k=C.startCell.colIndex,E=C.endCell.colIndex,M=Math.min(d,i),R=Math.max(d,i),F=Math.min(k,E),J=Math.max(k,E);C.selectedCells=[];for(let D=M;D<=R;D++)for(let T=F;T<=J;T++)C.selectedCells.push({rowIndex:D,colIndex:T})},Re=()=>{e.nextTick(()=>{const d=p.value;if(!d)return;const i=d.$el;if(i.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(q=>{q.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")}),C.selectedCells.length===0)return;const k=d.getColumns(),E=C.selectedCells.map(q=>q.rowIndex),M=C.selectedCells.map(q=>q.colIndex),R=Math.min(...E),F=Math.max(...E),J=Math.min(...M),D=Math.max(...M),T=[i.querySelector(".vxe-table--body-wrapper tbody"),i.querySelector(".vxe-table--fixed-left-wrapper tbody"),i.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean);C.selectedCells.forEach(({rowIndex:q,colIndex:U})=>{const A=k[U];if(!A)return;const j=A.fixed==="left",P=A.fixed==="right";for(const H of T){const fe=H.querySelectorAll(".vxe-body--row")[q];if(!fe)continue;const ne=Array.from(fe.querySelectorAll(".vxe-body--column"));let N=null;if(j&&H.closest(".vxe-table--fixed-left-wrapper")){const Z=k.filter(G=>G.fixed==="left").indexOf(A);N=ne[Z]}else if(P&&H.closest(".vxe-table--fixed-right-wrapper")){const Z=k.filter(G=>G.fixed==="right").indexOf(A);N=ne[Z]}else if(!j&&!P&&H.closest(".vxe-table--body-wrapper")){const oe=r.searchForm.showCheckBox?1:0,Z=k.filter(Ve=>Ve.fixed==="left").length,G=U-Z;N=ne[G+oe]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){N.classList.add("cell-selected"),q===R&&N.classList.add("cell-border-top"),q===F&&N.classList.add("cell-border-bottom"),U===J&&N.classList.add("cell-border-left"),U===D&&N.classList.add("cell-border-right");break}}})})},jt=async()=>{if(C.selectedCells.length===0)return;const d=p.value;if(!d)return;const i=d.$el,k=d.getColumns(),E=[...new Set(C.selectedCells.map(D=>D.rowIndex))].sort((D,T)=>D-T),M=[...new Set(C.selectedCells.map(D=>D.colIndex))].sort((D,T)=>D-T),R=[i.querySelector(".vxe-table--body-wrapper tbody"),i.querySelector(".vxe-table--fixed-left-wrapper tbody"),i.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean),F=[];E.forEach(D=>{const T=[];M.forEach(q=>{const U=k[q];if(!U){T.push("");return}const A=U.fixed==="left",j=U.fixed==="right";let P="";for(const H of R){const fe=H.querySelectorAll(".vxe-body--row")[D];if(!fe)continue;const ne=Array.from(fe.querySelectorAll(".vxe-body--column"));let N=null;if(A&&H.closest(".vxe-table--fixed-left-wrapper")){const Z=k.filter(G=>G.fixed==="left").indexOf(U);N=ne[Z]}else if(j&&H.closest(".vxe-table--fixed-right-wrapper")){const Z=k.filter(G=>G.fixed==="right").indexOf(U);N=ne[Z]}else if(!A&&!j&&H.closest(".vxe-table--body-wrapper")){const oe=r.searchForm.showCheckBox?1:0,Z=k.filter(Ve=>Ve.fixed==="left").length,G=q-Z;N=ne[G+oe]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){P=N.innerText||N.textContent||"",P=P.trim(),P=P.replace(/\n/g," ").replace(/\s+/g," ");break}}T.push(P)}),F.push(T.join(" "))});const J=F.join(`
|
|
2
|
-
`);try{await navigator.clipboard.writeText(J)}catch(D){console.error("复制失败:",D)}},$e=d=>{r.searchForm.enableCellCopy&&((d.ctrlKey||d.metaKey)&&d.key==="c"?C.selectedCells.length>0&&(d.preventDefault(),d.stopPropagation(),jt()):d.key==="Escape"&&_e())},Ue=()=>{C.isSelecting=!1},je=d=>{const i=p.value;if(!i||!i.$el)return;i.$el.contains(d.target)||_e()},Yt=d=>{w[x]=d,O()},Kt=d=>{w[b]=d,w[x]=1,O()};function Ye(){const d=p.value.getCheckboxRecords();r.searchForm.selections=d}const Ke=d=>{const i=p.value;if(i){i.toggleCheckboxRow(d);const k=p.value.getCheckboxRecords();r.searchForm.selections=k}};return t({tableRef:p,getList:O,getPrm:y,clearSort:L,calculateTableHeight:V}),(d,i)=>{var D;const k=e.resolveComponent("el-button"),E=e.resolveComponent("el-checkbox"),M=e.resolveComponent("el-text"),R=e.resolveComponent("vxe-column"),F=e.resolveComponent("VxeTable"),J=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({box:o.searchForm.showShadow})},[o.searchForm.showSearch?(e.openBlock(),e.createBlock(Ne,{key:0,form:o.searchForm,onReset:c,onConfirm:i[1]||(i[1]=T=>O()),onVisibleChange:e.unref(V)},{btn:e.withCtx(()=>[e.renderSlot(d.$slots,"search-bar-btn",{},void 0,!0),e.createVNode(k,{round:"",onClick:i[0]||(i[0]=T=>p.value.openCustom())},{default:e.withCtx(()=>[e.createVNode(we,{name:"Tools"})]),_:1})]),_:3},8,["form","onVisibleChange"])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"table-header-left",{},void 0,!0),e.createElementVNode("div",{ref_key:"tableContentRef",ref:h},[e.createVNode(F,e.mergeProps({id:$.value,ref_key:"tableRef",ref:p,loading:o.loading||u.value,data:o.api?f.value:o.data,border:""},te.value,{height:B.value,onCheckboxChange:Ye,onCheckboxAll:Ye,onSortChange:(D=te.value["sort-config"])==null?void 0:D.sortChange}),{default:e.withCtx(()=>[o.searchForm.showCheckBox==null||o.searchForm.showCheckBox?(e.openBlock(),e.createBlock(R,{key:0,type:"checkbox",width:e.unref(l)=="zh_cn"?80:150,title:d.$t("xu-hao"),fixed:"left"},{checkbox:e.withCtx(({rowIndex:T,row:q,checked:U,disabled:A,indeterminate:j})=>[e.createElementVNode("div",vt,[U?(e.openBlock(),e.createBlock(E,{key:0,checked:!0,disabled:A,size:"default",onClick:e.withModifiers(P=>!A&&Ke(q),["stop"])},null,8,["disabled","onClick"])):(e.openBlock(),e.createBlock(E,{key:1,disabled:A,checked:!1,size:"default",onClick:e.withModifiers(P=>!A&&Ke(q),["stop"])},null,8,["disabled","onClick"])),e.createVNode(M,{type:"info",class:"mgl5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T+1),1)]),_:2},1024)])]),_:1},8,["width","title"])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},16,["id","loading","data","height","onSortChange"])],512),o.searchForm.showPage?(e.openBlock(),e.createBlock(J,{key:1,"current-page":w[e.unref(x)],"onUpdate:currentPage":i[2]||(i[2]=T=>w[e.unref(x)]=T),class:"myPagination mgt10",background:"",layout:"total, sizes, prev, pager, next",total:w.total,"page-size":w[e.unref(b)],"page-sizes":o.searchForm.pageSizes||e.unref(s).pageSizes,onCurrentChange:Yt,onSizeChange:Kt},null,8,["current-page","total","page-size","page-sizes"])):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-de0d59d6"]]),Lt={__name:"index",props:{sheetsConfig:{type:Object,required:!0},fileName:{type:String,required:!0}},setup(o){const t=o;function n(){ze(t.fileName,t.sheetsConfig)}return(l,a)=>{const s=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"primary",underline:"never"},l.$attrs,{onClick:n}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.$t("xia-zai-dao-ru-mo-ban")),1)]),_:1},16)}}};function Ft(o,t={}){const n=pe(),l={inForm:!0,required:!0,...t},a={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}$/,password:/(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/}[o],{inForm:s,value:r,required:u,msg:f=n("validate.invalidInput")}=l;return s?function($,S,x){if(u){a.test(S)?x():x(new Error(f));return}S&&!a.test(S)?x(new Error(f)):x()}:a.test(r)}class Dt{constructor(t={}){this.config={clientCode:t.clientCode||"one-portal",casServerUrl:`https://one-portal${t.isTest?"-test":""}.joy-group.com/api`,casPortalUrl:`https://one-portal${t.isTest?"-test":""}.joy-group.com`,serviceUrl:t.serviceUrl||window.location.origin+"/cas/callback",tokenKey:t.tokenKey||"one_portal_token",userKey:t.userKey||"one_portal_user",debug:t.debug||!1,autoLogin:t.autoLogin!==!1,loginCallback:t.loginCallback||null,logoutCallback:t.logoutCallback||null,errorCallback:t.errorCallback||null},this.token=null,this.user=null,this.init()}init(){this.log("OnePortal CAS SDK 初始化中..."),this.loadFromStorage();const n=new URLSearchParams(window.location.search).get("ticket");this.isLoggedIn()&&this.config.loginCallback?this.config.loginCallback(this.user,this.token):n?(this.log("检测到ST票据:",n),this.validateTicket(n)):this.config.autoLogin&&!this.isLoggedIn()&&(this.log("用户未登录,准备跳转到CAS登录页面"),this.login())}loadFromStorage(){try{this.token=localStorage.getItem(this.config.tokenKey);const t=localStorage.getItem(this.config.userKey);t&&(this.user=JSON.parse(t)),this.log("从本地存储加载数据:",{token:!!this.token,user:!!this.user})}catch(t){this.log("加载本地存储数据失败:",t)}}saveToStorage(){try{this.token&&localStorage.setItem(this.config.tokenKey,this.token),this.user&&localStorage.setItem(this.config.userKey,JSON.stringify(this.user)),this.log("数据已保存到本地存储")}catch(t){this.log("保存到本地存储失败:",t)}}clearStorage(){try{localStorage.removeItem(this.config.tokenKey),localStorage.removeItem(this.config.userKey),this.log("本地存储已清除")}catch(t){this.log("清除本地存储失败:",t)}}isLoggedIn(){return!!(this.token&&this.user)}getUser(){return this.user}getToken(){return this.token}login(){const t=`${this.config.casPortalUrl}?appCode=${this.config.clientCode}&redirectUrl=${encodeURIComponent(this.config.serviceUrl)}`;this.log("跳转到CAS登录页面:",t),window.location.href=t}async validateTicket(t){try{this.log("验证ST票据:",t);const n=await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${t}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);const l=await n.json();if(l.success&&l.data)return this.token=l.data.token,this.user=l.data.user,this.saveToStorage(),this.clearTicketFromUrl(),this.log("ST票据验证成功,用户登录成功:",this.user),this.config.loginCallback&&this.config.loginCallback(this.user,this.token),!0;throw new Error(l.message||"ST票据验证失败")}catch(n){return this.log("ST票据验证失败:",n),this.handleError(n),!1}}clearTicketFromUrl(){const t=new URL(window.location);t.searchParams.delete("ticket"),window.history.replaceState({},document.title,t.toString())}async logout(t=!0){try{if(this.log("用户登出"),this.token)try{await fetch(`${this.config.casServerUrl}/auth/logout`,{method:"POST",headers:{AppId:this.config.clientCode,Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}})}catch(n){this.log("调用服务端登出接口失败:",n)}this.token=null,this.user=null,this.clearStorage(),this.config.logoutCallback&&this.config.logoutCallback(),t&&this.login()}catch(n){this.log("登出失败:",n),this.handleError(n)}}async request(t,n={}){const l={headers:{"Content-Type":"application/json",...n.headers},...n};l.headers.appId=this.config.clientCode,this.token&&(l.headers.Authorization=`Bearer ${this.token}`);try{const a=await fetch(t,l);return a.status===401?(this.log("Token已过期,需要重新登录"),this.logout(),null):a}catch(a){throw this.log("请求失败:",a),a}}async fetchUserInfo(){try{const t=await this.request(`${this.config.casServerUrl}/auth/user`);if(t&&t.ok){const n=await t.json();if(n.success&&n.data)return this.user=n.data,this.saveToStorage(),this.user}return null}catch(t){return this.log("获取用户信息失败:",t),null}}async refreshToken(){this.log("Token刷新功能暂未实现")}handleError(t){this.log("发生错误:",t),this.config.errorCallback&&this.config.errorCallback(t)}log(...t){this.config.debug&&console.log("[OnePortal CAS SDK]",...t)}checkLoginStatus(){return!this.isLoggedIn()&&this.config.autoLogin?(this.login(),!1):this.isLoggedIn()}setConfig(t,n){this.config[t]=n}getConfig(t){return this.config[t]}}function Bt(o,t={}){const l=Object.assign({manual:!1,log:!1,params:null,format:null},t),{manual:a,log:s,params:r={},cb:u,format:f}=l,$=e.ref([]),S=e.ref(!1),x=b=>{const w=b||r;S.value=!0,o(w).then(p=>{const{code:h,data:g,msg:V}=p;if(u){const{records:_,rows:I}=g||{},B=_||I?_||I:g;$.value=xe(B,f),u(p)}if(g){if(g.records!=null||g.rows!=null){const{records:_,rows:I,total:B=0}=g||{};w&&w.total!=null&&(r.total=parseInt(B)),$.value=xe(_||I||[],f)}else $.value=xe(g,f);s&&console.log("useRequest-res",$.value)}}).catch(p=>{u&&(console.log("useRequestErr",p),u({code:500}))}).finally(()=>{S.value=!1})};return a||x(),[S,$,x]}function zt(o){const t=e.ref(o),n=e.ref(""),l=e.ref("");return e.watch(t,a=>{const s=a||["",""];n.value=s[0],l.value=s[1]}),[t,n,l]}function Ot(o){return Object.prototype.toString.call(o).slice(8,-1).toLowerCase()}function xe(o,t){if(!t)return o;if(o instanceof Array)return o.map(l=>{let a={};return t.forEach(s=>a[s]=l[s]),a});let n={};return t.forEach(l=>n[l]=o[l]),n}function Nt(o,t=[]){const{locale:n}=ee.useI18n(),l=e.ref(o());return e.watch([n,...t],()=>{l.value=o()},{immediate:!0}),l}function Mt(o,t="zh_cn",n="en_us"){if(!o)return"-";const l={en_us:n,zh_cn:t},s=Ce().global.locale.value;return o[l[s]]||o[t]||"-"}function At(o,t){let n=Q.mapState;return typeof o=="string"&&o.length>0&&(n=Q.createNamespacedHelpers(o).mapState),qe(t,n)}function qt(o,t){let n=Q.mapGetters;return typeof o=="string"&&o.length>0&&(n=Q.createNamespacedHelpers(o).mapGetters),qe(t,n)}function Pt(o,t){let n=Q.mapActions;return typeof o=="string"&&o.length>0&&(n=Q.createNamespacedHelpers(o).mapActions),Rt(t,n)}function qe(o,t){const n=Q.useStore(),l=t(o),a={};return Object.keys(l).forEach(s=>{const r=l[s].bind({$store:n});a[s]=e.computed(r)}),a}function Rt(o,t){const n=Q.useStore(),l=t(o),a={};return Object.keys(l).forEach(s=>{a[s]=l[s].bind({$store:n})}),a}function Se(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!e.isVNode(o)}function Ut(){ie.VxeUI.renderer.add("Enum",{renderTableDefault(o,t){let n;if([null,void 0].includes(t.row[t.column.field]))return"-";const l=t.row[t.column.field];if(o.type=="tag"){let a;return e.createVNode(e.resolveComponent("el-text"),{type:o.enum.getTag(l)},Se(a=o.enum.getName(l))?a:{default:()=>[a]})}return e.createVNode(e.resolveComponent("el-text"),null,Se(n=o.enum.getName(l))?n:{default:()=>[n]})}}),ie.VxeUI.renderer.add("InputNumber",{renderTableDefault(o,t){return e.createVNode(K.ElInputNumber,e.mergeProps({modelValue:t.row[t.column.field],"onUpdate:modelValue":n=>t.row[t.column.field]=n},o.props,{"step-strictly":!0,"value-on-clear":0}),null)}}),ie.VxeUI.renderer.add("TrueFalse",{renderTableDefault(o,t){const{locale:n}=ee.useI18n();let l=n.value=="zh_cn";return e.createVNode(K.ElText,{type:t.row[t.column.field]?"success":"danger"},{default:()=>[t.row[t.column.field]?l?"是":"YES":l?"否":"NO"]})}}),ie.VxeUI.renderer.add("I18n",{renderTableDefault(o,t){const{locale:n}=ee.useI18n();let l=n.value=="zh_cn"?t.column.field:o.fieldEn;return t.row[l]||t.row[t.column.field]}}),ie.VxeUI.renderer.add("Link",{renderTableDefault(o,t){var u;let n=t.column.field;const l=Te.useRouter(),{multiple:a,to:s}=o;if(!a)return e.createVNode(K.ElLink,{underline:"never",type:"primary",onclick:()=>l.push({path:s,query:{[n]:t.row[n]}})},{default:()=>[t.row[n]]});const r=((u=t.row[n])==null?void 0:u.split(","))||[];return r.map((f,$)=>e.createVNode("span",null,[e.createVNode(K.ElLink,{underline:"never",type:"primary",onclick:()=>l.push({path:s,query:{[n]:f}})},Se(f)?f:{default:()=>[f]}),$<r.length-1?",":""]))}})}m.CmpDictionary=Oe,m.CmpIcon=we,m.ConfrimButton=wt,m.DownExcelTemp=Lt,m.ImportButton=xt,m.LayOutForm=Ze,m.ListPage=Et,m.OnePortalCasSDK=Dt,m.SearchBar=Ne,m.StatusMap=be,m._toRaw=it,m._typeOf=Ot,m.arrToStatusMap=dt,m.arrayToTree=ct,m.checkFileSize=ht,m.creatValidator=Ft,m.createImportFields=gt,m.createListPageId=mt,m.en=ge,m.exportExcel=ze,m.getI18n=Ce,m.getI18nT=pe,m.getListPageConfig=Ae,m.getLocaleValue=Mt,m.getValueBykey=pt,m.importExcel=Xe,m.messages=De,m.registerVxeRenderers=Ut,m.resetListPageConfig=Tt,m.setListPageConfig=It,m.setupI18n=Be,m.sleep=st,m.stringToArray=ye,m.stripHtmlTags=ut,m.unicode2Str=ft,m.useActions=Pt,m.useDatePicker=zt,m.useGetters=qt,m.useI18nReState=Nt,m.useRequest=Bt,m.useState=At,m.zhCn=me,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(m,K){typeof exports=="object"&&typeof module<"u"?K(exports,require("element-plus"),require("vue"),require("file-saver"),require("exceljs"),require("dayjs"),require("vue-i18n"),require("lodash"),require("vue-router"),require("vuex"),require("vxe-pc-ui")):typeof define=="function"&&define.amd?define(["exports","element-plus","vue","file-saver","exceljs","dayjs","vue-i18n","lodash","vue-router","vuex","vxe-pc-ui"],K):(m=typeof globalThis<"u"?globalThis:m||self,K(m.JoyAdminComponents={},m.ElementPlus,m.Vue,m.fileSaver,m.ExcelJS,m.dayjs,m.VueI18n,m._,m.VueRouter,m.Vuex,m.VxeUI))})(this,function(m,K,e,He,Ie,he,ee,le,Te,Q,ie){"use strict";const Ze=e.defineComponent({name:"LayOutForm",setup(o,{slots:t,attrs:n,emit:r}){const a=e.ref(null),s=()=>t.default?t.default().filter(u=>u.type!==Symbol.for("v-cmt")).map(u=>u.type===Symbol.for("v-fgt")?u.children:u).flat().map(u=>{var f;return e.h(K.ElCol,{span:((f=u.props)==null?void 0:f.span)||24},{default:()=>u})}):null;e.onMounted(()=>{r("ref",a.value)});function l(){return e.h(K.ElForm,{...n,ref:a},()=>e.h(K.ElRow,{gutter:n.gutter??20},{default:()=>s()}))}return l}});var ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ee(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Le={exports:{}};(function(o,t){(function(n,r){o.exports=r()})(ve,function(){var n="minute",r=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(s,l,u){var f=l.prototype;u.utc=function(h){var g={date:h,utc:!0,args:arguments};return new l(g)},f.utc=function(h){var g=u(this.toDate(),{locale:this.$L,utc:!0});return h?g.add(this.utcOffset(),n):g},f.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var $=f.parse;f.parse=function(h){h.utc&&(this.$u=!0),this.$utils().u(h.$offset)||(this.$offset=h.$offset),$.call(this,h)};var S=f.init;f.init=function(){if(this.$u){var h=this.$d;this.$y=h.getUTCFullYear(),this.$M=h.getUTCMonth(),this.$D=h.getUTCDate(),this.$W=h.getUTCDay(),this.$H=h.getUTCHours(),this.$m=h.getUTCMinutes(),this.$s=h.getUTCSeconds(),this.$ms=h.getUTCMilliseconds()}else S.call(this)};var x=f.utcOffset;f.utcOffset=function(h,g){var V=this.$utils().u;if(V(h))return this.$u?0:V(this.$offset)?x.call(this):this.$offset;if(typeof h=="string"&&(h=function(v){v===void 0&&(v="");var Y=v.match(r);if(!Y)return null;var O=(""+Y[0]).match(a)||["-",0,0],c=O[0],y=60*+O[1]+ +O[2];return y===0?0:c==="+"?y:-y}(h),h===null))return this;var _=Math.abs(h)<=16?60*h:h;if(_===0)return this.utc(g);var I=this.clone();if(g)return I.$offset=_,I.$u=!1,I;var B=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(I=this.local().add(_+B,n)).$offset=_,I.$x.$localOffset=B,I};var b=f.format;f.format=function(h){var g=h||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return b.call(this,g)},f.valueOf=function(){var h=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*h},f.isUTC=function(){return!!this.$u},f.toISOString=function(){return this.toDate().toISOString()},f.toString=function(){return this.toDate().toUTCString()};var w=f.toDate;f.toDate=function(h){return h==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():w.call(this)};var p=f.diff;f.diff=function(h,g,V){if(h&&this.$u===h.$u)return p.call(this,h,g,V);var _=this.local(),I=u(h).local();return p.call(_,I,g,V)}}})})(Le);var Ge=Le.exports;const We=Ee(Ge);var Fe={exports:{}};(function(o,t){(function(n,r){o.exports=r()})(ve,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},r={};return function(a,s,l){var u,f=function(b,w,p){p===void 0&&(p={});var h=new Date(b),g=function(V,_){_===void 0&&(_={});var I=_.timeZoneName||"short",B=V+"|"+I,v=r[B];return v||(v=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:V,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:I}),r[B]=v),v}(w,p);return g.formatToParts(h)},$=function(b,w){for(var p=f(b,w),h=[],g=0;g<p.length;g+=1){var V=p[g],_=V.type,I=V.value,B=n[_];B>=0&&(h[B]=parseInt(I,10))}var v=h[3],Y=v===24?0:v,O=h[0]+"-"+h[1]+"-"+h[2]+" "+Y+":"+h[4]+":"+h[5]+":000",c=+b;return(l.utc(O).valueOf()-(c-=c%1e3))/6e4},S=s.prototype;S.tz=function(b,w){b===void 0&&(b=u);var p,h=this.utcOffset(),g=this.toDate(),V=g.toLocaleString("en-US",{timeZone:b}),_=Math.round((g-new Date(V))/1e3/60),I=15*-Math.round(g.getTimezoneOffset()/15)-_;if(!Number(I))p=this.utcOffset(0,w);else if(p=l(V,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(I,!0),w){var B=p.utcOffset();p=p.add(h-B,"minute")}return p.$x.$timezone=b,p},S.offsetName=function(b){var w=this.$x.$timezone||l.tz.guess(),p=f(this.valueOf(),w,{timeZoneName:b}).find(function(h){return h.type.toLowerCase()==="timezonename"});return p&&p.value};var x=S.startOf;S.startOf=function(b,w){if(!this.$x||!this.$x.$timezone)return x.call(this,b,w);var p=l(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return x.call(p,b,w).tz(this.$x.$timezone,!0)},l.tz=function(b,w,p){var h=p&&w,g=p||w||u,V=$(+l(),g);if(typeof b!="string")return l(b).tz(g);var _=function(Y,O,c){var y=Y-60*O*1e3,L=$(y,c);if(O===L)return[y,O];var z=$(y-=60*(L-O)*1e3,c);return L===z?[y,L]:[Y-60*Math.min(L,z)*1e3,Math.max(L,z)]}(l.utc(b,h).valueOf(),V,g),I=_[0],B=_[1],v=l(I).utcOffset(B);return v.$x.$timezone=g,v},l.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},l.tz.setDefault=function(b){u=b}}})})(Fe);var Je=Fe.exports;const Qe=Ee(Je),me={"dao-ru":"导入","quan-xuan":"全选","xia-zai-dao-ru-mo-ban":"下载导入模板","xu-hao":"序号","qing-shu-ru":"请输入","qing-xuan-ze":"请选择","kai-shi-shi-jian":"开始时间","jie-shu-shi-jian":"结束时间","shai-xuan":"筛选","chong-zhi":"重置","guan-bi":"关闭","zhan-kai":"展开",excel:{fieldsMappingRequired:"请输入列字段映射",invalidInput:"非法输入",invalidOption:"请输入有效选项!",copyFailed:"复制失败",sheetNameTooLong:'Sheet名称 "{0}" 长度超过31个字符,已自动截断为 "{1}"'},validate:{invalidInput:"请输入正确内容"},tools:{keysLengthError:"keys 长度必须大于2 默认前两位为 label value"}},ge={"dao-ru":"Import","quan-xuan":"Select All","xia-zai-dao-ru-mo-ban":"Download Import Template","xu-hao":"No.","qing-shu-ru":"Please enter","qing-xuan-ze":"Please select","kai-shi-shi-jian":"Start Time","jie-shu-shi-jian":"End Time","shai-xuan":"Filter","chong-zhi":"Reset","guan-bi":"Collapse","zhan-kai":"Expand",excel:{fieldsMappingRequired:"Please enter column field mapping",invalidInput:"Invalid input",invalidOption:"Please enter a valid option!",copyFailed:"Copy failed",sheetNameTooLong:'Sheet name "{0}" exceeds 31 characters, automatically truncated to "{1}"'},validate:{invalidInput:"Please enter valid content"},tools:{keysLengthError:"Keys length must be greater than 2, default first two are label and value"}},De={zh_cn:me,en:ge};let re=null;function Be(o=null){if(o){const{global:t}=o;return t.messages.value.zh_cn?t.mergeLocaleMessage("zh_cn",me):t.setLocaleMessage("zh_cn",me),t.messages.value.en?t.mergeLocaleMessage("en",ge):t.setLocaleMessage("en",ge),re=o,o}return re||(re=ee.createI18n({legacy:!1,locale:"zh_cn",fallbackLocale:"zh_cn",messages:De})),re}function Ce(){return re||Be()}function pe(){return Ce().global.t}he.extend(We),he.extend(Qe);async function Xe(o,t){const{fields:n,range:r=1}=t;if(!n){const l=pe();throw new Error(l("excel.fieldsMappingRequired"))}let a=new Ie.Workbook;await a.xlsx.load(o);const s={};return a.eachSheet(function(l,u){const f=[];l.eachRow(function($,S){if(S>r){let x={},b=!0;Object.keys(n).forEach(w=>{const p=$.getCell(n[w]).value;x[w]=p,p&&(b=!1)}),b||f.push(x)}}),s[l._name]=f}),a=null,s}const et={columnWidth:30};async function ze(o,t,n=[],r={}){if(!o||!t)return;const{columnStyle:a}=r,{columnWidth:s}=et;t.forEach(f=>{f.width=f.width?f.width:s});const{workbook:l,worksheet:u}=tt();u.columns=t,u.addRows(n),a&&await nt(l,u,a);try{const f=await l.xlsx.writeBuffer(),$=new File([f],o,{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});He.saveAs($)}catch(f){console.log(f)}}function tt(){const o=new Ie.Workbook;o.creator="distributor System",o.lastModifiedBy="distributor System",o.created=new Date,o.modified=new Date,o.lastPrinted=new Date;const t=o.addWorksheet("Sheet1");return{workbook:o,worksheet:t}}async function nt(o,t,n){const r=Object.keys(n);for(const a of r){const s=n[a],{type:l}=s;switch(l){case"IMG":await ot(o,t,a);break}}}async function ot(o,t,n,r){const a=t.getColumn(n),s=a.values;t.getColumn(n).width=20,t.eachRow((l,u)=>{u>1&&(l.height=40)});for(let l=0,u=s.length;l<u;l++){if(l<2)continue;let f=s[l];f&&(t.getCell(a.letter+l).value="",await lt(o,t,f,{width:100,height:50,col:a._number-1,row:l-1}))}}async function lt(o,t,n,r){const{col:a,row:s,width:l,height:u}=r,{success:f,base64:$}=await rt(n,.3);if(f){const S=o.addImage({base64:$,extension:"jpeg"});t.addImage(S,{tl:{col:a,row:s},ext:{width:l,height:u}})}}function rt(o,t=1){const n=new Image;return n.setAttribute("crossOrigin","anonymous"),n.crossOrigin="anonymous",n.src=o,new Promise((r,a)=>{n.onload=()=>{const s=document.createElement("canvas");s.width=n.width,s.height=n.height,s.getContext("2d").drawImage(n,0,0,s.width,s.height),r({success:!0,base64:s.toDataURL("image/jpeg",t)})},n.onerror=()=>{r({success:!1})}})}function at(o){if(o<26)return String.fromCharCode(65+o);{const t=String.fromCharCode(65+Math.floor((o-26)/26)),n=String.fromCharCode(65+(o-26)%26);return t+n}}function st(o){return new Promise(t=>{setTimeout(()=>{t()},o)})}function it(o){return JSON.parse(JSON.stringify(o))}function ct(o){let t=[],n={},r=(a,s)=>Object.prototype.hasOwnProperty.call(a,s);for(const a of o){n[a.id]={...a,children:r(n,a.id)?n[a.id].children:[]};const s=n[a.id];a.pid==-1?t.push(s):(r(n,a.pid)||(n[a.pid]={children:[]}),n[a.pid].children.push(s))}return t}function ye(o,t=" "){return o?o.split(t).filter(n=>n.trim()):[]}class be{constructor(t,n=["label","value","labelEn"]){this.list=t,this.map=new Map(t.map(r=>{let a={...r,label:r[n[0]],value:r[n[1]]};return n[2]&&(a.labelEn=r[n[2]]),[r[n[1]],a]}))}getName(t,n){if(!this.has(t))return"-";const{label:r,labelEn:a}=this.map.get(t);return(n=="zh_cn"?r:a)||r||"-"}getTag(t){if(!this.has(t))return"info";const{tag:n="info"}=this.map.get(t);return n}getItem(t){return this.has(t)?this.map.get(t):null}getColor(t){if(!this.has(t))return null;const{color:n}=this.map.get(t);return n}has(t){return this.map.has(t)}}function dt(o,t=[],n="i18nName"){if(o.length==0)return new be([]);if(t.length<2){const a=pe();throw new Error(a("tools.keysLengthError"))}let r=o.map(a=>{let s={};return n&&(s.labelEn=a[n]),t.forEach((l,u)=>{u===0?s.label=a[l]:u===1?s.value=a[l]:s[l]=a[l]}),s});return new be(r)}function ut(o){return o?o.replace(/<[^>]+>/g,""):""}function ft(o){return o?(o.includes("\\\\u")&&(o=o.replace(/\\/g,"")),o.replace(/\\u[\dA-F]{4}/gi,t=>String.fromCharCode(parseInt(t.replace(/\\u/g,""),16)))):""}function ht(o,t=10){let n=1048576*t;return!(o.size>n)}function mt(o){return Array.from(10).fill(0).map((n,r)=>o+"_"+r)}function gt(o){let t={};return o.map((n,r)=>{let{key:a,option:s,type:l}=n,u=at(r);s?t[a]=`${u}---option`:l==="image"?t[a]=`${u}---image`:t[a]=u}),t}function pt(o,t){return t.split(".").reduce((n,r)=>n&&n[r],o)}const Zt="",ce=(o,t)=>{const n=o.__vccOpts||o;for(const[r,a]of t)n[r]=a;return n},Ct=["onClick"],Oe=ce({__name:"index",props:e.mergeModels({api:{type:Function},showCheckAll:{type:Boolean,default:!0},maxLimit:{type:Number,default:void 0},optionClick:{type:Function,default:()=>{}},data:{type:Array},labelValue:{type:Object,default:()=>({label:"label",labelEn:"labelEn",value:"value"})},changeLocal:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["success","change","changeAll"],["update:modelValue"]),setup(o,{emit:t}){const n=o,r=e.useAttrs(),{t:a,locale:s}=ee.useI18n(),l=e.useModel(o,"modelValue"),u=e.computed(()=>r["value-key"]!=null),f=e.ref(""),$=e.computed(()=>{if(r.remote!==void 0)return n.data;const c=ye(f.value),{data:y,labelValue:L}=n,z=y||b.value;if(c.length==0)return z;const{label:W,labelEn:te}=L;let C=s.value=="en_us"?te||"i18nName":W;return c.length==1?z.filter(X=>X[C].toLowerCase().includes(c[0].toLowerCase())):z.filter(X=>{let se=!1;return se=c.some(ue=>X[C].toLowerCase()==ue.toLowerCase()),se})}),S=e.computed({get(){return r.multiple==null||l.value==null?!1:l.value.length==$.value.length},set(c){return c}}),x=t,b=e.ref([]),w=async()=>{const{data:c}=await n.api();b.value=[...c],x("success",b)};n.api&&w();function p(c){x("change",c)}const h=n.labelValue.label.split("-"),g=c=>{if(h.length==1){if(n.changeLocal)return a(c[n.labelValue.label]);let y=s.value=="en_us"?c[n.labelValue.labelEn||"i18nName"]:c[n.labelValue.label];return y=y||c[n.labelValue.label],y}else{let y=[];return h.forEach(L=>{y.push(c[L])}),y.join("-")}};function V(c){let y=n.data?n.data:b.value;l.value=c?y.map(L=>u.value?L:L[n.labelValue.value]):[],e.nextTick(()=>{x("change",l.value),x("changeAll",l.value,y)})}function _(c){n.optionClick&&n.optionClick(c),x("change",u.value?c:c[n.labelValue.value])}function I(c){return l.value.length>=n.maxLimit&&!l.value.includes(c[n.labelValue.value])}function B(c){return c.map(y=>({...y,label:g(y),value:u.value?y:y[n.labelValue.value]}))}const v=e.ref([]),Y=n.data?n.data:b.value;v.value=B(Y),e.watch(()=>n.data?n.data:b.value,c=>{var L;const y=B(c);if(y.length!==v.value.length)v.value=y;else{let z=!1;for(let W=0;W<y.length;W++)if(y[W].value!==((L=v.value[W])==null?void 0:L.value)){z=!0;break}z&&(v.value=y)}},{deep:!0});const O=e.computed(()=>v.value);return(c,y)=>{const L=e.resolveComponent("el-checkbox"),z=e.resolveComponent("el-select-v2"),W=e.resolveComponent("el-option"),te=e.resolveComponent("el-select");return e.unref(r).v2!=null?(e.openBlock(),e.createBlock(z,e.mergeProps({key:0,options:O.value,modelValue:l.value,"onUpdate:modelValue":y[1]||(y[1]=C=>l.value=C)},e.unref(r),{filterable:"","collapse-tags":"","collapse-tags-tooltip":"",clearable:"",onChange:p,onClear:p}),e.createSlots({default:e.withCtx(({item:C})=>[e.createElementVNode("div",{onClick:ae=>_(C)},e.toDisplayString(C.label),9,Ct)]),_:2},[e.unref(r).multiple!=null?{name:"header",fn:e.withCtx(()=>[e.renderSlot(c.$slots,"header",{},()=>[e.createVNode(L,{class:"mgl20",modelValue:S.value,"onUpdate:modelValue":y[0]||(y[0]=C=>S.value=C),onChange:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0)]),key:"0"}:void 0]),1040,["options","modelValue"])):(e.openBlock(),e.createBlock(te,e.mergeProps({key:1,modelValue:l.value,"onUpdate:modelValue":y[3]||(y[3]=C=>l.value=C),filterable:"","collapse-tags":"","collapse-tags-tooltip":"","filter-method":e.unref(r).remote!=null?void 0:C=>f.value=C,clearable:""},e.unref(r),{onClear:o.optionClick}),{default:e.withCtx(()=>[e.unref(r).multiple!=null&&o.showCheckAll&&o.maxLimit==null?e.renderSlot(c.$slots,"header",{key:0},()=>[e.createVNode(L,{class:"mgl20",modelValue:S.value,"onUpdate:modelValue":y[2]||(y[2]=C=>S.value=C),onChange:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.$t("quan-xuan")),1)]),_:1},8,["modelValue"])],!0):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(C,ae)=>(e.openBlock(),e.createBlock(W,{key:ae,label:g(C),disabled:e.unref(r).multiple!=null&&o.maxLimit>0?I(C):!1,onClick:e.withModifiers(X=>_(C),["stop"]),value:u.value?C:C[o.labelValue.value]},null,8,["label","disabled","onClick","value"]))),128))]),_:3},16,["modelValue","filter-method","onClear"]))}}},[["__scopeId","data-v-d12f3c20"]]),Wt="",yt=e.defineComponent({props:{name:{tyepe:String,required:!0}}});function bt(o,t,n,r,a,s){const l=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(l,{class:"cmp-icon"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.name)))]),_:1})}const we=ce(yt,[["render",bt],["__scopeId","data-v-733f9daa"]]),wt={__name:"index",emits:["ok","no"],setup(o,{emit:t}){const n=t,r=le.debounce(()=>{n("ok")},500);function a(){n("no")}return(s,l)=>{const u=e.resolveComponent("el-link"),f=e.resolveComponent("el-popconfirm");return e.openBlock(),e.createBlock(f,e.mergeProps(s.$attrs,{onConfirm:e.unref(r),onCancel:a}),{reference:e.withCtx(()=>[e.createVNode(u,{underline:"never",type:s.$attrs.type},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:3},8,["type"])]),_:3},16,["onConfirm"])}}},Jt="",kt=["accept"],xt=ce({__name:"index",props:{accept:{type:String,default:".xlsx,.xls"},loading:{type:Boolean,default:!1}},emits:["fileChange"],setup(o,{emit:t}){const n=t,r=e.ref(null);function a(s){let l=s.target.files[0];n("fileChange",l),r.value.value=null}return(s,l)=>{const u=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("span",null,[e.createVNode(u,{loading:o.loading,class:"mgr10",onClick:l[0]||(l[0]=f=>r.value.click())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.$t("dao-ru")),1)]),_:1},8,["loading"]),e.createElementVNode("input",{onChange:a,ref_key:"input",ref:r,accept:o.accept,style:{position:"absolute",width:"0px",height:"0px",opacity:"0"},type:"file"},null,40,kt)])}}},[["__scopeId","data-v-5f1449ad"]]);function ke(o){let t={};return o.forEach(n=>{const{key:r,type:a,option:s={},value:l,dateType:u}=n;if(r)if(a=="input"&&(s!=null&&s.multiple))t[r]=ye(l);else if(a=="date")if(u.includes("range")){const[f,$]=r;let[S,x]=l||[];S&&u=="daterange"&&(S=he(S).format("YYYY-MM-DD 00:00:00"),x=he(x).format("YYYY-MM-DD 23:59:59")),t[f]=S,t[$]=x}else t[r]=l;else t[r]=l}),t}const Xt="",St={key:0},_t={class:"btns"},$t={class:"left"},Vt={class:"right"},Ne=ce({__name:"index",props:{form:{type:Object,required:!0}},emits:["confirm","reset","visibleChange"],setup(o,{expose:t,emit:n}){const r=o,a=n,s=e.ref(!0),l=e.ref(null),{t:u}=ee.useI18n(),f=e.computed(()=>s.value?u("guan-bi"):u("zhan-kai"));function $(){a("confirm")}function S(g){g.option.onClear&&g.option.onClear(),a("confirm")}function x(){a("reset")}function b(){a("confirm")}function w(){return ke(r.form.items)}const p=le.cloneDeep(r.form.items);function h(){r.form.items.forEach(g=>{const V=p.find(_=>_.key==g.key);V&&(g.value=V.value)})}return t({getPrm:w,reset:h}),(g,V)=>{const _=e.resolveComponent("el-input"),I=e.resolveComponent("el-date-picker"),B=e.resolveComponent("el-form-item"),v=e.resolveComponent("el-form"),Y=e.resolveComponent("el-link"),O=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",{class:"searchBar-container mgt10 mgb10",onKeydown:e.withKeys($,["enter"])},[e.createElementVNode("div",{class:"searchBar",style:e.normalizeStyle({height:s.value?"auto":"42px"})},[e.createVNode(v,{inline:"",model:o.form.data},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.form.items.filter(c=>!c.hidden),c=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c.key},[c.type=="br"?(e.openBlock(),e.createElementBlock("br",St)):(e.openBlock(),e.createBlock(B,{key:1,label:c.name},{default:e.withCtx(()=>{var y,L;return[c.type==="input"?(e.openBlock(),e.createBlock(_,{key:0,modelValue:c.value,"onUpdate:modelValue":z=>c.value=z,class:e.normalizeClass(((y=c.option)==null?void 0:y.class)||"w150"),placeholder:g.$t("qing-shu-ru"),clearable:""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"])):c.type==="custom"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c.render),{key:1})):e.createCommentVNode("",!0),c.type==="select"?(e.openBlock(),e.createBlock(Oe,e.mergeProps({key:2,class:((L=c.option)==null?void 0:L.class)||"w150",modelValue:c.value,"onUpdate:modelValue":z=>c.value=z},{ref_for:!0},c.option,{onChange:$,onClear:z=>S(c)}),null,16,["class","modelValue","onUpdate:modelValue","onClear"])):e.createCommentVNode("",!0),c.type==="date"?(e.openBlock(),e.createBlock(I,{key:3,class:e.normalizeClass({datetimerange:"w300",daterange:"w200"}[c.dateType]||"w100"),modelValue:c.value,"onUpdate:modelValue":z=>c.value=z,"value-format":{datetimerange:"YYYY-MM-DD HH:mm:ss",daterange:"YYYY-MM-DD"}[c.dateType]||"YYYY-MM-DD",type:c.dateType||"date",onFocus:z=>l.value=c,onChange:z=>b(),placeholder:g.$t("qing-xuan-ze"),"start-placeholder":g.$t("kai-shi-shi-jian"),"end-placeholder":g.$t("jie-shu-shi-jian")},null,8,["class","modelValue","onUpdate:modelValue","value-format","type","onFocus","onChange","placeholder","start-placeholder","end-placeholder"])):e.createCommentVNode("",!0)]}),_:2},1032,["label"]))],64))),128))]),_:1},8,["model"])],4),e.createElementVNode("div",_t,[e.createElementVNode("div",$t,[e.renderSlot(g.$slots,"table-header-left",{},void 0,!0)]),e.createElementVNode("div",Vt,[e.createVNode(Y,{underline:"never",class:"mgr10",onClick:V[0]||(V[0]=()=>{a("visibleChange",!s.value),s.value=!s.value})},{default:e.withCtx(()=>[e.createVNode(we,{name:s.value?"ArrowUp":"ArrowDown"},null,8,["name"]),e.createTextVNode(" "+e.toDisplayString(f.value),1)]),_:1}),e.createVNode(O,{type:"primary",onClick:$},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.$t("shai-xuan")),1)]),_:1}),e.createVNode(O,{type:"primary",onClick:x},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.$t("chong-zhi")),1)]),_:1}),e.renderSlot(g.$slots,"btn",{},void 0,!0)])])],32)}}},[["__scopeId","data-v-32ac9990"]]),Me={pageNoKey:"pageNo",pageSizeKey:"pageSize",totalKey:"total",defaultPageSize:10,pageSizes:[10,50,100,500],responseDataKeys:{rows:["rows","records"],total:["totalRows","total"]},showSearch:!1,showPage:!1,showShadow:!1,showCheckBox:!1,enableCellCopy:!0};let de={...Me};function It(o){de={...de,...o,responseDataKeys:{...de.responseDataKeys,...o.responseDataKeys||{}}}}function Ae(){return de}function Tt(){de={...Me}}const tn="",vt={class:"center"},Et=ce({__name:"index",props:{id:{type:String,required:!1},loading:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0},searchForm:{type:Object,default:()=>({items:[],selections:[]})},api:{type:Function},data:{type:Array},tableConfig:{type:Object,default:()=>({})}},setup(o,{expose:t}){const{t:n,locale:r}=ee.useI18n(),a=Te.useRoute(),s=Ae(),l=o,u=e.ref(!1),f=e.ref([]);l.searchForm.showSearch===void 0&&(l.searchForm.showSearch=s.showSearch),l.searchForm.showPage===void 0&&(l.searchForm.showPage=s.showPage),l.searchForm.showShadow===void 0&&(l.searchForm.showShadow=s.showShadow),l.searchForm.showCheckBox===void 0&&(l.searchForm.showCheckBox=s.showCheckBox),l.searchForm.enableCellCopy===void 0&&(l.searchForm.enableCellCopy=s.enableCellCopy),l.searchForm.selections||(l.searchForm.selections=[]);const $=e.computed(()=>{const d=a.path.replace(/\//g,"-").replace(/^-/,"")||"default-table";return l.id?`listPageId-${d}-${l.id}`:`listPageId-${d}`}),S=le.cloneDeep(l.searchForm.items),x=l.searchForm.pageNoKey||s.pageNoKey,b=l.searchForm.pageSizeKey||s.pageSizeKey,w=e.reactive({[x]:1,[b]:l.searchForm.defaultPageSize||s.defaultPageSize,total:0}),p=e.ref(null),h=e.ref(null),g=e.ref(450),V=le.debounce(()=>{e.nextTick(()=>{if(!h.value)return;const i=h.value.getBoundingClientRect(),k=window.innerHeight,E=i.top,M=100,R=k-E-M,F=200;g.value=Math.max(R,F)})},100),_=()=>{V()},I=()=>{if(!l.searchForm.enableCellCopy)return!1;const d=p.value;if(!d||!d.$el)return!1;const i=d.$el;return i.classList.add("cell-copy-enabled"),i.setAttribute("tabindex","-1"),i.removeEventListener("mousedown",X),i.removeEventListener("mousemove",se),i.removeEventListener("mouseup",ue),i.removeEventListener("keydown",$e),i.addEventListener("mousedown",X),i.addEventListener("mousemove",se),i.addEventListener("mouseup",ue),i.addEventListener("keydown",$e),!0};e.onMounted(()=>{V(),window.addEventListener("resize",_),l.searchForm.enableCellCopy&&(document.addEventListener("mouseup",Ue),document.addEventListener("mousedown",je),setTimeout(()=>{I()},500))}),e.onUpdated(()=>{l.searchForm.enableCellCopy&&setTimeout(()=>{I()},500)}),e.onUnmounted(()=>{if(window.removeEventListener("resize",_),l.searchForm.enableCellCopy){document.removeEventListener("mouseup",Ue),document.removeEventListener("mousedown",je);const d=p.value;if(d&&d.$el){const i=d.$el;i.removeEventListener("mousedown",X),i.removeEventListener("mousemove",se),i.removeEventListener("mouseup",ue),i.removeEventListener("keydown",$e)}}});const B=e.computed(()=>te.value.height||g.value);let v;async function Y(d){const{dataFormat:i}=l.tableConfig;d[x]!=1&&(d.nextSearchAfter=v),u.value=!0;const{code:k,data:E={}}=await l.api(d).finally(()=>{u.value=!1,l.searchForm.selections=[]});if(k==200){let M=[];for(const F of s.responseDataKeys.rows)if(E[F]){M=E[F];break}let R=0;for(const F of s.responseDataKeys.total)if(E[F]!==void 0){R=E[F];break}f.value=i?i(M):M,w.total=R,v=E.nextSearchAfter,l.searchForm.enableCellCopy&&e.nextTick(()=>{setTimeout(()=>{I()},100)})}}function O(d={}){const{searchData:i=()=>({})}=l.tableConfig,k=i();Y({...w,...ke(l.searchForm.items),...d,...k})}function c(){const{reset:d}=l.tableConfig;d&&d(),l.searchForm.items.forEach(i=>{const k=S.find(E=>le.isArray(i.key)&&le.isArray(E.key)?i.key.join(",")==E.key.join(","):E.key==i.key);k&&(i.value=k.value)}),O()}l.api&&l.immediate&&O();function y(){return{...w,...ke(l.searchForm.items)}}const L=()=>{const d=p.value;d&&d.clearSort()},z=e.reactive({storage:!0}),W=e.reactive({drag:!0,resizable:!0,maxFixedSize:0}),te=e.computed(()=>{const{customConfig:d,columnConfig:i,...k}=l.tableConfig;return{headerAlign:"left",align:"center",customConfig:{...z,...d},columnConfig:{...W,...i},"virtual-x-config":{enabled:!1,scrollToLeftOnChange:!1},"virtual-y-config":{enabled:!0,gt:100},...k}}),C=e.reactive({isSelecting:!1,startCell:null,endCell:null,selectedCells:[]}),ae=d=>{const i=d.closest(".vxe-body--column");if(!i||i.classList.contains("col--checkbox")||i.classList.contains("col--seq"))return null;const k=i.closest(".vxe-body--row");if(!k)return null;const E=p.value;if(!E)return null;let M=-1;const R=k.getAttribute("data-rowid");if(R!=null)M=parseInt(R,10);else{const D=k.parentElement;M=Array.from(D.querySelectorAll(".vxe-body--row")).indexOf(k)}if(M<0)return null;let F=-1;const J=i.getAttribute("data-colid");if(J&&(F=E.getColumns().findIndex(T=>T.id===J)),F<0){const T=Array.from(k.querySelectorAll(".vxe-body--column")).indexOf(i),q=!!i.closest(".vxe-table--fixed-left-wrapper"),U=!!i.closest(".vxe-table--fixed-right-wrapper"),A=E.getColumns();if(q){const j=A.filter(P=>P.fixed==="left");T<j.length&&(F=A.indexOf(j[T]))}else if(U){const j=A.filter(P=>P.fixed==="right");T<j.length&&(F=A.indexOf(j[T]))}else{const j=l.searchForm.showCheckBox?1:0;F=A.filter(H=>H.fixed==="left").length+T-j}}return F<0?null:{rowIndex:M,colIndex:F,cell:i}},X=d=>{const i=ae(d.target);if(!i){_e();return}C.isSelecting=!0,C.startCell={rowIndex:i.rowIndex,colIndex:i.colIndex},C.endCell={...C.startCell},Pe(),Re()},se=d=>{if(!C.isSelecting)return;const i=ae(d.target);i&&(C.endCell={rowIndex:i.rowIndex,colIndex:i.colIndex},Pe(),Re())},ue=()=>{C.isSelecting=!1},_e=()=>{C.selectedCells=[],C.startCell=null,C.endCell=null;const d=p.value;if(!d)return;d.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(k=>{k.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")})},Pe=()=>{if(!C.startCell||!C.endCell){C.selectedCells=[];return}const d=C.startCell.rowIndex,i=C.endCell.rowIndex,k=C.startCell.colIndex,E=C.endCell.colIndex,M=Math.min(d,i),R=Math.max(d,i),F=Math.min(k,E),J=Math.max(k,E);C.selectedCells=[];for(let D=M;D<=R;D++)for(let T=F;T<=J;T++)C.selectedCells.push({rowIndex:D,colIndex:T})},Re=()=>{e.nextTick(()=>{const d=p.value;if(!d)return;const i=d.$el;if(i.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach(q=>{q.classList.remove("cell-selected","cell-border-top","cell-border-right","cell-border-bottom","cell-border-left")}),C.selectedCells.length===0)return;const k=d.getColumns(),E=C.selectedCells.map(q=>q.rowIndex),M=C.selectedCells.map(q=>q.colIndex),R=Math.min(...E),F=Math.max(...E),J=Math.min(...M),D=Math.max(...M),T=[i.querySelector(".vxe-table--body-wrapper tbody"),i.querySelector(".vxe-table--fixed-left-wrapper tbody"),i.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean);C.selectedCells.forEach(({rowIndex:q,colIndex:U})=>{const A=k[U];if(!A)return;const j=A.fixed==="left",P=A.fixed==="right";for(const H of T){const fe=H.querySelectorAll(".vxe-body--row")[q];if(!fe)continue;const ne=Array.from(fe.querySelectorAll(".vxe-body--column"));let N=null;if(j&&H.closest(".vxe-table--fixed-left-wrapper")){const Z=k.filter(G=>G.fixed==="left").indexOf(A);N=ne[Z]}else if(P&&H.closest(".vxe-table--fixed-right-wrapper")){const Z=k.filter(G=>G.fixed==="right").indexOf(A);N=ne[Z]}else if(!j&&!P&&H.closest(".vxe-table--body-wrapper")){const oe=l.searchForm.showCheckBox?1:0,Z=k.filter(Ve=>Ve.fixed==="left").length,G=U-Z;N=ne[G+oe]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){N.classList.add("cell-selected"),q===R&&N.classList.add("cell-border-top"),q===F&&N.classList.add("cell-border-bottom"),U===J&&N.classList.add("cell-border-left"),U===D&&N.classList.add("cell-border-right");break}}})})},jt=async()=>{if(C.selectedCells.length===0)return;const d=p.value;if(!d)return;const i=d.$el,k=d.getColumns(),E=[...new Set(C.selectedCells.map(D=>D.rowIndex))].sort((D,T)=>D-T),M=[...new Set(C.selectedCells.map(D=>D.colIndex))].sort((D,T)=>D-T),R=[i.querySelector(".vxe-table--body-wrapper tbody"),i.querySelector(".vxe-table--fixed-left-wrapper tbody"),i.querySelector(".vxe-table--fixed-right-wrapper tbody")].filter(Boolean),F=[];E.forEach(D=>{const T=[];M.forEach(q=>{const U=k[q];if(!U){T.push("");return}const A=U.fixed==="left",j=U.fixed==="right";let P="";for(const H of R){const fe=H.querySelectorAll(".vxe-body--row")[D];if(!fe)continue;const ne=Array.from(fe.querySelectorAll(".vxe-body--column"));let N=null;if(A&&H.closest(".vxe-table--fixed-left-wrapper")){const Z=k.filter(G=>G.fixed==="left").indexOf(U);N=ne[Z]}else if(j&&H.closest(".vxe-table--fixed-right-wrapper")){const Z=k.filter(G=>G.fixed==="right").indexOf(U);N=ne[Z]}else if(!A&&!j&&H.closest(".vxe-table--body-wrapper")){const oe=l.searchForm.showCheckBox?1:0,Z=k.filter(Ve=>Ve.fixed==="left").length,G=q-Z;N=ne[G+oe]}if(N&&!N.classList.contains("col--checkbox")&&!N.classList.contains("col--seq")){P=N.innerText||N.textContent||"",P=P.trim(),P=P.replace(/\n/g," ").replace(/\s+/g," ");break}}T.push(P)}),F.push(T.join(" "))});const J=F.join(`
|
|
2
|
+
`);try{await navigator.clipboard.writeText(J)}catch(D){console.error("复制失败:",D)}},$e=d=>{l.searchForm.enableCellCopy&&((d.ctrlKey||d.metaKey)&&d.key==="c"?C.selectedCells.length>0&&(d.preventDefault(),d.stopPropagation(),jt()):d.key==="Escape"&&_e())},Ue=()=>{C.isSelecting=!1},je=d=>{const i=p.value;if(!i||!i.$el)return;i.$el.contains(d.target)||_e()},Yt=d=>{w[x]=d,O()},Kt=d=>{w[b]=d,w[x]=1,O()};function Ye(){const d=p.value.getCheckboxRecords();l.searchForm.selections=d}const Ke=d=>{const i=p.value;if(i){i.toggleCheckboxRow(d);const k=p.value.getCheckboxRecords();l.searchForm.selections=k}};return t({tableRef:p,getList:O,getPrm:y,clearSort:L,calculateTableHeight:V}),(d,i)=>{var D;const k=e.resolveComponent("el-button"),E=e.resolveComponent("el-checkbox"),M=e.resolveComponent("el-text"),R=e.resolveComponent("vxe-column"),F=e.resolveComponent("VxeTable"),J=e.resolveComponent("el-pagination");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass({box:o.searchForm.showShadow})},[o.searchForm.showSearch?(e.openBlock(),e.createBlock(Ne,{key:0,form:o.searchForm,onReset:c,onConfirm:i[1]||(i[1]=T=>O()),onVisibleChange:e.unref(V)},{btn:e.withCtx(()=>[e.renderSlot(d.$slots,"search-bar-btn",{},void 0,!0),e.createVNode(k,{round:"",onClick:i[0]||(i[0]=T=>p.value.openCustom())},{default:e.withCtx(()=>[e.createVNode(we,{name:"Tools"})]),_:1})]),_:3},8,["form","onVisibleChange"])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"table-header-left",{},void 0,!0),e.createElementVNode("div",{ref_key:"tableContentRef",ref:h},[e.createVNode(F,e.mergeProps({id:$.value,ref_key:"tableRef",ref:p,loading:o.loading||u.value,data:o.api?f.value:o.data,border:""},te.value,{height:B.value,onCheckboxChange:Ye,onCheckboxAll:Ye,onSortChange:(D=te.value["sort-config"])==null?void 0:D.sortChange}),{default:e.withCtx(()=>[o.searchForm.showCheckBox==null||o.searchForm.showCheckBox?(e.openBlock(),e.createBlock(R,{key:0,type:"checkbox",width:e.unref(r)=="zh_cn"?80:150,title:d.$t("xu-hao"),fixed:"left"},{checkbox:e.withCtx(({rowIndex:T,row:q,checked:U,disabled:A,indeterminate:j})=>[e.createElementVNode("div",vt,[U?(e.openBlock(),e.createBlock(E,{key:0,checked:!0,disabled:A,size:"default",onClick:e.withModifiers(P=>!A&&Ke(q),["stop"])},null,8,["disabled","onClick"])):(e.openBlock(),e.createBlock(E,{key:1,disabled:A,checked:!1,size:"default",onClick:e.withModifiers(P=>!A&&Ke(q),["stop"])},null,8,["disabled","onClick"])),e.createVNode(M,{type:"info",class:"mgl5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T+1),1)]),_:2},1024)])]),_:1},8,["width","title"])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"default",{},void 0,!0)]),_:3},16,["id","loading","data","height","onSortChange"])],512),o.searchForm.showPage?(e.openBlock(),e.createBlock(J,{key:1,"current-page":w[e.unref(x)],"onUpdate:currentPage":i[2]||(i[2]=T=>w[e.unref(x)]=T),class:"myPagination mgt10",background:"",layout:"total, sizes, prev, pager, next",total:w.total,"page-size":w[e.unref(b)],"page-sizes":o.searchForm.pageSizes||e.unref(s).pageSizes,onCurrentChange:Yt,onSizeChange:Kt},null,8,["current-page","total","page-size","page-sizes"])):e.createCommentVNode("",!0)],2)}}},[["__scopeId","data-v-de0d59d6"]]),Lt={__name:"index",props:{sheetsConfig:{type:Object,required:!0},fileName:{type:String,required:!0}},setup(o){const t=o;function n(){ze(t.fileName,t.sheetsConfig)}return(r,a)=>{const s=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(s,e.mergeProps({type:"primary",underline:"never"},r.$attrs,{onClick:n}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.$t("xia-zai-dao-ru-mo-ban")),1)]),_:1},16)}}};function Ft(o,t={}){const n=pe(),r={inForm:!0,required:!0,...t},a={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}$/,password:/(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,email:/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/}[o],{inForm:s,value:l,required:u,msg:f=n("validate.invalidInput")}=r;return s?function($,S,x){if(u){a.test(S)?x():x(new Error(f));return}S&&!a.test(S)?x(new Error(f)):x()}:a.test(l)}class Dt{constructor(t={}){this.config={clientCode:t.clientCode||"one-portal",casServerUrl:`https://one-portal${t.isTest?"-test":""}.joy-group.com/api`,casPortalUrl:`https://one-portal${t.isTest?"-test":""}.joy-group.com`,serviceUrl:t.serviceUrl||window.location.origin+"/cas/callback",tokenKey:t.tokenKey||"one_portal_token",userKey:t.userKey||"one_portal_user",debug:t.debug||!1,autoLogin:t.autoLogin!==!1,loginCallback:t.loginCallback||null,logoutCallback:t.logoutCallback||null,errorCallback:t.errorCallback||null},this.token=null,this.user=null,this.init()}init(){this.log("OnePortal CAS SDK 初始化中..."),this.loadFromStorage();const n=new URLSearchParams(window.location.search).get("ticket");this.isLoggedIn()&&this.config.loginCallback?this.config.loginCallback(this.user,this.token):n?(this.log("检测到ST票据:",n),this.validateTicket(n)):this.config.autoLogin&&!this.isLoggedIn()&&(this.log("用户未登录,准备跳转到CAS登录页面"),this.login())}loadFromStorage(){try{this.token=localStorage.getItem(this.config.tokenKey);const t=localStorage.getItem(this.config.userKey);t&&(this.user=JSON.parse(t)),this.log("从本地存储加载数据:",{token:!!this.token,user:!!this.user})}catch(t){this.log("加载本地存储数据失败:",t)}}saveToStorage(){try{this.token&&localStorage.setItem(this.config.tokenKey,this.token),this.user&&localStorage.setItem(this.config.userKey,JSON.stringify(this.user)),this.log("数据已保存到本地存储")}catch(t){this.log("保存到本地存储失败:",t)}}clearStorage(){try{localStorage.removeItem(this.config.tokenKey),localStorage.removeItem(this.config.userKey),this.log("本地存储已清除")}catch(t){this.log("清除本地存储失败:",t)}}isLoggedIn(){return!!(this.token&&this.user)}getUser(){return this.user}getToken(){return this.token}login(){const t=`${this.config.casPortalUrl}?appCode=${this.config.clientCode}&redirectUrl=${encodeURIComponent(this.config.serviceUrl)}`;this.log("跳转到CAS登录页面:",t),window.location.href=t}async validateTicket(t){try{this.log("验证ST票据:",t);const n=await fetch(`${this.config.casServerUrl}/auth/validateST?ticket=${t}`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);const r=await n.json();if(r.success&&r.data)return this.token=r.data.token,this.user=r.data.user,this.saveToStorage(),this.clearTicketFromUrl(),this.log("ST票据验证成功,用户登录成功:",this.user),this.config.loginCallback&&this.config.loginCallback(this.user,this.token),!0;throw new Error(r.message||"ST票据验证失败")}catch(n){return this.log("ST票据验证失败:",n),this.handleError(n),!1}}clearTicketFromUrl(){const t=new URL(window.location);t.searchParams.delete("ticket"),window.history.replaceState({},document.title,t.toString())}async logout(t=!0){try{if(this.log("用户登出"),this.token)try{await fetch(`${this.config.casServerUrl}/auth/logout`,{method:"POST",headers:{AppId:this.config.clientCode,Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}})}catch(n){this.log("调用服务端登出接口失败:",n)}this.token=null,this.user=null,this.clearStorage(),this.config.logoutCallback&&this.config.logoutCallback(),t&&this.login()}catch(n){this.log("登出失败:",n),this.handleError(n)}}async request(t,n={}){const r={headers:{"Content-Type":"application/json",...n.headers},...n};r.headers.appId=this.config.clientCode,this.token&&(r.headers.Authorization=`Bearer ${this.token}`);try{const a=await fetch(t,r);return a.status===401?(this.log("Token已过期,需要重新登录"),this.logout(),null):a}catch(a){throw this.log("请求失败:",a),a}}async fetchUserInfo(){try{const t=await this.request(`${this.config.casServerUrl}/auth/user`);if(t&&t.ok){const n=await t.json();if(n.success&&n.data)return this.user=n.data,this.saveToStorage(),this.user}return null}catch(t){return this.log("获取用户信息失败:",t),null}}async refreshToken(){this.log("Token刷新功能暂未实现")}handleError(t){this.log("发生错误:",t),this.config.errorCallback&&this.config.errorCallback(t)}log(...t){this.config.debug&&console.log("[OnePortal CAS SDK]",...t)}checkLoginStatus(){return!this.isLoggedIn()&&this.config.autoLogin?(this.login(),!1):this.isLoggedIn()}setConfig(t,n){this.config[t]=n}getConfig(t){return this.config[t]}}function Bt(o,t={}){const r=Object.assign({manual:!1,log:!1,params:null,format:null},t),{manual:a,log:s,params:l={},cb:u,format:f}=r,$=e.ref([]),S=e.ref(!1),x=b=>{const w=b||l;S.value=!0,o(w).then(p=>{const{code:h,data:g,msg:V}=p;if(u){const{records:_,rows:I}=g||{},B=_||I?_||I:g;$.value=xe(B,f),u(p)}if(g){if(g.records!=null||g.rows!=null){const{records:_,rows:I,total:B=0}=g||{};w&&w.total!=null&&(l.total=parseInt(B)),$.value=xe(_||I||[],f)}else $.value=xe(g,f);s&&console.log("useRequest-res",$.value)}}).catch(p=>{u&&(console.log("useRequestErr",p),u({code:500}))}).finally(()=>{S.value=!1})};return a||x(),[S,$,x]}function zt(o){const t=e.ref(o),n=e.ref(""),r=e.ref("");return e.watch(t,a=>{const s=a||["",""];n.value=s[0],r.value=s[1]}),[t,n,r]}function Ot(o){return Object.prototype.toString.call(o).slice(8,-1).toLowerCase()}function xe(o,t){if(!t)return o;if(o instanceof Array)return o.map(r=>{let a={};return t.forEach(s=>a[s]=r[s]),a});let n={};return t.forEach(r=>n[r]=o[r]),n}function Nt(o,t=[]){const{locale:n}=ee.useI18n(),r=e.ref(o());return e.watch([n,...t],()=>{r.value=o()},{immediate:!0}),r}function Mt(o,t="zh_cn",n="en_us"){if(!o)return"-";const r={en_us:n,zh_cn:t},s=Ce().global.locale.value;return o[r[s]]||o[t]||"-"}function At(o,t){let n=Q.mapState;return typeof o=="string"&&o.length>0&&(n=Q.createNamespacedHelpers(o).mapState),qe(t,n)}function qt(o,t){let n=Q.mapGetters;return typeof o=="string"&&o.length>0&&(n=Q.createNamespacedHelpers(o).mapGetters),qe(t,n)}function Pt(o,t){let n=Q.mapActions;return typeof o=="string"&&o.length>0&&(n=Q.createNamespacedHelpers(o).mapActions),Rt(t,n)}function qe(o,t){const n=Q.useStore(),r=t(o),a={};return Object.keys(r).forEach(s=>{const l=r[s].bind({$store:n});a[s]=e.computed(l)}),a}function Rt(o,t){const n=Q.useStore(),r=t(o),a={};return Object.keys(r).forEach(s=>{a[s]=r[s].bind({$store:n})}),a}function Se(o){return typeof o=="function"||Object.prototype.toString.call(o)==="[object Object]"&&!e.isVNode(o)}function Ut(){ie.VxeUI.renderer.add("Enum",{renderTableDefault(o,t){let n;if([null,void 0].includes(t.row[t.column.field]))return"-";const r=t.row[t.column.field];if(o.type=="tag"){let a;return e.createVNode(e.resolveComponent("el-text"),{type:o.enum.getTag(r)},Se(a=o.enum.getName(r))?a:{default:()=>[a]})}return e.createVNode(e.resolveComponent("el-text"),null,Se(n=o.enum.getName(r))?n:{default:()=>[n]})}}),ie.VxeUI.renderer.add("InputNumber",{renderTableDefault(o,t){return e.createVNode(K.ElInputNumber,e.mergeProps({modelValue:t.row[t.column.field],"onUpdate:modelValue":n=>t.row[t.column.field]=n},o.props,{"step-strictly":!0,"value-on-clear":0}),null)}}),ie.VxeUI.renderer.add("TrueFalse",{renderTableDefault(o,t){const{locale:n}=ee.useI18n();let r=n.value=="zh_cn";return e.createVNode(K.ElText,{type:t.row[t.column.field]?"success":"danger"},{default:()=>[t.row[t.column.field]?r?"是":"YES":r?"否":"NO"]})}}),ie.VxeUI.renderer.add("I18n",{renderTableDefault(o,t){const{locale:n}=ee.useI18n();let r=n.value=="zh_cn"?t.column.field:o.fieldEn;return t.row[r]||t.row[t.column.field]}}),ie.VxeUI.renderer.add("Link",{renderTableDefault(o,t){var u;let n=t.column.field;const r=Te.useRouter(),{multiple:a,to:s}=o;if(!a)return e.createVNode(K.ElLink,{underline:"never",type:"primary",onclick:()=>r.push({path:s,query:{[n]:t.row[n]}})},{default:()=>[t.row[n]]});const l=((u=t.row[n])==null?void 0:u.split(","))||[];return l.map((f,$)=>e.createVNode("span",null,[e.createVNode(K.ElLink,{underline:"never",type:"primary",onclick:()=>r.push({path:s,query:{[n]:f}})},Se(f)?f:{default:()=>[f]}),$<l.length-1?",":""]))}})}m.CmpDictionary=Oe,m.CmpIcon=we,m.ConfrimButton=wt,m.DownExcelTemp=Lt,m.ImportButton=xt,m.LayOutForm=Ze,m.ListPage=Et,m.OnePortalCasSDK=Dt,m.SearchBar=Ne,m.StatusMap=be,m._toRaw=it,m._typeOf=Ot,m.arrToStatusMap=dt,m.arrayToTree=ct,m.checkFileSize=ht,m.creatValidator=Ft,m.createImportFields=gt,m.createListPageId=mt,m.en=ge,m.exportExcel=ze,m.getI18n=Ce,m.getI18nT=pe,m.getListPageConfig=Ae,m.getLocaleValue=Mt,m.getValueBykey=pt,m.importExcel=Xe,m.messages=De,m.registerVxeRenderers=Ut,m.resetListPageConfig=Tt,m.setListPageConfig=It,m.setupI18n=Be,m.sleep=st,m.stringToArray=ye,m.stripHtmlTags=ut,m.unicode2Str=ft,m.useActions=Pt,m.useDatePicker=zt,m.useGetters=qt,m.useI18nReState=Nt,m.useRequest=Bt,m.useState=At,m.zhCn=me,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.cmp-icon[data-v-
|
|
1
|
+
.cmp-icon[data-v-d12f3c20],.cmp-icon[data-v-733f9daa],.cmp-icon[data-v-5f1449ad]{padding:0!important}.searchBar-container .searchBar[data-v-32ac9990]{overflow:hidden;transition:all .3s}.searchBar-container .btns[data-v-32ac9990]{display:flex;justify-content:space-between;align-items:center}.searchBar-container .btns .left[data-v-32ac9990]{display:flex;align-items:center}.searchBar-container .btns .left[data-v-32ac9990] .el-tabs__header{margin:0}.searchBar-container .btns .right[data-v-32ac9990]{text-align:right}[data-v-de0d59d6] .vxe-table-custom-wrapper.placement--top-right.is--active{max-height:400px!important}[data-v-de0d59d6] .vxe-table.cell-copy-enabled .vxe-body--column{-webkit-user-select:none;user-select:none}[data-v-de0d59d6] .vxe-table.cell-copy-enabled .vxe-body--column.cell-selected{background-color:#409eff26!important;position:relative}[data-v-de0d59d6] .vxe-table.cell-copy-enabled .vxe-body--column.cell-border-top:before{content:"";position:absolute;top:0;left:0;right:0;height:1px;background-color:#409eff;pointer-events:none;z-index:10}[data-v-de0d59d6] .vxe-table.cell-copy-enabled .vxe-body--column.cell-border-bottom:after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background-color:#409eff;pointer-events:none;z-index:10}[data-v-de0d59d6] .vxe-table.cell-copy-enabled .vxe-body--column.cell-border-left{border-left:1px solid #409eff!important}[data-v-de0d59d6] .vxe-table.cell-copy-enabled .vxe-body--column.cell-border-right{border-right:1px solid #409eff!important}
|