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