joy-admin-components 0.1.44 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/joy-admin-components.es.js +799 -795
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,194 +1,194 @@
|
|
|
1
|
-
import { ElForm as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
1
|
+
import { ElForm as ht, ElRow as mt, ElCol as gt, ElInputNumber as pt, ElText as vt, ElLink as Pe } from "element-plus";
|
|
2
|
+
import { defineComponent as Ne, ref as q, onMounted as Ke, h as _e, mergeModels as Be, useAttrs as bt, useModel as yt, computed as se, resolveComponent as O, openBlock as T, createBlock as U, mergeProps as me, unref as Z, withCtx as R, renderSlot as ie, createVNode as W, createTextVNode as te, toDisplayString as ne, createCommentVNode as ce, createElementBlock as re, Fragment as Ie, renderList as Ze, withModifiers as Ee, resolveDynamicComponent as Ge, createElementVNode as ae, withKeys as Ct, normalizeStyle as xt, normalizeClass as Le, reactive as pe, nextTick as $e, onUpdated as wt, onUnmounted as kt, watch as We } from "vue";
|
|
3
|
+
import { saveAs as _t } from "file-saver";
|
|
4
|
+
import Je from "exceljs";
|
|
5
5
|
import ve from "dayjs";
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { debounce as
|
|
8
|
-
import {
|
|
6
|
+
import { createI18n as $t, useI18n as de } from "vue-i18n";
|
|
7
|
+
import { debounce as Qe, cloneDeep as Xe, isArray as Ye } from "lodash";
|
|
8
|
+
import { useRoute as St, useRouter as It } from "vue-router";
|
|
9
|
+
import { createNamespacedHelpers as De, useStore as et, mapState as Et, mapGetters as Lt, mapActions as Tt } from "vuex";
|
|
9
10
|
import { VxeUI as he } from "vxe-pc-ui";
|
|
10
|
-
|
|
11
|
-
const gn = Ye({
|
|
11
|
+
const bn = Ne({
|
|
12
12
|
name: "LayOutForm",
|
|
13
|
-
setup(n, { slots: e, attrs: t, emit:
|
|
14
|
-
const
|
|
13
|
+
setup(n, { slots: e, attrs: t, emit: o }) {
|
|
14
|
+
const r = q(null), l = () => e.default ? e.default().filter((d) => d.type !== Symbol.for("v-cmt")).map((d) => d.type === Symbol.for("v-fgt") ? d.children : d).flat().map(
|
|
15
15
|
(d) => {
|
|
16
|
-
var
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
{ span: ((
|
|
16
|
+
var c;
|
|
17
|
+
return _e(
|
|
18
|
+
gt,
|
|
19
|
+
{ span: ((c = d.props) == null ? void 0 : c.span) || 24 },
|
|
20
20
|
{
|
|
21
21
|
default: () => d
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
Ke(() => {
|
|
27
|
+
o("ref", r.value);
|
|
28
28
|
});
|
|
29
29
|
function a() {
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
{ ...t, ref:
|
|
33
|
-
() =>
|
|
30
|
+
return _e(
|
|
31
|
+
ht,
|
|
32
|
+
{ ...t, ref: r },
|
|
33
|
+
() => _e(mt, { gutter: t.gutter ?? 20 }, { default: () => l() })
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
return a;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
var
|
|
40
|
-
function
|
|
39
|
+
var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
40
|
+
function nt(n) {
|
|
41
41
|
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var ot = { exports: {} };
|
|
44
44
|
(function(n, e) {
|
|
45
|
-
(function(t,
|
|
46
|
-
n.exports =
|
|
47
|
-
})(
|
|
48
|
-
var t = "minute",
|
|
49
|
-
return function(
|
|
50
|
-
var
|
|
45
|
+
(function(t, o) {
|
|
46
|
+
n.exports = o();
|
|
47
|
+
})(tt, function() {
|
|
48
|
+
var t = "minute", o = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
49
|
+
return function(l, a, d) {
|
|
50
|
+
var c = a.prototype;
|
|
51
51
|
d.utc = function(u) {
|
|
52
52
|
var f = { date: u, utc: !0, args: arguments };
|
|
53
53
|
return new a(f);
|
|
54
|
-
},
|
|
54
|
+
}, c.utc = function(u) {
|
|
55
55
|
var f = d(this.toDate(), { locale: this.$L, utc: !0 });
|
|
56
56
|
return u ? f.add(this.utcOffset(), t) : f;
|
|
57
|
-
},
|
|
57
|
+
}, c.local = function() {
|
|
58
58
|
return d(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset),
|
|
60
|
+
var w = c.parse;
|
|
61
|
+
c.parse = function(u) {
|
|
62
|
+
u.utc && (this.$u = !0), this.$utils().u(u.$offset) || (this.$offset = u.$offset), w.call(this, u);
|
|
63
63
|
};
|
|
64
|
-
var
|
|
65
|
-
|
|
64
|
+
var C = c.init;
|
|
65
|
+
c.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
|
+
C.call(this);
|
|
71
71
|
};
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return this.$u ? 0 :
|
|
77
|
-
if (typeof u == "string" && (u = function(
|
|
78
|
-
|
|
79
|
-
var
|
|
80
|
-
if (!
|
|
72
|
+
var b = c.utcOffset;
|
|
73
|
+
c.utcOffset = function(u, f) {
|
|
74
|
+
var _ = this.$utils().u;
|
|
75
|
+
if (_(u))
|
|
76
|
+
return this.$u ? 0 : _(this.$offset) ? b.call(this) : this.$offset;
|
|
77
|
+
if (typeof u == "string" && (u = function($) {
|
|
78
|
+
$ === void 0 && ($ = "");
|
|
79
|
+
var B = $.match(o);
|
|
80
|
+
if (!B)
|
|
81
81
|
return null;
|
|
82
|
-
var
|
|
83
|
-
return
|
|
82
|
+
var S = ("" + B[0]).match(r) || ["-", 0, 0], v = S[0], Y = 60 * +S[1] + +S[2];
|
|
83
|
+
return Y === 0 ? 0 : v === "+" ? Y : -Y;
|
|
84
84
|
}(u), u === null))
|
|
85
85
|
return this;
|
|
86
86
|
var h = Math.abs(u) <= 16 ? 60 * u : u;
|
|
87
87
|
if (h === 0)
|
|
88
88
|
return this.utc(f);
|
|
89
|
-
var
|
|
89
|
+
var g = this.clone();
|
|
90
90
|
if (f)
|
|
91
|
-
return
|
|
92
|
-
var
|
|
93
|
-
return (
|
|
91
|
+
return g.$offset = h, g.$u = !1, g;
|
|
92
|
+
var E = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
|
+
return (g = this.local().add(h + E, t)).$offset = h, g.$x.$localOffset = E, g;
|
|
94
94
|
};
|
|
95
|
-
var
|
|
96
|
-
|
|
95
|
+
var m = c.format;
|
|
96
|
+
c.format = function(u) {
|
|
97
97
|
var f = u || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
98
|
-
return
|
|
99
|
-
},
|
|
98
|
+
return m.call(this, f);
|
|
99
|
+
}, c.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;
|
|
102
|
-
},
|
|
102
|
+
}, c.isUTC = function() {
|
|
103
103
|
return !!this.$u;
|
|
104
|
-
},
|
|
104
|
+
}, c.toISOString = function() {
|
|
105
105
|
return this.toDate().toISOString();
|
|
106
|
-
},
|
|
106
|
+
}, c.toString = function() {
|
|
107
107
|
return this.toDate().toUTCString();
|
|
108
108
|
};
|
|
109
|
-
var
|
|
110
|
-
|
|
111
|
-
return u === "s" && this.$offset ? d(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() :
|
|
109
|
+
var x = c.toDate;
|
|
110
|
+
c.toDate = function(u) {
|
|
111
|
+
return u === "s" && this.$offset ? d(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : x.call(this);
|
|
112
112
|
};
|
|
113
|
-
var
|
|
114
|
-
|
|
113
|
+
var p = c.diff;
|
|
114
|
+
c.diff = function(u, f, _) {
|
|
115
115
|
if (u && this.$u === u.$u)
|
|
116
|
-
return
|
|
117
|
-
var h = this.local(),
|
|
118
|
-
return
|
|
116
|
+
return p.call(this, u, f, _);
|
|
117
|
+
var h = this.local(), g = d(u).local();
|
|
118
|
+
return p.call(h, g, f, _);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
|
-
})(
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
var
|
|
122
|
+
})(ot);
|
|
123
|
+
var Ft = ot.exports;
|
|
124
|
+
const Ot = /* @__PURE__ */ nt(Ft);
|
|
125
|
+
var lt = { exports: {} };
|
|
126
126
|
(function(n, e) {
|
|
127
|
-
(function(t,
|
|
128
|
-
n.exports =
|
|
129
|
-
})(
|
|
130
|
-
var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 },
|
|
131
|
-
return function(
|
|
132
|
-
var d,
|
|
133
|
-
|
|
134
|
-
var u = new Date(
|
|
127
|
+
(function(t, o) {
|
|
128
|
+
n.exports = o();
|
|
129
|
+
})(tt, function() {
|
|
130
|
+
var t = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, o = {};
|
|
131
|
+
return function(r, l, a) {
|
|
132
|
+
var d, c = function(m, x, p) {
|
|
133
|
+
p === void 0 && (p = {});
|
|
134
|
+
var u = new Date(m), f = function(_, h) {
|
|
135
135
|
h === void 0 && (h = {});
|
|
136
|
-
var
|
|
137
|
-
return
|
|
138
|
-
}(
|
|
136
|
+
var g = h.timeZoneName || "short", E = _ + "|" + g, $ = o[E];
|
|
137
|
+
return $ || ($ = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: _, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: g }), o[E] = $), $;
|
|
138
|
+
}(x, p);
|
|
139
139
|
return f.formatToParts(u);
|
|
140
|
-
},
|
|
141
|
-
for (var
|
|
142
|
-
var
|
|
143
|
-
|
|
140
|
+
}, w = function(m, x) {
|
|
141
|
+
for (var p = c(m, x), u = [], f = 0; f < p.length; f += 1) {
|
|
142
|
+
var _ = p[f], h = _.type, g = _.value, E = t[h];
|
|
143
|
+
E >= 0 && (u[E] = parseInt(g, 10));
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
return (a.utc(
|
|
147
|
-
},
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var
|
|
151
|
-
if (!Number(
|
|
152
|
-
|
|
153
|
-
else if (
|
|
154
|
-
var
|
|
155
|
-
|
|
145
|
+
var $ = u[3], B = $ === 24 ? 0 : $, S = u[0] + "-" + u[1] + "-" + u[2] + " " + B + ":" + u[4] + ":" + u[5] + ":000", v = +m;
|
|
146
|
+
return (a.utc(S).valueOf() - (v -= v % 1e3)) / 6e4;
|
|
147
|
+
}, C = l.prototype;
|
|
148
|
+
C.tz = function(m, x) {
|
|
149
|
+
m === void 0 && (m = d);
|
|
150
|
+
var p, u = this.utcOffset(), f = this.toDate(), _ = f.toLocaleString("en-US", { timeZone: m }), h = Math.round((f - new Date(_)) / 1e3 / 60), g = 15 * -Math.round(f.getTimezoneOffset() / 15) - h;
|
|
151
|
+
if (!Number(g))
|
|
152
|
+
p = this.utcOffset(0, x);
|
|
153
|
+
else if (p = a(_, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(g, !0), x) {
|
|
154
|
+
var E = p.utcOffset();
|
|
155
|
+
p = p.add(u - E, "minute");
|
|
156
156
|
}
|
|
157
|
-
return
|
|
158
|
-
},
|
|
159
|
-
var
|
|
157
|
+
return p.$x.$timezone = m, p;
|
|
158
|
+
}, C.offsetName = function(m) {
|
|
159
|
+
var x = this.$x.$timezone || a.tz.guess(), p = c(this.valueOf(), x, { timeZoneName: m }).find(function(u) {
|
|
160
160
|
return u.type.toLowerCase() === "timezonename";
|
|
161
161
|
});
|
|
162
|
-
return
|
|
162
|
+
return p && p.value;
|
|
163
163
|
};
|
|
164
|
-
var
|
|
165
|
-
|
|
164
|
+
var b = C.startOf;
|
|
165
|
+
C.startOf = function(m, x) {
|
|
166
166
|
if (!this.$x || !this.$x.$timezone)
|
|
167
|
-
return
|
|
168
|
-
var
|
|
169
|
-
return
|
|
170
|
-
}, a.tz = function(
|
|
171
|
-
var u =
|
|
172
|
-
if (typeof
|
|
173
|
-
return a(
|
|
174
|
-
var h = function(
|
|
175
|
-
var
|
|
176
|
-
if (
|
|
177
|
-
return [
|
|
178
|
-
var z =
|
|
179
|
-
return
|
|
180
|
-
}(a.utc(
|
|
181
|
-
return
|
|
167
|
+
return b.call(this, m, x);
|
|
168
|
+
var p = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
|
+
return b.call(p, m, x).tz(this.$x.$timezone, !0);
|
|
170
|
+
}, a.tz = function(m, x, p) {
|
|
171
|
+
var u = p && x, f = p || x || d, _ = w(+a(), f);
|
|
172
|
+
if (typeof m != "string")
|
|
173
|
+
return a(m).tz(f);
|
|
174
|
+
var h = function(B, S, v) {
|
|
175
|
+
var Y = B - 60 * S * 1e3, H = w(Y, v);
|
|
176
|
+
if (S === H)
|
|
177
|
+
return [Y, S];
|
|
178
|
+
var z = w(Y -= 60 * (H - S) * 1e3, v);
|
|
179
|
+
return H === z ? [Y, H] : [B - 60 * Math.min(H, z) * 1e3, Math.max(H, z)];
|
|
180
|
+
}(a.utc(m, u).valueOf(), _, f), g = h[0], E = h[1], $ = a(g).utcOffset(E);
|
|
181
|
+
return $.$x.$timezone = f, $;
|
|
182
182
|
}, a.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
|
-
}, a.tz.setDefault = function(
|
|
185
|
-
d =
|
|
184
|
+
}, a.tz.setDefault = function(m) {
|
|
185
|
+
d = m;
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
});
|
|
189
|
-
})(
|
|
190
|
-
var
|
|
191
|
-
const
|
|
189
|
+
})(lt);
|
|
190
|
+
var Dt = lt.exports;
|
|
191
|
+
const zt = /* @__PURE__ */ nt(Dt), Te = {
|
|
192
192
|
// 组件通用文本
|
|
193
193
|
"dao-ru": "导入",
|
|
194
194
|
"quan-xuan": "全选",
|
|
@@ -218,7 +218,7 @@ const Ft = /* @__PURE__ */ et(Tt), Le = {
|
|
|
218
218
|
tools: {
|
|
219
219
|
keysLengthError: "keys 长度必须大于2 默认前两位为 label value"
|
|
220
220
|
}
|
|
221
|
-
},
|
|
221
|
+
}, Fe = {
|
|
222
222
|
// Common component text
|
|
223
223
|
"dao-ru": "Import",
|
|
224
224
|
"quan-xuan": "Select All",
|
|
@@ -248,137 +248,137 @@ const Ft = /* @__PURE__ */ et(Tt), Le = {
|
|
|
248
248
|
tools: {
|
|
249
249
|
keysLengthError: "Keys length must be greater than 2, default first two are label and value"
|
|
250
250
|
}
|
|
251
|
-
},
|
|
252
|
-
zh_cn:
|
|
253
|
-
en:
|
|
251
|
+
}, Mt = {
|
|
252
|
+
zh_cn: Te,
|
|
253
|
+
en: Fe
|
|
254
254
|
};
|
|
255
|
-
let
|
|
256
|
-
function
|
|
255
|
+
let ue = null;
|
|
256
|
+
function Rt(n = null) {
|
|
257
257
|
if (n) {
|
|
258
258
|
const { global: e } = n;
|
|
259
|
-
return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn",
|
|
259
|
+
return e.messages.value.zh_cn ? e.mergeLocaleMessage("zh_cn", Te) : e.setLocaleMessage("zh_cn", Te), e.messages.value.en ? e.mergeLocaleMessage("en", Fe) : e.setLocaleMessage("en", Fe), ue = n, n;
|
|
260
260
|
}
|
|
261
|
-
return
|
|
261
|
+
return ue || (ue = $t({
|
|
262
262
|
legacy: !1,
|
|
263
263
|
locale: "zh_cn",
|
|
264
264
|
fallbackLocale: "zh_cn",
|
|
265
|
-
messages:
|
|
266
|
-
})),
|
|
265
|
+
messages: Mt
|
|
266
|
+
})), ue;
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
268
|
+
function rt() {
|
|
269
|
+
return ue || Rt();
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
return
|
|
271
|
+
function ze() {
|
|
272
|
+
return rt().global.t;
|
|
273
273
|
}
|
|
274
|
-
ve.extend(
|
|
275
|
-
ve.extend(
|
|
276
|
-
async function
|
|
277
|
-
const { fields: t, range:
|
|
274
|
+
ve.extend(Ot);
|
|
275
|
+
ve.extend(zt);
|
|
276
|
+
async function yn(n, e) {
|
|
277
|
+
const { fields: t, range: o = 1 } = e;
|
|
278
278
|
if (!t) {
|
|
279
|
-
const a =
|
|
279
|
+
const a = ze();
|
|
280
280
|
throw new Error(a("excel.fieldsMappingRequired"));
|
|
281
281
|
}
|
|
282
|
-
let
|
|
283
|
-
await
|
|
284
|
-
const
|
|
285
|
-
return
|
|
286
|
-
const
|
|
287
|
-
a.eachRow(function(
|
|
288
|
-
if (
|
|
289
|
-
let
|
|
290
|
-
Object.keys(t).forEach((
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
}),
|
|
282
|
+
let r = new Je.Workbook();
|
|
283
|
+
await r.xlsx.load(n);
|
|
284
|
+
const l = {};
|
|
285
|
+
return r.eachSheet(function(a, d) {
|
|
286
|
+
const c = [];
|
|
287
|
+
a.eachRow(function(w, C) {
|
|
288
|
+
if (C > o) {
|
|
289
|
+
let b = {}, m = !0;
|
|
290
|
+
Object.keys(t).forEach((x) => {
|
|
291
|
+
const p = w.getCell(t[x]).value;
|
|
292
|
+
b[x] = p, p && (m = !1);
|
|
293
|
+
}), m || c.push(b);
|
|
294
294
|
}
|
|
295
|
-
}),
|
|
296
|
-
}),
|
|
295
|
+
}), l[a._name] = c;
|
|
296
|
+
}), r = null, l;
|
|
297
297
|
}
|
|
298
|
-
const
|
|
298
|
+
const At = {
|
|
299
299
|
columnWidth: 30
|
|
300
300
|
};
|
|
301
|
-
async function
|
|
301
|
+
async function Vt(n, e, t = [], o = {}) {
|
|
302
302
|
if (!n || !e)
|
|
303
303
|
return;
|
|
304
|
-
const { columnStyle:
|
|
305
|
-
e.forEach((
|
|
306
|
-
|
|
304
|
+
const { columnStyle: r } = o, { columnWidth: l } = At;
|
|
305
|
+
e.forEach((c) => {
|
|
306
|
+
c.width = c.width ? c.width : l;
|
|
307
307
|
});
|
|
308
|
-
const { workbook: a, worksheet: d } =
|
|
309
|
-
d.columns = e, d.addRows(t),
|
|
308
|
+
const { workbook: a, worksheet: d } = Ut();
|
|
309
|
+
d.columns = e, d.addRows(t), r && await jt(a, d, r);
|
|
310
310
|
try {
|
|
311
|
-
const
|
|
311
|
+
const c = await a.xlsx.writeBuffer(), w = new File([c], n, {
|
|
312
312
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
313
313
|
});
|
|
314
|
-
|
|
315
|
-
} catch (
|
|
316
|
-
console.log(
|
|
314
|
+
_t(w);
|
|
315
|
+
} catch (c) {
|
|
316
|
+
console.log(c);
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
-
function
|
|
320
|
-
const n = new
|
|
319
|
+
function Ut() {
|
|
320
|
+
const n = new Je.Workbook();
|
|
321
321
|
n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date();
|
|
322
322
|
const e = n.addWorksheet("Sheet1");
|
|
323
323
|
return { workbook: n, worksheet: e };
|
|
324
324
|
}
|
|
325
|
-
async function
|
|
326
|
-
const
|
|
327
|
-
for (const
|
|
328
|
-
const
|
|
325
|
+
async function jt(n, e, t) {
|
|
326
|
+
const o = Object.keys(t);
|
|
327
|
+
for (const r of o) {
|
|
328
|
+
const l = t[r], { type: a } = l;
|
|
329
329
|
switch (a) {
|
|
330
330
|
case "IMG":
|
|
331
|
-
await
|
|
331
|
+
await qt(n, e, r);
|
|
332
332
|
break;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
335
|
}
|
|
336
|
-
async function
|
|
337
|
-
const
|
|
336
|
+
async function qt(n, e, t, o) {
|
|
337
|
+
const r = e.getColumn(t), l = r.values;
|
|
338
338
|
e.getColumn(t).width = 20, e.eachRow((a, d) => {
|
|
339
339
|
d > 1 && (a.height = 40);
|
|
340
340
|
});
|
|
341
|
-
for (let a = 0, d =
|
|
341
|
+
for (let a = 0, d = l.length; a < d; a++) {
|
|
342
342
|
if (a < 2)
|
|
343
343
|
continue;
|
|
344
|
-
let
|
|
345
|
-
|
|
344
|
+
let c = l[a];
|
|
345
|
+
c && (e.getCell(r.letter + a).value = "", await Pt(n, e, c, {
|
|
346
346
|
width: 100,
|
|
347
347
|
height: 50,
|
|
348
|
-
col:
|
|
348
|
+
col: r._number - 1,
|
|
349
349
|
row: a - 1
|
|
350
350
|
}));
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
async function
|
|
354
|
-
const { col:
|
|
355
|
-
if (
|
|
356
|
-
const
|
|
357
|
-
base64:
|
|
353
|
+
async function Pt(n, e, t, o) {
|
|
354
|
+
const { col: r, row: l, width: a, height: d } = o, { success: c, base64: w } = await Bt(t, 0.3);
|
|
355
|
+
if (c) {
|
|
356
|
+
const C = n.addImage({
|
|
357
|
+
base64: w,
|
|
358
358
|
extension: "jpeg"
|
|
359
359
|
});
|
|
360
|
-
e.addImage(
|
|
361
|
-
tl: { col:
|
|
360
|
+
e.addImage(C, {
|
|
361
|
+
tl: { col: r, row: l },
|
|
362
362
|
ext: { width: a, height: d }
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Bt(n, e = 1) {
|
|
367
367
|
const t = new Image();
|
|
368
|
-
return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((
|
|
368
|
+
return t.setAttribute("crossOrigin", "anonymous"), t.crossOrigin = "anonymous", t.src = n, new Promise((o, r) => {
|
|
369
369
|
t.onload = () => {
|
|
370
|
-
const
|
|
371
|
-
|
|
370
|
+
const l = document.createElement("canvas");
|
|
371
|
+
l.width = t.width, l.height = t.height, l.getContext("2d").drawImage(t, 0, 0, l.width, l.height), o({
|
|
372
372
|
success: !0,
|
|
373
373
|
//canvas.toDataURL的方法将图片的绝对路径转换为base64编码
|
|
374
|
-
base64:
|
|
374
|
+
base64: l.toDataURL("image/jpeg", e)
|
|
375
375
|
});
|
|
376
376
|
}, t.onerror = () => {
|
|
377
|
-
|
|
377
|
+
o({ success: !1 });
|
|
378
378
|
};
|
|
379
379
|
});
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Yt(n) {
|
|
382
382
|
if (n < 26)
|
|
383
383
|
return String.fromCharCode(65 + n);
|
|
384
384
|
{
|
|
@@ -386,52 +386,52 @@ function qt(n) {
|
|
|
386
386
|
return e + t;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Cn(n) {
|
|
390
390
|
return new Promise((e) => {
|
|
391
391
|
setTimeout(() => {
|
|
392
392
|
e();
|
|
393
393
|
}, n);
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function xn(n) {
|
|
397
397
|
return JSON.parse(JSON.stringify(n));
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
let e = [], t = {},
|
|
401
|
-
for (const
|
|
402
|
-
t[
|
|
403
|
-
...
|
|
399
|
+
function wn(n) {
|
|
400
|
+
let e = [], t = {}, o = (r, l) => Object.prototype.hasOwnProperty.call(r, l);
|
|
401
|
+
for (const r of n) {
|
|
402
|
+
t[r.id] = {
|
|
403
|
+
...r,
|
|
404
404
|
// 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
|
|
405
|
-
children:
|
|
405
|
+
children: o(t, r.id) ? t[r.id].children : []
|
|
406
406
|
};
|
|
407
|
-
const
|
|
408
|
-
|
|
407
|
+
const l = t[r.id];
|
|
408
|
+
r.pid == -1 ? e.push(l) : (o(t, r.pid) || (t[r.pid] = {
|
|
409
409
|
children: []
|
|
410
|
-
}), t[
|
|
410
|
+
}), t[r.pid].children.push(l));
|
|
411
411
|
}
|
|
412
412
|
return e;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function at(n, e = " ") {
|
|
415
415
|
return n ? n.split(e).filter((t) => t.trim()) : [];
|
|
416
416
|
}
|
|
417
|
-
class
|
|
417
|
+
class He {
|
|
418
418
|
constructor(e, t = ["label", "value", "labelEn"]) {
|
|
419
419
|
this.list = e, this.map = new Map(
|
|
420
|
-
e.map((
|
|
421
|
-
let
|
|
422
|
-
...
|
|
423
|
-
label:
|
|
424
|
-
value:
|
|
420
|
+
e.map((o) => {
|
|
421
|
+
let r = {
|
|
422
|
+
...o,
|
|
423
|
+
label: o[t[0]],
|
|
424
|
+
value: o[t[1]]
|
|
425
425
|
};
|
|
426
|
-
return t[2] && (
|
|
426
|
+
return t[2] && (r.labelEn = o[t[2]]), [o[t[1]], r];
|
|
427
427
|
})
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
getName(e, t) {
|
|
431
431
|
if (!this.has(e))
|
|
432
432
|
return "-";
|
|
433
|
-
const { label:
|
|
434
|
-
return (t == "zh_cn" ?
|
|
433
|
+
const { label: o, labelEn: r } = this.map.get(e);
|
|
434
|
+
return (t == "zh_cn" ? o : r) || o || "-";
|
|
435
435
|
}
|
|
436
436
|
getTag(e) {
|
|
437
437
|
if (!this.has(e))
|
|
@@ -452,52 +452,52 @@ class Be {
|
|
|
452
452
|
return this.map.has(e);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function kn(n, e = [], t = "i18nName") {
|
|
456
456
|
if (n.length == 0)
|
|
457
|
-
return new
|
|
457
|
+
return new He([]);
|
|
458
458
|
if (e.length < 2) {
|
|
459
|
-
const
|
|
460
|
-
throw new Error(
|
|
459
|
+
const r = ze();
|
|
460
|
+
throw new Error(r("tools.keysLengthError"));
|
|
461
461
|
}
|
|
462
|
-
let
|
|
463
|
-
let
|
|
464
|
-
return t && (
|
|
465
|
-
d === 0 ?
|
|
466
|
-
}),
|
|
462
|
+
let o = n.map((r) => {
|
|
463
|
+
let l = {};
|
|
464
|
+
return t && (l.labelEn = r[t]), e.forEach((a, d) => {
|
|
465
|
+
d === 0 ? l.label = r[a] : d === 1 ? l.value = r[a] : l[a] = r[a];
|
|
466
|
+
}), l;
|
|
467
467
|
});
|
|
468
|
-
return new
|
|
468
|
+
return new He(o);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function _n(n) {
|
|
471
471
|
return n ? n.replace(/<[^>]+>/g, "") : "";
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function $n(n) {
|
|
474
474
|
return n ? (n.includes("\\\\u") && (n = n.replace(/\\/g, "")), n.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Sn(n, e = 10) {
|
|
477
477
|
let t = 1048576 * e;
|
|
478
478
|
return !(n.size > t);
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
return Array.from(10).fill(0).map((t,
|
|
480
|
+
function In(n) {
|
|
481
|
+
return Array.from(10).fill(0).map((t, o) => n + "_" + o);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function En(n) {
|
|
484
484
|
let e = {};
|
|
485
|
-
return n.map((t,
|
|
486
|
-
let { key:
|
|
487
|
-
|
|
485
|
+
return n.map((t, o) => {
|
|
486
|
+
let { key: r, option: l, type: a } = t, d = Yt(o);
|
|
487
|
+
l ? e[r] = `${d}---option` : a === "image" ? e[r] = `${d}---image` : e[r] = d;
|
|
488
488
|
}), e;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
return e.split(".").reduce((t,
|
|
490
|
+
function Ln(n, e) {
|
|
491
|
+
return e.split(".").reduce((t, o) => t && t[o], n);
|
|
492
492
|
}
|
|
493
493
|
const ge = (n, e) => {
|
|
494
494
|
const t = n.__vccOpts || n;
|
|
495
|
-
for (const [
|
|
496
|
-
t[
|
|
495
|
+
for (const [o, r] of e)
|
|
496
|
+
t[o] = r;
|
|
497
497
|
return t;
|
|
498
|
-
},
|
|
498
|
+
}, Ht = {
|
|
499
499
|
__name: "index",
|
|
500
|
-
props: /* @__PURE__ */
|
|
500
|
+
props: /* @__PURE__ */ Be({
|
|
501
501
|
api: {
|
|
502
502
|
type: Function
|
|
503
503
|
},
|
|
@@ -533,95 +533,95 @@ const ge = (n, e) => {
|
|
|
533
533
|
modelValue: {},
|
|
534
534
|
modelModifiers: {}
|
|
535
535
|
}),
|
|
536
|
-
emits: /* @__PURE__ */
|
|
536
|
+
emits: /* @__PURE__ */ Be(["success", "change"], ["update:modelValue"]),
|
|
537
537
|
setup(n, { emit: e }) {
|
|
538
|
-
const t = n,
|
|
539
|
-
if (
|
|
538
|
+
const t = n, o = bt(), { t: r, locale: l } = de(), a = yt(n, "modelValue"), d = q(""), c = se(() => {
|
|
539
|
+
if (o.remote !== void 0)
|
|
540
540
|
return t.data;
|
|
541
|
-
const h =
|
|
541
|
+
const h = at(d.value), { data: g, labelValue: E } = t, $ = g || b.value;
|
|
542
542
|
if (h.length == 0)
|
|
543
|
-
return
|
|
544
|
-
const { label:
|
|
545
|
-
let
|
|
546
|
-
return h.length == 1 ?
|
|
547
|
-
(
|
|
548
|
-
) :
|
|
543
|
+
return $;
|
|
544
|
+
const { label: B, labelEn: S } = E;
|
|
545
|
+
let v = l.value == "en_us" ? S || "i18nName" : B;
|
|
546
|
+
return h.length == 1 ? $.filter(
|
|
547
|
+
(H) => H[v].toLowerCase().includes(h[0].toLowerCase())
|
|
548
|
+
) : $.filter((H) => {
|
|
549
549
|
let z = !1;
|
|
550
|
-
return z = h.some((
|
|
550
|
+
return z = h.some((k) => H[v].toLowerCase() == k.toLowerCase()), z;
|
|
551
551
|
});
|
|
552
|
-
}),
|
|
552
|
+
}), w = se({
|
|
553
553
|
get() {
|
|
554
|
-
return
|
|
554
|
+
return o.multiple == null || a.value == null ? !1 : a.value.length == c.value.length;
|
|
555
555
|
},
|
|
556
556
|
set(h) {
|
|
557
557
|
return h;
|
|
558
558
|
}
|
|
559
|
-
}),
|
|
559
|
+
}), C = e, b = q([]), m = async () => {
|
|
560
560
|
const { data: h } = await t.api();
|
|
561
|
-
|
|
561
|
+
b.value = [...h], C("success", b);
|
|
562
562
|
};
|
|
563
|
-
t.api &&
|
|
564
|
-
const
|
|
565
|
-
if (
|
|
563
|
+
t.api && m();
|
|
564
|
+
const x = t.labelValue.label.split("-"), p = (h) => {
|
|
565
|
+
if (x.length == 1) {
|
|
566
566
|
if (t.changeLocal)
|
|
567
|
-
return
|
|
568
|
-
let
|
|
569
|
-
return
|
|
567
|
+
return r(h[t.labelValue.label]);
|
|
568
|
+
let g = l.value == "en_us" ? h[t.labelValue.labelEn || "i18nName"] : h[t.labelValue.label];
|
|
569
|
+
return g = g || h[t.labelValue.label], g;
|
|
570
570
|
} else {
|
|
571
|
-
let
|
|
572
|
-
return
|
|
573
|
-
|
|
574
|
-
}),
|
|
571
|
+
let g = [];
|
|
572
|
+
return x.forEach((E) => {
|
|
573
|
+
g.push(h[E]);
|
|
574
|
+
}), g.join("-");
|
|
575
575
|
}
|
|
576
576
|
};
|
|
577
577
|
function u(h) {
|
|
578
|
-
a.value = h ?
|
|
578
|
+
a.value = h ? c.value.map((g) => g[t.labelValue.value]) : [], C("change", a.value);
|
|
579
579
|
}
|
|
580
580
|
function f(h) {
|
|
581
|
-
t.optionClick(h),
|
|
581
|
+
t.optionClick(h), C("change", o["value-key"] ? h : h[t.labelValue.value]);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function _(h) {
|
|
584
584
|
return a.value.length >= t.maxLimit && !a.value.includes(h[t.labelValue.value]);
|
|
585
585
|
}
|
|
586
|
-
return (h,
|
|
587
|
-
const
|
|
588
|
-
return
|
|
586
|
+
return (h, g) => {
|
|
587
|
+
const E = O("el-checkbox"), $ = O("el-option"), B = O("el-select");
|
|
588
|
+
return T(), U(B, me({
|
|
589
589
|
modelValue: a.value,
|
|
590
|
-
"onUpdate:modelValue":
|
|
590
|
+
"onUpdate:modelValue": g[1] || (g[1] = (S) => a.value = S),
|
|
591
591
|
filterable: "",
|
|
592
592
|
"collapse-tags": "",
|
|
593
593
|
"collapse-tags-tooltip": "",
|
|
594
|
-
"filter-method":
|
|
594
|
+
"filter-method": Z(o).remote != null ? void 0 : (S) => d.value = S,
|
|
595
595
|
clearable: ""
|
|
596
|
-
},
|
|
596
|
+
}, Z(o), { onClear: n.optionClick }), {
|
|
597
597
|
default: R(() => [
|
|
598
|
-
|
|
599
|
-
|
|
598
|
+
Z(o).multiple != null && n.showCheckAll && n.maxLimit == null ? ie(h.$slots, "header", { key: 0 }, () => [
|
|
599
|
+
W(E, {
|
|
600
600
|
class: "mgl20",
|
|
601
|
-
modelValue:
|
|
602
|
-
"onUpdate:modelValue":
|
|
601
|
+
modelValue: w.value,
|
|
602
|
+
"onUpdate:modelValue": g[0] || (g[0] = (S) => w.value = S),
|
|
603
603
|
onChange: u
|
|
604
604
|
}, {
|
|
605
605
|
default: R(() => [
|
|
606
|
-
|
|
606
|
+
te(ne(h.$t("quan-xuan")), 1)
|
|
607
607
|
]),
|
|
608
608
|
_: 1
|
|
609
609
|
}, 8, ["modelValue"])
|
|
610
|
-
], !0) :
|
|
611
|
-
(
|
|
612
|
-
key:
|
|
613
|
-
label:
|
|
614
|
-
disabled:
|
|
615
|
-
onClick:
|
|
616
|
-
value:
|
|
610
|
+
], !0) : ce("", !0),
|
|
611
|
+
(T(!0), re(Ie, null, Ze(c.value, (S, v) => (T(), U($, {
|
|
612
|
+
key: v,
|
|
613
|
+
label: p(S),
|
|
614
|
+
disabled: Z(o).multiple != null && n.maxLimit > 0 ? _(S) : !1,
|
|
615
|
+
onClick: Ee((Y) => f(S), ["stop"]),
|
|
616
|
+
value: Z(o)["value-key"] ? S : S[n.labelValue.value]
|
|
617
617
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
618
618
|
]),
|
|
619
619
|
_: 3
|
|
620
620
|
}, 16, ["modelValue", "filter-method", "onClear"]);
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
|
-
},
|
|
624
|
-
const
|
|
623
|
+
}, Nt = /* @__PURE__ */ ge(Ht, [["__scopeId", "data-v-34eb8641"]]);
|
|
624
|
+
const Kt = Ne({
|
|
625
625
|
props: {
|
|
626
626
|
name: {
|
|
627
627
|
tyepe: String,
|
|
@@ -629,38 +629,38 @@ const Yt = Ye({
|
|
|
629
629
|
}
|
|
630
630
|
}
|
|
631
631
|
});
|
|
632
|
-
function
|
|
632
|
+
function Zt(n, e, t, o, r, l) {
|
|
633
633
|
const a = O("el-icon");
|
|
634
|
-
return
|
|
634
|
+
return T(), U(a, { class: "cmp-icon" }, {
|
|
635
635
|
default: R(() => [
|
|
636
|
-
(
|
|
636
|
+
(T(), U(Ge(n.name)))
|
|
637
637
|
]),
|
|
638
638
|
_: 1
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
|
-
const
|
|
641
|
+
const st = /* @__PURE__ */ ge(Kt, [["render", Zt], ["__scopeId", "data-v-733f9daa"]]), Tn = {
|
|
642
642
|
__name: "index",
|
|
643
643
|
emits: ["ok", "no"],
|
|
644
644
|
setup(n, { emit: e }) {
|
|
645
|
-
const t = e,
|
|
645
|
+
const t = e, o = Qe(() => {
|
|
646
646
|
t("ok");
|
|
647
647
|
}, 500);
|
|
648
|
-
function
|
|
648
|
+
function r() {
|
|
649
649
|
t("no");
|
|
650
650
|
}
|
|
651
|
-
return (
|
|
652
|
-
const d = O("el-link"),
|
|
653
|
-
return
|
|
654
|
-
onConfirm:
|
|
655
|
-
onCancel:
|
|
651
|
+
return (l, a) => {
|
|
652
|
+
const d = O("el-link"), c = O("el-popconfirm");
|
|
653
|
+
return T(), U(c, me(l.$attrs, {
|
|
654
|
+
onConfirm: Z(o),
|
|
655
|
+
onCancel: r
|
|
656
656
|
}), {
|
|
657
657
|
reference: R(() => [
|
|
658
|
-
|
|
658
|
+
W(d, {
|
|
659
659
|
underline: "never",
|
|
660
|
-
type:
|
|
660
|
+
type: l.$attrs.type
|
|
661
661
|
}, {
|
|
662
662
|
default: R(() => [
|
|
663
|
-
|
|
663
|
+
ie(l.$slots, "default")
|
|
664
664
|
]),
|
|
665
665
|
_: 3
|
|
666
666
|
}, 8, ["type"])
|
|
@@ -670,7 +670,7 @@ const rt = /* @__PURE__ */ ge(Yt, [["render", Ht], ["__scopeId", "data-v-733f9da
|
|
|
670
670
|
};
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
|
-
const
|
|
673
|
+
const Gt = ["accept"], Wt = {
|
|
674
674
|
__name: "index",
|
|
675
675
|
props: {
|
|
676
676
|
accept: {
|
|
@@ -684,55 +684,55 @@ const Nt = ["accept"], Kt = {
|
|
|
684
684
|
},
|
|
685
685
|
emits: ["fileChange"],
|
|
686
686
|
setup(n, { emit: e }) {
|
|
687
|
-
const t = e,
|
|
688
|
-
function
|
|
689
|
-
let a =
|
|
690
|
-
t("fileChange", a),
|
|
687
|
+
const t = e, o = q(null);
|
|
688
|
+
function r(l) {
|
|
689
|
+
let a = l.target.files[0];
|
|
690
|
+
t("fileChange", a), o.value.value = null;
|
|
691
691
|
}
|
|
692
|
-
return (
|
|
692
|
+
return (l, a) => {
|
|
693
693
|
const d = O("el-button");
|
|
694
|
-
return
|
|
695
|
-
|
|
694
|
+
return T(), re("span", null, [
|
|
695
|
+
W(d, {
|
|
696
696
|
loading: n.loading,
|
|
697
697
|
class: "mgr10",
|
|
698
|
-
onClick: a[0] || (a[0] = (
|
|
698
|
+
onClick: a[0] || (a[0] = (c) => o.value.click())
|
|
699
699
|
}, {
|
|
700
700
|
default: R(() => [
|
|
701
|
-
|
|
701
|
+
te(ne(l.$t("dao-ru")), 1)
|
|
702
702
|
]),
|
|
703
703
|
_: 1
|
|
704
704
|
}, 8, ["loading"]),
|
|
705
|
-
|
|
706
|
-
onChange:
|
|
705
|
+
ae("input", {
|
|
706
|
+
onChange: r,
|
|
707
707
|
ref_key: "input",
|
|
708
|
-
ref:
|
|
708
|
+
ref: o,
|
|
709
709
|
accept: n.accept,
|
|
710
710
|
style: { position: "absolute", width: "0px", height: "0px", opacity: "0" },
|
|
711
711
|
type: "file"
|
|
712
|
-
}, null, 40,
|
|
712
|
+
}, null, 40, Gt)
|
|
713
713
|
]);
|
|
714
714
|
};
|
|
715
715
|
}
|
|
716
|
-
},
|
|
717
|
-
function
|
|
716
|
+
}, Fn = /* @__PURE__ */ ge(Wt, [["__scopeId", "data-v-5f1449ad"]]);
|
|
717
|
+
function Oe(n) {
|
|
718
718
|
let e = {};
|
|
719
719
|
return n.forEach((t) => {
|
|
720
|
-
const { key:
|
|
721
|
-
if (
|
|
722
|
-
if (
|
|
723
|
-
e[
|
|
724
|
-
else if (
|
|
720
|
+
const { key: o, type: r, option: l = {}, value: a, dateType: d } = t;
|
|
721
|
+
if (o)
|
|
722
|
+
if (r == "input" && (l != null && l.multiple))
|
|
723
|
+
e[o] = at(a);
|
|
724
|
+
else if (r == "date")
|
|
725
725
|
if (d.includes("range")) {
|
|
726
|
-
const [
|
|
727
|
-
let [
|
|
728
|
-
|
|
726
|
+
const [c, w] = o;
|
|
727
|
+
let [C, b] = a || [];
|
|
728
|
+
C && d == "daterange" && (C = ve(C).format("YYYY-MM-DD 00:00:00"), b = ve(b).format("YYYY-MM-DD 23:59:59")), e[c] = C, e[w] = b;
|
|
729
729
|
} else
|
|
730
|
-
e[
|
|
730
|
+
e[o] = a;
|
|
731
731
|
else
|
|
732
|
-
e[
|
|
732
|
+
e[o] = a;
|
|
733
733
|
}), e;
|
|
734
734
|
}
|
|
735
|
-
const
|
|
735
|
+
const Jt = { key: 0 }, Qt = { class: "btns" }, Xt = { class: "left" }, en = { class: "right" }, tn = {
|
|
736
736
|
__name: "index",
|
|
737
737
|
props: {
|
|
738
738
|
form: {
|
|
@@ -742,84 +742,84 @@ const Zt = { key: 0 }, Gt = { class: "btns" }, Wt = { class: "left" }, Jt = { cl
|
|
|
742
742
|
},
|
|
743
743
|
emits: ["confirm", "reset", "visibleChange"],
|
|
744
744
|
setup(n, { expose: e, emit: t }) {
|
|
745
|
-
const
|
|
746
|
-
function
|
|
747
|
-
|
|
745
|
+
const o = n, r = t, l = q(!0), a = q(null), { t: d } = de(), c = se(() => l.value ? d("guan-bi") : d("zhan-kai"));
|
|
746
|
+
function w() {
|
|
747
|
+
r("confirm");
|
|
748
748
|
}
|
|
749
|
-
function
|
|
750
|
-
f.option.onClear && f.option.onClear(),
|
|
749
|
+
function C(f) {
|
|
750
|
+
f.option.onClear && f.option.onClear(), r("confirm");
|
|
751
751
|
}
|
|
752
|
-
function
|
|
753
|
-
|
|
752
|
+
function b() {
|
|
753
|
+
r("reset");
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
|
|
755
|
+
function m() {
|
|
756
|
+
r("confirm");
|
|
757
757
|
}
|
|
758
|
-
function
|
|
759
|
-
return
|
|
758
|
+
function x() {
|
|
759
|
+
return Oe(o.form.items);
|
|
760
760
|
}
|
|
761
|
-
const
|
|
761
|
+
const p = Xe(o.form.items);
|
|
762
762
|
function u() {
|
|
763
|
-
|
|
764
|
-
const
|
|
765
|
-
|
|
763
|
+
o.form.items.forEach((f) => {
|
|
764
|
+
const _ = p.find((h) => h.key == f.key);
|
|
765
|
+
_ && (f.value = _.value);
|
|
766
766
|
});
|
|
767
767
|
}
|
|
768
|
-
return e({ getPrm:
|
|
769
|
-
const h = O("el-input"),
|
|
770
|
-
return
|
|
768
|
+
return e({ getPrm: x, reset: u }), (f, _) => {
|
|
769
|
+
const h = O("el-input"), g = O("el-date-picker"), E = O("el-form-item"), $ = O("el-form"), B = O("el-link"), S = O("el-button");
|
|
770
|
+
return T(), re("div", {
|
|
771
771
|
class: "searchBar-container mgt10 mgb10",
|
|
772
|
-
onKeydown:
|
|
772
|
+
onKeydown: Ct(w, ["enter"])
|
|
773
773
|
}, [
|
|
774
|
-
|
|
774
|
+
ae("div", {
|
|
775
775
|
class: "searchBar",
|
|
776
|
-
style:
|
|
776
|
+
style: xt({ height: l.value ? "auto" : "42px" })
|
|
777
777
|
}, [
|
|
778
|
-
|
|
778
|
+
W($, {
|
|
779
779
|
inline: "",
|
|
780
780
|
model: n.form.data
|
|
781
781
|
}, {
|
|
782
782
|
default: R(() => [
|
|
783
|
-
(
|
|
784
|
-
key:
|
|
783
|
+
(T(!0), re(Ie, null, Ze(n.form.items.filter((v) => !v.hidden), (v) => (T(), re(Ie, {
|
|
784
|
+
key: v.key
|
|
785
785
|
}, [
|
|
786
|
-
|
|
786
|
+
v.type == "br" ? (T(), re("br", Jt)) : (T(), U(E, {
|
|
787
787
|
key: 1,
|
|
788
|
-
label:
|
|
788
|
+
label: v.name
|
|
789
789
|
}, {
|
|
790
790
|
default: R(() => {
|
|
791
|
-
var
|
|
791
|
+
var Y, H;
|
|
792
792
|
return [
|
|
793
|
-
|
|
793
|
+
v.type === "input" ? (T(), U(h, {
|
|
794
794
|
key: 0,
|
|
795
|
-
modelValue:
|
|
796
|
-
"onUpdate:modelValue": (z) =>
|
|
797
|
-
class:
|
|
795
|
+
modelValue: v.value,
|
|
796
|
+
"onUpdate:modelValue": (z) => v.value = z,
|
|
797
|
+
class: Le(((Y = v.option) == null ? void 0 : Y.class) || "w150"),
|
|
798
798
|
placeholder: f.$t("qing-shu-ru"),
|
|
799
799
|
clearable: ""
|
|
800
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) :
|
|
801
|
-
|
|
800
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : v.type === "custom" ? (T(), U(Ge(v.render), { key: 1 })) : ce("", !0),
|
|
801
|
+
v.type === "select" ? (T(), U(Nt, me({
|
|
802
802
|
key: 2,
|
|
803
|
-
class: ((
|
|
804
|
-
modelValue:
|
|
805
|
-
"onUpdate:modelValue": (z) =>
|
|
806
|
-
}, { ref_for: !0 },
|
|
807
|
-
onChange:
|
|
808
|
-
onClear: (z) =>
|
|
809
|
-
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) :
|
|
810
|
-
|
|
803
|
+
class: ((H = v.option) == null ? void 0 : H.class) || "w150",
|
|
804
|
+
modelValue: v.value,
|
|
805
|
+
"onUpdate:modelValue": (z) => v.value = z
|
|
806
|
+
}, { ref_for: !0 }, v.option, {
|
|
807
|
+
onChange: w,
|
|
808
|
+
onClear: (z) => C(v)
|
|
809
|
+
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : ce("", !0),
|
|
810
|
+
v.type === "date" ? (T(), U(g, {
|
|
811
811
|
key: 3,
|
|
812
|
-
class:
|
|
813
|
-
modelValue:
|
|
814
|
-
"onUpdate:modelValue": (z) =>
|
|
815
|
-
"value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[
|
|
816
|
-
type:
|
|
817
|
-
onFocus: (z) => a.value =
|
|
818
|
-
onChange: (z) =>
|
|
812
|
+
class: Le({ datetimerange: "w300", daterange: "w200" }[v.dateType] || "w100"),
|
|
813
|
+
modelValue: v.value,
|
|
814
|
+
"onUpdate:modelValue": (z) => v.value = z,
|
|
815
|
+
"value-format": { datetimerange: "YYYY-MM-DD HH:mm:ss", daterange: "YYYY-MM-DD" }[v.dateType] || "YYYY-MM-DD",
|
|
816
|
+
type: v.dateType || "date",
|
|
817
|
+
onFocus: (z) => a.value = v,
|
|
818
|
+
onChange: (z) => m(),
|
|
819
819
|
placeholder: f.$t("qing-xuan-ze"),
|
|
820
820
|
"start-placeholder": f.$t("kai-shi-shi-jian"),
|
|
821
821
|
"end-placeholder": f.$t("jie-shu-shi-jian")
|
|
822
|
-
}, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) :
|
|
822
|
+
}, null, 8, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : ce("", !0)
|
|
823
823
|
];
|
|
824
824
|
}),
|
|
825
825
|
_: 2
|
|
@@ -829,58 +829,58 @@ const Zt = { key: 0 }, Gt = { class: "btns" }, Wt = { class: "left" }, Jt = { cl
|
|
|
829
829
|
_: 1
|
|
830
830
|
}, 8, ["model"])
|
|
831
831
|
], 4),
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
832
|
+
ae("div", Qt, [
|
|
833
|
+
ae("div", Xt, [
|
|
834
|
+
ie(f.$slots, "table-header-left", {}, void 0, !0)
|
|
835
835
|
]),
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
ae("div", en, [
|
|
837
|
+
W(B, {
|
|
838
838
|
underline: "never",
|
|
839
839
|
class: "mgr10",
|
|
840
|
-
onClick:
|
|
841
|
-
|
|
840
|
+
onClick: _[0] || (_[0] = () => {
|
|
841
|
+
r("visibleChange", !l.value), l.value = !l.value;
|
|
842
842
|
})
|
|
843
843
|
}, {
|
|
844
844
|
default: R(() => [
|
|
845
|
-
|
|
846
|
-
name:
|
|
845
|
+
W(st, {
|
|
846
|
+
name: l.value ? "ArrowUp" : "ArrowDown"
|
|
847
847
|
}, null, 8, ["name"]),
|
|
848
|
-
|
|
848
|
+
te(" " + ne(c.value), 1)
|
|
849
849
|
]),
|
|
850
850
|
_: 1
|
|
851
851
|
}),
|
|
852
|
-
|
|
852
|
+
W(S, {
|
|
853
853
|
type: "primary",
|
|
854
|
-
onClick:
|
|
854
|
+
onClick: w
|
|
855
855
|
}, {
|
|
856
856
|
default: R(() => [
|
|
857
|
-
|
|
857
|
+
te(ne(f.$t("shai-xuan")), 1)
|
|
858
858
|
]),
|
|
859
859
|
_: 1
|
|
860
860
|
}),
|
|
861
|
-
|
|
861
|
+
W(S, {
|
|
862
862
|
type: "primary",
|
|
863
|
-
onClick:
|
|
863
|
+
onClick: b
|
|
864
864
|
}, {
|
|
865
865
|
default: R(() => [
|
|
866
|
-
|
|
866
|
+
te(ne(f.$t("chong-zhi")), 1)
|
|
867
867
|
]),
|
|
868
868
|
_: 1
|
|
869
869
|
}),
|
|
870
|
-
|
|
870
|
+
ie(f.$slots, "btn", {}, void 0, !0)
|
|
871
871
|
])
|
|
872
872
|
])
|
|
873
873
|
], 32);
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
|
-
},
|
|
877
|
-
const
|
|
876
|
+
}, nn = /* @__PURE__ */ ge(tn, [["__scopeId", "data-v-32ac9990"]]);
|
|
877
|
+
const on = { class: "center" }, ln = {
|
|
878
878
|
__name: "index",
|
|
879
879
|
props: {
|
|
880
|
-
// 表格id
|
|
880
|
+
// 表格id 本地存储列设置时使用,不传则使用路由路径自动生成
|
|
881
881
|
id: {
|
|
882
882
|
type: String,
|
|
883
|
-
required: !
|
|
883
|
+
required: !1
|
|
884
884
|
},
|
|
885
885
|
loading: {
|
|
886
886
|
type: Boolean,
|
|
@@ -916,91 +916,111 @@ const en = { class: "center" }, tn = {
|
|
|
916
916
|
}
|
|
917
917
|
},
|
|
918
918
|
setup(n, { expose: e }) {
|
|
919
|
-
const { t, locale:
|
|
920
|
-
|
|
921
|
-
const
|
|
922
|
-
|
|
919
|
+
const { t, locale: o } = de(), r = St(), l = n, a = q(!1), d = q([]);
|
|
920
|
+
l.searchForm.selections = [];
|
|
921
|
+
const c = se(() => {
|
|
922
|
+
const i = r.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
923
|
+
return l.id ? `listPageId-${i}-${l.id}` : `listPageId-${i}`;
|
|
924
|
+
});
|
|
925
|
+
l.searchForm.enableCellCopy == null && (l.searchForm.enableCellCopy = !0);
|
|
926
|
+
const w = Xe(l.searchForm.items), C = l.searchForm.pageNoKey || "pageNo", b = pe({
|
|
927
|
+
[C]: 1,
|
|
923
928
|
pageSize: 10,
|
|
924
929
|
total: 0
|
|
925
|
-
}),
|
|
926
|
-
|
|
927
|
-
if (!
|
|
930
|
+
}), m = q(null), x = q(null), p = q(450), u = Qe(() => {
|
|
931
|
+
$e(() => {
|
|
932
|
+
if (!x.value)
|
|
928
933
|
return;
|
|
929
|
-
const s =
|
|
930
|
-
|
|
934
|
+
const s = x.value.getBoundingClientRect(), y = window.innerHeight, L = s.top, A = 100, G = y - L - A, V = 200;
|
|
935
|
+
p.value = Math.max(G, V);
|
|
931
936
|
});
|
|
932
|
-
}, 100),
|
|
933
|
-
|
|
934
|
-
},
|
|
935
|
-
if (!
|
|
937
|
+
}, 100), f = () => {
|
|
938
|
+
u();
|
|
939
|
+
}, _ = () => {
|
|
940
|
+
if (!l.searchForm.enableCellCopy)
|
|
936
941
|
return !1;
|
|
937
|
-
const
|
|
938
|
-
if (!
|
|
942
|
+
const i = m.value;
|
|
943
|
+
if (!i || !i.$el)
|
|
939
944
|
return !1;
|
|
940
|
-
const s =
|
|
941
|
-
return s.classList.add("cell-copy-enabled"), s.setAttribute("tabindex", "-1"), s.removeEventListener("mousedown",
|
|
945
|
+
const s = i.$el;
|
|
946
|
+
return s.classList.add("cell-copy-enabled"), s.setAttribute("tabindex", "-1"), s.removeEventListener("mousedown", be), s.removeEventListener("mousemove", ye), s.removeEventListener("mouseup", Ce), s.removeEventListener("keydown", we), s.addEventListener("mousedown", be), s.addEventListener("mousemove", ye), s.addEventListener("mouseup", Ce), s.addEventListener("keydown", we), !0;
|
|
942
947
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
948
|
+
Ke(() => {
|
|
949
|
+
u(), window.addEventListener("resize", f), l.searchForm.enableCellCopy && (document.addEventListener("mouseup", Ve), document.addEventListener("mousedown", Ue), setTimeout(() => {
|
|
950
|
+
_();
|
|
946
951
|
}, 500));
|
|
947
|
-
}),
|
|
948
|
-
|
|
949
|
-
|
|
952
|
+
}), wt(() => {
|
|
953
|
+
l.searchForm.enableCellCopy && setTimeout(() => {
|
|
954
|
+
_();
|
|
950
955
|
}, 500);
|
|
951
|
-
}),
|
|
952
|
-
if (window.removeEventListener("resize",
|
|
953
|
-
document.removeEventListener("mouseup",
|
|
954
|
-
const
|
|
955
|
-
if (
|
|
956
|
-
const s =
|
|
957
|
-
s.removeEventListener("mousedown",
|
|
956
|
+
}), kt(() => {
|
|
957
|
+
if (window.removeEventListener("resize", f), l.searchForm.enableCellCopy) {
|
|
958
|
+
document.removeEventListener("mouseup", Ve), document.removeEventListener("mousedown", Ue);
|
|
959
|
+
const i = m.value;
|
|
960
|
+
if (i && i.$el) {
|
|
961
|
+
const s = i.$el;
|
|
962
|
+
s.removeEventListener("mousedown", be), s.removeEventListener("mousemove", ye), s.removeEventListener("mouseup", Ce), s.removeEventListener("keydown", we);
|
|
958
963
|
}
|
|
959
964
|
}
|
|
960
965
|
});
|
|
961
|
-
const
|
|
962
|
-
let
|
|
963
|
-
async function
|
|
964
|
-
const { dataFormat: s } =
|
|
965
|
-
|
|
966
|
-
const { code:
|
|
967
|
-
|
|
966
|
+
const h = se(() => z.value.height || p.value);
|
|
967
|
+
let g;
|
|
968
|
+
async function E(i) {
|
|
969
|
+
const { dataFormat: s } = l.tableConfig;
|
|
970
|
+
i.pageNo != 1 && (i.nextSearchAfter = g), a.value = !0;
|
|
971
|
+
const { code: y, data: L = {} } = await l.api(i).finally(() => {
|
|
972
|
+
a.value = !1, l.searchForm.selections = [];
|
|
968
973
|
});
|
|
969
|
-
if (
|
|
970
|
-
let A =
|
|
971
|
-
|
|
974
|
+
if (y == 200) {
|
|
975
|
+
let A = L.rows || L.records || [];
|
|
976
|
+
d.value = s ? s(A) : A, b.total = L.totalRows || L.total || 0, g = L.nextSearchAfter, l.searchForm.enableCellCopy && $e(() => {
|
|
972
977
|
setTimeout(() => {
|
|
973
|
-
|
|
978
|
+
_();
|
|
974
979
|
}, 100);
|
|
975
980
|
});
|
|
976
981
|
}
|
|
977
982
|
}
|
|
978
|
-
function
|
|
979
|
-
const { searchData: s = () => ({}) } =
|
|
980
|
-
|
|
983
|
+
function $(i = {}) {
|
|
984
|
+
const { searchData: s = () => ({}) } = l.tableConfig, y = s();
|
|
985
|
+
E({ ...b, ...Oe(l.searchForm.items), ...i, ...y });
|
|
981
986
|
}
|
|
982
|
-
function
|
|
983
|
-
const { reset:
|
|
984
|
-
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
}),
|
|
987
|
+
function B() {
|
|
988
|
+
const { reset: i } = l.tableConfig;
|
|
989
|
+
i && i(), l.searchForm.items.forEach((s) => {
|
|
990
|
+
const y = w.find((L) => Ye(s.key) && Ye(L.key) ? s.key.join(",") == L.key.join(",") : L.key == s.key);
|
|
991
|
+
y && (s.value = y.value);
|
|
992
|
+
}), $();
|
|
988
993
|
}
|
|
989
|
-
|
|
990
|
-
function
|
|
991
|
-
return { ...
|
|
994
|
+
l.api && l.immediate && $();
|
|
995
|
+
function S() {
|
|
996
|
+
return { ...b, ...Oe(l.searchForm.items) };
|
|
992
997
|
}
|
|
993
|
-
const
|
|
994
|
-
const
|
|
995
|
-
|
|
996
|
-
},
|
|
998
|
+
const v = () => {
|
|
999
|
+
const i = m.value;
|
|
1000
|
+
i && i.clearSort();
|
|
1001
|
+
}, Y = pe({
|
|
997
1002
|
storage: !0
|
|
998
|
-
}),
|
|
999
|
-
width: "auto",
|
|
1003
|
+
}), H = pe({
|
|
1000
1004
|
drag: !0,
|
|
1001
1005
|
resizable: !0,
|
|
1002
1006
|
maxFixedSize: 0
|
|
1003
|
-
}),
|
|
1007
|
+
}), z = se(() => {
|
|
1008
|
+
const { customConfig: i, columnConfig: s, ...y } = l.tableConfig;
|
|
1009
|
+
return {
|
|
1010
|
+
headerAlign: "left",
|
|
1011
|
+
align: "center",
|
|
1012
|
+
customConfig: { ...Y, ...i },
|
|
1013
|
+
columnConfig: { ...H, ...s },
|
|
1014
|
+
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1015
|
+
"virtual-x-config": {
|
|
1016
|
+
enabled: !1,
|
|
1017
|
+
scrollToLeftOnChange: !1
|
|
1018
|
+
},
|
|
1019
|
+
// 纵向虚拟滚动 大于100条开启
|
|
1020
|
+
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1021
|
+
...y
|
|
1022
|
+
};
|
|
1023
|
+
}), k = pe({
|
|
1004
1024
|
isSelecting: !1,
|
|
1005
1025
|
// 是否正在选择
|
|
1006
1026
|
startCell: null,
|
|
@@ -1009,71 +1029,71 @@ const en = { class: "center" }, tn = {
|
|
|
1009
1029
|
// 结束单元格
|
|
1010
1030
|
selectedCells: []
|
|
1011
1031
|
// 选中的单元格列表 [{ rowIndex, colIndex }]
|
|
1012
|
-
}),
|
|
1013
|
-
const s =
|
|
1032
|
+
}), Me = (i) => {
|
|
1033
|
+
const s = i.closest(".vxe-body--column");
|
|
1014
1034
|
if (!s || s.classList.contains("col--checkbox") || s.classList.contains("col--seq"))
|
|
1015
1035
|
return null;
|
|
1016
|
-
const
|
|
1017
|
-
if (!
|
|
1036
|
+
const y = s.closest(".vxe-body--row");
|
|
1037
|
+
if (!y)
|
|
1018
1038
|
return null;
|
|
1019
|
-
const
|
|
1020
|
-
if (!
|
|
1039
|
+
const L = m.value;
|
|
1040
|
+
if (!L)
|
|
1021
1041
|
return null;
|
|
1022
1042
|
let A = -1;
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
A = parseInt(
|
|
1043
|
+
const G = y.getAttribute("data-rowid");
|
|
1044
|
+
if (G != null)
|
|
1045
|
+
A = parseInt(G, 10);
|
|
1026
1046
|
else {
|
|
1027
|
-
const F =
|
|
1028
|
-
A = Array.from(F.querySelectorAll(".vxe-body--row")).indexOf(
|
|
1047
|
+
const F = y.parentElement;
|
|
1048
|
+
A = Array.from(F.querySelectorAll(".vxe-body--row")).indexOf(y);
|
|
1029
1049
|
}
|
|
1030
1050
|
if (A < 0)
|
|
1031
1051
|
return null;
|
|
1032
1052
|
let V = -1;
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1035
|
-
const
|
|
1053
|
+
const ee = s.getAttribute("data-colid");
|
|
1054
|
+
if (ee && (V = L.getColumns().findIndex((I) => I.id === ee)), V < 0) {
|
|
1055
|
+
const I = Array.from(y.querySelectorAll(".vxe-body--column")).indexOf(s), j = !!s.closest(".vxe-table--fixed-left-wrapper"), N = !!s.closest(".vxe-table--fixed-right-wrapper"), M = L.getColumns();
|
|
1036
1056
|
if (j) {
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1039
|
-
} else if (
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1057
|
+
const K = M.filter((P) => P.fixed === "left");
|
|
1058
|
+
I < K.length && (V = M.indexOf(K[I]));
|
|
1059
|
+
} else if (N) {
|
|
1060
|
+
const K = M.filter((P) => P.fixed === "right");
|
|
1061
|
+
I < K.length && (V = M.indexOf(K[I]));
|
|
1042
1062
|
} else {
|
|
1043
|
-
const
|
|
1044
|
-
V = M.filter((
|
|
1063
|
+
const K = l.searchForm.showCheckBox ? 1 : 0;
|
|
1064
|
+
V = M.filter((J) => J.fixed === "left").length + I - K;
|
|
1045
1065
|
}
|
|
1046
1066
|
}
|
|
1047
1067
|
return V < 0 ? null : { rowIndex: A, colIndex: V, cell: s };
|
|
1048
|
-
},
|
|
1049
|
-
const s =
|
|
1068
|
+
}, be = (i) => {
|
|
1069
|
+
const s = Me(i.target);
|
|
1050
1070
|
if (!s) {
|
|
1051
|
-
|
|
1071
|
+
xe();
|
|
1052
1072
|
return;
|
|
1053
1073
|
}
|
|
1054
|
-
|
|
1074
|
+
k.isSelecting = !0, k.startCell = {
|
|
1055
1075
|
rowIndex: s.rowIndex,
|
|
1056
1076
|
colIndex: s.colIndex
|
|
1057
|
-
},
|
|
1058
|
-
},
|
|
1059
|
-
if (!
|
|
1077
|
+
}, k.endCell = { ...k.startCell }, Re(), Ae();
|
|
1078
|
+
}, ye = (i) => {
|
|
1079
|
+
if (!k.isSelecting)
|
|
1060
1080
|
return;
|
|
1061
|
-
const s =
|
|
1062
|
-
s && (
|
|
1081
|
+
const s = Me(i.target);
|
|
1082
|
+
s && (k.endCell = {
|
|
1063
1083
|
rowIndex: s.rowIndex,
|
|
1064
1084
|
colIndex: s.colIndex
|
|
1065
|
-
},
|
|
1066
|
-
},
|
|
1067
|
-
|
|
1068
|
-
},
|
|
1069
|
-
|
|
1070
|
-
const
|
|
1071
|
-
if (!
|
|
1085
|
+
}, Re(), Ae());
|
|
1086
|
+
}, Ce = () => {
|
|
1087
|
+
k.isSelecting = !1;
|
|
1088
|
+
}, xe = () => {
|
|
1089
|
+
k.selectedCells = [], k.startCell = null, k.endCell = null;
|
|
1090
|
+
const i = m.value;
|
|
1091
|
+
if (!i)
|
|
1072
1092
|
return;
|
|
1073
|
-
|
|
1093
|
+
i.$el.querySelectorAll(
|
|
1074
1094
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1075
|
-
).forEach((
|
|
1076
|
-
|
|
1095
|
+
).forEach((y) => {
|
|
1096
|
+
y.classList.remove(
|
|
1077
1097
|
"cell-selected",
|
|
1078
1098
|
"cell-border-top",
|
|
1079
1099
|
"cell-border-right",
|
|
@@ -1081,25 +1101,25 @@ const en = { class: "center" }, tn = {
|
|
|
1081
1101
|
"cell-border-left"
|
|
1082
1102
|
);
|
|
1083
1103
|
});
|
|
1084
|
-
},
|
|
1085
|
-
if (!
|
|
1086
|
-
|
|
1104
|
+
}, Re = () => {
|
|
1105
|
+
if (!k.startCell || !k.endCell) {
|
|
1106
|
+
k.selectedCells = [];
|
|
1087
1107
|
return;
|
|
1088
1108
|
}
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1091
|
-
for (let F = A; F <=
|
|
1092
|
-
for (let
|
|
1093
|
-
|
|
1109
|
+
const i = k.startCell.rowIndex, s = k.endCell.rowIndex, y = k.startCell.colIndex, L = k.endCell.colIndex, A = Math.min(i, s), G = Math.max(i, s), V = Math.min(y, L), ee = Math.max(y, L);
|
|
1110
|
+
k.selectedCells = [];
|
|
1111
|
+
for (let F = A; F <= G; F++)
|
|
1112
|
+
for (let I = V; I <= ee; I++)
|
|
1113
|
+
k.selectedCells.push({
|
|
1094
1114
|
rowIndex: F,
|
|
1095
|
-
colIndex:
|
|
1115
|
+
colIndex: I
|
|
1096
1116
|
});
|
|
1097
|
-
},
|
|
1098
|
-
|
|
1099
|
-
const
|
|
1100
|
-
if (!
|
|
1117
|
+
}, Ae = () => {
|
|
1118
|
+
$e(() => {
|
|
1119
|
+
const i = m.value;
|
|
1120
|
+
if (!i)
|
|
1101
1121
|
return;
|
|
1102
|
-
const s =
|
|
1122
|
+
const s = i.$el;
|
|
1103
1123
|
if (s.querySelectorAll(
|
|
1104
1124
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1105
1125
|
).forEach((j) => {
|
|
@@ -1110,242 +1130,226 @@ const en = { class: "center" }, tn = {
|
|
|
1110
1130
|
"cell-border-bottom",
|
|
1111
1131
|
"cell-border-left"
|
|
1112
1132
|
);
|
|
1113
|
-
}),
|
|
1133
|
+
}), k.selectedCells.length === 0)
|
|
1114
1134
|
return;
|
|
1115
|
-
const
|
|
1135
|
+
const y = i.getColumns(), L = k.selectedCells.map((j) => j.rowIndex), A = k.selectedCells.map((j) => j.colIndex), G = Math.min(...L), V = Math.max(...L), ee = Math.min(...A), F = Math.max(...A), I = [
|
|
1116
1136
|
s.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1117
1137
|
s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1118
1138
|
s.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1119
1139
|
].filter(Boolean);
|
|
1120
|
-
|
|
1121
|
-
const M =
|
|
1140
|
+
k.selectedCells.forEach(({ rowIndex: j, colIndex: N }) => {
|
|
1141
|
+
const M = y[N];
|
|
1122
1142
|
if (!M)
|
|
1123
1143
|
return;
|
|
1124
|
-
const
|
|
1125
|
-
for (const
|
|
1126
|
-
const fe =
|
|
1144
|
+
const K = M.fixed === "left", P = M.fixed === "right";
|
|
1145
|
+
for (const J of I) {
|
|
1146
|
+
const fe = J.querySelectorAll(".vxe-body--row")[j];
|
|
1127
1147
|
if (!fe)
|
|
1128
1148
|
continue;
|
|
1129
|
-
const
|
|
1149
|
+
const oe = Array.from(fe.querySelectorAll(".vxe-body--column"));
|
|
1130
1150
|
let D = null;
|
|
1131
|
-
if (
|
|
1132
|
-
const
|
|
1133
|
-
D =
|
|
1134
|
-
} else if (
|
|
1135
|
-
const
|
|
1136
|
-
D =
|
|
1137
|
-
} else if (!
|
|
1138
|
-
const
|
|
1139
|
-
D =
|
|
1151
|
+
if (K && J.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1152
|
+
const Q = y.filter((X) => X.fixed === "left").indexOf(M);
|
|
1153
|
+
D = oe[Q];
|
|
1154
|
+
} else if (P && J.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1155
|
+
const Q = y.filter((X) => X.fixed === "right").indexOf(M);
|
|
1156
|
+
D = oe[Q];
|
|
1157
|
+
} else if (!K && !P && J.closest(".vxe-table--body-wrapper")) {
|
|
1158
|
+
const le = l.searchForm.showCheckBox ? 1 : 0, Q = y.filter((ke) => ke.fixed === "left").length, X = N - Q;
|
|
1159
|
+
D = oe[X + le];
|
|
1140
1160
|
}
|
|
1141
1161
|
if (D && !D.classList.contains("col--checkbox") && !D.classList.contains("col--seq")) {
|
|
1142
|
-
D.classList.add("cell-selected"), j ===
|
|
1162
|
+
D.classList.add("cell-selected"), j === G && D.classList.add("cell-border-top"), j === V && D.classList.add("cell-border-bottom"), N === ee && D.classList.add("cell-border-left"), N === F && D.classList.add("cell-border-right");
|
|
1143
1163
|
break;
|
|
1144
1164
|
}
|
|
1145
1165
|
}
|
|
1146
1166
|
});
|
|
1147
1167
|
});
|
|
1148
|
-
},
|
|
1149
|
-
if (
|
|
1168
|
+
}, ct = async () => {
|
|
1169
|
+
if (k.selectedCells.length === 0)
|
|
1150
1170
|
return;
|
|
1151
|
-
const
|
|
1152
|
-
if (!
|
|
1171
|
+
const i = m.value;
|
|
1172
|
+
if (!i)
|
|
1153
1173
|
return;
|
|
1154
|
-
const s =
|
|
1155
|
-
(F,
|
|
1156
|
-
), A = [...new Set(
|
|
1157
|
-
(F,
|
|
1158
|
-
),
|
|
1174
|
+
const s = i.$el, y = i.getColumns(), L = [...new Set(k.selectedCells.map((F) => F.rowIndex))].sort(
|
|
1175
|
+
(F, I) => F - I
|
|
1176
|
+
), A = [...new Set(k.selectedCells.map((F) => F.colIndex))].sort(
|
|
1177
|
+
(F, I) => F - I
|
|
1178
|
+
), G = [
|
|
1159
1179
|
s.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1160
1180
|
s.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1161
1181
|
s.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1162
1182
|
].filter(Boolean), V = [];
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1183
|
+
L.forEach((F) => {
|
|
1184
|
+
const I = [];
|
|
1165
1185
|
A.forEach((j) => {
|
|
1166
|
-
const
|
|
1167
|
-
if (!
|
|
1168
|
-
|
|
1186
|
+
const N = y[j];
|
|
1187
|
+
if (!N) {
|
|
1188
|
+
I.push("");
|
|
1169
1189
|
return;
|
|
1170
1190
|
}
|
|
1171
|
-
const M =
|
|
1172
|
-
let
|
|
1173
|
-
for (const
|
|
1174
|
-
const fe =
|
|
1191
|
+
const M = N.fixed === "left", K = N.fixed === "right";
|
|
1192
|
+
let P = "";
|
|
1193
|
+
for (const J of G) {
|
|
1194
|
+
const fe = J.querySelectorAll(".vxe-body--row")[F];
|
|
1175
1195
|
if (!fe)
|
|
1176
1196
|
continue;
|
|
1177
|
-
const
|
|
1197
|
+
const oe = Array.from(fe.querySelectorAll(".vxe-body--column"));
|
|
1178
1198
|
let D = null;
|
|
1179
|
-
if (M &&
|
|
1180
|
-
const
|
|
1181
|
-
D =
|
|
1182
|
-
} else if (
|
|
1183
|
-
const
|
|
1184
|
-
D =
|
|
1185
|
-
} else if (!M && !
|
|
1186
|
-
const
|
|
1187
|
-
D =
|
|
1199
|
+
if (M && J.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1200
|
+
const Q = y.filter((X) => X.fixed === "left").indexOf(N);
|
|
1201
|
+
D = oe[Q];
|
|
1202
|
+
} else if (K && J.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1203
|
+
const Q = y.filter((X) => X.fixed === "right").indexOf(N);
|
|
1204
|
+
D = oe[Q];
|
|
1205
|
+
} else if (!M && !K && J.closest(".vxe-table--body-wrapper")) {
|
|
1206
|
+
const le = l.searchForm.showCheckBox ? 1 : 0, Q = y.filter((ke) => ke.fixed === "left").length, X = j - Q;
|
|
1207
|
+
D = oe[X + le];
|
|
1188
1208
|
}
|
|
1189
1209
|
if (D && !D.classList.contains("col--checkbox") && !D.classList.contains("col--seq")) {
|
|
1190
|
-
|
|
1210
|
+
P = D.innerText || D.textContent || "", P = P.trim(), P = P.replace(/\n/g, " ").replace(/\s+/g, " ");
|
|
1191
1211
|
break;
|
|
1192
1212
|
}
|
|
1193
1213
|
}
|
|
1194
|
-
|
|
1195
|
-
}), V.push(
|
|
1214
|
+
I.push(P);
|
|
1215
|
+
}), V.push(I.join(" "));
|
|
1196
1216
|
});
|
|
1197
|
-
const
|
|
1217
|
+
const ee = V.join(`
|
|
1198
1218
|
`);
|
|
1199
1219
|
try {
|
|
1200
|
-
await navigator.clipboard.writeText(
|
|
1220
|
+
await navigator.clipboard.writeText(ee);
|
|
1201
1221
|
} catch (F) {
|
|
1202
1222
|
console.error("复制失败:", F);
|
|
1203
1223
|
}
|
|
1204
|
-
},
|
|
1205
|
-
|
|
1206
|
-
},
|
|
1207
|
-
|
|
1208
|
-
},
|
|
1209
|
-
const s =
|
|
1224
|
+
}, we = (i) => {
|
|
1225
|
+
l.searchForm.enableCellCopy && ((i.ctrlKey || i.metaKey) && i.key === "c" ? k.selectedCells.length > 0 && (i.preventDefault(), i.stopPropagation(), ct()) : i.key === "Escape" && xe());
|
|
1226
|
+
}, Ve = () => {
|
|
1227
|
+
k.isSelecting = !1;
|
|
1228
|
+
}, Ue = (i) => {
|
|
1229
|
+
const s = m.value;
|
|
1210
1230
|
if (!s || !s.$el)
|
|
1211
1231
|
return;
|
|
1212
|
-
s.$el.contains(
|
|
1213
|
-
},
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
align: "center",
|
|
1218
|
-
customConfig: { ..._, ...c },
|
|
1219
|
-
columnConfig: { ...y, ...s },
|
|
1220
|
-
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1221
|
-
"virtual-x-config": {
|
|
1222
|
-
enabled: !1,
|
|
1223
|
-
scrollToLeftOnChange: !1
|
|
1224
|
-
},
|
|
1225
|
-
// 纵向虚拟滚动 大于100条开启
|
|
1226
|
-
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1227
|
-
...C
|
|
1228
|
-
};
|
|
1229
|
-
}), it = (c) => {
|
|
1230
|
-
v.pageNo = c, m();
|
|
1231
|
-
}, ct = (c) => {
|
|
1232
|
-
v.pageSize = c, v[i] = 1, m();
|
|
1232
|
+
s.$el.contains(i.target) || xe();
|
|
1233
|
+
}, ut = (i) => {
|
|
1234
|
+
b.pageNo = i, $();
|
|
1235
|
+
}, dt = (i) => {
|
|
1236
|
+
b.pageSize = i, b[C] = 1, $();
|
|
1233
1237
|
};
|
|
1234
|
-
function
|
|
1235
|
-
const
|
|
1236
|
-
|
|
1238
|
+
function je() {
|
|
1239
|
+
const i = m.value.getCheckboxRecords();
|
|
1240
|
+
l.searchForm.selections = i;
|
|
1237
1241
|
}
|
|
1238
|
-
const
|
|
1239
|
-
const s =
|
|
1242
|
+
const qe = (i) => {
|
|
1243
|
+
const s = m.value;
|
|
1240
1244
|
if (s) {
|
|
1241
|
-
s.toggleCheckboxRow(
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1245
|
+
s.toggleCheckboxRow(i);
|
|
1246
|
+
const y = m.value.getCheckboxRecords();
|
|
1247
|
+
l.searchForm.selections = y;
|
|
1244
1248
|
}
|
|
1245
1249
|
};
|
|
1246
|
-
return e({ tableRef:
|
|
1250
|
+
return e({ tableRef: m, getList: $, getPrm: S, clearSort: v, calculateTableHeight: u }), (i, s) => {
|
|
1247
1251
|
var F;
|
|
1248
|
-
const
|
|
1249
|
-
return
|
|
1250
|
-
class:
|
|
1252
|
+
const y = O("el-button"), L = O("el-checkbox"), A = O("el-text"), G = O("vxe-column"), V = O("VxeTable"), ee = O("el-pagination");
|
|
1253
|
+
return T(), re("div", {
|
|
1254
|
+
class: Le({ box: n.searchForm.showShadow })
|
|
1251
1255
|
}, [
|
|
1252
|
-
n.searchForm.showSearch ? (
|
|
1256
|
+
n.searchForm.showSearch ? (T(), U(nn, {
|
|
1253
1257
|
key: 0,
|
|
1254
1258
|
form: n.searchForm,
|
|
1255
|
-
onReset:
|
|
1256
|
-
onConfirm: s[1] || (s[1] = (
|
|
1257
|
-
onVisibleChange:
|
|
1259
|
+
onReset: B,
|
|
1260
|
+
onConfirm: s[1] || (s[1] = (I) => $()),
|
|
1261
|
+
onVisibleChange: Z(u)
|
|
1258
1262
|
}, {
|
|
1259
1263
|
btn: R(() => [
|
|
1260
|
-
|
|
1261
|
-
|
|
1264
|
+
ie(i.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1265
|
+
W(y, {
|
|
1262
1266
|
round: "",
|
|
1263
|
-
onClick: s[0] || (s[0] = (
|
|
1267
|
+
onClick: s[0] || (s[0] = (I) => m.value.openCustom())
|
|
1264
1268
|
}, {
|
|
1265
1269
|
default: R(() => [
|
|
1266
|
-
|
|
1270
|
+
W(st, { name: "Tools" })
|
|
1267
1271
|
]),
|
|
1268
1272
|
_: 1
|
|
1269
1273
|
})
|
|
1270
1274
|
]),
|
|
1271
1275
|
_: 3
|
|
1272
|
-
}, 8, ["form", "onVisibleChange"])) :
|
|
1273
|
-
|
|
1274
|
-
|
|
1276
|
+
}, 8, ["form", "onVisibleChange"])) : ce("", !0),
|
|
1277
|
+
ie(i.$slots, "table-header-left", {}, void 0, !0),
|
|
1278
|
+
ae("div", {
|
|
1275
1279
|
ref_key: "tableContentRef",
|
|
1276
|
-
ref:
|
|
1280
|
+
ref: x
|
|
1277
1281
|
}, [
|
|
1278
|
-
|
|
1279
|
-
id:
|
|
1282
|
+
W(V, me({
|
|
1283
|
+
id: c.value,
|
|
1280
1284
|
ref_key: "tableRef",
|
|
1281
|
-
ref:
|
|
1282
|
-
loading: n.loading ||
|
|
1283
|
-
data: n.api ?
|
|
1285
|
+
ref: m,
|
|
1286
|
+
loading: n.loading || a.value,
|
|
1287
|
+
data: n.api ? d.value : n.data,
|
|
1284
1288
|
border: ""
|
|
1285
|
-
},
|
|
1286
|
-
height:
|
|
1287
|
-
onCheckboxChange:
|
|
1288
|
-
onCheckboxAll:
|
|
1289
|
-
onSortChange: (F =
|
|
1289
|
+
}, z.value, {
|
|
1290
|
+
height: h.value,
|
|
1291
|
+
onCheckboxChange: je,
|
|
1292
|
+
onCheckboxAll: je,
|
|
1293
|
+
onSortChange: (F = z.value["sort-config"]) == null ? void 0 : F.sortChange
|
|
1290
1294
|
}), {
|
|
1291
1295
|
default: R(() => [
|
|
1292
|
-
n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (
|
|
1296
|
+
n.searchForm.showCheckBox == null || n.searchForm.showCheckBox ? (T(), U(G, {
|
|
1293
1297
|
key: 0,
|
|
1294
1298
|
type: "checkbox",
|
|
1295
|
-
width:
|
|
1296
|
-
title:
|
|
1299
|
+
width: Z(o) == "zh_cn" ? 80 : 150,
|
|
1300
|
+
title: i.$t("xu-hao"),
|
|
1297
1301
|
fixed: "left"
|
|
1298
1302
|
}, {
|
|
1299
|
-
checkbox: R(({ rowIndex:
|
|
1300
|
-
|
|
1301
|
-
|
|
1303
|
+
checkbox: R(({ rowIndex: I, row: j, checked: N, disabled: M, indeterminate: K }) => [
|
|
1304
|
+
ae("div", on, [
|
|
1305
|
+
N ? (T(), U(L, {
|
|
1302
1306
|
key: 0,
|
|
1303
1307
|
checked: !0,
|
|
1304
1308
|
disabled: M,
|
|
1305
1309
|
size: "default",
|
|
1306
|
-
onClick:
|
|
1307
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1310
|
+
onClick: Ee((P) => !M && qe(j), ["stop"])
|
|
1311
|
+
}, null, 8, ["disabled", "onClick"])) : (T(), U(L, {
|
|
1308
1312
|
key: 1,
|
|
1309
1313
|
disabled: M,
|
|
1310
1314
|
checked: !1,
|
|
1311
1315
|
size: "default",
|
|
1312
|
-
onClick:
|
|
1316
|
+
onClick: Ee((P) => !M && qe(j), ["stop"])
|
|
1313
1317
|
}, null, 8, ["disabled", "onClick"])),
|
|
1314
|
-
|
|
1318
|
+
W(A, {
|
|
1315
1319
|
type: "info",
|
|
1316
1320
|
class: "mgl5"
|
|
1317
1321
|
}, {
|
|
1318
1322
|
default: R(() => [
|
|
1319
|
-
|
|
1323
|
+
te(ne(I + 1), 1)
|
|
1320
1324
|
]),
|
|
1321
1325
|
_: 2
|
|
1322
1326
|
}, 1024)
|
|
1323
1327
|
])
|
|
1324
1328
|
]),
|
|
1325
1329
|
_: 1
|
|
1326
|
-
}, 8, ["width", "title"])) :
|
|
1327
|
-
|
|
1330
|
+
}, 8, ["width", "title"])) : ce("", !0),
|
|
1331
|
+
ie(i.$slots, "default", {}, void 0, !0)
|
|
1328
1332
|
]),
|
|
1329
1333
|
_: 3
|
|
1330
1334
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1331
1335
|
], 512),
|
|
1332
|
-
n.searchForm.showPage ? (
|
|
1336
|
+
n.searchForm.showPage ? (T(), U(ee, {
|
|
1333
1337
|
key: 1,
|
|
1334
|
-
"current-page":
|
|
1335
|
-
"onUpdate:currentPage": s[2] || (s[2] = (
|
|
1338
|
+
"current-page": b[Z(C)],
|
|
1339
|
+
"onUpdate:currentPage": s[2] || (s[2] = (I) => b[Z(C)] = I),
|
|
1336
1340
|
class: "myPagination mgt10",
|
|
1337
1341
|
background: "",
|
|
1338
1342
|
layout: "total, sizes, prev, pager, next",
|
|
1339
|
-
total:
|
|
1340
|
-
"page-size":
|
|
1343
|
+
total: b.total,
|
|
1344
|
+
"page-size": b.pageSize,
|
|
1341
1345
|
"page-sizes": [10, 50, 100, 500],
|
|
1342
|
-
onCurrentChange:
|
|
1343
|
-
onSizeChange:
|
|
1344
|
-
}, null, 8, ["current-page", "total", "page-size"])) :
|
|
1346
|
+
onCurrentChange: ut,
|
|
1347
|
+
onSizeChange: dt
|
|
1348
|
+
}, null, 8, ["current-page", "total", "page-size"])) : ce("", !0)
|
|
1345
1349
|
], 2);
|
|
1346
1350
|
};
|
|
1347
1351
|
}
|
|
1348
|
-
},
|
|
1352
|
+
}, On = /* @__PURE__ */ ge(ln, [["__scopeId", "data-v-b945dd6e"]]), Dn = {
|
|
1349
1353
|
__name: "index",
|
|
1350
1354
|
props: {
|
|
1351
1355
|
sheetsConfig: {
|
|
@@ -1360,41 +1364,41 @@ const en = { class: "center" }, tn = {
|
|
|
1360
1364
|
setup(n) {
|
|
1361
1365
|
const e = n;
|
|
1362
1366
|
function t() {
|
|
1363
|
-
|
|
1367
|
+
Vt(e.fileName, e.sheetsConfig);
|
|
1364
1368
|
}
|
|
1365
|
-
return (
|
|
1366
|
-
const
|
|
1367
|
-
return
|
|
1369
|
+
return (o, r) => {
|
|
1370
|
+
const l = O("el-link");
|
|
1371
|
+
return T(), U(l, me({
|
|
1368
1372
|
type: "primary",
|
|
1369
1373
|
underline: "never"
|
|
1370
|
-
},
|
|
1374
|
+
}, o.$attrs, { onClick: t }), {
|
|
1371
1375
|
default: R(() => [
|
|
1372
|
-
|
|
1376
|
+
te(ne(o.$t("xia-zai-dao-ru-mo-ban")), 1)
|
|
1373
1377
|
]),
|
|
1374
1378
|
_: 1
|
|
1375
1379
|
}, 16);
|
|
1376
1380
|
};
|
|
1377
1381
|
}
|
|
1378
1382
|
};
|
|
1379
|
-
function
|
|
1380
|
-
const t =
|
|
1383
|
+
function zn(n, e = {}) {
|
|
1384
|
+
const t = ze(), o = {
|
|
1381
1385
|
inForm: !0,
|
|
1382
1386
|
required: !0,
|
|
1383
1387
|
...e
|
|
1384
|
-
},
|
|
1388
|
+
}, r = {
|
|
1385
1389
|
phone: /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/,
|
|
1386
1390
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1387
1391
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1388
|
-
}[n], { inForm:
|
|
1389
|
-
return
|
|
1392
|
+
}[n], { inForm: l, value: a, required: d, msg: c = t("validate.invalidInput") } = o;
|
|
1393
|
+
return l ? function(w, C, b) {
|
|
1390
1394
|
if (d) {
|
|
1391
|
-
|
|
1395
|
+
r.test(C) ? b() : b(new Error(c));
|
|
1392
1396
|
return;
|
|
1393
1397
|
}
|
|
1394
|
-
|
|
1395
|
-
} :
|
|
1398
|
+
C && !r.test(C) ? b(new Error(c)) : b();
|
|
1399
|
+
} : r.test(a);
|
|
1396
1400
|
}
|
|
1397
|
-
class
|
|
1401
|
+
class Mn {
|
|
1398
1402
|
constructor(e = {}) {
|
|
1399
1403
|
this.config = {
|
|
1400
1404
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -1490,10 +1494,10 @@ class On {
|
|
|
1490
1494
|
});
|
|
1491
1495
|
if (!t.ok)
|
|
1492
1496
|
throw new Error(`HTTP ${t.status}: ${t.statusText}`);
|
|
1493
|
-
const
|
|
1494
|
-
if (
|
|
1495
|
-
return this.token =
|
|
1496
|
-
throw new Error(
|
|
1497
|
+
const o = await t.json();
|
|
1498
|
+
if (o.success && o.data)
|
|
1499
|
+
return this.token = o.data.token, this.user = o.data.user, this.saveToStorage(), this.clearTicketFromUrl(), this.log("ST票据验证成功,用户登录成功:", this.user), this.config.loginCallback && this.config.loginCallback(this.user, this.token), !0;
|
|
1500
|
+
throw new Error(o.message || "ST票据验证失败");
|
|
1497
1501
|
} catch (t) {
|
|
1498
1502
|
return this.log("ST票据验证失败:", t), this.handleError(t), !1;
|
|
1499
1503
|
}
|
|
@@ -1532,19 +1536,19 @@ class On {
|
|
|
1532
1536
|
* 发送带认证的HTTP请求
|
|
1533
1537
|
*/
|
|
1534
1538
|
async request(e, t = {}) {
|
|
1535
|
-
const
|
|
1539
|
+
const o = {
|
|
1536
1540
|
headers: {
|
|
1537
1541
|
"Content-Type": "application/json",
|
|
1538
1542
|
...t.headers
|
|
1539
1543
|
},
|
|
1540
1544
|
...t
|
|
1541
1545
|
};
|
|
1542
|
-
|
|
1546
|
+
o.headers.appId = this.config.clientCode, this.token && (o.headers.Authorization = `Bearer ${this.token}`);
|
|
1543
1547
|
try {
|
|
1544
|
-
const
|
|
1545
|
-
return
|
|
1546
|
-
} catch (
|
|
1547
|
-
throw this.log("请求失败:",
|
|
1548
|
+
const r = await fetch(e, o);
|
|
1549
|
+
return r.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : r;
|
|
1550
|
+
} catch (r) {
|
|
1551
|
+
throw this.log("请求失败:", r), r;
|
|
1548
1552
|
}
|
|
1549
1553
|
}
|
|
1550
1554
|
/**
|
|
@@ -1600,100 +1604,100 @@ class On {
|
|
|
1600
1604
|
return this.config[e];
|
|
1601
1605
|
}
|
|
1602
1606
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const
|
|
1607
|
+
function Rn(n, e = {}) {
|
|
1608
|
+
const o = Object.assign({
|
|
1605
1609
|
manual: !1,
|
|
1606
1610
|
// 手动执行
|
|
1607
1611
|
log: !1,
|
|
1608
1612
|
params: null,
|
|
1609
1613
|
format: null
|
|
1610
|
-
}, e), { manual:
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1613
|
-
const { code: u, data: f, msg:
|
|
1614
|
+
}, e), { manual: r, log: l, params: a = {}, cb: d, format: c } = o, w = q([]), C = q(!1), b = (m) => {
|
|
1615
|
+
const x = m || a;
|
|
1616
|
+
C.value = !0, n(x).then((p) => {
|
|
1617
|
+
const { code: u, data: f, msg: _ } = p;
|
|
1614
1618
|
if (d) {
|
|
1615
|
-
const { records: h, rows:
|
|
1616
|
-
|
|
1619
|
+
const { records: h, rows: g } = f || {}, E = h || g ? h || g : f;
|
|
1620
|
+
w.value = Se(E, c), d(p);
|
|
1617
1621
|
}
|
|
1618
1622
|
if (f) {
|
|
1619
1623
|
if (f.records != null || f.rows != null) {
|
|
1620
|
-
const { records: h, rows:
|
|
1621
|
-
|
|
1624
|
+
const { records: h, rows: g, total: E = 0 } = f || {};
|
|
1625
|
+
x && x.total != null && (a.total = parseInt(E)), w.value = Se(h || g || [], c);
|
|
1622
1626
|
} else
|
|
1623
|
-
|
|
1624
|
-
|
|
1627
|
+
w.value = Se(f, c);
|
|
1628
|
+
l && console.log("useRequest-res", w.value);
|
|
1625
1629
|
}
|
|
1626
|
-
}).catch((
|
|
1627
|
-
d && (console.log("useRequestErr",
|
|
1630
|
+
}).catch((p) => {
|
|
1631
|
+
d && (console.log("useRequestErr", p), d({ code: 500 }));
|
|
1628
1632
|
}).finally(() => {
|
|
1629
|
-
|
|
1633
|
+
C.value = !1;
|
|
1630
1634
|
});
|
|
1631
1635
|
};
|
|
1632
|
-
return
|
|
1636
|
+
return r || b(), [C, w, b];
|
|
1633
1637
|
}
|
|
1634
|
-
function
|
|
1635
|
-
const e = q(n), t = q(""),
|
|
1636
|
-
return
|
|
1637
|
-
const
|
|
1638
|
-
t.value =
|
|
1639
|
-
}), [e, t,
|
|
1638
|
+
function An(n) {
|
|
1639
|
+
const e = q(n), t = q(""), o = q("");
|
|
1640
|
+
return We(e, (r) => {
|
|
1641
|
+
const l = r || ["", ""];
|
|
1642
|
+
t.value = l[0], o.value = l[1];
|
|
1643
|
+
}), [e, t, o];
|
|
1640
1644
|
}
|
|
1641
|
-
function
|
|
1645
|
+
function Vn(n) {
|
|
1642
1646
|
return Object.prototype.toString.call(n).slice(8, -1).toLowerCase();
|
|
1643
1647
|
}
|
|
1644
|
-
function
|
|
1648
|
+
function Se(n, e) {
|
|
1645
1649
|
if (!e)
|
|
1646
1650
|
return n;
|
|
1647
1651
|
if (n instanceof Array)
|
|
1648
|
-
return n.map((
|
|
1649
|
-
let
|
|
1650
|
-
return e.forEach((
|
|
1652
|
+
return n.map((o) => {
|
|
1653
|
+
let r = {};
|
|
1654
|
+
return e.forEach((l) => r[l] = o[l]), r;
|
|
1651
1655
|
});
|
|
1652
1656
|
let t = {};
|
|
1653
|
-
return e.forEach((
|
|
1657
|
+
return e.forEach((o) => t[o] = n[o]), t;
|
|
1654
1658
|
}
|
|
1655
|
-
function
|
|
1656
|
-
const { locale: t } =
|
|
1657
|
-
return
|
|
1659
|
+
function Un(n, e = []) {
|
|
1660
|
+
const { locale: t } = de(), o = q(n());
|
|
1661
|
+
return We(
|
|
1658
1662
|
[t, ...e],
|
|
1659
1663
|
() => {
|
|
1660
|
-
|
|
1664
|
+
o.value = n();
|
|
1661
1665
|
},
|
|
1662
1666
|
{ immediate: !0 }
|
|
1663
|
-
),
|
|
1667
|
+
), o;
|
|
1664
1668
|
}
|
|
1665
|
-
function
|
|
1669
|
+
function jn(n, e = "zh_cn", t = "en_us") {
|
|
1666
1670
|
if (!n)
|
|
1667
1671
|
return "-";
|
|
1668
|
-
const
|
|
1669
|
-
return n[l
|
|
1672
|
+
const o = { en_us: t, zh_cn: e }, l = rt().global.locale.value;
|
|
1673
|
+
return n[o[l]] || n[e] || "-";
|
|
1670
1674
|
}
|
|
1671
|
-
function
|
|
1672
|
-
let t =
|
|
1673
|
-
return typeof n == "string" && n.length > 0 && (t =
|
|
1675
|
+
function qn(n, e) {
|
|
1676
|
+
let t = Et;
|
|
1677
|
+
return typeof n == "string" && n.length > 0 && (t = De(n).mapState), it(e, t);
|
|
1674
1678
|
}
|
|
1675
|
-
function
|
|
1676
|
-
let t =
|
|
1677
|
-
return typeof n == "string" && n.length > 0 && (t =
|
|
1679
|
+
function Pn(n, e) {
|
|
1680
|
+
let t = Lt;
|
|
1681
|
+
return typeof n == "string" && n.length > 0 && (t = De(n).mapGetters), it(e, t);
|
|
1678
1682
|
}
|
|
1679
|
-
function
|
|
1680
|
-
let t =
|
|
1681
|
-
return typeof n == "string" && n.length > 0 && (t =
|
|
1683
|
+
function Bn(n, e) {
|
|
1684
|
+
let t = Tt;
|
|
1685
|
+
return typeof n == "string" && n.length > 0 && (t = De(n).mapActions), rn(e, t);
|
|
1682
1686
|
}
|
|
1683
|
-
function
|
|
1684
|
-
const t =
|
|
1685
|
-
return Object.keys(
|
|
1686
|
-
const a = l
|
|
1687
|
-
|
|
1688
|
-
}),
|
|
1687
|
+
function it(n, e) {
|
|
1688
|
+
const t = et(), o = e(n), r = {};
|
|
1689
|
+
return Object.keys(o).forEach((l) => {
|
|
1690
|
+
const a = o[l].bind({ $store: t });
|
|
1691
|
+
r[l] = se(a);
|
|
1692
|
+
}), r;
|
|
1689
1693
|
}
|
|
1690
|
-
function
|
|
1691
|
-
const t =
|
|
1692
|
-
return Object.keys(
|
|
1693
|
-
|
|
1694
|
-
}),
|
|
1694
|
+
function rn(n, e) {
|
|
1695
|
+
const t = et(), o = e(n), r = {};
|
|
1696
|
+
return Object.keys(o).forEach((l) => {
|
|
1697
|
+
r[l] = o[l].bind({ $store: t });
|
|
1698
|
+
}), r;
|
|
1695
1699
|
}
|
|
1696
|
-
const
|
|
1700
|
+
const an = {
|
|
1697
1701
|
__name: "EnumRender",
|
|
1698
1702
|
props: {
|
|
1699
1703
|
renderOpts: {
|
|
@@ -1708,123 +1712,123 @@ const on = {
|
|
|
1708
1712
|
},
|
|
1709
1713
|
setup(n) {
|
|
1710
1714
|
const e = n, t = e.params.row[e.params.column.field];
|
|
1711
|
-
return (
|
|
1712
|
-
const
|
|
1713
|
-
return n.renderOpts.text ? (
|
|
1715
|
+
return (o, r) => {
|
|
1716
|
+
const l = O("el-text");
|
|
1717
|
+
return n.renderOpts.text ? (T(), U(l, { key: 0 }, {
|
|
1714
1718
|
default: R(() => [
|
|
1715
|
-
|
|
1719
|
+
te(ne(n.renderOpts.enum.getName(Z(t))), 1)
|
|
1716
1720
|
]),
|
|
1717
1721
|
_: 1
|
|
1718
|
-
})) : (
|
|
1722
|
+
})) : (T(), U(l, {
|
|
1719
1723
|
key: 1,
|
|
1720
|
-
type: n.renderOpts.enum.getTag(
|
|
1724
|
+
type: n.renderOpts.enum.getTag(Z(t))
|
|
1721
1725
|
}, {
|
|
1722
1726
|
default: R(() => [
|
|
1723
|
-
|
|
1727
|
+
te(ne(n.renderOpts.enum.getName(Z(t))), 1)
|
|
1724
1728
|
]),
|
|
1725
1729
|
_: 1
|
|
1726
1730
|
}, 8, ["type"]));
|
|
1727
1731
|
};
|
|
1728
1732
|
}
|
|
1729
1733
|
};
|
|
1730
|
-
function
|
|
1734
|
+
function Yn() {
|
|
1731
1735
|
he.renderer.add("Enum", {
|
|
1732
1736
|
// 默认显示模板
|
|
1733
1737
|
renderTableDefault(n, e) {
|
|
1734
|
-
return [null, void 0].includes(e.row[e.column.field]) ? "-" : /* @__PURE__ */ React.createElement(
|
|
1738
|
+
return [null, void 0].includes(e.row[e.column.field]) ? "-" : /* @__PURE__ */ React.createElement(an, { renderOpts: n, params: e });
|
|
1735
1739
|
}
|
|
1736
1740
|
}), he.renderer.add("InputNumber", {
|
|
1737
1741
|
// 默认显示模板
|
|
1738
1742
|
renderTableDefault(n, e) {
|
|
1739
|
-
return /* @__PURE__ */ React.createElement(
|
|
1743
|
+
return /* @__PURE__ */ React.createElement(pt, { "v-model": e.row[e.column.field], ...n.props, "step-strictly": !0, "value-on-clear": 0 });
|
|
1740
1744
|
}
|
|
1741
1745
|
}), he.renderer.add("TrueFalse", {
|
|
1742
1746
|
// 默认显示模板
|
|
1743
1747
|
renderTableDefault(n, e) {
|
|
1744
|
-
const { locale: t } =
|
|
1745
|
-
let
|
|
1748
|
+
const { locale: t } = de();
|
|
1749
|
+
let o = t.value == "zh_cn";
|
|
1746
1750
|
return /* @__PURE__ */ React.createElement(
|
|
1747
|
-
|
|
1751
|
+
vt,
|
|
1748
1752
|
{
|
|
1749
1753
|
type: e.row[e.column.field] ? "success" : "danger"
|
|
1750
1754
|
},
|
|
1751
|
-
e.row[e.column.field] ?
|
|
1755
|
+
e.row[e.column.field] ? o ? "是" : "YES" : o ? "否" : "NO"
|
|
1752
1756
|
);
|
|
1753
1757
|
}
|
|
1754
1758
|
}), he.renderer.add("I18n", {
|
|
1755
1759
|
// 默认显示模板
|
|
1756
1760
|
renderTableDefault(n, e) {
|
|
1757
|
-
const { locale: t } =
|
|
1758
|
-
let
|
|
1759
|
-
return e.row[
|
|
1761
|
+
const { locale: t } = de();
|
|
1762
|
+
let o = t.value == "zh_cn" ? e.column.field : n.fieldEn;
|
|
1763
|
+
return e.row[o] || e.row[e.column.field];
|
|
1760
1764
|
}
|
|
1761
1765
|
}), he.renderer.add("Link", {
|
|
1762
1766
|
// 默认显示模板
|
|
1763
1767
|
renderTableDefault(n, e) {
|
|
1764
1768
|
var d;
|
|
1765
1769
|
let t = e.column.field;
|
|
1766
|
-
const
|
|
1767
|
-
if (!
|
|
1770
|
+
const o = It(), { multiple: r, to: l } = n;
|
|
1771
|
+
if (!r)
|
|
1768
1772
|
return /* @__PURE__ */ React.createElement(
|
|
1769
|
-
|
|
1773
|
+
Pe,
|
|
1770
1774
|
{
|
|
1771
1775
|
underline: "never",
|
|
1772
1776
|
type: "primary",
|
|
1773
|
-
onclick: () =>
|
|
1777
|
+
onclick: () => o.push({ path: l, query: { [t]: e.row[t] } })
|
|
1774
1778
|
},
|
|
1775
1779
|
e.row[t]
|
|
1776
1780
|
);
|
|
1777
1781
|
const a = ((d = e.row[t]) == null ? void 0 : d.split(",")) || [];
|
|
1778
|
-
return a.map((
|
|
1779
|
-
|
|
1782
|
+
return a.map((c, w) => /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement(
|
|
1783
|
+
Pe,
|
|
1780
1784
|
{
|
|
1781
1785
|
underline: "never",
|
|
1782
1786
|
type: "primary",
|
|
1783
|
-
onclick: () =>
|
|
1787
|
+
onclick: () => o.push({ path: l, query: { [t]: c } })
|
|
1784
1788
|
},
|
|
1785
|
-
|
|
1786
|
-
),
|
|
1789
|
+
c
|
|
1790
|
+
), w < a.length - 1 ? "," : ""));
|
|
1787
1791
|
}
|
|
1788
1792
|
});
|
|
1789
1793
|
}
|
|
1790
1794
|
export {
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1795
|
+
Nt as CmpDictionary,
|
|
1796
|
+
st as CmpIcon,
|
|
1797
|
+
Tn as ConfrimButton,
|
|
1798
|
+
Dn as DownExcelTemp,
|
|
1799
|
+
Fn as ImportButton,
|
|
1800
|
+
bn as LayOutForm,
|
|
1801
|
+
On as ListPage,
|
|
1802
|
+
Mn as OnePortalCasSDK,
|
|
1803
|
+
nn as SearchBar,
|
|
1804
|
+
He as StatusMap,
|
|
1805
|
+
xn as _toRaw,
|
|
1806
|
+
Vn as _typeOf,
|
|
1807
|
+
kn as arrToStatusMap,
|
|
1808
|
+
wn as arrayToTree,
|
|
1809
|
+
Sn as checkFileSize,
|
|
1810
|
+
zn as creatValidator,
|
|
1811
|
+
En as createImportFields,
|
|
1812
|
+
In as createListPageId,
|
|
1813
|
+
Fe as en,
|
|
1814
|
+
Vt as exportExcel,
|
|
1815
|
+
rt as getI18n,
|
|
1816
|
+
ze as getI18nT,
|
|
1817
|
+
jn as getLocaleValue,
|
|
1818
|
+
Ln as getValueBykey,
|
|
1819
|
+
yn as importExcel,
|
|
1820
|
+
Mt as messages,
|
|
1821
|
+
Yn as registerVxeRenderers,
|
|
1822
|
+
Rt as setupI18n,
|
|
1823
|
+
Cn as sleep,
|
|
1824
|
+
at as stringToArray,
|
|
1825
|
+
_n as stripHtmlTags,
|
|
1826
|
+
$n as unicode2Str,
|
|
1827
|
+
Bn as useActions,
|
|
1828
|
+
An as useDatePicker,
|
|
1829
|
+
Pn as useGetters,
|
|
1830
|
+
Un as useI18nReState,
|
|
1831
|
+
Rn as useRequest,
|
|
1832
|
+
qn as useState,
|
|
1833
|
+
Te as zhCn
|
|
1830
1834
|
};
|