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