joy-admin-components 0.2.51 → 0.2.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/joy-admin-components.es.js +442 -441
- package/dist/joy-admin-components.umd.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ElForm as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
1
|
+
import { ElForm as _t, ElRow as $t, ElCol as St, ElMessageBox as Lt, ElInputNumber as Et, ElText as Ft, ElLink as Ge } from "element-plus";
|
|
2
|
+
import { defineComponent as nt, ref as P, onMounted as ot, h as ze, mergeModels as Je, useAttrs as It, useModel as Tt, computed as ce, watch as Pe, resolveComponent as q, unref as H, openBlock as I, createBlock as N, mergeProps as ue, createSlots as lt, withCtx as z, createElementVNode as re, toDisplayString as te, renderSlot as ee, createVNode as V, createTextVNode as ne, createCommentVNode as fe, createElementBlock as ie, Fragment as Oe, renderList as at, withModifiers as Ve, nextTick as we, resolveDynamicComponent as st, withKeys as Dt, normalizeStyle as zt, normalizeClass as rt, reactive as Ee, onUpdated as Mt, onUnmounted as Ot, withDirectives as Vt, isVNode as qt } from "vue";
|
|
3
|
+
import { saveAs as it } from "file-saver";
|
|
4
|
+
import Ie 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 At, useI18n as pe } from "vue-i18n";
|
|
7
|
+
import { debounce as Re, cloneDeep as ct, isArray as Xe } from "lodash";
|
|
8
|
+
import { useRoute as Ut, useRouter as jt } from "vue-router";
|
|
9
|
+
import { createNamespacedHelpers as Be, useStore as ut, mapState as Pt, mapGetters as Rt, mapActions as Bt } from "vuex";
|
|
10
10
|
import { VxeUI as ke } from "vxe-pc-ui";
|
|
11
|
-
const qn =
|
|
11
|
+
const qn = nt({
|
|
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
|
+
St,
|
|
19
19
|
{ span: ((i = r.props) == null ? void 0 : i.span) || 24 },
|
|
20
20
|
{
|
|
21
21
|
default: () => r
|
|
@@ -23,28 +23,28 @@ const qn = ot({
|
|
|
23
23
|
);
|
|
24
24
|
}
|
|
25
25
|
) : null;
|
|
26
|
-
|
|
26
|
+
ot(() => {
|
|
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($t, { gutter: n.gutter ?? 20 }, { default: () => o() })
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
return l;
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
var
|
|
40
|
-
function
|
|
39
|
+
var dt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
40
|
+
function ft(e) {
|
|
41
41
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
42
42
|
}
|
|
43
|
-
var
|
|
43
|
+
var ht = { exports: {} };
|
|
44
44
|
(function(e, t) {
|
|
45
45
|
(function(n, a) {
|
|
46
46
|
e.exports = a();
|
|
47
|
-
})(
|
|
47
|
+
})(dt, 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;
|
|
@@ -71,26 +71,26 @@ var mt = { exports: {} };
|
|
|
71
71
|
};
|
|
72
72
|
var b = i.utcOffset;
|
|
73
73
|
i.utcOffset = function(c, p) {
|
|
74
|
-
var
|
|
75
|
-
if (
|
|
76
|
-
return this.$u ? 0 :
|
|
77
|
-
if (typeof c == "string" && (c = function(
|
|
78
|
-
|
|
79
|
-
var Y =
|
|
74
|
+
var w = this.$utils().u;
|
|
75
|
+
if (w(c))
|
|
76
|
+
return this.$u ? 0 : w(this.$offset) ? b.call(this) : this.$offset;
|
|
77
|
+
if (typeof c == "string" && (c = function(M) {
|
|
78
|
+
M === void 0 && (M = "");
|
|
79
|
+
var Y = M.match(a);
|
|
80
80
|
if (!Y)
|
|
81
81
|
return null;
|
|
82
|
-
var
|
|
82
|
+
var E = ("" + Y[0]).match(s) || ["-", 0, 0], G = E[0], _ = 60 * +E[1] + +E[2];
|
|
83
83
|
return _ === 0 ? 0 : G === "+" ? _ : -_;
|
|
84
84
|
}(c), c === null))
|
|
85
85
|
return this;
|
|
86
|
-
var
|
|
87
|
-
if (
|
|
86
|
+
var x = Math.abs(c) <= 16 ? 60 * c : c;
|
|
87
|
+
if (x === 0)
|
|
88
88
|
return this.utc(p);
|
|
89
89
|
var C = this.clone();
|
|
90
90
|
if (p)
|
|
91
|
-
return C.$offset =
|
|
92
|
-
var
|
|
93
|
-
return (C = this.local().add(
|
|
91
|
+
return C.$offset = x, C.$u = !1, C;
|
|
92
|
+
var L = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
|
|
93
|
+
return (C = this.local().add(x + L, n)).$offset = x, C.$x.$localOffset = L, C;
|
|
94
94
|
};
|
|
95
95
|
var g = i.format;
|
|
96
96
|
i.format = function(c) {
|
|
@@ -111,48 +111,48 @@ var mt = { 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, w) {
|
|
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, w);
|
|
117
|
+
var x = this.local(), C = r(c).local();
|
|
118
|
+
return f.call(x, C, p, w);
|
|
119
119
|
};
|
|
120
120
|
};
|
|
121
121
|
});
|
|
122
|
-
})(
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
var
|
|
122
|
+
})(ht);
|
|
123
|
+
var Yt = ht.exports;
|
|
124
|
+
const Kt = /* @__PURE__ */ ft(Yt);
|
|
125
|
+
var mt = { exports: {} };
|
|
126
126
|
(function(e, t) {
|
|
127
127
|
(function(n, a) {
|
|
128
128
|
e.exports = a();
|
|
129
|
-
})(
|
|
129
|
+
})(dt, 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 C =
|
|
137
|
-
return
|
|
134
|
+
var c = new Date(g), p = function(w, x) {
|
|
135
|
+
x === void 0 && (x = {});
|
|
136
|
+
var C = x.timeZoneName || "short", L = w + "|" + C, M = a[L];
|
|
137
|
+
return M || (M = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: w, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: C }), a[L] = M), M;
|
|
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
|
-
|
|
142
|
+
var w = f[p], x = w.type, C = w.value, L = n[x];
|
|
143
|
+
L >= 0 && (c[L] = parseInt(C, 10));
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
return (l.utc(
|
|
145
|
+
var M = c[3], Y = M === 24 ? 0 : M, E = c[0] + "-" + c[1] + "-" + c[2] + " " + Y + ":" + c[4] + ":" + c[5] + ":000", G = +g;
|
|
146
|
+
return (l.utc(E).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(),
|
|
150
|
+
var f, c = this.utcOffset(), p = this.toDate(), w = p.toLocaleString("en-US", { timeZone: g }), x = Math.round((p - new Date(w)) / 1e3 / 60), C = 15 * -Math.round(p.getTimezoneOffset() / 15) - x;
|
|
151
151
|
if (!Number(C))
|
|
152
152
|
f = this.utcOffset(0, h);
|
|
153
|
-
else if (f = l(
|
|
154
|
-
var
|
|
155
|
-
f = f.add(c -
|
|
153
|
+
else if (f = l(w, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(C, !0), h) {
|
|
154
|
+
var L = f.utcOffset();
|
|
155
|
+
f = f.add(c - L, "minute");
|
|
156
156
|
}
|
|
157
157
|
return f.$x.$timezone = g, f;
|
|
158
158
|
}, m.offsetName = function(g) {
|
|
@@ -168,17 +168,17 @@ var gt = { exports: {} };
|
|
|
168
168
|
var f = l(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
|
|
169
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, w = 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 = v(_ -= 60 * (
|
|
179
|
-
return
|
|
180
|
-
}(l.utc(g, c).valueOf(),
|
|
181
|
-
return
|
|
174
|
+
var x = function(Y, E, G) {
|
|
175
|
+
var _ = Y - 60 * E * 1e3, y = v(_, G);
|
|
176
|
+
if (E === y)
|
|
177
|
+
return [_, E];
|
|
178
|
+
var k = v(_ -= 60 * (y - E) * 1e3, G);
|
|
179
|
+
return y === k ? [_, y] : [Y - 60 * Math.min(y, k) * 1e3, Math.max(y, k)];
|
|
180
|
+
}(l.utc(g, c).valueOf(), w, p), C = x[0], L = x[1], M = l(C).utcOffset(L);
|
|
181
|
+
return M.$x.$timezone = p, M;
|
|
182
182
|
}, l.tz.guess = function() {
|
|
183
183
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
184
184
|
}, l.tz.setDefault = function(g) {
|
|
@@ -186,9 +186,9 @@ var gt = { exports: {} };
|
|
|
186
186
|
};
|
|
187
187
|
};
|
|
188
188
|
});
|
|
189
|
-
})(
|
|
190
|
-
var
|
|
191
|
-
const
|
|
189
|
+
})(mt);
|
|
190
|
+
var Ht = mt.exports;
|
|
191
|
+
const Nt = /* @__PURE__ */ ft(Ht), qe = {
|
|
192
192
|
// 组件通用文本
|
|
193
193
|
"dao-ru": "导入",
|
|
194
194
|
"quan-xuan": "全选",
|
|
@@ -258,38 +258,38 @@ const Wt = /* @__PURE__ */ ht(Nt), 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
|
+
}, Wt = {
|
|
262
262
|
zh_cn: qe,
|
|
263
263
|
en_us: Ae
|
|
264
264
|
};
|
|
265
265
|
let be = null;
|
|
266
|
-
function
|
|
266
|
+
function Zt(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 = At({
|
|
272
272
|
legacy: !1,
|
|
273
273
|
locale: "zh_cn",
|
|
274
274
|
fallbackLocale: "zh_cn",
|
|
275
|
-
messages:
|
|
275
|
+
messages: Wt
|
|
276
276
|
})), be;
|
|
277
277
|
}
|
|
278
278
|
function Ye() {
|
|
279
|
-
return be ||
|
|
279
|
+
return be || Zt();
|
|
280
280
|
}
|
|
281
281
|
function Ce() {
|
|
282
282
|
return Ye().global.t;
|
|
283
283
|
}
|
|
284
|
-
$e.extend(
|
|
285
|
-
$e.extend(
|
|
284
|
+
$e.extend(Kt);
|
|
285
|
+
$e.extend(Nt);
|
|
286
286
|
async function An(e, t) {
|
|
287
287
|
const { fields: n, range: a = 1 } = t;
|
|
288
288
|
if (!n) {
|
|
289
289
|
const l = Ce();
|
|
290
290
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
291
291
|
}
|
|
292
|
-
let s = new
|
|
292
|
+
let s = new Ie.Workbook();
|
|
293
293
|
await s.xlsx.load(e);
|
|
294
294
|
const o = {};
|
|
295
295
|
return s.eachSheet(function(l, r) {
|
|
@@ -305,45 +305,45 @@ async function An(e, t) {
|
|
|
305
305
|
}), o[l._name] = i;
|
|
306
306
|
}), s = null, o;
|
|
307
307
|
}
|
|
308
|
-
const
|
|
308
|
+
const gt = {
|
|
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 } = gt;
|
|
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 } = Gt();
|
|
319
|
+
r.columns = t, r.addRows(n), s && await Jt(l, r, s);
|
|
320
320
|
try {
|
|
321
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
|
+
it(v);
|
|
325
325
|
} catch (i) {
|
|
326
326
|
console.log(i);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
const e = new
|
|
329
|
+
function Gt() {
|
|
330
|
+
const e = new Ie.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 Jt(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 Xt(e, t, s);
|
|
342
342
|
break;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
|
-
async function
|
|
346
|
+
async function Xt(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 Qt(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 Qt(e, t, i, {
|
|
356
356
|
width: 100,
|
|
357
357
|
height: 50,
|
|
358
358
|
col: s._number - 1,
|
|
@@ -360,8 +360,8 @@ async function Qt(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: v } = await
|
|
363
|
+
async function Qt(e, t, n, a) {
|
|
364
|
+
const { col: s, row: o, width: l, height: r } = a, { success: i, base64: v } = await en(n, 0.3);
|
|
365
365
|
if (i) {
|
|
366
366
|
const m = e.addImage({
|
|
367
367
|
base64: v,
|
|
@@ -373,7 +373,7 @@ async function en(e, t, n, a) {
|
|
|
373
373
|
});
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
|
-
function
|
|
376
|
+
function en(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,13 +389,13 @@ function tn(e, t = 1) {
|
|
|
389
389
|
});
|
|
390
390
|
}
|
|
391
391
|
const Ue = "---";
|
|
392
|
-
async function
|
|
392
|
+
async function tn(e, t) {
|
|
393
393
|
const { fields: n, range: a = 1 } = t;
|
|
394
394
|
if (!n) {
|
|
395
395
|
const l = Ce();
|
|
396
396
|
throw new Error(l("excel.fieldsMappingRequired"));
|
|
397
397
|
}
|
|
398
|
-
let s = new
|
|
398
|
+
let s = new Ie.Workbook();
|
|
399
399
|
await s.xlsx.load(e);
|
|
400
400
|
const o = {};
|
|
401
401
|
return s.eachSheet(function(l, r) {
|
|
@@ -406,23 +406,23 @@ async function nn(e, t) {
|
|
|
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
|
-
b[
|
|
409
|
+
const p = c.buffer.toString("base64"), w = `data:image/${c.extension};base64,${p}`, x = `${Math.ceil(f.row)}_${Math.ceil(f.col)}`;
|
|
410
|
+
b[x] ? b[x].push(w) : b[x] = [w];
|
|
411
411
|
}
|
|
412
412
|
}), console.log("withImages-imageMap", b)), l.eachRow(function(g, h) {
|
|
413
413
|
if (h > a) {
|
|
414
414
|
let f = {}, c = !0;
|
|
415
415
|
Object.keys(v).forEach((p) => {
|
|
416
|
-
var
|
|
417
|
-
let [
|
|
418
|
-
const C = g.getCell(
|
|
419
|
-
let
|
|
420
|
-
if (
|
|
421
|
-
const Y = C._column._number,
|
|
422
|
-
|
|
416
|
+
var M;
|
|
417
|
+
let [w, x] = v[p].split(Ue);
|
|
418
|
+
const C = g.getCell(w);
|
|
419
|
+
let L;
|
|
420
|
+
if (x == "image" && m) {
|
|
421
|
+
const Y = C._column._number, E = `${h}_${Y}`;
|
|
422
|
+
L = b[E] || "";
|
|
423
423
|
} else
|
|
424
|
-
C.result != null ?
|
|
425
|
-
|
|
424
|
+
C.result != null ? L = C.result : (M = C.value) != null && M.richText ? L = C.value.richText.reduce((Y, E) => Y + E.text, "") : C.type == 4 && C.value ? L = $e(C.value).utc().format("YYYY-MM-DD HH:mm:ss") : L = C.value;
|
|
425
|
+
L && x == "option" && (L = L.split(Ue)[1]), f[p] = L, L && (c = !1);
|
|
426
426
|
}), c || i.push(f);
|
|
427
427
|
}
|
|
428
428
|
}), o[l._name] = i;
|
|
@@ -430,7 +430,7 @@ async function nn(e, t) {
|
|
|
430
430
|
}
|
|
431
431
|
}), s = null, o;
|
|
432
432
|
}
|
|
433
|
-
const
|
|
433
|
+
const nn = {
|
|
434
434
|
date: "yyyy-mm-dd",
|
|
435
435
|
number: "0",
|
|
436
436
|
string: "@"
|
|
@@ -440,7 +440,7 @@ 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 } = gt, o = t[a.name];
|
|
444
444
|
if (!o)
|
|
445
445
|
continue;
|
|
446
446
|
const { tableHeader: l, tableData: r } = o;
|
|
@@ -457,19 +457,12 @@ async function on(e, t) {
|
|
|
457
457
|
};
|
|
458
458
|
}), a.columns = l, a.addRows(r), l.forEach((i) => {
|
|
459
459
|
const { header: v, key: m, width: b, option: g, numFmt: h, locked: f } = i, c = a.getColumn(m);
|
|
460
|
-
if (c.numFmt =
|
|
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) {
|
|
460
|
+
if (c.numFmt = nn[h] || h, c.width = b || s, c.protection = { locked: f === !0 }, g) {
|
|
468
461
|
const p = n.addWorksheet(m);
|
|
469
|
-
p.state = "hidden", p.getColumn(1).values = g.map((
|
|
470
|
-
if (
|
|
462
|
+
p.state = "hidden", p.getColumn(1).values = g.map((w) => `${w.label}${Ue}${w.value}`), Array(100).fill("").forEach((w, x) => {
|
|
463
|
+
if (x > 0) {
|
|
471
464
|
const C = Ce();
|
|
472
|
-
a.getCell(`${c.letter}${
|
|
465
|
+
a.getCell(`${c.letter}${x}`).dataValidation = {
|
|
473
466
|
type: "list",
|
|
474
467
|
formulae: [`${m}!$A$1:$A$${g.length}`],
|
|
475
468
|
showErrorMessage: !0,
|
|
@@ -489,13 +482,13 @@ async function on(e, t) {
|
|
|
489
482
|
const a = await n.xlsx.writeBuffer(), s = new File([a], e, {
|
|
490
483
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
491
484
|
});
|
|
492
|
-
|
|
485
|
+
it(s);
|
|
493
486
|
} catch (a) {
|
|
494
487
|
console.log(a);
|
|
495
488
|
}
|
|
496
489
|
}
|
|
497
490
|
function ln(e) {
|
|
498
|
-
const t = Ce(), n = new
|
|
491
|
+
const t = Ce(), n = new Ie.Workbook();
|
|
499
492
|
return n.creator = "distributor System", n.lastModifiedBy = "distributor System", n.created = /* @__PURE__ */ new Date(), n.modified = /* @__PURE__ */ new Date(), n.lastPrinted = /* @__PURE__ */ new Date(), Object.keys(e).sort((s, o) => {
|
|
500
493
|
const l = e[s].sort ?? 0, r = e[o].sort ?? 0;
|
|
501
494
|
return l - r;
|
|
@@ -537,10 +530,10 @@ function Rn(e) {
|
|
|
537
530
|
}
|
|
538
531
|
return t;
|
|
539
532
|
}
|
|
540
|
-
function
|
|
533
|
+
function pt(e, t = " ") {
|
|
541
534
|
return e ? e.split(t).filter((n) => n.trim()) : [];
|
|
542
535
|
}
|
|
543
|
-
class
|
|
536
|
+
class Qe {
|
|
544
537
|
constructor(t, n = ["label", "value", "labelEn"]) {
|
|
545
538
|
this.list = t.map((a) => ({
|
|
546
539
|
...a,
|
|
@@ -576,7 +569,7 @@ class et {
|
|
|
576
569
|
}
|
|
577
570
|
function Bn(e, t = [], n = "i18nName") {
|
|
578
571
|
if (e.length == 0)
|
|
579
|
-
return new
|
|
572
|
+
return new Qe([]);
|
|
580
573
|
if (t.length < 2) {
|
|
581
574
|
const s = Ce();
|
|
582
575
|
throw new Error(s("tools.keysLengthError"));
|
|
@@ -587,7 +580,7 @@ function Bn(e, t = [], n = "i18nName") {
|
|
|
587
580
|
r === 0 ? o.label = s[l] : r === 1 ? o.value = s[l] : o[l] = s[l];
|
|
588
581
|
}), o;
|
|
589
582
|
});
|
|
590
|
-
return new
|
|
583
|
+
return new Qe(a);
|
|
591
584
|
}
|
|
592
585
|
function Yn(e) {
|
|
593
586
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
@@ -631,6 +624,10 @@ const Se = (e, t) => {
|
|
|
631
624
|
type: Number,
|
|
632
625
|
default: void 0
|
|
633
626
|
},
|
|
627
|
+
minLimit: {
|
|
628
|
+
type: Number,
|
|
629
|
+
default: void 0
|
|
630
|
+
},
|
|
634
631
|
optionClick: {
|
|
635
632
|
type: Function,
|
|
636
633
|
default: () => {
|
|
@@ -657,103 +654,107 @@ const Se = (e, t) => {
|
|
|
657
654
|
}),
|
|
658
655
|
emits: /* @__PURE__ */ Je(["success", "change", "changeAll"], ["update:modelValue"]),
|
|
659
656
|
setup(e, { emit: t }) {
|
|
660
|
-
const n = e, a =
|
|
657
|
+
const n = e, a = It(), { t: s, locale: o } = pe(), l = Tt(e, "modelValue"), r = ce(() => a["value-key"] != null), i = P(""), v = ce(() => {
|
|
661
658
|
if (a.remote !== void 0)
|
|
662
659
|
return n.data;
|
|
663
|
-
const
|
|
664
|
-
if (
|
|
665
|
-
return
|
|
666
|
-
const { label: $, labelEn: ye } =
|
|
667
|
-
let
|
|
668
|
-
return
|
|
669
|
-
(de) => de[
|
|
670
|
-
) :
|
|
660
|
+
const y = pt(i.value), { data: k, labelValue: T } = n, J = k || g.value;
|
|
661
|
+
if (y.length == 0)
|
|
662
|
+
return J;
|
|
663
|
+
const { label: $, labelEn: ye } = T;
|
|
664
|
+
let O = o.value == "en_us" ? ye || "i18nName" : $;
|
|
665
|
+
return y.length == 1 ? J.filter(
|
|
666
|
+
(de) => de[O].toLowerCase().includes(y[0].toLowerCase())
|
|
667
|
+
) : J.filter((de) => {
|
|
671
668
|
let ve = !1;
|
|
672
|
-
return ve =
|
|
669
|
+
return ve = y.some((Le) => de[O].toLowerCase() == Le.toLowerCase()), ve;
|
|
673
670
|
});
|
|
674
671
|
}), m = ce({
|
|
675
672
|
get() {
|
|
676
673
|
return a.multiple == null || l.value == null ? !1 : l.value.length == v.value.length;
|
|
677
674
|
},
|
|
678
|
-
set(
|
|
679
|
-
return
|
|
675
|
+
set(y) {
|
|
676
|
+
return y;
|
|
680
677
|
}
|
|
681
678
|
}), b = t, g = P([]), h = async () => {
|
|
682
|
-
const { data:
|
|
683
|
-
g.value = [...
|
|
679
|
+
const { data: y } = await n.api();
|
|
680
|
+
g.value = [...y], b("success", g);
|
|
684
681
|
};
|
|
685
682
|
n.api && h();
|
|
686
|
-
function f(
|
|
687
|
-
b("change",
|
|
683
|
+
function f(y) {
|
|
684
|
+
b("change", y), c.value && we(() => {
|
|
688
685
|
n.optionClick && n.optionClick(c.value), c.value = null;
|
|
689
686
|
});
|
|
690
687
|
}
|
|
691
688
|
const c = P(null);
|
|
692
|
-
function p(
|
|
693
|
-
c.value =
|
|
689
|
+
function p(y) {
|
|
690
|
+
c.value = y;
|
|
694
691
|
}
|
|
695
|
-
const
|
|
696
|
-
if (
|
|
692
|
+
const w = n.labelValue.label.split("-"), x = (y) => {
|
|
693
|
+
if (w.length == 1) {
|
|
697
694
|
if (n.changeLocal)
|
|
698
|
-
return s(
|
|
699
|
-
let k = o.value == "en_us" ?
|
|
700
|
-
return k = k ||
|
|
695
|
+
return s(y[n.labelValue.label]);
|
|
696
|
+
let k = o.value == "en_us" ? y[n.labelValue.labelEn || "i18nName"] : y[n.labelValue.label];
|
|
697
|
+
return k = k || y[n.labelValue.label], k + "";
|
|
701
698
|
} else {
|
|
702
699
|
let k = [];
|
|
703
|
-
return
|
|
704
|
-
k.push(
|
|
700
|
+
return w.forEach((T) => {
|
|
701
|
+
k.push(y[T]);
|
|
705
702
|
}), k.join("-");
|
|
706
703
|
}
|
|
707
704
|
};
|
|
708
|
-
function C(
|
|
705
|
+
function C(y) {
|
|
709
706
|
let k = n.data ? n.data : g.value;
|
|
710
|
-
l.value =
|
|
707
|
+
l.value = y ? k.map((T) => r.value ? T : T[n.labelValue.value]) : [], we(() => {
|
|
711
708
|
b("change", l.value), b("changeAll", l.value, k);
|
|
712
709
|
});
|
|
713
710
|
}
|
|
714
|
-
function
|
|
715
|
-
b("change", r.value ?
|
|
716
|
-
n.optionClick && n.optionClick(
|
|
711
|
+
function L(y) {
|
|
712
|
+
b("change", r.value ? y : y[n.labelValue.value]), we(() => {
|
|
713
|
+
n.optionClick && n.optionClick(y);
|
|
717
714
|
});
|
|
718
715
|
}
|
|
719
|
-
function
|
|
720
|
-
|
|
716
|
+
function M(y) {
|
|
717
|
+
const k = r.value ? y : y[n.labelValue.value], T = r.value ? l.value.some((J) => J[n.labelValue.value] === y[n.labelValue.value]) : l.value.includes(k);
|
|
718
|
+
return !!(n.maxLimit > 0 && l.value.length >= n.maxLimit && !T || n.minLimit > 0 && l.value.length === n.minLimit && T);
|
|
721
719
|
}
|
|
722
|
-
function Y(
|
|
723
|
-
return
|
|
720
|
+
function Y(y) {
|
|
721
|
+
return y.map((k) => ({
|
|
724
722
|
...k,
|
|
725
|
-
label:
|
|
723
|
+
label: x(k),
|
|
726
724
|
value: r.value ? k : k[n.labelValue.value]
|
|
727
725
|
}));
|
|
728
726
|
}
|
|
729
|
-
const
|
|
730
|
-
|
|
727
|
+
const E = P([]), G = n.data ? n.data : g.value;
|
|
728
|
+
E.value = Y(G), Pe(
|
|
731
729
|
() => n.data ? n.data : g.value,
|
|
732
|
-
(
|
|
733
|
-
var
|
|
734
|
-
const k = Y(
|
|
735
|
-
if (k.length !==
|
|
736
|
-
|
|
730
|
+
(y) => {
|
|
731
|
+
var T;
|
|
732
|
+
const k = Y(y);
|
|
733
|
+
if (k.length !== E.value.length)
|
|
734
|
+
E.value = k;
|
|
737
735
|
else {
|
|
738
|
-
let
|
|
736
|
+
let J = !1;
|
|
739
737
|
for (let $ = 0; $ < k.length; $++)
|
|
740
|
-
if (k[$].value !== ((
|
|
741
|
-
|
|
738
|
+
if (k[$].value !== ((T = E.value[$]) == null ? void 0 : T.value)) {
|
|
739
|
+
J = !0;
|
|
742
740
|
break;
|
|
743
741
|
}
|
|
744
|
-
|
|
742
|
+
J && (E.value = k);
|
|
745
743
|
}
|
|
746
744
|
},
|
|
747
745
|
{ deep: !0 }
|
|
748
746
|
);
|
|
749
|
-
const _ = ce(() =>
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
747
|
+
const _ = ce(() => a.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? E.value.map((y) => ({
|
|
748
|
+
...y,
|
|
749
|
+
disabled: M(y)
|
|
750
|
+
})) : E.value);
|
|
751
|
+
return (y, k) => {
|
|
752
|
+
const T = q("el-checkbox"), J = q("el-select-v2"), $ = q("el-option"), ye = q("el-select");
|
|
753
|
+
return H(a).v2 != null ? (I(), N(J, ue({
|
|
753
754
|
key: 0,
|
|
754
755
|
options: _.value,
|
|
755
756
|
modelValue: l.value,
|
|
756
|
-
"onUpdate:modelValue": k[1] || (k[1] = (
|
|
757
|
+
"onUpdate:modelValue": k[1] || (k[1] = (O) => l.value = O)
|
|
757
758
|
}, H(a), {
|
|
758
759
|
filterable: "",
|
|
759
760
|
"collapse-tags": "",
|
|
@@ -761,26 +762,26 @@ const Se = (e, t) => {
|
|
|
761
762
|
clearable: "",
|
|
762
763
|
onChange: f,
|
|
763
764
|
onClear: f
|
|
764
|
-
}),
|
|
765
|
-
default:
|
|
765
|
+
}), lt({
|
|
766
|
+
default: z(({ item: O }) => [
|
|
766
767
|
re("div", {
|
|
767
|
-
onClick: (he) => p(
|
|
768
|
-
},
|
|
768
|
+
onClick: (he) => p(O)
|
|
769
|
+
}, te(O.label), 9, sn)
|
|
769
770
|
]),
|
|
770
771
|
_: 2
|
|
771
772
|
}, [
|
|
772
773
|
H(a).multiple != null ? {
|
|
773
774
|
name: "header",
|
|
774
|
-
fn:
|
|
775
|
-
|
|
776
|
-
|
|
775
|
+
fn: z(() => [
|
|
776
|
+
ee(y.$slots, "header", {}, () => [
|
|
777
|
+
V(T, {
|
|
777
778
|
class: "mgl20",
|
|
778
779
|
modelValue: m.value,
|
|
779
|
-
"onUpdate:modelValue": k[0] || (k[0] = (
|
|
780
|
+
"onUpdate:modelValue": k[0] || (k[0] = (O) => m.value = O),
|
|
780
781
|
onChange: C
|
|
781
782
|
}, {
|
|
782
|
-
default:
|
|
783
|
-
ne(
|
|
783
|
+
default: z(() => [
|
|
784
|
+
ne(te(y.$t("quan-xuan")), 1)
|
|
784
785
|
]),
|
|
785
786
|
_: 1
|
|
786
787
|
}, 8, ["modelValue"])
|
|
@@ -788,44 +789,44 @@ const Se = (e, t) => {
|
|
|
788
789
|
]),
|
|
789
790
|
key: "0"
|
|
790
791
|
} : void 0
|
|
791
|
-
]), 1040, ["options", "modelValue"])) : (
|
|
792
|
+
]), 1040, ["options", "modelValue"])) : (I(), N(ye, ue({
|
|
792
793
|
key: 1,
|
|
793
794
|
modelValue: l.value,
|
|
794
|
-
"onUpdate:modelValue": k[3] || (k[3] = (
|
|
795
|
+
"onUpdate:modelValue": k[3] || (k[3] = (O) => l.value = O),
|
|
795
796
|
filterable: "",
|
|
796
797
|
"collapse-tags": "",
|
|
797
798
|
"collapse-tags-tooltip": "",
|
|
798
|
-
"filter-method": H(a).remote != null ? void 0 : (
|
|
799
|
+
"filter-method": H(a).remote != null ? void 0 : (O) => i.value = O,
|
|
799
800
|
clearable: ""
|
|
800
801
|
}, H(a), { onClear: e.optionClick }), {
|
|
801
|
-
default:
|
|
802
|
-
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ?
|
|
803
|
-
|
|
802
|
+
default: z(() => [
|
|
803
|
+
H(a).multiple != null && e.showCheckAll && e.maxLimit == null ? ee(y.$slots, "header", { key: 0 }, () => [
|
|
804
|
+
V(T, {
|
|
804
805
|
class: "mgl20",
|
|
805
806
|
modelValue: m.value,
|
|
806
|
-
"onUpdate:modelValue": k[2] || (k[2] = (
|
|
807
|
+
"onUpdate:modelValue": k[2] || (k[2] = (O) => m.value = O),
|
|
807
808
|
onChange: C
|
|
808
809
|
}, {
|
|
809
|
-
default:
|
|
810
|
-
ne(
|
|
810
|
+
default: z(() => [
|
|
811
|
+
ne(te(y.$t("quan-xuan")), 1)
|
|
811
812
|
]),
|
|
812
813
|
_: 1
|
|
813
814
|
}, 8, ["modelValue"])
|
|
814
815
|
], !0) : fe("", !0),
|
|
815
|
-
(
|
|
816
|
+
(I(!0), ie(Oe, null, at(v.value, (O, he) => (I(), N($, {
|
|
816
817
|
key: he,
|
|
817
|
-
label:
|
|
818
|
-
disabled: H(a).multiple != null && e.maxLimit > 0 ?
|
|
819
|
-
onClick: Ve((de) =>
|
|
820
|
-
value: r.value ?
|
|
818
|
+
label: x(O),
|
|
819
|
+
disabled: H(a).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? M(O) : !1,
|
|
820
|
+
onClick: Ve((de) => L(O), ["stop"]),
|
|
821
|
+
value: r.value ? O : O[e.labelValue.value]
|
|
821
822
|
}, null, 8, ["label", "disabled", "onClick", "value"]))), 128))
|
|
822
823
|
]),
|
|
823
824
|
_: 3
|
|
824
825
|
}, 16, ["modelValue", "filter-method", "onClear"]));
|
|
825
826
|
};
|
|
826
827
|
}
|
|
827
|
-
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-
|
|
828
|
-
const un =
|
|
828
|
+
}, cn = /* @__PURE__ */ Se(rn, [["__scopeId", "data-v-078a95a6"]]);
|
|
829
|
+
const un = nt({
|
|
829
830
|
props: {
|
|
830
831
|
name: {
|
|
831
832
|
tyepe: String,
|
|
@@ -834,15 +835,15 @@ const un = ot({
|
|
|
834
835
|
}
|
|
835
836
|
});
|
|
836
837
|
function dn(e, t, n, a, s, o) {
|
|
837
|
-
const l =
|
|
838
|
-
return
|
|
839
|
-
default:
|
|
840
|
-
(
|
|
838
|
+
const l = q("el-icon");
|
|
839
|
+
return I(), N(l, { class: "cmp-icon" }, {
|
|
840
|
+
default: z(() => [
|
|
841
|
+
(I(), N(st(e.name)))
|
|
841
842
|
]),
|
|
842
843
|
_: 1
|
|
843
844
|
});
|
|
844
845
|
}
|
|
845
|
-
const
|
|
846
|
+
const yt = /* @__PURE__ */ Se(un, [["render", dn], ["__scopeId", "data-v-733f9daa"]]), Gn = {
|
|
846
847
|
__name: "index",
|
|
847
848
|
emits: ["ok", "no"],
|
|
848
849
|
setup(e, { emit: t }) {
|
|
@@ -853,14 +854,14 @@ const vt = /* @__PURE__ */ Se(un, [["render", dn], ["__scopeId", "data-v-733f9da
|
|
|
853
854
|
n("no");
|
|
854
855
|
}
|
|
855
856
|
return (o, l) => {
|
|
856
|
-
const r =
|
|
857
|
-
return
|
|
858
|
-
|
|
857
|
+
const r = q("el-popconfirm");
|
|
858
|
+
return I(), ie("span", null, [
|
|
859
|
+
V(r, ue(o.$attrs, {
|
|
859
860
|
onConfirm: H(a),
|
|
860
861
|
onCancel: s
|
|
861
862
|
}), {
|
|
862
|
-
reference:
|
|
863
|
-
|
|
863
|
+
reference: z(() => [
|
|
864
|
+
ee(o.$slots, "default")
|
|
864
865
|
]),
|
|
865
866
|
_: 3
|
|
866
867
|
}, 16, ["onConfirm"])
|
|
@@ -890,7 +891,7 @@ const fn = ["accept"], hn = {
|
|
|
890
891
|
async function o(l) {
|
|
891
892
|
s.value = !0;
|
|
892
893
|
let r = l.target.files[0];
|
|
893
|
-
const i = await
|
|
894
|
+
const i = await tn(r, n.fields).catch(() => {
|
|
894
895
|
s.value = !1;
|
|
895
896
|
}).finally(() => {
|
|
896
897
|
a.value.value = null;
|
|
@@ -900,17 +901,17 @@ const fn = ["accept"], hn = {
|
|
|
900
901
|
});
|
|
901
902
|
}
|
|
902
903
|
return (l, r) => {
|
|
903
|
-
const i =
|
|
904
|
-
return
|
|
905
|
-
|
|
904
|
+
const i = q("el-button");
|
|
905
|
+
return I(), ie("span", null, [
|
|
906
|
+
V(i, ue({
|
|
906
907
|
type: "primary",
|
|
907
908
|
loading: s.value,
|
|
908
909
|
class: "mgr10",
|
|
909
910
|
onClick: r[0] || (r[0] = (v) => a.value.click())
|
|
910
911
|
}, l.$attrs), {
|
|
911
|
-
default:
|
|
912
|
-
|
|
913
|
-
ne(
|
|
912
|
+
default: z(() => [
|
|
913
|
+
ee(l.$slots, "default", {}, () => [
|
|
914
|
+
ne(te(l.$t("dao-ru")), 1)
|
|
914
915
|
], !0)
|
|
915
916
|
]),
|
|
916
917
|
_: 3
|
|
@@ -933,7 +934,7 @@ function je(e) {
|
|
|
933
934
|
const { key: a, type: s, option: o = {}, value: l, dateType: r = "date" } = n;
|
|
934
935
|
if (a)
|
|
935
936
|
if (s == "input" && (o != null && o.multiple))
|
|
936
|
-
t[a] =
|
|
937
|
+
t[a] = pt(l);
|
|
937
938
|
else if (s == "date")
|
|
938
939
|
if (r.includes("range")) {
|
|
939
940
|
const [i, v] = a;
|
|
@@ -963,8 +964,8 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
963
964
|
function m() {
|
|
964
965
|
s("confirm");
|
|
965
966
|
}
|
|
966
|
-
function b(
|
|
967
|
-
|
|
967
|
+
function b(w) {
|
|
968
|
+
w.option.onClear && w.option.onClear(), s("confirm");
|
|
968
969
|
}
|
|
969
970
|
function g() {
|
|
970
971
|
s("reset");
|
|
@@ -975,67 +976,67 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
975
976
|
function f() {
|
|
976
977
|
return je(a.form.items);
|
|
977
978
|
}
|
|
978
|
-
const c =
|
|
979
|
+
const c = ct(a.form.items);
|
|
979
980
|
function p() {
|
|
980
|
-
a.form.items.forEach((
|
|
981
|
-
const
|
|
982
|
-
|
|
981
|
+
a.form.items.forEach((w) => {
|
|
982
|
+
const x = c.find((C) => C.key == w.key);
|
|
983
|
+
x && (w.value = x.value);
|
|
983
984
|
});
|
|
984
985
|
}
|
|
985
|
-
return t({ getPrm: f, reset: p }), (
|
|
986
|
-
const C =
|
|
987
|
-
return
|
|
986
|
+
return t({ getPrm: f, reset: p }), (w, x) => {
|
|
987
|
+
const C = q("el-input"), L = q("el-date-picker"), M = q("el-form-item"), Y = q("el-form"), E = q("el-link"), G = q("el-button");
|
|
988
|
+
return I(), ie("div", {
|
|
988
989
|
class: "searchBar-container mgt10 mgb10",
|
|
989
|
-
onKeydown:
|
|
990
|
+
onKeydown: Dt(m, ["enter"])
|
|
990
991
|
}, [
|
|
991
992
|
re("div", {
|
|
992
993
|
class: "searchBar",
|
|
993
|
-
style:
|
|
994
|
+
style: zt({ height: o.value ? "auto" : "42px" })
|
|
994
995
|
}, [
|
|
995
|
-
|
|
996
|
+
V(Y, {
|
|
996
997
|
inline: "",
|
|
997
998
|
model: e.form.data
|
|
998
999
|
}, {
|
|
999
|
-
default:
|
|
1000
|
-
(
|
|
1000
|
+
default: z(() => [
|
|
1001
|
+
(I(!0), ie(Oe, null, at(e.form.items.filter((_) => !_.hidden), (_) => (I(), ie(Oe, {
|
|
1001
1002
|
key: _.key
|
|
1002
1003
|
}, [
|
|
1003
|
-
_.type == "br" ? (
|
|
1004
|
+
_.type == "br" ? (I(), ie("br", mn)) : (I(), N(M, {
|
|
1004
1005
|
key: 1,
|
|
1005
1006
|
label: _.name
|
|
1006
1007
|
}, {
|
|
1007
|
-
default:
|
|
1008
|
-
var
|
|
1008
|
+
default: z(() => {
|
|
1009
|
+
var y, k;
|
|
1009
1010
|
return [
|
|
1010
|
-
_.type === "input" ? (
|
|
1011
|
+
_.type === "input" ? (I(), N(C, {
|
|
1011
1012
|
key: 0,
|
|
1012
1013
|
modelValue: _.value,
|
|
1013
|
-
"onUpdate:modelValue": (
|
|
1014
|
-
class:
|
|
1015
|
-
placeholder:
|
|
1014
|
+
"onUpdate:modelValue": (T) => _.value = T,
|
|
1015
|
+
class: rt(((y = _.option) == null ? void 0 : y.class) || "w150"),
|
|
1016
|
+
placeholder: w.$t("qing-shu-ru"),
|
|
1016
1017
|
clearable: ""
|
|
1017
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (
|
|
1018
|
-
_.type === "select" ? (
|
|
1018
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "class", "placeholder"])) : _.type === "custom" ? (I(), N(st(_.render), { key: 1 })) : fe("", !0),
|
|
1019
|
+
_.type === "select" ? (I(), N(cn, ue({
|
|
1019
1020
|
key: 2,
|
|
1020
1021
|
class: ((k = _.option) == null ? void 0 : k.class) || "w150",
|
|
1021
1022
|
modelValue: _.value,
|
|
1022
|
-
"onUpdate:modelValue": (
|
|
1023
|
+
"onUpdate:modelValue": (T) => _.value = T
|
|
1023
1024
|
}, { ref_for: !0 }, _.option, {
|
|
1024
1025
|
onChange: m,
|
|
1025
|
-
onClear: (
|
|
1026
|
+
onClear: (T) => b(_)
|
|
1026
1027
|
}), null, 16, ["class", "modelValue", "onUpdate:modelValue", "onClear"])) : fe("", !0),
|
|
1027
|
-
_.type === "date" ? (
|
|
1028
|
+
_.type === "date" ? (I(), N(L, ue({
|
|
1028
1029
|
key: 3,
|
|
1029
1030
|
class: { datetimerange: "w300", daterange: "w200" }[_.dateType] || "w100",
|
|
1030
1031
|
modelValue: _.value,
|
|
1031
|
-
"onUpdate:modelValue": (
|
|
1032
|
+
"onUpdate:modelValue": (T) => _.value = T,
|
|
1032
1033
|
"value-format": i[_.dateType] || "YYYY-MM-DD",
|
|
1033
1034
|
type: _.dateType || "date",
|
|
1034
|
-
onFocus: (
|
|
1035
|
-
onChange: (
|
|
1036
|
-
placeholder:
|
|
1037
|
-
"start-placeholder":
|
|
1038
|
-
"end-placeholder":
|
|
1035
|
+
onFocus: (T) => l.value = _,
|
|
1036
|
+
onChange: (T) => h(),
|
|
1037
|
+
placeholder: w.$t("qing-xuan-ze"),
|
|
1038
|
+
"start-placeholder": w.$t("kai-shi-shi-jian"),
|
|
1039
|
+
"end-placeholder": w.$t("jie-shu-shi-jian")
|
|
1039
1040
|
}, { ref_for: !0 }, _.option), null, 16, ["class", "modelValue", "onUpdate:modelValue", "value-format", "type", "onFocus", "onChange", "placeholder", "start-placeholder", "end-placeholder"])) : fe("", !0)
|
|
1040
1041
|
];
|
|
1041
1042
|
}),
|
|
@@ -1048,49 +1049,49 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1048
1049
|
], 4),
|
|
1049
1050
|
re("div", gn, [
|
|
1050
1051
|
re("div", pn, [
|
|
1051
|
-
|
|
1052
|
+
ee(w.$slots, "table-header-left", {}, void 0, !0)
|
|
1052
1053
|
]),
|
|
1053
1054
|
re("div", yn, [
|
|
1054
|
-
|
|
1055
|
+
V(E, {
|
|
1055
1056
|
underline: "never",
|
|
1056
1057
|
class: "mgr10",
|
|
1057
|
-
onClick:
|
|
1058
|
+
onClick: x[0] || (x[0] = () => {
|
|
1058
1059
|
s("visibleChange", !o.value), o.value = !o.value;
|
|
1059
1060
|
})
|
|
1060
1061
|
}, {
|
|
1061
|
-
default:
|
|
1062
|
-
|
|
1062
|
+
default: z(() => [
|
|
1063
|
+
V(yt, {
|
|
1063
1064
|
name: o.value ? "ArrowUp" : "ArrowDown"
|
|
1064
1065
|
}, null, 8, ["name"]),
|
|
1065
|
-
ne(" " +
|
|
1066
|
+
ne(" " + te(v.value), 1)
|
|
1066
1067
|
]),
|
|
1067
1068
|
_: 1
|
|
1068
1069
|
}),
|
|
1069
|
-
|
|
1070
|
+
V(G, {
|
|
1070
1071
|
type: "primary",
|
|
1071
1072
|
onClick: m
|
|
1072
1073
|
}, {
|
|
1073
|
-
default:
|
|
1074
|
-
ne(
|
|
1074
|
+
default: z(() => [
|
|
1075
|
+
ne(te(w.$t("shai-xuan")), 1)
|
|
1075
1076
|
]),
|
|
1076
1077
|
_: 1
|
|
1077
1078
|
}),
|
|
1078
|
-
|
|
1079
|
+
V(G, {
|
|
1079
1080
|
type: "primary",
|
|
1080
1081
|
onClick: g
|
|
1081
1082
|
}, {
|
|
1082
|
-
default:
|
|
1083
|
-
ne(
|
|
1083
|
+
default: z(() => [
|
|
1084
|
+
ne(te(w.$t("chong-zhi")), 1)
|
|
1084
1085
|
]),
|
|
1085
1086
|
_: 1
|
|
1086
1087
|
}),
|
|
1087
|
-
|
|
1088
|
+
ee(w.$slots, "btn", {}, void 0, !0)
|
|
1088
1089
|
])
|
|
1089
1090
|
])
|
|
1090
1091
|
], 32);
|
|
1091
1092
|
};
|
|
1092
1093
|
}
|
|
1093
|
-
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]),
|
|
1094
|
+
}, bn = /* @__PURE__ */ Se(vn, [["__scopeId", "data-v-6c7679eb"]]), vt = {
|
|
1094
1095
|
// 分页参数名
|
|
1095
1096
|
pageNoKey: "pageNo",
|
|
1096
1097
|
// 页码参数名
|
|
@@ -1120,7 +1121,7 @@ const mn = { key: 0 }, gn = { class: "btns" }, pn = { class: "left" }, yn = { cl
|
|
|
1120
1121
|
enableCellCopy: !0
|
|
1121
1122
|
// 是否启用单元格选区复制功能
|
|
1122
1123
|
};
|
|
1123
|
-
let _e = { ...
|
|
1124
|
+
let _e = { ...vt };
|
|
1124
1125
|
function Xn(e) {
|
|
1125
1126
|
_e = {
|
|
1126
1127
|
..._e,
|
|
@@ -1135,7 +1136,7 @@ function wn() {
|
|
|
1135
1136
|
return _e;
|
|
1136
1137
|
}
|
|
1137
1138
|
function Qn() {
|
|
1138
|
-
_e = { ...
|
|
1139
|
+
_e = { ...vt };
|
|
1139
1140
|
}
|
|
1140
1141
|
const Cn = { class: "center" }, xn = {
|
|
1141
1142
|
__name: "index",
|
|
@@ -1174,24 +1175,24 @@ const Cn = { class: "center" }, xn = {
|
|
|
1174
1175
|
}
|
|
1175
1176
|
},
|
|
1176
1177
|
setup(e, { expose: t }) {
|
|
1177
|
-
const { t: n, locale: a } = pe(), s =
|
|
1178
|
+
const { t: n, locale: a } = pe(), s = Ut(), o = wn(), l = e, r = P(!1), i = P([]);
|
|
1178
1179
|
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 = []);
|
|
1179
1180
|
const v = ce(() => {
|
|
1180
1181
|
const d = s.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1181
1182
|
return l.id ? `listPageId-${d}-${l.id}` : `listPageId-${d}`;
|
|
1182
|
-
}), m =
|
|
1183
|
+
}), m = ct(l.searchForm.items), b = l.searchForm.pageNoKey || o.pageNoKey, g = l.searchForm.pageSizeKey || o.pageSizeKey, h = Ee({
|
|
1183
1184
|
[b]: 1,
|
|
1184
1185
|
[g]: l.searchForm.defaultPageSize || o.defaultPageSize,
|
|
1185
1186
|
total: 0
|
|
1186
|
-
}), f = P(null), c = P(null), p = P(450),
|
|
1187
|
+
}), f = P(null), c = P(null), p = P(450), w = Re(() => {
|
|
1187
1188
|
we(() => {
|
|
1188
1189
|
if (!c.value)
|
|
1189
1190
|
return;
|
|
1190
|
-
const u = c.value.getBoundingClientRect(), S = window.innerHeight,
|
|
1191
|
-
p.value = Math.max(Z,
|
|
1191
|
+
const u = c.value.getBoundingClientRect(), S = window.innerHeight, D = u.top, R = 100, Z = S - D - R, A = 200;
|
|
1192
|
+
p.value = Math.max(Z, A);
|
|
1192
1193
|
});
|
|
1193
|
-
}, 100),
|
|
1194
|
-
|
|
1194
|
+
}, 100), x = () => {
|
|
1195
|
+
w();
|
|
1195
1196
|
}, C = () => {
|
|
1196
1197
|
if (!l.searchForm.enableCellCopy && !o.enableCellCopy)
|
|
1197
1198
|
return !1;
|
|
@@ -1199,55 +1200,55 @@ const Cn = { class: "center" }, xn = {
|
|
|
1199
1200
|
if (!d || !d.$el)
|
|
1200
1201
|
return !1;
|
|
1201
1202
|
const u = d.$el;
|
|
1202
|
-
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown",
|
|
1203
|
+
return u.classList.add("cell-copy-enabled"), u.setAttribute("tabindex", "-1"), u.removeEventListener("mousedown", O), u.removeEventListener("mousemove", he), u.removeEventListener("mouseup", de), u.removeEventListener("keydown", Te), u.addEventListener("mousedown", O), u.addEventListener("mousemove", he), u.addEventListener("mouseup", de), u.addEventListener("keydown", Te), !0;
|
|
1203
1204
|
};
|
|
1204
|
-
|
|
1205
|
-
|
|
1205
|
+
ot(() => {
|
|
1206
|
+
w(), window.addEventListener("resize", x), (l.searchForm.enableCellCopy || o.enableCellCopy) && (document.addEventListener("mouseup", He), document.addEventListener("mousedown", Ne), setTimeout(() => {
|
|
1206
1207
|
C();
|
|
1207
1208
|
}, 500));
|
|
1208
|
-
}),
|
|
1209
|
+
}), Mt(() => {
|
|
1209
1210
|
(l.searchForm.enableCellCopy || o.enableCellCopy) && setTimeout(() => {
|
|
1210
1211
|
C();
|
|
1211
1212
|
}, 500);
|
|
1212
|
-
}),
|
|
1213
|
-
if (window.removeEventListener("resize",
|
|
1213
|
+
}), Ot(() => {
|
|
1214
|
+
if (window.removeEventListener("resize", x), l.searchForm.enableCellCopy || o.enableCellCopy) {
|
|
1214
1215
|
document.removeEventListener("mouseup", He), document.removeEventListener("mousedown", Ne);
|
|
1215
1216
|
const d = f.value;
|
|
1216
1217
|
if (d && d.$el) {
|
|
1217
1218
|
const u = d.$el;
|
|
1218
|
-
u.removeEventListener("mousedown",
|
|
1219
|
+
u.removeEventListener("mousedown", O), u.removeEventListener("mousemove", he), u.removeEventListener("mouseup", de), u.removeEventListener("keydown", Te);
|
|
1219
1220
|
}
|
|
1220
1221
|
}
|
|
1221
1222
|
});
|
|
1222
|
-
const
|
|
1223
|
-
let
|
|
1223
|
+
const L = ce(() => J.value.height || p.value);
|
|
1224
|
+
let M;
|
|
1224
1225
|
async function Y(d) {
|
|
1225
1226
|
const { dataFormat: u } = l.tableConfig;
|
|
1226
|
-
d[b] != 1 && (d.nextSearchAfter =
|
|
1227
|
-
const { code: S, data:
|
|
1227
|
+
d[b] != 1 && (d.nextSearchAfter = M), r.value = !0;
|
|
1228
|
+
const { code: S, data: D = {} } = await l.api(d).finally(() => {
|
|
1228
1229
|
r.value = !1, l.searchForm.selections = [];
|
|
1229
1230
|
});
|
|
1230
1231
|
if (S == 200) {
|
|
1231
1232
|
let R = [];
|
|
1232
|
-
for (const
|
|
1233
|
-
if (
|
|
1234
|
-
R =
|
|
1233
|
+
for (const A of o.responseDataKeys.rows)
|
|
1234
|
+
if (D[A]) {
|
|
1235
|
+
R = D[A];
|
|
1235
1236
|
break;
|
|
1236
1237
|
}
|
|
1237
1238
|
let Z = 0;
|
|
1238
|
-
for (const
|
|
1239
|
-
if (
|
|
1240
|
-
Z =
|
|
1239
|
+
for (const A of o.responseDataKeys.total)
|
|
1240
|
+
if (D[A] !== void 0) {
|
|
1241
|
+
Z = D[A];
|
|
1241
1242
|
break;
|
|
1242
1243
|
}
|
|
1243
|
-
i.value = u ? u(R) : R, h.total = Z,
|
|
1244
|
+
i.value = u ? u(R) : R, h.total = Z, M = D.nextSearchAfter, (l.searchForm.enableCellCopy || o.enableCellCopy) && we(() => {
|
|
1244
1245
|
setTimeout(() => {
|
|
1245
1246
|
C();
|
|
1246
1247
|
}, 100);
|
|
1247
1248
|
});
|
|
1248
1249
|
}
|
|
1249
1250
|
}
|
|
1250
|
-
function
|
|
1251
|
+
function E(d = {}) {
|
|
1251
1252
|
const { searchData: u = () => ({}) } = l.tableConfig, S = u();
|
|
1252
1253
|
Y({
|
|
1253
1254
|
...h,
|
|
@@ -1259,30 +1260,30 @@ const Cn = { class: "center" }, xn = {
|
|
|
1259
1260
|
function G() {
|
|
1260
1261
|
const { reset: d } = l.tableConfig;
|
|
1261
1262
|
d && d(), l.searchForm.items.forEach((u) => {
|
|
1262
|
-
const S = m.find((
|
|
1263
|
+
const S = m.find((D) => Xe(u.key) && Xe(D.key) ? u.key.join(",") == D.key.join(",") : D.key == u.key);
|
|
1263
1264
|
S && (u.value = S.value);
|
|
1264
|
-
}),
|
|
1265
|
+
}), E();
|
|
1265
1266
|
}
|
|
1266
|
-
l.api && l.immediate &&
|
|
1267
|
+
l.api && l.immediate && E();
|
|
1267
1268
|
function _() {
|
|
1268
1269
|
return { ...h, ...je(l.searchForm.items) };
|
|
1269
1270
|
}
|
|
1270
|
-
const
|
|
1271
|
+
const y = () => {
|
|
1271
1272
|
const d = f.value;
|
|
1272
1273
|
d && d.clearSort();
|
|
1273
|
-
}, k =
|
|
1274
|
+
}, k = Ee({
|
|
1274
1275
|
storage: !0
|
|
1275
|
-
}),
|
|
1276
|
+
}), T = Ee({
|
|
1276
1277
|
drag: !0,
|
|
1277
1278
|
resizable: !0,
|
|
1278
1279
|
maxFixedSize: 0
|
|
1279
|
-
}),
|
|
1280
|
+
}), J = ce(() => {
|
|
1280
1281
|
const { customConfig: d, columnConfig: u, ...S } = l.tableConfig;
|
|
1281
1282
|
return {
|
|
1282
1283
|
headerAlign: "left",
|
|
1283
1284
|
align: "center",
|
|
1284
1285
|
customConfig: { ...k, ...d },
|
|
1285
|
-
columnConfig: { ...
|
|
1286
|
+
columnConfig: { ...T, ...u },
|
|
1286
1287
|
// 列过多时 自动宽度 虚拟滚动会闪屏 关闭虚拟滚动
|
|
1287
1288
|
"virtual-x-config": {
|
|
1288
1289
|
enabled: !1,
|
|
@@ -1292,7 +1293,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1292
1293
|
"virtual-y-config": { enabled: !0, gt: 100 },
|
|
1293
1294
|
...S
|
|
1294
1295
|
};
|
|
1295
|
-
}), $ =
|
|
1296
|
+
}), $ = Ee({
|
|
1296
1297
|
isSelecting: !1,
|
|
1297
1298
|
// 是否正在选择
|
|
1298
1299
|
startCell: null,
|
|
@@ -1308,36 +1309,36 @@ const Cn = { class: "center" }, xn = {
|
|
|
1308
1309
|
const S = u.closest(".vxe-body--row");
|
|
1309
1310
|
if (!S)
|
|
1310
1311
|
return null;
|
|
1311
|
-
const
|
|
1312
|
-
if (!
|
|
1312
|
+
const D = f.value;
|
|
1313
|
+
if (!D)
|
|
1313
1314
|
return null;
|
|
1314
1315
|
let R = -1;
|
|
1315
1316
|
const Z = S.getAttribute("data-rowid");
|
|
1316
1317
|
if (Z != null)
|
|
1317
1318
|
R = parseInt(Z, 10);
|
|
1318
1319
|
else {
|
|
1319
|
-
const
|
|
1320
|
-
R = Array.from(
|
|
1320
|
+
const U = S.parentElement;
|
|
1321
|
+
R = Array.from(U.querySelectorAll(".vxe-body--row")).indexOf(S);
|
|
1321
1322
|
}
|
|
1322
1323
|
if (R < 0)
|
|
1323
1324
|
return null;
|
|
1324
|
-
let
|
|
1325
|
+
let A = -1;
|
|
1325
1326
|
const se = u.getAttribute("data-colid");
|
|
1326
|
-
if (se && (
|
|
1327
|
-
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(u), K = !!u.closest(".vxe-table--fixed-left-wrapper"),
|
|
1327
|
+
if (se && (A = D.getColumns().findIndex((F) => F.id === se)), A < 0) {
|
|
1328
|
+
const F = Array.from(S.querySelectorAll(".vxe-body--column")).indexOf(u), K = !!u.closest(".vxe-table--fixed-left-wrapper"), X = !!u.closest(".vxe-table--fixed-right-wrapper"), B = D.getColumns();
|
|
1328
1329
|
if (K) {
|
|
1329
|
-
const
|
|
1330
|
-
F <
|
|
1331
|
-
} else if (
|
|
1332
|
-
const
|
|
1333
|
-
F <
|
|
1330
|
+
const Q = B.filter((W) => W.fixed === "left");
|
|
1331
|
+
F < Q.length && (A = B.indexOf(Q[F]));
|
|
1332
|
+
} else if (X) {
|
|
1333
|
+
const Q = B.filter((W) => W.fixed === "right");
|
|
1334
|
+
F < Q.length && (A = B.indexOf(Q[F]));
|
|
1334
1335
|
} else {
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1336
|
+
const Q = l.searchForm.showCheckBox ? 1 : 0;
|
|
1337
|
+
A = B.filter((oe) => oe.fixed === "left").length + F - Q;
|
|
1337
1338
|
}
|
|
1338
1339
|
}
|
|
1339
|
-
return
|
|
1340
|
-
},
|
|
1340
|
+
return A < 0 ? null : { rowIndex: R, colIndex: A, cell: u };
|
|
1341
|
+
}, O = (d) => {
|
|
1341
1342
|
const u = ye(d.target);
|
|
1342
1343
|
if (!u) {
|
|
1343
1344
|
ve();
|
|
@@ -1346,7 +1347,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1346
1347
|
$.isSelecting = !0, $.startCell = {
|
|
1347
1348
|
rowIndex: u.rowIndex,
|
|
1348
1349
|
colIndex: u.colIndex
|
|
1349
|
-
}, $.endCell = { ...$.startCell },
|
|
1350
|
+
}, $.endCell = { ...$.startCell }, Le(), Ke();
|
|
1350
1351
|
}, he = (d) => {
|
|
1351
1352
|
if (!$.isSelecting)
|
|
1352
1353
|
return;
|
|
@@ -1354,7 +1355,7 @@ const Cn = { class: "center" }, xn = {
|
|
|
1354
1355
|
u && ($.endCell = {
|
|
1355
1356
|
rowIndex: u.rowIndex,
|
|
1356
1357
|
colIndex: u.colIndex
|
|
1357
|
-
},
|
|
1358
|
+
}, Le(), Ke());
|
|
1358
1359
|
}, de = () => {
|
|
1359
1360
|
$.isSelecting = !1;
|
|
1360
1361
|
}, ve = () => {
|
|
@@ -1373,17 +1374,17 @@ const Cn = { class: "center" }, xn = {
|
|
|
1373
1374
|
"cell-border-left"
|
|
1374
1375
|
);
|
|
1375
1376
|
});
|
|
1376
|
-
},
|
|
1377
|
+
}, Le = () => {
|
|
1377
1378
|
if (!$.startCell || !$.endCell) {
|
|
1378
1379
|
$.selectedCells = [];
|
|
1379
1380
|
return;
|
|
1380
1381
|
}
|
|
1381
|
-
const d = $.startCell.rowIndex, u = $.endCell.rowIndex, S = $.startCell.colIndex,
|
|
1382
|
+
const d = $.startCell.rowIndex, u = $.endCell.rowIndex, S = $.startCell.colIndex, D = $.endCell.colIndex, R = Math.min(d, u), Z = Math.max(d, u), A = Math.min(S, D), se = Math.max(S, D);
|
|
1382
1383
|
$.selectedCells = [];
|
|
1383
|
-
for (let
|
|
1384
|
-
for (let F =
|
|
1384
|
+
for (let U = R; U <= Z; U++)
|
|
1385
|
+
for (let F = A; F <= se; F++)
|
|
1385
1386
|
$.selectedCells.push({
|
|
1386
|
-
rowIndex:
|
|
1387
|
+
rowIndex: U,
|
|
1387
1388
|
colIndex: F
|
|
1388
1389
|
});
|
|
1389
1390
|
}, Ke = () => {
|
|
@@ -1404,77 +1405,77 @@ const Cn = { class: "center" }, xn = {
|
|
|
1404
1405
|
);
|
|
1405
1406
|
}), $.selectedCells.length === 0)
|
|
1406
1407
|
return;
|
|
1407
|
-
const S = d.getColumns(),
|
|
1408
|
+
const S = d.getColumns(), D = $.selectedCells.map((K) => K.rowIndex), R = $.selectedCells.map((K) => K.colIndex), Z = Math.min(...D), A = Math.max(...D), se = Math.min(...R), U = Math.max(...R), F = [
|
|
1408
1409
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1409
1410
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1410
1411
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1411
1412
|
].filter(Boolean);
|
|
1412
|
-
$.selectedCells.forEach(({ rowIndex: K, colIndex:
|
|
1413
|
-
const B = S[
|
|
1413
|
+
$.selectedCells.forEach(({ rowIndex: K, colIndex: X }) => {
|
|
1414
|
+
const B = S[X];
|
|
1414
1415
|
if (!B)
|
|
1415
1416
|
return;
|
|
1416
|
-
const
|
|
1417
|
+
const Q = B.fixed === "left", W = B.fixed === "right";
|
|
1417
1418
|
for (const oe of F) {
|
|
1418
1419
|
const xe = oe.querySelectorAll(".vxe-body--row")[K];
|
|
1419
1420
|
if (!xe)
|
|
1420
1421
|
continue;
|
|
1421
1422
|
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1422
1423
|
let j = null;
|
|
1423
|
-
if (
|
|
1424
|
+
if (Q && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1424
1425
|
const le = S.filter((ae) => ae.fixed === "left").indexOf(B);
|
|
1425
1426
|
j = me[le];
|
|
1426
1427
|
} else if (W && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1427
1428
|
const le = S.filter((ae) => ae.fixed === "right").indexOf(B);
|
|
1428
1429
|
j = me[le];
|
|
1429
|
-
} else if (!
|
|
1430
|
-
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae =
|
|
1430
|
+
} else if (!Q && !W && oe.closest(".vxe-table--body-wrapper")) {
|
|
1431
|
+
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = X - le;
|
|
1431
1432
|
j = me[ae + ge];
|
|
1432
1433
|
}
|
|
1433
1434
|
if (j && !j.classList.contains("col--checkbox") && !j.classList.contains("col--seq")) {
|
|
1434
|
-
j.classList.add("cell-selected"), K === Z && j.classList.add("cell-border-top"), K ===
|
|
1435
|
+
j.classList.add("cell-selected"), K === Z && j.classList.add("cell-border-top"), K === A && j.classList.add("cell-border-bottom"), X === se && j.classList.add("cell-border-left"), X === U && j.classList.add("cell-border-right");
|
|
1435
1436
|
break;
|
|
1436
1437
|
}
|
|
1437
1438
|
}
|
|
1438
1439
|
});
|
|
1439
1440
|
});
|
|
1440
|
-
},
|
|
1441
|
+
}, wt = async () => {
|
|
1441
1442
|
if ($.selectedCells.length === 0)
|
|
1442
1443
|
return;
|
|
1443
1444
|
const d = f.value;
|
|
1444
1445
|
if (!d)
|
|
1445
1446
|
return;
|
|
1446
|
-
const u = d.$el, S = d.getColumns(),
|
|
1447
|
-
(
|
|
1448
|
-
), R = [...new Set($.selectedCells.map((
|
|
1449
|
-
(
|
|
1447
|
+
const u = d.$el, S = d.getColumns(), D = [...new Set($.selectedCells.map((U) => U.rowIndex))].sort(
|
|
1448
|
+
(U, F) => U - F
|
|
1449
|
+
), R = [...new Set($.selectedCells.map((U) => U.colIndex))].sort(
|
|
1450
|
+
(U, F) => U - F
|
|
1450
1451
|
), Z = [
|
|
1451
1452
|
u.querySelector(".vxe-table--body-wrapper tbody"),
|
|
1452
1453
|
u.querySelector(".vxe-table--fixed-left-wrapper tbody"),
|
|
1453
1454
|
u.querySelector(".vxe-table--fixed-right-wrapper tbody")
|
|
1454
|
-
].filter(Boolean),
|
|
1455
|
-
|
|
1455
|
+
].filter(Boolean), A = [];
|
|
1456
|
+
D.forEach((U) => {
|
|
1456
1457
|
const F = [];
|
|
1457
1458
|
R.forEach((K) => {
|
|
1458
|
-
const
|
|
1459
|
-
if (!
|
|
1459
|
+
const X = S[K];
|
|
1460
|
+
if (!X) {
|
|
1460
1461
|
F.push("");
|
|
1461
1462
|
return;
|
|
1462
1463
|
}
|
|
1463
|
-
const B =
|
|
1464
|
+
const B = X.fixed === "left", Q = X.fixed === "right";
|
|
1464
1465
|
let W = "";
|
|
1465
1466
|
for (const oe of Z) {
|
|
1466
|
-
const xe = oe.querySelectorAll(".vxe-body--row")[
|
|
1467
|
+
const xe = oe.querySelectorAll(".vxe-body--row")[U];
|
|
1467
1468
|
if (!xe)
|
|
1468
1469
|
continue;
|
|
1469
1470
|
const me = Array.from(xe.querySelectorAll(".vxe-body--column"));
|
|
1470
1471
|
let j = null;
|
|
1471
1472
|
if (B && oe.closest(".vxe-table--fixed-left-wrapper")) {
|
|
1472
|
-
const le = S.filter((ae) => ae.fixed === "left").indexOf(
|
|
1473
|
+
const le = S.filter((ae) => ae.fixed === "left").indexOf(X);
|
|
1473
1474
|
j = me[le];
|
|
1474
|
-
} else if (
|
|
1475
|
-
const le = S.filter((ae) => ae.fixed === "right").indexOf(
|
|
1475
|
+
} else if (Q && oe.closest(".vxe-table--fixed-right-wrapper")) {
|
|
1476
|
+
const le = S.filter((ae) => ae.fixed === "right").indexOf(X);
|
|
1476
1477
|
j = me[le];
|
|
1477
|
-
} else if (!B && !
|
|
1478
|
+
} else if (!B && !Q && oe.closest(".vxe-table--body-wrapper")) {
|
|
1478
1479
|
const ge = l.searchForm.showCheckBox ? 1 : 0, le = S.filter((De) => De.fixed === "left").length, ae = K - le;
|
|
1479
1480
|
j = me[ae + ge];
|
|
1480
1481
|
}
|
|
@@ -1484,17 +1485,17 @@ const Cn = { class: "center" }, xn = {
|
|
|
1484
1485
|
}
|
|
1485
1486
|
}
|
|
1486
1487
|
F.push(W);
|
|
1487
|
-
}),
|
|
1488
|
+
}), A.push(F.join(" "));
|
|
1488
1489
|
});
|
|
1489
|
-
const se =
|
|
1490
|
+
const se = A.join(`
|
|
1490
1491
|
`);
|
|
1491
1492
|
try {
|
|
1492
1493
|
await navigator.clipboard.writeText(se);
|
|
1493
|
-
} catch (
|
|
1494
|
-
console.error("复制失败:",
|
|
1494
|
+
} catch (U) {
|
|
1495
|
+
console.error("复制失败:", U);
|
|
1495
1496
|
}
|
|
1496
1497
|
}, Te = (d) => {
|
|
1497
|
-
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(),
|
|
1498
|
+
!l.searchForm.enableCellCopy && !o.enableCellCopy || ((d.ctrlKey || d.metaKey) && d.key === "c" ? $.selectedCells.length > 0 && (d.preventDefault(), d.stopPropagation(), wt()) : d.key === "Escape" && ve());
|
|
1498
1499
|
}, He = () => {
|
|
1499
1500
|
$.isSelecting = !1;
|
|
1500
1501
|
}, Ne = (d) => {
|
|
@@ -1502,10 +1503,10 @@ const Cn = { class: "center" }, xn = {
|
|
|
1502
1503
|
if (!u || !u.$el)
|
|
1503
1504
|
return;
|
|
1504
1505
|
u.$el.contains(d.target) || ve();
|
|
1506
|
+
}, Ct = (d) => {
|
|
1507
|
+
h[b] = d, E();
|
|
1505
1508
|
}, xt = (d) => {
|
|
1506
|
-
h[
|
|
1507
|
-
}, kt = (d) => {
|
|
1508
|
-
h[g] = d, h[b] = 1, I();
|
|
1509
|
+
h[g] = d, h[b] = 1, E();
|
|
1509
1510
|
};
|
|
1510
1511
|
function We() {
|
|
1511
1512
|
const d = f.value.getCheckboxRecords();
|
|
@@ -1519,82 +1520,82 @@ const Cn = { class: "center" }, xn = {
|
|
|
1519
1520
|
l.searchForm.selections = S;
|
|
1520
1521
|
}
|
|
1521
1522
|
};
|
|
1522
|
-
return t({ tableRef: f, getList:
|
|
1523
|
-
var
|
|
1524
|
-
const S =
|
|
1525
|
-
return
|
|
1526
|
-
class:
|
|
1523
|
+
return t({ tableRef: f, getList: E, getPrm: _, clearSort: y, calculateTableHeight: w }), (d, u) => {
|
|
1524
|
+
var U;
|
|
1525
|
+
const S = q("el-button"), D = q("el-checkbox"), R = q("el-text"), Z = q("vxe-column"), A = q("VxeTable"), se = q("el-pagination");
|
|
1526
|
+
return I(), ie("div", {
|
|
1527
|
+
class: rt({ box: e.searchForm.showShadow })
|
|
1527
1528
|
}, [
|
|
1528
|
-
e.searchForm.showSearch ? (
|
|
1529
|
+
e.searchForm.showSearch ? (I(), N(bn, {
|
|
1529
1530
|
key: 0,
|
|
1530
1531
|
form: e.searchForm,
|
|
1531
1532
|
onReset: G,
|
|
1532
|
-
onConfirm: u[1] || (u[1] = (F) =>
|
|
1533
|
-
onVisibleChange: H(
|
|
1533
|
+
onConfirm: u[1] || (u[1] = (F) => E()),
|
|
1534
|
+
onVisibleChange: H(w)
|
|
1534
1535
|
}, {
|
|
1535
|
-
btn:
|
|
1536
|
+
btn: z(() => [
|
|
1536
1537
|
u[3] || (u[3] = re("span", { class: "mgr10" }, null, -1)),
|
|
1537
|
-
|
|
1538
|
-
|
|
1538
|
+
ee(d.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1539
|
+
V(S, {
|
|
1539
1540
|
class: "mgl10",
|
|
1540
1541
|
round: "",
|
|
1541
1542
|
onClick: u[0] || (u[0] = (F) => f.value.openCustom())
|
|
1542
1543
|
}, {
|
|
1543
|
-
default:
|
|
1544
|
-
|
|
1544
|
+
default: z(() => [
|
|
1545
|
+
V(yt, { name: "Tools" })
|
|
1545
1546
|
]),
|
|
1546
1547
|
_: 1
|
|
1547
1548
|
})
|
|
1548
1549
|
]),
|
|
1549
1550
|
_: 3
|
|
1550
1551
|
}, 8, ["form", "onVisibleChange"])) : fe("", !0),
|
|
1551
|
-
|
|
1552
|
+
ee(d.$slots, "table-header-left", {}, void 0, !0),
|
|
1552
1553
|
re("div", {
|
|
1553
1554
|
ref_key: "tableContentRef",
|
|
1554
1555
|
ref: c
|
|
1555
1556
|
}, [
|
|
1556
|
-
|
|
1557
|
+
V(A, ue({
|
|
1557
1558
|
id: v.value,
|
|
1558
1559
|
ref_key: "tableRef",
|
|
1559
1560
|
ref: f,
|
|
1560
1561
|
loading: e.loading || r.value,
|
|
1561
1562
|
data: e.api ? i.value : e.data,
|
|
1562
1563
|
border: ""
|
|
1563
|
-
},
|
|
1564
|
-
height:
|
|
1564
|
+
}, J.value, {
|
|
1565
|
+
height: L.value,
|
|
1565
1566
|
onCheckboxChange: We,
|
|
1566
1567
|
onCheckboxAll: We,
|
|
1567
|
-
onSortChange: (
|
|
1568
|
+
onSortChange: (U = J.value["sort-config"]) == null ? void 0 : U.sortChange
|
|
1568
1569
|
}), {
|
|
1569
|
-
default:
|
|
1570
|
-
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (
|
|
1570
|
+
default: z(() => [
|
|
1571
|
+
e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (I(), N(Z, {
|
|
1571
1572
|
key: 0,
|
|
1572
1573
|
type: "checkbox",
|
|
1573
1574
|
width: H(a) == "zh_cn" ? 80 : 150,
|
|
1574
1575
|
title: d.$t("xu-hao"),
|
|
1575
1576
|
fixed: "left"
|
|
1576
1577
|
}, {
|
|
1577
|
-
checkbox:
|
|
1578
|
+
checkbox: z(({ rowIndex: F, row: K, checked: X, disabled: B, indeterminate: Q }) => [
|
|
1578
1579
|
re("div", Cn, [
|
|
1579
|
-
|
|
1580
|
+
X ? (I(), N(D, {
|
|
1580
1581
|
key: 0,
|
|
1581
1582
|
checked: !0,
|
|
1582
1583
|
disabled: B,
|
|
1583
1584
|
size: "default",
|
|
1584
1585
|
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1585
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1586
|
+
}, null, 8, ["disabled", "onClick"])) : (I(), N(D, {
|
|
1586
1587
|
key: 1,
|
|
1587
1588
|
disabled: B,
|
|
1588
1589
|
checked: !1,
|
|
1589
1590
|
size: "default",
|
|
1590
1591
|
onClick: Ve((W) => !B && Ze(K), ["stop"])
|
|
1591
1592
|
}, null, 8, ["disabled", "onClick"])),
|
|
1592
|
-
|
|
1593
|
+
V(R, {
|
|
1593
1594
|
type: "info",
|
|
1594
1595
|
class: "mgl5"
|
|
1595
1596
|
}, {
|
|
1596
|
-
default:
|
|
1597
|
-
ne(
|
|
1597
|
+
default: z(() => [
|
|
1598
|
+
ne(te(F + 1), 1)
|
|
1598
1599
|
]),
|
|
1599
1600
|
_: 2
|
|
1600
1601
|
}, 1024)
|
|
@@ -1602,12 +1603,12 @@ const Cn = { class: "center" }, xn = {
|
|
|
1602
1603
|
]),
|
|
1603
1604
|
_: 1
|
|
1604
1605
|
}, 8, ["width", "title"])) : fe("", !0),
|
|
1605
|
-
|
|
1606
|
+
ee(d.$slots, "default", {}, void 0, !0)
|
|
1606
1607
|
]),
|
|
1607
1608
|
_: 3
|
|
1608
1609
|
}, 16, ["id", "loading", "data", "height", "onSortChange"])
|
|
1609
1610
|
], 512),
|
|
1610
|
-
e.searchForm.showPage ? (
|
|
1611
|
+
e.searchForm.showPage ? (I(), N(se, {
|
|
1611
1612
|
key: 1,
|
|
1612
1613
|
"current-page": h[H(b)],
|
|
1613
1614
|
"onUpdate:currentPage": u[2] || (u[2] = (F) => h[H(b)] = F),
|
|
@@ -1617,8 +1618,8 @@ const Cn = { class: "center" }, xn = {
|
|
|
1617
1618
|
total: h.total,
|
|
1618
1619
|
"page-size": h[H(g)],
|
|
1619
1620
|
"page-sizes": e.searchForm.pageSizes || H(o).pageSizes,
|
|
1620
|
-
onCurrentChange:
|
|
1621
|
-
onSizeChange:
|
|
1621
|
+
onCurrentChange: Ct,
|
|
1622
|
+
onSizeChange: xt
|
|
1622
1623
|
}, null, 8, ["current-page", "total", "page-size", "page-sizes"])) : fe("", !0)
|
|
1623
1624
|
], 2);
|
|
1624
1625
|
};
|
|
@@ -1641,14 +1642,14 @@ const Cn = { class: "center" }, xn = {
|
|
|
1641
1642
|
on(t.fileName, t.sheetsConfig);
|
|
1642
1643
|
}
|
|
1643
1644
|
return (a, s) => {
|
|
1644
|
-
const o =
|
|
1645
|
-
return
|
|
1645
|
+
const o = q("el-link");
|
|
1646
|
+
return I(), N(o, ue({
|
|
1646
1647
|
type: "primary",
|
|
1647
1648
|
underline: "never"
|
|
1648
1649
|
}, a.$attrs, { onClick: n }), {
|
|
1649
|
-
default:
|
|
1650
|
-
|
|
1651
|
-
ne(
|
|
1650
|
+
default: z(() => [
|
|
1651
|
+
ee(a.$slots, "default", {}, () => [
|
|
1652
|
+
ne(te(a.$t("xia-zai-dao-ru-mo-ban")), 1)
|
|
1652
1653
|
])
|
|
1653
1654
|
]),
|
|
1654
1655
|
_: 3
|
|
@@ -1657,16 +1658,16 @@ const Cn = { class: "center" }, xn = {
|
|
|
1657
1658
|
}
|
|
1658
1659
|
}, kn = {
|
|
1659
1660
|
mounted(e, t) {
|
|
1660
|
-
t.value &&
|
|
1661
|
+
t.value && et(e);
|
|
1661
1662
|
},
|
|
1662
1663
|
updated(e, t) {
|
|
1663
|
-
t.value ?
|
|
1664
|
+
t.value ? et(e) : tt(e);
|
|
1664
1665
|
},
|
|
1665
1666
|
beforeUnmount(e) {
|
|
1666
|
-
|
|
1667
|
+
tt(e);
|
|
1667
1668
|
}
|
|
1668
1669
|
};
|
|
1669
|
-
async function
|
|
1670
|
+
async function et(e) {
|
|
1670
1671
|
await g();
|
|
1671
1672
|
const t = e.querySelector(".el-dialog");
|
|
1672
1673
|
if (!t)
|
|
@@ -1736,7 +1737,7 @@ async function tt(e) {
|
|
|
1736
1737
|
}
|
|
1737
1738
|
e.__mouseDown__ = i, e.__mouseUp__ = m, e.__mouseMove__ = v, e.__sizeChange__ = b;
|
|
1738
1739
|
}
|
|
1739
|
-
function
|
|
1740
|
+
function tt(e) {
|
|
1740
1741
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1741
1742
|
}
|
|
1742
1743
|
const _n = {
|
|
@@ -1766,7 +1767,7 @@ const _n = {
|
|
|
1766
1767
|
a("confirm");
|
|
1767
1768
|
}, 300);
|
|
1768
1769
|
async function l() {
|
|
1769
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await
|
|
1770
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : await Lt.confirm(s("que-ding-guan-bi-ma"), {
|
|
1770
1771
|
confirmButtonText: s("que-ding"),
|
|
1771
1772
|
cancelButtonText: s("qu-xiao"),
|
|
1772
1773
|
type: "warning"
|
|
@@ -1774,8 +1775,8 @@ const _n = {
|
|
|
1774
1775
|
}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1;
|
|
1775
1776
|
}
|
|
1776
1777
|
return (r, i) => {
|
|
1777
|
-
const v =
|
|
1778
|
-
return e.layer.type ? (
|
|
1778
|
+
const v = q("el-button"), m = q("el-drawer"), b = q("el-dialog");
|
|
1779
|
+
return e.layer.type ? (I(), N(m, {
|
|
1779
1780
|
key: 0,
|
|
1780
1781
|
modelValue: e.layer.show,
|
|
1781
1782
|
"onUpdate:modelValue": i[0] || (i[0] = (g) => e.layer.show = g),
|
|
@@ -1786,24 +1787,24 @@ const _n = {
|
|
|
1786
1787
|
"before-close": l,
|
|
1787
1788
|
class: "drawer-content"
|
|
1788
1789
|
}, {
|
|
1789
|
-
default:
|
|
1790
|
-
|
|
1790
|
+
default: z(() => [
|
|
1791
|
+
ee(r.$slots, "default"),
|
|
1791
1792
|
i[2] || (i[2] = re("p", { class: "mgt50" }, null, -1)),
|
|
1792
|
-
e.layer.showButton ? (
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
default:
|
|
1796
|
-
ne(
|
|
1793
|
+
e.layer.showButton ? (I(), ie("div", _n, [
|
|
1794
|
+
ee(r.$slots, "btn", {}, () => [
|
|
1795
|
+
V(v, { onClick: l }, {
|
|
1796
|
+
default: z(() => [
|
|
1797
|
+
ne(te(r.$t("qu-xiao")), 1)
|
|
1797
1798
|
]),
|
|
1798
1799
|
_: 1
|
|
1799
1800
|
}),
|
|
1800
|
-
|
|
1801
|
+
V(v, {
|
|
1801
1802
|
type: "primary",
|
|
1802
1803
|
loading: e.loading,
|
|
1803
1804
|
onClick: H(o)
|
|
1804
1805
|
}, {
|
|
1805
|
-
default:
|
|
1806
|
-
ne(
|
|
1806
|
+
default: z(() => [
|
|
1807
|
+
ne(te(r.$t("ti-jiao")), 1)
|
|
1807
1808
|
]),
|
|
1808
1809
|
_: 1
|
|
1809
1810
|
}, 8, ["loading", "onClick"])
|
|
@@ -1811,36 +1812,36 @@ const _n = {
|
|
|
1811
1812
|
])) : fe("", !0)
|
|
1812
1813
|
]),
|
|
1813
1814
|
_: 3
|
|
1814
|
-
}, 8, ["modelValue", "size", "title"])) :
|
|
1815
|
-
|
|
1815
|
+
}, 8, ["modelValue", "size", "title"])) : Vt((I(), ie("div", $n, [
|
|
1816
|
+
V(b, {
|
|
1816
1817
|
"close-on-click-modal": !1,
|
|
1817
1818
|
modelValue: e.layer.show,
|
|
1818
1819
|
"onUpdate:modelValue": i[1] || (i[1] = (g) => e.layer.show = g),
|
|
1819
1820
|
title: e.layer.title,
|
|
1820
1821
|
width: e.layer.width || 500,
|
|
1821
1822
|
center: ""
|
|
1822
|
-
},
|
|
1823
|
-
default:
|
|
1824
|
-
|
|
1823
|
+
}, lt({
|
|
1824
|
+
default: z(() => [
|
|
1825
|
+
ee(r.$slots, "default")
|
|
1825
1826
|
]),
|
|
1826
1827
|
_: 2
|
|
1827
1828
|
}, [
|
|
1828
1829
|
e.layer.showButton ? {
|
|
1829
1830
|
name: "footer",
|
|
1830
|
-
fn:
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
default:
|
|
1834
|
-
ne(
|
|
1831
|
+
fn: z(() => [
|
|
1832
|
+
ee(r.$slots, "btn", {}, () => [
|
|
1833
|
+
V(v, { onClick: l }, {
|
|
1834
|
+
default: z(() => [
|
|
1835
|
+
ne(te(r.$t("qu-xiao")), 1)
|
|
1835
1836
|
]),
|
|
1836
1837
|
_: 1
|
|
1837
1838
|
}),
|
|
1838
|
-
|
|
1839
|
+
V(v, {
|
|
1839
1840
|
type: "primary",
|
|
1840
1841
|
onClick: H(o)
|
|
1841
1842
|
}, {
|
|
1842
|
-
default:
|
|
1843
|
-
ne(
|
|
1843
|
+
default: z(() => [
|
|
1844
|
+
ne(te(r.$t("ti-jiao")), 1)
|
|
1844
1845
|
]),
|
|
1845
1846
|
_: 1
|
|
1846
1847
|
}, 8, ["onClick"])
|
|
@@ -2089,15 +2090,15 @@ function ao(e, t = {}) {
|
|
|
2089
2090
|
}, t), { manual: s, log: o, params: l = {}, cb: r, format: i } = a, v = P([]), m = P(!1), b = (g) => {
|
|
2090
2091
|
const h = g || l;
|
|
2091
2092
|
m.value = !0, e(h).then((f) => {
|
|
2092
|
-
const { code: c, data: p, msg:
|
|
2093
|
+
const { code: c, data: p, msg: w } = f;
|
|
2093
2094
|
if (r) {
|
|
2094
|
-
const { records:
|
|
2095
|
-
v.value = Me(
|
|
2095
|
+
const { records: x, rows: C } = p || {}, L = x || C ? x || C : p;
|
|
2096
|
+
v.value = Me(L, i), r(f);
|
|
2096
2097
|
}
|
|
2097
2098
|
if (p) {
|
|
2098
2099
|
if (p.records != null || p.rows != null) {
|
|
2099
|
-
const { records:
|
|
2100
|
-
h && h.total != null && (l.total = parseInt(
|
|
2100
|
+
const { records: x, rows: C, total: L = 0 } = p || {};
|
|
2101
|
+
h && h.total != null && (l.total = parseInt(L)), v.value = Me(x || C || [], i);
|
|
2101
2102
|
} else
|
|
2102
2103
|
v.value = Me(p, i);
|
|
2103
2104
|
o && console.log("useRequest-res", v.value);
|
|
@@ -2148,32 +2149,32 @@ function co(e, t = "zh_cn", n = "en_us") {
|
|
|
2148
2149
|
return e[a[o]] || e[t] || "-";
|
|
2149
2150
|
}
|
|
2150
2151
|
function uo(e, t) {
|
|
2151
|
-
let n =
|
|
2152
|
-
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState),
|
|
2152
|
+
let n = Pt;
|
|
2153
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapState), bt(t, n);
|
|
2153
2154
|
}
|
|
2154
2155
|
function fo(e, t) {
|
|
2155
|
-
let n =
|
|
2156
|
-
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters),
|
|
2156
|
+
let n = Rt;
|
|
2157
|
+
return typeof e == "string" && e.length > 0 && (n = Be(e).mapGetters), bt(t, n);
|
|
2157
2158
|
}
|
|
2158
2159
|
function ho(e, t) {
|
|
2159
|
-
let n =
|
|
2160
|
+
let n = Bt;
|
|
2160
2161
|
return typeof e == "string" && e.length > 0 && (n = Be(e).mapActions), Sn(t, n);
|
|
2161
2162
|
}
|
|
2162
|
-
function
|
|
2163
|
-
const n =
|
|
2163
|
+
function bt(e, t) {
|
|
2164
|
+
const n = ut(), a = t(e), s = {};
|
|
2164
2165
|
return Object.keys(a).forEach((o) => {
|
|
2165
2166
|
const l = a[o].bind({ $store: n });
|
|
2166
2167
|
s[o] = ce(l);
|
|
2167
2168
|
}), s;
|
|
2168
2169
|
}
|
|
2169
2170
|
function Sn(e, t) {
|
|
2170
|
-
const n =
|
|
2171
|
+
const n = ut(), a = t(e), s = {};
|
|
2171
2172
|
return Object.keys(a).forEach((o) => {
|
|
2172
2173
|
s[o] = a[o].bind({ $store: n });
|
|
2173
2174
|
}), s;
|
|
2174
2175
|
}
|
|
2175
2176
|
function Fe(e) {
|
|
2176
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2177
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !qt(e);
|
|
2177
2178
|
}
|
|
2178
2179
|
function mo() {
|
|
2179
2180
|
ke.renderer.add("Enum", {
|
|
@@ -2185,20 +2186,20 @@ function mo() {
|
|
|
2185
2186
|
const a = t.row[t.column.field];
|
|
2186
2187
|
if (e.type == "tag") {
|
|
2187
2188
|
let s;
|
|
2188
|
-
return
|
|
2189
|
+
return V(q("el-text"), {
|
|
2189
2190
|
type: e.enum.getTag(a)
|
|
2190
2191
|
}, Fe(s = e.enum.getName(a)) ? s : {
|
|
2191
2192
|
default: () => [s]
|
|
2192
2193
|
});
|
|
2193
2194
|
}
|
|
2194
|
-
return
|
|
2195
|
+
return V(q("el-text"), null, Fe(n = e.enum.getName(a)) ? n : {
|
|
2195
2196
|
default: () => [n]
|
|
2196
2197
|
});
|
|
2197
2198
|
}
|
|
2198
2199
|
}), ke.renderer.add("InputNumber", {
|
|
2199
2200
|
// 默认显示模板
|
|
2200
2201
|
renderTableDefault(e, t) {
|
|
2201
|
-
return
|
|
2202
|
+
return V(Et, ue({
|
|
2202
2203
|
modelValue: t.row[t.column.field],
|
|
2203
2204
|
"onUpdate:modelValue": (n) => t.row[t.column.field] = n
|
|
2204
2205
|
}, e.props, {
|
|
@@ -2213,7 +2214,7 @@ function mo() {
|
|
|
2213
2214
|
locale: n
|
|
2214
2215
|
} = pe();
|
|
2215
2216
|
let a = n.value == "zh_cn";
|
|
2216
|
-
return
|
|
2217
|
+
return V(Ft, {
|
|
2217
2218
|
type: t.row[t.column.field] ? "success" : "danger"
|
|
2218
2219
|
}, {
|
|
2219
2220
|
default: () => [t.row[t.column.field] ? a ? "是" : "YES" : a ? "否" : "NO"]
|
|
@@ -2232,7 +2233,7 @@ function mo() {
|
|
|
2232
2233
|
// 默认显示模板
|
|
2233
2234
|
renderTableDefault(e, t) {
|
|
2234
2235
|
let n = t.column.field;
|
|
2235
|
-
const a =
|
|
2236
|
+
const a = jt(), {
|
|
2236
2237
|
multiple: s,
|
|
2237
2238
|
to: o,
|
|
2238
2239
|
openType: l = "system"
|
|
@@ -2247,7 +2248,7 @@ function mo() {
|
|
|
2247
2248
|
}
|
|
2248
2249
|
if (s) {
|
|
2249
2250
|
const v = (r == null ? void 0 : r.split(",")) || [];
|
|
2250
|
-
return v.map((m, b) =>
|
|
2251
|
+
return v.map((m, b) => V("span", null, [V(Ge, {
|
|
2251
2252
|
underline: "never",
|
|
2252
2253
|
type: "primary",
|
|
2253
2254
|
onclick: () => i(l == "stystem" ? o : m, m)
|
|
@@ -2255,7 +2256,7 @@ function mo() {
|
|
|
2255
2256
|
default: () => [m]
|
|
2256
2257
|
}), b < v.length - 1 ? "," : ""]));
|
|
2257
2258
|
}
|
|
2258
|
-
return
|
|
2259
|
+
return V(Ge, {
|
|
2259
2260
|
underline: "never",
|
|
2260
2261
|
type: "primary",
|
|
2261
2262
|
onclick: () => i(l == "stystem" ? o : r, r)
|
|
@@ -2267,7 +2268,7 @@ function mo() {
|
|
|
2267
2268
|
}
|
|
2268
2269
|
export {
|
|
2269
2270
|
cn as CmpDictionary,
|
|
2270
|
-
|
|
2271
|
+
yt as CmpIcon,
|
|
2271
2272
|
Gn as ConfrimButton,
|
|
2272
2273
|
to as DownExcelTemp,
|
|
2273
2274
|
Jn as ImportButton,
|
|
@@ -2276,7 +2277,7 @@ export {
|
|
|
2276
2277
|
eo as ListPage,
|
|
2277
2278
|
lo as OnePortalCasSDK,
|
|
2278
2279
|
bn as SearchBar,
|
|
2279
|
-
|
|
2280
|
+
Qe as StatusMap,
|
|
2280
2281
|
Pn as _toRaw,
|
|
2281
2282
|
ro as _typeOf,
|
|
2282
2283
|
Bn as arrToStatusMap,
|
|
@@ -2294,14 +2295,14 @@ export {
|
|
|
2294
2295
|
co as getLocaleValue,
|
|
2295
2296
|
Zn as getValueBykey,
|
|
2296
2297
|
An as importExcel,
|
|
2297
|
-
|
|
2298
|
-
|
|
2298
|
+
tn as importExcelMuilti,
|
|
2299
|
+
Wt as messages,
|
|
2299
2300
|
mo as registerVxeRenderers,
|
|
2300
2301
|
Qn as resetListPageConfig,
|
|
2301
2302
|
Xn as setListPageConfig,
|
|
2302
|
-
|
|
2303
|
+
Zt as setupI18n,
|
|
2303
2304
|
jn as sleep,
|
|
2304
|
-
|
|
2305
|
+
pt as stringToArray,
|
|
2305
2306
|
Yn as stripHtmlTags,
|
|
2306
2307
|
Kn as unicode2Str,
|
|
2307
2308
|
ho as useActions,
|