joy-admin-components 0.2.50 → 0.2.51
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
|
|
1
|
+
import { ElForm as $t, ElRow as St, ElCol as Et, ElMessageBox as It, ElInputNumber as Ft, ElText as Lt, ElLink as Ge } from "element-plus";
|
|
2
|
+
import { defineComponent as ot, ref as P, onMounted as lt, h as ze, mergeModels as Je, useAttrs as Tt, useModel as Dt, computed as ce, watch as Pe, resolveComponent as O, unref as H, openBlock as L, createBlock as N, mergeProps as ue, createSlots as at, withCtx as D, createElementVNode as re, toDisplayString as ee, renderSlot as Q, createVNode as M, createTextVNode as ne, createCommentVNode as fe, createElementBlock as ie, Fragment as Oe, renderList as st, withModifiers as Ve, nextTick as we, resolveDynamicComponent as rt, withKeys as zt, normalizeStyle as Mt, normalizeClass as it, reactive as Ie, onUpdated as Ot, onUnmounted as Vt, withDirectives as qt, isVNode as At } from "vue";
|
|
3
|
+
import { saveAs as ct } from "file-saver";
|
|
4
4
|
import Le from "exceljs";
|
|
5
5
|
import $e from "dayjs";
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { debounce as Re, cloneDeep as
|
|
8
|
-
import { useRoute as
|
|
9
|
-
import { createNamespacedHelpers as Be, useStore as
|
|
6
|
+
import { createI18n as Ut, useI18n as pe } from "vue-i18n";
|
|
7
|
+
import { debounce as Re, cloneDeep as ut, isArray as Xe } from "lodash";
|
|
8
|
+
import { useRoute as jt, useRouter as Pt } from "vue-router";
|
|
9
|
+
import { createNamespacedHelpers as Be, useStore as dt, mapState as Rt, mapGetters as Bt, mapActions as Yt } from "vuex";
|
|
10
10
|
import { VxeUI as ke } from "vxe-pc-ui";
|
|
11
|
-
const qn =
|
|
11
|
+
const qn = ot({
|
|
12
12
|
name: "LayOutForm",
|
|
13
13
|
setup(e, { slots: t, attrs: n, emit: a }) {
|
|
14
14
|
const s = P(null), o = () => t.default ? t.default().filter((r) => r.type !== Symbol.for("v-cmt")).map((r) => r.type === Symbol.for("v-fgt") ? r.children : r).flat().map(
|
|
15
15
|
(r) => {
|
|
16
16
|
var i;
|
|
17
17
|
return ze(
|
|
18
|
-
|
|
18
|
+
Et,
|
|
19
19
|
{ span: ((i = r.props) == null ? void 0 : i.span) || 24 },
|
|
20
20
|
{
|
|
21
21
|
default: () => r
|
|
@@ -23,28 +23,28 @@ const qn = nt({
|
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
|
-
|
|
26
|
+
lt(() => {
|
|
27
27
|
a("ref", s.value);
|
|
28
28
|
});
|
|
29
29
|
function l() {
|
|
30
30
|
return ze(
|
|
31
|
-
|
|
31
|
+
$t,
|
|
32
32
|
{ ...n, ref: s },
|
|
33
|
-
() => ze(
|
|
33
|
+
() => ze(St, { gutter: n.gutter ?? 20 }, { default: () => o() })
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
return l;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
var
|
|
40
|
-
function
|
|
39
|
+
var ft = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
40
|
+
function ht(e) {
|
|
41
41
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var mt = { exports: {} };
|
|
44
44
|
(function(e, t) {
|
|
45
45
|
(function(n, a) {
|
|
46
46
|
e.exports = a();
|
|
47
|
-
})(
|
|
47
|
+
})(ft, function() {
|
|
48
48
|
var n = "minute", a = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
|
|
49
49
|
return function(o, l, r) {
|
|
50
50
|
var i = l.prototype;
|
|
@@ -57,9 +57,9 @@ var ht = { exports: {} };
|
|
|
57
57
|
}, i.local = function() {
|
|
58
58
|
return r(this.toDate(), { locale: this.$L, utc: !1 });
|
|
59
59
|
};
|
|
60
|
-
var
|
|
60
|
+
var v = i.parse;
|
|
61
61
|
i.parse = function(c) {
|
|
62
|
-
c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset),
|
|
62
|
+
c.utc && (this.$u = !0), this.$utils().u(c.$offset) || (this.$offset = c.$offset), v.call(this, c);
|
|
63
63
|
};
|
|
64
64
|
var m = i.init;
|
|
65
65
|
i.init = function() {
|
|
@@ -69,28 +69,28 @@ var ht = { exports: {} };
|
|
|
69
69
|
} else
|
|
70
70
|
m.call(this);
|
|
71
71
|
};
|
|
72
|
-
var
|
|
72
|
+
var b = i.utcOffset;
|
|
73
73
|
i.utcOffset = function(c, p) {
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return this.$u ? 0 :
|
|
74
|
+
var y = this.$utils().u;
|
|
75
|
+
if (y(c))
|
|
76
|
+
return this.$u ? 0 : y(this.$offset) ? b.call(this) : this.$offset;
|
|
77
77
|
if (typeof c == "string" && (c = function(V) {
|
|
78
78
|
V === void 0 && (V = "");
|
|
79
79
|
var Y = V.match(a);
|
|
80
80
|
if (!Y)
|
|
81
81
|
return null;
|
|
82
|
-
var
|
|
82
|
+
var I = ("" + Y[0]).match(s) || ["-", 0, 0], G = I[0], _ = 60 * +I[1] + +I[2];
|
|
83
83
|
return _ === 0 ? 0 : G === "+" ? _ : -_;
|
|
84
84
|
}(c), c === null))
|
|
85
85
|
return this;
|
|
86
|
-
var
|
|
87
|
-
if (
|
|
86
|
+
var w = Math.abs(c) <= 16 ? 60 * c : c;
|
|
87
|
+
if (w === 0)
|
|
88
88
|
return this.utc(p);
|
|
89
|
-
var
|
|
89
|
+
var C = this.clone();
|
|
90
90
|
if (p)
|
|
91
|
-
return
|
|
91
|
+
return C.$offset = w, C.$u = !1, C;
|
|
92
92
|
var E = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
|
-
return (
|
|
93
|
+
return (C = this.local().add(w + E, n)).$offset = w, C.$x.$localOffset = E, C;
|
|
94
94
|
};
|
|
95
95
|
var g = i.format;
|
|
96
96
|
i.format = function(c) {
|
|
@@ -111,46 +111,46 @@ var ht = { exports: {} };
|
|
|
111
111
|
return c === "s" && this.$offset ? r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : h.call(this);
|
|
112
112
|
};
|
|
113
113
|
var f = i.diff;
|
|
114
|
-
i.diff = function(c, p,
|
|
114
|
+
i.diff = function(c, p, y) {
|
|
115
115
|
if (c && this.$u === c.$u)
|
|
116
|
-
return f.call(this, c, p,
|
|
117
|
-
var
|
|
118
|
-
return f.call(
|
|
116
|
+
return f.call(this, c, p, y);
|
|
117
|
+
var w = this.local(), C = r(c).local();
|
|
118
|
+
return f.call(w, C, p, y);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
|
-
})(
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
var
|
|
122
|
+
})(mt);
|
|
123
|
+
var Kt = mt.exports;
|
|
124
|
+
const Ht = /* @__PURE__ */ ht(Kt);
|
|
125
|
+
var gt = { exports: {} };
|
|
126
126
|
(function(e, t) {
|
|
127
127
|
(function(n, a) {
|
|
128
128
|
e.exports = a();
|
|
129
|
-
})(
|
|
129
|
+
})(ft, function() {
|
|
130
130
|
var n = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, a = {};
|
|
131
131
|
return function(s, o, l) {
|
|
132
132
|
var r, i = function(g, h, f) {
|
|
133
133
|
f === void 0 && (f = {});
|
|
134
|
-
var c = new Date(g), p = function(
|
|
135
|
-
|
|
136
|
-
var
|
|
137
|
-
return V || (V = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone:
|
|
134
|
+
var c = new Date(g), p = function(y, w) {
|
|
135
|
+
w === void 0 && (w = {});
|
|
136
|
+
var C = w.timeZoneName || "short", E = y + "|" + C, V = a[E];
|
|
137
|
+
return V || (V = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: y, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[E] = V), V;
|
|
138
138
|
}(h, f);
|
|
139
139
|
return p.formatToParts(c);
|
|
140
|
-
},
|
|
140
|
+
}, v = function(g, h) {
|
|
141
141
|
for (var f = i(g, h), c = [], p = 0; p < f.length; p += 1) {
|
|
142
|
-
var
|
|
143
|
-
E >= 0 && (c[E] = parseInt(
|
|
142
|
+
var y = f[p], w = y.type, C = y.value, E = n[w];
|
|
143
|
+
E >= 0 && (c[E] = parseInt(C, 10));
|
|
144
144
|
}
|
|
145
|
-
var V = c[3], Y = V === 24 ? 0 : V,
|
|
146
|
-
return (l.utc(
|
|
145
|
+
var V = c[3], Y = V === 24 ? 0 : V, I = c[0] + "-" + c[1] + "-" + c[2] + " " + Y + ":" + c[4] + ":" + c[5] + ":000", G = +g;
|
|
146
|
+
return (l.utc(I).valueOf() - (G -= G % 1e3)) / 6e4;
|
|
147
147
|
}, m = o.prototype;
|
|
148
148
|
m.tz = function(g, h) {
|
|
149
149
|
g === void 0 && (g = r);
|
|
150
|
-
var f, c = this.utcOffset(), p = this.toDate(),
|
|
151
|
-
if (!Number(
|
|
150
|
+
var f, c = this.utcOffset(), p = this.toDate(), y = p.toLocaleString("en-US", { timeZone: g }), w = Math.round((p - new Date(y)) / 1e3 / 60), C = 15 * -Math.round(p.getTimezoneOffset() / 15) - w;
|
|
151
|
+
if (!Number(C))
|
|
152
152
|
f = this.utcOffset(0, h);
|
|
153
|
-
else if (f = l(
|
|
153
|
+
else if (f = l(y, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(C, !0), h) {
|
|
154
154
|
var E = f.utcOffset();
|
|
155
155
|
f = f.add(c - E, "minute");
|
|
156
156
|
}
|
|
@@ -161,23 +161,23 @@ var mt = { exports: {} };
|
|
|
161
161
|
});
|
|
162
162
|
return f && f.value;
|
|
163
163
|
};
|
|
164
|
-
var
|
|
164
|
+
var b = m.startOf;
|
|
165
165
|
m.startOf = function(g, h) {
|
|
166
166
|
if (!this.$x || !this.$x.$timezone)
|
|
167
|
-
return
|
|
167
|
+
return b.call(this, g, h);
|
|
168
168
|
var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
|
-
return
|
|
169
|
+
return b.call(f, g, h).tz(this.$x.$timezone, !0);
|
|
170
170
|
}, l.tz = function(g, h, f) {
|
|
171
|
-
var c = f && h, p = f || h || r,
|
|
171
|
+
var c = f && h, p = f || h || r, y = v(+l(), p);
|
|
172
172
|
if (typeof g != "string")
|
|
173
173
|
return l(g).tz(p);
|
|
174
|
-
var
|
|
175
|
-
var _ = Y - 60 *
|
|
176
|
-
if (
|
|
177
|
-
return [_,
|
|
178
|
-
var k =
|
|
179
|
-
return
|
|
180
|
-
}(l.utc(g, c).valueOf(),
|
|
174
|
+
var w = function(Y, I, G) {
|
|
175
|
+
var _ = Y - 60 * I * 1e3, x = v(_, G);
|
|
176
|
+
if (I === x)
|
|
177
|
+
return [_, I];
|
|
178
|
+
var k = v(_ -= 60 * (x - I) * 1e3, G);
|
|
179
|
+
return x === k ? [_, x] : [Y - 60 * Math.min(x, k) * 1e3, Math.max(x, k)];
|
|
180
|
+
}(l.utc(g, c).valueOf(), y, p), C = w[0], E = w[1], V = l(C).utcOffset(E);
|
|
181
181
|
return V.$x.$timezone = p, V;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
@@ -186,9 +186,9 @@ var mt = { exports: {} };
|
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
});
|
|
189
|
-
})(
|
|
190
|
-
var
|
|
191
|
-
const
|
|
189
|
+
})(gt);
|
|
190
|
+
var Nt = gt.exports;
|
|
191
|
+
const Wt = /* @__PURE__ */ ht(Nt), qe = {
|
|
192
192
|
// 组件通用文本
|
|
193
193
|
"dao-ru": "导入",
|
|
194
194
|
"quan-xuan": "全选",
|
|
@@ -258,31 +258,31 @@ const Nt = /* @__PURE__ */ ft(Ht), qe = {
|
|
|
258
258
|
tools: {
|
|
259
259
|
keysLengthError: "Keys length must be greater than 2, default first two are label and value"
|
|
260
260
|
}
|
|
261
|
-
},
|
|
261
|
+
}, Zt = {
|
|
262
262
|
zh_cn: qe,
|
|
263
263
|
en_us: Ae
|
|
264
264
|
};
|
|
265
265
|
let be = null;
|
|
266
|
-
function
|
|
266
|
+
function Gt(e = null) {
|
|
267
267
|
if (e) {
|
|
268
268
|
const { global: t } = e;
|
|
269
269
|
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn", qe) : t.setLocaleMessage("zh_cn", qe), t.messages.value.en_us ? t.mergeLocaleMessage("en_us", Ae) : t.setLocaleMessage("en_us", Ae), be = e, e;
|
|
270
270
|
}
|
|
271
|
-
return be || (be =
|
|
271
|
+
return be || (be = Ut({
|
|
272
272
|
legacy: !1,
|
|
273
273
|
locale: "zh_cn",
|
|
274
274
|
fallbackLocale: "zh_cn",
|
|
275
|
-
messages:
|
|
275
|
+
messages: Zt
|
|
276
276
|
})), be;
|
|
277
277
|
}
|
|
278
278
|
function Ye() {
|
|
279
|
-
return be ||
|
|
279
|
+
return be || Gt();
|
|
280
280
|
}
|
|
281
281
|
function Ce() {
|
|
282
282
|
return Ye().global.t;
|
|
283
283
|
}
|
|
284
|
-
$e.extend(
|
|
285
|
-
$e.extend(
|
|
284
|
+
$e.extend(Ht);
|
|
285
|
+
$e.extend(Wt);
|
|
286
286
|
async function An(e, t) {
|
|
287
287
|
const { fields: n, range: a = 1 } = t;
|
|
288
288
|
if (!n) {
|
|
@@ -294,56 +294,56 @@ async function An(e, t) {
|
|
|
294
294
|
const o = {};
|
|
295
295
|
return s.eachSheet(function(l, r) {
|
|
296
296
|
const i = [];
|
|
297
|
-
l.eachRow(function(
|
|
297
|
+
l.eachRow(function(v, m) {
|
|
298
298
|
if (m > a) {
|
|
299
|
-
let
|
|
299
|
+
let b = {}, g = !0;
|
|
300
300
|
Object.keys(n).forEach((h) => {
|
|
301
|
-
const f =
|
|
302
|
-
|
|
303
|
-
}), g || i.push(
|
|
301
|
+
const f = v.getCell(n[h]).value;
|
|
302
|
+
b[h] = f, f && (g = !1);
|
|
303
|
+
}), g || i.push(b);
|
|
304
304
|
}
|
|
305
305
|
}), o[l._name] = i;
|
|
306
306
|
}), s = null, o;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const pt = {
|
|
309
309
|
columnWidth: 30
|
|
310
310
|
};
|
|
311
311
|
async function Un(e, t, n = [], a = {}) {
|
|
312
312
|
if (!e || !t)
|
|
313
313
|
return;
|
|
314
|
-
const { columnStyle: s } = a, { columnWidth: o } =
|
|
314
|
+
const { columnStyle: s } = a, { columnWidth: o } = pt;
|
|
315
315
|
t.forEach((i) => {
|
|
316
316
|
i.width = i.width ? i.width : o;
|
|
317
317
|
});
|
|
318
|
-
const { workbook: l, worksheet: r } =
|
|
319
|
-
r.columns = t, r.addRows(n), s && await
|
|
318
|
+
const { workbook: l, worksheet: r } = Jt();
|
|
319
|
+
r.columns = t, r.addRows(n), s && await Xt(l, r, s);
|
|
320
320
|
try {
|
|
321
|
-
const i = await l.xlsx.writeBuffer(),
|
|
321
|
+
const i = await l.xlsx.writeBuffer(), v = new File([i], e, {
|
|
322
322
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
323
323
|
});
|
|
324
|
-
|
|
324
|
+
ct(v);
|
|
325
325
|
} catch (i) {
|
|
326
326
|
console.log(i);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function Jt() {
|
|
330
330
|
const e = new Le.Workbook();
|
|
331
331
|
e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date();
|
|
332
332
|
const t = e.addWorksheet("Sheet1");
|
|
333
333
|
return { workbook: e, worksheet: t };
|
|
334
334
|
}
|
|
335
|
-
async function
|
|
335
|
+
async function Xt(e, t, n) {
|
|
336
336
|
const a = Object.keys(n);
|
|
337
337
|
for (const s of a) {
|
|
338
338
|
const o = n[s], { type: l } = o;
|
|
339
339
|
switch (l) {
|
|
340
340
|
case "IMG":
|
|
341
|
-
await
|
|
341
|
+
await Qt(e, t, s);
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
async function
|
|
346
|
+
async function Qt(e, t, n, a) {
|
|
347
347
|
const s = t.getColumn(n), o = s.values;
|
|
348
348
|
t.getColumn(n).width = 20, t.eachRow((l, r) => {
|
|
349
349
|
r > 1 && (l.height = 40);
|
|
@@ -352,7 +352,7 @@ async function Xt(e, t, n, a) {
|
|
|
352
352
|
if (l < 2)
|
|
353
353
|
continue;
|
|
354
354
|
let i = o[l];
|
|
355
|
-
i && (t.getCell(s.letter + l).value = "", await
|
|
355
|
+
i && (t.getCell(s.letter + l).value = "", await en(e, t, i, {
|
|
356
356
|
width: 100,
|
|
357
357
|
height: 50,
|
|
358
358
|
col: s._number - 1,
|
|
@@ -360,11 +360,11 @@ async function Xt(e, t, n, a) {
|
|
|
360
360
|
}));
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
async function
|
|
364
|
-
const { col: s, row: o, width: l, height: r } = a, { success: i, base64:
|
|
363
|
+
async function en(e, t, n, a) {
|
|
364
|
+
const { col: s, row: o, width: l, height: r } = a, { success: i, base64: v } = await tn(n, 0.3);
|
|
365
365
|
if (i) {
|
|
366
366
|
const m = e.addImage({
|
|
367
|
-
base64:
|
|
367
|
+
base64: v,
|
|
368
368
|
extension: "jpeg"
|
|
369
369
|
});
|
|
370
370
|
t.addImage(m, {
|
|
@@ -373,7 +373,7 @@ async function Qt(e, t, n, a) {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function tn(e, t = 1) {
|
|
377
377
|
const n = new Image();
|
|
378
378
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((a, s) => {
|
|
379
379
|
n.onload = () => {
|
|
@@ -389,7 +389,7 @@ function en(e, t = 1) {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
const Ue = "---";
|
|
392
|
-
async function
|
|
392
|
+
async function nn(e, t) {
|
|
393
393
|
const { fields: n, range: a = 1 } = t;
|
|
394
394
|
if (!n) {
|
|
395
395
|
const l = Ce();
|
|
@@ -400,29 +400,29 @@ async function tn(e, t) {
|
|
|
400
400
|
const o = {};
|
|
401
401
|
return s.eachSheet(function(l, r) {
|
|
402
402
|
if (l.state == "visible") {
|
|
403
|
-
const i = [],
|
|
404
|
-
if (
|
|
405
|
-
let m = Object.values(
|
|
403
|
+
const i = [], v = n[l._name];
|
|
404
|
+
if (v) {
|
|
405
|
+
let m = Object.values(v).some((g) => g.includes("image")), b = {};
|
|
406
406
|
m && (l.getImages().forEach((h) => {
|
|
407
407
|
const { tl: f } = h.range, c = s.model.media.find((p) => p.index === h.imageId);
|
|
408
408
|
if (c) {
|
|
409
|
-
const p = c.buffer.toString("base64"),
|
|
410
|
-
|
|
409
|
+
const p = c.buffer.toString("base64"), y = `data:image/${c.extension};base64,${p}`, w = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
|
|
410
|
+
b[w] ? b[w].push(y) : b[w] = [y];
|
|
411
411
|
}
|
|
412
|
-
}), console.log("withImages-imageMap",
|
|
412
|
+
}), console.log("withImages-imageMap", b)), l.eachRow(function(g, h) {
|
|
413
413
|
if (h > a) {
|
|
414
414
|
let f = {}, c = !0;
|
|
415
|
-
Object.keys(
|
|
415
|
+
Object.keys(v).forEach((p) => {
|
|
416
416
|
var V;
|
|
417
|
-
let [
|
|
418
|
-
const
|
|
417
|
+
let [y, w] = v[p].split(Ue);
|
|
418
|
+
const C = g.getCell(y);
|
|
419
419
|
let E;
|
|
420
|
-
if (
|
|
421
|
-
const Y =
|
|
422
|
-
E =
|
|
420
|
+
if (w == "image" && m) {
|
|
421
|
+
const Y = C._column._number, I = `${h}_${Y}`;
|
|
422
|
+
E = b[I] || "";
|
|
423
423
|
} else
|
|
424
|
-
|
|
425
|
-
E &&
|
|
424
|
+
C.result != null ? E = C.result : (V = C.value) != null && V.richText ? E = C.value.richText.reduce((Y, I) => Y + I.text, "") : C.type == 4 && C.value ? E = $e(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : E = C.value;
|
|
425
|
+
E && w == "option" && (E = E.split(Ue)[1]), f[p] = E, E && (c = !1);
|
|
426
426
|
}), c || i.push(f);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
@@ -430,7 +430,7 @@ async function tn(e, t) {
|
|
|
430
430
|
}
|
|
431
431
|
}), s = null, o;
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const Qe = {
|
|
434
434
|
date: "yyyy-mm-dd",
|
|
435
435
|
number: "0",
|
|
436
436
|
string: "@"
|
|
@@ -440,35 +440,42 @@ async function on(e, t) {
|
|
|
440
440
|
return;
|
|
441
441
|
const n = ln(t);
|
|
442
442
|
for (const a of n.worksheets) {
|
|
443
|
-
const { columnWidth: s } =
|
|
443
|
+
const { columnWidth: s } = pt, o = t[a.name];
|
|
444
444
|
if (!o)
|
|
445
445
|
continue;
|
|
446
446
|
const { tableHeader: l, tableData: r } = o;
|
|
447
447
|
l.forEach((i) => {
|
|
448
|
-
const { style:
|
|
448
|
+
const { style: v = {}, required: m } = i, { font: b = {} } = v;
|
|
449
449
|
i.style = {
|
|
450
|
-
...
|
|
450
|
+
...v,
|
|
451
451
|
font: {
|
|
452
|
-
...
|
|
452
|
+
...b,
|
|
453
453
|
color: {
|
|
454
454
|
argb: m ? "FFFF0000" : void 0
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
458
|
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
459
|
-
const { header:
|
|
460
|
-
if (c.numFmt =
|
|
459
|
+
const { header: v, key: m, width: b, option: g, numFmt: h, locked: f } = i, c = a.getColumn(m);
|
|
460
|
+
if (c.numFmt = Qe[h] || h, c.width = b || s, c.protection = { locked: f === !0 }, h === "string" || Qe[h] === "@") {
|
|
461
|
+
const p = r.length || 100;
|
|
462
|
+
for (let y = 2; y <= p + 1; y++) {
|
|
463
|
+
const w = a.getCell(`${c.letter}${y}`);
|
|
464
|
+
w.value !== null && w.value !== void 0 && w.value !== "" ? w.value = `'${w.value}` : w.value = "'";
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (g) {
|
|
461
468
|
const p = n.addWorksheet(m);
|
|
462
|
-
p.state = "hidden", p.getColumn(1).values = g.map((
|
|
463
|
-
if (
|
|
464
|
-
const
|
|
465
|
-
a.getCell(`${c.letter}${
|
|
469
|
+
p.state = "hidden", p.getColumn(1).values = g.map((y) => `${y.label}${Ue}${y.value}`), Array(100).fill("").forEach((y, w) => {
|
|
470
|
+
if (w > 0) {
|
|
471
|
+
const C = Ce();
|
|
472
|
+
a.getCell(`${c.letter}${w}`).dataValidation = {
|
|
466
473
|
type: "list",
|
|
467
474
|
formulae: [`${m}!$A$1:$A$${g.length}`],
|
|
468
475
|
showErrorMessage: !0,
|
|
469
|
-
error:
|
|
476
|
+
error: C("excel.invalidInput"),
|
|
470
477
|
errorStyle: "stop",
|
|
471
|
-
errorMessage:
|
|
478
|
+
errorMessage: C("excel.invalidOption")
|
|
472
479
|
};
|
|
473
480
|
}
|
|
474
481
|
});
|
|
@@ -482,7 +489,7 @@ async function on(e, t) {
|
|
|
482
489
|
const a = await n.xlsx.writeBuffer(), s = new File([a], e, {
|
|
483
490
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
484
491
|
});
|
|
485
|
-
|
|
492
|
+
ct(s);
|
|
486
493
|
} catch (a) {
|
|
487
494
|
console.log(a);
|
|
488
495
|
}
|
|
@@ -530,10 +537,10 @@ function Rn(e) {
|
|
|
530
537
|
}
|
|
531
538
|
return t;
|
|
532
539
|
}
|
|
533
|
-
function
|
|
540
|
+
function yt(e, t = " ") {
|
|
534
541
|
return e ? e.split(t).filter((n) => n.trim()) : [];
|
|
535
542
|
}
|
|
536
|
-
class
|
|
543
|
+
class et {
|
|
537
544
|
constructor(t, n = ["label", "value", "labelEn"]) {
|
|
538
545
|
this.list = t.map((a) => ({
|
|
539
546
|
...a,
|
|
@@ -569,7 +576,7 @@ class Qe {
|
|
|
569
576
|
}
|
|
570
577
|
function Bn(e, t = [], n = "i18nName") {
|
|
571
578
|
if (e.length == 0)
|
|
572
|
-
return new
|
|
579
|
+
return new et([]);
|
|
573
580
|
if (t.length < 2) {
|
|
574
581
|
const s = Ce();
|
|
575
582
|
throw new Error(s("tools.keysLengthError"));
|
|
@@ -580,7 +587,7 @@ function Bn(e, t = [], n = "i18nName") {
|
|
|
580
587
|
r === 0 ? o.label = s[l] : r === 1 ? o.value = s[l] : o[l] = s[l];
|
|
581
588
|
}), o;
|
|
582
589
|
});
|
|
583
|
-
return new
|
|
590
|
+
return new et(a);
|
|
584
591
|
}
|
|
585
592
|
function Yn(e) {
|
|
586
593
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
@@ -650,97 +657,97 @@ const Se = (e, t) => {
|
|
|
650
657
|
}),
|
|
651
658
|
emits: /* @__PURE__ */ Je(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
652
659
|
setup(e, { emit: t }) {
|
|
653
|
-
const n = e, a =
|
|
660
|
+
const n = e, a = Tt(), { t: s, locale: o } = pe(), l = Dt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = P(""), v = ce(() => {
|
|
654
661
|
if (a.remote !== void 0)
|
|
655
662
|
return n.data;
|
|
656
|
-
const
|
|
657
|
-
if (
|
|
663
|
+
const x = yt(i.value), { data: k, labelValue: U } = n, te = k || g.value;
|
|
664
|
+
if (x.length == 0)
|
|
658
665
|
return te;
|
|
659
666
|
const { label: $, labelEn: ye } = U;
|
|
660
667
|
let z = o.value == "en_us" ? ye || "i18nName" : $;
|
|
661
|
-
return
|
|
662
|
-
(de) => de[z].toLowerCase().includes(
|
|
668
|
+
return x.length == 1 ? te.filter(
|
|
669
|
+
(de) => de[z].toLowerCase().includes(x[0].toLowerCase())
|
|
663
670
|
) : te.filter((de) => {
|
|
664
671
|
let ve = !1;
|
|
665
|
-
return ve =
|
|
672
|
+
return ve = x.some((Ee) => de[z].toLowerCase() == Ee.toLowerCase()), ve;
|
|
666
673
|
});
|
|
667
674
|
}), m = ce({
|
|
668
675
|
get() {
|
|
669
|
-
return a.multiple == null || l.value == null ? !1 : l.value.length ==
|
|
676
|
+
return a.multiple == null || l.value == null ? !1 : l.value.length == v.value.length;
|
|
670
677
|
},
|
|
671
|
-
set(
|
|
672
|
-
return
|
|
678
|
+
set(x) {
|
|
679
|
+
return x;
|
|
673
680
|
}
|
|
674
|
-
}),
|
|
675
|
-
const { data:
|
|
676
|
-
g.value = [...
|
|
681
|
+
}), b = t, g = P([]), h = async () => {
|
|
682
|
+
const { data: x } = await n.api();
|
|
683
|
+
g.value = [...x], b("success", g);
|
|
677
684
|
};
|
|
678
685
|
n.api && h();
|
|
679
|
-
function f(
|
|
680
|
-
|
|
686
|
+
function f(x) {
|
|
687
|
+
b("change", x), c.value && we(() => {
|
|
681
688
|
n.optionClick && n.optionClick(c.value), c.value = null;
|
|
682
689
|
});
|
|
683
690
|
}
|
|
684
691
|
const c = P(null);
|
|
685
|
-
function p(
|
|
686
|
-
c.value =
|
|
692
|
+
function p(x) {
|
|
693
|
+
c.value = x;
|
|
687
694
|
}
|
|
688
|
-
const
|
|
689
|
-
if (
|
|
695
|
+
const y = n.labelValue.label.split("-"), w = (x) => {
|
|
696
|
+
if (y.length == 1) {
|
|
690
697
|
if (n.changeLocal)
|
|
691
|
-
return s(
|
|
692
|
-
let k = o.value == "en_us" ?
|
|
693
|
-
return k = k ||
|
|
698
|
+
return s(x[n.labelValue.label]);
|
|
699
|
+
let k = o.value == "en_us" ? x[n.labelValue.labelEn || "i18nName"] : x[n.labelValue.label];
|
|
700
|
+
return k = k || x[n.labelValue.label], k + "";
|
|
694
701
|
} else {
|
|
695
702
|
let k = [];
|
|
696
|
-
return
|
|
697
|
-
k.push(
|
|
703
|
+
return y.forEach((U) => {
|
|
704
|
+
k.push(x[U]);
|
|
698
705
|
}), k.join("-");
|
|
699
706
|
}
|
|
700
707
|
};
|
|
701
|
-
function
|
|
708
|
+
function C(x) {
|
|
702
709
|
let k = n.data ? n.data : g.value;
|
|
703
|
-
l.value =
|
|
704
|
-
|
|
710
|
+
l.value = x ? k.map((U) => r.value ? U : U[n.labelValue.value]) : [], we(() => {
|
|
711
|
+
b("change", l.value), b("changeAll", l.value, k);
|
|
705
712
|
});
|
|
706
713
|
}
|
|
707
|
-
function E(
|
|
708
|
-
|
|
709
|
-
n.optionClick && n.optionClick(
|
|
714
|
+
function E(x) {
|
|
715
|
+
b("change", r.value ? x : x[n.labelValue.value]), we(() => {
|
|
716
|
+
n.optionClick && n.optionClick(x);
|
|
710
717
|
});
|
|
711
718
|
}
|
|
712
|
-
function V(
|
|
713
|
-
return l.value.length >= n.maxLimit && !l.value.includes(
|
|
719
|
+
function V(x) {
|
|
720
|
+
return l.value.length >= n.maxLimit && !l.value.includes(x[n.labelValue.value]);
|
|
714
721
|
}
|
|
715
|
-
function Y(
|
|
716
|
-
return
|
|
722
|
+
function Y(x) {
|
|
723
|
+
return x.map((k) => ({
|
|
717
724
|
...k,
|
|
718
|
-
label:
|
|
725
|
+
label: w(k),
|
|
719
726
|
value: r.value ? k : k[n.labelValue.value]
|
|
720
727
|
}));
|
|
721
728
|
}
|
|
722
|
-
const
|
|
723
|
-
|
|
729
|
+
const I = P([]), G = n.data ? n.data : g.value;
|
|
730
|
+
I.value = Y(G), Pe(
|
|
724
731
|
() => n.data ? n.data : g.value,
|
|
725
|
-
(
|
|
732
|
+
(x) => {
|
|
726
733
|
var U;
|
|
727
|
-
const k = Y(
|
|
728
|
-
if (k.length !==
|
|
729
|
-
|
|
734
|
+
const k = Y(x);
|
|
735
|
+
if (k.length !== I.value.length)
|
|
736
|
+
I.value = k;
|
|
730
737
|
else {
|
|
731
738
|
let te = !1;
|
|
732
739
|
for (let $ = 0; $ < k.length; $++)
|
|
733
|
-
if (k[$].value !== ((U =
|
|
740
|
+
if (k[$].value !== ((U = I.value[$]) == null ? void 0 : U.value)) {
|
|
734
741
|
te = !0;
|
|
735
742
|
break;
|
|
736
743
|
}
|
|
737
|
-
te && (
|
|
744
|
+
te && (I.value = k);
|
|
738
745
|
}
|
|
739
746
|
},
|
|
740
747
|
{ deep: !0 }
|
|
741
748
|
);
|
|
742
|
-
const _ = ce(() =>
|
|
743
|
-
return (
|
|
749
|
+
const _ = ce(() => I.value);
|
|
750
|
+
return (x, k) => {
|
|
744
751
|
const U = O("el-checkbox"), te = O("el-select-v2"), $ = O("el-option"), ye = O("el-select");
|
|
745
752
|
return H(a).v2 != null ? (L(), N(te, ue({
|
|
746
753
|
key: 0,
|
|
@@ -754,7 +761,7 @@ const Se = (e, t) => {
|
|
|
754
761
|
clearable: "",
|
|
755
762
|
onChange: f,
|
|
756
763
|
onClear: f
|
|
757
|
-
}),
|
|
764
|
+
}), at({
|
|
758
765
|
default: D(({ item: z }) => [
|
|
759
766
|
re("div", {
|
|
760
767
|
onClick: (he) => p(z)
|
|
@@ -765,15 +772,15 @@ const Se = (e, t) => {
|
|
|
765
772
|
H(a).multiple != null ? {
|
|
766
773
|
name: "header",
|
|
767
774
|
fn: D(() => [
|
|
768
|
-
Q(
|
|
775
|
+
Q(x.$slots, "header", {}, () => [
|
|
769
776
|
M(U, {
|
|
770
777
|
class: "mgl20",
|
|
771
778
|
modelValue: m.value,
|
|
772
779
|
"onUpdate:modelValue": k[0] || (k[0] = (z) => m.value = z),
|
|
773
|
-
onChange:
|
|
780
|
+
onChange: C
|
|
774
781
|
}, {
|
|
775
782
|
default: D(() => [
|
|
776
|
-
ne(ee(
|
|
783
|
+
ne(ee(x.$t("quan-xuan")), 1)
|
|
777
784
|
]),
|
|
778
785
|
_: 1
|
|
779
786
|
}, 8, ["modelValue"])
|
|
@@ -792,22 +799,22 @@ const Se = (e, t) => {
|
|
|
792
799
|
clearable: ""
|
|
793
800
|
}, H(a), { onClear: e.optionClick }), {
|
|
794
801
|
default: D(() => [
|
|
795
|
-
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? Q(
|
|
802
|
+
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? Q(x.$slots, "header", { key: 0 }, () => [
|
|
796
803
|
M(U, {
|
|
797
804
|
class: "mgl20",
|
|
798
805
|
modelValue: m.value,
|
|
799
806
|
"onUpdate:modelValue": k[2] || (k[2] = (z) => m.value = z),
|
|
800
|
-
onChange:
|
|
807
|
+
onChange: C
|
|
801
808
|
}, {
|
|
802
809
|
default: D(() => [
|
|
803
|
-
ne(ee(
|
|
810
|
+
ne(ee(x.$t("quan-xuan")), 1)
|
|
804
811
|
]),
|
|
805
812
|
_: 1
|
|
806
813
|
}, 8, ["modelValue"])
|
|
807
814
|
], !0) : fe("", !0),
|
|
808
|
-
(L(!0), ie(Oe, null,
|
|
815
|
+
(L(!0), ie(Oe, null, st(v.value, (z, he) => (L(), N($, {
|
|
809
816
|
key: he,
|
|
810
|
-
label:
|
|
817
|
+
label: w(z),
|
|
811
818
|
disabled: H(a).multiple != null && e.maxLimit > 0 ? V(z) : !1,
|
|
812
819
|
onClick: Ve((de) => E(z), ["stop"]),
|
|
813
820
|
value: r.value ? z : z[e.labelValue.value]
|
|
@@ -818,7 +825,7 @@ const Se = (e, t) => {
|
|
|
818
825
|
};
|
|
819
826
|
}
|
|
820
827
|
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-51bd1467"]]);
|
|
821
|
-
const un =
|
|
828
|
+
const un = ot({
|
|
822
829
|
props: {
|
|
823
830
|
name: {
|
|
824
831
|
tyepe: String,
|
|
@@ -830,12 +837,12 @@ function dn(e, t, n, a, s, o) {
|
|
|
830
837
|
const l = O("el-icon");
|
|
831
838
|
return L(), N(l, { class: "cmp-icon" }, {
|
|
832
839
|
default: D(() => [
|
|
833
|
-
(L(), N(
|
|
840
|
+
(L(), N(rt(e.name)))
|
|
834
841
|
]),
|
|
835
842
|
_: 1
|
|
836
843
|
});
|
|
837
844
|
}
|
|
838
|
-
const
|
|
845
|
+
const vt = /* @__PURE__ */ Se(un, [["render", dn], ["__scopeId", "data-v-733f9daa"]]), Gn = {
|
|
839
846
|
__name: "index",
|
|
840
847
|
emits: ["ok", "no"],
|
|
841
848
|
setup(e, { emit: t }) {
|
|
@@ -883,7 +890,7 @@ const fn = ["accept"], hn = {
|
|
|
883
890
|
async function o(l) {
|
|
884
891
|
s.value = !0;
|
|
885
892
|
let r = l.target.files[0];
|
|
886
|
-
const i = await
|
|
893
|
+
const i = await nn(r, n.fields).catch(() => {
|
|
887
894
|
s.value = !1;
|
|
888
895
|
}).finally(() => {
|
|
889
896
|
a.value.value = null;
|
|
@@ -899,7 +906,7 @@ const fn = ["accept"], hn = {
|
|
|
899
906
|
type: "primary",
|
|
900
907
|
loading: s.value,
|
|
901
908
|
class: "mgr10",
|
|
902
|
-
onClick: r[0] || (r[0] = (
|
|
909
|
+
onClick: r[0] || (r[0] = (v) => a.value.click())
|
|
903
910
|
}, l.$attrs), {
|
|
904
911
|
default: D(() => [
|
|
905
912
|
Q(l.$slots, "default", {}, () => [
|
|
@@ -926,12 +933,12 @@ function je(e) {
|
|
|
926
933
|
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
927
934
|
if (a)
|
|
928
935
|
if (s == "input" && (o != null && o.multiple))
|
|
929
|
-
t[a] =
|
|
936
|
+
t[a] = yt(l);
|
|
930
937
|
else if (s == "date")
|
|
931
938
|
if (r.includes("range")) {
|
|
932
|
-
const [i,
|
|
933
|
-
let [m,
|
|
934
|
-
m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"),
|
|
939
|
+
const [i, v] = a;
|
|
940
|
+
let [m, b] = l || [];
|
|
941
|
+
m && r == "daterange" && (m = $e(m).format("YYYY-MM-DD 00:00:00"), b = $e(b).format("YYYY-MM-DD 23:59:59")), t[i] = m, t[v] = b;
|
|
935
942
|
} else
|
|
936
943
|
t[a] = l;
|
|
937
944
|
else
|
|
@@ -952,12 +959,12 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
952
959
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
953
960
|
daterange: "YYYY-MM-DD",
|
|
954
961
|
month: "YYYY-MM"
|
|
955
|
-
},
|
|
962
|
+
}, v = ce(() => o.value ? r("guan-bi") : r("zhan-kai"));
|
|
956
963
|
function m() {
|
|
957
964
|
s("confirm");
|
|
958
965
|
}
|
|
959
|
-
function
|
|
960
|
-
|
|
966
|
+
function b(y) {
|
|
967
|
+
y.option.onClear && y.option.onClear(), s("confirm");
|
|
961
968
|
}
|
|
962
969
|
function g() {
|
|
963
970
|
s("reset");
|
|
@@ -968,29 +975,29 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
968
975
|
function f() {
|
|
969
976
|
return je(a.form.items);
|
|
970
977
|
}
|
|
971
|
-
const c =
|
|
978
|
+
const c = ut(a.form.items);
|
|
972
979
|
function p() {
|
|
973
|
-
a.form.items.forEach((
|
|
974
|
-
const
|
|
975
|
-
|
|
980
|
+
a.form.items.forEach((y) => {
|
|
981
|
+
const w = c.find((C) => C.key == y.key);
|
|
982
|
+
w && (y.value = w.value);
|
|
976
983
|
});
|
|
977
984
|
}
|
|
978
|
-
return t({ getPrm: f, reset: p }), (
|
|
979
|
-
const
|
|
985
|
+
return t({ getPrm: f, reset: p }), (y, w) => {
|
|
986
|
+
const C = O("el-input"), E = O("el-date-picker"), V = O("el-form-item"), Y = O("el-form"), I = O("el-link"), G = O("el-button");
|
|
980
987
|
return L(), ie("div", {
|
|
981
988
|
class: "searchBar-container mgt10 mgb10",
|
|
982
|
-
onKeydown:
|
|
989
|
+
onKeydown: zt(m, ["enter"])
|
|
983
990
|
}, [
|
|
984
991
|
re("div", {
|
|
985
992
|
class: "searchBar",
|
|
986
|
-
style:
|
|
993
|
+
style: Mt({ height: o.value ? "auto" : "42px" })
|
|
987
994
|
}, [
|
|
988
995
|
M(Y, {
|
|
989
996
|
inline: "",
|
|
990
997
|
model: e.form.data
|
|
991
998
|
}, {
|
|
992
999
|
default: D(() => [
|
|
993
|
-
(L(!0), ie(Oe, null,
|
|
1000
|
+
(L(!0), ie(Oe, null, st(e.form.items.filter((_) => !_.hidden), (_) => (L(), ie(Oe, {
|
|
994
1001
|
key: _.key
|
|
995
1002
|
}, [
|
|
996
1003
|
_.type == "br" ? (L(), ie("br", mn)) : (L(), N(V, {
|
|
@@ -998,16 +1005,16 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
998
1005
|
label: _.name
|
|
999
1006
|
}, {
|
|
1000
1007
|
default: D(() => {
|
|
1001
|
-
var
|
|
1008
|
+
var x, k;
|
|
1002
1009
|
return [
|
|
1003
|
-
_.type === "input" ? (L(), N(
|
|
1010
|
+
_.type === "input" ? (L(), N(C, {
|
|
1004
1011
|
key: 0,
|
|
1005
1012
|
modelValue: _.value,
|
|
1006
1013
|
"onUpdate:modelValue": (U) => _.value = U,
|
|
1007
|
-
class:
|
|
1008
|
-
placeholder:
|
|
1014
|
+
class: it(((x = _.option) == null ? void 0 : x.class) || "w150"),
|
|
1015
|
+
placeholder: y.$t("qing-shu-ru"),
|
|
1009
1016
|
clearable: ""
|
|
1010
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (L(), N(
|
|
1017
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (L(), N(rt(_.render), { key: 1 })) : fe("", !0),
|
|
1011
1018
|
_.type === "select" ? (L(), N(cn, ue({
|
|
1012
1019
|
key: 2,
|
|
1013
1020
|
class: ((k = _.option) == null ? void 0 : k.class) || "w150",
|
|
@@ -1015,7 +1022,7 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1015
1022
|
"onUpdate:modelValue": (U) => _.value = U
|
|
1016
1023
|
}, { ref_for: !0 }, _.option, {
|
|
1017
1024
|
onChange: m,
|
|
1018
|
-
onClear: (U) =>
|
|
1025
|
+
onClear: (U) => b(_)
|
|
1019
1026
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : fe("", !0),
|
|
1020
1027
|
_.type === "date" ? (L(), N(E, ue({
|
|
1021
1028
|
key: 3,
|
|
@@ -1026,9 +1033,9 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1026
1033
|
type: _.dateType || "date",
|
|
1027
1034
|
onFocus: (U) => l.value = _,
|
|
1028
1035
|
onChange: (U) => h(),
|
|
1029
|
-
placeholder:
|
|
1030
|
-
"start-placeholder":
|
|
1031
|
-
"end-placeholder":
|
|
1036
|
+
placeholder: y.$t("qing-xuan-ze"),
|
|
1037
|
+
"start-placeholder": y.$t("kai-shi-shi-jian"),
|
|
1038
|
+
"end-placeholder": y.$t("jie-shu-shi-jian")
|
|
1032
1039
|
}, { ref_for: !0 }, _.option), null, 16, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : fe("", !0)
|
|
1033
1040
|
];
|
|
1034
1041
|
}),
|
|
@@ -1041,21 +1048,21 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1041
1048
|
], 4),
|
|
1042
1049
|
re("div", gn, [
|
|
1043
1050
|
re("div", pn, [
|
|
1044
|
-
Q(
|
|
1051
|
+
Q(y.$slots, "table-header-left", {}, void 0, !0)
|
|
1045
1052
|
]),
|
|
1046
1053
|
re("div", yn, [
|
|
1047
|
-
M(
|
|
1054
|
+
M(I, {
|
|
1048
1055
|
underline: "never",
|
|
1049
1056
|
class: "mgr10",
|
|
1050
|
-
onClick:
|
|
1057
|
+
onClick: w[0] || (w[0] = () => {
|
|
1051
1058
|
s("visibleChange", !o.value), o.value = !o.value;
|
|
1052
1059
|
})
|
|
1053
1060
|
}, {
|
|
1054
1061
|
default: D(() => [
|
|
1055
|
-
M(
|
|
1062
|
+
M(vt, {
|
|
1056
1063
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1057
1064
|
}, null, 8, ["name"]),
|
|
1058
|
-
ne(" " + ee(
|
|
1065
|
+
ne(" " + ee(v.value), 1)
|
|
1059
1066
|
]),
|
|
1060
1067
|
_: 1
|
|
1061
1068
|
}),
|
|
@@ -1064,7 +1071,7 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1064
1071
|
onClick: m
|
|
1065
1072
|
}, {
|
|
1066
1073
|
default: D(() => [
|
|
1067
|
-
ne(ee(
|
|
1074
|
+
ne(ee(y.$t("shai-xuan")), 1)
|
|
1068
1075
|
]),
|
|
1069
1076
|
_: 1
|
|
1070
1077
|
}),
|
|
@@ -1073,17 +1080,17 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1073
1080
|
onClick: g
|
|
1074
1081
|
}, {
|
|
1075
1082
|
default: D(() => [
|
|
1076
|
-
ne(ee(
|
|
1083
|
+
ne(ee(y.$t("chong-zhi")), 1)
|
|
1077
1084
|
]),
|
|
1078
1085
|
_: 1
|
|
1079
1086
|
}),
|
|
1080
|
-
Q(
|
|
1087
|
+
Q(y.$slots, "btn", {}, void 0, !0)
|
|
1081
1088
|
])
|
|
1082
1089
|
])
|
|
1083
1090
|
], 32);
|
|
1084
1091
|
};
|
|
1085
1092
|
}
|
|
1086
|
-
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]),
|
|
1093
|
+
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]), bt = {
|
|
1087
1094
|
// 分页参数名
|
|
1088
1095
|
pageNoKey: "pageNo",
|
|
1089
1096
|
// 页码参数名
|
|
@@ -1113,7 +1120,7 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1113
1120
|
enableCellCopy: !0
|
|
1114
1121
|
// 是否启用单元格选区复制功能
|
|
1115
1122
|
};
|
|
1116
|
-
let _e = { ...
|
|
1123
|
+
let _e = { ...bt };
|
|
1117
1124
|
function Xn(e) {
|
|
1118
1125
|
_e = {
|
|
1119
1126
|
..._e,
|
|
@@ -1128,7 +1135,7 @@ function wn() {
|
|
|
1128
1135
|
return _e;
|
|
1129
1136
|
}
|
|
1130
1137
|
function Qn() {
|
|
1131
|
-
_e = { ...
|
|
1138
|
+
_e = { ...bt };
|
|
1132
1139
|
}
|
|
1133
1140
|
const Cn = { class: "center" }, xn = {
|
|
1134
1141
|
__name: "index",
|
|
@@ -1167,25 +1174,25 @@ const Cn = { class: "center" }, xn = {
|
|
|
1167
1174
|
}
|
|
1168
1175
|
},
|
|
1169
1176
|
setup(e, { expose: t }) {
|
|
1170
|
-
const { t: n, locale: a } = pe(), s =
|
|
1177
|
+
const { t: n, locale: a } = pe(), s = jt(), o = wn(), l = e, r = P(!1), i = P([]);
|
|
1171
1178
|
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 = []);
|
|
1172
|
-
const
|
|
1179
|
+
const v = ce(() => {
|
|
1173
1180
|
const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1174
1181
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1175
|
-
}), m =
|
|
1176
|
-
[
|
|
1182
|
+
}), m = ut(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ie({
|
|
1183
|
+
[b]: 1,
|
|
1177
1184
|
[g]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1178
1185
|
total: 0
|
|
1179
|
-
}), f = P(null), c = P(null), p = P(450),
|
|
1186
|
+
}), f = P(null), c = P(null), p = P(450), y = Re(() => {
|
|
1180
1187
|
we(() => {
|
|
1181
1188
|
if (!c.value)
|
|
1182
1189
|
return;
|
|
1183
1190
|
const u = c.value.getBoundingClientRect(), S = window.innerHeight, T = u.top, R = 100, Z = S - T - R, q = 200;
|
|
1184
1191
|
p.value = Math.max(Z, q);
|
|
1185
1192
|
});
|
|
1186
|
-
}, 100),
|
|
1187
|
-
|
|
1188
|
-
},
|
|
1193
|
+
}, 100), w = () => {
|
|
1194
|
+
y();
|
|
1195
|
+
}, C = () => {
|
|
1189
1196
|
if (!l.searchForm.enableCellCopy && !o.enableCellCopy)
|
|
1190
1197
|
return !1;
|
|
1191
1198
|
const d = f.value;
|
|
@@ -1194,16 +1201,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1194
1201
|
const u = d.$el;
|
|
1195
1202
|
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown", z), u.removeEventListener("mousemove", he), u.removeEventListener("mouseup", de), u.removeEventListener("keydown", Te), u.addEventListener("mousedown", z), u.addEventListener("mousemove", he), u.addEventListener("mouseup", de), u.addEventListener("keydown", Te), !0;
|
|
1196
1203
|
};
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1204
|
+
lt(() => {
|
|
1205
|
+
y(), window.addEventListener("resize", w), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", He), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1206
|
+
C();
|
|
1200
1207
|
}, 500));
|
|
1201
|
-
}),
|
|
1208
|
+
}), Ot(() => {
|
|
1202
1209
|
(l.searchForm.enableCellCopy || o.enableCellCopy) && setTimeout(() => {
|
|
1203
|
-
|
|
1210
|
+
C();
|
|
1204
1211
|
}, 500);
|
|
1205
|
-
}),
|
|
1206
|
-
if (window.removeEventListener("resize",
|
|
1212
|
+
}), Vt(() => {
|
|
1213
|
+
if (window.removeEventListener("resize", w), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
1207
1214
|
document.removeEventListener("mouseup", He), document.removeEventListener("mousedown", Ne);
|
|
1208
1215
|
const d = f.value;
|
|
1209
1216
|
if (d && d.$el) {
|
|
@@ -1216,7 +1223,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1216
1223
|
let V;
|
|
1217
1224
|
async function Y(d) {
|
|
1218
1225
|
const { dataFormat: u } = l.tableConfig;
|
|
1219
|
-
d[
|
|
1226
|
+
d[b] != 1 && (d.nextSearchAfter = V), r.value = !0;
|
|
1220
1227
|
const { code: S, data: T = {} } = await l.api(d).finally(() => {
|
|
1221
1228
|
r.value = !1, l.searchForm.selections = [];
|
|
1222
1229
|
});
|
|
@@ -1235,12 +1242,12 @@ const Cn = { class: "center" }, xn = {
|
|
|
1235
1242
|
}
|
|
1236
1243
|
i.value = u ? u(R) : R, h.total = Z, V = T.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
|
|
1237
1244
|
setTimeout(() => {
|
|
1238
|
-
|
|
1245
|
+
C();
|
|
1239
1246
|
}, 100);
|
|
1240
1247
|
});
|
|
1241
1248
|
}
|
|
1242
1249
|
}
|
|
1243
|
-
function
|
|
1250
|
+
function I(d = {}) {
|
|
1244
1251
|
const { searchData: u = () => ({}) } = l.tableConfig, S = u();
|
|
1245
1252
|
Y({
|
|
1246
1253
|
...h,
|
|
@@ -1254,18 +1261,18 @@ const Cn = { class: "center" }, xn = {
|
|
|
1254
1261
|
d && d(), l.searchForm.items.forEach((u) => {
|
|
1255
1262
|
const S = m.find((T) => Xe(u.key) && Xe(T.key) ? u.key.join(",") == T.key.join(",") : T.key == u.key);
|
|
1256
1263
|
S && (u.value = S.value);
|
|
1257
|
-
}),
|
|
1264
|
+
}), I();
|
|
1258
1265
|
}
|
|
1259
|
-
l.api && l.immediate &&
|
|
1266
|
+
l.api && l.immediate && I();
|
|
1260
1267
|
function _() {
|
|
1261
1268
|
return { ...h, ...je(l.searchForm.items) };
|
|
1262
1269
|
}
|
|
1263
|
-
const
|
|
1270
|
+
const x = () => {
|
|
1264
1271
|
const d = f.value;
|
|
1265
1272
|
d && d.clearSort();
|
|
1266
|
-
}, k =
|
|
1273
|
+
}, k = Ie({
|
|
1267
1274
|
storage: !0
|
|
1268
|
-
}), U =
|
|
1275
|
+
}), U = Ie({
|
|
1269
1276
|
drag: !0,
|
|
1270
1277
|
resizable: !0,
|
|
1271
1278
|
maxFixedSize: 0
|
|
@@ -1285,7 +1292,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1285
1292
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1286
1293
|
...S
|
|
1287
1294
|
};
|
|
1288
|
-
}), $ =
|
|
1295
|
+
}), $ = Ie({
|
|
1289
1296
|
isSelecting: !1,
|
|
1290
1297
|
// 是否正在选择
|
|
1291
1298
|
startCell: null,
|
|
@@ -1316,17 +1323,17 @@ const Cn = { class: "center" }, xn = {
|
|
|
1316
1323
|
return null;
|
|
1317
1324
|
let q = -1;
|
|
1318
1325
|
const se = u.getAttribute("data-colid");
|
|
1319
|
-
if (se && (q = T.getColumns().findIndex((
|
|
1320
|
-
const
|
|
1326
|
+
if (se && (q = T.getColumns().findIndex((F) => F.id === se)), q < 0) {
|
|
1327
|
+
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(u), K = !!u.closest(".vxe-table--fixed-left-wrapper"), J = !!u.closest(".vxe-table--fixed-right-wrapper"), B = T.getColumns();
|
|
1321
1328
|
if (K) {
|
|
1322
1329
|
const X = B.filter((W) => W.fixed === "left");
|
|
1323
|
-
|
|
1330
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1324
1331
|
} else if (J) {
|
|
1325
1332
|
const X = B.filter((W) => W.fixed === "right");
|
|
1326
|
-
|
|
1333
|
+
F < X.length && (q = B.indexOf(X[F]));
|
|
1327
1334
|
} else {
|
|
1328
1335
|
const X = l.searchForm.showCheckBox ? 1 : 0;
|
|
1329
|
-
q = B.filter((oe) => oe.fixed === "left").length +
|
|
1336
|
+
q = B.filter((oe) => oe.fixed === "left").length + F - X;
|
|
1330
1337
|
}
|
|
1331
1338
|
}
|
|
1332
1339
|
return q < 0 ? null : { rowIndex: R, colIndex: q, cell: u };
|
|
@@ -1374,10 +1381,10 @@ const Cn = { class: "center" }, xn = {
|
|
|
1374
1381
|
const d = $.startCell.rowIndex, u = $.endCell.rowIndex, S = $.startCell.colIndex, T = $.endCell.colIndex, R = Math.min(d, u), Z = Math.max(d, u), q = Math.min(S, T), se = Math.max(S, T);
|
|
1375
1382
|
$.selectedCells = [];
|
|
1376
1383
|
for (let A = R; A <= Z; A++)
|
|
1377
|
-
for (let
|
|
1384
|
+
for (let F = q; F <= se; F++)
|
|
1378
1385
|
$.selectedCells.push({
|
|
1379
1386
|
rowIndex: A,
|
|
1380
|
-
colIndex:
|
|
1387
|
+
colIndex: F
|
|
1381
1388
|
});
|
|
1382
1389
|
}, Ke = () => {
|
|
1383
1390
|
we(() => {
|
|
@@ -1397,7 +1404,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1397
1404
|
);
|
|
1398
1405
|
}), $.selectedCells.length === 0)
|
|
1399
1406
|
return;
|
|
1400
|
-
const S = d.getColumns(), T = $.selectedCells.map((K) => K.rowIndex), R = $.selectedCells.map((K) => K.colIndex), Z = Math.min(...T), q = Math.max(...T), se = Math.min(...R), A = Math.max(...R),
|
|
1407
|
+
const S = d.getColumns(), T = $.selectedCells.map((K) => K.rowIndex), R = $.selectedCells.map((K) => K.colIndex), Z = Math.min(...T), q = Math.max(...T), se = Math.min(...R), A = Math.max(...R), F = [
|
|
1401
1408
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1402
1409
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1403
1410
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
@@ -1407,7 +1414,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1407
1414
|
if (!B)
|
|
1408
1415
|
return;
|
|
1409
1416
|
const X = B.fixed === "left", W = B.fixed === "right";
|
|
1410
|
-
for (const oe of
|
|
1417
|
+
for (const oe of F) {
|
|
1411
1418
|
const xe = oe.querySelectorAll(".vxe-body--row")[K];
|
|
1412
1419
|
if (!xe)
|
|
1413
1420
|
continue;
|
|
@@ -1430,27 +1437,27 @@ const Cn = { class: "center" }, xn = {
|
|
|
1430
1437
|
}
|
|
1431
1438
|
});
|
|
1432
1439
|
});
|
|
1433
|
-
},
|
|
1440
|
+
}, Ct = async () => {
|
|
1434
1441
|
if ($.selectedCells.length === 0)
|
|
1435
1442
|
return;
|
|
1436
1443
|
const d = f.value;
|
|
1437
1444
|
if (!d)
|
|
1438
1445
|
return;
|
|
1439
1446
|
const u = d.$el, S = d.getColumns(), T = [...new Set($.selectedCells.map((A) => A.rowIndex))].sort(
|
|
1440
|
-
(A,
|
|
1447
|
+
(A, F) => A - F
|
|
1441
1448
|
), R = [...new Set($.selectedCells.map((A) => A.colIndex))].sort(
|
|
1442
|
-
(A,
|
|
1449
|
+
(A, F) => A - F
|
|
1443
1450
|
), Z = [
|
|
1444
1451
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1445
1452
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1446
1453
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1447
1454
|
].filter(Boolean), q = [];
|
|
1448
1455
|
T.forEach((A) => {
|
|
1449
|
-
const
|
|
1456
|
+
const F = [];
|
|
1450
1457
|
R.forEach((K) => {
|
|
1451
1458
|
const J = S[K];
|
|
1452
1459
|
if (!J) {
|
|
1453
|
-
|
|
1460
|
+
F.push("");
|
|
1454
1461
|
return;
|
|
1455
1462
|
}
|
|
1456
1463
|
const B = J.fixed === "left", X = J.fixed === "right";
|
|
@@ -1476,8 +1483,8 @@ const Cn = { class: "center" }, xn = {
|
|
|
1476
1483
|
break;
|
|
1477
1484
|
}
|
|
1478
1485
|
}
|
|
1479
|
-
|
|
1480
|
-
}), q.push(
|
|
1486
|
+
F.push(W);
|
|
1487
|
+
}), q.push(F.join(" "));
|
|
1481
1488
|
});
|
|
1482
1489
|
const se = q.join(`
|
|
1483
1490
|
`);
|
|
@@ -1487,7 +1494,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1487
1494
|
console.error("复制失败:", A);
|
|
1488
1495
|
}
|
|
1489
1496
|
}, Te = (d) => {
|
|
1490
|
-
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(),
|
|
1497
|
+
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), Ct()) : d.key === "Escape" && ve());
|
|
1491
1498
|
}, He = () => {
|
|
1492
1499
|
$.isSelecting = !1;
|
|
1493
1500
|
}, Ne = (d) => {
|
|
@@ -1495,10 +1502,10 @@ const Cn = { class: "center" }, xn = {
|
|
|
1495
1502
|
if (!u || !u.$el)
|
|
1496
1503
|
return;
|
|
1497
1504
|
u.$el.contains(d.target) || ve();
|
|
1498
|
-
}, Ct = (d) => {
|
|
1499
|
-
h[v] = d, F();
|
|
1500
1505
|
}, xt = (d) => {
|
|
1501
|
-
h[
|
|
1506
|
+
h[b] = d, I();
|
|
1507
|
+
}, kt = (d) => {
|
|
1508
|
+
h[g] = d, h[b] = 1, I();
|
|
1502
1509
|
};
|
|
1503
1510
|
function We() {
|
|
1504
1511
|
const d = f.value.getCheckboxRecords();
|
|
@@ -1512,18 +1519,18 @@ const Cn = { class: "center" }, xn = {
|
|
|
1512
1519
|
l.searchForm.selections = S;
|
|
1513
1520
|
}
|
|
1514
1521
|
};
|
|
1515
|
-
return t({ tableRef: f, getList:
|
|
1522
|
+
return t({ tableRef: f, getList: I, getPrm: _, clearSort: x, calculateTableHeight: y }), (d, u) => {
|
|
1516
1523
|
var A;
|
|
1517
1524
|
const S = O("el-button"), T = O("el-checkbox"), R = O("el-text"), Z = O("vxe-column"), q = O("VxeTable"), se = O("el-pagination");
|
|
1518
1525
|
return L(), ie("div", {
|
|
1519
|
-
class:
|
|
1526
|
+
class: it({ box: e.searchForm.showShadow })
|
|
1520
1527
|
}, [
|
|
1521
1528
|
e.searchForm.showSearch ? (L(), N(bn, {
|
|
1522
1529
|
key: 0,
|
|
1523
1530
|
form: e.searchForm,
|
|
1524
1531
|
onReset: G,
|
|
1525
|
-
onConfirm: u[1] || (u[1] = (
|
|
1526
|
-
onVisibleChange: H(
|
|
1532
|
+
onConfirm: u[1] || (u[1] = (F) => I()),
|
|
1533
|
+
onVisibleChange: H(y)
|
|
1527
1534
|
}, {
|
|
1528
1535
|
btn: D(() => [
|
|
1529
1536
|
u[3] || (u[3] = re("span", { class: "mgr10" }, null, -1)),
|
|
@@ -1531,10 +1538,10 @@ const Cn = { class: "center" }, xn = {
|
|
|
1531
1538
|
M(S, {
|
|
1532
1539
|
class: "mgl10",
|
|
1533
1540
|
round: "",
|
|
1534
|
-
onClick: u[0] || (u[0] = (
|
|
1541
|
+
onClick: u[0] || (u[0] = (F) => f.value.openCustom())
|
|
1535
1542
|
}, {
|
|
1536
1543
|
default: D(() => [
|
|
1537
|
-
M(
|
|
1544
|
+
M(vt, { name: "Tools" })
|
|
1538
1545
|
]),
|
|
1539
1546
|
_: 1
|
|
1540
1547
|
})
|
|
@@ -1547,7 +1554,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1547
1554
|
ref: c
|
|
1548
1555
|
}, [
|
|
1549
1556
|
M(q, ue({
|
|
1550
|
-
id:
|
|
1557
|
+
id: v.value,
|
|
1551
1558
|
ref_key: "tableRef",
|
|
1552
1559
|
ref: f,
|
|
1553
1560
|
loading: e.loading || r.value,
|
|
@@ -1567,7 +1574,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1567
1574
|
title: d.$t("xu-hao"),
|
|
1568
1575
|
fixed: "left"
|
|
1569
1576
|
}, {
|
|
1570
|
-
checkbox: D(({ rowIndex:
|
|
1577
|
+
checkbox: D(({ rowIndex: F, row: K, checked: J, disabled: B, indeterminate: X }) => [
|
|
1571
1578
|
re("div", Cn, [
|
|
1572
1579
|
J ? (L(), N(T, {
|
|
1573
1580
|
key: 0,
|
|
@@ -1587,7 +1594,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1587
1594
|
class: "mgl5"
|
|
1588
1595
|
}, {
|
|
1589
1596
|
default: D(() => [
|
|
1590
|
-
ne(ee(
|
|
1597
|
+
ne(ee(F + 1), 1)
|
|
1591
1598
|
]),
|
|
1592
1599
|
_: 2
|
|
1593
1600
|
}, 1024)
|
|
@@ -1602,16 +1609,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1602
1609
|
], 512),
|
|
1603
1610
|
e.searchForm.showPage ? (L(), N(se, {
|
|
1604
1611
|
key: 1,
|
|
1605
|
-
"current-page": h[H(
|
|
1606
|
-
"onUpdate:currentPage": u[2] || (u[2] = (
|
|
1612
|
+
"current-page": h[H(b)],
|
|
1613
|
+
"onUpdate:currentPage": u[2] || (u[2] = (F) => h[H(b)] = F),
|
|
1607
1614
|
class: "myPagination mgt10",
|
|
1608
1615
|
background: "",
|
|
1609
1616
|
layout: "total, sizes, prev, pager, next",
|
|
1610
1617
|
total: h.total,
|
|
1611
1618
|
"page-size": h[H(g)],
|
|
1612
1619
|
"page-sizes": e.searchForm.pageSizes || H(o).pageSizes,
|
|
1613
|
-
onCurrentChange:
|
|
1614
|
-
onSizeChange:
|
|
1620
|
+
onCurrentChange: xt,
|
|
1621
|
+
onSizeChange: kt
|
|
1615
1622
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : fe("", !0)
|
|
1616
1623
|
], 2);
|
|
1617
1624
|
};
|
|
@@ -1650,16 +1657,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1650
1657
|
}
|
|
1651
1658
|
}, kn = {
|
|
1652
1659
|
mounted(e, t) {
|
|
1653
|
-
t.value &&
|
|
1660
|
+
t.value && tt(e);
|
|
1654
1661
|
},
|
|
1655
1662
|
updated(e, t) {
|
|
1656
|
-
t.value ?
|
|
1663
|
+
t.value ? tt(e) : nt(e);
|
|
1657
1664
|
},
|
|
1658
1665
|
beforeUnmount(e) {
|
|
1659
|
-
|
|
1666
|
+
nt(e);
|
|
1660
1667
|
}
|
|
1661
1668
|
};
|
|
1662
|
-
async function
|
|
1669
|
+
async function tt(e) {
|
|
1663
1670
|
await g();
|
|
1664
1671
|
const t = e.querySelector(".el-dialog");
|
|
1665
1672
|
if (!t)
|
|
@@ -1692,7 +1699,7 @@ async function et(e) {
|
|
|
1692
1699
|
y: 0
|
|
1693
1700
|
}
|
|
1694
1701
|
};
|
|
1695
|
-
n.addEventListener("mousedown", i), document.addEventListener("mousemove",
|
|
1702
|
+
n.addEventListener("mousedown", i), document.addEventListener("mousemove", v), document.addEventListener("mouseup", m), window.addEventListener("resize", b);
|
|
1696
1703
|
function l() {
|
|
1697
1704
|
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), r();
|
|
1698
1705
|
}
|
|
@@ -1709,7 +1716,7 @@ async function et(e) {
|
|
|
1709
1716
|
y: h.clientY
|
|
1710
1717
|
}, s = !0);
|
|
1711
1718
|
}
|
|
1712
|
-
function
|
|
1719
|
+
function v(h) {
|
|
1713
1720
|
s && (o.drag = {
|
|
1714
1721
|
x: h.clientX,
|
|
1715
1722
|
y: h.clientY
|
|
@@ -1718,7 +1725,7 @@ async function et(e) {
|
|
|
1718
1725
|
function m(h) {
|
|
1719
1726
|
a.style.userSelect = "auto", s = !1;
|
|
1720
1727
|
}
|
|
1721
|
-
function
|
|
1728
|
+
function b(h) {
|
|
1722
1729
|
}
|
|
1723
1730
|
function g() {
|
|
1724
1731
|
return new Promise((h, f) => {
|
|
@@ -1727,9 +1734,9 @@ async function et(e) {
|
|
|
1727
1734
|
}, 500);
|
|
1728
1735
|
});
|
|
1729
1736
|
}
|
|
1730
|
-
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ =
|
|
1737
|
+
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = v, e.__sizeChange__ = b;
|
|
1731
1738
|
}
|
|
1732
|
-
function
|
|
1739
|
+
function nt(e) {
|
|
1733
1740
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1734
1741
|
}
|
|
1735
1742
|
const _n = {
|
|
@@ -1759,7 +1766,7 @@ const _n = {
|
|
|
1759
1766
|
a("confirm");
|
|
1760
1767
|
}, 300);
|
|
1761
1768
|
async function l() {
|
|
1762
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await
|
|
1769
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await It.confirm(s("que-ding-guan-bi-ma"), {
|
|
1763
1770
|
confirmButtonText: s("que-ding"),
|
|
1764
1771
|
cancelButtonText: s("qu-xiao"),
|
|
1765
1772
|
type: "warning"
|
|
@@ -1767,7 +1774,7 @@ const _n = {
|
|
|
1767
1774
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1768
1775
|
}
|
|
1769
1776
|
return (r, i) => {
|
|
1770
|
-
const
|
|
1777
|
+
const v = O("el-button"), m = O("el-drawer"), b = O("el-dialog");
|
|
1771
1778
|
return e.layer.type ? (L(), N(m, {
|
|
1772
1779
|
key: 0,
|
|
1773
1780
|
modelValue: e.layer.show,
|
|
@@ -1784,13 +1791,13 @@ const _n = {
|
|
|
1784
1791
|
i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
|
|
1785
1792
|
e.layer.showButton ? (L(), ie("div", _n, [
|
|
1786
1793
|
Q(r.$slots, "btn", {}, () => [
|
|
1787
|
-
M(
|
|
1794
|
+
M(v, { onClick: l }, {
|
|
1788
1795
|
default: D(() => [
|
|
1789
1796
|
ne(ee(r.$t("qu-xiao")), 1)
|
|
1790
1797
|
]),
|
|
1791
1798
|
_: 1
|
|
1792
1799
|
}),
|
|
1793
|
-
M(
|
|
1800
|
+
M(v, {
|
|
1794
1801
|
type: "primary",
|
|
1795
1802
|
loading: e.loading,
|
|
1796
1803
|
onClick: H(o)
|
|
@@ -1804,15 +1811,15 @@ const _n = {
|
|
|
1804
1811
|
])) : fe("", !0)
|
|
1805
1812
|
]),
|
|
1806
1813
|
_: 3
|
|
1807
|
-
}, 8, ["modelValue", "size", "title"])) :
|
|
1808
|
-
M(
|
|
1814
|
+
}, 8, ["modelValue", "size", "title"])) : qt((L(), ie("div", $n, [
|
|
1815
|
+
M(b, {
|
|
1809
1816
|
"close-on-click-modal": !1,
|
|
1810
1817
|
modelValue: e.layer.show,
|
|
1811
1818
|
"onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
|
|
1812
1819
|
title: e.layer.title,
|
|
1813
1820
|
width: e.layer.width || 500,
|
|
1814
1821
|
center: ""
|
|
1815
|
-
},
|
|
1822
|
+
}, at({
|
|
1816
1823
|
default: D(() => [
|
|
1817
1824
|
Q(r.$slots, "default")
|
|
1818
1825
|
]),
|
|
@@ -1822,13 +1829,13 @@ const _n = {
|
|
|
1822
1829
|
name: "footer",
|
|
1823
1830
|
fn: D(() => [
|
|
1824
1831
|
Q(r.$slots, "btn", {}, () => [
|
|
1825
|
-
M(
|
|
1832
|
+
M(v, { onClick: l }, {
|
|
1826
1833
|
default: D(() => [
|
|
1827
1834
|
ne(ee(r.$t("qu-xiao")), 1)
|
|
1828
1835
|
]),
|
|
1829
1836
|
_: 1
|
|
1830
1837
|
}),
|
|
1831
|
-
M(
|
|
1838
|
+
M(v, {
|
|
1832
1839
|
type: "primary",
|
|
1833
1840
|
onClick: H(o)
|
|
1834
1841
|
}, {
|
|
@@ -1858,12 +1865,12 @@ function oo(e, t = {}) {
|
|
|
1858
1865
|
password: /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,12}/,
|
|
1859
1866
|
email: /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
|
|
1860
1867
|
}[e], { inForm: o, value: l, required: r, msg: i = n("validate.invalidInput") } = a;
|
|
1861
|
-
return o ? function(
|
|
1868
|
+
return o ? function(v, m, b) {
|
|
1862
1869
|
if (r) {
|
|
1863
|
-
s.test(m) ?
|
|
1870
|
+
s.test(m) ? b() : b(new Error(i));
|
|
1864
1871
|
return;
|
|
1865
1872
|
}
|
|
1866
|
-
m && !s.test(m) ?
|
|
1873
|
+
m && !s.test(m) ? b(new Error(i)) : b();
|
|
1867
1874
|
} : s.test(l);
|
|
1868
1875
|
}
|
|
1869
1876
|
class lo {
|
|
@@ -2079,21 +2086,21 @@ function ao(e, t = {}) {
|
|
|
2079
2086
|
log: !1,
|
|
2080
2087
|
params: null,
|
|
2081
2088
|
format: null
|
|
2082
|
-
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a,
|
|
2089
|
+
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, v = P([]), m = P(!1), b = (g) => {
|
|
2083
2090
|
const h = g || l;
|
|
2084
2091
|
m.value = !0, e(h).then((f) => {
|
|
2085
|
-
const { code: c, data: p, msg:
|
|
2092
|
+
const { code: c, data: p, msg: y } = f;
|
|
2086
2093
|
if (r) {
|
|
2087
|
-
const { records:
|
|
2088
|
-
|
|
2094
|
+
const { records: w, rows: C } = p || {}, E = w || C ? w || C : p;
|
|
2095
|
+
v.value = Me(E, i), r(f);
|
|
2089
2096
|
}
|
|
2090
2097
|
if (p) {
|
|
2091
2098
|
if (p.records != null || p.rows != null) {
|
|
2092
|
-
const { records:
|
|
2093
|
-
h && h.total != null && (l.total = parseInt(E)),
|
|
2099
|
+
const { records: w, rows: C, total: E = 0 } = p || {};
|
|
2100
|
+
h && h.total != null && (l.total = parseInt(E)), v.value = Me(w || C || [], i);
|
|
2094
2101
|
} else
|
|
2095
|
-
|
|
2096
|
-
o && console.log("useRequest-res",
|
|
2102
|
+
v.value = Me(p, i);
|
|
2103
|
+
o && console.log("useRequest-res", v.value);
|
|
2097
2104
|
}
|
|
2098
2105
|
}).catch((f) => {
|
|
2099
2106
|
r && (console.log("useRequestErr", f), r({ code: 500 }));
|
|
@@ -2101,7 +2108,7 @@ function ao(e, t = {}) {
|
|
|
2101
2108
|
m.value = !1;
|
|
2102
2109
|
});
|
|
2103
2110
|
};
|
|
2104
|
-
return s ||
|
|
2111
|
+
return s || b(), [m, v, b];
|
|
2105
2112
|
}
|
|
2106
2113
|
function so(e) {
|
|
2107
2114
|
const t = P(e), n = P(""), a = P("");
|
|
@@ -2141,32 +2148,32 @@ function co(e, t = "zh_cn", n = "en_us") {
|
|
|
2141
2148
|
return e[a[o]] || e[t] || "-";
|
|
2142
2149
|
}
|
|
2143
2150
|
function uo(e, t) {
|
|
2144
|
-
let n =
|
|
2145
|
-
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState),
|
|
2151
|
+
let n = Rt;
|
|
2152
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState), wt(t, n);
|
|
2146
2153
|
}
|
|
2147
2154
|
function fo(e, t) {
|
|
2148
|
-
let n =
|
|
2149
|
-
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters),
|
|
2155
|
+
let n = Bt;
|
|
2156
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters), wt(t, n);
|
|
2150
2157
|
}
|
|
2151
2158
|
function ho(e, t) {
|
|
2152
|
-
let n =
|
|
2159
|
+
let n = Yt;
|
|
2153
2160
|
return typeof e == "string" && e.length > 0 && (n = Be(e).mapActions), Sn(t, n);
|
|
2154
2161
|
}
|
|
2155
|
-
function
|
|
2156
|
-
const n =
|
|
2162
|
+
function wt(e, t) {
|
|
2163
|
+
const n = dt(), a = t(e), s = {};
|
|
2157
2164
|
return Object.keys(a).forEach((o) => {
|
|
2158
2165
|
const l = a[o].bind({ $store: n });
|
|
2159
2166
|
s[o] = ce(l);
|
|
2160
2167
|
}), s;
|
|
2161
2168
|
}
|
|
2162
2169
|
function Sn(e, t) {
|
|
2163
|
-
const n =
|
|
2170
|
+
const n = dt(), a = t(e), s = {};
|
|
2164
2171
|
return Object.keys(a).forEach((o) => {
|
|
2165
2172
|
s[o] = a[o].bind({ $store: n });
|
|
2166
2173
|
}), s;
|
|
2167
2174
|
}
|
|
2168
|
-
function
|
|
2169
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2175
|
+
function Fe(e) {
|
|
2176
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !At(e);
|
|
2170
2177
|
}
|
|
2171
2178
|
function mo() {
|
|
2172
2179
|
ke.renderer.add("Enum", {
|
|
@@ -2180,11 +2187,11 @@ function mo() {
|
|
|
2180
2187
|
let s;
|
|
2181
2188
|
return M(O("el-text"), {
|
|
2182
2189
|
type: e.enum.getTag(a)
|
|
2183
|
-
},
|
|
2190
|
+
}, Fe(s = e.enum.getName(a)) ? s : {
|
|
2184
2191
|
default: () => [s]
|
|
2185
2192
|
});
|
|
2186
2193
|
}
|
|
2187
|
-
return M(O("el-text"), null,
|
|
2194
|
+
return M(O("el-text"), null, Fe(n = e.enum.getName(a)) ? n : {
|
|
2188
2195
|
default: () => [n]
|
|
2189
2196
|
});
|
|
2190
2197
|
}
|
|
@@ -2206,7 +2213,7 @@ function mo() {
|
|
|
2206
2213
|
locale: n
|
|
2207
2214
|
} = pe();
|
|
2208
2215
|
let a = n.value == "zh_cn";
|
|
2209
|
-
return M(
|
|
2216
|
+
return M(Lt, {
|
|
2210
2217
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2211
2218
|
}, {
|
|
2212
2219
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2225,34 +2232,34 @@ function mo() {
|
|
|
2225
2232
|
// 默认显示模板
|
|
2226
2233
|
renderTableDefault(e, t) {
|
|
2227
2234
|
let n = t.column.field;
|
|
2228
|
-
const a =
|
|
2235
|
+
const a = Pt(), {
|
|
2229
2236
|
multiple: s,
|
|
2230
2237
|
to: o,
|
|
2231
2238
|
openType: l = "system"
|
|
2232
2239
|
} = e, r = t.row[n];
|
|
2233
|
-
function i(
|
|
2234
|
-
l == "blank" ? window.open(
|
|
2235
|
-
path:
|
|
2240
|
+
function i(v, m) {
|
|
2241
|
+
l == "blank" ? window.open(v) : a.push({
|
|
2242
|
+
path: v,
|
|
2236
2243
|
query: {
|
|
2237
2244
|
[n]: m
|
|
2238
2245
|
}
|
|
2239
2246
|
});
|
|
2240
2247
|
}
|
|
2241
2248
|
if (s) {
|
|
2242
|
-
const
|
|
2243
|
-
return
|
|
2249
|
+
const v = (r == null ? void 0 : r.split(",")) || [];
|
|
2250
|
+
return v.map((m, b) => M("span", null, [M(Ge, {
|
|
2244
2251
|
underline: "never",
|
|
2245
2252
|
type: "primary",
|
|
2246
2253
|
onclick: () => i(l == "stystem" ? o : m, m)
|
|
2247
|
-
},
|
|
2254
|
+
}, Fe(m) ? m : {
|
|
2248
2255
|
default: () => [m]
|
|
2249
|
-
}),
|
|
2256
|
+
}), b < v.length - 1 ? "," : ""]));
|
|
2250
2257
|
}
|
|
2251
2258
|
return M(Ge, {
|
|
2252
2259
|
underline: "never",
|
|
2253
2260
|
type: "primary",
|
|
2254
2261
|
onclick: () => i(l == "stystem" ? o : r, r)
|
|
2255
|
-
},
|
|
2262
|
+
}, Fe(r) ? r : {
|
|
2256
2263
|
default: () => [r]
|
|
2257
2264
|
});
|
|
2258
2265
|
}
|
|
@@ -2260,7 +2267,7 @@ function mo() {
|
|
|
2260
2267
|
}
|
|
2261
2268
|
export {
|
|
2262
2269
|
cn as CmpDictionary,
|
|
2263
|
-
|
|
2270
|
+
vt as CmpIcon,
|
|
2264
2271
|
Gn as ConfrimButton,
|
|
2265
2272
|
to as DownExcelTemp,
|
|
2266
2273
|
Jn as ImportButton,
|
|
@@ -2269,7 +2276,7 @@ export {
|
|
|
2269
2276
|
eo as ListPage,
|
|
2270
2277
|
lo as OnePortalCasSDK,
|
|
2271
2278
|
bn as SearchBar,
|
|
2272
|
-
|
|
2279
|
+
et as StatusMap,
|
|
2273
2280
|
Pn as _toRaw,
|
|
2274
2281
|
ro as _typeOf,
|
|
2275
2282
|
Bn as arrToStatusMap,
|
|
@@ -2287,14 +2294,14 @@ export {
|
|
|
2287
2294
|
co as getLocaleValue,
|
|
2288
2295
|
Zn as getValueBykey,
|
|
2289
2296
|
An as importExcel,
|
|
2290
|
-
|
|
2291
|
-
|
|
2297
|
+
nn as importExcelMuilti,
|
|
2298
|
+
Zt as messages,
|
|
2292
2299
|
mo as registerVxeRenderers,
|
|
2293
2300
|
Qn as resetListPageConfig,
|
|
2294
2301
|
Xn as setListPageConfig,
|
|
2295
|
-
|
|
2302
|
+
Gt as setupI18n,
|
|
2296
2303
|
jn as sleep,
|
|
2297
|
-
|
|
2304
|
+
yt as stringToArray,
|
|
2298
2305
|
Yn as stripHtmlTags,
|
|
2299
2306
|
Kn as unicode2Str,
|
|
2300
2307
|
ho as useActions,
|