joy-admin-components 0.2.42 → 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 +550 -547
- 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() {
|
|
@@ -48,57 +48,57 @@ var ht = { exports: {} };
|
|
|
48
48
|
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
|
|
49
49
|
return function(o, l, r) {
|
|
50
50
|
var i = l.prototype;
|
|
51
|
-
r.utc = function(
|
|
52
|
-
var
|
|
53
|
-
return new l(
|
|
54
|
-
}, i.utc = function(
|
|
55
|
-
var
|
|
56
|
-
return
|
|
51
|
+
r.utc = function(u) {
|
|
52
|
+
var p = { date: u, utc: !0, args: arguments };
|
|
53
|
+
return new l(p);
|
|
54
|
+
}, i.utc = function(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
|
};
|
|
60
60
|
var y = i.parse;
|
|
61
|
-
i.parse = function(
|
|
62
|
-
|
|
61
|
+
i.parse = function(u) {
|
|
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
|
-
var
|
|
68
|
-
this.$y =
|
|
67
|
+
var u = this.$d;
|
|
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(
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return this.$u ? 0 :
|
|
77
|
-
if (typeof
|
|
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
|
+
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
|
|
84
|
-
}(
|
|
82
|
+
var I = ("" + Y[0]).match(s) || ["-", 0, 0], G = I[0], _ = 60 * +I[1] + +I[2];
|
|
83
|
+
return _ === 0 ? 0 : G === "+" ? _ : -_;
|
|
84
|
+
}(u), u === null))
|
|
85
85
|
return this;
|
|
86
|
-
var
|
|
87
|
-
if (
|
|
88
|
-
return this.utc(
|
|
89
|
-
var
|
|
90
|
-
if (
|
|
91
|
-
return
|
|
86
|
+
var C = Math.abs(u) <= 16 ? 60 * u : u;
|
|
87
|
+
if (C === 0)
|
|
88
|
+
return this.utc(p);
|
|
89
|
+
var x = this.clone();
|
|
90
|
+
if (p)
|
|
91
|
+
return x.$offset = C, x.$u = !1, x;
|
|
92
92
|
var E = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
|
-
return (
|
|
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
|
-
i.format = function(
|
|
97
|
-
var
|
|
98
|
-
return g.call(this,
|
|
96
|
+
i.format = function(u) {
|
|
97
|
+
var p = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
98
|
+
return g.call(this, p);
|
|
99
99
|
}, i.valueOf = function() {
|
|
100
|
-
var
|
|
101
|
-
return this.$d.valueOf() - 6e4 *
|
|
100
|
+
var u = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
101
|
+
return this.$d.valueOf() - 6e4 * u;
|
|
102
102
|
}, i.isUTC = function() {
|
|
103
103
|
return !!this.$u;
|
|
104
104
|
}, i.toISOString = function() {
|
|
@@ -106,16 +106,16 @@ var ht = { exports: {} };
|
|
|
106
106
|
}, i.toString = function() {
|
|
107
107
|
return this.toDate().toUTCString();
|
|
108
108
|
};
|
|
109
|
-
var
|
|
110
|
-
i.toDate = function(
|
|
111
|
-
return
|
|
109
|
+
var h = i.toDate;
|
|
110
|
+
i.toDate = function(u) {
|
|
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(
|
|
115
|
-
if (
|
|
116
|
-
return f.call(this,
|
|
117
|
-
var
|
|
118
|
-
return f.call(
|
|
114
|
+
i.diff = function(u, p, b) {
|
|
115
|
+
if (u && this.$u === u.$u)
|
|
116
|
+
return f.call(this, u, p, b);
|
|
117
|
+
var C = this.local(), x = r(u).local();
|
|
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
|
|
135
|
-
|
|
136
|
-
var
|
|
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
|
|
143
|
-
E >= 0 && (
|
|
134
|
+
var u = new Date(g), p = function(b, C) {
|
|
135
|
+
C === void 0 && (C = {});
|
|
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
|
+
E >= 0 && (u[E] = parseInt(x, 10));
|
|
144
144
|
}
|
|
145
|
-
var V =
|
|
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,
|
|
151
|
-
if (!Number(
|
|
152
|
-
f = this.utcOffset(0,
|
|
153
|
-
else if (f = l(
|
|
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
|
+
if (!Number(x))
|
|
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
|
-
f = f.add(
|
|
155
|
+
f = f.add(u - E, "minute");
|
|
156
156
|
}
|
|
157
157
|
return f.$x.$timezone = g, f;
|
|
158
|
-
},
|
|
159
|
-
var
|
|
160
|
-
return
|
|
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
|
+
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
|
|
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
|
|
175
|
-
var
|
|
176
|
-
if (I ===
|
|
177
|
-
return [
|
|
178
|
-
var
|
|
179
|
-
return
|
|
180
|
-
}(l.utc(g,
|
|
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,28 +402,28 @@ 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 } =
|
|
408
|
-
if (
|
|
409
|
-
const
|
|
410
|
-
v[
|
|
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
|
+
if (u) {
|
|
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 (
|
|
414
|
-
let f = {},
|
|
415
|
-
Object.keys(y).forEach((
|
|
412
|
+
}), console.log("withImages-imageMap", v)), l.eachRow(function(g, h) {
|
|
413
|
+
if (h > a) {
|
|
414
|
+
let f = {}, u = !0;
|
|
415
|
+
Object.keys(y).forEach((p) => {
|
|
416
416
|
var V;
|
|
417
|
-
let [
|
|
418
|
-
const
|
|
417
|
+
let [b, C] = y[p].split(je);
|
|
418
|
+
const x = g.getCell(b);
|
|
419
419
|
let E;
|
|
420
|
-
if (
|
|
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
|
-
|
|
425
|
-
E &&
|
|
426
|
-
}),
|
|
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
|
+
}), u || i.push(f);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
429
429
|
}
|
|
@@ -442,31 +442,30 @@ 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
|
-
}
|
|
454
|
-
numFmt: nn[v]
|
|
453
|
+
}
|
|
455
454
|
};
|
|
456
455
|
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
457
|
-
const { header: y, key:
|
|
458
|
-
if (
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
-
if (
|
|
462
|
-
const
|
|
463
|
-
a.getCell(`${
|
|
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
|
+
const C = Ce();
|
|
462
|
+
a.getCell(`${f.letter}${b}`).dataValidation = {
|
|
464
463
|
type: "list",
|
|
465
|
-
formulae: [`${
|
|
464
|
+
formulae: [`${m}!$A$1:$A$${g.length}`],
|
|
466
465
|
showErrorMessage: !0,
|
|
467
|
-
error:
|
|
466
|
+
error: C("excel.invalidInput"),
|
|
468
467
|
errorStyle: "stop",
|
|
469
|
-
errorMessage:
|
|
468
|
+
errorMessage: C("excel.invalidOption")
|
|
470
469
|
};
|
|
471
470
|
}
|
|
472
471
|
});
|
|
@@ -528,7 +527,7 @@ function Rn(e) {
|
|
|
528
527
|
function pt(e, t = " ") {
|
|
529
528
|
return e ? e.split(t).filter((n) => n.trim()) : [];
|
|
530
529
|
}
|
|
531
|
-
class
|
|
530
|
+
class Qe {
|
|
532
531
|
constructor(t, n = ["label", "value", "labelEn"]) {
|
|
533
532
|
this.list = t.map((a) => ({
|
|
534
533
|
...a,
|
|
@@ -540,7 +539,7 @@ class et {
|
|
|
540
539
|
getName(t) {
|
|
541
540
|
if (!this.has(t))
|
|
542
541
|
return "-";
|
|
543
|
-
const n =
|
|
542
|
+
const n = Ye().global.locale, { label: a, labelEn: s } = this.map.get(t);
|
|
544
543
|
return (n.value == "zh_cn" ? a : s) ?? a ?? "-";
|
|
545
544
|
}
|
|
546
545
|
getTag(t) {
|
|
@@ -564,7 +563,7 @@ class et {
|
|
|
564
563
|
}
|
|
565
564
|
function Bn(e, t = [], n = "i18nName") {
|
|
566
565
|
if (e.length == 0)
|
|
567
|
-
return new
|
|
566
|
+
return new Qe([]);
|
|
568
567
|
if (t.length < 2) {
|
|
569
568
|
const s = Ce();
|
|
570
569
|
throw new Error(s("tools.keysLengthError"));
|
|
@@ -575,7 +574,7 @@ function Bn(e, t = [], n = "i18nName") {
|
|
|
575
574
|
r === 0 ? o.label = s[l] : r === 1 ? o.value = s[l] : o[l] = s[l];
|
|
576
575
|
}), o;
|
|
577
576
|
});
|
|
578
|
-
return new
|
|
577
|
+
return new Qe(a);
|
|
579
578
|
}
|
|
580
579
|
function Yn(e) {
|
|
581
580
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
@@ -607,7 +606,7 @@ const Se = (e, t) => {
|
|
|
607
606
|
return n;
|
|
608
607
|
}, sn = ["onClick"], rn = {
|
|
609
608
|
__name: "index",
|
|
610
|
-
props: /* @__PURE__ */
|
|
609
|
+
props: /* @__PURE__ */ Je({
|
|
611
610
|
api: {
|
|
612
611
|
type: Function
|
|
613
612
|
},
|
|
@@ -643,132 +642,132 @@ const Se = (e, t) => {
|
|
|
643
642
|
modelValue: {},
|
|
644
643
|
modelModifiers: {}
|
|
645
644
|
}),
|
|
646
|
-
emits: /* @__PURE__ */
|
|
645
|
+
emits: /* @__PURE__ */ Je(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
647
646
|
setup(e, { emit: t }) {
|
|
648
|
-
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(() => {
|
|
649
648
|
if (a.remote !== void 0)
|
|
650
649
|
return n.data;
|
|
651
|
-
const
|
|
652
|
-
if (
|
|
650
|
+
const w = pt(i.value), { data: k, labelValue: j } = n, te = k || g.value;
|
|
651
|
+
if (w.length == 0)
|
|
653
652
|
return te;
|
|
654
|
-
const { label:
|
|
655
|
-
let z = o.value == "en_us" ? ye || "i18nName" :
|
|
656
|
-
return
|
|
657
|
-
(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())
|
|
658
657
|
) : te.filter((ue) => {
|
|
659
658
|
let ve = !1;
|
|
660
|
-
return ve =
|
|
659
|
+
return ve = w.some((Ee) => ue[z].toLowerCase() == Ee.toLowerCase()), ve;
|
|
661
660
|
});
|
|
662
|
-
}),
|
|
661
|
+
}), m = ce({
|
|
663
662
|
get() {
|
|
664
663
|
return a.multiple == null || l.value == null ? !1 : l.value.length == y.value.length;
|
|
665
664
|
},
|
|
666
|
-
set(
|
|
667
|
-
return
|
|
665
|
+
set(w) {
|
|
666
|
+
return w;
|
|
668
667
|
}
|
|
669
|
-
}), v = t, g =
|
|
670
|
-
const { data:
|
|
671
|
-
g.value = [...
|
|
668
|
+
}), v = t, g = P([]), h = async () => {
|
|
669
|
+
const { data: w } = await n.api();
|
|
670
|
+
g.value = [...w], v("success", g);
|
|
672
671
|
};
|
|
673
|
-
n.api &&
|
|
674
|
-
function f(
|
|
675
|
-
v("change",
|
|
676
|
-
n.optionClick && n.optionClick(
|
|
672
|
+
n.api && h();
|
|
673
|
+
function f(w) {
|
|
674
|
+
v("change", w), u.value && we(() => {
|
|
675
|
+
n.optionClick && n.optionClick(u.value), u.value = null;
|
|
677
676
|
});
|
|
678
677
|
}
|
|
679
|
-
const
|
|
680
|
-
function
|
|
681
|
-
|
|
678
|
+
const u = P(null);
|
|
679
|
+
function p(w) {
|
|
680
|
+
u.value = w;
|
|
682
681
|
}
|
|
683
|
-
const
|
|
684
|
-
if (
|
|
682
|
+
const b = n.labelValue.label.split("-"), C = (w) => {
|
|
683
|
+
if (b.length == 1) {
|
|
685
684
|
if (n.changeLocal)
|
|
686
|
-
return s(
|
|
687
|
-
let
|
|
688
|
-
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 + "";
|
|
689
688
|
} else {
|
|
690
|
-
let
|
|
691
|
-
return
|
|
692
|
-
|
|
693
|
-
}),
|
|
689
|
+
let k = [];
|
|
690
|
+
return b.forEach((j) => {
|
|
691
|
+
k.push(w[j]);
|
|
692
|
+
}), k.join("-");
|
|
694
693
|
}
|
|
695
694
|
};
|
|
696
|
-
function
|
|
697
|
-
let
|
|
698
|
-
l.value =
|
|
699
|
-
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);
|
|
700
699
|
});
|
|
701
700
|
}
|
|
702
|
-
function E(
|
|
703
|
-
v("change", r.value ?
|
|
704
|
-
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);
|
|
705
704
|
});
|
|
706
705
|
}
|
|
707
|
-
function V(
|
|
708
|
-
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]);
|
|
709
708
|
}
|
|
710
|
-
function
|
|
711
|
-
return
|
|
712
|
-
...
|
|
713
|
-
label: k
|
|
714
|
-
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]
|
|
715
714
|
}));
|
|
716
715
|
}
|
|
717
|
-
const I =
|
|
718
|
-
I.value =
|
|
716
|
+
const I = P([]), G = n.data ? n.data : g.value;
|
|
717
|
+
I.value = Y(G), Pe(
|
|
719
718
|
() => n.data ? n.data : g.value,
|
|
720
|
-
(
|
|
721
|
-
var
|
|
722
|
-
const
|
|
723
|
-
if (
|
|
724
|
-
I.value =
|
|
719
|
+
(w) => {
|
|
720
|
+
var j;
|
|
721
|
+
const k = Y(w);
|
|
722
|
+
if (k.length !== I.value.length)
|
|
723
|
+
I.value = k;
|
|
725
724
|
else {
|
|
726
725
|
let te = !1;
|
|
727
|
-
for (let
|
|
728
|
-
if (
|
|
726
|
+
for (let $ = 0; $ < k.length; $++)
|
|
727
|
+
if (k[$].value !== ((j = I.value[$]) == null ? void 0 : j.value)) {
|
|
729
728
|
te = !0;
|
|
730
729
|
break;
|
|
731
730
|
}
|
|
732
|
-
te && (I.value =
|
|
731
|
+
te && (I.value = k);
|
|
733
732
|
}
|
|
734
733
|
},
|
|
735
734
|
{ deep: !0 }
|
|
736
735
|
);
|
|
737
|
-
const
|
|
738
|
-
return (
|
|
739
|
-
const
|
|
740
|
-
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({
|
|
741
740
|
key: 0,
|
|
742
|
-
options:
|
|
741
|
+
options: _.value,
|
|
743
742
|
modelValue: l.value,
|
|
744
|
-
"onUpdate:modelValue":
|
|
745
|
-
},
|
|
743
|
+
"onUpdate:modelValue": k[1] || (k[1] = (z) => l.value = z)
|
|
744
|
+
}, H(a), {
|
|
746
745
|
filterable: "",
|
|
747
746
|
"collapse-tags": "",
|
|
748
747
|
"collapse-tags-tooltip": "",
|
|
749
748
|
clearable: "",
|
|
750
749
|
onChange: f,
|
|
751
750
|
onClear: f
|
|
752
|
-
}),
|
|
751
|
+
}), lt({
|
|
753
752
|
default: D(({ item: z }) => [
|
|
754
753
|
re("div", {
|
|
755
|
-
onClick: (
|
|
754
|
+
onClick: (he) => p(z)
|
|
756
755
|
}, Q(z.label), 9, sn)
|
|
757
756
|
]),
|
|
758
757
|
_: 2
|
|
759
758
|
}, [
|
|
760
|
-
|
|
759
|
+
H(a).multiple != null ? {
|
|
761
760
|
name: "header",
|
|
762
761
|
fn: D(() => [
|
|
763
|
-
ee(
|
|
764
|
-
|
|
762
|
+
ee(w.$slots, "header", {}, () => [
|
|
763
|
+
M(j, {
|
|
765
764
|
class: "mgl20",
|
|
766
|
-
modelValue:
|
|
767
|
-
"onUpdate:modelValue":
|
|
768
|
-
onChange:
|
|
765
|
+
modelValue: m.value,
|
|
766
|
+
"onUpdate:modelValue": k[0] || (k[0] = (z) => m.value = z),
|
|
767
|
+
onChange: x
|
|
769
768
|
}, {
|
|
770
769
|
default: D(() => [
|
|
771
|
-
ne(Q(
|
|
770
|
+
ne(Q(w.$t("quan-xuan")), 1)
|
|
772
771
|
]),
|
|
773
772
|
_: 1
|
|
774
773
|
}, 8, ["modelValue"])
|
|
@@ -776,34 +775,34 @@ const Se = (e, t) => {
|
|
|
776
775
|
]),
|
|
777
776
|
key: "0"
|
|
778
777
|
} : void 0
|
|
779
|
-
]), 1040, ["options", "modelValue"])) : (L(),
|
|
778
|
+
]), 1040, ["options", "modelValue"])) : (L(), N(ye, fe({
|
|
780
779
|
key: 1,
|
|
781
780
|
modelValue: l.value,
|
|
782
|
-
"onUpdate:modelValue":
|
|
781
|
+
"onUpdate:modelValue": k[3] || (k[3] = (z) => l.value = z),
|
|
783
782
|
filterable: "",
|
|
784
783
|
"collapse-tags": "",
|
|
785
784
|
"collapse-tags-tooltip": "",
|
|
786
|
-
"filter-method":
|
|
785
|
+
"filter-method": H(a).remote != null ? void 0 : (z) => i.value = z,
|
|
787
786
|
clearable: ""
|
|
788
|
-
},
|
|
787
|
+
}, H(a), { onClear: e.optionClick }), {
|
|
789
788
|
default: D(() => [
|
|
790
|
-
|
|
791
|
-
|
|
789
|
+
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? ee(w.$slots, "header", { key: 0 }, () => [
|
|
790
|
+
M(j, {
|
|
792
791
|
class: "mgl20",
|
|
793
|
-
modelValue:
|
|
794
|
-
"onUpdate:modelValue":
|
|
795
|
-
onChange:
|
|
792
|
+
modelValue: m.value,
|
|
793
|
+
"onUpdate:modelValue": k[2] || (k[2] = (z) => m.value = z),
|
|
794
|
+
onChange: x
|
|
796
795
|
}, {
|
|
797
796
|
default: D(() => [
|
|
798
|
-
ne(Q(
|
|
797
|
+
ne(Q(w.$t("quan-xuan")), 1)
|
|
799
798
|
]),
|
|
800
799
|
_: 1
|
|
801
800
|
}, 8, ["modelValue"])
|
|
802
801
|
], !0) : de("", !0),
|
|
803
|
-
(L(!0), ie(
|
|
804
|
-
key:
|
|
805
|
-
label:
|
|
806
|
-
disabled:
|
|
802
|
+
(L(!0), ie(Oe, null, at(y.value, (z, he) => (L(), N($, {
|
|
803
|
+
key: he,
|
|
804
|
+
label: C(z),
|
|
805
|
+
disabled: H(a).multiple != null && e.maxLimit > 0 ? V(z) : !1,
|
|
807
806
|
onClick: Ve((ue) => E(z), ["stop"]),
|
|
808
807
|
value: r.value ? z : z[e.labelValue.value]
|
|
809
808
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
@@ -813,7 +812,7 @@ const Se = (e, t) => {
|
|
|
813
812
|
};
|
|
814
813
|
}
|
|
815
814
|
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-51bd1467"]]);
|
|
816
|
-
const un =
|
|
815
|
+
const un = nt({
|
|
817
816
|
props: {
|
|
818
817
|
name: {
|
|
819
818
|
tyepe: String,
|
|
@@ -822,10 +821,10 @@ const un = ot({
|
|
|
822
821
|
}
|
|
823
822
|
});
|
|
824
823
|
function dn(e, t, n, a, s, o) {
|
|
825
|
-
const l =
|
|
826
|
-
return L(),
|
|
824
|
+
const l = O("el-icon");
|
|
825
|
+
return L(), N(l, { class: "cmp-icon" }, {
|
|
827
826
|
default: D(() => [
|
|
828
|
-
(L(),
|
|
827
|
+
(L(), N(st(e.name)))
|
|
829
828
|
]),
|
|
830
829
|
_: 1
|
|
831
830
|
});
|
|
@@ -834,17 +833,17 @@ const yt = /* @__PURE__ */ Se(un, [["render", dn], ["__scopeId", "data-v-733f9da
|
|
|
834
833
|
__name: "index",
|
|
835
834
|
emits: ["ok", "no"],
|
|
836
835
|
setup(e, { emit: t }) {
|
|
837
|
-
const n = t, a =
|
|
836
|
+
const n = t, a = Re(() => {
|
|
838
837
|
n("ok");
|
|
839
838
|
}, 500);
|
|
840
839
|
function s() {
|
|
841
840
|
n("no");
|
|
842
841
|
}
|
|
843
842
|
return (o, l) => {
|
|
844
|
-
const r =
|
|
843
|
+
const r = O("el-popconfirm");
|
|
845
844
|
return L(), ie("span", null, [
|
|
846
|
-
|
|
847
|
-
onConfirm:
|
|
845
|
+
M(r, fe(o.$attrs, {
|
|
846
|
+
onConfirm: H(a),
|
|
848
847
|
onCancel: s
|
|
849
848
|
}), {
|
|
850
849
|
reference: D(() => [
|
|
@@ -874,7 +873,7 @@ const fn = ["accept"], hn = {
|
|
|
874
873
|
},
|
|
875
874
|
emits: ["fileChange"],
|
|
876
875
|
setup(e, { emit: t }) {
|
|
877
|
-
const n = e, a =
|
|
876
|
+
const n = e, a = P(null), s = P(!1);
|
|
878
877
|
async function o(l) {
|
|
879
878
|
s.value = !0;
|
|
880
879
|
let r = l.target.files[0];
|
|
@@ -888,9 +887,9 @@ const fn = ["accept"], hn = {
|
|
|
888
887
|
});
|
|
889
888
|
}
|
|
890
889
|
return (l, r) => {
|
|
891
|
-
const i =
|
|
890
|
+
const i = O("el-button");
|
|
892
891
|
return L(), ie("span", null, [
|
|
893
|
-
|
|
892
|
+
M(i, {
|
|
894
893
|
type: "primary",
|
|
895
894
|
loading: s.value,
|
|
896
895
|
class: "mgr10",
|
|
@@ -913,7 +912,7 @@ const fn = ["accept"], hn = {
|
|
|
913
912
|
};
|
|
914
913
|
}
|
|
915
914
|
}, Jn = /* @__PURE__ */ Se(hn, [["__scopeId", "data-v-cf92fafe"]]);
|
|
916
|
-
function
|
|
915
|
+
function Ue(e) {
|
|
917
916
|
let t = {};
|
|
918
917
|
return e.forEach((n) => {
|
|
919
918
|
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
@@ -923,8 +922,8 @@ function Pe(e) {
|
|
|
923
922
|
else if (s == "date")
|
|
924
923
|
if (r.includes("range")) {
|
|
925
924
|
const [i, y] = a;
|
|
926
|
-
let [
|
|
927
|
-
|
|
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;
|
|
928
927
|
} else
|
|
929
928
|
t[a] = l;
|
|
930
929
|
else
|
|
@@ -941,84 +940,88 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
941
940
|
},
|
|
942
941
|
emits: ["confirm", "reset", "visibleChange"],
|
|
943
942
|
setup(e, { expose: t, emit: n }) {
|
|
944
|
-
const a = e, s = n, o =
|
|
945
|
-
|
|
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() {
|
|
946
949
|
s("confirm");
|
|
947
950
|
}
|
|
948
|
-
function
|
|
949
|
-
|
|
951
|
+
function v(b) {
|
|
952
|
+
b.option.onClear && b.option.onClear(), s("confirm");
|
|
950
953
|
}
|
|
951
|
-
function
|
|
954
|
+
function g() {
|
|
952
955
|
s("reset");
|
|
953
956
|
}
|
|
954
|
-
function
|
|
957
|
+
function h() {
|
|
955
958
|
s("confirm");
|
|
956
959
|
}
|
|
957
|
-
function
|
|
958
|
-
return
|
|
960
|
+
function f() {
|
|
961
|
+
return Ue(a.form.items);
|
|
959
962
|
}
|
|
960
|
-
const
|
|
961
|
-
function
|
|
962
|
-
a.form.items.forEach((
|
|
963
|
-
const
|
|
964
|
-
|
|
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);
|
|
965
968
|
});
|
|
966
969
|
}
|
|
967
|
-
return t({ getPrm:
|
|
968
|
-
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");
|
|
969
972
|
return L(), ie("div", {
|
|
970
973
|
class: "searchBar-container mgt10 mgb10",
|
|
971
|
-
onKeydown: Dt(
|
|
974
|
+
onKeydown: Dt(m, ["enter"])
|
|
972
975
|
}, [
|
|
973
976
|
re("div", {
|
|
974
977
|
class: "searchBar",
|
|
975
978
|
style: zt({ height: o.value ? "auto" : "42px" })
|
|
976
979
|
}, [
|
|
977
|
-
|
|
980
|
+
M(Y, {
|
|
978
981
|
inline: "",
|
|
979
982
|
model: e.form.data
|
|
980
983
|
}, {
|
|
981
984
|
default: D(() => [
|
|
982
|
-
(L(!0), ie(
|
|
983
|
-
key:
|
|
985
|
+
(L(!0), ie(Oe, null, at(e.form.items.filter((_) => !_.hidden), (_) => (L(), ie(Oe, {
|
|
986
|
+
key: _.key
|
|
984
987
|
}, [
|
|
985
|
-
|
|
988
|
+
_.type == "br" ? (L(), ie("br", mn)) : (L(), N(V, {
|
|
986
989
|
key: 1,
|
|
987
|
-
label:
|
|
990
|
+
label: _.name
|
|
988
991
|
}, {
|
|
989
992
|
default: D(() => {
|
|
990
|
-
var
|
|
993
|
+
var w, k;
|
|
991
994
|
return [
|
|
992
|
-
|
|
995
|
+
_.type === "input" ? (L(), N(x, {
|
|
993
996
|
key: 0,
|
|
994
|
-
modelValue:
|
|
995
|
-
"onUpdate:modelValue": (
|
|
996
|
-
class:
|
|
997
|
-
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"),
|
|
998
1001
|
clearable: ""
|
|
999
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) :
|
|
1000
|
-
|
|
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({
|
|
1001
1004
|
key: 2,
|
|
1002
|
-
class: ((
|
|
1003
|
-
modelValue:
|
|
1004
|
-
"onUpdate:modelValue": (
|
|
1005
|
-
}, { ref_for: !0 },
|
|
1006
|
-
onChange:
|
|
1007
|
-
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(_)
|
|
1008
1011
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : de("", !0),
|
|
1009
|
-
|
|
1012
|
+
_.type === "date" ? (L(), N(E, fe({
|
|
1010
1013
|
key: 3,
|
|
1011
|
-
class:
|
|
1012
|
-
modelValue:
|
|
1013
|
-
"onUpdate:modelValue": (
|
|
1014
|
-
"value-format":
|
|
1015
|
-
type:
|
|
1016
|
-
onFocus: (
|
|
1017
|
-
onChange: (
|
|
1018
|
-
placeholder:
|
|
1019
|
-
"start-placeholder":
|
|
1020
|
-
"end-placeholder":
|
|
1021
|
-
}, 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)
|
|
1022
1025
|
];
|
|
1023
1026
|
}),
|
|
1024
1027
|
_: 2
|
|
@@ -1030,49 +1033,49 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1030
1033
|
], 4),
|
|
1031
1034
|
re("div", gn, [
|
|
1032
1035
|
re("div", pn, [
|
|
1033
|
-
ee(
|
|
1036
|
+
ee(b.$slots, "table-header-left", {}, void 0, !0)
|
|
1034
1037
|
]),
|
|
1035
1038
|
re("div", yn, [
|
|
1036
|
-
|
|
1039
|
+
M(I, {
|
|
1037
1040
|
underline: "never",
|
|
1038
1041
|
class: "mgr10",
|
|
1039
|
-
onClick:
|
|
1042
|
+
onClick: C[0] || (C[0] = () => {
|
|
1040
1043
|
s("visibleChange", !o.value), o.value = !o.value;
|
|
1041
1044
|
})
|
|
1042
1045
|
}, {
|
|
1043
1046
|
default: D(() => [
|
|
1044
|
-
|
|
1047
|
+
M(yt, {
|
|
1045
1048
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1046
1049
|
}, null, 8, ["name"]),
|
|
1047
|
-
ne(" " + Q(
|
|
1050
|
+
ne(" " + Q(y.value), 1)
|
|
1048
1051
|
]),
|
|
1049
1052
|
_: 1
|
|
1050
1053
|
}),
|
|
1051
|
-
|
|
1054
|
+
M(G, {
|
|
1052
1055
|
type: "primary",
|
|
1053
|
-
onClick:
|
|
1056
|
+
onClick: m
|
|
1054
1057
|
}, {
|
|
1055
1058
|
default: D(() => [
|
|
1056
|
-
ne(Q(
|
|
1059
|
+
ne(Q(b.$t("shai-xuan")), 1)
|
|
1057
1060
|
]),
|
|
1058
1061
|
_: 1
|
|
1059
1062
|
}),
|
|
1060
|
-
|
|
1063
|
+
M(G, {
|
|
1061
1064
|
type: "primary",
|
|
1062
|
-
onClick:
|
|
1065
|
+
onClick: g
|
|
1063
1066
|
}, {
|
|
1064
1067
|
default: D(() => [
|
|
1065
|
-
ne(Q(
|
|
1068
|
+
ne(Q(b.$t("chong-zhi")), 1)
|
|
1066
1069
|
]),
|
|
1067
1070
|
_: 1
|
|
1068
1071
|
}),
|
|
1069
|
-
ee(
|
|
1072
|
+
ee(b.$slots, "btn", {}, void 0, !0)
|
|
1070
1073
|
])
|
|
1071
1074
|
])
|
|
1072
1075
|
], 32);
|
|
1073
1076
|
};
|
|
1074
1077
|
}
|
|
1075
|
-
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-
|
|
1078
|
+
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]), vt = {
|
|
1076
1079
|
// 分页参数名
|
|
1077
1080
|
pageNoKey: "pageNo",
|
|
1078
1081
|
// 页码参数名
|
|
@@ -1156,64 +1159,64 @@ const Cn = { class: "center" }, xn = {
|
|
|
1156
1159
|
}
|
|
1157
1160
|
},
|
|
1158
1161
|
setup(e, { expose: t }) {
|
|
1159
|
-
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([]);
|
|
1160
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 = []);
|
|
1161
1164
|
const y = ce(() => {
|
|
1162
1165
|
const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1163
1166
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1164
|
-
}),
|
|
1167
|
+
}), m = ct(l.searchForm.items), v = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ie({
|
|
1165
1168
|
[v]: 1,
|
|
1166
1169
|
[g]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1167
1170
|
total: 0
|
|
1168
|
-
}), f =
|
|
1171
|
+
}), f = P(null), u = P(null), p = P(450), b = Re(() => {
|
|
1169
1172
|
we(() => {
|
|
1170
|
-
if (!
|
|
1173
|
+
if (!u.value)
|
|
1171
1174
|
return;
|
|
1172
|
-
const
|
|
1173
|
-
|
|
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);
|
|
1174
1177
|
});
|
|
1175
|
-
}, 100),
|
|
1176
|
-
|
|
1177
|
-
},
|
|
1178
|
+
}, 100), C = () => {
|
|
1179
|
+
b();
|
|
1180
|
+
}, x = () => {
|
|
1178
1181
|
if (!l.searchForm.enableCellCopy && !o.enableCellCopy)
|
|
1179
1182
|
return !1;
|
|
1180
1183
|
const d = f.value;
|
|
1181
1184
|
if (!d || !d.$el)
|
|
1182
1185
|
return !1;
|
|
1183
|
-
const
|
|
1184
|
-
return
|
|
1186
|
+
const c = d.$el;
|
|
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;
|
|
1185
1188
|
};
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
+
ot(() => {
|
|
1190
|
+
b(), window.addEventListener("resize", C), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", He), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1191
|
+
x();
|
|
1189
1192
|
}, 500));
|
|
1190
|
-
}),
|
|
1193
|
+
}), Mt(() => {
|
|
1191
1194
|
(l.searchForm.enableCellCopy || o.enableCellCopy) && setTimeout(() => {
|
|
1192
|
-
|
|
1195
|
+
x();
|
|
1193
1196
|
}, 500);
|
|
1194
|
-
}),
|
|
1195
|
-
if (window.removeEventListener("resize",
|
|
1196
|
-
document.removeEventListener("mouseup",
|
|
1197
|
+
}), Ot(() => {
|
|
1198
|
+
if (window.removeEventListener("resize", C), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
1199
|
+
document.removeEventListener("mouseup", He), document.removeEventListener("mousedown", Ne);
|
|
1197
1200
|
const d = f.value;
|
|
1198
1201
|
if (d && d.$el) {
|
|
1199
|
-
const
|
|
1200
|
-
|
|
1202
|
+
const c = d.$el;
|
|
1203
|
+
c.removeEventListener("mousedown", z), c.removeEventListener("mousemove", he), c.removeEventListener("mouseup", ue), c.removeEventListener("keydown", Te);
|
|
1201
1204
|
}
|
|
1202
1205
|
}
|
|
1203
1206
|
});
|
|
1204
|
-
const E = ce(() => te.value.height ||
|
|
1207
|
+
const E = ce(() => te.value.height || p.value);
|
|
1205
1208
|
let V;
|
|
1206
|
-
async function
|
|
1207
|
-
const { dataFormat:
|
|
1209
|
+
async function Y(d) {
|
|
1210
|
+
const { dataFormat: c } = l.tableConfig;
|
|
1208
1211
|
d[v] != 1 && (d.nextSearchAfter = V), r.value = !0;
|
|
1209
1212
|
const { code: S, data: T = {} } = await l.api(d).finally(() => {
|
|
1210
1213
|
r.value = !1, l.searchForm.selections = [];
|
|
1211
1214
|
});
|
|
1212
1215
|
if (S == 200) {
|
|
1213
|
-
let
|
|
1216
|
+
let R = [];
|
|
1214
1217
|
for (const q of o.responseDataKeys.rows)
|
|
1215
1218
|
if (T[q]) {
|
|
1216
|
-
|
|
1219
|
+
R = T[q];
|
|
1217
1220
|
break;
|
|
1218
1221
|
}
|
|
1219
1222
|
let Z = 0;
|
|
@@ -1222,49 +1225,49 @@ const Cn = { class: "center" }, xn = {
|
|
|
1222
1225
|
Z = T[q];
|
|
1223
1226
|
break;
|
|
1224
1227
|
}
|
|
1225
|
-
i.value =
|
|
1228
|
+
i.value = c ? c(R) : R, h.total = Z, V = T.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
|
|
1226
1229
|
setTimeout(() => {
|
|
1227
|
-
|
|
1230
|
+
x();
|
|
1228
1231
|
}, 100);
|
|
1229
1232
|
});
|
|
1230
1233
|
}
|
|
1231
1234
|
}
|
|
1232
1235
|
function I(d = {}) {
|
|
1233
|
-
const { searchData:
|
|
1234
|
-
|
|
1235
|
-
...
|
|
1236
|
-
...
|
|
1236
|
+
const { searchData: c = () => ({}) } = l.tableConfig, S = c();
|
|
1237
|
+
Y({
|
|
1238
|
+
...h,
|
|
1239
|
+
...Ue(l.searchForm.items),
|
|
1237
1240
|
...d,
|
|
1238
1241
|
...S
|
|
1239
1242
|
});
|
|
1240
1243
|
}
|
|
1241
|
-
function
|
|
1244
|
+
function G() {
|
|
1242
1245
|
const { reset: d } = l.tableConfig;
|
|
1243
|
-
d && d(), l.searchForm.items.forEach((
|
|
1244
|
-
const S =
|
|
1245
|
-
S && (
|
|
1246
|
+
d && d(), l.searchForm.items.forEach((c) => {
|
|
1247
|
+
const S = m.find((T) => Xe(c.key) && Xe(T.key) ? c.key.join(",") == T.key.join(",") : T.key == c.key);
|
|
1248
|
+
S && (c.value = S.value);
|
|
1246
1249
|
}), I();
|
|
1247
1250
|
}
|
|
1248
1251
|
l.api && l.immediate && I();
|
|
1249
|
-
function
|
|
1250
|
-
return { ...
|
|
1252
|
+
function _() {
|
|
1253
|
+
return { ...h, ...Ue(l.searchForm.items) };
|
|
1251
1254
|
}
|
|
1252
|
-
const
|
|
1255
|
+
const w = () => {
|
|
1253
1256
|
const d = f.value;
|
|
1254
1257
|
d && d.clearSort();
|
|
1255
|
-
},
|
|
1258
|
+
}, k = Ie({
|
|
1256
1259
|
storage: !0
|
|
1257
|
-
}),
|
|
1260
|
+
}), j = Ie({
|
|
1258
1261
|
drag: !0,
|
|
1259
1262
|
resizable: !0,
|
|
1260
1263
|
maxFixedSize: 0
|
|
1261
1264
|
}), te = ce(() => {
|
|
1262
|
-
const { customConfig: d, columnConfig:
|
|
1265
|
+
const { customConfig: d, columnConfig: c, ...S } = l.tableConfig;
|
|
1263
1266
|
return {
|
|
1264
1267
|
headerAlign: "left",
|
|
1265
1268
|
align: "center",
|
|
1266
|
-
customConfig: { ...
|
|
1267
|
-
columnConfig: { ...
|
|
1269
|
+
customConfig: { ...k, ...d },
|
|
1270
|
+
columnConfig: { ...j, ...c },
|
|
1268
1271
|
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1269
1272
|
"virtual-x-config": {
|
|
1270
1273
|
enabled: !1,
|
|
@@ -1274,7 +1277,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1274
1277
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1275
1278
|
...S
|
|
1276
1279
|
};
|
|
1277
|
-
}),
|
|
1280
|
+
}), $ = Ie({
|
|
1278
1281
|
isSelecting: !1,
|
|
1279
1282
|
// 是否正在选择
|
|
1280
1283
|
startCell: null,
|
|
@@ -1284,63 +1287,63 @@ const Cn = { class: "center" }, xn = {
|
|
|
1284
1287
|
selectedCells: []
|
|
1285
1288
|
// 选中的单元格列表 [{ rowIndex, colIndex }]
|
|
1286
1289
|
}), ye = (d) => {
|
|
1287
|
-
const
|
|
1288
|
-
if (!
|
|
1290
|
+
const c = d.closest(".vxe-body--column");
|
|
1291
|
+
if (!c || c.classList.contains("col--checkbox") || c.classList.contains("col--seq"))
|
|
1289
1292
|
return null;
|
|
1290
|
-
const S =
|
|
1293
|
+
const S = c.closest(".vxe-body--row");
|
|
1291
1294
|
if (!S)
|
|
1292
1295
|
return null;
|
|
1293
1296
|
const T = f.value;
|
|
1294
1297
|
if (!T)
|
|
1295
1298
|
return null;
|
|
1296
|
-
let
|
|
1299
|
+
let R = -1;
|
|
1297
1300
|
const Z = S.getAttribute("data-rowid");
|
|
1298
1301
|
if (Z != null)
|
|
1299
|
-
|
|
1302
|
+
R = parseInt(Z, 10);
|
|
1300
1303
|
else {
|
|
1301
1304
|
const A = S.parentElement;
|
|
1302
|
-
|
|
1305
|
+
R = Array.from(A.querySelectorAll(".vxe-body--row")).indexOf(S);
|
|
1303
1306
|
}
|
|
1304
|
-
if (
|
|
1307
|
+
if (R < 0)
|
|
1305
1308
|
return null;
|
|
1306
1309
|
let q = -1;
|
|
1307
|
-
const se =
|
|
1310
|
+
const se = c.getAttribute("data-colid");
|
|
1308
1311
|
if (se && (q = T.getColumns().findIndex((F) => F.id === se)), q < 0) {
|
|
1309
|
-
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(
|
|
1310
|
-
if (
|
|
1311
|
-
const X =
|
|
1312
|
-
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]));
|
|
1313
1316
|
} else if (J) {
|
|
1314
|
-
const X =
|
|
1315
|
-
F < X.length && (q =
|
|
1317
|
+
const X = B.filter((W) => W.fixed === "right");
|
|
1318
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1316
1319
|
} else {
|
|
1317
1320
|
const X = l.searchForm.showCheckBox ? 1 : 0;
|
|
1318
|
-
q =
|
|
1321
|
+
q = B.filter((oe) => oe.fixed === "left").length + F - X;
|
|
1319
1322
|
}
|
|
1320
1323
|
}
|
|
1321
|
-
return q < 0 ? null : { rowIndex:
|
|
1324
|
+
return q < 0 ? null : { rowIndex: R, colIndex: q, cell: c };
|
|
1322
1325
|
}, z = (d) => {
|
|
1323
|
-
const
|
|
1324
|
-
if (!
|
|
1326
|
+
const c = ye(d.target);
|
|
1327
|
+
if (!c) {
|
|
1325
1328
|
ve();
|
|
1326
1329
|
return;
|
|
1327
1330
|
}
|
|
1328
|
-
|
|
1329
|
-
rowIndex:
|
|
1330
|
-
colIndex:
|
|
1331
|
-
},
|
|
1332
|
-
},
|
|
1333
|
-
if (
|
|
1331
|
+
$.isSelecting = !0, $.startCell = {
|
|
1332
|
+
rowIndex: c.rowIndex,
|
|
1333
|
+
colIndex: c.colIndex
|
|
1334
|
+
}, $.endCell = { ...$.startCell }, Ee(), Ke();
|
|
1335
|
+
}, he = (d) => {
|
|
1336
|
+
if (!$.isSelecting)
|
|
1334
1337
|
return;
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
rowIndex:
|
|
1338
|
-
colIndex:
|
|
1339
|
-
}, Ee(),
|
|
1338
|
+
const c = ye(d.target);
|
|
1339
|
+
c && ($.endCell = {
|
|
1340
|
+
rowIndex: c.rowIndex,
|
|
1341
|
+
colIndex: c.colIndex
|
|
1342
|
+
}, Ee(), Ke());
|
|
1340
1343
|
}, ue = () => {
|
|
1341
|
-
|
|
1344
|
+
$.isSelecting = !1;
|
|
1342
1345
|
}, ve = () => {
|
|
1343
|
-
|
|
1346
|
+
$.selectedCells = [], $.startCell = null, $.endCell = null;
|
|
1344
1347
|
const d = f.value;
|
|
1345
1348
|
if (!d)
|
|
1346
1349
|
return;
|
|
@@ -1356,116 +1359,116 @@ const Cn = { class: "center" }, xn = {
|
|
|
1356
1359
|
);
|
|
1357
1360
|
});
|
|
1358
1361
|
}, Ee = () => {
|
|
1359
|
-
if (
|
|
1360
|
-
|
|
1362
|
+
if (!$.startCell || !$.endCell) {
|
|
1363
|
+
$.selectedCells = [];
|
|
1361
1364
|
return;
|
|
1362
1365
|
}
|
|
1363
|
-
const d =
|
|
1364
|
-
|
|
1365
|
-
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++)
|
|
1366
1369
|
for (let F = q; F <= se; F++)
|
|
1367
|
-
|
|
1370
|
+
$.selectedCells.push({
|
|
1368
1371
|
rowIndex: A,
|
|
1369
1372
|
colIndex: F
|
|
1370
1373
|
});
|
|
1371
|
-
},
|
|
1374
|
+
}, Ke = () => {
|
|
1372
1375
|
we(() => {
|
|
1373
1376
|
const d = f.value;
|
|
1374
1377
|
if (!d)
|
|
1375
1378
|
return;
|
|
1376
|
-
const
|
|
1377
|
-
if (
|
|
1379
|
+
const c = d.$el;
|
|
1380
|
+
if (c.querySelectorAll(
|
|
1378
1381
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1379
|
-
).forEach((
|
|
1380
|
-
|
|
1382
|
+
).forEach((K) => {
|
|
1383
|
+
K.classList.remove(
|
|
1381
1384
|
"cell-selected",
|
|
1382
1385
|
"cell-border-top",
|
|
1383
1386
|
"cell-border-right",
|
|
1384
1387
|
"cell-border-bottom",
|
|
1385
1388
|
"cell-border-left"
|
|
1386
1389
|
);
|
|
1387
|
-
}),
|
|
1390
|
+
}), $.selectedCells.length === 0)
|
|
1388
1391
|
return;
|
|
1389
|
-
const S = d.getColumns(), T =
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
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 = [
|
|
1393
|
+
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1394
|
+
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1395
|
+
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1393
1396
|
].filter(Boolean);
|
|
1394
|
-
|
|
1395
|
-
const
|
|
1396
|
-
if (!
|
|
1397
|
+
$.selectedCells.forEach(({ rowIndex: K, colIndex: J }) => {
|
|
1398
|
+
const B = S[J];
|
|
1399
|
+
if (!B)
|
|
1397
1400
|
return;
|
|
1398
|
-
const X =
|
|
1401
|
+
const X = B.fixed === "left", W = B.fixed === "right";
|
|
1399
1402
|
for (const oe of F) {
|
|
1400
|
-
const xe = oe.querySelectorAll(".vxe-body--row")[
|
|
1403
|
+
const xe = oe.querySelectorAll(".vxe-body--row")[K];
|
|
1401
1404
|
if (!xe)
|
|
1402
1405
|
continue;
|
|
1403
|
-
const
|
|
1404
|
-
let
|
|
1406
|
+
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1407
|
+
let U = null;
|
|
1405
1408
|
if (X && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1406
|
-
const le = S.filter((ae) => ae.fixed === "left").indexOf(
|
|
1407
|
-
|
|
1408
|
-
} else if (
|
|
1409
|
-
const le = S.filter((ae) => ae.fixed === "right").indexOf(
|
|
1410
|
-
|
|
1411
|
-
} else if (!X && !
|
|
1412
|
-
const
|
|
1413
|
-
|
|
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];
|
|
1414
1417
|
}
|
|
1415
|
-
if (
|
|
1416
|
-
|
|
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");
|
|
1417
1420
|
break;
|
|
1418
1421
|
}
|
|
1419
1422
|
}
|
|
1420
1423
|
});
|
|
1421
1424
|
});
|
|
1422
1425
|
}, wt = async () => {
|
|
1423
|
-
if (
|
|
1426
|
+
if ($.selectedCells.length === 0)
|
|
1424
1427
|
return;
|
|
1425
1428
|
const d = f.value;
|
|
1426
1429
|
if (!d)
|
|
1427
1430
|
return;
|
|
1428
|
-
const
|
|
1431
|
+
const c = d.$el, S = d.getColumns(), T = [...new Set($.selectedCells.map((A) => A.rowIndex))].sort(
|
|
1429
1432
|
(A, F) => A - F
|
|
1430
|
-
),
|
|
1433
|
+
), R = [...new Set($.selectedCells.map((A) => A.colIndex))].sort(
|
|
1431
1434
|
(A, F) => A - F
|
|
1432
1435
|
), Z = [
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
+
c.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1437
|
+
c.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1438
|
+
c.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1436
1439
|
].filter(Boolean), q = [];
|
|
1437
1440
|
T.forEach((A) => {
|
|
1438
1441
|
const F = [];
|
|
1439
|
-
|
|
1440
|
-
const J = S[
|
|
1442
|
+
R.forEach((K) => {
|
|
1443
|
+
const J = S[K];
|
|
1441
1444
|
if (!J) {
|
|
1442
1445
|
F.push("");
|
|
1443
1446
|
return;
|
|
1444
1447
|
}
|
|
1445
|
-
const
|
|
1446
|
-
let
|
|
1448
|
+
const B = J.fixed === "left", X = J.fixed === "right";
|
|
1449
|
+
let W = "";
|
|
1447
1450
|
for (const oe of Z) {
|
|
1448
1451
|
const xe = oe.querySelectorAll(".vxe-body--row")[A];
|
|
1449
1452
|
if (!xe)
|
|
1450
1453
|
continue;
|
|
1451
|
-
const
|
|
1452
|
-
let
|
|
1453
|
-
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")) {
|
|
1454
1457
|
const le = S.filter((ae) => ae.fixed === "left").indexOf(J);
|
|
1455
|
-
|
|
1458
|
+
U = me[le];
|
|
1456
1459
|
} else if (X && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1457
1460
|
const le = S.filter((ae) => ae.fixed === "right").indexOf(J);
|
|
1458
|
-
|
|
1459
|
-
} else if (!
|
|
1460
|
-
const
|
|
1461
|
-
|
|
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];
|
|
1462
1465
|
}
|
|
1463
|
-
if (
|
|
1464
|
-
|
|
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, " ");
|
|
1465
1468
|
break;
|
|
1466
1469
|
}
|
|
1467
1470
|
}
|
|
1468
|
-
F.push(
|
|
1471
|
+
F.push(W);
|
|
1469
1472
|
}), q.push(F.join(" "));
|
|
1470
1473
|
});
|
|
1471
1474
|
const se = q.join(`
|
|
@@ -1476,54 +1479,54 @@ const Cn = { class: "center" }, xn = {
|
|
|
1476
1479
|
console.error("复制失败:", A);
|
|
1477
1480
|
}
|
|
1478
1481
|
}, Te = (d) => {
|
|
1479
|
-
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ?
|
|
1480
|
-
},
|
|
1481
|
-
|
|
1482
|
-
},
|
|
1483
|
-
const
|
|
1484
|
-
if (!
|
|
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) => {
|
|
1486
|
+
const c = f.value;
|
|
1487
|
+
if (!c || !c.$el)
|
|
1485
1488
|
return;
|
|
1486
|
-
|
|
1489
|
+
c.$el.contains(d.target) || ve();
|
|
1487
1490
|
}, Ct = (d) => {
|
|
1488
|
-
|
|
1491
|
+
h[v] = d, I();
|
|
1489
1492
|
}, xt = (d) => {
|
|
1490
|
-
|
|
1493
|
+
h[g] = d, h[v] = 1, I();
|
|
1491
1494
|
};
|
|
1492
|
-
function
|
|
1495
|
+
function We() {
|
|
1493
1496
|
const d = f.value.getCheckboxRecords();
|
|
1494
1497
|
l.searchForm.selections = d;
|
|
1495
1498
|
}
|
|
1496
|
-
const
|
|
1497
|
-
const
|
|
1498
|
-
if (
|
|
1499
|
-
|
|
1499
|
+
const Ze = (d) => {
|
|
1500
|
+
const c = f.value;
|
|
1501
|
+
if (c) {
|
|
1502
|
+
c.toggleCheckboxRow(d);
|
|
1500
1503
|
const S = f.value.getCheckboxRecords();
|
|
1501
1504
|
l.searchForm.selections = S;
|
|
1502
1505
|
}
|
|
1503
1506
|
};
|
|
1504
|
-
return t({ tableRef: f, getList: I, getPrm:
|
|
1507
|
+
return t({ tableRef: f, getList: I, getPrm: _, clearSort: w, calculateTableHeight: b }), (d, c) => {
|
|
1505
1508
|
var A;
|
|
1506
|
-
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");
|
|
1507
1510
|
return L(), ie("div", {
|
|
1508
|
-
class:
|
|
1511
|
+
class: rt({ box: e.searchForm.showShadow })
|
|
1509
1512
|
}, [
|
|
1510
|
-
e.searchForm.showSearch ? (L(),
|
|
1513
|
+
e.searchForm.showSearch ? (L(), N(bn, {
|
|
1511
1514
|
key: 0,
|
|
1512
1515
|
form: e.searchForm,
|
|
1513
|
-
onReset:
|
|
1514
|
-
onConfirm:
|
|
1515
|
-
onVisibleChange:
|
|
1516
|
+
onReset: G,
|
|
1517
|
+
onConfirm: c[1] || (c[1] = (F) => I()),
|
|
1518
|
+
onVisibleChange: H(b)
|
|
1516
1519
|
}, {
|
|
1517
1520
|
btn: D(() => [
|
|
1518
|
-
|
|
1521
|
+
c[3] || (c[3] = re("span", { class: "mgr10" }, null, -1)),
|
|
1519
1522
|
ee(d.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1520
|
-
|
|
1523
|
+
M(S, {
|
|
1521
1524
|
class: "mgl10",
|
|
1522
1525
|
round: "",
|
|
1523
|
-
onClick:
|
|
1526
|
+
onClick: c[0] || (c[0] = (F) => f.value.openCustom())
|
|
1524
1527
|
}, {
|
|
1525
1528
|
default: D(() => [
|
|
1526
|
-
|
|
1529
|
+
M(yt, { name: "Tools" })
|
|
1527
1530
|
]),
|
|
1528
1531
|
_: 1
|
|
1529
1532
|
})
|
|
@@ -1533,9 +1536,9 @@ const Cn = { class: "center" }, xn = {
|
|
|
1533
1536
|
ee(d.$slots, "table-header-left", {}, void 0, !0),
|
|
1534
1537
|
re("div", {
|
|
1535
1538
|
ref_key: "tableContentRef",
|
|
1536
|
-
ref:
|
|
1539
|
+
ref: u
|
|
1537
1540
|
}, [
|
|
1538
|
-
|
|
1541
|
+
M(q, fe({
|
|
1539
1542
|
id: y.value,
|
|
1540
1543
|
ref_key: "tableRef",
|
|
1541
1544
|
ref: f,
|
|
@@ -1544,34 +1547,34 @@ const Cn = { class: "center" }, xn = {
|
|
|
1544
1547
|
border: ""
|
|
1545
1548
|
}, te.value, {
|
|
1546
1549
|
height: E.value,
|
|
1547
|
-
onCheckboxChange:
|
|
1548
|
-
onCheckboxAll:
|
|
1550
|
+
onCheckboxChange: We,
|
|
1551
|
+
onCheckboxAll: We,
|
|
1549
1552
|
onSortChange: (A = te.value["sort-config"]) == null ? void 0 : A.sortChange
|
|
1550
1553
|
}), {
|
|
1551
1554
|
default: D(() => [
|
|
1552
|
-
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (L(),
|
|
1555
|
+
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (L(), N(Z, {
|
|
1553
1556
|
key: 0,
|
|
1554
1557
|
type: "checkbox",
|
|
1555
|
-
width:
|
|
1558
|
+
width: H(a) == "zh_cn" ? 80 : 150,
|
|
1556
1559
|
title: d.$t("xu-hao"),
|
|
1557
1560
|
fixed: "left"
|
|
1558
1561
|
}, {
|
|
1559
|
-
checkbox: D(({ rowIndex: F, row:
|
|
1562
|
+
checkbox: D(({ rowIndex: F, row: K, checked: J, disabled: B, indeterminate: X }) => [
|
|
1560
1563
|
re("div", Cn, [
|
|
1561
|
-
J ? (L(),
|
|
1564
|
+
J ? (L(), N(T, {
|
|
1562
1565
|
key: 0,
|
|
1563
1566
|
checked: !0,
|
|
1564
|
-
disabled:
|
|
1567
|
+
disabled: B,
|
|
1565
1568
|
size: "default",
|
|
1566
|
-
onClick: Ve((
|
|
1567
|
-
}, null, 8, ["disabled", "onClick"])) : (L(),
|
|
1569
|
+
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1570
|
+
}, null, 8, ["disabled", "onClick"])) : (L(), N(T, {
|
|
1568
1571
|
key: 1,
|
|
1569
|
-
disabled:
|
|
1572
|
+
disabled: B,
|
|
1570
1573
|
checked: !1,
|
|
1571
1574
|
size: "default",
|
|
1572
|
-
onClick: Ve((
|
|
1575
|
+
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1573
1576
|
}, null, 8, ["disabled", "onClick"])),
|
|
1574
|
-
|
|
1577
|
+
M(R, {
|
|
1575
1578
|
type: "info",
|
|
1576
1579
|
class: "mgl5"
|
|
1577
1580
|
}, {
|
|
@@ -1589,16 +1592,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1589
1592
|
_: 3
|
|
1590
1593
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1591
1594
|
], 512),
|
|
1592
|
-
e.searchForm.showPage ? (L(),
|
|
1595
|
+
e.searchForm.showPage ? (L(), N(se, {
|
|
1593
1596
|
key: 1,
|
|
1594
|
-
"current-page":
|
|
1595
|
-
"onUpdate:currentPage":
|
|
1597
|
+
"current-page": h[H(v)],
|
|
1598
|
+
"onUpdate:currentPage": c[2] || (c[2] = (F) => h[H(v)] = F),
|
|
1596
1599
|
class: "myPagination mgt10",
|
|
1597
1600
|
background: "",
|
|
1598
1601
|
layout: "total, sizes, prev, pager, next",
|
|
1599
|
-
total:
|
|
1600
|
-
"page-size":
|
|
1601
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1602
|
+
total: h.total,
|
|
1603
|
+
"page-size": h[H(g)],
|
|
1604
|
+
"page-sizes": e.searchForm.pageSizes || H(o).pageSizes,
|
|
1602
1605
|
onCurrentChange: Ct,
|
|
1603
1606
|
onSizeChange: xt
|
|
1604
1607
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : de("", !0)
|
|
@@ -1623,8 +1626,8 @@ const Cn = { class: "center" }, xn = {
|
|
|
1623
1626
|
on(t.fileName, t.sheetsConfig);
|
|
1624
1627
|
}
|
|
1625
1628
|
return (a, s) => {
|
|
1626
|
-
const o =
|
|
1627
|
-
return L(),
|
|
1629
|
+
const o = O("el-link");
|
|
1630
|
+
return L(), N(o, fe({
|
|
1628
1631
|
type: "primary",
|
|
1629
1632
|
underline: "never"
|
|
1630
1633
|
}, a.$attrs, { onClick: n }), {
|
|
@@ -1639,16 +1642,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1639
1642
|
}
|
|
1640
1643
|
}, kn = {
|
|
1641
1644
|
mounted(e, t) {
|
|
1642
|
-
t.value &&
|
|
1645
|
+
t.value && et(e);
|
|
1643
1646
|
},
|
|
1644
1647
|
updated(e, t) {
|
|
1645
|
-
t.value ?
|
|
1648
|
+
t.value ? et(e) : tt(e);
|
|
1646
1649
|
},
|
|
1647
1650
|
beforeUnmount(e) {
|
|
1648
|
-
|
|
1651
|
+
tt(e);
|
|
1649
1652
|
}
|
|
1650
1653
|
};
|
|
1651
|
-
async function
|
|
1654
|
+
async function et(e) {
|
|
1652
1655
|
await g();
|
|
1653
1656
|
const t = e.querySelector(".el-dialog");
|
|
1654
1657
|
if (!t)
|
|
@@ -1681,44 +1684,44 @@ async function tt(e) {
|
|
|
1681
1684
|
y: 0
|
|
1682
1685
|
}
|
|
1683
1686
|
};
|
|
1684
|
-
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);
|
|
1685
1688
|
function l() {
|
|
1686
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();
|
|
1687
1690
|
}
|
|
1688
1691
|
function r() {
|
|
1689
|
-
let
|
|
1690
|
-
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;`;
|
|
1691
1694
|
}
|
|
1692
|
-
function i(
|
|
1693
|
-
|
|
1695
|
+
function i(h) {
|
|
1696
|
+
h.button === 0 && (o.window = {
|
|
1694
1697
|
width: document.body.clientWidth,
|
|
1695
1698
|
height: document.body.clientHeight
|
|
1696
1699
|
}, o.dialog = t.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(t).marginTop, o.mouse = {
|
|
1697
|
-
x:
|
|
1698
|
-
y:
|
|
1700
|
+
x: h.clientX,
|
|
1701
|
+
y: h.clientY
|
|
1699
1702
|
}, s = !0);
|
|
1700
1703
|
}
|
|
1701
|
-
function y(
|
|
1704
|
+
function y(h) {
|
|
1702
1705
|
s && (o.drag = {
|
|
1703
|
-
x:
|
|
1704
|
-
y:
|
|
1706
|
+
x: h.clientX,
|
|
1707
|
+
y: h.clientY
|
|
1705
1708
|
}, a.style.userSelect = "none", l());
|
|
1706
1709
|
}
|
|
1707
|
-
function
|
|
1710
|
+
function m(h) {
|
|
1708
1711
|
a.style.userSelect = "auto", s = !1;
|
|
1709
1712
|
}
|
|
1710
|
-
function v(
|
|
1713
|
+
function v(h) {
|
|
1711
1714
|
}
|
|
1712
1715
|
function g() {
|
|
1713
|
-
return new Promise((
|
|
1716
|
+
return new Promise((h, f) => {
|
|
1714
1717
|
setTimeout(() => {
|
|
1715
|
-
|
|
1718
|
+
h();
|
|
1716
1719
|
}, 500);
|
|
1717
1720
|
});
|
|
1718
1721
|
}
|
|
1719
|
-
e.__mouseDown__ = i, e.__mouseUp__ =
|
|
1722
|
+
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = y, e.__sizeChange__ = v;
|
|
1720
1723
|
}
|
|
1721
|
-
function
|
|
1724
|
+
function tt(e) {
|
|
1722
1725
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1723
1726
|
}
|
|
1724
1727
|
const _n = {
|
|
@@ -1744,7 +1747,7 @@ const _n = {
|
|
|
1744
1747
|
},
|
|
1745
1748
|
emits: ["confirm"],
|
|
1746
1749
|
setup(e, { emit: t }) {
|
|
1747
|
-
const n = e, a = t, { t: s } = pe(), o =
|
|
1750
|
+
const n = e, a = t, { t: s } = pe(), o = Re(() => {
|
|
1748
1751
|
a("confirm");
|
|
1749
1752
|
}, 300);
|
|
1750
1753
|
async function l() {
|
|
@@ -1756,8 +1759,8 @@ const _n = {
|
|
|
1756
1759
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1757
1760
|
}
|
|
1758
1761
|
return (r, i) => {
|
|
1759
|
-
const y =
|
|
1760
|
-
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, {
|
|
1761
1764
|
key: 0,
|
|
1762
1765
|
modelValue: e.layer.show,
|
|
1763
1766
|
"onUpdate:modelValue": i[0] || (i[0] = (g) => e.layer.show = g),
|
|
@@ -1773,16 +1776,16 @@ const _n = {
|
|
|
1773
1776
|
i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
|
|
1774
1777
|
e.layer.showButton ? (L(), ie("div", _n, [
|
|
1775
1778
|
ee(r.$slots, "btn", {}, () => [
|
|
1776
|
-
|
|
1779
|
+
M(y, { onClick: l }, {
|
|
1777
1780
|
default: D(() => [
|
|
1778
1781
|
ne(Q(r.$t("qu-xiao")), 1)
|
|
1779
1782
|
]),
|
|
1780
1783
|
_: 1
|
|
1781
1784
|
}),
|
|
1782
|
-
|
|
1785
|
+
M(y, {
|
|
1783
1786
|
type: "primary",
|
|
1784
1787
|
loading: e.loading,
|
|
1785
|
-
onClick:
|
|
1788
|
+
onClick: H(o)
|
|
1786
1789
|
}, {
|
|
1787
1790
|
default: D(() => [
|
|
1788
1791
|
ne(Q(r.$t("ti-jiao")), 1)
|
|
@@ -1794,14 +1797,14 @@ const _n = {
|
|
|
1794
1797
|
]),
|
|
1795
1798
|
_: 3
|
|
1796
1799
|
}, 8, ["modelValue", "size", "title"])) : Vt((L(), ie("div", $n, [
|
|
1797
|
-
|
|
1800
|
+
M(v, {
|
|
1798
1801
|
"close-on-click-modal": !1,
|
|
1799
1802
|
modelValue: e.layer.show,
|
|
1800
1803
|
"onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
|
|
1801
1804
|
title: e.layer.title,
|
|
1802
1805
|
width: e.layer.width || 500,
|
|
1803
1806
|
center: ""
|
|
1804
|
-
},
|
|
1807
|
+
}, lt({
|
|
1805
1808
|
default: D(() => [
|
|
1806
1809
|
ee(r.$slots, "default")
|
|
1807
1810
|
]),
|
|
@@ -1811,15 +1814,15 @@ const _n = {
|
|
|
1811
1814
|
name: "footer",
|
|
1812
1815
|
fn: D(() => [
|
|
1813
1816
|
ee(r.$slots, "btn", {}, () => [
|
|
1814
|
-
|
|
1817
|
+
M(y, { onClick: l }, {
|
|
1815
1818
|
default: D(() => [
|
|
1816
1819
|
ne(Q(r.$t("qu-xiao")), 1)
|
|
1817
1820
|
]),
|
|
1818
1821
|
_: 1
|
|
1819
1822
|
}),
|
|
1820
|
-
|
|
1823
|
+
M(y, {
|
|
1821
1824
|
type: "primary",
|
|
1822
|
-
onClick:
|
|
1825
|
+
onClick: H(o)
|
|
1823
1826
|
}, {
|
|
1824
1827
|
default: D(() => [
|
|
1825
1828
|
ne(Q(r.$t("ti-jiao")), 1)
|
|
@@ -1832,7 +1835,7 @@ const _n = {
|
|
|
1832
1835
|
} : void 0
|
|
1833
1836
|
]), 1032, ["modelValue", "title", "width"])
|
|
1834
1837
|
])), [
|
|
1835
|
-
[
|
|
1838
|
+
[H(kn), e.layer.show]
|
|
1836
1839
|
]);
|
|
1837
1840
|
};
|
|
1838
1841
|
}
|
|
@@ -1847,12 +1850,12 @@ function oo(e, t = {}) {
|
|
|
1847
1850
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1848
1851
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1849
1852
|
}[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1850
|
-
return o ? function(y,
|
|
1853
|
+
return o ? function(y, m, v) {
|
|
1851
1854
|
if (r) {
|
|
1852
|
-
s.test(
|
|
1855
|
+
s.test(m) ? v() : v(new Error(i));
|
|
1853
1856
|
return;
|
|
1854
1857
|
}
|
|
1855
|
-
|
|
1858
|
+
m && !s.test(m) ? v(new Error(i)) : v();
|
|
1856
1859
|
} : s.test(l);
|
|
1857
1860
|
}
|
|
1858
1861
|
class lo {
|
|
@@ -2068,33 +2071,33 @@ function ao(e, t = {}) {
|
|
|
2068
2071
|
log: !1,
|
|
2069
2072
|
params: null,
|
|
2070
2073
|
format: null
|
|
2071
|
-
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, y =
|
|
2072
|
-
const
|
|
2073
|
-
|
|
2074
|
-
const { code:
|
|
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;
|
|
2075
2078
|
if (r) {
|
|
2076
|
-
const { records:
|
|
2077
|
-
y.value =
|
|
2079
|
+
const { records: C, rows: x } = p || {}, E = C || x ? C || x : p;
|
|
2080
|
+
y.value = Me(E, i), r(f);
|
|
2078
2081
|
}
|
|
2079
|
-
if (
|
|
2080
|
-
if (
|
|
2081
|
-
const { records:
|
|
2082
|
-
|
|
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);
|
|
2083
2086
|
} else
|
|
2084
|
-
y.value =
|
|
2087
|
+
y.value = Me(p, i);
|
|
2085
2088
|
o && console.log("useRequest-res", y.value);
|
|
2086
2089
|
}
|
|
2087
2090
|
}).catch((f) => {
|
|
2088
2091
|
r && (console.log("useRequestErr", f), r({ code: 500 }));
|
|
2089
2092
|
}).finally(() => {
|
|
2090
|
-
|
|
2093
|
+
m.value = !1;
|
|
2091
2094
|
});
|
|
2092
2095
|
};
|
|
2093
|
-
return s || v(), [
|
|
2096
|
+
return s || v(), [m, y, v];
|
|
2094
2097
|
}
|
|
2095
2098
|
function so(e) {
|
|
2096
|
-
const t =
|
|
2097
|
-
return
|
|
2099
|
+
const t = P(e), n = P(""), a = P("");
|
|
2100
|
+
return Pe(t, (s) => {
|
|
2098
2101
|
const o = s || ["", ""];
|
|
2099
2102
|
n.value = o[0], a.value = o[1];
|
|
2100
2103
|
}), [t, n, a];
|
|
@@ -2102,7 +2105,7 @@ function so(e) {
|
|
|
2102
2105
|
function ro(e) {
|
|
2103
2106
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2104
2107
|
}
|
|
2105
|
-
function
|
|
2108
|
+
function Me(e, t) {
|
|
2106
2109
|
if (!t)
|
|
2107
2110
|
return e;
|
|
2108
2111
|
if (e instanceof Array)
|
|
@@ -2114,8 +2117,8 @@ function Oe(e, t) {
|
|
|
2114
2117
|
return t.forEach((a) => n[a] = e[a]), n;
|
|
2115
2118
|
}
|
|
2116
2119
|
function io(e, t = []) {
|
|
2117
|
-
const { locale: n } = pe(), a =
|
|
2118
|
-
return
|
|
2120
|
+
const { locale: n } = pe(), a = P(e());
|
|
2121
|
+
return Pe(
|
|
2119
2122
|
[n, ...t],
|
|
2120
2123
|
() => {
|
|
2121
2124
|
a.value = e();
|
|
@@ -2126,20 +2129,20 @@ function io(e, t = []) {
|
|
|
2126
2129
|
function co(e, t = "zh_cn", n = "en_us") {
|
|
2127
2130
|
if (!e)
|
|
2128
2131
|
return "-";
|
|
2129
|
-
const a = { en_us: n, zh_cn: t }, o =
|
|
2132
|
+
const a = { en_us: n, zh_cn: t }, o = Ye().global.locale.value;
|
|
2130
2133
|
return e[a[o]] || e[t] || "-";
|
|
2131
2134
|
}
|
|
2132
2135
|
function uo(e, t) {
|
|
2133
2136
|
let n = Pt;
|
|
2134
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2137
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState), bt(t, n);
|
|
2135
2138
|
}
|
|
2136
2139
|
function fo(e, t) {
|
|
2137
2140
|
let n = Rt;
|
|
2138
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2141
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters), bt(t, n);
|
|
2139
2142
|
}
|
|
2140
2143
|
function ho(e, t) {
|
|
2141
2144
|
let n = Bt;
|
|
2142
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2145
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapActions), Sn(t, n);
|
|
2143
2146
|
}
|
|
2144
2147
|
function bt(e, t) {
|
|
2145
2148
|
const n = ut(), a = t(e), s = {};
|
|
@@ -2167,20 +2170,20 @@ function mo() {
|
|
|
2167
2170
|
const a = t.row[t.column.field];
|
|
2168
2171
|
if (e.type == "tag") {
|
|
2169
2172
|
let s;
|
|
2170
|
-
return O(
|
|
2173
|
+
return M(O("el-text"), {
|
|
2171
2174
|
type: e.enum.getTag(a)
|
|
2172
2175
|
}, Fe(s = e.enum.getName(a)) ? s : {
|
|
2173
2176
|
default: () => [s]
|
|
2174
2177
|
});
|
|
2175
2178
|
}
|
|
2176
|
-
return O(
|
|
2179
|
+
return M(O("el-text"), null, Fe(n = e.enum.getName(a)) ? n : {
|
|
2177
2180
|
default: () => [n]
|
|
2178
2181
|
});
|
|
2179
2182
|
}
|
|
2180
2183
|
}), ke.renderer.add("InputNumber", {
|
|
2181
2184
|
// 默认显示模板
|
|
2182
2185
|
renderTableDefault(e, t) {
|
|
2183
|
-
return
|
|
2186
|
+
return M(It, fe({
|
|
2184
2187
|
modelValue: t.row[t.column.field],
|
|
2185
2188
|
"onUpdate:modelValue": (n) => t.row[t.column.field] = n
|
|
2186
2189
|
}, e.props, {
|
|
@@ -2195,7 +2198,7 @@ function mo() {
|
|
|
2195
2198
|
locale: n
|
|
2196
2199
|
} = pe();
|
|
2197
2200
|
let a = n.value == "zh_cn";
|
|
2198
|
-
return
|
|
2201
|
+
return M(Ft, {
|
|
2199
2202
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2200
2203
|
}, {
|
|
2201
2204
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2219,25 +2222,25 @@ function mo() {
|
|
|
2219
2222
|
to: o,
|
|
2220
2223
|
openType: l = "system"
|
|
2221
2224
|
} = e, r = t.row[n];
|
|
2222
|
-
function i(y,
|
|
2225
|
+
function i(y, m) {
|
|
2223
2226
|
l == "blank" ? window.open(y) : a.push({
|
|
2224
2227
|
path: y,
|
|
2225
2228
|
query: {
|
|
2226
|
-
[n]:
|
|
2229
|
+
[n]: m
|
|
2227
2230
|
}
|
|
2228
2231
|
});
|
|
2229
2232
|
}
|
|
2230
2233
|
if (s) {
|
|
2231
2234
|
const y = (r == null ? void 0 : r.split(",")) || [];
|
|
2232
|
-
return y.map((
|
|
2235
|
+
return y.map((m, v) => M("span", null, [M(Ge, {
|
|
2233
2236
|
underline: "never",
|
|
2234
2237
|
type: "primary",
|
|
2235
|
-
onclick: () => i(l == "stystem" ? o :
|
|
2236
|
-
}, Fe(
|
|
2237
|
-
default: () => [
|
|
2238
|
+
onclick: () => i(l == "stystem" ? o : m, m)
|
|
2239
|
+
}, Fe(m) ? m : {
|
|
2240
|
+
default: () => [m]
|
|
2238
2241
|
}), v < y.length - 1 ? "," : ""]));
|
|
2239
2242
|
}
|
|
2240
|
-
return
|
|
2243
|
+
return M(Ge, {
|
|
2241
2244
|
underline: "never",
|
|
2242
2245
|
type: "primary",
|
|
2243
2246
|
onclick: () => i(l == "stystem" ? o : r, r)
|
|
@@ -2258,7 +2261,7 @@ export {
|
|
|
2258
2261
|
eo as ListPage,
|
|
2259
2262
|
lo as OnePortalCasSDK,
|
|
2260
2263
|
bn as SearchBar,
|
|
2261
|
-
|
|
2264
|
+
Qe as StatusMap,
|
|
2262
2265
|
Pn as _toRaw,
|
|
2263
2266
|
ro as _typeOf,
|
|
2264
2267
|
Bn as arrToStatusMap,
|
|
@@ -2267,9 +2270,9 @@ export {
|
|
|
2267
2270
|
oo as creatValidator,
|
|
2268
2271
|
Wn as createImportFields,
|
|
2269
2272
|
Nn as createListPageId,
|
|
2270
|
-
|
|
2273
|
+
Ae as en_us,
|
|
2271
2274
|
jn as exportExcel,
|
|
2272
|
-
|
|
2275
|
+
Ye as getI18n,
|
|
2273
2276
|
Ce as getI18nT,
|
|
2274
2277
|
wn as getListPageConfig,
|
|
2275
2278
|
co as getLocaleValue,
|
|
@@ -2290,5 +2293,5 @@ export {
|
|
|
2290
2293
|
io as useI18nReState,
|
|
2291
2294
|
ao as useRequest,
|
|
2292
2295
|
uo as useState,
|
|
2293
|
-
|
|
2296
|
+
qe as zh_cn
|
|
2294
2297
|
};
|