ss-component-new 1.1.714 → 1.1.716
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/{array-D1rENrtC.js → array-CV47iU9i.js} +1 -1
- package/dist/{array-DiC30wYM.cjs → array-C_A3GqHl.cjs} +1 -1
- package/dist/icons/svg/colFilter.svg +1 -0
- package/dist/icons/svg/colOperate.svg +1 -0
- package/dist/index-6cIk3a7c.cjs +1 -0
- package/dist/index-8oaOF8hU.cjs +1 -0
- package/dist/index-B-SZ9FOJ.cjs +1 -0
- package/dist/{index-k3Bxo8CN.js → index-B7x9V7t6.js} +7 -8
- package/dist/{index-DqIn00H8.js → index-B9e8jfXC.js} +2 -2
- package/dist/{index-B7xlKvbO.cjs → index-BBztMuYS.cjs} +1 -1
- package/dist/index-BDIZYI6c.cjs +1 -0
- package/dist/index-BJzLztcT.cjs +4207 -0
- package/dist/{index-BhN_xaKB.js → index-BUr_R7W4.js} +2 -2
- package/dist/{index-CCxinvIS.js → index-Ba_1AoLH.js} +8 -9
- package/dist/index-BmwSczsQ.cjs +1 -0
- package/dist/{index-Dq3Gb645.cjs → index-BqIFXFlH.cjs} +1 -1
- package/dist/{index-Cpx_u9T6.js → index-BuVGPawZ.js} +3 -3
- package/dist/index-C0WZBDT5.cjs +1 -0
- package/dist/{index-BFZBbjlZ.js → index-C1XS3ENl.js} +2 -2
- package/dist/index-C3NA0aaD.cjs +1 -0
- package/dist/index-C3fPP82O.cjs +15 -0
- package/dist/index-C6SI8hvh.cjs +1 -0
- package/dist/index-C9QubKHj.cjs +1 -0
- package/dist/{index-Byy_Xtef.js → index-CI5n0Xv4.js} +5 -6
- package/dist/{index-H-bGpaNs.js → index-CIlL2SK6.js} +1 -1
- package/dist/{index-cplChbGm.js → index-CVBLCbGm.js} +5 -5
- package/dist/{index-DldssUmp.cjs → index-CYxb4HE7.cjs} +1 -1
- package/dist/{index-BEHcZREm.js → index-Cfirfu0f.js} +22 -23
- package/dist/{index-S15gAcDT.js → index-CiKRvh8o.js} +14 -15
- package/dist/{index-JNw-0LM6.js → index-CtoAlRfk.js} +10 -11
- package/dist/{index-CRKPHTGu.js → index-D8qVbjll.js} +1 -1
- package/dist/index-DZKcDen7.cjs +1 -0
- package/dist/index-DjUopiVE.cjs +1 -0
- package/dist/index-DkuUEvSP.cjs +1 -0
- package/dist/{index-C9_p4Vm6.js → index-Dr65gNkt.js} +463 -461
- package/dist/index-DuVdlGvS.cjs +1 -0
- package/dist/index-HqICPCny.cjs +1 -0
- package/dist/{index-FC3u5SDQ.js → index-KCVZOl0Y.js} +5 -5
- package/dist/{index-B9dgbtyu.js → index-QzT_XISi.js} +43 -44
- package/dist/index-VBY1u2Ig.cjs +1 -0
- package/dist/{index-BvgxZw84.js → index-WEQVqMJE.js} +4 -4
- package/dist/index-Woj44XOP.cjs +1 -0
- package/dist/{index-DwW2YuMT.js → index-XoIvvStS.js} +1 -1
- package/dist/{index-DxQ-WNaQ.js → index-ZC7nAMFX.js} +8107 -8024
- package/dist/{index-DOs-6Cx7.cjs → index-glKQqAZb.cjs} +1 -1
- package/dist/{index-C3bhZmjl.js → index-h6SXo9wQ.js} +5 -5
- package/dist/{index-Bvnvuwkn.js → index-hVEEEQQc.js} +4434 -4369
- package/dist/{index-CU5qn5hA.js → index-mQLSN20F.js} +2 -2
- package/dist/index-mSkQE8pC.cjs +1 -0
- package/dist/{index-di1QdZZr.js → index-s4l8lwWV.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-BcMm1KLj.cjs → index.vue_vue_type_script_setup_true_lang-CfqBx2Ou.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DN-3ZDhB.js → index.vue_vue_type_script_setup_true_lang-Cm3CCGlq.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DCPQmJ8P.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXjL5frf.js} +14297 -14277
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BHHPVcqx.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-NOV5eRfA.cjs} +142 -142
- package/dist/{index.vue_vue_type_style_index_0_scoped_ffb37532_lang-bjlUC_Ux.cjs → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DAM-jGzL.cjs} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_ffb37532_lang-DB4kiFum.js → index.vue_vue_type_style_index_0_scoped_8606206c_lang-DxfIMoF9.js} +105 -106
- package/dist/{index.vue_vue_type_style_index_0_scoped_c81d0427_lang-Bem94E3F.js → index.vue_vue_type_style_index_0_scoped_c81d0427_lang-BdKfxEpu.js} +53 -54
- package/dist/index.vue_vue_type_style_index_0_scoped_c81d0427_lang-DAqDZ6lJ.cjs +1 -0
- package/dist/{menu-BRpPhHno.js → login-BLjZKKjO.js} +1006 -881
- package/dist/login-C8QOZ9u0.cjs +11 -0
- package/dist/{main-slCUa76N.js → main-BEId0V1l.js} +4 -4
- package/dist/main-BN-IctwQ.cjs +1 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-BY_tDAcc.js → threeModel-BhgvBDsA.js} +2 -2
- package/dist/threeModel-D5_-Dbt2.cjs +1 -0
- package/package.json +1 -1
- package/public/icons/svg/colFilter.svg +1 -0
- package/public/icons/svg/colOperate.svg +1 -0
- package/dist/index-B1XyxOHh.cjs +0 -1
- package/dist/index-B6eLhxMJ.cjs +0 -1
- package/dist/index-BLZNIRkY.cjs +0 -15
- package/dist/index-BYA9VCDi.cjs +0 -1
- package/dist/index-C-VUvax5.cjs +0 -1
- package/dist/index-CGebARL6.cjs +0 -1
- package/dist/index-CHcDZKUi.cjs +0 -1
- package/dist/index-COoh2ijF.cjs +0 -1
- package/dist/index-CPj1rc3m.cjs +0 -1
- package/dist/index-Cdz4ZgAR.cjs +0 -4207
- package/dist/index-Cj-k4kxo.cjs +0 -1
- package/dist/index-Coxoz81K.cjs +0 -1
- package/dist/index-D6xSLp3Q.cjs +0 -1
- package/dist/index-DSC06oXb.cjs +0 -1
- package/dist/index-DTLKy7rp.cjs +0 -1
- package/dist/index-Decs_B4B.cjs +0 -1
- package/dist/index-Dp1mAXQ2.cjs +0 -1
- package/dist/index-Nn47GzGZ.cjs +0 -1
- package/dist/index-Yr549Xbj.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_c81d0427_lang-CiYmZBSD.cjs +0 -1
- package/dist/login-CCz_BcJe.cjs +0 -1
- package/dist/login-h0Hl0hFq.js +0 -129
- package/dist/main-DUyxM_WP.cjs +0 -1
- package/dist/menu-vml_xHJD.cjs +0 -11
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/dist/threeModel-W5f1wios.cjs +0 -1
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
2
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
import { defineAsyncComponent as te, computed as E, onMounted as U, resolveComponent as le, createBlock as W, openBlock as R, withCtx as re, resolveDynamicComponent as oe, defineComponent as ue, defineProps as se, ref as F, watch as me, reactive as ie } from "vue";
|
|
2
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXjL5frf.js";
|
|
3
3
|
import { bo as ce, g as ve } from "./index-BCZ59Y4K.js";
|
|
4
|
-
import { a as ge, u as pe, p as be, s as O } from "./
|
|
5
|
-
import { s as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import { g as
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const k = ne(() => import("./index-Bvnvuwkn.js").then((c) => c.l));
|
|
4
|
+
import { a as ge, u as pe, p as be, s as O, l as Fe } from "./login-BLjZKKjO.js";
|
|
5
|
+
import { s as he } from "./index-hVEEEQQc.js";
|
|
6
|
+
import { useRouter as fe } from "vue-router";
|
|
7
|
+
import { g as Ce } from "./index-Cfirfu0f.js";
|
|
8
|
+
import { E as de } from "./index-D8qVbjll.js";
|
|
9
|
+
const k = te(() => import("./index-hVEEEQQc.js").then((c) => c.l));
|
|
11
10
|
k.install = (c) => {
|
|
12
11
|
c.component("ssMenu", k);
|
|
13
12
|
};
|
|
@@ -20,9 +19,9 @@ const Se = {
|
|
|
20
19
|
const s = c, h = E(() => ce[s.name]);
|
|
21
20
|
return U(() => {
|
|
22
21
|
}), (z, v) => {
|
|
23
|
-
const A =
|
|
22
|
+
const A = le("el-icon");
|
|
24
23
|
return R(), W(A, null, {
|
|
25
|
-
default:
|
|
24
|
+
default: re(() => [
|
|
26
25
|
(R(), W(oe(h.value)))
|
|
27
26
|
]),
|
|
28
27
|
_: 1
|
|
@@ -126,7 +125,7 @@ const Se = {
|
|
|
126
125
|
name: "--vertical-menu-padding",
|
|
127
126
|
value: "0.5rem"
|
|
128
127
|
}
|
|
129
|
-
],
|
|
128
|
+
], He = [
|
|
130
129
|
{
|
|
131
130
|
name: "--horizontal-menu-bg",
|
|
132
131
|
value: "#333333"
|
|
@@ -335,7 +334,7 @@ const Se = {
|
|
|
335
334
|
name: "--horizontal-menuitem-font",
|
|
336
335
|
value: "SourceHanSansSC, SourceHanSansSC"
|
|
337
336
|
}
|
|
338
|
-
],
|
|
337
|
+
], We = [
|
|
339
338
|
{
|
|
340
339
|
name: "--ssbutton-theme-color",
|
|
341
340
|
value: "#FFFFFF"
|
|
@@ -372,7 +371,7 @@ const Se = {
|
|
|
372
371
|
name: "--ssComponent-theme-watermark",
|
|
373
372
|
value: 'url("@/assets/image/watermark-blue.png")'
|
|
374
373
|
}
|
|
375
|
-
],
|
|
374
|
+
], Re = [
|
|
376
375
|
{
|
|
377
376
|
name: "--ssbutton-theme-color",
|
|
378
377
|
value: "#323333"
|
|
@@ -410,12 +409,12 @@ const Se = {
|
|
|
410
409
|
name: "--ssComponent-theme-watermark",
|
|
411
410
|
value: 'url("@/assets/image/watermark.png")'
|
|
412
411
|
}
|
|
413
|
-
],
|
|
412
|
+
], Oe = ue({
|
|
414
413
|
name: "menu",
|
|
415
414
|
components: {
|
|
416
415
|
ssMenu: k,
|
|
417
416
|
DynamicIcon: Se,
|
|
418
|
-
ssDialog:
|
|
417
|
+
ssDialog: he
|
|
419
418
|
},
|
|
420
419
|
setup() {
|
|
421
420
|
const c = se({
|
|
@@ -423,7 +422,7 @@ const Se = {
|
|
|
423
422
|
type: String,
|
|
424
423
|
default: "vertical"
|
|
425
424
|
}
|
|
426
|
-
}), s = ge(), h = pe(be), z = F(0), v =
|
|
425
|
+
}), s = ge(), h = pe(be), z = F(0), v = fe(), {
|
|
427
426
|
cacheUpdatingData: A
|
|
428
427
|
} = O(h), { asideMenus: N, menuTriggerType: V, platform: $ } = O(s), J = E(() => c == null ? void 0 : c.mode), B = E(() => {
|
|
429
428
|
let e = [...N.value];
|
|
@@ -434,14 +433,14 @@ const Se = {
|
|
|
434
433
|
}), K = async (e) => {
|
|
435
434
|
h.setRouteToChildPath(""), s.setMenuTriggerType("click"), s.setActiveMenuPath(e == null ? void 0 : e.path), s.setActiveAsideMenu(e), e.isRouter ? v.push(e.path) : v.push("/");
|
|
436
435
|
}, L = async (e) => {
|
|
437
|
-
const a =
|
|
436
|
+
const a = Fe(B.value, "path", e);
|
|
438
437
|
s.setActiveAsideMenu(a), h.setRouteToChildPath(""), V.value === "click" ? z.value === 1 ? s.setActiveMenuPath(sessionStorage.getItem("pageKey")) : s.setActiveMenuPath(e) : (s.setMenuTriggerType("click"), s.setActiveMenuPath(e)), e != null && e.startsWith("/") ? v.push(e) : v.push("/"), z.value++;
|
|
439
438
|
}, j = (e) => {
|
|
440
439
|
s.setActiveMenuPath(e);
|
|
441
440
|
}, y = (e) => {
|
|
442
441
|
const a = document.documentElement;
|
|
443
|
-
e == null || e.forEach((
|
|
444
|
-
a.style.setProperty(
|
|
442
|
+
e == null || e.forEach((r) => {
|
|
443
|
+
a.style.setProperty(r.name, r.value);
|
|
445
444
|
});
|
|
446
445
|
};
|
|
447
446
|
U(() => {
|
|
@@ -455,19 +454,19 @@ const Se = {
|
|
|
455
454
|
e === "browser" ? y(Me) : e === "client" && (y(ye), y(ze));
|
|
456
455
|
}, { immediate: !0 });
|
|
457
456
|
const G = (e, a) => {
|
|
458
|
-
function
|
|
459
|
-
o == null || o.forEach((
|
|
457
|
+
function r(o) {
|
|
458
|
+
o == null || o.forEach((n) => {
|
|
460
459
|
var p, C;
|
|
461
|
-
const u = (p =
|
|
462
|
-
|
|
460
|
+
const u = (p = n == null ? void 0 : n.path) != null && p.startsWith("/") ? (C = n == null ? void 0 : n.path) == null ? void 0 : C.substring(1) : n == null ? void 0 : n.path;
|
|
461
|
+
n.show = a == null ? void 0 : a.some((b) => b == null ? void 0 : b.includes(u)), n.children && r(n.children);
|
|
463
462
|
});
|
|
464
463
|
}
|
|
465
|
-
return
|
|
464
|
+
return r(e), e;
|
|
466
465
|
}, Q = (e, a) => {
|
|
467
466
|
if (Array.isArray(a)) {
|
|
468
|
-
const
|
|
467
|
+
const r = Array.from(new Set(a == null ? void 0 : a.map((o) => o.substring(0, o.lastIndexOf("/")))));
|
|
469
468
|
return {
|
|
470
|
-
data: G(e,
|
|
469
|
+
data: G(e, r),
|
|
471
470
|
isFlag: !1
|
|
472
471
|
};
|
|
473
472
|
} else
|
|
@@ -479,38 +478,38 @@ const Se = {
|
|
|
479
478
|
title: "菜单配置",
|
|
480
479
|
width: "30%",
|
|
481
480
|
type: "create"
|
|
482
|
-
}), X = (e) =>
|
|
481
|
+
}), X = (e) => Ce(e), Y = F({}), w = F([]), Z = async (e, a, r) => {
|
|
483
482
|
var C, b, P;
|
|
484
483
|
if (!(e != null && e.structureIds) || ((C = e == null ? void 0 : e.structureIds) == null ? void 0 : C.length) === 0) return;
|
|
485
|
-
const o = (P = (b = e == null ? void 0 : e.structureIds) == null ? void 0 : b.filter((
|
|
486
|
-
let
|
|
487
|
-
const u = await Promise.all(
|
|
488
|
-
if (u == null ? void 0 : u.every((
|
|
489
|
-
var
|
|
490
|
-
return ((
|
|
484
|
+
const o = (P = (b = e == null ? void 0 : e.structureIds) == null ? void 0 : b.filter((t) => (t == null ? void 0 : t.key) === "dialogConfig")) == null ? void 0 : P.map((t) => t == null ? void 0 : t.id);
|
|
485
|
+
let n = o == null ? void 0 : o.map((t) => ve({ id: t }));
|
|
486
|
+
const u = await Promise.all(n);
|
|
487
|
+
if (u == null ? void 0 : u.every((t) => {
|
|
488
|
+
var l;
|
|
489
|
+
return ((l = t == null ? void 0 : t.data) == null ? void 0 : l.code) === 200;
|
|
491
490
|
})) {
|
|
492
|
-
const
|
|
491
|
+
const t = u == null ? void 0 : u.map((l) => {
|
|
493
492
|
var d, S, m, M, D, _, H;
|
|
494
493
|
return {
|
|
495
|
-
id: (m = (S = (d =
|
|
496
|
-
...(H = (_ = (D = (M =
|
|
494
|
+
id: (m = (S = (d = l == null ? void 0 : l.data) == null ? void 0 : d.result) == null ? void 0 : S[0]) == null ? void 0 : m.id,
|
|
495
|
+
...(H = (_ = (D = (M = l == null ? void 0 : l.data) == null ? void 0 : M.result) == null ? void 0 : D[0]) == null ? void 0 : _.value) == null ? void 0 : H.pageData
|
|
497
496
|
};
|
|
498
497
|
});
|
|
499
|
-
a === "create" && (w.value =
|
|
498
|
+
a === "create" && (w.value = t), a === "update" && (w.value = t == null ? void 0 : t.map((l) => {
|
|
500
499
|
var d, S;
|
|
501
|
-
return ((d =
|
|
502
|
-
...
|
|
503
|
-
compData: (S =
|
|
500
|
+
return ((d = l == null ? void 0 : l.comp) == null ? void 0 : d.toUpperCase()) === "FORM" ? {
|
|
501
|
+
...l,
|
|
502
|
+
compData: (S = l == null ? void 0 : l.compData) == null ? void 0 : S.map((m) => {
|
|
504
503
|
var M;
|
|
505
504
|
return (m == null ? void 0 : m.key) === "formContent" ? {
|
|
506
505
|
...m,
|
|
507
506
|
contents: (M = m == null ? void 0 : m.contents) == null ? void 0 : M.map((D) => ({
|
|
508
507
|
...D,
|
|
509
|
-
value:
|
|
508
|
+
value: r == null ? void 0 : r.title
|
|
510
509
|
}))
|
|
511
510
|
} : m;
|
|
512
511
|
})
|
|
513
|
-
} :
|
|
512
|
+
} : l;
|
|
514
513
|
}));
|
|
515
514
|
}
|
|
516
515
|
}, f = F({}), g = F({}), I = (e) => {
|
|
@@ -537,24 +536,24 @@ const Se = {
|
|
|
537
536
|
});
|
|
538
537
|
}, ae = () => {
|
|
539
538
|
i.show = !1;
|
|
540
|
-
},
|
|
539
|
+
}, ne = (e) => e == null ? void 0 : e.filter((a) => a.allowInherit);
|
|
541
540
|
return {
|
|
542
541
|
handleCompChange: (e) => {
|
|
543
|
-
var
|
|
544
|
-
const a = (
|
|
545
|
-
a && (f.value = (o = a == null ? void 0 : a.contents) == null ? void 0 : o.reduce((
|
|
542
|
+
var r, o;
|
|
543
|
+
const a = (r = e == null ? void 0 : e.contents) == null ? void 0 : r.find((n) => n.key === "formContent");
|
|
544
|
+
a && (f.value = (o = a == null ? void 0 : a.contents) == null ? void 0 : o.reduce((n, u) => (n[u.key] = u.value, n.prop = u.key, n), {}));
|
|
546
545
|
},
|
|
547
546
|
dialogForm: Y,
|
|
548
547
|
dialogRenderComps: w,
|
|
549
548
|
getComponents: X,
|
|
550
549
|
clickSubmitForm: () => {
|
|
551
|
-
var
|
|
550
|
+
var r, o, n, u, p;
|
|
552
551
|
let e;
|
|
553
|
-
i.type === "create" && (e = ((
|
|
552
|
+
i.type === "create" && (e = ((r = g.value) == null ? void 0 : r.path) + "/" + f.value[(o = f.value) == null ? void 0 : o.prop]), i.type === "update" && (e = (n = g.value) == null ? void 0 : n.path);
|
|
554
553
|
const a = {
|
|
555
554
|
...g.value,
|
|
556
555
|
//是否继承父菜单的配置
|
|
557
|
-
config:
|
|
556
|
+
config: ne((u = g.value) == null ? void 0 : u.config),
|
|
558
557
|
children: [],
|
|
559
558
|
childMenus: [],
|
|
560
559
|
title: f.value[(p = f.value) == null ? void 0 : p.prop],
|
|
@@ -575,12 +574,12 @@ const Se = {
|
|
|
575
574
|
}
|
|
576
575
|
});
|
|
577
576
|
export {
|
|
578
|
-
|
|
577
|
+
Oe as _,
|
|
579
578
|
Se as a,
|
|
580
|
-
|
|
581
|
-
|
|
579
|
+
We as b,
|
|
580
|
+
Re as c,
|
|
582
581
|
Me as d,
|
|
583
|
-
|
|
582
|
+
He as e,
|
|
584
583
|
ye as f,
|
|
585
584
|
ze as g,
|
|
586
585
|
k as s
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("vue");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-NOV5eRfA.cjs");const R=require("./index-2p69g4HY.cjs"),F=require("./login-C8QOZ9u0.cjs"),re=require("./index-C3fPP82O.cjs"),le=require("vue-router"),ue=require("./index-BmwSczsQ.cjs"),oe=require("./index-glKQqAZb.cjs"),E=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-C3fPP82O.cjs")).then(v=>v.index));E.install=v=>{v.component("ssMenu",E)};const W={__name:"index",props:{name:String},setup(v){const i=v,f=t.computed(()=>R.ElIcons[i.name]);return t.onMounted(()=>{}),(w,g)=>{const B=t.resolveComponent("el-icon");return t.openBlock(),t.createBlock(B,null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.value)))]),_:1})}}},q=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"rgba(114, 176, 45, 0.6)"},{name:"--vertical-submenu-active-color",value:"#051E37"},{name:"--vertical-submenu-open-bg",value:"#E6F5D2"},{name:"--vertical-submenu-second-open-bg",value:"#E6F5D2"},{name:"--vertical-submenu-open-inline-bg",value:"#FFFFFF"},{name:"--vertical-submenu-last-inline-bg",value:"#FFFFFF"},{name:"--vertical-submenu-color",value:"#051E37"},{name:"--vertical-menuitem-border-bottom",value:"4px solid 0389FF"},{name:"--vertical-submenu-menuitem-color",value:"#051E37"},{name:"--vertical-submenu-menuitem-active-color",value:"#0091FF"},{name:"--vertical-menuitem-hover-bg",value:"#EBF5FF"},{name:"--vertical-menuitem-active-bg",value:"#0091FF"},{name:"--vertical-menu-0-active-bg",value:"#D7ECFF"},{name:"--vertical-menu-1-active-bg",value:"#EBF5FF"},{name:"--vertical-menu-2-active-bg",value:"transparent"},{name:"--vertical-menuitem-color",value:"#051E37"},{name:"--vertical-menuitem-active-color",value:"#051E37"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"400"},{name:"--vertical-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0.5rem"}],se=[{name:"--horizontal-menu-bg",value:"#333333"},{name:"--horizontal-menuitem-border-bottom",value:"4px solid var(--horizontal-menuitem-active-color)"},{name:"--horizontal-submenu-hover-bg",value:""},{name:"--horizontal-submenu-open-bg",value:"#72B02D"},{name:"--horizontal-submenu-open-inline-bg",value:"#1C4275"},{name:"--horizontal-menuitem-hover-bg",value:"transparent"},{name:"--horizontal-menuitem-active-bg",value:"#323333"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#7DC3FF"},{name:"--horizontal-menuitem-fontSize",value:"1rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"500"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],$=[{name:"--vertical-menu-bg",value:"transparent"},{name:"--vertical-submenu-hover-bg",value:"rgba(114, 176, 45, 0.6)"},{name:"--vertical-submenu-active-color",value:"#051E37"},{name:"--vertical-submenu-open-bg",value:"#E6F5D2"},{name:"--vertical-submenu-second-open-bg",value:"#E6F5D2"},{name:"--vertical-submenu-open-inline-bg",value:"#FFFFFF"},{name:"--vertical-submenu-last-inline-bg",value:"#FFFFFF"},{name:"--vertical-submenu-color",value:"#051E37"},{name:"--vertical-menuitem-border-bottom",value:"4px solid var(--vertical-menuitem-active-color)"},{name:"--vertical-submenu-menuitem-color",value:"#051E37"},{name:"--vertical-submenu-menuitem-active-color",value:"#72B02D"},{name:"--vertical-menuitem-hover-bg",value:"rgba(114, 176, 45, 0.6)"},{name:"--vertical-menuitem-active-bg",value:"#72B02D"},{name:"--vertical-menu-0-active-bg",value:"#E6F5D2"},{name:"--vertical-menu-1-active-bg",value:"#F2F7EB"},{name:"--vertical-menu-2-active-bg",value:"transparent"},{name:"--vertical-menuitem-color",value:"#323333"},{name:"--vertical-menuitem-active-color",value:"#323333"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"400"},{name:"--vertical-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0.5rem"}],O=[{name:"--horizontal-menu-bg",value:"#333333"},{name:"--horizontal-menuitem-border-bottom",value:"4px solid var(--horizontal-menuitem-active-color)"},{name:"--horizontal-submenu-hover-bg",value:""},{name:"--horizontal-submenu-open-bg",value:"#72B02D"},{name:"--horizontal-submenu-open-inline-bg",value:"#1C4275"},{name:"--horizontal-menuitem-hover-bg",value:"#323333"},{name:"--horizontal-menuitem-active-bg",value:"#323333"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#92DB42"},{name:"--horizontal-menuitem-fontSize",value:"1rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"500"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],ie=[{name:"--ssbutton-theme-color",value:"#FFFFFF"},{name:"--login-drop-bg",value:"#F5FAFF"},{name:"--ssbutton-theme-bg",value:"#0091FF"},{name:"--ssbutton-warning-bg",value:"#E7F4FF"},{name:"--ssbutton-warning-color",value:"#0091FF"},{name:"--ssbutton-special-bg",value:"rgba(255,255,255,0.2)"},{name:"--ssgroup-background",value:"linear-gradient(to right, #E7F4FF, #ffffff)"},{name:"--ssComponent-theme-color",value:"#0091FF"},{name:"--ssComponent-theme-watermark",value:'url("@/assets/image/watermark-blue.png")'}],me=[{name:"--ssbutton-theme-color",value:"#323333"},{name:"--login-drop-bg",value:"#F2F7EB"},{name:"--ssbutton-theme-bg",value:"#92DB42"},{name:"--ssbutton-warning-bg",value:"#FFC300"},{name:"--ssbutton-warning-color",value:"#323333"},{name:"--ssbutton-special-bg",value:"#F2F7EB"},{name:"--ssgroup-background",value:"linear-gradient(to right, #ddf6e0, #ffffff)"},{name:"--ssComponent-theme-color",value:"#92DB42"},{name:"--ssComponent-theme-watermark",value:'url("@/assets/image/watermark.png")'}],ce=t.defineComponent({name:"menu",components:{ssMenu:E,DynamicIcon:W,ssDialog:re.ssDialog},setup(){const v=t.defineProps({mode:{type:String,default:"vertical"}}),i=F.useMenuState(),f=F.useModelComp(F.pinia),w=t.ref(0),g=le.useRouter(),{cacheUpdatingData:B}=F.storeToRefs(f),{asideMenus:U,menuTriggerType:V,platform:N}=F.storeToRefs(i),J=t.computed(()=>v==null?void 0:v.mode),T=t.computed(()=>{let e=[...U.value];if((e==null?void 0:e.length)===0)return g.push("/"),[];const n=X(e,G.value);return n.isFlag||(e=n==null?void 0:n.data),e}),K=async e=>{f.setRouteToChildPath(""),i.setMenuTriggerType("click"),i.setActiveMenuPath(e==null?void 0:e.path),i.setActiveAsideMenu(e),e.isRouter?g.push(e.path):g.push("/")},L=async e=>{const n=F.findNodeByPropInTree(T.value,"path",e);i.setActiveAsideMenu(n),f.setRouteToChildPath(""),V.value==="click"?w.value===1?i.setActiveMenuPath(sessionStorage.getItem("pageKey")):i.setActiveMenuPath(e):(i.setMenuTriggerType("click"),i.setActiveMenuPath(e)),e!=null&&e.startsWith("/")?g.push(e):g.push("/"),w.value++},j=e=>{i.setActiveMenuPath(e)},D=e=>{const n=document.documentElement;e==null||e.forEach(u=>{n.style.setProperty(u.name,u.value)})};t.onMounted(()=>{w.value=1});const G=t.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});t.watch(()=>N.value,e=>{e==="browser"?D(q):e==="client"&&(D(O),D($))},{immediate:!0});const Q=(e,n)=>{function u(o){o==null||o.forEach(a=>{var b,C;const s=(b=a==null?void 0:a.path)!=null&&b.startsWith("/")?(C=a==null?void 0:a.path)==null?void 0:C.substring(1):a==null?void 0:a.path;a.show=n==null?void 0:n.some(h=>h==null?void 0:h.includes(s)),a.children&&u(a.children)})}return u(e),e},X=(e,n)=>{if(Array.isArray(n)){const u=Array.from(new Set(n==null?void 0:n.map(o=>o.substring(0,o.lastIndexOf("/")))));return{data:Q(e,u),isFlag:!1}}else return{isFlag:(n==null?void 0:n.toUpperCase())==="SUPERADMIN"}},c=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),Y=e=>ue.getComponent(e),Z=t.ref({}),k=t.ref([]),I=async(e,n,u)=>{var C,h,_;if(!(e!=null&&e.structureIds)||((C=e==null?void 0:e.structureIds)==null?void 0:C.length)===0)return;const o=(_=(h=e==null?void 0:e.structureIds)==null?void 0:h.filter(r=>(r==null?void 0:r.key)==="dialogConfig"))==null?void 0:_.map(r=>r==null?void 0:r.id);let a=o==null?void 0:o.map(r=>R.getInsofDataApi({id:r}));const s=await Promise.all(a);if(s==null?void 0:s.every(r=>{var l;return((l=r==null?void 0:r.data)==null?void 0:l.code)===200})){const r=s==null?void 0:s.map(l=>{var M,S,m,z,y,P,H;return{id:(m=(S=(M=l==null?void 0:l.data)==null?void 0:M.result)==null?void 0:S[0])==null?void 0:m.id,...(H=(P=(y=(z=l==null?void 0:l.data)==null?void 0:z.result)==null?void 0:y[0])==null?void 0:P.value)==null?void 0:H.pageData}});n==="create"&&(k.value=r),n==="update"&&(k.value=r==null?void 0:r.map(l=>{var M,S;return((M=l==null?void 0:l.comp)==null?void 0:M.toUpperCase())==="FORM"?{...l,compData:(S=l==null?void 0:l.compData)==null?void 0:S.map(m=>{var z;return(m==null?void 0:m.key)==="formContent"?{...m,contents:(z=m==null?void 0:m.contents)==null?void 0:z.map(y=>({...y,value:u==null?void 0:u.title}))}:m})}:l}))}},d=t.ref({}),p=t.ref({}),ee=e=>{switch(e){case"新增":return"create";case"编辑":return"update";case"删除":return"delete"}},x=t.ref({}),A=e=>{i.setCacheInputMenu({type:c.type,data:e}),i.setIsRefreshMenus(!0)},ne=async(e,n)=>{c.type=ee(n==null?void 0:n.operateType),await I(n,c.type,e),p.value=e,x.value=n,(n==null?void 0:n.operateType)!=="删除"?(c.show=(n==null?void 0:n.trigger)==="openDialog",c.title=(n==null?void 0:n.operateType)+"菜单"):oe.ElMessageBox.confirm(`是否确认要删除【${e==null?void 0:e.title}】`,"",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{A(e)})},te=()=>{c.show=!1},ae=e=>e==null?void 0:e.filter(n=>n.allowInherit);return{handleCompChange:e=>{var u,o;const n=(u=e==null?void 0:e.contents)==null?void 0:u.find(a=>a.key==="formContent");n&&(d.value=(o=n==null?void 0:n.contents)==null?void 0:o.reduce((a,s)=>(a[s.key]=s.value,a.prop=s.key,a),{}))},dialogForm:Z,dialogRenderComps:k,getComponents:Y,clickSubmitForm:()=>{var u,o,a,s,b;let e;c.type==="create"&&(e=((u=p.value)==null?void 0:u.path)+"/"+d.value[(o=d.value)==null?void 0:o.prop]),c.type==="update"&&(e=(a=p.value)==null?void 0:a.path);const n={...p.value,config:ae((s=p.value)==null?void 0:s.config),children:[],childMenus:[],title:d.value[(b=d.value)==null?void 0:b.prop],path:e};console.log("clickSubmitForm",x.value,p.value,n),A(n),c.show=!1},dialogInfo:c,beforeDialogDestroy:te,clickMenuIcon:ne,mode:J,renderMenuList:T,clickMenu:K,openMenu:L,closeMenu:j,changeMenuStyle:D}}});exports._sfc_main=ce;exports._sfc_main$1=W;exports.browserHorizontalMenuClasses=se;exports.browserThemeConfig=ie;exports.browserVerticalMenuClasses=q;exports.clientHorizontalMenuClasses=O;exports.clientThemeConfig=me;exports.clientVerticalMenuClasses=$;exports.ssMenu=E;
|