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