joy-admin-components 0.2.52 → 0.2.53
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 +414 -406
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as
|
|
2
|
-
import { defineComponent as nt, ref as P, onMounted as ot, h as ze, mergeModels as Je, useAttrs as
|
|
1
|
+
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Lt, ElInputNumber as Et, ElText as Ft, ElLink as Ge } from "element-plus";
|
|
2
|
+
import { defineComponent as nt, ref as P, onMounted as ot, h as ze, mergeModels as Je, useAttrs as It, useModel as Tt, computed as ce, watch as Pe, resolveComponent as q, unref as H, openBlock as I, createBlock as N, mergeProps as ue, createSlots as lt, withCtx as z, createElementVNode as re, toDisplayString as te, renderSlot as ee, createVNode as V, createTextVNode as ne, createCommentVNode as fe, createElementBlock as ie, Fragment as Oe, renderList as at, withModifiers as Ve, nextTick as we, resolveDynamicComponent as st, withKeys as Dt, normalizeStyle as zt, normalizeClass as rt, reactive as Ee, onUpdated as Mt, onUnmounted as Ot, 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 $e from "dayjs";
|
|
6
6
|
import { createI18n as At, useI18n as pe } from "vue-i18n";
|
|
7
7
|
import { debounce as Re, cloneDeep as ct, isArray as Xe } from "lodash";
|
|
@@ -57,9 +57,9 @@ var ht = { exports: {} };
|
|
|
57
57
|
}, i.local = function() {
|
|
58
58
|
return r(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
60
|
-
var
|
|
60
|
+
var v = i.parse;
|
|
61
61
|
i.parse = function(c) {
|
|
62
|
-
c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset),
|
|
62
|
+
c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), v.call(this, c);
|
|
63
63
|
};
|
|
64
64
|
var m = i.init;
|
|
65
65
|
i.init = function() {
|
|
@@ -69,28 +69,28 @@ var ht = { exports: {} };
|
|
|
69
69
|
} else
|
|
70
70
|
m.call(this);
|
|
71
71
|
};
|
|
72
|
-
var
|
|
72
|
+
var b = i.utcOffset;
|
|
73
73
|
i.utcOffset = function(c, p) {
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return this.$u ? 0 :
|
|
77
|
-
if (typeof c == "string" && (c = function(
|
|
78
|
-
|
|
79
|
-
var Y =
|
|
74
|
+
var w = this.$utils().u;
|
|
75
|
+
if (w(c))
|
|
76
|
+
return this.$u ? 0 : w(this.$offset) ? b.call(this) : this.$offset;
|
|
77
|
+
if (typeof c == "string" && (c = function(M) {
|
|
78
|
+
M === void 0 && (M = "");
|
|
79
|
+
var Y = M.match(a);
|
|
80
80
|
if (!Y)
|
|
81
81
|
return null;
|
|
82
|
-
var
|
|
82
|
+
var E = ("" + Y[0]).match(s) || ["-", 0, 0], G = E[0], _ = 60 * +E[1] + +E[2];
|
|
83
83
|
return _ === 0 ? 0 : G === "+" ? _ : -_;
|
|
84
84
|
}(c), c === null))
|
|
85
85
|
return this;
|
|
86
86
|
var x = Math.abs(c) <= 16 ? 60 * c : c;
|
|
87
87
|
if (x === 0)
|
|
88
88
|
return this.utc(p);
|
|
89
|
-
var
|
|
89
|
+
var C = this.clone();
|
|
90
90
|
if (p)
|
|
91
|
-
return
|
|
92
|
-
var
|
|
93
|
-
return (
|
|
91
|
+
return C.$offset = x, C.$u = !1, C;
|
|
92
|
+
var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
|
+
return (C = this.local().add(x + L, n)).$offset = x, C.$x.$localOffset = L, C;
|
|
94
94
|
};
|
|
95
95
|
var g = i.format;
|
|
96
96
|
i.format = function(c) {
|
|
@@ -111,11 +111,11 @@ var ht = { exports: {} };
|
|
|
111
111
|
return c === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : h.call(this);
|
|
112
112
|
};
|
|
113
113
|
var f = i.diff;
|
|
114
|
-
i.diff = function(c, p,
|
|
114
|
+
i.diff = function(c, p, w) {
|
|
115
115
|
if (c && this.$u === c.$u)
|
|
116
|
-
return f.call(this, c, p,
|
|
117
|
-
var x = this.local(),
|
|
118
|
-
return f.call(x,
|
|
116
|
+
return f.call(this, c, p, w);
|
|
117
|
+
var x = this.local(), C = r(c).local();
|
|
118
|
+
return f.call(x, C, p, w);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
});
|
|
@@ -131,28 +131,28 @@ var mt = { exports: {} };
|
|
|
131
131
|
return function(s, o, l) {
|
|
132
132
|
var r, i = function(g, h, f) {
|
|
133
133
|
f === void 0 && (f = {});
|
|
134
|
-
var c = new Date(g), p = function(
|
|
134
|
+
var c = new Date(g), p = function(w, x) {
|
|
135
135
|
x === void 0 && (x = {});
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var C = x.timeZoneName || "short", L = w + "|" + C, M = a[L];
|
|
137
|
+
return M || (M = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[L] = M), M;
|
|
138
138
|
}(h, f);
|
|
139
139
|
return p.formatToParts(c);
|
|
140
|
-
},
|
|
140
|
+
}, v = function(g, h) {
|
|
141
141
|
for (var f = i(g, h), c = [], p = 0; p < f.length; p += 1) {
|
|
142
|
-
var
|
|
143
|
-
|
|
142
|
+
var w = f[p], x = w.type, C = w.value, L = n[x];
|
|
143
|
+
L >= 0 && (c[L] = parseInt(C, 10));
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
return (l.utc(
|
|
145
|
+
var M = c[3], Y = M === 24 ? 0 : M, E = c[0] + "-" + c[1] + "-" + c[2] + " " + Y + ":" + c[4] + ":" + c[5] + ":000", G = +g;
|
|
146
|
+
return (l.utc(E).valueOf() - (G -= G % 1e3)) / 6e4;
|
|
147
147
|
}, m = o.prototype;
|
|
148
148
|
m.tz = function(g, h) {
|
|
149
149
|
g === void 0 && (g = r);
|
|
150
|
-
var f, c = this.utcOffset(), p = this.toDate(),
|
|
151
|
-
if (!Number(
|
|
150
|
+
var f, c = this.utcOffset(), p = this.toDate(), w = p.toLocaleString("en-US", { timeZone: g }), x = Math.round((p - new Date(w)) / 1e3 / 60), C = 15 * -Math.round(p.getTimezoneOffset() / 15) - x;
|
|
151
|
+
if (!Number(C))
|
|
152
152
|
f = this.utcOffset(0, h);
|
|
153
|
-
else if (f = l(
|
|
154
|
-
var
|
|
155
|
-
f = f.add(c -
|
|
153
|
+
else if (f = l(w, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(C, !0), h) {
|
|
154
|
+
var L = f.utcOffset();
|
|
155
|
+
f = f.add(c - L, "minute");
|
|
156
156
|
}
|
|
157
157
|
return f.$x.$timezone = g, f;
|
|
158
158
|
}, m.offsetName = function(g) {
|
|
@@ -161,24 +161,24 @@ var mt = { exports: {} };
|
|
|
161
161
|
});
|
|
162
162
|
return f && f.value;
|
|
163
163
|
};
|
|
164
|
-
var
|
|
164
|
+
var b = m.startOf;
|
|
165
165
|
m.startOf = function(g, h) {
|
|
166
166
|
if (!this.$x || !this.$x.$timezone)
|
|
167
|
-
return
|
|
167
|
+
return b.call(this, g, h);
|
|
168
168
|
var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
|
-
return
|
|
169
|
+
return b.call(f, g, h).tz(this.$x.$timezone, !0);
|
|
170
170
|
}, l.tz = function(g, h, f) {
|
|
171
|
-
var c = f && h, p = f || h || r,
|
|
171
|
+
var c = f && h, p = f || h || r, w = v(+l(), p);
|
|
172
172
|
if (typeof g != "string")
|
|
173
173
|
return l(g).tz(p);
|
|
174
|
-
var x = function(Y,
|
|
175
|
-
var _ = Y - 60 *
|
|
176
|
-
if (
|
|
177
|
-
return [_,
|
|
178
|
-
var k =
|
|
179
|
-
return
|
|
180
|
-
}(l.utc(g, c).valueOf(),
|
|
181
|
-
return
|
|
174
|
+
var x = function(Y, E, G) {
|
|
175
|
+
var _ = Y - 60 * E * 1e3, y = v(_, G);
|
|
176
|
+
if (E === y)
|
|
177
|
+
return [_, E];
|
|
178
|
+
var k = v(_ -= 60 * (y - E) * 1e3, G);
|
|
179
|
+
return y === k ? [_, y] : [Y - 60 * Math.min(y, k) * 1e3, Math.max(y, k)];
|
|
180
|
+
}(l.utc(g, c).valueOf(), w, p), C = x[0], L = x[1], M = l(C).utcOffset(L);
|
|
181
|
+
return M.$x.$timezone = p, M;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
184
|
}, l.tz.setDefault = function(g) {
|
|
@@ -289,18 +289,18 @@ async function An(e, t) {
|
|
|
289
289
|
const l = Ce();
|
|
290
290
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
291
291
|
}
|
|
292
|
-
let s = new
|
|
292
|
+
let s = new Ie.Workbook();
|
|
293
293
|
await s.xlsx.load(e);
|
|
294
294
|
const o = {};
|
|
295
295
|
return s.eachSheet(function(l, r) {
|
|
296
296
|
const i = [];
|
|
297
|
-
l.eachRow(function(
|
|
297
|
+
l.eachRow(function(v, m) {
|
|
298
298
|
if (m > a) {
|
|
299
|
-
let
|
|
299
|
+
let b = {}, g = !0;
|
|
300
300
|
Object.keys(n).forEach((h) => {
|
|
301
|
-
const f =
|
|
302
|
-
|
|
303
|
-
}), g || i.push(
|
|
301
|
+
const f = v.getCell(n[h]).value;
|
|
302
|
+
b[h] = f, f && (g = !1);
|
|
303
|
+
}), g || i.push(b);
|
|
304
304
|
}
|
|
305
305
|
}), o[l._name] = i;
|
|
306
306
|
}), s = null, o;
|
|
@@ -318,16 +318,16 @@ async function Un(e, t, n = [], a = {}) {
|
|
|
318
318
|
const { workbook: l, worksheet: r } = Gt();
|
|
319
319
|
r.columns = t, r.addRows(n), s && await Jt(l, r, s);
|
|
320
320
|
try {
|
|
321
|
-
const i = await l.xlsx.writeBuffer(),
|
|
321
|
+
const i = await l.xlsx.writeBuffer(), v = new File([i], e, {
|
|
322
322
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
323
323
|
});
|
|
324
|
-
it(
|
|
324
|
+
it(v);
|
|
325
325
|
} catch (i) {
|
|
326
326
|
console.log(i);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
function Gt() {
|
|
330
|
-
const e = new
|
|
330
|
+
const e = new Ie.Workbook();
|
|
331
331
|
e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date();
|
|
332
332
|
const t = e.addWorksheet("Sheet1");
|
|
333
333
|
return { workbook: e, worksheet: t };
|
|
@@ -361,10 +361,10 @@ async function Xt(e, t, n, a) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function Qt(e, t, n, a) {
|
|
364
|
-
const { col: s, row: o, width: l, height: r } = a, { success: i, base64:
|
|
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 m = e.addImage({
|
|
367
|
-
base64:
|
|
367
|
+
base64: v,
|
|
368
368
|
extension: "jpeg"
|
|
369
369
|
});
|
|
370
370
|
t.addImage(m, {
|
|
@@ -395,34 +395,34 @@ async function tn(e, t) {
|
|
|
395
395
|
const l = Ce();
|
|
396
396
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
397
397
|
}
|
|
398
|
-
let s = new
|
|
398
|
+
let s = new Ie.Workbook();
|
|
399
399
|
await s.xlsx.load(e);
|
|
400
400
|
const o = {};
|
|
401
401
|
return s.eachSheet(function(l, r) {
|
|
402
402
|
if (l.state == "visible") {
|
|
403
|
-
const i = [],
|
|
404
|
-
if (
|
|
405
|
-
let m = Object.values(
|
|
403
|
+
const i = [], v = n[l._name];
|
|
404
|
+
if (v) {
|
|
405
|
+
let m = Object.values(v).some((g) => g.includes("image")), b = {};
|
|
406
406
|
m && (l.getImages().forEach((h) => {
|
|
407
407
|
const { tl: f } = h.range, c = s.model.media.find((p) => p.index === h.imageId);
|
|
408
408
|
if (c) {
|
|
409
|
-
const p = c.buffer.toString("base64"),
|
|
410
|
-
|
|
409
|
+
const p = c.buffer.toString("base64"), w = `data:image/${c.extension};base64,${p}`, x = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
|
|
410
|
+
b[x] ? b[x].push(w) : b[x] = [w];
|
|
411
411
|
}
|
|
412
|
-
}), console.log("withImages-imageMap",
|
|
412
|
+
}), console.log("withImages-imageMap", b)), l.eachRow(function(g, h) {
|
|
413
413
|
if (h > a) {
|
|
414
414
|
let f = {}, c = !0;
|
|
415
|
-
Object.keys(
|
|
416
|
-
var
|
|
417
|
-
let [
|
|
418
|
-
const
|
|
419
|
-
let
|
|
415
|
+
Object.keys(v).forEach((p) => {
|
|
416
|
+
var M;
|
|
417
|
+
let [w, x] = v[p].split(Ue);
|
|
418
|
+
const C = g.getCell(w);
|
|
419
|
+
let L;
|
|
420
420
|
if (x == "image" && m) {
|
|
421
|
-
const Y =
|
|
422
|
-
|
|
421
|
+
const Y = C._column._number, E = `${h}_${Y}`;
|
|
422
|
+
L = b[E] || "";
|
|
423
423
|
} else
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
C.result != null ? L = C.result : (M = C.value) != null && M.richText ? L = C.value.richText.reduce((Y, E) => Y + E.text, "") : C.type == 4 && C.value ? L = $e(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : L = C.value;
|
|
425
|
+
L && x == "option" && (L = L.split(Ue)[1]), f[p] = L, L && (c = !1);
|
|
426
426
|
}), c || i.push(f);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
@@ -445,30 +445,30 @@ async function on(e, t) {
|
|
|
445
445
|
continue;
|
|
446
446
|
const { tableHeader: l, tableData: r } = o;
|
|
447
447
|
l.forEach((i) => {
|
|
448
|
-
const { style:
|
|
448
|
+
const { style: v = {}, required: m } = i, { font: b = {} } = v;
|
|
449
449
|
i.style = {
|
|
450
|
-
...
|
|
450
|
+
...v,
|
|
451
451
|
font: {
|
|
452
|
-
...
|
|
452
|
+
...b,
|
|
453
453
|
color: {
|
|
454
454
|
argb: m ? "FFFF0000" : void 0
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
459
|
-
const { header:
|
|
460
|
-
if (c.numFmt = nn[h] || h, c.width =
|
|
459
|
+
const { header: v, key: m, width: b, option: g, numFmt: h, locked: f } = i, c = a.getColumn(m);
|
|
460
|
+
if (c.numFmt = nn[h] || h, c.width = b || s, c.protection = { locked: f === !0 }, g) {
|
|
461
461
|
const p = n.addWorksheet(m);
|
|
462
|
-
p.state = "hidden", p.getColumn(1).values = g.map((
|
|
462
|
+
p.state = "hidden", p.getColumn(1).values = g.map((w) => `${w.label}${Ue}${w.value}`), Array(100).fill("").forEach((w, x) => {
|
|
463
463
|
if (x > 0) {
|
|
464
|
-
const
|
|
464
|
+
const C = Ce();
|
|
465
465
|
a.getCell(`${c.letter}${x}`).dataValidation = {
|
|
466
466
|
type: "list",
|
|
467
467
|
formulae: [`${m}!$A$1:$A$${g.length}`],
|
|
468
468
|
showErrorMessage: !0,
|
|
469
|
-
error:
|
|
469
|
+
error: C("excel.invalidInput"),
|
|
470
470
|
errorStyle: "stop",
|
|
471
|
-
errorMessage:
|
|
471
|
+
errorMessage: C("excel.invalidOption")
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
474
|
});
|
|
@@ -488,7 +488,7 @@ async function on(e, t) {
|
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
490
|
function ln(e) {
|
|
491
|
-
const t = Ce(), n = new
|
|
491
|
+
const t = Ce(), n = new Ie.Workbook();
|
|
492
492
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((s, o) => {
|
|
493
493
|
const l = e[s].sort ?? 0, r = e[o].sort ?? 0;
|
|
494
494
|
return l - r;
|
|
@@ -624,6 +624,10 @@ const Se = (e, t) => {
|
|
|
624
624
|
type: Number,
|
|
625
625
|
default: void 0
|
|
626
626
|
},
|
|
627
|
+
minLimit: {
|
|
628
|
+
type: Number,
|
|
629
|
+
default: void 0
|
|
630
|
+
},
|
|
627
631
|
optionClick: {
|
|
628
632
|
type: Function,
|
|
629
633
|
default: () => {
|
|
@@ -650,103 +654,107 @@ const Se = (e, t) => {
|
|
|
650
654
|
}),
|
|
651
655
|
emits: /* @__PURE__ */ Je(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
652
656
|
setup(e, { emit: t }) {
|
|
653
|
-
const n = e, a =
|
|
657
|
+
const n = e, a = It(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = P(""), v = ce(() => {
|
|
654
658
|
if (a.remote !== void 0)
|
|
655
659
|
return n.data;
|
|
656
|
-
const
|
|
657
|
-
if (
|
|
658
|
-
return
|
|
659
|
-
const { label: $, labelEn: ye } =
|
|
660
|
-
let
|
|
661
|
-
return
|
|
662
|
-
(de) => de[
|
|
663
|
-
) :
|
|
660
|
+
const y = pt(i.value), { data: k, labelValue: T } = n, J = k || g.value;
|
|
661
|
+
if (y.length == 0)
|
|
662
|
+
return J;
|
|
663
|
+
const { label: $, labelEn: ye } = T;
|
|
664
|
+
let O = o.value == "en_us" ? ye || "i18nName" : $;
|
|
665
|
+
return y.length == 1 ? J.filter(
|
|
666
|
+
(de) => de[O].toLowerCase().includes(y[0].toLowerCase())
|
|
667
|
+
) : J.filter((de) => {
|
|
664
668
|
let ve = !1;
|
|
665
|
-
return ve =
|
|
669
|
+
return ve = y.some((Le) => de[O].toLowerCase() == Le.toLowerCase()), ve;
|
|
666
670
|
});
|
|
667
671
|
}), m = ce({
|
|
668
672
|
get() {
|
|
669
|
-
return a.multiple == null || l.value == null ? !1 : l.value.length ==
|
|
673
|
+
return a.multiple == null || l.value == null ? !1 : l.value.length == v.value.length;
|
|
670
674
|
},
|
|
671
|
-
set(
|
|
672
|
-
return
|
|
675
|
+
set(y) {
|
|
676
|
+
return y;
|
|
673
677
|
}
|
|
674
|
-
}),
|
|
675
|
-
const { data:
|
|
676
|
-
g.value = [...
|
|
678
|
+
}), b = t, g = P([]), h = async () => {
|
|
679
|
+
const { data: y } = await n.api();
|
|
680
|
+
g.value = [...y], b("success", g);
|
|
677
681
|
};
|
|
678
682
|
n.api && h();
|
|
679
|
-
function f(
|
|
680
|
-
|
|
683
|
+
function f(y) {
|
|
684
|
+
b("change", y), c.value && we(() => {
|
|
681
685
|
n.optionClick && n.optionClick(c.value), c.value = null;
|
|
682
686
|
});
|
|
683
687
|
}
|
|
684
688
|
const c = P(null);
|
|
685
|
-
function p(
|
|
686
|
-
c.value =
|
|
689
|
+
function p(y) {
|
|
690
|
+
c.value = y;
|
|
687
691
|
}
|
|
688
|
-
const
|
|
689
|
-
if (
|
|
692
|
+
const w = n.labelValue.label.split("-"), x = (y) => {
|
|
693
|
+
if (w.length == 1) {
|
|
690
694
|
if (n.changeLocal)
|
|
691
|
-
return s(
|
|
692
|
-
let k = o.value == "en_us" ?
|
|
693
|
-
return k = k ||
|
|
695
|
+
return s(y[n.labelValue.label]);
|
|
696
|
+
let k = o.value == "en_us" ? y[n.labelValue.labelEn || "i18nName"] : y[n.labelValue.label];
|
|
697
|
+
return k = k || y[n.labelValue.label], k + "";
|
|
694
698
|
} else {
|
|
695
699
|
let k = [];
|
|
696
|
-
return
|
|
697
|
-
k.push(
|
|
700
|
+
return w.forEach((T) => {
|
|
701
|
+
k.push(y[T]);
|
|
698
702
|
}), k.join("-");
|
|
699
703
|
}
|
|
700
704
|
};
|
|
701
|
-
function
|
|
705
|
+
function C(y) {
|
|
702
706
|
let k = n.data ? n.data : g.value;
|
|
703
|
-
l.value =
|
|
704
|
-
|
|
707
|
+
l.value = y ? k.map((T) => r.value ? T : T[n.labelValue.value]) : [], we(() => {
|
|
708
|
+
b("change", l.value), b("changeAll", l.value, k);
|
|
705
709
|
});
|
|
706
710
|
}
|
|
707
|
-
function
|
|
708
|
-
|
|
709
|
-
n.optionClick && n.optionClick(
|
|
711
|
+
function L(y) {
|
|
712
|
+
b("change", r.value ? y : y[n.labelValue.value]), we(() => {
|
|
713
|
+
n.optionClick && n.optionClick(y);
|
|
710
714
|
});
|
|
711
715
|
}
|
|
712
|
-
function
|
|
713
|
-
|
|
716
|
+
function M(y) {
|
|
717
|
+
const k = r.value ? y : y[n.labelValue.value], T = r.value ? l.value.some((J) => J[n.labelValue.value] === y[n.labelValue.value]) : l.value.includes(k);
|
|
718
|
+
return !!(n.maxLimit > 0 && l.value.length >= n.maxLimit && !T || n.minLimit > 0 && l.value.length === n.minLimit && T);
|
|
714
719
|
}
|
|
715
|
-
function Y(
|
|
716
|
-
return
|
|
720
|
+
function Y(y) {
|
|
721
|
+
return y.map((k) => ({
|
|
717
722
|
...k,
|
|
718
723
|
label: x(k),
|
|
719
724
|
value: r.value ? k : k[n.labelValue.value]
|
|
720
725
|
}));
|
|
721
726
|
}
|
|
722
|
-
const
|
|
723
|
-
|
|
727
|
+
const E = P([]), G = n.data ? n.data : g.value;
|
|
728
|
+
E.value = Y(G), Pe(
|
|
724
729
|
() => n.data ? n.data : g.value,
|
|
725
|
-
(
|
|
726
|
-
var
|
|
727
|
-
const k = Y(
|
|
728
|
-
if (k.length !==
|
|
729
|
-
|
|
730
|
+
(y) => {
|
|
731
|
+
var T;
|
|
732
|
+
const k = Y(y);
|
|
733
|
+
if (k.length !== E.value.length)
|
|
734
|
+
E.value = k;
|
|
730
735
|
else {
|
|
731
|
-
let
|
|
736
|
+
let J = !1;
|
|
732
737
|
for (let $ = 0; $ < k.length; $++)
|
|
733
|
-
if (k[$].value !== ((
|
|
734
|
-
|
|
738
|
+
if (k[$].value !== ((T = E.value[$]) == null ? void 0 : T.value)) {
|
|
739
|
+
J = !0;
|
|
735
740
|
break;
|
|
736
741
|
}
|
|
737
|
-
|
|
742
|
+
J && (E.value = k);
|
|
738
743
|
}
|
|
739
744
|
},
|
|
740
745
|
{ deep: !0 }
|
|
741
746
|
);
|
|
742
|
-
const _ = ce(() =>
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
747
|
+
const _ = ce(() => a.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? E.value.map((y) => ({
|
|
748
|
+
...y,
|
|
749
|
+
disabled: M(y)
|
|
750
|
+
})) : E.value);
|
|
751
|
+
return (y, k) => {
|
|
752
|
+
const T = q("el-checkbox"), J = q("el-select-v2"), $ = q("el-option"), ye = q("el-select");
|
|
753
|
+
return H(a).v2 != null ? (I(), N(J, ue({
|
|
746
754
|
key: 0,
|
|
747
755
|
options: _.value,
|
|
748
756
|
modelValue: l.value,
|
|
749
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
757
|
+
"onUpdate:modelValue": k[1] || (k[1] = (O) => l.value = O)
|
|
750
758
|
}, H(a), {
|
|
751
759
|
filterable: "",
|
|
752
760
|
"collapse-tags": "",
|
|
@@ -755,25 +763,25 @@ const Se = (e, t) => {
|
|
|
755
763
|
onChange: f,
|
|
756
764
|
onClear: f
|
|
757
765
|
}), lt({
|
|
758
|
-
default:
|
|
766
|
+
default: z(({ item: O }) => [
|
|
759
767
|
re("div", {
|
|
760
|
-
onClick: (he) => p(
|
|
761
|
-
},
|
|
768
|
+
onClick: (he) => p(O)
|
|
769
|
+
}, te(O.label), 9, sn)
|
|
762
770
|
]),
|
|
763
771
|
_: 2
|
|
764
772
|
}, [
|
|
765
773
|
H(a).multiple != null ? {
|
|
766
774
|
name: "header",
|
|
767
|
-
fn:
|
|
768
|
-
|
|
769
|
-
|
|
775
|
+
fn: z(() => [
|
|
776
|
+
ee(y.$slots, "header", {}, () => [
|
|
777
|
+
V(T, {
|
|
770
778
|
class: "mgl20",
|
|
771
779
|
modelValue: m.value,
|
|
772
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
773
|
-
onChange:
|
|
780
|
+
"onUpdate:modelValue": k[0] || (k[0] = (O) => m.value = O),
|
|
781
|
+
onChange: C
|
|
774
782
|
}, {
|
|
775
|
-
default:
|
|
776
|
-
ne(
|
|
783
|
+
default: z(() => [
|
|
784
|
+
ne(te(y.$t("quan-xuan")), 1)
|
|
777
785
|
]),
|
|
778
786
|
_: 1
|
|
779
787
|
}, 8, ["modelValue"])
|
|
@@ -781,43 +789,43 @@ const Se = (e, t) => {
|
|
|
781
789
|
]),
|
|
782
790
|
key: "0"
|
|
783
791
|
} : void 0
|
|
784
|
-
]), 1040, ["options", "modelValue"])) : (
|
|
792
|
+
]), 1040, ["options", "modelValue"])) : (I(), N(ye, ue({
|
|
785
793
|
key: 1,
|
|
786
794
|
modelValue: l.value,
|
|
787
|
-
"onUpdate:modelValue": k[3] || (k[3] = (
|
|
795
|
+
"onUpdate:modelValue": k[3] || (k[3] = (O) => l.value = O),
|
|
788
796
|
filterable: "",
|
|
789
797
|
"collapse-tags": "",
|
|
790
798
|
"collapse-tags-tooltip": "",
|
|
791
|
-
"filter-method": H(a).remote != null ? void 0 : (
|
|
799
|
+
"filter-method": H(a).remote != null ? void 0 : (O) => i.value = O,
|
|
792
800
|
clearable: ""
|
|
793
801
|
}, H(a), { onClear: e.optionClick }), {
|
|
794
|
-
default:
|
|
795
|
-
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ?
|
|
796
|
-
|
|
802
|
+
default: z(() => [
|
|
803
|
+
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? ee(y.$slots, "header", { key: 0 }, () => [
|
|
804
|
+
V(T, {
|
|
797
805
|
class: "mgl20",
|
|
798
806
|
modelValue: m.value,
|
|
799
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
800
|
-
onChange:
|
|
807
|
+
"onUpdate:modelValue": k[2] || (k[2] = (O) => m.value = O),
|
|
808
|
+
onChange: C
|
|
801
809
|
}, {
|
|
802
|
-
default:
|
|
803
|
-
ne(
|
|
810
|
+
default: z(() => [
|
|
811
|
+
ne(te(y.$t("quan-xuan")), 1)
|
|
804
812
|
]),
|
|
805
813
|
_: 1
|
|
806
814
|
}, 8, ["modelValue"])
|
|
807
815
|
], !0) : fe("", !0),
|
|
808
|
-
(
|
|
816
|
+
(I(!0), ie(Oe, null, at(v.value, (O, he) => (I(), N($, {
|
|
809
817
|
key: he,
|
|
810
|
-
label: x(
|
|
811
|
-
disabled: H(a).multiple != null && e.maxLimit > 0 ?
|
|
812
|
-
onClick: Ve((de) =>
|
|
813
|
-
value: r.value ?
|
|
818
|
+
label: x(O),
|
|
819
|
+
disabled: H(a).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? M(O) : !1,
|
|
820
|
+
onClick: Ve((de) => L(O), ["stop"]),
|
|
821
|
+
value: r.value ? O : O[e.labelValue.value]
|
|
814
822
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
815
823
|
]),
|
|
816
824
|
_: 3
|
|
817
825
|
}, 16, ["modelValue", "filter-method", "onClear"]));
|
|
818
826
|
};
|
|
819
827
|
}
|
|
820
|
-
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-
|
|
828
|
+
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-078a95a6"]]);
|
|
821
829
|
const un = nt({
|
|
822
830
|
props: {
|
|
823
831
|
name: {
|
|
@@ -827,10 +835,10 @@ const un = nt({
|
|
|
827
835
|
}
|
|
828
836
|
});
|
|
829
837
|
function dn(e, t, n, a, s, o) {
|
|
830
|
-
const l =
|
|
831
|
-
return
|
|
832
|
-
default:
|
|
833
|
-
(
|
|
838
|
+
const l = q("el-icon");
|
|
839
|
+
return I(), N(l, { class: "cmp-icon" }, {
|
|
840
|
+
default: z(() => [
|
|
841
|
+
(I(), N(st(e.name)))
|
|
834
842
|
]),
|
|
835
843
|
_: 1
|
|
836
844
|
});
|
|
@@ -846,14 +854,14 @@ const yt = /* @__PURE__ */ Se(un, [["render", dn], ["__scopeId", "data-v-733f9da
|
|
|
846
854
|
n("no");
|
|
847
855
|
}
|
|
848
856
|
return (o, l) => {
|
|
849
|
-
const r =
|
|
850
|
-
return
|
|
851
|
-
|
|
857
|
+
const r = q("el-popconfirm");
|
|
858
|
+
return I(), ie("span", null, [
|
|
859
|
+
V(r, ue(o.$attrs, {
|
|
852
860
|
onConfirm: H(a),
|
|
853
861
|
onCancel: s
|
|
854
862
|
}), {
|
|
855
|
-
reference:
|
|
856
|
-
|
|
863
|
+
reference: z(() => [
|
|
864
|
+
ee(o.$slots, "default")
|
|
857
865
|
]),
|
|
858
866
|
_: 3
|
|
859
867
|
}, 16, ["onConfirm"])
|
|
@@ -893,17 +901,17 @@ const fn = ["accept"], hn = {
|
|
|
893
901
|
});
|
|
894
902
|
}
|
|
895
903
|
return (l, r) => {
|
|
896
|
-
const i =
|
|
897
|
-
return
|
|
898
|
-
|
|
904
|
+
const i = q("el-button");
|
|
905
|
+
return I(), ie("span", null, [
|
|
906
|
+
V(i, ue({
|
|
899
907
|
type: "primary",
|
|
900
908
|
loading: s.value,
|
|
901
909
|
class: "mgr10",
|
|
902
|
-
onClick: r[0] || (r[0] = (
|
|
910
|
+
onClick: r[0] || (r[0] = (v) => a.value.click())
|
|
903
911
|
}, l.$attrs), {
|
|
904
|
-
default:
|
|
905
|
-
|
|
906
|
-
ne(
|
|
912
|
+
default: z(() => [
|
|
913
|
+
ee(l.$slots, "default", {}, () => [
|
|
914
|
+
ne(te(l.$t("dao-ru")), 1)
|
|
907
915
|
], !0)
|
|
908
916
|
]),
|
|
909
917
|
_: 3
|
|
@@ -929,9 +937,9 @@ function je(e) {
|
|
|
929
937
|
t[a] = pt(l);
|
|
930
938
|
else if (s == "date")
|
|
931
939
|
if (r.includes("range")) {
|
|
932
|
-
const [i,
|
|
933
|
-
let [m,
|
|
934
|
-
m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"),
|
|
940
|
+
const [i, v] = a;
|
|
941
|
+
let [m, b] = l || [];
|
|
942
|
+
m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"), b = $e(b).format("YYYY-MM-DD 23:59:59")), t[i] = m, t[v] = b;
|
|
935
943
|
} else
|
|
936
944
|
t[a] = l;
|
|
937
945
|
else
|
|
@@ -952,12 +960,12 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
952
960
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
953
961
|
daterange: "YYYY-MM-DD",
|
|
954
962
|
month: "YYYY-MM"
|
|
955
|
-
},
|
|
963
|
+
}, v = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
|
|
956
964
|
function m() {
|
|
957
965
|
s("confirm");
|
|
958
966
|
}
|
|
959
|
-
function
|
|
960
|
-
|
|
967
|
+
function b(w) {
|
|
968
|
+
w.option.onClear && w.option.onClear(), s("confirm");
|
|
961
969
|
}
|
|
962
970
|
function g() {
|
|
963
971
|
s("reset");
|
|
@@ -970,14 +978,14 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
970
978
|
}
|
|
971
979
|
const c = ct(a.form.items);
|
|
972
980
|
function p() {
|
|
973
|
-
a.form.items.forEach((
|
|
974
|
-
const x = c.find((
|
|
975
|
-
x && (
|
|
981
|
+
a.form.items.forEach((w) => {
|
|
982
|
+
const x = c.find((C) => C.key == w.key);
|
|
983
|
+
x && (w.value = x.value);
|
|
976
984
|
});
|
|
977
985
|
}
|
|
978
|
-
return t({ getPrm: f, reset: p }), (
|
|
979
|
-
const
|
|
980
|
-
return
|
|
986
|
+
return t({ getPrm: f, reset: p }), (w, x) => {
|
|
987
|
+
const C = q("el-input"), L = q("el-date-picker"), M = q("el-form-item"), Y = q("el-form"), E = q("el-link"), G = q("el-button");
|
|
988
|
+
return I(), ie("div", {
|
|
981
989
|
class: "searchBar-container mgt10 mgb10",
|
|
982
990
|
onKeydown: Dt(m, ["enter"])
|
|
983
991
|
}, [
|
|
@@ -985,50 +993,50 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
985
993
|
class: "searchBar",
|
|
986
994
|
style: zt({ height: o.value ? "auto" : "42px" })
|
|
987
995
|
}, [
|
|
988
|
-
|
|
996
|
+
V(Y, {
|
|
989
997
|
inline: "",
|
|
990
998
|
model: e.form.data
|
|
991
999
|
}, {
|
|
992
|
-
default:
|
|
993
|
-
(
|
|
1000
|
+
default: z(() => [
|
|
1001
|
+
(I(!0), ie(Oe, null, at(e.form.items.filter((_) => !_.hidden), (_) => (I(), ie(Oe, {
|
|
994
1002
|
key: _.key
|
|
995
1003
|
}, [
|
|
996
|
-
_.type == "br" ? (
|
|
1004
|
+
_.type == "br" ? (I(), ie("br", mn)) : (I(), N(M, {
|
|
997
1005
|
key: 1,
|
|
998
1006
|
label: _.name
|
|
999
1007
|
}, {
|
|
1000
|
-
default:
|
|
1001
|
-
var
|
|
1008
|
+
default: z(() => {
|
|
1009
|
+
var y, k;
|
|
1002
1010
|
return [
|
|
1003
|
-
_.type === "input" ? (
|
|
1011
|
+
_.type === "input" ? (I(), N(C, {
|
|
1004
1012
|
key: 0,
|
|
1005
1013
|
modelValue: _.value,
|
|
1006
|
-
"onUpdate:modelValue": (
|
|
1007
|
-
class: rt(((
|
|
1008
|
-
placeholder:
|
|
1014
|
+
"onUpdate:modelValue": (T) => _.value = T,
|
|
1015
|
+
class: rt(((y = _.option) == null ? void 0 : y.class) || "w150"),
|
|
1016
|
+
placeholder: w.$t("qing-shu-ru"),
|
|
1009
1017
|
clearable: ""
|
|
1010
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (
|
|
1011
|
-
_.type === "select" ? (
|
|
1018
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (I(), N(st(_.render), { key: 1 })) : fe("", !0),
|
|
1019
|
+
_.type === "select" ? (I(), N(cn, ue({
|
|
1012
1020
|
key: 2,
|
|
1013
1021
|
class: ((k = _.option) == null ? void 0 : k.class) || "w150",
|
|
1014
1022
|
modelValue: _.value,
|
|
1015
|
-
"onUpdate:modelValue": (
|
|
1023
|
+
"onUpdate:modelValue": (T) => _.value = T
|
|
1016
1024
|
}, { ref_for: !0 }, _.option, {
|
|
1017
1025
|
onChange: m,
|
|
1018
|
-
onClear: (
|
|
1026
|
+
onClear: (T) => b(_)
|
|
1019
1027
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : fe("", !0),
|
|
1020
|
-
_.type === "date" ? (
|
|
1028
|
+
_.type === "date" ? (I(), N(L, ue({
|
|
1021
1029
|
key: 3,
|
|
1022
1030
|
class: { datetimerange: "w300", daterange: "w200" }[_.dateType] || "w100",
|
|
1023
1031
|
modelValue: _.value,
|
|
1024
|
-
"onUpdate:modelValue": (
|
|
1032
|
+
"onUpdate:modelValue": (T) => _.value = T,
|
|
1025
1033
|
"value-format": i[_.dateType] || "YYYY-MM-DD",
|
|
1026
1034
|
type: _.dateType || "date",
|
|
1027
|
-
onFocus: (
|
|
1028
|
-
onChange: (
|
|
1029
|
-
placeholder:
|
|
1030
|
-
"start-placeholder":
|
|
1031
|
-
"end-placeholder":
|
|
1035
|
+
onFocus: (T) => l.value = _,
|
|
1036
|
+
onChange: (T) => h(),
|
|
1037
|
+
placeholder: w.$t("qing-xuan-ze"),
|
|
1038
|
+
"start-placeholder": w.$t("kai-shi-shi-jian"),
|
|
1039
|
+
"end-placeholder": w.$t("jie-shu-shi-jian")
|
|
1032
1040
|
}, { ref_for: !0 }, _.option), null, 16, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : fe("", !0)
|
|
1033
1041
|
];
|
|
1034
1042
|
}),
|
|
@@ -1041,43 +1049,43 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1041
1049
|
], 4),
|
|
1042
1050
|
re("div", gn, [
|
|
1043
1051
|
re("div", pn, [
|
|
1044
|
-
|
|
1052
|
+
ee(w.$slots, "table-header-left", {}, void 0, !0)
|
|
1045
1053
|
]),
|
|
1046
1054
|
re("div", yn, [
|
|
1047
|
-
|
|
1055
|
+
V(E, {
|
|
1048
1056
|
underline: "never",
|
|
1049
1057
|
class: "mgr10",
|
|
1050
1058
|
onClick: x[0] || (x[0] = () => {
|
|
1051
1059
|
s("visibleChange", !o.value), o.value = !o.value;
|
|
1052
1060
|
})
|
|
1053
1061
|
}, {
|
|
1054
|
-
default:
|
|
1055
|
-
|
|
1062
|
+
default: z(() => [
|
|
1063
|
+
V(yt, {
|
|
1056
1064
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1057
1065
|
}, null, 8, ["name"]),
|
|
1058
|
-
ne(" " +
|
|
1066
|
+
ne(" " + te(v.value), 1)
|
|
1059
1067
|
]),
|
|
1060
1068
|
_: 1
|
|
1061
1069
|
}),
|
|
1062
|
-
|
|
1070
|
+
V(G, {
|
|
1063
1071
|
type: "primary",
|
|
1064
1072
|
onClick: m
|
|
1065
1073
|
}, {
|
|
1066
|
-
default:
|
|
1067
|
-
ne(
|
|
1074
|
+
default: z(() => [
|
|
1075
|
+
ne(te(w.$t("shai-xuan")), 1)
|
|
1068
1076
|
]),
|
|
1069
1077
|
_: 1
|
|
1070
1078
|
}),
|
|
1071
|
-
|
|
1079
|
+
V(G, {
|
|
1072
1080
|
type: "primary",
|
|
1073
1081
|
onClick: g
|
|
1074
1082
|
}, {
|
|
1075
|
-
default:
|
|
1076
|
-
ne(
|
|
1083
|
+
default: z(() => [
|
|
1084
|
+
ne(te(w.$t("chong-zhi")), 1)
|
|
1077
1085
|
]),
|
|
1078
1086
|
_: 1
|
|
1079
1087
|
}),
|
|
1080
|
-
|
|
1088
|
+
ee(w.$slots, "btn", {}, void 0, !0)
|
|
1081
1089
|
])
|
|
1082
1090
|
])
|
|
1083
1091
|
], 32);
|
|
@@ -1169,38 +1177,38 @@ const Cn = { class: "center" }, xn = {
|
|
|
1169
1177
|
setup(e, { expose: t }) {
|
|
1170
1178
|
const { t: n, locale: a } = pe(), s = Ut(), o = wn(), l = e, r = P(!1), i = P([]);
|
|
1171
1179
|
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 = []);
|
|
1172
|
-
const
|
|
1180
|
+
const v = ce(() => {
|
|
1173
1181
|
const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1174
1182
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1175
|
-
}), m = ct(l.searchForm.items),
|
|
1176
|
-
[
|
|
1183
|
+
}), m = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ee({
|
|
1184
|
+
[b]: 1,
|
|
1177
1185
|
[g]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1178
1186
|
total: 0
|
|
1179
|
-
}), f = P(null), c = P(null), p = P(450),
|
|
1187
|
+
}), f = P(null), c = P(null), p = P(450), w = Re(() => {
|
|
1180
1188
|
we(() => {
|
|
1181
1189
|
if (!c.value)
|
|
1182
1190
|
return;
|
|
1183
|
-
const u = c.value.getBoundingClientRect(), S = window.innerHeight,
|
|
1184
|
-
p.value = Math.max(Z,
|
|
1191
|
+
const u = c.value.getBoundingClientRect(), S = window.innerHeight, D = u.top, R = 100, Z = S - D - R, A = 200;
|
|
1192
|
+
p.value = Math.max(Z, A);
|
|
1185
1193
|
});
|
|
1186
1194
|
}, 100), x = () => {
|
|
1187
|
-
|
|
1188
|
-
},
|
|
1195
|
+
w();
|
|
1196
|
+
}, C = () => {
|
|
1189
1197
|
if (!l.searchForm.enableCellCopy && !o.enableCellCopy)
|
|
1190
1198
|
return !1;
|
|
1191
1199
|
const d = f.value;
|
|
1192
1200
|
if (!d || !d.$el)
|
|
1193
1201
|
return !1;
|
|
1194
1202
|
const u = d.$el;
|
|
1195
|
-
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown",
|
|
1203
|
+
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown", O), u.removeEventListener("mousemove", he), u.removeEventListener("mouseup", de), u.removeEventListener("keydown", Te), u.addEventListener("mousedown", O), u.addEventListener("mousemove", he), u.addEventListener("mouseup", de), u.addEventListener("keydown", Te), !0;
|
|
1196
1204
|
};
|
|
1197
1205
|
ot(() => {
|
|
1198
|
-
|
|
1199
|
-
|
|
1206
|
+
w(), window.addEventListener("resize", x), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", He), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1207
|
+
C();
|
|
1200
1208
|
}, 500));
|
|
1201
1209
|
}), Mt(() => {
|
|
1202
1210
|
(l.searchForm.enableCellCopy || o.enableCellCopy) && setTimeout(() => {
|
|
1203
|
-
|
|
1211
|
+
C();
|
|
1204
1212
|
}, 500);
|
|
1205
1213
|
}), Ot(() => {
|
|
1206
1214
|
if (window.removeEventListener("resize", x), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
@@ -1208,39 +1216,39 @@ const Cn = { class: "center" }, xn = {
|
|
|
1208
1216
|
const d = f.value;
|
|
1209
1217
|
if (d && d.$el) {
|
|
1210
1218
|
const u = d.$el;
|
|
1211
|
-
u.removeEventListener("mousedown",
|
|
1219
|
+
u.removeEventListener("mousedown", O), u.removeEventListener("mousemove", he), u.removeEventListener("mouseup", de), u.removeEventListener("keydown", Te);
|
|
1212
1220
|
}
|
|
1213
1221
|
}
|
|
1214
1222
|
});
|
|
1215
|
-
const
|
|
1216
|
-
let
|
|
1223
|
+
const L = ce(() => J.value.height || p.value);
|
|
1224
|
+
let M;
|
|
1217
1225
|
async function Y(d) {
|
|
1218
1226
|
const { dataFormat: u } = l.tableConfig;
|
|
1219
|
-
d[
|
|
1220
|
-
const { code: S, data:
|
|
1227
|
+
d[b] != 1 && (d.nextSearchAfter = M), r.value = !0;
|
|
1228
|
+
const { code: S, data: D = {} } = await l.api(d).finally(() => {
|
|
1221
1229
|
r.value = !1, l.searchForm.selections = [];
|
|
1222
1230
|
});
|
|
1223
1231
|
if (S == 200) {
|
|
1224
1232
|
let R = [];
|
|
1225
|
-
for (const
|
|
1226
|
-
if (
|
|
1227
|
-
R =
|
|
1233
|
+
for (const A of o.responseDataKeys.rows)
|
|
1234
|
+
if (D[A]) {
|
|
1235
|
+
R = D[A];
|
|
1228
1236
|
break;
|
|
1229
1237
|
}
|
|
1230
1238
|
let Z = 0;
|
|
1231
|
-
for (const
|
|
1232
|
-
if (
|
|
1233
|
-
Z =
|
|
1239
|
+
for (const A of o.responseDataKeys.total)
|
|
1240
|
+
if (D[A] !== void 0) {
|
|
1241
|
+
Z = D[A];
|
|
1234
1242
|
break;
|
|
1235
1243
|
}
|
|
1236
|
-
i.value = u ? u(R) : R, h.total = Z,
|
|
1244
|
+
i.value = u ? u(R) : R, h.total = Z, M = D.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
|
|
1237
1245
|
setTimeout(() => {
|
|
1238
|
-
|
|
1246
|
+
C();
|
|
1239
1247
|
}, 100);
|
|
1240
1248
|
});
|
|
1241
1249
|
}
|
|
1242
1250
|
}
|
|
1243
|
-
function
|
|
1251
|
+
function E(d = {}) {
|
|
1244
1252
|
const { searchData: u = () => ({}) } = l.tableConfig, S = u();
|
|
1245
1253
|
Y({
|
|
1246
1254
|
...h,
|
|
@@ -1252,30 +1260,30 @@ const Cn = { class: "center" }, xn = {
|
|
|
1252
1260
|
function G() {
|
|
1253
1261
|
const { reset: d } = l.tableConfig;
|
|
1254
1262
|
d && d(), l.searchForm.items.forEach((u) => {
|
|
1255
|
-
const S = m.find((
|
|
1263
|
+
const S = m.find((D) => Xe(u.key) && Xe(D.key) ? u.key.join(",") == D.key.join(",") : D.key == u.key);
|
|
1256
1264
|
S && (u.value = S.value);
|
|
1257
|
-
}),
|
|
1265
|
+
}), E();
|
|
1258
1266
|
}
|
|
1259
|
-
l.api && l.immediate &&
|
|
1267
|
+
l.api && l.immediate && E();
|
|
1260
1268
|
function _() {
|
|
1261
1269
|
return { ...h, ...je(l.searchForm.items) };
|
|
1262
1270
|
}
|
|
1263
|
-
const
|
|
1271
|
+
const y = () => {
|
|
1264
1272
|
const d = f.value;
|
|
1265
1273
|
d && d.clearSort();
|
|
1266
|
-
}, k =
|
|
1274
|
+
}, k = Ee({
|
|
1267
1275
|
storage: !0
|
|
1268
|
-
}),
|
|
1276
|
+
}), T = Ee({
|
|
1269
1277
|
drag: !0,
|
|
1270
1278
|
resizable: !0,
|
|
1271
1279
|
maxFixedSize: 0
|
|
1272
|
-
}),
|
|
1280
|
+
}), J = ce(() => {
|
|
1273
1281
|
const { customConfig: d, columnConfig: u, ...S } = l.tableConfig;
|
|
1274
1282
|
return {
|
|
1275
1283
|
headerAlign: "left",
|
|
1276
1284
|
align: "center",
|
|
1277
1285
|
customConfig: { ...k, ...d },
|
|
1278
|
-
columnConfig: { ...
|
|
1286
|
+
columnConfig: { ...T, ...u },
|
|
1279
1287
|
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1280
1288
|
"virtual-x-config": {
|
|
1281
1289
|
enabled: !1,
|
|
@@ -1285,7 +1293,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1285
1293
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1286
1294
|
...S
|
|
1287
1295
|
};
|
|
1288
|
-
}), $ =
|
|
1296
|
+
}), $ = Ee({
|
|
1289
1297
|
isSelecting: !1,
|
|
1290
1298
|
// 是否正在选择
|
|
1291
1299
|
startCell: null,
|
|
@@ -1301,36 +1309,36 @@ const Cn = { class: "center" }, xn = {
|
|
|
1301
1309
|
const S = u.closest(".vxe-body--row");
|
|
1302
1310
|
if (!S)
|
|
1303
1311
|
return null;
|
|
1304
|
-
const
|
|
1305
|
-
if (!
|
|
1312
|
+
const D = f.value;
|
|
1313
|
+
if (!D)
|
|
1306
1314
|
return null;
|
|
1307
1315
|
let R = -1;
|
|
1308
1316
|
const Z = S.getAttribute("data-rowid");
|
|
1309
1317
|
if (Z != null)
|
|
1310
1318
|
R = parseInt(Z, 10);
|
|
1311
1319
|
else {
|
|
1312
|
-
const
|
|
1313
|
-
R = Array.from(
|
|
1320
|
+
const U = S.parentElement;
|
|
1321
|
+
R = Array.from(U.querySelectorAll(".vxe-body--row")).indexOf(S);
|
|
1314
1322
|
}
|
|
1315
1323
|
if (R < 0)
|
|
1316
1324
|
return null;
|
|
1317
|
-
let
|
|
1325
|
+
let A = -1;
|
|
1318
1326
|
const se = u.getAttribute("data-colid");
|
|
1319
|
-
if (se && (
|
|
1320
|
-
const
|
|
1327
|
+
if (se && (A = D.getColumns().findIndex((F) => F.id === se)), A < 0) {
|
|
1328
|
+
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(u), K = !!u.closest(".vxe-table--fixed-left-wrapper"), X = !!u.closest(".vxe-table--fixed-right-wrapper"), B = D.getColumns();
|
|
1321
1329
|
if (K) {
|
|
1322
|
-
const
|
|
1323
|
-
|
|
1324
|
-
} else if (
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1330
|
+
const Q = B.filter((W) => W.fixed === "left");
|
|
1331
|
+
F < Q.length && (A = B.indexOf(Q[F]));
|
|
1332
|
+
} else if (X) {
|
|
1333
|
+
const Q = B.filter((W) => W.fixed === "right");
|
|
1334
|
+
F < Q.length && (A = B.indexOf(Q[F]));
|
|
1327
1335
|
} else {
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1336
|
+
const Q = l.searchForm.showCheckBox ? 1 : 0;
|
|
1337
|
+
A = B.filter((oe) => oe.fixed === "left").length + F - Q;
|
|
1330
1338
|
}
|
|
1331
1339
|
}
|
|
1332
|
-
return
|
|
1333
|
-
},
|
|
1340
|
+
return A < 0 ? null : { rowIndex: R, colIndex: A, cell: u };
|
|
1341
|
+
}, O = (d) => {
|
|
1334
1342
|
const u = ye(d.target);
|
|
1335
1343
|
if (!u) {
|
|
1336
1344
|
ve();
|
|
@@ -1339,7 +1347,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1339
1347
|
$.isSelecting = !0, $.startCell = {
|
|
1340
1348
|
rowIndex: u.rowIndex,
|
|
1341
1349
|
colIndex: u.colIndex
|
|
1342
|
-
}, $.endCell = { ...$.startCell },
|
|
1350
|
+
}, $.endCell = { ...$.startCell }, Le(), Ke();
|
|
1343
1351
|
}, he = (d) => {
|
|
1344
1352
|
if (!$.isSelecting)
|
|
1345
1353
|
return;
|
|
@@ -1347,7 +1355,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1347
1355
|
u && ($.endCell = {
|
|
1348
1356
|
rowIndex: u.rowIndex,
|
|
1349
1357
|
colIndex: u.colIndex
|
|
1350
|
-
},
|
|
1358
|
+
}, Le(), Ke());
|
|
1351
1359
|
}, de = () => {
|
|
1352
1360
|
$.isSelecting = !1;
|
|
1353
1361
|
}, ve = () => {
|
|
@@ -1366,18 +1374,18 @@ const Cn = { class: "center" }, xn = {
|
|
|
1366
1374
|
"cell-border-left"
|
|
1367
1375
|
);
|
|
1368
1376
|
});
|
|
1369
|
-
},
|
|
1377
|
+
}, Le = () => {
|
|
1370
1378
|
if (!$.startCell || !$.endCell) {
|
|
1371
1379
|
$.selectedCells = [];
|
|
1372
1380
|
return;
|
|
1373
1381
|
}
|
|
1374
|
-
const d = $.startCell.rowIndex, u = $.endCell.rowIndex, S = $.startCell.colIndex,
|
|
1382
|
+
const d = $.startCell.rowIndex, u = $.endCell.rowIndex, S = $.startCell.colIndex, D = $.endCell.colIndex, R = Math.min(d, u), Z = Math.max(d, u), A = Math.min(S, D), se = Math.max(S, D);
|
|
1375
1383
|
$.selectedCells = [];
|
|
1376
|
-
for (let
|
|
1377
|
-
for (let
|
|
1384
|
+
for (let U = R; U <= Z; U++)
|
|
1385
|
+
for (let F = A; F <= se; F++)
|
|
1378
1386
|
$.selectedCells.push({
|
|
1379
|
-
rowIndex:
|
|
1380
|
-
colIndex:
|
|
1387
|
+
rowIndex: U,
|
|
1388
|
+
colIndex: F
|
|
1381
1389
|
});
|
|
1382
1390
|
}, Ke = () => {
|
|
1383
1391
|
we(() => {
|
|
@@ -1397,34 +1405,34 @@ const Cn = { class: "center" }, xn = {
|
|
|
1397
1405
|
);
|
|
1398
1406
|
}), $.selectedCells.length === 0)
|
|
1399
1407
|
return;
|
|
1400
|
-
const S = d.getColumns(),
|
|
1408
|
+
const S = d.getColumns(), D = $.selectedCells.map((K) => K.rowIndex), R = $.selectedCells.map((K) => K.colIndex), Z = Math.min(...D), A = Math.max(...D), se = Math.min(...R), U = Math.max(...R), F = [
|
|
1401
1409
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1402
1410
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1403
1411
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1404
1412
|
].filter(Boolean);
|
|
1405
|
-
$.selectedCells.forEach(({ rowIndex: K, colIndex:
|
|
1406
|
-
const B = S[
|
|
1413
|
+
$.selectedCells.forEach(({ rowIndex: K, colIndex: X }) => {
|
|
1414
|
+
const B = S[X];
|
|
1407
1415
|
if (!B)
|
|
1408
1416
|
return;
|
|
1409
|
-
const
|
|
1410
|
-
for (const oe of
|
|
1417
|
+
const Q = B.fixed === "left", W = B.fixed === "right";
|
|
1418
|
+
for (const oe of F) {
|
|
1411
1419
|
const xe = oe.querySelectorAll(".vxe-body--row")[K];
|
|
1412
1420
|
if (!xe)
|
|
1413
1421
|
continue;
|
|
1414
1422
|
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1415
1423
|
let j = null;
|
|
1416
|
-
if (
|
|
1424
|
+
if (Q && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1417
1425
|
const le = S.filter((ae) => ae.fixed === "left").indexOf(B);
|
|
1418
1426
|
j = me[le];
|
|
1419
1427
|
} else if (W && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1420
1428
|
const le = S.filter((ae) => ae.fixed === "right").indexOf(B);
|
|
1421
1429
|
j = me[le];
|
|
1422
|
-
} else if (!
|
|
1423
|
-
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae =
|
|
1430
|
+
} else if (!Q && !W && oe.closest(".vxe-table--body-wrapper")) {
|
|
1431
|
+
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = X - le;
|
|
1424
1432
|
j = me[ae + ge];
|
|
1425
1433
|
}
|
|
1426
1434
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
1427
|
-
j.classList.add("cell-selected"), K === Z && j.classList.add("cell-border-top"), K ===
|
|
1435
|
+
j.classList.add("cell-selected"), K === Z && j.classList.add("cell-border-top"), K === A && j.classList.add("cell-border-bottom"), X === se && j.classList.add("cell-border-left"), X === U && j.classList.add("cell-border-right");
|
|
1428
1436
|
break;
|
|
1429
1437
|
}
|
|
1430
1438
|
}
|
|
@@ -1436,38 +1444,38 @@ const Cn = { class: "center" }, xn = {
|
|
|
1436
1444
|
const d = f.value;
|
|
1437
1445
|
if (!d)
|
|
1438
1446
|
return;
|
|
1439
|
-
const u = d.$el, S = d.getColumns(),
|
|
1440
|
-
(
|
|
1441
|
-
), R = [...new Set($.selectedCells.map((
|
|
1442
|
-
(
|
|
1447
|
+
const u = d.$el, S = d.getColumns(), D = [...new Set($.selectedCells.map((U) => U.rowIndex))].sort(
|
|
1448
|
+
(U, F) => U - F
|
|
1449
|
+
), R = [...new Set($.selectedCells.map((U) => U.colIndex))].sort(
|
|
1450
|
+
(U, F) => U - F
|
|
1443
1451
|
), Z = [
|
|
1444
1452
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1445
1453
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1446
1454
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1447
|
-
].filter(Boolean),
|
|
1448
|
-
|
|
1449
|
-
const
|
|
1455
|
+
].filter(Boolean), A = [];
|
|
1456
|
+
D.forEach((U) => {
|
|
1457
|
+
const F = [];
|
|
1450
1458
|
R.forEach((K) => {
|
|
1451
|
-
const
|
|
1452
|
-
if (!
|
|
1453
|
-
|
|
1459
|
+
const X = S[K];
|
|
1460
|
+
if (!X) {
|
|
1461
|
+
F.push("");
|
|
1454
1462
|
return;
|
|
1455
1463
|
}
|
|
1456
|
-
const B =
|
|
1464
|
+
const B = X.fixed === "left", Q = X.fixed === "right";
|
|
1457
1465
|
let W = "";
|
|
1458
1466
|
for (const oe of Z) {
|
|
1459
|
-
const xe = oe.querySelectorAll(".vxe-body--row")[
|
|
1467
|
+
const xe = oe.querySelectorAll(".vxe-body--row")[U];
|
|
1460
1468
|
if (!xe)
|
|
1461
1469
|
continue;
|
|
1462
1470
|
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1463
1471
|
let j = null;
|
|
1464
1472
|
if (B && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1465
|
-
const le = S.filter((ae) => ae.fixed === "left").indexOf(
|
|
1473
|
+
const le = S.filter((ae) => ae.fixed === "left").indexOf(X);
|
|
1466
1474
|
j = me[le];
|
|
1467
|
-
} else if (
|
|
1468
|
-
const le = S.filter((ae) => ae.fixed === "right").indexOf(
|
|
1475
|
+
} else if (Q && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1476
|
+
const le = S.filter((ae) => ae.fixed === "right").indexOf(X);
|
|
1469
1477
|
j = me[le];
|
|
1470
|
-
} else if (!B && !
|
|
1478
|
+
} else if (!B && !Q && oe.closest(".vxe-table--body-wrapper")) {
|
|
1471
1479
|
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = K - le;
|
|
1472
1480
|
j = me[ae + ge];
|
|
1473
1481
|
}
|
|
@@ -1476,15 +1484,15 @@ const Cn = { class: "center" }, xn = {
|
|
|
1476
1484
|
break;
|
|
1477
1485
|
}
|
|
1478
1486
|
}
|
|
1479
|
-
|
|
1480
|
-
}),
|
|
1487
|
+
F.push(W);
|
|
1488
|
+
}), A.push(F.join(" "));
|
|
1481
1489
|
});
|
|
1482
|
-
const se =
|
|
1490
|
+
const se = A.join(`
|
|
1483
1491
|
`);
|
|
1484
1492
|
try {
|
|
1485
1493
|
await navigator.clipboard.writeText(se);
|
|
1486
|
-
} catch (
|
|
1487
|
-
console.error("复制失败:",
|
|
1494
|
+
} catch (U) {
|
|
1495
|
+
console.error("复制失败:", U);
|
|
1488
1496
|
}
|
|
1489
1497
|
}, Te = (d) => {
|
|
1490
1498
|
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), wt()) : d.key === "Escape" && ve());
|
|
@@ -1496,9 +1504,9 @@ const Cn = { class: "center" }, xn = {
|
|
|
1496
1504
|
return;
|
|
1497
1505
|
u.$el.contains(d.target) || ve();
|
|
1498
1506
|
}, Ct = (d) => {
|
|
1499
|
-
h[
|
|
1507
|
+
h[b] = d, E();
|
|
1500
1508
|
}, xt = (d) => {
|
|
1501
|
-
h[g] = d, h[
|
|
1509
|
+
h[g] = d, h[b] = 1, E();
|
|
1502
1510
|
};
|
|
1503
1511
|
function We() {
|
|
1504
1512
|
const d = f.value.getCheckboxRecords();
|
|
@@ -1512,82 +1520,82 @@ const Cn = { class: "center" }, xn = {
|
|
|
1512
1520
|
l.searchForm.selections = S;
|
|
1513
1521
|
}
|
|
1514
1522
|
};
|
|
1515
|
-
return t({ tableRef: f, getList:
|
|
1516
|
-
var
|
|
1517
|
-
const S =
|
|
1518
|
-
return
|
|
1523
|
+
return t({ tableRef: f, getList: E, getPrm: _, clearSort: y, calculateTableHeight: w }), (d, u) => {
|
|
1524
|
+
var U;
|
|
1525
|
+
const S = q("el-button"), D = q("el-checkbox"), R = q("el-text"), Z = q("vxe-column"), A = q("VxeTable"), se = q("el-pagination");
|
|
1526
|
+
return I(), ie("div", {
|
|
1519
1527
|
class: rt({ box: e.searchForm.showShadow })
|
|
1520
1528
|
}, [
|
|
1521
|
-
e.searchForm.showSearch ? (
|
|
1529
|
+
e.searchForm.showSearch ? (I(), N(bn, {
|
|
1522
1530
|
key: 0,
|
|
1523
1531
|
form: e.searchForm,
|
|
1524
1532
|
onReset: G,
|
|
1525
|
-
onConfirm: u[1] || (u[1] = (
|
|
1526
|
-
onVisibleChange: H(
|
|
1533
|
+
onConfirm: u[1] || (u[1] = (F) => E()),
|
|
1534
|
+
onVisibleChange: H(w)
|
|
1527
1535
|
}, {
|
|
1528
|
-
btn:
|
|
1536
|
+
btn: z(() => [
|
|
1529
1537
|
u[3] || (u[3] = re("span", { class: "mgr10" }, null, -1)),
|
|
1530
|
-
|
|
1531
|
-
|
|
1538
|
+
ee(d.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1539
|
+
V(S, {
|
|
1532
1540
|
class: "mgl10",
|
|
1533
1541
|
round: "",
|
|
1534
|
-
onClick: u[0] || (u[0] = (
|
|
1542
|
+
onClick: u[0] || (u[0] = (F) => f.value.openCustom())
|
|
1535
1543
|
}, {
|
|
1536
|
-
default:
|
|
1537
|
-
|
|
1544
|
+
default: z(() => [
|
|
1545
|
+
V(yt, { name: "Tools" })
|
|
1538
1546
|
]),
|
|
1539
1547
|
_: 1
|
|
1540
1548
|
})
|
|
1541
1549
|
]),
|
|
1542
1550
|
_: 3
|
|
1543
1551
|
}, 8, ["form", "onVisibleChange"])) : fe("", !0),
|
|
1544
|
-
|
|
1552
|
+
ee(d.$slots, "table-header-left", {}, void 0, !0),
|
|
1545
1553
|
re("div", {
|
|
1546
1554
|
ref_key: "tableContentRef",
|
|
1547
1555
|
ref: c
|
|
1548
1556
|
}, [
|
|
1549
|
-
|
|
1550
|
-
id:
|
|
1557
|
+
V(A, ue({
|
|
1558
|
+
id: v.value,
|
|
1551
1559
|
ref_key: "tableRef",
|
|
1552
1560
|
ref: f,
|
|
1553
1561
|
loading: e.loading || r.value,
|
|
1554
1562
|
data: e.api ? i.value : e.data,
|
|
1555
1563
|
border: ""
|
|
1556
|
-
},
|
|
1557
|
-
height:
|
|
1564
|
+
}, J.value, {
|
|
1565
|
+
height: L.value,
|
|
1558
1566
|
onCheckboxChange: We,
|
|
1559
1567
|
onCheckboxAll: We,
|
|
1560
|
-
onSortChange: (
|
|
1568
|
+
onSortChange: (U = J.value["sort-config"]) == null ? void 0 : U.sortChange
|
|
1561
1569
|
}), {
|
|
1562
|
-
default:
|
|
1563
|
-
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (
|
|
1570
|
+
default: z(() => [
|
|
1571
|
+
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (I(), N(Z, {
|
|
1564
1572
|
key: 0,
|
|
1565
1573
|
type: "checkbox",
|
|
1566
1574
|
width: H(a) == "zh_cn" ? 80 : 150,
|
|
1567
1575
|
title: d.$t("xu-hao"),
|
|
1568
1576
|
fixed: "left"
|
|
1569
1577
|
}, {
|
|
1570
|
-
checkbox:
|
|
1578
|
+
checkbox: z(({ rowIndex: F, row: K, checked: X, disabled: B, indeterminate: Q }) => [
|
|
1571
1579
|
re("div", Cn, [
|
|
1572
|
-
|
|
1580
|
+
X ? (I(), N(D, {
|
|
1573
1581
|
key: 0,
|
|
1574
1582
|
checked: !0,
|
|
1575
1583
|
disabled: B,
|
|
1576
1584
|
size: "default",
|
|
1577
1585
|
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1578
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1586
|
+
}, null, 8, ["disabled", "onClick"])) : (I(), N(D, {
|
|
1579
1587
|
key: 1,
|
|
1580
1588
|
disabled: B,
|
|
1581
1589
|
checked: !1,
|
|
1582
1590
|
size: "default",
|
|
1583
1591
|
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1584
1592
|
}, null, 8, ["disabled", "onClick"])),
|
|
1585
|
-
|
|
1593
|
+
V(R, {
|
|
1586
1594
|
type: "info",
|
|
1587
1595
|
class: "mgl5"
|
|
1588
1596
|
}, {
|
|
1589
|
-
default:
|
|
1590
|
-
ne(
|
|
1597
|
+
default: z(() => [
|
|
1598
|
+
ne(te(F + 1), 1)
|
|
1591
1599
|
]),
|
|
1592
1600
|
_: 2
|
|
1593
1601
|
}, 1024)
|
|
@@ -1595,15 +1603,15 @@ const Cn = { class: "center" }, xn = {
|
|
|
1595
1603
|
]),
|
|
1596
1604
|
_: 1
|
|
1597
1605
|
}, 8, ["width", "title"])) : fe("", !0),
|
|
1598
|
-
|
|
1606
|
+
ee(d.$slots, "default", {}, void 0, !0)
|
|
1599
1607
|
]),
|
|
1600
1608
|
_: 3
|
|
1601
1609
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1602
1610
|
], 512),
|
|
1603
|
-
e.searchForm.showPage ? (
|
|
1611
|
+
e.searchForm.showPage ? (I(), N(se, {
|
|
1604
1612
|
key: 1,
|
|
1605
|
-
"current-page": h[H(
|
|
1606
|
-
"onUpdate:currentPage": u[2] || (u[2] = (
|
|
1613
|
+
"current-page": h[H(b)],
|
|
1614
|
+
"onUpdate:currentPage": u[2] || (u[2] = (F) => h[H(b)] = F),
|
|
1607
1615
|
class: "myPagination mgt10",
|
|
1608
1616
|
background: "",
|
|
1609
1617
|
layout: "total, sizes, prev, pager, next",
|
|
@@ -1634,14 +1642,14 @@ const Cn = { class: "center" }, xn = {
|
|
|
1634
1642
|
on(t.fileName, t.sheetsConfig);
|
|
1635
1643
|
}
|
|
1636
1644
|
return (a, s) => {
|
|
1637
|
-
const o =
|
|
1638
|
-
return
|
|
1645
|
+
const o = q("el-link");
|
|
1646
|
+
return I(), N(o, ue({
|
|
1639
1647
|
type: "primary",
|
|
1640
1648
|
underline: "never"
|
|
1641
1649
|
}, a.$attrs, { onClick: n }), {
|
|
1642
|
-
default:
|
|
1643
|
-
|
|
1644
|
-
ne(
|
|
1650
|
+
default: z(() => [
|
|
1651
|
+
ee(a.$slots, "default", {}, () => [
|
|
1652
|
+
ne(te(a.$t("xia-zai-dao-ru-mo-ban")), 1)
|
|
1645
1653
|
])
|
|
1646
1654
|
]),
|
|
1647
1655
|
_: 3
|
|
@@ -1692,7 +1700,7 @@ async function et(e) {
|
|
|
1692
1700
|
y: 0
|
|
1693
1701
|
}
|
|
1694
1702
|
};
|
|
1695
|
-
n.addEventListener("mousedown", i), document.addEventListener("mousemove",
|
|
1703
|
+
n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", m), window.addEventListener("resize", b);
|
|
1696
1704
|
function l() {
|
|
1697
1705
|
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();
|
|
1698
1706
|
}
|
|
@@ -1709,7 +1717,7 @@ async function et(e) {
|
|
|
1709
1717
|
y: h.clientY
|
|
1710
1718
|
}, s = !0);
|
|
1711
1719
|
}
|
|
1712
|
-
function
|
|
1720
|
+
function v(h) {
|
|
1713
1721
|
s && (o.drag = {
|
|
1714
1722
|
x: h.clientX,
|
|
1715
1723
|
y: h.clientY
|
|
@@ -1718,7 +1726,7 @@ async function et(e) {
|
|
|
1718
1726
|
function m(h) {
|
|
1719
1727
|
a.style.userSelect = "auto", s = !1;
|
|
1720
1728
|
}
|
|
1721
|
-
function
|
|
1729
|
+
function b(h) {
|
|
1722
1730
|
}
|
|
1723
1731
|
function g() {
|
|
1724
1732
|
return new Promise((h, f) => {
|
|
@@ -1727,7 +1735,7 @@ async function et(e) {
|
|
|
1727
1735
|
}, 500);
|
|
1728
1736
|
});
|
|
1729
1737
|
}
|
|
1730
|
-
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ =
|
|
1738
|
+
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = v, e.__sizeChange__ = b;
|
|
1731
1739
|
}
|
|
1732
1740
|
function tt(e) {
|
|
1733
1741
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
@@ -1759,7 +1767,7 @@ const _n = {
|
|
|
1759
1767
|
a("confirm");
|
|
1760
1768
|
}, 300);
|
|
1761
1769
|
async function l() {
|
|
1762
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await
|
|
1770
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Lt.confirm(s("que-ding-guan-bi-ma"), {
|
|
1763
1771
|
confirmButtonText: s("que-ding"),
|
|
1764
1772
|
cancelButtonText: s("qu-xiao"),
|
|
1765
1773
|
type: "warning"
|
|
@@ -1767,8 +1775,8 @@ const _n = {
|
|
|
1767
1775
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1768
1776
|
}
|
|
1769
1777
|
return (r, i) => {
|
|
1770
|
-
const
|
|
1771
|
-
return e.layer.type ? (
|
|
1778
|
+
const v = q("el-button"), m = q("el-drawer"), b = q("el-dialog");
|
|
1779
|
+
return e.layer.type ? (I(), N(m, {
|
|
1772
1780
|
key: 0,
|
|
1773
1781
|
modelValue: e.layer.show,
|
|
1774
1782
|
"onUpdate:modelValue": i[0] || (i[0] = (g) => e.layer.show = g),
|
|
@@ -1779,24 +1787,24 @@ const _n = {
|
|
|
1779
1787
|
"before-close": l,
|
|
1780
1788
|
class: "drawer-content"
|
|
1781
1789
|
}, {
|
|
1782
|
-
default:
|
|
1783
|
-
|
|
1790
|
+
default: z(() => [
|
|
1791
|
+
ee(r.$slots, "default"),
|
|
1784
1792
|
i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
|
|
1785
|
-
e.layer.showButton ? (
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
default:
|
|
1789
|
-
ne(
|
|
1793
|
+
e.layer.showButton ? (I(), ie("div", _n, [
|
|
1794
|
+
ee(r.$slots, "btn", {}, () => [
|
|
1795
|
+
V(v, { onClick: l }, {
|
|
1796
|
+
default: z(() => [
|
|
1797
|
+
ne(te(r.$t("qu-xiao")), 1)
|
|
1790
1798
|
]),
|
|
1791
1799
|
_: 1
|
|
1792
1800
|
}),
|
|
1793
|
-
|
|
1801
|
+
V(v, {
|
|
1794
1802
|
type: "primary",
|
|
1795
1803
|
loading: e.loading,
|
|
1796
1804
|
onClick: H(o)
|
|
1797
1805
|
}, {
|
|
1798
|
-
default:
|
|
1799
|
-
ne(
|
|
1806
|
+
default: z(() => [
|
|
1807
|
+
ne(te(r.$t("ti-jiao")), 1)
|
|
1800
1808
|
]),
|
|
1801
1809
|
_: 1
|
|
1802
1810
|
}, 8, ["loading", "onClick"])
|
|
@@ -1804,8 +1812,8 @@ const _n = {
|
|
|
1804
1812
|
])) : fe("", !0)
|
|
1805
1813
|
]),
|
|
1806
1814
|
_: 3
|
|
1807
|
-
}, 8, ["modelValue", "size", "title"])) : Vt((
|
|
1808
|
-
|
|
1815
|
+
}, 8, ["modelValue", "size", "title"])) : Vt((I(), ie("div", $n, [
|
|
1816
|
+
V(b, {
|
|
1809
1817
|
"close-on-click-modal": !1,
|
|
1810
1818
|
modelValue: e.layer.show,
|
|
1811
1819
|
"onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
|
|
@@ -1813,27 +1821,27 @@ const _n = {
|
|
|
1813
1821
|
width: e.layer.width || 500,
|
|
1814
1822
|
center: ""
|
|
1815
1823
|
}, lt({
|
|
1816
|
-
default:
|
|
1817
|
-
|
|
1824
|
+
default: z(() => [
|
|
1825
|
+
ee(r.$slots, "default")
|
|
1818
1826
|
]),
|
|
1819
1827
|
_: 2
|
|
1820
1828
|
}, [
|
|
1821
1829
|
e.layer.showButton ? {
|
|
1822
1830
|
name: "footer",
|
|
1823
|
-
fn:
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
default:
|
|
1827
|
-
ne(
|
|
1831
|
+
fn: z(() => [
|
|
1832
|
+
ee(r.$slots, "btn", {}, () => [
|
|
1833
|
+
V(v, { onClick: l }, {
|
|
1834
|
+
default: z(() => [
|
|
1835
|
+
ne(te(r.$t("qu-xiao")), 1)
|
|
1828
1836
|
]),
|
|
1829
1837
|
_: 1
|
|
1830
1838
|
}),
|
|
1831
|
-
|
|
1839
|
+
V(v, {
|
|
1832
1840
|
type: "primary",
|
|
1833
1841
|
onClick: H(o)
|
|
1834
1842
|
}, {
|
|
1835
|
-
default:
|
|
1836
|
-
ne(
|
|
1843
|
+
default: z(() => [
|
|
1844
|
+
ne(te(r.$t("ti-jiao")), 1)
|
|
1837
1845
|
]),
|
|
1838
1846
|
_: 1
|
|
1839
1847
|
}, 8, ["onClick"])
|
|
@@ -1858,12 +1866,12 @@ function oo(e, t = {}) {
|
|
|
1858
1866
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1859
1867
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1860
1868
|
}[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1861
|
-
return o ? function(
|
|
1869
|
+
return o ? function(v, m, b) {
|
|
1862
1870
|
if (r) {
|
|
1863
|
-
s.test(m) ?
|
|
1871
|
+
s.test(m) ? b() : b(new Error(i));
|
|
1864
1872
|
return;
|
|
1865
1873
|
}
|
|
1866
|
-
m && !s.test(m) ?
|
|
1874
|
+
m && !s.test(m) ? b(new Error(i)) : b();
|
|
1867
1875
|
} : s.test(l);
|
|
1868
1876
|
}
|
|
1869
1877
|
class lo {
|
|
@@ -2079,21 +2087,21 @@ function ao(e, t = {}) {
|
|
|
2079
2087
|
log: !1,
|
|
2080
2088
|
params: null,
|
|
2081
2089
|
format: null
|
|
2082
|
-
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a,
|
|
2090
|
+
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, v = P([]), m = P(!1), b = (g) => {
|
|
2083
2091
|
const h = g || l;
|
|
2084
2092
|
m.value = !0, e(h).then((f) => {
|
|
2085
|
-
const { code: c, data: p, msg:
|
|
2093
|
+
const { code: c, data: p, msg: w } = f;
|
|
2086
2094
|
if (r) {
|
|
2087
|
-
const { records: x, rows:
|
|
2088
|
-
|
|
2095
|
+
const { records: x, rows: C } = p || {}, L = x || C ? x || C : p;
|
|
2096
|
+
v.value = Me(L, i), r(f);
|
|
2089
2097
|
}
|
|
2090
2098
|
if (p) {
|
|
2091
2099
|
if (p.records != null || p.rows != null) {
|
|
2092
|
-
const { records: x, rows:
|
|
2093
|
-
h && h.total != null && (l.total = parseInt(
|
|
2100
|
+
const { records: x, rows: C, total: L = 0 } = p || {};
|
|
2101
|
+
h && h.total != null && (l.total = parseInt(L)), v.value = Me(x || C || [], i);
|
|
2094
2102
|
} else
|
|
2095
|
-
|
|
2096
|
-
o && console.log("useRequest-res",
|
|
2103
|
+
v.value = Me(p, i);
|
|
2104
|
+
o && console.log("useRequest-res", v.value);
|
|
2097
2105
|
}
|
|
2098
2106
|
}).catch((f) => {
|
|
2099
2107
|
r && (console.log("useRequestErr", f), r({ code: 500 }));
|
|
@@ -2101,7 +2109,7 @@ function ao(e, t = {}) {
|
|
|
2101
2109
|
m.value = !1;
|
|
2102
2110
|
});
|
|
2103
2111
|
};
|
|
2104
|
-
return s ||
|
|
2112
|
+
return s || b(), [m, v, b];
|
|
2105
2113
|
}
|
|
2106
2114
|
function so(e) {
|
|
2107
2115
|
const t = P(e), n = P(""), a = P("");
|
|
@@ -2165,7 +2173,7 @@ function Sn(e, t) {
|
|
|
2165
2173
|
s[o] = a[o].bind({ $store: n });
|
|
2166
2174
|
}), s;
|
|
2167
2175
|
}
|
|
2168
|
-
function
|
|
2176
|
+
function Fe(e) {
|
|
2169
2177
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !qt(e);
|
|
2170
2178
|
}
|
|
2171
2179
|
function mo() {
|
|
@@ -2178,20 +2186,20 @@ function mo() {
|
|
|
2178
2186
|
const a = t.row[t.column.field];
|
|
2179
2187
|
if (e.type == "tag") {
|
|
2180
2188
|
let s;
|
|
2181
|
-
return
|
|
2189
|
+
return V(q("el-text"), {
|
|
2182
2190
|
type: e.enum.getTag(a)
|
|
2183
|
-
},
|
|
2191
|
+
}, Fe(s = e.enum.getName(a)) ? s : {
|
|
2184
2192
|
default: () => [s]
|
|
2185
2193
|
});
|
|
2186
2194
|
}
|
|
2187
|
-
return
|
|
2195
|
+
return V(q("el-text"), null, Fe(n = e.enum.getName(a)) ? n : {
|
|
2188
2196
|
default: () => [n]
|
|
2189
2197
|
});
|
|
2190
2198
|
}
|
|
2191
2199
|
}), ke.renderer.add("InputNumber", {
|
|
2192
2200
|
// 默认显示模板
|
|
2193
2201
|
renderTableDefault(e, t) {
|
|
2194
|
-
return
|
|
2202
|
+
return V(Et, ue({
|
|
2195
2203
|
modelValue: t.row[t.column.field],
|
|
2196
2204
|
"onUpdate:modelValue": (n) => t.row[t.column.field] = n
|
|
2197
2205
|
}, e.props, {
|
|
@@ -2206,7 +2214,7 @@ function mo() {
|
|
|
2206
2214
|
locale: n
|
|
2207
2215
|
} = pe();
|
|
2208
2216
|
let a = n.value == "zh_cn";
|
|
2209
|
-
return
|
|
2217
|
+
return V(Ft, {
|
|
2210
2218
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2211
2219
|
}, {
|
|
2212
2220
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2230,29 +2238,29 @@ function mo() {
|
|
|
2230
2238
|
to: o,
|
|
2231
2239
|
openType: l = "system"
|
|
2232
2240
|
} = e, r = t.row[n];
|
|
2233
|
-
function i(
|
|
2234
|
-
l == "blank" ? window.open(
|
|
2235
|
-
path:
|
|
2241
|
+
function i(v, m) {
|
|
2242
|
+
l == "blank" ? window.open(v) : a.push({
|
|
2243
|
+
path: v,
|
|
2236
2244
|
query: {
|
|
2237
2245
|
[n]: m
|
|
2238
2246
|
}
|
|
2239
2247
|
});
|
|
2240
2248
|
}
|
|
2241
2249
|
if (s) {
|
|
2242
|
-
const
|
|
2243
|
-
return
|
|
2250
|
+
const v = (r == null ? void 0 : r.split(",")) || [];
|
|
2251
|
+
return v.map((m, b) => V("span", null, [V(Ge, {
|
|
2244
2252
|
underline: "never",
|
|
2245
2253
|
type: "primary",
|
|
2246
2254
|
onclick: () => i(l == "stystem" ? o : m, m)
|
|
2247
|
-
},
|
|
2255
|
+
}, Fe(m) ? m : {
|
|
2248
2256
|
default: () => [m]
|
|
2249
|
-
}),
|
|
2257
|
+
}), b < v.length - 1 ? "," : ""]));
|
|
2250
2258
|
}
|
|
2251
|
-
return
|
|
2259
|
+
return V(Ge, {
|
|
2252
2260
|
underline: "never",
|
|
2253
2261
|
type: "primary",
|
|
2254
2262
|
onclick: () => i(l == "stystem" ? o : r, r)
|
|
2255
|
-
},
|
|
2263
|
+
}, Fe(r) ? r : {
|
|
2256
2264
|
default: () => [r]
|
|
2257
2265
|
});
|
|
2258
2266
|
}
|