ss-component-new 1.2.60 → 1.2.62
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/{MTLLoader-gdzQR_Hk.js → MTLLoader-6dpEXEoM.js} +1 -1
- package/dist/{MTLLoader-Bd8gswVO.cjs → MTLLoader-DVChBUrC.cjs} +1 -1
- package/dist/{OrbitControls-DrQG0WwG.js → OrbitControls-A_plVV3e.js} +1 -1
- package/dist/{OrbitControls-BDr3JwU7.cjs → OrbitControls-xWQZ-wvG.cjs} +1 -1
- package/dist/{animationData-BebPFu1o.js → animationData-BEBKknNp.js} +9 -9
- package/dist/{animationData-DZnytjR7.cjs → animationData-BIfCWFVI.cjs} +1 -1
- package/dist/{array-mkPvdkqz.js → array-Cq7rTgXG.js} +2 -2
- package/dist/{array-CsVIMexm.cjs → array-b4FP8aZn.cjs} +1 -1
- package/dist/{iconfont-sA0TqvpZ.js → iconfont-1_Xg-HNl.js} +2 -2
- package/dist/{iconfont-B2jKfn1c.cjs → iconfont-Brcrml_b.cjs} +1 -1
- package/dist/{index-BdoWr55z.js → index-2MJjXq7j.js} +22 -19
- package/dist/{index-DunWx7gk.js → index-6F8WEiYt.js} +3 -3
- package/dist/{index-BawiQHQM.js → index-6J4fvuHJ.js} +5 -5
- package/dist/{index-BAgQCn1y.cjs → index-B3s_4mdp.cjs} +1 -1
- package/dist/{index-BLXYg9Gs.js → index-B9XXiADi.js} +5 -5
- package/dist/index-BGECN58Q.cjs +1 -0
- package/dist/{index-CUqOGOM4.js → index-BXG4Yb5F.js} +1 -1
- package/dist/{index-BIOzO44u.js → index-BfE8W0rM.js} +1 -1
- package/dist/{index-6A1xf0Gs.cjs → index-Bi-Hgx5I.cjs} +1 -1
- package/dist/{index-DjQZE_pv.cjs → index-Bme2fgY2.cjs} +1 -1
- package/dist/{index-B-zqezDR.cjs → index-Br_V6DEt.cjs} +1 -1
- package/dist/{index-4M7aervZ.cjs → index-Bs0IeOGt.cjs} +1 -1
- package/dist/{index-DVNrIedZ.js → index-C6SCoM0U.js} +1 -1
- package/dist/{index-Duh5yc_7.js → index-CDwjVO-f.js} +11 -11
- package/dist/{index-D_FAvCkR.cjs → index-CKGcC7Sl.cjs} +1 -1
- package/dist/{index-Do_4Y2BA.js → index-CM9d4w9b.js} +935 -924
- package/dist/{index-BcGarjC7.js → index-CMSFCx0H.js} +2 -2
- package/dist/{index-fv_bHYEK.cjs → index-CORFgvAn.cjs} +1 -1
- package/dist/{index-DI5DRRI8.cjs → index-CQPp7ebN.cjs} +1 -1
- package/dist/{index-CK_bms-m.js → index-CZ9IolXA.js} +245 -243
- package/dist/{index-CaubJFHG.cjs → index-CmjpPvm7.cjs} +1 -1
- package/dist/{index-DgW_swZz.cjs → index-CqCzv-z2.cjs} +1 -1
- package/dist/{index-Dq9ppmM1.js → index-Cqh1Z_rw.js} +4 -4
- package/dist/{index-DXiQ5JKb.js → index-CvYPprNL.js} +1128 -1150
- package/dist/{index-CX2C-kjD.cjs → index-CxUHJyzF.cjs} +1 -1
- package/dist/{index-ajVsMnUs.js → index-CyuAoOEv.js} +9 -9
- package/dist/{index-DZ3LdxA8.cjs → index-D3JrrrRS.cjs} +1 -1
- package/dist/{index-CBHRkOa4.js → index-D9Aj2jkk.js} +1 -1
- package/dist/{index-C6nEcr6G.js → index-DMRIbCVi.js} +1 -1
- package/dist/{index-BkJkmkcq.cjs → index-DN3lLfOK.cjs} +1 -1
- package/dist/{index-CF3dfQ01.cjs → index-DNbT4lhP.cjs} +1 -1
- package/dist/{index-DA4aTMB5.js → index-DO71W01m.js} +1 -1
- package/dist/{index-YhC-PbE3.js → index-DOF9o3os.js} +1 -1
- package/dist/{index-ChdWnuTS.cjs → index-DUHVLIj4.cjs} +1 -1
- package/dist/{index-CRvxI1hr.cjs → index-DVFgpAHw.cjs} +1 -1
- package/dist/{index-BoVvgAUF.cjs → index-DYTa3_UA.cjs} +1 -1
- package/dist/index-Dac7flbp.cjs +1 -0
- package/dist/index-DaeE5po7.cjs +1 -0
- package/dist/{index-DwblLa_P.cjs → index-DcP7YN6o.cjs} +1 -1
- package/dist/{index-BDOF1BPC.cjs → index-DmCKmSZ8.cjs} +1 -1
- package/dist/{index-CF9id9ro.cjs → index-DoFO6pNf.cjs} +13 -13
- package/dist/{index-Ce_gZ72y.js → index-DpnFkInY.js} +119 -115
- package/dist/{index-vPR31-Zk.js → index-DwyFMS6t.js} +2 -2
- package/dist/{index-MHgc1J83.cjs → index-DyjHw7Aq.cjs} +1 -1
- package/dist/{index-DmLuog-V.js → index-ELz-W-bk.js} +3 -3
- package/dist/{index-GbPoL1UR.js → index-Ia_qBF1W.js} +2 -2
- package/dist/{index-RhIBaFyU.cjs → index-RZNNLVDX.cjs} +1 -1
- package/dist/{index-3F5KjCbv.cjs → index-TzEEZML5.cjs} +1 -1
- package/dist/{index-DG0upY6_.js → index-bYz-38Pg.js} +2 -2
- package/dist/{index-DNnfnoYc.cjs → index-bkkSLeCW.cjs} +1 -1
- package/dist/{index-BhEeRp0f.js → index-cak-MWxh.js} +2 -2
- package/dist/{index-DLiM284R.cjs → index-d6OMvbbf.cjs} +1 -1
- package/dist/{index-BIHEqwHC.js → index-eaVFuuQY.js} +1 -1
- package/dist/{index-DuXxVHLY.js → index-i5E9fwgK.js} +2 -2
- package/dist/{index-ClCw6ykP.js → index-mexa9g7P.js} +2 -2
- package/dist/{index-BqPYebkC.js → index-yCgi-cE_.js} +2 -2
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-53RGRguQ.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DVp62_ZP.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DE66pEiw.js} +13674 -13601
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-6dwbeVvZ.cjs} +32 -32
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BL1cikD3.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CR3BgnHp.js} +1077 -1072
- package/dist/index.vue_vue_type_style_index_0_scoped_46e2f5ea_lang-C7mPL9em.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_46e2f5ea_lang-lQ5Z8rzq.js +256 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-CChX6Zmx.js → index.vue_vue_type_style_index_1_lang-B2AZ-uBp.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_1_lang-B5nfyDvl.cjs → index.vue_vue_type_style_index_1_lang-B4xPEmq7.cjs} +1 -1
- package/dist/{main-CIXVap1M.js → main-BV2OQjAQ.js} +4 -4
- package/dist/{main-e1Q2-l7w.cjs → main-CBFaoDu5.cjs} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-cKQrxO3d.js → threeModel-aUrTN1iR.js} +4 -4
- package/dist/{threeModel-UBx8eTMe.cjs → threeModel-gEf2z_O_.cjs} +1 -1
- package/dist/{threePreview-D35fdkMP.js → threePreview-BlLP3fdq.js} +3 -3
- package/dist/{threePreview-BAJ00HhJ.cjs → threePreview-DP22q4N7.cjs} +1 -1
- package/dist/{threeSceneView-BZenUkiZ.js → threeSceneView-VUC2kd3Y.js} +11 -11
- package/dist/{threeSceneView-OEime_CV.cjs → threeSceneView-yEuULwHw.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-zeiEQd6_.js → threeSceneViewForCPMPIP-BnzoymFs.js} +9 -9
- package/dist/{threeSceneViewForCPMPIP-C044dPvs.cjs → threeSceneViewForCPMPIP-ClXb0-Vx.cjs} +1 -1
- package/dist/{threeTrackPathView-CHosxM5O.js → threeTrackPathView-BfEMI8TE.js} +4 -4
- package/dist/{threeTrackPathView-DdZ_W87m.cjs → threeTrackPathView-CNZxWCSD.cjs} +1 -1
- package/dist/{threeViewerHost-Co0U6v_d.js → threeViewerHost-BPoG1mR3.js} +2091 -2127
- package/dist/{threeViewerHost-Ba-SeQ6m.cjs → threeViewerHost-Yk0yIs7L.cjs} +36 -36
- package/dist/{urdfTree-DkWqLWnt.cjs → urdfTree-Br4ILtBO.cjs} +1 -1
- package/dist/{urdfTree-CtpNr38F.js → urdfTree-W_JRFTfP.js} +1 -1
- package/dist/{workpieceTreePanel-DimwJSXC.js → workpieceTreePanel-B9KXsBHy.js} +5 -5
- package/dist/{workpieceTreePanel-BPsnvq9b.cjs → workpieceTreePanel-CCTEZMHn.cjs} +1 -1
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-Ch_Cm24f.cjs +0 -1
- package/dist/index-Ck3lmJpc.cjs +0 -1
- package/dist/index-aTpWvup6.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DF-onWE-.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-B60JZATD.js +0 -195
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-zIOhigw2.cjs +0 -1
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as Z, computed as g, onMounted as x, resolveComponent as ee, createBlock as P, openBlock as F, withCtx as ne, resolveDynamicComponent as se, defineComponent as te, defineProps as re, ref as c, watch as oe, reactive as le } from "vue";
|
|
2
|
-
import { S as ae } from "./index-BHtNKL1L.js";
|
|
3
|
-
import { bO as ce, p as ie, s as ue, bN as pe } from "./index-DsSA-OiE.js";
|
|
4
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BL1cikD3.js";
|
|
5
|
-
import { u as he, a as fe } from "./index-Ce_gZ72y.js";
|
|
6
|
-
import { s as me } from "./index-CBHRkOa4.js";
|
|
7
|
-
import { useRouter as de } from "vue-router";
|
|
8
|
-
import { a as ge, e as Me, f as ve, g as Ce, h as ye } from "./index-CAPx0_D4.js";
|
|
9
|
-
import { g as we } from "./index-ajVsMnUs.js";
|
|
10
|
-
const A = Z(() => import("./index-Do_4Y2BA.js").then((i) => i.j));
|
|
11
|
-
A.install = (i) => {
|
|
12
|
-
i.component("ssMenu", A);
|
|
13
|
-
};
|
|
14
|
-
const Ae = {
|
|
15
|
-
__name: "index",
|
|
16
|
-
props: {
|
|
17
|
-
name: String
|
|
18
|
-
},
|
|
19
|
-
setup(i) {
|
|
20
|
-
const I = i, M = g(() => ce[I.name]);
|
|
21
|
-
return x(() => {
|
|
22
|
-
}), (d, v) => {
|
|
23
|
-
const o = ee("el-icon");
|
|
24
|
-
return F(), P(o, null, {
|
|
25
|
-
default: ne(() => [
|
|
26
|
-
(F(), P(se(M.value)))
|
|
27
|
-
]),
|
|
28
|
-
_: 1
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
function Ie(i = "menu") {
|
|
34
|
-
return {
|
|
35
|
-
name: i,
|
|
36
|
-
components: {
|
|
37
|
-
SvgIcon: ae,
|
|
38
|
-
ssMenu: A,
|
|
39
|
-
DynamicIcon: Ae,
|
|
40
|
-
ssDialog: me
|
|
41
|
-
},
|
|
42
|
-
setup(I, { emit: M }) {
|
|
43
|
-
const d = re({
|
|
44
|
-
mode: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: "vertical"
|
|
47
|
-
}
|
|
48
|
-
}), v = c([
|
|
49
|
-
{
|
|
50
|
-
allowInherit: !1,
|
|
51
|
-
operateType: "复制新增",
|
|
52
|
-
operateIcon: "CopyAddMenu"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
allowInherit: !1,
|
|
56
|
-
operateType: "删除",
|
|
57
|
-
operateIcon: "DeleteMenu"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
allowInherit: !1,
|
|
61
|
-
operateType: "修改菜单名",
|
|
62
|
-
operateIcon: "FixedMenu"
|
|
63
|
-
}
|
|
64
|
-
]), o = he(), T = fe(ie), C = c(0), h = de(), { asideMenus: D, menuTriggerType: R, platform: E } = ue(o), O = g(() => d == null ? void 0 : d.mode), k = (e) => e == null ? void 0 : e.map((n) => {
|
|
65
|
-
var r, t;
|
|
66
|
-
return !(n != null && n.children) || ((r = n == null ? void 0 : n.children) == null ? void 0 : r.length) === 0 ? n.config = v.value : n != null && n.children && ((t = n == null ? void 0 : n.children) == null ? void 0 : t.length) > 0 && (n.children = k(n.children)), n;
|
|
67
|
-
}), S = g(() => {
|
|
68
|
-
let e = [...D.value];
|
|
69
|
-
if ((e == null ? void 0 : e.length) === 0)
|
|
70
|
-
return h.push("/"), [];
|
|
71
|
-
const s = U(e, z.value);
|
|
72
|
-
return s.isFlag || (e = s == null ? void 0 : s.data), e = e == null ? void 0 : e.map((n) => {
|
|
73
|
-
var r, t;
|
|
74
|
-
return !(n != null && n.children) || ((r = n == null ? void 0 : n.children) == null ? void 0 : r.length) === 0 ? n.config = v.value : n != null && n.children && ((t = n == null ? void 0 : n.children) == null ? void 0 : t.length) > 0 && (n.children = k(n.children)), n;
|
|
75
|
-
}), e;
|
|
76
|
-
}), V = async (e, s) => {
|
|
77
|
-
T.setRouteToChildPath(""), o.setMenuTriggerType("click"), o.setActiveMenuPath(e == null ? void 0 : e.path), o.setActiveAsideMenu(e), e.isRouter ? h.push(e.path) : h.push("/"), M("node-click", e, s);
|
|
78
|
-
}, B = async (e) => {
|
|
79
|
-
const s = pe(S.value, "path", e);
|
|
80
|
-
o.setActiveAsideMenu(s), T.setRouteToChildPath(""), R.value === "click" ? C.value === 1 ? o.setActiveMenuPath(sessionStorage.getItem("pageKey")) : o.setActiveMenuPath(e) : (o.setMenuTriggerType("click"), o.setActiveMenuPath(e)), e != null && e.startsWith("/") ? h.push(e) : h.push("/"), C.value++;
|
|
81
|
-
}, N = (e) => {
|
|
82
|
-
o.setActiveMenuPath(e);
|
|
83
|
-
}, u = (e) => {
|
|
84
|
-
const s = document.documentElement;
|
|
85
|
-
e == null || e.forEach((n) => {
|
|
86
|
-
s.style.setProperty(n.name, n.value);
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
x(() => {
|
|
90
|
-
C.value = 1;
|
|
91
|
-
});
|
|
92
|
-
const z = g(() => {
|
|
93
|
-
const e = sessionStorage.getItem("authority");
|
|
94
|
-
return e ? JSON.parse(e) : [];
|
|
95
|
-
});
|
|
96
|
-
oe(
|
|
97
|
-
() => E.value,
|
|
98
|
-
(e) => {
|
|
99
|
-
e === "browser" ? u(ge) : e === "client" ? (u(Me), u(ve)) : e === "three" && (u(Ce), u(ye));
|
|
100
|
-
},
|
|
101
|
-
{ immediate: !0 }
|
|
102
|
-
);
|
|
103
|
-
const H = (e, s) => {
|
|
104
|
-
function n(r) {
|
|
105
|
-
r == null || r.forEach((t) => {
|
|
106
|
-
var m, b;
|
|
107
|
-
const a = (m = t == null ? void 0 : t.path) != null && m.startsWith("/") ? (b = t == null ? void 0 : t.path) == null ? void 0 : b.substring(1) : t == null ? void 0 : t.path;
|
|
108
|
-
t.show = s == null ? void 0 : s.some((w) => w == null ? void 0 : w.includes(a)), t.children && n(t.children);
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
return n(e), e;
|
|
112
|
-
}, U = (e, s) => {
|
|
113
|
-
if (Array.isArray(s)) {
|
|
114
|
-
const n = Array.from(new Set(s == null ? void 0 : s.map((r) => r.substring(0, r.lastIndexOf("/")))));
|
|
115
|
-
return {
|
|
116
|
-
data: H(e, n),
|
|
117
|
-
isFlag: !1
|
|
118
|
-
};
|
|
119
|
-
} else
|
|
120
|
-
return {
|
|
121
|
-
isFlag: (s == null ? void 0 : s.toUpperCase()) === "SUPERADMIN"
|
|
122
|
-
};
|
|
123
|
-
}, l = le({
|
|
124
|
-
show: !1,
|
|
125
|
-
title: "菜单配置",
|
|
126
|
-
width: "30%",
|
|
127
|
-
type: "create"
|
|
128
|
-
}), W = (e) => we(e), j = c({}), J = c([]), f = c({}), p = c({}), K = (e) => {
|
|
129
|
-
switch (e) {
|
|
130
|
-
case "复制新增":
|
|
131
|
-
return "create";
|
|
132
|
-
case "修改菜单名":
|
|
133
|
-
return "update";
|
|
134
|
-
case "删除":
|
|
135
|
-
return "delete";
|
|
136
|
-
}
|
|
137
|
-
}, _ = c({}), L = (e) => {
|
|
138
|
-
o.setCacheInputMenu({
|
|
139
|
-
type: l.type,
|
|
140
|
-
data: e
|
|
141
|
-
}), o.setIsRefreshMenus(!0);
|
|
142
|
-
}, $ = (e, s, n) => {
|
|
143
|
-
}, q = async (e, s) => {
|
|
144
|
-
l.type = K(s == null ? void 0 : s.operateType), $(s, l.type), p.value = e, _.value = s;
|
|
145
|
-
}, G = () => {
|
|
146
|
-
l.show = !1;
|
|
147
|
-
}, Q = (e) => e == null ? void 0 : e.filter((s) => s.allowInherit), X = () => {
|
|
148
|
-
var n, r, t, a, m;
|
|
149
|
-
let e;
|
|
150
|
-
l.type === "create" && (e = ((n = p.value) == null ? void 0 : n.path) + "/" + f.value[(r = f.value) == null ? void 0 : r.prop]), l.type === "update" && (e = (t = p.value) == null ? void 0 : t.path);
|
|
151
|
-
const s = {
|
|
152
|
-
...p.value,
|
|
153
|
-
//是否继承父菜单的配置
|
|
154
|
-
config: Q((a = p.value) == null ? void 0 : a.config),
|
|
155
|
-
children: [],
|
|
156
|
-
childMenus: [],
|
|
157
|
-
title: f.value[(m = f.value) == null ? void 0 : m.prop],
|
|
158
|
-
path: e
|
|
159
|
-
};
|
|
160
|
-
console.log("clickSubmitForm", _.value, p.value, s), L(s), l.show = !1;
|
|
161
|
-
}, Y = (e) => {
|
|
162
|
-
var n, r;
|
|
163
|
-
const s = (n = e == null ? void 0 : e.contents) == null ? void 0 : n.find((t) => t.key === "formContent");
|
|
164
|
-
s && (f.value = (r = s == null ? void 0 : s.contents) == null ? void 0 : r.reduce((t, a) => (t[a.key] = a.value, t.prop = a.key, t), {}));
|
|
165
|
-
}, y = c(!1);
|
|
166
|
-
return {
|
|
167
|
-
isCollapse: y,
|
|
168
|
-
handleMenuCollapse: () => {
|
|
169
|
-
y.value = !y.value;
|
|
170
|
-
},
|
|
171
|
-
handleCompChange: Y,
|
|
172
|
-
dialogForm: j,
|
|
173
|
-
dialogRenderComps: J,
|
|
174
|
-
getComponents: W,
|
|
175
|
-
clickSubmitForm: X,
|
|
176
|
-
dialogInfo: l,
|
|
177
|
-
beforeDialogDestroy: G,
|
|
178
|
-
clickMenuIcon: q,
|
|
179
|
-
mode: O,
|
|
180
|
-
renderMenuList: S,
|
|
181
|
-
clickMenu: V,
|
|
182
|
-
openMenu: B,
|
|
183
|
-
closeMenu: N,
|
|
184
|
-
changeMenuStyle: u
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
const Ee = te(Ie());
|
|
190
|
-
export {
|
|
191
|
-
Ee as _,
|
|
192
|
-
Ae as a,
|
|
193
|
-
A as b,
|
|
194
|
-
Ie as s
|
|
195
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("vue"),ee=require("./index-BpPyaNFa.cjs"),g=require("./index-C8qRkCgn.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CHavLvPk.cjs");const F=require("./index-CX2C-kjD.cjs"),ne=require("./index-CaubJFHG.cjs"),se=require("vue-router"),M=require("./index-9hspBVrQ.cjs"),te=require("./index-aTpWvup6.cjs"),m=r.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CF9id9ro.cjs")).then(u=>u.index));m.install=u=>{u.component("ssMenu",m)};const q={__name:"index",props:{name:String},setup(u){const T=u,C=r.computed(()=>g.ElIcons[T.name]);return r.onMounted(()=>{}),(v,y)=>{const l=r.resolveComponent("el-icon");return r.openBlock(),r.createBlock(l,null,{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(C.value)))]),_:1})}}};function b(u="menu"){return{name:u,components:{SvgIcon:ee.SvgIcon,ssMenu:m,DynamicIcon:q,ssDialog:ne.ssDialog},setup(T,{emit:C}){const v=r.defineProps({mode:{type:String,default:"vertical"}}),y=r.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),l=F.useMenuState(),_=F.useModelComp(g.pinia),w=r.ref(0),h=se.useRouter(),{asideMenus:D,menuTriggerType:R,platform:$}=g.storeToRefs(l),B=r.computed(()=>v==null?void 0:v.mode),k=e=>e==null?void 0:e.map(n=>{var o,t;return!(n!=null&&n.children)||((o=n==null?void 0:n.children)==null?void 0:o.length)===0?n.config=y.value:n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0&&(n.children=k(n.children)),n}),x=r.computed(()=>{let e=[...D.value];if((e==null?void 0:e.length)===0)return h.push("/"),[];const s=H(e,N.value);return s.isFlag||(e=s==null?void 0:s.data),e=e==null?void 0:e.map(n=>{var o,t;return!(n!=null&&n.children)||((o=n==null?void 0:n.children)==null?void 0:o.length)===0?n.config=y.value:n!=null&&n.children&&((t=n==null?void 0:n.children)==null?void 0:t.length)>0&&(n.children=k(n.children)),n}),e}),E=async(e,s)=>{_.setRouteToChildPath(""),l.setMenuTriggerType("click"),l.setActiveMenuPath(e==null?void 0:e.path),l.setActiveAsideMenu(e),e.isRouter?h.push(e.path):h.push("/"),C("node-click",e,s)},V=async e=>{const s=g.findNodeByPropInTree(x.value,"path",e);l.setActiveAsideMenu(s),_.setRouteToChildPath(""),R.value==="click"?w.value===1?l.setActiveMenuPath(sessionStorage.getItem("pageKey")):l.setActiveMenuPath(e):(l.setMenuTriggerType("click"),l.setActiveMenuPath(e)),e!=null&&e.startsWith("/")?h.push(e):h.push("/"),w.value++},O=e=>{l.setActiveMenuPath(e)},a=e=>{const s=document.documentElement;e==null||e.forEach(n=>{s.style.setProperty(n.name,n.value)})};r.onMounted(()=>{w.value=1});const N=r.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});r.watch(()=>$.value,e=>{e==="browser"?a(M.browserVerticalMenuClasses):e==="client"?(a(M.clientHorizontalMenuClasses),a(M.clientVerticalMenuClasses)):e==="three"&&(a(M.threeHorizontalMenuClasses),a(M.threeVerticalMenuClasses))},{immediate:!0});const z=(e,s)=>{function n(o){o==null||o.forEach(t=>{var d,P;const i=(d=t==null?void 0:t.path)!=null&&d.startsWith("/")?(P=t==null?void 0:t.path)==null?void 0:P.substring(1):t==null?void 0:t.path;t.show=s==null?void 0:s.some(A=>A==null?void 0:A.includes(i)),t.children&&n(t.children)})}return n(e),e},H=(e,s)=>{if(Array.isArray(s)){const n=Array.from(new Set(s==null?void 0:s.map(o=>o.substring(0,o.lastIndexOf("/")))));return{data:z(e,n),isFlag:!1}}else return{isFlag:(s==null?void 0:s.toUpperCase())==="SUPERADMIN"}},c=r.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=e=>te.getComponent(e),W=r.ref({}),J=r.ref([]),f=r.ref({}),p=r.ref({}),K=e=>{switch(e){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},S=r.ref({}),L=e=>{l.setCacheInputMenu({type:c.type,data:e}),l.setIsRefreshMenus(!0)},j=(e,s,n)=>{},G=async(e,s)=>{c.type=K(s==null?void 0:s.operateType),j(s,c.type),p.value=e,S.value=s},Q=()=>{c.show=!1},X=e=>e==null?void 0:e.filter(s=>s.allowInherit),Y=()=>{var n,o,t,i,d;let e;c.type==="create"&&(e=((n=p.value)==null?void 0:n.path)+"/"+f.value[(o=f.value)==null?void 0:o.prop]),c.type==="update"&&(e=(t=p.value)==null?void 0:t.path);const s={...p.value,config:X((i=p.value)==null?void 0:i.config),children:[],childMenus:[],title:f.value[(d=f.value)==null?void 0:d.prop],path:e};console.log("clickSubmitForm",S.value,p.value,s),L(s),c.show=!1},Z=e=>{var n,o;const s=(n=e==null?void 0:e.contents)==null?void 0:n.find(t=>t.key==="formContent");s&&(f.value=(o=s==null?void 0:s.contents)==null?void 0:o.reduce((t,i)=>(t[i.key]=i.value,t.prop=i.key,t),{}))},I=r.ref(!1);return{isCollapse:I,handleMenuCollapse:()=>{I.value=!I.value},handleCompChange:Z,dialogForm:W,dialogRenderComps:J,getComponents:U,clickSubmitForm:Y,dialogInfo:c,beforeDialogDestroy:Q,clickMenuIcon:G,mode:B,renderMenuList:x,clickMenu:E,openMenu:V,closeMenu:O,changeMenuStyle:a}}}}const re=r.defineComponent(b());exports._sfc_main=re;exports._sfc_main$1=q;exports.setComponent=b;exports.ssMenu=m;
|