joy-admin-components 0.2.19 → 0.2.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,36 +1,36 @@
|
|
|
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
|
|
2
|
+
import { defineComponent as ot, ref as R, onMounted as lt, h as De, 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 Me, renderList as st, withModifiers as Ve, nextTick as Se, resolveDynamicComponent as rt, normalizeClass as Ee, withKeys as Dt, normalizeStyle as zt, reactive as $e, onUpdated as Ot, onUnmounted as Mt, withDirectives as Vt, isVNode as qt } from "vue";
|
|
3
3
|
import { saveAs as it } from "file-saver";
|
|
4
|
-
import
|
|
4
|
+
import Ie from "exceljs";
|
|
5
5
|
import ke from "dayjs";
|
|
6
6
|
import { createI18n as At, useI18n as me } from "vue-i18n";
|
|
7
7
|
import { debounce as Re, cloneDeep as ct, isArray as Qe } from "lodash";
|
|
8
8
|
import { useRoute as jt, useRouter as Ut } from "vue-router";
|
|
9
9
|
import { createNamespacedHelpers as Be, useStore as ut, mapState as Pt, mapGetters as Rt, mapActions as Bt } from "vuex";
|
|
10
|
-
import { VxeUI as
|
|
10
|
+
import { VxeUI as Ce } from "vxe-pc-ui";
|
|
11
11
|
const Vn = ot({
|
|
12
12
|
name: "LayOutForm",
|
|
13
13
|
setup(t, { slots: e, attrs: n, emit: a }) {
|
|
14
|
-
const
|
|
15
|
-
(
|
|
14
|
+
const 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
16
|
var i;
|
|
17
|
-
return
|
|
17
|
+
return De(
|
|
18
18
|
St,
|
|
19
|
-
{ span: ((i =
|
|
19
|
+
{ span: ((i = r.props) == null ? void 0 : i.span) || 24 },
|
|
20
20
|
{
|
|
21
|
-
default: () =>
|
|
21
|
+
default: () => r
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
26
|
lt(() => {
|
|
27
|
-
a("ref",
|
|
27
|
+
a("ref", s.value);
|
|
28
28
|
});
|
|
29
29
|
function l() {
|
|
30
|
-
return
|
|
30
|
+
return De(
|
|
31
31
|
_t,
|
|
32
|
-
{ ...n, ref:
|
|
33
|
-
() =>
|
|
32
|
+
{ ...n, ref: s },
|
|
33
|
+
() => De($t, { gutter: n.gutter ?? 20 }, { default: () => o() })
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
return l;
|
|
@@ -45,17 +45,17 @@ var ht = { exports: {} };
|
|
|
45
45
|
(function(n, a) {
|
|
46
46
|
t.exports = a();
|
|
47
47
|
})(dt, function() {
|
|
48
|
-
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g,
|
|
49
|
-
return function(o, l,
|
|
48
|
+
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
|
|
49
|
+
return function(o, l, r) {
|
|
50
50
|
var i = l.prototype;
|
|
51
|
-
|
|
51
|
+
r.utc = function(u) {
|
|
52
52
|
var h = { date: u, utc: !0, args: arguments };
|
|
53
53
|
return new l(h);
|
|
54
54
|
}, i.utc = function(u) {
|
|
55
|
-
var h =
|
|
55
|
+
var h = r(this.toDate(), { locale: this.$L, utc: !0 });
|
|
56
56
|
return u ? h.add(this.utcOffset(), n) : h;
|
|
57
57
|
}, i.local = function() {
|
|
58
|
-
return
|
|
58
|
+
return r(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
60
60
|
var v = i.parse;
|
|
61
61
|
i.parse = function(u) {
|
|
@@ -76,21 +76,21 @@ var ht = { exports: {} };
|
|
|
76
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 = ("" +
|
|
83
|
-
return
|
|
82
|
+
var F = ("" + B[0]).match(s) || ["-", 0, 0], d = F[0], C = 60 * +F[1] + +F[2];
|
|
83
|
+
return C === 0 ? 0 : d === "+" ? C : -C;
|
|
84
84
|
}(u), u === null))
|
|
85
85
|
return this;
|
|
86
86
|
var _ = Math.abs(u) <= 16 ? 60 * u : u;
|
|
87
87
|
if (_ === 0)
|
|
88
88
|
return this.utc(h);
|
|
89
|
-
var
|
|
89
|
+
var x = this.clone();
|
|
90
90
|
if (h)
|
|
91
|
-
return
|
|
91
|
+
return x.$offset = _, x.$u = !1, x;
|
|
92
92
|
var S = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
|
-
return (
|
|
93
|
+
return (x = this.local().add(_ + S, n)).$offset = _, x.$x.$localOffset = S, x;
|
|
94
94
|
};
|
|
95
95
|
var p = i.format;
|
|
96
96
|
i.format = function(u) {
|
|
@@ -108,14 +108,14 @@ var ht = { exports: {} };
|
|
|
108
108
|
};
|
|
109
109
|
var g = i.toDate;
|
|
110
110
|
i.toDate = function(u) {
|
|
111
|
-
return u === "s" && this.$offset ?
|
|
111
|
+
return u === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : g.call(this);
|
|
112
112
|
};
|
|
113
113
|
var m = i.diff;
|
|
114
114
|
i.diff = function(u, h, k) {
|
|
115
115
|
if (u && this.$u === u.$u)
|
|
116
116
|
return m.call(this, u, h, k);
|
|
117
|
-
var _ = this.local(),
|
|
118
|
-
return m.call(_,
|
|
117
|
+
var _ = this.local(), x = r(u).local();
|
|
118
|
+
return m.call(_, x, h, k);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
});
|
|
@@ -128,29 +128,29 @@ var mt = { exports: {} };
|
|
|
128
128
|
t.exports = a();
|
|
129
129
|
})(dt, function() {
|
|
130
130
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
131
|
-
return function(
|
|
132
|
-
var
|
|
131
|
+
return function(s, o, l) {
|
|
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 && (_ = {});
|
|
136
|
-
var
|
|
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:
|
|
136
|
+
var x = _.timeZoneName || "short", S = k + "|" + x, E = a[S];
|
|
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: x }), a[S] = E), E;
|
|
138
138
|
}(g, m);
|
|
139
139
|
return h.formatToParts(u);
|
|
140
140
|
}, v = function(p, g) {
|
|
141
141
|
for (var m = i(p, g), u = [], h = 0; h < m.length; h += 1) {
|
|
142
|
-
var k = m[h], _ = k.type,
|
|
143
|
-
S >= 0 && (u[S] = parseInt(
|
|
142
|
+
var k = m[h], _ = k.type, x = k.value, S = n[_];
|
|
143
|
+
S >= 0 && (u[S] = parseInt(x, 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
147
|
}, w = o.prototype;
|
|
148
148
|
w.tz = function(p, g) {
|
|
149
|
-
p === void 0 && (p =
|
|
150
|
-
var m, u = this.utcOffset(), h = this.toDate(), k = h.toLocaleString("en-US", { timeZone: p }), _ = Math.round((h - new Date(k)) / 1e3 / 60),
|
|
151
|
-
if (!Number(
|
|
149
|
+
p === void 0 && (p = r);
|
|
150
|
+
var m, u = this.utcOffset(), h = this.toDate(), k = h.toLocaleString("en-US", { timeZone: p }), _ = Math.round((h - new Date(k)) / 1e3 / 60), x = 15 * -Math.round(h.getTimezoneOffset() / 15) - _;
|
|
151
|
+
if (!Number(x))
|
|
152
152
|
m = this.utcOffset(0, g);
|
|
153
|
-
else if (m = l(k, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(
|
|
153
|
+
else if (m = l(k, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(x, !0), g) {
|
|
154
154
|
var S = m.utcOffset();
|
|
155
155
|
m = m.add(u - S, "minute");
|
|
156
156
|
}
|
|
@@ -168,21 +168,21 @@ var mt = { exports: {} };
|
|
|
168
168
|
var m = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
169
|
return b.call(m, p, g).tz(this.$x.$timezone, !0);
|
|
170
170
|
}, l.tz = function(p, g, m) {
|
|
171
|
-
var u = m && g, h = m || g ||
|
|
171
|
+
var u = m && g, h = m || g || r, k = v(+l(), h);
|
|
172
172
|
if (typeof p != "string")
|
|
173
173
|
return l(p).tz(h);
|
|
174
|
-
var _ = function(
|
|
175
|
-
var
|
|
176
|
-
if (F ===
|
|
177
|
-
return [
|
|
178
|
-
var A = v(
|
|
179
|
-
return
|
|
180
|
-
}(l.utc(p, u).valueOf(), k, h),
|
|
174
|
+
var _ = function(B, F, d) {
|
|
175
|
+
var C = B - 60 * F * 1e3, M = v(C, d);
|
|
176
|
+
if (F === M)
|
|
177
|
+
return [C, F];
|
|
178
|
+
var A = v(C -= 60 * (M - F) * 1e3, d);
|
|
179
|
+
return M === A ? [C, M] : [B - 60 * Math.min(M, A) * 1e3, Math.max(M, A)];
|
|
180
|
+
}(l.utc(p, u).valueOf(), k, h), x = _[0], S = _[1], E = l(x).utcOffset(S);
|
|
181
181
|
return E.$x.$timezone = h, E;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
184
|
}, l.tz.setDefault = function(p) {
|
|
185
|
-
|
|
185
|
+
r = p;
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
});
|
|
@@ -289,10 +289,10 @@ async function qn(t, e) {
|
|
|
289
289
|
const l = ve();
|
|
290
290
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
291
291
|
}
|
|
292
|
-
let
|
|
293
|
-
await
|
|
292
|
+
let s = new Ie.Workbook();
|
|
293
|
+
await s.xlsx.load(t);
|
|
294
294
|
const o = {};
|
|
295
|
-
return
|
|
295
|
+
return s.eachSheet(function(l, r) {
|
|
296
296
|
const i = [];
|
|
297
297
|
l.eachRow(function(v, w) {
|
|
298
298
|
if (w > a) {
|
|
@@ -303,7 +303,7 @@ async function qn(t, e) {
|
|
|
303
303
|
}), p || i.push(b);
|
|
304
304
|
}
|
|
305
305
|
}), o[l._name] = i;
|
|
306
|
-
}),
|
|
306
|
+
}), s = null, o;
|
|
307
307
|
}
|
|
308
308
|
const gt = {
|
|
309
309
|
columnWidth: 30
|
|
@@ -311,12 +311,12 @@ const gt = {
|
|
|
311
311
|
async function An(t, e, n = [], a = {}) {
|
|
312
312
|
if (!t || !e)
|
|
313
313
|
return;
|
|
314
|
-
const { columnStyle:
|
|
314
|
+
const { columnStyle: s } = a, { columnWidth: o } = gt;
|
|
315
315
|
e.forEach((i) => {
|
|
316
316
|
i.width = i.width ? i.width : o;
|
|
317
317
|
});
|
|
318
|
-
const { workbook: l, worksheet:
|
|
319
|
-
|
|
318
|
+
const { workbook: l, worksheet: r } = Gt();
|
|
319
|
+
r.columns = e, r.addRows(n), s && await Jt(l, r, s);
|
|
320
320
|
try {
|
|
321
321
|
const i = await l.xlsx.writeBuffer(), v = new File([i], t, {
|
|
322
322
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
@@ -327,55 +327,55 @@ async function An(t, e, n = [], a = {}) {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
function Gt() {
|
|
330
|
-
const t = new
|
|
330
|
+
const t = new Ie.Workbook();
|
|
331
331
|
t.creator = "distributor System", t.lastModifiedBy = "distributor System", t.created = /* @__PURE__ */ new Date(), t.modified = /* @__PURE__ */ new Date(), t.lastPrinted = /* @__PURE__ */ new Date();
|
|
332
332
|
const e = t.addWorksheet("Sheet1");
|
|
333
333
|
return { workbook: t, worksheet: e };
|
|
334
334
|
}
|
|
335
335
|
async function Jt(t, e, n) {
|
|
336
336
|
const a = Object.keys(n);
|
|
337
|
-
for (const
|
|
338
|
-
const o = n[
|
|
337
|
+
for (const s of a) {
|
|
338
|
+
const o = n[s], { type: l } = o;
|
|
339
339
|
switch (l) {
|
|
340
340
|
case "IMG":
|
|
341
|
-
await Xt(t, e,
|
|
341
|
+
await Xt(t, e, s);
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
async function Xt(t, e, n, a) {
|
|
347
|
-
const
|
|
348
|
-
e.getColumn(n).width = 20, e.eachRow((l,
|
|
349
|
-
|
|
347
|
+
const s = e.getColumn(n), o = s.values;
|
|
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
354
|
let i = o[l];
|
|
355
|
-
i && (e.getCell(
|
|
355
|
+
i && (e.getCell(s.letter + l).value = "", await Qt(t, e, i, {
|
|
356
356
|
width: 100,
|
|
357
357
|
height: 50,
|
|
358
|
-
col:
|
|
358
|
+
col: s._number - 1,
|
|
359
359
|
row: l - 1
|
|
360
360
|
}));
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function Qt(t, e, n, a) {
|
|
364
|
-
const { col:
|
|
364
|
+
const { col: s, row: o, width: l, height: r } = a, { success: i, base64: v } = await en(n, 0.3);
|
|
365
365
|
if (i) {
|
|
366
366
|
const w = t.addImage({
|
|
367
367
|
base64: v,
|
|
368
368
|
extension: "jpeg"
|
|
369
369
|
});
|
|
370
370
|
e.addImage(w, {
|
|
371
|
-
tl: { col:
|
|
372
|
-
ext: { width: l, height:
|
|
371
|
+
tl: { col: s, row: o },
|
|
372
|
+
ext: { width: l, height: r }
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
function en(t, e = 1) {
|
|
377
377
|
const n = new Image();
|
|
378
|
-
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((a,
|
|
378
|
+
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = t, new Promise((a, s) => {
|
|
379
379
|
n.onload = () => {
|
|
380
380
|
const o = document.createElement("canvas");
|
|
381
381
|
o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, o.width, o.height), a({
|
|
@@ -395,16 +395,16 @@ async function tn(t, e) {
|
|
|
395
395
|
const l = ve();
|
|
396
396
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
397
397
|
}
|
|
398
|
-
let
|
|
399
|
-
await
|
|
398
|
+
let s = new Ie.Workbook();
|
|
399
|
+
await s.xlsx.load(t);
|
|
400
400
|
const o = {};
|
|
401
|
-
return
|
|
401
|
+
return s.eachSheet(function(l, r) {
|
|
402
402
|
if (l.state == "visible") {
|
|
403
403
|
const i = [], v = n[l._name];
|
|
404
404
|
if (v) {
|
|
405
405
|
let w = Object.values(v).some((p) => p.includes("image")), b = {};
|
|
406
406
|
w && (l.getImages().forEach((g) => {
|
|
407
|
-
const { tl: m } = g.range, u =
|
|
407
|
+
const { tl: m } = g.range, u = 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];
|
|
@@ -415,27 +415,27 @@ async function tn(t, e) {
|
|
|
415
415
|
Object.keys(v).forEach((h) => {
|
|
416
416
|
var E;
|
|
417
417
|
let [k, _] = v[h].split(je);
|
|
418
|
-
const
|
|
418
|
+
const x = p.getCell(k);
|
|
419
419
|
let S;
|
|
420
420
|
if (_ == "image" && w) {
|
|
421
|
-
const
|
|
421
|
+
const B = x._column._number, F = `${g}_${B}`;
|
|
422
422
|
S = b[F] || "";
|
|
423
423
|
} else
|
|
424
|
-
|
|
424
|
+
x.result != null ? S = x.result : (E = x.value) != null && E.richText ? S = x.value.richText.reduce((B, F) => B + F.text, "") : x.type == 4 && x.value ? S = ke(x.value).utc().format("YYYY-MM-DD HH:mm:ss") : S = x.value;
|
|
425
425
|
S && _ == "option" && (S = S.split(je)[1]), m[h] = S, S && (u = !1);
|
|
426
426
|
}), u || i.push(m);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
431
|
+
}), s = null, o;
|
|
432
432
|
}
|
|
433
433
|
async function nn(t, e) {
|
|
434
434
|
if (!t || e.length == 0)
|
|
435
435
|
return;
|
|
436
436
|
const n = on(e);
|
|
437
|
-
n.eachSheet(function(a,
|
|
438
|
-
const { columnWidth: o } = gt, { tableHeader: l, tableData:
|
|
437
|
+
n.eachSheet(function(a, s) {
|
|
438
|
+
const { columnWidth: o } = gt, { tableHeader: l, tableData: r } = e[a._name];
|
|
439
439
|
l.forEach((i) => {
|
|
440
440
|
if (i.required) {
|
|
441
441
|
const v = i.style || {}, { font: w = {} } = v;
|
|
@@ -449,7 +449,7 @@ async function nn(t, e) {
|
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
451
|
}
|
|
452
|
-
}), a.columns = l, a.addRows(
|
|
452
|
+
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
453
453
|
const { header: v, key: w, width: b, option: p } = i, g = a.getColumn(w);
|
|
454
454
|
if (g.width = b || o, p) {
|
|
455
455
|
const m = n.addWorksheet(w);
|
|
@@ -470,22 +470,22 @@ async function nn(t, e) {
|
|
|
470
470
|
});
|
|
471
471
|
});
|
|
472
472
|
try {
|
|
473
|
-
const a = await n.xlsx.writeBuffer(),
|
|
473
|
+
const a = await n.xlsx.writeBuffer(), s = new File([a], t, {
|
|
474
474
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
475
475
|
});
|
|
476
|
-
it(
|
|
476
|
+
it(s);
|
|
477
477
|
} catch (a) {
|
|
478
478
|
console.log(a);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
function on(t) {
|
|
482
|
-
const e = ve(), n = new
|
|
483
|
-
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(t).sort((
|
|
484
|
-
const l = t[
|
|
485
|
-
return l -
|
|
486
|
-
}).forEach((
|
|
487
|
-
let o =
|
|
488
|
-
/[\\/:*?\[\]]/g.test(
|
|
482
|
+
const e = ve(), n = new Ie.Workbook();
|
|
483
|
+
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(t).sort((s, o) => {
|
|
484
|
+
const l = t[s].sort ?? 0, r = t[o].sort ?? 0;
|
|
485
|
+
return l - r;
|
|
486
|
+
}).forEach((s) => {
|
|
487
|
+
let o = s, l = !1;
|
|
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);
|
|
489
489
|
}), n;
|
|
490
490
|
}
|
|
491
491
|
function ln(t) {
|
|
@@ -507,17 +507,17 @@ function Un(t) {
|
|
|
507
507
|
return JSON.parse(JSON.stringify(t));
|
|
508
508
|
}
|
|
509
509
|
function Pn(t) {
|
|
510
|
-
let e = [], n = {}, a = (
|
|
511
|
-
for (const
|
|
512
|
-
n[
|
|
513
|
-
...
|
|
510
|
+
let e = [], n = {}, a = (s, o) => Object.prototype.hasOwnProperty.call(s, o);
|
|
511
|
+
for (const s of t) {
|
|
512
|
+
n[s.id] = {
|
|
513
|
+
...s,
|
|
514
514
|
// 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
|
|
515
|
-
children: a(n,
|
|
515
|
+
children: a(n, s.id) ? n[s.id].children : []
|
|
516
516
|
};
|
|
517
|
-
const o = n[
|
|
518
|
-
|
|
517
|
+
const o = n[s.id];
|
|
518
|
+
s.pid == -1 ? e.push(o) : (a(n, s.pid) || (n[s.pid] = {
|
|
519
519
|
children: []
|
|
520
|
-
}), n[
|
|
520
|
+
}), n[s.pid].children.push(o));
|
|
521
521
|
}
|
|
522
522
|
return e;
|
|
523
523
|
}
|
|
@@ -536,8 +536,8 @@ class et {
|
|
|
536
536
|
getName(e) {
|
|
537
537
|
if (!this.has(e))
|
|
538
538
|
return "-";
|
|
539
|
-
const n = Ye().global.locale, { label: a, labelEn:
|
|
540
|
-
return (n.value == "zh_cn" ? a :
|
|
539
|
+
const n = Ye().global.locale, { label: a, labelEn: s } = this.map.get(e);
|
|
540
|
+
return (n.value == "zh_cn" ? a : s) || a || "-";
|
|
541
541
|
}
|
|
542
542
|
getTag(e) {
|
|
543
543
|
if (!this.has(e))
|
|
@@ -562,13 +562,13 @@ function Rn(t, e = [], n = "i18nName") {
|
|
|
562
562
|
if (t.length == 0)
|
|
563
563
|
return new et([]);
|
|
564
564
|
if (e.length < 2) {
|
|
565
|
-
const
|
|
566
|
-
throw new Error(
|
|
565
|
+
const s = ve();
|
|
566
|
+
throw new Error(s("tools.keysLengthError"));
|
|
567
567
|
}
|
|
568
|
-
let a = t.map((
|
|
568
|
+
let a = t.map((s) => {
|
|
569
569
|
let o = {};
|
|
570
|
-
return n && (o.labelEn =
|
|
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:
|
|
593
|
-
o ? e[
|
|
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) {
|
|
@@ -598,10 +598,10 @@ function Wn(t, e) {
|
|
|
598
598
|
}
|
|
599
599
|
const _e = (t, e) => {
|
|
600
600
|
const n = t.__vccOpts || t;
|
|
601
|
-
for (const [a,
|
|
602
|
-
n[a] =
|
|
601
|
+
for (const [a, s] of e)
|
|
602
|
+
n[a] = s;
|
|
603
603
|
return n;
|
|
604
|
-
}, an = ["onClick"],
|
|
604
|
+
}, an = ["onClick"], sn = {
|
|
605
605
|
__name: "index",
|
|
606
606
|
props: /* @__PURE__ */ Xe({
|
|
607
607
|
api: {
|
|
@@ -641,13 +641,13 @@ 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:
|
|
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(i.value), { data:
|
|
647
|
+
const d = pt(i.value), { data: C, labelValue: M } = n, A = C || p.value;
|
|
648
648
|
if (d.length == 0)
|
|
649
649
|
return A;
|
|
650
|
-
const { label: oe, labelEn: ue } =
|
|
650
|
+
const { label: oe, labelEn: ue } = M;
|
|
651
651
|
let y = o.value == "en_us" ? ue || "i18nName" : oe;
|
|
652
652
|
return d.length == 1 ? A.filter(
|
|
653
653
|
(ie) => ie[y].toLowerCase().includes(d[0].toLowerCase())
|
|
@@ -675,66 +675,66 @@ const _e = (t, e) => {
|
|
|
675
675
|
const u = n.labelValue.label.split("-"), h = (d) => {
|
|
676
676
|
if (u.length == 1) {
|
|
677
677
|
if (n.changeLocal)
|
|
678
|
-
return
|
|
679
|
-
let
|
|
680
|
-
return
|
|
678
|
+
return s(d[n.labelValue.label]);
|
|
679
|
+
let C = o.value == "en_us" ? d[n.labelValue.labelEn || "i18nName"] : d[n.labelValue.label];
|
|
680
|
+
return C = C || d[n.labelValue.label], C;
|
|
681
681
|
} else {
|
|
682
|
-
let
|
|
683
|
-
return u.forEach((
|
|
684
|
-
|
|
685
|
-
}),
|
|
682
|
+
let C = [];
|
|
683
|
+
return u.forEach((M) => {
|
|
684
|
+
C.push(d[M]);
|
|
685
|
+
}), C.join("-");
|
|
686
686
|
}
|
|
687
687
|
};
|
|
688
688
|
function k(d) {
|
|
689
|
-
let
|
|
690
|
-
l.value = d ?
|
|
691
|
-
(
|
|
689
|
+
let C = n.data ? n.data : p.value;
|
|
690
|
+
l.value = d ? C.map(
|
|
691
|
+
(M) => r.value ? M : M[n.labelValue.value]
|
|
692
692
|
) : [], Se(() => {
|
|
693
|
-
b("change", l.value), b("changeAll", l.value,
|
|
693
|
+
b("change", l.value), b("changeAll", l.value, C);
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
696
|
function _(d) {
|
|
697
|
-
n.optionClick && n.optionClick(d), b("change",
|
|
697
|
+
n.optionClick && n.optionClick(d), b("change", r.value ? d : d[n.labelValue.value]);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function x(d) {
|
|
700
700
|
return l.value.length >= n.maxLimit && !l.value.includes(d[n.labelValue.value]);
|
|
701
701
|
}
|
|
702
702
|
function S(d) {
|
|
703
|
-
return d.map((
|
|
704
|
-
...
|
|
705
|
-
label: h(
|
|
706
|
-
value:
|
|
703
|
+
return d.map((C) => ({
|
|
704
|
+
...C,
|
|
705
|
+
label: h(C),
|
|
706
|
+
value: r.value ? C : C[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
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
E.value =
|
|
713
|
+
var M;
|
|
714
|
+
const C = S(d);
|
|
715
|
+
if (C.length !== E.value.length)
|
|
716
|
+
E.value = C;
|
|
717
717
|
else {
|
|
718
718
|
let A = !1;
|
|
719
|
-
for (let oe = 0; oe <
|
|
720
|
-
if (
|
|
719
|
+
for (let oe = 0; oe < C.length; oe++)
|
|
720
|
+
if (C[oe].value !== ((M = E.value[oe]) == null ? void 0 : M.value)) {
|
|
721
721
|
A = !0;
|
|
722
722
|
break;
|
|
723
723
|
}
|
|
724
|
-
A && (E.value =
|
|
724
|
+
A && (E.value = C);
|
|
725
725
|
}
|
|
726
726
|
},
|
|
727
727
|
{ deep: !0 }
|
|
728
728
|
);
|
|
729
729
|
const F = re(() => E.value);
|
|
730
|
-
return (d,
|
|
731
|
-
const
|
|
732
|
-
return
|
|
730
|
+
return (d, C) => {
|
|
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":
|
|
737
|
-
},
|
|
736
|
+
"onUpdate:modelValue": C[1] || (C[1] = (y) => l.value = y)
|
|
737
|
+
}, K(a), {
|
|
738
738
|
filterable: "",
|
|
739
739
|
"collapse-tags": "",
|
|
740
740
|
"collapse-tags-tooltip": "",
|
|
@@ -749,14 +749,14 @@ const _e = (t, e) => {
|
|
|
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
758
|
modelValue: w.value,
|
|
759
|
-
"onUpdate:modelValue":
|
|
759
|
+
"onUpdate:modelValue": C[0] || (C[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":
|
|
774
|
+
"onUpdate:modelValue": C[3] || (C[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
785
|
modelValue: w.value,
|
|
786
|
-
"onUpdate:modelValue":
|
|
786
|
+
"onUpdate:modelValue": C[2] || (C[2] = (y) => w.value = y),
|
|
787
787
|
onChange: k
|
|
788
788
|
}, {
|
|
789
789
|
default: D(() => [
|
|
@@ -792,19 +792,19 @@ const _e = (t, e) => {
|
|
|
792
792
|
_: 1
|
|
793
793
|
}, 8, ["modelValue"])
|
|
794
794
|
], !0) : ce("", !0),
|
|
795
|
-
(L(!0), se(
|
|
795
|
+
(L(!0), se(Me, null, st(v.value, (y, ge) => (L(), H(oe, {
|
|
796
796
|
key: ge,
|
|
797
797
|
label: h(y),
|
|
798
|
-
disabled:
|
|
799
|
-
onClick:
|
|
800
|
-
value:
|
|
798
|
+
disabled: K(a).multiple != null && t.maxLimit > 0 ? x(y) : !1,
|
|
799
|
+
onClick: Ve((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
|
|
804
804
|
}, 16, ["modelValue", "filter-method", "onClear"]));
|
|
805
805
|
};
|
|
806
806
|
}
|
|
807
|
-
},
|
|
807
|
+
}, rn = /* @__PURE__ */ _e(sn, [["__scopeId", "data-v-d12f3c20"]]);
|
|
808
808
|
const cn = ot({
|
|
809
809
|
props: {
|
|
810
810
|
name: {
|
|
@@ -813,11 +813,11 @@ const cn = ot({
|
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
815
|
});
|
|
816
|
-
function un(t, e, n, a,
|
|
817
|
-
const l =
|
|
818
|
-
return L(),
|
|
816
|
+
function un(t, e, n, a, s, o) {
|
|
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
|
});
|
|
@@ -829,20 +829,24 @@ const yt = /* @__PURE__ */ _e(cn, [["render", un], ["__scopeId", "data-v-733f9da
|
|
|
829
829
|
const n = e, a = Re(() => {
|
|
830
830
|
n("ok");
|
|
831
831
|
}, 500);
|
|
832
|
-
function
|
|
832
|
+
function s() {
|
|
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", {
|
|
838
|
+
class: Ee(o.$attrs.class)
|
|
839
|
+
}, [
|
|
840
|
+
z(r, he(o.$attrs, {
|
|
841
|
+
onConfirm: K(a),
|
|
842
|
+
onCancel: s
|
|
843
|
+
}), {
|
|
844
|
+
reference: D(() => [
|
|
845
|
+
X(o.$slots, "default")
|
|
846
|
+
]),
|
|
847
|
+
_: 3
|
|
848
|
+
}, 16, ["onConfirm"])
|
|
849
|
+
], 2);
|
|
846
850
|
};
|
|
847
851
|
}
|
|
848
852
|
};
|
|
@@ -864,26 +868,26 @@ const dn = ["accept"], fn = {
|
|
|
864
868
|
},
|
|
865
869
|
emits: ["fileChange"],
|
|
866
870
|
setup(t, { emit: e }) {
|
|
867
|
-
const n = t, a = R(null),
|
|
871
|
+
const n = t, a = R(null), s = R(!1);
|
|
868
872
|
async function o(l) {
|
|
869
|
-
|
|
870
|
-
let
|
|
871
|
-
const i = await tn(
|
|
872
|
-
|
|
873
|
+
s.value = !0;
|
|
874
|
+
let r = l.target.files[0];
|
|
875
|
+
const i = await tn(r, n.fields).catch(() => {
|
|
876
|
+
s.value = !1;
|
|
873
877
|
}).finally(() => {
|
|
874
878
|
a.value.value = null;
|
|
875
879
|
});
|
|
876
880
|
await n.fileChange(i).finally(() => {
|
|
877
|
-
|
|
881
|
+
s.value = !1;
|
|
878
882
|
});
|
|
879
883
|
}
|
|
880
|
-
return (l,
|
|
881
|
-
const i =
|
|
884
|
+
return (l, r) => {
|
|
885
|
+
const i = O("el-button");
|
|
882
886
|
return L(), se("span", null, [
|
|
883
|
-
|
|
884
|
-
loading:
|
|
887
|
+
z(i, {
|
|
888
|
+
loading: s.value,
|
|
885
889
|
class: "mgr10",
|
|
886
|
-
onClick:
|
|
890
|
+
onClick: r[0] || (r[0] = (v) => a.value.click())
|
|
887
891
|
}, {
|
|
888
892
|
default: D(() => [
|
|
889
893
|
Q(J(l.$t("dao-ru")), 1)
|
|
@@ -905,15 +909,15 @@ const dn = ["accept"], fn = {
|
|
|
905
909
|
function Ue(t) {
|
|
906
910
|
let e = {};
|
|
907
911
|
return t.forEach((n) => {
|
|
908
|
-
const { key: a, type:
|
|
912
|
+
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
909
913
|
if (a)
|
|
910
|
-
if (
|
|
914
|
+
if (s == "input" && (o != null && o.multiple))
|
|
911
915
|
e[a] = pt(l);
|
|
912
|
-
else if (
|
|
913
|
-
if (
|
|
916
|
+
else if (s == "date")
|
|
917
|
+
if (r.includes("range")) {
|
|
914
918
|
const [i, v] = a;
|
|
915
919
|
let [w, b] = l || [];
|
|
916
|
-
w &&
|
|
920
|
+
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;
|
|
917
921
|
} else
|
|
918
922
|
e[a] = l;
|
|
919
923
|
else
|
|
@@ -930,18 +934,18 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
930
934
|
},
|
|
931
935
|
emits: ["confirm", "reset", "visibleChange"],
|
|
932
936
|
setup(t, { expose: e, emit: n }) {
|
|
933
|
-
const a = t,
|
|
937
|
+
const a = t, s = n, o = R(!0), l = R(null), { t: r } = me(), i = re(() => o.value ? r("guan-bi") : r("zhan-kai"));
|
|
934
938
|
function v() {
|
|
935
|
-
|
|
939
|
+
s("confirm");
|
|
936
940
|
}
|
|
937
941
|
function w(h) {
|
|
938
|
-
h.option.onClear && h.option.onClear(),
|
|
942
|
+
h.option.onClear && h.option.onClear(), s("confirm");
|
|
939
943
|
}
|
|
940
944
|
function b() {
|
|
941
|
-
|
|
945
|
+
s("reset");
|
|
942
946
|
}
|
|
943
947
|
function p() {
|
|
944
|
-
|
|
948
|
+
s("confirm");
|
|
945
949
|
}
|
|
946
950
|
function g() {
|
|
947
951
|
return Ue(a.form.items);
|
|
@@ -954,7 +958,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
954
958
|
});
|
|
955
959
|
}
|
|
956
960
|
return e({ getPrm: g, reset: u }), (h, k) => {
|
|
957
|
-
const _ =
|
|
961
|
+
const _ = O("el-input"), x = O("el-date-picker"), S = O("el-form-item"), E = O("el-form"), B = O("el-link"), F = O("el-button");
|
|
958
962
|
return L(), se("div", {
|
|
959
963
|
class: "searchBar-container mgt10 mgb10",
|
|
960
964
|
onKeydown: Dt(v, ["enter"])
|
|
@@ -963,41 +967,41 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
963
967
|
class: "searchBar",
|
|
964
968
|
style: zt({ height: o.value ? "auto" : "42px" })
|
|
965
969
|
}, [
|
|
966
|
-
|
|
970
|
+
z(E, {
|
|
967
971
|
inline: "",
|
|
968
972
|
model: t.form.data
|
|
969
973
|
}, {
|
|
970
974
|
default: D(() => [
|
|
971
|
-
(L(!0), se(
|
|
975
|
+
(L(!0), se(Me, null, st(t.form.items.filter((d) => !d.hidden), (d) => (L(), se(Me, {
|
|
972
976
|
key: d.key
|
|
973
977
|
}, [
|
|
974
|
-
d.type == "br" ? (L(), se("br", hn)) : (L(),
|
|
978
|
+
d.type == "br" ? (L(), se("br", hn)) : (L(), H(S, {
|
|
975
979
|
key: 1,
|
|
976
980
|
label: d.name
|
|
977
981
|
}, {
|
|
978
982
|
default: D(() => {
|
|
979
|
-
var
|
|
983
|
+
var C, M;
|
|
980
984
|
return [
|
|
981
|
-
d.type === "input" ? (L(),
|
|
985
|
+
d.type === "input" ? (L(), H(_, {
|
|
982
986
|
key: 0,
|
|
983
987
|
modelValue: d.value,
|
|
984
988
|
"onUpdate:modelValue": (A) => d.value = A,
|
|
985
|
-
class:
|
|
989
|
+
class: Ee(((C = d.option) == null ? void 0 : C.class) || "w150"),
|
|
986
990
|
placeholder: h.$t("qing-shu-ru"),
|
|
987
991
|
clearable: ""
|
|
988
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (L(),
|
|
989
|
-
d.type === "select" ? (L(),
|
|
992
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : d.type === "custom" ? (L(), H(rt(d.render), { key: 1 })) : ce("", !0),
|
|
993
|
+
d.type === "select" ? (L(), H(rn, he({
|
|
990
994
|
key: 2,
|
|
991
|
-
class: ((
|
|
995
|
+
class: ((M = d.option) == null ? void 0 : M.class) || "w150",
|
|
992
996
|
modelValue: d.value,
|
|
993
997
|
"onUpdate:modelValue": (A) => d.value = A
|
|
994
998
|
}, { ref_for: !0 }, d.option, {
|
|
995
999
|
onChange: v,
|
|
996
1000
|
onClear: (A) => w(d)
|
|
997
1001
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
|
|
998
|
-
d.type === "date" ? (L(),
|
|
1002
|
+
d.type === "date" ? (L(), H(x, {
|
|
999
1003
|
key: 3,
|
|
1000
|
-
class:
|
|
1004
|
+
class: Ee({ datetimerange: "w300", daterange: "w200" }[d.dateType] || "w100"),
|
|
1001
1005
|
modelValue: d.value,
|
|
1002
1006
|
"onUpdate:modelValue": (A) => d.value = A,
|
|
1003
1007
|
"value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[d.dateType] || "YYYY-MM-DD",
|
|
@@ -1022,22 +1026,22 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1022
1026
|
X(h.$slots, "table-header-left", {}, void 0, !0)
|
|
1023
1027
|
]),
|
|
1024
1028
|
ae("div", pn, [
|
|
1025
|
-
|
|
1029
|
+
z(B, {
|
|
1026
1030
|
underline: "never",
|
|
1027
1031
|
class: "mgr10",
|
|
1028
1032
|
onClick: k[0] || (k[0] = () => {
|
|
1029
|
-
|
|
1033
|
+
s("visibleChange", !o.value), o.value = !o.value;
|
|
1030
1034
|
})
|
|
1031
1035
|
}, {
|
|
1032
1036
|
default: D(() => [
|
|
1033
|
-
|
|
1037
|
+
z(yt, {
|
|
1034
1038
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1035
1039
|
}, null, 8, ["name"]),
|
|
1036
1040
|
Q(" " + J(i.value), 1)
|
|
1037
1041
|
]),
|
|
1038
1042
|
_: 1
|
|
1039
1043
|
}),
|
|
1040
|
-
|
|
1044
|
+
z(F, {
|
|
1041
1045
|
type: "primary",
|
|
1042
1046
|
onClick: v
|
|
1043
1047
|
}, {
|
|
@@ -1046,7 +1050,7 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1046
1050
|
]),
|
|
1047
1051
|
_: 1
|
|
1048
1052
|
}),
|
|
1049
|
-
|
|
1053
|
+
z(F, {
|
|
1050
1054
|
type: "primary",
|
|
1051
1055
|
onClick: b
|
|
1052
1056
|
}, {
|
|
@@ -1091,24 +1095,24 @@ const hn = { key: 0 }, mn = { class: "btns" }, gn = { class: "left" }, pn = { cl
|
|
|
1091
1095
|
enableCellCopy: !0
|
|
1092
1096
|
// 是否启用单元格选区复制功能
|
|
1093
1097
|
};
|
|
1094
|
-
let
|
|
1098
|
+
let xe = { ...vt };
|
|
1095
1099
|
function Jn(t) {
|
|
1096
|
-
|
|
1097
|
-
...
|
|
1100
|
+
xe = {
|
|
1101
|
+
...xe,
|
|
1098
1102
|
...t,
|
|
1099
1103
|
responseDataKeys: {
|
|
1100
|
-
...
|
|
1104
|
+
...xe.responseDataKeys,
|
|
1101
1105
|
...t.responseDataKeys || {}
|
|
1102
1106
|
}
|
|
1103
1107
|
};
|
|
1104
1108
|
}
|
|
1105
1109
|
function bn() {
|
|
1106
|
-
return
|
|
1110
|
+
return xe;
|
|
1107
1111
|
}
|
|
1108
1112
|
function Xn() {
|
|
1109
|
-
|
|
1113
|
+
xe = { ...vt };
|
|
1110
1114
|
}
|
|
1111
|
-
const wn = { class: "center" },
|
|
1115
|
+
const wn = { class: "center" }, Cn = {
|
|
1112
1116
|
__name: "index",
|
|
1113
1117
|
props: {
|
|
1114
1118
|
// 表格id 本地存储列设置时使用,不传则使用路由路径自动生成
|
|
@@ -1145,10 +1149,10 @@ const wn = { class: "center" }, xn = {
|
|
|
1145
1149
|
}
|
|
1146
1150
|
},
|
|
1147
1151
|
setup(t, { expose: e }) {
|
|
1148
|
-
const { t: n, locale: a } = me(),
|
|
1152
|
+
const { t: n, locale: a } = me(), s = jt(), o = bn(), l = t, r = R(!1), i = R([]);
|
|
1149
1153
|
l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []);
|
|
1150
1154
|
const v = re(() => {
|
|
1151
|
-
const f =
|
|
1155
|
+
const f = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1152
1156
|
return l.id ? `listPageId-${f}-${l.id}` : `listPageId-${f}`;
|
|
1153
1157
|
}), w = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, p = l.searchForm.pageSizeKey || o.pageSizeKey, g = $e({
|
|
1154
1158
|
[b]: 1,
|
|
@@ -1158,27 +1162,27 @@ const wn = { class: "center" }, xn = {
|
|
|
1158
1162
|
Se(() => {
|
|
1159
1163
|
if (!u.value)
|
|
1160
1164
|
return;
|
|
1161
|
-
const c = u.value.getBoundingClientRect(), $ = window.innerHeight, T = c.top, U = 100, W = $ - T - U,
|
|
1162
|
-
h.value = Math.max(W,
|
|
1165
|
+
const c = u.value.getBoundingClientRect(), $ = window.innerHeight, T = c.top, U = 100, W = $ - T - U, V = 200;
|
|
1166
|
+
h.value = Math.max(W, V);
|
|
1163
1167
|
});
|
|
1164
1168
|
}, 100), _ = () => {
|
|
1165
1169
|
k();
|
|
1166
|
-
},
|
|
1170
|
+
}, x = () => {
|
|
1167
1171
|
if (!l.searchForm.enableCellCopy)
|
|
1168
1172
|
return !1;
|
|
1169
1173
|
const f = m.value;
|
|
1170
1174
|
if (!f || !f.$el)
|
|
1171
1175
|
return !1;
|
|
1172
1176
|
const c = f.$el;
|
|
1173
|
-
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown",
|
|
1177
|
+
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Fe), c.addEventListener("mousedown", ie), c.addEventListener("mousemove", pe), c.addEventListener("mouseup", be), c.addEventListener("keydown", Fe), !0;
|
|
1174
1178
|
};
|
|
1175
1179
|
lt(() => {
|
|
1176
1180
|
k(), window.addEventListener("resize", _), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
|
|
1177
|
-
|
|
1181
|
+
x();
|
|
1178
1182
|
}, 500));
|
|
1179
1183
|
}), Ot(() => {
|
|
1180
1184
|
l.searchForm.enableCellCopy && setTimeout(() => {
|
|
1181
|
-
|
|
1185
|
+
x();
|
|
1182
1186
|
}, 500);
|
|
1183
1187
|
}), Mt(() => {
|
|
1184
1188
|
if (window.removeEventListener("resize", _), l.searchForm.enableCellCopy) {
|
|
@@ -1186,41 +1190,41 @@ const wn = { class: "center" }, xn = {
|
|
|
1186
1190
|
const f = m.value;
|
|
1187
1191
|
if (f && f.$el) {
|
|
1188
1192
|
const c = f.$el;
|
|
1189
|
-
c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown",
|
|
1193
|
+
c.removeEventListener("mousedown", ie), c.removeEventListener("mousemove", pe), c.removeEventListener("mouseup", be), c.removeEventListener("keydown", Fe);
|
|
1190
1194
|
}
|
|
1191
1195
|
}
|
|
1192
1196
|
});
|
|
1193
1197
|
const S = re(() => ue.value.height || h.value);
|
|
1194
1198
|
let E;
|
|
1195
|
-
async function
|
|
1199
|
+
async function B(f) {
|
|
1196
1200
|
const { dataFormat: c } = l.tableConfig;
|
|
1197
|
-
f[b] != 1 && (f.nextSearchAfter = E),
|
|
1201
|
+
f[b] != 1 && (f.nextSearchAfter = E), r.value = !0;
|
|
1198
1202
|
const { code: $, data: T = {} } = await l.api(f).finally(() => {
|
|
1199
|
-
|
|
1203
|
+
r.value = !1, l.searchForm.selections = [];
|
|
1200
1204
|
});
|
|
1201
1205
|
if ($ == 200) {
|
|
1202
1206
|
let U = [];
|
|
1203
|
-
for (const
|
|
1204
|
-
if (T[
|
|
1205
|
-
U = T[
|
|
1207
|
+
for (const V of o.responseDataKeys.rows)
|
|
1208
|
+
if (T[V]) {
|
|
1209
|
+
U = T[V];
|
|
1206
1210
|
break;
|
|
1207
1211
|
}
|
|
1208
1212
|
let W = 0;
|
|
1209
|
-
for (const
|
|
1210
|
-
if (T[
|
|
1211
|
-
W = T[
|
|
1213
|
+
for (const V of o.responseDataKeys.total)
|
|
1214
|
+
if (T[V] !== void 0) {
|
|
1215
|
+
W = T[V];
|
|
1212
1216
|
break;
|
|
1213
1217
|
}
|
|
1214
1218
|
i.value = c ? c(U) : U, g.total = W, E = T.nextSearchAfter, l.searchForm.enableCellCopy && Se(() => {
|
|
1215
1219
|
setTimeout(() => {
|
|
1216
|
-
|
|
1220
|
+
x();
|
|
1217
1221
|
}, 100);
|
|
1218
1222
|
});
|
|
1219
1223
|
}
|
|
1220
1224
|
}
|
|
1221
1225
|
function F(f = {}) {
|
|
1222
1226
|
const { searchData: c = () => ({}) } = l.tableConfig, $ = c();
|
|
1223
|
-
|
|
1227
|
+
B({ ...g, ...Ue(l.searchForm.items), ...f, ...$ });
|
|
1224
1228
|
}
|
|
1225
1229
|
function d() {
|
|
1226
1230
|
const { reset: f } = l.tableConfig;
|
|
@@ -1230,10 +1234,10 @@ const wn = { class: "center" }, xn = {
|
|
|
1230
1234
|
}), F();
|
|
1231
1235
|
}
|
|
1232
1236
|
l.api && l.immediate && F();
|
|
1233
|
-
function
|
|
1237
|
+
function C() {
|
|
1234
1238
|
return { ...g, ...Ue(l.searchForm.items) };
|
|
1235
1239
|
}
|
|
1236
|
-
const
|
|
1240
|
+
const M = () => {
|
|
1237
1241
|
const f = m.value;
|
|
1238
1242
|
f && f.clearSort();
|
|
1239
1243
|
}, A = $e({
|
|
@@ -1282,31 +1286,31 @@ const wn = { class: "center" }, xn = {
|
|
|
1282
1286
|
if (W != null)
|
|
1283
1287
|
U = parseInt(W, 10);
|
|
1284
1288
|
else {
|
|
1285
|
-
const
|
|
1286
|
-
U = Array.from(
|
|
1289
|
+
const q = $.parentElement;
|
|
1290
|
+
U = Array.from(q.querySelectorAll(".vxe-body--row")).indexOf($);
|
|
1287
1291
|
}
|
|
1288
1292
|
if (U < 0)
|
|
1289
1293
|
return null;
|
|
1290
|
-
let
|
|
1294
|
+
let V = -1;
|
|
1291
1295
|
const le = c.getAttribute("data-colid");
|
|
1292
|
-
if (le && (
|
|
1293
|
-
const I = Array.from($.querySelectorAll(".vxe-body--column")).indexOf(c),
|
|
1294
|
-
if (
|
|
1296
|
+
if (le && (V = T.getColumns().findIndex((I) => I.id === le)), V < 0) {
|
|
1297
|
+
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();
|
|
1298
|
+
if (Y) {
|
|
1295
1299
|
const G = P.filter((N) => N.fixed === "left");
|
|
1296
|
-
I < G.length && (
|
|
1300
|
+
I < G.length && (V = P.indexOf(G[I]));
|
|
1297
1301
|
} else if (Z) {
|
|
1298
1302
|
const G = P.filter((N) => N.fixed === "right");
|
|
1299
|
-
I < G.length && (
|
|
1303
|
+
I < G.length && (V = P.indexOf(G[I]));
|
|
1300
1304
|
} else {
|
|
1301
1305
|
const G = l.searchForm.showCheckBox ? 1 : 0;
|
|
1302
|
-
|
|
1306
|
+
V = P.filter((ee) => ee.fixed === "left").length + I - G;
|
|
1303
1307
|
}
|
|
1304
1308
|
}
|
|
1305
|
-
return
|
|
1309
|
+
return V < 0 ? null : { rowIndex: U, colIndex: V, cell: c };
|
|
1306
1310
|
}, ie = (f) => {
|
|
1307
1311
|
const c = ge(f.target);
|
|
1308
1312
|
if (!c) {
|
|
1309
|
-
|
|
1313
|
+
Le();
|
|
1310
1314
|
return;
|
|
1311
1315
|
}
|
|
1312
1316
|
y.isSelecting = !0, y.startCell = {
|
|
@@ -1323,7 +1327,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1323
1327
|
}, Ke(), He());
|
|
1324
1328
|
}, be = () => {
|
|
1325
1329
|
y.isSelecting = !1;
|
|
1326
|
-
},
|
|
1330
|
+
}, Le = () => {
|
|
1327
1331
|
y.selectedCells = [], y.startCell = null, y.endCell = null;
|
|
1328
1332
|
const f = m.value;
|
|
1329
1333
|
if (!f)
|
|
@@ -1344,12 +1348,12 @@ const wn = { class: "center" }, xn = {
|
|
|
1344
1348
|
y.selectedCells = [];
|
|
1345
1349
|
return;
|
|
1346
1350
|
}
|
|
1347
|
-
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),
|
|
1351
|
+
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);
|
|
1348
1352
|
y.selectedCells = [];
|
|
1349
|
-
for (let
|
|
1350
|
-
for (let I =
|
|
1353
|
+
for (let q = U; q <= W; q++)
|
|
1354
|
+
for (let I = V; I <= le; I++)
|
|
1351
1355
|
y.selectedCells.push({
|
|
1352
|
-
rowIndex:
|
|
1356
|
+
rowIndex: q,
|
|
1353
1357
|
colIndex: I
|
|
1354
1358
|
});
|
|
1355
1359
|
}, He = () => {
|
|
@@ -1360,8 +1364,8 @@ const wn = { class: "center" }, xn = {
|
|
|
1360
1364
|
const c = f.$el;
|
|
1361
1365
|
if (c.querySelectorAll(
|
|
1362
1366
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1363
|
-
).forEach((
|
|
1364
|
-
|
|
1367
|
+
).forEach((Y) => {
|
|
1368
|
+
Y.classList.remove(
|
|
1365
1369
|
"cell-selected",
|
|
1366
1370
|
"cell-border-top",
|
|
1367
1371
|
"cell-border-right",
|
|
@@ -1370,18 +1374,18 @@ const wn = { class: "center" }, xn = {
|
|
|
1370
1374
|
);
|
|
1371
1375
|
}), y.selectedCells.length === 0)
|
|
1372
1376
|
return;
|
|
1373
|
-
const $ = f.getColumns(), T = y.selectedCells.map((
|
|
1377
|
+
const $ = f.getColumns(), T = y.selectedCells.map((Y) => Y.rowIndex), U = y.selectedCells.map((Y) => Y.colIndex), W = Math.min(...T), V = Math.max(...T), le = Math.min(...U), q = Math.max(...U), I = [
|
|
1374
1378
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1375
1379
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1376
1380
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1377
1381
|
].filter(Boolean);
|
|
1378
|
-
y.selectedCells.forEach(({ rowIndex:
|
|
1382
|
+
y.selectedCells.forEach(({ rowIndex: Y, colIndex: Z }) => {
|
|
1379
1383
|
const P = $[Z];
|
|
1380
1384
|
if (!P)
|
|
1381
1385
|
return;
|
|
1382
1386
|
const G = P.fixed === "left", N = P.fixed === "right";
|
|
1383
1387
|
for (const ee of I) {
|
|
1384
|
-
const we = ee.querySelectorAll(".vxe-body--row")[
|
|
1388
|
+
const we = ee.querySelectorAll(".vxe-body--row")[Y];
|
|
1385
1389
|
if (!we)
|
|
1386
1390
|
continue;
|
|
1387
1391
|
const de = Array.from(we.querySelectorAll(".vxe-body--column"));
|
|
@@ -1393,11 +1397,11 @@ const wn = { class: "center" }, xn = {
|
|
|
1393
1397
|
const te = $.filter((ne) => ne.fixed === "right").indexOf(P);
|
|
1394
1398
|
j = de[te];
|
|
1395
1399
|
} else if (!G && !N && ee.closest(".vxe-table--body-wrapper")) {
|
|
1396
|
-
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((
|
|
1400
|
+
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Te) => Te.fixed === "left").length, ne = Z - te;
|
|
1397
1401
|
j = de[ne + fe];
|
|
1398
1402
|
}
|
|
1399
1403
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
1400
|
-
j.classList.add("cell-selected"),
|
|
1404
|
+
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");
|
|
1401
1405
|
break;
|
|
1402
1406
|
}
|
|
1403
1407
|
}
|
|
@@ -1409,19 +1413,19 @@ const wn = { class: "center" }, xn = {
|
|
|
1409
1413
|
const f = m.value;
|
|
1410
1414
|
if (!f)
|
|
1411
1415
|
return;
|
|
1412
|
-
const c = f.$el, $ = f.getColumns(), T = [...new Set(y.selectedCells.map((
|
|
1413
|
-
(
|
|
1414
|
-
), U = [...new Set(y.selectedCells.map((
|
|
1415
|
-
(
|
|
1416
|
+
const c = f.$el, $ = f.getColumns(), T = [...new Set(y.selectedCells.map((q) => q.rowIndex))].sort(
|
|
1417
|
+
(q, I) => q - I
|
|
1418
|
+
), U = [...new Set(y.selectedCells.map((q) => q.colIndex))].sort(
|
|
1419
|
+
(q, I) => q - I
|
|
1416
1420
|
), W = [
|
|
1417
1421
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1418
1422
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1419
1423
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1420
|
-
].filter(Boolean),
|
|
1421
|
-
T.forEach((
|
|
1424
|
+
].filter(Boolean), V = [];
|
|
1425
|
+
T.forEach((q) => {
|
|
1422
1426
|
const I = [];
|
|
1423
|
-
U.forEach((
|
|
1424
|
-
const Z = $[
|
|
1427
|
+
U.forEach((Y) => {
|
|
1428
|
+
const Z = $[Y];
|
|
1425
1429
|
if (!Z) {
|
|
1426
1430
|
I.push("");
|
|
1427
1431
|
return;
|
|
@@ -1429,7 +1433,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1429
1433
|
const P = Z.fixed === "left", G = Z.fixed === "right";
|
|
1430
1434
|
let N = "";
|
|
1431
1435
|
for (const ee of W) {
|
|
1432
|
-
const we = ee.querySelectorAll(".vxe-body--row")[
|
|
1436
|
+
const we = ee.querySelectorAll(".vxe-body--row")[q];
|
|
1433
1437
|
if (!we)
|
|
1434
1438
|
continue;
|
|
1435
1439
|
const de = Array.from(we.querySelectorAll(".vxe-body--column"));
|
|
@@ -1441,7 +1445,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1441
1445
|
const te = $.filter((ne) => ne.fixed === "right").indexOf(Z);
|
|
1442
1446
|
j = de[te];
|
|
1443
1447
|
} else if (!P && !G && ee.closest(".vxe-table--body-wrapper")) {
|
|
1444
|
-
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((
|
|
1448
|
+
const fe = l.searchForm.showCheckBox ? 1 : 0, te = $.filter((Te) => Te.fixed === "left").length, ne = Y - te;
|
|
1445
1449
|
j = de[ne + fe];
|
|
1446
1450
|
}
|
|
1447
1451
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
@@ -1450,27 +1454,27 @@ const wn = { class: "center" }, xn = {
|
|
|
1450
1454
|
}
|
|
1451
1455
|
}
|
|
1452
1456
|
I.push(N);
|
|
1453
|
-
}),
|
|
1457
|
+
}), V.push(I.join(" "));
|
|
1454
1458
|
});
|
|
1455
|
-
const le =
|
|
1459
|
+
const le = V.join(`
|
|
1456
1460
|
`);
|
|
1457
1461
|
try {
|
|
1458
1462
|
await navigator.clipboard.writeText(le);
|
|
1459
|
-
} catch (
|
|
1460
|
-
console.error("复制失败:",
|
|
1463
|
+
} catch (q) {
|
|
1464
|
+
console.error("复制失败:", q);
|
|
1461
1465
|
}
|
|
1462
|
-
},
|
|
1463
|
-
l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? y.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" &&
|
|
1466
|
+
}, Fe = (f) => {
|
|
1467
|
+
l.searchForm.enableCellCopy && ((f.ctrlKey || f.metaKey) && f.key === "c" ? y.selectedCells.length > 0 && (f.preventDefault(), f.stopPropagation(), wt()) : f.key === "Escape" && Le());
|
|
1464
1468
|
}, Ne = () => {
|
|
1465
1469
|
y.isSelecting = !1;
|
|
1466
1470
|
}, We = (f) => {
|
|
1467
1471
|
const c = m.value;
|
|
1468
1472
|
if (!c || !c.$el)
|
|
1469
1473
|
return;
|
|
1470
|
-
c.$el.contains(f.target) ||
|
|
1471
|
-
}, xt = (f) => {
|
|
1472
|
-
g[b] = f, F();
|
|
1474
|
+
c.$el.contains(f.target) || Le();
|
|
1473
1475
|
}, Ct = (f) => {
|
|
1476
|
+
g[b] = f, F();
|
|
1477
|
+
}, xt = (f) => {
|
|
1474
1478
|
g[p] = f, g[b] = 1, F();
|
|
1475
1479
|
};
|
|
1476
1480
|
function Ze() {
|
|
@@ -1485,29 +1489,29 @@ const wn = { class: "center" }, xn = {
|
|
|
1485
1489
|
l.searchForm.selections = $;
|
|
1486
1490
|
}
|
|
1487
1491
|
};
|
|
1488
|
-
return e({ tableRef: m, getList: F, getPrm:
|
|
1489
|
-
var
|
|
1490
|
-
const $ =
|
|
1492
|
+
return e({ tableRef: m, getList: F, getPrm: C, clearSort: M, calculateTableHeight: k }), (f, c) => {
|
|
1493
|
+
var q;
|
|
1494
|
+
const $ = O("el-button"), T = O("el-checkbox"), U = O("el-text"), W = O("vxe-column"), V = O("VxeTable"), le = O("el-pagination");
|
|
1491
1495
|
return L(), se("div", {
|
|
1492
|
-
class:
|
|
1496
|
+
class: Ee({ box: t.searchForm.showShadow })
|
|
1493
1497
|
}, [
|
|
1494
|
-
t.searchForm.showSearch ? (L(),
|
|
1498
|
+
t.searchForm.showSearch ? (L(), H(vn, {
|
|
1495
1499
|
key: 0,
|
|
1496
1500
|
form: t.searchForm,
|
|
1497
1501
|
onReset: d,
|
|
1498
1502
|
onConfirm: c[1] || (c[1] = (I) => F()),
|
|
1499
|
-
onVisibleChange:
|
|
1503
|
+
onVisibleChange: K(k)
|
|
1500
1504
|
}, {
|
|
1501
1505
|
btn: D(() => [
|
|
1502
1506
|
c[3] || (c[3] = ae("span", { class: "mgr10" }, null, -1)),
|
|
1503
1507
|
X(f.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1504
|
-
|
|
1508
|
+
z($, {
|
|
1505
1509
|
class: "mgl10",
|
|
1506
1510
|
round: "",
|
|
1507
1511
|
onClick: c[0] || (c[0] = (I) => m.value.openCustom())
|
|
1508
1512
|
}, {
|
|
1509
1513
|
default: D(() => [
|
|
1510
|
-
|
|
1514
|
+
z(yt, { name: "Tools" })
|
|
1511
1515
|
]),
|
|
1512
1516
|
_: 1
|
|
1513
1517
|
})
|
|
@@ -1519,43 +1523,43 @@ const wn = { class: "center" }, xn = {
|
|
|
1519
1523
|
ref_key: "tableContentRef",
|
|
1520
1524
|
ref: u
|
|
1521
1525
|
}, [
|
|
1522
|
-
|
|
1526
|
+
z(V, he({
|
|
1523
1527
|
id: v.value,
|
|
1524
1528
|
ref_key: "tableRef",
|
|
1525
1529
|
ref: m,
|
|
1526
|
-
loading: t.loading ||
|
|
1530
|
+
loading: t.loading || r.value,
|
|
1527
1531
|
data: t.api ? i.value : t.data,
|
|
1528
1532
|
border: ""
|
|
1529
1533
|
}, ue.value, {
|
|
1530
1534
|
height: S.value,
|
|
1531
1535
|
onCheckboxChange: Ze,
|
|
1532
1536
|
onCheckboxAll: Ze,
|
|
1533
|
-
onSortChange: (
|
|
1537
|
+
onSortChange: (q = ue.value["sort-config"]) == null ? void 0 : q.sortChange
|
|
1534
1538
|
}), {
|
|
1535
1539
|
default: D(() => [
|
|
1536
|
-
t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(),
|
|
1540
|
+
t.searchForm.showCheckBox == null || t.searchForm.showCheckBox ? (L(), H(W, {
|
|
1537
1541
|
key: 0,
|
|
1538
1542
|
type: "checkbox",
|
|
1539
|
-
width:
|
|
1543
|
+
width: K(a) == "zh_cn" ? 80 : 150,
|
|
1540
1544
|
title: f.$t("xu-hao"),
|
|
1541
1545
|
fixed: "left"
|
|
1542
1546
|
}, {
|
|
1543
|
-
checkbox: D(({ rowIndex: I, row:
|
|
1547
|
+
checkbox: D(({ rowIndex: I, row: Y, checked: Z, disabled: P, indeterminate: G }) => [
|
|
1544
1548
|
ae("div", wn, [
|
|
1545
|
-
Z ? (L(),
|
|
1549
|
+
Z ? (L(), H(T, {
|
|
1546
1550
|
key: 0,
|
|
1547
1551
|
checked: !0,
|
|
1548
1552
|
disabled: P,
|
|
1549
1553
|
size: "default",
|
|
1550
|
-
onClick:
|
|
1551
|
-
}, null, 8, ["disabled", "onClick"])) : (L(),
|
|
1554
|
+
onClick: Ve((N) => !P && Ge(Y), ["stop"])
|
|
1555
|
+
}, null, 8, ["disabled", "onClick"])) : (L(), H(T, {
|
|
1552
1556
|
key: 1,
|
|
1553
1557
|
disabled: P,
|
|
1554
1558
|
checked: !1,
|
|
1555
1559
|
size: "default",
|
|
1556
|
-
onClick:
|
|
1560
|
+
onClick: Ve((N) => !P && Ge(Y), ["stop"])
|
|
1557
1561
|
}, null, 8, ["disabled", "onClick"])),
|
|
1558
|
-
|
|
1562
|
+
z(U, {
|
|
1559
1563
|
type: "info",
|
|
1560
1564
|
class: "mgl5"
|
|
1561
1565
|
}, {
|
|
@@ -1573,23 +1577,23 @@ const wn = { class: "center" }, xn = {
|
|
|
1573
1577
|
_: 3
|
|
1574
1578
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1575
1579
|
], 512),
|
|
1576
|
-
t.searchForm.showPage ? (L(),
|
|
1580
|
+
t.searchForm.showPage ? (L(), H(le, {
|
|
1577
1581
|
key: 1,
|
|
1578
|
-
"current-page": g[
|
|
1579
|
-
"onUpdate:currentPage": c[2] || (c[2] = (I) => g[
|
|
1582
|
+
"current-page": g[K(b)],
|
|
1583
|
+
"onUpdate:currentPage": c[2] || (c[2] = (I) => g[K(b)] = I),
|
|
1580
1584
|
class: "myPagination mgt10",
|
|
1581
1585
|
background: "",
|
|
1582
1586
|
layout: "total, sizes, prev, pager, next",
|
|
1583
1587
|
total: g.total,
|
|
1584
|
-
"page-size": g[
|
|
1585
|
-
"page-sizes": t.searchForm.pageSizes ||
|
|
1586
|
-
onCurrentChange:
|
|
1587
|
-
onSizeChange:
|
|
1588
|
+
"page-size": g[K(p)],
|
|
1589
|
+
"page-sizes": t.searchForm.pageSizes || K(o).pageSizes,
|
|
1590
|
+
onCurrentChange: Ct,
|
|
1591
|
+
onSizeChange: xt
|
|
1588
1592
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : ce("", !0)
|
|
1589
1593
|
], 2);
|
|
1590
1594
|
};
|
|
1591
1595
|
}
|
|
1592
|
-
}, Qn = /* @__PURE__ */ _e(
|
|
1596
|
+
}, Qn = /* @__PURE__ */ _e(Cn, [["__scopeId", "data-v-d93cad32"]]), eo = {
|
|
1593
1597
|
__name: "index",
|
|
1594
1598
|
props: {
|
|
1595
1599
|
sheetsConfig: {
|
|
@@ -1606,9 +1610,9 @@ const wn = { class: "center" }, xn = {
|
|
|
1606
1610
|
function n() {
|
|
1607
1611
|
nn(e.fileName, e.sheetsConfig);
|
|
1608
1612
|
}
|
|
1609
|
-
return (a,
|
|
1610
|
-
const o =
|
|
1611
|
-
return L(),
|
|
1613
|
+
return (a, s) => {
|
|
1614
|
+
const o = O("el-link");
|
|
1615
|
+
return L(), H(o, he({
|
|
1612
1616
|
type: "primary",
|
|
1613
1617
|
underline: "never"
|
|
1614
1618
|
}, a.$attrs, { onClick: n }), {
|
|
@@ -1619,7 +1623,7 @@ const wn = { class: "center" }, xn = {
|
|
|
1619
1623
|
}, 16);
|
|
1620
1624
|
};
|
|
1621
1625
|
}
|
|
1622
|
-
},
|
|
1626
|
+
}, xn = {
|
|
1623
1627
|
mounted(t, e) {
|
|
1624
1628
|
e.value && tt(t);
|
|
1625
1629
|
},
|
|
@@ -1637,7 +1641,7 @@ async function tt(t) {
|
|
|
1637
1641
|
return;
|
|
1638
1642
|
const n = t.querySelector(".el-dialog__header"), a = t.querySelector(".el-overlay");
|
|
1639
1643
|
a.style.cssText += "overflow: hidden;", n.style.cursor = "move";
|
|
1640
|
-
let
|
|
1644
|
+
let s = !1, o = {
|
|
1641
1645
|
// 数据源,不变部分为:window信息、dialog信息、mouse初始值信息,可变部分为:拖拽坐标位移
|
|
1642
1646
|
window: {
|
|
1643
1647
|
// window信息
|
|
@@ -1665,9 +1669,9 @@ async function tt(t) {
|
|
|
1665
1669
|
};
|
|
1666
1670
|
n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", w), window.addEventListener("resize", b);
|
|
1667
1671
|
function l() {
|
|
1668
|
-
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),
|
|
1672
|
+
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height), r();
|
|
1669
1673
|
}
|
|
1670
|
-
function
|
|
1674
|
+
function r() {
|
|
1671
1675
|
let g = o.drag.y - o.mouse.y + o.dialog.y, m = o.drag.x - o.mouse.x + o.dialog.x;
|
|
1672
1676
|
e.style.cssText += `position: absolute; top: calc(${g}px - ${o.dialog.marginTop}); left: ${m}px;`;
|
|
1673
1677
|
}
|
|
@@ -1678,16 +1682,16 @@ async function tt(t) {
|
|
|
1678
1682
|
}, o.dialog = e.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(e).marginTop, o.mouse = {
|
|
1679
1683
|
x: g.clientX,
|
|
1680
1684
|
y: g.clientY
|
|
1681
|
-
},
|
|
1685
|
+
}, s = !0);
|
|
1682
1686
|
}
|
|
1683
1687
|
function v(g) {
|
|
1684
|
-
|
|
1688
|
+
s && (o.drag = {
|
|
1685
1689
|
x: g.clientX,
|
|
1686
1690
|
y: g.clientY
|
|
1687
1691
|
}, a.style.userSelect = "none", l());
|
|
1688
1692
|
}
|
|
1689
1693
|
function w(g) {
|
|
1690
|
-
a.style.userSelect = "auto",
|
|
1694
|
+
a.style.userSelect = "auto", s = !1;
|
|
1691
1695
|
}
|
|
1692
1696
|
function b(g) {
|
|
1693
1697
|
}
|
|
@@ -1726,20 +1730,20 @@ const kn = {
|
|
|
1726
1730
|
},
|
|
1727
1731
|
emits: ["confirm"],
|
|
1728
1732
|
setup(t, { emit: e }) {
|
|
1729
|
-
const n = t, a = e, { t:
|
|
1733
|
+
const n = t, a = e, { t: s } = me(), o = Re(() => {
|
|
1730
1734
|
a("confirm");
|
|
1731
1735
|
}, 300);
|
|
1732
1736
|
async function l() {
|
|
1733
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Et.confirm(
|
|
1734
|
-
confirmButtonText:
|
|
1735
|
-
cancelButtonText:
|
|
1737
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Et.confirm(s("que-ding-guan-bi-ma"), {
|
|
1738
|
+
confirmButtonText: s("que-ding"),
|
|
1739
|
+
cancelButtonText: s("qu-xiao"),
|
|
1736
1740
|
type: "warning"
|
|
1737
1741
|
}).catch(() => {
|
|
1738
1742
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1739
1743
|
}
|
|
1740
|
-
return (
|
|
1741
|
-
const v =
|
|
1742
|
-
return t.layer.type ? (L(),
|
|
1744
|
+
return (r, i) => {
|
|
1745
|
+
const v = O("el-button"), w = O("el-drawer"), b = O("el-dialog");
|
|
1746
|
+
return t.layer.type ? (L(), H(w, {
|
|
1743
1747
|
key: 0,
|
|
1744
1748
|
modelValue: t.layer.show,
|
|
1745
1749
|
"onUpdate:modelValue": i[0] || (i[0] = (p) => t.layer.show = p),
|
|
@@ -1751,23 +1755,23 @@ const kn = {
|
|
|
1751
1755
|
class: "drawer-content"
|
|
1752
1756
|
}, {
|
|
1753
1757
|
default: D(() => [
|
|
1754
|
-
X(
|
|
1758
|
+
X(r.$slots, "default"),
|
|
1755
1759
|
i[2] || (i[2] = ae("p", { class: "mgt50" }, null, -1)),
|
|
1756
1760
|
t.layer.showButton ? (L(), se("div", kn, [
|
|
1757
|
-
X(
|
|
1758
|
-
|
|
1761
|
+
X(r.$slots, "btn", {}, () => [
|
|
1762
|
+
z(v, { onClick: l }, {
|
|
1759
1763
|
default: D(() => [
|
|
1760
|
-
Q(J(
|
|
1764
|
+
Q(J(r.$t("qu-xiao")), 1)
|
|
1761
1765
|
]),
|
|
1762
1766
|
_: 1
|
|
1763
1767
|
}),
|
|
1764
|
-
|
|
1768
|
+
z(v, {
|
|
1765
1769
|
type: "primary",
|
|
1766
1770
|
loading: t.loading,
|
|
1767
|
-
onClick:
|
|
1771
|
+
onClick: K(o)
|
|
1768
1772
|
}, {
|
|
1769
1773
|
default: D(() => [
|
|
1770
|
-
Q(J(
|
|
1774
|
+
Q(J(r.$t("ti-jiao")), 1)
|
|
1771
1775
|
]),
|
|
1772
1776
|
_: 1
|
|
1773
1777
|
}, 8, ["loading", "onClick"])
|
|
@@ -1776,7 +1780,7 @@ const kn = {
|
|
|
1776
1780
|
]),
|
|
1777
1781
|
_: 3
|
|
1778
1782
|
}, 8, ["modelValue", "size", "title"])) : Vt((L(), se("div", _n, [
|
|
1779
|
-
|
|
1783
|
+
z(b, {
|
|
1780
1784
|
"close-on-click-modal": !1,
|
|
1781
1785
|
modelValue: t.layer.show,
|
|
1782
1786
|
"onUpdate:modelValue": i[1] || (i[1] = (p) => t.layer.show = p),
|
|
@@ -1785,26 +1789,26 @@ const kn = {
|
|
|
1785
1789
|
center: ""
|
|
1786
1790
|
}, at({
|
|
1787
1791
|
default: D(() => [
|
|
1788
|
-
X(
|
|
1792
|
+
X(r.$slots, "default")
|
|
1789
1793
|
]),
|
|
1790
1794
|
_: 2
|
|
1791
1795
|
}, [
|
|
1792
1796
|
t.layer.showButton ? {
|
|
1793
1797
|
name: "footer",
|
|
1794
1798
|
fn: D(() => [
|
|
1795
|
-
X(
|
|
1796
|
-
|
|
1799
|
+
X(r.$slots, "btn", {}, () => [
|
|
1800
|
+
z(v, { onClick: l }, {
|
|
1797
1801
|
default: D(() => [
|
|
1798
|
-
Q(J(
|
|
1802
|
+
Q(J(r.$t("qu-xiao")), 1)
|
|
1799
1803
|
]),
|
|
1800
1804
|
_: 1
|
|
1801
1805
|
}),
|
|
1802
|
-
|
|
1806
|
+
z(v, {
|
|
1803
1807
|
type: "primary",
|
|
1804
|
-
onClick:
|
|
1808
|
+
onClick: K(o)
|
|
1805
1809
|
}, {
|
|
1806
1810
|
default: D(() => [
|
|
1807
|
-
Q(J(
|
|
1811
|
+
Q(J(r.$t("ti-jiao")), 1)
|
|
1808
1812
|
]),
|
|
1809
1813
|
_: 1
|
|
1810
1814
|
}, 8, ["onClick"])
|
|
@@ -1814,7 +1818,7 @@ const kn = {
|
|
|
1814
1818
|
} : void 0
|
|
1815
1819
|
]), 1032, ["modelValue", "title", "width"])
|
|
1816
1820
|
])), [
|
|
1817
|
-
[
|
|
1821
|
+
[K(xn), t.layer.show]
|
|
1818
1822
|
]);
|
|
1819
1823
|
};
|
|
1820
1824
|
}
|
|
@@ -1824,18 +1828,18 @@ function no(t, e = {}) {
|
|
|
1824
1828
|
inForm: !0,
|
|
1825
1829
|
required: !0,
|
|
1826
1830
|
...e
|
|
1827
|
-
},
|
|
1831
|
+
}, s = {
|
|
1828
1832
|
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}$/,
|
|
1829
1833
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1830
1834
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1831
|
-
}[t], { inForm: o, value: l, required:
|
|
1835
|
+
}[t], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1832
1836
|
return o ? function(v, w, b) {
|
|
1833
|
-
if (
|
|
1834
|
-
|
|
1837
|
+
if (r) {
|
|
1838
|
+
s.test(w) ? b() : b(new Error(i));
|
|
1835
1839
|
return;
|
|
1836
1840
|
}
|
|
1837
|
-
w && !
|
|
1838
|
-
} :
|
|
1841
|
+
w && !s.test(w) ? b(new Error(i)) : b();
|
|
1842
|
+
} : s.test(l);
|
|
1839
1843
|
}
|
|
1840
1844
|
class oo {
|
|
1841
1845
|
constructor(e = {}) {
|
|
@@ -1984,10 +1988,10 @@ class oo {
|
|
|
1984
1988
|
};
|
|
1985
1989
|
a.headers.appId = this.config.clientCode, this.token && (a.headers.Authorization = `Bearer ${this.token}`);
|
|
1986
1990
|
try {
|
|
1987
|
-
const
|
|
1988
|
-
return
|
|
1989
|
-
} catch (
|
|
1990
|
-
throw this.log("请求失败:",
|
|
1991
|
+
const s = await fetch(e, a);
|
|
1992
|
+
return s.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : s;
|
|
1993
|
+
} catch (s) {
|
|
1994
|
+
throw this.log("请求失败:", s), s;
|
|
1991
1995
|
}
|
|
1992
1996
|
}
|
|
1993
1997
|
/**
|
|
@@ -2050,52 +2054,52 @@ function lo(t, e = {}) {
|
|
|
2050
2054
|
log: !1,
|
|
2051
2055
|
params: null,
|
|
2052
2056
|
format: null
|
|
2053
|
-
}, e), { manual:
|
|
2057
|
+
}, e), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, v = R([]), w = R(!1), b = (p) => {
|
|
2054
2058
|
const g = p || l;
|
|
2055
2059
|
w.value = !0, t(g).then((m) => {
|
|
2056
2060
|
const { code: u, data: h, msg: k } = m;
|
|
2057
|
-
if (
|
|
2058
|
-
const { records: _, rows:
|
|
2059
|
-
v.value =
|
|
2061
|
+
if (r) {
|
|
2062
|
+
const { records: _, rows: x } = h || {}, S = _ || x ? _ || x : h;
|
|
2063
|
+
v.value = ze(S, i), r(m);
|
|
2060
2064
|
}
|
|
2061
2065
|
if (h) {
|
|
2062
2066
|
if (h.records != null || h.rows != null) {
|
|
2063
|
-
const { records: _, rows:
|
|
2064
|
-
g && g.total != null && (l.total = parseInt(S)), v.value =
|
|
2067
|
+
const { records: _, rows: x, total: S = 0 } = h || {};
|
|
2068
|
+
g && g.total != null && (l.total = parseInt(S)), v.value = ze(_ || x || [], i);
|
|
2065
2069
|
} else
|
|
2066
|
-
v.value =
|
|
2070
|
+
v.value = ze(h, i);
|
|
2067
2071
|
o && console.log("useRequest-res", v.value);
|
|
2068
2072
|
}
|
|
2069
2073
|
}).catch((m) => {
|
|
2070
|
-
|
|
2074
|
+
r && (console.log("useRequestErr", m), r({ code: 500 }));
|
|
2071
2075
|
}).finally(() => {
|
|
2072
2076
|
w.value = !1;
|
|
2073
2077
|
});
|
|
2074
2078
|
};
|
|
2075
|
-
return
|
|
2079
|
+
return s || b(), [w, v, b];
|
|
2076
2080
|
}
|
|
2077
2081
|
function ao(t) {
|
|
2078
2082
|
const e = R(t), n = R(""), a = R("");
|
|
2079
|
-
return Pe(e, (
|
|
2080
|
-
const o =
|
|
2083
|
+
return Pe(e, (s) => {
|
|
2084
|
+
const o = s || ["", ""];
|
|
2081
2085
|
n.value = o[0], a.value = o[1];
|
|
2082
2086
|
}), [e, n, a];
|
|
2083
2087
|
}
|
|
2084
|
-
function
|
|
2088
|
+
function so(t) {
|
|
2085
2089
|
return Object.prototype.toString.call(t).slice(8, -1).toLowerCase();
|
|
2086
2090
|
}
|
|
2087
|
-
function
|
|
2091
|
+
function ze(t, e) {
|
|
2088
2092
|
if (!e)
|
|
2089
2093
|
return t;
|
|
2090
2094
|
if (t instanceof Array)
|
|
2091
2095
|
return t.map((a) => {
|
|
2092
|
-
let
|
|
2093
|
-
return e.forEach((o) =>
|
|
2096
|
+
let s = {};
|
|
2097
|
+
return e.forEach((o) => s[o] = a[o]), s;
|
|
2094
2098
|
});
|
|
2095
2099
|
let n = {};
|
|
2096
2100
|
return e.forEach((a) => n[a] = t[a]), n;
|
|
2097
2101
|
}
|
|
2098
|
-
function
|
|
2102
|
+
function ro(t, e = []) {
|
|
2099
2103
|
const { locale: n } = me(), a = R(t());
|
|
2100
2104
|
return Pe(
|
|
2101
2105
|
[n, ...e],
|
|
@@ -2124,23 +2128,23 @@ function fo(t, e) {
|
|
|
2124
2128
|
return typeof t == "string" && t.length > 0 && (n = Be(t).mapActions), $n(e, n);
|
|
2125
2129
|
}
|
|
2126
2130
|
function bt(t, e) {
|
|
2127
|
-
const n = ut(), a = e(t),
|
|
2131
|
+
const n = ut(), a = e(t), s = {};
|
|
2128
2132
|
return Object.keys(a).forEach((o) => {
|
|
2129
2133
|
const l = a[o].bind({ $store: n });
|
|
2130
|
-
|
|
2131
|
-
}),
|
|
2134
|
+
s[o] = re(l);
|
|
2135
|
+
}), s;
|
|
2132
2136
|
}
|
|
2133
2137
|
function $n(t, e) {
|
|
2134
|
-
const n = ut(), a = e(t),
|
|
2138
|
+
const n = ut(), a = e(t), s = {};
|
|
2135
2139
|
return Object.keys(a).forEach((o) => {
|
|
2136
|
-
|
|
2137
|
-
}),
|
|
2140
|
+
s[o] = a[o].bind({ $store: n });
|
|
2141
|
+
}), s;
|
|
2138
2142
|
}
|
|
2139
|
-
function
|
|
2143
|
+
function Oe(t) {
|
|
2140
2144
|
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !qt(t);
|
|
2141
2145
|
}
|
|
2142
2146
|
function ho() {
|
|
2143
|
-
|
|
2147
|
+
Ce.renderer.add("Enum", {
|
|
2144
2148
|
// 默认显示模板
|
|
2145
2149
|
renderTableDefault(t, e) {
|
|
2146
2150
|
let n;
|
|
@@ -2148,21 +2152,21 @@ function ho() {
|
|
|
2148
2152
|
return "-";
|
|
2149
2153
|
const a = e.row[e.column.field];
|
|
2150
2154
|
if (t.type == "tag") {
|
|
2151
|
-
let
|
|
2152
|
-
return
|
|
2155
|
+
let s;
|
|
2156
|
+
return z(O("el-text"), {
|
|
2153
2157
|
type: t.enum.getTag(a)
|
|
2154
|
-
},
|
|
2155
|
-
default: () => [
|
|
2158
|
+
}, Oe(s = t.enum.getName(a)) ? s : {
|
|
2159
|
+
default: () => [s]
|
|
2156
2160
|
});
|
|
2157
2161
|
}
|
|
2158
|
-
return
|
|
2162
|
+
return z(O("el-text"), null, Oe(n = t.enum.getName(a)) ? n : {
|
|
2159
2163
|
default: () => [n]
|
|
2160
2164
|
});
|
|
2161
2165
|
}
|
|
2162
|
-
}),
|
|
2166
|
+
}), Ce.renderer.add("InputNumber", {
|
|
2163
2167
|
// 默认显示模板
|
|
2164
2168
|
renderTableDefault(t, e) {
|
|
2165
|
-
return
|
|
2169
|
+
return z(It, he({
|
|
2166
2170
|
modelValue: e.row[e.column.field],
|
|
2167
2171
|
"onUpdate:modelValue": (n) => e.row[e.column.field] = n
|
|
2168
2172
|
}, t.props, {
|
|
@@ -2170,20 +2174,20 @@ function ho() {
|
|
|
2170
2174
|
"value-on-clear": 0
|
|
2171
2175
|
}), null);
|
|
2172
2176
|
}
|
|
2173
|
-
}),
|
|
2177
|
+
}), Ce.renderer.add("TrueFalse", {
|
|
2174
2178
|
// 默认显示模板
|
|
2175
2179
|
renderTableDefault(t, e) {
|
|
2176
2180
|
const {
|
|
2177
2181
|
locale: n
|
|
2178
2182
|
} = me();
|
|
2179
2183
|
let a = n.value == "zh_cn";
|
|
2180
|
-
return
|
|
2184
|
+
return z(Lt, {
|
|
2181
2185
|
type: e.row[e.column.field] ? "success" : "danger"
|
|
2182
2186
|
}, {
|
|
2183
2187
|
default: () => [e.row[e.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
2184
2188
|
});
|
|
2185
2189
|
}
|
|
2186
|
-
}),
|
|
2190
|
+
}), Ce.renderer.add("I18n", {
|
|
2187
2191
|
// 默认显示模板
|
|
2188
2192
|
renderTableDefault(t, e) {
|
|
2189
2193
|
const {
|
|
@@ -2192,17 +2196,17 @@ function ho() {
|
|
|
2192
2196
|
let a = n.value == "zh_cn" ? e.column.field : t.fieldEn;
|
|
2193
2197
|
return e.row[a] || e.row[e.column.field];
|
|
2194
2198
|
}
|
|
2195
|
-
}),
|
|
2199
|
+
}), Ce.renderer.add("Link", {
|
|
2196
2200
|
// 默认显示模板
|
|
2197
2201
|
renderTableDefault(t, e) {
|
|
2198
|
-
var
|
|
2202
|
+
var r;
|
|
2199
2203
|
let n = e.column.field;
|
|
2200
2204
|
const a = Ut(), {
|
|
2201
|
-
multiple:
|
|
2205
|
+
multiple: s,
|
|
2202
2206
|
to: o
|
|
2203
2207
|
} = t;
|
|
2204
|
-
if (!
|
|
2205
|
-
return
|
|
2208
|
+
if (!s)
|
|
2209
|
+
return z(Je, {
|
|
2206
2210
|
underline: "never",
|
|
2207
2211
|
type: "primary",
|
|
2208
2212
|
onclick: () => a.push({
|
|
@@ -2214,8 +2218,8 @@ function ho() {
|
|
|
2214
2218
|
}, {
|
|
2215
2219
|
default: () => [e.row[n]]
|
|
2216
2220
|
});
|
|
2217
|
-
const l = ((
|
|
2218
|
-
return l.map((i, v) =>
|
|
2221
|
+
const l = ((r = e.row[n]) == null ? void 0 : r.split(",")) || [];
|
|
2222
|
+
return l.map((i, v) => z("span", null, [z(Je, {
|
|
2219
2223
|
underline: "never",
|
|
2220
2224
|
type: "primary",
|
|
2221
2225
|
onclick: () => a.push({
|
|
@@ -2224,14 +2228,14 @@ function ho() {
|
|
|
2224
2228
|
[n]: i
|
|
2225
2229
|
}
|
|
2226
2230
|
})
|
|
2227
|
-
},
|
|
2231
|
+
}, Oe(i) ? i : {
|
|
2228
2232
|
default: () => [i]
|
|
2229
2233
|
}), v < l.length - 1 ? "," : ""]));
|
|
2230
2234
|
}
|
|
2231
2235
|
});
|
|
2232
2236
|
}
|
|
2233
2237
|
export {
|
|
2234
|
-
|
|
2238
|
+
rn as CmpDictionary,
|
|
2235
2239
|
yt as CmpIcon,
|
|
2236
2240
|
Zn as ConfrimButton,
|
|
2237
2241
|
eo as DownExcelTemp,
|
|
@@ -2243,7 +2247,7 @@ export {
|
|
|
2243
2247
|
vn as SearchBar,
|
|
2244
2248
|
et as StatusMap,
|
|
2245
2249
|
Un as _toRaw,
|
|
2246
|
-
|
|
2250
|
+
so as _typeOf,
|
|
2247
2251
|
Rn as arrToStatusMap,
|
|
2248
2252
|
Pn as arrayToTree,
|
|
2249
2253
|
Kn as checkFileSize,
|
|
@@ -2270,7 +2274,7 @@ export {
|
|
|
2270
2274
|
fo as useActions,
|
|
2271
2275
|
ao as useDatePicker,
|
|
2272
2276
|
uo as useGetters,
|
|
2273
|
-
|
|
2277
|
+
ro as useI18nReState,
|
|
2274
2278
|
lo as useRequest,
|
|
2275
2279
|
co as useState,
|
|
2276
2280
|
qe as zh_cn
|