ss-component-new 1.3.2 → 1.3.4
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-xrJPpi4c.cjs → MTLLoader-BDa0EA-y.cjs} +1 -1
- package/dist/{MTLLoader-Dv2EVTWB.js → MTLLoader-DU2_d5qP.js} +37 -37
- package/dist/{OrbitControls-B_seM-IP.js → OrbitControls-B2Ue7hdS.js} +1 -1
- package/dist/{OrbitControls-DeFoKJp9.cjs → OrbitControls-DfhmSOVW.cjs} +1 -1
- package/dist/{URDFLoader-B6g0hxRm.cjs → URDFLoader-BRTNakjO.cjs} +1 -1
- package/dist/{URDFLoader-BT60rQtD.js → URDFLoader-BSHChj3i.js} +189 -189
- package/dist/{animationData-Beth8tFS.js → animationData-Bfm5Jk8y.js} +26 -26
- package/dist/{animationData-CXbG057x.cjs → animationData-CNIRMzHL.cjs} +1 -1
- package/dist/{array-C6jYq2-o.js → array-BqZSVRH0.js} +46 -46
- package/dist/{array-QkdkoOAY.cjs → array-MgT_0IYR.cjs} +1 -1
- package/dist/{iconfont-h3lSsHxO.js → iconfont-D4sBppfS.js} +29 -29
- package/dist/{iconfont-UNojnhH2.cjs → iconfont-kWEJenGZ.cjs} +1 -1
- package/dist/{index-Cjqg29ul.cjs → index-0sI9GpjG.cjs} +1 -1
- package/dist/index-7WRVFebE.cjs +1 -0
- package/dist/{index-7tMW9vmz.js → index-7bddXiMZ.js} +723 -723
- package/dist/{index-CgR9iYFA.cjs → index-B-wqJb1R.cjs} +1 -1
- package/dist/{index-B3jquljw.js → index-BCQ-ZrNS.js} +7 -7
- package/dist/{index-BJPBBWWH.cjs → index-BLxE_tkf.cjs} +1 -1
- package/dist/{index-CaXg2zO6.cjs → index-BPKCXbP6.cjs} +1 -1
- package/dist/index-BR7I_Z6b.cjs +1 -0
- package/dist/{index-Ddoq7kRQ.js → index-BT6DSXQW.js} +9 -9
- package/dist/{index-BYdJgNnt.js → index-BTfRODup.js} +3 -3
- package/dist/{index-DRybfiC9.js → index-BUrYjzWs.js} +2 -2
- package/dist/{index-TxlM0xFu.cjs → index-BWqkJ8tT.cjs} +1 -1
- package/dist/{index-CCn_Pa7c.cjs → index-BY0bG8F_.cjs} +1 -1
- package/dist/{index-CDYSTy2C.cjs → index-Bb7_N8kj.cjs} +1 -1
- package/dist/index-BdP1gtPp.cjs +13 -0
- package/dist/{index-BqqRuoo3.js → index-Bt9rt1NQ.js} +3 -3
- package/dist/index-BtuZ5Zx4.js +103 -0
- package/dist/{index-BBo5mPL3.js → index-C38KGQKj.js} +2 -2
- package/dist/{index-CPk9g8p3.js → index-C3RoPY39.js} +2 -2
- package/dist/{index-Bv-gTP_t.cjs → index-C3suNMi3.cjs} +1 -1
- package/dist/{index-hnHfOKW9.cjs → index-C6_1MyLM.cjs} +1 -1
- package/dist/{index-DRTxe12U.cjs → index-C8fMwErX.cjs} +13 -13
- package/dist/{index-r5JlBAZk.cjs → index-CDhojfAp.cjs} +1 -1
- package/dist/{index-nr6V1FzX.js → index-CEoo5NuF.js} +7 -7
- package/dist/{index-CXiOVgoz.js → index-CEzEaG0d.js} +1 -1
- package/dist/{index-NAekmm6C.js → index-CM_8lsuy.js} +2 -2
- package/dist/{index-CuKYtSif.js → index-CN5eTGfF.js} +1 -1
- package/dist/{index-BR5J0fXr.cjs → index-COvNwtxL.cjs} +13 -13
- package/dist/{index-BF9Y0y6z.js → index-CaDwU086.js} +3 -3
- package/dist/{index-DU9e5EhS.cjs → index-Cw4Pm2PQ.cjs} +1 -1
- package/dist/{index-Va8AOLWi.js → index-DGRL8SEt.js} +1 -1
- package/dist/index-DIqYHU20.cjs +11 -0
- package/dist/{index-DzadQQ41.js → index-DUygJhjf.js} +1703 -1712
- package/dist/{index-VcjIgkLE.cjs → index-DV3KiKv5.cjs} +1 -1
- package/dist/{index-DRLogw4i.js → index-DVHBs_Vv.js} +1952 -1948
- package/dist/{index-B7RJnzyb.js → index-DgYpyTf-.js} +2 -2
- package/dist/index-DgyyXNFj.js +12535 -0
- package/dist/{index-4FJEY4G5.js → index-DlchhCKc.js} +8 -8
- package/dist/{index-BJaAtaqN.js → index-Dm4qKk5S.js} +7 -7
- package/dist/{index-Da5iE_ab.js → index-Dsh4fjDh.js} +2 -2
- package/dist/{index-CVGCFimV.js → index-G9jqtOFo.js} +5 -5
- package/dist/{index-DzAoltDQ.cjs → index-MEN9vDHo.cjs} +1 -1
- package/dist/{index-wpbqbw-8.cjs → index-R-S0AH15.cjs} +1 -1
- package/dist/{index-De3Zh_5B.cjs → index-dD_cGWLc.cjs} +1 -1
- package/dist/{index-B1deFmCB.js → index-f_aTA7O9.js} +1 -1
- package/dist/{index-DtkLwSCK.cjs → index-iv5M7d4h.cjs} +1 -1
- package/dist/{index-BbdTn4Wu.js → index-jbNDRLVg.js} +5 -5
- package/dist/{index-DkzIAhpA.cjs → index-kZhbnU3-.cjs} +1 -1
- package/dist/{index-DAeGe9R9.cjs → index-mpoMK_dv.cjs} +1 -1
- package/dist/{index-COQpDVsv.js → index-sMsCzNtW.js} +1535 -1570
- package/dist/{index-BWCv7zxy.cjs → index-vCTVD7cV.cjs} +1 -1
- package/dist/{index-DPNECOKG.cjs → index-zR73jr4m.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BYHbVlRN.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D4mQcDEW.cjs} +398 -408
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DuyXGUSZ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLfKrpq4.js} +32428 -32989
- package/dist/{index.vue_vue_type_style_index_1_lang-JNXKF-5g.cjs → index.vue_vue_type_style_index_1_lang-BybP-dlR.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-CPOQHkRi.js → index.vue_vue_type_style_index_1_lang-C6hiPOvT.js} +78 -78
- package/dist/{main-II23mGYX.cjs → main-DODePLfq.cjs} +1 -1
- package/dist/{main-ClpfURp9.js → main-nyWYROsL.js} +4 -4
- package/dist/{menuIndex-D52EAwtb.cjs → menuIndex-8RF_0N_y.cjs} +1 -1
- package/dist/{menuIndex-DYaogp2R.js → menuIndex-BwWrdu20.js} +1 -1
- 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-Bdx25CW5.cjs → threeModel-BwQqxP7B.cjs} +1 -1
- package/dist/{threeModel-1StgfJTN.js → threeModel-Dw1HYePN.js} +45 -45
- package/dist/{threePreview-BNAELyED.cjs → threePreview-BlCmiK0A.cjs} +1 -1
- package/dist/{threePreview-Bf5gN_fI.js → threePreview-PdofIeZV.js} +103 -103
- package/dist/{threeSceneView-u0zqKHWX.cjs → threeSceneView-QkRW8pnJ.cjs} +1 -1
- package/dist/{threeSceneView-Boc1QaDR.js → threeSceneView-aDZwf58h.js} +38 -38
- package/dist/{threeSceneViewForCPMPIP-CYkIXtPP.cjs → threeSceneViewForCPMPIP-Ds4WSe56.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-gnFSbkip.js → threeSceneViewForCPMPIP-JDLX5nri.js} +8 -8
- package/dist/{threeTrackPathView-CBsHliC3.cjs → threeTrackPathView-BlAgLn32.cjs} +1 -1
- package/dist/{threeTrackPathView-B1OFwlLh.js → threeTrackPathView-DOy180Fe.js} +66 -66
- package/dist/{threeViewerHost-BSxl-4d-.cjs → threeViewerHost-Bk7K37-4.cjs} +1 -1
- package/dist/{threeViewerHost-B9z6zHUh.js → threeViewerHost-DNY3nOwS.js} +20 -20
- package/dist/{urdfTree-CGZUqrH4.js → urdfTree-CeP5yUoC.js} +10 -10
- package/dist/{urdfTree-C1KFI7et.cjs → urdfTree-nxh-CAg8.cjs} +1 -1
- package/dist/{workpieceTreePanel-Bb9foDnf.js → workpieceTreePanel-CTC2K239.js} +56 -56
- package/dist/{workpieceTreePanel-BFsf-BrP.cjs → workpieceTreePanel-CZQFw5fE.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-C8qPBadE.cjs +0 -13
- package/dist/index-CUtrk2F2.cjs +0 -1
- package/dist/index-CpbBe_mV.cjs +0 -1
- package/dist/index-DIWralYr.js +0 -67
- package/dist/index-DJFQljsX.cjs +0 -1
- package/dist/index-SvdMxP5R.js +0 -11899
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { s as y, u as A, b as E, p as d } from "./index-sMsCzNtW.js";
|
|
2
|
+
import { ref as g } from "vue";
|
|
3
|
+
import { a as i } from "./index-B8HqIYd5.js";
|
|
4
|
+
function k(t) {
|
|
5
|
+
return i.post(
|
|
6
|
+
"http://222.92.178.198:63002/platform/create",
|
|
7
|
+
t
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
function w(t) {
|
|
11
|
+
return i.post(
|
|
12
|
+
"http://222.92.178.198:63002/platform/get",
|
|
13
|
+
t
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function j(t) {
|
|
17
|
+
return i.post(
|
|
18
|
+
"http://222.92.178.198:63002/platform/getPage",
|
|
19
|
+
t
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
function F(t) {
|
|
23
|
+
return i.post(
|
|
24
|
+
"http://222.92.178.198:63002/platform/delete",
|
|
25
|
+
t
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function L(t) {
|
|
29
|
+
return i.post(
|
|
30
|
+
"http://222.92.178.198:63002/platform/page/add",
|
|
31
|
+
t
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const b = (t) => {
|
|
35
|
+
var n, c;
|
|
36
|
+
if (Array.isArray(Object.keys(t)) && ((n = Object.keys(t)) == null ? void 0 : n.length) > 0) {
|
|
37
|
+
let o = [];
|
|
38
|
+
return (c = Object.entries(t)) == null || c.forEach(([l, a]) => {
|
|
39
|
+
var s, e;
|
|
40
|
+
let r = [];
|
|
41
|
+
if (r.push(l), ((s = Object.keys(a)) == null ? void 0 : s.length) > 0) {
|
|
42
|
+
let u = [];
|
|
43
|
+
(e = b(a)) == null || e.forEach((p) => {
|
|
44
|
+
u.push(p);
|
|
45
|
+
}), u == null || u.forEach((p) => {
|
|
46
|
+
r.push(p);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
o.push(r);
|
|
50
|
+
}), o;
|
|
51
|
+
}
|
|
52
|
+
}, S = (t, n) => {
|
|
53
|
+
var o;
|
|
54
|
+
let c = n;
|
|
55
|
+
return Array.isArray(Object.keys(t)) && ((o = Object.entries(t)) == null || o.forEach(([l, a]) => {
|
|
56
|
+
let r = [l];
|
|
57
|
+
if (typeof a == "object" && a !== null) {
|
|
58
|
+
let s = b(a);
|
|
59
|
+
s == null || s.forEach((e) => {
|
|
60
|
+
r.push(e);
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
c.push(r);
|
|
64
|
+
})), c;
|
|
65
|
+
}, x = (t) => {
|
|
66
|
+
const n = {};
|
|
67
|
+
return t.forEach((o) => {
|
|
68
|
+
const l = o.split("/");
|
|
69
|
+
let a = n;
|
|
70
|
+
l.forEach((r) => {
|
|
71
|
+
a[r] || (a[r] = {}), a = a[r];
|
|
72
|
+
});
|
|
73
|
+
}), S(n, []);
|
|
74
|
+
}, m = g(!1), h = g(!1), O = E(d), { loginUserInfo: f } = y(O), P = A(), M = async () => {
|
|
75
|
+
var n, c, o, l, a, r;
|
|
76
|
+
let t = await j({
|
|
77
|
+
platId: parseInt((n = f == null ? void 0 : f.value) == null ? void 0 : n.plat_id),
|
|
78
|
+
pageName: "menu"
|
|
79
|
+
});
|
|
80
|
+
if (((o = (c = t == null ? void 0 : t.data) == null ? void 0 : c.result) == null ? void 0 : o.length) > 0) {
|
|
81
|
+
let s = (r = (a = (l = t == null ? void 0 : t.data) == null ? void 0 : l.result) == null ? void 0 : a.filter((e) => {
|
|
82
|
+
var u, p;
|
|
83
|
+
return ((p = e == null ? void 0 : e.object_name) == null ? void 0 : p[((u = e == null ? void 0 : e.object_name) == null ? void 0 : u.length) - 1]) !== "/" && (e == null ? void 0 : e.is_show);
|
|
84
|
+
})) == null ? void 0 : r.map((e) => {
|
|
85
|
+
var u;
|
|
86
|
+
return (u = e == null ? void 0 : e.object_name) == null ? void 0 : u.replaceAll("**^", "/");
|
|
87
|
+
});
|
|
88
|
+
s = [...new Set(s)], s = x(s), P.setRawMenus(s ?? []), m.value = !0, h.value = !0;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
menuExist: m.value,
|
|
92
|
+
structureExist: h.value
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
k as c,
|
|
97
|
+
F as d,
|
|
98
|
+
j as g,
|
|
99
|
+
w as l,
|
|
100
|
+
x as m,
|
|
101
|
+
L as p,
|
|
102
|
+
M as v
|
|
103
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as x, ref as I, reactive as T, resolveComponent as v, createElementBlock as E, openBlock as U, createVNode as u, withCtx as d, createElementVNode as l, createTextVNode as h, toDisplayString as H, nextTick as N, Fragment as q, withDirectives as z, renderSlot as $, vShow as M } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { av as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLfKrpq4.js";
|
|
3
3
|
import { a9 as X, av as G, D, H as c, G as R, a0 as g } from "./index-B8HqIYd5.js";
|
|
4
|
-
import {
|
|
4
|
+
import { K as J } from "./index-sMsCzNtW.js";
|
|
5
5
|
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const K = "ElUpload";
|
|
7
7
|
class Q extends Error {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as y, ref as C, onMounted as _, createElementBlock as c, openBlock as g, createVNode as v } from "vue";
|
|
2
|
-
import { u as h, p as k, s as x, c as m } from "./index-
|
|
3
|
-
import { s as M } from "./index-
|
|
2
|
+
import { u as h, p as k, s as x, c as m } from "./index-sMsCzNtW.js";
|
|
3
|
+
import { s as M } from "./index-DVHBs_Vv.js";
|
|
4
4
|
import { a as D, d as T, f as S } from "./index-DFBXEIIr.js";
|
|
5
5
|
import { g as w } from "./index-B8HqIYd5.js";
|
|
6
6
|
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("./index-CUtrk2F2.cjs"),t=require("vue"),P=require("./index-DRTxe12U.cjs"),ht=require("./index-De3Zh_5B.cjs"),yt=require("./index-BR5J0fXr.cjs"),vt=require("vue-router"),Le=require("./index-9hspBVrQ.cjs"),U=require("./index-C5pQXH0_.cjs"),gt=require("./menuIndex-D52EAwtb.cjs"),kt=require("./index-BpPyaNFa.cjs"),m=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BYHbVlRN.cjs"),Pe=require("./index-CpbBe_mV.cjs"),Ct=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=(n,p,K=0)=>{let y=n;return y!=null&&y.every(r=>Array.isArray(r))&&(y!=null&&y.every(r=>Array.isArray(r)&&r.length===1)?y=y==null?void 0:y.filter(r=>(r==null?void 0:r[0])!==(p==null?void 0:p[K])):y=y==null?void 0:y.map(r=>{if(r!=null&&r.find(o=>o===(p==null?void 0:p[K]))&&(p==null?void 0:p.length)!==1){let o=P.cloneDeep(p),c=r==null?void 0:r.filter(I=>I!==(o==null?void 0:o[K])),T=K+1,x=Re(c,o,T),B=[];B.push(r==null?void 0:r[0]),x==null||x.forEach(I=>{B.push(I)}),r=B}return r})),y},Oe=(n,p,K,y=0)=>{let r=n;return r!=null&&r.every(o=>Array.isArray(o))&&(r!=null&&r.every(o=>Array.isArray(o)&&o.length===1)?r.push([K]):r=r==null?void 0:r.map(o=>{if(o!=null&&o.find(c=>c===(p==null?void 0:p[y]))&&(p==null?void 0:p.length)!==1){let c=P.cloneDeep(p),T=o==null?void 0:o.filter(V=>V!==(c==null?void 0:c[y])),x=y+1,B=Oe(T,c,K,x),I=[];I.push(o==null?void 0:o[0]),B==null||B.forEach(V=>{I.push(V)}),o=I}return o})),r},ue=(n,p,K,y,r=0)=>{let o=n;return o!=null&&o.every(c=>Array.isArray(c))&&(o!=null&&o.every(c=>Array.isArray(c)&&c.length===1)?o=o==null?void 0:o.map(c=>((c==null?void 0:c[0])===K&&(c=[y]),c)):o=o==null?void 0:o.map(c=>{if(c!=null&&c.find(T=>T===(p==null?void 0:p[r]))&&(p==null?void 0:p.length)!==1){let T=P.cloneDeep(p),x=c==null?void 0:c.filter(R=>R!==(T==null?void 0:T[r])),B=r+1,I=ue(x,T,K,y,B),V=[];V.push(c==null?void 0:c[0]),I==null||I.forEach(R=>{V.push(R)}),c=V}return c})),o};function Ye(n="menu"){return{name:n,components:{SvgIcon:kt.SvgIcon,ssMenu:je.ssMenu,DynamicIcon:je._sfc_main,ssDialog:ht.ssDialog,ssInput:yt._sfc_main$2},setup(p,{emit:K}){const y=t.defineProps({mode:{type:String,default:"vertical"}}),r=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),o=P.useMenuState(),c=P.useModelComp(P.pinia),T=P.useLoginState(P.pinia),{loginUserInfo:x}=P.storeToRefs(T),B=t.ref(0),I=vt.useRouter(),V=t.ref(),{asideMenus:R,menuTriggerType:s,platform:Ne}=P.storeToRefs(o),{fixMenuStatus:qe}=P.storeToRefs(c),Ue=t.computed(()=>y==null?void 0:y.mode),ee=l=>l==null?void 0:l.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=ee(e.children)),e}),A=t.computed(()=>{let l=[...R.value];if((l==null?void 0:l.length)===0)return I.push("/"),[];const a=et(l,me.value);return a.isFlag||(l=a==null?void 0:a.data),l=l==null?void 0:l.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=ee(e.children)),e}),l}),ze=async(l,a)=>{c.setRouteToChildPath(""),o.setMenuTriggerType("click"),o.setActiveMenuPath(l==null?void 0:l.path),o.setActiveAsideMenu(l),l.isRouter?I.push(l.path):I.push("/"),K("node-click",l,a)},Ze=async l=>{const a=gt.findNodeByPropInTree(A.value,"path",l);o.setActiveAsideMenu(a),c.setRouteToChildPath(""),qe.value?c.setFixMenuStatus(!1):(Z.value&&(s.value="open"),s.value==="click"?B.value===1?o.setActiveMenuPath(sessionStorage.getItem("pageKey")):o.setActiveMenuPath(l):Z.value||(o.setMenuTriggerType("click"),o.setActiveMenuPath(l))),l!=null&&l.startsWith("/")?I.push(l):I.push("/"),B.value++},He=l=>{Z.value||o.setActiveMenuPath(l)},X=l=>{const a=document.documentElement;l==null||l.forEach(e=>{a.style.setProperty(e.name,e.value)})};t.onMounted(()=>{B.value=1});const me=t.computed(()=>{const l=sessionStorage.getItem("authority");return l?JSON.parse(l):[]});t.watch(()=>Ne.value,l=>{l==="browser"?X(Le.browserVerticalMenuClasses):l==="client"?(X(Le.clientHorizontalMenuClasses),X(Le.clientVerticalMenuClasses)):l==="three"&&(X(Le.threeHorizontalMenuClasses),X(Le.threeVerticalMenuClasses))},{immediate:!0});const et=(l,a)=>({isFlag:!0}),O=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),tt=l=>je.getComponent(l),lt=t.ref({}),ot=t.ref([]),te=t.ref({}),Y=t.ref({}),at=l=>{switch(l){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Je=t.ref({}),st=l=>{o.setCacheInputMenu({type:O.type,data:l}),o.setIsRefreshMenus(!0)},it=async(l,a,e)=>{var k,C,_,z,E,H,j,le,oe,ae,se,ie,re,ce,pe,ne,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,be,we,Te,Be,Ee,Me,Ke,xe,Ve,Ae,h,F,L,b;if(a==="create"){let d=(e==null?void 0:e.title)+"(1)",M=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(C=(k=M==null?void 0:M.data)==null?void 0:k.result)==null?void 0:C[0],J=(_=S==null?void 0:S.value)==null?void 0:_.pageData;J.compData=(z=J.compData)==null?void 0:z.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Oe(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),d)),i}),await U.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}});let N=(H=(E=e==null?void 0:e.path)==null?void 0:E.split("/"))==null?void 0:H.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}),q=await m.getItemData((oe=(le=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:le.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:oe.join("/"),sessionStorage.getItem("systemKey"),"");if(N.push(d),N=N==null?void 0:N.join("/"),(q==null?void 0:q.length)>0){let i=q==null?void 0:q[0],f=(se=(ae=i==null?void 0:i.compData)==null?void 0:ae.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:se.contents;if(((ie=f==null?void 0:f[0])==null?void 0:ie.directiveLabel)==="#isMain"){let g=(re=f==null?void 0:f[0])==null?void 0:re.prop,D=(pe=(ce=i==null?void 0:i.compData)==null?void 0:ce.find(w=>(w==null?void 0:w.key)==="tableContents"))==null?void 0:pe.contents,W;D==null||D.forEach(w=>{var G,u;if(w.length===1)((G=w==null?void 0:w[0])==null?void 0:G[g])===(e==null?void 0:e.title)&&(W=w==null?void 0:w[0],W[g]=d);else{let Q=(u=f==null?void 0:f.filter($=>$!=="操作"))==null?void 0:u.map($=>$==null?void 0:$.prop),$e=w==null?void 0:w.filter($=>!($!=null&&$.id)),Fe=m.getValueToObjectValue($e,Q);Fe[g]=d,W=Fe}}),await U.createInsofDataApi({key:{type:"data",pageKey:(fe=(de=(ne=e==null?void 0:e.path)==null?void 0:ne.split("/"))==null?void 0:de.filter((w,G)=>{var u,Q;return G!==((Q=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:Q.length)-1}))==null?void 0:fe.join("/"),tableId:i==null?void 0:i.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(he=x.value)==null?void 0:he.id,createUserLayer:((ye=x.value)==null?void 0:ye.dept)||((ve=x.value)==null?void 0:ve.部门名称)},value:{tableData:W}})}}await m.newLoadingConstruct(e==null?void 0:e.path,N),o.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),o.setActiveMenuPath((Ce=(ke=(ge=e==null?void 0:e.path)==null?void 0:ge.split("/"))==null?void 0:ke.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:Ce.join("/")),o.setActiveTopMenuPath((Ie=(De=e==null?void 0:e.path)==null?void 0:De.split("/"))==null?void 0:Ie[0]),o.setIsRefreshMenus(!1),o.setIsRefreshMenus(!0)}else if(a==="update")V.value=e;else if(a==="delete"){let d=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),M=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(_e=(Se=M==null?void 0:M.data)==null?void 0:Se.result)==null?void 0:_e[0],J=(be=S==null?void 0:S.value)==null?void 0:be.pageData;if(J.compData=(we=J.compData)==null?void 0:we.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Re(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),i}),await U.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}}),((Be=(Te=d==null?void 0:d.data)==null?void 0:Te.result)==null?void 0:Be.length)>0){let i=(Me=(Ee=d==null?void 0:d.data)==null?void 0:Ee.result)==null?void 0:Me.map(f=>f==null?void 0:f.id);(i==null?void 0:i.length)>0&&await U.batchDeleteInsofDataApi({ids:i})}let N=await m.getItemData((Ve=(xe=(Ke=e==null?void 0:e.path)==null?void 0:Ke.split("/"))==null?void 0:xe.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:Ve.join("/"),sessionStorage.getItem("systemKey"),""),q=[];(N==null?void 0:N.length)>0&&(N==null||N.forEach(i=>{var g,D,W,w,G,u,Q,$e,Fe,$,We;let f=(w=(W=(D=(g=i==null?void 0:i.compData)==null?void 0:g.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:D.contents)==null?void 0:W[0])==null?void 0:w.prop;(($e=(Q=(u=(G=i==null?void 0:i.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:u.contents)==null?void 0:Q[0])==null?void 0:$e.directiveLabel)==="#isMain"&&((We=($=(Fe=i==null?void 0:i.compData)==null?void 0:Fe.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:$.contents)==null||We.forEach(v=>{var Ge,Qe,Xe;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&q.push((Ge=v==null?void 0:v[0])==null?void 0:Ge.id):((Qe=v==null?void 0:v[0])==null?void 0:Qe[f])===(e==null?void 0:e.title)&&q.push((Xe=v==null?void 0:v[0])==null?void 0:Xe.id)}))})),(q==null?void 0:q.length)>0&&await U.batchDeleteInsofDataApi({ids:q}),o.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),o.setActiveMenuPath((F=(h=(Ae=e==null?void 0:e.path)==null?void 0:Ae.split("/"))==null?void 0:h.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:F.join("/")),o.setActiveTopMenuPath((b=(L=e==null?void 0:e.path)==null?void 0:L.split("/"))==null?void 0:b[0]),o.setIsRefreshMenus(!1),o.setIsRefreshMenus(!0)}},rt=async(l,a)=>{var le,oe,ae,se,ie,re,ce,pe,ne,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,be,we,Te,Be,Ee,Me,Ke,xe,Ve,Ae;let e=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),k=(oe=(le=e==null?void 0:e.data)==null?void 0:le.result)==null?void 0:oe[0],C=(ae=k==null?void 0:k.value)==null?void 0:ae.pageData;C.compData=(se=C.compData)==null?void 0:se.map(h=>{var F,L;return(h==null?void 0:h.key)==="menuContents"&&(h.contents=ue(h.contents,(F=a==null?void 0:a.path)==null?void 0:F.split("/"),a==null?void 0:a.title,(L=l==null?void 0:l.target)==null?void 0:L.value)),h}),k!=null&&k.id&&await U.updateInsofDataApi({id:k==null?void 0:k.id,value:{pageData:C}});let _=(re=(ie=a==null?void 0:a.path)==null?void 0:ie.split("/"))==null?void 0:re.filter((h,F)=>{var L,b;return F!==((b=(L=a==null?void 0:a.path)==null?void 0:L.split("/"))==null?void 0:b.length)-1}),z=_==null?void 0:_.join("/");_.push((ce=l==null?void 0:l.target)==null?void 0:ce.value),_=_==null?void 0:_.join("/");let E=await m.getItemData(z,sessionStorage.getItem("systemKey"),"");if(((he=(fe=(de=(ne=(pe=E==null?void 0:E[0])==null?void 0:pe.compData)==null?void 0:ne.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:de.contents)==null?void 0:fe[0])==null?void 0:he.directiveLabel)==="#isMain"){let h=(Ce=(ke=(ge=(ve=(ye=E==null?void 0:E[0])==null?void 0:ye.compData)==null?void 0:ve.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ge.contents)==null?void 0:ke[0])==null?void 0:Ce.prop,F=(Se=(Ie=(De=E==null?void 0:E[0])==null?void 0:De.compData)==null?void 0:Ie.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:Se.contents,L=(Te=(we=(be=(_e=E==null?void 0:E[0])==null?void 0:_e.compData)==null?void 0:be.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:we.contents)==null?void 0:Te.map(d=>d==null?void 0:d.prop),b;if(F==null||F.forEach(d=>{var S;let M=m.getValueToObjectValue(d,L);(M==null?void 0:M[h])===a.title&&(b=M,b[h]=(S=l==null?void 0:l.target)==null?void 0:S.value)}),b){let d={};for(let S in b)S!=="id"&&(d[S]=b==null?void 0:b[S]);let M=[{id:b==null?void 0:b.id,value:{tableData:d}}];await U.batchUpdateInsofDataApi({dataList:M})}}let H=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a==null?void 0:a.path}}),j=(Ee=(Be=H==null?void 0:H.data)==null?void 0:Be.result)==null?void 0:Ee.map(h=>({id:h==null?void 0:h.id,key:h==null?void 0:h.key}));j=j==null?void 0:j.map(h=>(h.key.pageKey=_,h)),(j==null?void 0:j.length)>0&&await U.batchUpdateInsofDataApi({dataList:j}),o.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),o.setActiveMenuPath((xe=(Ke=(Me=a==null?void 0:a.path)==null?void 0:Me.split("/"))==null?void 0:Ke.filter((h,F)=>{var L,b;return F!==((b=(L=a==null?void 0:a.path)==null?void 0:L.split("/"))==null?void 0:b.length)-1}))==null?void 0:xe.join("/")),o.setActiveTopMenuPath((Ae=(Ve=a==null?void 0:a.path)==null?void 0:Ve.split("/"))==null?void 0:Ae[0]),o.setIsRefreshMenus(!1),o.setIsRefreshMenus(!0),V.value=void 0},ct=async(l,a)=>{O.type=at(a==null?void 0:a.operateType),await it(a,O.type,l),Y.value=l,Je.value=a},pt=()=>{O.show=!1},nt=l=>l==null?void 0:l.filter(a=>a.allowInherit),dt=()=>{var e,k,C,_,z;let l;O.type==="create"&&(l=((e=Y.value)==null?void 0:e.path)+"/"+te.value[(k=te.value)==null?void 0:k.prop]),O.type==="update"&&(l=(C=Y.value)==null?void 0:C.path);const a={...Y.value,config:nt((_=Y.value)==null?void 0:_.config),children:[],childMenus:[],title:te.value[(z=te.value)==null?void 0:z.prop],path:l};console.log("clickSubmitForm",Je.value,Y.value,a),st(a),O.show=!1},ft=l=>{var e,k;const a=(e=l==null?void 0:l.contents)==null?void 0:e.find(C=>C.key==="formContent");a&&(te.value=(k=a==null?void 0:a.contents)==null?void 0:k.reduce((C,_)=>(C[_.key]=_.value,C.prop=_.key,C),{}))},Z=t.ref(!1);return{isCollapse:Z,handleMenuCollapse:()=>{Z.value=!Z.value},handleCompChange:ft,dialogForm:lt,dialogRenderComps:ot,getComponents:tt,clickSubmitForm:dt,dialogInfo:O,beforeDialogDestroy:pt,clickMenuIcon:ct,mode:Ue,renderMenuList:A,clickMenu:ze,openMenu:Ze,closeMenu:He,changeMenuStyle:X,fixElement:V,onBlur:rt}}}}const Dt=t.defineComponent(Ye()),It=["title"],St={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},_t={key:2,class:"menu-operate-icon"},bt={class:"menu-config-wrap"},wt=["onClick"],Tt={class:"module-dialog-content"};function Bt(n,p,K,y,r,o){var R;const c=t.resolveComponent("ss-input"),T=t.resolveComponent("svg-icon"),x=t.resolveComponent("el-popover"),B=t.resolveComponent("ss-menu"),I=t.resolveComponent("el-button"),V=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(B,{class:"vertical-menu",mode:n.mode,menuList:n.renderMenuList,isCollapse:n.isCollapse,uniqueOpened:!0,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu},{title:t.withCtx(({menu:s})=>{var Ne,qe,Ue,ee;return[!n.fixElement||(s==null?void 0:s.path)!==((Ne=n.fixElement)==null?void 0:Ne.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:s.title,class:"menu-title",style:t.normalizeStyle({marginRight:s!=null&&s.config&&((qe=s==null?void 0:s.config)==null?void 0:qe.length)>0?"25px":"1px"})},t.toDisplayString(s.title??""),13,It)):t.createCommentVNode("",!0),n.fixElement&&(s==null?void 0:s.path)===((Ue=n.fixElement)==null?void 0:Ue.path)?(t.openBlock(),t.createElementBlock("span",St,[t.createVNode(c,{value:s.title,onBlur:A=>n.onBlur(A,s)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),s!=null&&s.config&&((ee=s==null?void 0:s.config)==null?void 0:ee.length)>0?(t.openBlock(),t.createElementBlock("span",_t,[t.createVNode(x,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",bt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s==null?void 0:s.config,A=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:A.id,onClick:ze=>n.clickMenuIcon(s,A)},[t.createVNode(T,{name:A==null?void 0:A.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(A==null?void 0:A.operateType),1)],8,wt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((R=n.renderMenuList)==null?void 0:R.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:p[0]||(p[0]=(...s)=>n.handleMenuCollapse&&n.handleMenuCollapse(...s))},[t.createVNode(T,{name:n.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(V,{class:"module-dialog",title:n.dialogInfo.title,visible:n.dialogInfo.show,width:n.dialogInfo.width,onBeforeDestroy:n.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",Tt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.dialogRenderComps,s=>(t.openBlock(),t.createElementBlock("div",{key:s.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.getComponents((s==null?void 0:s.comp)??"Input")),{itemData:s==null?void 0:s.compData,key:s==null?void 0:s.id,content:(s==null?void 0:s.contents)??[],config:s==null?void 0:s.config,onContentChange:n.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(I,{id:"themeBorderButton",onClick:n.beforeDialogDestroy},{default:t.withCtx(()=>p[1]||(p[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(I,{id:"themeButton",onClick:n.clickSubmitForm},{default:t.withCtx(()=>p[2]||(p[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const Et=Ct._export_sfc(Dt,[["render",Bt],["__scopeId","data-v-20f284c2"]]);exports.addSelectMenu=Oe;exports.default=Et;exports.deleteSelectMenu=Re;exports.fixSelectMenu=ue;exports.setComponent=Ye;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("./index-DIqYHU20.cjs"),t=require("vue"),P=require("./index-C8fMwErX.cjs"),ht=require("./index-dD_cGWLc.cjs"),yt=require("./index-COvNwtxL.cjs"),vt=require("vue-router"),Le=require("./index-9hspBVrQ.cjs"),U=require("./index-C5pQXH0_.cjs"),gt=require("./menuIndex-8RF_0N_y.cjs"),kt=require("./index-BpPyaNFa.cjs"),m=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D4mQcDEW.cjs"),Pe=require("./index-7WRVFebE.cjs"),Ct=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=(n,p,K=0)=>{let y=n;return y!=null&&y.every(r=>Array.isArray(r))&&(y!=null&&y.every(r=>Array.isArray(r)&&r.length===1)?y=y==null?void 0:y.filter(r=>(r==null?void 0:r[0])!==(p==null?void 0:p[K])):y=y==null?void 0:y.map(r=>{if(r!=null&&r.find(o=>o===(p==null?void 0:p[K]))&&(p==null?void 0:p.length)!==1){let o=P.cloneDeep(p),c=r==null?void 0:r.filter(I=>I!==(o==null?void 0:o[K])),T=K+1,x=Re(c,o,T),B=[];B.push(r==null?void 0:r[0]),x==null||x.forEach(I=>{B.push(I)}),r=B}return r})),y},Oe=(n,p,K,y=0)=>{let r=n;return r!=null&&r.every(o=>Array.isArray(o))&&(r!=null&&r.every(o=>Array.isArray(o)&&o.length===1)?r.push([K]):r=r==null?void 0:r.map(o=>{if(o!=null&&o.find(c=>c===(p==null?void 0:p[y]))&&(p==null?void 0:p.length)!==1){let c=P.cloneDeep(p),T=o==null?void 0:o.filter(V=>V!==(c==null?void 0:c[y])),x=y+1,B=Oe(T,c,K,x),I=[];I.push(o==null?void 0:o[0]),B==null||B.forEach(V=>{I.push(V)}),o=I}return o})),r},ue=(n,p,K,y,r=0)=>{let o=n;return o!=null&&o.every(c=>Array.isArray(c))&&(o!=null&&o.every(c=>Array.isArray(c)&&c.length===1)?o=o==null?void 0:o.map(c=>((c==null?void 0:c[0])===K&&(c=[y]),c)):o=o==null?void 0:o.map(c=>{if(c!=null&&c.find(T=>T===(p==null?void 0:p[r]))&&(p==null?void 0:p.length)!==1){let T=P.cloneDeep(p),x=c==null?void 0:c.filter(R=>R!==(T==null?void 0:T[r])),B=r+1,I=ue(x,T,K,y,B),V=[];V.push(c==null?void 0:c[0]),I==null||I.forEach(R=>{V.push(R)}),c=V}return c})),o};function Ye(n="menu"){return{name:n,components:{SvgIcon:kt.SvgIcon,ssMenu:je.ssMenu,DynamicIcon:je._sfc_main,ssDialog:ht.ssDialog,ssInput:yt._sfc_main$2},setup(p,{emit:K}){const y=t.defineProps({mode:{type:String,default:"vertical"}}),r=t.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),o=P.useMenuState(),c=P.useModelComp(P.pinia),T=P.useLoginState(P.pinia),{loginUserInfo:x}=P.storeToRefs(T),B=t.ref(0),I=vt.useRouter(),V=t.ref(),{asideMenus:R,menuTriggerType:s,platform:Ne}=P.storeToRefs(o),{fixMenuStatus:qe}=P.storeToRefs(c),Ue=t.computed(()=>y==null?void 0:y.mode),ee=l=>l==null?void 0:l.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=ee(e.children)),e}),A=t.computed(()=>{let l=[...R.value];if((l==null?void 0:l.length)===0)return I.push("/"),[];const a=et(l,me.value);return a.isFlag||(l=a==null?void 0:a.data),l=l==null?void 0:l.map(e=>{var k,C;return!(e!=null&&e.children)||((k=e==null?void 0:e.children)==null?void 0:k.length)===0?e.config=r.value:e!=null&&e.children&&((C=e==null?void 0:e.children)==null?void 0:C.length)>0&&(e.children=ee(e.children)),e}),l}),ze=async(l,a)=>{c.setRouteToChildPath(""),o.setMenuTriggerType("click"),o.setActiveMenuPath(l==null?void 0:l.path),o.setActiveAsideMenu(l),l.isRouter?I.push(l.path):I.push("/"),K("node-click",l,a)},Ze=async l=>{const a=gt.findNodeByPropInTree(A.value,"path",l);o.setActiveAsideMenu(a),c.setRouteToChildPath(""),qe.value?c.setFixMenuStatus(!1):(Z.value&&(s.value="open"),s.value==="click"?B.value===1?o.setActiveMenuPath(sessionStorage.getItem("pageKey")):o.setActiveMenuPath(l):Z.value||(o.setMenuTriggerType("click"),o.setActiveMenuPath(l))),l!=null&&l.startsWith("/")?I.push(l):I.push("/"),B.value++},He=l=>{Z.value||o.setActiveMenuPath(l)},X=l=>{const a=document.documentElement;l==null||l.forEach(e=>{a.style.setProperty(e.name,e.value)})};t.onMounted(()=>{B.value=1});const me=t.computed(()=>{const l=sessionStorage.getItem("authority");return l?JSON.parse(l):[]});t.watch(()=>Ne.value,l=>{l==="browser"?X(Le.browserVerticalMenuClasses):l==="client"?(X(Le.clientHorizontalMenuClasses),X(Le.clientVerticalMenuClasses)):l==="three"&&(X(Le.threeHorizontalMenuClasses),X(Le.threeVerticalMenuClasses))},{immediate:!0});const et=(l,a)=>({isFlag:!0}),O=t.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),tt=l=>je.getComponent(l),lt=t.ref({}),ot=t.ref([]),te=t.ref({}),Y=t.ref({}),at=l=>{switch(l){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Je=t.ref({}),st=l=>{o.setCacheInputMenu({type:O.type,data:l}),o.setIsRefreshMenus(!0)},it=async(l,a,e)=>{var k,C,_,z,E,H,j,le,oe,ae,se,ie,re,ce,pe,ne,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,be,we,Te,Be,Ee,Me,Ke,xe,Ve,Ae,h,F,L,b;if(a==="create"){let d=(e==null?void 0:e.title)+"(1)",M=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(C=(k=M==null?void 0:M.data)==null?void 0:k.result)==null?void 0:C[0],J=(_=S==null?void 0:S.value)==null?void 0:_.pageData;J.compData=(z=J.compData)==null?void 0:z.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Oe(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),d)),i}),await U.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}});let N=(H=(E=e==null?void 0:e.path)==null?void 0:E.split("/"))==null?void 0:H.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}),q=await m.getItemData((oe=(le=(j=e==null?void 0:e.path)==null?void 0:j.split("/"))==null?void 0:le.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:oe.join("/"),sessionStorage.getItem("systemKey"),"");if(N.push(d),N=N==null?void 0:N.join("/"),(q==null?void 0:q.length)>0){let i=q==null?void 0:q[0],f=(se=(ae=i==null?void 0:i.compData)==null?void 0:ae.find(g=>(g==null?void 0:g.key)==="header"))==null?void 0:se.contents;if(((ie=f==null?void 0:f[0])==null?void 0:ie.directiveLabel)==="#isMain"){let g=(re=f==null?void 0:f[0])==null?void 0:re.prop,D=(pe=(ce=i==null?void 0:i.compData)==null?void 0:ce.find(w=>(w==null?void 0:w.key)==="tableContents"))==null?void 0:pe.contents,W;D==null||D.forEach(w=>{var G,u;if(w.length===1)((G=w==null?void 0:w[0])==null?void 0:G[g])===(e==null?void 0:e.title)&&(W=w==null?void 0:w[0],W[g]=d);else{let Q=(u=f==null?void 0:f.filter($=>$!=="操作"))==null?void 0:u.map($=>$==null?void 0:$.prop),$e=w==null?void 0:w.filter($=>!($!=null&&$.id)),Fe=m.getValueToObjectValue($e,Q);Fe[g]=d,W=Fe}}),await U.createInsofDataApi({key:{type:"data",pageKey:(fe=(de=(ne=e==null?void 0:e.path)==null?void 0:ne.split("/"))==null?void 0:de.filter((w,G)=>{var u,Q;return G!==((Q=(u=e==null?void 0:e.path)==null?void 0:u.split("/"))==null?void 0:Q.length)-1}))==null?void 0:fe.join("/"),tableId:i==null?void 0:i.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(he=x.value)==null?void 0:he.id,createUserLayer:((ye=x.value)==null?void 0:ye.dept)||((ve=x.value)==null?void 0:ve.部门名称)},value:{tableData:W}})}}await m.newLoadingConstruct(e==null?void 0:e.path,N),o.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),o.setActiveMenuPath((Ce=(ke=(ge=e==null?void 0:e.path)==null?void 0:ge.split("/"))==null?void 0:ke.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:Ce.join("/")),o.setActiveTopMenuPath((Ie=(De=e==null?void 0:e.path)==null?void 0:De.split("/"))==null?void 0:Ie[0]),o.setIsRefreshMenus(!1),o.setIsRefreshMenus(!0)}else if(a==="update")V.value=e;else if(a==="delete"){let d=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),M=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(_e=(Se=M==null?void 0:M.data)==null?void 0:Se.result)==null?void 0:_e[0],J=(be=S==null?void 0:S.value)==null?void 0:be.pageData;if(J.compData=(we=J.compData)==null?void 0:we.map(i=>{var f;return(i==null?void 0:i.key)==="menuContents"&&(i.contents=Re(i.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),i}),await U.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:J}}),((Be=(Te=d==null?void 0:d.data)==null?void 0:Te.result)==null?void 0:Be.length)>0){let i=(Me=(Ee=d==null?void 0:d.data)==null?void 0:Ee.result)==null?void 0:Me.map(f=>f==null?void 0:f.id);(i==null?void 0:i.length)>0&&await U.batchDeleteInsofDataApi({ids:i})}let N=await m.getItemData((Ve=(xe=(Ke=e==null?void 0:e.path)==null?void 0:Ke.split("/"))==null?void 0:xe.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:Ve.join("/"),sessionStorage.getItem("systemKey"),""),q=[];(N==null?void 0:N.length)>0&&(N==null||N.forEach(i=>{var g,D,W,w,G,u,Q,$e,Fe,$,We;let f=(w=(W=(D=(g=i==null?void 0:i.compData)==null?void 0:g.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:D.contents)==null?void 0:W[0])==null?void 0:w.prop;(($e=(Q=(u=(G=i==null?void 0:i.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:u.contents)==null?void 0:Q[0])==null?void 0:$e.directiveLabel)==="#isMain"&&((We=($=(Fe=i==null?void 0:i.compData)==null?void 0:Fe.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:$.contents)==null||We.forEach(v=>{var Ge,Qe,Xe;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&q.push((Ge=v==null?void 0:v[0])==null?void 0:Ge.id):((Qe=v==null?void 0:v[0])==null?void 0:Qe[f])===(e==null?void 0:e.title)&&q.push((Xe=v==null?void 0:v[0])==null?void 0:Xe.id)}))})),(q==null?void 0:q.length)>0&&await U.batchDeleteInsofDataApi({ids:q}),o.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),o.setActiveMenuPath((F=(h=(Ae=e==null?void 0:e.path)==null?void 0:Ae.split("/"))==null?void 0:h.filter((i,f)=>{var g,D;return f!==((D=(g=e==null?void 0:e.path)==null?void 0:g.split("/"))==null?void 0:D.length)-1}))==null?void 0:F.join("/")),o.setActiveTopMenuPath((b=(L=e==null?void 0:e.path)==null?void 0:L.split("/"))==null?void 0:b[0]),o.setIsRefreshMenus(!1),o.setIsRefreshMenus(!0)}},rt=async(l,a)=>{var le,oe,ae,se,ie,re,ce,pe,ne,de,fe,he,ye,ve,ge,ke,Ce,De,Ie,Se,_e,be,we,Te,Be,Ee,Me,Ke,xe,Ve,Ae;let e=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),k=(oe=(le=e==null?void 0:e.data)==null?void 0:le.result)==null?void 0:oe[0],C=(ae=k==null?void 0:k.value)==null?void 0:ae.pageData;C.compData=(se=C.compData)==null?void 0:se.map(h=>{var F,L;return(h==null?void 0:h.key)==="menuContents"&&(h.contents=ue(h.contents,(F=a==null?void 0:a.path)==null?void 0:F.split("/"),a==null?void 0:a.title,(L=l==null?void 0:l.target)==null?void 0:L.value)),h}),k!=null&&k.id&&await U.updateInsofDataApi({id:k==null?void 0:k.id,value:{pageData:C}});let _=(re=(ie=a==null?void 0:a.path)==null?void 0:ie.split("/"))==null?void 0:re.filter((h,F)=>{var L,b;return F!==((b=(L=a==null?void 0:a.path)==null?void 0:L.split("/"))==null?void 0:b.length)-1}),z=_==null?void 0:_.join("/");_.push((ce=l==null?void 0:l.target)==null?void 0:ce.value),_=_==null?void 0:_.join("/");let E=await m.getItemData(z,sessionStorage.getItem("systemKey"),"");if(((he=(fe=(de=(ne=(pe=E==null?void 0:E[0])==null?void 0:pe.compData)==null?void 0:ne.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:de.contents)==null?void 0:fe[0])==null?void 0:he.directiveLabel)==="#isMain"){let h=(Ce=(ke=(ge=(ve=(ye=E==null?void 0:E[0])==null?void 0:ye.compData)==null?void 0:ve.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:ge.contents)==null?void 0:ke[0])==null?void 0:Ce.prop,F=(Se=(Ie=(De=E==null?void 0:E[0])==null?void 0:De.compData)==null?void 0:Ie.find(d=>(d==null?void 0:d.key)==="tableContents"))==null?void 0:Se.contents,L=(Te=(we=(be=(_e=E==null?void 0:E[0])==null?void 0:_e.compData)==null?void 0:be.find(d=>(d==null?void 0:d.key)==="header"))==null?void 0:we.contents)==null?void 0:Te.map(d=>d==null?void 0:d.prop),b;if(F==null||F.forEach(d=>{var S;let M=m.getValueToObjectValue(d,L);(M==null?void 0:M[h])===a.title&&(b=M,b[h]=(S=l==null?void 0:l.target)==null?void 0:S.value)}),b){let d={};for(let S in b)S!=="id"&&(d[S]=b==null?void 0:b[S]);let M=[{id:b==null?void 0:b.id,value:{tableData:d}}];await U.batchUpdateInsofDataApi({dataList:M})}}let H=await U.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:a==null?void 0:a.path}}),j=(Ee=(Be=H==null?void 0:H.data)==null?void 0:Be.result)==null?void 0:Ee.map(h=>({id:h==null?void 0:h.id,key:h==null?void 0:h.key}));j=j==null?void 0:j.map(h=>(h.key.pageKey=_,h)),(j==null?void 0:j.length)>0&&await U.batchUpdateInsofDataApi({dataList:j}),o.setUpdateMenuStatus(!1),await Pe.verifyStructureDataToStore(),o.setActiveMenuPath((xe=(Ke=(Me=a==null?void 0:a.path)==null?void 0:Me.split("/"))==null?void 0:Ke.filter((h,F)=>{var L,b;return F!==((b=(L=a==null?void 0:a.path)==null?void 0:L.split("/"))==null?void 0:b.length)-1}))==null?void 0:xe.join("/")),o.setActiveTopMenuPath((Ae=(Ve=a==null?void 0:a.path)==null?void 0:Ve.split("/"))==null?void 0:Ae[0]),o.setIsRefreshMenus(!1),o.setIsRefreshMenus(!0),V.value=void 0},ct=async(l,a)=>{O.type=at(a==null?void 0:a.operateType),await it(a,O.type,l),Y.value=l,Je.value=a},pt=()=>{O.show=!1},nt=l=>l==null?void 0:l.filter(a=>a.allowInherit),dt=()=>{var e,k,C,_,z;let l;O.type==="create"&&(l=((e=Y.value)==null?void 0:e.path)+"/"+te.value[(k=te.value)==null?void 0:k.prop]),O.type==="update"&&(l=(C=Y.value)==null?void 0:C.path);const a={...Y.value,config:nt((_=Y.value)==null?void 0:_.config),children:[],childMenus:[],title:te.value[(z=te.value)==null?void 0:z.prop],path:l};console.log("clickSubmitForm",Je.value,Y.value,a),st(a),O.show=!1},ft=l=>{var e,k;const a=(e=l==null?void 0:l.contents)==null?void 0:e.find(C=>C.key==="formContent");a&&(te.value=(k=a==null?void 0:a.contents)==null?void 0:k.reduce((C,_)=>(C[_.key]=_.value,C.prop=_.key,C),{}))},Z=t.ref(!1);return{isCollapse:Z,handleMenuCollapse:()=>{Z.value=!Z.value},handleCompChange:ft,dialogForm:lt,dialogRenderComps:ot,getComponents:tt,clickSubmitForm:dt,dialogInfo:O,beforeDialogDestroy:pt,clickMenuIcon:ct,mode:Ue,renderMenuList:A,clickMenu:ze,openMenu:Ze,closeMenu:He,changeMenuStyle:X,fixElement:V,onBlur:rt}}}}const Dt=t.defineComponent(Ye()),It=["title"],St={key:1,class:"menu-title",style:{display:"flex",width:"100px"}},_t={key:2,class:"menu-operate-icon"},bt={class:"menu-config-wrap"},wt=["onClick"],Tt={class:"module-dialog-content"};function Bt(n,p,K,y,r,o){var R;const c=t.resolveComponent("ss-input"),T=t.resolveComponent("svg-icon"),x=t.resolveComponent("el-popover"),B=t.resolveComponent("ss-menu"),I=t.resolveComponent("el-button"),V=t.resolveComponent("ss-dialog");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(B,{class:"vertical-menu",mode:n.mode,menuList:n.renderMenuList,isCollapse:n.isCollapse,uniqueOpened:!0,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu},{title:t.withCtx(({menu:s})=>{var Ne,qe,Ue,ee;return[!n.fixElement||(s==null?void 0:s.path)!==((Ne=n.fixElement)==null?void 0:Ne.path)?(t.openBlock(),t.createElementBlock("span",{key:0,title:s.title,class:"menu-title",style:t.normalizeStyle({marginRight:s!=null&&s.config&&((qe=s==null?void 0:s.config)==null?void 0:qe.length)>0?"25px":"1px"})},t.toDisplayString(s.title??""),13,It)):t.createCommentVNode("",!0),n.fixElement&&(s==null?void 0:s.path)===((Ue=n.fixElement)==null?void 0:Ue.path)?(t.openBlock(),t.createElementBlock("span",St,[t.createVNode(c,{value:s.title,onBlur:A=>n.onBlur(A,s)},null,8,["value","onBlur"])])):t.createCommentVNode("",!0),s!=null&&s.config&&((ee=s==null?void 0:s.config)==null?void 0:ee.length)>0?(t.openBlock(),t.createElementBlock("span",_t,[t.createVNode(x,{title:"",placement:"bottom-start",trigger:"hover","popper-class":"menu-operate-popover"},{reference:t.withCtx(()=>[t.createVNode(T,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:t.withCtx(()=>[t.createElementVNode("div",bt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s==null?void 0:s.config,A=>(t.openBlock(),t.createElementBlock("div",{class:"menu-config-item",key:A.id,onClick:ze=>n.clickMenuIcon(s,A)},[t.createVNode(T,{name:A==null?void 0:A.operateIcon,style:{width:"15px",height:"15px","margin-right":"8px"}},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(A==null?void 0:A.operateType),1)],8,wt))),128))])]),_:2},1024)])):t.createCommentVNode("",!0)]}),_:1},8,["mode","menuList","isCollapse","onClickMenu","onOpenMenu","onCloseMenu"]),((R=n.renderMenuList)==null?void 0:R.length)>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"fold-icon",onClick:p[0]||(p[0]=(...s)=>n.handleMenuCollapse&&n.handleMenuCollapse(...s))},[t.createVNode(T,{name:n.isCollapse?"expand":"pack",style:{width:"15px",height:"15px"}},null,8,["name"])])):t.createCommentVNode("",!0),t.createVNode(V,{class:"module-dialog",title:n.dialogInfo.title,visible:n.dialogInfo.show,width:n.dialogInfo.width,onBeforeDestroy:n.beforeDialogDestroy},{default:t.withCtx(()=>[t.createElementVNode("div",Tt,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.dialogRenderComps,s=>(t.openBlock(),t.createElementBlock("div",{key:s.id},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.getComponents((s==null?void 0:s.comp)??"Input")),{itemData:s==null?void 0:s.compData,key:s==null?void 0:s.id,content:(s==null?void 0:s.contents)??[],config:s==null?void 0:s.config,onContentChange:n.handleCompChange},null,40,["itemData","content","config","onContentChange"]))]))),128))])]),footer:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(I,{id:"themeBorderButton",onClick:n.beforeDialogDestroy},{default:t.withCtx(()=>p[1]||(p[1]=[t.createTextVNode("取消")])),_:1,__:[1]},8,["onClick"]),t.createVNode(I,{id:"themeButton",onClick:n.clickSubmitForm},{default:t.withCtx(()=>p[2]||(p[2]=[t.createTextVNode(" 确认 ")])),_:1,__:[2]},8,["onClick"])])]),_:1},8,["title","visible","width","onBeforeDestroy"])],64)}const Et=Ct._export_sfc(Dt,[["render",Bt],["__scopeId","data-v-20f284c2"]]);exports.addSelectMenu=Oe;exports.default=Et;exports.deleteSelectMenu=Re;exports.fixSelectMenu=ue;exports.setComponent=Ye;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),u=require("./index-C8fMwErX.cjs"),_=require("./index-BdP1gtPp.cjs"),r=require("./index-DHdrBDP4.cjs"),C=require("./index-C5pQXH0_.cjs"),g=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),v={class:"menu-content"},x=l.defineComponent({__name:"index",setup(q){const m=u.useMenuState(u.pinia),{menus:c}=u.storeToRefs(m),p=l.ref([]),f=async()=>{var i,t,n,a;const e=await C.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey")}});if(((i=e==null?void 0:e.data)==null?void 0:i.type)==="success"){let o=(n=(t=e==null?void 0:e.data)==null?void 0:t.result)==null?void 0:n.map(s=>s);return o=(a=u.cloneDeep(o))==null?void 0:a.map(s=>{var d;const b=Object.values((d=s==null?void 0:s.value)==null?void 0:d.tableData);return b.unshift({id:s==null?void 0:s.id}),b}),o}else return[]};l.onMounted(async()=>{var n;const e=await f(),t=[{key:"header",contents:[{label:"主菜单名称",formType:"Select",options:(n=u.cloneDeep(c.value))==null?void 0:n.map(a=>({label:a==null?void 0:a.title,value:a==null?void 0:a.title})),prop:"主菜单名称"},{label:"隐藏三维显示",formType:"Switch",value:!1,prop:"隐藏三维显示"},{label:"操作"}]},{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}];t.push({key:"tableContents",contents:e}),p.value=t});const y=e=>{(e==null?void 0:e.buttonName)==="新增"?r.addMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="删除"?r.deleteMenuContent(e==null?void 0:e.singleContent):(e==null?void 0:e.buttonName)==="编辑"&&r.fixMenuContent(e==null?void 0:e.singleContent)};return(e,i)=>(l.openBlock(),l.createElementBlock("div",v,[l.createVNode(_.ssTable,{itemData:p.value,class:"table-content",onChange:y},null,8,["itemData"])]))}}),h=g._export_sfc(x,[["__scopeId","data-v-26f5cadc"]]);exports.default=h;
|