joy-admin-components 0.2.43 → 0.2.44
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 +471 -467
- 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 Q, renderSlot as ee, 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: (
|
|
754
|
+
onClick: (he) => p(z)
|
|
755
755
|
}, Q(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
|
-
ee(
|
|
763
|
-
|
|
762
|
+
ee(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(Q(
|
|
770
|
+
ne(Q(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 ? ee(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(Q(
|
|
797
|
+
ne(Q(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,17 +833,17 @@ 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(() => [
|
|
@@ -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,9 +887,9 @@ 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",
|
|
@@ -912,7 +912,7 @@ const fn = ["accept"], hn = {
|
|
|
912
912
|
};
|
|
913
913
|
}
|
|
914
914
|
}, Jn = /* @__PURE__ */ Se(hn, [["__scopeId", "data-v-cf92fafe"]]);
|
|
915
|
-
function
|
|
915
|
+
function Ue(e) {
|
|
916
916
|
let t = {};
|
|
917
917
|
return e.forEach((n) => {
|
|
918
918
|
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
@@ -922,8 +922,8 @@ function Pe(e) {
|
|
|
922
922
|
else if (s == "date")
|
|
923
923
|
if (r.includes("range")) {
|
|
924
924
|
const [i, y] = a;
|
|
925
|
-
let [
|
|
926
|
-
|
|
925
|
+
let [m, v] = l || [];
|
|
926
|
+
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
927
|
} else
|
|
928
928
|
t[a] = l;
|
|
929
929
|
else
|
|
@@ -940,84 +940,88 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
940
940
|
},
|
|
941
941
|
emits: ["confirm", "reset", "visibleChange"],
|
|
942
942
|
setup(e, { expose: t, emit: n }) {
|
|
943
|
-
const a = e, s = n, o =
|
|
944
|
-
|
|
943
|
+
const a = e, s = n, o = P(!0), l = P(null), { t: r } = pe(), i = {
|
|
944
|
+
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
945
|
+
daterange: "YYYY-MM-DD",
|
|
946
|
+
month: "YYYY-MM"
|
|
947
|
+
}, y = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
|
|
948
|
+
function m() {
|
|
945
949
|
s("confirm");
|
|
946
950
|
}
|
|
947
|
-
function
|
|
948
|
-
|
|
951
|
+
function v(b) {
|
|
952
|
+
b.option.onClear && b.option.onClear(), s("confirm");
|
|
949
953
|
}
|
|
950
|
-
function
|
|
954
|
+
function g() {
|
|
951
955
|
s("reset");
|
|
952
956
|
}
|
|
953
|
-
function
|
|
957
|
+
function h() {
|
|
954
958
|
s("confirm");
|
|
955
959
|
}
|
|
956
|
-
function
|
|
957
|
-
return
|
|
960
|
+
function f() {
|
|
961
|
+
return Ue(a.form.items);
|
|
958
962
|
}
|
|
959
|
-
const
|
|
960
|
-
function
|
|
961
|
-
a.form.items.forEach((
|
|
962
|
-
const
|
|
963
|
-
|
|
963
|
+
const u = ct(a.form.items);
|
|
964
|
+
function p() {
|
|
965
|
+
a.form.items.forEach((b) => {
|
|
966
|
+
const C = u.find((x) => x.key == b.key);
|
|
967
|
+
C && (b.value = C.value);
|
|
964
968
|
});
|
|
965
969
|
}
|
|
966
|
-
return t({ getPrm:
|
|
967
|
-
const
|
|
970
|
+
return t({ getPrm: f, reset: p }), (b, C) => {
|
|
971
|
+
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
972
|
return L(), ie("div", {
|
|
969
973
|
class: "searchBar-container mgt10 mgb10",
|
|
970
|
-
onKeydown: Dt(
|
|
974
|
+
onKeydown: Dt(m, ["enter"])
|
|
971
975
|
}, [
|
|
972
976
|
re("div", {
|
|
973
977
|
class: "searchBar",
|
|
974
978
|
style: zt({ height: o.value ? "auto" : "42px" })
|
|
975
979
|
}, [
|
|
976
|
-
|
|
980
|
+
M(Y, {
|
|
977
981
|
inline: "",
|
|
978
982
|
model: e.form.data
|
|
979
983
|
}, {
|
|
980
984
|
default: D(() => [
|
|
981
|
-
(L(!0), ie(
|
|
982
|
-
key:
|
|
985
|
+
(L(!0), ie(Oe, null, at(e.form.items.filter((_) => !_.hidden), (_) => (L(), ie(Oe, {
|
|
986
|
+
key: _.key
|
|
983
987
|
}, [
|
|
984
|
-
|
|
988
|
+
_.type == "br" ? (L(), ie("br", mn)) : (L(), N(V, {
|
|
985
989
|
key: 1,
|
|
986
|
-
label:
|
|
990
|
+
label: _.name
|
|
987
991
|
}, {
|
|
988
992
|
default: D(() => {
|
|
989
|
-
var
|
|
993
|
+
var w, k;
|
|
990
994
|
return [
|
|
991
|
-
|
|
995
|
+
_.type === "input" ? (L(), N(x, {
|
|
992
996
|
key: 0,
|
|
993
|
-
modelValue:
|
|
994
|
-
"onUpdate:modelValue": (
|
|
995
|
-
class:
|
|
996
|
-
placeholder:
|
|
997
|
+
modelValue: _.value,
|
|
998
|
+
"onUpdate:modelValue": (j) => _.value = j,
|
|
999
|
+
class: rt(((w = _.option) == null ? void 0 : w.class) || "w150"),
|
|
1000
|
+
placeholder: b.$t("qing-shu-ru"),
|
|
997
1001
|
clearable: ""
|
|
998
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) :
|
|
999
|
-
|
|
1002
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (L(), N(st(_.render), { key: 1 })) : de("", !0),
|
|
1003
|
+
_.type === "select" ? (L(), N(cn, fe({
|
|
1000
1004
|
key: 2,
|
|
1001
|
-
class: ((
|
|
1002
|
-
modelValue:
|
|
1003
|
-
"onUpdate:modelValue": (
|
|
1004
|
-
}, { ref_for: !0 },
|
|
1005
|
-
onChange:
|
|
1006
|
-
onClear: (
|
|
1005
|
+
class: ((k = _.option) == null ? void 0 : k.class) || "w150",
|
|
1006
|
+
modelValue: _.value,
|
|
1007
|
+
"onUpdate:modelValue": (j) => _.value = j
|
|
1008
|
+
}, { ref_for: !0 }, _.option, {
|
|
1009
|
+
onChange: m,
|
|
1010
|
+
onClear: (j) => v(_)
|
|
1007
1011
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : de("", !0),
|
|
1008
|
-
|
|
1012
|
+
_.type === "date" ? (L(), N(E, fe({
|
|
1009
1013
|
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,
|
|
1014
|
+
class: { datetimerange: "w300", daterange: "w200" }[_.dateType] || "w100",
|
|
1015
|
+
modelValue: _.value,
|
|
1016
|
+
"onUpdate:modelValue": (j) => _.value = j,
|
|
1017
|
+
"value-format": i[_.dateType] || "YYYY-MM-DD",
|
|
1018
|
+
type: _.dateType || "date",
|
|
1019
|
+
onFocus: (j) => l.value = _,
|
|
1020
|
+
onChange: (j) => h(),
|
|
1021
|
+
placeholder: b.$t("qing-xuan-ze"),
|
|
1022
|
+
"start-placeholder": b.$t("kai-shi-shi-jian"),
|
|
1023
|
+
"end-placeholder": b.$t("jie-shu-shi-jian")
|
|
1024
|
+
}, { ref_for: !0 }, _.option), null, 16, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : de("", !0)
|
|
1021
1025
|
];
|
|
1022
1026
|
}),
|
|
1023
1027
|
_: 2
|
|
@@ -1029,49 +1033,49 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1029
1033
|
], 4),
|
|
1030
1034
|
re("div", gn, [
|
|
1031
1035
|
re("div", pn, [
|
|
1032
|
-
ee(
|
|
1036
|
+
ee(b.$slots, "table-header-left", {}, void 0, !0)
|
|
1033
1037
|
]),
|
|
1034
1038
|
re("div", yn, [
|
|
1035
|
-
|
|
1039
|
+
M(I, {
|
|
1036
1040
|
underline: "never",
|
|
1037
1041
|
class: "mgr10",
|
|
1038
|
-
onClick:
|
|
1042
|
+
onClick: C[0] || (C[0] = () => {
|
|
1039
1043
|
s("visibleChange", !o.value), o.value = !o.value;
|
|
1040
1044
|
})
|
|
1041
1045
|
}, {
|
|
1042
1046
|
default: D(() => [
|
|
1043
|
-
|
|
1047
|
+
M(yt, {
|
|
1044
1048
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1045
1049
|
}, null, 8, ["name"]),
|
|
1046
|
-
ne(" " + Q(
|
|
1050
|
+
ne(" " + Q(y.value), 1)
|
|
1047
1051
|
]),
|
|
1048
1052
|
_: 1
|
|
1049
1053
|
}),
|
|
1050
|
-
|
|
1054
|
+
M(G, {
|
|
1051
1055
|
type: "primary",
|
|
1052
|
-
onClick:
|
|
1056
|
+
onClick: m
|
|
1053
1057
|
}, {
|
|
1054
1058
|
default: D(() => [
|
|
1055
|
-
ne(Q(
|
|
1059
|
+
ne(Q(b.$t("shai-xuan")), 1)
|
|
1056
1060
|
]),
|
|
1057
1061
|
_: 1
|
|
1058
1062
|
}),
|
|
1059
|
-
|
|
1063
|
+
M(G, {
|
|
1060
1064
|
type: "primary",
|
|
1061
|
-
onClick:
|
|
1065
|
+
onClick: g
|
|
1062
1066
|
}, {
|
|
1063
1067
|
default: D(() => [
|
|
1064
|
-
ne(Q(
|
|
1068
|
+
ne(Q(b.$t("chong-zhi")), 1)
|
|
1065
1069
|
]),
|
|
1066
1070
|
_: 1
|
|
1067
1071
|
}),
|
|
1068
|
-
ee(
|
|
1072
|
+
ee(b.$slots, "btn", {}, void 0, !0)
|
|
1069
1073
|
])
|
|
1070
1074
|
])
|
|
1071
1075
|
], 32);
|
|
1072
1076
|
};
|
|
1073
1077
|
}
|
|
1074
|
-
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-
|
|
1078
|
+
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]), vt = {
|
|
1075
1079
|
// 分页参数名
|
|
1076
1080
|
pageNoKey: "pageNo",
|
|
1077
1081
|
// 页码参数名
|
|
@@ -1155,24 +1159,24 @@ const Cn = { class: "center" }, xn = {
|
|
|
1155
1159
|
}
|
|
1156
1160
|
},
|
|
1157
1161
|
setup(e, { expose: t }) {
|
|
1158
|
-
const { t: n, locale: a } = pe(), s = jt(), o = wn(), l = e, r =
|
|
1162
|
+
const { t: n, locale: a } = pe(), s = jt(), o = wn(), l = e, r = P(!1), i = P([]);
|
|
1159
1163
|
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
1164
|
const y = ce(() => {
|
|
1161
1165
|
const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1162
1166
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1163
|
-
}),
|
|
1167
|
+
}), m = ct(l.searchForm.items), v = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ie({
|
|
1164
1168
|
[v]: 1,
|
|
1165
1169
|
[g]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1166
1170
|
total: 0
|
|
1167
|
-
}), f =
|
|
1171
|
+
}), f = P(null), u = P(null), p = P(450), b = Re(() => {
|
|
1168
1172
|
we(() => {
|
|
1169
1173
|
if (!u.value)
|
|
1170
1174
|
return;
|
|
1171
|
-
const c = u.value.getBoundingClientRect(), S = window.innerHeight, T = c.top,
|
|
1172
|
-
|
|
1175
|
+
const c = u.value.getBoundingClientRect(), S = window.innerHeight, T = c.top, R = 100, Z = S - T - R, q = 200;
|
|
1176
|
+
p.value = Math.max(Z, q);
|
|
1173
1177
|
});
|
|
1174
1178
|
}, 100), C = () => {
|
|
1175
|
-
|
|
1179
|
+
b();
|
|
1176
1180
|
}, x = () => {
|
|
1177
1181
|
if (!l.searchForm.enableCellCopy && !o.enableCellCopy)
|
|
1178
1182
|
return !1;
|
|
@@ -1180,39 +1184,39 @@ const Cn = { class: "center" }, xn = {
|
|
|
1180
1184
|
if (!d || !d.$el)
|
|
1181
1185
|
return !1;
|
|
1182
1186
|
const c = d.$el;
|
|
1183
|
-
return c.classList.add("cell-copy-enabled"), c.setAttribute("tabindex", "-1"), c.removeEventListener("mousedown", z), c.removeEventListener("mousemove",
|
|
1187
|
+
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
1188
|
};
|
|
1185
|
-
|
|
1186
|
-
|
|
1189
|
+
ot(() => {
|
|
1190
|
+
b(), window.addEventListener("resize", C), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", He), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1187
1191
|
x();
|
|
1188
1192
|
}, 500));
|
|
1189
|
-
}),
|
|
1193
|
+
}), Mt(() => {
|
|
1190
1194
|
(l.searchForm.enableCellCopy || o.enableCellCopy) && setTimeout(() => {
|
|
1191
1195
|
x();
|
|
1192
1196
|
}, 500);
|
|
1193
|
-
}),
|
|
1197
|
+
}), Ot(() => {
|
|
1194
1198
|
if (window.removeEventListener("resize", C), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
1195
|
-
document.removeEventListener("mouseup",
|
|
1199
|
+
document.removeEventListener("mouseup", He), document.removeEventListener("mousedown", Ne);
|
|
1196
1200
|
const d = f.value;
|
|
1197
1201
|
if (d && d.$el) {
|
|
1198
1202
|
const c = d.$el;
|
|
1199
|
-
c.removeEventListener("mousedown", z), c.removeEventListener("mousemove",
|
|
1203
|
+
c.removeEventListener("mousedown", z), c.removeEventListener("mousemove", he), c.removeEventListener("mouseup", ue), c.removeEventListener("keydown", Te);
|
|
1200
1204
|
}
|
|
1201
1205
|
}
|
|
1202
1206
|
});
|
|
1203
|
-
const E = ce(() => te.value.height ||
|
|
1207
|
+
const E = ce(() => te.value.height || p.value);
|
|
1204
1208
|
let V;
|
|
1205
|
-
async function
|
|
1209
|
+
async function Y(d) {
|
|
1206
1210
|
const { dataFormat: c } = l.tableConfig;
|
|
1207
1211
|
d[v] != 1 && (d.nextSearchAfter = V), r.value = !0;
|
|
1208
1212
|
const { code: S, data: T = {} } = await l.api(d).finally(() => {
|
|
1209
1213
|
r.value = !1, l.searchForm.selections = [];
|
|
1210
1214
|
});
|
|
1211
1215
|
if (S == 200) {
|
|
1212
|
-
let
|
|
1216
|
+
let R = [];
|
|
1213
1217
|
for (const q of o.responseDataKeys.rows)
|
|
1214
1218
|
if (T[q]) {
|
|
1215
|
-
|
|
1219
|
+
R = T[q];
|
|
1216
1220
|
break;
|
|
1217
1221
|
}
|
|
1218
1222
|
let Z = 0;
|
|
@@ -1221,7 +1225,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1221
1225
|
Z = T[q];
|
|
1222
1226
|
break;
|
|
1223
1227
|
}
|
|
1224
|
-
i.value = c ? c(
|
|
1228
|
+
i.value = c ? c(R) : R, h.total = Z, V = T.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
|
|
1225
1229
|
setTimeout(() => {
|
|
1226
1230
|
x();
|
|
1227
1231
|
}, 100);
|
|
@@ -1230,30 +1234,30 @@ const Cn = { class: "center" }, xn = {
|
|
|
1230
1234
|
}
|
|
1231
1235
|
function I(d = {}) {
|
|
1232
1236
|
const { searchData: c = () => ({}) } = l.tableConfig, S = c();
|
|
1233
|
-
|
|
1234
|
-
...
|
|
1235
|
-
...
|
|
1237
|
+
Y({
|
|
1238
|
+
...h,
|
|
1239
|
+
...Ue(l.searchForm.items),
|
|
1236
1240
|
...d,
|
|
1237
1241
|
...S
|
|
1238
1242
|
});
|
|
1239
1243
|
}
|
|
1240
|
-
function
|
|
1244
|
+
function G() {
|
|
1241
1245
|
const { reset: d } = l.tableConfig;
|
|
1242
1246
|
d && d(), l.searchForm.items.forEach((c) => {
|
|
1243
|
-
const S =
|
|
1247
|
+
const S = m.find((T) => Xe(c.key) && Xe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
|
|
1244
1248
|
S && (c.value = S.value);
|
|
1245
1249
|
}), I();
|
|
1246
1250
|
}
|
|
1247
1251
|
l.api && l.immediate && I();
|
|
1248
|
-
function
|
|
1249
|
-
return { ...
|
|
1252
|
+
function _() {
|
|
1253
|
+
return { ...h, ...Ue(l.searchForm.items) };
|
|
1250
1254
|
}
|
|
1251
|
-
const
|
|
1255
|
+
const w = () => {
|
|
1252
1256
|
const d = f.value;
|
|
1253
1257
|
d && d.clearSort();
|
|
1254
|
-
},
|
|
1258
|
+
}, k = Ie({
|
|
1255
1259
|
storage: !0
|
|
1256
|
-
}),
|
|
1260
|
+
}), j = Ie({
|
|
1257
1261
|
drag: !0,
|
|
1258
1262
|
resizable: !0,
|
|
1259
1263
|
maxFixedSize: 0
|
|
@@ -1262,8 +1266,8 @@ const Cn = { class: "center" }, xn = {
|
|
|
1262
1266
|
return {
|
|
1263
1267
|
headerAlign: "left",
|
|
1264
1268
|
align: "center",
|
|
1265
|
-
customConfig: { ...
|
|
1266
|
-
columnConfig: { ...
|
|
1269
|
+
customConfig: { ...k, ...d },
|
|
1270
|
+
columnConfig: { ...j, ...c },
|
|
1267
1271
|
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1268
1272
|
"virtual-x-config": {
|
|
1269
1273
|
enabled: !1,
|
|
@@ -1273,7 +1277,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1273
1277
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1274
1278
|
...S
|
|
1275
1279
|
};
|
|
1276
|
-
}),
|
|
1280
|
+
}), $ = Ie({
|
|
1277
1281
|
isSelecting: !1,
|
|
1278
1282
|
// 是否正在选择
|
|
1279
1283
|
startCell: null,
|
|
@@ -1292,54 +1296,54 @@ const Cn = { class: "center" }, xn = {
|
|
|
1292
1296
|
const T = f.value;
|
|
1293
1297
|
if (!T)
|
|
1294
1298
|
return null;
|
|
1295
|
-
let
|
|
1299
|
+
let R = -1;
|
|
1296
1300
|
const Z = S.getAttribute("data-rowid");
|
|
1297
1301
|
if (Z != null)
|
|
1298
|
-
|
|
1302
|
+
R = parseInt(Z, 10);
|
|
1299
1303
|
else {
|
|
1300
1304
|
const A = S.parentElement;
|
|
1301
|
-
|
|
1305
|
+
R = Array.from(A.querySelectorAll(".vxe-body--row")).indexOf(S);
|
|
1302
1306
|
}
|
|
1303
|
-
if (
|
|
1307
|
+
if (R < 0)
|
|
1304
1308
|
return null;
|
|
1305
1309
|
let q = -1;
|
|
1306
1310
|
const se = c.getAttribute("data-colid");
|
|
1307
1311
|
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 =
|
|
1312
|
+
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();
|
|
1313
|
+
if (K) {
|
|
1314
|
+
const X = B.filter((W) => W.fixed === "left");
|
|
1315
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1312
1316
|
} else if (J) {
|
|
1313
|
-
const X =
|
|
1314
|
-
F < X.length && (q =
|
|
1317
|
+
const X = B.filter((W) => W.fixed === "right");
|
|
1318
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1315
1319
|
} else {
|
|
1316
1320
|
const X = l.searchForm.showCheckBox ? 1 : 0;
|
|
1317
|
-
q =
|
|
1321
|
+
q = B.filter((oe) => oe.fixed === "left").length + F - X;
|
|
1318
1322
|
}
|
|
1319
1323
|
}
|
|
1320
|
-
return q < 0 ? null : { rowIndex:
|
|
1324
|
+
return q < 0 ? null : { rowIndex: R, colIndex: q, cell: c };
|
|
1321
1325
|
}, z = (d) => {
|
|
1322
1326
|
const c = ye(d.target);
|
|
1323
1327
|
if (!c) {
|
|
1324
1328
|
ve();
|
|
1325
1329
|
return;
|
|
1326
1330
|
}
|
|
1327
|
-
|
|
1331
|
+
$.isSelecting = !0, $.startCell = {
|
|
1328
1332
|
rowIndex: c.rowIndex,
|
|
1329
1333
|
colIndex: c.colIndex
|
|
1330
|
-
},
|
|
1331
|
-
},
|
|
1332
|
-
if (
|
|
1334
|
+
}, $.endCell = { ...$.startCell }, Ee(), Ke();
|
|
1335
|
+
}, he = (d) => {
|
|
1336
|
+
if (!$.isSelecting)
|
|
1333
1337
|
return;
|
|
1334
1338
|
const c = ye(d.target);
|
|
1335
|
-
c && (
|
|
1339
|
+
c && ($.endCell = {
|
|
1336
1340
|
rowIndex: c.rowIndex,
|
|
1337
1341
|
colIndex: c.colIndex
|
|
1338
|
-
}, Ee(),
|
|
1342
|
+
}, Ee(), Ke());
|
|
1339
1343
|
}, ue = () => {
|
|
1340
|
-
|
|
1344
|
+
$.isSelecting = !1;
|
|
1341
1345
|
}, ve = () => {
|
|
1342
|
-
|
|
1346
|
+
$.selectedCells = [], $.startCell = null, $.endCell = null;
|
|
1343
1347
|
const d = f.value;
|
|
1344
1348
|
if (!d)
|
|
1345
1349
|
return;
|
|
@@ -1355,19 +1359,19 @@ const Cn = { class: "center" }, xn = {
|
|
|
1355
1359
|
);
|
|
1356
1360
|
});
|
|
1357
1361
|
}, Ee = () => {
|
|
1358
|
-
if (
|
|
1359
|
-
|
|
1362
|
+
if (!$.startCell || !$.endCell) {
|
|
1363
|
+
$.selectedCells = [];
|
|
1360
1364
|
return;
|
|
1361
1365
|
}
|
|
1362
|
-
const d =
|
|
1363
|
-
|
|
1364
|
-
for (let A =
|
|
1366
|
+
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);
|
|
1367
|
+
$.selectedCells = [];
|
|
1368
|
+
for (let A = R; A <= Z; A++)
|
|
1365
1369
|
for (let F = q; F <= se; F++)
|
|
1366
|
-
|
|
1370
|
+
$.selectedCells.push({
|
|
1367
1371
|
rowIndex: A,
|
|
1368
1372
|
colIndex: F
|
|
1369
1373
|
});
|
|
1370
|
-
},
|
|
1374
|
+
}, Ke = () => {
|
|
1371
1375
|
we(() => {
|
|
1372
1376
|
const d = f.value;
|
|
1373
1377
|
if (!d)
|
|
@@ -1375,58 +1379,58 @@ const Cn = { class: "center" }, xn = {
|
|
|
1375
1379
|
const c = d.$el;
|
|
1376
1380
|
if (c.querySelectorAll(
|
|
1377
1381
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1378
|
-
).forEach((
|
|
1379
|
-
|
|
1382
|
+
).forEach((K) => {
|
|
1383
|
+
K.classList.remove(
|
|
1380
1384
|
"cell-selected",
|
|
1381
1385
|
"cell-border-top",
|
|
1382
1386
|
"cell-border-right",
|
|
1383
1387
|
"cell-border-bottom",
|
|
1384
1388
|
"cell-border-left"
|
|
1385
1389
|
);
|
|
1386
|
-
}),
|
|
1390
|
+
}), $.selectedCells.length === 0)
|
|
1387
1391
|
return;
|
|
1388
|
-
const S = d.getColumns(), T =
|
|
1392
|
+
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
1393
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1390
1394
|
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1391
1395
|
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1392
1396
|
].filter(Boolean);
|
|
1393
|
-
|
|
1394
|
-
const
|
|
1395
|
-
if (!
|
|
1397
|
+
$.selectedCells.forEach(({ rowIndex: K, colIndex: J }) => {
|
|
1398
|
+
const B = S[J];
|
|
1399
|
+
if (!B)
|
|
1396
1400
|
return;
|
|
1397
|
-
const X =
|
|
1401
|
+
const X = B.fixed === "left", W = B.fixed === "right";
|
|
1398
1402
|
for (const oe of F) {
|
|
1399
|
-
const xe = oe.querySelectorAll(".vxe-body--row")[
|
|
1403
|
+
const xe = oe.querySelectorAll(".vxe-body--row")[K];
|
|
1400
1404
|
if (!xe)
|
|
1401
1405
|
continue;
|
|
1402
|
-
const
|
|
1403
|
-
let
|
|
1406
|
+
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1407
|
+
let U = null;
|
|
1404
1408
|
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
|
-
|
|
1409
|
+
const le = S.filter((ae) => ae.fixed === "left").indexOf(B);
|
|
1410
|
+
U = me[le];
|
|
1411
|
+
} else if (W && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1412
|
+
const le = S.filter((ae) => ae.fixed === "right").indexOf(B);
|
|
1413
|
+
U = me[le];
|
|
1414
|
+
} else if (!X && !W && oe.closest(".vxe-table--body-wrapper")) {
|
|
1415
|
+
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = J - le;
|
|
1416
|
+
U = me[ae + ge];
|
|
1413
1417
|
}
|
|
1414
|
-
if (
|
|
1415
|
-
|
|
1418
|
+
if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
|
|
1419
|
+
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
1420
|
break;
|
|
1417
1421
|
}
|
|
1418
1422
|
}
|
|
1419
1423
|
});
|
|
1420
1424
|
});
|
|
1421
1425
|
}, wt = async () => {
|
|
1422
|
-
if (
|
|
1426
|
+
if ($.selectedCells.length === 0)
|
|
1423
1427
|
return;
|
|
1424
1428
|
const d = f.value;
|
|
1425
1429
|
if (!d)
|
|
1426
1430
|
return;
|
|
1427
|
-
const c = d.$el, S = d.getColumns(), T = [...new Set(
|
|
1431
|
+
const c = d.$el, S = d.getColumns(), T = [...new Set($.selectedCells.map((A) => A.rowIndex))].sort(
|
|
1428
1432
|
(A, F) => A - F
|
|
1429
|
-
),
|
|
1433
|
+
), R = [...new Set($.selectedCells.map((A) => A.colIndex))].sort(
|
|
1430
1434
|
(A, F) => A - F
|
|
1431
1435
|
), Z = [
|
|
1432
1436
|
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
@@ -1435,36 +1439,36 @@ const Cn = { class: "center" }, xn = {
|
|
|
1435
1439
|
].filter(Boolean), q = [];
|
|
1436
1440
|
T.forEach((A) => {
|
|
1437
1441
|
const F = [];
|
|
1438
|
-
|
|
1439
|
-
const J = S[
|
|
1442
|
+
R.forEach((K) => {
|
|
1443
|
+
const J = S[K];
|
|
1440
1444
|
if (!J) {
|
|
1441
1445
|
F.push("");
|
|
1442
1446
|
return;
|
|
1443
1447
|
}
|
|
1444
|
-
const
|
|
1445
|
-
let
|
|
1448
|
+
const B = J.fixed === "left", X = J.fixed === "right";
|
|
1449
|
+
let W = "";
|
|
1446
1450
|
for (const oe of Z) {
|
|
1447
1451
|
const xe = oe.querySelectorAll(".vxe-body--row")[A];
|
|
1448
1452
|
if (!xe)
|
|
1449
1453
|
continue;
|
|
1450
|
-
const
|
|
1451
|
-
let
|
|
1452
|
-
if (
|
|
1454
|
+
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1455
|
+
let U = null;
|
|
1456
|
+
if (B && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1453
1457
|
const le = S.filter((ae) => ae.fixed === "left").indexOf(J);
|
|
1454
|
-
|
|
1458
|
+
U = me[le];
|
|
1455
1459
|
} else if (X && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1456
1460
|
const le = S.filter((ae) => ae.fixed === "right").indexOf(J);
|
|
1457
|
-
|
|
1458
|
-
} else if (!
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
+
U = me[le];
|
|
1462
|
+
} else if (!B && !X && oe.closest(".vxe-table--body-wrapper")) {
|
|
1463
|
+
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = K - le;
|
|
1464
|
+
U = me[ae + ge];
|
|
1461
1465
|
}
|
|
1462
|
-
if (
|
|
1463
|
-
|
|
1466
|
+
if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
|
|
1467
|
+
W = U.innerText || U.textContent || "", W = W.trim(), W = W.replace(/\n/g, " ").replace(/\s+/g, " ");
|
|
1464
1468
|
break;
|
|
1465
1469
|
}
|
|
1466
1470
|
}
|
|
1467
|
-
F.push(
|
|
1471
|
+
F.push(W);
|
|
1468
1472
|
}), q.push(F.join(" "));
|
|
1469
1473
|
});
|
|
1470
1474
|
const se = q.join(`
|
|
@@ -1475,24 +1479,24 @@ const Cn = { class: "center" }, xn = {
|
|
|
1475
1479
|
console.error("复制失败:", A);
|
|
1476
1480
|
}
|
|
1477
1481
|
}, Te = (d) => {
|
|
1478
|
-
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ?
|
|
1479
|
-
},
|
|
1480
|
-
|
|
1481
|
-
},
|
|
1482
|
+
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), wt()) : d.key === "Escape" && ve());
|
|
1483
|
+
}, He = () => {
|
|
1484
|
+
$.isSelecting = !1;
|
|
1485
|
+
}, Ne = (d) => {
|
|
1482
1486
|
const c = f.value;
|
|
1483
1487
|
if (!c || !c.$el)
|
|
1484
1488
|
return;
|
|
1485
1489
|
c.$el.contains(d.target) || ve();
|
|
1486
1490
|
}, Ct = (d) => {
|
|
1487
|
-
|
|
1491
|
+
h[v] = d, I();
|
|
1488
1492
|
}, xt = (d) => {
|
|
1489
|
-
|
|
1493
|
+
h[g] = d, h[v] = 1, I();
|
|
1490
1494
|
};
|
|
1491
|
-
function
|
|
1495
|
+
function We() {
|
|
1492
1496
|
const d = f.value.getCheckboxRecords();
|
|
1493
1497
|
l.searchForm.selections = d;
|
|
1494
1498
|
}
|
|
1495
|
-
const
|
|
1499
|
+
const Ze = (d) => {
|
|
1496
1500
|
const c = f.value;
|
|
1497
1501
|
if (c) {
|
|
1498
1502
|
c.toggleCheckboxRow(d);
|
|
@@ -1500,29 +1504,29 @@ const Cn = { class: "center" }, xn = {
|
|
|
1500
1504
|
l.searchForm.selections = S;
|
|
1501
1505
|
}
|
|
1502
1506
|
};
|
|
1503
|
-
return t({ tableRef: f, getList: I, getPrm:
|
|
1507
|
+
return t({ tableRef: f, getList: I, getPrm: _, clearSort: w, calculateTableHeight: b }), (d, c) => {
|
|
1504
1508
|
var A;
|
|
1505
|
-
const S =
|
|
1509
|
+
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
1510
|
return L(), ie("div", {
|
|
1507
|
-
class:
|
|
1511
|
+
class: rt({ box: e.searchForm.showShadow })
|
|
1508
1512
|
}, [
|
|
1509
|
-
e.searchForm.showSearch ? (L(),
|
|
1513
|
+
e.searchForm.showSearch ? (L(), N(bn, {
|
|
1510
1514
|
key: 0,
|
|
1511
1515
|
form: e.searchForm,
|
|
1512
|
-
onReset:
|
|
1516
|
+
onReset: G,
|
|
1513
1517
|
onConfirm: c[1] || (c[1] = (F) => I()),
|
|
1514
|
-
onVisibleChange:
|
|
1518
|
+
onVisibleChange: H(b)
|
|
1515
1519
|
}, {
|
|
1516
1520
|
btn: D(() => [
|
|
1517
1521
|
c[3] || (c[3] = re("span", { class: "mgr10" }, null, -1)),
|
|
1518
1522
|
ee(d.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1519
|
-
|
|
1523
|
+
M(S, {
|
|
1520
1524
|
class: "mgl10",
|
|
1521
1525
|
round: "",
|
|
1522
1526
|
onClick: c[0] || (c[0] = (F) => f.value.openCustom())
|
|
1523
1527
|
}, {
|
|
1524
1528
|
default: D(() => [
|
|
1525
|
-
|
|
1529
|
+
M(yt, { name: "Tools" })
|
|
1526
1530
|
]),
|
|
1527
1531
|
_: 1
|
|
1528
1532
|
})
|
|
@@ -1534,7 +1538,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1534
1538
|
ref_key: "tableContentRef",
|
|
1535
1539
|
ref: u
|
|
1536
1540
|
}, [
|
|
1537
|
-
|
|
1541
|
+
M(q, fe({
|
|
1538
1542
|
id: y.value,
|
|
1539
1543
|
ref_key: "tableRef",
|
|
1540
1544
|
ref: f,
|
|
@@ -1543,34 +1547,34 @@ const Cn = { class: "center" }, xn = {
|
|
|
1543
1547
|
border: ""
|
|
1544
1548
|
}, te.value, {
|
|
1545
1549
|
height: E.value,
|
|
1546
|
-
onCheckboxChange:
|
|
1547
|
-
onCheckboxAll:
|
|
1550
|
+
onCheckboxChange: We,
|
|
1551
|
+
onCheckboxAll: We,
|
|
1548
1552
|
onSortChange: (A = te.value["sort-config"]) == null ? void 0 : A.sortChange
|
|
1549
1553
|
}), {
|
|
1550
1554
|
default: D(() => [
|
|
1551
|
-
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (L(),
|
|
1555
|
+
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (L(), N(Z, {
|
|
1552
1556
|
key: 0,
|
|
1553
1557
|
type: "checkbox",
|
|
1554
|
-
width:
|
|
1558
|
+
width: H(a) == "zh_cn" ? 80 : 150,
|
|
1555
1559
|
title: d.$t("xu-hao"),
|
|
1556
1560
|
fixed: "left"
|
|
1557
1561
|
}, {
|
|
1558
|
-
checkbox: D(({ rowIndex: F, row:
|
|
1562
|
+
checkbox: D(({ rowIndex: F, row: K, checked: J, disabled: B, indeterminate: X }) => [
|
|
1559
1563
|
re("div", Cn, [
|
|
1560
|
-
J ? (L(),
|
|
1564
|
+
J ? (L(), N(T, {
|
|
1561
1565
|
key: 0,
|
|
1562
1566
|
checked: !0,
|
|
1563
|
-
disabled:
|
|
1567
|
+
disabled: B,
|
|
1564
1568
|
size: "default",
|
|
1565
|
-
onClick: Ve((
|
|
1566
|
-
}, null, 8, ["disabled", "onClick"])) : (L(),
|
|
1569
|
+
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1570
|
+
}, null, 8, ["disabled", "onClick"])) : (L(), N(T, {
|
|
1567
1571
|
key: 1,
|
|
1568
|
-
disabled:
|
|
1572
|
+
disabled: B,
|
|
1569
1573
|
checked: !1,
|
|
1570
1574
|
size: "default",
|
|
1571
|
-
onClick: Ve((
|
|
1575
|
+
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1572
1576
|
}, null, 8, ["disabled", "onClick"])),
|
|
1573
|
-
|
|
1577
|
+
M(R, {
|
|
1574
1578
|
type: "info",
|
|
1575
1579
|
class: "mgl5"
|
|
1576
1580
|
}, {
|
|
@@ -1588,16 +1592,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1588
1592
|
_: 3
|
|
1589
1593
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1590
1594
|
], 512),
|
|
1591
|
-
e.searchForm.showPage ? (L(),
|
|
1595
|
+
e.searchForm.showPage ? (L(), N(se, {
|
|
1592
1596
|
key: 1,
|
|
1593
|
-
"current-page":
|
|
1594
|
-
"onUpdate:currentPage": c[2] || (c[2] = (F) =>
|
|
1597
|
+
"current-page": h[H(v)],
|
|
1598
|
+
"onUpdate:currentPage": c[2] || (c[2] = (F) => h[H(v)] = F),
|
|
1595
1599
|
class: "myPagination mgt10",
|
|
1596
1600
|
background: "",
|
|
1597
1601
|
layout: "total, sizes, prev, pager, next",
|
|
1598
|
-
total:
|
|
1599
|
-
"page-size":
|
|
1600
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1602
|
+
total: h.total,
|
|
1603
|
+
"page-size": h[H(g)],
|
|
1604
|
+
"page-sizes": e.searchForm.pageSizes || H(o).pageSizes,
|
|
1601
1605
|
onCurrentChange: Ct,
|
|
1602
1606
|
onSizeChange: xt
|
|
1603
1607
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : de("", !0)
|
|
@@ -1622,8 +1626,8 @@ const Cn = { class: "center" }, xn = {
|
|
|
1622
1626
|
on(t.fileName, t.sheetsConfig);
|
|
1623
1627
|
}
|
|
1624
1628
|
return (a, s) => {
|
|
1625
|
-
const o =
|
|
1626
|
-
return L(),
|
|
1629
|
+
const o = O("el-link");
|
|
1630
|
+
return L(), N(o, fe({
|
|
1627
1631
|
type: "primary",
|
|
1628
1632
|
underline: "never"
|
|
1629
1633
|
}, a.$attrs, { onClick: n }), {
|
|
@@ -1638,16 +1642,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1638
1642
|
}
|
|
1639
1643
|
}, kn = {
|
|
1640
1644
|
mounted(e, t) {
|
|
1641
|
-
t.value &&
|
|
1645
|
+
t.value && et(e);
|
|
1642
1646
|
},
|
|
1643
1647
|
updated(e, t) {
|
|
1644
|
-
t.value ?
|
|
1648
|
+
t.value ? et(e) : tt(e);
|
|
1645
1649
|
},
|
|
1646
1650
|
beforeUnmount(e) {
|
|
1647
|
-
|
|
1651
|
+
tt(e);
|
|
1648
1652
|
}
|
|
1649
1653
|
};
|
|
1650
|
-
async function
|
|
1654
|
+
async function et(e) {
|
|
1651
1655
|
await g();
|
|
1652
1656
|
const t = e.querySelector(".el-dialog");
|
|
1653
1657
|
if (!t)
|
|
@@ -1680,44 +1684,44 @@ async function tt(e) {
|
|
|
1680
1684
|
y: 0
|
|
1681
1685
|
}
|
|
1682
1686
|
};
|
|
1683
|
-
n.addEventListener("mousedown", i), document.addEventListener("mousemove", y), document.addEventListener("mouseup",
|
|
1687
|
+
n.addEventListener("mousedown", i), document.addEventListener("mousemove", y), document.addEventListener("mouseup", m), window.addEventListener("resize", v);
|
|
1684
1688
|
function l() {
|
|
1685
1689
|
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
1690
|
}
|
|
1687
1691
|
function r() {
|
|
1688
|
-
let
|
|
1689
|
-
t.style.cssText += `position: absolute; top: calc(${
|
|
1692
|
+
let h = o.drag.y - o.mouse.y + o.dialog.y, f = o.drag.x - o.mouse.x + o.dialog.x;
|
|
1693
|
+
t.style.cssText += `position: absolute; top: calc(${h}px - ${o.dialog.marginTop}); left: ${f}px;`;
|
|
1690
1694
|
}
|
|
1691
|
-
function i(
|
|
1692
|
-
|
|
1695
|
+
function i(h) {
|
|
1696
|
+
h.button === 0 && (o.window = {
|
|
1693
1697
|
width: document.body.clientWidth,
|
|
1694
1698
|
height: document.body.clientHeight
|
|
1695
1699
|
}, o.dialog = t.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(t).marginTop, o.mouse = {
|
|
1696
|
-
x:
|
|
1697
|
-
y:
|
|
1700
|
+
x: h.clientX,
|
|
1701
|
+
y: h.clientY
|
|
1698
1702
|
}, s = !0);
|
|
1699
1703
|
}
|
|
1700
|
-
function y(
|
|
1704
|
+
function y(h) {
|
|
1701
1705
|
s && (o.drag = {
|
|
1702
|
-
x:
|
|
1703
|
-
y:
|
|
1706
|
+
x: h.clientX,
|
|
1707
|
+
y: h.clientY
|
|
1704
1708
|
}, a.style.userSelect = "none", l());
|
|
1705
1709
|
}
|
|
1706
|
-
function
|
|
1710
|
+
function m(h) {
|
|
1707
1711
|
a.style.userSelect = "auto", s = !1;
|
|
1708
1712
|
}
|
|
1709
|
-
function v(
|
|
1713
|
+
function v(h) {
|
|
1710
1714
|
}
|
|
1711
1715
|
function g() {
|
|
1712
|
-
return new Promise((
|
|
1716
|
+
return new Promise((h, f) => {
|
|
1713
1717
|
setTimeout(() => {
|
|
1714
|
-
|
|
1718
|
+
h();
|
|
1715
1719
|
}, 500);
|
|
1716
1720
|
});
|
|
1717
1721
|
}
|
|
1718
|
-
e.__mouseDown__ = i, e.__mouseUp__ =
|
|
1722
|
+
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = y, e.__sizeChange__ = v;
|
|
1719
1723
|
}
|
|
1720
|
-
function
|
|
1724
|
+
function tt(e) {
|
|
1721
1725
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1722
1726
|
}
|
|
1723
1727
|
const _n = {
|
|
@@ -1743,7 +1747,7 @@ const _n = {
|
|
|
1743
1747
|
},
|
|
1744
1748
|
emits: ["confirm"],
|
|
1745
1749
|
setup(e, { emit: t }) {
|
|
1746
|
-
const n = e, a = t, { t: s } = pe(), o =
|
|
1750
|
+
const n = e, a = t, { t: s } = pe(), o = Re(() => {
|
|
1747
1751
|
a("confirm");
|
|
1748
1752
|
}, 300);
|
|
1749
1753
|
async function l() {
|
|
@@ -1755,8 +1759,8 @@ const _n = {
|
|
|
1755
1759
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1756
1760
|
}
|
|
1757
1761
|
return (r, i) => {
|
|
1758
|
-
const y =
|
|
1759
|
-
return e.layer.type ? (L(),
|
|
1762
|
+
const y = O("el-button"), m = O("el-drawer"), v = O("el-dialog");
|
|
1763
|
+
return e.layer.type ? (L(), N(m, {
|
|
1760
1764
|
key: 0,
|
|
1761
1765
|
modelValue: e.layer.show,
|
|
1762
1766
|
"onUpdate:modelValue": i[0] || (i[0] = (g) => e.layer.show = g),
|
|
@@ -1772,16 +1776,16 @@ const _n = {
|
|
|
1772
1776
|
i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
|
|
1773
1777
|
e.layer.showButton ? (L(), ie("div", _n, [
|
|
1774
1778
|
ee(r.$slots, "btn", {}, () => [
|
|
1775
|
-
|
|
1779
|
+
M(y, { onClick: l }, {
|
|
1776
1780
|
default: D(() => [
|
|
1777
1781
|
ne(Q(r.$t("qu-xiao")), 1)
|
|
1778
1782
|
]),
|
|
1779
1783
|
_: 1
|
|
1780
1784
|
}),
|
|
1781
|
-
|
|
1785
|
+
M(y, {
|
|
1782
1786
|
type: "primary",
|
|
1783
1787
|
loading: e.loading,
|
|
1784
|
-
onClick:
|
|
1788
|
+
onClick: H(o)
|
|
1785
1789
|
}, {
|
|
1786
1790
|
default: D(() => [
|
|
1787
1791
|
ne(Q(r.$t("ti-jiao")), 1)
|
|
@@ -1793,14 +1797,14 @@ const _n = {
|
|
|
1793
1797
|
]),
|
|
1794
1798
|
_: 3
|
|
1795
1799
|
}, 8, ["modelValue", "size", "title"])) : Vt((L(), ie("div", $n, [
|
|
1796
|
-
|
|
1800
|
+
M(v, {
|
|
1797
1801
|
"close-on-click-modal": !1,
|
|
1798
1802
|
modelValue: e.layer.show,
|
|
1799
1803
|
"onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
|
|
1800
1804
|
title: e.layer.title,
|
|
1801
1805
|
width: e.layer.width || 500,
|
|
1802
1806
|
center: ""
|
|
1803
|
-
},
|
|
1807
|
+
}, lt({
|
|
1804
1808
|
default: D(() => [
|
|
1805
1809
|
ee(r.$slots, "default")
|
|
1806
1810
|
]),
|
|
@@ -1810,15 +1814,15 @@ const _n = {
|
|
|
1810
1814
|
name: "footer",
|
|
1811
1815
|
fn: D(() => [
|
|
1812
1816
|
ee(r.$slots, "btn", {}, () => [
|
|
1813
|
-
|
|
1817
|
+
M(y, { onClick: l }, {
|
|
1814
1818
|
default: D(() => [
|
|
1815
1819
|
ne(Q(r.$t("qu-xiao")), 1)
|
|
1816
1820
|
]),
|
|
1817
1821
|
_: 1
|
|
1818
1822
|
}),
|
|
1819
|
-
|
|
1823
|
+
M(y, {
|
|
1820
1824
|
type: "primary",
|
|
1821
|
-
onClick:
|
|
1825
|
+
onClick: H(o)
|
|
1822
1826
|
}, {
|
|
1823
1827
|
default: D(() => [
|
|
1824
1828
|
ne(Q(r.$t("ti-jiao")), 1)
|
|
@@ -1831,7 +1835,7 @@ const _n = {
|
|
|
1831
1835
|
} : void 0
|
|
1832
1836
|
]), 1032, ["modelValue", "title", "width"])
|
|
1833
1837
|
])), [
|
|
1834
|
-
[
|
|
1838
|
+
[H(kn), e.layer.show]
|
|
1835
1839
|
]);
|
|
1836
1840
|
};
|
|
1837
1841
|
}
|
|
@@ -1846,12 +1850,12 @@ function oo(e, t = {}) {
|
|
|
1846
1850
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1847
1851
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1848
1852
|
}[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1849
|
-
return o ? function(y,
|
|
1853
|
+
return o ? function(y, m, v) {
|
|
1850
1854
|
if (r) {
|
|
1851
|
-
s.test(
|
|
1855
|
+
s.test(m) ? v() : v(new Error(i));
|
|
1852
1856
|
return;
|
|
1853
1857
|
}
|
|
1854
|
-
|
|
1858
|
+
m && !s.test(m) ? v(new Error(i)) : v();
|
|
1855
1859
|
} : s.test(l);
|
|
1856
1860
|
}
|
|
1857
1861
|
class lo {
|
|
@@ -2067,33 +2071,33 @@ function ao(e, t = {}) {
|
|
|
2067
2071
|
log: !1,
|
|
2068
2072
|
params: null,
|
|
2069
2073
|
format: null
|
|
2070
|
-
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, y =
|
|
2071
|
-
const
|
|
2072
|
-
|
|
2073
|
-
const { code: u, data:
|
|
2074
|
+
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, y = P([]), m = P(!1), v = (g) => {
|
|
2075
|
+
const h = g || l;
|
|
2076
|
+
m.value = !0, e(h).then((f) => {
|
|
2077
|
+
const { code: u, data: p, msg: b } = f;
|
|
2074
2078
|
if (r) {
|
|
2075
|
-
const { records: C, rows: x } =
|
|
2076
|
-
y.value =
|
|
2079
|
+
const { records: C, rows: x } = p || {}, E = C || x ? C || x : p;
|
|
2080
|
+
y.value = Me(E, i), r(f);
|
|
2077
2081
|
}
|
|
2078
|
-
if (
|
|
2079
|
-
if (
|
|
2080
|
-
const { records: C, rows: x, total: E = 0 } =
|
|
2081
|
-
|
|
2082
|
+
if (p) {
|
|
2083
|
+
if (p.records != null || p.rows != null) {
|
|
2084
|
+
const { records: C, rows: x, total: E = 0 } = p || {};
|
|
2085
|
+
h && h.total != null && (l.total = parseInt(E)), y.value = Me(C || x || [], i);
|
|
2082
2086
|
} else
|
|
2083
|
-
y.value =
|
|
2087
|
+
y.value = Me(p, i);
|
|
2084
2088
|
o && console.log("useRequest-res", y.value);
|
|
2085
2089
|
}
|
|
2086
2090
|
}).catch((f) => {
|
|
2087
2091
|
r && (console.log("useRequestErr", f), r({ code: 500 }));
|
|
2088
2092
|
}).finally(() => {
|
|
2089
|
-
|
|
2093
|
+
m.value = !1;
|
|
2090
2094
|
});
|
|
2091
2095
|
};
|
|
2092
|
-
return s || v(), [
|
|
2096
|
+
return s || v(), [m, y, v];
|
|
2093
2097
|
}
|
|
2094
2098
|
function so(e) {
|
|
2095
|
-
const t =
|
|
2096
|
-
return
|
|
2099
|
+
const t = P(e), n = P(""), a = P("");
|
|
2100
|
+
return Pe(t, (s) => {
|
|
2097
2101
|
const o = s || ["", ""];
|
|
2098
2102
|
n.value = o[0], a.value = o[1];
|
|
2099
2103
|
}), [t, n, a];
|
|
@@ -2101,7 +2105,7 @@ function so(e) {
|
|
|
2101
2105
|
function ro(e) {
|
|
2102
2106
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2103
2107
|
}
|
|
2104
|
-
function
|
|
2108
|
+
function Me(e, t) {
|
|
2105
2109
|
if (!t)
|
|
2106
2110
|
return e;
|
|
2107
2111
|
if (e instanceof Array)
|
|
@@ -2113,8 +2117,8 @@ function Oe(e, t) {
|
|
|
2113
2117
|
return t.forEach((a) => n[a] = e[a]), n;
|
|
2114
2118
|
}
|
|
2115
2119
|
function io(e, t = []) {
|
|
2116
|
-
const { locale: n } = pe(), a =
|
|
2117
|
-
return
|
|
2120
|
+
const { locale: n } = pe(), a = P(e());
|
|
2121
|
+
return Pe(
|
|
2118
2122
|
[n, ...t],
|
|
2119
2123
|
() => {
|
|
2120
2124
|
a.value = e();
|
|
@@ -2125,20 +2129,20 @@ function io(e, t = []) {
|
|
|
2125
2129
|
function co(e, t = "zh_cn", n = "en_us") {
|
|
2126
2130
|
if (!e)
|
|
2127
2131
|
return "-";
|
|
2128
|
-
const a = { en_us: n, zh_cn: t }, o =
|
|
2132
|
+
const a = { en_us: n, zh_cn: t }, o = Ye().global.locale.value;
|
|
2129
2133
|
return e[a[o]] || e[t] || "-";
|
|
2130
2134
|
}
|
|
2131
2135
|
function uo(e, t) {
|
|
2132
2136
|
let n = Pt;
|
|
2133
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2137
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState), bt(t, n);
|
|
2134
2138
|
}
|
|
2135
2139
|
function fo(e, t) {
|
|
2136
2140
|
let n = Rt;
|
|
2137
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2141
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters), bt(t, n);
|
|
2138
2142
|
}
|
|
2139
2143
|
function ho(e, t) {
|
|
2140
2144
|
let n = Bt;
|
|
2141
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2145
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapActions), Sn(t, n);
|
|
2142
2146
|
}
|
|
2143
2147
|
function bt(e, t) {
|
|
2144
2148
|
const n = ut(), a = t(e), s = {};
|
|
@@ -2166,20 +2170,20 @@ function mo() {
|
|
|
2166
2170
|
const a = t.row[t.column.field];
|
|
2167
2171
|
if (e.type == "tag") {
|
|
2168
2172
|
let s;
|
|
2169
|
-
return O(
|
|
2173
|
+
return M(O("el-text"), {
|
|
2170
2174
|
type: e.enum.getTag(a)
|
|
2171
2175
|
}, Fe(s = e.enum.getName(a)) ? s : {
|
|
2172
2176
|
default: () => [s]
|
|
2173
2177
|
});
|
|
2174
2178
|
}
|
|
2175
|
-
return O(
|
|
2179
|
+
return M(O("el-text"), null, Fe(n = e.enum.getName(a)) ? n : {
|
|
2176
2180
|
default: () => [n]
|
|
2177
2181
|
});
|
|
2178
2182
|
}
|
|
2179
2183
|
}), ke.renderer.add("InputNumber", {
|
|
2180
2184
|
// 默认显示模板
|
|
2181
2185
|
renderTableDefault(e, t) {
|
|
2182
|
-
return
|
|
2186
|
+
return M(It, fe({
|
|
2183
2187
|
modelValue: t.row[t.column.field],
|
|
2184
2188
|
"onUpdate:modelValue": (n) => t.row[t.column.field] = n
|
|
2185
2189
|
}, e.props, {
|
|
@@ -2194,7 +2198,7 @@ function mo() {
|
|
|
2194
2198
|
locale: n
|
|
2195
2199
|
} = pe();
|
|
2196
2200
|
let a = n.value == "zh_cn";
|
|
2197
|
-
return
|
|
2201
|
+
return M(Ft, {
|
|
2198
2202
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2199
2203
|
}, {
|
|
2200
2204
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2218,25 +2222,25 @@ function mo() {
|
|
|
2218
2222
|
to: o,
|
|
2219
2223
|
openType: l = "system"
|
|
2220
2224
|
} = e, r = t.row[n];
|
|
2221
|
-
function i(y,
|
|
2225
|
+
function i(y, m) {
|
|
2222
2226
|
l == "blank" ? window.open(y) : a.push({
|
|
2223
2227
|
path: y,
|
|
2224
2228
|
query: {
|
|
2225
|
-
[n]:
|
|
2229
|
+
[n]: m
|
|
2226
2230
|
}
|
|
2227
2231
|
});
|
|
2228
2232
|
}
|
|
2229
2233
|
if (s) {
|
|
2230
2234
|
const y = (r == null ? void 0 : r.split(",")) || [];
|
|
2231
|
-
return y.map((
|
|
2235
|
+
return y.map((m, v) => M("span", null, [M(Ge, {
|
|
2232
2236
|
underline: "never",
|
|
2233
2237
|
type: "primary",
|
|
2234
|
-
onclick: () => i(l == "stystem" ? o :
|
|
2235
|
-
}, Fe(
|
|
2236
|
-
default: () => [
|
|
2238
|
+
onclick: () => i(l == "stystem" ? o : m, m)
|
|
2239
|
+
}, Fe(m) ? m : {
|
|
2240
|
+
default: () => [m]
|
|
2237
2241
|
}), v < y.length - 1 ? "," : ""]));
|
|
2238
2242
|
}
|
|
2239
|
-
return
|
|
2243
|
+
return M(Ge, {
|
|
2240
2244
|
underline: "never",
|
|
2241
2245
|
type: "primary",
|
|
2242
2246
|
onclick: () => i(l == "stystem" ? o : r, r)
|
|
@@ -2257,7 +2261,7 @@ export {
|
|
|
2257
2261
|
eo as ListPage,
|
|
2258
2262
|
lo as OnePortalCasSDK,
|
|
2259
2263
|
bn as SearchBar,
|
|
2260
|
-
|
|
2264
|
+
Qe as StatusMap,
|
|
2261
2265
|
Pn as _toRaw,
|
|
2262
2266
|
ro as _typeOf,
|
|
2263
2267
|
Bn as arrToStatusMap,
|
|
@@ -2266,9 +2270,9 @@ export {
|
|
|
2266
2270
|
oo as creatValidator,
|
|
2267
2271
|
Wn as createImportFields,
|
|
2268
2272
|
Nn as createListPageId,
|
|
2269
|
-
|
|
2273
|
+
Ae as en_us,
|
|
2270
2274
|
jn as exportExcel,
|
|
2271
|
-
|
|
2275
|
+
Ye as getI18n,
|
|
2272
2276
|
Ce as getI18nT,
|
|
2273
2277
|
wn as getListPageConfig,
|
|
2274
2278
|
co as getLocaleValue,
|
|
@@ -2289,5 +2293,5 @@ export {
|
|
|
2289
2293
|
io as useI18nReState,
|
|
2290
2294
|
ao as useRequest,
|
|
2291
2295
|
uo as useState,
|
|
2292
|
-
|
|
2296
|
+
qe as zh_cn
|
|
2293
2297
|
};
|