joy-admin-components 0.2.17 → 0.2.20
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 +394 -384
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as It, ElText as Lt, ElLink as Je } from "element-plus";
|
|
2
|
-
import { defineComponent as ot, ref as R, onMounted as lt, h as Te, mergeModels as Xe, useAttrs as Ft, useModel as Tt, computed as
|
|
2
|
+
import { defineComponent as ot, ref as R, onMounted as lt, h as Te, mergeModels as Xe, useAttrs as Ft, useModel as Tt, computed as re, watch as Pe, resolveComponent as O, unref as K, openBlock as L, createBlock as H, mergeProps as he, createSlots as at, withCtx as D, createElementVNode as ae, toDisplayString as J, renderSlot as X, createVNode as z, createTextVNode as Q, createCommentVNode as ce, createElementBlock as se, Fragment as Oe, renderList as st, withModifiers as Me, nextTick as Se, resolveDynamicComponent as rt, withKeys as Dt, normalizeStyle as zt, normalizeClass as Ve, reactive as $e, onUpdated as Ot, onUnmounted as Mt, withDirectives as Vt, isVNode as qt } from "vue";
|
|
3
3
|
import { saveAs as it } from "file-saver";
|
|
4
4
|
import Ee from "exceljs";
|
|
5
5
|
import ke from "dayjs";
|
|
@@ -11,14 +11,14 @@ import { VxeUI as xe } from "vxe-pc-ui";
|
|
|
11
11
|
const Vn = ot({
|
|
12
12
|
name: "LayOutForm",
|
|
13
13
|
setup(t, { slots: e, attrs: n, emit: a }) {
|
|
14
|
-
const s = R(null), o = () => e.default ? e.default().filter((
|
|
15
|
-
(
|
|
16
|
-
var
|
|
14
|
+
const s = R(null), o = () => e.default ? e.default().filter((r) => r.type !== Symbol.for("v-cmt")).map((r) => r.type === Symbol.for("v-fgt") ? r.children : r).flat().map(
|
|
15
|
+
(r) => {
|
|
16
|
+
var i;
|
|
17
17
|
return Te(
|
|
18
18
|
St,
|
|
19
|
-
{ span: ((
|
|
19
|
+
{ span: ((i = r.props) == null ? void 0 : i.span) || 24 },
|
|
20
20
|
{
|
|
21
|
-
default: () =>
|
|
21
|
+
default: () => r
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
}
|
|
@@ -46,40 +46,40 @@ var ht = { exports: {} };
|
|
|
46
46
|
t.exports = a();
|
|
47
47
|
})(dt, function() {
|
|
48
48
|
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
|
|
49
|
-
return function(o, l,
|
|
50
|
-
var
|
|
51
|
-
|
|
49
|
+
return function(o, l, r) {
|
|
50
|
+
var i = l.prototype;
|
|
51
|
+
r.utc = function(u) {
|
|
52
52
|
var h = { date: u, utc: !0, args: arguments };
|
|
53
53
|
return new l(h);
|
|
54
|
-
},
|
|
55
|
-
var h =
|
|
54
|
+
}, i.utc = function(u) {
|
|
55
|
+
var h = r(this.toDate(), { locale: this.$L, utc: !0 });
|
|
56
56
|
return u ? h.add(this.utcOffset(), n) : h;
|
|
57
|
-
},
|
|
58
|
-
return
|
|
57
|
+
}, i.local = function() {
|
|
58
|
+
return r(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset),
|
|
60
|
+
var v = i.parse;
|
|
61
|
+
i.parse = function(u) {
|
|
62
|
+
u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), v.call(this, u);
|
|
63
63
|
};
|
|
64
|
-
var
|
|
65
|
-
|
|
64
|
+
var w = i.init;
|
|
65
|
+
i.init = function() {
|
|
66
66
|
if (this.$u) {
|
|
67
67
|
var u = this.$d;
|
|
68
68
|
this.$y = u.getUTCFullYear(), this.$M = u.getUTCMonth(), this.$D = u.getUTCDate(), this.$W = u.getUTCDay(), this.$H = u.getUTCHours(), this.$m = u.getUTCMinutes(), this.$s = u.getUTCSeconds(), this.$ms = u.getUTCMilliseconds();
|
|
69
69
|
} else
|
|
70
|
-
|
|
70
|
+
w.call(this);
|
|
71
71
|
};
|
|
72
|
-
var
|
|
73
|
-
|
|
72
|
+
var b = i.utcOffset;
|
|
73
|
+
i.utcOffset = function(u, h) {
|
|
74
74
|
var k = this.$utils().u;
|
|
75
75
|
if (k(u))
|
|
76
|
-
return this.$u ? 0 : k(this.$offset) ?
|
|
76
|
+
return this.$u ? 0 : k(this.$offset) ? b.call(this) : this.$offset;
|
|
77
77
|
if (typeof u == "string" && (u = function(E) {
|
|
78
78
|
E === void 0 && (E = "");
|
|
79
|
-
var
|
|
80
|
-
if (!
|
|
79
|
+
var B = E.match(a);
|
|
80
|
+
if (!B)
|
|
81
81
|
return null;
|
|
82
|
-
var F = ("" +
|
|
82
|
+
var F = ("" + B[0]).match(s) || ["-", 0, 0], d = F[0], x = 60 * +F[1] + +F[2];
|
|
83
83
|
return x === 0 ? 0 : d === "+" ? x : -x;
|
|
84
84
|
}(u), u === null))
|
|
85
85
|
return this;
|
|
@@ -92,29 +92,29 @@ var ht = { exports: {} };
|
|
|
92
92
|
var S = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
93
|
return (C = this.local().add(_ + S, n)).$offset = _, C.$x.$localOffset = S, C;
|
|
94
94
|
};
|
|
95
|
-
var p =
|
|
96
|
-
|
|
95
|
+
var p = i.format;
|
|
96
|
+
i.format = function(u) {
|
|
97
97
|
var h = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
98
98
|
return p.call(this, h);
|
|
99
|
-
},
|
|
99
|
+
}, i.valueOf = function() {
|
|
100
100
|
var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
101
101
|
return this.$d.valueOf() - 6e4 * u;
|
|
102
|
-
},
|
|
102
|
+
}, i.isUTC = function() {
|
|
103
103
|
return !!this.$u;
|
|
104
|
-
},
|
|
104
|
+
}, i.toISOString = function() {
|
|
105
105
|
return this.toDate().toISOString();
|
|
106
|
-
},
|
|
106
|
+
}, i.toString = function() {
|
|
107
107
|
return this.toDate().toUTCString();
|
|
108
108
|
};
|
|
109
|
-
var g =
|
|
110
|
-
|
|
111
|
-
return u === "s" && this.$offset ?
|
|
109
|
+
var g = i.toDate;
|
|
110
|
+
i.toDate = function(u) {
|
|
111
|
+
return u === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
|
|
112
112
|
};
|
|
113
|
-
var m =
|
|
114
|
-
|
|
113
|
+
var m = i.diff;
|
|
114
|
+
i.diff = function(u, h, k) {
|
|
115
115
|
if (u && this.$u === u.$u)
|
|
116
116
|
return m.call(this, u, h, k);
|
|
117
|
-
var _ = this.local(), C =
|
|
117
|
+
var _ = this.local(), C = r(u).local();
|
|
118
118
|
return m.call(_, C, h, k);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
@@ -129,7 +129,7 @@ var mt = { exports: {} };
|
|
|
129
129
|
})(dt, function() {
|
|
130
130
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
131
131
|
return function(s, o, l) {
|
|
132
|
-
var
|
|
132
|
+
var r, i = function(p, g, m) {
|
|
133
133
|
m === void 0 && (m = {});
|
|
134
134
|
var u = new Date(p), h = function(k, _) {
|
|
135
135
|
_ === void 0 && (_ = {});
|
|
@@ -137,16 +137,16 @@ var mt = { exports: {} };
|
|
|
137
137
|
return E || (E = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: k, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[S] = E), E;
|
|
138
138
|
}(g, m);
|
|
139
139
|
return h.formatToParts(u);
|
|
140
|
-
},
|
|
141
|
-
for (var m =
|
|
140
|
+
}, v = function(p, g) {
|
|
141
|
+
for (var m = i(p, g), u = [], h = 0; h < m.length; h += 1) {
|
|
142
142
|
var k = m[h], _ = k.type, C = k.value, S = n[_];
|
|
143
143
|
S >= 0 && (u[S] = parseInt(C, 10));
|
|
144
144
|
}
|
|
145
|
-
var E = u[3],
|
|
145
|
+
var E = u[3], B = E === 24 ? 0 : E, F = u[0] + "-" + u[1] + "-" + u[2] + " " + B + ":" + u[4] + ":" + u[5] + ":000", d = +p;
|
|
146
146
|
return (l.utc(F).valueOf() - (d -= d % 1e3)) / 6e4;
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
p === void 0 && (p =
|
|
147
|
+
}, w = o.prototype;
|
|
148
|
+
w.tz = function(p, g) {
|
|
149
|
+
p === void 0 && (p = r);
|
|
150
150
|
var m, u = this.utcOffset(), h = this.toDate(), k = h.toLocaleString("en-US", { timeZone: p }), _ = Math.round((h - new Date(k)) / 1e3 / 60), C = 15 * -Math.round(h.getTimezoneOffset() / 15) - _;
|
|
151
151
|
if (!Number(C))
|
|
152
152
|
m = this.utcOffset(0, g);
|
|
@@ -155,34 +155,34 @@ var mt = { exports: {} };
|
|
|
155
155
|
m = m.add(u - S, "minute");
|
|
156
156
|
}
|
|
157
157
|
return m.$x.$timezone = p, m;
|
|
158
|
-
},
|
|
159
|
-
var g = this.$x.$timezone || l.tz.guess(), m =
|
|
158
|
+
}, w.offsetName = function(p) {
|
|
159
|
+
var g = this.$x.$timezone || l.tz.guess(), m = i(this.valueOf(), g, { timeZoneName: p }).find(function(u) {
|
|
160
160
|
return u.type.toLowerCase() === "timezonename";
|
|
161
161
|
});
|
|
162
162
|
return m && m.value;
|
|
163
163
|
};
|
|
164
|
-
var
|
|
165
|
-
|
|
164
|
+
var b = w.startOf;
|
|
165
|
+
w.startOf = function(p, g) {
|
|
166
166
|
if (!this.$x || !this.$x.$timezone)
|
|
167
|
-
return
|
|
167
|
+
return b.call(this, p, g);
|
|
168
168
|
var m = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
|
-
return
|
|
169
|
+
return b.call(m, p, g).tz(this.$x.$timezone, !0);
|
|
170
170
|
}, l.tz = function(p, g, m) {
|
|
171
|
-
var u = m && g, h = m || g ||
|
|
171
|
+
var u = m && g, h = m || g || r, k = v(+l(), h);
|
|
172
172
|
if (typeof p != "string")
|
|
173
173
|
return l(p).tz(h);
|
|
174
|
-
var _ = function(
|
|
175
|
-
var x =
|
|
176
|
-
if (F ===
|
|
174
|
+
var _ = function(B, F, d) {
|
|
175
|
+
var x = B - 60 * F * 1e3, M = v(x, d);
|
|
176
|
+
if (F === M)
|
|
177
177
|
return [x, F];
|
|
178
|
-
var A =
|
|
179
|
-
return
|
|
178
|
+
var A = v(x -= 60 * (M - F) * 1e3, d);
|
|
179
|
+
return M === A ? [x, M] : [B - 60 * Math.min(M, A) * 1e3, Math.max(M, A)];
|
|
180
180
|
}(l.utc(p, u).valueOf(), k, h), C = _[0], S = _[1], E = l(C).utcOffset(S);
|
|
181
181
|
return E.$x.$timezone = h, E;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
184
|
}, l.tz.setDefault = function(p) {
|
|
185
|
-
|
|
185
|
+
r = p;
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
});
|
|
@@ -292,17 +292,17 @@ async function qn(t, e) {
|
|
|
292
292
|
let s = new Ee.Workbook();
|
|
293
293
|
await s.xlsx.load(t);
|
|
294
294
|
const o = {};
|
|
295
|
-
return s.eachSheet(function(l,
|
|
296
|
-
const
|
|
297
|
-
l.eachRow(function(
|
|
298
|
-
if (
|
|
299
|
-
let
|
|
295
|
+
return s.eachSheet(function(l, r) {
|
|
296
|
+
const i = [];
|
|
297
|
+
l.eachRow(function(v, w) {
|
|
298
|
+
if (w > a) {
|
|
299
|
+
let b = {}, p = !0;
|
|
300
300
|
Object.keys(n).forEach((g) => {
|
|
301
|
-
const m =
|
|
302
|
-
|
|
303
|
-
}), p ||
|
|
301
|
+
const m = v.getCell(n[g]).value;
|
|
302
|
+
b[g] = m, m && (p = !1);
|
|
303
|
+
}), p || i.push(b);
|
|
304
304
|
}
|
|
305
|
-
}), o[l._name] =
|
|
305
|
+
}), o[l._name] = i;
|
|
306
306
|
}), s = null, o;
|
|
307
307
|
}
|
|
308
308
|
const gt = {
|
|
@@ -312,18 +312,18 @@ async function An(t, e, n = [], a = {}) {
|
|
|
312
312
|
if (!t || !e)
|
|
313
313
|
return;
|
|
314
314
|
const { columnStyle: s } = a, { columnWidth: o } = gt;
|
|
315
|
-
e.forEach((
|
|
316
|
-
|
|
315
|
+
e.forEach((i) => {
|
|
316
|
+
i.width = i.width ? i.width : o;
|
|
317
317
|
});
|
|
318
|
-
const { workbook: l, worksheet:
|
|
319
|
-
|
|
318
|
+
const { workbook: l, worksheet: r } = Gt();
|
|
319
|
+
r.columns = e, r.addRows(n), s && await Jt(l, r, s);
|
|
320
320
|
try {
|
|
321
|
-
const
|
|
321
|
+
const i = await l.xlsx.writeBuffer(), v = new File([i], t, {
|
|
322
322
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
323
323
|
});
|
|
324
|
-
it(
|
|
325
|
-
} catch (
|
|
326
|
-
console.log(
|
|
324
|
+
it(v);
|
|
325
|
+
} catch (i) {
|
|
326
|
+
console.log(i);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
function Gt() {
|
|
@@ -345,14 +345,14 @@ async function Jt(t, e, n) {
|
|
|
345
345
|
}
|
|
346
346
|
async function Xt(t, e, n, a) {
|
|
347
347
|
const s = e.getColumn(n), o = s.values;
|
|
348
|
-
e.getColumn(n).width = 20, e.eachRow((l,
|
|
349
|
-
|
|
348
|
+
e.getColumn(n).width = 20, e.eachRow((l, r) => {
|
|
349
|
+
r > 1 && (l.height = 40);
|
|
350
350
|
});
|
|
351
|
-
for (let l = 0,
|
|
351
|
+
for (let l = 0, r = o.length; l < r; l++) {
|
|
352
352
|
if (l < 2)
|
|
353
353
|
continue;
|
|
354
|
-
let
|
|
355
|
-
|
|
354
|
+
let i = o[l];
|
|
355
|
+
i && (e.getCell(s.letter + l).value = "", await Qt(t, e, i, {
|
|
356
356
|
width: 100,
|
|
357
357
|
height: 50,
|
|
358
358
|
col: s._number - 1,
|
|
@@ -361,15 +361,15 @@ async function Xt(t, e, n, a) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function Qt(t, e, n, a) {
|
|
364
|
-
const { col: s, row: o, width: l, height:
|
|
365
|
-
if (
|
|
366
|
-
const
|
|
367
|
-
base64:
|
|
364
|
+
const { col: s, row: o, width: l, height: r } = a, { success: i, base64: v } = await en(n, 0.3);
|
|
365
|
+
if (i) {
|
|
366
|
+
const w = t.addImage({
|
|
367
|
+
base64: v,
|
|
368
368
|
extension: "jpeg"
|
|
369
369
|
});
|
|
370
|
-
e.addImage(
|
|
370
|
+
e.addImage(w, {
|
|
371
371
|
tl: { col: s, row: o },
|
|
372
|
-
ext: { width: l, height:
|
|
372
|
+
ext: { width: l, height: r }
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
}
|
|
@@ -398,34 +398,34 @@ async function tn(t, e) {
|
|
|
398
398
|
let s = new Ee.Workbook();
|
|
399
399
|
await s.xlsx.load(t);
|
|
400
400
|
const o = {};
|
|
401
|
-
return s.eachSheet(function(l,
|
|
401
|
+
return s.eachSheet(function(l, r) {
|
|
402
402
|
if (l.state == "visible") {
|
|
403
|
-
const
|
|
404
|
-
if (
|
|
405
|
-
let
|
|
406
|
-
|
|
403
|
+
const i = [], v = n[l._name];
|
|
404
|
+
if (v) {
|
|
405
|
+
let w = Object.values(v).some((p) => p.includes("image")), b = {};
|
|
406
|
+
w && (l.getImages().forEach((g) => {
|
|
407
407
|
const { tl: m } = g.range, u = s.model.media.find((h) => h.index === g.imageId);
|
|
408
408
|
if (u) {
|
|
409
409
|
const h = u.buffer.toString("base64"), k = `data:image/${u.extension};base64,${h}`, _ = `${Math.ceil(m.row)}_${Math.ceil(m.col)}`;
|
|
410
|
-
|
|
410
|
+
b[_] ? b[_].push(k) : b[_] = [k];
|
|
411
411
|
}
|
|
412
|
-
}), console.log("withImages-imageMap",
|
|
412
|
+
}), console.log("withImages-imageMap", b)), l.eachRow(function(p, g) {
|
|
413
413
|
if (g > a) {
|
|
414
414
|
let m = {}, u = !0;
|
|
415
|
-
Object.keys(
|
|
415
|
+
Object.keys(v).forEach((h) => {
|
|
416
416
|
var E;
|
|
417
|
-
let [k, _] =
|
|
417
|
+
let [k, _] = v[h].split(je);
|
|
418
418
|
const C = p.getCell(k);
|
|
419
419
|
let S;
|
|
420
|
-
if (_ == "image" &&
|
|
421
|
-
const
|
|
422
|
-
S =
|
|
420
|
+
if (_ == "image" && w) {
|
|
421
|
+
const B = C._column._number, F = `${g}_${B}`;
|
|
422
|
+
S = b[F] || "";
|
|
423
423
|
} else
|
|
424
|
-
C.result != null ? S = C.result : (E = C.value) != null && E.richText ? S = C.value.richText.reduce((
|
|
424
|
+
C.result != null ? S = C.result : (E = C.value) != null && E.richText ? S = C.value.richText.reduce((B, F) => B + F.text, "") : C.type == 4 && C.value ? S = ke(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : S = C.value;
|
|
425
425
|
S && _ == "option" && (S = S.split(je)[1]), m[h] = S, S && (u = !1);
|
|
426
|
-
}), u ||
|
|
426
|
+
}), u || i.push(m);
|
|
427
427
|
}
|
|
428
|
-
}), o[l._name] =
|
|
428
|
+
}), o[l._name] = i;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
}), s = null, o;
|
|
@@ -435,30 +435,30 @@ async function nn(t, e) {
|
|
|
435
435
|
return;
|
|
436
436
|
const n = on(e);
|
|
437
437
|
n.eachSheet(function(a, s) {
|
|
438
|
-
const { columnWidth: o } = gt, { tableHeader: l, tableData:
|
|
439
|
-
l.forEach((
|
|
440
|
-
if (
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
...
|
|
438
|
+
const { columnWidth: o } = gt, { tableHeader: l, tableData: r } = e[a._name];
|
|
439
|
+
l.forEach((i) => {
|
|
440
|
+
if (i.required) {
|
|
441
|
+
const v = i.style || {}, { font: w = {} } = v;
|
|
442
|
+
i.style = {
|
|
443
|
+
...v,
|
|
444
444
|
font: {
|
|
445
|
-
...
|
|
445
|
+
...w,
|
|
446
446
|
color: {
|
|
447
447
|
argb: "FFFF0000"
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
}), a.columns = l, a.addRows(
|
|
453
|
-
const { header:
|
|
454
|
-
if (g.width =
|
|
455
|
-
const m = n.addWorksheet(
|
|
452
|
+
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
453
|
+
const { header: v, key: w, width: b, option: p } = i, g = a.getColumn(w);
|
|
454
|
+
if (g.width = b || o, p) {
|
|
455
|
+
const m = n.addWorksheet(w);
|
|
456
456
|
m.state = "hidden", m.getColumn(1).values = p.map((u) => `${u.label}${je}${u.value}`), Array(100).fill("").forEach((u, h) => {
|
|
457
457
|
if (h > 0) {
|
|
458
458
|
const k = ve();
|
|
459
459
|
a.getCell(`${g.letter}${h}`).dataValidation = {
|
|
460
460
|
type: "list",
|
|
461
|
-
formulae: [`${
|
|
461
|
+
formulae: [`${w}!$A$1:$A$${p.length}`],
|
|
462
462
|
showErrorMessage: !0,
|
|
463
463
|
error: k("excel.invalidInput"),
|
|
464
464
|
errorStyle: "stop",
|
|
@@ -481,8 +481,8 @@ async function nn(t, e) {
|
|
|
481
481
|
function on(t) {
|
|
482
482
|
const e = ve(), n = new Ee.Workbook();
|
|
483
483
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(t).sort((s, o) => {
|
|
484
|
-
const l = t[s].sort ?? 0,
|
|
485
|
-
return l -
|
|
484
|
+
const l = t[s].sort ?? 0, r = t[o].sort ?? 0;
|
|
485
|
+
return l - r;
|
|
486
486
|
}).forEach((s) => {
|
|
487
487
|
let o = s, l = !1;
|
|
488
488
|
/[\\/:*?\[\]]/g.test(s) && (s = s.replace(/[\\/:*?\[\]]/g, ""), l = !0), s.length > 31 && (s = s.substring(0, 31).trim(), l = !0, console.warn(e("excel.sheetNameTooLong", [o, s]))), l && (t[s] = t[o], delete t[o]), n.addWorksheet(s);
|
|
@@ -567,8 +567,8 @@ function Rn(t, e = [], n = "i18nName") {
|
|
|
567
567
|
}
|
|
568
568
|
let a = t.map((s) => {
|
|
569
569
|
let o = {};
|
|
570
|
-
return n && (o.labelEn = s[n]), e.forEach((l,
|
|
571
|
-
|
|
570
|
+
return n && (o.labelEn = s[n]), e.forEach((l, r) => {
|
|
571
|
+
r === 0 ? o.label = s[l] : r === 1 ? o.value = s[l] : o[l] = s[l];
|
|
572
572
|
}), o;
|
|
573
573
|
});
|
|
574
574
|
return new et(a);
|
|
@@ -589,8 +589,8 @@ function Hn(t) {
|
|
|
589
589
|
function Nn(t) {
|
|
590
590
|
let e = {};
|
|
591
591
|
return t.map((n, a) => {
|
|
592
|
-
let { key: s, option: o, type: l } = n,
|
|
593
|
-
o ? e[s] = `${
|
|
592
|
+
let { key: s, option: o, type: l } = n, r = ln(a);
|
|
593
|
+
o ? e[s] = `${r}---option` : l === "image" ? e[s] = `${r}---image` : e[s] = r;
|
|
594
594
|
}), e;
|
|
595
595
|
}
|
|
596
596
|
function Wn(t, e) {
|
|
@@ -641,36 +641,36 @@ const _e = (t, e) => {
|
|
|
641
641
|
}),
|
|
642
642
|
emits: /* @__PURE__ */ Xe(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
643
643
|
setup(t, { emit: e }) {
|
|
644
|
-
const n = t, a = Ft(), { t: s, locale: o } = me(), l = Tt(t, "modelValue"),
|
|
644
|
+
const n = t, a = Ft(), { t: s, locale: o } = me(), l = Tt(t, "modelValue"), r = re(() => a["value-key"] != null), i = R(""), v = re(() => {
|
|
645
645
|
if (a.remote !== void 0)
|
|
646
646
|
return n.data;
|
|
647
|
-
const d = pt(
|
|
647
|
+
const d = pt(i.value), { data: x, labelValue: M } = n, A = x || p.value;
|
|
648
648
|
if (d.length == 0)
|
|
649
649
|
return A;
|
|
650
|
-
const { label: oe, labelEn: ue } =
|
|
651
|
-
let
|
|
650
|
+
const { label: oe, labelEn: ue } = M;
|
|
651
|
+
let y = o.value == "en_us" ? ue || "i18nName" : oe;
|
|
652
652
|
return d.length == 1 ? A.filter(
|
|
653
|
-
(ie) => ie[
|
|
653
|
+
(ie) => ie[y].toLowerCase().includes(d[0].toLowerCase())
|
|
654
654
|
) : A.filter((ie) => {
|
|
655
655
|
let pe = !1;
|
|
656
656
|
return pe = d.some(
|
|
657
|
-
(be) => ie[
|
|
657
|
+
(be) => ie[y].toLowerCase() == be.toLowerCase()
|
|
658
658
|
), pe;
|
|
659
659
|
});
|
|
660
|
-
}),
|
|
660
|
+
}), w = re({
|
|
661
661
|
get() {
|
|
662
|
-
return a.multiple == null || l.value == null ? !1 : l.value.length ==
|
|
662
|
+
return a.multiple == null || l.value == null ? !1 : l.value.length == v.value.length;
|
|
663
663
|
},
|
|
664
664
|
set(d) {
|
|
665
665
|
return d;
|
|
666
666
|
}
|
|
667
|
-
}),
|
|
667
|
+
}), b = e, p = R([]), g = async () => {
|
|
668
668
|
const { data: d } = await n.api();
|
|
669
|
-
p.value = [...d],
|
|
669
|
+
p.value = [...d], b("success", p);
|
|
670
670
|
};
|
|
671
671
|
n.api && g();
|
|
672
672
|
function m(d) {
|
|
673
|
-
|
|
673
|
+
b("change", d);
|
|
674
674
|
}
|
|
675
675
|
const u = n.labelValue.label.split("-"), h = (d) => {
|
|
676
676
|
if (u.length == 1) {
|
|
@@ -680,21 +680,21 @@ const _e = (t, e) => {
|
|
|
680
680
|
return x = x || d[n.labelValue.label], x;
|
|
681
681
|
} else {
|
|
682
682
|
let x = [];
|
|
683
|
-
return u.forEach((
|
|
684
|
-
x.push(d[
|
|
683
|
+
return u.forEach((M) => {
|
|
684
|
+
x.push(d[M]);
|
|
685
685
|
}), x.join("-");
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
function k(d) {
|
|
689
689
|
let x = n.data ? n.data : p.value;
|
|
690
690
|
l.value = d ? x.map(
|
|
691
|
-
(
|
|
691
|
+
(M) => r.value ? M : M[n.labelValue.value]
|
|
692
692
|
) : [], Se(() => {
|
|
693
|
-
|
|
693
|
+
b("change", l.value), b("changeAll", l.value, x);
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
function _(d) {
|
|
697
|
-
n.optionClick && n.optionClick(d),
|
|
697
|
+
n.optionClick && n.optionClick(d), b("change", r.value ? d : d[n.labelValue.value]);
|
|
698
698
|
}
|
|
699
699
|
function C(d) {
|
|
700
700
|
return l.value.length >= n.maxLimit && !l.value.includes(d[n.labelValue.value]);
|
|
@@ -703,21 +703,21 @@ const _e = (t, e) => {
|
|
|
703
703
|
return d.map((x) => ({
|
|
704
704
|
...x,
|
|
705
705
|
label: h(x),
|
|
706
|
-
value:
|
|
706
|
+
value: r.value ? x : x[n.labelValue.value]
|
|
707
707
|
}));
|
|
708
708
|
}
|
|
709
|
-
const E = R([]),
|
|
710
|
-
E.value = S(
|
|
709
|
+
const E = R([]), B = n.data ? n.data : p.value;
|
|
710
|
+
E.value = S(B), Pe(
|
|
711
711
|
() => n.data ? n.data : p.value,
|
|
712
712
|
(d) => {
|
|
713
|
-
var
|
|
713
|
+
var M;
|
|
714
714
|
const x = S(d);
|
|
715
715
|
if (x.length !== E.value.length)
|
|
716
716
|
E.value = x;
|
|
717
717
|
else {
|
|
718
718
|
let A = !1;
|
|
719
719
|
for (let oe = 0; oe < x.length; oe++)
|
|
720
|
-
if (x[oe].value !== ((
|
|
720
|
+
if (x[oe].value !== ((M = E.value[oe]) == null ? void 0 : M.value)) {
|
|
721
721
|
A = !0;
|
|
722
722
|
break;
|
|
723
723
|
}
|
|
@@ -726,15 +726,15 @@ const _e = (t, e) => {
|
|
|
726
726
|
},
|
|
727
727
|
{ deep: !0 }
|
|
728
728
|
);
|
|
729
|
-
const F =
|
|
729
|
+
const F = re(() => E.value);
|
|
730
730
|
return (d, x) => {
|
|
731
|
-
const
|
|
732
|
-
return
|
|
731
|
+
const M = O("el-checkbox"), A = O("el-select-v2"), oe = O("el-option"), ue = O("el-select");
|
|
732
|
+
return K(a).v2 != null ? (L(), H(A, he({
|
|
733
733
|
key: 0,
|
|
734
734
|
options: F.value,
|
|
735
735
|
modelValue: l.value,
|
|
736
|
-
"onUpdate:modelValue": x[1] || (x[1] = (
|
|
737
|
-
},
|
|
736
|
+
"onUpdate:modelValue": x[1] || (x[1] = (y) => l.value = y)
|
|
737
|
+
}, K(a), {
|
|
738
738
|
filterable: "",
|
|
739
739
|
"collapse-tags": "",
|
|
740
740
|
"collapse-tags-tooltip": "",
|
|
@@ -742,21 +742,21 @@ const _e = (t, e) => {
|
|
|
742
742
|
onChange: m,
|
|
743
743
|
onClear: m
|
|
744
744
|
}), at({
|
|
745
|
-
default: D(({ item:
|
|
745
|
+
default: D(({ item: y }) => [
|
|
746
746
|
ae("div", {
|
|
747
|
-
onClick: (ge) => _(
|
|
748
|
-
}, J(
|
|
747
|
+
onClick: (ge) => _(y)
|
|
748
|
+
}, J(y.label), 9, an)
|
|
749
749
|
]),
|
|
750
750
|
_: 2
|
|
751
751
|
}, [
|
|
752
|
-
|
|
752
|
+
K(a).multiple != null ? {
|
|
753
753
|
name: "header",
|
|
754
754
|
fn: D(() => [
|
|
755
755
|
X(d.$slots, "header", {}, () => [
|
|
756
|
-
|
|
756
|
+
z(M, {
|
|
757
757
|
class: "mgl20",
|
|
758
|
-
modelValue:
|
|
759
|
-
"onUpdate:modelValue": x[0] || (x[0] = (
|
|
758
|
+
modelValue: w.value,
|
|
759
|
+
"onUpdate:modelValue": x[0] || (x[0] = (y) => w.value = y),
|
|
760
760
|
onChange: k
|
|
761
761
|
}, {
|
|
762
762
|
default: D(() => [
|
|
@@ -768,22 +768,22 @@ const _e = (t, e) => {
|
|
|
768
768
|
]),
|
|
769
769
|
key: "0"
|
|
770
770
|
} : void 0
|
|
771
|
-
]), 1040, ["options", "modelValue"])) : (L(),
|
|
771
|
+
]), 1040, ["options", "modelValue"])) : (L(), H(ue, he({
|
|
772
772
|
key: 1,
|
|
773
773
|
modelValue: l.value,
|
|
774
|
-
"onUpdate:modelValue": x[3] || (x[3] = (
|
|
774
|
+
"onUpdate:modelValue": x[3] || (x[3] = (y) => l.value = y),
|
|
775
775
|
filterable: "",
|
|
776
776
|
"collapse-tags": "",
|
|
777
777
|
"collapse-tags-tooltip": "",
|
|
778
|
-
"filter-method":
|
|
778
|
+
"filter-method": K(a).remote != null ? void 0 : (y) => i.value = y,
|
|
779
779
|
clearable: ""
|
|
780
|
-
},
|
|
780
|
+
}, K(a), { onClear: t.optionClick }), {
|
|
781
781
|
default: D(() => [
|
|
782
|
-
|
|
783
|
-
|
|
782
|
+
K(a).multiple != null && t.showCheckAll && t.maxLimit == null ? X(d.$slots, "header", { key: 0 }, () => [
|
|
783
|
+
z(M, {
|
|
784
784
|
class: "mgl20",
|
|
785
|
-
modelValue:
|
|
786
|
-
"onUpdate:modelValue": x[2] || (x[2] = (
|
|
785
|
+
modelValue: w.value,
|
|
786
|
+
"onUpdate:modelValue": x[2] || (x[2] = (y) => w.value = y),
|
|
787
787
|
onChange: k
|
|
788
788
|
}, {
|
|
789
789
|
default: D(() => [
|
|
@@ -792,12 +792,12 @@ const _e = (t, e) => {
|
|
|
792
792
|
_: 1
|
|
793
793
|
}, 8, ["modelValue"])
|
|
794
794
|
], !0) : ce("", !0),
|
|
795
|
-
(L(!0),
|
|
795
|
+
(L(!0), se(Oe, null, st(v.value, (y, ge) => (L(), H(oe, {
|
|
796
796
|
key: ge,
|
|
797
|
-
label: h(
|
|
798
|
-
disabled:
|
|
799
|
-
onClick: Me((ie) => _(
|
|
800
|
-
value:
|
|
797
|
+
label: h(y),
|
|
798
|
+
disabled: K(a).multiple != null && t.maxLimit > 0 ? C(y) : !1,
|
|
799
|
+
onClick: Me((ie) => _(y), ["stop"]),
|
|
800
|
+
value: r.value ? y : y[t.labelValue.value]
|
|
801
801
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
802
802
|
]),
|
|
803
803
|
_: 3
|
|
@@ -814,10 +814,10 @@ const cn = ot({
|
|
|
814
814
|
}
|
|
815
815
|
});
|
|
816
816
|
function un(t, e, n, a, s, o) {
|
|
817
|
-
const l =
|
|
818
|
-
return L(),
|
|
817
|
+
const l = O("el-icon");
|
|
818
|
+
return L(), H(l, { class: "cmp-icon" }, {
|
|
819
819
|
default: D(() => [
|
|
820
|
-
(L(),
|
|
820
|
+
(L(), H(rt(t.name)))
|
|
821
821
|
]),
|
|
822
822
|
_: 1
|
|
823
823
|
});
|
|
@@ -833,16 +833,18 @@ const yt = /* @__PURE__ */ _e(cn, [["render", un], ["__scopeId", "data-v-733f9da
|
|
|
833
833
|
n("no");
|
|
834
834
|
}
|
|
835
835
|
return (o, l) => {
|
|
836
|
-
const
|
|
837
|
-
return L(),
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
836
|
+
const r = O("el-popconfirm");
|
|
837
|
+
return L(), se("span", null, [
|
|
838
|
+
z(r, he(o.$attrs, {
|
|
839
|
+
onConfirm: K(a),
|
|
840
|
+
onCancel: s
|
|
841
|
+
}), {
|
|
842
|
+
reference: D(() => [
|
|
843
|
+
X(o.$slots, "default")
|
|
844
|
+
]),
|
|
845
|
+
_: 3
|
|
846
|
+
}, 16, ["onConfirm"])
|
|
847
|
+
]);
|
|
846
848
|
};
|
|
847
849
|
}
|
|
848
850
|
};
|
|
@@ -856,36 +858,44 @@ const dn = ["accept"], fn = {
|
|
|
856
858
|
fields: {
|
|
857
859
|
type: Object,
|
|
858
860
|
default: () => ({})
|
|
861
|
+
},
|
|
862
|
+
fileChange: {
|
|
863
|
+
type: Function,
|
|
864
|
+
required: !0
|
|
859
865
|
}
|
|
860
866
|
},
|
|
861
867
|
emits: ["fileChange"],
|
|
862
868
|
setup(t, { emit: e }) {
|
|
863
|
-
const n = t, a =
|
|
864
|
-
async function l
|
|
865
|
-
|
|
866
|
-
let r =
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
+
const n = t, a = R(null), s = R(!1);
|
|
870
|
+
async function o(l) {
|
|
871
|
+
s.value = !0;
|
|
872
|
+
let r = l.target.files[0];
|
|
873
|
+
const i = await tn(r, n.fields).catch(() => {
|
|
874
|
+
s.value = !1;
|
|
875
|
+
}).finally(() => {
|
|
876
|
+
a.value.value = null;
|
|
877
|
+
});
|
|
878
|
+
await n.fileChange(i).finally(() => {
|
|
879
|
+
s.value = !1;
|
|
869
880
|
});
|
|
870
|
-
a("fileChange", y);
|
|
871
881
|
}
|
|
872
|
-
return (
|
|
873
|
-
const
|
|
874
|
-
return L(),
|
|
875
|
-
|
|
876
|
-
loading:
|
|
882
|
+
return (l, r) => {
|
|
883
|
+
const i = O("el-button");
|
|
884
|
+
return L(), se("span", null, [
|
|
885
|
+
z(i, {
|
|
886
|
+
loading: s.value,
|
|
877
887
|
class: "mgr10",
|
|
878
|
-
onClick: r[0] || (r[0] = (
|
|
888
|
+
onClick: r[0] || (r[0] = (v) => a.value.click())
|
|
879
889
|
}, {
|
|
880
890
|
default: D(() => [
|
|
881
|
-
Q(J(
|
|
891
|
+
Q(J(l.$t("dao-ru")), 1)
|
|
882
892
|
]),
|
|
883
893
|
_: 1
|
|
884
894
|
}, 8, ["loading"]),
|
|
885
895
|
ae("input", {
|
|
886
|
-
onChange:
|
|
896
|
+
onChange: o,
|
|
887
897
|
ref_key: "input",
|
|
888
|
-
ref:
|
|
898
|
+
ref: a,
|
|
889
899
|
accept: t.accept,
|
|
890
900
|
style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
|
|
891
901
|
type: "file"
|
|
@@ -893,19 +903,19 @@ const dn = ["accept"], fn = {
|
|
|
893
903
|
]);
|
|
894
904
|
};
|
|
895
905
|
}
|
|
896
|
-
}, Gn = /* @__PURE__ */ _e(fn, [["__scopeId", "data-v-
|
|
906
|
+
}, Gn = /* @__PURE__ */ _e(fn, [["__scopeId", "data-v-6f9ede29"]]);
|
|
897
907
|
function Ue(t) {
|
|
898
908
|
let e = {};
|
|
899
909
|
return t.forEach((n) => {
|
|
900
|
-
const { key: a, type: s, option: o = {}, value: l, dateType:
|
|
910
|
+
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
901
911
|
if (a)
|
|
902
912
|
if (s == "input" && (o != null && o.multiple))
|
|
903
913
|
e[a] = pt(l);
|
|
904
914
|
else if (s == "date")
|
|
905
|
-
if (
|
|
906
|
-
const [
|
|
907
|
-
let [
|
|
908
|
-
|
|
915
|
+
if (r.includes("range")) {
|
|
916
|
+
const [i, v] = a;
|
|
917
|
+
let [w, b] = l || [];
|
|
918
|
+
w && r == "daterange" && (w = ke(w).format("YYYY-MM-DD 00:00:00"), b = ke(b).format("YYYY-MM-DD 23:59:59")), e[i] = w, e[v] = b;
|
|
909
919
|
} else
|
|
910
920
|
e[a] = l;
|
|
911
921
|
else
|
|
@@ -922,14 +932,14 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
922
932
|
},
|
|
923
933
|
emits: ["confirm", "reset", "visibleChange"],
|
|
924
934
|
setup(t, { expose: e, emit: n }) {
|
|
925
|
-
const a = t, s = n, o = R(!0), l = R(null), { t:
|
|
926
|
-
function
|
|
935
|
+
const a = t, s = n, o = R(!0), l = R(null), { t: r } = me(), i = re(() => o.value ? r("guan-bi") : r("zhan-kai"));
|
|
936
|
+
function v() {
|
|
927
937
|
s("confirm");
|
|
928
938
|
}
|
|
929
|
-
function
|
|
939
|
+
function w(h) {
|
|
930
940
|
h.option.onClear && h.option.onClear(), s("confirm");
|
|
931
941
|
}
|
|
932
|
-
function
|
|
942
|
+
function b() {
|
|
933
943
|
s("reset");
|
|
934
944
|
}
|
|
935
945
|
function p() {
|
|
@@ -946,48 +956,48 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
946
956
|
});
|
|
947
957
|
}
|
|
948
958
|
return e({ getPrm: g, reset: u }), (h, k) => {
|
|
949
|
-
const _ =
|
|
950
|
-
return L(),
|
|
959
|
+
const _ = O("el-input"), C = O("el-date-picker"), S = O("el-form-item"), E = O("el-form"), B = O("el-link"), F = O("el-button");
|
|
960
|
+
return L(), se("div", {
|
|
951
961
|
class: "searchBar-container mgt10 mgb10",
|
|
952
|
-
onKeydown: Dt(
|
|
962
|
+
onKeydown: Dt(v, ["enter"])
|
|
953
963
|
}, [
|
|
954
964
|
ae("div", {
|
|
955
965
|
class: "searchBar",
|
|
956
966
|
style: zt({ height: o.value ? "auto" : "42px" })
|
|
957
967
|
}, [
|
|
958
|
-
|
|
968
|
+
z(E, {
|
|
959
969
|
inline: "",
|
|
960
970
|
model: t.form.data
|
|
961
971
|
}, {
|
|
962
972
|
default: D(() => [
|
|
963
|
-
(L(!0),
|
|
973
|
+
(L(!0), se(Oe, null, st(t.form.items.filter((d) => !d.hidden), (d) => (L(), se(Oe, {
|
|
964
974
|
key: d.key
|
|
965
975
|
}, [
|
|
966
|
-
d.type == "br" ? (L(),
|
|
976
|
+
d.type == "br" ? (L(), se("br", hn)) : (L(), H(S, {
|
|
967
977
|
key: 1,
|
|
968
978
|
label: d.name
|
|
969
979
|
}, {
|
|
970
980
|
default: D(() => {
|
|
971
|
-
var x,
|
|
981
|
+
var x, M;
|
|
972
982
|
return [
|
|
973
|
-
d.type === "input" ? (L(),
|
|
983
|
+
d.type === "input" ? (L(), H(_, {
|
|
974
984
|
key: 0,
|
|
975
985
|
modelValue: d.value,
|
|
976
986
|
"onUpdate:modelValue": (A) => d.value = A,
|
|
977
987
|
class: Ve(((x = d.option) == null ? void 0 : x.class) || "w150"),
|
|
978
988
|
placeholder: h.$t("qing-shu-ru"),
|
|
979
989
|
clearable: ""
|
|
980
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (L(),
|
|
981
|
-
d.type === "select" ? (L(),
|
|
990
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (L(), H(rt(d.render), { key: 1 })) : ce("", !0),
|
|
991
|
+
d.type === "select" ? (L(), H(rn, he({
|
|
982
992
|
key: 2,
|
|
983
|
-
class: ((
|
|
993
|
+
class: ((M = d.option) == null ? void 0 : M.class) || "w150",
|
|
984
994
|
modelValue: d.value,
|
|
985
995
|
"onUpdate:modelValue": (A) => d.value = A
|
|
986
996
|
}, { ref_for: !0 }, d.option, {
|
|
987
|
-
onChange:
|
|
988
|
-
onClear: (A) =>
|
|
997
|
+
onChange: v,
|
|
998
|
+
onClear: (A) => w(d)
|
|
989
999
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
|
|
990
|
-
d.type === "date" ? (L(),
|
|
1000
|
+
d.type === "date" ? (L(), H(C, {
|
|
991
1001
|
key: 3,
|
|
992
1002
|
class: Ve({ datetimerange: "w300", daterange: "w200" }[d.dateType] || "w100"),
|
|
993
1003
|
modelValue: d.value,
|
|
@@ -1014,7 +1024,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1014
1024
|
X(h.$slots, "table-header-left", {}, void 0, !0)
|
|
1015
1025
|
]),
|
|
1016
1026
|
ae("div", pn, [
|
|
1017
|
-
|
|
1027
|
+
z(B, {
|
|
1018
1028
|
underline: "never",
|
|
1019
1029
|
class: "mgr10",
|
|
1020
1030
|
onClick: k[0] || (k[0] = () => {
|
|
@@ -1022,25 +1032,25 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1022
1032
|
})
|
|
1023
1033
|
}, {
|
|
1024
1034
|
default: D(() => [
|
|
1025
|
-
|
|
1035
|
+
z(yt, {
|
|
1026
1036
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1027
1037
|
}, null, 8, ["name"]),
|
|
1028
|
-
Q(" " + J(
|
|
1038
|
+
Q(" " + J(i.value), 1)
|
|
1029
1039
|
]),
|
|
1030
1040
|
_: 1
|
|
1031
1041
|
}),
|
|
1032
|
-
|
|
1042
|
+
z(F, {
|
|
1033
1043
|
type: "primary",
|
|
1034
|
-
onClick:
|
|
1044
|
+
onClick: v
|
|
1035
1045
|
}, {
|
|
1036
1046
|
default: D(() => [
|
|
1037
1047
|
Q(J(h.$t("shai-xuan")), 1)
|
|
1038
1048
|
]),
|
|
1039
1049
|
_: 1
|
|
1040
1050
|
}),
|
|
1041
|
-
|
|
1051
|
+
z(F, {
|
|
1042
1052
|
type: "primary",
|
|
1043
|
-
onClick:
|
|
1053
|
+
onClick: b
|
|
1044
1054
|
}, {
|
|
1045
1055
|
default: D(() => [
|
|
1046
1056
|
Q(J(h.$t("chong-zhi")), 1)
|
|
@@ -1137,21 +1147,21 @@ const wn = { class: "center" }, xn = {
|
|
|
1137
1147
|
}
|
|
1138
1148
|
},
|
|
1139
1149
|
setup(t, { expose: e }) {
|
|
1140
|
-
const { t: n, locale: a } = me(), s = jt(), o = bn(), l = t,
|
|
1150
|
+
const { t: n, locale: a } = me(), s = jt(), o = bn(), l = t, r = R(!1), i = R([]);
|
|
1141
1151
|
l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []);
|
|
1142
|
-
const
|
|
1152
|
+
const v = re(() => {
|
|
1143
1153
|
const f = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1144
1154
|
return l.id ? `listPageId-${f}-${l.id}` : `listPageId-${f}`;
|
|
1145
|
-
}),
|
|
1146
|
-
[
|
|
1155
|
+
}), w = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, p = l.searchForm.pageSizeKey || o.pageSizeKey, g = $e({
|
|
1156
|
+
[b]: 1,
|
|
1147
1157
|
[p]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1148
1158
|
total: 0
|
|
1149
1159
|
}), m = R(null), u = R(null), h = R(450), k = Re(() => {
|
|
1150
1160
|
Se(() => {
|
|
1151
1161
|
if (!u.value)
|
|
1152
1162
|
return;
|
|
1153
|
-
const c = u.value.getBoundingClientRect(), $ = window.innerHeight, T = c.top, U = 100, W = $ - T - U,
|
|
1154
|
-
h.value = Math.max(W,
|
|
1163
|
+
const c = u.value.getBoundingClientRect(), $ = window.innerHeight, T = c.top, U = 100, W = $ - T - U, V = 200;
|
|
1164
|
+
h.value = Math.max(W, V);
|
|
1155
1165
|
});
|
|
1156
1166
|
}, 100), _ = () => {
|
|
1157
1167
|
k();
|
|
@@ -1182,28 +1192,28 @@ const wn = { class: "center" }, xn = {
|
|
|
1182
1192
|
}
|
|
1183
1193
|
}
|
|
1184
1194
|
});
|
|
1185
|
-
const S =
|
|
1195
|
+
const S = re(() => ue.value.height || h.value);
|
|
1186
1196
|
let E;
|
|
1187
|
-
async function
|
|
1197
|
+
async function B(f) {
|
|
1188
1198
|
const { dataFormat: c } = l.tableConfig;
|
|
1189
|
-
f[
|
|
1199
|
+
f[b] != 1 && (f.nextSearchAfter = E), r.value = !0;
|
|
1190
1200
|
const { code: $, data: T = {} } = await l.api(f).finally(() => {
|
|
1191
|
-
|
|
1201
|
+
r.value = !1, l.searchForm.selections = [];
|
|
1192
1202
|
});
|
|
1193
1203
|
if ($ == 200) {
|
|
1194
1204
|
let U = [];
|
|
1195
|
-
for (const
|
|
1196
|
-
if (T[
|
|
1197
|
-
U = T[
|
|
1205
|
+
for (const V of o.responseDataKeys.rows)
|
|
1206
|
+
if (T[V]) {
|
|
1207
|
+
U = T[V];
|
|
1198
1208
|
break;
|
|
1199
1209
|
}
|
|
1200
1210
|
let W = 0;
|
|
1201
|
-
for (const
|
|
1202
|
-
if (T[
|
|
1203
|
-
W = T[
|
|
1211
|
+
for (const V of o.responseDataKeys.total)
|
|
1212
|
+
if (T[V] !== void 0) {
|
|
1213
|
+
W = T[V];
|
|
1204
1214
|
break;
|
|
1205
1215
|
}
|
|
1206
|
-
|
|
1216
|
+
i.value = c ? c(U) : U, g.total = W, E = T.nextSearchAfter, l.searchForm.enableCellCopy && Se(() => {
|
|
1207
1217
|
setTimeout(() => {
|
|
1208
1218
|
C();
|
|
1209
1219
|
}, 100);
|
|
@@ -1212,12 +1222,12 @@ const wn = { class: "center" }, xn = {
|
|
|
1212
1222
|
}
|
|
1213
1223
|
function F(f = {}) {
|
|
1214
1224
|
const { searchData: c = () => ({}) } = l.tableConfig, $ = c();
|
|
1215
|
-
|
|
1225
|
+
B({ ...g, ...Ue(l.searchForm.items), ...f, ...$ });
|
|
1216
1226
|
}
|
|
1217
1227
|
function d() {
|
|
1218
1228
|
const { reset: f } = l.tableConfig;
|
|
1219
1229
|
f && f(), l.searchForm.items.forEach((c) => {
|
|
1220
|
-
const $ =
|
|
1230
|
+
const $ = w.find((T) => Qe(c.key) && Qe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
|
|
1221
1231
|
$ && (c.value = $.value);
|
|
1222
1232
|
}), F();
|
|
1223
1233
|
}
|
|
@@ -1225,7 +1235,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1225
1235
|
function x() {
|
|
1226
1236
|
return { ...g, ...Ue(l.searchForm.items) };
|
|
1227
1237
|
}
|
|
1228
|
-
const
|
|
1238
|
+
const M = () => {
|
|
1229
1239
|
const f = m.value;
|
|
1230
1240
|
f && f.clearSort();
|
|
1231
1241
|
}, A = $e({
|
|
@@ -1234,7 +1244,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1234
1244
|
drag: !0,
|
|
1235
1245
|
resizable: !0,
|
|
1236
1246
|
maxFixedSize: 0
|
|
1237
|
-
}), ue =
|
|
1247
|
+
}), ue = re(() => {
|
|
1238
1248
|
const { customConfig: f, columnConfig: c, ...$ } = l.tableConfig;
|
|
1239
1249
|
return {
|
|
1240
1250
|
headerAlign: "left",
|
|
@@ -1250,7 +1260,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1250
1260
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1251
1261
|
...$
|
|
1252
1262
|
};
|
|
1253
|
-
}),
|
|
1263
|
+
}), y = $e({
|
|
1254
1264
|
isSelecting: !1,
|
|
1255
1265
|
// 是否正在选择
|
|
1256
1266
|
startCell: null,
|
|
@@ -1274,49 +1284,49 @@ const wn = { class: "center" }, xn = {
|
|
|
1274
1284
|
if (W != null)
|
|
1275
1285
|
U = parseInt(W, 10);
|
|
1276
1286
|
else {
|
|
1277
|
-
const
|
|
1278
|
-
U = Array.from(
|
|
1287
|
+
const q = $.parentElement;
|
|
1288
|
+
U = Array.from(q.querySelectorAll(".vxe-body--row")).indexOf($);
|
|
1279
1289
|
}
|
|
1280
1290
|
if (U < 0)
|
|
1281
1291
|
return null;
|
|
1282
|
-
let
|
|
1292
|
+
let V = -1;
|
|
1283
1293
|
const le = c.getAttribute("data-colid");
|
|
1284
|
-
if (le && (
|
|
1285
|
-
const I = Array.from($.querySelectorAll(".vxe-body--column")).indexOf(c),
|
|
1286
|
-
if (
|
|
1294
|
+
if (le && (V = T.getColumns().findIndex((I) => I.id === le)), V < 0) {
|
|
1295
|
+
const I = Array.from($.querySelectorAll(".vxe-body--column")).indexOf(c), Y = !!c.closest(".vxe-table--fixed-left-wrapper"), Z = !!c.closest(".vxe-table--fixed-right-wrapper"), P = T.getColumns();
|
|
1296
|
+
if (Y) {
|
|
1287
1297
|
const G = P.filter((N) => N.fixed === "left");
|
|
1288
|
-
I < G.length && (
|
|
1298
|
+
I < G.length && (V = P.indexOf(G[I]));
|
|
1289
1299
|
} else if (Z) {
|
|
1290
1300
|
const G = P.filter((N) => N.fixed === "right");
|
|
1291
|
-
I < G.length && (
|
|
1301
|
+
I < G.length && (V = P.indexOf(G[I]));
|
|
1292
1302
|
} else {
|
|
1293
1303
|
const G = l.searchForm.showCheckBox ? 1 : 0;
|
|
1294
|
-
|
|
1304
|
+
V = P.filter((ee) => ee.fixed === "left").length + I - G;
|
|
1295
1305
|
}
|
|
1296
1306
|
}
|
|
1297
|
-
return
|
|
1307
|
+
return V < 0 ? null : { rowIndex: U, colIndex: V, cell: c };
|
|
1298
1308
|
}, ie = (f) => {
|
|
1299
1309
|
const c = ge(f.target);
|
|
1300
1310
|
if (!c) {
|
|
1301
1311
|
Ie();
|
|
1302
1312
|
return;
|
|
1303
1313
|
}
|
|
1304
|
-
|
|
1314
|
+
y.isSelecting = !0, y.startCell = {
|
|
1305
1315
|
rowIndex: c.rowIndex,
|
|
1306
1316
|
colIndex: c.colIndex
|
|
1307
|
-
},
|
|
1317
|
+
}, y.endCell = { ...y.startCell }, Ke(), He();
|
|
1308
1318
|
}, pe = (f) => {
|
|
1309
|
-
if (!
|
|
1319
|
+
if (!y.isSelecting)
|
|
1310
1320
|
return;
|
|
1311
1321
|
const c = ge(f.target);
|
|
1312
|
-
c && (
|
|
1322
|
+
c && (y.endCell = {
|
|
1313
1323
|
rowIndex: c.rowIndex,
|
|
1314
1324
|
colIndex: c.colIndex
|
|
1315
1325
|
}, Ke(), He());
|
|
1316
1326
|
}, be = () => {
|
|
1317
|
-
|
|
1327
|
+
y.isSelecting = !1;
|
|
1318
1328
|
}, Ie = () => {
|
|
1319
|
-
|
|
1329
|
+
y.selectedCells = [], y.startCell = null, y.endCell = null;
|
|
1320
1330
|
const f = m.value;
|
|
1321
1331
|
if (!f)
|
|
1322
1332
|
return;
|
|
@@ -1332,16 +1342,16 @@ const wn = { class: "center" }, xn = {
|
|
|
1332
1342
|
);
|
|
1333
1343
|
});
|
|
1334
1344
|
}, Ke = () => {
|
|
1335
|
-
if (!
|
|
1336
|
-
|
|
1345
|
+
if (!y.startCell || !y.endCell) {
|
|
1346
|
+
y.selectedCells = [];
|
|
1337
1347
|
return;
|
|
1338
1348
|
}
|
|
1339
|
-
const f =
|
|
1340
|
-
|
|
1341
|
-
for (let
|
|
1342
|
-
for (let I =
|
|
1343
|
-
|
|
1344
|
-
rowIndex:
|
|
1349
|
+
const f = y.startCell.rowIndex, c = y.endCell.rowIndex, $ = y.startCell.colIndex, T = y.endCell.colIndex, U = Math.min(f, c), W = Math.max(f, c), V = Math.min($, T), le = Math.max($, T);
|
|
1350
|
+
y.selectedCells = [];
|
|
1351
|
+
for (let q = U; q <= W; q++)
|
|
1352
|
+
for (let I = V; I <= le; I++)
|
|
1353
|
+
y.selectedCells.push({
|
|
1354
|
+
rowIndex: q,
|
|
1345
1355
|
colIndex: I
|
|
1346
1356
|
});
|
|
1347
1357
|
}, He = () => {
|
|
@@ -1352,28 +1362,28 @@ const wn = { class: "center" }, xn = {
|
|
|
1352
1362
|
const c = f.$el;
|
|
1353
1363
|
if (c.querySelectorAll(
|
|
1354
1364
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1355
|
-
).forEach((
|
|
1356
|
-
|
|
1365
|
+
).forEach((Y) => {
|
|
1366
|
+
Y.classList.remove(
|
|
1357
1367
|
"cell-selected",
|
|
1358
1368
|
"cell-border-top",
|
|
1359
1369
|
"cell-border-right",
|
|
1360
1370
|
"cell-border-bottom",
|
|
1361
1371
|
"cell-border-left"
|
|
1362
1372
|
);
|
|
1363
|
-
}),
|
|
1373
|
+
}), y.selectedCells.length === 0)
|
|
1364
1374
|
return;
|
|
1365
|
-
const $ = f.getColumns(), T =
|
|
1375
|
+
const $ = f.getColumns(), T = y.selectedCells.map((Y) => Y.rowIndex), U = y.selectedCells.map((Y) => Y.colIndex), W = Math.min(...T), V = Math.max(...T), le = Math.min(...U), q = Math.max(...U), I = [
|
|
1366
1376
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1367
1377
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1368
1378
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1369
1379
|
].filter(Boolean);
|
|
1370
|
-
|
|
1380
|
+
y.selectedCells.forEach(({ rowIndex: Y, colIndex: Z }) => {
|
|
1371
1381
|
const P = $[Z];
|
|
1372
1382
|
if (!P)
|
|
1373
1383
|
return;
|
|
1374
1384
|
const G = P.fixed === "left", N = P.fixed === "right";
|
|
1375
1385
|
for (const ee of I) {
|
|
1376
|
-
const we = ee.querySelectorAll(".vxe-body--row")[
|
|
1386
|
+
const we = ee.querySelectorAll(".vxe-body--row")[Y];
|
|
1377
1387
|
if (!we)
|
|
1378
1388
|
continue;
|
|
1379
1389
|
const de = Array.from(we.querySelectorAll(".vxe-body--column"));
|
|
@@ -1389,31 +1399,31 @@ const wn = { class: "center" }, xn = {
|
|
|
1389
1399
|
j = de[ne + fe];
|
|
1390
1400
|
}
|
|
1391
1401
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
1392
|
-
j.classList.add("cell-selected"),
|
|
1402
|
+
j.classList.add("cell-selected"), Y === W && j.classList.add("cell-border-top"), Y === V && j.classList.add("cell-border-bottom"), Z === le && j.classList.add("cell-border-left"), Z === q && j.classList.add("cell-border-right");
|
|
1393
1403
|
break;
|
|
1394
1404
|
}
|
|
1395
1405
|
}
|
|
1396
1406
|
});
|
|
1397
1407
|
});
|
|
1398
1408
|
}, wt = async () => {
|
|
1399
|
-
if (
|
|
1409
|
+
if (y.selectedCells.length === 0)
|
|
1400
1410
|
return;
|
|
1401
1411
|
const f = m.value;
|
|
1402
1412
|
if (!f)
|
|
1403
1413
|
return;
|
|
1404
|
-
const c = f.$el, $ = f.getColumns(), T = [...new Set(
|
|
1405
|
-
(
|
|
1406
|
-
), U = [...new Set(
|
|
1407
|
-
(
|
|
1414
|
+
const c = f.$el, $ = f.getColumns(), T = [...new Set(y.selectedCells.map((q) => q.rowIndex))].sort(
|
|
1415
|
+
(q, I) => q - I
|
|
1416
|
+
), U = [...new Set(y.selectedCells.map((q) => q.colIndex))].sort(
|
|
1417
|
+
(q, I) => q - I
|
|
1408
1418
|
), W = [
|
|
1409
1419
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1410
1420
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1411
1421
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1412
|
-
].filter(Boolean),
|
|
1413
|
-
T.forEach((
|
|
1422
|
+
].filter(Boolean), V = [];
|
|
1423
|
+
T.forEach((q) => {
|
|
1414
1424
|
const I = [];
|
|
1415
|
-
U.forEach((
|
|
1416
|
-
const Z = $[
|
|
1425
|
+
U.forEach((Y) => {
|
|
1426
|
+
const Z = $[Y];
|
|
1417
1427
|
if (!Z) {
|
|
1418
1428
|
I.push("");
|
|
1419
1429
|
return;
|
|
@@ -1421,7 +1431,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1421
1431
|
const P = Z.fixed === "left", G = Z.fixed === "right";
|
|
1422
1432
|
let N = "";
|
|
1423
1433
|
for (const ee of W) {
|
|
1424
|
-
const we = ee.querySelectorAll(".vxe-body--row")[
|
|
1434
|
+
const we = ee.querySelectorAll(".vxe-body--row")[q];
|
|
1425
1435
|
if (!we)
|
|
1426
1436
|
continue;
|
|
1427
1437
|
const de = Array.from(we.querySelectorAll(".vxe-body--column"));
|
|
@@ -1433,7 +1443,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1433
1443
|
const te = $.filter((ne) => ne.fixed === "right").indexOf(Z);
|
|
1434
1444
|
j = de[te];
|
|
1435
1445
|
} else if (!P && !G && ee.closest(".vxe-table--body-wrapper")) {
|
|
1436
|
-
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Fe) => Fe.fixed === "left").length, ne =
|
|
1446
|
+
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Fe) => Fe.fixed === "left").length, ne = Y - te;
|
|
1437
1447
|
j = de[ne + fe];
|
|
1438
1448
|
}
|
|
1439
1449
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
@@ -1442,28 +1452,28 @@ const wn = { class: "center" }, xn = {
|
|
|
1442
1452
|
}
|
|
1443
1453
|
}
|
|
1444
1454
|
I.push(N);
|
|
1445
|
-
}),
|
|
1455
|
+
}), V.push(I.join(" "));
|
|
1446
1456
|
});
|
|
1447
|
-
const le =
|
|
1457
|
+
const le = V.join(`
|
|
1448
1458
|
`);
|
|
1449
1459
|
try {
|
|
1450
1460
|
await navigator.clipboard.writeText(le);
|
|
1451
|
-
} catch (
|
|
1452
|
-
console.error("复制失败:",
|
|
1461
|
+
} catch (q) {
|
|
1462
|
+
console.error("复制失败:", q);
|
|
1453
1463
|
}
|
|
1454
1464
|
}, Le = (f) => {
|
|
1455
|
-
l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ?
|
|
1465
|
+
l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? y.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" && Ie());
|
|
1456
1466
|
}, Ne = () => {
|
|
1457
|
-
|
|
1467
|
+
y.isSelecting = !1;
|
|
1458
1468
|
}, We = (f) => {
|
|
1459
1469
|
const c = m.value;
|
|
1460
1470
|
if (!c || !c.$el)
|
|
1461
1471
|
return;
|
|
1462
1472
|
c.$el.contains(f.target) || Ie();
|
|
1463
1473
|
}, xt = (f) => {
|
|
1464
|
-
g[
|
|
1474
|
+
g[b] = f, F();
|
|
1465
1475
|
}, Ct = (f) => {
|
|
1466
|
-
g[p] = f, g[
|
|
1476
|
+
g[p] = f, g[b] = 1, F();
|
|
1467
1477
|
};
|
|
1468
1478
|
function Ze() {
|
|
1469
1479
|
const f = m.value.getCheckboxRecords();
|
|
@@ -1477,29 +1487,29 @@ const wn = { class: "center" }, xn = {
|
|
|
1477
1487
|
l.searchForm.selections = $;
|
|
1478
1488
|
}
|
|
1479
1489
|
};
|
|
1480
|
-
return e({ tableRef: m, getList: F, getPrm: x, clearSort:
|
|
1481
|
-
var
|
|
1482
|
-
const $ =
|
|
1483
|
-
return L(),
|
|
1490
|
+
return e({ tableRef: m, getList: F, getPrm: x, clearSort: M, calculateTableHeight: k }), (f, c) => {
|
|
1491
|
+
var q;
|
|
1492
|
+
const $ = O("el-button"), T = O("el-checkbox"), U = O("el-text"), W = O("vxe-column"), V = O("VxeTable"), le = O("el-pagination");
|
|
1493
|
+
return L(), se("div", {
|
|
1484
1494
|
class: Ve({ box: t.searchForm.showShadow })
|
|
1485
1495
|
}, [
|
|
1486
|
-
t.searchForm.showSearch ? (L(),
|
|
1496
|
+
t.searchForm.showSearch ? (L(), H(vn, {
|
|
1487
1497
|
key: 0,
|
|
1488
1498
|
form: t.searchForm,
|
|
1489
1499
|
onReset: d,
|
|
1490
1500
|
onConfirm: c[1] || (c[1] = (I) => F()),
|
|
1491
|
-
onVisibleChange:
|
|
1501
|
+
onVisibleChange: K(k)
|
|
1492
1502
|
}, {
|
|
1493
1503
|
btn: D(() => [
|
|
1494
1504
|
c[3] || (c[3] = ae("span", { class: "mgr10" }, null, -1)),
|
|
1495
1505
|
X(f.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1496
|
-
|
|
1506
|
+
z($, {
|
|
1497
1507
|
class: "mgl10",
|
|
1498
1508
|
round: "",
|
|
1499
1509
|
onClick: c[0] || (c[0] = (I) => m.value.openCustom())
|
|
1500
1510
|
}, {
|
|
1501
1511
|
default: D(() => [
|
|
1502
|
-
|
|
1512
|
+
z(yt, { name: "Tools" })
|
|
1503
1513
|
]),
|
|
1504
1514
|
_: 1
|
|
1505
1515
|
})
|
|
@@ -1511,43 +1521,43 @@ const wn = { class: "center" }, xn = {
|
|
|
1511
1521
|
ref_key: "tableContentRef",
|
|
1512
1522
|
ref: u
|
|
1513
1523
|
}, [
|
|
1514
|
-
|
|
1515
|
-
id:
|
|
1524
|
+
z(V, he({
|
|
1525
|
+
id: v.value,
|
|
1516
1526
|
ref_key: "tableRef",
|
|
1517
1527
|
ref: m,
|
|
1518
|
-
loading: t.loading ||
|
|
1519
|
-
data: t.api ?
|
|
1528
|
+
loading: t.loading || r.value,
|
|
1529
|
+
data: t.api ? i.value : t.data,
|
|
1520
1530
|
border: ""
|
|
1521
1531
|
}, ue.value, {
|
|
1522
1532
|
height: S.value,
|
|
1523
1533
|
onCheckboxChange: Ze,
|
|
1524
1534
|
onCheckboxAll: Ze,
|
|
1525
|
-
onSortChange: (
|
|
1535
|
+
onSortChange: (q = ue.value["sort-config"]) == null ? void 0 : q.sortChange
|
|
1526
1536
|
}), {
|
|
1527
1537
|
default: D(() => [
|
|
1528
|
-
t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(),
|
|
1538
|
+
t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), H(W, {
|
|
1529
1539
|
key: 0,
|
|
1530
1540
|
type: "checkbox",
|
|
1531
|
-
width:
|
|
1541
|
+
width: K(a) == "zh_cn" ? 80 : 150,
|
|
1532
1542
|
title: f.$t("xu-hao"),
|
|
1533
1543
|
fixed: "left"
|
|
1534
1544
|
}, {
|
|
1535
|
-
checkbox: D(({ rowIndex: I, row:
|
|
1545
|
+
checkbox: D(({ rowIndex: I, row: Y, checked: Z, disabled: P, indeterminate: G }) => [
|
|
1536
1546
|
ae("div", wn, [
|
|
1537
|
-
Z ? (L(),
|
|
1547
|
+
Z ? (L(), H(T, {
|
|
1538
1548
|
key: 0,
|
|
1539
1549
|
checked: !0,
|
|
1540
1550
|
disabled: P,
|
|
1541
1551
|
size: "default",
|
|
1542
|
-
onClick: Me((N) => !P && Ge(
|
|
1543
|
-
}, null, 8, ["disabled", "onClick"])) : (L(),
|
|
1552
|
+
onClick: Me((N) => !P && Ge(Y), ["stop"])
|
|
1553
|
+
}, null, 8, ["disabled", "onClick"])) : (L(), H(T, {
|
|
1544
1554
|
key: 1,
|
|
1545
1555
|
disabled: P,
|
|
1546
1556
|
checked: !1,
|
|
1547
1557
|
size: "default",
|
|
1548
|
-
onClick: Me((N) => !P && Ge(
|
|
1558
|
+
onClick: Me((N) => !P && Ge(Y), ["stop"])
|
|
1549
1559
|
}, null, 8, ["disabled", "onClick"])),
|
|
1550
|
-
|
|
1560
|
+
z(U, {
|
|
1551
1561
|
type: "info",
|
|
1552
1562
|
class: "mgl5"
|
|
1553
1563
|
}, {
|
|
@@ -1565,16 +1575,16 @@ const wn = { class: "center" }, xn = {
|
|
|
1565
1575
|
_: 3
|
|
1566
1576
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1567
1577
|
], 512),
|
|
1568
|
-
t.searchForm.showPage ? (L(),
|
|
1578
|
+
t.searchForm.showPage ? (L(), H(le, {
|
|
1569
1579
|
key: 1,
|
|
1570
|
-
"current-page": g[
|
|
1571
|
-
"onUpdate:currentPage": c[2] || (c[2] = (I) => g[
|
|
1580
|
+
"current-page": g[K(b)],
|
|
1581
|
+
"onUpdate:currentPage": c[2] || (c[2] = (I) => g[K(b)] = I),
|
|
1572
1582
|
class: "myPagination mgt10",
|
|
1573
1583
|
background: "",
|
|
1574
1584
|
layout: "total, sizes, prev, pager, next",
|
|
1575
1585
|
total: g.total,
|
|
1576
|
-
"page-size": g[
|
|
1577
|
-
"page-sizes": t.searchForm.pageSizes ||
|
|
1586
|
+
"page-size": g[K(p)],
|
|
1587
|
+
"page-sizes": t.searchForm.pageSizes || K(o).pageSizes,
|
|
1578
1588
|
onCurrentChange: xt,
|
|
1579
1589
|
onSizeChange: Ct
|
|
1580
1590
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : ce("", !0)
|
|
@@ -1599,8 +1609,8 @@ const wn = { class: "center" }, xn = {
|
|
|
1599
1609
|
nn(e.fileName, e.sheetsConfig);
|
|
1600
1610
|
}
|
|
1601
1611
|
return (a, s) => {
|
|
1602
|
-
const o =
|
|
1603
|
-
return L(),
|
|
1612
|
+
const o = O("el-link");
|
|
1613
|
+
return L(), H(o, he({
|
|
1604
1614
|
type: "primary",
|
|
1605
1615
|
underline: "never"
|
|
1606
1616
|
}, a.$attrs, { onClick: n }), {
|
|
@@ -1655,15 +1665,15 @@ async function tt(t) {
|
|
|
1655
1665
|
y: 0
|
|
1656
1666
|
}
|
|
1657
1667
|
};
|
|
1658
|
-
n.addEventListener("mousedown",
|
|
1668
|
+
n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", w), window.addEventListener("resize", b);
|
|
1659
1669
|
function l() {
|
|
1660
|
-
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height),
|
|
1670
|
+
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height), r();
|
|
1661
1671
|
}
|
|
1662
|
-
function
|
|
1672
|
+
function r() {
|
|
1663
1673
|
let g = o.drag.y - o.mouse.y + o.dialog.y, m = o.drag.x - o.mouse.x + o.dialog.x;
|
|
1664
1674
|
e.style.cssText += `position: absolute; top: calc(${g}px - ${o.dialog.marginTop}); left: ${m}px;`;
|
|
1665
1675
|
}
|
|
1666
|
-
function
|
|
1676
|
+
function i(g) {
|
|
1667
1677
|
g.button === 0 && (o.window = {
|
|
1668
1678
|
width: document.body.clientWidth,
|
|
1669
1679
|
height: document.body.clientHeight
|
|
@@ -1672,16 +1682,16 @@ async function tt(t) {
|
|
|
1672
1682
|
y: g.clientY
|
|
1673
1683
|
}, s = !0);
|
|
1674
1684
|
}
|
|
1675
|
-
function
|
|
1685
|
+
function v(g) {
|
|
1676
1686
|
s && (o.drag = {
|
|
1677
1687
|
x: g.clientX,
|
|
1678
1688
|
y: g.clientY
|
|
1679
1689
|
}, a.style.userSelect = "none", l());
|
|
1680
1690
|
}
|
|
1681
|
-
function
|
|
1691
|
+
function w(g) {
|
|
1682
1692
|
a.style.userSelect = "auto", s = !1;
|
|
1683
1693
|
}
|
|
1684
|
-
function
|
|
1694
|
+
function b(g) {
|
|
1685
1695
|
}
|
|
1686
1696
|
function p() {
|
|
1687
1697
|
return new Promise((g, m) => {
|
|
@@ -1690,7 +1700,7 @@ async function tt(t) {
|
|
|
1690
1700
|
}, 500);
|
|
1691
1701
|
});
|
|
1692
1702
|
}
|
|
1693
|
-
t.__mouseDown__ =
|
|
1703
|
+
t.__mouseDown__ = i, t.__mouseUp__ = w, t.__mouseMove__ = v, t.__sizeChange__ = b;
|
|
1694
1704
|
}
|
|
1695
1705
|
function nt(t) {
|
|
1696
1706
|
document.removeEventListener("mousedown", t.__mouseDown__), document.removeEventListener("mousemove", t.__mouseMove__), document.removeEventListener("mouseup", t.__mouseUp__), window.removeEventListener("resize", t.__sizeChange__);
|
|
@@ -1729,12 +1739,12 @@ const kn = {
|
|
|
1729
1739
|
}).catch(() => {
|
|
1730
1740
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1731
1741
|
}
|
|
1732
|
-
return (
|
|
1733
|
-
const
|
|
1734
|
-
return t.layer.type ? (L(),
|
|
1742
|
+
return (r, i) => {
|
|
1743
|
+
const v = O("el-button"), w = O("el-drawer"), b = O("el-dialog");
|
|
1744
|
+
return t.layer.type ? (L(), H(w, {
|
|
1735
1745
|
key: 0,
|
|
1736
1746
|
modelValue: t.layer.show,
|
|
1737
|
-
"onUpdate:modelValue":
|
|
1747
|
+
"onUpdate:modelValue": i[0] || (i[0] = (p) => t.layer.show = p),
|
|
1738
1748
|
size: t.layer.width || "100%",
|
|
1739
1749
|
title: t.layer.title,
|
|
1740
1750
|
direction: "rtl",
|
|
@@ -1743,23 +1753,23 @@ const kn = {
|
|
|
1743
1753
|
class: "drawer-content"
|
|
1744
1754
|
}, {
|
|
1745
1755
|
default: D(() => [
|
|
1746
|
-
X(
|
|
1747
|
-
|
|
1748
|
-
t.layer.showButton ? (L(),
|
|
1749
|
-
X(
|
|
1750
|
-
|
|
1756
|
+
X(r.$slots, "default"),
|
|
1757
|
+
i[2] || (i[2] = ae("p", { class: "mgt50" }, null, -1)),
|
|
1758
|
+
t.layer.showButton ? (L(), se("div", kn, [
|
|
1759
|
+
X(r.$slots, "btn", {}, () => [
|
|
1760
|
+
z(v, { onClick: l }, {
|
|
1751
1761
|
default: D(() => [
|
|
1752
|
-
Q(J(
|
|
1762
|
+
Q(J(r.$t("qu-xiao")), 1)
|
|
1753
1763
|
]),
|
|
1754
1764
|
_: 1
|
|
1755
1765
|
}),
|
|
1756
|
-
|
|
1766
|
+
z(v, {
|
|
1757
1767
|
type: "primary",
|
|
1758
1768
|
loading: t.loading,
|
|
1759
|
-
onClick:
|
|
1769
|
+
onClick: K(o)
|
|
1760
1770
|
}, {
|
|
1761
1771
|
default: D(() => [
|
|
1762
|
-
Q(J(
|
|
1772
|
+
Q(J(r.$t("ti-jiao")), 1)
|
|
1763
1773
|
]),
|
|
1764
1774
|
_: 1
|
|
1765
1775
|
}, 8, ["loading", "onClick"])
|
|
@@ -1767,36 +1777,36 @@ const kn = {
|
|
|
1767
1777
|
])) : ce("", !0)
|
|
1768
1778
|
]),
|
|
1769
1779
|
_: 3
|
|
1770
|
-
}, 8, ["modelValue", "size", "title"])) : Vt((L(),
|
|
1771
|
-
|
|
1780
|
+
}, 8, ["modelValue", "size", "title"])) : Vt((L(), se("div", _n, [
|
|
1781
|
+
z(b, {
|
|
1772
1782
|
"close-on-click-modal": !1,
|
|
1773
1783
|
modelValue: t.layer.show,
|
|
1774
|
-
"onUpdate:modelValue":
|
|
1784
|
+
"onUpdate:modelValue": i[1] || (i[1] = (p) => t.layer.show = p),
|
|
1775
1785
|
title: t.layer.title,
|
|
1776
1786
|
width: t.layer.width || 500,
|
|
1777
1787
|
center: ""
|
|
1778
1788
|
}, at({
|
|
1779
1789
|
default: D(() => [
|
|
1780
|
-
X(
|
|
1790
|
+
X(r.$slots, "default")
|
|
1781
1791
|
]),
|
|
1782
1792
|
_: 2
|
|
1783
1793
|
}, [
|
|
1784
1794
|
t.layer.showButton ? {
|
|
1785
1795
|
name: "footer",
|
|
1786
1796
|
fn: D(() => [
|
|
1787
|
-
X(
|
|
1788
|
-
|
|
1797
|
+
X(r.$slots, "btn", {}, () => [
|
|
1798
|
+
z(v, { onClick: l }, {
|
|
1789
1799
|
default: D(() => [
|
|
1790
|
-
Q(J(
|
|
1800
|
+
Q(J(r.$t("qu-xiao")), 1)
|
|
1791
1801
|
]),
|
|
1792
1802
|
_: 1
|
|
1793
1803
|
}),
|
|
1794
|
-
|
|
1804
|
+
z(v, {
|
|
1795
1805
|
type: "primary",
|
|
1796
|
-
onClick:
|
|
1806
|
+
onClick: K(o)
|
|
1797
1807
|
}, {
|
|
1798
1808
|
default: D(() => [
|
|
1799
|
-
Q(J(
|
|
1809
|
+
Q(J(r.$t("ti-jiao")), 1)
|
|
1800
1810
|
]),
|
|
1801
1811
|
_: 1
|
|
1802
1812
|
}, 8, ["onClick"])
|
|
@@ -1806,7 +1816,7 @@ const kn = {
|
|
|
1806
1816
|
} : void 0
|
|
1807
1817
|
]), 1032, ["modelValue", "title", "width"])
|
|
1808
1818
|
])), [
|
|
1809
|
-
[
|
|
1819
|
+
[K(Cn), t.layer.show]
|
|
1810
1820
|
]);
|
|
1811
1821
|
};
|
|
1812
1822
|
}
|
|
@@ -1820,13 +1830,13 @@ function no(t, e = {}) {
|
|
|
1820
1830
|
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}$/,
|
|
1821
1831
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1822
1832
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1823
|
-
}[t], { inForm: o, value: l, required:
|
|
1824
|
-
return o ? function(
|
|
1825
|
-
if (
|
|
1826
|
-
s.test(
|
|
1833
|
+
}[t], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1834
|
+
return o ? function(v, w, b) {
|
|
1835
|
+
if (r) {
|
|
1836
|
+
s.test(w) ? b() : b(new Error(i));
|
|
1827
1837
|
return;
|
|
1828
1838
|
}
|
|
1829
|
-
|
|
1839
|
+
w && !s.test(w) ? b(new Error(i)) : b();
|
|
1830
1840
|
} : s.test(l);
|
|
1831
1841
|
}
|
|
1832
1842
|
class oo {
|
|
@@ -2042,29 +2052,29 @@ function lo(t, e = {}) {
|
|
|
2042
2052
|
log: !1,
|
|
2043
2053
|
params: null,
|
|
2044
2054
|
format: null
|
|
2045
|
-
}, e), { manual: s, log: o, params: l = {}, cb:
|
|
2055
|
+
}, e), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, v = R([]), w = R(!1), b = (p) => {
|
|
2046
2056
|
const g = p || l;
|
|
2047
|
-
|
|
2057
|
+
w.value = !0, t(g).then((m) => {
|
|
2048
2058
|
const { code: u, data: h, msg: k } = m;
|
|
2049
|
-
if (
|
|
2059
|
+
if (r) {
|
|
2050
2060
|
const { records: _, rows: C } = h || {}, S = _ || C ? _ || C : h;
|
|
2051
|
-
|
|
2061
|
+
v.value = De(S, i), r(m);
|
|
2052
2062
|
}
|
|
2053
2063
|
if (h) {
|
|
2054
2064
|
if (h.records != null || h.rows != null) {
|
|
2055
2065
|
const { records: _, rows: C, total: S = 0 } = h || {};
|
|
2056
|
-
g && g.total != null && (l.total = parseInt(S)),
|
|
2066
|
+
g && g.total != null && (l.total = parseInt(S)), v.value = De(_ || C || [], i);
|
|
2057
2067
|
} else
|
|
2058
|
-
|
|
2059
|
-
o && console.log("useRequest-res",
|
|
2068
|
+
v.value = De(h, i);
|
|
2069
|
+
o && console.log("useRequest-res", v.value);
|
|
2060
2070
|
}
|
|
2061
2071
|
}).catch((m) => {
|
|
2062
|
-
|
|
2072
|
+
r && (console.log("useRequestErr", m), r({ code: 500 }));
|
|
2063
2073
|
}).finally(() => {
|
|
2064
|
-
|
|
2074
|
+
w.value = !1;
|
|
2065
2075
|
});
|
|
2066
2076
|
};
|
|
2067
|
-
return s ||
|
|
2077
|
+
return s || b(), [w, v, b];
|
|
2068
2078
|
}
|
|
2069
2079
|
function ao(t) {
|
|
2070
2080
|
const e = R(t), n = R(""), a = R("");
|
|
@@ -2119,7 +2129,7 @@ function bt(t, e) {
|
|
|
2119
2129
|
const n = ut(), a = e(t), s = {};
|
|
2120
2130
|
return Object.keys(a).forEach((o) => {
|
|
2121
2131
|
const l = a[o].bind({ $store: n });
|
|
2122
|
-
s[o] =
|
|
2132
|
+
s[o] = re(l);
|
|
2123
2133
|
}), s;
|
|
2124
2134
|
}
|
|
2125
2135
|
function $n(t, e) {
|
|
@@ -2141,20 +2151,20 @@ function ho() {
|
|
|
2141
2151
|
const a = e.row[e.column.field];
|
|
2142
2152
|
if (t.type == "tag") {
|
|
2143
2153
|
let s;
|
|
2144
|
-
return
|
|
2154
|
+
return z(O("el-text"), {
|
|
2145
2155
|
type: t.enum.getTag(a)
|
|
2146
2156
|
}, ze(s = t.enum.getName(a)) ? s : {
|
|
2147
2157
|
default: () => [s]
|
|
2148
2158
|
});
|
|
2149
2159
|
}
|
|
2150
|
-
return
|
|
2160
|
+
return z(O("el-text"), null, ze(n = t.enum.getName(a)) ? n : {
|
|
2151
2161
|
default: () => [n]
|
|
2152
2162
|
});
|
|
2153
2163
|
}
|
|
2154
2164
|
}), xe.renderer.add("InputNumber", {
|
|
2155
2165
|
// 默认显示模板
|
|
2156
2166
|
renderTableDefault(t, e) {
|
|
2157
|
-
return
|
|
2167
|
+
return z(It, he({
|
|
2158
2168
|
modelValue: e.row[e.column.field],
|
|
2159
2169
|
"onUpdate:modelValue": (n) => e.row[e.column.field] = n
|
|
2160
2170
|
}, t.props, {
|
|
@@ -2169,7 +2179,7 @@ function ho() {
|
|
|
2169
2179
|
locale: n
|
|
2170
2180
|
} = me();
|
|
2171
2181
|
let a = n.value == "zh_cn";
|
|
2172
|
-
return
|
|
2182
|
+
return z(Lt, {
|
|
2173
2183
|
type: e.row[e.column.field] ? "success" : "danger"
|
|
2174
2184
|
}, {
|
|
2175
2185
|
default: () => [e.row[e.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2187,14 +2197,14 @@ function ho() {
|
|
|
2187
2197
|
}), xe.renderer.add("Link", {
|
|
2188
2198
|
// 默认显示模板
|
|
2189
2199
|
renderTableDefault(t, e) {
|
|
2190
|
-
var
|
|
2200
|
+
var r;
|
|
2191
2201
|
let n = e.column.field;
|
|
2192
2202
|
const a = Ut(), {
|
|
2193
2203
|
multiple: s,
|
|
2194
2204
|
to: o
|
|
2195
2205
|
} = t;
|
|
2196
2206
|
if (!s)
|
|
2197
|
-
return
|
|
2207
|
+
return z(Je, {
|
|
2198
2208
|
underline: "never",
|
|
2199
2209
|
type: "primary",
|
|
2200
2210
|
onclick: () => a.push({
|
|
@@ -2206,19 +2216,19 @@ function ho() {
|
|
|
2206
2216
|
}, {
|
|
2207
2217
|
default: () => [e.row[n]]
|
|
2208
2218
|
});
|
|
2209
|
-
const l = ((
|
|
2210
|
-
return l.map((
|
|
2219
|
+
const l = ((r = e.row[n]) == null ? void 0 : r.split(",")) || [];
|
|
2220
|
+
return l.map((i, v) => z("span", null, [z(Je, {
|
|
2211
2221
|
underline: "never",
|
|
2212
2222
|
type: "primary",
|
|
2213
2223
|
onclick: () => a.push({
|
|
2214
2224
|
path: o,
|
|
2215
2225
|
query: {
|
|
2216
|
-
[n]:
|
|
2226
|
+
[n]: i
|
|
2217
2227
|
}
|
|
2218
2228
|
})
|
|
2219
|
-
}, ze(
|
|
2220
|
-
default: () => [
|
|
2221
|
-
}),
|
|
2229
|
+
}, ze(i) ? i : {
|
|
2230
|
+
default: () => [i]
|
|
2231
|
+
}), v < l.length - 1 ? "," : ""]));
|
|
2222
2232
|
}
|
|
2223
2233
|
});
|
|
2224
2234
|
}
|