joy-admin-components 0.2.43 → 0.2.45
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 +492 -486
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as It, ElText as Ft, ElLink as
|
|
2
|
-
import { defineComponent as
|
|
1
|
+
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Et, ElInputNumber as It, 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 Lt, useModel as Tt, computed as ce, watch as Pe, resolveComponent as O, unref as H, openBlock as L, createBlock as N, mergeProps as fe, createSlots as lt, withCtx as D, createElementVNode as re, toDisplayString as ee, renderSlot as Q, createVNode as M, createTextVNode as ne, createCommentVNode as de, 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 Ie, onUpdated as Mt, onUnmounted as Ot, withDirectives as Vt, isVNode as qt } from "vue";
|
|
3
3
|
import { saveAs as it } from "file-saver";
|
|
4
4
|
import Le from "exceljs";
|
|
5
5
|
import $e from "dayjs";
|
|
6
6
|
import { createI18n as At, useI18n as pe } from "vue-i18n";
|
|
7
|
-
import { debounce as
|
|
7
|
+
import { debounce as Re, cloneDeep as ct, isArray as Xe } from "lodash";
|
|
8
8
|
import { useRoute as jt, useRouter as Ut } from "vue-router";
|
|
9
|
-
import { createNamespacedHelpers as
|
|
9
|
+
import { createNamespacedHelpers as Be, useStore as ut, mapState as Pt, mapGetters as Rt, mapActions as Bt } from "vuex";
|
|
10
10
|
import { VxeUI as ke } from "vxe-pc-ui";
|
|
11
|
-
const qn =
|
|
11
|
+
const qn = nt({
|
|
12
12
|
name: "LayOutForm",
|
|
13
13
|
setup(e, { slots: t, attrs: n, emit: a }) {
|
|
14
|
-
const s =
|
|
14
|
+
const s = P(null), o = () => t.default ? t.default().filter((r) => r.type !== Symbol.for("v-cmt")).map((r) => r.type === Symbol.for("v-fgt") ? r.children : r).flat().map(
|
|
15
15
|
(r) => {
|
|
16
16
|
var i;
|
|
17
17
|
return ze(
|
|
@@ -23,7 +23,7 @@ const qn = ot({
|
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
|
-
|
|
26
|
+
ot(() => {
|
|
27
27
|
a("ref", s.value);
|
|
28
28
|
});
|
|
29
29
|
function l() {
|
|
@@ -49,11 +49,11 @@ var ht = { exports: {} };
|
|
|
49
49
|
return function(o, l, r) {
|
|
50
50
|
var i = l.prototype;
|
|
51
51
|
r.utc = function(u) {
|
|
52
|
-
var
|
|
53
|
-
return new l(
|
|
52
|
+
var p = { date: u, utc: !0, args: arguments };
|
|
53
|
+
return new l(p);
|
|
54
54
|
}, i.utc = function(u) {
|
|
55
|
-
var
|
|
56
|
-
return u ?
|
|
55
|
+
var p = r(this.toDate(), { locale: this.$L, utc: !0 });
|
|
56
|
+
return u ? p.add(this.utcOffset(), n) : p;
|
|
57
57
|
}, i.local = function() {
|
|
58
58
|
return r(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
@@ -61,41 +61,41 @@ var ht = { exports: {} };
|
|
|
61
61
|
i.parse = function(u) {
|
|
62
62
|
u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), y.call(this, u);
|
|
63
63
|
};
|
|
64
|
-
var
|
|
64
|
+
var m = i.init;
|
|
65
65
|
i.init = function() {
|
|
66
66
|
if (this.$u) {
|
|
67
67
|
var u = this.$d;
|
|
68
68
|
this.$y = u.getUTCFullYear(), this.$M = u.getUTCMonth(), this.$D = u.getUTCDate(), this.$W = u.getUTCDay(), this.$H = u.getUTCHours(), this.$m = u.getUTCMinutes(), this.$s = u.getUTCSeconds(), this.$ms = u.getUTCMilliseconds();
|
|
69
69
|
} else
|
|
70
|
-
|
|
70
|
+
m.call(this);
|
|
71
71
|
};
|
|
72
72
|
var v = i.utcOffset;
|
|
73
|
-
i.utcOffset = function(u,
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return this.$u ? 0 :
|
|
73
|
+
i.utcOffset = function(u, p) {
|
|
74
|
+
var b = this.$utils().u;
|
|
75
|
+
if (b(u))
|
|
76
|
+
return this.$u ? 0 : b(this.$offset) ? v.call(this) : this.$offset;
|
|
77
77
|
if (typeof u == "string" && (u = function(V) {
|
|
78
78
|
V === void 0 && (V = "");
|
|
79
|
-
var
|
|
80
|
-
if (!
|
|
79
|
+
var Y = V.match(a);
|
|
80
|
+
if (!Y)
|
|
81
81
|
return null;
|
|
82
|
-
var I = ("" +
|
|
83
|
-
return
|
|
82
|
+
var I = ("" + Y[0]).match(s) || ["-", 0, 0], G = I[0], _ = 60 * +I[1] + +I[2];
|
|
83
|
+
return _ === 0 ? 0 : G === "+" ? _ : -_;
|
|
84
84
|
}(u), u === null))
|
|
85
85
|
return this;
|
|
86
86
|
var C = Math.abs(u) <= 16 ? 60 * u : u;
|
|
87
87
|
if (C === 0)
|
|
88
|
-
return this.utc(
|
|
88
|
+
return this.utc(p);
|
|
89
89
|
var x = this.clone();
|
|
90
|
-
if (
|
|
90
|
+
if (p)
|
|
91
91
|
return x.$offset = C, x.$u = !1, x;
|
|
92
92
|
var E = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
93
|
return (x = this.local().add(C + E, n)).$offset = C, x.$x.$localOffset = E, x;
|
|
94
94
|
};
|
|
95
95
|
var g = i.format;
|
|
96
96
|
i.format = function(u) {
|
|
97
|
-
var
|
|
98
|
-
return g.call(this,
|
|
97
|
+
var p = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
98
|
+
return g.call(this, p);
|
|
99
99
|
}, i.valueOf = function() {
|
|
100
100
|
var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
101
101
|
return this.$d.valueOf() - 6e4 * u;
|
|
@@ -106,16 +106,16 @@ var ht = { exports: {} };
|
|
|
106
106
|
}, i.toString = function() {
|
|
107
107
|
return this.toDate().toUTCString();
|
|
108
108
|
};
|
|
109
|
-
var
|
|
109
|
+
var h = i.toDate;
|
|
110
110
|
i.toDate = function(u) {
|
|
111
|
-
return u === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() :
|
|
111
|
+
return u === "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(u,
|
|
114
|
+
i.diff = function(u, p, b) {
|
|
115
115
|
if (u && this.$u === u.$u)
|
|
116
|
-
return f.call(this, u,
|
|
116
|
+
return f.call(this, u, p, b);
|
|
117
117
|
var C = this.local(), x = r(u).local();
|
|
118
|
-
return f.call(C, x,
|
|
118
|
+
return f.call(C, x, p, b);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
});
|
|
@@ -129,56 +129,56 @@ var mt = { exports: {} };
|
|
|
129
129
|
})(dt, function() {
|
|
130
130
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
131
131
|
return function(s, o, l) {
|
|
132
|
-
var r, i = function(g,
|
|
132
|
+
var r, i = function(g, h, f) {
|
|
133
133
|
f === void 0 && (f = {});
|
|
134
|
-
var u = new Date(g),
|
|
134
|
+
var u = new Date(g), p = function(b, C) {
|
|
135
135
|
C === void 0 && (C = {});
|
|
136
|
-
var x = C.timeZoneName || "short", E =
|
|
137
|
-
return V || (V = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone:
|
|
138
|
-
}(
|
|
139
|
-
return
|
|
140
|
-
}, y = function(g,
|
|
141
|
-
for (var f = i(g,
|
|
142
|
-
var
|
|
136
|
+
var x = C.timeZoneName || "short", E = b + "|" + x, V = a[E];
|
|
137
|
+
return V || (V = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: b, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: x }), a[E] = V), V;
|
|
138
|
+
}(h, f);
|
|
139
|
+
return p.formatToParts(u);
|
|
140
|
+
}, y = function(g, h) {
|
|
141
|
+
for (var f = i(g, h), u = [], p = 0; p < f.length; p += 1) {
|
|
142
|
+
var b = f[p], C = b.type, x = b.value, E = n[C];
|
|
143
143
|
E >= 0 && (u[E] = parseInt(x, 10));
|
|
144
144
|
}
|
|
145
|
-
var V = u[3],
|
|
146
|
-
return (l.utc(I).valueOf() - (
|
|
147
|
-
},
|
|
148
|
-
|
|
145
|
+
var V = u[3], Y = V === 24 ? 0 : V, I = u[0] + "-" + u[1] + "-" + u[2] + " " + Y + ":" + u[4] + ":" + u[5] + ":000", G = +g;
|
|
146
|
+
return (l.utc(I).valueOf() - (G -= G % 1e3)) / 6e4;
|
|
147
|
+
}, m = o.prototype;
|
|
148
|
+
m.tz = function(g, h) {
|
|
149
149
|
g === void 0 && (g = r);
|
|
150
|
-
var f, u = this.utcOffset(),
|
|
150
|
+
var f, u = this.utcOffset(), p = this.toDate(), b = p.toLocaleString("en-US", { timeZone: g }), C = Math.round((p - new Date(b)) / 1e3 / 60), x = 15 * -Math.round(p.getTimezoneOffset() / 15) - C;
|
|
151
151
|
if (!Number(x))
|
|
152
|
-
f = this.utcOffset(0,
|
|
153
|
-
else if (f = l(
|
|
152
|
+
f = this.utcOffset(0, h);
|
|
153
|
+
else if (f = l(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(x, !0), h) {
|
|
154
154
|
var E = f.utcOffset();
|
|
155
155
|
f = f.add(u - E, "minute");
|
|
156
156
|
}
|
|
157
157
|
return f.$x.$timezone = g, f;
|
|
158
|
-
},
|
|
159
|
-
var
|
|
158
|
+
}, m.offsetName = function(g) {
|
|
159
|
+
var h = this.$x.$timezone || l.tz.guess(), f = i(this.valueOf(), h, { timeZoneName: g }).find(function(u) {
|
|
160
160
|
return u.type.toLowerCase() === "timezonename";
|
|
161
161
|
});
|
|
162
162
|
return f && f.value;
|
|
163
163
|
};
|
|
164
|
-
var v =
|
|
165
|
-
|
|
164
|
+
var v = m.startOf;
|
|
165
|
+
m.startOf = function(g, h) {
|
|
166
166
|
if (!this.$x || !this.$x.$timezone)
|
|
167
|
-
return v.call(this, g,
|
|
167
|
+
return v.call(this, g, h);
|
|
168
168
|
var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
|
-
return v.call(f, g,
|
|
170
|
-
}, l.tz = function(g,
|
|
171
|
-
var u = f &&
|
|
169
|
+
return v.call(f, g, h).tz(this.$x.$timezone, !0);
|
|
170
|
+
}, l.tz = function(g, h, f) {
|
|
171
|
+
var u = f && h, p = f || h || r, b = y(+l(), p);
|
|
172
172
|
if (typeof g != "string")
|
|
173
|
-
return l(g).tz(
|
|
174
|
-
var C = function(
|
|
175
|
-
var
|
|
176
|
-
if (I ===
|
|
177
|
-
return [
|
|
178
|
-
var
|
|
179
|
-
return
|
|
180
|
-
}(l.utc(g, u).valueOf(),
|
|
181
|
-
return V.$x.$timezone =
|
|
173
|
+
return l(g).tz(p);
|
|
174
|
+
var C = function(Y, I, G) {
|
|
175
|
+
var _ = Y - 60 * I * 1e3, w = y(_, G);
|
|
176
|
+
if (I === w)
|
|
177
|
+
return [_, I];
|
|
178
|
+
var k = y(_ -= 60 * (w - I) * 1e3, G);
|
|
179
|
+
return w === k ? [_, w] : [Y - 60 * Math.min(w, k) * 1e3, Math.max(w, k)];
|
|
180
|
+
}(l.utc(g, u).valueOf(), b, p), x = C[0], E = C[1], V = l(x).utcOffset(E);
|
|
181
|
+
return V.$x.$timezone = p, V;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
184
|
}, l.tz.setDefault = function(g) {
|
|
@@ -188,7 +188,7 @@ var mt = { exports: {} };
|
|
|
188
188
|
});
|
|
189
189
|
})(mt);
|
|
190
190
|
var Ht = mt.exports;
|
|
191
|
-
const Nt = /* @__PURE__ */ ft(Ht),
|
|
191
|
+
const Nt = /* @__PURE__ */ ft(Ht), qe = {
|
|
192
192
|
// 组件通用文本
|
|
193
193
|
"dao-ru": "导入",
|
|
194
194
|
"quan-xuan": "全选",
|
|
@@ -223,7 +223,7 @@ const Nt = /* @__PURE__ */ ft(Ht), Ae = {
|
|
|
223
223
|
tools: {
|
|
224
224
|
keysLengthError: "keys 长度必须大于2 默认前两位为 label value"
|
|
225
225
|
}
|
|
226
|
-
},
|
|
226
|
+
}, Ae = {
|
|
227
227
|
// Common component text
|
|
228
228
|
"dao-ru": "Import",
|
|
229
229
|
"quan-xuan": "Select All",
|
|
@@ -259,14 +259,14 @@ const Nt = /* @__PURE__ */ ft(Ht), Ae = {
|
|
|
259
259
|
keysLengthError: "Keys length must be greater than 2, default first two are label and value"
|
|
260
260
|
}
|
|
261
261
|
}, Wt = {
|
|
262
|
-
zh_cn:
|
|
263
|
-
en_us:
|
|
262
|
+
zh_cn: qe,
|
|
263
|
+
en_us: Ae
|
|
264
264
|
};
|
|
265
265
|
let be = null;
|
|
266
266
|
function Zt(e = null) {
|
|
267
267
|
if (e) {
|
|
268
268
|
const { global: t } = e;
|
|
269
|
-
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
269
|
+
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn", qe) : t.setLocaleMessage("zh_cn", qe), t.messages.value.en_us ? t.mergeLocaleMessage("en_us", Ae) : t.setLocaleMessage("en_us", Ae), be = e, e;
|
|
270
270
|
}
|
|
271
271
|
return be || (be = At({
|
|
272
272
|
legacy: !1,
|
|
@@ -275,11 +275,11 @@ function Zt(e = null) {
|
|
|
275
275
|
messages: Wt
|
|
276
276
|
})), be;
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Ye() {
|
|
279
279
|
return be || Zt();
|
|
280
280
|
}
|
|
281
281
|
function Ce() {
|
|
282
|
-
return
|
|
282
|
+
return Ye().global.t;
|
|
283
283
|
}
|
|
284
284
|
$e.extend(Kt);
|
|
285
285
|
$e.extend(Nt);
|
|
@@ -294,12 +294,12 @@ async function An(e, t) {
|
|
|
294
294
|
const o = {};
|
|
295
295
|
return s.eachSheet(function(l, r) {
|
|
296
296
|
const i = [];
|
|
297
|
-
l.eachRow(function(y,
|
|
298
|
-
if (
|
|
297
|
+
l.eachRow(function(y, m) {
|
|
298
|
+
if (m > a) {
|
|
299
299
|
let v = {}, g = !0;
|
|
300
|
-
Object.keys(n).forEach((
|
|
301
|
-
const f = y.getCell(n[
|
|
302
|
-
v[
|
|
300
|
+
Object.keys(n).forEach((h) => {
|
|
301
|
+
const f = y.getCell(n[h]).value;
|
|
302
|
+
v[h] = f, f && (g = !1);
|
|
303
303
|
}), g || i.push(v);
|
|
304
304
|
}
|
|
305
305
|
}), o[l._name] = i;
|
|
@@ -363,11 +363,11 @@ async function Xt(e, t, n, a) {
|
|
|
363
363
|
async function Qt(e, t, n, a) {
|
|
364
364
|
const { col: s, row: o, width: l, height: r } = a, { success: i, base64: y } = await en(n, 0.3);
|
|
365
365
|
if (i) {
|
|
366
|
-
const
|
|
366
|
+
const m = e.addImage({
|
|
367
367
|
base64: y,
|
|
368
368
|
extension: "jpeg"
|
|
369
369
|
});
|
|
370
|
-
t.addImage(
|
|
370
|
+
t.addImage(m, {
|
|
371
371
|
tl: { col: s, row: o },
|
|
372
372
|
ext: { width: l, height: r }
|
|
373
373
|
});
|
|
@@ -388,7 +388,7 @@ function en(e, t = 1) {
|
|
|
388
388
|
};
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const je = "---";
|
|
392
392
|
async function tn(e, t) {
|
|
393
393
|
const { fields: n, range: a = 1 } = t;
|
|
394
394
|
if (!n) {
|
|
@@ -402,27 +402,27 @@ async function tn(e, t) {
|
|
|
402
402
|
if (l.state == "visible") {
|
|
403
403
|
const i = [], y = n[l._name];
|
|
404
404
|
if (y) {
|
|
405
|
-
let
|
|
406
|
-
|
|
407
|
-
const { tl: f } =
|
|
405
|
+
let m = Object.values(y).some((g) => g.includes("image")), v = {};
|
|
406
|
+
m && (l.getImages().forEach((h) => {
|
|
407
|
+
const { tl: f } = h.range, u = s.model.media.find((p) => p.index === h.imageId);
|
|
408
408
|
if (u) {
|
|
409
|
-
const
|
|
410
|
-
v[C] ? v[C].push(
|
|
409
|
+
const p = u.buffer.toString("base64"), b = `data:image/${u.extension};base64,${p}`, C = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
|
|
410
|
+
v[C] ? v[C].push(b) : v[C] = [b];
|
|
411
411
|
}
|
|
412
|
-
}), console.log("withImages-imageMap", v)), l.eachRow(function(g,
|
|
413
|
-
if (
|
|
412
|
+
}), console.log("withImages-imageMap", v)), l.eachRow(function(g, h) {
|
|
413
|
+
if (h > a) {
|
|
414
414
|
let f = {}, u = !0;
|
|
415
|
-
Object.keys(y).forEach((
|
|
415
|
+
Object.keys(y).forEach((p) => {
|
|
416
416
|
var V;
|
|
417
|
-
let [
|
|
418
|
-
const x = g.getCell(
|
|
417
|
+
let [b, C] = y[p].split(je);
|
|
418
|
+
const x = g.getCell(b);
|
|
419
419
|
let E;
|
|
420
|
-
if (C == "image" &&
|
|
421
|
-
const
|
|
420
|
+
if (C == "image" && m) {
|
|
421
|
+
const Y = x._column._number, I = `${h}_${Y}`;
|
|
422
422
|
E = v[I] || "";
|
|
423
423
|
} else
|
|
424
|
-
x.result != null ? E = x.result : (V = x.value) != null && V.richText ? E = x.value.richText.reduce((
|
|
425
|
-
E && C == "option" && (E = E.split(
|
|
424
|
+
x.result != null ? E = x.result : (V = x.value) != null && V.richText ? E = x.value.richText.reduce((Y, I) => Y + I.text, "") : x.type == 4 && x.value ? E = $e(x.value).utc().format("YYYY-MM-DD HH:mm:ss") : E = x.value;
|
|
425
|
+
E && C == "option" && (E = E.split(je)[1]), f[p] = E, E && (u = !1);
|
|
426
426
|
}), u || i.push(f);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
@@ -442,26 +442,26 @@ async function on(e, t) {
|
|
|
442
442
|
n.eachSheet(function(a, s) {
|
|
443
443
|
const { columnWidth: o } = gt, { tableHeader: l, tableData: r } = t[a._name];
|
|
444
444
|
l.forEach((i) => {
|
|
445
|
-
const { style: y = {}, required:
|
|
445
|
+
const { style: y = {}, required: m } = i, { font: v = {} } = y;
|
|
446
446
|
i.style = {
|
|
447
447
|
...y,
|
|
448
448
|
font: {
|
|
449
449
|
...v,
|
|
450
450
|
color: {
|
|
451
|
-
argb:
|
|
451
|
+
argb: m ? "FFFF0000" : void 0
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
};
|
|
455
455
|
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
456
|
-
const { header: y, key:
|
|
457
|
-
if (f.numFmt = nn[
|
|
458
|
-
const u = n.addWorksheet(
|
|
459
|
-
u.state = "hidden", u.getColumn(1).values = g.map((
|
|
460
|
-
if (
|
|
456
|
+
const { header: y, key: m, width: v, option: g, numFmt: h } = i, f = a.getColumn(m);
|
|
457
|
+
if (f.numFmt = nn[h] || h, f.width = v || o, g) {
|
|
458
|
+
const u = n.addWorksheet(m);
|
|
459
|
+
u.state = "hidden", u.getColumn(1).values = g.map((p) => `${p.label}${je}${p.value}`), Array(100).fill("").forEach((p, b) => {
|
|
460
|
+
if (b > 0) {
|
|
461
461
|
const C = Ce();
|
|
462
|
-
a.getCell(`${f.letter}${
|
|
462
|
+
a.getCell(`${f.letter}${b}`).dataValidation = {
|
|
463
463
|
type: "list",
|
|
464
|
-
formulae: [`${
|
|
464
|
+
formulae: [`${m}!$A$1:$A$${g.length}`],
|
|
465
465
|
showErrorMessage: !0,
|
|
466
466
|
error: C("excel.invalidInput"),
|
|
467
467
|
errorStyle: "stop",
|
|
@@ -527,7 +527,7 @@ function Rn(e) {
|
|
|
527
527
|
function pt(e, t = " ") {
|
|
528
528
|
return e ? e.split(t).filter((n) => n.trim()) : [];
|
|
529
529
|
}
|
|
530
|
-
class
|
|
530
|
+
class Qe {
|
|
531
531
|
constructor(t, n = ["label", "value", "labelEn"]) {
|
|
532
532
|
this.list = t.map((a) => ({
|
|
533
533
|
...a,
|
|
@@ -539,7 +539,7 @@ class et {
|
|
|
539
539
|
getName(t) {
|
|
540
540
|
if (!this.has(t))
|
|
541
541
|
return "-";
|
|
542
|
-
const n =
|
|
542
|
+
const n = Ye().global.locale, { label: a, labelEn: s } = this.map.get(t);
|
|
543
543
|
return (n.value == "zh_cn" ? a : s) ?? a ?? "-";
|
|
544
544
|
}
|
|
545
545
|
getTag(t) {
|
|
@@ -563,7 +563,7 @@ class et {
|
|
|
563
563
|
}
|
|
564
564
|
function Bn(e, t = [], n = "i18nName") {
|
|
565
565
|
if (e.length == 0)
|
|
566
|
-
return new
|
|
566
|
+
return new Qe([]);
|
|
567
567
|
if (t.length < 2) {
|
|
568
568
|
const s = Ce();
|
|
569
569
|
throw new Error(s("tools.keysLengthError"));
|
|
@@ -574,7 +574,7 @@ function Bn(e, t = [], n = "i18nName") {
|
|
|
574
574
|
r === 0 ? o.label = s[l] : r === 1 ? o.value = s[l] : o[l] = s[l];
|
|
575
575
|
}), o;
|
|
576
576
|
});
|
|
577
|
-
return new
|
|
577
|
+
return new Qe(a);
|
|
578
578
|
}
|
|
579
579
|
function Yn(e) {
|
|
580
580
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
@@ -606,7 +606,7 @@ const Se = (e, t) => {
|
|
|
606
606
|
return n;
|
|
607
607
|
}, sn = ["onClick"], rn = {
|
|
608
608
|
__name: "index",
|
|
609
|
-
props: /* @__PURE__ */
|
|
609
|
+
props: /* @__PURE__ */ Je({
|
|
610
610
|
api: {
|
|
611
611
|
type: Function
|
|
612
612
|
},
|
|
@@ -642,132 +642,132 @@ const Se = (e, t) => {
|
|
|
642
642
|
modelValue: {},
|
|
643
643
|
modelModifiers: {}
|
|
644
644
|
}),
|
|
645
|
-
emits: /* @__PURE__ */
|
|
645
|
+
emits: /* @__PURE__ */ Je(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
646
646
|
setup(e, { emit: t }) {
|
|
647
|
-
const n = e, a = Lt(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i =
|
|
647
|
+
const n = e, a = Lt(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = P(""), y = ce(() => {
|
|
648
648
|
if (a.remote !== void 0)
|
|
649
649
|
return n.data;
|
|
650
|
-
const
|
|
651
|
-
if (
|
|
650
|
+
const w = pt(i.value), { data: k, labelValue: j } = n, te = k || g.value;
|
|
651
|
+
if (w.length == 0)
|
|
652
652
|
return te;
|
|
653
|
-
const { label:
|
|
654
|
-
let z = o.value == "en_us" ? ye || "i18nName" :
|
|
655
|
-
return
|
|
656
|
-
(ue) => ue[z].toLowerCase().includes(
|
|
653
|
+
const { label: $, labelEn: ye } = j;
|
|
654
|
+
let z = o.value == "en_us" ? ye || "i18nName" : $;
|
|
655
|
+
return w.length == 1 ? te.filter(
|
|
656
|
+
(ue) => ue[z].toLowerCase().includes(w[0].toLowerCase())
|
|
657
657
|
) : te.filter((ue) => {
|
|
658
658
|
let ve = !1;
|
|
659
|
-
return ve =
|
|
659
|
+
return ve = w.some((Ee) => ue[z].toLowerCase() == Ee.toLowerCase()), ve;
|
|
660
660
|
});
|
|
661
|
-
}),
|
|
661
|
+
}), m = ce({
|
|
662
662
|
get() {
|
|
663
663
|
return a.multiple == null || l.value == null ? !1 : l.value.length == y.value.length;
|
|
664
664
|
},
|
|
665
|
-
set(
|
|
666
|
-
return
|
|
665
|
+
set(w) {
|
|
666
|
+
return w;
|
|
667
667
|
}
|
|
668
|
-
}), v = t, g =
|
|
669
|
-
const { data:
|
|
670
|
-
g.value = [...
|
|
668
|
+
}), v = t, g = P([]), h = async () => {
|
|
669
|
+
const { data: w } = await n.api();
|
|
670
|
+
g.value = [...w], v("success", g);
|
|
671
671
|
};
|
|
672
|
-
n.api &&
|
|
673
|
-
function f(
|
|
674
|
-
v("change",
|
|
672
|
+
n.api && h();
|
|
673
|
+
function f(w) {
|
|
674
|
+
v("change", w), u.value && we(() => {
|
|
675
675
|
n.optionClick && n.optionClick(u.value), u.value = null;
|
|
676
676
|
});
|
|
677
677
|
}
|
|
678
|
-
const u =
|
|
679
|
-
function
|
|
680
|
-
u.value =
|
|
678
|
+
const u = P(null);
|
|
679
|
+
function p(w) {
|
|
680
|
+
u.value = w;
|
|
681
681
|
}
|
|
682
|
-
const
|
|
683
|
-
if (
|
|
682
|
+
const b = n.labelValue.label.split("-"), C = (w) => {
|
|
683
|
+
if (b.length == 1) {
|
|
684
684
|
if (n.changeLocal)
|
|
685
|
-
return s(
|
|
686
|
-
let
|
|
687
|
-
return
|
|
685
|
+
return s(w[n.labelValue.label]);
|
|
686
|
+
let k = o.value == "en_us" ? w[n.labelValue.labelEn || "i18nName"] : w[n.labelValue.label];
|
|
687
|
+
return k = k || w[n.labelValue.label], k + "";
|
|
688
688
|
} else {
|
|
689
|
-
let
|
|
690
|
-
return
|
|
691
|
-
|
|
692
|
-
}),
|
|
689
|
+
let k = [];
|
|
690
|
+
return b.forEach((j) => {
|
|
691
|
+
k.push(w[j]);
|
|
692
|
+
}), k.join("-");
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
|
-
function x(
|
|
696
|
-
let
|
|
697
|
-
l.value =
|
|
698
|
-
v("change", l.value), v("changeAll", l.value,
|
|
695
|
+
function x(w) {
|
|
696
|
+
let k = n.data ? n.data : g.value;
|
|
697
|
+
l.value = w ? k.map((j) => r.value ? j : j[n.labelValue.value]) : [], we(() => {
|
|
698
|
+
v("change", l.value), v("changeAll", l.value, k);
|
|
699
699
|
});
|
|
700
700
|
}
|
|
701
|
-
function E(
|
|
702
|
-
v("change", r.value ?
|
|
703
|
-
n.optionClick && n.optionClick(
|
|
701
|
+
function E(w) {
|
|
702
|
+
v("change", r.value ? w : w[n.labelValue.value]), we(() => {
|
|
703
|
+
n.optionClick && n.optionClick(w);
|
|
704
704
|
});
|
|
705
705
|
}
|
|
706
|
-
function V(
|
|
707
|
-
return l.value.length >= n.maxLimit && !l.value.includes(
|
|
706
|
+
function V(w) {
|
|
707
|
+
return l.value.length >= n.maxLimit && !l.value.includes(w[n.labelValue.value]);
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return
|
|
711
|
-
...
|
|
712
|
-
label: C(
|
|
713
|
-
value: r.value ?
|
|
709
|
+
function Y(w) {
|
|
710
|
+
return w.map((k) => ({
|
|
711
|
+
...k,
|
|
712
|
+
label: C(k),
|
|
713
|
+
value: r.value ? k : k[n.labelValue.value]
|
|
714
714
|
}));
|
|
715
715
|
}
|
|
716
|
-
const I =
|
|
717
|
-
I.value =
|
|
716
|
+
const I = P([]), G = n.data ? n.data : g.value;
|
|
717
|
+
I.value = Y(G), Pe(
|
|
718
718
|
() => n.data ? n.data : g.value,
|
|
719
|
-
(
|
|
720
|
-
var
|
|
721
|
-
const
|
|
722
|
-
if (
|
|
723
|
-
I.value =
|
|
719
|
+
(w) => {
|
|
720
|
+
var j;
|
|
721
|
+
const k = Y(w);
|
|
722
|
+
if (k.length !== I.value.length)
|
|
723
|
+
I.value = k;
|
|
724
724
|
else {
|
|
725
725
|
let te = !1;
|
|
726
|
-
for (let
|
|
727
|
-
if (
|
|
726
|
+
for (let $ = 0; $ < k.length; $++)
|
|
727
|
+
if (k[$].value !== ((j = I.value[$]) == null ? void 0 : j.value)) {
|
|
728
728
|
te = !0;
|
|
729
729
|
break;
|
|
730
730
|
}
|
|
731
|
-
te && (I.value =
|
|
731
|
+
te && (I.value = k);
|
|
732
732
|
}
|
|
733
733
|
},
|
|
734
734
|
{ deep: !0 }
|
|
735
735
|
);
|
|
736
|
-
const
|
|
737
|
-
return (
|
|
738
|
-
const
|
|
739
|
-
return
|
|
736
|
+
const _ = ce(() => I.value);
|
|
737
|
+
return (w, k) => {
|
|
738
|
+
const j = O("el-checkbox"), te = O("el-select-v2"), $ = O("el-option"), ye = O("el-select");
|
|
739
|
+
return H(a).v2 != null ? (L(), N(te, fe({
|
|
740
740
|
key: 0,
|
|
741
|
-
options:
|
|
741
|
+
options: _.value,
|
|
742
742
|
modelValue: l.value,
|
|
743
|
-
"onUpdate:modelValue":
|
|
744
|
-
},
|
|
743
|
+
"onUpdate:modelValue": k[1] || (k[1] = (z) => l.value = z)
|
|
744
|
+
}, H(a), {
|
|
745
745
|
filterable: "",
|
|
746
746
|
"collapse-tags": "",
|
|
747
747
|
"collapse-tags-tooltip": "",
|
|
748
748
|
clearable: "",
|
|
749
749
|
onChange: f,
|
|
750
750
|
onClear: f
|
|
751
|
-
}),
|
|
751
|
+
}), lt({
|
|
752
752
|
default: D(({ item: z }) => [
|
|
753
753
|
re("div", {
|
|
754
|
-
onClick: (
|
|
755
|
-
},
|
|
754
|
+
onClick: (he) => p(z)
|
|
755
|
+
}, ee(z.label), 9, sn)
|
|
756
756
|
]),
|
|
757
757
|
_: 2
|
|
758
758
|
}, [
|
|
759
|
-
|
|
759
|
+
H(a).multiple != null ? {
|
|
760
760
|
name: "header",
|
|
761
761
|
fn: D(() => [
|
|
762
|
-
|
|
763
|
-
|
|
762
|
+
Q(w.$slots, "header", {}, () => [
|
|
763
|
+
M(j, {
|
|
764
764
|
class: "mgl20",
|
|
765
|
-
modelValue:
|
|
766
|
-
"onUpdate:modelValue":
|
|
765
|
+
modelValue: m.value,
|
|
766
|
+
"onUpdate:modelValue": k[0] || (k[0] = (z) => m.value = z),
|
|
767
767
|
onChange: x
|
|
768
768
|
}, {
|
|
769
769
|
default: D(() => [
|
|
770
|
-
ne(
|
|
770
|
+
ne(ee(w.$t("quan-xuan")), 1)
|
|
771
771
|
]),
|
|
772
772
|
_: 1
|
|
773
773
|
}, 8, ["modelValue"])
|
|
@@ -775,34 +775,34 @@ const Se = (e, t) => {
|
|
|
775
775
|
]),
|
|
776
776
|
key: "0"
|
|
777
777
|
} : void 0
|
|
778
|
-
]), 1040, ["options", "modelValue"])) : (L(),
|
|
778
|
+
]), 1040, ["options", "modelValue"])) : (L(), N(ye, fe({
|
|
779
779
|
key: 1,
|
|
780
780
|
modelValue: l.value,
|
|
781
|
-
"onUpdate:modelValue":
|
|
781
|
+
"onUpdate:modelValue": k[3] || (k[3] = (z) => l.value = z),
|
|
782
782
|
filterable: "",
|
|
783
783
|
"collapse-tags": "",
|
|
784
784
|
"collapse-tags-tooltip": "",
|
|
785
|
-
"filter-method":
|
|
785
|
+
"filter-method": H(a).remote != null ? void 0 : (z) => i.value = z,
|
|
786
786
|
clearable: ""
|
|
787
|
-
},
|
|
787
|
+
}, H(a), { onClear: e.optionClick }), {
|
|
788
788
|
default: D(() => [
|
|
789
|
-
|
|
790
|
-
|
|
789
|
+
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? Q(w.$slots, "header", { key: 0 }, () => [
|
|
790
|
+
M(j, {
|
|
791
791
|
class: "mgl20",
|
|
792
|
-
modelValue:
|
|
793
|
-
"onUpdate:modelValue":
|
|
792
|
+
modelValue: m.value,
|
|
793
|
+
"onUpdate:modelValue": k[2] || (k[2] = (z) => m.value = z),
|
|
794
794
|
onChange: x
|
|
795
795
|
}, {
|
|
796
796
|
default: D(() => [
|
|
797
|
-
ne(
|
|
797
|
+
ne(ee(w.$t("quan-xuan")), 1)
|
|
798
798
|
]),
|
|
799
799
|
_: 1
|
|
800
800
|
}, 8, ["modelValue"])
|
|
801
801
|
], !0) : de("", !0),
|
|
802
|
-
(L(!0), ie(
|
|
803
|
-
key:
|
|
802
|
+
(L(!0), ie(Oe, null, at(y.value, (z, he) => (L(), N($, {
|
|
803
|
+
key: he,
|
|
804
804
|
label: C(z),
|
|
805
|
-
disabled:
|
|
805
|
+
disabled: H(a).multiple != null && e.maxLimit > 0 ? V(z) : !1,
|
|
806
806
|
onClick: Ve((ue) => E(z), ["stop"]),
|
|
807
807
|
value: r.value ? z : z[e.labelValue.value]
|
|
808
808
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
@@ -812,7 +812,7 @@ const Se = (e, t) => {
|
|
|
812
812
|
};
|
|
813
813
|
}
|
|
814
814
|
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-51bd1467"]]);
|
|
815
|
-
const un =
|
|
815
|
+
const un = nt({
|
|
816
816
|
props: {
|
|
817
817
|
name: {
|
|
818
818
|
tyepe: String,
|
|
@@ -821,10 +821,10 @@ const un = ot({
|
|
|
821
821
|
}
|
|
822
822
|
});
|
|
823
823
|
function dn(e, t, n, a, s, o) {
|
|
824
|
-
const l =
|
|
825
|
-
return L(),
|
|
824
|
+
const l = O("el-icon");
|
|
825
|
+
return L(), N(l, { class: "cmp-icon" }, {
|
|
826
826
|
default: D(() => [
|
|
827
|
-
(L(),
|
|
827
|
+
(L(), N(st(e.name)))
|
|
828
828
|
]),
|
|
829
829
|
_: 1
|
|
830
830
|
});
|
|
@@ -833,21 +833,21 @@ const yt = /* @__PURE__ */ Se(un, [["render", dn], ["__scopeId", "data-v-733f9da
|
|
|
833
833
|
__name: "index",
|
|
834
834
|
emits: ["ok", "no"],
|
|
835
835
|
setup(e, { emit: t }) {
|
|
836
|
-
const n = t, a =
|
|
836
|
+
const n = t, a = Re(() => {
|
|
837
837
|
n("ok");
|
|
838
838
|
}, 500);
|
|
839
839
|
function s() {
|
|
840
840
|
n("no");
|
|
841
841
|
}
|
|
842
842
|
return (o, l) => {
|
|
843
|
-
const r =
|
|
843
|
+
const r = O("el-popconfirm");
|
|
844
844
|
return L(), ie("span", null, [
|
|
845
|
-
|
|
846
|
-
onConfirm:
|
|
845
|
+
M(r, fe(o.$attrs, {
|
|
846
|
+
onConfirm: H(a),
|
|
847
847
|
onCancel: s
|
|
848
848
|
}), {
|
|
849
849
|
reference: D(() => [
|
|
850
|
-
|
|
850
|
+
Q(o.$slots, "default")
|
|
851
851
|
]),
|
|
852
852
|
_: 3
|
|
853
853
|
}, 16, ["onConfirm"])
|
|
@@ -873,7 +873,7 @@ const fn = ["accept"], hn = {
|
|
|
873
873
|
},
|
|
874
874
|
emits: ["fileChange"],
|
|
875
875
|
setup(e, { emit: t }) {
|
|
876
|
-
const n = e, a =
|
|
876
|
+
const n = e, a = P(null), s = P(!1);
|
|
877
877
|
async function o(l) {
|
|
878
878
|
s.value = !0;
|
|
879
879
|
let r = l.target.files[0];
|
|
@@ -887,18 +887,20 @@ const fn = ["accept"], hn = {
|
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
889
|
return (l, r) => {
|
|
890
|
-
const i =
|
|
890
|
+
const i = O("el-button");
|
|
891
891
|
return L(), ie("span", null, [
|
|
892
|
-
|
|
892
|
+
M(i, {
|
|
893
893
|
type: "primary",
|
|
894
894
|
loading: s.value,
|
|
895
895
|
class: "mgr10",
|
|
896
896
|
onClick: r[0] || (r[0] = (y) => a.value.click())
|
|
897
897
|
}, {
|
|
898
898
|
default: D(() => [
|
|
899
|
-
|
|
899
|
+
Q(l.$slots, "default", {}, () => [
|
|
900
|
+
ne(ee(l.$t("dao-ru")), 1)
|
|
901
|
+
], !0)
|
|
900
902
|
]),
|
|
901
|
-
_:
|
|
903
|
+
_: 3
|
|
902
904
|
}, 8, ["loading"]),
|
|
903
905
|
re("input", {
|
|
904
906
|
onChange: o,
|
|
@@ -911,8 +913,8 @@ const fn = ["accept"], hn = {
|
|
|
911
913
|
]);
|
|
912
914
|
};
|
|
913
915
|
}
|
|
914
|
-
}, Jn = /* @__PURE__ */ Se(hn, [["__scopeId", "data-v-
|
|
915
|
-
function
|
|
916
|
+
}, Jn = /* @__PURE__ */ Se(hn, [["__scopeId", "data-v-2e238247"]]);
|
|
917
|
+
function Ue(e) {
|
|
916
918
|
let t = {};
|
|
917
919
|
return e.forEach((n) => {
|
|
918
920
|
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
@@ -922,8 +924,8 @@ function Pe(e) {
|
|
|
922
924
|
else if (s == "date")
|
|
923
925
|
if (r.includes("range")) {
|
|
924
926
|
const [i, y] = a;
|
|
925
|
-
let [
|
|
926
|
-
|
|
927
|
+
let [m, v] = l || [];
|
|
928
|
+
m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"), v = $e(v).format("YYYY-MM-DD 23:59:59")), t[i] = m, t[y] = v;
|
|
927
929
|
} else
|
|
928
930
|
t[a] = l;
|
|
929
931
|
else
|
|
@@ -940,84 +942,88 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
940
942
|
},
|
|
941
943
|
emits: ["confirm", "reset", "visibleChange"],
|
|
942
944
|
setup(e, { expose: t, emit: n }) {
|
|
943
|
-
const a = e, s = n, o =
|
|
944
|
-
|
|
945
|
+
const a = e, s = n, o = P(!0), l = P(null), { t: r } = pe(), i = {
|
|
946
|
+
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
947
|
+
daterange: "YYYY-MM-DD",
|
|
948
|
+
month: "YYYY-MM"
|
|
949
|
+
}, y = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
|
|
950
|
+
function m() {
|
|
945
951
|
s("confirm");
|
|
946
952
|
}
|
|
947
|
-
function
|
|
948
|
-
|
|
953
|
+
function v(b) {
|
|
954
|
+
b.option.onClear && b.option.onClear(), s("confirm");
|
|
949
955
|
}
|
|
950
|
-
function
|
|
956
|
+
function g() {
|
|
951
957
|
s("reset");
|
|
952
958
|
}
|
|
953
|
-
function
|
|
959
|
+
function h() {
|
|
954
960
|
s("confirm");
|
|
955
961
|
}
|
|
956
|
-
function
|
|
957
|
-
return
|
|
962
|
+
function f() {
|
|
963
|
+
return Ue(a.form.items);
|
|
958
964
|
}
|
|
959
|
-
const
|
|
960
|
-
function
|
|
961
|
-
a.form.items.forEach((
|
|
962
|
-
const
|
|
963
|
-
|
|
965
|
+
const u = ct(a.form.items);
|
|
966
|
+
function p() {
|
|
967
|
+
a.form.items.forEach((b) => {
|
|
968
|
+
const C = u.find((x) => x.key == b.key);
|
|
969
|
+
C && (b.value = C.value);
|
|
964
970
|
});
|
|
965
971
|
}
|
|
966
|
-
return t({ getPrm:
|
|
967
|
-
const
|
|
972
|
+
return t({ getPrm: f, reset: p }), (b, C) => {
|
|
973
|
+
const x = O("el-input"), E = O("el-date-picker"), V = O("el-form-item"), Y = O("el-form"), I = O("el-link"), G = O("el-button");
|
|
968
974
|
return L(), ie("div", {
|
|
969
975
|
class: "searchBar-container mgt10 mgb10",
|
|
970
|
-
onKeydown: Dt(
|
|
976
|
+
onKeydown: Dt(m, ["enter"])
|
|
971
977
|
}, [
|
|
972
978
|
re("div", {
|
|
973
979
|
class: "searchBar",
|
|
974
980
|
style: zt({ height: o.value ? "auto" : "42px" })
|
|
975
981
|
}, [
|
|
976
|
-
|
|
982
|
+
M(Y, {
|
|
977
983
|
inline: "",
|
|
978
984
|
model: e.form.data
|
|
979
985
|
}, {
|
|
980
986
|
default: D(() => [
|
|
981
|
-
(L(!0), ie(
|
|
982
|
-
key:
|
|
987
|
+
(L(!0), ie(Oe, null, at(e.form.items.filter((_) => !_.hidden), (_) => (L(), ie(Oe, {
|
|
988
|
+
key: _.key
|
|
983
989
|
}, [
|
|
984
|
-
|
|
990
|
+
_.type == "br" ? (L(), ie("br", mn)) : (L(), N(V, {
|
|
985
991
|
key: 1,
|
|
986
|
-
label:
|
|
992
|
+
label: _.name
|
|
987
993
|
}, {
|
|
988
994
|
default: D(() => {
|
|
989
|
-
var
|
|
995
|
+
var w, k;
|
|
990
996
|
return [
|
|
991
|
-
|
|
997
|
+
_.type === "input" ? (L(), N(x, {
|
|
992
998
|
key: 0,
|
|
993
|
-
modelValue:
|
|
994
|
-
"onUpdate:modelValue": (
|
|
995
|
-
class:
|
|
996
|
-
placeholder:
|
|
999
|
+
modelValue: _.value,
|
|
1000
|
+
"onUpdate:modelValue": (j) => _.value = j,
|
|
1001
|
+
class: rt(((w = _.option) == null ? void 0 : w.class) || "w150"),
|
|
1002
|
+
placeholder: b.$t("qing-shu-ru"),
|
|
997
1003
|
clearable: ""
|
|
998
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) :
|
|
999
|
-
|
|
1004
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (L(), N(st(_.render), { key: 1 })) : de("", !0),
|
|
1005
|
+
_.type === "select" ? (L(), N(cn, fe({
|
|
1000
1006
|
key: 2,
|
|
1001
|
-
class: ((
|
|
1002
|
-
modelValue:
|
|
1003
|
-
"onUpdate:modelValue": (
|
|
1004
|
-
}, { ref_for: !0 },
|
|
1005
|
-
onChange:
|
|
1006
|
-
onClear: (
|
|
1007
|
+
class: ((k = _.option) == null ? void 0 : k.class) || "w150",
|
|
1008
|
+
modelValue: _.value,
|
|
1009
|
+
"onUpdate:modelValue": (j) => _.value = j
|
|
1010
|
+
}, { ref_for: !0 }, _.option, {
|
|
1011
|
+
onChange: m,
|
|
1012
|
+
onClear: (j) => v(_)
|
|
1007
1013
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : de("", !0),
|
|
1008
|
-
|
|
1014
|
+
_.type === "date" ? (L(), N(E, fe({
|
|
1009
1015
|
key: 3,
|
|
1010
|
-
class:
|
|
1011
|
-
modelValue:
|
|
1012
|
-
"onUpdate:modelValue": (
|
|
1013
|
-
"value-format":
|
|
1014
|
-
type:
|
|
1015
|
-
onFocus: (
|
|
1016
|
-
onChange: (
|
|
1017
|
-
placeholder:
|
|
1018
|
-
"start-placeholder":
|
|
1019
|
-
"end-placeholder":
|
|
1020
|
-
}, null,
|
|
1016
|
+
class: { datetimerange: "w300", daterange: "w200" }[_.dateType] || "w100",
|
|
1017
|
+
modelValue: _.value,
|
|
1018
|
+
"onUpdate:modelValue": (j) => _.value = j,
|
|
1019
|
+
"value-format": i[_.dateType] || "YYYY-MM-DD",
|
|
1020
|
+
type: _.dateType || "date",
|
|
1021
|
+
onFocus: (j) => l.value = _,
|
|
1022
|
+
onChange: (j) => h(),
|
|
1023
|
+
placeholder: b.$t("qing-xuan-ze"),
|
|
1024
|
+
"start-placeholder": b.$t("kai-shi-shi-jian"),
|
|
1025
|
+
"end-placeholder": b.$t("jie-shu-shi-jian")
|
|
1026
|
+
}, { ref_for: !0 }, _.option), null, 16, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : de("", !0)
|
|
1021
1027
|
];
|
|
1022
1028
|
}),
|
|
1023
1029
|
_: 2
|
|
@@ -1029,49 +1035,49 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1029
1035
|
], 4),
|
|
1030
1036
|
re("div", gn, [
|
|
1031
1037
|
re("div", pn, [
|
|
1032
|
-
|
|
1038
|
+
Q(b.$slots, "table-header-left", {}, void 0, !0)
|
|
1033
1039
|
]),
|
|
1034
1040
|
re("div", yn, [
|
|
1035
|
-
|
|
1041
|
+
M(I, {
|
|
1036
1042
|
underline: "never",
|
|
1037
1043
|
class: "mgr10",
|
|
1038
|
-
onClick:
|
|
1044
|
+
onClick: C[0] || (C[0] = () => {
|
|
1039
1045
|
s("visibleChange", !o.value), o.value = !o.value;
|
|
1040
1046
|
})
|
|
1041
1047
|
}, {
|
|
1042
1048
|
default: D(() => [
|
|
1043
|
-
|
|
1049
|
+
M(yt, {
|
|
1044
1050
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1045
1051
|
}, null, 8, ["name"]),
|
|
1046
|
-
ne(" " +
|
|
1052
|
+
ne(" " + ee(y.value), 1)
|
|
1047
1053
|
]),
|
|
1048
1054
|
_: 1
|
|
1049
1055
|
}),
|
|
1050
|
-
|
|
1056
|
+
M(G, {
|
|
1051
1057
|
type: "primary",
|
|
1052
|
-
onClick:
|
|
1058
|
+
onClick: m
|
|
1053
1059
|
}, {
|
|
1054
1060
|
default: D(() => [
|
|
1055
|
-
ne(
|
|
1061
|
+
ne(ee(b.$t("shai-xuan")), 1)
|
|
1056
1062
|
]),
|
|
1057
1063
|
_: 1
|
|
1058
1064
|
}),
|
|
1059
|
-
|
|
1065
|
+
M(G, {
|
|
1060
1066
|
type: "primary",
|
|
1061
|
-
onClick:
|
|
1067
|
+
onClick: g
|
|
1062
1068
|
}, {
|
|
1063
1069
|
default: D(() => [
|
|
1064
|
-
ne(
|
|
1070
|
+
ne(ee(b.$t("chong-zhi")), 1)
|
|
1065
1071
|
]),
|
|
1066
1072
|
_: 1
|
|
1067
1073
|
}),
|
|
1068
|
-
|
|
1074
|
+
Q(b.$slots, "btn", {}, void 0, !0)
|
|
1069
1075
|
])
|
|
1070
1076
|
])
|
|
1071
1077
|
], 32);
|
|
1072
1078
|
};
|
|
1073
1079
|
}
|
|
1074
|
-
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-
|
|
1080
|
+
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]), vt = {
|
|
1075
1081
|
// 分页参数名
|
|
1076
1082
|
pageNoKey: "pageNo",
|
|
1077
1083
|
// 页码参数名
|
|
@@ -1155,24 +1161,24 @@ const Cn = { class: "center" }, xn = {
|
|
|
1155
1161
|
}
|
|
1156
1162
|
},
|
|
1157
1163
|
setup(e, { expose: t }) {
|
|
1158
|
-
const { t: n, locale: a } = pe(), s = jt(), o = wn(), l = e, r =
|
|
1164
|
+
const { t: n, locale: a } = pe(), s = jt(), o = wn(), l = e, r = P(!1), i = P([]);
|
|
1159
1165
|
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 = []);
|
|
1160
1166
|
const y = ce(() => {
|
|
1161
1167
|
const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1162
1168
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1163
|
-
}),
|
|
1169
|
+
}), m = ct(l.searchForm.items), v = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ie({
|
|
1164
1170
|
[v]: 1,
|
|
1165
1171
|
[g]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1166
1172
|
total: 0
|
|
1167
|
-
}), f =
|
|
1173
|
+
}), f = P(null), u = P(null), p = P(450), b = Re(() => {
|
|
1168
1174
|
we(() => {
|
|
1169
1175
|
if (!u.value)
|
|
1170
1176
|
return;
|
|
1171
|
-
const c = u.value.getBoundingClientRect(), S = window.innerHeight, T = c.top,
|
|
1172
|
-
|
|
1177
|
+
const c = u.value.getBoundingClientRect(), S = window.innerHeight, T = c.top, R = 100, Z = S - T - R, q = 200;
|
|
1178
|
+
p.value = Math.max(Z, q);
|
|
1173
1179
|
});
|
|
1174
1180
|
}, 100), C = () => {
|
|
1175
|
-
|
|
1181
|
+
b();
|
|
1176
1182
|
}, x = () => {
|
|
1177
1183
|
if (!l.searchForm.enableCellCopy && !o.enableCellCopy)
|
|
1178
1184
|
return !1;
|
|
@@ -1180,39 +1186,39 @@ const Cn = { class: "center" }, xn = {
|
|
|
1180
1186
|
if (!d || !d.$el)
|
|
1181
1187
|
return !1;
|
|
1182
1188
|
const c = d.$el;
|
|
1183
|
-
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", z), c.removeEventListener("mousemove",
|
|
1189
|
+
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", z), c.removeEventListener("mousemove", he), c.removeEventListener("mouseup", ue), c.removeEventListener("keydown", Te), c.addEventListener("mousedown", z), c.addEventListener("mousemove", he), c.addEventListener("mouseup", ue), c.addEventListener("keydown", Te), !0;
|
|
1184
1190
|
};
|
|
1185
|
-
|
|
1186
|
-
|
|
1191
|
+
ot(() => {
|
|
1192
|
+
b(), window.addEventListener("resize", C), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", He), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1187
1193
|
x();
|
|
1188
1194
|
}, 500));
|
|
1189
|
-
}),
|
|
1195
|
+
}), Mt(() => {
|
|
1190
1196
|
(l.searchForm.enableCellCopy || o.enableCellCopy) && setTimeout(() => {
|
|
1191
1197
|
x();
|
|
1192
1198
|
}, 500);
|
|
1193
|
-
}),
|
|
1199
|
+
}), Ot(() => {
|
|
1194
1200
|
if (window.removeEventListener("resize", C), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
1195
|
-
document.removeEventListener("mouseup",
|
|
1201
|
+
document.removeEventListener("mouseup", He), document.removeEventListener("mousedown", Ne);
|
|
1196
1202
|
const d = f.value;
|
|
1197
1203
|
if (d && d.$el) {
|
|
1198
1204
|
const c = d.$el;
|
|
1199
|
-
c.removeEventListener("mousedown", z), c.removeEventListener("mousemove",
|
|
1205
|
+
c.removeEventListener("mousedown", z), c.removeEventListener("mousemove", he), c.removeEventListener("mouseup", ue), c.removeEventListener("keydown", Te);
|
|
1200
1206
|
}
|
|
1201
1207
|
}
|
|
1202
1208
|
});
|
|
1203
|
-
const E = ce(() => te.value.height ||
|
|
1209
|
+
const E = ce(() => te.value.height || p.value);
|
|
1204
1210
|
let V;
|
|
1205
|
-
async function
|
|
1211
|
+
async function Y(d) {
|
|
1206
1212
|
const { dataFormat: c } = l.tableConfig;
|
|
1207
1213
|
d[v] != 1 && (d.nextSearchAfter = V), r.value = !0;
|
|
1208
1214
|
const { code: S, data: T = {} } = await l.api(d).finally(() => {
|
|
1209
1215
|
r.value = !1, l.searchForm.selections = [];
|
|
1210
1216
|
});
|
|
1211
1217
|
if (S == 200) {
|
|
1212
|
-
let
|
|
1218
|
+
let R = [];
|
|
1213
1219
|
for (const q of o.responseDataKeys.rows)
|
|
1214
1220
|
if (T[q]) {
|
|
1215
|
-
|
|
1221
|
+
R = T[q];
|
|
1216
1222
|
break;
|
|
1217
1223
|
}
|
|
1218
1224
|
let Z = 0;
|
|
@@ -1221,7 +1227,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1221
1227
|
Z = T[q];
|
|
1222
1228
|
break;
|
|
1223
1229
|
}
|
|
1224
|
-
i.value = c ? c(
|
|
1230
|
+
i.value = c ? c(R) : R, h.total = Z, V = T.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
|
|
1225
1231
|
setTimeout(() => {
|
|
1226
1232
|
x();
|
|
1227
1233
|
}, 100);
|
|
@@ -1230,30 +1236,30 @@ const Cn = { class: "center" }, xn = {
|
|
|
1230
1236
|
}
|
|
1231
1237
|
function I(d = {}) {
|
|
1232
1238
|
const { searchData: c = () => ({}) } = l.tableConfig, S = c();
|
|
1233
|
-
|
|
1234
|
-
...
|
|
1235
|
-
...
|
|
1239
|
+
Y({
|
|
1240
|
+
...h,
|
|
1241
|
+
...Ue(l.searchForm.items),
|
|
1236
1242
|
...d,
|
|
1237
1243
|
...S
|
|
1238
1244
|
});
|
|
1239
1245
|
}
|
|
1240
|
-
function
|
|
1246
|
+
function G() {
|
|
1241
1247
|
const { reset: d } = l.tableConfig;
|
|
1242
1248
|
d && d(), l.searchForm.items.forEach((c) => {
|
|
1243
|
-
const S =
|
|
1249
|
+
const S = m.find((T) => Xe(c.key) && Xe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
|
|
1244
1250
|
S && (c.value = S.value);
|
|
1245
1251
|
}), I();
|
|
1246
1252
|
}
|
|
1247
1253
|
l.api && l.immediate && I();
|
|
1248
|
-
function
|
|
1249
|
-
return { ...
|
|
1254
|
+
function _() {
|
|
1255
|
+
return { ...h, ...Ue(l.searchForm.items) };
|
|
1250
1256
|
}
|
|
1251
|
-
const
|
|
1257
|
+
const w = () => {
|
|
1252
1258
|
const d = f.value;
|
|
1253
1259
|
d && d.clearSort();
|
|
1254
|
-
},
|
|
1260
|
+
}, k = Ie({
|
|
1255
1261
|
storage: !0
|
|
1256
|
-
}),
|
|
1262
|
+
}), j = Ie({
|
|
1257
1263
|
drag: !0,
|
|
1258
1264
|
resizable: !0,
|
|
1259
1265
|
maxFixedSize: 0
|
|
@@ -1262,8 +1268,8 @@ const Cn = { class: "center" }, xn = {
|
|
|
1262
1268
|
return {
|
|
1263
1269
|
headerAlign: "left",
|
|
1264
1270
|
align: "center",
|
|
1265
|
-
customConfig: { ...
|
|
1266
|
-
columnConfig: { ...
|
|
1271
|
+
customConfig: { ...k, ...d },
|
|
1272
|
+
columnConfig: { ...j, ...c },
|
|
1267
1273
|
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1268
1274
|
"virtual-x-config": {
|
|
1269
1275
|
enabled: !1,
|
|
@@ -1273,7 +1279,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1273
1279
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1274
1280
|
...S
|
|
1275
1281
|
};
|
|
1276
|
-
}),
|
|
1282
|
+
}), $ = Ie({
|
|
1277
1283
|
isSelecting: !1,
|
|
1278
1284
|
// 是否正在选择
|
|
1279
1285
|
startCell: null,
|
|
@@ -1292,54 +1298,54 @@ const Cn = { class: "center" }, xn = {
|
|
|
1292
1298
|
const T = f.value;
|
|
1293
1299
|
if (!T)
|
|
1294
1300
|
return null;
|
|
1295
|
-
let
|
|
1301
|
+
let R = -1;
|
|
1296
1302
|
const Z = S.getAttribute("data-rowid");
|
|
1297
1303
|
if (Z != null)
|
|
1298
|
-
|
|
1304
|
+
R = parseInt(Z, 10);
|
|
1299
1305
|
else {
|
|
1300
1306
|
const A = S.parentElement;
|
|
1301
|
-
|
|
1307
|
+
R = Array.from(A.querySelectorAll(".vxe-body--row")).indexOf(S);
|
|
1302
1308
|
}
|
|
1303
|
-
if (
|
|
1309
|
+
if (R < 0)
|
|
1304
1310
|
return null;
|
|
1305
1311
|
let q = -1;
|
|
1306
1312
|
const se = c.getAttribute("data-colid");
|
|
1307
1313
|
if (se && (q = T.getColumns().findIndex((F) => F.id === se)), q < 0) {
|
|
1308
|
-
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(c),
|
|
1309
|
-
if (
|
|
1310
|
-
const X =
|
|
1311
|
-
F < X.length && (q =
|
|
1314
|
+
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(c), K = !!c.closest(".vxe-table--fixed-left-wrapper"), J = !!c.closest(".vxe-table--fixed-right-wrapper"), B = T.getColumns();
|
|
1315
|
+
if (K) {
|
|
1316
|
+
const X = B.filter((W) => W.fixed === "left");
|
|
1317
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1312
1318
|
} else if (J) {
|
|
1313
|
-
const X =
|
|
1314
|
-
F < X.length && (q =
|
|
1319
|
+
const X = B.filter((W) => W.fixed === "right");
|
|
1320
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1315
1321
|
} else {
|
|
1316
1322
|
const X = l.searchForm.showCheckBox ? 1 : 0;
|
|
1317
|
-
q =
|
|
1323
|
+
q = B.filter((oe) => oe.fixed === "left").length + F - X;
|
|
1318
1324
|
}
|
|
1319
1325
|
}
|
|
1320
|
-
return q < 0 ? null : { rowIndex:
|
|
1326
|
+
return q < 0 ? null : { rowIndex: R, colIndex: q, cell: c };
|
|
1321
1327
|
}, z = (d) => {
|
|
1322
1328
|
const c = ye(d.target);
|
|
1323
1329
|
if (!c) {
|
|
1324
1330
|
ve();
|
|
1325
1331
|
return;
|
|
1326
1332
|
}
|
|
1327
|
-
|
|
1333
|
+
$.isSelecting = !0, $.startCell = {
|
|
1328
1334
|
rowIndex: c.rowIndex,
|
|
1329
1335
|
colIndex: c.colIndex
|
|
1330
|
-
},
|
|
1331
|
-
},
|
|
1332
|
-
if (
|
|
1336
|
+
}, $.endCell = { ...$.startCell }, Ee(), Ke();
|
|
1337
|
+
}, he = (d) => {
|
|
1338
|
+
if (!$.isSelecting)
|
|
1333
1339
|
return;
|
|
1334
1340
|
const c = ye(d.target);
|
|
1335
|
-
c && (
|
|
1341
|
+
c && ($.endCell = {
|
|
1336
1342
|
rowIndex: c.rowIndex,
|
|
1337
1343
|
colIndex: c.colIndex
|
|
1338
|
-
}, Ee(),
|
|
1344
|
+
}, Ee(), Ke());
|
|
1339
1345
|
}, ue = () => {
|
|
1340
|
-
|
|
1346
|
+
$.isSelecting = !1;
|
|
1341
1347
|
}, ve = () => {
|
|
1342
|
-
|
|
1348
|
+
$.selectedCells = [], $.startCell = null, $.endCell = null;
|
|
1343
1349
|
const d = f.value;
|
|
1344
1350
|
if (!d)
|
|
1345
1351
|
return;
|
|
@@ -1355,19 +1361,19 @@ const Cn = { class: "center" }, xn = {
|
|
|
1355
1361
|
);
|
|
1356
1362
|
});
|
|
1357
1363
|
}, Ee = () => {
|
|
1358
|
-
if (
|
|
1359
|
-
|
|
1364
|
+
if (!$.startCell || !$.endCell) {
|
|
1365
|
+
$.selectedCells = [];
|
|
1360
1366
|
return;
|
|
1361
1367
|
}
|
|
1362
|
-
const d =
|
|
1363
|
-
|
|
1364
|
-
for (let A =
|
|
1368
|
+
const d = $.startCell.rowIndex, c = $.endCell.rowIndex, S = $.startCell.colIndex, T = $.endCell.colIndex, R = Math.min(d, c), Z = Math.max(d, c), q = Math.min(S, T), se = Math.max(S, T);
|
|
1369
|
+
$.selectedCells = [];
|
|
1370
|
+
for (let A = R; A <= Z; A++)
|
|
1365
1371
|
for (let F = q; F <= se; F++)
|
|
1366
|
-
|
|
1372
|
+
$.selectedCells.push({
|
|
1367
1373
|
rowIndex: A,
|
|
1368
1374
|
colIndex: F
|
|
1369
1375
|
});
|
|
1370
|
-
},
|
|
1376
|
+
}, Ke = () => {
|
|
1371
1377
|
we(() => {
|
|
1372
1378
|
const d = f.value;
|
|
1373
1379
|
if (!d)
|
|
@@ -1375,58 +1381,58 @@ const Cn = { class: "center" }, xn = {
|
|
|
1375
1381
|
const c = d.$el;
|
|
1376
1382
|
if (c.querySelectorAll(
|
|
1377
1383
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1378
|
-
).forEach((
|
|
1379
|
-
|
|
1384
|
+
).forEach((K) => {
|
|
1385
|
+
K.classList.remove(
|
|
1380
1386
|
"cell-selected",
|
|
1381
1387
|
"cell-border-top",
|
|
1382
1388
|
"cell-border-right",
|
|
1383
1389
|
"cell-border-bottom",
|
|
1384
1390
|
"cell-border-left"
|
|
1385
1391
|
);
|
|
1386
|
-
}),
|
|
1392
|
+
}), $.selectedCells.length === 0)
|
|
1387
1393
|
return;
|
|
1388
|
-
const S = d.getColumns(), T =
|
|
1394
|
+
const S = d.getColumns(), T = $.selectedCells.map((K) => K.rowIndex), R = $.selectedCells.map((K) => K.colIndex), Z = Math.min(...T), q = Math.max(...T), se = Math.min(...R), A = Math.max(...R), F = [
|
|
1389
1395
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1390
1396
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1391
1397
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1392
1398
|
].filter(Boolean);
|
|
1393
|
-
|
|
1394
|
-
const
|
|
1395
|
-
if (!
|
|
1399
|
+
$.selectedCells.forEach(({ rowIndex: K, colIndex: J }) => {
|
|
1400
|
+
const B = S[J];
|
|
1401
|
+
if (!B)
|
|
1396
1402
|
return;
|
|
1397
|
-
const X =
|
|
1403
|
+
const X = B.fixed === "left", W = B.fixed === "right";
|
|
1398
1404
|
for (const oe of F) {
|
|
1399
|
-
const xe = oe.querySelectorAll(".vxe-body--row")[
|
|
1405
|
+
const xe = oe.querySelectorAll(".vxe-body--row")[K];
|
|
1400
1406
|
if (!xe)
|
|
1401
1407
|
continue;
|
|
1402
|
-
const
|
|
1403
|
-
let
|
|
1408
|
+
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1409
|
+
let U = null;
|
|
1404
1410
|
if (X && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1405
|
-
const le = S.filter((ae) => ae.fixed === "left").indexOf(
|
|
1406
|
-
|
|
1407
|
-
} else if (
|
|
1408
|
-
const le = S.filter((ae) => ae.fixed === "right").indexOf(
|
|
1409
|
-
|
|
1410
|
-
} else if (!X && !
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1411
|
+
const le = S.filter((ae) => ae.fixed === "left").indexOf(B);
|
|
1412
|
+
U = me[le];
|
|
1413
|
+
} else if (W && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1414
|
+
const le = S.filter((ae) => ae.fixed === "right").indexOf(B);
|
|
1415
|
+
U = me[le];
|
|
1416
|
+
} else if (!X && !W && oe.closest(".vxe-table--body-wrapper")) {
|
|
1417
|
+
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = J - le;
|
|
1418
|
+
U = me[ae + ge];
|
|
1413
1419
|
}
|
|
1414
|
-
if (
|
|
1415
|
-
|
|
1420
|
+
if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
|
|
1421
|
+
U.classList.add("cell-selected"), K === Z && U.classList.add("cell-border-top"), K === q && U.classList.add("cell-border-bottom"), J === se && U.classList.add("cell-border-left"), J === A && U.classList.add("cell-border-right");
|
|
1416
1422
|
break;
|
|
1417
1423
|
}
|
|
1418
1424
|
}
|
|
1419
1425
|
});
|
|
1420
1426
|
});
|
|
1421
1427
|
}, wt = async () => {
|
|
1422
|
-
if (
|
|
1428
|
+
if ($.selectedCells.length === 0)
|
|
1423
1429
|
return;
|
|
1424
1430
|
const d = f.value;
|
|
1425
1431
|
if (!d)
|
|
1426
1432
|
return;
|
|
1427
|
-
const c = d.$el, S = d.getColumns(), T = [...new Set(
|
|
1433
|
+
const c = d.$el, S = d.getColumns(), T = [...new Set($.selectedCells.map((A) => A.rowIndex))].sort(
|
|
1428
1434
|
(A, F) => A - F
|
|
1429
|
-
),
|
|
1435
|
+
), R = [...new Set($.selectedCells.map((A) => A.colIndex))].sort(
|
|
1430
1436
|
(A, F) => A - F
|
|
1431
1437
|
), Z = [
|
|
1432
1438
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
@@ -1435,36 +1441,36 @@ const Cn = { class: "center" }, xn = {
|
|
|
1435
1441
|
].filter(Boolean), q = [];
|
|
1436
1442
|
T.forEach((A) => {
|
|
1437
1443
|
const F = [];
|
|
1438
|
-
|
|
1439
|
-
const J = S[
|
|
1444
|
+
R.forEach((K) => {
|
|
1445
|
+
const J = S[K];
|
|
1440
1446
|
if (!J) {
|
|
1441
1447
|
F.push("");
|
|
1442
1448
|
return;
|
|
1443
1449
|
}
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1450
|
+
const B = J.fixed === "left", X = J.fixed === "right";
|
|
1451
|
+
let W = "";
|
|
1446
1452
|
for (const oe of Z) {
|
|
1447
1453
|
const xe = oe.querySelectorAll(".vxe-body--row")[A];
|
|
1448
1454
|
if (!xe)
|
|
1449
1455
|
continue;
|
|
1450
|
-
const
|
|
1451
|
-
let
|
|
1452
|
-
if (
|
|
1456
|
+
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1457
|
+
let U = null;
|
|
1458
|
+
if (B && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1453
1459
|
const le = S.filter((ae) => ae.fixed === "left").indexOf(J);
|
|
1454
|
-
|
|
1460
|
+
U = me[le];
|
|
1455
1461
|
} else if (X && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1456
1462
|
const le = S.filter((ae) => ae.fixed === "right").indexOf(J);
|
|
1457
|
-
|
|
1458
|
-
} else if (!
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1463
|
+
U = me[le];
|
|
1464
|
+
} else if (!B && !X && oe.closest(".vxe-table--body-wrapper")) {
|
|
1465
|
+
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = K - le;
|
|
1466
|
+
U = me[ae + ge];
|
|
1461
1467
|
}
|
|
1462
|
-
if (
|
|
1463
|
-
|
|
1468
|
+
if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
|
|
1469
|
+
W = U.innerText || U.textContent || "", W = W.trim(), W = W.replace(/\n/g, " ").replace(/\s+/g, " ");
|
|
1464
1470
|
break;
|
|
1465
1471
|
}
|
|
1466
1472
|
}
|
|
1467
|
-
F.push(
|
|
1473
|
+
F.push(W);
|
|
1468
1474
|
}), q.push(F.join(" "));
|
|
1469
1475
|
});
|
|
1470
1476
|
const se = q.join(`
|
|
@@ -1475,24 +1481,24 @@ const Cn = { class: "center" }, xn = {
|
|
|
1475
1481
|
console.error("复制失败:", A);
|
|
1476
1482
|
}
|
|
1477
1483
|
}, Te = (d) => {
|
|
1478
|
-
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ?
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1481
|
-
},
|
|
1484
|
+
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), wt()) : d.key === "Escape" && ve());
|
|
1485
|
+
}, He = () => {
|
|
1486
|
+
$.isSelecting = !1;
|
|
1487
|
+
}, Ne = (d) => {
|
|
1482
1488
|
const c = f.value;
|
|
1483
1489
|
if (!c || !c.$el)
|
|
1484
1490
|
return;
|
|
1485
1491
|
c.$el.contains(d.target) || ve();
|
|
1486
1492
|
}, Ct = (d) => {
|
|
1487
|
-
|
|
1493
|
+
h[v] = d, I();
|
|
1488
1494
|
}, xt = (d) => {
|
|
1489
|
-
|
|
1495
|
+
h[g] = d, h[v] = 1, I();
|
|
1490
1496
|
};
|
|
1491
|
-
function
|
|
1497
|
+
function We() {
|
|
1492
1498
|
const d = f.value.getCheckboxRecords();
|
|
1493
1499
|
l.searchForm.selections = d;
|
|
1494
1500
|
}
|
|
1495
|
-
const
|
|
1501
|
+
const Ze = (d) => {
|
|
1496
1502
|
const c = f.value;
|
|
1497
1503
|
if (c) {
|
|
1498
1504
|
c.toggleCheckboxRow(d);
|
|
@@ -1500,41 +1506,41 @@ const Cn = { class: "center" }, xn = {
|
|
|
1500
1506
|
l.searchForm.selections = S;
|
|
1501
1507
|
}
|
|
1502
1508
|
};
|
|
1503
|
-
return t({ tableRef: f, getList: I, getPrm:
|
|
1509
|
+
return t({ tableRef: f, getList: I, getPrm: _, clearSort: w, calculateTableHeight: b }), (d, c) => {
|
|
1504
1510
|
var A;
|
|
1505
|
-
const S =
|
|
1511
|
+
const S = O("el-button"), T = O("el-checkbox"), R = O("el-text"), Z = O("vxe-column"), q = O("VxeTable"), se = O("el-pagination");
|
|
1506
1512
|
return L(), ie("div", {
|
|
1507
|
-
class:
|
|
1513
|
+
class: rt({ box: e.searchForm.showShadow })
|
|
1508
1514
|
}, [
|
|
1509
|
-
e.searchForm.showSearch ? (L(),
|
|
1515
|
+
e.searchForm.showSearch ? (L(), N(bn, {
|
|
1510
1516
|
key: 0,
|
|
1511
1517
|
form: e.searchForm,
|
|
1512
|
-
onReset:
|
|
1518
|
+
onReset: G,
|
|
1513
1519
|
onConfirm: c[1] || (c[1] = (F) => I()),
|
|
1514
|
-
onVisibleChange:
|
|
1520
|
+
onVisibleChange: H(b)
|
|
1515
1521
|
}, {
|
|
1516
1522
|
btn: D(() => [
|
|
1517
1523
|
c[3] || (c[3] = re("span", { class: "mgr10" }, null, -1)),
|
|
1518
|
-
|
|
1519
|
-
|
|
1524
|
+
Q(d.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1525
|
+
M(S, {
|
|
1520
1526
|
class: "mgl10",
|
|
1521
1527
|
round: "",
|
|
1522
1528
|
onClick: c[0] || (c[0] = (F) => f.value.openCustom())
|
|
1523
1529
|
}, {
|
|
1524
1530
|
default: D(() => [
|
|
1525
|
-
|
|
1531
|
+
M(yt, { name: "Tools" })
|
|
1526
1532
|
]),
|
|
1527
1533
|
_: 1
|
|
1528
1534
|
})
|
|
1529
1535
|
]),
|
|
1530
1536
|
_: 3
|
|
1531
1537
|
}, 8, ["form", "onVisibleChange"])) : de("", !0),
|
|
1532
|
-
|
|
1538
|
+
Q(d.$slots, "table-header-left", {}, void 0, !0),
|
|
1533
1539
|
re("div", {
|
|
1534
1540
|
ref_key: "tableContentRef",
|
|
1535
1541
|
ref: u
|
|
1536
1542
|
}, [
|
|
1537
|
-
|
|
1543
|
+
M(q, fe({
|
|
1538
1544
|
id: y.value,
|
|
1539
1545
|
ref_key: "tableRef",
|
|
1540
1546
|
ref: f,
|
|
@@ -1543,39 +1549,39 @@ const Cn = { class: "center" }, xn = {
|
|
|
1543
1549
|
border: ""
|
|
1544
1550
|
}, te.value, {
|
|
1545
1551
|
height: E.value,
|
|
1546
|
-
onCheckboxChange:
|
|
1547
|
-
onCheckboxAll:
|
|
1552
|
+
onCheckboxChange: We,
|
|
1553
|
+
onCheckboxAll: We,
|
|
1548
1554
|
onSortChange: (A = te.value["sort-config"]) == null ? void 0 : A.sortChange
|
|
1549
1555
|
}), {
|
|
1550
1556
|
default: D(() => [
|
|
1551
|
-
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (L(),
|
|
1557
|
+
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (L(), N(Z, {
|
|
1552
1558
|
key: 0,
|
|
1553
1559
|
type: "checkbox",
|
|
1554
|
-
width:
|
|
1560
|
+
width: H(a) == "zh_cn" ? 80 : 150,
|
|
1555
1561
|
title: d.$t("xu-hao"),
|
|
1556
1562
|
fixed: "left"
|
|
1557
1563
|
}, {
|
|
1558
|
-
checkbox: D(({ rowIndex: F, row:
|
|
1564
|
+
checkbox: D(({ rowIndex: F, row: K, checked: J, disabled: B, indeterminate: X }) => [
|
|
1559
1565
|
re("div", Cn, [
|
|
1560
|
-
J ? (L(),
|
|
1566
|
+
J ? (L(), N(T, {
|
|
1561
1567
|
key: 0,
|
|
1562
1568
|
checked: !0,
|
|
1563
|
-
disabled:
|
|
1569
|
+
disabled: B,
|
|
1564
1570
|
size: "default",
|
|
1565
|
-
onClick: Ve((
|
|
1566
|
-
}, null, 8, ["disabled", "onClick"])) : (L(),
|
|
1571
|
+
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1572
|
+
}, null, 8, ["disabled", "onClick"])) : (L(), N(T, {
|
|
1567
1573
|
key: 1,
|
|
1568
|
-
disabled:
|
|
1574
|
+
disabled: B,
|
|
1569
1575
|
checked: !1,
|
|
1570
1576
|
size: "default",
|
|
1571
|
-
onClick: Ve((
|
|
1577
|
+
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1572
1578
|
}, null, 8, ["disabled", "onClick"])),
|
|
1573
|
-
|
|
1579
|
+
M(R, {
|
|
1574
1580
|
type: "info",
|
|
1575
1581
|
class: "mgl5"
|
|
1576
1582
|
}, {
|
|
1577
1583
|
default: D(() => [
|
|
1578
|
-
ne(
|
|
1584
|
+
ne(ee(F + 1), 1)
|
|
1579
1585
|
]),
|
|
1580
1586
|
_: 2
|
|
1581
1587
|
}, 1024)
|
|
@@ -1583,21 +1589,21 @@ const Cn = { class: "center" }, xn = {
|
|
|
1583
1589
|
]),
|
|
1584
1590
|
_: 1
|
|
1585
1591
|
}, 8, ["width", "title"])) : de("", !0),
|
|
1586
|
-
|
|
1592
|
+
Q(d.$slots, "default", {}, void 0, !0)
|
|
1587
1593
|
]),
|
|
1588
1594
|
_: 3
|
|
1589
1595
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1590
1596
|
], 512),
|
|
1591
|
-
e.searchForm.showPage ? (L(),
|
|
1597
|
+
e.searchForm.showPage ? (L(), N(se, {
|
|
1592
1598
|
key: 1,
|
|
1593
|
-
"current-page":
|
|
1594
|
-
"onUpdate:currentPage": c[2] || (c[2] = (F) =>
|
|
1599
|
+
"current-page": h[H(v)],
|
|
1600
|
+
"onUpdate:currentPage": c[2] || (c[2] = (F) => h[H(v)] = F),
|
|
1595
1601
|
class: "myPagination mgt10",
|
|
1596
1602
|
background: "",
|
|
1597
1603
|
layout: "total, sizes, prev, pager, next",
|
|
1598
|
-
total:
|
|
1599
|
-
"page-size":
|
|
1600
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1604
|
+
total: h.total,
|
|
1605
|
+
"page-size": h[H(g)],
|
|
1606
|
+
"page-sizes": e.searchForm.pageSizes || H(o).pageSizes,
|
|
1601
1607
|
onCurrentChange: Ct,
|
|
1602
1608
|
onSizeChange: xt
|
|
1603
1609
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : de("", !0)
|
|
@@ -1622,14 +1628,14 @@ const Cn = { class: "center" }, xn = {
|
|
|
1622
1628
|
on(t.fileName, t.sheetsConfig);
|
|
1623
1629
|
}
|
|
1624
1630
|
return (a, s) => {
|
|
1625
|
-
const o =
|
|
1626
|
-
return L(),
|
|
1631
|
+
const o = O("el-link");
|
|
1632
|
+
return L(), N(o, fe({
|
|
1627
1633
|
type: "primary",
|
|
1628
1634
|
underline: "never"
|
|
1629
1635
|
}, a.$attrs, { onClick: n }), {
|
|
1630
1636
|
default: D(() => [
|
|
1631
|
-
|
|
1632
|
-
ne(
|
|
1637
|
+
Q(a.$slots, "default", {}, () => [
|
|
1638
|
+
ne(ee(a.$t("xia-zai-dao-ru-mo-ban")), 1)
|
|
1633
1639
|
])
|
|
1634
1640
|
]),
|
|
1635
1641
|
_: 3
|
|
@@ -1638,16 +1644,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1638
1644
|
}
|
|
1639
1645
|
}, kn = {
|
|
1640
1646
|
mounted(e, t) {
|
|
1641
|
-
t.value &&
|
|
1647
|
+
t.value && et(e);
|
|
1642
1648
|
},
|
|
1643
1649
|
updated(e, t) {
|
|
1644
|
-
t.value ?
|
|
1650
|
+
t.value ? et(e) : tt(e);
|
|
1645
1651
|
},
|
|
1646
1652
|
beforeUnmount(e) {
|
|
1647
|
-
|
|
1653
|
+
tt(e);
|
|
1648
1654
|
}
|
|
1649
1655
|
};
|
|
1650
|
-
async function
|
|
1656
|
+
async function et(e) {
|
|
1651
1657
|
await g();
|
|
1652
1658
|
const t = e.querySelector(".el-dialog");
|
|
1653
1659
|
if (!t)
|
|
@@ -1680,44 +1686,44 @@ async function tt(e) {
|
|
|
1680
1686
|
y: 0
|
|
1681
1687
|
}
|
|
1682
1688
|
};
|
|
1683
|
-
n.addEventListener("mousedown", i), document.addEventListener("mousemove", y), document.addEventListener("mouseup",
|
|
1689
|
+
n.addEventListener("mousedown", i), document.addEventListener("mousemove", y), document.addEventListener("mouseup", m), window.addEventListener("resize", v);
|
|
1684
1690
|
function l() {
|
|
1685
1691
|
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();
|
|
1686
1692
|
}
|
|
1687
1693
|
function r() {
|
|
1688
|
-
let
|
|
1689
|
-
t.style.cssText += `position: absolute; top: calc(${
|
|
1694
|
+
let h = o.drag.y - o.mouse.y + o.dialog.y, f = o.drag.x - o.mouse.x + o.dialog.x;
|
|
1695
|
+
t.style.cssText += `position: absolute; top: calc(${h}px - ${o.dialog.marginTop}); left: ${f}px;`;
|
|
1690
1696
|
}
|
|
1691
|
-
function i(
|
|
1692
|
-
|
|
1697
|
+
function i(h) {
|
|
1698
|
+
h.button === 0 && (o.window = {
|
|
1693
1699
|
width: document.body.clientWidth,
|
|
1694
1700
|
height: document.body.clientHeight
|
|
1695
1701
|
}, o.dialog = t.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(t).marginTop, o.mouse = {
|
|
1696
|
-
x:
|
|
1697
|
-
y:
|
|
1702
|
+
x: h.clientX,
|
|
1703
|
+
y: h.clientY
|
|
1698
1704
|
}, s = !0);
|
|
1699
1705
|
}
|
|
1700
|
-
function y(
|
|
1706
|
+
function y(h) {
|
|
1701
1707
|
s && (o.drag = {
|
|
1702
|
-
x:
|
|
1703
|
-
y:
|
|
1708
|
+
x: h.clientX,
|
|
1709
|
+
y: h.clientY
|
|
1704
1710
|
}, a.style.userSelect = "none", l());
|
|
1705
1711
|
}
|
|
1706
|
-
function
|
|
1712
|
+
function m(h) {
|
|
1707
1713
|
a.style.userSelect = "auto", s = !1;
|
|
1708
1714
|
}
|
|
1709
|
-
function v(
|
|
1715
|
+
function v(h) {
|
|
1710
1716
|
}
|
|
1711
1717
|
function g() {
|
|
1712
|
-
return new Promise((
|
|
1718
|
+
return new Promise((h, f) => {
|
|
1713
1719
|
setTimeout(() => {
|
|
1714
|
-
|
|
1720
|
+
h();
|
|
1715
1721
|
}, 500);
|
|
1716
1722
|
});
|
|
1717
1723
|
}
|
|
1718
|
-
e.__mouseDown__ = i, e.__mouseUp__ =
|
|
1724
|
+
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = y, e.__sizeChange__ = v;
|
|
1719
1725
|
}
|
|
1720
|
-
function
|
|
1726
|
+
function tt(e) {
|
|
1721
1727
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1722
1728
|
}
|
|
1723
1729
|
const _n = {
|
|
@@ -1743,7 +1749,7 @@ const _n = {
|
|
|
1743
1749
|
},
|
|
1744
1750
|
emits: ["confirm"],
|
|
1745
1751
|
setup(e, { emit: t }) {
|
|
1746
|
-
const n = e, a = t, { t: s } = pe(), o =
|
|
1752
|
+
const n = e, a = t, { t: s } = pe(), o = Re(() => {
|
|
1747
1753
|
a("confirm");
|
|
1748
1754
|
}, 300);
|
|
1749
1755
|
async function l() {
|
|
@@ -1755,8 +1761,8 @@ const _n = {
|
|
|
1755
1761
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1756
1762
|
}
|
|
1757
1763
|
return (r, i) => {
|
|
1758
|
-
const y =
|
|
1759
|
-
return e.layer.type ? (L(),
|
|
1764
|
+
const y = O("el-button"), m = O("el-drawer"), v = O("el-dialog");
|
|
1765
|
+
return e.layer.type ? (L(), N(m, {
|
|
1760
1766
|
key: 0,
|
|
1761
1767
|
modelValue: e.layer.show,
|
|
1762
1768
|
"onUpdate:modelValue": i[0] || (i[0] = (g) => e.layer.show = g),
|
|
@@ -1768,23 +1774,23 @@ const _n = {
|
|
|
1768
1774
|
class: "drawer-content"
|
|
1769
1775
|
}, {
|
|
1770
1776
|
default: D(() => [
|
|
1771
|
-
|
|
1777
|
+
Q(r.$slots, "default"),
|
|
1772
1778
|
i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
|
|
1773
1779
|
e.layer.showButton ? (L(), ie("div", _n, [
|
|
1774
|
-
|
|
1775
|
-
|
|
1780
|
+
Q(r.$slots, "btn", {}, () => [
|
|
1781
|
+
M(y, { onClick: l }, {
|
|
1776
1782
|
default: D(() => [
|
|
1777
|
-
ne(
|
|
1783
|
+
ne(ee(r.$t("qu-xiao")), 1)
|
|
1778
1784
|
]),
|
|
1779
1785
|
_: 1
|
|
1780
1786
|
}),
|
|
1781
|
-
|
|
1787
|
+
M(y, {
|
|
1782
1788
|
type: "primary",
|
|
1783
1789
|
loading: e.loading,
|
|
1784
|
-
onClick:
|
|
1790
|
+
onClick: H(o)
|
|
1785
1791
|
}, {
|
|
1786
1792
|
default: D(() => [
|
|
1787
|
-
ne(
|
|
1793
|
+
ne(ee(r.$t("ti-jiao")), 1)
|
|
1788
1794
|
]),
|
|
1789
1795
|
_: 1
|
|
1790
1796
|
}, 8, ["loading", "onClick"])
|
|
@@ -1793,35 +1799,35 @@ const _n = {
|
|
|
1793
1799
|
]),
|
|
1794
1800
|
_: 3
|
|
1795
1801
|
}, 8, ["modelValue", "size", "title"])) : Vt((L(), ie("div", $n, [
|
|
1796
|
-
|
|
1802
|
+
M(v, {
|
|
1797
1803
|
"close-on-click-modal": !1,
|
|
1798
1804
|
modelValue: e.layer.show,
|
|
1799
1805
|
"onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
|
|
1800
1806
|
title: e.layer.title,
|
|
1801
1807
|
width: e.layer.width || 500,
|
|
1802
1808
|
center: ""
|
|
1803
|
-
},
|
|
1809
|
+
}, lt({
|
|
1804
1810
|
default: D(() => [
|
|
1805
|
-
|
|
1811
|
+
Q(r.$slots, "default")
|
|
1806
1812
|
]),
|
|
1807
1813
|
_: 2
|
|
1808
1814
|
}, [
|
|
1809
1815
|
e.layer.showButton ? {
|
|
1810
1816
|
name: "footer",
|
|
1811
1817
|
fn: D(() => [
|
|
1812
|
-
|
|
1813
|
-
|
|
1818
|
+
Q(r.$slots, "btn", {}, () => [
|
|
1819
|
+
M(y, { onClick: l }, {
|
|
1814
1820
|
default: D(() => [
|
|
1815
|
-
ne(
|
|
1821
|
+
ne(ee(r.$t("qu-xiao")), 1)
|
|
1816
1822
|
]),
|
|
1817
1823
|
_: 1
|
|
1818
1824
|
}),
|
|
1819
|
-
|
|
1825
|
+
M(y, {
|
|
1820
1826
|
type: "primary",
|
|
1821
|
-
onClick:
|
|
1827
|
+
onClick: H(o)
|
|
1822
1828
|
}, {
|
|
1823
1829
|
default: D(() => [
|
|
1824
|
-
ne(
|
|
1830
|
+
ne(ee(r.$t("ti-jiao")), 1)
|
|
1825
1831
|
]),
|
|
1826
1832
|
_: 1
|
|
1827
1833
|
}, 8, ["onClick"])
|
|
@@ -1831,7 +1837,7 @@ const _n = {
|
|
|
1831
1837
|
} : void 0
|
|
1832
1838
|
]), 1032, ["modelValue", "title", "width"])
|
|
1833
1839
|
])), [
|
|
1834
|
-
[
|
|
1840
|
+
[H(kn), e.layer.show]
|
|
1835
1841
|
]);
|
|
1836
1842
|
};
|
|
1837
1843
|
}
|
|
@@ -1846,12 +1852,12 @@ function oo(e, t = {}) {
|
|
|
1846
1852
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1847
1853
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1848
1854
|
}[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1849
|
-
return o ? function(y,
|
|
1855
|
+
return o ? function(y, m, v) {
|
|
1850
1856
|
if (r) {
|
|
1851
|
-
s.test(
|
|
1857
|
+
s.test(m) ? v() : v(new Error(i));
|
|
1852
1858
|
return;
|
|
1853
1859
|
}
|
|
1854
|
-
|
|
1860
|
+
m && !s.test(m) ? v(new Error(i)) : v();
|
|
1855
1861
|
} : s.test(l);
|
|
1856
1862
|
}
|
|
1857
1863
|
class lo {
|
|
@@ -2067,33 +2073,33 @@ function ao(e, t = {}) {
|
|
|
2067
2073
|
log: !1,
|
|
2068
2074
|
params: null,
|
|
2069
2075
|
format: null
|
|
2070
|
-
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, y =
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2073
|
-
const { code: u, data:
|
|
2076
|
+
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, y = P([]), m = P(!1), v = (g) => {
|
|
2077
|
+
const h = g || l;
|
|
2078
|
+
m.value = !0, e(h).then((f) => {
|
|
2079
|
+
const { code: u, data: p, msg: b } = f;
|
|
2074
2080
|
if (r) {
|
|
2075
|
-
const { records: C, rows: x } =
|
|
2076
|
-
y.value =
|
|
2081
|
+
const { records: C, rows: x } = p || {}, E = C || x ? C || x : p;
|
|
2082
|
+
y.value = Me(E, i), r(f);
|
|
2077
2083
|
}
|
|
2078
|
-
if (
|
|
2079
|
-
if (
|
|
2080
|
-
const { records: C, rows: x, total: E = 0 } =
|
|
2081
|
-
|
|
2084
|
+
if (p) {
|
|
2085
|
+
if (p.records != null || p.rows != null) {
|
|
2086
|
+
const { records: C, rows: x, total: E = 0 } = p || {};
|
|
2087
|
+
h && h.total != null && (l.total = parseInt(E)), y.value = Me(C || x || [], i);
|
|
2082
2088
|
} else
|
|
2083
|
-
y.value =
|
|
2089
|
+
y.value = Me(p, i);
|
|
2084
2090
|
o && console.log("useRequest-res", y.value);
|
|
2085
2091
|
}
|
|
2086
2092
|
}).catch((f) => {
|
|
2087
2093
|
r && (console.log("useRequestErr", f), r({ code: 500 }));
|
|
2088
2094
|
}).finally(() => {
|
|
2089
|
-
|
|
2095
|
+
m.value = !1;
|
|
2090
2096
|
});
|
|
2091
2097
|
};
|
|
2092
|
-
return s || v(), [
|
|
2098
|
+
return s || v(), [m, y, v];
|
|
2093
2099
|
}
|
|
2094
2100
|
function so(e) {
|
|
2095
|
-
const t =
|
|
2096
|
-
return
|
|
2101
|
+
const t = P(e), n = P(""), a = P("");
|
|
2102
|
+
return Pe(t, (s) => {
|
|
2097
2103
|
const o = s || ["", ""];
|
|
2098
2104
|
n.value = o[0], a.value = o[1];
|
|
2099
2105
|
}), [t, n, a];
|
|
@@ -2101,7 +2107,7 @@ function so(e) {
|
|
|
2101
2107
|
function ro(e) {
|
|
2102
2108
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2103
2109
|
}
|
|
2104
|
-
function
|
|
2110
|
+
function Me(e, t) {
|
|
2105
2111
|
if (!t)
|
|
2106
2112
|
return e;
|
|
2107
2113
|
if (e instanceof Array)
|
|
@@ -2113,8 +2119,8 @@ function Oe(e, t) {
|
|
|
2113
2119
|
return t.forEach((a) => n[a] = e[a]), n;
|
|
2114
2120
|
}
|
|
2115
2121
|
function io(e, t = []) {
|
|
2116
|
-
const { locale: n } = pe(), a =
|
|
2117
|
-
return
|
|
2122
|
+
const { locale: n } = pe(), a = P(e());
|
|
2123
|
+
return Pe(
|
|
2118
2124
|
[n, ...t],
|
|
2119
2125
|
() => {
|
|
2120
2126
|
a.value = e();
|
|
@@ -2125,20 +2131,20 @@ function io(e, t = []) {
|
|
|
2125
2131
|
function co(e, t = "zh_cn", n = "en_us") {
|
|
2126
2132
|
if (!e)
|
|
2127
2133
|
return "-";
|
|
2128
|
-
const a = { en_us: n, zh_cn: t }, o =
|
|
2134
|
+
const a = { en_us: n, zh_cn: t }, o = Ye().global.locale.value;
|
|
2129
2135
|
return e[a[o]] || e[t] || "-";
|
|
2130
2136
|
}
|
|
2131
2137
|
function uo(e, t) {
|
|
2132
2138
|
let n = Pt;
|
|
2133
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2139
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState), bt(t, n);
|
|
2134
2140
|
}
|
|
2135
2141
|
function fo(e, t) {
|
|
2136
2142
|
let n = Rt;
|
|
2137
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2143
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters), bt(t, n);
|
|
2138
2144
|
}
|
|
2139
2145
|
function ho(e, t) {
|
|
2140
2146
|
let n = Bt;
|
|
2141
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2147
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapActions), Sn(t, n);
|
|
2142
2148
|
}
|
|
2143
2149
|
function bt(e, t) {
|
|
2144
2150
|
const n = ut(), a = t(e), s = {};
|
|
@@ -2166,20 +2172,20 @@ function mo() {
|
|
|
2166
2172
|
const a = t.row[t.column.field];
|
|
2167
2173
|
if (e.type == "tag") {
|
|
2168
2174
|
let s;
|
|
2169
|
-
return O(
|
|
2175
|
+
return M(O("el-text"), {
|
|
2170
2176
|
type: e.enum.getTag(a)
|
|
2171
2177
|
}, Fe(s = e.enum.getName(a)) ? s : {
|
|
2172
2178
|
default: () => [s]
|
|
2173
2179
|
});
|
|
2174
2180
|
}
|
|
2175
|
-
return O(
|
|
2181
|
+
return M(O("el-text"), null, Fe(n = e.enum.getName(a)) ? n : {
|
|
2176
2182
|
default: () => [n]
|
|
2177
2183
|
});
|
|
2178
2184
|
}
|
|
2179
2185
|
}), ke.renderer.add("InputNumber", {
|
|
2180
2186
|
// 默认显示模板
|
|
2181
2187
|
renderTableDefault(e, t) {
|
|
2182
|
-
return
|
|
2188
|
+
return M(It, fe({
|
|
2183
2189
|
modelValue: t.row[t.column.field],
|
|
2184
2190
|
"onUpdate:modelValue": (n) => t.row[t.column.field] = n
|
|
2185
2191
|
}, e.props, {
|
|
@@ -2194,7 +2200,7 @@ function mo() {
|
|
|
2194
2200
|
locale: n
|
|
2195
2201
|
} = pe();
|
|
2196
2202
|
let a = n.value == "zh_cn";
|
|
2197
|
-
return
|
|
2203
|
+
return M(Ft, {
|
|
2198
2204
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2199
2205
|
}, {
|
|
2200
2206
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2218,25 +2224,25 @@ function mo() {
|
|
|
2218
2224
|
to: o,
|
|
2219
2225
|
openType: l = "system"
|
|
2220
2226
|
} = e, r = t.row[n];
|
|
2221
|
-
function i(y,
|
|
2227
|
+
function i(y, m) {
|
|
2222
2228
|
l == "blank" ? window.open(y) : a.push({
|
|
2223
2229
|
path: y,
|
|
2224
2230
|
query: {
|
|
2225
|
-
[n]:
|
|
2231
|
+
[n]: m
|
|
2226
2232
|
}
|
|
2227
2233
|
});
|
|
2228
2234
|
}
|
|
2229
2235
|
if (s) {
|
|
2230
2236
|
const y = (r == null ? void 0 : r.split(",")) || [];
|
|
2231
|
-
return y.map((
|
|
2237
|
+
return y.map((m, v) => M("span", null, [M(Ge, {
|
|
2232
2238
|
underline: "never",
|
|
2233
2239
|
type: "primary",
|
|
2234
|
-
onclick: () => i(l == "stystem" ? o :
|
|
2235
|
-
}, Fe(
|
|
2236
|
-
default: () => [
|
|
2240
|
+
onclick: () => i(l == "stystem" ? o : m, m)
|
|
2241
|
+
}, Fe(m) ? m : {
|
|
2242
|
+
default: () => [m]
|
|
2237
2243
|
}), v < y.length - 1 ? "," : ""]));
|
|
2238
2244
|
}
|
|
2239
|
-
return
|
|
2245
|
+
return M(Ge, {
|
|
2240
2246
|
underline: "never",
|
|
2241
2247
|
type: "primary",
|
|
2242
2248
|
onclick: () => i(l == "stystem" ? o : r, r)
|
|
@@ -2257,7 +2263,7 @@ export {
|
|
|
2257
2263
|
eo as ListPage,
|
|
2258
2264
|
lo as OnePortalCasSDK,
|
|
2259
2265
|
bn as SearchBar,
|
|
2260
|
-
|
|
2266
|
+
Qe as StatusMap,
|
|
2261
2267
|
Pn as _toRaw,
|
|
2262
2268
|
ro as _typeOf,
|
|
2263
2269
|
Bn as arrToStatusMap,
|
|
@@ -2266,9 +2272,9 @@ export {
|
|
|
2266
2272
|
oo as creatValidator,
|
|
2267
2273
|
Wn as createImportFields,
|
|
2268
2274
|
Nn as createListPageId,
|
|
2269
|
-
|
|
2275
|
+
Ae as en_us,
|
|
2270
2276
|
jn as exportExcel,
|
|
2271
|
-
|
|
2277
|
+
Ye as getI18n,
|
|
2272
2278
|
Ce as getI18nT,
|
|
2273
2279
|
wn as getListPageConfig,
|
|
2274
2280
|
co as getLocaleValue,
|
|
@@ -2289,5 +2295,5 @@ export {
|
|
|
2289
2295
|
io as useI18nReState,
|
|
2290
2296
|
ao as useRequest,
|
|
2291
2297
|
uo as useState,
|
|
2292
|
-
|
|
2298
|
+
qe as zh_cn
|
|
2293
2299
|
};
|