joy-admin-components 0.2.80 → 0.2.83
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,42 +1,42 @@
|
|
|
1
|
-
import { ElCol as e, ElForm as t, ElInputNumber as n, ElLink as r,
|
|
2
|
-
import { Fragment as
|
|
3
|
-
import { saveAs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { createI18n as
|
|
7
|
-
import { cloneDeep as
|
|
8
|
-
import { useRoute as
|
|
9
|
-
import { createNamespacedHelpers as
|
|
1
|
+
import { ElCol as e, ElForm as t, ElInputNumber as n, ElLink as r, ElMessage as i, ElMessageBox as a, ElRow as o, ElText as s } from "element-plus";
|
|
2
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createSlots as m, createTextVNode as h, createVNode as g, defineComponent as _, h as v, isVNode as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onMounted as T, onUnmounted as E, onUpdated as D, openBlock as O, reactive as k, ref as A, renderList as j, renderSlot as M, resolveComponent as N, resolveDynamicComponent as P, toDisplayString as F, unref as I, useAttrs as L, useModel as ee, watch as R, withCtx as z, withDirectives as te, withKeys as ne, withModifiers as re } from "vue";
|
|
3
|
+
import { saveAs as B } from "file-saver";
|
|
4
|
+
import V from "exceljs";
|
|
5
|
+
import H from "dayjs";
|
|
6
|
+
import { createI18n as ie, useI18n as U } from "vue-i18n";
|
|
7
|
+
import { cloneDeep as ae, debounce as oe, isArray as se } from "lodash";
|
|
8
|
+
import { useRoute as ce, useRouter as le } from "vue-router";
|
|
9
|
+
import { createNamespacedHelpers as W, mapActions as ue, mapGetters as G, mapState as K, useStore as de } from "vuex";
|
|
10
10
|
import { VxeUI as q } from "vxe-pc-ui";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
13
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
12
|
+
var fe = Object.create, J = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, me = Object.getOwnPropertyNames, he = Object.getPrototypeOf, ge = Object.prototype.hasOwnProperty, Y = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), _e = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = me(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !ge.call(e, s) && s !== n && J(e, s, {
|
|
14
14
|
get: ((e) => t[e]).bind(null, s),
|
|
15
|
-
enumerable: !(r =
|
|
15
|
+
enumerable: !(r = pe(t, s)) || r.enumerable
|
|
16
16
|
});
|
|
17
17
|
return e;
|
|
18
|
-
},
|
|
18
|
+
}, ve = (e, t, n) => (n = e == null ? {} : fe(he(e)), _e(t || !e || !e.__esModule ? J(n, "default", {
|
|
19
19
|
value: e,
|
|
20
20
|
enumerable: !0
|
|
21
|
-
}) : n, e)),
|
|
21
|
+
}) : n, e)), ye = _({
|
|
22
22
|
name: "LayOutForm",
|
|
23
|
-
setup(n, { slots: r, attrs: i, emit:
|
|
24
|
-
let s =
|
|
23
|
+
setup(n, { slots: r, attrs: i, emit: a }) {
|
|
24
|
+
let s = A(null), c = () => r.default ? r.default().filter((e) => e.type !== Symbol.for("v-cmt")).map((e) => e.type === Symbol.for("v-fgt") ? e.children : e).flat().map((t) => v(e, {
|
|
25
25
|
span: t.props?.span || t.props?.colProps?.span || 24,
|
|
26
26
|
...t.props?.colProps
|
|
27
27
|
}, { default: () => t })) : null;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
T(() => {
|
|
29
|
+
a("ref", s.value);
|
|
30
30
|
});
|
|
31
31
|
function l() {
|
|
32
|
-
return
|
|
32
|
+
return v(t, {
|
|
33
33
|
...i,
|
|
34
34
|
ref: s
|
|
35
|
-
}, () =>
|
|
35
|
+
}, () => v(o, { gutter: i.gutter ?? 20 }, { default: () => c() }));
|
|
36
36
|
}
|
|
37
37
|
return l;
|
|
38
38
|
}
|
|
39
|
-
}),
|
|
39
|
+
}), be = /* @__PURE__ */ Y(((e, t) => {
|
|
40
40
|
(function(n, r) {
|
|
41
41
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_utc = r();
|
|
42
42
|
})(e, (function() {
|
|
@@ -120,7 +120,7 @@ var J = Object.create, Y = Object.defineProperty, X = Object.getOwnPropertyDescr
|
|
|
120
120
|
};
|
|
121
121
|
};
|
|
122
122
|
}));
|
|
123
|
-
})),
|
|
123
|
+
})), xe = /* @__PURE__ */ Y(((e, t) => {
|
|
124
124
|
(function(n, r) {
|
|
125
125
|
typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self).dayjs_plugin_timezone = r();
|
|
126
126
|
})(e, (function() {
|
|
@@ -196,7 +196,7 @@ var J = Object.create, Y = Object.defineProperty, X = Object.getOwnPropertyDescr
|
|
|
196
196
|
};
|
|
197
197
|
};
|
|
198
198
|
}));
|
|
199
|
-
})),
|
|
199
|
+
})), Se = /* @__PURE__ */ ve(be()), Ce = /* @__PURE__ */ ve(xe()), we = {
|
|
200
200
|
"dao-ru": "导入",
|
|
201
201
|
"quan-xuan": "全选",
|
|
202
202
|
"xia-zai-dao-ru-mo-ban": "下载导入模板",
|
|
@@ -221,9 +221,10 @@ var J = Object.create, Y = Object.defineProperty, X = Object.getOwnPropertyDescr
|
|
|
221
221
|
copyFailed: "复制失败",
|
|
222
222
|
sheetNameTooLong: "Sheet名称 \"{0}\" 长度超过31个字符,已自动截断为 \"{1}\""
|
|
223
223
|
},
|
|
224
|
+
import: { versionMismatch: "模板版本有更新,请重新下载模板" },
|
|
224
225
|
validate: { invalidInput: "请输入正确内容" },
|
|
225
226
|
tools: { keysLengthError: "keys 长度必须大于2 默认前两位为 label value" }
|
|
226
|
-
},
|
|
227
|
+
}, Te = {
|
|
227
228
|
"dao-ru": "Import",
|
|
228
229
|
"quan-xuan": "Select All",
|
|
229
230
|
"xia-zai-dao-ru-mo-ban": "Download Import Template",
|
|
@@ -248,38 +249,39 @@ var J = Object.create, Y = Object.defineProperty, X = Object.getOwnPropertyDescr
|
|
|
248
249
|
copyFailed: "Copy failed",
|
|
249
250
|
sheetNameTooLong: "Sheet name \"{0}\" exceeds 31 characters, automatically truncated to \"{1}\""
|
|
250
251
|
},
|
|
252
|
+
import: { versionMismatch: "Template version has been updated, please re-download the template" },
|
|
251
253
|
validate: { invalidInput: "Please enter valid content" },
|
|
252
254
|
tools: { keysLengthError: "Keys length must be greater than 2, default first two are label and value" }
|
|
253
|
-
},
|
|
254
|
-
zh_cn:
|
|
255
|
-
en_us:
|
|
256
|
-
},
|
|
257
|
-
function
|
|
255
|
+
}, Ee = {
|
|
256
|
+
zh_cn: we,
|
|
257
|
+
en_us: Te
|
|
258
|
+
}, De = null;
|
|
259
|
+
function Oe(e = null) {
|
|
258
260
|
if (e) {
|
|
259
261
|
let { global: t } = e;
|
|
260
|
-
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn",
|
|
262
|
+
return t.messages.value.zh_cn ? t.mergeLocaleMessage("zh_cn", we) : t.setLocaleMessage("zh_cn", we), t.messages.value.en_us ? t.mergeLocaleMessage("en_us", Te) : t.setLocaleMessage("en_us", Te), De = e, e;
|
|
261
263
|
}
|
|
262
|
-
return
|
|
264
|
+
return De ||= ie({
|
|
263
265
|
legacy: !1,
|
|
264
266
|
locale: "zh_cn",
|
|
265
267
|
fallbackLocale: "zh_cn",
|
|
266
|
-
messages:
|
|
267
|
-
}),
|
|
268
|
+
messages: Ee
|
|
269
|
+
}), De;
|
|
268
270
|
}
|
|
269
|
-
function
|
|
270
|
-
return
|
|
271
|
+
function ke() {
|
|
272
|
+
return De || Oe();
|
|
271
273
|
}
|
|
272
|
-
function
|
|
273
|
-
return
|
|
274
|
+
function X() {
|
|
275
|
+
return ke().global.t;
|
|
274
276
|
}
|
|
275
|
-
|
|
276
|
-
async function
|
|
277
|
+
H.extend(Se.default), H.extend(Ce.default);
|
|
278
|
+
async function Ae(e, t) {
|
|
277
279
|
let { fields: n, range: r = 1 } = t;
|
|
278
280
|
if (!n) {
|
|
279
|
-
let e =
|
|
281
|
+
let e = X();
|
|
280
282
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
281
283
|
}
|
|
282
|
-
let i = new
|
|
284
|
+
let i = new V.Workbook();
|
|
283
285
|
await i.xlsx.load(e);
|
|
284
286
|
let a = {};
|
|
285
287
|
return i.eachSheet(function(e, t) {
|
|
@@ -295,41 +297,41 @@ async function Oe(e, t) {
|
|
|
295
297
|
}), a[e._name] = i;
|
|
296
298
|
}), i = null, a;
|
|
297
299
|
}
|
|
298
|
-
var
|
|
299
|
-
async function
|
|
300
|
+
var je = { columnWidth: 30 };
|
|
301
|
+
async function Me(e, t, n = [], r = {}) {
|
|
300
302
|
if (!e || !t) return;
|
|
301
|
-
let { columnStyle: i } = r, { columnWidth: a } =
|
|
303
|
+
let { columnStyle: i } = r, { columnWidth: a } = je;
|
|
302
304
|
t.forEach((e) => {
|
|
303
305
|
e.width = e.width ? e.width : a;
|
|
304
306
|
});
|
|
305
|
-
let { workbook: o, worksheet: s } =
|
|
306
|
-
s.columns = t, s.addRows(n), i && await
|
|
307
|
+
let { workbook: o, worksheet: s } = Ne();
|
|
308
|
+
s.columns = t, s.addRows(n), i && await Pe(o, s, i);
|
|
307
309
|
try {
|
|
308
310
|
let t = await o.xlsx.writeBuffer();
|
|
309
|
-
|
|
311
|
+
B(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
310
312
|
} catch (e) {
|
|
311
313
|
console.log(e);
|
|
312
314
|
}
|
|
313
315
|
}
|
|
314
|
-
function
|
|
315
|
-
let e = new
|
|
316
|
+
function Ne() {
|
|
317
|
+
let e = new V.Workbook();
|
|
316
318
|
return e.creator = "distributor System", e.lastModifiedBy = "distributor System", e.created = /* @__PURE__ */ new Date(), e.modified = /* @__PURE__ */ new Date(), e.lastPrinted = /* @__PURE__ */ new Date(), {
|
|
317
319
|
workbook: e,
|
|
318
320
|
worksheet: e.addWorksheet("Sheet1")
|
|
319
321
|
};
|
|
320
322
|
}
|
|
321
|
-
async function
|
|
323
|
+
async function Pe(e, t, n) {
|
|
322
324
|
let r = Object.keys(n);
|
|
323
325
|
for (let i of r) {
|
|
324
326
|
let r = n[i], { type: a } = r;
|
|
325
327
|
switch (a) {
|
|
326
328
|
case "IMG":
|
|
327
|
-
await
|
|
329
|
+
await Fe(e, t, i, r);
|
|
328
330
|
break;
|
|
329
331
|
}
|
|
330
332
|
}
|
|
331
333
|
}
|
|
332
|
-
async function
|
|
334
|
+
async function Fe(e, t, n, r) {
|
|
333
335
|
let i = t.getColumn(n), a = i.values;
|
|
334
336
|
t.getColumn(n).width = 20, t.eachRow((e, t) => {
|
|
335
337
|
t > 1 && (e.height = 40);
|
|
@@ -337,7 +339,7 @@ async function Ne(e, t, n, r) {
|
|
|
337
339
|
for (let n = 0, r = a.length; n < r; n++) {
|
|
338
340
|
if (n < 2) continue;
|
|
339
341
|
let r = a[n];
|
|
340
|
-
r && (t.getCell(i.letter + n).value = "", await
|
|
342
|
+
r && (t.getCell(i.letter + n).value = "", await Ie(e, t, r, {
|
|
341
343
|
width: 100,
|
|
342
344
|
height: 50,
|
|
343
345
|
col: i._number - 1,
|
|
@@ -345,8 +347,8 @@ async function Ne(e, t, n, r) {
|
|
|
345
347
|
}));
|
|
346
348
|
}
|
|
347
349
|
}
|
|
348
|
-
async function
|
|
349
|
-
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await
|
|
350
|
+
async function Ie(e, t, n, r) {
|
|
351
|
+
let { col: i, row: a, width: o, height: s } = r, { success: c, base64: l } = await Le(n, .3);
|
|
350
352
|
if (c) {
|
|
351
353
|
let n = e.addImage({
|
|
352
354
|
base64: l,
|
|
@@ -364,7 +366,7 @@ async function Pe(e, t, n, r) {
|
|
|
364
366
|
});
|
|
365
367
|
}
|
|
366
368
|
}
|
|
367
|
-
function
|
|
369
|
+
function Le(e, t = 1) {
|
|
368
370
|
let n = new Image();
|
|
369
371
|
return n.setAttribute("crossOrigin", "anonymous"), n.crossOrigin = "anonymous", n.src = e, new Promise((e, r) => {
|
|
370
372
|
n.onload = () => {
|
|
@@ -378,14 +380,14 @@ function Fe(e, t = 1) {
|
|
|
378
380
|
};
|
|
379
381
|
});
|
|
380
382
|
}
|
|
381
|
-
var
|
|
382
|
-
async function
|
|
383
|
+
var Re = "---";
|
|
384
|
+
async function ze(e, t) {
|
|
383
385
|
let { fields: n, range: r = 1 } = t;
|
|
384
386
|
if (!n) {
|
|
385
|
-
let e =
|
|
387
|
+
let e = X();
|
|
386
388
|
throw Error(e("excel.fieldsMappingRequired"));
|
|
387
389
|
}
|
|
388
|
-
let i = new
|
|
390
|
+
let i = new V.Workbook();
|
|
389
391
|
await i.xlsx.load(e);
|
|
390
392
|
let a = {};
|
|
391
393
|
return i.eachSheet(function(e, t) {
|
|
@@ -403,8 +405,8 @@ async function Le(e, t) {
|
|
|
403
405
|
if (i > r) {
|
|
404
406
|
let r = { _excelRowNumber: i }, a = !0;
|
|
405
407
|
Object.keys(o).forEach((t) => {
|
|
406
|
-
let [c, l] = o[t].split(
|
|
407
|
-
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ?
|
|
408
|
+
let [c, l] = o[t].split(Re), u = e.getCell(c), d;
|
|
409
|
+
d = l == "image" && n ? s[`${i}_${u._column._number}`] || "" : u.result == null ? u.value?.richText ? u.value.richText.reduce((e, t) => e + t.text, "") : u.value?.hyperlink ? u.value.text || u.value.hyperlink : u.type == 4 && u.value ? H(u.value).utc().format("YYYY-MM-DD HH:mm:ss") : u.value : u.result, d && l == "option" && (d = d.split(Re)[1]), r[t] = d, d && (a = !1);
|
|
408
410
|
}), a || t.push(r);
|
|
409
411
|
}
|
|
410
412
|
}), a[e._name] = t;
|
|
@@ -412,16 +414,16 @@ async function Le(e, t) {
|
|
|
412
414
|
}
|
|
413
415
|
}), i = null, a;
|
|
414
416
|
}
|
|
415
|
-
var
|
|
417
|
+
var Be = {
|
|
416
418
|
date: "yyyy-mm-dd",
|
|
417
419
|
number: "0",
|
|
418
420
|
string: "@"
|
|
419
421
|
};
|
|
420
|
-
async function
|
|
422
|
+
async function Ve(e, t) {
|
|
421
423
|
if (!e || t.length == 0) return;
|
|
422
|
-
let n =
|
|
424
|
+
let n = He(t);
|
|
423
425
|
for (let e of n.worksheets) {
|
|
424
|
-
let { columnWidth: r } =
|
|
426
|
+
let { columnWidth: r } = je, i = t[e.name];
|
|
425
427
|
if (!i) continue;
|
|
426
428
|
let { tableHeader: a, tableData: o } = i;
|
|
427
429
|
a.forEach((e) => {
|
|
@@ -435,11 +437,11 @@ async function ze(e, t) {
|
|
|
435
437
|
};
|
|
436
438
|
}), e.columns = a, e.addRows(o), a.forEach((t) => {
|
|
437
439
|
let { header: i, key: a, width: o, option: s, numFmt: c, locked: l, optionFormater: u } = t, d = e.getColumn(a);
|
|
438
|
-
if (d.numFmt =
|
|
440
|
+
if (d.numFmt = Be[c] || c, d.width = o || r, d.protection = { locked: l === !0 }, s) {
|
|
439
441
|
let t = n.addWorksheet(a);
|
|
440
|
-
t.state = "hidden", u ||= (e) => `${e.label}${
|
|
442
|
+
t.state = "hidden", u ||= (e) => `${e.label}${Re}${e.value}`, t.getColumn(1).values = s.map(u), Array(100).fill("").forEach((t, n) => {
|
|
441
443
|
if (n > 0) {
|
|
442
|
-
let t =
|
|
444
|
+
let t = X();
|
|
443
445
|
e.getCell(`${d.letter}${n}`).dataValidation = {
|
|
444
446
|
type: "list",
|
|
445
447
|
formulae: [`${a}!$A$1:$A$${s.length}`],
|
|
@@ -458,34 +460,34 @@ async function ze(e, t) {
|
|
|
458
460
|
}
|
|
459
461
|
try {
|
|
460
462
|
let t = await n.xlsx.writeBuffer();
|
|
461
|
-
|
|
463
|
+
B(new File([t], e, { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }));
|
|
462
464
|
} catch (e) {
|
|
463
465
|
console.log(e);
|
|
464
466
|
}
|
|
465
467
|
}
|
|
466
|
-
function
|
|
467
|
-
let t =
|
|
468
|
+
function He(e) {
|
|
469
|
+
let t = X(), n = new V.Workbook();
|
|
468
470
|
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((t, n) => (e[t].sort ?? 0) - (e[n].sort ?? 0)).forEach((r) => {
|
|
469
471
|
let i = r, a = !1;
|
|
470
472
|
/[\\/:*?\[\]]/g.test(r) && (r = r.replace(/[\\/:*?\[\]]/g, ""), a = !0), r.length > 31 && (r = r.substring(0, 31).trim(), a = !0, console.warn(t("excel.sheetNameTooLong", [i, r]))), a && (e[r] = e[i], delete e[i]), n.addWorksheet(r);
|
|
471
473
|
}), n;
|
|
472
474
|
}
|
|
473
|
-
function
|
|
475
|
+
function Ue(e) {
|
|
474
476
|
return e < 26 ? String.fromCharCode(65 + e) : String.fromCharCode(65 + Math.floor((e - 26) / 26)) + String.fromCharCode(65 + (e - 26) % 26);
|
|
475
477
|
}
|
|
476
478
|
//#endregion
|
|
477
479
|
//#region src/utils/tools/tools.js
|
|
478
|
-
function
|
|
480
|
+
function We(e) {
|
|
479
481
|
return new Promise((t) => {
|
|
480
482
|
setTimeout(() => {
|
|
481
483
|
t();
|
|
482
484
|
}, e);
|
|
483
485
|
});
|
|
484
486
|
}
|
|
485
|
-
function
|
|
487
|
+
function Ge(e) {
|
|
486
488
|
return JSON.parse(JSON.stringify(e));
|
|
487
489
|
}
|
|
488
|
-
function
|
|
490
|
+
function Ke(e) {
|
|
489
491
|
let t = [], n = {}, r = (e, t) => Object.prototype.hasOwnProperty.call(e, t);
|
|
490
492
|
for (let i of e) {
|
|
491
493
|
n[i.id] = {
|
|
@@ -497,10 +499,10 @@ function We(e) {
|
|
|
497
499
|
}
|
|
498
500
|
return t;
|
|
499
501
|
}
|
|
500
|
-
function
|
|
502
|
+
function qe(e, t = " ") {
|
|
501
503
|
return e ? e.split(t).filter((e) => e.trim()) : [];
|
|
502
504
|
}
|
|
503
|
-
var
|
|
505
|
+
var Je = class {
|
|
504
506
|
constructor(e, t = [
|
|
505
507
|
"label",
|
|
506
508
|
"value",
|
|
@@ -515,7 +517,7 @@ var Ke = class {
|
|
|
515
517
|
}
|
|
516
518
|
getName(e) {
|
|
517
519
|
if (!this.has(e)) return "-";
|
|
518
|
-
let t =
|
|
520
|
+
let t = ke().global.locale, { label: n, labelEn: r } = this.map.get(e);
|
|
519
521
|
return (t.value == "zh_cn" ? n : r) ?? n ?? "-";
|
|
520
522
|
}
|
|
521
523
|
getTag(e) {
|
|
@@ -535,51 +537,51 @@ var Ke = class {
|
|
|
535
537
|
return this.map.has(e);
|
|
536
538
|
}
|
|
537
539
|
};
|
|
538
|
-
function
|
|
539
|
-
if (e.length == 0) return new
|
|
540
|
+
function Ye(e, t = [], n = "i18nName") {
|
|
541
|
+
if (e.length == 0) return new Je([]);
|
|
540
542
|
if (t.length < 2) {
|
|
541
|
-
let e =
|
|
543
|
+
let e = X();
|
|
542
544
|
throw Error(e("tools.keysLengthError"));
|
|
543
545
|
}
|
|
544
|
-
return new
|
|
546
|
+
return new Je(e.map((e) => {
|
|
545
547
|
let r = {};
|
|
546
548
|
return n && (r.labelEn = e[n]), t.forEach((t, n) => {
|
|
547
549
|
n === 0 ? r.label = e[t] : n === 1 ? r.value = e[t] : r[t] = e[t];
|
|
548
550
|
}), r;
|
|
549
551
|
}));
|
|
550
552
|
}
|
|
551
|
-
function
|
|
553
|
+
function Xe(e) {
|
|
552
554
|
return e ? e.replace(/<[^>]+>/g, "") : "";
|
|
553
555
|
}
|
|
554
|
-
function
|
|
556
|
+
function Ze(e) {
|
|
555
557
|
return e ? (e.includes("\\\\u") && (e = e.replace(/\\/g, "")), e.replace(/\\u[\dA-F]{4}/gi, (e) => String.fromCharCode(parseInt(e.replace(/\\u/g, ""), 16)))) : "";
|
|
556
558
|
}
|
|
557
|
-
function
|
|
559
|
+
function Qe(e, t = 10) {
|
|
558
560
|
let n = 1024 * 1024 * t;
|
|
559
561
|
return !(e.size > n);
|
|
560
562
|
}
|
|
561
|
-
function
|
|
563
|
+
function $e(e) {
|
|
562
564
|
return Array.from(10).fill(0).map((t, n) => e + "_" + n);
|
|
563
565
|
}
|
|
564
|
-
function
|
|
566
|
+
function et(e) {
|
|
565
567
|
let t = {};
|
|
566
568
|
return e.map((e, n) => {
|
|
567
|
-
let { key: r, option: i, type: a, optionFormater: o } = e, s =
|
|
569
|
+
let { key: r, option: i, type: a, optionFormater: o } = e, s = Ue(n);
|
|
568
570
|
i && !o ? t[r] = `${s}---option` : a === "image" ? t[r] = `${s}---image` : t[r] = s;
|
|
569
571
|
}), t;
|
|
570
572
|
}
|
|
571
|
-
function
|
|
573
|
+
function tt(e, t) {
|
|
572
574
|
return t.split(".").reduce((e, t) => e && e[t], e);
|
|
573
575
|
}
|
|
574
576
|
//#endregion
|
|
575
577
|
//#region \0plugin-vue:export-helper
|
|
576
|
-
var
|
|
578
|
+
var Z = (e, t) => {
|
|
577
579
|
let n = e.__vccOpts || e;
|
|
578
580
|
for (let [e, r] of t) n[e] = r;
|
|
579
581
|
return n;
|
|
580
|
-
},
|
|
582
|
+
}, nt = ["onClick"], rt = /* @__PURE__ */ Z({
|
|
581
583
|
__name: "index",
|
|
582
|
-
props: /* @__PURE__ */
|
|
584
|
+
props: /* @__PURE__ */ b({
|
|
583
585
|
api: { type: Function },
|
|
584
586
|
showCheckAll: {
|
|
585
587
|
type: Boolean,
|
|
@@ -614,124 +616,125 @@ var Q = (e, t) => {
|
|
|
614
616
|
modelValue: {},
|
|
615
617
|
modelModifiers: {}
|
|
616
618
|
}),
|
|
617
|
-
emits: /* @__PURE__ */
|
|
619
|
+
emits: /* @__PURE__ */ b([
|
|
618
620
|
"success",
|
|
619
621
|
"change",
|
|
620
622
|
"changeAll"
|
|
621
623
|
], ["update:modelValue"]),
|
|
622
624
|
setup(e, { emit: t }) {
|
|
623
|
-
let n = e, r =
|
|
625
|
+
let n = e, r = L(), { t: i, locale: a } = U(), o = ee(e, "modelValue"), s = l(() => r["value-key"] != null), _ = A(""), v = l(() => {
|
|
624
626
|
if (r.remote !== void 0) return n.data;
|
|
625
|
-
let e =
|
|
627
|
+
let e = qe(_.value), { data: t, labelValue: i } = n, o = t || C.value;
|
|
626
628
|
if (e.length == 0) return o;
|
|
627
629
|
let { label: s, labelEn: c } = i, l = a.value == "en_us" ? c || "i18nName" : s;
|
|
628
630
|
return e.length == 1 ? o.filter((t) => t[l].toLowerCase().includes(e[0].toLowerCase())) : o.filter((t) => {
|
|
629
631
|
let n = !1;
|
|
630
632
|
return n = e.some((e) => t[l].toLowerCase() == e.toLowerCase()), n;
|
|
631
633
|
});
|
|
632
|
-
}), y =
|
|
634
|
+
}), y = l({
|
|
633
635
|
get() {
|
|
634
636
|
return r.multiple == null || o.value == null ? !1 : o.value.length == v.value.length;
|
|
635
637
|
},
|
|
636
638
|
set(e) {
|
|
637
639
|
return e;
|
|
638
640
|
}
|
|
639
|
-
}),
|
|
641
|
+
}), b = t, C = A([]);
|
|
640
642
|
n.api && (async () => {
|
|
641
643
|
let { data: e } = await n.api();
|
|
642
|
-
C.value = [...e],
|
|
644
|
+
C.value = [...e], b("success", C);
|
|
643
645
|
})();
|
|
644
646
|
function w(e) {
|
|
645
|
-
|
|
647
|
+
b("change", e), T.value && S(() => {
|
|
646
648
|
n.optionClick && n.optionClick(T.value), T.value = null;
|
|
647
649
|
});
|
|
648
650
|
}
|
|
649
|
-
let T =
|
|
651
|
+
let T = A(null);
|
|
650
652
|
function E() {
|
|
651
|
-
|
|
652
|
-
|
|
653
|
+
let e = r.multiple === void 0 ? void 0 : [];
|
|
654
|
+
b("change", e), S(() => {
|
|
655
|
+
n.optionClick && n.optionClick(e);
|
|
653
656
|
});
|
|
654
657
|
}
|
|
655
|
-
function
|
|
658
|
+
function D(e) {
|
|
656
659
|
T.value = e;
|
|
657
660
|
}
|
|
658
|
-
let
|
|
659
|
-
if (
|
|
661
|
+
let k = n.labelValue.label.split("-"), P = (e) => {
|
|
662
|
+
if (k.length == 1) {
|
|
660
663
|
if (n.changeLocal) return i(e[n.labelValue.label]);
|
|
661
664
|
let t = a.value == "en_us" ? e[n.labelValue.labelEn || "i18nName"] : e[n.labelValue.label];
|
|
662
665
|
return t ||= e[n.labelValue.label], t + "";
|
|
663
666
|
} else {
|
|
664
667
|
let t = [];
|
|
665
|
-
return
|
|
668
|
+
return k.forEach((n) => {
|
|
666
669
|
t.push(e[n]);
|
|
667
670
|
}), t.join("-");
|
|
668
671
|
}
|
|
669
672
|
};
|
|
670
|
-
function
|
|
673
|
+
function te(e) {
|
|
671
674
|
let t = n.data ? n.data : C.value;
|
|
672
|
-
o.value = e ? t.map((e) =>
|
|
673
|
-
|
|
675
|
+
o.value = e ? t.map((e) => s.value ? e : e[n.labelValue.value]) : [], S(() => {
|
|
676
|
+
b("change", o.value), b("changeAll", o.value, t);
|
|
674
677
|
});
|
|
675
678
|
}
|
|
676
|
-
function
|
|
677
|
-
|
|
679
|
+
function ne(e) {
|
|
680
|
+
b("change", s.value ? e : e[n.labelValue.value]), S(() => {
|
|
678
681
|
n.optionClick && n.optionClick(e);
|
|
679
682
|
});
|
|
680
683
|
}
|
|
681
|
-
function
|
|
682
|
-
let t =
|
|
684
|
+
function B(e) {
|
|
685
|
+
let t = s.value ? e : e[n.labelValue.value], r = s.value ? o.value.some((t) => t[n.labelValue.value] === e[n.labelValue.value]) : o.value.includes(t);
|
|
683
686
|
return !!(n.maxLimit > 0 && o.value.length >= n.maxLimit && !r || n.minLimit > 0 && o.value.length === n.minLimit && r);
|
|
684
687
|
}
|
|
685
|
-
function
|
|
688
|
+
function V(e) {
|
|
686
689
|
return e.map((e) => ({
|
|
687
690
|
...e,
|
|
688
|
-
label:
|
|
689
|
-
value:
|
|
691
|
+
label: P(e),
|
|
692
|
+
value: s.value ? e : e[n.labelValue.value]
|
|
690
693
|
}));
|
|
691
694
|
}
|
|
692
|
-
let
|
|
693
|
-
|
|
694
|
-
let t =
|
|
695
|
-
if (t.length !==
|
|
695
|
+
let H = A([]);
|
|
696
|
+
H.value = V(n.data ? n.data : C.value), R(() => n.data ? n.data : C.value, (e) => {
|
|
697
|
+
let t = V(e);
|
|
698
|
+
if (t.length !== H.value.length) H.value = t;
|
|
696
699
|
else {
|
|
697
700
|
let e = !1;
|
|
698
|
-
for (let n = 0; n < t.length; n++) if (t[n].value !==
|
|
701
|
+
for (let n = 0; n < t.length; n++) if (t[n].value !== H.value[n]?.value) {
|
|
699
702
|
e = !0;
|
|
700
703
|
break;
|
|
701
704
|
}
|
|
702
|
-
e && (
|
|
705
|
+
e && (H.value = t);
|
|
703
706
|
}
|
|
704
707
|
}, { deep: !0 });
|
|
705
|
-
let
|
|
708
|
+
let ie = l(() => r.multiple !== void 0 && (n.maxLimit > 0 || n.minLimit > 0) ? H.value.map((e) => ({
|
|
706
709
|
...e,
|
|
707
|
-
disabled:
|
|
708
|
-
})) :
|
|
710
|
+
disabled: B(e)
|
|
711
|
+
})) : H.value);
|
|
709
712
|
return (t, n) => {
|
|
710
|
-
let i =
|
|
711
|
-
return
|
|
713
|
+
let i = N("el-checkbox"), a = N("el-select-v2"), l = N("el-option"), b = N("el-select");
|
|
714
|
+
return I(r).v2 == null ? (O(), u(b, x({
|
|
712
715
|
key: 1,
|
|
713
716
|
modelValue: o.value,
|
|
714
717
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
715
718
|
filterable: "",
|
|
716
719
|
"collapse-tags": "",
|
|
717
720
|
"collapse-tags-tooltip": "",
|
|
718
|
-
"filter-method":
|
|
721
|
+
"filter-method": I(r).remote == null ? (e) => _.value = e : void 0,
|
|
719
722
|
clearable: ""
|
|
720
|
-
},
|
|
721
|
-
default:
|
|
723
|
+
}, I(r), { onClear: E }), {
|
|
724
|
+
default: z(() => [I(r).multiple != null && e.showCheckAll && e.maxLimit == null ? M(t.$slots, "header", { key: 0 }, () => [g(i, {
|
|
722
725
|
class: "mgl20",
|
|
723
726
|
modelValue: y.value,
|
|
724
727
|
"onUpdate:modelValue": n[2] ||= (e) => y.value = e,
|
|
725
|
-
onChange:
|
|
728
|
+
onChange: te
|
|
726
729
|
}, {
|
|
727
|
-
default:
|
|
730
|
+
default: z(() => [h(F(t.$t("quan-xuan")), 1)]),
|
|
728
731
|
_: 1
|
|
729
|
-
}, 8, ["modelValue"])], !0) :
|
|
732
|
+
}, 8, ["modelValue"])], !0) : d("", !0), (O(!0), f(c, null, j(v.value, (t, n) => (O(), u(l, {
|
|
730
733
|
key: n,
|
|
731
|
-
label:
|
|
732
|
-
disabled:
|
|
733
|
-
onClick:
|
|
734
|
-
value:
|
|
734
|
+
label: P(t),
|
|
735
|
+
disabled: I(r).multiple != null && (e.maxLimit > 0 || e.minLimit > 0) ? B(t) : !1,
|
|
736
|
+
onClick: re((e) => ne(t), ["stop"]),
|
|
737
|
+
value: s.value ? t : t[e.labelValue.value]
|
|
735
738
|
}, null, 8, [
|
|
736
739
|
"label",
|
|
737
740
|
"disabled",
|
|
@@ -739,68 +742,68 @@ var Q = (e, t) => {
|
|
|
739
742
|
"value"
|
|
740
743
|
]))), 128))]),
|
|
741
744
|
_: 3
|
|
742
|
-
}, 16, ["modelValue", "filter-method"])) : (
|
|
745
|
+
}, 16, ["modelValue", "filter-method"])) : (O(), u(a, x({
|
|
743
746
|
key: 0,
|
|
744
|
-
options:
|
|
747
|
+
options: ie.value,
|
|
745
748
|
modelValue: o.value,
|
|
746
749
|
"onUpdate:modelValue": n[1] ||= (e) => o.value = e
|
|
747
|
-
},
|
|
750
|
+
}, I(r), {
|
|
748
751
|
filterable: "",
|
|
749
752
|
"collapse-tags": "",
|
|
750
753
|
"collapse-tags-tooltip": "",
|
|
751
754
|
clearable: "",
|
|
752
755
|
onChange: w
|
|
753
|
-
}),
|
|
754
|
-
default:
|
|
756
|
+
}), m({
|
|
757
|
+
default: z(({ item: e }) => [p("div", { onClick: (t) => D(e) }, F(e.label), 9, nt)]),
|
|
755
758
|
_: 2
|
|
756
|
-
}, [
|
|
759
|
+
}, [I(r).multiple == null ? void 0 : {
|
|
757
760
|
name: "header",
|
|
758
|
-
fn:
|
|
761
|
+
fn: z(() => [M(t.$slots, "header", {}, () => [g(i, {
|
|
759
762
|
class: "mgl20",
|
|
760
763
|
modelValue: y.value,
|
|
761
764
|
"onUpdate:modelValue": n[0] ||= (e) => y.value = e,
|
|
762
|
-
onChange:
|
|
765
|
+
onChange: te
|
|
763
766
|
}, {
|
|
764
|
-
default:
|
|
767
|
+
default: z(() => [h(F(t.$t("quan-xuan")), 1)]),
|
|
765
768
|
_: 1
|
|
766
769
|
}, 8, ["modelValue"])], !0)]),
|
|
767
770
|
key: "0"
|
|
768
771
|
}]), 1040, ["options", "modelValue"]));
|
|
769
772
|
};
|
|
770
773
|
}
|
|
771
|
-
}, [["__scopeId", "data-v-
|
|
774
|
+
}, [["__scopeId", "data-v-7b9ec6d8"]]), it = _({ props: { name: {
|
|
772
775
|
tyepe: String,
|
|
773
776
|
required: !0
|
|
774
777
|
} } });
|
|
775
|
-
function
|
|
776
|
-
let o =
|
|
777
|
-
return
|
|
778
|
-
default:
|
|
778
|
+
function at(e, t, n, r, i, a) {
|
|
779
|
+
let o = N("el-icon");
|
|
780
|
+
return O(), u(o, { class: "cmp-icon" }, {
|
|
781
|
+
default: z(() => [(O(), u(P(e.name)))]),
|
|
779
782
|
_: 1
|
|
780
783
|
});
|
|
781
784
|
}
|
|
782
|
-
var
|
|
785
|
+
var ot = /* @__PURE__ */ Z(it, [["render", at], ["__scopeId", "data-v-733f9daa"]]), st = { class: "confirm-button-wrapper" }, ct = /* @__PURE__ */ Z({
|
|
783
786
|
__name: "index",
|
|
784
787
|
emits: ["ok", "no"],
|
|
785
788
|
setup(e, { emit: t }) {
|
|
786
|
-
let n = t, r =
|
|
789
|
+
let n = t, r = oe(() => {
|
|
787
790
|
n("ok");
|
|
788
791
|
}, 500);
|
|
789
792
|
function i() {
|
|
790
793
|
n("no");
|
|
791
794
|
}
|
|
792
795
|
return (e, t) => {
|
|
793
|
-
let n =
|
|
794
|
-
return
|
|
795
|
-
onConfirm:
|
|
796
|
+
let n = N("el-popconfirm");
|
|
797
|
+
return O(), f("span", st, [g(n, x(e.$attrs, {
|
|
798
|
+
onConfirm: I(r),
|
|
796
799
|
onCancel: i
|
|
797
800
|
}), {
|
|
798
|
-
reference:
|
|
801
|
+
reference: z(() => [M(e.$slots, "default", {}, void 0, !0)]),
|
|
799
802
|
_: 3
|
|
800
803
|
}, 16, ["onConfirm"])]);
|
|
801
804
|
};
|
|
802
805
|
}
|
|
803
|
-
}, [["__scopeId", "data-v-24cb35fd"]]),
|
|
806
|
+
}, [["__scopeId", "data-v-24cb35fd"]]), lt = { class: "ImportButton" }, ut = ["accept"], dt = /* @__PURE__ */ Z({
|
|
804
807
|
__name: "index",
|
|
805
808
|
props: {
|
|
806
809
|
accept: {
|
|
@@ -814,34 +817,49 @@ var it = /* @__PURE__ */ Q(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"]
|
|
|
814
817
|
fileChange: {
|
|
815
818
|
type: Function,
|
|
816
819
|
required: !0
|
|
820
|
+
},
|
|
821
|
+
version: {
|
|
822
|
+
type: Number,
|
|
823
|
+
required: !1
|
|
817
824
|
}
|
|
818
825
|
},
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
+
setup(e) {
|
|
827
|
+
let { t } = U(), n = e, r = A(null), a = A(!1);
|
|
828
|
+
function o(e) {
|
|
829
|
+
let t = e.match(/__v(\d+)/);
|
|
830
|
+
return t ? parseInt(t[1], 10) : null;
|
|
831
|
+
}
|
|
832
|
+
async function s(e) {
|
|
833
|
+
a.value = !0;
|
|
834
|
+
let s = e.target.files[0];
|
|
835
|
+
if (alert("props.version---" + n.version), console.log("props.version", n.version), n.version !== void 0) {
|
|
836
|
+
let e = o(s.name);
|
|
837
|
+
if (console.log("fileVersion", e), e === null || e !== n.version) {
|
|
838
|
+
i.error(t("import.versionMismatch")), a.value = !1, r.value.value = null;
|
|
839
|
+
return;
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
let c = await ze(s, n.fields).catch(() => {
|
|
843
|
+
a.value = !1;
|
|
826
844
|
}).finally(() => {
|
|
827
845
|
r.value.value = null;
|
|
828
846
|
});
|
|
829
|
-
await n.fileChange(
|
|
830
|
-
|
|
847
|
+
await n.fileChange(c).finally(() => {
|
|
848
|
+
a.value = !1;
|
|
831
849
|
});
|
|
832
850
|
}
|
|
833
851
|
return (t, n) => {
|
|
834
|
-
let
|
|
835
|
-
return
|
|
852
|
+
let i = N("el-button");
|
|
853
|
+
return O(), f("div", lt, [g(i, x({
|
|
836
854
|
type: "primary",
|
|
837
|
-
loading:
|
|
855
|
+
loading: a.value,
|
|
838
856
|
class: "mgr10",
|
|
839
857
|
onClick: n[0] ||= (e) => r.value.click()
|
|
840
858
|
}, t.$attrs), {
|
|
841
|
-
default:
|
|
859
|
+
default: z(() => [M(t.$slots, "default", {}, () => [h(F(t.$t("dao-ru")), 1)], !0)]),
|
|
842
860
|
_: 3
|
|
843
|
-
}, 16, ["loading"]),
|
|
844
|
-
onChange:
|
|
861
|
+
}, 16, ["loading"]), p("input", {
|
|
862
|
+
onChange: s,
|
|
845
863
|
ref_key: "input",
|
|
846
864
|
ref: r,
|
|
847
865
|
accept: e.accept,
|
|
@@ -852,27 +870,27 @@ var it = /* @__PURE__ */ Q(nt, [["render", rt], ["__scopeId", "data-v-733f9daa"]
|
|
|
852
870
|
opacity: "0"
|
|
853
871
|
},
|
|
854
872
|
type: "file"
|
|
855
|
-
}, null, 40,
|
|
873
|
+
}, null, 40, ut)]);
|
|
856
874
|
};
|
|
857
875
|
}
|
|
858
|
-
}, [["__scopeId", "data-v-
|
|
876
|
+
}, [["__scopeId", "data-v-5afcda42"]]);
|
|
859
877
|
//#endregion
|
|
860
878
|
//#region src/components/SearchBar/tools.js
|
|
861
|
-
function
|
|
879
|
+
function ft(e) {
|
|
862
880
|
let t = {};
|
|
863
881
|
return e.forEach((e) => {
|
|
864
882
|
let { key: n, type: r, option: i = {}, value: a, dateType: o = "date" } = e;
|
|
865
|
-
if (n) if (r == "input" && i?.multiple) t[n] =
|
|
883
|
+
if (n) if (r == "input" && i?.multiple) t[n] = qe(a);
|
|
866
884
|
else if (r == "date") if (o.includes("range")) {
|
|
867
885
|
let [e, r] = n, [i, s] = a || [];
|
|
868
|
-
i && o == "daterange" && (i =
|
|
886
|
+
i && o == "daterange" && (i = H(i).format("YYYY-MM-DD 00:00:00"), s = H(s).format("YYYY-MM-DD 23:59:59")), t[e] = i, t[r] = s;
|
|
869
887
|
} else t[n] = a;
|
|
870
888
|
else t[n] = a;
|
|
871
889
|
}), t;
|
|
872
890
|
}
|
|
873
891
|
//#endregion
|
|
874
892
|
//#region src/components/SearchBar/index.vue
|
|
875
|
-
var
|
|
893
|
+
var pt = { key: 0 }, mt = { class: "btns" }, ht = { class: "left" }, gt = { class: "right" }, _t = /* @__PURE__ */ Z({
|
|
876
894
|
__name: "index",
|
|
877
895
|
props: { form: {
|
|
878
896
|
type: Object,
|
|
@@ -884,28 +902,28 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
884
902
|
"visibleChange"
|
|
885
903
|
],
|
|
886
904
|
setup(e, { expose: t, emit: n }) {
|
|
887
|
-
let r = e, i = n, a =
|
|
905
|
+
let r = e, i = n, a = A(!0), o = A(null), { t: s } = U(), m = {
|
|
888
906
|
datetimerange: "YYYY-MM-DD HH:mm:ss",
|
|
889
907
|
daterange: "YYYY-MM-DD",
|
|
890
908
|
month: "YYYY-MM"
|
|
891
|
-
}, _ =
|
|
909
|
+
}, _ = l(() => a.value ? s("guan-bi") : s("zhan-kai"));
|
|
892
910
|
function v() {
|
|
893
911
|
i("confirm");
|
|
894
912
|
}
|
|
895
913
|
function y(e) {
|
|
896
914
|
e.option.onClear && e.option.onClear(), i("confirm");
|
|
897
915
|
}
|
|
898
|
-
function
|
|
916
|
+
function b() {
|
|
899
917
|
i("reset");
|
|
900
918
|
}
|
|
901
|
-
function
|
|
919
|
+
function S() {
|
|
902
920
|
i("confirm");
|
|
903
921
|
}
|
|
904
922
|
function T() {
|
|
905
|
-
return
|
|
923
|
+
return ft(r.form.items);
|
|
906
924
|
}
|
|
907
|
-
let E =
|
|
908
|
-
function
|
|
925
|
+
let E = ae(r.form.items);
|
|
926
|
+
function D() {
|
|
909
927
|
r.form.items.forEach((e) => {
|
|
910
928
|
let t = E.find((t) => t.key == e.key);
|
|
911
929
|
t && (e.value = t.value);
|
|
@@ -913,29 +931,29 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
913
931
|
}
|
|
914
932
|
return t({
|
|
915
933
|
getPrm: T,
|
|
916
|
-
reset:
|
|
934
|
+
reset: D
|
|
917
935
|
}), (t, n) => {
|
|
918
|
-
let r =
|
|
919
|
-
return
|
|
936
|
+
let r = N("el-input"), s = N("el-date-picker"), l = N("el-form-item"), T = N("el-form"), E = N("el-link"), D = N("el-button");
|
|
937
|
+
return O(), f("div", {
|
|
920
938
|
class: "searchBar-container mgt10 mgb10",
|
|
921
|
-
onKeydown:
|
|
922
|
-
}, [
|
|
939
|
+
onKeydown: ne(v, ["enter"])
|
|
940
|
+
}, [p("div", {
|
|
923
941
|
class: "searchBar",
|
|
924
|
-
style:
|
|
925
|
-
}, [
|
|
942
|
+
style: w({ height: a.value ? "auto" : "32px" })
|
|
943
|
+
}, [g(T, {
|
|
926
944
|
inline: "",
|
|
927
945
|
model: e.form.data
|
|
928
946
|
}, {
|
|
929
|
-
default:
|
|
947
|
+
default: z(() => [(O(!0), f(c, null, j(e.form.items.filter((e) => !e.hidden), (e) => (O(), f(c, { key: e.key }, [e.type == "br" ? (O(), f("br", pt)) : (O(), u(l, {
|
|
930
948
|
key: 1,
|
|
931
949
|
label: e.name
|
|
932
950
|
}, {
|
|
933
|
-
default:
|
|
934
|
-
e.type === "input" ? (
|
|
951
|
+
default: z(() => [
|
|
952
|
+
e.type === "input" ? (O(), u(r, {
|
|
935
953
|
key: 0,
|
|
936
954
|
modelValue: e.value,
|
|
937
955
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
938
|
-
class:
|
|
956
|
+
class: C(e.option?.class || "w150"),
|
|
939
957
|
placeholder: t.$t("qing-shu-ru"),
|
|
940
958
|
clearable: ""
|
|
941
959
|
}, null, 8, [
|
|
@@ -943,8 +961,8 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
943
961
|
"onUpdate:modelValue",
|
|
944
962
|
"class",
|
|
945
963
|
"placeholder"
|
|
946
|
-
])) : e.type === "custom" ? (
|
|
947
|
-
e.type === "select" ? (
|
|
964
|
+
])) : e.type === "custom" ? (O(), u(P(e.render), { key: 1 })) : d("", !0),
|
|
965
|
+
e.type === "select" ? (O(), u(rt, x({
|
|
948
966
|
key: 2,
|
|
949
967
|
class: e.option?.class || "w150",
|
|
950
968
|
modelValue: e.value,
|
|
@@ -959,8 +977,8 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
959
977
|
"onUpdate:modelValue",
|
|
960
978
|
"onClear",
|
|
961
979
|
"placeholder"
|
|
962
|
-
])) :
|
|
963
|
-
e.type === "date" ? (
|
|
980
|
+
])) : d("", !0),
|
|
981
|
+
e.type === "date" ? (O(), u(s, x({
|
|
964
982
|
key: 3,
|
|
965
983
|
class: {
|
|
966
984
|
datetimerange: "w300",
|
|
@@ -968,10 +986,10 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
968
986
|
}[e.dateType] || "w100",
|
|
969
987
|
modelValue: e.value,
|
|
970
988
|
"onUpdate:modelValue": (t) => e.value = t,
|
|
971
|
-
"value-format":
|
|
989
|
+
"value-format": m[e.dateType] || "YYYY-MM-DD",
|
|
972
990
|
type: e.dateType || "date",
|
|
973
991
|
onFocus: (t) => o.value = e,
|
|
974
|
-
onChange: (t) =>
|
|
992
|
+
onChange: (t) => S(e),
|
|
975
993
|
placeholder: t.$t("qing-xuan-ze"),
|
|
976
994
|
"start-placeholder": t.$t("kai-shi-shi-jian"),
|
|
977
995
|
"end-placeholder": t.$t("jie-shu-shi-jian")
|
|
@@ -986,41 +1004,41 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
986
1004
|
"placeholder",
|
|
987
1005
|
"start-placeholder",
|
|
988
1006
|
"end-placeholder"
|
|
989
|
-
])) :
|
|
1007
|
+
])) : d("", !0)
|
|
990
1008
|
]),
|
|
991
1009
|
_: 2
|
|
992
1010
|
}, 1032, ["label"]))], 64))), 128))]),
|
|
993
1011
|
_: 1
|
|
994
|
-
}, 8, ["model"])], 4),
|
|
995
|
-
|
|
1012
|
+
}, 8, ["model"])], 4), p("div", mt, [p("div", ht, [M(t.$slots, "table-header-left", {}, void 0, !0)]), p("div", gt, [
|
|
1013
|
+
g(E, {
|
|
996
1014
|
underline: "never",
|
|
997
1015
|
class: "mgr10",
|
|
998
1016
|
onClick: n[0] ||= () => {
|
|
999
1017
|
i("visibleChange", !a.value), a.value = !a.value;
|
|
1000
1018
|
}
|
|
1001
1019
|
}, {
|
|
1002
|
-
default:
|
|
1020
|
+
default: z(() => [g(ot, { name: a.value ? "ArrowUp" : "ArrowDown" }, null, 8, ["name"]), h(" " + F(_.value), 1)]),
|
|
1003
1021
|
_: 1
|
|
1004
1022
|
}),
|
|
1005
|
-
|
|
1023
|
+
g(D, {
|
|
1006
1024
|
type: "primary",
|
|
1007
1025
|
onClick: v
|
|
1008
1026
|
}, {
|
|
1009
|
-
default:
|
|
1027
|
+
default: z(() => [h(F(t.$t("shai-xuan")), 1)]),
|
|
1010
1028
|
_: 1
|
|
1011
1029
|
}),
|
|
1012
|
-
|
|
1030
|
+
g(D, {
|
|
1013
1031
|
type: "primary",
|
|
1014
|
-
onClick:
|
|
1032
|
+
onClick: b
|
|
1015
1033
|
}, {
|
|
1016
|
-
default:
|
|
1034
|
+
default: z(() => [h(F(t.$t("chong-zhi")), 1)]),
|
|
1017
1035
|
_: 1
|
|
1018
1036
|
}),
|
|
1019
|
-
|
|
1037
|
+
M(t.$slots, "btn", {}, void 0, !0)
|
|
1020
1038
|
])])], 32);
|
|
1021
1039
|
};
|
|
1022
1040
|
}
|
|
1023
|
-
}, [["__scopeId", "data-v-db6f71dd"]]),
|
|
1041
|
+
}, [["__scopeId", "data-v-db6f71dd"]]), vt = {
|
|
1024
1042
|
pageNoKey: "pageNo",
|
|
1025
1043
|
pageSizeKey: "pageSize",
|
|
1026
1044
|
totalKey: "total",
|
|
@@ -1044,26 +1062,26 @@ var dt = { key: 0 }, ft = { class: "btns" }, pt = { class: "left" }, mt = { clas
|
|
|
1044
1062
|
showShadow: !1,
|
|
1045
1063
|
showCheckBox: !1,
|
|
1046
1064
|
enableCellCopy: !0
|
|
1047
|
-
},
|
|
1048
|
-
function
|
|
1049
|
-
|
|
1050
|
-
|
|
1065
|
+
}, Q = { ...vt };
|
|
1066
|
+
function yt(e) {
|
|
1067
|
+
Q = {
|
|
1068
|
+
...Q,
|
|
1051
1069
|
...e,
|
|
1052
1070
|
responseDataKeys: {
|
|
1053
|
-
|
|
1071
|
+
...Q.responseDataKeys,
|
|
1054
1072
|
...e.responseDataKeys || {}
|
|
1055
1073
|
}
|
|
1056
1074
|
};
|
|
1057
1075
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1076
|
+
function bt() {
|
|
1077
|
+
return Q;
|
|
1060
1078
|
}
|
|
1061
|
-
function
|
|
1062
|
-
|
|
1079
|
+
function xt() {
|
|
1080
|
+
Q = { ...vt };
|
|
1063
1081
|
}
|
|
1064
1082
|
//#endregion
|
|
1065
1083
|
//#region src/components/ListPage/index.vue
|
|
1066
|
-
var
|
|
1084
|
+
var St = { class: "center" }, Ct = /* @__PURE__ */ Z({
|
|
1067
1085
|
__name: "index",
|
|
1068
1086
|
props: {
|
|
1069
1087
|
id: {
|
|
@@ -1093,52 +1111,52 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1093
1111
|
}
|
|
1094
1112
|
},
|
|
1095
1113
|
setup(e, { expose: t }) {
|
|
1096
|
-
let { t: n, locale: r } =
|
|
1114
|
+
let { t: n, locale: r } = U(), i = ce(), a = bt(), o = e, s = A(!1), c = A([]);
|
|
1097
1115
|
o.searchForm.showSearch === void 0 && (o.searchForm.showSearch = a.showSearch), o.searchForm.showPage === void 0 && (o.searchForm.showPage = a.showPage), o.searchForm.showShadow === void 0 && (o.searchForm.showShadow = a.showShadow), o.searchForm.showCheckBox === void 0 && (o.searchForm.showCheckBox = a.showCheckBox), o.searchForm.enableCellCopy === void 0 && (o.searchForm.enableCellCopy = a.enableCellCopy), o.searchForm.selections || (o.searchForm.selections = []);
|
|
1098
|
-
let
|
|
1116
|
+
let m = l(() => {
|
|
1099
1117
|
let e = i.path.replace(/\//g, "-").replace(/^-/, "") || "default-table";
|
|
1100
1118
|
return o.id ? `listPageId-${e}-${o.id}` : `listPageId-${e}`;
|
|
1101
|
-
}), _ =
|
|
1119
|
+
}), _ = ae(o.searchForm.items), v = o.searchForm.pageNoKey || a.pageNoKey, y = o.searchForm.pageSizeKey || a.pageSizeKey, b = k({
|
|
1102
1120
|
[v]: 1,
|
|
1103
1121
|
[y]: o.searchForm.defaultPageSize || a.defaultPageSize,
|
|
1104
1122
|
total: 0
|
|
1105
|
-
}),
|
|
1106
|
-
|
|
1107
|
-
if (!
|
|
1108
|
-
let e =
|
|
1109
|
-
|
|
1123
|
+
}), w = A(null), j = A(null), P = A(450), L = oe(() => {
|
|
1124
|
+
S(() => {
|
|
1125
|
+
if (!j.value) return;
|
|
1126
|
+
let e = j.value.getBoundingClientRect(), t = window.innerHeight - e.top - 100;
|
|
1127
|
+
P.value = Math.max(t, 200);
|
|
1110
1128
|
});
|
|
1111
|
-
}, 100),
|
|
1112
|
-
|
|
1113
|
-
},
|
|
1129
|
+
}, 100), ee = () => {
|
|
1130
|
+
L();
|
|
1131
|
+
}, R = () => {
|
|
1114
1132
|
if (!o.searchForm.enableCellCopy && !a.enableCellCopy) return !1;
|
|
1115
|
-
let e =
|
|
1133
|
+
let e = w.value;
|
|
1116
1134
|
if (!e || !e.$el) return !1;
|
|
1117
1135
|
let t = e.$el;
|
|
1118
|
-
return t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown",
|
|
1136
|
+
return t.classList.add("cell-copy-enabled"), t.setAttribute("tabindex", "-1"), t.removeEventListener("mousedown", q), t.removeEventListener("mousemove", fe), t.removeEventListener("mouseup", J), t.removeEventListener("keydown", Y), t.addEventListener("mousedown", q), t.addEventListener("mousemove", fe), t.addEventListener("mouseup", J), t.addEventListener("keydown", Y), !0;
|
|
1119
1137
|
};
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1138
|
+
T(() => {
|
|
1139
|
+
L(), window.addEventListener("resize", ee), (o.searchForm.enableCellCopy || a.enableCellCopy) && (document.addEventListener("mouseup", _e), document.addEventListener("mousedown", ve), setTimeout(() => {
|
|
1140
|
+
R();
|
|
1123
1141
|
}, 500));
|
|
1124
|
-
}),
|
|
1142
|
+
}), D(() => {
|
|
1125
1143
|
(o.searchForm.enableCellCopy || a.enableCellCopy) && setTimeout(() => {
|
|
1126
|
-
|
|
1144
|
+
R();
|
|
1127
1145
|
}, 500);
|
|
1128
|
-
}),
|
|
1129
|
-
if (window.removeEventListener("resize",
|
|
1130
|
-
document.removeEventListener("mouseup",
|
|
1131
|
-
let e =
|
|
1146
|
+
}), E(() => {
|
|
1147
|
+
if (window.removeEventListener("resize", ee), o.searchForm.enableCellCopy || a.enableCellCopy) {
|
|
1148
|
+
document.removeEventListener("mouseup", _e), document.removeEventListener("mousedown", ve);
|
|
1149
|
+
let e = w.value;
|
|
1132
1150
|
if (e && e.$el) {
|
|
1133
1151
|
let t = e.$el;
|
|
1134
|
-
t.removeEventListener("mousedown",
|
|
1152
|
+
t.removeEventListener("mousedown", q), t.removeEventListener("mousemove", fe), t.removeEventListener("mouseup", J), t.removeEventListener("keydown", Y);
|
|
1135
1153
|
}
|
|
1136
1154
|
}
|
|
1137
1155
|
});
|
|
1138
|
-
let
|
|
1139
|
-
async function
|
|
1156
|
+
let te = l(() => G.value.height || P.value), ne;
|
|
1157
|
+
async function B(e) {
|
|
1140
1158
|
let { dataFormat: t } = o.tableConfig;
|
|
1141
|
-
e[v] != 1 && (e.nextSearchAfter =
|
|
1159
|
+
e[v] != 1 && (e.nextSearchAfter = ne), s.value = !0;
|
|
1142
1160
|
let { code: n, data: r = {} } = await o.api(e).finally(() => {
|
|
1143
1161
|
s.value = !1, o.searchForm.selections = [];
|
|
1144
1162
|
});
|
|
@@ -1153,54 +1171,54 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1153
1171
|
n = r[e];
|
|
1154
1172
|
break;
|
|
1155
1173
|
}
|
|
1156
|
-
|
|
1174
|
+
c.value = t ? t(e) : e, b.total = n, ne = r.nextSearchAfter, (o.searchForm.enableCellCopy || a.enableCellCopy) && S(() => {
|
|
1157
1175
|
setTimeout(() => {
|
|
1158
|
-
|
|
1176
|
+
R();
|
|
1159
1177
|
}, 100);
|
|
1160
1178
|
});
|
|
1161
1179
|
}
|
|
1162
1180
|
}
|
|
1163
|
-
function
|
|
1181
|
+
function V(e = {}) {
|
|
1164
1182
|
let { searchData: t = () => ({}) } = o.tableConfig, n = t();
|
|
1165
|
-
|
|
1166
|
-
...
|
|
1167
|
-
...
|
|
1183
|
+
B({
|
|
1184
|
+
...b,
|
|
1185
|
+
...ft(o.searchForm.items),
|
|
1168
1186
|
...e,
|
|
1169
1187
|
...n
|
|
1170
1188
|
});
|
|
1171
1189
|
}
|
|
1172
|
-
function
|
|
1190
|
+
function H() {
|
|
1173
1191
|
let { reset: e } = o.tableConfig;
|
|
1174
1192
|
e && e(), o.searchForm.items.forEach((e) => {
|
|
1175
|
-
let t = _.find((t) =>
|
|
1193
|
+
let t = _.find((t) => se(e.key) && se(t.key) ? e.key.join(",") == t.key.join(",") : t.key == e.key);
|
|
1176
1194
|
t && (e.value = t.value);
|
|
1177
|
-
}),
|
|
1195
|
+
}), V();
|
|
1178
1196
|
}
|
|
1179
|
-
o.api && o.immediate &&
|
|
1180
|
-
function
|
|
1197
|
+
o.api && o.immediate && V();
|
|
1198
|
+
function ie() {
|
|
1181
1199
|
return {
|
|
1182
|
-
...
|
|
1183
|
-
...
|
|
1200
|
+
...b,
|
|
1201
|
+
...ft(o.searchForm.items)
|
|
1184
1202
|
};
|
|
1185
1203
|
}
|
|
1186
|
-
let
|
|
1187
|
-
let e =
|
|
1204
|
+
let le = () => {
|
|
1205
|
+
let e = w.value;
|
|
1188
1206
|
e && e.clearSort();
|
|
1189
|
-
},
|
|
1207
|
+
}, W = k({ storage: !0 }), ue = k({
|
|
1190
1208
|
drag: !0,
|
|
1191
1209
|
resizable: !0,
|
|
1192
1210
|
maxFixedSize: 0
|
|
1193
|
-
}),
|
|
1211
|
+
}), G = l(() => {
|
|
1194
1212
|
let { customConfig: e, columnConfig: t, ...n } = o.tableConfig;
|
|
1195
1213
|
return {
|
|
1196
1214
|
headerAlign: "left",
|
|
1197
1215
|
align: "center",
|
|
1198
1216
|
customConfig: {
|
|
1199
|
-
...
|
|
1217
|
+
...W,
|
|
1200
1218
|
...e
|
|
1201
1219
|
},
|
|
1202
1220
|
columnConfig: {
|
|
1203
|
-
...
|
|
1221
|
+
...ue,
|
|
1204
1222
|
...t
|
|
1205
1223
|
},
|
|
1206
1224
|
"virtual-x-config": {
|
|
@@ -1213,17 +1231,17 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1213
1231
|
},
|
|
1214
1232
|
...n
|
|
1215
1233
|
};
|
|
1216
|
-
}), K =
|
|
1234
|
+
}), K = k({
|
|
1217
1235
|
isSelecting: !1,
|
|
1218
1236
|
startCell: null,
|
|
1219
1237
|
endCell: null,
|
|
1220
1238
|
selectedCells: []
|
|
1221
|
-
}),
|
|
1239
|
+
}), de = (e) => {
|
|
1222
1240
|
let t = e.closest(".vxe-body--column");
|
|
1223
1241
|
if (!t || t.classList.contains("col--checkbox") || t.classList.contains("col--seq")) return null;
|
|
1224
1242
|
let n = t.closest(".vxe-body--row");
|
|
1225
1243
|
if (!n) return null;
|
|
1226
|
-
let r =
|
|
1244
|
+
let r = w.value;
|
|
1227
1245
|
if (!r) return null;
|
|
1228
1246
|
let i = -1, a = n.getAttribute("data-rowid");
|
|
1229
1247
|
if (a != null) i = parseInt(a, 10);
|
|
@@ -1251,32 +1269,32 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1251
1269
|
colIndex: s,
|
|
1252
1270
|
cell: t
|
|
1253
1271
|
};
|
|
1254
|
-
},
|
|
1255
|
-
let t =
|
|
1272
|
+
}, q = (e) => {
|
|
1273
|
+
let t = de(e.target);
|
|
1256
1274
|
if (!t) {
|
|
1257
|
-
|
|
1275
|
+
pe();
|
|
1258
1276
|
return;
|
|
1259
1277
|
}
|
|
1260
1278
|
K.isSelecting = !0, K.startCell = {
|
|
1261
1279
|
rowIndex: t.rowIndex,
|
|
1262
1280
|
colIndex: t.colIndex
|
|
1263
|
-
}, K.endCell = { ...K.startCell },
|
|
1264
|
-
},
|
|
1281
|
+
}, K.endCell = { ...K.startCell }, me(), he();
|
|
1282
|
+
}, fe = (e) => {
|
|
1265
1283
|
if (!K.isSelecting) return;
|
|
1266
|
-
let t =
|
|
1284
|
+
let t = de(e.target);
|
|
1267
1285
|
t && (K.endCell = {
|
|
1268
1286
|
rowIndex: t.rowIndex,
|
|
1269
1287
|
colIndex: t.colIndex
|
|
1270
|
-
},
|
|
1271
|
-
},
|
|
1288
|
+
}, me(), he());
|
|
1289
|
+
}, J = () => {
|
|
1272
1290
|
K.isSelecting = !1;
|
|
1273
|
-
},
|
|
1291
|
+
}, pe = () => {
|
|
1274
1292
|
K.selectedCells = [], K.startCell = null, K.endCell = null;
|
|
1275
|
-
let e =
|
|
1293
|
+
let e = w.value;
|
|
1276
1294
|
e && e.$el.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
1277
1295
|
e.classList.remove("cell-selected", "cell-border-top", "cell-border-right", "cell-border-bottom", "cell-border-left");
|
|
1278
1296
|
});
|
|
1279
|
-
},
|
|
1297
|
+
}, me = () => {
|
|
1280
1298
|
if (!K.startCell || !K.endCell) {
|
|
1281
1299
|
K.selectedCells = [];
|
|
1282
1300
|
return;
|
|
@@ -1287,9 +1305,9 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1287
1305
|
rowIndex: e,
|
|
1288
1306
|
colIndex: t
|
|
1289
1307
|
});
|
|
1290
|
-
},
|
|
1291
|
-
|
|
1292
|
-
let e =
|
|
1308
|
+
}, he = () => {
|
|
1309
|
+
S(() => {
|
|
1310
|
+
let e = w.value;
|
|
1293
1311
|
if (!e) return;
|
|
1294
1312
|
let t = e.$el;
|
|
1295
1313
|
if (t.querySelectorAll(".cell-selected, .cell-border-top, .cell-border-right, .cell-border-bottom, .cell-border-left").forEach((e) => {
|
|
@@ -1321,9 +1339,9 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1321
1339
|
}
|
|
1322
1340
|
});
|
|
1323
1341
|
});
|
|
1324
|
-
},
|
|
1342
|
+
}, ge = async () => {
|
|
1325
1343
|
if (K.selectedCells.length === 0) return;
|
|
1326
|
-
let e =
|
|
1344
|
+
let e = w.value;
|
|
1327
1345
|
if (!e) return;
|
|
1328
1346
|
let t = e.$el, n = e.getColumns(), r = [...new Set(K.selectedCells.map((e) => e.rowIndex))].sort((e, t) => e - t), i = [...new Set(K.selectedCells.map((e) => e.colIndex))].sort((e, t) => e - t), a = [
|
|
1329
1347
|
t.querySelector(".vxe-table--body-wrapper tbody"),
|
|
@@ -1363,105 +1381,105 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1363
1381
|
} catch (e) {
|
|
1364
1382
|
console.error("复制失败:", e);
|
|
1365
1383
|
}
|
|
1366
|
-
},
|
|
1367
|
-
!o.searchForm.enableCellCopy && !a.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? K.selectedCells.length > 0 && (e.preventDefault(), e.stopPropagation(),
|
|
1368
|
-
},
|
|
1384
|
+
}, Y = (e) => {
|
|
1385
|
+
!o.searchForm.enableCellCopy && !a.enableCellCopy || ((e.ctrlKey || e.metaKey) && e.key === "c" ? K.selectedCells.length > 0 && (e.preventDefault(), e.stopPropagation(), ge()) : e.key === "Escape" && pe());
|
|
1386
|
+
}, _e = () => {
|
|
1369
1387
|
K.isSelecting = !1;
|
|
1370
|
-
}, _e = (e) => {
|
|
1371
|
-
let t = A.value;
|
|
1372
|
-
!t || !t.$el || t.$el.contains(e.target) || de();
|
|
1373
1388
|
}, ve = (e) => {
|
|
1374
|
-
|
|
1389
|
+
let t = w.value;
|
|
1390
|
+
!t || !t.$el || t.$el.contains(e.target) || pe();
|
|
1375
1391
|
}, ye = (e) => {
|
|
1376
|
-
|
|
1392
|
+
b[v] = e, V();
|
|
1393
|
+
}, be = (e) => {
|
|
1394
|
+
b[y] = e, b[v] = 1, V();
|
|
1377
1395
|
};
|
|
1378
|
-
function
|
|
1379
|
-
let e =
|
|
1396
|
+
function xe() {
|
|
1397
|
+
let e = w.value.getCheckboxRecords();
|
|
1380
1398
|
o.searchForm.selections = e;
|
|
1381
1399
|
}
|
|
1382
|
-
let
|
|
1383
|
-
let t =
|
|
1400
|
+
let Se = (e) => {
|
|
1401
|
+
let t = w.value;
|
|
1384
1402
|
if (t) {
|
|
1385
1403
|
t.toggleCheckboxRow(e);
|
|
1386
|
-
let n =
|
|
1404
|
+
let n = w.value.getCheckboxRecords();
|
|
1387
1405
|
o.searchForm.selections = n;
|
|
1388
1406
|
}
|
|
1389
1407
|
};
|
|
1390
1408
|
return t({
|
|
1391
|
-
tableRef:
|
|
1392
|
-
getList:
|
|
1393
|
-
getPrm:
|
|
1394
|
-
clearSort:
|
|
1395
|
-
calculateTableHeight:
|
|
1409
|
+
tableRef: w,
|
|
1410
|
+
getList: V,
|
|
1411
|
+
getPrm: ie,
|
|
1412
|
+
clearSort: le,
|
|
1413
|
+
calculateTableHeight: L
|
|
1396
1414
|
}), (t, n) => {
|
|
1397
|
-
let i =
|
|
1398
|
-
return
|
|
1399
|
-
e.searchForm.showSearch ? (
|
|
1415
|
+
let i = N("el-button"), o = N("el-checkbox"), l = N("el-text"), _ = N("vxe-column"), S = N("VxeTable"), T = N("el-pagination");
|
|
1416
|
+
return O(), f("div", { class: C({ box: e.searchForm.showShadow }) }, [
|
|
1417
|
+
e.searchForm.showSearch ? (O(), u(_t, {
|
|
1400
1418
|
key: 0,
|
|
1401
1419
|
form: e.searchForm,
|
|
1402
|
-
onReset:
|
|
1403
|
-
onConfirm: n[1] ||= (e) =>
|
|
1404
|
-
onVisibleChange:
|
|
1420
|
+
onReset: H,
|
|
1421
|
+
onConfirm: n[1] ||= (e) => V(),
|
|
1422
|
+
onVisibleChange: I(L)
|
|
1405
1423
|
}, {
|
|
1406
|
-
btn:
|
|
1407
|
-
n[3] ||=
|
|
1408
|
-
|
|
1409
|
-
|
|
1424
|
+
btn: z(() => [
|
|
1425
|
+
n[3] ||= p("span", { class: "mgr10" }, null, -1),
|
|
1426
|
+
M(t.$slots, "search-bar-btn", {}, void 0, !0),
|
|
1427
|
+
g(i, {
|
|
1410
1428
|
class: "mgl10",
|
|
1411
1429
|
round: "",
|
|
1412
|
-
onClick: n[0] ||= (e) =>
|
|
1430
|
+
onClick: n[0] ||= (e) => w.value.openCustom()
|
|
1413
1431
|
}, {
|
|
1414
|
-
default:
|
|
1432
|
+
default: z(() => [g(ot, { name: "Tools" })]),
|
|
1415
1433
|
_: 1
|
|
1416
1434
|
})
|
|
1417
1435
|
]),
|
|
1418
1436
|
_: 3
|
|
1419
|
-
}, 8, ["form", "onVisibleChange"])) :
|
|
1420
|
-
|
|
1421
|
-
|
|
1437
|
+
}, 8, ["form", "onVisibleChange"])) : d("", !0),
|
|
1438
|
+
M(t.$slots, "table-header-left", {}, void 0, !0),
|
|
1439
|
+
p("div", {
|
|
1422
1440
|
ref_key: "tableContentRef",
|
|
1423
|
-
ref:
|
|
1424
|
-
}, [
|
|
1425
|
-
id:
|
|
1441
|
+
ref: j
|
|
1442
|
+
}, [g(S, x({
|
|
1443
|
+
id: m.value,
|
|
1426
1444
|
ref_key: "tableRef",
|
|
1427
|
-
ref:
|
|
1445
|
+
ref: w,
|
|
1428
1446
|
loading: e.loading || s.value,
|
|
1429
|
-
data: e.api ?
|
|
1447
|
+
data: e.api ? c.value : e.data,
|
|
1430
1448
|
border: ""
|
|
1431
|
-
},
|
|
1432
|
-
height:
|
|
1433
|
-
onCheckboxChange:
|
|
1434
|
-
onCheckboxAll:
|
|
1435
|
-
onSortChange:
|
|
1449
|
+
}, G.value, {
|
|
1450
|
+
height: te.value,
|
|
1451
|
+
onCheckboxChange: xe,
|
|
1452
|
+
onCheckboxAll: xe,
|
|
1453
|
+
onSortChange: G.value["sort-config"]?.sortChange
|
|
1436
1454
|
}), {
|
|
1437
|
-
default:
|
|
1455
|
+
default: z(() => [e.searchForm.showCheckBox == null || e.searchForm.showCheckBox ? (O(), u(_, {
|
|
1438
1456
|
key: 0,
|
|
1439
1457
|
type: "checkbox",
|
|
1440
|
-
width:
|
|
1458
|
+
width: I(r) == "zh_cn" ? 80 : 150,
|
|
1441
1459
|
title: t.$t("xu-hao"),
|
|
1442
1460
|
fixed: "left"
|
|
1443
1461
|
}, {
|
|
1444
|
-
checkbox:
|
|
1462
|
+
checkbox: z(({ rowIndex: e, row: t, checked: n, disabled: r, indeterminate: i }) => [p("div", St, [n ? (O(), u(o, {
|
|
1445
1463
|
key: 0,
|
|
1446
1464
|
checked: !0,
|
|
1447
1465
|
disabled: r,
|
|
1448
1466
|
size: "default",
|
|
1449
|
-
onClick:
|
|
1450
|
-
}, null, 8, ["disabled", "onClick"])) : (
|
|
1467
|
+
onClick: re((e) => !r && Se(t), ["stop"])
|
|
1468
|
+
}, null, 8, ["disabled", "onClick"])) : (O(), u(o, {
|
|
1451
1469
|
key: 1,
|
|
1452
1470
|
disabled: r,
|
|
1453
1471
|
checked: !1,
|
|
1454
1472
|
size: "default",
|
|
1455
|
-
onClick:
|
|
1456
|
-
}, null, 8, ["disabled", "onClick"])),
|
|
1473
|
+
onClick: re((e) => !r && Se(t), ["stop"])
|
|
1474
|
+
}, null, 8, ["disabled", "onClick"])), g(l, {
|
|
1457
1475
|
type: "info",
|
|
1458
1476
|
class: "mgl5"
|
|
1459
1477
|
}, {
|
|
1460
|
-
default:
|
|
1478
|
+
default: z(() => [h(F(e + 1), 1)]),
|
|
1461
1479
|
_: 2
|
|
1462
1480
|
}, 1024)])]),
|
|
1463
1481
|
_: 1
|
|
1464
|
-
}, 8, ["width", "title"])) :
|
|
1482
|
+
}, 8, ["width", "title"])) : d("", !0), M(t.$slots, "default", {}, void 0, !0)]),
|
|
1465
1483
|
_: 3
|
|
1466
1484
|
}, 16, [
|
|
1467
1485
|
"id",
|
|
@@ -1470,28 +1488,28 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1470
1488
|
"height",
|
|
1471
1489
|
"onSortChange"
|
|
1472
1490
|
])], 512),
|
|
1473
|
-
e.searchForm.showPage ? (
|
|
1491
|
+
e.searchForm.showPage ? (O(), u(T, {
|
|
1474
1492
|
key: 1,
|
|
1475
|
-
"current-page":
|
|
1476
|
-
"onUpdate:currentPage": n[2] ||= (e) =>
|
|
1493
|
+
"current-page": b[I(v)],
|
|
1494
|
+
"onUpdate:currentPage": n[2] ||= (e) => b[I(v)] = e,
|
|
1477
1495
|
class: "myPagination mgt10",
|
|
1478
1496
|
background: "",
|
|
1479
1497
|
layout: "total, sizes, prev, pager, next",
|
|
1480
|
-
total:
|
|
1481
|
-
"page-size":
|
|
1482
|
-
"page-sizes": e.searchForm.pageSizes ||
|
|
1483
|
-
onCurrentChange:
|
|
1484
|
-
onSizeChange:
|
|
1498
|
+
total: b.total,
|
|
1499
|
+
"page-size": b[I(y)],
|
|
1500
|
+
"page-sizes": e.searchForm.pageSizes || I(a).pageSizes,
|
|
1501
|
+
onCurrentChange: ye,
|
|
1502
|
+
onSizeChange: be
|
|
1485
1503
|
}, null, 8, [
|
|
1486
1504
|
"current-page",
|
|
1487
1505
|
"total",
|
|
1488
1506
|
"page-size",
|
|
1489
1507
|
"page-sizes"
|
|
1490
|
-
])) :
|
|
1508
|
+
])) : d("", !0)
|
|
1491
1509
|
], 2);
|
|
1492
1510
|
};
|
|
1493
1511
|
}
|
|
1494
|
-
}, [["__scopeId", "data-v-c022c16d"]]),
|
|
1512
|
+
}, [["__scopeId", "data-v-c022c16d"]]), wt = {
|
|
1495
1513
|
__name: "index",
|
|
1496
1514
|
props: {
|
|
1497
1515
|
sheetsConfig: {
|
|
@@ -1501,36 +1519,40 @@ var bt = { class: "center" }, xt = /* @__PURE__ */ Q({
|
|
|
1501
1519
|
fileName: {
|
|
1502
1520
|
type: String,
|
|
1503
1521
|
required: !0
|
|
1522
|
+
},
|
|
1523
|
+
version: {
|
|
1524
|
+
type: Number,
|
|
1525
|
+
required: !1
|
|
1504
1526
|
}
|
|
1505
1527
|
},
|
|
1506
1528
|
setup(e) {
|
|
1507
1529
|
let t = e;
|
|
1508
1530
|
function n() {
|
|
1509
|
-
|
|
1531
|
+
Ve(t.fileName + t.version ? `__${version}` : "", t.sheetsConfig);
|
|
1510
1532
|
}
|
|
1511
1533
|
return (e, t) => {
|
|
1512
|
-
let r =
|
|
1513
|
-
return
|
|
1534
|
+
let r = N("el-link");
|
|
1535
|
+
return O(), u(r, x({
|
|
1514
1536
|
type: "primary",
|
|
1515
1537
|
underline: "never"
|
|
1516
1538
|
}, e.$attrs, { onClick: n }), {
|
|
1517
|
-
default:
|
|
1539
|
+
default: z(() => [M(e.$slots, "default", {}, () => [h(F(e.$t("xia-zai-dao-ru-mo-ban")), 1)])]),
|
|
1518
1540
|
_: 3
|
|
1519
1541
|
}, 16);
|
|
1520
1542
|
};
|
|
1521
1543
|
}
|
|
1522
|
-
},
|
|
1544
|
+
}, Tt = {
|
|
1523
1545
|
mounted(e, t) {
|
|
1524
|
-
t.value &&
|
|
1546
|
+
t.value && Et(e);
|
|
1525
1547
|
},
|
|
1526
1548
|
updated(e, t) {
|
|
1527
|
-
t.value ?
|
|
1549
|
+
t.value ? Et(e) : Dt(e);
|
|
1528
1550
|
},
|
|
1529
1551
|
beforeUnmount(e) {
|
|
1530
|
-
|
|
1552
|
+
Dt(e);
|
|
1531
1553
|
}
|
|
1532
1554
|
};
|
|
1533
|
-
async function
|
|
1555
|
+
async function Et(e) {
|
|
1534
1556
|
await f();
|
|
1535
1557
|
let t = e.querySelector(".el-dialog");
|
|
1536
1558
|
if (!t) return;
|
|
@@ -1593,15 +1615,15 @@ async function wt(e) {
|
|
|
1593
1615
|
}
|
|
1594
1616
|
e.__mouseDown__ = c, e.__mouseUp__ = u, e.__mouseMove__ = l, e.__sizeChange__ = d;
|
|
1595
1617
|
}
|
|
1596
|
-
function
|
|
1618
|
+
function Dt(e) {
|
|
1597
1619
|
document.removeEventListener("mousedown", e.__mouseDown__), document.removeEventListener("mousemove", e.__mouseMove__), document.removeEventListener("mouseup", e.__mouseUp__), window.removeEventListener("resize", e.__sizeChange__);
|
|
1598
1620
|
}
|
|
1599
1621
|
//#endregion
|
|
1600
1622
|
//#region src/components/Layer/index.vue
|
|
1601
|
-
var
|
|
1623
|
+
var Ot = {
|
|
1602
1624
|
key: 0,
|
|
1603
1625
|
class: "drawer-btn"
|
|
1604
|
-
},
|
|
1626
|
+
}, kt = { key: 1 }, At = {
|
|
1605
1627
|
__name: "index",
|
|
1606
1628
|
props: {
|
|
1607
1629
|
layer: {
|
|
@@ -1621,19 +1643,19 @@ var Et = {
|
|
|
1621
1643
|
},
|
|
1622
1644
|
emits: ["confirm"],
|
|
1623
1645
|
setup(e, { emit: t }) {
|
|
1624
|
-
let n = e, r = t, { t:
|
|
1646
|
+
let n = e, r = t, { t: i } = U(), o = oe(() => {
|
|
1625
1647
|
r("confirm");
|
|
1626
1648
|
}, 300);
|
|
1627
1649
|
async function s() {
|
|
1628
|
-
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : n.layer.closeConfirm ? await
|
|
1629
|
-
confirmButtonText:
|
|
1630
|
-
cancelButtonText:
|
|
1650
|
+
n.layer.type == "drawer" ? n.layer.onClose ? n.layer.onClose() : n.layer.closeConfirm ? await a.confirm(i("que-ding-guan-bi-ma"), {
|
|
1651
|
+
confirmButtonText: i("que-ding"),
|
|
1652
|
+
cancelButtonText: i("qu-xiao"),
|
|
1631
1653
|
type: "warning"
|
|
1632
1654
|
}).catch(() => {}) == "confirm" && (n.layer.show = !1) : n.layer.show = !1 : n.layer.show = !1;
|
|
1633
1655
|
}
|
|
1634
1656
|
return (t, n) => {
|
|
1635
|
-
let r =
|
|
1636
|
-
return e.layer.type ? (
|
|
1657
|
+
let r = N("el-button"), i = N("el-drawer"), a = N("el-dialog");
|
|
1658
|
+
return e.layer.type ? (O(), u(i, {
|
|
1637
1659
|
key: 0,
|
|
1638
1660
|
modelValue: e.layer.show,
|
|
1639
1661
|
"onUpdate:modelValue": n[0] ||= (t) => e.layer.show = t,
|
|
@@ -1644,46 +1666,46 @@ var Et = {
|
|
|
1644
1666
|
"before-close": s,
|
|
1645
1667
|
class: "drawer-content"
|
|
1646
1668
|
}, {
|
|
1647
|
-
default:
|
|
1648
|
-
|
|
1649
|
-
n[2] ||=
|
|
1650
|
-
e.layer.showButton ? (
|
|
1651
|
-
default:
|
|
1669
|
+
default: z(() => [
|
|
1670
|
+
M(t.$slots, "default"),
|
|
1671
|
+
n[2] ||= p("p", { class: "mgt50" }, null, -1),
|
|
1672
|
+
e.layer.showButton ? (O(), f("div", Ot, [M(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1673
|
+
default: z(() => [h(F(t.$t("qu-xiao")), 1)]),
|
|
1652
1674
|
_: 1
|
|
1653
|
-
}),
|
|
1675
|
+
}), g(r, {
|
|
1654
1676
|
type: "primary",
|
|
1655
1677
|
loading: e.loading,
|
|
1656
|
-
onClick:
|
|
1678
|
+
onClick: I(o)
|
|
1657
1679
|
}, {
|
|
1658
|
-
default:
|
|
1680
|
+
default: z(() => [h(F(t.$t("ti-jiao")), 1)]),
|
|
1659
1681
|
_: 1
|
|
1660
|
-
}, 8, ["loading", "onClick"])])])) :
|
|
1682
|
+
}, 8, ["loading", "onClick"])])])) : d("", !0)
|
|
1661
1683
|
]),
|
|
1662
1684
|
_: 3
|
|
1663
1685
|
}, 8, [
|
|
1664
1686
|
"modelValue",
|
|
1665
1687
|
"size",
|
|
1666
1688
|
"title"
|
|
1667
|
-
])) :
|
|
1689
|
+
])) : te((O(), f("div", kt, [g(a, {
|
|
1668
1690
|
"close-on-click-modal": !1,
|
|
1669
1691
|
modelValue: e.layer.show,
|
|
1670
1692
|
"onUpdate:modelValue": n[1] ||= (t) => e.layer.show = t,
|
|
1671
1693
|
title: e.layer.title,
|
|
1672
1694
|
width: e.layer.width || 500,
|
|
1673
1695
|
center: ""
|
|
1674
|
-
},
|
|
1675
|
-
default:
|
|
1696
|
+
}, m({
|
|
1697
|
+
default: z(() => [M(t.$slots, "default")]),
|
|
1676
1698
|
_: 2
|
|
1677
1699
|
}, [e.layer.showButton ? {
|
|
1678
1700
|
name: "footer",
|
|
1679
|
-
fn:
|
|
1680
|
-
default:
|
|
1701
|
+
fn: z(() => [M(t.$slots, "btn", {}, () => [g(r, { onClick: s }, {
|
|
1702
|
+
default: z(() => [h(F(t.$t("qu-xiao")), 1)]),
|
|
1681
1703
|
_: 1
|
|
1682
|
-
}),
|
|
1704
|
+
}), g(r, {
|
|
1683
1705
|
type: "primary",
|
|
1684
|
-
onClick:
|
|
1706
|
+
onClick: I(o)
|
|
1685
1707
|
}, {
|
|
1686
|
-
default:
|
|
1708
|
+
default: z(() => [h(F(t.$t("ti-jiao")), 1)]),
|
|
1687
1709
|
_: 1
|
|
1688
1710
|
}, 8, ["onClick"])])]),
|
|
1689
1711
|
key: "0"
|
|
@@ -1691,14 +1713,14 @@ var Et = {
|
|
|
1691
1713
|
"modelValue",
|
|
1692
1714
|
"title",
|
|
1693
1715
|
"width"
|
|
1694
|
-
])])), [[
|
|
1716
|
+
])])), [[I(Tt), e.layer.show]]);
|
|
1695
1717
|
};
|
|
1696
1718
|
}
|
|
1697
1719
|
};
|
|
1698
1720
|
//#endregion
|
|
1699
1721
|
//#region src/utils/tools/validate.js
|
|
1700
|
-
function
|
|
1701
|
-
let n =
|
|
1722
|
+
function jt(e, t = {}) {
|
|
1723
|
+
let n = X(), r = {
|
|
1702
1724
|
inForm: !0,
|
|
1703
1725
|
required: !0,
|
|
1704
1726
|
...t
|
|
@@ -1717,7 +1739,7 @@ function kt(e, t = {}) {
|
|
|
1717
1739
|
}
|
|
1718
1740
|
//#endregion
|
|
1719
1741
|
//#region src/utils/tools/one-portal-cas-sdk.js
|
|
1720
|
-
var
|
|
1742
|
+
var Mt = class {
|
|
1721
1743
|
constructor(e = {}) {
|
|
1722
1744
|
this.config = {
|
|
1723
1745
|
clientCode: e.clientCode || "one-portal",
|
|
@@ -1864,42 +1886,42 @@ var At = class {
|
|
|
1864
1886
|
};
|
|
1865
1887
|
//#endregion
|
|
1866
1888
|
//#region src/utils/tools/format.js
|
|
1867
|
-
function
|
|
1889
|
+
function $(e, t = 2, n = ".", r = ",") {
|
|
1868
1890
|
(e == null || e === "") && (e = 0);
|
|
1869
1891
|
let i = Number(e);
|
|
1870
1892
|
e = isNaN(i) ? 0 : i, t = Math.max(0, Math.floor(t));
|
|
1871
1893
|
let a = e.toFixed(t).split("."), o = a[0], s = a[1], c = o.startsWith("-");
|
|
1872
1894
|
return c && (o = o.slice(1)), o = o.replace(/\B(?=(\d{3})+(?!\d))/g, r), c && (o = "-" + o), t > 0 ? o + n + s : o;
|
|
1873
1895
|
}
|
|
1874
|
-
function Mt(e, t = 2) {
|
|
1875
|
-
return jt(e, t);
|
|
1876
|
-
}
|
|
1877
1896
|
function Nt(e, t = 2) {
|
|
1897
|
+
return $(e, t);
|
|
1898
|
+
}
|
|
1899
|
+
function Pt(e, t = 2) {
|
|
1878
1900
|
(e == null || e === "") && (e = 0);
|
|
1879
1901
|
let n = Number(e);
|
|
1880
|
-
return e = isNaN(n) ? 0 : n,
|
|
1902
|
+
return e = isNaN(n) ? 0 : n, $(e * 100, t) + "%";
|
|
1881
1903
|
}
|
|
1882
1904
|
//#endregion
|
|
1883
1905
|
//#region src/utils/hook/common.js
|
|
1884
|
-
function
|
|
1906
|
+
function Ft(e, t = {}) {
|
|
1885
1907
|
let { manual: n, log: r, params: i = {}, cb: a, format: o } = Object.assign({
|
|
1886
1908
|
manual: !1,
|
|
1887
1909
|
log: !1,
|
|
1888
1910
|
params: null,
|
|
1889
1911
|
format: null
|
|
1890
|
-
}, t), s =
|
|
1912
|
+
}, t), s = A([]), c = A(!1), l = (t) => {
|
|
1891
1913
|
let n = t || i;
|
|
1892
1914
|
c.value = !0, e(n).then((e) => {
|
|
1893
1915
|
let { code: t, data: c, msg: l } = e;
|
|
1894
1916
|
if (a) {
|
|
1895
1917
|
let { records: t, rows: n } = c || {};
|
|
1896
|
-
s.value =
|
|
1918
|
+
s.value = Rt(t || n ? t || n : c, o), a(e);
|
|
1897
1919
|
}
|
|
1898
1920
|
if (c) {
|
|
1899
1921
|
if (c.records != null || c.rows != null) {
|
|
1900
1922
|
let { records: e, rows: t, total: r = 0 } = c || {};
|
|
1901
|
-
n && n.total != null && (i.total = parseInt(r)), s.value =
|
|
1902
|
-
} else s.value =
|
|
1923
|
+
n && n.total != null && (i.total = parseInt(r)), s.value = Rt(e || t || [], o);
|
|
1924
|
+
} else s.value = Rt(c, o);
|
|
1903
1925
|
r && console.log("useRequest-res", s.value);
|
|
1904
1926
|
}
|
|
1905
1927
|
}).catch((e) => {
|
|
@@ -1914,9 +1936,9 @@ function Pt(e, t = {}) {
|
|
|
1914
1936
|
l
|
|
1915
1937
|
];
|
|
1916
1938
|
}
|
|
1917
|
-
function
|
|
1918
|
-
let t =
|
|
1919
|
-
return
|
|
1939
|
+
function It(e) {
|
|
1940
|
+
let t = A(e), n = A(""), r = A("");
|
|
1941
|
+
return R(t, (e) => {
|
|
1920
1942
|
let t = e || ["", ""];
|
|
1921
1943
|
n.value = t[0], r.value = t[1];
|
|
1922
1944
|
}), [
|
|
@@ -1925,10 +1947,10 @@ function Ft(e) {
|
|
|
1925
1947
|
r
|
|
1926
1948
|
];
|
|
1927
1949
|
}
|
|
1928
|
-
function
|
|
1950
|
+
function Lt(e) {
|
|
1929
1951
|
return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
|
|
1930
1952
|
}
|
|
1931
|
-
function
|
|
1953
|
+
function Rt(e, t) {
|
|
1932
1954
|
if (!t) return e;
|
|
1933
1955
|
if (e instanceof Array) return e.map((e) => {
|
|
1934
1956
|
let n = {};
|
|
@@ -1939,70 +1961,81 @@ function Lt(e, t) {
|
|
|
1939
1961
|
}
|
|
1940
1962
|
//#endregion
|
|
1941
1963
|
//#region src/utils/hook/i18n.js
|
|
1942
|
-
function
|
|
1943
|
-
let { locale: n } =
|
|
1944
|
-
return
|
|
1964
|
+
function zt(e, t = []) {
|
|
1965
|
+
let { locale: n } = U(), r = A(e());
|
|
1966
|
+
return R([n, ...t], () => {
|
|
1945
1967
|
r.value = e();
|
|
1946
1968
|
}, { immediate: !0 }), r;
|
|
1947
1969
|
}
|
|
1948
|
-
function
|
|
1970
|
+
function Bt(e, t = "zh_cn", n = "en_us") {
|
|
1949
1971
|
return e && (e[{
|
|
1950
1972
|
en_us: n,
|
|
1951
1973
|
zh_cn: t
|
|
1952
|
-
}[
|
|
1974
|
+
}[ke().global.locale.value]] || e[t]) || "-";
|
|
1953
1975
|
}
|
|
1954
1976
|
//#endregion
|
|
1955
1977
|
//#region src/utils/hook/storeHook.js
|
|
1956
|
-
function Bt(e, t) {
|
|
1957
|
-
let n = ue;
|
|
1958
|
-
return typeof e == "string" && e.length > 0 && (n = se(e).mapState), Ut(t, n);
|
|
1959
|
-
}
|
|
1960
1978
|
function Vt(e, t) {
|
|
1961
|
-
let n =
|
|
1962
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
1979
|
+
let n = K;
|
|
1980
|
+
return typeof e == "string" && e.length > 0 && (n = W(e).mapState), Wt(t, n);
|
|
1963
1981
|
}
|
|
1964
1982
|
function Ht(e, t) {
|
|
1965
|
-
let n =
|
|
1966
|
-
return typeof e == "string" && e.length > 0 && (n =
|
|
1983
|
+
let n = G;
|
|
1984
|
+
return typeof e == "string" && e.length > 0 && (n = W(e).mapGetters), Wt(t, n);
|
|
1967
1985
|
}
|
|
1968
1986
|
function Ut(e, t) {
|
|
1969
|
-
let n =
|
|
1987
|
+
let n = ue;
|
|
1988
|
+
return typeof e == "string" && e.length > 0 && (n = W(e).mapActions), Gt(t, n);
|
|
1989
|
+
}
|
|
1990
|
+
function Wt(e, t) {
|
|
1991
|
+
let n = de(), r = t(e), i = {};
|
|
1970
1992
|
return Object.keys(r).forEach((e) => {
|
|
1971
|
-
i[e] =
|
|
1993
|
+
i[e] = l(r[e].bind({ $store: n }));
|
|
1972
1994
|
}), i;
|
|
1973
1995
|
}
|
|
1974
|
-
function
|
|
1975
|
-
let n =
|
|
1996
|
+
function Gt(e, t) {
|
|
1997
|
+
let n = de(), r = t(e), i = {};
|
|
1976
1998
|
return Object.keys(r).forEach((e) => {
|
|
1977
1999
|
i[e] = r[e].bind({ $store: n });
|
|
1978
2000
|
}), i;
|
|
1979
2001
|
}
|
|
1980
2002
|
//#endregion
|
|
1981
2003
|
//#region src/components/VxeTable/index.jsx
|
|
1982
|
-
function
|
|
1983
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
2004
|
+
function Kt(e) {
|
|
2005
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !y(e);
|
|
1984
2006
|
}
|
|
1985
|
-
function
|
|
2007
|
+
function qt() {
|
|
1986
2008
|
q.formats.add("formatNumber", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
1987
|
-
return
|
|
2009
|
+
return $(e, t);
|
|
1988
2010
|
} }), q.formats.add("formatMoney", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
1989
|
-
return Mt(e, t);
|
|
1990
|
-
} }), q.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
1991
2011
|
return Nt(e, t);
|
|
2012
|
+
} }), q.formats.add("formatPercent", { cellFormatMethod({ cellValue: e }, t = 2) {
|
|
2013
|
+
return Pt(e, t);
|
|
1992
2014
|
} });
|
|
1993
2015
|
}
|
|
1994
|
-
function
|
|
2016
|
+
function Jt() {
|
|
1995
2017
|
q.renderer.add("Enum", { renderTableDefault(e, t) {
|
|
1996
|
-
let n;
|
|
1997
2018
|
if ([null, void 0].includes(t.row[t.column.field])) return "-";
|
|
1998
|
-
let
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2019
|
+
let n = t.row[t.column.field], { label: r, labelEn: i, tag: a, color: o } = e.enum.getItem(n), { locale: s } = U(), c = s.value == "zh_cn" ? r : i;
|
|
2020
|
+
return e.type == "tag" ? o ? g(N("CmpTag"), { fontColor: o }, { default: () => [
|
|
2021
|
+
h(" "),
|
|
2022
|
+
c,
|
|
2023
|
+
h(" ")
|
|
2024
|
+
] }) : g(N("CmpTag"), { type: a }, { default: () => [
|
|
2025
|
+
h(" "),
|
|
2026
|
+
c,
|
|
2027
|
+
h(" ")
|
|
2028
|
+
] }) : e.type == "text" ? g(N("el-text"), { type: a }, { default: () => [
|
|
2029
|
+
h(" "),
|
|
2030
|
+
c,
|
|
2031
|
+
h(" ")
|
|
2032
|
+
] }) : g(N("el-text"), null, { default: () => [
|
|
2033
|
+
h(" "),
|
|
2034
|
+
c,
|
|
2035
|
+
h(" ")
|
|
2036
|
+
] });
|
|
2004
2037
|
} }), q.renderer.add("InputNumber", { renderTableDefault(e, t) {
|
|
2005
|
-
return
|
|
2038
|
+
return g(n, x({
|
|
2006
2039
|
modelValue: t.row[t.column.field],
|
|
2007
2040
|
"onUpdate:modelValue": (e) => t.row[t.column.field] = e
|
|
2008
2041
|
}, e.props, {
|
|
@@ -2010,13 +2043,13 @@ function qt() {
|
|
|
2010
2043
|
"value-on-clear": 0
|
|
2011
2044
|
}), null);
|
|
2012
2045
|
} }), q.renderer.add("TrueFalse", { renderTableDefault(e, t) {
|
|
2013
|
-
let { locale: n } =
|
|
2014
|
-
return
|
|
2046
|
+
let { locale: n } = U(), r = n.value == "zh_cn";
|
|
2047
|
+
return g(s, { type: t.row[t.column.field] ? "success" : "danger" }, { default: () => [t.row[t.column.field] ? r ? "是" : "YES" : r ? "否" : "NO"] });
|
|
2015
2048
|
} }), q.renderer.add("I18n", { renderTableDefault(e, t) {
|
|
2016
|
-
let { locale: n } =
|
|
2049
|
+
let { locale: n } = U(), r = n.value == "zh_cn" ? t.column.field : e.fieldEn;
|
|
2017
2050
|
return t.row[r] || t.row[t.column.field];
|
|
2018
2051
|
} }), q.renderer.add("Link", { renderTableDefault(e, t) {
|
|
2019
|
-
let n = t.column.field, i =
|
|
2052
|
+
let n = t.column.field, i = le(), { multiple: a, to: o, openType: s = "system" } = e, c = t.row[n];
|
|
2020
2053
|
function l(e, t) {
|
|
2021
2054
|
s == "blank" ? window.open(e) : i.push({
|
|
2022
2055
|
path: e,
|
|
@@ -2025,21 +2058,21 @@ function qt() {
|
|
|
2025
2058
|
}
|
|
2026
2059
|
if (a) {
|
|
2027
2060
|
let e = c?.split(",") || [];
|
|
2028
|
-
return e.map((t, n) =>
|
|
2061
|
+
return e.map((t, n) => g("span", null, [g(r, {
|
|
2029
2062
|
underline: "never",
|
|
2030
2063
|
type: "primary",
|
|
2031
2064
|
onclick: () => l(s == "stystem" ? o : t, t)
|
|
2032
|
-
},
|
|
2065
|
+
}, Kt(t) ? t : { default: () => [t] }), n < e.length - 1 ? "," : ""]));
|
|
2033
2066
|
}
|
|
2034
|
-
return
|
|
2067
|
+
return g(r, {
|
|
2035
2068
|
underline: "never",
|
|
2036
2069
|
type: "primary",
|
|
2037
2070
|
onclick: () => l(s == "stystem" ? o : c, c)
|
|
2038
|
-
},
|
|
2071
|
+
}, Kt(c) ? c : { default: () => [c] });
|
|
2039
2072
|
} });
|
|
2040
2073
|
}
|
|
2041
|
-
function
|
|
2042
|
-
|
|
2074
|
+
function Yt() {
|
|
2075
|
+
qt(), Jt();
|
|
2043
2076
|
}
|
|
2044
2077
|
//#endregion
|
|
2045
|
-
export {
|
|
2078
|
+
export { rt as CmpDictionary, ot as CmpIcon, ct as ConfrimButton, wt as DownExcelTemp, dt as ImportButton, ye as LayOutForm, At as Layer, Ct as ListPage, Mt as OnePortalCasSDK, _t as SearchBar, Je as StatusMap, Ge as _toRaw, Lt as _typeOf, Ye as arrToStatusMap, Ke as arrayToTree, Qe as checkFileSize, jt as creatValidator, et as createImportFields, $e as createListPageId, Te as en_us, Me as exportExcel, Ve as exportExcelMuilti, Nt as formatMoney, $ as formatNumber, Pt as formatPercent, ke as getI18n, X as getI18nT, bt as getListPageConfig, Bt as getLocaleValue, tt as getValueBykey, Ae as importExcel, ze as importExcelMuilti, Ee as messages, qt as registerVxeFormatters, Yt as registerVxePlugins, Jt as registerVxeRenderers, xt as resetListPageConfig, yt as setListPageConfig, Oe as setupI18n, We as sleep, qe as stringToArray, Xe as stripHtmlTags, Ze as unicode2Str, Ut as useActions, It as useDatePicker, Ht as useGetters, zt as useI18nReState, Ft as useRequest, Vt as useState, we as zh_cn };
|