joy-admin-components 0.2.71 → 0.2.73
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.
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { ElForm as $t, ElRow as St, ElCol 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 $t, ElRow as St, ElCol as Ft, ElMessageBox as Lt, ElInputNumber as Et, ElText as It, ElLink as Je } from "element-plus";
|
|
2
|
+
import { defineComponent as ot, ref as j, onMounted as lt, h as ze, mergeModels as Xe, useAttrs as Tt, useModel as Dt, computed as ue, watch as Re, resolveComponent as O, unref as N, openBlock as E, createBlock as W, mergeProps as de, createSlots as at, withCtx as D, createElementVNode as ie, toDisplayString as te, renderSlot as Q, createVNode as z, createTextVNode as ne, createCommentVNode as me, createElementBlock as ce, Fragment as Ve, renderList as rt, withModifiers as qe, nextTick as be, resolveDynamicComponent as st, withKeys as Mt, normalizeStyle as zt, normalizeClass as it, reactive as Ee, onUpdated as Ot, onUnmounted as Vt, withDirectives as qt, isVNode as Pt } from "vue";
|
|
3
|
+
import { saveAs as ct } from "file-saver";
|
|
4
|
+
import Te from "exceljs";
|
|
5
|
+
import Fe from "dayjs";
|
|
6
|
+
import { createI18n as At, useI18n as we } from "vue-i18n";
|
|
7
|
+
import { debounce as Be, cloneDeep as ut, isArray as Qe } from "lodash";
|
|
8
8
|
import { useRoute as Ut, useRouter as jt } from "vue-router";
|
|
9
|
-
import { createNamespacedHelpers as
|
|
10
|
-
import { VxeUI as
|
|
11
|
-
const
|
|
9
|
+
import { createNamespacedHelpers as Ye, useStore as dt, mapState as Rt, mapGetters as Bt, mapActions as Yt } from "vuex";
|
|
10
|
+
import { VxeUI as he } from "vxe-pc-ui";
|
|
11
|
+
const Kn = ot({
|
|
12
12
|
name: "LayOutForm",
|
|
13
13
|
setup(e, { slots: t, attrs: n, emit: a }) {
|
|
14
|
-
const
|
|
15
|
-
(
|
|
16
|
-
var i, g, m,
|
|
14
|
+
const r = j(null), o = () => t.default ? t.default().filter((s) => s.type !== Symbol.for("v-cmt")).map((s) => s.type === Symbol.for("v-fgt") ? s.children : s).flat().map(
|
|
15
|
+
(s) => {
|
|
16
|
+
var i, g, m, p;
|
|
17
17
|
return ze(
|
|
18
|
-
|
|
18
|
+
Ft,
|
|
19
19
|
{
|
|
20
|
-
span: ((i =
|
|
20
|
+
span: ((i = s.props) == null ? void 0 : i.span) || ((m = (g = s.props) == null ? void 0 : g.colProps) == null ? void 0 : m.span) || 24,
|
|
21
21
|
//兼容老写法
|
|
22
|
-
...(
|
|
22
|
+
...(p = s.props) == null ? void 0 : p.colProps
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
default: () =>
|
|
25
|
+
default: () => s
|
|
26
26
|
}
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
29
|
) : null;
|
|
30
|
-
|
|
31
|
-
a("ref",
|
|
30
|
+
lt(() => {
|
|
31
|
+
a("ref", r.value);
|
|
32
32
|
});
|
|
33
33
|
function l() {
|
|
34
34
|
return ze(
|
|
35
35
|
$t,
|
|
36
|
-
{ ...n, ref:
|
|
36
|
+
{ ...n, ref: r },
|
|
37
37
|
() => ze(St, { gutter: n.gutter ?? 20 }, { default: () => o() })
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
return l;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
var
|
|
44
|
-
function
|
|
43
|
+
var ft = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
44
|
+
function ht(e) {
|
|
45
45
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
47
|
+
var mt = { exports: {} };
|
|
48
48
|
(function(e, t) {
|
|
49
49
|
(function(n, a) {
|
|
50
50
|
e.exports = a();
|
|
51
|
-
})(
|
|
52
|
-
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g,
|
|
53
|
-
return function(o, l,
|
|
51
|
+
})(ft, function() {
|
|
52
|
+
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, r = /([+-]|\d\d)/g;
|
|
53
|
+
return function(o, l, s) {
|
|
54
54
|
var i = l.prototype;
|
|
55
|
-
|
|
55
|
+
s.utc = function(c) {
|
|
56
56
|
var v = { date: c, utc: !0, args: arguments };
|
|
57
57
|
return new l(v);
|
|
58
58
|
}, i.utc = function(c) {
|
|
59
|
-
var v =
|
|
59
|
+
var v = s(this.toDate(), { locale: this.$L, utc: !0 });
|
|
60
60
|
return c ? v.add(this.utcOffset(), n) : v;
|
|
61
61
|
}, i.local = function() {
|
|
62
|
-
return
|
|
62
|
+
return s(this.toDate(), { locale: this.$L, utc: !1 });
|
|
63
63
|
};
|
|
64
64
|
var g = i.parse;
|
|
65
65
|
i.parse = function(c) {
|
|
@@ -73,18 +73,18 @@ var ht = { exports: {} };
|
|
|
73
73
|
} else
|
|
74
74
|
m.call(this);
|
|
75
75
|
};
|
|
76
|
-
var
|
|
76
|
+
var p = i.utcOffset;
|
|
77
77
|
i.utcOffset = function(c, v) {
|
|
78
78
|
var w = this.$utils().u;
|
|
79
79
|
if (w(c))
|
|
80
|
-
return this.$u ? 0 : w(this.$offset) ?
|
|
81
|
-
if (typeof c == "string" && (c = function(
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
if (!
|
|
80
|
+
return this.$u ? 0 : w(this.$offset) ? p.call(this) : this.$offset;
|
|
81
|
+
if (typeof c == "string" && (c = function(V) {
|
|
82
|
+
V === void 0 && (V = "");
|
|
83
|
+
var K = V.match(a);
|
|
84
|
+
if (!K)
|
|
85
85
|
return null;
|
|
86
|
-
var
|
|
87
|
-
return
|
|
86
|
+
var I = ("" + K[0]).match(r) || ["-", 0, 0], A = I[0], $ = 60 * +I[1] + +I[2];
|
|
87
|
+
return $ === 0 ? 0 : A === "+" ? $ : -$;
|
|
88
88
|
}(c), c === null))
|
|
89
89
|
return this;
|
|
90
90
|
var x = Math.abs(c) <= 16 ? 60 * c : c;
|
|
@@ -96,10 +96,10 @@ var ht = { exports: {} };
|
|
|
96
96
|
var S = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
97
97
|
return (C = this.local().add(x + S, n)).$offset = x, C.$x.$localOffset = S, C;
|
|
98
98
|
};
|
|
99
|
-
var
|
|
99
|
+
var y = i.format;
|
|
100
100
|
i.format = function(c) {
|
|
101
101
|
var v = c || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
|
|
102
|
-
return
|
|
102
|
+
return y.call(this, v);
|
|
103
103
|
}, i.valueOf = function() {
|
|
104
104
|
var c = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
|
|
105
105
|
return this.$d.valueOf() - 6e4 * c;
|
|
@@ -112,87 +112,87 @@ var ht = { exports: {} };
|
|
|
112
112
|
};
|
|
113
113
|
var h = i.toDate;
|
|
114
114
|
i.toDate = function(c) {
|
|
115
|
-
return c === "s" && this.$offset ?
|
|
115
|
+
return c === "s" && this.$offset ? s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : h.call(this);
|
|
116
116
|
};
|
|
117
117
|
var f = i.diff;
|
|
118
118
|
i.diff = function(c, v, w) {
|
|
119
119
|
if (c && this.$u === c.$u)
|
|
120
120
|
return f.call(this, c, v, w);
|
|
121
|
-
var x = this.local(), C =
|
|
121
|
+
var x = this.local(), C = s(c).local();
|
|
122
122
|
return f.call(x, C, v, w);
|
|
123
123
|
};
|
|
124
124
|
};
|
|
125
125
|
});
|
|
126
|
-
})(
|
|
127
|
-
var Kt =
|
|
128
|
-
const Ht = /* @__PURE__ */
|
|
129
|
-
var
|
|
126
|
+
})(mt);
|
|
127
|
+
var Kt = mt.exports;
|
|
128
|
+
const Ht = /* @__PURE__ */ ht(Kt);
|
|
129
|
+
var gt = { exports: {} };
|
|
130
130
|
(function(e, t) {
|
|
131
131
|
(function(n, a) {
|
|
132
132
|
e.exports = a();
|
|
133
|
-
})(
|
|
133
|
+
})(ft, function() {
|
|
134
134
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
135
|
-
return function(
|
|
136
|
-
var
|
|
135
|
+
return function(r, o, l) {
|
|
136
|
+
var s, i = function(y, h, f) {
|
|
137
137
|
f === void 0 && (f = {});
|
|
138
|
-
var c = new Date(
|
|
138
|
+
var c = new Date(y), v = function(w, x) {
|
|
139
139
|
x === void 0 && (x = {});
|
|
140
|
-
var C = x.timeZoneName || "short", S = w + "|" + C,
|
|
141
|
-
return
|
|
140
|
+
var C = x.timeZoneName || "short", S = w + "|" + C, V = a[S];
|
|
141
|
+
return V || (V = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[S] = V), V;
|
|
142
142
|
}(h, f);
|
|
143
143
|
return v.formatToParts(c);
|
|
144
|
-
}, g = function(
|
|
145
|
-
for (var f = i(
|
|
144
|
+
}, g = function(y, h) {
|
|
145
|
+
for (var f = i(y, h), c = [], v = 0; v < f.length; v += 1) {
|
|
146
146
|
var w = f[v], x = w.type, C = w.value, S = n[x];
|
|
147
147
|
S >= 0 && (c[S] = parseInt(C, 10));
|
|
148
148
|
}
|
|
149
|
-
var
|
|
150
|
-
return (l.utc(
|
|
149
|
+
var V = c[3], K = V === 24 ? 0 : V, I = c[0] + "-" + c[1] + "-" + c[2] + " " + K + ":" + c[4] + ":" + c[5] + ":000", A = +y;
|
|
150
|
+
return (l.utc(I).valueOf() - (A -= A % 1e3)) / 6e4;
|
|
151
151
|
}, m = o.prototype;
|
|
152
|
-
m.tz = function(
|
|
153
|
-
|
|
154
|
-
var f, c = this.utcOffset(), v = this.toDate(), w = v.toLocaleString("en-US", { timeZone:
|
|
152
|
+
m.tz = function(y, h) {
|
|
153
|
+
y === void 0 && (y = s);
|
|
154
|
+
var f, c = this.utcOffset(), v = this.toDate(), w = v.toLocaleString("en-US", { timeZone: y }), x = Math.round((v - new Date(w)) / 1e3 / 60), C = 15 * -Math.round(v.getTimezoneOffset() / 15) - x;
|
|
155
155
|
if (!Number(C))
|
|
156
156
|
f = this.utcOffset(0, h);
|
|
157
157
|
else if (f = l(w, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(C, !0), h) {
|
|
158
158
|
var S = f.utcOffset();
|
|
159
159
|
f = f.add(c - S, "minute");
|
|
160
160
|
}
|
|
161
|
-
return f.$x.$timezone =
|
|
162
|
-
}, m.offsetName = function(
|
|
163
|
-
var h = this.$x.$timezone || l.tz.guess(), f = i(this.valueOf(), h, { timeZoneName:
|
|
161
|
+
return f.$x.$timezone = y, f;
|
|
162
|
+
}, m.offsetName = function(y) {
|
|
163
|
+
var h = this.$x.$timezone || l.tz.guess(), f = i(this.valueOf(), h, { timeZoneName: y }).find(function(c) {
|
|
164
164
|
return c.type.toLowerCase() === "timezonename";
|
|
165
165
|
});
|
|
166
166
|
return f && f.value;
|
|
167
167
|
};
|
|
168
|
-
var
|
|
169
|
-
m.startOf = function(
|
|
168
|
+
var p = m.startOf;
|
|
169
|
+
m.startOf = function(y, h) {
|
|
170
170
|
if (!this.$x || !this.$x.$timezone)
|
|
171
|
-
return
|
|
171
|
+
return p.call(this, y, h);
|
|
172
172
|
var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
173
|
-
return
|
|
174
|
-
}, l.tz = function(
|
|
175
|
-
var c = f && h, v = f || h ||
|
|
176
|
-
if (typeof
|
|
177
|
-
return l(
|
|
178
|
-
var x = function(
|
|
179
|
-
var
|
|
180
|
-
if (
|
|
181
|
-
return [
|
|
182
|
-
var
|
|
183
|
-
return
|
|
184
|
-
}(l.utc(
|
|
185
|
-
return
|
|
173
|
+
return p.call(f, y, h).tz(this.$x.$timezone, !0);
|
|
174
|
+
}, l.tz = function(y, h, f) {
|
|
175
|
+
var c = f && h, v = f || h || s, w = g(+l(), v);
|
|
176
|
+
if (typeof y != "string")
|
|
177
|
+
return l(y).tz(v);
|
|
178
|
+
var x = function(K, I, A) {
|
|
179
|
+
var $ = K - 60 * I * 1e3, ee = g($, A);
|
|
180
|
+
if (I === ee)
|
|
181
|
+
return [$, I];
|
|
182
|
+
var b = g($ -= 60 * (ee - I) * 1e3, A);
|
|
183
|
+
return ee === b ? [$, ee] : [K - 60 * Math.min(ee, b) * 1e3, Math.max(ee, b)];
|
|
184
|
+
}(l.utc(y, c).valueOf(), w, v), C = x[0], S = x[1], V = l(C).utcOffset(S);
|
|
185
|
+
return V.$x.$timezone = v, V;
|
|
186
186
|
}, l.tz.guess = function() {
|
|
187
187
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
188
|
-
}, l.tz.setDefault = function(
|
|
189
|
-
|
|
188
|
+
}, l.tz.setDefault = function(y) {
|
|
189
|
+
s = y;
|
|
190
190
|
};
|
|
191
191
|
};
|
|
192
192
|
});
|
|
193
|
-
})(
|
|
194
|
-
var Nt =
|
|
195
|
-
const Wt = /* @__PURE__ */
|
|
193
|
+
})(gt);
|
|
194
|
+
var Nt = gt.exports;
|
|
195
|
+
const Wt = /* @__PURE__ */ ht(Nt), Pe = {
|
|
196
196
|
// 组件通用文本
|
|
197
197
|
"dao-ru": "导入",
|
|
198
198
|
"quan-xuan": "全选",
|
|
@@ -263,123 +263,123 @@ const Wt = /* @__PURE__ */ ft(Nt), qe = {
|
|
|
263
263
|
keysLengthError: "Keys length must be greater than 2, default first two are label and value"
|
|
264
264
|
}
|
|
265
265
|
}, Zt = {
|
|
266
|
-
zh_cn:
|
|
266
|
+
zh_cn: Pe,
|
|
267
267
|
en_us: Ae
|
|
268
268
|
};
|
|
269
|
-
let
|
|
269
|
+
let Ce = null;
|
|
270
270
|
function Gt(e = null) {
|
|
271
271
|
if (e) {
|
|
272
272
|
const { global: t } = e;
|
|
273
|
-
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
273
|
+
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn", Pe) : t.setLocaleMessage("zh_cn", Pe), t.messages.value.en_us ? t.mergeLocaleMessage("en_us", Ae) : t.setLocaleMessage("en_us", Ae), Ce = e, e;
|
|
274
274
|
}
|
|
275
|
-
return
|
|
275
|
+
return Ce || (Ce = At({
|
|
276
276
|
legacy: !1,
|
|
277
277
|
locale: "zh_cn",
|
|
278
278
|
fallbackLocale: "zh_cn",
|
|
279
279
|
messages: Zt
|
|
280
|
-
})),
|
|
280
|
+
})), Ce;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
return
|
|
282
|
+
function Ke() {
|
|
283
|
+
return Ce || Gt();
|
|
284
284
|
}
|
|
285
|
-
function
|
|
286
|
-
return
|
|
285
|
+
function xe() {
|
|
286
|
+
return Ke().global.t;
|
|
287
287
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
async function
|
|
288
|
+
Fe.extend(Ht);
|
|
289
|
+
Fe.extend(Wt);
|
|
290
|
+
async function Hn(e, t) {
|
|
291
291
|
const { fields: n, range: a = 1 } = t;
|
|
292
292
|
if (!n) {
|
|
293
|
-
const l =
|
|
293
|
+
const l = xe();
|
|
294
294
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
295
295
|
}
|
|
296
|
-
let
|
|
297
|
-
await
|
|
296
|
+
let r = new Te.Workbook();
|
|
297
|
+
await r.xlsx.load(e);
|
|
298
298
|
const o = {};
|
|
299
|
-
return
|
|
299
|
+
return r.eachSheet(function(l, s) {
|
|
300
300
|
const i = [];
|
|
301
301
|
l.eachRow(function(g, m) {
|
|
302
302
|
if (m > a) {
|
|
303
|
-
let
|
|
303
|
+
let p = {}, y = !0;
|
|
304
304
|
Object.keys(n).forEach((h) => {
|
|
305
305
|
const f = g.getCell(n[h]).value;
|
|
306
|
-
|
|
307
|
-
}),
|
|
306
|
+
p[h] = f, f && (y = !1);
|
|
307
|
+
}), y || i.push(p);
|
|
308
308
|
}
|
|
309
309
|
}), o[l._name] = i;
|
|
310
|
-
}),
|
|
310
|
+
}), r = null, o;
|
|
311
311
|
}
|
|
312
|
-
const
|
|
312
|
+
const pt = {
|
|
313
313
|
columnWidth: 30
|
|
314
314
|
};
|
|
315
|
-
async function
|
|
315
|
+
async function Nn(e, t, n = [], a = {}) {
|
|
316
316
|
if (!e || !t)
|
|
317
317
|
return;
|
|
318
|
-
const { columnStyle:
|
|
318
|
+
const { columnStyle: r } = a, { columnWidth: o } = pt;
|
|
319
319
|
t.forEach((i) => {
|
|
320
320
|
i.width = i.width ? i.width : o;
|
|
321
321
|
});
|
|
322
|
-
const { workbook: l, worksheet:
|
|
323
|
-
|
|
322
|
+
const { workbook: l, worksheet: s } = Jt();
|
|
323
|
+
s.columns = t, s.addRows(n), r && await Xt(l, s, r);
|
|
324
324
|
try {
|
|
325
325
|
const i = await l.xlsx.writeBuffer(), g = new File([i], e, {
|
|
326
326
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
327
327
|
});
|
|
328
|
-
|
|
328
|
+
ct(g);
|
|
329
329
|
} catch (i) {
|
|
330
330
|
console.log(i);
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
function Jt() {
|
|
334
|
-
const e = new
|
|
334
|
+
const e = new Te.Workbook();
|
|
335
335
|
e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date();
|
|
336
336
|
const t = e.addWorksheet("Sheet1");
|
|
337
337
|
return { workbook: e, worksheet: t };
|
|
338
338
|
}
|
|
339
339
|
async function Xt(e, t, n) {
|
|
340
340
|
const a = Object.keys(n);
|
|
341
|
-
for (const
|
|
342
|
-
const o = n[
|
|
341
|
+
for (const r of a) {
|
|
342
|
+
const o = n[r], { type: l } = o;
|
|
343
343
|
switch (l) {
|
|
344
344
|
case "IMG":
|
|
345
|
-
await Qt(e, t,
|
|
345
|
+
await Qt(e, t, r);
|
|
346
346
|
break;
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
async function Qt(e, t, n, a) {
|
|
351
|
-
const
|
|
352
|
-
t.getColumn(n).width = 20, t.eachRow((l,
|
|
353
|
-
|
|
351
|
+
const r = t.getColumn(n), o = r.values;
|
|
352
|
+
t.getColumn(n).width = 20, t.eachRow((l, s) => {
|
|
353
|
+
s > 1 && (l.height = 40);
|
|
354
354
|
});
|
|
355
|
-
for (let l = 0,
|
|
355
|
+
for (let l = 0, s = o.length; l < s; l++) {
|
|
356
356
|
if (l < 2)
|
|
357
357
|
continue;
|
|
358
358
|
let i = o[l];
|
|
359
|
-
i && (t.getCell(
|
|
359
|
+
i && (t.getCell(r.letter + l).value = "", await en(e, t, i, {
|
|
360
360
|
width: 100,
|
|
361
361
|
height: 50,
|
|
362
|
-
col:
|
|
362
|
+
col: r._number - 1,
|
|
363
363
|
row: l - 1
|
|
364
364
|
}));
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
async function en(e, t, n, a) {
|
|
368
|
-
const { col:
|
|
368
|
+
const { col: r, row: o, width: l, height: s } = a, { success: i, base64: g } = await tn(n, 0.3);
|
|
369
369
|
if (i) {
|
|
370
370
|
const m = e.addImage({
|
|
371
371
|
base64: g,
|
|
372
372
|
extension: "jpeg"
|
|
373
373
|
});
|
|
374
374
|
t.addImage(m, {
|
|
375
|
-
tl: { col:
|
|
376
|
-
ext: { width: l, height:
|
|
375
|
+
tl: { col: r, row: o },
|
|
376
|
+
ext: { width: l, height: s }
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
function tn(e, t = 1) {
|
|
381
381
|
const n = new Image();
|
|
382
|
-
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((a,
|
|
382
|
+
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((a, r) => {
|
|
383
383
|
n.onload = () => {
|
|
384
384
|
const o = document.createElement("canvas");
|
|
385
385
|
o.width = n.width, o.height = n.height, o.getContext("2d").drawImage(n, 0, 0, o.width, o.height), a({
|
|
@@ -392,49 +392,49 @@ function tn(e, t = 1) {
|
|
|
392
392
|
};
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
|
-
const
|
|
395
|
+
const Ue = "---";
|
|
396
396
|
async function nn(e, t) {
|
|
397
397
|
const { fields: n, range: a = 1 } = t;
|
|
398
398
|
if (!n) {
|
|
399
|
-
const l =
|
|
399
|
+
const l = xe();
|
|
400
400
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
401
401
|
}
|
|
402
|
-
let
|
|
403
|
-
await
|
|
402
|
+
let r = new Te.Workbook();
|
|
403
|
+
await r.xlsx.load(e);
|
|
404
404
|
const o = {};
|
|
405
|
-
return
|
|
405
|
+
return r.eachSheet(function(l, s) {
|
|
406
406
|
if (l.state == "visible") {
|
|
407
407
|
const i = [], g = n[l._name];
|
|
408
408
|
if (g) {
|
|
409
|
-
let m = Object.values(g).some((
|
|
409
|
+
let m = Object.values(g).some((y) => y.includes("image")), p = {};
|
|
410
410
|
m && (l.getImages().forEach((h) => {
|
|
411
|
-
const { tl: f } = h.range, c =
|
|
411
|
+
const { tl: f } = h.range, c = r.model.media.find((v) => v.index === h.imageId);
|
|
412
412
|
if (c) {
|
|
413
413
|
const v = c.buffer.toString("base64"), w = `data:image/${c.extension};base64,${v}`, x = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
|
|
414
|
-
|
|
414
|
+
p[x] ? p[x].push(w) : p[x] = [w];
|
|
415
415
|
}
|
|
416
|
-
}), console.log("withImages-imageMap",
|
|
416
|
+
}), console.log("withImages-imageMap", p)), l.eachRow(function(y, h) {
|
|
417
417
|
if (h > a) {
|
|
418
418
|
let f = {
|
|
419
419
|
_excelRowNumber: h
|
|
420
420
|
}, c = !0;
|
|
421
421
|
Object.keys(g).forEach((v) => {
|
|
422
|
-
var
|
|
423
|
-
let [w, x] = g[v].split(
|
|
424
|
-
const C =
|
|
422
|
+
var V;
|
|
423
|
+
let [w, x] = g[v].split(Ue);
|
|
424
|
+
const C = y.getCell(w);
|
|
425
425
|
let S;
|
|
426
426
|
if (x == "image" && m) {
|
|
427
|
-
const
|
|
428
|
-
S =
|
|
427
|
+
const K = C._column._number, I = `${h}_${K}`;
|
|
428
|
+
S = p[I] || "";
|
|
429
429
|
} else
|
|
430
|
-
C.result != null ? S = C.result : (
|
|
431
|
-
S && x == "option" && (S = S.split(
|
|
430
|
+
C.result != null ? S = C.result : (V = C.value) != null && V.richText ? S = C.value.richText.reduce((K, I) => K + I.text, "") : C.type == 4 && C.value ? S = Fe(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : S = C.value;
|
|
431
|
+
S && x == "option" && (S = S.split(Ue)[1]), f[v] = S, S && (c = !1);
|
|
432
432
|
}), c || i.push(f);
|
|
433
433
|
}
|
|
434
434
|
}), o[l._name] = i;
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
|
-
}),
|
|
437
|
+
}), r = null, o;
|
|
438
438
|
}
|
|
439
439
|
const on = {
|
|
440
440
|
date: "yyyy-mm-dd",
|
|
@@ -446,32 +446,32 @@ async function ln(e, t) {
|
|
|
446
446
|
return;
|
|
447
447
|
const n = an(t);
|
|
448
448
|
for (const a of n.worksheets) {
|
|
449
|
-
const { columnWidth:
|
|
449
|
+
const { columnWidth: r } = pt, o = t[a.name];
|
|
450
450
|
if (!o)
|
|
451
451
|
continue;
|
|
452
|
-
const { tableHeader: l, tableData:
|
|
452
|
+
const { tableHeader: l, tableData: s } = o;
|
|
453
453
|
l.forEach((i) => {
|
|
454
|
-
const { style: g = {}, required: m } = i, { font:
|
|
454
|
+
const { style: g = {}, required: m } = i, { font: p = {} } = g;
|
|
455
455
|
i.style = {
|
|
456
456
|
...g,
|
|
457
457
|
font: {
|
|
458
|
-
...
|
|
458
|
+
...p,
|
|
459
459
|
color: {
|
|
460
460
|
argb: m ? "FFFF0000" : void 0
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
|
-
}), a.columns = l, a.addRows(
|
|
465
|
-
let { header: g, key: m, width:
|
|
464
|
+
}), a.columns = l, a.addRows(s), l.forEach((i) => {
|
|
465
|
+
let { header: g, key: m, width: p, option: y, numFmt: h, locked: f, optionFormater: c } = i;
|
|
466
466
|
const v = a.getColumn(m);
|
|
467
|
-
if (v.numFmt = on[h] || h, v.width =
|
|
467
|
+
if (v.numFmt = on[h] || h, v.width = p || r, v.protection = { locked: f === !0 }, y) {
|
|
468
468
|
const w = n.addWorksheet(m);
|
|
469
|
-
w.state = "hidden", c || (c = (x) => `${x.label}${
|
|
469
|
+
w.state = "hidden", c || (c = (x) => `${x.label}${Ue}${x.value}`), w.getColumn(1).values = y.map(c), Array(100).fill("").forEach((x, C) => {
|
|
470
470
|
if (C > 0) {
|
|
471
|
-
const S =
|
|
471
|
+
const S = xe();
|
|
472
472
|
a.getCell(`${v.letter}${C}`).dataValidation = {
|
|
473
473
|
type: "list",
|
|
474
|
-
formulae: [`${m}!$A$1:$A$${
|
|
474
|
+
formulae: [`${m}!$A$1:$A$${y.length}`],
|
|
475
475
|
showErrorMessage: !0,
|
|
476
476
|
error: S("excel.invalidInput"),
|
|
477
477
|
errorStyle: "stop",
|
|
@@ -486,25 +486,25 @@ async function ln(e, t) {
|
|
|
486
486
|
});
|
|
487
487
|
}
|
|
488
488
|
try {
|
|
489
|
-
const a = await n.xlsx.writeBuffer(),
|
|
489
|
+
const a = await n.xlsx.writeBuffer(), r = new File([a], e, {
|
|
490
490
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
491
491
|
});
|
|
492
|
-
|
|
492
|
+
ct(r);
|
|
493
493
|
} catch (a) {
|
|
494
494
|
console.log(a);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
function an(e) {
|
|
498
|
-
const t =
|
|
499
|
-
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((
|
|
500
|
-
const l = e[
|
|
501
|
-
return l -
|
|
502
|
-
}).forEach((
|
|
503
|
-
let o =
|
|
504
|
-
/[\\/:*?\[\]]/g.test(
|
|
498
|
+
const t = xe(), n = new Te.Workbook();
|
|
499
|
+
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((r, o) => {
|
|
500
|
+
const l = e[r].sort ?? 0, s = e[o].sort ?? 0;
|
|
501
|
+
return l - s;
|
|
502
|
+
}).forEach((r) => {
|
|
503
|
+
let o = r, l = !1;
|
|
504
|
+
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), l = !0), r.length > 31 && (r = r.substring(0, 31).trim(), l = !0, console.warn(t("excel.sheetNameTooLong", [o, r]))), l && (e[r] = e[o], delete e[o]), n.addWorksheet(r);
|
|
505
505
|
}), n;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function rn(e) {
|
|
508
508
|
if (e < 26)
|
|
509
509
|
return String.fromCharCode(65 + e);
|
|
510
510
|
{
|
|
@@ -512,35 +512,35 @@ function sn(e) {
|
|
|
512
512
|
return t + n;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Wn(e) {
|
|
516
516
|
return new Promise((t) => {
|
|
517
517
|
setTimeout(() => {
|
|
518
518
|
t();
|
|
519
519
|
}, e);
|
|
520
520
|
});
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Zn(e) {
|
|
523
523
|
return JSON.parse(JSON.stringify(e));
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
let t = [], n = {}, a = (
|
|
527
|
-
for (const
|
|
528
|
-
n[
|
|
529
|
-
...
|
|
525
|
+
function Gn(e) {
|
|
526
|
+
let t = [], n = {}, a = (r, o) => Object.prototype.hasOwnProperty.call(r, o);
|
|
527
|
+
for (const r of e) {
|
|
528
|
+
n[r.id] = {
|
|
529
|
+
...r,
|
|
530
530
|
// 判断当前项的子项 如果map有存储就用存储的子项 否则初始化
|
|
531
|
-
children: a(n,
|
|
531
|
+
children: a(n, r.id) ? n[r.id].children : []
|
|
532
532
|
};
|
|
533
|
-
const o = n[
|
|
534
|
-
|
|
533
|
+
const o = n[r.id];
|
|
534
|
+
r.pid == -1 ? t.push(o) : (a(n, r.pid) || (n[r.pid] = {
|
|
535
535
|
children: []
|
|
536
|
-
}), n[
|
|
536
|
+
}), n[r.pid].children.push(o));
|
|
537
537
|
}
|
|
538
538
|
return t;
|
|
539
539
|
}
|
|
540
|
-
function
|
|
540
|
+
function yt(e, t = " ") {
|
|
541
541
|
return e ? e.split(t).filter((n) => n.trim()) : [];
|
|
542
542
|
}
|
|
543
|
-
class
|
|
543
|
+
class et {
|
|
544
544
|
constructor(t, n = ["label", "value", "labelEn"]) {
|
|
545
545
|
this.list = t.map((a) => ({
|
|
546
546
|
...a,
|
|
@@ -552,8 +552,8 @@ class Qe {
|
|
|
552
552
|
getName(t) {
|
|
553
553
|
if (!this.has(t))
|
|
554
554
|
return "-";
|
|
555
|
-
const n =
|
|
556
|
-
return (n.value == "zh_cn" ? a :
|
|
555
|
+
const n = Ke().global.locale, { label: a, labelEn: r } = this.map.get(t);
|
|
556
|
+
return (n.value == "zh_cn" ? a : r) ?? a ?? "-";
|
|
557
557
|
}
|
|
558
558
|
getTag(t) {
|
|
559
559
|
if (!this.has(t))
|
|
@@ -574,52 +574,52 @@ class Qe {
|
|
|
574
574
|
return this.map.has(t);
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function Jn(e, t = [], n = "i18nName") {
|
|
578
578
|
if (e.length == 0)
|
|
579
|
-
return new
|
|
579
|
+
return new et([]);
|
|
580
580
|
if (t.length < 2) {
|
|
581
|
-
const
|
|
582
|
-
throw new Error(
|
|
581
|
+
const r = xe();
|
|
582
|
+
throw new Error(r("tools.keysLengthError"));
|
|
583
583
|
}
|
|
584
|
-
let a = e.map((
|
|
584
|
+
let a = e.map((r) => {
|
|
585
585
|
let o = {};
|
|
586
|
-
return n && (o.labelEn =
|
|
587
|
-
|
|
586
|
+
return n && (o.labelEn = r[n]), t.forEach((l, s) => {
|
|
587
|
+
s === 0 ? o.label = r[l] : s === 1 ? o.value = r[l] : o[l] = r[l];
|
|
588
588
|
}), o;
|
|
589
589
|
});
|
|
590
|
-
return new
|
|
590
|
+
return new et(a);
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function Xn(e) {
|
|
593
593
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Qn(e) {
|
|
596
596
|
return e ? (e.includes("\\\\u") && (e = e.replace(/\\/g, "")), e.replace(/\\u[\dA-F]{4}/gi, (t) => String.fromCharCode(parseInt(t.replace(/\\u/g, ""), 16)))) : "";
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function eo(e, t = 10) {
|
|
599
599
|
let n = 1048576 * t;
|
|
600
600
|
return !(e.size > n);
|
|
601
601
|
}
|
|
602
|
-
function
|
|
602
|
+
function to(e) {
|
|
603
603
|
return Array.from(10).fill(0).map((n, a) => e + "_" + a);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function no(e) {
|
|
606
606
|
let t = {};
|
|
607
607
|
return e.map((n, a) => {
|
|
608
|
-
let { key:
|
|
609
|
-
o && !
|
|
608
|
+
let { key: r, option: o, type: l, optionFormater: s } = n, i = rn(a);
|
|
609
|
+
o && !s ? t[r] = `${i}---option` : l === "image" ? t[r] = `${i}---image` : t[r] = i;
|
|
610
610
|
}), t;
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function oo(e, t) {
|
|
613
613
|
return t.split(".").reduce((n, a) => n && n[a], e);
|
|
614
614
|
}
|
|
615
|
-
const
|
|
615
|
+
const ke = (e, t) => {
|
|
616
616
|
const n = e.__vccOpts || e;
|
|
617
|
-
for (const [a,
|
|
618
|
-
n[a] =
|
|
617
|
+
for (const [a, r] of t)
|
|
618
|
+
n[a] = r;
|
|
619
619
|
return n;
|
|
620
|
-
},
|
|
620
|
+
}, sn = ["onClick"], cn = {
|
|
621
621
|
__name: "index",
|
|
622
|
-
props: /* @__PURE__ */
|
|
622
|
+
props: /* @__PURE__ */ Xe({
|
|
623
623
|
api: {
|
|
624
624
|
type: Function
|
|
625
625
|
},
|
|
@@ -659,135 +659,139 @@ const xe = (e, t) => {
|
|
|
659
659
|
modelValue: {},
|
|
660
660
|
modelModifiers: {}
|
|
661
661
|
}),
|
|
662
|
-
emits: /* @__PURE__ */
|
|
662
|
+
emits: /* @__PURE__ */ Xe(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
663
663
|
setup(e, { emit: t }) {
|
|
664
|
-
const n = e, a = Tt(), { t:
|
|
664
|
+
const n = e, a = Tt(), { t: r, locale: o } = we(), l = Dt(e, "modelValue"), s = ue(() => a["value-key"] != null), i = j(""), g = ue(() => {
|
|
665
665
|
if (a.remote !== void 0)
|
|
666
666
|
return n.data;
|
|
667
|
-
const b =
|
|
667
|
+
const b = yt(i.value), { data: k, labelValue: R } = n, _ = k || y.value;
|
|
668
668
|
if (b.length == 0)
|
|
669
|
-
return
|
|
670
|
-
const { label:
|
|
671
|
-
let
|
|
672
|
-
return b.length == 1 ?
|
|
673
|
-
(
|
|
674
|
-
) :
|
|
675
|
-
let
|
|
676
|
-
return
|
|
669
|
+
return _;
|
|
670
|
+
const { label: oe, labelEn: ge } = R;
|
|
671
|
+
let M = o.value == "en_us" ? ge || "i18nName" : oe;
|
|
672
|
+
return b.length == 1 ? _.filter(
|
|
673
|
+
(fe) => fe[M].toLowerCase().includes(b[0].toLowerCase())
|
|
674
|
+
) : _.filter((fe) => {
|
|
675
|
+
let _e = !1;
|
|
676
|
+
return _e = b.some((Le) => fe[M].toLowerCase() == Le.toLowerCase()), _e;
|
|
677
677
|
});
|
|
678
|
-
}), m =
|
|
678
|
+
}), m = ue({
|
|
679
679
|
get() {
|
|
680
680
|
return a.multiple == null || l.value == null ? !1 : l.value.length == g.value.length;
|
|
681
681
|
},
|
|
682
682
|
set(b) {
|
|
683
683
|
return b;
|
|
684
684
|
}
|
|
685
|
-
}),
|
|
685
|
+
}), p = t, y = j([]), h = async () => {
|
|
686
686
|
const { data: b } = await n.api();
|
|
687
|
-
|
|
687
|
+
y.value = [...b], p("success", y);
|
|
688
688
|
};
|
|
689
689
|
n.api && h();
|
|
690
690
|
function f(b) {
|
|
691
|
-
|
|
691
|
+
p("change", b), c.value && be(() => {
|
|
692
692
|
n.optionClick && n.optionClick(c.value), c.value = null;
|
|
693
693
|
});
|
|
694
694
|
}
|
|
695
695
|
const c = j(null);
|
|
696
|
-
function v(
|
|
696
|
+
function v() {
|
|
697
|
+
p("change", l.value), be(() => {
|
|
698
|
+
n.optionClick && n.optionClick(null);
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
function w(b) {
|
|
697
702
|
c.value = b;
|
|
698
703
|
}
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
704
|
+
const x = n.labelValue.label.split("-"), C = (b) => {
|
|
705
|
+
if (x.length == 1) {
|
|
701
706
|
if (n.changeLocal)
|
|
702
|
-
return
|
|
707
|
+
return r(b[n.labelValue.label]);
|
|
703
708
|
let k = o.value == "en_us" ? b[n.labelValue.labelEn || "i18nName"] : b[n.labelValue.label];
|
|
704
709
|
return k = k || b[n.labelValue.label], k + "";
|
|
705
710
|
} else {
|
|
706
711
|
let k = [];
|
|
707
|
-
return
|
|
708
|
-
k.push(b[
|
|
712
|
+
return x.forEach((R) => {
|
|
713
|
+
k.push(b[R]);
|
|
709
714
|
}), k.join("-");
|
|
710
715
|
}
|
|
711
716
|
};
|
|
712
|
-
function
|
|
713
|
-
let k = n.data ? n.data :
|
|
714
|
-
l.value = b ? k.map((
|
|
715
|
-
|
|
717
|
+
function S(b) {
|
|
718
|
+
let k = n.data ? n.data : y.value;
|
|
719
|
+
l.value = b ? k.map((R) => s.value ? R : R[n.labelValue.value]) : [], be(() => {
|
|
720
|
+
p("change", l.value), p("changeAll", l.value, k);
|
|
716
721
|
});
|
|
717
722
|
}
|
|
718
|
-
function
|
|
719
|
-
|
|
723
|
+
function V(b) {
|
|
724
|
+
p("change", s.value ? b : b[n.labelValue.value]), be(() => {
|
|
720
725
|
n.optionClick && n.optionClick(b);
|
|
721
726
|
});
|
|
722
727
|
}
|
|
723
|
-
function
|
|
724
|
-
const k =
|
|
725
|
-
return !!(n.maxLimit > 0 && l.value.length >= n.maxLimit && !
|
|
728
|
+
function K(b) {
|
|
729
|
+
const k = s.value ? b : b[n.labelValue.value], R = s.value ? l.value.some((_) => _[n.labelValue.value] === b[n.labelValue.value]) : l.value.includes(k);
|
|
730
|
+
return !!(n.maxLimit > 0 && l.value.length >= n.maxLimit && !R || n.minLimit > 0 && l.value.length === n.minLimit && R);
|
|
726
731
|
}
|
|
727
|
-
function
|
|
732
|
+
function I(b) {
|
|
728
733
|
return b.map((k) => ({
|
|
729
734
|
...k,
|
|
730
|
-
label:
|
|
731
|
-
value:
|
|
735
|
+
label: C(k),
|
|
736
|
+
value: s.value ? k : k[n.labelValue.value]
|
|
732
737
|
}));
|
|
733
738
|
}
|
|
734
|
-
const
|
|
735
|
-
|
|
736
|
-
() => n.data ? n.data :
|
|
739
|
+
const A = j([]), $ = n.data ? n.data : y.value;
|
|
740
|
+
A.value = I($), Re(
|
|
741
|
+
() => n.data ? n.data : y.value,
|
|
737
742
|
(b) => {
|
|
738
|
-
var
|
|
739
|
-
const k =
|
|
740
|
-
if (k.length !==
|
|
741
|
-
|
|
743
|
+
var R;
|
|
744
|
+
const k = I(b);
|
|
745
|
+
if (k.length !== A.value.length)
|
|
746
|
+
A.value = k;
|
|
742
747
|
else {
|
|
743
|
-
let
|
|
744
|
-
for (let
|
|
745
|
-
if (k[
|
|
746
|
-
|
|
748
|
+
let _ = !1;
|
|
749
|
+
for (let oe = 0; oe < k.length; oe++)
|
|
750
|
+
if (k[oe].value !== ((R = A.value[oe]) == null ? void 0 : R.value)) {
|
|
751
|
+
_ = !0;
|
|
747
752
|
break;
|
|
748
753
|
}
|
|
749
|
-
|
|
754
|
+
_ && (A.value = k);
|
|
750
755
|
}
|
|
751
756
|
},
|
|
752
757
|
{ deep: !0 }
|
|
753
758
|
);
|
|
754
|
-
const
|
|
759
|
+
const ee = ue(() => a.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? A.value.map((b) => ({
|
|
755
760
|
...b,
|
|
756
|
-
disabled:
|
|
757
|
-
})) :
|
|
761
|
+
disabled: K(b)
|
|
762
|
+
})) : A.value);
|
|
758
763
|
return (b, k) => {
|
|
759
|
-
const
|
|
760
|
-
return
|
|
764
|
+
const R = O("el-checkbox"), _ = O("el-select-v2"), oe = O("el-option"), ge = O("el-select");
|
|
765
|
+
return N(a).v2 != null ? (E(), W(_, de({
|
|
761
766
|
key: 0,
|
|
762
|
-
options:
|
|
767
|
+
options: ee.value,
|
|
763
768
|
modelValue: l.value,
|
|
764
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
765
|
-
},
|
|
769
|
+
"onUpdate:modelValue": k[1] || (k[1] = (M) => l.value = M)
|
|
770
|
+
}, N(a), {
|
|
766
771
|
filterable: "",
|
|
767
772
|
"collapse-tags": "",
|
|
768
773
|
"collapse-tags-tooltip": "",
|
|
769
774
|
clearable: "",
|
|
770
|
-
onChange: f
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
}, te(O.label), 9, rn)
|
|
775
|
+
onChange: f
|
|
776
|
+
}), at({
|
|
777
|
+
default: D(({ item: M }) => [
|
|
778
|
+
ie("div", {
|
|
779
|
+
onClick: (pe) => w(M)
|
|
780
|
+
}, te(M.label), 9, sn)
|
|
777
781
|
]),
|
|
778
782
|
_: 2
|
|
779
783
|
}, [
|
|
780
|
-
|
|
784
|
+
N(a).multiple != null ? {
|
|
781
785
|
name: "header",
|
|
782
|
-
fn:
|
|
783
|
-
|
|
784
|
-
|
|
786
|
+
fn: D(() => [
|
|
787
|
+
Q(b.$slots, "header", {}, () => [
|
|
788
|
+
z(R, {
|
|
785
789
|
class: "mgl20",
|
|
786
790
|
modelValue: m.value,
|
|
787
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
788
|
-
onChange:
|
|
791
|
+
"onUpdate:modelValue": k[0] || (k[0] = (M) => m.value = M),
|
|
792
|
+
onChange: S
|
|
789
793
|
}, {
|
|
790
|
-
default:
|
|
794
|
+
default: D(() => [
|
|
791
795
|
ne(te(b.$t("quan-xuan")), 1)
|
|
792
796
|
]),
|
|
793
797
|
_: 1
|
|
@@ -796,44 +800,44 @@ const xe = (e, t) => {
|
|
|
796
800
|
]),
|
|
797
801
|
key: "0"
|
|
798
802
|
} : void 0
|
|
799
|
-
]), 1040, ["options", "modelValue"])) : (
|
|
803
|
+
]), 1040, ["options", "modelValue"])) : (E(), W(ge, de({
|
|
800
804
|
key: 1,
|
|
801
805
|
modelValue: l.value,
|
|
802
|
-
"onUpdate:modelValue": k[3] || (k[3] = (
|
|
806
|
+
"onUpdate:modelValue": k[3] || (k[3] = (M) => l.value = M),
|
|
803
807
|
filterable: "",
|
|
804
808
|
"collapse-tags": "",
|
|
805
809
|
"collapse-tags-tooltip": "",
|
|
806
|
-
"filter-method":
|
|
810
|
+
"filter-method": N(a).remote != null ? void 0 : (M) => i.value = M,
|
|
807
811
|
clearable: ""
|
|
808
|
-
},
|
|
809
|
-
default:
|
|
810
|
-
|
|
811
|
-
|
|
812
|
+
}, N(a), { onClear: v }), {
|
|
813
|
+
default: D(() => [
|
|
814
|
+
N(a).multiple != null && e.showCheckAll && e.maxLimit == null ? Q(b.$slots, "header", { key: 0 }, () => [
|
|
815
|
+
z(R, {
|
|
812
816
|
class: "mgl20",
|
|
813
817
|
modelValue: m.value,
|
|
814
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
815
|
-
onChange:
|
|
818
|
+
"onUpdate:modelValue": k[2] || (k[2] = (M) => m.value = M),
|
|
819
|
+
onChange: S
|
|
816
820
|
}, {
|
|
817
|
-
default:
|
|
821
|
+
default: D(() => [
|
|
818
822
|
ne(te(b.$t("quan-xuan")), 1)
|
|
819
823
|
]),
|
|
820
824
|
_: 1
|
|
821
825
|
}, 8, ["modelValue"])
|
|
822
|
-
], !0) :
|
|
823
|
-
(
|
|
824
|
-
key:
|
|
825
|
-
label:
|
|
826
|
-
disabled:
|
|
827
|
-
onClick:
|
|
828
|
-
value:
|
|
826
|
+
], !0) : me("", !0),
|
|
827
|
+
(E(!0), ce(Ve, null, rt(g.value, (M, pe) => (E(), W(oe, {
|
|
828
|
+
key: pe,
|
|
829
|
+
label: C(M),
|
|
830
|
+
disabled: N(a).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? K(M) : !1,
|
|
831
|
+
onClick: qe((fe) => V(M), ["stop"]),
|
|
832
|
+
value: s.value ? M : M[e.labelValue.value]
|
|
829
833
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
830
834
|
]),
|
|
831
835
|
_: 3
|
|
832
|
-
}, 16, ["modelValue", "filter-method"
|
|
836
|
+
}, 16, ["modelValue", "filter-method"]));
|
|
833
837
|
};
|
|
834
838
|
}
|
|
835
|
-
}, un = /* @__PURE__ */
|
|
836
|
-
const dn =
|
|
839
|
+
}, un = /* @__PURE__ */ ke(cn, [["__scopeId", "data-v-12794201"]]);
|
|
840
|
+
const dn = ot({
|
|
837
841
|
props: {
|
|
838
842
|
name: {
|
|
839
843
|
tyepe: String,
|
|
@@ -841,42 +845,42 @@ const dn = nt({
|
|
|
841
845
|
}
|
|
842
846
|
}
|
|
843
847
|
});
|
|
844
|
-
function fn(e, t, n, a,
|
|
845
|
-
const l =
|
|
846
|
-
return
|
|
847
|
-
default:
|
|
848
|
-
(
|
|
848
|
+
function fn(e, t, n, a, r, o) {
|
|
849
|
+
const l = O("el-icon");
|
|
850
|
+
return E(), W(l, { class: "cmp-icon" }, {
|
|
851
|
+
default: D(() => [
|
|
852
|
+
(E(), W(st(e.name)))
|
|
849
853
|
]),
|
|
850
854
|
_: 1
|
|
851
855
|
});
|
|
852
856
|
}
|
|
853
|
-
const
|
|
857
|
+
const vt = /* @__PURE__ */ ke(dn, [["render", fn], ["__scopeId", "data-v-733f9daa"]]);
|
|
854
858
|
const hn = { class: "confirm-button-wrapper" }, mn = {
|
|
855
859
|
__name: "index",
|
|
856
860
|
emits: ["ok", "no"],
|
|
857
861
|
setup(e, { emit: t }) {
|
|
858
|
-
const n = t, a =
|
|
862
|
+
const n = t, a = Be(() => {
|
|
859
863
|
n("ok");
|
|
860
864
|
}, 500);
|
|
861
|
-
function
|
|
865
|
+
function r() {
|
|
862
866
|
n("no");
|
|
863
867
|
}
|
|
864
868
|
return (o, l) => {
|
|
865
|
-
const
|
|
866
|
-
return
|
|
867
|
-
|
|
868
|
-
onConfirm:
|
|
869
|
-
onCancel:
|
|
869
|
+
const s = O("el-popconfirm");
|
|
870
|
+
return E(), ce("span", hn, [
|
|
871
|
+
z(s, de(o.$attrs, {
|
|
872
|
+
onConfirm: N(a),
|
|
873
|
+
onCancel: r
|
|
870
874
|
}), {
|
|
871
|
-
reference:
|
|
872
|
-
|
|
875
|
+
reference: D(() => [
|
|
876
|
+
Q(o.$slots, "default", {}, void 0, !0)
|
|
873
877
|
]),
|
|
874
878
|
_: 3
|
|
875
879
|
}, 16, ["onConfirm"])
|
|
876
880
|
]);
|
|
877
881
|
};
|
|
878
882
|
}
|
|
879
|
-
},
|
|
883
|
+
}, lo = /* @__PURE__ */ ke(mn, [["__scopeId", "data-v-24cb35fd"]]);
|
|
880
884
|
const gn = { class: "ImportButton" }, pn = ["accept"], yn = {
|
|
881
885
|
__name: "index",
|
|
882
886
|
props: {
|
|
@@ -895,36 +899,36 @@ const gn = { class: "ImportButton" }, pn = ["accept"], yn = {
|
|
|
895
899
|
},
|
|
896
900
|
emits: ["fileChange"],
|
|
897
901
|
setup(e, { emit: t }) {
|
|
898
|
-
const n = e, a = j(null),
|
|
902
|
+
const n = e, a = j(null), r = j(!1);
|
|
899
903
|
async function o(l) {
|
|
900
|
-
|
|
901
|
-
let
|
|
902
|
-
const i = await nn(
|
|
903
|
-
|
|
904
|
+
r.value = !0;
|
|
905
|
+
let s = l.target.files[0];
|
|
906
|
+
const i = await nn(s, n.fields).catch(() => {
|
|
907
|
+
r.value = !1;
|
|
904
908
|
}).finally(() => {
|
|
905
909
|
a.value.value = null;
|
|
906
910
|
});
|
|
907
911
|
await n.fileChange(i).finally(() => {
|
|
908
|
-
|
|
912
|
+
r.value = !1;
|
|
909
913
|
});
|
|
910
914
|
}
|
|
911
|
-
return (l,
|
|
912
|
-
const i =
|
|
913
|
-
return
|
|
914
|
-
|
|
915
|
+
return (l, s) => {
|
|
916
|
+
const i = O("el-button");
|
|
917
|
+
return E(), ce("div", gn, [
|
|
918
|
+
z(i, de({
|
|
915
919
|
type: "primary",
|
|
916
|
-
loading:
|
|
920
|
+
loading: r.value,
|
|
917
921
|
class: "mgr10",
|
|
918
|
-
onClick:
|
|
922
|
+
onClick: s[0] || (s[0] = (g) => a.value.click())
|
|
919
923
|
}, l.$attrs), {
|
|
920
|
-
default:
|
|
921
|
-
|
|
924
|
+
default: D(() => [
|
|
925
|
+
Q(l.$slots, "default", {}, () => [
|
|
922
926
|
ne(te(l.$t("dao-ru")), 1)
|
|
923
927
|
], !0)
|
|
924
928
|
]),
|
|
925
929
|
_: 3
|
|
926
930
|
}, 16, ["loading"]),
|
|
927
|
-
|
|
931
|
+
ie("input", {
|
|
928
932
|
onChange: o,
|
|
929
933
|
ref_key: "input",
|
|
930
934
|
ref: a,
|
|
@@ -935,19 +939,19 @@ const gn = { class: "ImportButton" }, pn = ["accept"], yn = {
|
|
|
935
939
|
]);
|
|
936
940
|
};
|
|
937
941
|
}
|
|
938
|
-
},
|
|
939
|
-
function
|
|
942
|
+
}, ao = /* @__PURE__ */ ke(yn, [["__scopeId", "data-v-ea0a4c60"]]);
|
|
943
|
+
function je(e) {
|
|
940
944
|
let t = {};
|
|
941
945
|
return e.forEach((n) => {
|
|
942
|
-
const { key: a, type:
|
|
946
|
+
const { key: a, type: r, option: o = {}, value: l, dateType: s = "date" } = n;
|
|
943
947
|
if (a)
|
|
944
|
-
if (
|
|
945
|
-
t[a] =
|
|
946
|
-
else if (
|
|
947
|
-
if (
|
|
948
|
+
if (r == "input" && (o != null && o.multiple))
|
|
949
|
+
t[a] = yt(l);
|
|
950
|
+
else if (r == "date")
|
|
951
|
+
if (s.includes("range")) {
|
|
948
952
|
const [i, g] = a;
|
|
949
|
-
let [m,
|
|
950
|
-
m &&
|
|
953
|
+
let [m, p] = l || [];
|
|
954
|
+
m && s == "daterange" && (m = Fe(m).format("YYYY-MM-DD 00:00:00"), p = Fe(p).format("YYYY-MM-DD 23:59:59")), t[i] = m, t[g] = p;
|
|
951
955
|
} else
|
|
952
956
|
t[a] = l;
|
|
953
957
|
else
|
|
@@ -964,27 +968,27 @@ const vn = { key: 0 }, bn = { class: "btns" }, wn = { class: "left" }, Cn = { cl
|
|
|
964
968
|
},
|
|
965
969
|
emits: ["confirm", "reset", "visibleChange"],
|
|
966
970
|
setup(e, { expose: t, emit: n }) {
|
|
967
|
-
const a = e,
|
|
971
|
+
const a = e, r = n, o = j(!0), l = j(null), { t: s } = we(), i = {
|
|
968
972
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
969
973
|
daterange: "YYYY-MM-DD",
|
|
970
974
|
month: "YYYY-MM"
|
|
971
|
-
}, g =
|
|
975
|
+
}, g = ue(() => o.value ? s("guan-bi") : s("zhan-kai"));
|
|
972
976
|
function m() {
|
|
973
|
-
|
|
977
|
+
r("confirm");
|
|
974
978
|
}
|
|
975
|
-
function
|
|
976
|
-
w.option.onClear && w.option.onClear(),
|
|
979
|
+
function p(w) {
|
|
980
|
+
w.option.onClear && w.option.onClear(), r("confirm");
|
|
977
981
|
}
|
|
978
|
-
function
|
|
979
|
-
|
|
982
|
+
function y() {
|
|
983
|
+
r("reset");
|
|
980
984
|
}
|
|
981
985
|
function h() {
|
|
982
|
-
|
|
986
|
+
r("confirm");
|
|
983
987
|
}
|
|
984
988
|
function f() {
|
|
985
|
-
return
|
|
989
|
+
return je(a.form.items);
|
|
986
990
|
}
|
|
987
|
-
const c =
|
|
991
|
+
const c = ut(a.form.items);
|
|
988
992
|
function v() {
|
|
989
993
|
a.form.items.forEach((w) => {
|
|
990
994
|
const x = c.find((C) => C.key == w.key);
|
|
@@ -992,61 +996,61 @@ const vn = { key: 0 }, bn = { class: "btns" }, wn = { class: "left" }, Cn = { cl
|
|
|
992
996
|
});
|
|
993
997
|
}
|
|
994
998
|
return t({ getPrm: f, reset: v }), (w, x) => {
|
|
995
|
-
const C =
|
|
996
|
-
return
|
|
999
|
+
const C = O("el-input"), S = O("el-date-picker"), V = O("el-form-item"), K = O("el-form"), I = O("el-link"), A = O("el-button");
|
|
1000
|
+
return E(), ce("div", {
|
|
997
1001
|
class: "searchBar-container mgt10 mgb10",
|
|
998
|
-
onKeydown:
|
|
1002
|
+
onKeydown: Mt(m, ["enter"])
|
|
999
1003
|
}, [
|
|
1000
|
-
|
|
1004
|
+
ie("div", {
|
|
1001
1005
|
class: "searchBar",
|
|
1002
|
-
style:
|
|
1006
|
+
style: zt({ height: o.value ? "auto" : "32px" })
|
|
1003
1007
|
}, [
|
|
1004
|
-
|
|
1008
|
+
z(K, {
|
|
1005
1009
|
inline: "",
|
|
1006
1010
|
model: e.form.data
|
|
1007
1011
|
}, {
|
|
1008
|
-
default:
|
|
1009
|
-
(
|
|
1010
|
-
key:
|
|
1012
|
+
default: D(() => [
|
|
1013
|
+
(E(!0), ce(Ve, null, rt(e.form.items.filter(($) => !$.hidden), ($) => (E(), ce(Ve, {
|
|
1014
|
+
key: $.key
|
|
1011
1015
|
}, [
|
|
1012
|
-
|
|
1016
|
+
$.type == "br" ? (E(), ce("br", vn)) : (E(), W(V, {
|
|
1013
1017
|
key: 1,
|
|
1014
|
-
label:
|
|
1018
|
+
label: $.name
|
|
1015
1019
|
}, {
|
|
1016
|
-
default:
|
|
1017
|
-
var
|
|
1020
|
+
default: D(() => {
|
|
1021
|
+
var ee, b;
|
|
1018
1022
|
return [
|
|
1019
|
-
|
|
1023
|
+
$.type === "input" ? (E(), W(C, {
|
|
1020
1024
|
key: 0,
|
|
1021
|
-
modelValue:
|
|
1022
|
-
"onUpdate:modelValue": (
|
|
1023
|
-
class:
|
|
1025
|
+
modelValue: $.value,
|
|
1026
|
+
"onUpdate:modelValue": (k) => $.value = k,
|
|
1027
|
+
class: it(((ee = $.option) == null ? void 0 : ee.class) || "w150"),
|
|
1024
1028
|
placeholder: w.$t("qing-shu-ru"),
|
|
1025
1029
|
clearable: ""
|
|
1026
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) :
|
|
1027
|
-
|
|
1030
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : $.type === "custom" ? (E(), W(st($.render), { key: 1 })) : me("", !0),
|
|
1031
|
+
$.type === "select" ? (E(), W(un, de({
|
|
1028
1032
|
key: 2,
|
|
1029
|
-
class: ((
|
|
1030
|
-
modelValue:
|
|
1031
|
-
"onUpdate:modelValue": (
|
|
1032
|
-
}, { ref_for: !0 },
|
|
1033
|
+
class: ((b = $.option) == null ? void 0 : b.class) || "w150",
|
|
1034
|
+
modelValue: $.value,
|
|
1035
|
+
"onUpdate:modelValue": (k) => $.value = k
|
|
1036
|
+
}, { ref_for: !0 }, $.option, {
|
|
1033
1037
|
onChange: m,
|
|
1034
|
-
onClear: (
|
|
1038
|
+
onClear: (k) => p($),
|
|
1035
1039
|
placeholder: w.$t("qing-xuan-ze")
|
|
1036
|
-
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear", "placeholder"])) :
|
|
1037
|
-
|
|
1040
|
+
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear", "placeholder"])) : me("", !0),
|
|
1041
|
+
$.type === "date" ? (E(), W(S, de({
|
|
1038
1042
|
key: 3,
|
|
1039
|
-
class: { datetimerange: "w300", daterange: "w200" }[
|
|
1040
|
-
modelValue:
|
|
1041
|
-
"onUpdate:modelValue": (
|
|
1042
|
-
"value-format": i[
|
|
1043
|
-
type:
|
|
1044
|
-
onFocus: (
|
|
1045
|
-
onChange: (
|
|
1043
|
+
class: { datetimerange: "w300", daterange: "w200" }[$.dateType] || "w100",
|
|
1044
|
+
modelValue: $.value,
|
|
1045
|
+
"onUpdate:modelValue": (k) => $.value = k,
|
|
1046
|
+
"value-format": i[$.dateType] || "YYYY-MM-DD",
|
|
1047
|
+
type: $.dateType || "date",
|
|
1048
|
+
onFocus: (k) => l.value = $,
|
|
1049
|
+
onChange: (k) => h(),
|
|
1046
1050
|
placeholder: w.$t("qing-xuan-ze"),
|
|
1047
1051
|
"start-placeholder": w.$t("kai-shi-shi-jian"),
|
|
1048
1052
|
"end-placeholder": w.$t("jie-shu-shi-jian")
|
|
1049
|
-
}, { ref_for: !0 },
|
|
1053
|
+
}, { ref_for: !0 }, $.option), null, 16, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : me("", !0)
|
|
1050
1054
|
];
|
|
1051
1055
|
}),
|
|
1052
1056
|
_: 2
|
|
@@ -1056,51 +1060,51 @@ const vn = { key: 0 }, bn = { class: "btns" }, wn = { class: "left" }, Cn = { cl
|
|
|
1056
1060
|
_: 1
|
|
1057
1061
|
}, 8, ["model"])
|
|
1058
1062
|
], 4),
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1063
|
+
ie("div", bn, [
|
|
1064
|
+
ie("div", wn, [
|
|
1065
|
+
Q(w.$slots, "table-header-left", {}, void 0, !0)
|
|
1062
1066
|
]),
|
|
1063
|
-
|
|
1064
|
-
|
|
1067
|
+
ie("div", Cn, [
|
|
1068
|
+
z(I, {
|
|
1065
1069
|
underline: "never",
|
|
1066
1070
|
class: "mgr10",
|
|
1067
1071
|
onClick: x[0] || (x[0] = () => {
|
|
1068
|
-
|
|
1072
|
+
r("visibleChange", !o.value), o.value = !o.value;
|
|
1069
1073
|
})
|
|
1070
1074
|
}, {
|
|
1071
|
-
default:
|
|
1072
|
-
|
|
1075
|
+
default: D(() => [
|
|
1076
|
+
z(vt, {
|
|
1073
1077
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1074
1078
|
}, null, 8, ["name"]),
|
|
1075
1079
|
ne(" " + te(g.value), 1)
|
|
1076
1080
|
]),
|
|
1077
1081
|
_: 1
|
|
1078
1082
|
}),
|
|
1079
|
-
|
|
1083
|
+
z(A, {
|
|
1080
1084
|
type: "primary",
|
|
1081
1085
|
onClick: m
|
|
1082
1086
|
}, {
|
|
1083
|
-
default:
|
|
1087
|
+
default: D(() => [
|
|
1084
1088
|
ne(te(w.$t("shai-xuan")), 1)
|
|
1085
1089
|
]),
|
|
1086
1090
|
_: 1
|
|
1087
1091
|
}),
|
|
1088
|
-
|
|
1092
|
+
z(A, {
|
|
1089
1093
|
type: "primary",
|
|
1090
|
-
onClick:
|
|
1094
|
+
onClick: y
|
|
1091
1095
|
}, {
|
|
1092
|
-
default:
|
|
1096
|
+
default: D(() => [
|
|
1093
1097
|
ne(te(w.$t("chong-zhi")), 1)
|
|
1094
1098
|
]),
|
|
1095
1099
|
_: 1
|
|
1096
1100
|
}),
|
|
1097
|
-
|
|
1101
|
+
Q(w.$slots, "btn", {}, void 0, !0)
|
|
1098
1102
|
])
|
|
1099
1103
|
])
|
|
1100
1104
|
], 32);
|
|
1101
1105
|
};
|
|
1102
1106
|
}
|
|
1103
|
-
}, kn = /* @__PURE__ */
|
|
1107
|
+
}, kn = /* @__PURE__ */ ke(xn, [["__scopeId", "data-v-db6f71dd"]]), bt = {
|
|
1104
1108
|
// 分页参数名
|
|
1105
1109
|
pageNoKey: "pageNo",
|
|
1106
1110
|
// 页码参数名
|
|
@@ -1130,22 +1134,22 @@ const vn = { key: 0 }, bn = { class: "btns" }, wn = { class: "left" }, Cn = { cl
|
|
|
1130
1134
|
enableCellCopy: !0
|
|
1131
1135
|
// 是否启用单元格选区复制功能
|
|
1132
1136
|
};
|
|
1133
|
-
let
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
+
let Se = { ...bt };
|
|
1138
|
+
function ro(e) {
|
|
1139
|
+
Se = {
|
|
1140
|
+
...Se,
|
|
1137
1141
|
...e,
|
|
1138
1142
|
responseDataKeys: {
|
|
1139
|
-
|
|
1143
|
+
...Se.responseDataKeys,
|
|
1140
1144
|
...e.responseDataKeys || {}
|
|
1141
1145
|
}
|
|
1142
1146
|
};
|
|
1143
1147
|
}
|
|
1144
1148
|
function _n() {
|
|
1145
|
-
return
|
|
1149
|
+
return Se;
|
|
1146
1150
|
}
|
|
1147
|
-
function
|
|
1148
|
-
|
|
1151
|
+
function so() {
|
|
1152
|
+
Se = { ...bt };
|
|
1149
1153
|
}
|
|
1150
1154
|
const $n = { class: "center" }, Sn = {
|
|
1151
1155
|
__name: "index",
|
|
@@ -1184,21 +1188,21 @@ const $n = { class: "center" }, Sn = {
|
|
|
1184
1188
|
}
|
|
1185
1189
|
},
|
|
1186
1190
|
setup(e, { expose: t }) {
|
|
1187
|
-
const { t: n, locale: a } =
|
|
1191
|
+
const { t: n, locale: a } = we(), r = Ut(), o = _n(), l = e, s = j(!1), i = j([]);
|
|
1188
1192
|
l.searchForm.showSearch === void 0 && (l.searchForm.showSearch = o.showSearch), l.searchForm.showPage === void 0 && (l.searchForm.showPage = o.showPage), l.searchForm.showShadow === void 0 && (l.searchForm.showShadow = o.showShadow), l.searchForm.showCheckBox === void 0 && (l.searchForm.showCheckBox = o.showCheckBox), l.searchForm.enableCellCopy === void 0 && (l.searchForm.enableCellCopy = o.enableCellCopy), l.searchForm.selections || (l.searchForm.selections = []);
|
|
1189
|
-
const g =
|
|
1190
|
-
const d =
|
|
1193
|
+
const g = ue(() => {
|
|
1194
|
+
const d = r.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1191
1195
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1192
|
-
}), m =
|
|
1193
|
-
[
|
|
1194
|
-
[
|
|
1196
|
+
}), m = ut(l.searchForm.items), p = l.searchForm.pageNoKey || o.pageNoKey, y = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ee({
|
|
1197
|
+
[p]: 1,
|
|
1198
|
+
[y]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1195
1199
|
total: 0
|
|
1196
|
-
}), f = j(null), c = j(null), v = j(450), w =
|
|
1197
|
-
|
|
1200
|
+
}), f = j(null), c = j(null), v = j(450), w = Be(() => {
|
|
1201
|
+
be(() => {
|
|
1198
1202
|
if (!c.value)
|
|
1199
1203
|
return;
|
|
1200
|
-
const u = c.value.getBoundingClientRect(),
|
|
1201
|
-
v.value = Math.max(
|
|
1204
|
+
const u = c.value.getBoundingClientRect(), F = window.innerHeight, T = u.top, B = 100, G = F - T - B, q = 200;
|
|
1205
|
+
v.value = Math.max(G, q);
|
|
1202
1206
|
});
|
|
1203
1207
|
}, 100), x = () => {
|
|
1204
1208
|
w();
|
|
@@ -1209,10 +1213,10 @@ const $n = { class: "center" }, Sn = {
|
|
|
1209
1213
|
if (!d || !d.$el)
|
|
1210
1214
|
return !1;
|
|
1211
1215
|
const u = d.$el;
|
|
1212
|
-
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown",
|
|
1216
|
+
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown", ge), u.removeEventListener("mousemove", M), u.removeEventListener("mouseup", pe), u.removeEventListener("keydown", De), u.addEventListener("mousedown", ge), u.addEventListener("mousemove", M), u.addEventListener("mouseup", pe), u.addEventListener("keydown", De), !0;
|
|
1213
1217
|
};
|
|
1214
|
-
|
|
1215
|
-
w(), window.addEventListener("resize", x), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup",
|
|
1218
|
+
lt(() => {
|
|
1219
|
+
w(), window.addEventListener("resize", x), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", Ne), document.addEventListener("mousedown", We), setTimeout(() => {
|
|
1216
1220
|
C();
|
|
1217
1221
|
}, 500));
|
|
1218
1222
|
}), Ot(() => {
|
|
@@ -1221,78 +1225,78 @@ const $n = { class: "center" }, Sn = {
|
|
|
1221
1225
|
}, 500);
|
|
1222
1226
|
}), Vt(() => {
|
|
1223
1227
|
if (window.removeEventListener("resize", x), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
1224
|
-
document.removeEventListener("mouseup",
|
|
1228
|
+
document.removeEventListener("mouseup", Ne), document.removeEventListener("mousedown", We);
|
|
1225
1229
|
const d = f.value;
|
|
1226
1230
|
if (d && d.$el) {
|
|
1227
1231
|
const u = d.$el;
|
|
1228
|
-
u.removeEventListener("mousedown",
|
|
1232
|
+
u.removeEventListener("mousedown", ge), u.removeEventListener("mousemove", M), u.removeEventListener("mouseup", pe), u.removeEventListener("keydown", De);
|
|
1229
1233
|
}
|
|
1230
1234
|
}
|
|
1231
1235
|
});
|
|
1232
|
-
const S =
|
|
1233
|
-
let
|
|
1234
|
-
async function
|
|
1236
|
+
const S = ue(() => R.value.height || v.value);
|
|
1237
|
+
let V;
|
|
1238
|
+
async function K(d) {
|
|
1235
1239
|
const { dataFormat: u } = l.tableConfig;
|
|
1236
|
-
d[
|
|
1237
|
-
const { code:
|
|
1238
|
-
|
|
1240
|
+
d[p] != 1 && (d.nextSearchAfter = V), s.value = !0;
|
|
1241
|
+
const { code: F, data: T = {} } = await l.api(d).finally(() => {
|
|
1242
|
+
s.value = !1, l.searchForm.selections = [];
|
|
1239
1243
|
});
|
|
1240
|
-
if (
|
|
1241
|
-
let
|
|
1242
|
-
for (const
|
|
1243
|
-
if (
|
|
1244
|
-
|
|
1244
|
+
if (F == 200) {
|
|
1245
|
+
let B = [];
|
|
1246
|
+
for (const q of o.responseDataKeys.rows)
|
|
1247
|
+
if (T[q]) {
|
|
1248
|
+
B = T[q];
|
|
1245
1249
|
break;
|
|
1246
1250
|
}
|
|
1247
|
-
let
|
|
1248
|
-
for (const
|
|
1249
|
-
if (
|
|
1250
|
-
|
|
1251
|
+
let G = 0;
|
|
1252
|
+
for (const q of o.responseDataKeys.total)
|
|
1253
|
+
if (T[q] !== void 0) {
|
|
1254
|
+
G = T[q];
|
|
1251
1255
|
break;
|
|
1252
1256
|
}
|
|
1253
|
-
i.value = u ? u(
|
|
1257
|
+
i.value = u ? u(B) : B, h.total = G, V = T.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && be(() => {
|
|
1254
1258
|
setTimeout(() => {
|
|
1255
1259
|
C();
|
|
1256
1260
|
}, 100);
|
|
1257
1261
|
});
|
|
1258
1262
|
}
|
|
1259
1263
|
}
|
|
1260
|
-
function
|
|
1261
|
-
const { searchData: u = () => ({}) } = l.tableConfig,
|
|
1262
|
-
|
|
1264
|
+
function I(d = {}) {
|
|
1265
|
+
const { searchData: u = () => ({}) } = l.tableConfig, F = u();
|
|
1266
|
+
K({
|
|
1263
1267
|
...h,
|
|
1264
|
-
...
|
|
1268
|
+
...je(l.searchForm.items),
|
|
1265
1269
|
...d,
|
|
1266
|
-
...
|
|
1270
|
+
...F
|
|
1267
1271
|
});
|
|
1268
1272
|
}
|
|
1269
|
-
function
|
|
1273
|
+
function A() {
|
|
1270
1274
|
const { reset: d } = l.tableConfig;
|
|
1271
1275
|
d && d(), l.searchForm.items.forEach((u) => {
|
|
1272
|
-
const
|
|
1273
|
-
|
|
1274
|
-
}),
|
|
1276
|
+
const F = m.find((T) => Qe(u.key) && Qe(T.key) ? u.key.join(",") == T.key.join(",") : T.key == u.key);
|
|
1277
|
+
F && (u.value = F.value);
|
|
1278
|
+
}), I();
|
|
1275
1279
|
}
|
|
1276
|
-
l.api && l.immediate &&
|
|
1277
|
-
function
|
|
1278
|
-
return { ...h, ...
|
|
1280
|
+
l.api && l.immediate && I();
|
|
1281
|
+
function $() {
|
|
1282
|
+
return { ...h, ...je(l.searchForm.items) };
|
|
1279
1283
|
}
|
|
1280
|
-
const
|
|
1284
|
+
const ee = () => {
|
|
1281
1285
|
const d = f.value;
|
|
1282
1286
|
d && d.clearSort();
|
|
1283
|
-
},
|
|
1287
|
+
}, b = Ee({
|
|
1284
1288
|
storage: !0
|
|
1285
|
-
}),
|
|
1289
|
+
}), k = Ee({
|
|
1286
1290
|
drag: !0,
|
|
1287
1291
|
resizable: !0,
|
|
1288
1292
|
maxFixedSize: 0
|
|
1289
|
-
}),
|
|
1290
|
-
const { customConfig: d, columnConfig: u, ...
|
|
1293
|
+
}), R = ue(() => {
|
|
1294
|
+
const { customConfig: d, columnConfig: u, ...F } = l.tableConfig;
|
|
1291
1295
|
return {
|
|
1292
1296
|
headerAlign: "left",
|
|
1293
1297
|
align: "center",
|
|
1294
|
-
customConfig: { ...
|
|
1295
|
-
columnConfig: { ...
|
|
1298
|
+
customConfig: { ...b, ...d },
|
|
1299
|
+
columnConfig: { ...k, ...u },
|
|
1296
1300
|
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1297
1301
|
"virtual-x-config": {
|
|
1298
1302
|
enabled: !1,
|
|
@@ -1300,9 +1304,9 @@ const $n = { class: "center" }, Sn = {
|
|
|
1300
1304
|
},
|
|
1301
1305
|
// 纵向虚拟滚动 大于100条开启
|
|
1302
1306
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1303
|
-
...
|
|
1307
|
+
...F
|
|
1304
1308
|
};
|
|
1305
|
-
}),
|
|
1309
|
+
}), _ = Ee({
|
|
1306
1310
|
isSelecting: !1,
|
|
1307
1311
|
// 是否正在选择
|
|
1308
1312
|
startCell: null,
|
|
@@ -1311,71 +1315,71 @@ const $n = { class: "center" }, Sn = {
|
|
|
1311
1315
|
// 结束单元格
|
|
1312
1316
|
selectedCells: []
|
|
1313
1317
|
// 选中的单元格列表 [{ rowIndex, colIndex }]
|
|
1314
|
-
}),
|
|
1318
|
+
}), oe = (d) => {
|
|
1315
1319
|
const u = d.closest(".vxe-body--column");
|
|
1316
1320
|
if (!u || u.classList.contains("col--checkbox") || u.classList.contains("col--seq"))
|
|
1317
1321
|
return null;
|
|
1318
|
-
const
|
|
1319
|
-
if (!
|
|
1322
|
+
const F = u.closest(".vxe-body--row");
|
|
1323
|
+
if (!F)
|
|
1320
1324
|
return null;
|
|
1321
|
-
const
|
|
1322
|
-
if (!
|
|
1325
|
+
const T = f.value;
|
|
1326
|
+
if (!T)
|
|
1323
1327
|
return null;
|
|
1324
|
-
let
|
|
1325
|
-
const
|
|
1326
|
-
if (
|
|
1327
|
-
|
|
1328
|
+
let B = -1;
|
|
1329
|
+
const G = F.getAttribute("data-rowid");
|
|
1330
|
+
if (G != null)
|
|
1331
|
+
B = parseInt(G, 10);
|
|
1328
1332
|
else {
|
|
1329
|
-
const P =
|
|
1330
|
-
|
|
1333
|
+
const P = F.parentElement;
|
|
1334
|
+
B = Array.from(P.querySelectorAll(".vxe-body--row")).indexOf(F);
|
|
1331
1335
|
}
|
|
1332
|
-
if (
|
|
1336
|
+
if (B < 0)
|
|
1333
1337
|
return null;
|
|
1334
|
-
let
|
|
1338
|
+
let q = -1;
|
|
1335
1339
|
const se = u.getAttribute("data-colid");
|
|
1336
|
-
if (se && (
|
|
1337
|
-
const
|
|
1338
|
-
if (
|
|
1339
|
-
const
|
|
1340
|
-
|
|
1341
|
-
} else if (
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1340
|
+
if (se && (q = T.getColumns().findIndex((L) => L.id === se)), q < 0) {
|
|
1341
|
+
const L = Array.from(F.querySelectorAll(".vxe-body--column")).indexOf(u), H = !!u.closest(".vxe-table--fixed-left-wrapper"), J = !!u.closest(".vxe-table--fixed-right-wrapper"), Y = T.getColumns();
|
|
1342
|
+
if (H) {
|
|
1343
|
+
const X = Y.filter((Z) => Z.fixed === "left");
|
|
1344
|
+
L < X.length && (q = Y.indexOf(X[L]));
|
|
1345
|
+
} else if (J) {
|
|
1346
|
+
const X = Y.filter((Z) => Z.fixed === "right");
|
|
1347
|
+
L < X.length && (q = Y.indexOf(X[L]));
|
|
1344
1348
|
} else {
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1349
|
+
const X = l.searchForm.showCheckBox ? 1 : 0;
|
|
1350
|
+
q = Y.filter((le) => le.fixed === "left").length + L - X;
|
|
1347
1351
|
}
|
|
1348
1352
|
}
|
|
1349
|
-
return
|
|
1350
|
-
},
|
|
1351
|
-
const u =
|
|
1353
|
+
return q < 0 ? null : { rowIndex: B, colIndex: q, cell: u };
|
|
1354
|
+
}, ge = (d) => {
|
|
1355
|
+
const u = oe(d.target);
|
|
1352
1356
|
if (!u) {
|
|
1353
|
-
|
|
1357
|
+
fe();
|
|
1354
1358
|
return;
|
|
1355
1359
|
}
|
|
1356
|
-
|
|
1360
|
+
_.isSelecting = !0, _.startCell = {
|
|
1357
1361
|
rowIndex: u.rowIndex,
|
|
1358
1362
|
colIndex: u.colIndex
|
|
1359
|
-
},
|
|
1360
|
-
},
|
|
1361
|
-
if (
|
|
1363
|
+
}, _.endCell = { ..._.startCell }, _e(), Le();
|
|
1364
|
+
}, M = (d) => {
|
|
1365
|
+
if (!_.isSelecting)
|
|
1362
1366
|
return;
|
|
1363
|
-
const u =
|
|
1364
|
-
u && (
|
|
1367
|
+
const u = oe(d.target);
|
|
1368
|
+
u && (_.endCell = {
|
|
1365
1369
|
rowIndex: u.rowIndex,
|
|
1366
1370
|
colIndex: u.colIndex
|
|
1367
|
-
},
|
|
1368
|
-
},
|
|
1369
|
-
|
|
1370
|
-
},
|
|
1371
|
-
|
|
1371
|
+
}, _e(), Le());
|
|
1372
|
+
}, pe = () => {
|
|
1373
|
+
_.isSelecting = !1;
|
|
1374
|
+
}, fe = () => {
|
|
1375
|
+
_.selectedCells = [], _.startCell = null, _.endCell = null;
|
|
1372
1376
|
const d = f.value;
|
|
1373
1377
|
if (!d)
|
|
1374
1378
|
return;
|
|
1375
1379
|
d.$el.querySelectorAll(
|
|
1376
1380
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1377
|
-
).forEach((
|
|
1378
|
-
|
|
1381
|
+
).forEach((F) => {
|
|
1382
|
+
F.classList.remove(
|
|
1379
1383
|
"cell-selected",
|
|
1380
1384
|
"cell-border-top",
|
|
1381
1385
|
"cell-border-right",
|
|
@@ -1383,257 +1387,257 @@ const $n = { class: "center" }, Sn = {
|
|
|
1383
1387
|
"cell-border-left"
|
|
1384
1388
|
);
|
|
1385
1389
|
});
|
|
1386
|
-
},
|
|
1387
|
-
if (
|
|
1388
|
-
|
|
1390
|
+
}, _e = () => {
|
|
1391
|
+
if (!_.startCell || !_.endCell) {
|
|
1392
|
+
_.selectedCells = [];
|
|
1389
1393
|
return;
|
|
1390
1394
|
}
|
|
1391
|
-
const d =
|
|
1392
|
-
|
|
1393
|
-
for (let P =
|
|
1394
|
-
for (let
|
|
1395
|
-
|
|
1395
|
+
const d = _.startCell.rowIndex, u = _.endCell.rowIndex, F = _.startCell.colIndex, T = _.endCell.colIndex, B = Math.min(d, u), G = Math.max(d, u), q = Math.min(F, T), se = Math.max(F, T);
|
|
1396
|
+
_.selectedCells = [];
|
|
1397
|
+
for (let P = B; P <= G; P++)
|
|
1398
|
+
for (let L = q; L <= se; L++)
|
|
1399
|
+
_.selectedCells.push({
|
|
1396
1400
|
rowIndex: P,
|
|
1397
|
-
colIndex:
|
|
1401
|
+
colIndex: L
|
|
1398
1402
|
});
|
|
1399
|
-
},
|
|
1400
|
-
|
|
1403
|
+
}, Le = () => {
|
|
1404
|
+
be(() => {
|
|
1401
1405
|
const d = f.value;
|
|
1402
1406
|
if (!d)
|
|
1403
1407
|
return;
|
|
1404
1408
|
const u = d.$el;
|
|
1405
1409
|
if (u.querySelectorAll(
|
|
1406
1410
|
".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left"
|
|
1407
|
-
).forEach((
|
|
1408
|
-
|
|
1411
|
+
).forEach((H) => {
|
|
1412
|
+
H.classList.remove(
|
|
1409
1413
|
"cell-selected",
|
|
1410
1414
|
"cell-border-top",
|
|
1411
1415
|
"cell-border-right",
|
|
1412
1416
|
"cell-border-bottom",
|
|
1413
1417
|
"cell-border-left"
|
|
1414
1418
|
);
|
|
1415
|
-
}),
|
|
1419
|
+
}), _.selectedCells.length === 0)
|
|
1416
1420
|
return;
|
|
1417
|
-
const
|
|
1421
|
+
const F = d.getColumns(), T = _.selectedCells.map((H) => H.rowIndex), B = _.selectedCells.map((H) => H.colIndex), G = Math.min(...T), q = Math.max(...T), se = Math.min(...B), P = Math.max(...B), L = [
|
|
1418
1422
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1419
1423
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1420
1424
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1421
1425
|
].filter(Boolean);
|
|
1422
|
-
|
|
1423
|
-
const
|
|
1424
|
-
if (!
|
|
1426
|
+
_.selectedCells.forEach(({ rowIndex: H, colIndex: J }) => {
|
|
1427
|
+
const Y = F[J];
|
|
1428
|
+
if (!Y)
|
|
1425
1429
|
return;
|
|
1426
|
-
const
|
|
1427
|
-
for (const
|
|
1428
|
-
const
|
|
1429
|
-
if (
|
|
1430
|
+
const X = Y.fixed === "left", Z = Y.fixed === "right";
|
|
1431
|
+
for (const le of L) {
|
|
1432
|
+
const $e = le.querySelectorAll(".vxe-body--row")[H];
|
|
1433
|
+
if (!$e)
|
|
1430
1434
|
continue;
|
|
1431
|
-
const
|
|
1435
|
+
const ye = Array.from($e.querySelectorAll(".vxe-body--column"));
|
|
1432
1436
|
let U = null;
|
|
1433
|
-
if (
|
|
1434
|
-
const
|
|
1435
|
-
U =
|
|
1436
|
-
} else if (
|
|
1437
|
-
const
|
|
1438
|
-
U =
|
|
1439
|
-
} else if (!
|
|
1440
|
-
const
|
|
1441
|
-
U =
|
|
1437
|
+
if (X && le.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1438
|
+
const ae = F.filter((re) => re.fixed === "left").indexOf(Y);
|
|
1439
|
+
U = ye[ae];
|
|
1440
|
+
} else if (Z && le.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1441
|
+
const ae = F.filter((re) => re.fixed === "right").indexOf(Y);
|
|
1442
|
+
U = ye[ae];
|
|
1443
|
+
} else if (!X && !Z && le.closest(".vxe-table--body-wrapper")) {
|
|
1444
|
+
const ve = l.searchForm.showCheckBox ? 1 : 0, ae = F.filter((Me) => Me.fixed === "left").length, re = J - ae;
|
|
1445
|
+
U = ye[re + ve];
|
|
1442
1446
|
}
|
|
1443
1447
|
if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
|
|
1444
|
-
U.classList.add("cell-selected"),
|
|
1448
|
+
U.classList.add("cell-selected"), H === G && U.classList.add("cell-border-top"), H === q && U.classList.add("cell-border-bottom"), J === se && U.classList.add("cell-border-left"), J === P && U.classList.add("cell-border-right");
|
|
1445
1449
|
break;
|
|
1446
1450
|
}
|
|
1447
1451
|
}
|
|
1448
1452
|
});
|
|
1449
1453
|
});
|
|
1450
1454
|
}, Ct = async () => {
|
|
1451
|
-
if (
|
|
1455
|
+
if (_.selectedCells.length === 0)
|
|
1452
1456
|
return;
|
|
1453
1457
|
const d = f.value;
|
|
1454
1458
|
if (!d)
|
|
1455
1459
|
return;
|
|
1456
|
-
const u = d.$el,
|
|
1457
|
-
(P,
|
|
1458
|
-
),
|
|
1459
|
-
(P,
|
|
1460
|
-
),
|
|
1460
|
+
const u = d.$el, F = d.getColumns(), T = [...new Set(_.selectedCells.map((P) => P.rowIndex))].sort(
|
|
1461
|
+
(P, L) => P - L
|
|
1462
|
+
), B = [...new Set(_.selectedCells.map((P) => P.colIndex))].sort(
|
|
1463
|
+
(P, L) => P - L
|
|
1464
|
+
), G = [
|
|
1461
1465
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1462
1466
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1463
1467
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1464
|
-
].filter(Boolean),
|
|
1465
|
-
|
|
1466
|
-
const
|
|
1467
|
-
|
|
1468
|
-
const
|
|
1469
|
-
if (!
|
|
1470
|
-
|
|
1468
|
+
].filter(Boolean), q = [];
|
|
1469
|
+
T.forEach((P) => {
|
|
1470
|
+
const L = [];
|
|
1471
|
+
B.forEach((H) => {
|
|
1472
|
+
const J = F[H];
|
|
1473
|
+
if (!J) {
|
|
1474
|
+
L.push("");
|
|
1471
1475
|
return;
|
|
1472
1476
|
}
|
|
1473
|
-
const
|
|
1474
|
-
let
|
|
1475
|
-
for (const
|
|
1476
|
-
const
|
|
1477
|
-
if (
|
|
1477
|
+
const Y = J.fixed === "left", X = J.fixed === "right";
|
|
1478
|
+
let Z = "";
|
|
1479
|
+
for (const le of G) {
|
|
1480
|
+
const $e = le.querySelectorAll(".vxe-body--row")[P];
|
|
1481
|
+
if (!$e)
|
|
1478
1482
|
continue;
|
|
1479
|
-
const
|
|
1483
|
+
const ye = Array.from($e.querySelectorAll(".vxe-body--column"));
|
|
1480
1484
|
let U = null;
|
|
1481
|
-
if (
|
|
1482
|
-
const
|
|
1483
|
-
U =
|
|
1484
|
-
} else if (
|
|
1485
|
-
const
|
|
1486
|
-
U =
|
|
1487
|
-
} else if (!
|
|
1488
|
-
const
|
|
1489
|
-
U =
|
|
1485
|
+
if (Y && le.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1486
|
+
const ae = F.filter((re) => re.fixed === "left").indexOf(J);
|
|
1487
|
+
U = ye[ae];
|
|
1488
|
+
} else if (X && le.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1489
|
+
const ae = F.filter((re) => re.fixed === "right").indexOf(J);
|
|
1490
|
+
U = ye[ae];
|
|
1491
|
+
} else if (!Y && !X && le.closest(".vxe-table--body-wrapper")) {
|
|
1492
|
+
const ve = l.searchForm.showCheckBox ? 1 : 0, ae = F.filter((Me) => Me.fixed === "left").length, re = H - ae;
|
|
1493
|
+
U = ye[re + ve];
|
|
1490
1494
|
}
|
|
1491
1495
|
if (U && !U.classList.contains("col--checkbox") && !U.classList.contains("col--seq")) {
|
|
1492
|
-
|
|
1496
|
+
Z = U.innerText || U.textContent || "", Z = Z.trim(), Z = Z.replace(/\n/g, " ").replace(/\s+/g, " ");
|
|
1493
1497
|
break;
|
|
1494
1498
|
}
|
|
1495
1499
|
}
|
|
1496
|
-
|
|
1497
|
-
}),
|
|
1500
|
+
L.push(Z);
|
|
1501
|
+
}), q.push(L.join(" "));
|
|
1498
1502
|
});
|
|
1499
|
-
const se =
|
|
1503
|
+
const se = q.join(`
|
|
1500
1504
|
`);
|
|
1501
1505
|
try {
|
|
1502
1506
|
await navigator.clipboard.writeText(se);
|
|
1503
1507
|
} catch (P) {
|
|
1504
1508
|
console.error("复制失败:", P);
|
|
1505
1509
|
}
|
|
1506
|
-
},
|
|
1507
|
-
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ?
|
|
1508
|
-
},
|
|
1509
|
-
|
|
1510
|
-
},
|
|
1510
|
+
}, De = (d) => {
|
|
1511
|
+
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? _.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), Ct()) : d.key === "Escape" && fe());
|
|
1512
|
+
}, Ne = () => {
|
|
1513
|
+
_.isSelecting = !1;
|
|
1514
|
+
}, We = (d) => {
|
|
1511
1515
|
const u = f.value;
|
|
1512
1516
|
if (!u || !u.$el)
|
|
1513
1517
|
return;
|
|
1514
|
-
u.$el.contains(d.target) ||
|
|
1518
|
+
u.$el.contains(d.target) || fe();
|
|
1515
1519
|
}, xt = (d) => {
|
|
1516
|
-
h[
|
|
1520
|
+
h[p] = d, I();
|
|
1517
1521
|
}, kt = (d) => {
|
|
1518
|
-
h[
|
|
1522
|
+
h[y] = d, h[p] = 1, I();
|
|
1519
1523
|
};
|
|
1520
|
-
function
|
|
1524
|
+
function Ze() {
|
|
1521
1525
|
const d = f.value.getCheckboxRecords();
|
|
1522
1526
|
l.searchForm.selections = d;
|
|
1523
1527
|
}
|
|
1524
|
-
const
|
|
1528
|
+
const Ge = (d) => {
|
|
1525
1529
|
const u = f.value;
|
|
1526
1530
|
if (u) {
|
|
1527
1531
|
u.toggleCheckboxRow(d);
|
|
1528
|
-
const
|
|
1529
|
-
l.searchForm.selections =
|
|
1532
|
+
const F = f.value.getCheckboxRecords();
|
|
1533
|
+
l.searchForm.selections = F;
|
|
1530
1534
|
}
|
|
1531
1535
|
};
|
|
1532
|
-
return t({ tableRef: f, getList:
|
|
1536
|
+
return t({ tableRef: f, getList: I, getPrm: $, clearSort: ee, calculateTableHeight: w }), (d, u) => {
|
|
1533
1537
|
var P;
|
|
1534
|
-
const
|
|
1535
|
-
return
|
|
1536
|
-
class:
|
|
1538
|
+
const F = O("el-button"), T = O("el-checkbox"), B = O("el-text"), G = O("vxe-column"), q = O("VxeTable"), se = O("el-pagination");
|
|
1539
|
+
return E(), ce("div", {
|
|
1540
|
+
class: it({ box: e.searchForm.showShadow })
|
|
1537
1541
|
}, [
|
|
1538
|
-
e.searchForm.showSearch ? (
|
|
1542
|
+
e.searchForm.showSearch ? (E(), W(kn, {
|
|
1539
1543
|
key: 0,
|
|
1540
1544
|
form: e.searchForm,
|
|
1541
|
-
onReset:
|
|
1542
|
-
onConfirm: u[1] || (u[1] = (
|
|
1543
|
-
onVisibleChange:
|
|
1545
|
+
onReset: A,
|
|
1546
|
+
onConfirm: u[1] || (u[1] = (L) => I()),
|
|
1547
|
+
onVisibleChange: N(w)
|
|
1544
1548
|
}, {
|
|
1545
|
-
btn:
|
|
1546
|
-
u[3] || (u[3] =
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
+
btn: D(() => [
|
|
1550
|
+
u[3] || (u[3] = ie("span", { class: "mgr10" }, null, -1)),
|
|
1551
|
+
Q(d.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1552
|
+
z(F, {
|
|
1549
1553
|
class: "mgl10",
|
|
1550
1554
|
round: "",
|
|
1551
|
-
onClick: u[0] || (u[0] = (
|
|
1555
|
+
onClick: u[0] || (u[0] = (L) => f.value.openCustom())
|
|
1552
1556
|
}, {
|
|
1553
|
-
default:
|
|
1554
|
-
|
|
1557
|
+
default: D(() => [
|
|
1558
|
+
z(vt, { name: "Tools" })
|
|
1555
1559
|
]),
|
|
1556
1560
|
_: 1
|
|
1557
1561
|
})
|
|
1558
1562
|
]),
|
|
1559
1563
|
_: 3
|
|
1560
|
-
}, 8, ["form", "onVisibleChange"])) :
|
|
1561
|
-
|
|
1562
|
-
|
|
1564
|
+
}, 8, ["form", "onVisibleChange"])) : me("", !0),
|
|
1565
|
+
Q(d.$slots, "table-header-left", {}, void 0, !0),
|
|
1566
|
+
ie("div", {
|
|
1563
1567
|
ref_key: "tableContentRef",
|
|
1564
1568
|
ref: c
|
|
1565
1569
|
}, [
|
|
1566
|
-
|
|
1570
|
+
z(q, de({
|
|
1567
1571
|
id: g.value,
|
|
1568
1572
|
ref_key: "tableRef",
|
|
1569
1573
|
ref: f,
|
|
1570
|
-
loading: e.loading ||
|
|
1574
|
+
loading: e.loading || s.value,
|
|
1571
1575
|
data: e.api ? i.value : e.data,
|
|
1572
1576
|
border: ""
|
|
1573
|
-
},
|
|
1577
|
+
}, R.value, {
|
|
1574
1578
|
height: S.value,
|
|
1575
|
-
onCheckboxChange:
|
|
1576
|
-
onCheckboxAll:
|
|
1577
|
-
onSortChange: (P =
|
|
1579
|
+
onCheckboxChange: Ze,
|
|
1580
|
+
onCheckboxAll: Ze,
|
|
1581
|
+
onSortChange: (P = R.value["sort-config"]) == null ? void 0 : P.sortChange
|
|
1578
1582
|
}), {
|
|
1579
|
-
default:
|
|
1580
|
-
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (
|
|
1583
|
+
default: D(() => [
|
|
1584
|
+
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (E(), W(G, {
|
|
1581
1585
|
key: 0,
|
|
1582
1586
|
type: "checkbox",
|
|
1583
|
-
width:
|
|
1587
|
+
width: N(a) == "zh_cn" ? 80 : 150,
|
|
1584
1588
|
title: d.$t("xu-hao"),
|
|
1585
1589
|
fixed: "left"
|
|
1586
1590
|
}, {
|
|
1587
|
-
checkbox:
|
|
1588
|
-
|
|
1589
|
-
|
|
1591
|
+
checkbox: D(({ rowIndex: L, row: H, checked: J, disabled: Y, indeterminate: X }) => [
|
|
1592
|
+
ie("div", $n, [
|
|
1593
|
+
J ? (E(), W(T, {
|
|
1590
1594
|
key: 0,
|
|
1591
1595
|
checked: !0,
|
|
1592
|
-
disabled:
|
|
1596
|
+
disabled: Y,
|
|
1593
1597
|
size: "default",
|
|
1594
|
-
onClick:
|
|
1595
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1598
|
+
onClick: qe((Z) => !Y && Ge(H), ["stop"])
|
|
1599
|
+
}, null, 8, ["disabled", "onClick"])) : (E(), W(T, {
|
|
1596
1600
|
key: 1,
|
|
1597
|
-
disabled:
|
|
1601
|
+
disabled: Y,
|
|
1598
1602
|
checked: !1,
|
|
1599
1603
|
size: "default",
|
|
1600
|
-
onClick:
|
|
1604
|
+
onClick: qe((Z) => !Y && Ge(H), ["stop"])
|
|
1601
1605
|
}, null, 8, ["disabled", "onClick"])),
|
|
1602
|
-
|
|
1606
|
+
z(B, {
|
|
1603
1607
|
type: "info",
|
|
1604
1608
|
class: "mgl5"
|
|
1605
1609
|
}, {
|
|
1606
|
-
default:
|
|
1607
|
-
ne(te(
|
|
1610
|
+
default: D(() => [
|
|
1611
|
+
ne(te(L + 1), 1)
|
|
1608
1612
|
]),
|
|
1609
1613
|
_: 2
|
|
1610
1614
|
}, 1024)
|
|
1611
1615
|
])
|
|
1612
1616
|
]),
|
|
1613
1617
|
_: 1
|
|
1614
|
-
}, 8, ["width", "title"])) :
|
|
1615
|
-
|
|
1618
|
+
}, 8, ["width", "title"])) : me("", !0),
|
|
1619
|
+
Q(d.$slots, "default", {}, void 0, !0)
|
|
1616
1620
|
]),
|
|
1617
1621
|
_: 3
|
|
1618
1622
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1619
1623
|
], 512),
|
|
1620
|
-
e.searchForm.showPage ? (
|
|
1624
|
+
e.searchForm.showPage ? (E(), W(se, {
|
|
1621
1625
|
key: 1,
|
|
1622
|
-
"current-page": h[
|
|
1623
|
-
"onUpdate:currentPage": u[2] || (u[2] = (
|
|
1626
|
+
"current-page": h[N(p)],
|
|
1627
|
+
"onUpdate:currentPage": u[2] || (u[2] = (L) => h[N(p)] = L),
|
|
1624
1628
|
class: "myPagination mgt10",
|
|
1625
1629
|
background: "",
|
|
1626
1630
|
layout: "total, sizes, prev, pager, next",
|
|
1627
1631
|
total: h.total,
|
|
1628
|
-
"page-size": h[
|
|
1629
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1632
|
+
"page-size": h[N(y)],
|
|
1633
|
+
"page-sizes": e.searchForm.pageSizes || N(o).pageSizes,
|
|
1630
1634
|
onCurrentChange: xt,
|
|
1631
1635
|
onSizeChange: kt
|
|
1632
|
-
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) :
|
|
1636
|
+
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : me("", !0)
|
|
1633
1637
|
], 2);
|
|
1634
1638
|
};
|
|
1635
1639
|
}
|
|
1636
|
-
},
|
|
1640
|
+
}, io = /* @__PURE__ */ ke(Sn, [["__scopeId", "data-v-c022c16d"]]), co = {
|
|
1637
1641
|
__name: "index",
|
|
1638
1642
|
props: {
|
|
1639
1643
|
sheetsConfig: {
|
|
@@ -1650,14 +1654,14 @@ const $n = { class: "center" }, Sn = {
|
|
|
1650
1654
|
function n() {
|
|
1651
1655
|
ln(t.fileName, t.sheetsConfig);
|
|
1652
1656
|
}
|
|
1653
|
-
return (a,
|
|
1654
|
-
const o =
|
|
1655
|
-
return
|
|
1657
|
+
return (a, r) => {
|
|
1658
|
+
const o = O("el-link");
|
|
1659
|
+
return E(), W(o, de({
|
|
1656
1660
|
type: "primary",
|
|
1657
1661
|
underline: "never"
|
|
1658
1662
|
}, a.$attrs, { onClick: n }), {
|
|
1659
|
-
default:
|
|
1660
|
-
|
|
1663
|
+
default: D(() => [
|
|
1664
|
+
Q(a.$slots, "default", {}, () => [
|
|
1661
1665
|
ne(te(a.$t("xia-zai-dao-ru-mo-ban")), 1)
|
|
1662
1666
|
])
|
|
1663
1667
|
]),
|
|
@@ -1665,25 +1669,25 @@ const $n = { class: "center" }, Sn = {
|
|
|
1665
1669
|
}, 16);
|
|
1666
1670
|
};
|
|
1667
1671
|
}
|
|
1668
|
-
},
|
|
1672
|
+
}, Fn = {
|
|
1669
1673
|
mounted(e, t) {
|
|
1670
|
-
t.value &&
|
|
1674
|
+
t.value && tt(e);
|
|
1671
1675
|
},
|
|
1672
1676
|
updated(e, t) {
|
|
1673
|
-
t.value ?
|
|
1677
|
+
t.value ? tt(e) : nt(e);
|
|
1674
1678
|
},
|
|
1675
1679
|
beforeUnmount(e) {
|
|
1676
|
-
|
|
1680
|
+
nt(e);
|
|
1677
1681
|
}
|
|
1678
1682
|
};
|
|
1679
|
-
async function
|
|
1680
|
-
await
|
|
1683
|
+
async function tt(e) {
|
|
1684
|
+
await y();
|
|
1681
1685
|
const t = e.querySelector(".el-dialog");
|
|
1682
1686
|
if (!t)
|
|
1683
1687
|
return;
|
|
1684
1688
|
const n = e.querySelector(".el-dialog__header"), a = e.querySelector(".el-overlay");
|
|
1685
1689
|
a.style.cssText += "overflow: hidden;", n.style.cursor = "move";
|
|
1686
|
-
let
|
|
1690
|
+
let r = !1, o = {
|
|
1687
1691
|
// 数据源,不变部分为:window信息、dialog信息、mouse初始值信息,可变部分为:拖拽坐标位移
|
|
1688
1692
|
window: {
|
|
1689
1693
|
// window信息
|
|
@@ -1709,11 +1713,11 @@ async function et(e) {
|
|
|
1709
1713
|
y: 0
|
|
1710
1714
|
}
|
|
1711
1715
|
};
|
|
1712
|
-
n.addEventListener("mousedown", i), document.addEventListener("mousemove", g), document.addEventListener("mouseup", m), window.addEventListener("resize",
|
|
1716
|
+
n.addEventListener("mousedown", i), document.addEventListener("mousemove", g), document.addEventListener("mouseup", m), window.addEventListener("resize", p);
|
|
1713
1717
|
function l() {
|
|
1714
|
-
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height),
|
|
1718
|
+
o.mouse.x - o.drag.x >= o.dialog.x && (o.drag.x = o.mouse.x - o.dialog.x), o.drag.x - o.mouse.x >= o.window.width - (o.dialog.x + o.dialog.width) && (o.drag.x = o.mouse.x + o.window.width - o.dialog.x - o.dialog.width), o.mouse.y - o.drag.y >= o.dialog.y && (o.drag.y = o.mouse.y - o.dialog.y), o.drag.y - o.mouse.y >= o.window.height - (o.dialog.y + o.dialog.height) && (o.drag.y = o.mouse.y + o.window.height - o.dialog.y - o.dialog.height), s();
|
|
1715
1719
|
}
|
|
1716
|
-
function
|
|
1720
|
+
function s() {
|
|
1717
1721
|
let h = o.drag.y - o.mouse.y + o.dialog.y, f = o.drag.x - o.mouse.x + o.dialog.x;
|
|
1718
1722
|
t.style.cssText += `position: absolute; top: calc(${h}px - ${o.dialog.marginTop}); left: ${f}px;`;
|
|
1719
1723
|
}
|
|
@@ -1724,35 +1728,35 @@ async function et(e) {
|
|
|
1724
1728
|
}, o.dialog = t.getBoundingClientRect(), o.dialog.marginTop = window.getComputedStyle(t).marginTop, o.mouse = {
|
|
1725
1729
|
x: h.clientX,
|
|
1726
1730
|
y: h.clientY
|
|
1727
|
-
},
|
|
1731
|
+
}, r = !0);
|
|
1728
1732
|
}
|
|
1729
1733
|
function g(h) {
|
|
1730
|
-
|
|
1734
|
+
r && (o.drag = {
|
|
1731
1735
|
x: h.clientX,
|
|
1732
1736
|
y: h.clientY
|
|
1733
1737
|
}, a.style.userSelect = "none", l());
|
|
1734
1738
|
}
|
|
1735
1739
|
function m(h) {
|
|
1736
|
-
a.style.userSelect = "auto",
|
|
1740
|
+
a.style.userSelect = "auto", r = !1;
|
|
1737
1741
|
}
|
|
1738
|
-
function
|
|
1742
|
+
function p(h) {
|
|
1739
1743
|
}
|
|
1740
|
-
function
|
|
1744
|
+
function y() {
|
|
1741
1745
|
return new Promise((h, f) => {
|
|
1742
1746
|
setTimeout(() => {
|
|
1743
1747
|
h();
|
|
1744
1748
|
}, 500);
|
|
1745
1749
|
});
|
|
1746
1750
|
}
|
|
1747
|
-
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = g, e.__sizeChange__ =
|
|
1751
|
+
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = g, e.__sizeChange__ = p;
|
|
1748
1752
|
}
|
|
1749
|
-
function
|
|
1753
|
+
function nt(e) {
|
|
1750
1754
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1751
1755
|
}
|
|
1752
|
-
const
|
|
1756
|
+
const Ln = {
|
|
1753
1757
|
key: 0,
|
|
1754
1758
|
class: "drawer-btn"
|
|
1755
|
-
}, En = { key: 1 },
|
|
1759
|
+
}, En = { key: 1 }, uo = {
|
|
1756
1760
|
__name: "index",
|
|
1757
1761
|
props: {
|
|
1758
1762
|
layer: {
|
|
@@ -1772,23 +1776,23 @@ const Fn = {
|
|
|
1772
1776
|
},
|
|
1773
1777
|
emits: ["confirm"],
|
|
1774
1778
|
setup(e, { emit: t }) {
|
|
1775
|
-
const n = e, a = t, { t:
|
|
1779
|
+
const n = e, a = t, { t: r } = we(), o = Be(() => {
|
|
1776
1780
|
a("confirm");
|
|
1777
1781
|
}, 300);
|
|
1778
1782
|
async function l() {
|
|
1779
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : n.layer.closeConfirm ? await
|
|
1780
|
-
confirmButtonText:
|
|
1781
|
-
cancelButtonText:
|
|
1783
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : n.layer.closeConfirm ? await Lt.confirm(r("que-ding-guan-bi-ma"), {
|
|
1784
|
+
confirmButtonText: r("que-ding"),
|
|
1785
|
+
cancelButtonText: r("qu-xiao"),
|
|
1782
1786
|
type: "warning"
|
|
1783
1787
|
}).catch(() => {
|
|
1784
1788
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1785
1789
|
}
|
|
1786
|
-
return (
|
|
1787
|
-
const g =
|
|
1788
|
-
return e.layer.type ? (
|
|
1790
|
+
return (s, i) => {
|
|
1791
|
+
const g = O("el-button"), m = O("el-drawer"), p = O("el-dialog");
|
|
1792
|
+
return e.layer.type ? (E(), W(m, {
|
|
1789
1793
|
key: 0,
|
|
1790
1794
|
modelValue: e.layer.show,
|
|
1791
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1795
|
+
"onUpdate:modelValue": i[0] || (i[0] = (y) => e.layer.show = y),
|
|
1792
1796
|
size: e.layer.width || "100%",
|
|
1793
1797
|
title: e.layer.title,
|
|
1794
1798
|
direction: "rtl",
|
|
@@ -1796,61 +1800,61 @@ const Fn = {
|
|
|
1796
1800
|
"before-close": l,
|
|
1797
1801
|
class: "drawer-content"
|
|
1798
1802
|
}, {
|
|
1799
|
-
default:
|
|
1800
|
-
|
|
1801
|
-
i[2] || (i[2] =
|
|
1802
|
-
e.layer.showButton ? (
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
default:
|
|
1806
|
-
ne(te(
|
|
1803
|
+
default: D(() => [
|
|
1804
|
+
Q(s.$slots, "default"),
|
|
1805
|
+
i[2] || (i[2] = ie("p", { class: "mgt50" }, null, -1)),
|
|
1806
|
+
e.layer.showButton ? (E(), ce("div", Ln, [
|
|
1807
|
+
Q(s.$slots, "btn", {}, () => [
|
|
1808
|
+
z(g, { onClick: l }, {
|
|
1809
|
+
default: D(() => [
|
|
1810
|
+
ne(te(s.$t("qu-xiao")), 1)
|
|
1807
1811
|
]),
|
|
1808
1812
|
_: 1
|
|
1809
1813
|
}),
|
|
1810
|
-
|
|
1814
|
+
z(g, {
|
|
1811
1815
|
type: "primary",
|
|
1812
1816
|
loading: e.loading,
|
|
1813
|
-
onClick:
|
|
1817
|
+
onClick: N(o)
|
|
1814
1818
|
}, {
|
|
1815
|
-
default:
|
|
1816
|
-
ne(te(
|
|
1819
|
+
default: D(() => [
|
|
1820
|
+
ne(te(s.$t("ti-jiao")), 1)
|
|
1817
1821
|
]),
|
|
1818
1822
|
_: 1
|
|
1819
1823
|
}, 8, ["loading", "onClick"])
|
|
1820
1824
|
])
|
|
1821
|
-
])) :
|
|
1825
|
+
])) : me("", !0)
|
|
1822
1826
|
]),
|
|
1823
1827
|
_: 3
|
|
1824
|
-
}, 8, ["modelValue", "size", "title"])) : qt((
|
|
1825
|
-
|
|
1828
|
+
}, 8, ["modelValue", "size", "title"])) : qt((E(), ce("div", En, [
|
|
1829
|
+
z(p, {
|
|
1826
1830
|
"close-on-click-modal": !1,
|
|
1827
1831
|
modelValue: e.layer.show,
|
|
1828
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1832
|
+
"onUpdate:modelValue": i[1] || (i[1] = (y) => e.layer.show = y),
|
|
1829
1833
|
title: e.layer.title,
|
|
1830
1834
|
width: e.layer.width || 500,
|
|
1831
1835
|
center: ""
|
|
1832
|
-
},
|
|
1833
|
-
default:
|
|
1834
|
-
|
|
1836
|
+
}, at({
|
|
1837
|
+
default: D(() => [
|
|
1838
|
+
Q(s.$slots, "default")
|
|
1835
1839
|
]),
|
|
1836
1840
|
_: 2
|
|
1837
1841
|
}, [
|
|
1838
1842
|
e.layer.showButton ? {
|
|
1839
1843
|
name: "footer",
|
|
1840
|
-
fn:
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
default:
|
|
1844
|
-
ne(te(
|
|
1844
|
+
fn: D(() => [
|
|
1845
|
+
Q(s.$slots, "btn", {}, () => [
|
|
1846
|
+
z(g, { onClick: l }, {
|
|
1847
|
+
default: D(() => [
|
|
1848
|
+
ne(te(s.$t("qu-xiao")), 1)
|
|
1845
1849
|
]),
|
|
1846
1850
|
_: 1
|
|
1847
1851
|
}),
|
|
1848
|
-
|
|
1852
|
+
z(g, {
|
|
1849
1853
|
type: "primary",
|
|
1850
|
-
onClick:
|
|
1854
|
+
onClick: N(o)
|
|
1851
1855
|
}, {
|
|
1852
|
-
default:
|
|
1853
|
-
ne(te(
|
|
1856
|
+
default: D(() => [
|
|
1857
|
+
ne(te(s.$t("ti-jiao")), 1)
|
|
1854
1858
|
]),
|
|
1855
1859
|
_: 1
|
|
1856
1860
|
}, 8, ["onClick"])
|
|
@@ -1860,30 +1864,30 @@ const Fn = {
|
|
|
1860
1864
|
} : void 0
|
|
1861
1865
|
]), 1032, ["modelValue", "title", "width"])
|
|
1862
1866
|
])), [
|
|
1863
|
-
[
|
|
1867
|
+
[N(Fn), e.layer.show]
|
|
1864
1868
|
]);
|
|
1865
1869
|
};
|
|
1866
1870
|
}
|
|
1867
1871
|
};
|
|
1868
|
-
function
|
|
1869
|
-
const n =
|
|
1872
|
+
function fo(e, t = {}) {
|
|
1873
|
+
const n = xe(), a = {
|
|
1870
1874
|
inForm: !0,
|
|
1871
1875
|
required: !0,
|
|
1872
1876
|
...t
|
|
1873
|
-
},
|
|
1877
|
+
}, r = {
|
|
1874
1878
|
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}$/,
|
|
1875
1879
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1876
1880
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1877
|
-
}[e], { inForm: o, value: l, required:
|
|
1878
|
-
return o ? function(g, m,
|
|
1879
|
-
if (
|
|
1880
|
-
|
|
1881
|
+
}[e], { inForm: o, value: l, required: s, msg: i = n("validate.invalidInput") } = a;
|
|
1882
|
+
return o ? function(g, m, p) {
|
|
1883
|
+
if (s) {
|
|
1884
|
+
r.test(m) ? p() : p(new Error(i));
|
|
1881
1885
|
return;
|
|
1882
1886
|
}
|
|
1883
|
-
m && !
|
|
1884
|
-
} :
|
|
1887
|
+
m && !r.test(m) ? p(new Error(i)) : p();
|
|
1888
|
+
} : r.test(l);
|
|
1885
1889
|
}
|
|
1886
|
-
class
|
|
1890
|
+
class ho {
|
|
1887
1891
|
constructor(t = {}) {
|
|
1888
1892
|
this.config = {
|
|
1889
1893
|
clientCode: t.clientCode || "one-portal",
|
|
@@ -2030,10 +2034,10 @@ class io {
|
|
|
2030
2034
|
};
|
|
2031
2035
|
a.headers.appId = this.config.clientCode, this.token && (a.headers.Authorization = `Bearer ${this.token}`);
|
|
2032
2036
|
try {
|
|
2033
|
-
const
|
|
2034
|
-
return
|
|
2035
|
-
} catch (
|
|
2036
|
-
throw this.log("请求失败:",
|
|
2037
|
+
const r = await fetch(t, a);
|
|
2038
|
+
return r.status === 401 ? (this.log("Token已过期,需要重新登录"), this.logout(), null) : r;
|
|
2039
|
+
} catch (r) {
|
|
2040
|
+
throw this.log("请求失败:", r), r;
|
|
2037
2041
|
}
|
|
2038
2042
|
}
|
|
2039
2043
|
/**
|
|
@@ -2089,80 +2093,80 @@ class io {
|
|
|
2089
2093
|
return this.config[t];
|
|
2090
2094
|
}
|
|
2091
2095
|
}
|
|
2092
|
-
function
|
|
2096
|
+
function He(e, t = 2, n = ".", a = ",") {
|
|
2093
2097
|
(e == null || e === "") && (e = 0);
|
|
2094
|
-
const
|
|
2095
|
-
isNaN(
|
|
2098
|
+
const r = Number(e);
|
|
2099
|
+
isNaN(r) ? e = 0 : e = r, t = Math.max(0, Math.floor(t));
|
|
2096
2100
|
const l = e.toFixed(t).split(".");
|
|
2097
|
-
let
|
|
2098
|
-
const i = l[1], g =
|
|
2099
|
-
return g && (
|
|
2101
|
+
let s = l[0];
|
|
2102
|
+
const i = l[1], g = s.startsWith("-");
|
|
2103
|
+
return g && (s = s.slice(1)), s = s.replace(/\B(?=(\d{3})+(?!\d))/g, a), g && (s = "-" + s), t > 0 ? s + n + i : s;
|
|
2100
2104
|
}
|
|
2101
|
-
function
|
|
2102
|
-
return
|
|
2105
|
+
function In(e, t = 2) {
|
|
2106
|
+
return He(e, t);
|
|
2103
2107
|
}
|
|
2104
|
-
function
|
|
2108
|
+
function Tn(e, t = 2) {
|
|
2105
2109
|
(e == null || e === "") && (e = 0);
|
|
2106
2110
|
const n = Number(e);
|
|
2107
2111
|
isNaN(n) ? e = 0 : e = n;
|
|
2108
2112
|
const a = e * 100;
|
|
2109
|
-
return
|
|
2113
|
+
return He(a, t) + "%";
|
|
2110
2114
|
}
|
|
2111
|
-
function
|
|
2115
|
+
function mo(e, t = {}) {
|
|
2112
2116
|
const a = Object.assign({
|
|
2113
2117
|
manual: !1,
|
|
2114
2118
|
// 手动执行
|
|
2115
2119
|
log: !1,
|
|
2116
2120
|
params: null,
|
|
2117
2121
|
format: null
|
|
2118
|
-
}, t), { manual:
|
|
2119
|
-
const h =
|
|
2122
|
+
}, t), { manual: r, log: o, params: l = {}, cb: s, format: i } = a, g = j([]), m = j(!1), p = (y) => {
|
|
2123
|
+
const h = y || l;
|
|
2120
2124
|
m.value = !0, e(h).then((f) => {
|
|
2121
2125
|
const { code: c, data: v, msg: w } = f;
|
|
2122
|
-
if (
|
|
2126
|
+
if (s) {
|
|
2123
2127
|
const { records: x, rows: C } = v || {}, S = x || C ? x || C : v;
|
|
2124
|
-
g.value =
|
|
2128
|
+
g.value = Oe(S, i), s(f);
|
|
2125
2129
|
}
|
|
2126
2130
|
if (v) {
|
|
2127
2131
|
if (v.records != null || v.rows != null) {
|
|
2128
2132
|
const { records: x, rows: C, total: S = 0 } = v || {};
|
|
2129
|
-
h && h.total != null && (l.total = parseInt(S)), g.value =
|
|
2133
|
+
h && h.total != null && (l.total = parseInt(S)), g.value = Oe(x || C || [], i);
|
|
2130
2134
|
} else
|
|
2131
|
-
g.value =
|
|
2135
|
+
g.value = Oe(v, i);
|
|
2132
2136
|
o && console.log("useRequest-res", g.value);
|
|
2133
2137
|
}
|
|
2134
2138
|
}).catch((f) => {
|
|
2135
|
-
|
|
2139
|
+
s && (console.log("useRequestErr", f), s({ code: 500 }));
|
|
2136
2140
|
}).finally(() => {
|
|
2137
2141
|
m.value = !1;
|
|
2138
2142
|
});
|
|
2139
2143
|
};
|
|
2140
|
-
return
|
|
2144
|
+
return r || p(), [m, g, p];
|
|
2141
2145
|
}
|
|
2142
|
-
function
|
|
2146
|
+
function go(e) {
|
|
2143
2147
|
const t = j(e), n = j(""), a = j("");
|
|
2144
|
-
return
|
|
2145
|
-
const o =
|
|
2148
|
+
return Re(t, (r) => {
|
|
2149
|
+
const o = r || ["", ""];
|
|
2146
2150
|
n.value = o[0], a.value = o[1];
|
|
2147
2151
|
}), [t, n, a];
|
|
2148
2152
|
}
|
|
2149
|
-
function
|
|
2153
|
+
function po(e) {
|
|
2150
2154
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
2151
2155
|
}
|
|
2152
|
-
function
|
|
2156
|
+
function Oe(e, t) {
|
|
2153
2157
|
if (!t)
|
|
2154
2158
|
return e;
|
|
2155
2159
|
if (e instanceof Array)
|
|
2156
2160
|
return e.map((a) => {
|
|
2157
|
-
let
|
|
2158
|
-
return t.forEach((o) =>
|
|
2161
|
+
let r = {};
|
|
2162
|
+
return t.forEach((o) => r[o] = a[o]), r;
|
|
2159
2163
|
});
|
|
2160
2164
|
let n = {};
|
|
2161
2165
|
return t.forEach((a) => n[a] = e[a]), n;
|
|
2162
2166
|
}
|
|
2163
|
-
function
|
|
2164
|
-
const { locale: n } =
|
|
2165
|
-
return
|
|
2167
|
+
function yo(e, t = []) {
|
|
2168
|
+
const { locale: n } = we(), a = j(e());
|
|
2169
|
+
return Re(
|
|
2166
2170
|
[n, ...t],
|
|
2167
2171
|
() => {
|
|
2168
2172
|
a.value = e();
|
|
@@ -2170,42 +2174,63 @@ function go(e, t = []) {
|
|
|
2170
2174
|
{ immediate: !0 }
|
|
2171
2175
|
), a;
|
|
2172
2176
|
}
|
|
2173
|
-
function
|
|
2177
|
+
function vo(e, t = "zh_cn", n = "en_us") {
|
|
2174
2178
|
if (!e)
|
|
2175
2179
|
return "-";
|
|
2176
|
-
const a = { en_us: n, zh_cn: t }, o =
|
|
2180
|
+
const a = { en_us: n, zh_cn: t }, o = Ke().global.locale.value;
|
|
2177
2181
|
return e[a[o]] || e[t] || "-";
|
|
2178
2182
|
}
|
|
2179
|
-
function
|
|
2183
|
+
function bo(e, t) {
|
|
2180
2184
|
let n = Rt;
|
|
2181
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2185
|
+
return typeof e == "string" && e.length > 0 && (n = Ye(e).mapState), wt(t, n);
|
|
2182
2186
|
}
|
|
2183
|
-
function
|
|
2187
|
+
function wo(e, t) {
|
|
2184
2188
|
let n = Bt;
|
|
2185
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2189
|
+
return typeof e == "string" && e.length > 0 && (n = Ye(e).mapGetters), wt(t, n);
|
|
2186
2190
|
}
|
|
2187
|
-
function
|
|
2191
|
+
function Co(e, t) {
|
|
2188
2192
|
let n = Yt;
|
|
2189
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
2193
|
+
return typeof e == "string" && e.length > 0 && (n = Ye(e).mapActions), Dn(t, n);
|
|
2190
2194
|
}
|
|
2191
2195
|
function wt(e, t) {
|
|
2192
|
-
const n =
|
|
2196
|
+
const n = dt(), a = t(e), r = {};
|
|
2193
2197
|
return Object.keys(a).forEach((o) => {
|
|
2194
2198
|
const l = a[o].bind({ $store: n });
|
|
2195
|
-
|
|
2196
|
-
}),
|
|
2199
|
+
r[o] = ue(l);
|
|
2200
|
+
}), r;
|
|
2197
2201
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const n =
|
|
2202
|
+
function Dn(e, t) {
|
|
2203
|
+
const n = dt(), a = t(e), r = {};
|
|
2200
2204
|
return Object.keys(a).forEach((o) => {
|
|
2201
|
-
|
|
2202
|
-
}),
|
|
2205
|
+
r[o] = a[o].bind({ $store: n });
|
|
2206
|
+
}), r;
|
|
2203
2207
|
}
|
|
2204
|
-
function
|
|
2205
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2208
|
+
function Ie(e) {
|
|
2209
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Pt(e);
|
|
2206
2210
|
}
|
|
2207
|
-
function
|
|
2208
|
-
|
|
2211
|
+
function Mn() {
|
|
2212
|
+
he.formats.add("formatNumber", {
|
|
2213
|
+
cellFormatMethod({
|
|
2214
|
+
cellValue: e
|
|
2215
|
+
}, t = 2) {
|
|
2216
|
+
return He(e, t);
|
|
2217
|
+
}
|
|
2218
|
+
}), he.formats.add("formatMoney", {
|
|
2219
|
+
cellFormatMethod({
|
|
2220
|
+
cellValue: e
|
|
2221
|
+
}, t = 2) {
|
|
2222
|
+
return In(e, t);
|
|
2223
|
+
}
|
|
2224
|
+
}), he.formats.add("formatPercent", {
|
|
2225
|
+
cellFormatMethod({
|
|
2226
|
+
cellValue: e
|
|
2227
|
+
}, t = 2) {
|
|
2228
|
+
return Tn(e, t);
|
|
2229
|
+
}
|
|
2230
|
+
});
|
|
2231
|
+
}
|
|
2232
|
+
function zn() {
|
|
2233
|
+
he.renderer.add("Enum", {
|
|
2209
2234
|
// 默认显示模板
|
|
2210
2235
|
renderTableDefault(e, t) {
|
|
2211
2236
|
let n;
|
|
@@ -2213,21 +2238,21 @@ function wo() {
|
|
|
2213
2238
|
return "-";
|
|
2214
2239
|
const a = t.row[t.column.field];
|
|
2215
2240
|
if (e.type == "tag") {
|
|
2216
|
-
let
|
|
2217
|
-
return
|
|
2241
|
+
let r;
|
|
2242
|
+
return z(O("el-text"), {
|
|
2218
2243
|
type: e.enum.getTag(a)
|
|
2219
|
-
},
|
|
2220
|
-
default: () => [
|
|
2244
|
+
}, Ie(r = e.enum.getName(a)) ? r : {
|
|
2245
|
+
default: () => [r]
|
|
2221
2246
|
});
|
|
2222
2247
|
}
|
|
2223
|
-
return
|
|
2248
|
+
return z(O("el-text"), null, Ie(n = e.enum.getName(a)) ? n : {
|
|
2224
2249
|
default: () => [n]
|
|
2225
2250
|
});
|
|
2226
2251
|
}
|
|
2227
|
-
}),
|
|
2252
|
+
}), he.renderer.add("InputNumber", {
|
|
2228
2253
|
// 默认显示模板
|
|
2229
2254
|
renderTableDefault(e, t) {
|
|
2230
|
-
return
|
|
2255
|
+
return z(Et, de({
|
|
2231
2256
|
modelValue: t.row[t.column.field],
|
|
2232
2257
|
"onUpdate:modelValue": (n) => t.row[t.column.field] = n
|
|
2233
2258
|
}, e.props, {
|
|
@@ -2235,37 +2260,37 @@ function wo() {
|
|
|
2235
2260
|
"value-on-clear": 0
|
|
2236
2261
|
}), null);
|
|
2237
2262
|
}
|
|
2238
|
-
}),
|
|
2263
|
+
}), he.renderer.add("TrueFalse", {
|
|
2239
2264
|
// 默认显示模板
|
|
2240
2265
|
renderTableDefault(e, t) {
|
|
2241
2266
|
const {
|
|
2242
2267
|
locale: n
|
|
2243
|
-
} =
|
|
2268
|
+
} = we();
|
|
2244
2269
|
let a = n.value == "zh_cn";
|
|
2245
|
-
return
|
|
2270
|
+
return z(It, {
|
|
2246
2271
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2247
2272
|
}, {
|
|
2248
2273
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
2249
2274
|
});
|
|
2250
2275
|
}
|
|
2251
|
-
}),
|
|
2276
|
+
}), he.renderer.add("I18n", {
|
|
2252
2277
|
// 默认显示模板
|
|
2253
2278
|
renderTableDefault(e, t) {
|
|
2254
2279
|
const {
|
|
2255
2280
|
locale: n
|
|
2256
|
-
} =
|
|
2281
|
+
} = we();
|
|
2257
2282
|
let a = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2258
2283
|
return t.row[a] || t.row[t.column.field];
|
|
2259
2284
|
}
|
|
2260
|
-
}),
|
|
2285
|
+
}), he.renderer.add("Link", {
|
|
2261
2286
|
// 默认显示模板
|
|
2262
2287
|
renderTableDefault(e, t) {
|
|
2263
2288
|
let n = t.column.field;
|
|
2264
2289
|
const a = jt(), {
|
|
2265
|
-
multiple:
|
|
2290
|
+
multiple: r,
|
|
2266
2291
|
to: o,
|
|
2267
2292
|
openType: l = "system"
|
|
2268
|
-
} = e,
|
|
2293
|
+
} = e, s = t.row[n];
|
|
2269
2294
|
function i(g, m) {
|
|
2270
2295
|
l == "blank" ? window.open(g) : a.push({
|
|
2271
2296
|
path: g,
|
|
@@ -2274,73 +2299,78 @@ function wo() {
|
|
|
2274
2299
|
}
|
|
2275
2300
|
});
|
|
2276
2301
|
}
|
|
2277
|
-
if (
|
|
2278
|
-
const g = (
|
|
2279
|
-
return g.map((m,
|
|
2302
|
+
if (r) {
|
|
2303
|
+
const g = (s == null ? void 0 : s.split(",")) || [];
|
|
2304
|
+
return g.map((m, p) => z("span", null, [z(Je, {
|
|
2280
2305
|
underline: "never",
|
|
2281
2306
|
type: "primary",
|
|
2282
2307
|
onclick: () => i(l == "stystem" ? o : m, m)
|
|
2283
|
-
},
|
|
2308
|
+
}, Ie(m) ? m : {
|
|
2284
2309
|
default: () => [m]
|
|
2285
|
-
}),
|
|
2310
|
+
}), p < g.length - 1 ? "," : ""]));
|
|
2286
2311
|
}
|
|
2287
|
-
return
|
|
2312
|
+
return z(Je, {
|
|
2288
2313
|
underline: "never",
|
|
2289
2314
|
type: "primary",
|
|
2290
|
-
onclick: () => i(l == "stystem" ? o :
|
|
2291
|
-
},
|
|
2292
|
-
default: () => [
|
|
2315
|
+
onclick: () => i(l == "stystem" ? o : s, s)
|
|
2316
|
+
}, Ie(s) ? s : {
|
|
2317
|
+
default: () => [s]
|
|
2293
2318
|
});
|
|
2294
2319
|
}
|
|
2295
2320
|
});
|
|
2296
2321
|
}
|
|
2322
|
+
function xo() {
|
|
2323
|
+
Mn(), zn();
|
|
2324
|
+
}
|
|
2297
2325
|
export {
|
|
2298
2326
|
un as CmpDictionary,
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2327
|
+
vt as CmpIcon,
|
|
2328
|
+
lo as ConfrimButton,
|
|
2329
|
+
co as DownExcelTemp,
|
|
2330
|
+
ao as ImportButton,
|
|
2331
|
+
Kn as LayOutForm,
|
|
2332
|
+
uo as Layer,
|
|
2333
|
+
io as ListPage,
|
|
2334
|
+
ho as OnePortalCasSDK,
|
|
2307
2335
|
kn as SearchBar,
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2336
|
+
et as StatusMap,
|
|
2337
|
+
Zn as _toRaw,
|
|
2338
|
+
po as _typeOf,
|
|
2339
|
+
Jn as arrToStatusMap,
|
|
2340
|
+
Gn as arrayToTree,
|
|
2341
|
+
eo as checkFileSize,
|
|
2342
|
+
fo as creatValidator,
|
|
2343
|
+
no as createImportFields,
|
|
2344
|
+
to as createListPageId,
|
|
2317
2345
|
Ae as en_us,
|
|
2318
|
-
|
|
2346
|
+
Nn as exportExcel,
|
|
2319
2347
|
ln as exportExcelMuilti,
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2348
|
+
In as formatMoney,
|
|
2349
|
+
He as formatNumber,
|
|
2350
|
+
Tn as formatPercent,
|
|
2351
|
+
Ke as getI18n,
|
|
2352
|
+
xe as getI18nT,
|
|
2325
2353
|
_n as getListPageConfig,
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2354
|
+
vo as getLocaleValue,
|
|
2355
|
+
oo as getValueBykey,
|
|
2356
|
+
Hn as importExcel,
|
|
2329
2357
|
nn as importExcelMuilti,
|
|
2330
2358
|
Zt as messages,
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2359
|
+
Mn as registerVxeFormatters,
|
|
2360
|
+
xo as registerVxePlugins,
|
|
2361
|
+
zn as registerVxeRenderers,
|
|
2362
|
+
so as resetListPageConfig,
|
|
2363
|
+
ro as setListPageConfig,
|
|
2334
2364
|
Gt as setupI18n,
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2365
|
+
Wn as sleep,
|
|
2366
|
+
yt as stringToArray,
|
|
2367
|
+
Xn as stripHtmlTags,
|
|
2368
|
+
Qn as unicode2Str,
|
|
2369
|
+
Co as useActions,
|
|
2370
|
+
go as useDatePicker,
|
|
2371
|
+
wo as useGetters,
|
|
2372
|
+
yo as useI18nReState,
|
|
2373
|
+
mo as useRequest,
|
|
2374
|
+
bo as useState,
|
|
2375
|
+
Pe as zh_cn
|
|
2346
2376
|
};
|