@gonsin/gview 2.0.0 → 2.0.1
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/{index-19b57506.mjs → index-0837cd29.mjs} +821 -803
- package/dist/{index-913d5238.mjs → index-189a45ed.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/components/GLayout/index.d.ts +2 -0
- package/dist/types/components/GLogin/index.d.ts +2 -0
- package/dist/types/components/common/GCommonDialog/index.d.ts +2 -0
- package/dist/types/components/common/GCommonForm/index.d.ts +2 -0
- package/dist/types/components/common/GCommonHeader/index.d.ts +2 -0
- package/dist/types/components/common/GCommonTable/index.d.ts +2 -0
- package/dist/types/components/common/index.d.ts +4 -0
- package/dist/types/components/index.d.ts +5 -0
- package/dist/types/constant/color.d.ts +5 -0
- package/dist/types/constant/common.d.ts +1 -0
- package/dist/types/constant/index.d.ts +5 -0
- package/dist/types/constant/local.d.ts +11 -0
- package/dist/types/constant/theme.d.ts +4 -0
- package/dist/types/constant/websocket.d.ts +22 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/nanoid.d.ts +2 -0
- package/dist/types/hooks/nprogress.d.ts +2 -0
- package/dist/types/http/config.d.ts +5 -0
- package/dist/types/http/index.d.ts +16 -0
- package/dist/types/http/type.d.ts +5 -0
- package/dist/types/index.d.ts +18 -0
- package/dist/types/stores/index.d.ts +4 -0
- package/dist/types/stores/props.d.ts +6 -0
- package/dist/types/stores/setting.d.ts +74 -0
- package/dist/types/stores/socket.d.ts +16 -0
- package/dist/types/stores/tabMenu.d.ts +18 -0
- package/dist/types/types/common.d.ts +24 -0
- package/dist/types/types/view.d.ts +290 -0
- package/dist/types/utils/color.d.ts +2 -0
- package/dist/types/utils/eval.d.ts +12 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/types/utils/is.d.ts +77 -0
- package/dist/types/utils/menu.d.ts +20 -0
- package/dist/types/utils/storage.d.ts +13 -0
- package/dist/types/utils/table.d.ts +3 -0
- package/dist/types/utils/url.d.ts +1 -0
- package/dist/types/utils/withInstall.d.ts +6 -0
- package/dist/types/views/GMenuManage/index.d.ts +2 -0
- package/dist/types/views/index.d.ts +1 -0
- package/package.json +3 -2
- package/dist/index-250d68c8.js +0 -1
- package/dist/index-33bed53b.js +0 -7
- package/dist/index.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var rn = Object.defineProperty;
|
|
2
2
|
var sn = (e, t, o) => t in e ? rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
3
|
var nt = (e, t, o) => (sn(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
-
import { defineComponent as J, ref as z, computed as D, resolveComponent as F, openBlock as v, createBlock as N, normalizeClass as $, unref as m, withCtx as
|
|
4
|
+
import { defineComponent as J, ref as z, computed as D, resolveComponent as F, openBlock as v, createBlock as N, normalizeClass as $, unref as m, withCtx as k, createElementBlock as q, Fragment as ve, renderList as ye, createVNode as V, createTextVNode as Q, createCommentVNode as j, toDisplayString as ge, nextTick as un, createElementVNode as Y, normalizeStyle as Ct, renderSlot as Be, isRef as bt, onMounted as et, mergeProps as zt, createSlots as Tt, normalizeProps as _o, guardReactiveProps as Io, watch as we, onBeforeUnmount as _t, onBeforeMount as It, defineAsyncComponent as cn, Transition as dn, withModifiers as mn } from "vue";
|
|
5
5
|
import { useRouter as ut, useRoute as tt } from "vue-router";
|
|
6
6
|
import { defineStore as xt } from "pinia";
|
|
7
|
-
import { MessagePlugin as
|
|
7
|
+
import { MessagePlugin as te, DialogPlugin as gt } from "tdesign-vue-next";
|
|
8
8
|
import { get as Z, set as qe, cloneDeep as it } from "lodash-es";
|
|
9
9
|
import fn from "axios";
|
|
10
10
|
import { customAlphabet as hn } from "nanoid";
|
|
@@ -349,7 +349,7 @@ const $t = xt("socket", {
|
|
|
349
349
|
e.socket && e.socket.send(JSON.stringify(o));
|
|
350
350
|
}, yn);
|
|
351
351
|
}, this.socket.onclose = function(t) {
|
|
352
|
-
|
|
352
|
+
te.error("WebSocket 断开连接"), e.socketInterval = null, e.isSocketResetting = !0, e.socket = null, te.error("WebSocket 重新连接..."), e.socketTimeout = setTimeout(function() {
|
|
353
353
|
e.isSocketResetting && (e.initSocket(), e.isSocketLinked && (clearTimeout(e.socketTimeout), window.dispatchEvent(new CustomEvent("onSocketReload"))));
|
|
354
354
|
}, wn);
|
|
355
355
|
}, this.socket.onerror = function(t) {
|
|
@@ -400,124 +400,124 @@ const Tn = /* @__PURE__ */ J({
|
|
|
400
400
|
__name: "GLayoutHeaderTab",
|
|
401
401
|
setup(e) {
|
|
402
402
|
const t = ut(), o = tt(), n = z(""), a = Nt(), l = Le(), r = D(() => a.tabMenuList), s = D(() => l.homeUrl);
|
|
403
|
-
function i(
|
|
404
|
-
|
|
403
|
+
function i(_, h, y) {
|
|
404
|
+
h.trigger === "document" && (n.value = null), _ && (n.value = y);
|
|
405
405
|
}
|
|
406
|
-
function u(
|
|
407
|
-
|
|
406
|
+
function u(_) {
|
|
407
|
+
_ === "/home" ? t.push({ path: s.value, query: mo(s.value) }) : t.push({ path: _, query: mo(_) });
|
|
408
408
|
}
|
|
409
|
-
function c({ value:
|
|
410
|
-
const { tabMenuList:
|
|
411
|
-
if (
|
|
412
|
-
const
|
|
413
|
-
a.subtractCurrentTabMenuItem({ path:
|
|
409
|
+
function c({ value: _, index: h }) {
|
|
410
|
+
const { tabMenuList: y } = a;
|
|
411
|
+
if (y.length > 2) {
|
|
412
|
+
const p = y[h + 1] || y[h - 1];
|
|
413
|
+
a.subtractCurrentTabMenuItem({ path: _, itemIdx: h });
|
|
414
414
|
const g = decodeURIComponent(o.fullPath);
|
|
415
|
-
|
|
416
|
-
path:
|
|
417
|
-
query:
|
|
415
|
+
_ === g && t.push({
|
|
416
|
+
path: p.path,
|
|
417
|
+
query: p.query
|
|
418
418
|
});
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
|
-
function d(
|
|
421
|
+
function d(_, h) {
|
|
422
422
|
un(() => {
|
|
423
423
|
t.push({
|
|
424
|
-
path:
|
|
425
|
-
query:
|
|
424
|
+
path: _.path,
|
|
425
|
+
query: _.query
|
|
426
426
|
});
|
|
427
427
|
}), l.toggleGlobalReload(), n.value = null;
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
a.subtractTabMenuItemAhead({ path:
|
|
429
|
+
function b(_, h) {
|
|
430
|
+
a.subtractTabMenuItemAhead({ path: _, itemIdx: h }), E("ahead", h);
|
|
431
431
|
}
|
|
432
|
-
function f(
|
|
433
|
-
a.subtractTabMenuItemBehind({ path:
|
|
432
|
+
function f(_, h) {
|
|
433
|
+
a.subtractTabMenuItemBehind({ path: _, itemIdx: h }), E("behind", h);
|
|
434
434
|
}
|
|
435
|
-
function S(
|
|
436
|
-
r.value.length > 2 && (a.subtractTabMenuItemOther({ path:
|
|
435
|
+
function S(_, h) {
|
|
436
|
+
r.value.length > 2 && (a.subtractTabMenuItemOther({ path: _, itemIdx: h }), E("other", h));
|
|
437
437
|
}
|
|
438
|
-
function
|
|
439
|
-
const
|
|
440
|
-
if (
|
|
441
|
-
const
|
|
438
|
+
function E(_, h) {
|
|
439
|
+
const y = o.fullPath, { tabMenuList: p } = a, g = p.findIndex((w) => w.path === y);
|
|
440
|
+
if (_ === "other" && g !== h || _ === "ahead" && g < h || _ === "behind" && g === -1) {
|
|
441
|
+
const w = _ === "behind" ? p.length - 1 : 1, x = p[w];
|
|
442
442
|
t.push({
|
|
443
|
-
path:
|
|
444
|
-
query:
|
|
443
|
+
path: x.path,
|
|
444
|
+
query: x.query
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
447
|
n.value = null;
|
|
448
448
|
}
|
|
449
|
-
return (
|
|
450
|
-
const
|
|
451
|
-
return v(), N(
|
|
449
|
+
return (_, h) => {
|
|
450
|
+
const y = F("t-icon"), p = F("t-dropdown-item"), g = F("t-dropdown-menu"), T = F("t-dropdown"), w = F("t-tab-panel"), x = F("t-tabs");
|
|
451
|
+
return v(), N(x, {
|
|
452
452
|
class: $(`${m(X)}__header-tabs`),
|
|
453
453
|
size: "large",
|
|
454
|
-
value: decodeURIComponent(
|
|
454
|
+
value: decodeURIComponent(_.$route.fullPath),
|
|
455
455
|
onChange: u,
|
|
456
456
|
onRemove: c
|
|
457
457
|
}, {
|
|
458
|
-
default:
|
|
459
|
-
(v(!0), q(ve, null, ye(m(r), (
|
|
460
|
-
key:
|
|
461
|
-
value:
|
|
462
|
-
removable: !
|
|
458
|
+
default: k(() => [
|
|
459
|
+
(v(!0), q(ve, null, ye(m(r), (M, W) => (v(), N(w, {
|
|
460
|
+
key: M.path,
|
|
461
|
+
value: M.path,
|
|
462
|
+
removable: !M.isHome
|
|
463
463
|
}, {
|
|
464
|
-
label:
|
|
465
|
-
V(
|
|
464
|
+
label: k(() => [
|
|
465
|
+
V(T, {
|
|
466
466
|
trigger: "context-menu",
|
|
467
467
|
"popup-props": {
|
|
468
|
-
onVisibleChange: (
|
|
469
|
-
visible: n.value != "" ? n.value ===
|
|
468
|
+
onVisibleChange: (oe, C) => i(oe, C, M.path),
|
|
469
|
+
visible: n.value != "" ? n.value === M.path : !1
|
|
470
470
|
}
|
|
471
471
|
}, {
|
|
472
|
-
dropdown:
|
|
472
|
+
dropdown: k(() => [
|
|
473
473
|
V(g, null, {
|
|
474
|
-
default:
|
|
475
|
-
|
|
474
|
+
default: k(() => [
|
|
475
|
+
M.isHome ? (v(), N(p, {
|
|
476
476
|
key: 0,
|
|
477
|
-
onClick: () => u(
|
|
477
|
+
onClick: () => u(M.path)
|
|
478
478
|
}, {
|
|
479
|
-
default:
|
|
480
|
-
V(
|
|
479
|
+
default: k(() => [
|
|
480
|
+
V(y, { name: "home" }),
|
|
481
481
|
Q("前往首页 ")
|
|
482
482
|
]),
|
|
483
483
|
_: 2
|
|
484
484
|
}, 1032, ["onClick"])) : j("", !0),
|
|
485
|
-
|
|
485
|
+
M.isHome ? j("", !0) : (v(), N(p, {
|
|
486
486
|
key: 1,
|
|
487
|
-
onClick: () => d(
|
|
487
|
+
onClick: () => d(M)
|
|
488
488
|
}, {
|
|
489
|
-
default:
|
|
490
|
-
V(
|
|
489
|
+
default: k(() => [
|
|
490
|
+
V(y, { name: "refresh" }),
|
|
491
491
|
Q("刷新 ")
|
|
492
492
|
]),
|
|
493
493
|
_: 2
|
|
494
494
|
}, 1032, ["onClick"])),
|
|
495
|
-
W > 1 ? (v(), N(
|
|
495
|
+
W > 1 ? (v(), N(p, {
|
|
496
496
|
key: 2,
|
|
497
|
-
onClick: () =>
|
|
497
|
+
onClick: () => b(M.path, W)
|
|
498
498
|
}, {
|
|
499
|
-
default:
|
|
500
|
-
V(
|
|
499
|
+
default: k(() => [
|
|
500
|
+
V(y, { name: "arrow-left" }),
|
|
501
501
|
Q("关闭左侧 ")
|
|
502
502
|
]),
|
|
503
503
|
_: 2
|
|
504
504
|
}, 1032, ["onClick"])) : j("", !0),
|
|
505
|
-
W > 0 && W < m(r).length - 1 ? (v(), N(
|
|
505
|
+
W > 0 && W < m(r).length - 1 ? (v(), N(p, {
|
|
506
506
|
key: 3,
|
|
507
|
-
onClick: () => f(
|
|
507
|
+
onClick: () => f(M.path, W)
|
|
508
508
|
}, {
|
|
509
|
-
default:
|
|
510
|
-
V(
|
|
509
|
+
default: k(() => [
|
|
510
|
+
V(y, { name: "arrow-right " }),
|
|
511
511
|
Q("关闭右侧 ")
|
|
512
512
|
]),
|
|
513
513
|
_: 2
|
|
514
514
|
}, 1032, ["onClick"])) : j("", !0),
|
|
515
|
-
W > 0 && m(r).length > 2 ? (v(), N(
|
|
515
|
+
W > 0 && m(r).length > 2 ? (v(), N(p, {
|
|
516
516
|
key: 4,
|
|
517
|
-
onClick: () => S(
|
|
517
|
+
onClick: () => S(M.path, W)
|
|
518
518
|
}, {
|
|
519
|
-
default:
|
|
520
|
-
V(
|
|
519
|
+
default: k(() => [
|
|
520
|
+
V(y, { name: "close-circle" }),
|
|
521
521
|
Q("关闭其他 ")
|
|
522
522
|
]),
|
|
523
523
|
_: 2
|
|
@@ -526,8 +526,8 @@ const Tn = /* @__PURE__ */ J({
|
|
|
526
526
|
_: 2
|
|
527
527
|
}, 1024)
|
|
528
528
|
]),
|
|
529
|
-
default:
|
|
530
|
-
Q(ge(
|
|
529
|
+
default: k(() => [
|
|
530
|
+
Q(ge(M.title) + " ", 1)
|
|
531
531
|
]),
|
|
532
532
|
_: 2
|
|
533
533
|
}, 1032, ["popup-props"])
|
|
@@ -554,13 +554,13 @@ const _n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAAAyCAYAAADMZheFAA
|
|
|
554
554
|
o.userLogout(), t.push({ name: "login" });
|
|
555
555
|
}
|
|
556
556
|
return (i, u) => {
|
|
557
|
-
const c = F("t-icon"), d = F("t-button"),
|
|
558
|
-
return v(), N(
|
|
557
|
+
const c = F("t-icon"), d = F("t-button"), b = F("t-dropdown-item"), f = F("t-dropdown-menu"), S = F("t-dropdown"), E = F("t-tooltip"), _ = F("t-head-menu"), h = F("t-header");
|
|
558
|
+
return v(), N(h, {
|
|
559
559
|
class: $(`${m(X)}__header`)
|
|
560
560
|
}, {
|
|
561
|
-
default:
|
|
562
|
-
V(
|
|
563
|
-
logo:
|
|
561
|
+
default: k(() => [
|
|
562
|
+
V(_, { theme: m(a) }, {
|
|
563
|
+
logo: k(() => [
|
|
564
564
|
Y("div", {
|
|
565
565
|
class: $(`${m(X)}__header-logo-container`)
|
|
566
566
|
}, [
|
|
@@ -578,7 +578,7 @@ const _n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAAAyCAYAAADMZheFAA
|
|
|
578
578
|
variant: "text",
|
|
579
579
|
onClick: l
|
|
580
580
|
}, {
|
|
581
|
-
default:
|
|
581
|
+
default: k(() => [
|
|
582
582
|
V(c, {
|
|
583
583
|
class: "collapsed-icon",
|
|
584
584
|
name: "view-list"
|
|
@@ -588,16 +588,16 @@ const _n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAAAyCAYAAADMZheFAA
|
|
|
588
588
|
})
|
|
589
589
|
], 2)
|
|
590
590
|
]),
|
|
591
|
-
operations:
|
|
591
|
+
operations: k(() => [
|
|
592
592
|
Y("div", {
|
|
593
593
|
class: $(`${m(X)}__header-operations-container`)
|
|
594
594
|
}, [
|
|
595
595
|
V(S, { trigger: "click" }, {
|
|
596
|
-
dropdown:
|
|
596
|
+
dropdown: k(() => [
|
|
597
597
|
V(f, null, {
|
|
598
|
-
default:
|
|
599
|
-
V(
|
|
600
|
-
default:
|
|
598
|
+
default: k(() => [
|
|
599
|
+
V(b, { onClick: s }, {
|
|
600
|
+
default: k(() => [
|
|
601
601
|
V(c, { name: "poweroff" }),
|
|
602
602
|
Q(" 退出登录 ")
|
|
603
603
|
]),
|
|
@@ -607,18 +607,18 @@ const _n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAAAyCAYAAADMZheFAA
|
|
|
607
607
|
_: 1
|
|
608
608
|
})
|
|
609
609
|
]),
|
|
610
|
-
default:
|
|
610
|
+
default: k(() => [
|
|
611
611
|
V(d, {
|
|
612
612
|
theme: "default",
|
|
613
613
|
variant: "text"
|
|
614
614
|
}, {
|
|
615
|
-
icon:
|
|
615
|
+
icon: k(() => [
|
|
616
616
|
V(c, { name: "user-circle" })
|
|
617
617
|
]),
|
|
618
|
-
suffix:
|
|
618
|
+
suffix: k(() => [
|
|
619
619
|
V(c, { name: "chevron-down" })
|
|
620
620
|
]),
|
|
621
|
-
default:
|
|
621
|
+
default: k(() => [
|
|
622
622
|
Y("span", null, ge(m(n)), 1)
|
|
623
623
|
]),
|
|
624
624
|
_: 1
|
|
@@ -626,18 +626,18 @@ const _n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAAAyCAYAAADMZheFAA
|
|
|
626
626
|
]),
|
|
627
627
|
_: 1
|
|
628
628
|
}),
|
|
629
|
-
V(
|
|
629
|
+
V(E, {
|
|
630
630
|
placement: "bottom",
|
|
631
631
|
content: "系统设置"
|
|
632
632
|
}, {
|
|
633
|
-
default:
|
|
633
|
+
default: k(() => [
|
|
634
634
|
V(d, {
|
|
635
635
|
theme: "default",
|
|
636
636
|
shape: "square",
|
|
637
637
|
variant: "text",
|
|
638
638
|
onClick: r
|
|
639
639
|
}, {
|
|
640
|
-
default:
|
|
640
|
+
default: k(() => [
|
|
641
641
|
V(c, { name: "setting" })
|
|
642
642
|
]),
|
|
643
643
|
_: 1
|
|
@@ -647,7 +647,7 @@ const _n = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAToAAAAyCAYAAADMZheFAA
|
|
|
647
647
|
})
|
|
648
648
|
], 2)
|
|
649
649
|
]),
|
|
650
|
-
default:
|
|
650
|
+
default: k(() => [
|
|
651
651
|
V(Tn)
|
|
652
652
|
]),
|
|
653
653
|
_: 1
|
|
@@ -666,11 +666,11 @@ const xn = /* @__PURE__ */ J({
|
|
|
666
666
|
return v(), N(a, {
|
|
667
667
|
class: $(`${m(X)}__content-layout`)
|
|
668
668
|
}, {
|
|
669
|
-
default:
|
|
669
|
+
default: k(() => [
|
|
670
670
|
V(n, {
|
|
671
671
|
class: $(`${m(X)}__content`)
|
|
672
672
|
}, {
|
|
673
|
-
default:
|
|
673
|
+
default: k(() => [
|
|
674
674
|
Be(t.$slots, "default")
|
|
675
675
|
]),
|
|
676
676
|
_: 3
|
|
@@ -827,7 +827,7 @@ const Tr = [
|
|
|
827
827
|
to: u.path,
|
|
828
828
|
onClick: o
|
|
829
829
|
}, {
|
|
830
|
-
default:
|
|
830
|
+
default: k(() => [
|
|
831
831
|
Q(ge(u.title), 1)
|
|
832
832
|
]),
|
|
833
833
|
_: 2
|
|
@@ -838,7 +838,7 @@ const Tr = [
|
|
|
838
838
|
value: u.name,
|
|
839
839
|
title: u.title
|
|
840
840
|
}, {
|
|
841
|
-
icon:
|
|
841
|
+
icon: k(() => [
|
|
842
842
|
u.level == 1 ? (v(), q(ve, { key: 0 }, [
|
|
843
843
|
u.icon ? (v(), N(r, {
|
|
844
844
|
key: 0,
|
|
@@ -851,7 +851,7 @@ const Tr = [
|
|
|
851
851
|
}))
|
|
852
852
|
], 64)) : j("", !0)
|
|
853
853
|
]),
|
|
854
|
-
default:
|
|
854
|
+
default: k(() => [
|
|
855
855
|
u.children ? (v(), N(s, {
|
|
856
856
|
key: 0,
|
|
857
857
|
sideMenuTree: u.children
|
|
@@ -891,26 +891,26 @@ const Zt = (e, t) => {
|
|
|
891
891
|
t.push({ name: "menuManage" }), n.toggleSideMenuCollapse();
|
|
892
892
|
}
|
|
893
893
|
return (c, d) => {
|
|
894
|
-
const
|
|
895
|
-
return v(), N(
|
|
894
|
+
const b = F("t-icon"), f = F("t-button"), S = F("t-menu"), E = F("t-drawer");
|
|
895
|
+
return v(), N(E, {
|
|
896
896
|
class: $(`${m(X)}__drawer`),
|
|
897
897
|
size: "232px",
|
|
898
898
|
placement: "left",
|
|
899
899
|
visible: m(r),
|
|
900
|
-
"onUpdate:visible": d[0] || (d[0] = (
|
|
900
|
+
"onUpdate:visible": d[0] || (d[0] = (_) => bt(r) ? r.value = _ : null),
|
|
901
901
|
showOverlay: !0,
|
|
902
902
|
header: !1,
|
|
903
903
|
footer: !1,
|
|
904
904
|
showInAttachedElement: !0
|
|
905
905
|
}, {
|
|
906
|
-
default:
|
|
906
|
+
default: k(() => [
|
|
907
907
|
V(S, {
|
|
908
908
|
width: "210px",
|
|
909
909
|
theme: m(l),
|
|
910
910
|
value: m(s),
|
|
911
911
|
defaultExpanded: m(i)
|
|
912
912
|
}, {
|
|
913
|
-
operations:
|
|
913
|
+
operations: k(() => [
|
|
914
914
|
V(f, {
|
|
915
915
|
variant: "text",
|
|
916
916
|
theme: "primary",
|
|
@@ -919,16 +919,16 @@ const Zt = (e, t) => {
|
|
|
919
919
|
onClick: u,
|
|
920
920
|
style: { "justify-content": "flex-start", padding: "0 0 0 10px" }
|
|
921
921
|
}, {
|
|
922
|
-
icon:
|
|
923
|
-
V(
|
|
922
|
+
icon: k(() => [
|
|
923
|
+
V(b, { name: "view-list" })
|
|
924
924
|
]),
|
|
925
|
-
default:
|
|
925
|
+
default: k(() => [
|
|
926
926
|
Q("菜单管理 ")
|
|
927
927
|
]),
|
|
928
928
|
_: 1
|
|
929
929
|
})
|
|
930
930
|
]),
|
|
931
|
-
default:
|
|
931
|
+
default: k(() => [
|
|
932
932
|
V(Vn, { sideMenuTree: m(a) }, null, 8, ["sideMenuTree"])
|
|
933
933
|
]),
|
|
934
934
|
_: 1
|
|
@@ -989,18 +989,18 @@ const Bn = /* @__PURE__ */ J({
|
|
|
989
989
|
t.changeTheme(a.value);
|
|
990
990
|
};
|
|
991
991
|
return (s, i) => {
|
|
992
|
-
const u = F("t-icon"), c = F("t-radio-button"), d = F("t-radio-group"),
|
|
993
|
-
return v(), N(
|
|
992
|
+
const u = F("t-icon"), c = F("t-radio-button"), d = F("t-radio-group"), b = F("t-drawer");
|
|
993
|
+
return v(), N(b, {
|
|
994
994
|
class: $(`${m(X)}__setting-panel`),
|
|
995
995
|
visible: m(l),
|
|
996
996
|
"onUpdate:visible": i[2] || (i[2] = (f) => bt(l) ? l.value = f : null),
|
|
997
997
|
footer: !1
|
|
998
998
|
}, {
|
|
999
|
-
header:
|
|
999
|
+
header: k(() => [
|
|
1000
1000
|
V(u, { name: "setting" }),
|
|
1001
1001
|
Q("系统设置")
|
|
1002
1002
|
]),
|
|
1003
|
-
default:
|
|
1003
|
+
default: k(() => [
|
|
1004
1004
|
Y("div", {
|
|
1005
1005
|
class: $(`${m(X)}__setting-container`)
|
|
1006
1006
|
}, [
|
|
@@ -1012,14 +1012,14 @@ const Bn = /* @__PURE__ */ J({
|
|
|
1012
1012
|
"onUpdate:modelValue": i[0] || (i[0] = (f) => m(a).brandTheme = f),
|
|
1013
1013
|
onChange: r
|
|
1014
1014
|
}, {
|
|
1015
|
-
default:
|
|
1015
|
+
default: k(() => [
|
|
1016
1016
|
(v(!0), q(ve, null, ye(o.slice(0, o.length - 1), (f, S) => (v(), q("div", { key: S }, [
|
|
1017
1017
|
(v(), N(c, {
|
|
1018
1018
|
key: S,
|
|
1019
1019
|
value: f,
|
|
1020
1020
|
class: $(`${m(X)}__setting-container--color-group`)
|
|
1021
1021
|
}, {
|
|
1022
|
-
default:
|
|
1022
|
+
default: k(() => [
|
|
1023
1023
|
V(En, { value: f }, null, 8, ["value"])
|
|
1024
1024
|
]),
|
|
1025
1025
|
_: 2
|
|
@@ -1037,13 +1037,13 @@ const Bn = /* @__PURE__ */ J({
|
|
|
1037
1037
|
variant: "default-filled",
|
|
1038
1038
|
onChange: r
|
|
1039
1039
|
}, {
|
|
1040
|
-
default:
|
|
1040
|
+
default: k(() => [
|
|
1041
1041
|
(v(), q(ve, null, ye(n, (f, S) => Y("div", { key: S }, [
|
|
1042
1042
|
(v(), N(c, {
|
|
1043
1043
|
key: S,
|
|
1044
1044
|
value: f.type
|
|
1045
1045
|
}, {
|
|
1046
|
-
default:
|
|
1046
|
+
default: k(() => [
|
|
1047
1047
|
Q(ge(f.text), 1)
|
|
1048
1048
|
]),
|
|
1049
1049
|
_: 2
|
|
@@ -1074,18 +1074,18 @@ const Ln = /* @__PURE__ */ J({
|
|
|
1074
1074
|
class: $(`${m(X)}__layout-main`)
|
|
1075
1075
|
}, [
|
|
1076
1076
|
V(l, null, {
|
|
1077
|
-
default:
|
|
1077
|
+
default: k(() => [
|
|
1078
1078
|
V(In),
|
|
1079
1079
|
V(a, null, {
|
|
1080
|
-
default:
|
|
1080
|
+
default: k(() => [
|
|
1081
1081
|
V(xn, null, {
|
|
1082
|
-
default:
|
|
1082
|
+
default: k(() => [
|
|
1083
1083
|
V(n, {
|
|
1084
1084
|
class: $(`${m(X)}__card`),
|
|
1085
1085
|
bordered: !1,
|
|
1086
1086
|
title: e.title
|
|
1087
1087
|
}, {
|
|
1088
|
-
default:
|
|
1088
|
+
default: k(() => [
|
|
1089
1089
|
Be(t.$slots, "default")
|
|
1090
1090
|
]),
|
|
1091
1091
|
_: 3
|
|
@@ -1115,7 +1115,7 @@ const Ao = /* @__PURE__ */ J({
|
|
|
1115
1115
|
return et(() => {
|
|
1116
1116
|
t.loadLocalThemeConfig();
|
|
1117
1117
|
}), (o, n) => (v(), N(Ln, { title: e.title }, {
|
|
1118
|
-
default:
|
|
1118
|
+
default: k(() => [
|
|
1119
1119
|
Be(o.$slots, "default")
|
|
1120
1120
|
]),
|
|
1121
1121
|
_: 3
|
|
@@ -1141,7 +1141,7 @@ const Dn = /* @__PURE__ */ J({
|
|
|
1141
1141
|
}, e.commonDialogProps), Tt({ _: 2 }, [
|
|
1142
1142
|
ye(t.$slots, (a, l) => ({
|
|
1143
1143
|
name: l,
|
|
1144
|
-
fn:
|
|
1144
|
+
fn: k((r) => [
|
|
1145
1145
|
Be(t.$slots, l, _o(Io({ ...r })))
|
|
1146
1146
|
])
|
|
1147
1147
|
}))
|
|
@@ -1169,7 +1169,7 @@ const Eo = Qe(Dn), Bo = /* @__PURE__ */ J({
|
|
|
1169
1169
|
ref: o,
|
|
1170
1170
|
class: `${m(X)}__common-form-main`
|
|
1171
1171
|
}, e.commonFormProps), {
|
|
1172
|
-
default:
|
|
1172
|
+
default: k(() => [
|
|
1173
1173
|
Y("div", {
|
|
1174
1174
|
class: $(`${m(X)}__common-form-main--body`),
|
|
1175
1175
|
ref: "commonFormBodyRef"
|
|
@@ -1197,12 +1197,12 @@ const Fn = Qe(Bo), On = /* @__PURE__ */ J({
|
|
|
1197
1197
|
class: $(`${m(X)}__common-header`)
|
|
1198
1198
|
}, [
|
|
1199
1199
|
V(n, { justify: "space-between" }, {
|
|
1200
|
-
default:
|
|
1200
|
+
default: k(() => [
|
|
1201
1201
|
Y("div", {
|
|
1202
1202
|
class: $(`${m(X)}__common-header--left`)
|
|
1203
1203
|
}, [
|
|
1204
1204
|
V(n, null, {
|
|
1205
|
-
default:
|
|
1205
|
+
default: k(() => [
|
|
1206
1206
|
Be(t.$slots, "left-operations")
|
|
1207
1207
|
]),
|
|
1208
1208
|
_: 3
|
|
@@ -1245,7 +1245,7 @@ const Lo = Qe(On), Un = /* @__PURE__ */ J({
|
|
|
1245
1245
|
}), Tt({ _: 2 }, [
|
|
1246
1246
|
ye(n.$slots, (r, s) => ({
|
|
1247
1247
|
name: s,
|
|
1248
|
-
fn:
|
|
1248
|
+
fn: k((i) => [
|
|
1249
1249
|
Be(n.$slots, s, _o(Io({ ...i })))
|
|
1250
1250
|
])
|
|
1251
1251
|
}))
|
|
@@ -1267,7 +1267,7 @@ const Do = Qe(Un), Rn = /* @__PURE__ */ J({
|
|
|
1267
1267
|
r.response, t("returnFileUrl");
|
|
1268
1268
|
}
|
|
1269
1269
|
function l(r) {
|
|
1270
|
-
|
|
1270
|
+
te.error(`上传失败:${r}`);
|
|
1271
1271
|
}
|
|
1272
1272
|
return (r, s) => {
|
|
1273
1273
|
const i = F("t-icon"), u = F("t-button"), c = F("t-upload");
|
|
@@ -1278,9 +1278,9 @@ const Do = Qe(Un), Rn = /* @__PURE__ */ J({
|
|
|
1278
1278
|
showUploadProgress: !1,
|
|
1279
1279
|
style: { padding: "0 8px 0 0" }
|
|
1280
1280
|
}, {
|
|
1281
|
-
default:
|
|
1281
|
+
default: k(() => [
|
|
1282
1282
|
V(u, null, {
|
|
1283
|
-
default:
|
|
1283
|
+
default: k(() => [
|
|
1284
1284
|
Y("template", null, [
|
|
1285
1285
|
V(i, { name: "upload" })
|
|
1286
1286
|
]),
|
|
@@ -1337,13 +1337,13 @@ function Fo(e) {
|
|
|
1337
1337
|
const c = [];
|
|
1338
1338
|
return u.forEach((d) => {
|
|
1339
1339
|
if (d[r] == i) {
|
|
1340
|
-
const
|
|
1340
|
+
const b = s(d[o], t), f = {
|
|
1341
1341
|
key: d[o],
|
|
1342
1342
|
label: d[a],
|
|
1343
1343
|
value: d[n],
|
|
1344
1344
|
children: []
|
|
1345
1345
|
};
|
|
1346
|
-
|
|
1346
|
+
b.length && (f.children = b), c.push(f);
|
|
1347
1347
|
}
|
|
1348
1348
|
}), c;
|
|
1349
1349
|
};
|
|
@@ -1579,7 +1579,7 @@ async function Qn(e, t, o, n) {
|
|
|
1579
1579
|
parentKeyName: e == null ? void 0 : e.parentKeyName
|
|
1580
1580
|
});
|
|
1581
1581
|
} else
|
|
1582
|
-
|
|
1582
|
+
te.error(`获取数据失败:${a.message}`);
|
|
1583
1583
|
}
|
|
1584
1584
|
async function Jn(e, t, o, n) {
|
|
1585
1585
|
const a = await Vt({
|
|
@@ -1599,7 +1599,7 @@ async function Jn(e, t, o, n) {
|
|
|
1599
1599
|
parentKeyName: e == null ? void 0 : e.parentKeyName
|
|
1600
1600
|
});
|
|
1601
1601
|
} else
|
|
1602
|
-
|
|
1602
|
+
te.error(`获取数据失败:${a.message}`);
|
|
1603
1603
|
}
|
|
1604
1604
|
async function Yn(e, t, o, n) {
|
|
1605
1605
|
const a = await Vt({
|
|
@@ -1620,7 +1620,7 @@ async function Yn(e, t, o, n) {
|
|
|
1620
1620
|
}), r;
|
|
1621
1621
|
}
|
|
1622
1622
|
} else
|
|
1623
|
-
|
|
1623
|
+
te.error(`获取数据失败:${a.message}`);
|
|
1624
1624
|
}
|
|
1625
1625
|
function Mt(e) {
|
|
1626
1626
|
const t = z([]), o = tt(), n = D(() => {
|
|
@@ -1722,8 +1722,8 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1722
1722
|
i(Se(n.value));
|
|
1723
1723
|
}), (c, d) => {
|
|
1724
1724
|
var f;
|
|
1725
|
-
const
|
|
1726
|
-
return v(), N(
|
|
1725
|
+
const b = F("t-select");
|
|
1726
|
+
return v(), N(b, {
|
|
1727
1727
|
modelValue: s.value,
|
|
1728
1728
|
"onUpdate:modelValue": d[0] || (d[0] = (S) => s.value = S),
|
|
1729
1729
|
placeholder: `请选择${(f = e.formItem) == null ? void 0 : f.name}`,
|
|
@@ -1773,15 +1773,15 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1773
1773
|
o.disabled && t("update:modelValue", Se(n.value));
|
|
1774
1774
|
}
|
|
1775
1775
|
), (s, i) => {
|
|
1776
|
-
var d,
|
|
1776
|
+
var d, b, f, S, E, _, h;
|
|
1777
1777
|
const u = F("t-date-picker"), c = F("t-time-picker");
|
|
1778
1778
|
return v(), q(ve, null, [
|
|
1779
|
-
((d = e.formItem) == null ? void 0 : d.itemType) === "date_selector" || ((
|
|
1779
|
+
((d = e.formItem) == null ? void 0 : d.itemType) === "date_selector" || ((b = e.formItem) == null ? void 0 : b.itemType) === "date_time_selector" ? (v(), N(u, {
|
|
1780
1780
|
key: 0,
|
|
1781
1781
|
"enable-time-picker": ((f = e.formItem) == null ? void 0 : f.itemType) === "date_time_selector",
|
|
1782
1782
|
placeholder: (S = e.formItem) == null ? void 0 : S.placeholder,
|
|
1783
1783
|
modelValue: m(a),
|
|
1784
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
1784
|
+
"onUpdate:modelValue": i[0] || (i[0] = (y) => bt(a) ? a.value = y : null),
|
|
1785
1785
|
format: e.formItem.format || "YYYY-MM-DD HH:mm:ss",
|
|
1786
1786
|
valueType: "time-stamp",
|
|
1787
1787
|
disabled: e.disabled,
|
|
@@ -1789,14 +1789,14 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1789
1789
|
onChange: l,
|
|
1790
1790
|
onBlur: r
|
|
1791
1791
|
}, null, 8, ["enable-time-picker", "placeholder", "modelValue", "format", "disabled"])) : j("", !0),
|
|
1792
|
-
((
|
|
1792
|
+
((E = e.formItem) == null ? void 0 : E.itemType) === "time_selector" ? (v(), N(c, {
|
|
1793
1793
|
key: 1,
|
|
1794
|
-
placeholder: (
|
|
1794
|
+
placeholder: (_ = e.formItem) == null ? void 0 : _.placeholder,
|
|
1795
1795
|
modelValue: m(a),
|
|
1796
|
-
"onUpdate:modelValue": i[1] || (i[1] = (
|
|
1796
|
+
"onUpdate:modelValue": i[1] || (i[1] = (y) => bt(a) ? a.value = y : null),
|
|
1797
1797
|
onChange: l,
|
|
1798
1798
|
onBlur: r,
|
|
1799
|
-
format: ((
|
|
1799
|
+
format: ((h = e.formItem) == null ? void 0 : h.format) || "HH:mm:ss",
|
|
1800
1800
|
clearable: ""
|
|
1801
1801
|
}, null, 8, ["placeholder", "modelValue", "format"])) : j("", !0)
|
|
1802
1802
|
], 64);
|
|
@@ -1813,12 +1813,12 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1813
1813
|
const o = e, n = D(
|
|
1814
1814
|
() => {
|
|
1815
1815
|
var c, d;
|
|
1816
|
-
return (d = (c = o.headerInfo) == null ? void 0 : c.buttons) == null ? void 0 : d.filter((
|
|
1816
|
+
return (d = (c = o.headerInfo) == null ? void 0 : c.buttons) == null ? void 0 : d.filter((b) => b.action !== "UPLOAD_FILE");
|
|
1817
1817
|
}
|
|
1818
1818
|
), a = D(
|
|
1819
1819
|
() => {
|
|
1820
1820
|
var c, d;
|
|
1821
|
-
return (d = (c = o.headerInfo) == null ? void 0 : c.buttons) == null ? void 0 : d.filter((
|
|
1821
|
+
return (d = (c = o.headerInfo) == null ? void 0 : c.buttons) == null ? void 0 : d.filter((b) => b.action === "UPLOAD_FILE");
|
|
1822
1822
|
}
|
|
1823
1823
|
);
|
|
1824
1824
|
function l(c) {
|
|
@@ -1830,27 +1830,27 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1830
1830
|
}), s = D(() => Qt({}, r.value));
|
|
1831
1831
|
function i(c, d) {
|
|
1832
1832
|
qe(s.value, c, d), u.value && clearTimeout(u.value), u.value = setTimeout(() => {
|
|
1833
|
-
Object.keys(s.value).forEach((
|
|
1834
|
-
(s.value[
|
|
1833
|
+
Object.keys(s.value).forEach((b) => {
|
|
1834
|
+
(s.value[b] ?? "") == "" && delete s.value[b];
|
|
1835
1835
|
}), t("header-filter-change", s.value);
|
|
1836
1836
|
}, 500);
|
|
1837
1837
|
}
|
|
1838
1838
|
let u = z(0);
|
|
1839
1839
|
return (c, d) => {
|
|
1840
|
-
const
|
|
1840
|
+
const b = F("t-button");
|
|
1841
1841
|
return v(), N(m(Lo), null, Tt({
|
|
1842
|
-
"left-operations":
|
|
1842
|
+
"left-operations": k(() => [
|
|
1843
1843
|
m(Ne)(m(a)) ? j("", !0) : (v(!0), q(ve, { key: 0 }, ye(m(a), (f) => (v(), N(Rn, {
|
|
1844
1844
|
key: f.buttonId,
|
|
1845
1845
|
formItem: f,
|
|
1846
1846
|
viewName: e.viewName
|
|
1847
1847
|
}, null, 8, ["formItem", "viewName"]))), 128)),
|
|
1848
|
-
m(n) ? (v(!0), q(ve, { key: 1 }, ye(m(n), (f) => (v(), N(
|
|
1848
|
+
m(n) ? (v(!0), q(ve, { key: 1 }, ye(m(n), (f) => (v(), N(b, {
|
|
1849
1849
|
key: f.buttonId,
|
|
1850
1850
|
theme: "primary",
|
|
1851
1851
|
onClick: (S) => l(f)
|
|
1852
1852
|
}, {
|
|
1853
|
-
default:
|
|
1853
|
+
default: k(() => [
|
|
1854
1854
|
Q(ge(f.name), 1)
|
|
1855
1855
|
]),
|
|
1856
1856
|
_: 2
|
|
@@ -1860,14 +1860,14 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1860
1860
|
}, [
|
|
1861
1861
|
m(r) ? {
|
|
1862
1862
|
name: "right-operations",
|
|
1863
|
-
fn:
|
|
1863
|
+
fn: k(() => [
|
|
1864
1864
|
(v(!0), q(ve, null, ye(m(r), (f, S) => (v(), q("div", { key: S }, [
|
|
1865
1865
|
f.itemType === "text_input" ? (v(), q("div", ea, [
|
|
1866
1866
|
V(kt, {
|
|
1867
1867
|
formItem: f,
|
|
1868
1868
|
modelValue: m(Z)(m(s), f.keyName),
|
|
1869
1869
|
placeholder: f.placeholder,
|
|
1870
|
-
"onUpdate:modelValue": (
|
|
1870
|
+
"onUpdate:modelValue": (E) => f.keyName && i(f.keyName, E)
|
|
1871
1871
|
}, null, 8, ["formItem", "modelValue", "placeholder", "onUpdate:modelValue"])
|
|
1872
1872
|
])) : j("", !0),
|
|
1873
1873
|
f.itemType === "selector" ? (v(), q("div", ta, [
|
|
@@ -1875,7 +1875,7 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1875
1875
|
modelValue: m(Z)(m(s), f.keyName),
|
|
1876
1876
|
formItem: f,
|
|
1877
1877
|
viewName: e.viewName,
|
|
1878
|
-
"onUpdate:modelValue": (
|
|
1878
|
+
"onUpdate:modelValue": (E) => f.keyName && i(f.keyName, E)
|
|
1879
1879
|
}, null, 8, ["modelValue", "formItem", "viewName", "onUpdate:modelValue"])
|
|
1880
1880
|
])) : j("", !0),
|
|
1881
1881
|
f.itemType === "date_selector" || f.itemType === "time_selector" || f.itemType === "date_time_selector" ? (v(), q("div", oa, [
|
|
@@ -1883,7 +1883,7 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1883
1883
|
modelValue: m(Z)(m(s), f.keyName),
|
|
1884
1884
|
formItem: f,
|
|
1885
1885
|
viewName: e.viewName,
|
|
1886
|
-
"onUpdate:modelValue": (
|
|
1886
|
+
"onUpdate:modelValue": (E) => f.keyName && i(f.keyName, E)
|
|
1887
1887
|
}, null, 8, ["modelValue", "formItem", "viewName", "onUpdate:modelValue"])
|
|
1888
1888
|
])) : j("", !0)
|
|
1889
1889
|
]))), 128))
|
|
@@ -1902,7 +1902,7 @@ const Jt = /* @__PURE__ */ J({
|
|
|
1902
1902
|
return (t, o) => {
|
|
1903
1903
|
const n = F("t-tag");
|
|
1904
1904
|
return v(), N(n, null, {
|
|
1905
|
-
default:
|
|
1905
|
+
default: k(() => [
|
|
1906
1906
|
Q(ge(e.modelValue), 1)
|
|
1907
1907
|
]),
|
|
1908
1908
|
_: 1
|
|
@@ -2029,19 +2029,19 @@ const Jt = /* @__PURE__ */ J({
|
|
|
2029
2029
|
), It(() => {
|
|
2030
2030
|
t("update:modelValue", Se(n.value));
|
|
2031
2031
|
}), (u, c) => {
|
|
2032
|
-
const d = F("t-radio"),
|
|
2033
|
-
return v(), N(
|
|
2032
|
+
const d = F("t-radio"), b = F("t-radio-group");
|
|
2033
|
+
return v(), N(b, {
|
|
2034
2034
|
modelValue: s.value,
|
|
2035
2035
|
"onUpdate:modelValue": c[0] || (c[0] = (f) => s.value = f),
|
|
2036
2036
|
onChange: i,
|
|
2037
2037
|
disabled: e.disabled
|
|
2038
2038
|
}, {
|
|
2039
|
-
default:
|
|
2039
|
+
default: k(() => [
|
|
2040
2040
|
(v(!0), q(ve, null, ye(m(r), (f) => (v(), N(d, {
|
|
2041
2041
|
key: f.key,
|
|
2042
2042
|
value: f.value
|
|
2043
2043
|
}, {
|
|
2044
|
-
default:
|
|
2044
|
+
default: k(() => [
|
|
2045
2045
|
Q(ge(f.label), 1)
|
|
2046
2046
|
]),
|
|
2047
2047
|
_: 2
|
|
@@ -2104,8 +2104,8 @@ const Jt = /* @__PURE__ */ J({
|
|
|
2104
2104
|
i(Se(a.value));
|
|
2105
2105
|
}), (c, d) => {
|
|
2106
2106
|
var f;
|
|
2107
|
-
const
|
|
2108
|
-
return v(), N(
|
|
2107
|
+
const b = F("t-tree-select");
|
|
2108
|
+
return v(), N(b, {
|
|
2109
2109
|
modelValue: n.value,
|
|
2110
2110
|
"onUpdate:modelValue": d[0] || (d[0] = (S) => n.value = S),
|
|
2111
2111
|
data: m(s),
|
|
@@ -2171,8 +2171,8 @@ const Jt = /* @__PURE__ */ J({
|
|
|
2171
2171
|
), _t(() => {
|
|
2172
2172
|
i(Se(n.value));
|
|
2173
2173
|
}), (c, d) => {
|
|
2174
|
-
const
|
|
2175
|
-
return v(), N(
|
|
2174
|
+
const b = F("t-cascader");
|
|
2175
|
+
return v(), N(b, {
|
|
2176
2176
|
modelValue: s.value,
|
|
2177
2177
|
"onUpdate:modelValue": d[0] || (d[0] = (f) => s.value = f),
|
|
2178
2178
|
options: m(r),
|
|
@@ -2200,17 +2200,17 @@ const Jt = /* @__PURE__ */ J({
|
|
|
2200
2200
|
function r(u) {
|
|
2201
2201
|
if (u.length) {
|
|
2202
2202
|
const { name: c, response: d } = u[0];
|
|
2203
|
-
d.data.length ? (t("update:modelValue", d.data[0]), t("blur:modelValue", d.data[0]), t("update:fileName", c),
|
|
2203
|
+
d.data.length ? (t("update:modelValue", d.data[0]), t("blur:modelValue", d.data[0]), t("update:fileName", c), te.success("上传成功")) : (te.success(`上传失败 ${d == null ? void 0 : d.message}`), t("update:fileName", ""), t("update:modelValue", ""), t("blur:modelValue", ""));
|
|
2204
2204
|
}
|
|
2205
2205
|
}
|
|
2206
2206
|
function s(u) {
|
|
2207
2207
|
t("update:fileName", ""), t("update:modelValue", ""), t("blur:modelValue", "");
|
|
2208
2208
|
}
|
|
2209
2209
|
function i(u) {
|
|
2210
|
-
|
|
2210
|
+
te.error(`上传失败:${u}`);
|
|
2211
2211
|
}
|
|
2212
2212
|
return (u, c) => {
|
|
2213
|
-
var
|
|
2213
|
+
var b, f, S;
|
|
2214
2214
|
const d = F("t-upload");
|
|
2215
2215
|
return v(), N(d, {
|
|
2216
2216
|
ref: "uploadRef",
|
|
@@ -2218,7 +2218,7 @@ const Jt = /* @__PURE__ */ J({
|
|
|
2218
2218
|
files: m(n),
|
|
2219
2219
|
tips: e.formItem.placeholder || "请选择上传文件",
|
|
2220
2220
|
action: m(l),
|
|
2221
|
-
accept: (
|
|
2221
|
+
accept: (b = e.formItem) == null ? void 0 : b.accept,
|
|
2222
2222
|
max: (f = e.formItem) == null ? void 0 : f.limit,
|
|
2223
2223
|
size: (S = e.formItem) == null ? void 0 : S.maxSize,
|
|
2224
2224
|
disabled: e.disabled,
|
|
@@ -2269,22 +2269,22 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2269
2269
|
emits: ["after-update-value"],
|
|
2270
2270
|
setup(e, { expose: t, emit: o }) {
|
|
2271
2271
|
const n = e, a = D(() => n.formModel), { handleItemShowIf: l, handleItemDisableIf: r } = qo({ formModel: a });
|
|
2272
|
-
function s(
|
|
2273
|
-
o("after-update-value",
|
|
2272
|
+
function s(b, f) {
|
|
2273
|
+
o("after-update-value", b, f);
|
|
2274
2274
|
}
|
|
2275
2275
|
const i = D(() => n.formItem.disableIf ? r(n.formItem.disableIf, n.formItem) : !1), u = z(!0);
|
|
2276
2276
|
function c() {
|
|
2277
2277
|
return i.value;
|
|
2278
2278
|
}
|
|
2279
|
-
function d(
|
|
2280
|
-
u.value =
|
|
2279
|
+
function d(b) {
|
|
2280
|
+
u.value = b;
|
|
2281
2281
|
}
|
|
2282
2282
|
return t({
|
|
2283
2283
|
formItem: n.formItem,
|
|
2284
2284
|
getDisableFlag: c,
|
|
2285
2285
|
setBlockShowFlag: d
|
|
2286
|
-
}), (
|
|
2287
|
-
const S = F("t-divider"),
|
|
2286
|
+
}), (b, f) => {
|
|
2287
|
+
const S = F("t-divider"), E = F("t-form-item");
|
|
2288
2288
|
return v(), q("div", {
|
|
2289
2289
|
class: $(`${m(X)}__form-item`),
|
|
2290
2290
|
id: e.formItem.keyName ? e.formItem.keyName : e.formItem.name
|
|
@@ -2294,11 +2294,11 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2294
2294
|
key: 0,
|
|
2295
2295
|
align: "left"
|
|
2296
2296
|
}, {
|
|
2297
|
-
default:
|
|
2297
|
+
default: k(() => [
|
|
2298
2298
|
Q(ge(e.formItem.name), 1)
|
|
2299
2299
|
]),
|
|
2300
2300
|
_: 1
|
|
2301
|
-
})) : e.formItem.itemType !== "hidden" && m(l)(e.formItem.showIf, e.formItem) ? (v(), N(
|
|
2301
|
+
})) : e.formItem.itemType !== "hidden" && m(l)(e.formItem.showIf, e.formItem) ? (v(), N(E, {
|
|
2302
2302
|
key: 1,
|
|
2303
2303
|
ref: `item_${e.formItem.keyName}`,
|
|
2304
2304
|
id: e.formItem.keyName,
|
|
@@ -2306,8 +2306,8 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2306
2306
|
label: e.formItem.name,
|
|
2307
2307
|
name: e.formItem.inputType != "RE_PASSWORD" ? e.formItem.keyName : "rePassword"
|
|
2308
2308
|
}, {
|
|
2309
|
-
default:
|
|
2310
|
-
var
|
|
2309
|
+
default: k(() => {
|
|
2310
|
+
var _, h, y;
|
|
2311
2311
|
return [
|
|
2312
2312
|
e.formItem.itemType === "label" ? (v(), N(Uo, {
|
|
2313
2313
|
key: 0,
|
|
@@ -2316,11 +2316,11 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2316
2316
|
e.formItem.itemType === "text_input" && e.formItem.inputType != "RE_PASSWORD" ? (v(), N(kt, {
|
|
2317
2317
|
key: 1,
|
|
2318
2318
|
formItem: e.formItem,
|
|
2319
|
-
inputType: (
|
|
2319
|
+
inputType: (h = (_ = e.formItem) == null ? void 0 : _.inputType) == null ? void 0 : h.toLowerCase(),
|
|
2320
2320
|
modelValue: m(Z)(m(a), e.formItem.keyName),
|
|
2321
2321
|
placeholder: e.formItem.placeholder,
|
|
2322
2322
|
disabled: m(i),
|
|
2323
|
-
"onUpdate:modelValue": f[0] || (f[0] = (
|
|
2323
|
+
"onUpdate:modelValue": f[0] || (f[0] = (p) => s(e.formItem.keyName, p))
|
|
2324
2324
|
}, null, 8, ["formItem", "inputType", "modelValue", "placeholder", "disabled"])) : j("", !0),
|
|
2325
2325
|
e.formItem.itemType === "text_input" && e.formItem.inputType == "RE_PASSWORD" ? (v(), N(kt, {
|
|
2326
2326
|
key: 2,
|
|
@@ -2329,13 +2329,13 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2329
2329
|
modelValue: m(Z)(m(a), "rePassword"),
|
|
2330
2330
|
placeholder: e.formItem.placeholder,
|
|
2331
2331
|
disabled: m(i),
|
|
2332
|
-
"onUpdate:modelValue": f[1] || (f[1] = (
|
|
2332
|
+
"onUpdate:modelValue": f[1] || (f[1] = (p) => s("rePassword", p))
|
|
2333
2333
|
}, null, 8, ["formItem", "inputType", "modelValue", "placeholder", "disabled"])) : j("", !0),
|
|
2334
2334
|
e.formItem.itemType === "check_box" ? (v(), N(Ro, {
|
|
2335
2335
|
key: 3,
|
|
2336
2336
|
modelValue: m(Z)(m(a), e.formItem.keyName, !1),
|
|
2337
2337
|
disabled: m(i),
|
|
2338
|
-
"onUpdate:modelValue": f[2] || (f[2] = (
|
|
2338
|
+
"onUpdate:modelValue": f[2] || (f[2] = (p) => s(e.formItem.keyName, p))
|
|
2339
2339
|
}, null, 8, ["modelValue", "disabled"])) : j("", !0),
|
|
2340
2340
|
e.formItem.itemType === "switch" ? (v(), N(Ko, {
|
|
2341
2341
|
key: 4,
|
|
@@ -2343,7 +2343,7 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2343
2343
|
viewName: e.viewName,
|
|
2344
2344
|
modelValue: m(Z)(m(a), e.formItem.keyName, !1),
|
|
2345
2345
|
disabled: m(i),
|
|
2346
|
-
"onUpdate:modelValue": f[3] || (f[3] = (
|
|
2346
|
+
"onUpdate:modelValue": f[3] || (f[3] = (p) => s(e.formItem.keyName, p))
|
|
2347
2347
|
}, null, 8, ["formItem", "viewName", "modelValue", "disabled"])) : j("", !0),
|
|
2348
2348
|
e.formItem.itemType === "radio" ? (v(), N(Go, {
|
|
2349
2349
|
key: 5,
|
|
@@ -2351,7 +2351,7 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2351
2351
|
formItem: e.formItem,
|
|
2352
2352
|
viewName: e.viewName,
|
|
2353
2353
|
disabled: m(i),
|
|
2354
|
-
"onUpdate:modelValue": f[4] || (f[4] = (
|
|
2354
|
+
"onUpdate:modelValue": f[4] || (f[4] = (p) => s(e.formItem.keyName, p))
|
|
2355
2355
|
}, null, 8, ["modelValue", "formItem", "viewName", "disabled"])) : j("", !0),
|
|
2356
2356
|
e.formItem.itemType === "selector" || e.formItem.itemType === "multi_selector" ? (v(), N(Jt, {
|
|
2357
2357
|
key: e.formItem.listData.dataId,
|
|
@@ -2360,7 +2360,7 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2360
2360
|
viewName: e.viewName,
|
|
2361
2361
|
multiple: e.formItem.itemType === "multi_selector",
|
|
2362
2362
|
disabled: m(i),
|
|
2363
|
-
"onUpdate:modelValue": f[5] || (f[5] = (
|
|
2363
|
+
"onUpdate:modelValue": f[5] || (f[5] = (p) => s(e.formItem.keyName, p))
|
|
2364
2364
|
}, null, 8, ["modelValue", "formItem", "viewName", "multiple", "disabled"])) : j("", !0),
|
|
2365
2365
|
e.formItem.itemType === "date_selector" || e.formItem.itemType === "time_selector" || e.formItem.itemType === "date_time_selector" ? (v(), N(Yt, {
|
|
2366
2366
|
key: 7,
|
|
@@ -2368,7 +2368,7 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2368
2368
|
formItem: e.formItem,
|
|
2369
2369
|
viewName: e.viewName,
|
|
2370
2370
|
disabled: m(i),
|
|
2371
|
-
"onUpdate:modelValue": f[6] || (f[6] = (
|
|
2371
|
+
"onUpdate:modelValue": f[6] || (f[6] = (p) => s(e.formItem.keyName, p))
|
|
2372
2372
|
}, null, 8, ["modelValue", "formItem", "viewName", "disabled"])) : j("", !0),
|
|
2373
2373
|
e.formItem.itemType === "tree_check_box" ? (v(), N(jo, {
|
|
2374
2374
|
key: 8,
|
|
@@ -2376,7 +2376,7 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2376
2376
|
formItem: e.formItem,
|
|
2377
2377
|
viewName: e.viewName,
|
|
2378
2378
|
disabled: m(i),
|
|
2379
|
-
"onUpdate:modelValue": f[7] || (f[7] = (
|
|
2379
|
+
"onUpdate:modelValue": f[7] || (f[7] = (p) => s(e.formItem.keyName, p))
|
|
2380
2380
|
}, null, 8, ["modelValue", "formItem", "viewName", "disabled"])) : j("", !0),
|
|
2381
2381
|
e.formItem.itemType === "multi_tree_selector" || e.formItem.itemType === "tree_selector" ? (v(), N(Wo, {
|
|
2382
2382
|
key: 9,
|
|
@@ -2385,7 +2385,7 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2385
2385
|
viewName: e.viewName,
|
|
2386
2386
|
multiple: e.formItem.itemType === "multi_tree_selector",
|
|
2387
2387
|
disabled: m(i),
|
|
2388
|
-
"onUpdate:modelValue": f[8] || (f[8] = (
|
|
2388
|
+
"onUpdate:modelValue": f[8] || (f[8] = (p) => s(e.formItem.keyName, p))
|
|
2389
2389
|
}, null, 8, ["modelValue", "formItem", "viewName", "multiple", "disabled"])) : j("", !0),
|
|
2390
2390
|
e.formItem.itemType === "file" ? (v(), N(Ho, {
|
|
2391
2391
|
key: 10,
|
|
@@ -2393,9 +2393,9 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2393
2393
|
formItem: e.formItem,
|
|
2394
2394
|
viewName: e.viewName,
|
|
2395
2395
|
disabled: m(i),
|
|
2396
|
-
fileName: m(Z)(m(a), e.formItem.filenameKeyName) || ((
|
|
2397
|
-
"onUpdate:fileName": f[9] || (f[9] = (
|
|
2398
|
-
"onUpdate:modelValue": f[10] || (f[10] = (
|
|
2396
|
+
fileName: m(Z)(m(a), e.formItem.filenameKeyName) || ((y = m(Z)(m(a), e.formItem.keyName)) == null ? void 0 : y.split("/").slice(-1)[0]),
|
|
2397
|
+
"onUpdate:fileName": f[9] || (f[9] = (p) => e.formItem.filenameKeyName && s(e.formItem.filenameKeyName, p)),
|
|
2398
|
+
"onUpdate:modelValue": f[10] || (f[10] = (p) => s(e.formItem.keyName, p))
|
|
2399
2399
|
}, null, 8, ["modelValue", "formItem", "viewName", "disabled", "fileName"])) : j("", !0)
|
|
2400
2400
|
];
|
|
2401
2401
|
}),
|
|
@@ -2446,8 +2446,8 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2446
2446
|
emits: ["confirm-form", "confirm-and-close", "close-dialog"],
|
|
2447
2447
|
setup(e, { emit: t }) {
|
|
2448
2448
|
const o = e, n = D(() => {
|
|
2449
|
-
var
|
|
2450
|
-
return (
|
|
2449
|
+
var p;
|
|
2450
|
+
return (p = o.board) == null ? void 0 : p.formItems;
|
|
2451
2451
|
}), a = z({}), { handleItemShowIf: l } = qo({ formModel: a });
|
|
2452
2452
|
we(
|
|
2453
2453
|
() => o.formData,
|
|
@@ -2460,76 +2460,94 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2460
2460
|
}
|
|
2461
2461
|
);
|
|
2462
2462
|
const r = z(), s = D(() => {
|
|
2463
|
-
var
|
|
2464
|
-
return (
|
|
2463
|
+
var p;
|
|
2464
|
+
return (p = r.value) == null ? void 0 : p.tFormRef;
|
|
2465
2465
|
}), i = z(), u = z({}), c = ["userInfoNameEn", "cardNum", "attend", "userInfoRoleKey"];
|
|
2466
2466
|
async function d() {
|
|
2467
|
-
let
|
|
2468
|
-
return i.value && (
|
|
2469
|
-
const { formItem:
|
|
2470
|
-
return
|
|
2467
|
+
let p = [];
|
|
2468
|
+
return i.value && (p = i == null ? void 0 : i.value.map((g) => {
|
|
2469
|
+
const { formItem: T } = g, w = [];
|
|
2470
|
+
return T.required && T.keyName && w.push({
|
|
2471
2471
|
validator: () => {
|
|
2472
|
-
const
|
|
2473
|
-
return Po(
|
|
2472
|
+
const x = Z(a.value, T.keyName);
|
|
2473
|
+
return Po(x) ? {
|
|
2474
2474
|
result: !1,
|
|
2475
|
-
message: `${
|
|
2475
|
+
message: `${T.name.replace(/\s/g, "").replace(/[::;\s]/g, "")}为必填项!`
|
|
2476
2476
|
} : { result: !0 };
|
|
2477
2477
|
},
|
|
2478
2478
|
trigger: "blur"
|
|
2479
|
-
}),
|
|
2479
|
+
}), T.inputType === "RE_PASSWORD" && w.push({
|
|
2480
2480
|
validator: () => ({
|
|
2481
2481
|
result: Z(a.value, "password") === Z(a.value, "rePassword"),
|
|
2482
2482
|
message: "两次输入密码不一致!"
|
|
2483
2483
|
}),
|
|
2484
2484
|
trigger: "blur"
|
|
2485
|
-
}), (
|
|
2485
|
+
}), (T.keyName === "startTime" || T.keyName === "endTime") && w.push({
|
|
2486
2486
|
validator: () => ({
|
|
2487
2487
|
result: Z(a.value, "endTime") - Z(a.value, "startTime") > 0,
|
|
2488
2488
|
message: "结束时间不能早于开始时间!"
|
|
2489
2489
|
})
|
|
2490
2490
|
}), {
|
|
2491
|
-
keyName:
|
|
2492
|
-
rules:
|
|
2491
|
+
keyName: T.inputType !== "RE_PASSWORD" ? T.keyName : "rePassword",
|
|
2492
|
+
rules: w
|
|
2493
2493
|
};
|
|
2494
|
-
})),
|
|
2494
|
+
})), p == null ? void 0 : p.reduce((g, T) => (T.rules.length && (g[T.keyName] = T.rules), g), {});
|
|
2495
2495
|
}
|
|
2496
2496
|
et(async () => {
|
|
2497
2497
|
u.value = await d();
|
|
2498
2498
|
});
|
|
2499
|
-
function
|
|
2500
|
-
qe(a.value,
|
|
2501
|
-
}
|
|
2502
|
-
async function f(
|
|
2503
|
-
var
|
|
2504
|
-
const
|
|
2505
|
-
return (
|
|
2506
|
-
fields:
|
|
2499
|
+
function b(p, g) {
|
|
2500
|
+
qe(a.value, p, g), s.value && f([p]);
|
|
2501
|
+
}
|
|
2502
|
+
async function f(p = []) {
|
|
2503
|
+
var w;
|
|
2504
|
+
const g = S();
|
|
2505
|
+
return (p.length ? p.some((x) => g.includes(x)) : !0) ? (w = s.value) == null ? void 0 : w.validate({
|
|
2506
|
+
fields: p.length ? p : g
|
|
2507
2507
|
}) : Promise.resolve({});
|
|
2508
2508
|
}
|
|
2509
2509
|
const S = () => {
|
|
2510
|
-
var
|
|
2511
|
-
return (
|
|
2512
|
-
const { formItem:
|
|
2513
|
-
return (
|
|
2510
|
+
var p;
|
|
2511
|
+
return (p = i == null ? void 0 : i.value) == null ? void 0 : p.flatMap((g) => {
|
|
2512
|
+
const { formItem: T } = g;
|
|
2513
|
+
return (T.keyName ?? "") != "" && !c.includes(T.keyName) && !g.getDisableFlag() ? T.inputType !== "RE_PASSWORD" ? T.keyName : "rePassword" : [];
|
|
2514
2514
|
});
|
|
2515
|
-
},
|
|
2516
|
-
var
|
|
2517
|
-
return (
|
|
2518
|
-
}),
|
|
2519
|
-
var
|
|
2520
|
-
return (
|
|
2515
|
+
}, E = D(() => {
|
|
2516
|
+
var p;
|
|
2517
|
+
return (p = o.board) == null ? void 0 : p.okButton;
|
|
2518
|
+
}), _ = D(() => {
|
|
2519
|
+
var p;
|
|
2520
|
+
return (p = o.board) == null ? void 0 : p.cancelButton;
|
|
2521
2521
|
});
|
|
2522
|
-
function p
|
|
2523
|
-
|
|
2522
|
+
function h(p) {
|
|
2523
|
+
for (const g in p) {
|
|
2524
|
+
const T = p[g].find((w) => w.result === !1);
|
|
2525
|
+
if (T)
|
|
2526
|
+
return { ...T };
|
|
2527
|
+
}
|
|
2528
|
+
return null;
|
|
2529
|
+
}
|
|
2530
|
+
function y(p) {
|
|
2531
|
+
switch (p.action) {
|
|
2524
2532
|
case "CONFIRM": {
|
|
2525
|
-
f().then((
|
|
2526
|
-
Object.keys(
|
|
2533
|
+
f().then((g) => {
|
|
2534
|
+
if (!Object.keys(g).length)
|
|
2535
|
+
t("confirm-form", a.value, p.buttonId);
|
|
2536
|
+
else {
|
|
2537
|
+
const T = h(g);
|
|
2538
|
+
te.warning(T == null ? void 0 : T.message);
|
|
2539
|
+
}
|
|
2527
2540
|
});
|
|
2528
2541
|
break;
|
|
2529
2542
|
}
|
|
2530
2543
|
case "CONFIRM_AND_CLOSE": {
|
|
2531
|
-
f().then((
|
|
2532
|
-
Object.keys(
|
|
2544
|
+
f().then((g) => {
|
|
2545
|
+
if (!Object.keys(g).length)
|
|
2546
|
+
t("confirm-and-close", a.value, p.buttonId);
|
|
2547
|
+
else {
|
|
2548
|
+
const T = h(g);
|
|
2549
|
+
te.warning(T == null ? void 0 : T.message);
|
|
2550
|
+
}
|
|
2533
2551
|
});
|
|
2534
2552
|
break;
|
|
2535
2553
|
}
|
|
@@ -2538,13 +2556,13 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2538
2556
|
break;
|
|
2539
2557
|
}
|
|
2540
2558
|
default: {
|
|
2541
|
-
console.log(
|
|
2559
|
+
console.log(p);
|
|
2542
2560
|
break;
|
|
2543
2561
|
}
|
|
2544
2562
|
}
|
|
2545
2563
|
}
|
|
2546
|
-
return (
|
|
2547
|
-
const
|
|
2564
|
+
return (p, g) => {
|
|
2565
|
+
const T = F("t-button");
|
|
2548
2566
|
return v(), N(Bo, {
|
|
2549
2567
|
ref_key: "commonFormRef",
|
|
2550
2568
|
ref: r,
|
|
@@ -2555,54 +2573,54 @@ const aa = ["id"], la = /* @__PURE__ */ J({
|
|
|
2555
2573
|
labelWidth: "150px"
|
|
2556
2574
|
}
|
|
2557
2575
|
}, {
|
|
2558
|
-
body:
|
|
2559
|
-
(v(!0), q(ve, null, ye(m(n), (
|
|
2560
|
-
key: `${
|
|
2576
|
+
body: k(() => [
|
|
2577
|
+
(v(!0), q(ve, null, ye(m(n), (w) => (v(), q(ve, {
|
|
2578
|
+
key: `${w.name}_${w.keyName}`
|
|
2561
2579
|
}, [
|
|
2562
|
-
|
|
2580
|
+
w.itemType === "block_start" || w.itemType === "block_end" ? (v(), N(ia, {
|
|
2563
2581
|
key: 0,
|
|
2564
2582
|
ref_for: !0,
|
|
2565
2583
|
ref: "formBlockRef",
|
|
2566
|
-
name:
|
|
2567
|
-
blockType:
|
|
2568
|
-
showIf: m(l)(
|
|
2584
|
+
name: w.name,
|
|
2585
|
+
blockType: w.itemType,
|
|
2586
|
+
showIf: m(l)(w.showIf)
|
|
2569
2587
|
}, null, 8, ["name", "blockType", "showIf"])) : (v(), N(la, {
|
|
2570
2588
|
key: 1,
|
|
2571
2589
|
ref_for: !0,
|
|
2572
2590
|
ref_key: "formItemRef",
|
|
2573
2591
|
ref: i,
|
|
2574
2592
|
formModel: a.value,
|
|
2575
|
-
formItem:
|
|
2593
|
+
formItem: w,
|
|
2576
2594
|
viewName: e.viewName,
|
|
2577
|
-
onAfterUpdateValue:
|
|
2595
|
+
onAfterUpdateValue: b
|
|
2578
2596
|
}, null, 8, ["formModel", "formItem", "viewName"]))
|
|
2579
2597
|
], 64))), 128))
|
|
2580
2598
|
]),
|
|
2581
|
-
footer:
|
|
2582
|
-
var
|
|
2599
|
+
footer: k(() => {
|
|
2600
|
+
var w, x;
|
|
2583
2601
|
return [
|
|
2584
|
-
((
|
|
2602
|
+
((w = m(_)) == null ? void 0 : w.name) !== "" ? (v(), N(T, {
|
|
2585
2603
|
key: 0,
|
|
2586
2604
|
theme: "default",
|
|
2587
|
-
onClick:
|
|
2605
|
+
onClick: g[0] || (g[0] = (M) => m(_) && y(m(_)))
|
|
2588
2606
|
}, {
|
|
2589
|
-
default:
|
|
2590
|
-
var
|
|
2607
|
+
default: k(() => {
|
|
2608
|
+
var M;
|
|
2591
2609
|
return [
|
|
2592
|
-
Q(ge((
|
|
2610
|
+
Q(ge((M = m(_)) == null ? void 0 : M.name), 1)
|
|
2593
2611
|
];
|
|
2594
2612
|
}),
|
|
2595
2613
|
_: 1
|
|
2596
2614
|
})) : j("", !0),
|
|
2597
|
-
((
|
|
2615
|
+
((x = m(E)) == null ? void 0 : x.name) !== "" ? (v(), N(T, {
|
|
2598
2616
|
key: 1,
|
|
2599
2617
|
theme: "primary",
|
|
2600
|
-
onClick:
|
|
2618
|
+
onClick: g[1] || (g[1] = (M) => m(E) && y(m(E)))
|
|
2601
2619
|
}, {
|
|
2602
|
-
default:
|
|
2603
|
-
var
|
|
2620
|
+
default: k(() => {
|
|
2621
|
+
var M;
|
|
2604
2622
|
return [
|
|
2605
|
-
Q(ge((
|
|
2623
|
+
Q(ge((M = m(E)) == null ? void 0 : M.name), 1)
|
|
2606
2624
|
];
|
|
2607
2625
|
}),
|
|
2608
2626
|
_: 1
|
|
@@ -2844,10 +2862,10 @@ var Xe = {
|
|
|
2844
2862
|
l > u && (t.charCodeAt(n + d) === 47 ? c = d : d === 0 && (c = 0));
|
|
2845
2863
|
break;
|
|
2846
2864
|
}
|
|
2847
|
-
var
|
|
2848
|
-
if (
|
|
2865
|
+
var b = t.charCodeAt(n + d), f = o.charCodeAt(r + d);
|
|
2866
|
+
if (b !== f)
|
|
2849
2867
|
break;
|
|
2850
|
-
|
|
2868
|
+
b === 47 && (c = d);
|
|
2851
2869
|
}
|
|
2852
2870
|
var S = "";
|
|
2853
2871
|
for (d = n + c + 1; d <= a; ++d)
|
|
@@ -2973,7 +2991,7 @@ class fa {
|
|
|
2973
2991
|
function ha(e, {
|
|
2974
2992
|
filename: t = "",
|
|
2975
2993
|
extension: o = "",
|
|
2976
|
-
format:
|
|
2994
|
+
format: E,
|
|
2977
2995
|
page: a,
|
|
2978
2996
|
quality: l,
|
|
2979
2997
|
matte: r,
|
|
@@ -2981,40 +2999,40 @@ function ha(e, {
|
|
|
2981
2999
|
outline: i,
|
|
2982
3000
|
archive: f
|
|
2983
3001
|
} = {}) {
|
|
2984
|
-
var { fromMime: c, toMime: d, expected:
|
|
3002
|
+
var { fromMime: c, toMime: d, expected: b } = new fa(), f = f || "canvas", S = E || o.replace(/@\d+x$/i, "") || ma(t), E = c(d(S) || S), _ = d(E), h = e.length;
|
|
2985
3003
|
if (!S)
|
|
2986
3004
|
throw new Error(
|
|
2987
3005
|
"Cannot determine image format (use a filename extension or 'format' argument)"
|
|
2988
3006
|
);
|
|
2989
|
-
if (!
|
|
2990
|
-
throw new Error(`Unsupported file format "${S}" (expected ${
|
|
2991
|
-
if (!
|
|
3007
|
+
if (!E)
|
|
3008
|
+
throw new Error(`Unsupported file format "${S}" (expected ${b})`);
|
|
3009
|
+
if (!h)
|
|
2992
3010
|
throw new RangeError(
|
|
2993
3011
|
"Canvas has no associated contexts (try calling getContext or newPage first)"
|
|
2994
3012
|
);
|
|
2995
|
-
let
|
|
2996
|
-
if (isFinite(
|
|
3013
|
+
let y, p, g = t.replace(/{(\d*)}/g, (w, x) => (p = !0, x = parseInt(x, 10), y = isFinite(x) ? x : isFinite(y) ? y : -1, "{}")), T = a > 0 ? a - 1 : a < 0 ? h + a : void 0;
|
|
3014
|
+
if (isFinite(T) && T < 0 || T >= h)
|
|
2997
3015
|
throw new RangeError(
|
|
2998
|
-
|
|
3016
|
+
h == 1 ? `Canvas only has a ‘page 1’ (${T} is out of bounds)` : `Canvas has pages 1–${h} (${T} is out of bounds)`
|
|
2999
3017
|
);
|
|
3000
|
-
if (e = isFinite(
|
|
3018
|
+
if (e = isFinite(T) ? [e[T]] : p || E == "pdf" ? e : e.slice(-1), l === void 0)
|
|
3001
3019
|
l = 0.92;
|
|
3002
3020
|
else if (typeof l != "number" || !isFinite(l) || l < 0 || l > 1)
|
|
3003
3021
|
throw new TypeError(
|
|
3004
3022
|
"The quality option must be an number in the 0.0–1.0 range"
|
|
3005
3023
|
);
|
|
3006
3024
|
if (s === void 0) {
|
|
3007
|
-
let
|
|
3008
|
-
s =
|
|
3025
|
+
let w = (o || $o(t, S)).match(/@(\d+)x$/i);
|
|
3026
|
+
s = w ? parseInt(w[1], 10) : 1;
|
|
3009
3027
|
} else if (typeof s != "number" || !Number.isInteger(s) || s < 1)
|
|
3010
3028
|
throw new TypeError("The density option must be a non-negative integer");
|
|
3011
|
-
return i === void 0 ? i = !0 :
|
|
3029
|
+
return i === void 0 ? i = !0 : E == "svg" && (i = !!i), {
|
|
3012
3030
|
filename: t,
|
|
3013
3031
|
pattern: g,
|
|
3014
|
-
format:
|
|
3015
|
-
mime:
|
|
3032
|
+
format: E,
|
|
3033
|
+
mime: _,
|
|
3016
3034
|
pages: e,
|
|
3017
|
-
padding:
|
|
3035
|
+
padding: y,
|
|
3018
3036
|
quality: l,
|
|
3019
3037
|
matte: r,
|
|
3020
3038
|
density: s,
|
|
@@ -3086,7 +3104,7 @@ class At {
|
|
|
3086
3104
|
}
|
|
3087
3105
|
toBuffer() {
|
|
3088
3106
|
let t = this.files.reduce(
|
|
3089
|
-
(d, { name:
|
|
3107
|
+
(d, { name: b }) => 46 + b.length + d,
|
|
3090
3108
|
0
|
|
3091
3109
|
), o = Ut(t + 22), n = 0;
|
|
3092
3110
|
for (var { offset: a, name: l, header: r, folder: s } of this.files)
|
|
@@ -3114,8 +3132,8 @@ const eo = (e, t, o, n) => {
|
|
|
3114
3132
|
let s = (c) => l.replace("{}", String(c + 1).padStart(r, "0")), i = $o(a, ".zip") || "archive", u = new At(i);
|
|
3115
3133
|
await Promise.all(
|
|
3116
3134
|
e.map(async (c, d) => {
|
|
3117
|
-
let
|
|
3118
|
-
await u.add(
|
|
3135
|
+
let b = s(d);
|
|
3136
|
+
await u.add(b, await eo(c, t, o, n));
|
|
3119
3137
|
})
|
|
3120
3138
|
), Xo(`${i}.zip`, u.blob);
|
|
3121
3139
|
}, Xo = (e, t) => {
|
|
@@ -3162,27 +3180,27 @@ let Ta = class {
|
|
|
3162
3180
|
},
|
|
3163
3181
|
saveAs(s, i) {
|
|
3164
3182
|
i = typeof i == "number" ? { quality: i } : i;
|
|
3165
|
-
let u = Gt(this.pages, { filename: s, ...i }), { pattern: c, padding: d, mime:
|
|
3166
|
-
return d == null ? wa(
|
|
3167
|
-
|
|
3168
|
-
|
|
3183
|
+
let u = Gt(this.pages, { filename: s, ...i }), { pattern: c, padding: d, mime: b, quality: f, matte: S, density: E, archive: _ } = u, h = Kt(u.pages, E);
|
|
3184
|
+
return d == null ? wa(h[0], b, f, S, s) : ka(
|
|
3185
|
+
h,
|
|
3186
|
+
b,
|
|
3169
3187
|
f,
|
|
3170
3188
|
S,
|
|
3171
|
-
|
|
3189
|
+
_,
|
|
3172
3190
|
c,
|
|
3173
3191
|
d
|
|
3174
3192
|
);
|
|
3175
3193
|
},
|
|
3176
3194
|
toBuffer(s = "png", i = {}) {
|
|
3177
3195
|
i = typeof i == "number" ? { quality: i } : i;
|
|
3178
|
-
let u = Gt(this.pages, { extension: s, ...i }), { mime: c, quality: d, matte:
|
|
3179
|
-
return Rt(
|
|
3196
|
+
let u = Gt(this.pages, { extension: s, ...i }), { mime: c, quality: d, matte: b, pages: f, density: S } = u, E = Kt(f, S, b)[0];
|
|
3197
|
+
return Rt(E, c, d, b);
|
|
3180
3198
|
},
|
|
3181
3199
|
[po]: n.toDataURL.bind(n),
|
|
3182
3200
|
toDataURL(s = "png", i = {}) {
|
|
3183
3201
|
i = typeof i == "number" ? { quality: i } : i;
|
|
3184
|
-
let u = Gt(this.pages, { extension: s, ...i }), { mime: c, quality: d, matte:
|
|
3185
|
-
return Promise.resolve(
|
|
3202
|
+
let u = Gt(this.pages, { extension: s, ...i }), { mime: c, quality: d, matte: b, pages: f, density: S } = u, E = Kt(f, S, b)[0], _ = E[E === n ? po : "toDataURL"](c, d);
|
|
3203
|
+
return Promise.resolve(_);
|
|
3186
3204
|
}
|
|
3187
3205
|
});
|
|
3188
3206
|
}
|
|
@@ -3400,8 +3418,8 @@ const Da = Ze(
|
|
|
3400
3418
|
}
|
|
3401
3419
|
], Ga = (e, t) => {
|
|
3402
3420
|
const o = new Array(e.length), n = e.length / t, a = function(c, d) {
|
|
3403
|
-
const
|
|
3404
|
-
o.splice.apply(o, [c * t, t].concat(
|
|
3421
|
+
const b = e.slice(d * t, (d + 1) * t);
|
|
3422
|
+
o.splice.apply(o, [c * t, t].concat(b));
|
|
3405
3423
|
}, l = [0, 4, 2, 1], r = [8, 8, 4, 2];
|
|
3406
3424
|
for (var s = 0, i = 0; i < 4; i++)
|
|
3407
3425
|
for (var u = l[i]; u < n; u += r[i])
|
|
@@ -3409,36 +3427,36 @@ const Da = Ze(
|
|
|
3409
3427
|
return o;
|
|
3410
3428
|
}, ja = (e, t, o) => {
|
|
3411
3429
|
const l = o;
|
|
3412
|
-
var r, s, i, u, c, d,
|
|
3413
|
-
const
|
|
3414
|
-
for (
|
|
3415
|
-
|
|
3416
|
-
var g,
|
|
3417
|
-
for (g =
|
|
3418
|
-
if (
|
|
3419
|
-
if (
|
|
3420
|
-
g += t[W] <<
|
|
3430
|
+
var r, s, i, u, c, d, b, T, f, S, g, E, w, x, W, M;
|
|
3431
|
+
const _ = new Array(o), h = new Array(4096), y = new Array(4096), p = new Array(4096 + 1);
|
|
3432
|
+
for (E = e, s = 1 << E, c = s + 1, r = s + 2, b = -1, u = E + 1, i = (1 << u) - 1, f = 0; f < s; f++)
|
|
3433
|
+
h[f] = 0, y[f] = f;
|
|
3434
|
+
var g, T, w, x, M, W;
|
|
3435
|
+
for (g = T = w = x = M = W = 0, S = 0; S < l; ) {
|
|
3436
|
+
if (x === 0) {
|
|
3437
|
+
if (T < u) {
|
|
3438
|
+
g += t[W] << T, T += 8, W++;
|
|
3421
3439
|
continue;
|
|
3422
3440
|
}
|
|
3423
|
-
if (f = g & i, g >>= u,
|
|
3441
|
+
if (f = g & i, g >>= u, T -= u, f > r || f == c)
|
|
3424
3442
|
break;
|
|
3425
3443
|
if (f == s) {
|
|
3426
|
-
u =
|
|
3444
|
+
u = E + 1, i = (1 << u) - 1, r = s + 2, b = -1;
|
|
3427
3445
|
continue;
|
|
3428
3446
|
}
|
|
3429
|
-
if (
|
|
3430
|
-
|
|
3447
|
+
if (b == -1) {
|
|
3448
|
+
p[x++] = y[f], b = f, w = f;
|
|
3431
3449
|
continue;
|
|
3432
3450
|
}
|
|
3433
|
-
for (d = f, f == r && (
|
|
3434
|
-
|
|
3435
|
-
|
|
3451
|
+
for (d = f, f == r && (p[x++] = w, f = b); f > s; )
|
|
3452
|
+
p[x++] = y[f], f = h[f];
|
|
3453
|
+
w = y[f] & 255, p[x++] = w, r < 4096 && (h[r] = b, y[r] = w, r++, !(r & i) && r < 4096 && (u++, i += r)), b = d;
|
|
3436
3454
|
}
|
|
3437
|
-
|
|
3455
|
+
x--, _[M++] = p[x], S++;
|
|
3438
3456
|
}
|
|
3439
|
-
for (S =
|
|
3440
|
-
|
|
3441
|
-
return
|
|
3457
|
+
for (S = M; S < l; S++)
|
|
3458
|
+
_[S] = 0;
|
|
3459
|
+
return _;
|
|
3442
3460
|
}, Wa = (e) => {
|
|
3443
3461
|
const t = new Uint8Array(e);
|
|
3444
3462
|
return rt(Ba(t), Ka);
|
|
@@ -3668,24 +3686,24 @@ class He {
|
|
|
3668
3686
|
for (var u = 0; u < r[i].length; u++)
|
|
3669
3687
|
r[i][u] = 255 & t.buffer[u + n];
|
|
3670
3688
|
n += f;
|
|
3671
|
-
const
|
|
3672
|
-
s[i] = new Array(
|
|
3689
|
+
const E = se.getErrorCorrectPolynomial(S), h = new Ye(r[i], E.getLength() - 1).mod(E);
|
|
3690
|
+
s[i] = new Array(E.getLength() - 1);
|
|
3673
3691
|
for (var u = 0; u < s[i].length; u++) {
|
|
3674
|
-
const
|
|
3675
|
-
s[i][u] =
|
|
3692
|
+
const p = u + h.getLength() - s[i].length;
|
|
3693
|
+
s[i][u] = p >= 0 ? h.get(p) : 0;
|
|
3676
3694
|
}
|
|
3677
3695
|
}
|
|
3678
3696
|
let c = 0;
|
|
3679
3697
|
for (var u = 0; u < o.length; u++)
|
|
3680
3698
|
c += o[u].totalCount;
|
|
3681
3699
|
const d = new Array(c);
|
|
3682
|
-
let
|
|
3700
|
+
let b = 0;
|
|
3683
3701
|
for (var u = 0; u < a; u++)
|
|
3684
3702
|
for (var i = 0; i < o.length; i++)
|
|
3685
|
-
u < r[i].length && (d[
|
|
3703
|
+
u < r[i].length && (d[b++] = r[i][u]);
|
|
3686
3704
|
for (var u = 0; u < l; u++)
|
|
3687
3705
|
for (var i = 0; i < o.length; i++)
|
|
3688
|
-
u < s[i].length && (d[
|
|
3706
|
+
u < s[i].length && (d[b++] = s[i][u]);
|
|
3689
3707
|
return d;
|
|
3690
3708
|
}
|
|
3691
3709
|
}
|
|
@@ -4190,72 +4208,72 @@ function il(e, t) {
|
|
|
4190
4208
|
var o, n, a, l, r;
|
|
4191
4209
|
function s() {
|
|
4192
4210
|
o = [], n = new Int32Array(256), a = new Int32Array(be), l = new Int32Array(be), r = new Int32Array(be >> 3);
|
|
4193
|
-
var
|
|
4194
|
-
for (
|
|
4195
|
-
|
|
4211
|
+
var h, y;
|
|
4212
|
+
for (h = 0; h < be; h++)
|
|
4213
|
+
y = (h << We + 8) / be, o[h] = new Float64Array([y, y, y, 0]), l[h] = oo / be, a[h] = 0;
|
|
4196
4214
|
}
|
|
4197
4215
|
function i() {
|
|
4198
|
-
for (var
|
|
4199
|
-
o[
|
|
4200
|
-
}
|
|
4201
|
-
function u(
|
|
4202
|
-
o[
|
|
4203
|
-
}
|
|
4204
|
-
function c(
|
|
4205
|
-
for (var
|
|
4206
|
-
ne = r[
|
|
4207
|
-
}
|
|
4208
|
-
function d(
|
|
4209
|
-
var g = 2147483647,
|
|
4210
|
-
for (
|
|
4211
|
-
W = o[
|
|
4212
|
-
return l[
|
|
4213
|
-
}
|
|
4214
|
-
function
|
|
4215
|
-
var
|
|
4216
|
-
for (
|
|
4217
|
-
for (
|
|
4218
|
-
g = o[
|
|
4219
|
-
if (g = o[
|
|
4220
|
-
for (n[
|
|
4221
|
-
n[
|
|
4222
|
-
|
|
4216
|
+
for (var h = 0; h < be; h++)
|
|
4217
|
+
o[h][0] >>= We, o[h][1] >>= We, o[h][2] >>= We, o[h][3] = h;
|
|
4218
|
+
}
|
|
4219
|
+
function u(h, y, p, g, T) {
|
|
4220
|
+
o[y][0] -= h * (o[y][0] - p) / mt, o[y][1] -= h * (o[y][1] - g) / mt, o[y][2] -= h * (o[y][2] - T) / mt;
|
|
4221
|
+
}
|
|
4222
|
+
function c(h, y, p, g, T) {
|
|
4223
|
+
for (var w = Math.abs(y - h), x = Math.min(y + h, be), M = y + 1, W = y - 1, oe = 1, C, ne; M < x || W > w; )
|
|
4224
|
+
ne = r[oe++], M < x && (C = o[M++], C[0] -= ne * (C[0] - p) / Je, C[1] -= ne * (C[1] - g) / Je, C[2] -= ne * (C[2] - T) / Je), W > w && (C = o[W--], C[0] -= ne * (C[0] - p) / Je, C[1] -= ne * (C[1] - g) / Je, C[2] -= ne * (C[2] - T) / Je);
|
|
4225
|
+
}
|
|
4226
|
+
function d(h, y, p) {
|
|
4227
|
+
var g = 2147483647, T = g, w = -1, x = w, M, W, oe, C, ne;
|
|
4228
|
+
for (M = 0; M < be; M++)
|
|
4229
|
+
W = o[M], oe = Math.abs(W[0] - h) + Math.abs(W[1] - y) + Math.abs(W[2] - p), oe < g && (g = oe, w = M), C = oe - (a[M] >> en - We), C < T && (T = C, x = M), ne = l[M] >> no, l[M] -= ne, a[M] += ne << tn;
|
|
4230
|
+
return l[w] += Ya, a[w] -= el, x;
|
|
4231
|
+
}
|
|
4232
|
+
function b() {
|
|
4233
|
+
var h, y, p, g, T, w, x = 0, M = 0;
|
|
4234
|
+
for (h = 0; h < be; h++) {
|
|
4235
|
+
for (p = o[h], T = h, w = p[1], y = h + 1; y < be; y++)
|
|
4236
|
+
g = o[y], g[1] < w && (T = y, w = g[1]);
|
|
4237
|
+
if (g = o[T], h != T && (y = g[0], g[0] = p[0], p[0] = y, y = g[1], g[1] = p[1], p[1] = y, y = g[2], g[2] = p[2], p[2] = y, y = g[3], g[3] = p[3], p[3] = y), w != x) {
|
|
4238
|
+
for (n[x] = M + h >> 1, y = x + 1; y < w; y++)
|
|
4239
|
+
n[y] = h;
|
|
4240
|
+
x = w, M = h;
|
|
4223
4241
|
}
|
|
4224
4242
|
}
|
|
4225
|
-
for (n[
|
|
4226
|
-
n[
|
|
4243
|
+
for (n[x] = M + go >> 1, y = x + 1; y < 256; y++)
|
|
4244
|
+
n[y] = go;
|
|
4227
4245
|
}
|
|
4228
|
-
function f(
|
|
4229
|
-
for (var g,
|
|
4230
|
-
W < be && (
|
|
4231
|
-
return
|
|
4246
|
+
function f(h, y, p) {
|
|
4247
|
+
for (var g, T, w, x = 1e3, M = -1, W = n[y], oe = W - 1; W < be || oe >= 0; )
|
|
4248
|
+
W < be && (T = o[W], w = T[1] - y, w >= x ? W = be : (W++, w < 0 && (w = -w), g = T[0] - h, g < 0 && (g = -g), w += g, w < x && (g = T[2] - p, g < 0 && (g = -g), w += g, w < x && (x = w, M = T[3])))), oe >= 0 && (T = o[oe], w = y - T[1], w >= x ? oe = -1 : (oe--, w < 0 && (w = -w), g = T[0] - h, g < 0 && (g = -g), w += g, w < x && (g = T[2] - p, g < 0 && (g = -g), w += g, w < x && (x = w, M = T[3]))));
|
|
4249
|
+
return M;
|
|
4232
4250
|
}
|
|
4233
4251
|
function S() {
|
|
4234
|
-
var
|
|
4235
|
-
for (
|
|
4236
|
-
r[
|
|
4252
|
+
var h, y = e.length, p = 30 + (t - 1) / 3, g = y / (3 * t), T = ~~(g / Ja), w = mt, x = nl, M = x >> qt;
|
|
4253
|
+
for (M <= 1 && (M = 0), h = 0; h < M; h++)
|
|
4254
|
+
r[h] = w * ((M * M - h * h) * vo / (M * M));
|
|
4237
4255
|
var W;
|
|
4238
|
-
|
|
4239
|
-
var
|
|
4240
|
-
for (
|
|
4241
|
-
if (
|
|
4242
|
-
for (
|
|
4243
|
-
r[O] =
|
|
4244
|
-
}
|
|
4245
|
-
function
|
|
4246
|
-
s(), S(), i(),
|
|
4247
|
-
}
|
|
4248
|
-
this.buildColormap =
|
|
4249
|
-
function
|
|
4250
|
-
for (var
|
|
4251
|
-
|
|
4252
|
-
for (var g = 0,
|
|
4253
|
-
var
|
|
4254
|
-
|
|
4255
|
-
}
|
|
4256
|
-
return
|
|
4257
|
-
}
|
|
4258
|
-
this.getColormap =
|
|
4256
|
+
y < rl ? (t = 1, W = 3) : y % bo !== 0 ? W = 3 * bo : y % yo !== 0 ? W = 3 * yo : y % wo !== 0 ? W = 3 * wo : W = 3 * an;
|
|
4257
|
+
var oe, C, ne, O, ee = 0;
|
|
4258
|
+
for (h = 0; h < g; )
|
|
4259
|
+
if (oe = (e[ee] & 255) << We, C = (e[ee + 1] & 255) << We, ne = (e[ee + 2] & 255) << We, O = d(oe, C, ne), u(w, O, oe, C, ne), M !== 0 && c(M, O, oe, C, ne), ee += W, ee >= y && (ee -= y), h++, T === 0 && (T = 1), h % T === 0)
|
|
4260
|
+
for (w -= w / p, x -= x / al, M = x >> qt, M <= 1 && (M = 0), O = 0; O < M; O++)
|
|
4261
|
+
r[O] = w * ((M * M - O * O) * vo / (M * M));
|
|
4262
|
+
}
|
|
4263
|
+
function E() {
|
|
4264
|
+
s(), S(), i(), b();
|
|
4265
|
+
}
|
|
4266
|
+
this.buildColormap = E;
|
|
4267
|
+
function _() {
|
|
4268
|
+
for (var h = [], y = [], p = 0; p < be; p++)
|
|
4269
|
+
y[o[p][3]] = p;
|
|
4270
|
+
for (var g = 0, T = 0; T < be; T++) {
|
|
4271
|
+
var w = y[T];
|
|
4272
|
+
h[g++] = o[w][0], h[g++] = o[w][1], h[g++] = o[w][2];
|
|
4273
|
+
}
|
|
4274
|
+
return h;
|
|
4275
|
+
}
|
|
4276
|
+
this.getColormap = _, this.lookupRGB = f;
|
|
4259
4277
|
}
|
|
4260
4278
|
var ko = -1, ft = 12, at = 5003, sl = [
|
|
4261
4279
|
0,
|
|
@@ -4277,66 +4295,66 @@ var ko = -1, ft = 12, at = 5003, sl = [
|
|
|
4277
4295
|
65535
|
|
4278
4296
|
];
|
|
4279
4297
|
function ul(e, t, o, n) {
|
|
4280
|
-
var a = Math.max(2, n), l = new Uint8Array(256), r = new Int32Array(at), s = new Int32Array(at), i, u = 0, c, d = 0,
|
|
4298
|
+
var a = Math.max(2, n), l = new Uint8Array(256), r = new Int32Array(at), s = new Int32Array(at), i, u = 0, c, d = 0, b, f = !1, S, E, _, h, y, p;
|
|
4281
4299
|
function g(O, ee) {
|
|
4282
4300
|
l[c++] = O, c >= 254 && W(ee);
|
|
4283
4301
|
}
|
|
4284
|
-
function x(O) {
|
|
4285
|
-
T(at), d = A + 2, f = !0, ne(A, O);
|
|
4286
|
-
}
|
|
4287
4302
|
function T(O) {
|
|
4303
|
+
w(at), d = E + 2, f = !0, ne(E, O);
|
|
4304
|
+
}
|
|
4305
|
+
function w(O) {
|
|
4288
4306
|
for (var ee = 0; ee < O; ++ee)
|
|
4289
4307
|
r[ee] = -1;
|
|
4290
4308
|
}
|
|
4291
|
-
function
|
|
4292
|
-
var L, Ae, ue, Ce, Ve,
|
|
4293
|
-
for (S = O, f = !1,
|
|
4309
|
+
function x(O, ee) {
|
|
4310
|
+
var L, Ae, ue, Ce, Ve, I, U;
|
|
4311
|
+
for (S = O, f = !1, p = S, b = oe(p), E = 1 << O - 1, _ = E + 1, d = E + 2, c = 0, Ce = C(), U = 0, L = at; L < 65536; L *= 2)
|
|
4294
4312
|
++U;
|
|
4295
|
-
U = 8 - U,
|
|
4313
|
+
U = 8 - U, I = at, w(I), ne(E, ee);
|
|
4296
4314
|
e:
|
|
4297
|
-
for (; (Ae =
|
|
4315
|
+
for (; (Ae = C()) != ko; ) {
|
|
4298
4316
|
if (L = (Ae << ft) + Ce, ue = Ae << U ^ Ce, r[ue] === L) {
|
|
4299
4317
|
Ce = s[ue];
|
|
4300
4318
|
continue;
|
|
4301
4319
|
} else if (r[ue] >= 0) {
|
|
4302
|
-
Ve =
|
|
4320
|
+
Ve = I - ue, ue === 0 && (Ve = 1);
|
|
4303
4321
|
do
|
|
4304
|
-
if ((ue -= Ve) < 0 && (ue +=
|
|
4322
|
+
if ((ue -= Ve) < 0 && (ue += I), r[ue] === L) {
|
|
4305
4323
|
Ce = s[ue];
|
|
4306
4324
|
continue e;
|
|
4307
4325
|
}
|
|
4308
4326
|
while (r[ue] >= 0);
|
|
4309
4327
|
}
|
|
4310
|
-
ne(Ce, ee), Ce = Ae, d < 1 << ft ? (s[ue] = d++, r[ue] = L) :
|
|
4328
|
+
ne(Ce, ee), Ce = Ae, d < 1 << ft ? (s[ue] = d++, r[ue] = L) : T(ee);
|
|
4311
4329
|
}
|
|
4312
|
-
ne(Ce, ee), ne(
|
|
4330
|
+
ne(Ce, ee), ne(_, ee);
|
|
4313
4331
|
}
|
|
4314
|
-
function
|
|
4315
|
-
O.writeByte(a),
|
|
4332
|
+
function M(O) {
|
|
4333
|
+
O.writeByte(a), h = e * t, y = 0, x(a + 1, O), O.writeByte(0);
|
|
4316
4334
|
}
|
|
4317
4335
|
function W(O) {
|
|
4318
4336
|
c > 0 && (O.writeByte(c), O.writeBytes(l, 0, c), c = 0);
|
|
4319
4337
|
}
|
|
4320
|
-
function
|
|
4338
|
+
function oe(O) {
|
|
4321
4339
|
return (1 << O) - 1;
|
|
4322
4340
|
}
|
|
4323
|
-
function
|
|
4324
|
-
if (
|
|
4341
|
+
function C() {
|
|
4342
|
+
if (h === 0)
|
|
4325
4343
|
return ko;
|
|
4326
|
-
--
|
|
4327
|
-
var O = o[
|
|
4344
|
+
--h;
|
|
4345
|
+
var O = o[y++];
|
|
4328
4346
|
return O & 255;
|
|
4329
4347
|
}
|
|
4330
4348
|
function ne(O, ee) {
|
|
4331
|
-
for (i &= sl[u], u > 0 ? i |= O << u : i = O, u +=
|
|
4349
|
+
for (i &= sl[u], u > 0 ? i |= O << u : i = O, u += p; u >= 8; )
|
|
4332
4350
|
g(i & 255, ee), i >>= 8, u -= 8;
|
|
4333
|
-
if ((d >
|
|
4351
|
+
if ((d > b || f) && (f ? (b = oe(p = S), f = !1) : (++p, p == ft ? b = 1 << ft : b = oe(p))), O == _) {
|
|
4334
4352
|
for (; u > 0; )
|
|
4335
4353
|
g(i & 255, ee), i >>= 8, u -= 8;
|
|
4336
4354
|
W(ee);
|
|
4337
4355
|
}
|
|
4338
4356
|
}
|
|
4339
|
-
this.encode =
|
|
4357
|
+
this.encode = M;
|
|
4340
4358
|
}
|
|
4341
4359
|
function xe() {
|
|
4342
4360
|
this.page = -1, this.pages = [], this.newPage();
|
|
@@ -4470,13 +4488,13 @@ ce.prototype.ditherPixels = function(e, t) {
|
|
|
4470
4488
|
t && (i = i * -1);
|
|
4471
4489
|
for (var c = i == 1 ? 0 : r - 1, d = i == 1 ? r : 0; c !== d; c += i) {
|
|
4472
4490
|
a = u * r + c;
|
|
4473
|
-
var
|
|
4474
|
-
|
|
4475
|
-
for (var
|
|
4476
|
-
var
|
|
4477
|
-
if (
|
|
4478
|
-
var
|
|
4479
|
-
|
|
4491
|
+
var b = a * 3, f = s[b], S = s[b + 1], E = s[b + 2];
|
|
4492
|
+
b = this.findClosestRGB(f, S, E), this.usedEntry[b] = !0, this.indexedPixels[a] = b, b *= 3;
|
|
4493
|
+
for (var _ = this.colorTab[b], h = this.colorTab[b + 1], y = this.colorTab[b + 2], p = f - _, g = S - h, T = E - y, w = i == 1 ? 0 : n.length - 1, x = i == 1 ? n.length : 0; w !== x; w += i) {
|
|
4494
|
+
var M = n[w][1], W = n[w][2];
|
|
4495
|
+
if (M + c >= 0 && M + c < r && W + u >= 0 && W + u < l) {
|
|
4496
|
+
var oe = n[w][0];
|
|
4497
|
+
b = a + M + W * r, b *= 3, s[b] = Math.max(0, Math.min(255, s[b] + p * oe)), s[b + 1] = Math.max(0, Math.min(255, s[b + 1] + g * oe)), s[b + 2] = Math.max(0, Math.min(255, s[b + 2] + T * oe));
|
|
4480
4498
|
}
|
|
4481
4499
|
}
|
|
4482
4500
|
}
|
|
@@ -4491,8 +4509,8 @@ ce.prototype.findClosestRGB = function(e, t, o, n) {
|
|
|
4491
4509
|
if (this.neuQuant && !n)
|
|
4492
4510
|
return this.neuQuant.lookupRGB(e, t, o);
|
|
4493
4511
|
for (var a = 0, l = 256 * 256 * 256, r = this.colorTab.length, s = 0, i = 0; s < r; i++) {
|
|
4494
|
-
var u = e - (this.colorTab[s++] & 255), c = t - (this.colorTab[s++] & 255), d = o - (this.colorTab[s++] & 255),
|
|
4495
|
-
(!n || this.usedEntry[i]) &&
|
|
4512
|
+
var u = e - (this.colorTab[s++] & 255), c = t - (this.colorTab[s++] & 255), d = o - (this.colorTab[s++] & 255), b = u * u + c * c + d * d;
|
|
4513
|
+
(!n || this.usedEntry[i]) && b < l && (l = b, a = i);
|
|
4496
4514
|
}
|
|
4497
4515
|
return a;
|
|
4498
4516
|
};
|
|
@@ -4672,24 +4690,24 @@ class ae {
|
|
|
4672
4690
|
})), t.fillStyle = u;
|
|
4673
4691
|
}
|
|
4674
4692
|
_draw() {
|
|
4675
|
-
var t, o, n, a, l, r, s, i, u, c, d,
|
|
4693
|
+
var t, o, n, a, l, r, s, i, u, c, d, b, f, S, E, _, h, y, p;
|
|
4676
4694
|
return cl(this, void 0, void 0, function* () {
|
|
4677
|
-
const g = (t = this.qrCode) === null || t === void 0 ? void 0 : t.moduleCount,
|
|
4678
|
-
let
|
|
4679
|
-
(
|
|
4680
|
-
const
|
|
4681
|
-
this._clear(), L.save(), L.translate(
|
|
4695
|
+
const g = (t = this.qrCode) === null || t === void 0 ? void 0 : t.moduleCount, T = this.options.size;
|
|
4696
|
+
let w = this.options.margin;
|
|
4697
|
+
(w < 0 || w * 2 >= T) && (w = 0);
|
|
4698
|
+
const x = Math.ceil(w), M = T - 2 * w, W = this.options.whiteMargin, oe = this.options.backgroundDimming, C = Math.ceil(M / g), ne = C * g, O = ne + 2 * x, ee = new Ue(O, O), L = ee.getContext("2d");
|
|
4699
|
+
this._clear(), L.save(), L.translate(x, x);
|
|
4682
4700
|
const Ae = new Ue(O, O), ue = Ae.getContext("2d");
|
|
4683
4701
|
let Ce = null, Ve = [];
|
|
4684
4702
|
if (this.options.gifBackground) {
|
|
4685
4703
|
const B = Wa(this.options.gifBackground);
|
|
4686
4704
|
if (Ce = B, Ve = za(B, !0), this.options.autoColor) {
|
|
4687
|
-
let K = 0,
|
|
4705
|
+
let K = 0, P = 0, H = 0, de = 0;
|
|
4688
4706
|
for (let fe = 0; fe < Ve[0].colorTable.length; fe++) {
|
|
4689
4707
|
const he = Ve[0].colorTable[fe];
|
|
4690
|
-
he[0] > 200 || he[1] > 200 || he[2] > 200 || he[0] === 0 && he[1] === 0 && he[2] === 0 || (de++, K += he[0],
|
|
4708
|
+
he[0] > 200 || he[1] > 200 || he[2] > 200 || he[0] === 0 && he[1] === 0 && he[2] === 0 || (de++, K += he[0], P += he[1], H += he[2]);
|
|
4691
4709
|
}
|
|
4692
|
-
K = ~~(K / de),
|
|
4710
|
+
K = ~~(K / de), P = ~~(P / de), H = ~~(H / de), this.options.colorDark = `rgb(${K},${P},${H})`;
|
|
4693
4711
|
}
|
|
4694
4712
|
} else if (this.options.backgroundImage) {
|
|
4695
4713
|
const B = yield Co(this.options.backgroundImage);
|
|
@@ -4697,74 +4715,74 @@ class ae {
|
|
|
4697
4715
|
const K = ae._getAverageRGB(B);
|
|
4698
4716
|
this.options.colorDark = `rgb(${K.r},${K.g},${K.b})`;
|
|
4699
4717
|
}
|
|
4700
|
-
ue.drawImage(B, 0, 0, B.width, B.height, 0, 0, O, O), ue.rect(0, 0, O, O), ue.fillStyle =
|
|
4718
|
+
ue.drawImage(B, 0, 0, B.width, B.height, 0, 0, O, O), ue.rect(0, 0, O, O), ue.fillStyle = oe, ue.fill();
|
|
4701
4719
|
} else
|
|
4702
4720
|
ue.rect(0, 0, O, O), ue.fillStyle = this.options.colorLight, ue.fill();
|
|
4703
|
-
const
|
|
4721
|
+
const I = se.getPatternPosition(this.qrCode.typeNumber), U = ((n = (o = this.options.components) === null || o === void 0 ? void 0 : o.data) === null || n === void 0 ? void 0 : n.scale) || pt, le = (1 - U) * 0.5;
|
|
4704
4722
|
for (let B = 0; B < g; B++)
|
|
4705
4723
|
for (let K = 0; K < g; K++) {
|
|
4706
|
-
const
|
|
4724
|
+
const P = this.qrCode.isDark(B, K), H = K < 8 && (B < 8 || B >= g - 8) || K >= g - 8 && B < 8, de = B == 6 && K >= 8 && K <= g - 8 || K == 6 && B >= 8 && B <= g - 8;
|
|
4707
4725
|
let fe = H || de;
|
|
4708
|
-
for (let _e = 1; _e <
|
|
4709
|
-
fe = fe || B >=
|
|
4710
|
-
const he = K *
|
|
4711
|
-
if (L.strokeStyle =
|
|
4712
|
-
fe || L.fillRect(he, Ee, (fe ? 1 : U) *
|
|
4726
|
+
for (let _e = 1; _e < I.length - 1; _e++)
|
|
4727
|
+
fe = fe || B >= I[_e] - 2 && B <= I[_e] + 2 && K >= I[_e] - 2 && K <= I[_e] + 2;
|
|
4728
|
+
const he = K * C + (fe ? 0 : le * C), Ee = B * C + (fe ? 0 : le * C);
|
|
4729
|
+
if (L.strokeStyle = P ? this.options.colorDark : this.options.colorLight, L.lineWidth = 0.5, L.fillStyle = P ? this.options.colorDark : this.options.colorLight, I.length === 0)
|
|
4730
|
+
fe || L.fillRect(he, Ee, (fe ? 1 : U) * C, (fe ? 1 : U) * C);
|
|
4713
4731
|
else {
|
|
4714
4732
|
const _e = K < g - 4 && K >= g - 4 - 5 && B < g - 4 && B >= g - 4 - 5;
|
|
4715
|
-
!fe && !_e && L.fillRect(he, Ee, (fe ? 1 : U) *
|
|
4733
|
+
!fe && !_e && L.fillRect(he, Ee, (fe ? 1 : U) * C, (fe ? 1 : U) * C);
|
|
4716
4734
|
}
|
|
4717
4735
|
}
|
|
4718
|
-
const me =
|
|
4719
|
-
if (L.fillStyle =
|
|
4720
|
-
for (let B = 0; B <
|
|
4721
|
-
for (let K = 0; K <
|
|
4722
|
-
const
|
|
4723
|
-
if (!(
|
|
4724
|
-
if (H === 6 && (
|
|
4736
|
+
const me = I[I.length - 1], A = this.options.colorLight;
|
|
4737
|
+
if (L.fillStyle = A, L.fillRect(0, 0, 8 * C, 8 * C), L.fillRect(0, (g - 8) * C, 8 * C, 8 * C), L.fillRect((g - 8) * C, 0, 8 * C, 8 * C), !((l = (a = this.options.components) === null || a === void 0 ? void 0 : a.timing) === null || l === void 0) && l.protectors && (L.fillRect(8 * C, 6 * C, (g - 8 - 8) * C, C), L.fillRect(6 * C, 8 * C, C, (g - 8 - 8) * C)), !((s = (r = this.options.components) === null || r === void 0 ? void 0 : r.cornerAlignment) === null || s === void 0) && s.protectors && ae._drawAlignProtector(L, me, me, C), !((u = (i = this.options.components) === null || i === void 0 ? void 0 : i.alignment) === null || u === void 0) && u.protectors)
|
|
4738
|
+
for (let B = 0; B < I.length; B++)
|
|
4739
|
+
for (let K = 0; K < I.length; K++) {
|
|
4740
|
+
const P = I[K], H = I[B];
|
|
4741
|
+
if (!(P === 6 && (H === 6 || H === me))) {
|
|
4742
|
+
if (H === 6 && (P === 6 || P === me))
|
|
4725
4743
|
continue;
|
|
4726
|
-
if (
|
|
4744
|
+
if (P === me && H === me)
|
|
4727
4745
|
continue;
|
|
4728
|
-
ae._drawAlignProtector(L,
|
|
4746
|
+
ae._drawAlignProtector(L, P, H, C);
|
|
4729
4747
|
}
|
|
4730
4748
|
}
|
|
4731
|
-
L.fillStyle = this.options.colorDark, L.fillRect(0, 0, 7 *
|
|
4749
|
+
L.fillStyle = this.options.colorDark, L.fillRect(0, 0, 7 * C, C), L.fillRect((g - 7) * C, 0, 7 * C, C), L.fillRect(0, 6 * C, 7 * C, C), L.fillRect((g - 7) * C, 6 * C, 7 * C, C), L.fillRect(0, (g - 7) * C, 7 * C, C), L.fillRect(0, (g - 7 + 6) * C, 7 * C, C), L.fillRect(0, 0, C, 7 * C), L.fillRect(6 * C, 0, C, 7 * C), L.fillRect((g - 7) * C, 0, C, 7 * C), L.fillRect((g - 7 + 6) * C, 0, C, 7 * C), L.fillRect(0, (g - 7) * C, C, 7 * C), L.fillRect(6 * C, (g - 7) * C, C, 7 * C), L.fillRect(2 * C, 2 * C, 3 * C, 3 * C), L.fillRect((g - 7 + 2) * C, 2 * C, 3 * C, 3 * C), L.fillRect(2 * C, (g - 7 + 2) * C, 3 * C, 3 * C);
|
|
4732
4750
|
const R = ((d = (c = this.options.components) === null || c === void 0 ? void 0 : c.timing) === null || d === void 0 ? void 0 : d.scale) || pt, G = (1 - R) * 0.5;
|
|
4733
4751
|
for (let B = 0; B < g - 8; B += 2)
|
|
4734
|
-
ae._drawDot(L, 8 + B, 6,
|
|
4735
|
-
const re = ((f = (
|
|
4736
|
-
ae._drawAlign(L, me, me,
|
|
4737
|
-
const ie = ((
|
|
4738
|
-
for (let B = 0; B <
|
|
4739
|
-
for (let K = 0; K <
|
|
4740
|
-
const
|
|
4741
|
-
if (!(
|
|
4742
|
-
if (H === 6 && (
|
|
4752
|
+
ae._drawDot(L, 8 + B, 6, C, G, R), ae._drawDot(L, 6, 8 + B, C, G, R);
|
|
4753
|
+
const re = ((f = (b = this.options.components) === null || b === void 0 ? void 0 : b.cornerAlignment) === null || f === void 0 ? void 0 : f.scale) || pt, ke = (1 - re) * 0.5;
|
|
4754
|
+
ae._drawAlign(L, me, me, C, ke, re, this.options.colorDark, ((E = (S = this.options.components) === null || S === void 0 ? void 0 : S.cornerAlignment) === null || E === void 0 ? void 0 : E.protectors) || !1);
|
|
4755
|
+
const ie = ((h = (_ = this.options.components) === null || _ === void 0 ? void 0 : _.alignment) === null || h === void 0 ? void 0 : h.scale) || pt, Te = (1 - ie) * 0.5;
|
|
4756
|
+
for (let B = 0; B < I.length; B++)
|
|
4757
|
+
for (let K = 0; K < I.length; K++) {
|
|
4758
|
+
const P = I[K], H = I[B];
|
|
4759
|
+
if (!(P === 6 && (H === 6 || H === me))) {
|
|
4760
|
+
if (H === 6 && (P === 6 || P === me))
|
|
4743
4761
|
continue;
|
|
4744
|
-
if (
|
|
4762
|
+
if (P === me && H === me)
|
|
4745
4763
|
continue;
|
|
4746
|
-
ae._drawAlign(L,
|
|
4764
|
+
ae._drawAlign(L, P, H, C, Te, ie, this.options.colorDark, ((p = (y = this.options.components) === null || y === void 0 ? void 0 : y.alignment) === null || p === void 0 ? void 0 : p.protectors) || !1);
|
|
4747
4765
|
}
|
|
4748
4766
|
}
|
|
4749
|
-
if (W && (L.fillStyle = this.options.backgroundColor, L.fillRect(-
|
|
4767
|
+
if (W && (L.fillStyle = this.options.backgroundColor, L.fillRect(-x, -x, O, x), L.fillRect(-x, ne, O, x), L.fillRect(ne, -x, x, O), L.fillRect(-x, -x, x, O)), this.options.logoImage) {
|
|
4750
4768
|
const B = yield Co(this.options.logoImage);
|
|
4751
|
-
let K = this.options.logoScale,
|
|
4752
|
-
(K <= 0 || K >= 1) && (K = 0.2),
|
|
4769
|
+
let K = this.options.logoScale, P = this.options.logoMargin, H = this.options.logoCornerRadius;
|
|
4770
|
+
(K <= 0 || K >= 1) && (K = 0.2), P < 0 && (P = 0), H < 0 && (H = 0);
|
|
4753
4771
|
const de = ne * K, fe = 0.5 * (O - de), he = fe;
|
|
4754
|
-
L.restore(), L.fillStyle = this.options.logoBackgroundColor, L.save(), ae._prepareRoundedCornerClip(L, fe -
|
|
4772
|
+
L.restore(), L.fillStyle = this.options.logoBackgroundColor, L.save(), ae._prepareRoundedCornerClip(L, fe - P, he - P, de + 2 * P, de + 2 * P, H + P), L.clip();
|
|
4755
4773
|
const Ee = L.globalCompositeOperation;
|
|
4756
|
-
L.globalCompositeOperation = "destination-out", L.fill(), L.globalCompositeOperation = Ee, L.restore(), L.save(), ae._prepareRoundedCornerClip(L, fe, he, de, de, H), L.clip(), L.drawImage(B, fe, he, de, de), L.restore(), L.save(), L.translate(
|
|
4774
|
+
L.globalCompositeOperation = "destination-out", L.fill(), L.globalCompositeOperation = Ee, L.restore(), L.save(), ae._prepareRoundedCornerClip(L, fe, he, de, de, H), L.clip(), L.drawImage(B, fe, he, de, de), L.restore(), L.save(), L.translate(x, x);
|
|
4757
4775
|
}
|
|
4758
4776
|
if (Ce) {
|
|
4759
|
-
let B, K,
|
|
4777
|
+
let B, K, P, H, de, fe;
|
|
4760
4778
|
if (Ve.forEach(function(he) {
|
|
4761
|
-
B || (B = new ce(
|
|
4779
|
+
B || (B = new ce(T, T), B.setDelay(he.delay), B.setRepeat(0));
|
|
4762
4780
|
const { width: Ee, height: _e } = he.dims;
|
|
4763
|
-
K || (K = new Ue(Ee, _e),
|
|
4781
|
+
K || (K = new Ue(Ee, _e), P = K.getContext("2d"), P.rect(0, 0, K.width, K.height), P.fillStyle = "#ffffff", P.fill()), (!H || !fe || Ee !== H.width || _e !== H.height) && (H = new Ue(Ee, _e), de = H.getContext("2d"), fe = de.createImageData(Ee, _e)), fe.data.set(he.patch), de.putImageData(fe, 0, 0), P.drawImage(H.getContext("2d").canvas, he.dims.left, he.dims.top);
|
|
4764
4782
|
const dt = new Ue(O, O), ot = dt.getContext("2d");
|
|
4765
|
-
ot.drawImage(K.getContext("2d").canvas, 0, 0, O, O), ot.rect(0, 0, O, O), ot.fillStyle =
|
|
4766
|
-
const Lt = new Ue(
|
|
4767
|
-
ao.drawImage(dt.getContext("2d").canvas, 0, 0,
|
|
4783
|
+
ot.drawImage(K.getContext("2d").canvas, 0, 0, O, O), ot.rect(0, 0, O, O), ot.fillStyle = oe, ot.fill(), ot.drawImage(ee.getContext("2d").canvas, 0, 0, O, O);
|
|
4784
|
+
const Lt = new Ue(T, T), ao = Lt.getContext("2d");
|
|
4785
|
+
ao.drawImage(dt.getContext("2d").canvas, 0, 0, T, T), B.addFrame(ao.getImageData(0, 0, Lt.width, Lt.height).data);
|
|
4768
4786
|
}), !B)
|
|
4769
4787
|
throw new Error("No frames.");
|
|
4770
4788
|
if (B.finish(), To(this.canvas)) {
|
|
@@ -4773,11 +4791,11 @@ class ae {
|
|
|
4773
4791
|
}
|
|
4774
4792
|
return Promise.resolve(Buffer.from(B.stream().toFlattenUint8Array()));
|
|
4775
4793
|
} else {
|
|
4776
|
-
ue.drawImage(ee.getContext("2d").canvas, 0, 0, O, O), L.drawImage(Ae.getContext("2d").canvas, -
|
|
4777
|
-
const B = new Ue(
|
|
4778
|
-
B.getContext("2d").drawImage(ee.getContext("2d").canvas, 0, 0,
|
|
4779
|
-
const
|
|
4780
|
-
return To(this.canvas) ? Promise.resolve(this.canvas.toDataURL(
|
|
4794
|
+
ue.drawImage(ee.getContext("2d").canvas, 0, 0, O, O), L.drawImage(Ae.getContext("2d").canvas, -x, -x, O, O);
|
|
4795
|
+
const B = new Ue(T, T);
|
|
4796
|
+
B.getContext("2d").drawImage(ee.getContext("2d").canvas, 0, 0, T, T), this.canvas = B;
|
|
4797
|
+
const P = this.options.gifBackground ? "gif" : "png";
|
|
4798
|
+
return To(this.canvas) ? Promise.resolve(this.canvas.toDataURL(P)) : Promise.resolve(this.canvas.toBuffer(P));
|
|
4781
4799
|
}
|
|
4782
4800
|
});
|
|
4783
4801
|
}
|
|
@@ -5026,69 +5044,69 @@ const hl = /* @__PURE__ */ Zt(dl, [["render", fl]]), pl = ["innerHTML"], gl = {
|
|
|
5026
5044
|
],
|
|
5027
5045
|
setup(e, { emit: t }) {
|
|
5028
5046
|
const o = e, { reload: n, reloadFlag: a } = zo(), l = D(() => {
|
|
5029
|
-
var
|
|
5030
|
-
return (
|
|
5047
|
+
var _, h;
|
|
5048
|
+
return (h = (_ = o.board) == null ? void 0 : _.tableData) == null ? void 0 : h.keyName;
|
|
5031
5049
|
}), r = D(() => {
|
|
5032
|
-
var
|
|
5033
|
-
return Wn((
|
|
5050
|
+
var _;
|
|
5051
|
+
return Wn((_ = o.board) == null ? void 0 : _.columns);
|
|
5034
5052
|
}), s = z([]);
|
|
5035
|
-
function i(
|
|
5036
|
-
s.value =
|
|
5053
|
+
function i(_) {
|
|
5054
|
+
s.value = _, t("return-selected-key", s.value);
|
|
5037
5055
|
}
|
|
5038
5056
|
const u = D(() => ({
|
|
5039
5057
|
current: o.paginationProps.page + 1,
|
|
5040
5058
|
pageSize: o.paginationProps.count,
|
|
5041
5059
|
total: o.paginationProps.totalCount,
|
|
5042
|
-
onChange: function(
|
|
5043
|
-
t("return-pagination-props",
|
|
5060
|
+
onChange: function(_) {
|
|
5061
|
+
t("return-pagination-props", _);
|
|
5044
5062
|
},
|
|
5045
5063
|
showJumper: !0
|
|
5046
5064
|
}));
|
|
5047
|
-
function c(
|
|
5048
|
-
return
|
|
5065
|
+
function c(_, h) {
|
|
5066
|
+
return _.value != "" ? $e.render(_.value, { item: h }) : h[_.keyName];
|
|
5049
5067
|
}
|
|
5050
|
-
function d(
|
|
5051
|
-
var
|
|
5052
|
-
if (!Ne(
|
|
5053
|
-
let
|
|
5054
|
-
if (
|
|
5068
|
+
function d(_, h) {
|
|
5069
|
+
var y;
|
|
5070
|
+
if (!Ne(_.enums)) {
|
|
5071
|
+
let p = _.enums.filter((g) => {
|
|
5072
|
+
if (h[_.keyName] == null && (h[_.keyName] = ""), g.value == String(h[_.keyName]))
|
|
5055
5073
|
return g.text;
|
|
5056
5074
|
});
|
|
5057
|
-
return
|
|
5075
|
+
return p.length ? (y = p.shift()) == null ? void 0 : y.text : h[_.keyName];
|
|
5058
5076
|
}
|
|
5059
5077
|
}
|
|
5060
|
-
function
|
|
5061
|
-
if (
|
|
5062
|
-
return $e.render(
|
|
5063
|
-
if (
|
|
5064
|
-
return jt(
|
|
5078
|
+
function b(_, h) {
|
|
5079
|
+
if (_.value != "")
|
|
5080
|
+
return $e.render(_.value, { item: h });
|
|
5081
|
+
if (_.value == "")
|
|
5082
|
+
return jt(h[_.keyName]).format("YYYY-MM-DD HH:mm:ss");
|
|
5065
5083
|
}
|
|
5066
|
-
function f(
|
|
5067
|
-
return
|
|
5068
|
-
if (
|
|
5069
|
-
let
|
|
5084
|
+
function f(_, h) {
|
|
5085
|
+
return _.filter((y) => {
|
|
5086
|
+
if (y.showIf != "1") {
|
|
5087
|
+
let p, g;
|
|
5070
5088
|
try {
|
|
5071
|
-
|
|
5072
|
-
} catch (
|
|
5073
|
-
console.warn(
|
|
5089
|
+
p = $e.render(y.showIf, { item: h }), g = Wt(p, { item: h });
|
|
5090
|
+
} catch (T) {
|
|
5091
|
+
console.warn(T);
|
|
5074
5092
|
}
|
|
5075
5093
|
return g;
|
|
5076
5094
|
} else
|
|
5077
|
-
return
|
|
5095
|
+
return y;
|
|
5078
5096
|
});
|
|
5079
5097
|
}
|
|
5080
|
-
function S(
|
|
5081
|
-
t("table-button-action",
|
|
5098
|
+
function S(_, h) {
|
|
5099
|
+
t("table-button-action", _, h);
|
|
5082
5100
|
}
|
|
5083
|
-
function
|
|
5084
|
-
t("table-form-confirm",
|
|
5101
|
+
function E(_, h) {
|
|
5102
|
+
t("table-form-confirm", _, h);
|
|
5085
5103
|
}
|
|
5086
5104
|
return we(
|
|
5087
5105
|
() => o.tableData,
|
|
5088
5106
|
() => n(),
|
|
5089
5107
|
{ deep: !0 }
|
|
5090
|
-
), (
|
|
5091
|
-
const
|
|
5108
|
+
), (_, h) => {
|
|
5109
|
+
const y = F("t-button"), p = F("t-popup"), g = F("t-icon"), T = F("t-image");
|
|
5092
5110
|
return m(a) ? j("", !0) : (v(), N(m(Do), {
|
|
5093
5111
|
key: 0,
|
|
5094
5112
|
commonTableProps: {
|
|
@@ -5100,33 +5118,33 @@ const hl = /* @__PURE__ */ Zt(dl, [["render", fl]]), pl = ["innerHTML"], gl = {
|
|
|
5100
5118
|
onSelectChange: i
|
|
5101
5119
|
}
|
|
5102
5120
|
}, {
|
|
5103
|
-
TEXT:
|
|
5104
|
-
Q(ge(c(
|
|
5121
|
+
TEXT: k(({ col: w, row: x }) => [
|
|
5122
|
+
Q(ge(c(w, x)), 1)
|
|
5105
5123
|
]),
|
|
5106
|
-
ENUMS:
|
|
5124
|
+
ENUMS: k(({ col: w, row: x }) => [
|
|
5107
5125
|
Y("span", {
|
|
5108
|
-
innerHTML: d(
|
|
5126
|
+
innerHTML: d(w, x)
|
|
5109
5127
|
}, null, 8, pl)
|
|
5110
5128
|
]),
|
|
5111
|
-
DATE:
|
|
5112
|
-
Q(ge(
|
|
5129
|
+
DATE: k(({ col: w, row: x }) => [
|
|
5130
|
+
Q(ge(b(w, x)), 1)
|
|
5113
5131
|
]),
|
|
5114
|
-
QR_CODE:
|
|
5115
|
-
V(
|
|
5116
|
-
content:
|
|
5132
|
+
QR_CODE: k(({ col: w, row: x }) => [
|
|
5133
|
+
V(p, null, {
|
|
5134
|
+
content: k(() => [
|
|
5117
5135
|
V(hl, {
|
|
5118
|
-
text: c(
|
|
5136
|
+
text: c(w, x),
|
|
5119
5137
|
size: 80,
|
|
5120
5138
|
margin: 0
|
|
5121
5139
|
}, null, 8, ["text"]),
|
|
5122
|
-
Y("div", gl, ge(
|
|
5140
|
+
Y("div", gl, ge(x.code), 1)
|
|
5123
5141
|
]),
|
|
5124
|
-
default:
|
|
5125
|
-
V(
|
|
5142
|
+
default: k(() => [
|
|
5143
|
+
V(y, {
|
|
5126
5144
|
variant: "text",
|
|
5127
5145
|
theme: "primary"
|
|
5128
5146
|
}, {
|
|
5129
|
-
default:
|
|
5147
|
+
default: k(() => [
|
|
5130
5148
|
Q("预览")
|
|
5131
5149
|
]),
|
|
5132
5150
|
_: 1
|
|
@@ -5135,23 +5153,23 @@ const hl = /* @__PURE__ */ Zt(dl, [["render", fl]]), pl = ["innerHTML"], gl = {
|
|
|
5135
5153
|
_: 2
|
|
5136
5154
|
}, 1024)
|
|
5137
5155
|
]),
|
|
5138
|
-
FORM_ITEM:
|
|
5156
|
+
FORM_ITEM: k(({ col: w, row: x }) => [
|
|
5139
5157
|
V(ua, {
|
|
5140
5158
|
viewName: e.viewName,
|
|
5141
|
-
col:
|
|
5142
|
-
row:
|
|
5143
|
-
onBlur:
|
|
5159
|
+
col: w,
|
|
5160
|
+
row: x,
|
|
5161
|
+
onBlur: E
|
|
5144
5162
|
}, null, 8, ["viewName", "col", "row"])
|
|
5145
5163
|
]),
|
|
5146
|
-
IMAGE:
|
|
5147
|
-
V(
|
|
5148
|
-
src: c(
|
|
5164
|
+
IMAGE: k(({ col: w, row: x }) => [
|
|
5165
|
+
V(T, {
|
|
5166
|
+
src: c(w, x),
|
|
5149
5167
|
fit: "cover",
|
|
5150
5168
|
shape: "round",
|
|
5151
5169
|
style: { width: "80px", height: "80px" }
|
|
5152
5170
|
}, {
|
|
5153
|
-
error:
|
|
5154
|
-
|
|
5171
|
+
error: k(() => [
|
|
5172
|
+
w.name == "头像" ? (v(), N(g, {
|
|
5155
5173
|
key: 0,
|
|
5156
5174
|
name: "user"
|
|
5157
5175
|
})) : (v(), N(g, {
|
|
@@ -5159,8 +5177,8 @@ const hl = /* @__PURE__ */ Zt(dl, [["render", fl]]), pl = ["innerHTML"], gl = {
|
|
|
5159
5177
|
name: "file-image"
|
|
5160
5178
|
}))
|
|
5161
5179
|
]),
|
|
5162
|
-
loading:
|
|
5163
|
-
|
|
5180
|
+
loading: k(() => [
|
|
5181
|
+
w.name == "头像" ? (v(), N(g, {
|
|
5164
5182
|
key: 0,
|
|
5165
5183
|
name: "user"
|
|
5166
5184
|
})) : (v(), N(g, {
|
|
@@ -5172,15 +5190,15 @@ const hl = /* @__PURE__ */ Zt(dl, [["render", fl]]), pl = ["innerHTML"], gl = {
|
|
|
5172
5190
|
_: 2
|
|
5173
5191
|
}, 1032, ["src"])
|
|
5174
5192
|
]),
|
|
5175
|
-
BUTTONS:
|
|
5176
|
-
(v(!0), q(ve, null, ye(f(
|
|
5193
|
+
BUTTONS: k(({ col: w, row: x }) => [
|
|
5194
|
+
(v(!0), q(ve, null, ye(f(w.buttons, x), (M) => (v(), N(y, {
|
|
5177
5195
|
theme: "primary",
|
|
5178
5196
|
variant: "text",
|
|
5179
|
-
key:
|
|
5180
|
-
onClick: (W) => S(
|
|
5197
|
+
key: M.buttonId,
|
|
5198
|
+
onClick: (W) => S(M, x)
|
|
5181
5199
|
}, {
|
|
5182
|
-
default:
|
|
5183
|
-
Q(ge(
|
|
5200
|
+
default: k(() => [
|
|
5201
|
+
Q(ge(M.name), 1)
|
|
5184
5202
|
]),
|
|
5185
5203
|
_: 2
|
|
5186
5204
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -5209,22 +5227,22 @@ const bl = /* @__PURE__ */ J({
|
|
|
5209
5227
|
window.history.go(-1);
|
|
5210
5228
|
}
|
|
5211
5229
|
return (i, u) => {
|
|
5212
|
-
const c = F("t-card"), d = F("t-tab-panel"),
|
|
5213
|
-
return v(), N(
|
|
5230
|
+
const c = F("t-card"), d = F("t-tab-panel"), b = F("t-tabs");
|
|
5231
|
+
return v(), N(b, {
|
|
5214
5232
|
class: $(`${m(X)}__tab`),
|
|
5215
5233
|
placement: "left",
|
|
5216
5234
|
value: n.value,
|
|
5217
5235
|
onChange: a
|
|
5218
5236
|
}, {
|
|
5219
|
-
default:
|
|
5237
|
+
default: k(() => [
|
|
5220
5238
|
(v(!0), q(ve, null, ye(m(o), (f) => (v(), N(d, {
|
|
5221
5239
|
key: f.title,
|
|
5222
5240
|
value: f.title,
|
|
5223
5241
|
label: f.title
|
|
5224
5242
|
}, {
|
|
5225
|
-
default:
|
|
5243
|
+
default: k(() => [
|
|
5226
5244
|
V(c, { bordered: !1 }, {
|
|
5227
|
-
content:
|
|
5245
|
+
content: k(() => [
|
|
5228
5246
|
f.board ? (v(), N(ln, {
|
|
5229
5247
|
key: 0,
|
|
5230
5248
|
viewName: e.viewName,
|
|
@@ -5254,9 +5272,9 @@ const yl = /* @__PURE__ */ J({
|
|
|
5254
5272
|
},
|
|
5255
5273
|
emits: ["update:isDialogVisible", "close-dialog"],
|
|
5256
5274
|
setup(e, { emit: t }) {
|
|
5257
|
-
const o = e, n = cn(() => import("./index-
|
|
5258
|
-
var
|
|
5259
|
-
switch ((
|
|
5275
|
+
const o = e, n = cn(() => import("./index-189a45ed.mjs")), a = Xt(), l = D(() => o.dialogViewInfo.view), r = D(() => o.dialogViewInfo.name), s = D(() => {
|
|
5276
|
+
var b;
|
|
5277
|
+
switch ((b = i.value) == null ? void 0 : b.boardType) {
|
|
5260
5278
|
case "table":
|
|
5261
5279
|
return "1200px";
|
|
5262
5280
|
case "tab":
|
|
@@ -5265,13 +5283,13 @@ const yl = /* @__PURE__ */ J({
|
|
|
5265
5283
|
return "600px";
|
|
5266
5284
|
}
|
|
5267
5285
|
}), i = z(), u = D(() => o.dialogViewProps.length ? a.getPropsByPropsKey(o.dialogViewProps) : []);
|
|
5268
|
-
function c(
|
|
5269
|
-
t("update:isDialogVisible",
|
|
5286
|
+
function c(b) {
|
|
5287
|
+
t("update:isDialogVisible", b);
|
|
5270
5288
|
}
|
|
5271
5289
|
function d() {
|
|
5272
5290
|
t("close-dialog");
|
|
5273
5291
|
}
|
|
5274
|
-
return (
|
|
5292
|
+
return (b, f) => (v(), N(m(Eo), {
|
|
5275
5293
|
commonDialogProps: {
|
|
5276
5294
|
visible: e.isDialogVisible,
|
|
5277
5295
|
width: m(s),
|
|
@@ -5281,7 +5299,7 @@ const yl = /* @__PURE__ */ J({
|
|
|
5281
5299
|
destroyOnClose: !0
|
|
5282
5300
|
}
|
|
5283
5301
|
}, {
|
|
5284
|
-
body:
|
|
5302
|
+
body: k(() => [
|
|
5285
5303
|
V(m(n), {
|
|
5286
5304
|
viewName: m(l),
|
|
5287
5305
|
board: e.dialogViewBoard,
|
|
@@ -5305,37 +5323,37 @@ const yl = /* @__PURE__ */ J({
|
|
|
5305
5323
|
const o = e, n = ut(), a = tt(), l = $t(), r = Xt();
|
|
5306
5324
|
zo();
|
|
5307
5325
|
const s = D(() => {
|
|
5308
|
-
var
|
|
5309
|
-
return (
|
|
5326
|
+
var I;
|
|
5327
|
+
return (I = o.board) == null ? void 0 : I.boardType;
|
|
5310
5328
|
}), i = D(() => {
|
|
5311
|
-
var
|
|
5312
|
-
return (
|
|
5329
|
+
var I, U, le;
|
|
5330
|
+
return (I = o.board) != null && I.data ? (U = o.board) == null ? void 0 : U.data.dataId : (le = o.board) != null && le.tableData ? o.board.tableData.dataId : null;
|
|
5313
5331
|
}), u = z([]), c = z({}), d = D(() => {
|
|
5314
|
-
var
|
|
5315
|
-
return (
|
|
5316
|
-
}),
|
|
5317
|
-
var
|
|
5318
|
-
return Ne((
|
|
5332
|
+
var I;
|
|
5333
|
+
return (I = o.board) == null ? void 0 : I.header;
|
|
5334
|
+
}), b = z({}), f = D(() => {
|
|
5335
|
+
var I, U;
|
|
5336
|
+
return Ne((I = a.query) == null ? void 0 : I.props) ? {} : JSON.parse((U = a.query) == null ? void 0 : U.props);
|
|
5319
5337
|
}), S = z({
|
|
5320
5338
|
count: 10,
|
|
5321
5339
|
page: 0,
|
|
5322
5340
|
totalCount: 0,
|
|
5323
5341
|
pageCount: 0
|
|
5324
|
-
}),
|
|
5325
|
-
var
|
|
5342
|
+
}), E = D(() => {
|
|
5343
|
+
var I;
|
|
5326
5344
|
{
|
|
5327
5345
|
let U = {};
|
|
5328
|
-
return d.value &&
|
|
5346
|
+
return d.value && b.value && Object.assign(U, b.value), o.dialogProps && ((I = Object.keys(o.dialogProps)) != null && I.length) && Object.assign(U, o.dialogProps), s.value === "table" && Object.assign(U, S.value), Object.assign(U, f.value), U;
|
|
5329
5347
|
}
|
|
5330
5348
|
});
|
|
5331
|
-
async function
|
|
5332
|
-
var
|
|
5349
|
+
async function _() {
|
|
5350
|
+
var I;
|
|
5333
5351
|
try {
|
|
5334
5352
|
if (!yt(i.value) && !yt(o.viewName)) {
|
|
5335
5353
|
const U = await Vt({
|
|
5336
5354
|
dataId: i.value,
|
|
5337
5355
|
viewName: o.viewName,
|
|
5338
|
-
props:
|
|
5356
|
+
props: E.value
|
|
5339
5357
|
});
|
|
5340
5358
|
if (l.sendRegisterMessage(i.value), U.state === 200 && U.data)
|
|
5341
5359
|
s.value == "table" && (S.value = {
|
|
@@ -5343,7 +5361,7 @@ const yl = /* @__PURE__ */ J({
|
|
|
5343
5361
|
page: U.data.page,
|
|
5344
5362
|
pageCount: U.data.pageCount,
|
|
5345
5363
|
totalCount: U.data.totalCount
|
|
5346
|
-
}, u.value = (
|
|
5364
|
+
}, u.value = (I = U.data) == null ? void 0 : I.data), s.value == "form" && (c.value = U.data);
|
|
5347
5365
|
else
|
|
5348
5366
|
throw U;
|
|
5349
5367
|
}
|
|
@@ -5352,178 +5370,178 @@ const yl = /* @__PURE__ */ J({
|
|
|
5352
5370
|
}
|
|
5353
5371
|
}
|
|
5354
5372
|
et(() => {
|
|
5355
|
-
|
|
5373
|
+
_(), window.addEventListener("onUpdateMessage", (I) => {
|
|
5356
5374
|
var le;
|
|
5357
|
-
const U = (le =
|
|
5358
|
-
i.value === U &&
|
|
5375
|
+
const U = (le = I == null ? void 0 : I.detail) == null ? void 0 : le.args.dataId;
|
|
5376
|
+
i.value === U && _();
|
|
5359
5377
|
});
|
|
5360
5378
|
}), we(
|
|
5361
5379
|
() => o.board,
|
|
5362
5380
|
async () => {
|
|
5363
|
-
await
|
|
5381
|
+
await _();
|
|
5364
5382
|
},
|
|
5365
5383
|
{
|
|
5366
5384
|
deep: !0
|
|
5367
5385
|
}
|
|
5368
5386
|
);
|
|
5369
|
-
const
|
|
5370
|
-
async function I
|
|
5371
|
-
if ((
|
|
5372
|
-
U.viewName =
|
|
5387
|
+
const h = z(!1), y = z(!1), p = z({}), g = z({}), T = z(), w = z();
|
|
5388
|
+
async function x(I, U = {}) {
|
|
5389
|
+
if ((I ?? "") != "") {
|
|
5390
|
+
U.viewName = I;
|
|
5373
5391
|
const le = await Oo(U);
|
|
5374
|
-
le.state === 200 && (
|
|
5392
|
+
le.state === 200 && (T.value = le.data.boards[0], w.value = le.data.props);
|
|
5375
5393
|
}
|
|
5376
5394
|
}
|
|
5377
|
-
async function
|
|
5378
|
-
|
|
5395
|
+
async function M(I) {
|
|
5396
|
+
h.value = I;
|
|
5379
5397
|
}
|
|
5380
|
-
async function W(
|
|
5398
|
+
async function W(I, U = {}) {
|
|
5381
5399
|
var le, me;
|
|
5382
|
-
switch (
|
|
5400
|
+
switch (I.action) {
|
|
5383
5401
|
case "VIEW_BY_DIALOG": {
|
|
5384
|
-
|
|
5402
|
+
p.value = I, g.value = { ...U }, r.initPropsSource(U), await x(I.view), await M(!0), y.value = !0;
|
|
5385
5403
|
break;
|
|
5386
5404
|
}
|
|
5387
5405
|
case "VIEW": {
|
|
5388
|
-
let
|
|
5389
|
-
(le =
|
|
5390
|
-
R.keyName && (U[R.keyName] ?? "") != "" && (
|
|
5406
|
+
let A = {};
|
|
5407
|
+
(le = I == null ? void 0 : I.props) == null || le.forEach((R) => {
|
|
5408
|
+
R.keyName && (U[R.keyName] ?? "") != "" && (A[R.keyName] = U[R.keyName]);
|
|
5391
5409
|
}), n.push({
|
|
5392
5410
|
path: "/view",
|
|
5393
5411
|
query: {
|
|
5394
|
-
viewName:
|
|
5395
|
-
props: JSON.stringify(
|
|
5412
|
+
viewName: I.view,
|
|
5413
|
+
props: JSON.stringify(A)
|
|
5396
5414
|
}
|
|
5397
5415
|
});
|
|
5398
5416
|
break;
|
|
5399
5417
|
}
|
|
5400
5418
|
case "CONFIRM": {
|
|
5401
|
-
let
|
|
5402
|
-
|
|
5419
|
+
let A;
|
|
5420
|
+
I.confirmMessage != "" ? A = $e.render(I.confirmMessage, { item: U }) : A = `是否确定${I.name}`;
|
|
5403
5421
|
let R = {};
|
|
5404
|
-
|
|
5422
|
+
I.props ? I.props.forEach((re) => {
|
|
5405
5423
|
re.keyName && (U[re.keyName] ?? "") != "" && (R[re.keyName] = U[re.keyName]);
|
|
5406
5424
|
}) : R = { ...U };
|
|
5407
5425
|
const G = gt.confirm({
|
|
5408
5426
|
theme: "info",
|
|
5409
|
-
header:
|
|
5410
|
-
body:
|
|
5427
|
+
header: I.name,
|
|
5428
|
+
body: A,
|
|
5411
5429
|
onConfirm: () => {
|
|
5412
|
-
|
|
5430
|
+
I.buttonId && ee(R, I.buttonId), G.destroy();
|
|
5413
5431
|
},
|
|
5414
5432
|
onCancel: () => {
|
|
5415
|
-
|
|
5433
|
+
te.info(`已取消${I.name}`);
|
|
5416
5434
|
}
|
|
5417
5435
|
});
|
|
5418
5436
|
break;
|
|
5419
5437
|
}
|
|
5420
5438
|
case "BATCH": {
|
|
5421
|
-
const
|
|
5439
|
+
const A = gt.confirm({
|
|
5422
5440
|
theme: "info",
|
|
5423
|
-
header:
|
|
5424
|
-
body: `此操作将${
|
|
5441
|
+
header: I.name,
|
|
5442
|
+
body: `此操作将${I.name},是否继续`,
|
|
5425
5443
|
onConfirm: () => {
|
|
5426
|
-
|
|
5444
|
+
C.value.length == 0 ? te.error("请选择批量操作对象!") : Ae(I, C.value), A.destroy();
|
|
5427
5445
|
},
|
|
5428
5446
|
onCancel: () => {
|
|
5429
|
-
|
|
5447
|
+
te.info(`已取消${I.name}`);
|
|
5430
5448
|
}
|
|
5431
5449
|
});
|
|
5432
5450
|
break;
|
|
5433
5451
|
}
|
|
5434
5452
|
case "LINK": {
|
|
5435
|
-
let
|
|
5436
|
-
(me =
|
|
5437
|
-
G.keyName && (U[G.keyName] ?? "") != "" && (
|
|
5453
|
+
let A = {};
|
|
5454
|
+
(me = I == null ? void 0 : I.props) == null || me.forEach((G) => {
|
|
5455
|
+
G.keyName && (U[G.keyName] ?? "") != "" && (A[G.keyName] = U[G.keyName]);
|
|
5438
5456
|
});
|
|
5439
5457
|
const R = n.resolve({
|
|
5440
|
-
path:
|
|
5441
|
-
query: Object.keys(
|
|
5458
|
+
path: I.link,
|
|
5459
|
+
query: Object.keys(A).length ? { props: JSON.stringify(A) } : void 0
|
|
5442
5460
|
});
|
|
5443
5461
|
window.open(R.href, "_blank");
|
|
5444
5462
|
break;
|
|
5445
5463
|
}
|
|
5446
5464
|
case "DOWNLOAD": {
|
|
5447
|
-
if ((
|
|
5448
|
-
const
|
|
5449
|
-
if ((
|
|
5450
|
-
const R =
|
|
5451
|
-
G.style.display = "none", G.setAttribute("target", "_blank"), R && G.setAttribute("download", R), G.setAttribute("href",
|
|
5465
|
+
if ((I.downloadUrl ?? "") != "") {
|
|
5466
|
+
const A = pn.decode($e.render(I.downloadUrl, { item: U }));
|
|
5467
|
+
if ((A ?? "") != "") {
|
|
5468
|
+
const R = A.split("/").slice(-1)[0], G = document.createElement("a");
|
|
5469
|
+
G.style.display = "none", G.setAttribute("target", "_blank"), R && G.setAttribute("download", R), G.setAttribute("href", A), G.click(), te.info("即将开始下载");
|
|
5452
5470
|
} else
|
|
5453
|
-
|
|
5471
|
+
te.info("未设置下载链接");
|
|
5454
5472
|
}
|
|
5455
5473
|
break;
|
|
5456
5474
|
}
|
|
5457
5475
|
default:
|
|
5458
|
-
console.log(
|
|
5476
|
+
console.log(I);
|
|
5459
5477
|
}
|
|
5460
5478
|
}
|
|
5461
|
-
function
|
|
5462
|
-
|
|
5479
|
+
function oe(I) {
|
|
5480
|
+
b.value = I, S.value = {
|
|
5463
5481
|
count: 10,
|
|
5464
5482
|
page: 0,
|
|
5465
5483
|
totalCount: 0,
|
|
5466
5484
|
pageCount: 0
|
|
5467
|
-
},
|
|
5485
|
+
}, _();
|
|
5468
5486
|
}
|
|
5469
|
-
const
|
|
5470
|
-
function ne(
|
|
5471
|
-
|
|
5487
|
+
const C = z([]);
|
|
5488
|
+
function ne(I) {
|
|
5489
|
+
C.value = I;
|
|
5472
5490
|
}
|
|
5473
|
-
function O(
|
|
5491
|
+
function O(I) {
|
|
5474
5492
|
Object.assign(S.value, {
|
|
5475
|
-
page:
|
|
5476
|
-
count:
|
|
5477
|
-
}),
|
|
5493
|
+
page: I.current - 1,
|
|
5494
|
+
count: I.pageSize
|
|
5495
|
+
}), _();
|
|
5478
5496
|
}
|
|
5479
|
-
async function ee(
|
|
5497
|
+
async function ee(I, U) {
|
|
5480
5498
|
let le = {};
|
|
5481
|
-
Object.keys(
|
|
5499
|
+
Object.keys(E.value).length && Object.assign(le, E.value), Object.assign(le, I);
|
|
5482
5500
|
const me = await Xn({
|
|
5483
5501
|
buttonId: U,
|
|
5484
5502
|
props: le,
|
|
5485
5503
|
viewName: o.viewName
|
|
5486
5504
|
});
|
|
5487
|
-
me.state === 200 ?
|
|
5505
|
+
me.state === 200 ? te.success("提交成功") : te.error(`提交失败:${me.message}`);
|
|
5488
5506
|
}
|
|
5489
|
-
function L(
|
|
5490
|
-
if (
|
|
5507
|
+
function L(I, U) {
|
|
5508
|
+
if (I.itemType == "selector" || I.itemType == "time_selector" || I.itemType == "date_time_selector" || I.itemType == "tree_check_box" || I.itemType === "multi_tree_selector" || I.itemType === "tree_selector") {
|
|
5491
5509
|
const le = gt.confirm({
|
|
5492
5510
|
theme: "info",
|
|
5493
5511
|
body: "此操作将提交该修改,是否继续?",
|
|
5494
5512
|
onConfirm: () => {
|
|
5495
|
-
ee(U,
|
|
5513
|
+
ee(U, I.buttonId), le.destroy();
|
|
5496
5514
|
},
|
|
5497
5515
|
onCancel: () => {
|
|
5498
|
-
|
|
5516
|
+
te.info("已取消修改。");
|
|
5499
5517
|
}
|
|
5500
5518
|
});
|
|
5501
5519
|
} else
|
|
5502
|
-
ee(U,
|
|
5520
|
+
ee(U, I.buttonId);
|
|
5503
5521
|
}
|
|
5504
|
-
async function Ae(
|
|
5522
|
+
async function Ae(I, U) {
|
|
5505
5523
|
let le = {};
|
|
5506
|
-
Object.keys(
|
|
5524
|
+
Object.keys(E.value).length && Object.assign(le, E.value);
|
|
5507
5525
|
const me = await Zn({
|
|
5508
5526
|
viewName: o.viewName,
|
|
5509
|
-
buttonId:
|
|
5527
|
+
buttonId: I.buttonId,
|
|
5510
5528
|
props: le,
|
|
5511
5529
|
keys: U
|
|
5512
5530
|
});
|
|
5513
|
-
me.state == 200 ?
|
|
5531
|
+
me.state == 200 ? te.success(`${I.name} 操作成功!`) : te.error(`提交出错:${me.message}`);
|
|
5514
5532
|
}
|
|
5515
5533
|
function ue() {
|
|
5516
|
-
|
|
5517
|
-
|
|
5534
|
+
y.value = !1, setTimeout(() => {
|
|
5535
|
+
M(!1);
|
|
5518
5536
|
});
|
|
5519
5537
|
}
|
|
5520
|
-
function Ce(
|
|
5521
|
-
ee(
|
|
5538
|
+
function Ce(I, U) {
|
|
5539
|
+
ee(I, U), Ve();
|
|
5522
5540
|
}
|
|
5523
5541
|
function Ve() {
|
|
5524
5542
|
t("close-dialog");
|
|
5525
5543
|
}
|
|
5526
|
-
return (
|
|
5544
|
+
return (I, U) => (v(), q("div", {
|
|
5527
5545
|
class: $(`${m(X)}__board`)
|
|
5528
5546
|
}, [
|
|
5529
5547
|
m(d) ? (v(), N(na, {
|
|
@@ -5531,7 +5549,7 @@ const yl = /* @__PURE__ */ J({
|
|
|
5531
5549
|
viewName: e.viewName,
|
|
5532
5550
|
headerInfo: m(d),
|
|
5533
5551
|
onHeaderButtonAction: W,
|
|
5534
|
-
onHeaderFilterChange:
|
|
5552
|
+
onHeaderFilterChange: oe
|
|
5535
5553
|
}, null, 8, ["viewName", "headerInfo"])) : j("", !0),
|
|
5536
5554
|
m(s) === "form" ? (v(), N(sa, {
|
|
5537
5555
|
key: 1,
|
|
@@ -5558,18 +5576,18 @@ const yl = /* @__PURE__ */ J({
|
|
|
5558
5576
|
viewName: e.viewName,
|
|
5559
5577
|
board: e.board
|
|
5560
5578
|
}, null, 8, ["viewName", "board"])) : j("", !0),
|
|
5561
|
-
|
|
5579
|
+
h.value ? (v(), N(yl, {
|
|
5562
5580
|
key: 4,
|
|
5563
5581
|
ref: "dialogRef",
|
|
5564
|
-
isDialogVisible:
|
|
5582
|
+
isDialogVisible: y.value,
|
|
5565
5583
|
"onUpdate:isDialogVisible": [
|
|
5566
|
-
U[0] || (U[0] = (le) =>
|
|
5584
|
+
U[0] || (U[0] = (le) => y.value = le),
|
|
5567
5585
|
ue
|
|
5568
5586
|
],
|
|
5569
|
-
dialogViewInfo:
|
|
5587
|
+
dialogViewInfo: p.value,
|
|
5570
5588
|
dialogFormModel: g.value,
|
|
5571
|
-
dialogViewBoard:
|
|
5572
|
-
dialogViewProps:
|
|
5589
|
+
dialogViewBoard: T.value,
|
|
5590
|
+
dialogViewProps: w.value,
|
|
5573
5591
|
onCloseDialog: ue
|
|
5574
5592
|
}, null, 8, ["isDialogVisible", "dialogViewInfo", "dialogFormModel", "dialogViewBoard", "dialogViewProps"])) : j("", !0)
|
|
5575
5593
|
], 2));
|
|
@@ -5589,9 +5607,9 @@ const yl = /* @__PURE__ */ J({
|
|
|
5589
5607
|
});
|
|
5590
5608
|
});
|
|
5591
5609
|
const c = D(() => n.query.viewName), d = D(() => {
|
|
5592
|
-
var
|
|
5593
|
-
return ((
|
|
5594
|
-
}),
|
|
5610
|
+
var E, _;
|
|
5611
|
+
return ((E = n.query) == null ? void 0 : E.props) && JSON.parse((_ = n.query) == null ? void 0 : _.props);
|
|
5612
|
+
}), b = z();
|
|
5595
5613
|
we(
|
|
5596
5614
|
c,
|
|
5597
5615
|
async () => {
|
|
@@ -5602,17 +5620,17 @@ const yl = /* @__PURE__ */ J({
|
|
|
5602
5620
|
immediate: !0
|
|
5603
5621
|
}
|
|
5604
5622
|
);
|
|
5605
|
-
async function f(
|
|
5606
|
-
var
|
|
5607
|
-
|
|
5623
|
+
async function f(E, _ = {}) {
|
|
5624
|
+
var h;
|
|
5625
|
+
_.viewName = E, Ne(d.value) && Object.assign(_, d.value);
|
|
5608
5626
|
try {
|
|
5609
|
-
const
|
|
5610
|
-
if (
|
|
5611
|
-
|
|
5612
|
-
const
|
|
5627
|
+
const y = await Oo(_);
|
|
5628
|
+
if (y.state === 200 && y.data) {
|
|
5629
|
+
b.value = y.data, s.value = (h = y.data) == null ? void 0 : h.title;
|
|
5630
|
+
const p = decodeURIComponent(n.fullPath);
|
|
5613
5631
|
l.appendTabMenuItem({
|
|
5614
5632
|
title: s.value,
|
|
5615
|
-
path:
|
|
5633
|
+
path: p,
|
|
5616
5634
|
query: n.query
|
|
5617
5635
|
});
|
|
5618
5636
|
}
|
|
@@ -5620,24 +5638,24 @@ const yl = /* @__PURE__ */ J({
|
|
|
5620
5638
|
}
|
|
5621
5639
|
}
|
|
5622
5640
|
const S = D(() => a.isGlobalLoaded);
|
|
5623
|
-
return (
|
|
5624
|
-
default:
|
|
5625
|
-
var
|
|
5641
|
+
return (E, _) => (v(), N(Ao, { title: s.value }, {
|
|
5642
|
+
default: k(() => {
|
|
5643
|
+
var h;
|
|
5626
5644
|
return [
|
|
5627
|
-
m(S) ? (v(!0), q(ve, { key: 0 }, ye((
|
|
5628
|
-
var
|
|
5645
|
+
m(S) ? (v(!0), q(ve, { key: 0 }, ye((h = b.value) == null ? void 0 : h.boards, (y) => {
|
|
5646
|
+
var p;
|
|
5629
5647
|
return v(), N(dn, {
|
|
5630
|
-
key: `${(
|
|
5648
|
+
key: `${(p = b.value) == null ? void 0 : p.viewName}_${y.boardType}`,
|
|
5631
5649
|
name: "fade",
|
|
5632
5650
|
mode: "out-in"
|
|
5633
5651
|
}, {
|
|
5634
|
-
default:
|
|
5635
|
-
var g,
|
|
5652
|
+
default: k(() => {
|
|
5653
|
+
var g, T;
|
|
5636
5654
|
return [
|
|
5637
5655
|
V(ln, {
|
|
5638
|
-
board:
|
|
5639
|
-
viewName: (g =
|
|
5640
|
-
viewProps: (
|
|
5656
|
+
board: y,
|
|
5657
|
+
viewName: (g = b.value) == null ? void 0 : g.viewName,
|
|
5658
|
+
viewProps: (T = b.value) == null ? void 0 : T.props
|
|
5641
5659
|
}, null, 8, ["board", "viewName", "viewProps"])
|
|
5642
5660
|
];
|
|
5643
5661
|
}),
|
|
@@ -5766,7 +5784,7 @@ const Bl = ["id", "poster"], Ll = ["src"], Dl = ["src"], Fl = /* @__PURE__ */ J(
|
|
|
5766
5784
|
subTitle: e.subTitle
|
|
5767
5785
|
}, null, 8, ["title", "subTitle"]),
|
|
5768
5786
|
V(Il, null, {
|
|
5769
|
-
tabs:
|
|
5787
|
+
tabs: k(() => [
|
|
5770
5788
|
Be(t.$slots, "tabs", {}, void 0, !0)
|
|
5771
5789
|
]),
|
|
5772
5790
|
_: 3
|
|
@@ -6385,10 +6403,10 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6385
6403
|
trigger: "change"
|
|
6386
6404
|
}
|
|
6387
6405
|
]
|
|
6388
|
-
}, c = z(), d = D(() => c.value.tTableRef),
|
|
6389
|
-
var
|
|
6390
|
-
return (
|
|
6391
|
-
}),
|
|
6406
|
+
}, c = z(), d = D(() => c.value.tTableRef), b = z(), f = D(() => b.value.tFormRef), S = D(() => {
|
|
6407
|
+
var A;
|
|
6408
|
+
return (A = d.value) == null ? void 0 : A.getTreeNode();
|
|
6409
|
+
}), E = D(() => {
|
|
6392
6410
|
switch (r.value) {
|
|
6393
6411
|
case "addGroup":
|
|
6394
6412
|
return "添加组";
|
|
@@ -6401,15 +6419,15 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6401
6419
|
default:
|
|
6402
6420
|
return "";
|
|
6403
6421
|
}
|
|
6404
|
-
}),
|
|
6405
|
-
() =>
|
|
6406
|
-
label:
|
|
6407
|
-
value:
|
|
6422
|
+
}), _ = D(() => S.value ? uo(S.value) : []), h = D(
|
|
6423
|
+
() => _.value.filter((A) => !A.url).map((A) => ({
|
|
6424
|
+
label: A.title,
|
|
6425
|
+
value: A.name
|
|
6408
6426
|
}))
|
|
6409
|
-
),
|
|
6427
|
+
), y = tt(), p = Nt();
|
|
6410
6428
|
function g() {
|
|
6411
|
-
const { fullPath:
|
|
6412
|
-
|
|
6429
|
+
const { fullPath: A, query: R } = y, G = decodeURIComponent(A);
|
|
6430
|
+
p.appendTabMenuItem({
|
|
6413
6431
|
title: o.value,
|
|
6414
6432
|
path: G,
|
|
6415
6433
|
query: R
|
|
@@ -6418,17 +6436,17 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6418
6436
|
et(() => {
|
|
6419
6437
|
g();
|
|
6420
6438
|
});
|
|
6421
|
-
function
|
|
6422
|
-
return
|
|
6439
|
+
function T(A) {
|
|
6440
|
+
return A.filter((R) => !R.isGroup);
|
|
6423
6441
|
}
|
|
6424
|
-
function
|
|
6425
|
-
return
|
|
6442
|
+
function w(A) {
|
|
6443
|
+
return A.filter((R) => R.isGroup);
|
|
6426
6444
|
}
|
|
6427
|
-
function
|
|
6445
|
+
function x(A = S.value) {
|
|
6428
6446
|
var R;
|
|
6429
|
-
d.value && ((R = d.value) == null || R.resetData(
|
|
6447
|
+
d.value && ((R = d.value) == null || R.resetData(A));
|
|
6430
6448
|
}
|
|
6431
|
-
function
|
|
6449
|
+
function M() {
|
|
6432
6450
|
l.value = !0, r.value = "addGroup";
|
|
6433
6451
|
}
|
|
6434
6452
|
function W() {
|
|
@@ -6444,17 +6462,17 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6444
6462
|
children: []
|
|
6445
6463
|
});
|
|
6446
6464
|
}
|
|
6447
|
-
function
|
|
6465
|
+
function oe(A) {
|
|
6448
6466
|
if (i.value.children) {
|
|
6449
|
-
const R = i.value.children.indexOf(
|
|
6467
|
+
const R = i.value.children.indexOf(A);
|
|
6450
6468
|
R != -1 && i.value.children.splice(R, 1);
|
|
6451
6469
|
}
|
|
6452
6470
|
}
|
|
6453
|
-
function
|
|
6454
|
-
i.value = it(
|
|
6471
|
+
function C(A) {
|
|
6472
|
+
i.value = it(A), l.value = !0, A.isGroup ? r.value = "editGroup" : r.value = "editItem";
|
|
6455
6473
|
}
|
|
6456
|
-
function ne(
|
|
6457
|
-
i.value = it(
|
|
6474
|
+
function ne(A) {
|
|
6475
|
+
i.value = it(A), l.value = !0, r.value = "moveItemTo";
|
|
6458
6476
|
}
|
|
6459
6477
|
function O() {
|
|
6460
6478
|
l.value = !1, setTimeout(() => {
|
|
@@ -6474,137 +6492,137 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6474
6492
|
children: []
|
|
6475
6493
|
};
|
|
6476
6494
|
}
|
|
6477
|
-
function L(
|
|
6495
|
+
function L(A, R) {
|
|
6478
6496
|
if (d.value) {
|
|
6479
|
-
const G =
|
|
6497
|
+
const G = _.value.find((re) => re.name == A);
|
|
6480
6498
|
if (G) {
|
|
6481
6499
|
const { parent: re } = G;
|
|
6482
|
-
R !== re && (i.value.parent = R, d.value.remove(
|
|
6500
|
+
R !== re && (i.value.parent = R, d.value.remove(A), d.value.appendTo(R, i.value));
|
|
6483
6501
|
}
|
|
6484
6502
|
}
|
|
6485
6503
|
}
|
|
6486
|
-
function Ae(
|
|
6504
|
+
function Ae(A) {
|
|
6487
6505
|
try {
|
|
6488
6506
|
const R = gt.confirm({
|
|
6489
6507
|
theme: "info",
|
|
6490
6508
|
header: "撤销组",
|
|
6491
|
-
body: `确定要撤销${
|
|
6509
|
+
body: `确定要撤销${A.title}吗?`,
|
|
6492
6510
|
onConfirm: () => {
|
|
6493
6511
|
var re, ke, ie, Te;
|
|
6494
6512
|
let G = [];
|
|
6495
|
-
if (
|
|
6496
|
-
(re =
|
|
6513
|
+
if (A.level == 1)
|
|
6514
|
+
(re = A.children) == null || re.forEach((B) => {
|
|
6497
6515
|
B.level = 1, B.parent = null, G.push(B);
|
|
6498
|
-
}), (ke = d.value) == null || ke.remove(
|
|
6516
|
+
}), (ke = d.value) == null || ke.remove(A.name), G.length && G.forEach((B) => {
|
|
6499
6517
|
var K;
|
|
6500
6518
|
(K = d.value) == null || K.appendTo("", B);
|
|
6501
6519
|
});
|
|
6502
|
-
else if (
|
|
6503
|
-
const { parent: B } =
|
|
6504
|
-
(ie =
|
|
6520
|
+
else if (A.level == 2) {
|
|
6521
|
+
const { parent: B } = A;
|
|
6522
|
+
(ie = A.children) == null || ie.forEach((K) => {
|
|
6505
6523
|
K.level = 2, K.parent = B, G.push(K);
|
|
6506
|
-
}), (Te = d.value) == null || Te.remove(
|
|
6507
|
-
var
|
|
6508
|
-
(
|
|
6524
|
+
}), (Te = d.value) == null || Te.remove(A.name), x(), G.forEach((K) => {
|
|
6525
|
+
var P;
|
|
6526
|
+
(P = d.value) == null || P.appendTo(B, K);
|
|
6509
6527
|
});
|
|
6510
6528
|
}
|
|
6511
|
-
R.destroy(),
|
|
6529
|
+
R.destroy(), te.success("撤销组成功");
|
|
6512
6530
|
}
|
|
6513
6531
|
});
|
|
6514
6532
|
} catch (R) {
|
|
6515
6533
|
console.error(R);
|
|
6516
6534
|
}
|
|
6517
|
-
|
|
6535
|
+
x();
|
|
6518
6536
|
}
|
|
6519
6537
|
function ue() {
|
|
6520
|
-
var
|
|
6521
|
-
(
|
|
6538
|
+
var A;
|
|
6539
|
+
(A = f.value) == null || A.validate().then((R) => {
|
|
6522
6540
|
var G, re, ke, ie, Te, B;
|
|
6523
6541
|
if (!Object.keys(R).length)
|
|
6524
|
-
r.value == "addGroup" ? (i.value.edificeKey = a.value, (G = d.value) == null || G.appendTo("", i.value),
|
|
6525
|
-
var
|
|
6526
|
-
(
|
|
6527
|
-
}),
|
|
6542
|
+
r.value == "addGroup" ? (i.value.edificeKey = a.value, (G = d.value) == null || G.appendTo("", i.value), te.success("保存新增组成功!")) : r.value == "editGroup" || r.value == "editItem" ? ((re = d.value) == null || re.setData(i.value.name, i.value), i.value.isGroup ? ((ie = (ke = i.value) == null ? void 0 : ke.children) == null || ie.forEach((K) => {
|
|
6543
|
+
var P;
|
|
6544
|
+
(P = d.value) == null || P.setData(K.name, K);
|
|
6545
|
+
}), te.success("编辑组成功!")) : (L(
|
|
6528
6546
|
i.value.name,
|
|
6529
6547
|
i.value.parent
|
|
6530
|
-
),
|
|
6548
|
+
), te.success("编辑菜单成功!"))) : r.value == "moveItemTo" && (L(
|
|
6531
6549
|
i.value.name,
|
|
6532
6550
|
i.value.parent
|
|
6533
|
-
),
|
|
6551
|
+
), te.success("转移组成功!")), O();
|
|
6534
6552
|
else {
|
|
6535
6553
|
const K = (B = (Te = Object.values(R)[0]) == null ? void 0 : Te[0]) == null ? void 0 : B.message;
|
|
6536
|
-
|
|
6554
|
+
te.warning(`${K}`);
|
|
6537
6555
|
}
|
|
6538
6556
|
});
|
|
6539
6557
|
}
|
|
6540
6558
|
function Ce() {
|
|
6541
|
-
var
|
|
6542
|
-
(
|
|
6559
|
+
var A;
|
|
6560
|
+
(A = d.value) == null || A.resetData(t.sideMenuTree), te.success("恢复默认菜单方案成功!");
|
|
6543
6561
|
}
|
|
6544
6562
|
async function Ve() {
|
|
6545
|
-
const
|
|
6563
|
+
const A = uo(S.value);
|
|
6546
6564
|
try {
|
|
6547
|
-
(await Kl({ menus: [...
|
|
6565
|
+
(await Kl({ menus: [...A] })).state == 404 && (t.setSideMenuConfig(S.value), s.value = S.value, te.success("保存菜单方案成功!"));
|
|
6548
6566
|
} catch (R) {
|
|
6549
|
-
|
|
6567
|
+
te.error(R.message);
|
|
6550
6568
|
}
|
|
6551
6569
|
}
|
|
6552
|
-
function
|
|
6553
|
-
const { current: R, target: G, currentIndex: re, targetIndex: ke } =
|
|
6570
|
+
function I(A) {
|
|
6571
|
+
const { current: R, target: G, currentIndex: re, targetIndex: ke } = A, ie = R.level, Te = R.parent, B = G.level, K = G.parent;
|
|
6554
6572
|
if (ie == B) {
|
|
6555
6573
|
if (Te == K)
|
|
6556
6574
|
return !0;
|
|
6557
|
-
|
|
6575
|
+
te.info("不同父菜单的菜单项,请使用转移至功能转移菜单");
|
|
6558
6576
|
} else
|
|
6559
|
-
|
|
6560
|
-
return
|
|
6577
|
+
te.info("不同层级的菜单项,请使用转移至功能转移菜单");
|
|
6578
|
+
return x(), !1;
|
|
6561
6579
|
}
|
|
6562
|
-
function U(
|
|
6563
|
-
|
|
6580
|
+
function U(A) {
|
|
6581
|
+
A.code && te.error("不同层级的菜单项,不允许调整顺序");
|
|
6564
6582
|
}
|
|
6565
|
-
function le(
|
|
6583
|
+
function le(A, R) {
|
|
6566
6584
|
var re;
|
|
6567
|
-
const G = (re = d.value) == null ? void 0 : re.getData(
|
|
6585
|
+
const G = (re = d.value) == null ? void 0 : re.getData(A.name);
|
|
6568
6586
|
if (G) {
|
|
6569
6587
|
const { parent: ke } = G;
|
|
6570
6588
|
if (ke) {
|
|
6571
|
-
const { children: ie } = ke.row, Te = ie == null ? void 0 : ie.findIndex((B) => B.name ==
|
|
6572
|
-
ie && (me(ie, R, Te),
|
|
6589
|
+
const { children: ie } = ke.row, Te = ie == null ? void 0 : ie.findIndex((B) => B.name == A.name);
|
|
6590
|
+
ie && (me(ie, R, Te), x());
|
|
6573
6591
|
} else {
|
|
6574
|
-
const ie = it(S), Te = ie.findIndex((B) => B.name ==
|
|
6575
|
-
me(ie, R, Te),
|
|
6592
|
+
const ie = it(S), Te = ie.findIndex((B) => B.name == A.name);
|
|
6593
|
+
me(ie, R, Te), x(ie);
|
|
6576
6594
|
}
|
|
6577
6595
|
}
|
|
6578
6596
|
}
|
|
6579
|
-
function me(
|
|
6597
|
+
function me(A, R, G) {
|
|
6580
6598
|
switch (R) {
|
|
6581
6599
|
case "up": {
|
|
6582
|
-
G != 0 ? [
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
] :
|
|
6600
|
+
G != 0 ? [A[G - 1], A[G]] = [
|
|
6601
|
+
A[G],
|
|
6602
|
+
A[G - 1]
|
|
6603
|
+
] : te.info("该菜单项已经在该组的第一个了!");
|
|
6586
6604
|
break;
|
|
6587
6605
|
}
|
|
6588
6606
|
case "down": {
|
|
6589
|
-
G !=
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
] :
|
|
6607
|
+
G != A.length - 1 ? [A[G + 1], A[G]] = [
|
|
6608
|
+
A[G],
|
|
6609
|
+
A[G + 1]
|
|
6610
|
+
] : te.info("该菜单项已经在该组的最后一个了!");
|
|
6593
6611
|
break;
|
|
6594
6612
|
}
|
|
6595
6613
|
}
|
|
6596
6614
|
}
|
|
6597
|
-
return (
|
|
6615
|
+
return (A, R) => {
|
|
6598
6616
|
const G = F("t-button"), re = F("t-icon"), ke = F("t-input"), ie = F("t-form-item"), Te = F("t-option"), B = F("t-select"), K = F("t-input-group");
|
|
6599
6617
|
return v(), N(m(kl), { title: o.value }, {
|
|
6600
|
-
default:
|
|
6618
|
+
default: k(() => [
|
|
6601
6619
|
V(m(Lo), null, {
|
|
6602
|
-
"left-operations":
|
|
6620
|
+
"left-operations": k(() => [
|
|
6603
6621
|
V(G, {
|
|
6604
6622
|
theme: "primary",
|
|
6605
|
-
onClick:
|
|
6623
|
+
onClick: M
|
|
6606
6624
|
}, {
|
|
6607
|
-
default:
|
|
6625
|
+
default: k(() => [
|
|
6608
6626
|
Q("添加组")
|
|
6609
6627
|
]),
|
|
6610
6628
|
_: 1
|
|
@@ -6613,18 +6631,18 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6613
6631
|
theme: "default",
|
|
6614
6632
|
onClick: Ce
|
|
6615
6633
|
}, {
|
|
6616
|
-
default:
|
|
6634
|
+
default: k(() => [
|
|
6617
6635
|
Q("恢复默认")
|
|
6618
6636
|
]),
|
|
6619
6637
|
_: 1
|
|
6620
6638
|
})
|
|
6621
6639
|
]),
|
|
6622
|
-
"right-operations":
|
|
6640
|
+
"right-operations": k(() => [
|
|
6623
6641
|
V(G, {
|
|
6624
6642
|
theme: "primary",
|
|
6625
6643
|
onClick: Ve
|
|
6626
6644
|
}, {
|
|
6627
|
-
default:
|
|
6645
|
+
default: k(() => [
|
|
6628
6646
|
Q("保存方案")
|
|
6629
6647
|
]),
|
|
6630
6648
|
_: 1
|
|
@@ -6642,7 +6660,7 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6642
6660
|
data: s.value,
|
|
6643
6661
|
columns: n,
|
|
6644
6662
|
dragSort: "row-handler",
|
|
6645
|
-
beforeDragSort:
|
|
6663
|
+
beforeDragSort: I,
|
|
6646
6664
|
onAbnormalDragSort: U,
|
|
6647
6665
|
tree: {
|
|
6648
6666
|
childrenKey: "children",
|
|
@@ -6652,8 +6670,8 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6652
6670
|
}
|
|
6653
6671
|
}
|
|
6654
6672
|
}, {
|
|
6655
|
-
treeExpandAndFoldIcon:
|
|
6656
|
-
|
|
6673
|
+
treeExpandAndFoldIcon: k(({ type: P }) => [
|
|
6674
|
+
P === "expand" ? (v(), N(re, {
|
|
6657
6675
|
key: 0,
|
|
6658
6676
|
name: "chevron-right"
|
|
6659
6677
|
})) : (v(), N(re, {
|
|
@@ -6661,19 +6679,19 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6661
6679
|
name: "chevron-up"
|
|
6662
6680
|
}))
|
|
6663
6681
|
]),
|
|
6664
|
-
drag:
|
|
6682
|
+
drag: k(() => [
|
|
6665
6683
|
V(re, { name: "move" })
|
|
6666
6684
|
]),
|
|
6667
|
-
title:
|
|
6685
|
+
title: k(({ row: P }) => [
|
|
6668
6686
|
Y("span", Gl, [
|
|
6669
6687
|
Y("span", {
|
|
6670
|
-
class: $(["title",
|
|
6688
|
+
class: $(["title", P.isGroup ? "title-bold" : "title-child"])
|
|
6671
6689
|
}, [
|
|
6672
|
-
|
|
6673
|
-
|
|
6690
|
+
P.level == 1 && P.isGroup ? (v(), q(ve, { key: 0 }, [
|
|
6691
|
+
P.icon ? (v(), N(re, {
|
|
6674
6692
|
key: 0,
|
|
6675
6693
|
class: "title-icon",
|
|
6676
|
-
name:
|
|
6694
|
+
name: P.icon,
|
|
6677
6695
|
size: "large"
|
|
6678
6696
|
}, null, 8, ["name"])) : (v(), N(re, {
|
|
6679
6697
|
key: 1,
|
|
@@ -6682,19 +6700,19 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6682
6700
|
size: "large"
|
|
6683
6701
|
}))
|
|
6684
6702
|
], 64)) : j("", !0),
|
|
6685
|
-
Q(" " + ge(
|
|
6703
|
+
Q(" " + ge(P.title), 1)
|
|
6686
6704
|
], 2),
|
|
6687
|
-
|
|
6705
|
+
P.isGroup ? (v(), q("span", jl, ge(P.children.length) + "项", 1)) : j("", !0)
|
|
6688
6706
|
])
|
|
6689
6707
|
]),
|
|
6690
|
-
operations:
|
|
6708
|
+
operations: k(({ row: P }) => [
|
|
6691
6709
|
Y("div", Wl, [
|
|
6692
6710
|
V(G, {
|
|
6693
6711
|
variant: "text",
|
|
6694
6712
|
theme: "primary",
|
|
6695
|
-
onClick: (H) =>
|
|
6713
|
+
onClick: (H) => C(P)
|
|
6696
6714
|
}, {
|
|
6697
|
-
default:
|
|
6715
|
+
default: k(() => [
|
|
6698
6716
|
Q(" 编辑修改 ")
|
|
6699
6717
|
]),
|
|
6700
6718
|
_: 2
|
|
@@ -6702,20 +6720,20 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6702
6720
|
V(G, {
|
|
6703
6721
|
variant: "text",
|
|
6704
6722
|
theme: "primary",
|
|
6705
|
-
disabled:
|
|
6706
|
-
onClick: (H) => ne(
|
|
6723
|
+
disabled: P.isGroup,
|
|
6724
|
+
onClick: (H) => ne(P)
|
|
6707
6725
|
}, {
|
|
6708
|
-
default:
|
|
6709
|
-
Q(ge(
|
|
6726
|
+
default: k(() => [
|
|
6727
|
+
Q(ge(P.isGroup ? "-----" : "转移至"), 1)
|
|
6710
6728
|
]),
|
|
6711
6729
|
_: 2
|
|
6712
6730
|
}, 1032, ["disabled", "onClick"]),
|
|
6713
6731
|
V(G, {
|
|
6714
6732
|
variant: "text",
|
|
6715
6733
|
theme: "primary",
|
|
6716
|
-
onClick: (H) => le(
|
|
6734
|
+
onClick: (H) => le(P, "up")
|
|
6717
6735
|
}, {
|
|
6718
|
-
default:
|
|
6736
|
+
default: k(() => [
|
|
6719
6737
|
Q(" 上移 ")
|
|
6720
6738
|
]),
|
|
6721
6739
|
_: 2
|
|
@@ -6723,9 +6741,9 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6723
6741
|
V(G, {
|
|
6724
6742
|
variant: "text",
|
|
6725
6743
|
theme: "primary",
|
|
6726
|
-
onClick: (H) => le(
|
|
6744
|
+
onClick: (H) => le(P, "down")
|
|
6727
6745
|
}, {
|
|
6728
|
-
default:
|
|
6746
|
+
default: k(() => [
|
|
6729
6747
|
Q(" 下移 ")
|
|
6730
6748
|
]),
|
|
6731
6749
|
_: 2
|
|
@@ -6733,11 +6751,11 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6733
6751
|
V(G, {
|
|
6734
6752
|
variant: "text",
|
|
6735
6753
|
theme: "primary",
|
|
6736
|
-
disabled: !
|
|
6737
|
-
onClick: (H) => Ae(
|
|
6754
|
+
disabled: !P.isGroup,
|
|
6755
|
+
onClick: (H) => Ae(P)
|
|
6738
6756
|
}, {
|
|
6739
|
-
default:
|
|
6740
|
-
Q(ge(
|
|
6757
|
+
default: k(() => [
|
|
6758
|
+
Q(ge(P.isGroup ? "撤销组" : "-----"), 1)
|
|
6741
6759
|
]),
|
|
6742
6760
|
_: 2
|
|
6743
6761
|
}, 1032, ["disabled", "onClick"])
|
|
@@ -6749,14 +6767,14 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6749
6767
|
commonDialogProps: {
|
|
6750
6768
|
visible: l.value,
|
|
6751
6769
|
onClose: O,
|
|
6752
|
-
header: m(
|
|
6770
|
+
header: m(E),
|
|
6753
6771
|
footer: !1
|
|
6754
6772
|
}
|
|
6755
6773
|
}, {
|
|
6756
|
-
default:
|
|
6774
|
+
default: k(() => [
|
|
6757
6775
|
V(m(Fn), {
|
|
6758
6776
|
ref_key: "commonFormRef",
|
|
6759
|
-
ref:
|
|
6777
|
+
ref: b,
|
|
6760
6778
|
commonFormProps: {
|
|
6761
6779
|
rules: u,
|
|
6762
6780
|
data: i.value,
|
|
@@ -6764,18 +6782,18 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6764
6782
|
labelWidth: "110px"
|
|
6765
6783
|
}
|
|
6766
6784
|
}, Tt({
|
|
6767
|
-
footer:
|
|
6785
|
+
footer: k(() => [
|
|
6768
6786
|
V(G, {
|
|
6769
6787
|
theme: "default",
|
|
6770
6788
|
onClick: O
|
|
6771
6789
|
}, {
|
|
6772
|
-
default:
|
|
6790
|
+
default: k(() => [
|
|
6773
6791
|
Q("取消")
|
|
6774
6792
|
]),
|
|
6775
6793
|
_: 1
|
|
6776
6794
|
}),
|
|
6777
6795
|
V(G, { onClick: ue }, {
|
|
6778
|
-
default:
|
|
6796
|
+
default: k(() => [
|
|
6779
6797
|
Q("确定")
|
|
6780
6798
|
]),
|
|
6781
6799
|
_: 1
|
|
@@ -6785,17 +6803,17 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6785
6803
|
}, [
|
|
6786
6804
|
r.value == "addGroup" || r.value == "editGroup" || r.value == "editItem" ? {
|
|
6787
6805
|
name: "body",
|
|
6788
|
-
fn:
|
|
6806
|
+
fn: k(() => [
|
|
6789
6807
|
V(ie, {
|
|
6790
6808
|
name: "title",
|
|
6791
6809
|
label: "组名称",
|
|
6792
6810
|
requiredMark: !0
|
|
6793
6811
|
}, {
|
|
6794
|
-
default:
|
|
6812
|
+
default: k(() => [
|
|
6795
6813
|
V(ke, {
|
|
6796
6814
|
style: { width: "360px" },
|
|
6797
6815
|
modelValue: i.value.title,
|
|
6798
|
-
"onUpdate:modelValue": R[0] || (R[0] = (
|
|
6816
|
+
"onUpdate:modelValue": R[0] || (R[0] = (P) => i.value.title = P),
|
|
6799
6817
|
placeholder: "请输入组名称"
|
|
6800
6818
|
}, null, 8, ["modelValue"])
|
|
6801
6819
|
]),
|
|
@@ -6806,11 +6824,11 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6806
6824
|
label: "名称标识",
|
|
6807
6825
|
requiredMark: !0
|
|
6808
6826
|
}, {
|
|
6809
|
-
default:
|
|
6827
|
+
default: k(() => [
|
|
6810
6828
|
V(ke, {
|
|
6811
6829
|
style: { width: "360px" },
|
|
6812
6830
|
modelValue: i.value.name,
|
|
6813
|
-
"onUpdate:modelValue": R[1] || (R[1] = (
|
|
6831
|
+
"onUpdate:modelValue": R[1] || (R[1] = (P) => i.value.name = P),
|
|
6814
6832
|
placeholder: "请输入名称标识,例如 SYSTEM"
|
|
6815
6833
|
}, null, 8, ["modelValue"])
|
|
6816
6834
|
]),
|
|
@@ -6822,15 +6840,15 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6822
6840
|
label: "图标标识",
|
|
6823
6841
|
requiredMark: !0
|
|
6824
6842
|
}, {
|
|
6825
|
-
default:
|
|
6843
|
+
default: k(() => [
|
|
6826
6844
|
V(B, {
|
|
6827
6845
|
modelValue: i.value.icon,
|
|
6828
|
-
"onUpdate:modelValue": R[2] || (R[2] = (
|
|
6846
|
+
"onUpdate:modelValue": R[2] || (R[2] = (P) => i.value.icon = P),
|
|
6829
6847
|
placeholder: "请选择图标标识",
|
|
6830
6848
|
popupProps: { overlayInnerStyle: { width: "326px" } },
|
|
6831
6849
|
clearable: !0
|
|
6832
6850
|
}, {
|
|
6833
|
-
valueDisplay:
|
|
6851
|
+
valueDisplay: k(() => [
|
|
6834
6852
|
i.value.icon ? (v(), q("span", ql, [
|
|
6835
6853
|
V(re, {
|
|
6836
6854
|
name: i.value.icon,
|
|
@@ -6839,16 +6857,16 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6839
6857
|
Q(ge(i.value.icon), 1)
|
|
6840
6858
|
])) : (v(), q("span", zl, "请选择图标标识"))
|
|
6841
6859
|
]),
|
|
6842
|
-
default:
|
|
6843
|
-
(v(!0), q(ve, null, ye(m(Ul), (
|
|
6844
|
-
value:
|
|
6845
|
-
key:
|
|
6860
|
+
default: k(() => [
|
|
6861
|
+
(v(!0), q(ve, null, ye(m(Ul), (P) => (v(), N(Te, {
|
|
6862
|
+
value: P.stem,
|
|
6863
|
+
key: P.stem,
|
|
6846
6864
|
class: "overlay-options"
|
|
6847
6865
|
}, {
|
|
6848
|
-
default:
|
|
6866
|
+
default: k(() => [
|
|
6849
6867
|
Y("span", Hl, [
|
|
6850
6868
|
V(re, {
|
|
6851
|
-
name:
|
|
6869
|
+
name: P.stem,
|
|
6852
6870
|
size: "small"
|
|
6853
6871
|
}, null, 8, ["name"])
|
|
6854
6872
|
])
|
|
@@ -6867,25 +6885,25 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6867
6885
|
label: "父菜单",
|
|
6868
6886
|
requiredMark: !0
|
|
6869
6887
|
}, {
|
|
6870
|
-
default:
|
|
6888
|
+
default: k(() => [
|
|
6871
6889
|
V(B, {
|
|
6872
|
-
options: m(
|
|
6890
|
+
options: m(h),
|
|
6873
6891
|
modelValue: i.value.parent,
|
|
6874
|
-
"onUpdate:modelValue": R[3] || (R[3] = (
|
|
6892
|
+
"onUpdate:modelValue": R[3] || (R[3] = (P) => i.value.parent = P)
|
|
6875
6893
|
}, null, 8, ["options", "modelValue"])
|
|
6876
6894
|
]),
|
|
6877
6895
|
_: 1
|
|
6878
6896
|
})),
|
|
6879
|
-
!
|
|
6897
|
+
!w(i.value.children).length && i.value.level == 1 ? (v(), N(ie, {
|
|
6880
6898
|
key: 2,
|
|
6881
6899
|
label: "分组"
|
|
6882
6900
|
}, {
|
|
6883
|
-
default:
|
|
6901
|
+
default: k(() => [
|
|
6884
6902
|
V(G, {
|
|
6885
6903
|
variant: "outline",
|
|
6886
6904
|
onClick: W
|
|
6887
6905
|
}, {
|
|
6888
|
-
default:
|
|
6906
|
+
default: k(() => [
|
|
6889
6907
|
Q("添加分组")
|
|
6890
6908
|
]),
|
|
6891
6909
|
_: 1
|
|
@@ -6893,19 +6911,19 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6893
6911
|
]),
|
|
6894
6912
|
_: 1
|
|
6895
6913
|
})) : j("", !0),
|
|
6896
|
-
(v(!0), q(ve, null, ye(
|
|
6914
|
+
(v(!0), q(ve, null, ye(w(i.value.children), (P, H) => (v(), N(ie, {
|
|
6897
6915
|
key: "group" + H,
|
|
6898
6916
|
label: H == 0 ? "分组" : " "
|
|
6899
6917
|
}, {
|
|
6900
|
-
default:
|
|
6918
|
+
default: k(() => [
|
|
6901
6919
|
V(K, { style: { width: "350px" } }, {
|
|
6902
|
-
default:
|
|
6920
|
+
default: k(() => [
|
|
6903
6921
|
V(ke, {
|
|
6904
6922
|
style: { width: "120px" },
|
|
6905
6923
|
placeholder: "请输入分组名称 ",
|
|
6906
|
-
value:
|
|
6924
|
+
value: P.title,
|
|
6907
6925
|
onChange: (de) => m(qe)(
|
|
6908
|
-
|
|
6926
|
+
w(i.value.children),
|
|
6909
6927
|
`[${H}].title`,
|
|
6910
6928
|
de
|
|
6911
6929
|
)
|
|
@@ -6913,9 +6931,9 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6913
6931
|
V(ke, {
|
|
6914
6932
|
style: { width: "120px" },
|
|
6915
6933
|
placeholder: "请输入分组标识 ",
|
|
6916
|
-
value:
|
|
6934
|
+
value: P.name,
|
|
6917
6935
|
onChange: (de) => m(qe)(
|
|
6918
|
-
|
|
6936
|
+
w(i.value.children),
|
|
6919
6937
|
`[${H}].name`,
|
|
6920
6938
|
de
|
|
6921
6939
|
)
|
|
@@ -6923,20 +6941,20 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6923
6941
|
V(G, {
|
|
6924
6942
|
variant: "outline",
|
|
6925
6943
|
theme: "default",
|
|
6926
|
-
onClick: (de) =>
|
|
6944
|
+
onClick: (de) => oe(P)
|
|
6927
6945
|
}, {
|
|
6928
|
-
default:
|
|
6946
|
+
default: k(() => [
|
|
6929
6947
|
Q("- ")
|
|
6930
6948
|
]),
|
|
6931
6949
|
_: 2
|
|
6932
6950
|
}, 1032, ["onClick"]),
|
|
6933
|
-
H ==
|
|
6951
|
+
H == w(i.value.children).length - 1 ? (v(), N(G, {
|
|
6934
6952
|
key: 0,
|
|
6935
6953
|
variant: "outline",
|
|
6936
6954
|
theme: "default",
|
|
6937
6955
|
onClick: mn(W, ["prevent"])
|
|
6938
6956
|
}, {
|
|
6939
|
-
default:
|
|
6957
|
+
default: k(() => [
|
|
6940
6958
|
Q("+ ")
|
|
6941
6959
|
]),
|
|
6942
6960
|
_: 1
|
|
@@ -6947,18 +6965,18 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6947
6965
|
]),
|
|
6948
6966
|
_: 2
|
|
6949
6967
|
}, 1032, ["label"]))), 128)),
|
|
6950
|
-
r.value != "addGroup" ? (v(!0), q(ve, { key: 3 }, ye(
|
|
6968
|
+
r.value != "addGroup" ? (v(!0), q(ve, { key: 3 }, ye(T(i.value.children), (P, H) => (v(), N(ie, {
|
|
6951
6969
|
key: "item" + H,
|
|
6952
6970
|
label: H == 0 ? "子菜单项" : " "
|
|
6953
6971
|
}, {
|
|
6954
|
-
default:
|
|
6972
|
+
default: k(() => [
|
|
6955
6973
|
V(K, { style: { width: "350px" } }, {
|
|
6956
|
-
default:
|
|
6974
|
+
default: k(() => [
|
|
6957
6975
|
V(ke, {
|
|
6958
6976
|
placeholder: "请输入子菜单名称 ",
|
|
6959
|
-
value:
|
|
6977
|
+
value: P.title,
|
|
6960
6978
|
onChange: (de) => m(qe)(
|
|
6961
|
-
|
|
6979
|
+
T(
|
|
6962
6980
|
i.value.children
|
|
6963
6981
|
),
|
|
6964
6982
|
`[${H}].title`,
|
|
@@ -6975,18 +6993,18 @@ const Gl = { class: "menu-title" }, jl = {
|
|
|
6975
6993
|
key: "0"
|
|
6976
6994
|
} : r.value == "moveItemTo" ? {
|
|
6977
6995
|
name: "body",
|
|
6978
|
-
fn:
|
|
6996
|
+
fn: k(() => [
|
|
6979
6997
|
i.value.isGroup ? j("", !0) : (v(), N(ie, {
|
|
6980
6998
|
key: 0,
|
|
6981
6999
|
name: "parent",
|
|
6982
7000
|
label: "转移至",
|
|
6983
7001
|
requiredMark: !0
|
|
6984
7002
|
}, {
|
|
6985
|
-
default:
|
|
7003
|
+
default: k(() => [
|
|
6986
7004
|
V(B, {
|
|
6987
|
-
options: m(
|
|
7005
|
+
options: m(h),
|
|
6988
7006
|
modelValue: i.value.parent,
|
|
6989
|
-
"onUpdate:modelValue": R[4] || (R[4] = (
|
|
7007
|
+
"onUpdate:modelValue": R[4] || (R[4] = (P) => i.value.parent = P)
|
|
6990
7008
|
}, null, 8, ["options", "modelValue"])
|
|
6991
7009
|
]),
|
|
6992
7010
|
_: 1
|
|
@@ -7008,8 +7026,8 @@ const Nr = Qe($l);
|
|
|
7008
7026
|
function Xl(e, t) {
|
|
7009
7027
|
e.component("GView", wl);
|
|
7010
7028
|
}
|
|
7011
|
-
function Sr() {
|
|
7012
|
-
Le(), Nt(), Xt(), $t();
|
|
7029
|
+
function Sr(e) {
|
|
7030
|
+
Le(e), Nt(e), Xt(e), $t(e);
|
|
7013
7031
|
}
|
|
7014
7032
|
const Vr = {
|
|
7015
7033
|
install: Xl
|