ss-component-new 1.2.197 → 1.2.198
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-Byqavztq.cjs → MTLLoader-DACeOwx8.cjs} +1 -1
- package/dist/{MTLLoader-Dgdauq0e.js → MTLLoader-DO6JtV2J.js} +1 -1
- package/dist/{OrbitControls-ClbU8eSj.js → OrbitControls-CVZSxhco.js} +1 -1
- package/dist/{OrbitControls-CqLjuVIG.cjs → OrbitControls-Dnwv1l-5.cjs} +1 -1
- package/dist/{URDFLoader-DvK8TeNl.js → URDFLoader-BNqQfPqb.js} +2 -2
- package/dist/{URDFLoader-CNdb489r.cjs → URDFLoader-BoSgd6gH.cjs} +1 -1
- package/dist/{animationData-D-BqiAM4.js → animationData-D3-99sWf.js} +2 -2
- package/dist/{animationData-unjhG8fw.cjs → animationData-DHASNMoi.cjs} +1 -1
- package/dist/{array-BalKa-G_.cjs → array-DuMZPpVP.cjs} +1 -1
- package/dist/{array-BWgaJn7i.js → array-DxkXasEB.js} +3 -3
- package/dist/{iconfont-Pr-FT7zi.js → iconfont-AyWwUMxc.js} +2 -2
- package/dist/{iconfont-B1_Xqnj1.cjs → iconfont-U7rG6UGs.cjs} +1 -1
- package/dist/{index-BESXbWVG.js → index-0lSRcHqv.js} +2 -2
- package/dist/{index-VnVlZEmb.js → index-3oQGURYh.js} +1 -1
- package/dist/{index-B3pt6yKi.js → index-4awf2rkD.js} +6 -6
- package/dist/{index-DufZVmKf.js → index-7MBVUN82.js} +9 -8
- package/dist/{index-DrUL3MEH.cjs → index-8w6PrNkw.cjs} +1 -1
- package/dist/index-9FU0RWoV.js +3297 -0
- package/dist/{index-jUgVakK7.js → index-B-d6-ohn.js} +3 -3
- package/dist/index-B2FiRoly.cjs +1 -0
- package/dist/{index-cZFinVc1.cjs → index-B6K14gG9.cjs} +1 -1
- package/dist/{index-BEvGe7qR.cjs → index-BCfX45g1.cjs} +1 -1
- package/dist/{index-CZ4PGO_D.cjs → index-BDcBHWC2.cjs} +1 -1
- package/dist/{index-Ce_RQRLx.js → index-BDhmy-7L.js} +20 -20
- package/dist/{index-BDrk1uN0.cjs → index-BJO_TiAy.cjs} +1 -1
- package/dist/{index-BLv0pdvk.js → index-BO3Qkqzh.js} +3 -3
- package/dist/{index-DSc4zqmL.cjs → index-BPTR1s4o.cjs} +10 -10
- package/dist/{index-Ca5TreCg.cjs → index-BQEwWecE.cjs} +1 -1
- package/dist/{index-B6dURO8P.cjs → index-BZ5_PpJp.cjs} +1 -1
- package/dist/{index-CAfFVPVi.cjs → index-BnITIl1C.cjs} +1 -1
- package/dist/{index-Dojr8FJ0.js → index-BseikzDK.js} +2 -2
- package/dist/{index-CLHjjvOb.js → index-BucMQlBB.js} +1 -1
- package/dist/{index-C0xcoS5Z.js → index-Bwb6w0wO.js} +4 -4
- package/dist/{index-BhEaMtAm.js → index-C1fTLujM.js} +3 -3
- package/dist/{index-Cac0w_Jv.js → index-C5jivsmi.js} +11 -11
- package/dist/{index-DDgET2j1.cjs → index-C71_AKGx.cjs} +1 -1
- package/dist/{index-gqQl6PZB.js → index-CFl9wC5o.js} +6 -6
- package/dist/{index-DtFLuXja.cjs → index-CLqCXsqK.cjs} +1 -1
- package/dist/{index-BAaCpfqG.js → index-CO41nOz7.js} +2 -2
- package/dist/{index-C4RjZOxz.cjs → index-CP6V9Df_.cjs} +1 -1
- package/dist/{index-DQsD0m6q.js → index-CT-1q_Sb.js} +1 -1
- package/dist/{index-By--71sB.cjs → index-CXC0u8pm.cjs} +1 -1
- package/dist/{index-BnrtLGSt.cjs → index-CcNuHoZS.cjs} +1 -1
- package/dist/{index-BHrd3Rnr.cjs → index-CdMT_Zkq.cjs} +1 -1
- package/dist/{index-RptNsNWL.js → index-CgelR-6I.js} +3 -3
- package/dist/{index-CVv0twLg.js → index-Chmm97CU.js} +5 -5
- package/dist/{index-DIlZjOW9.js → index-CmNMrF68.js} +12 -12
- package/dist/{index-Dm9WJT36.cjs → index-CnuMyt69.cjs} +1 -1
- package/dist/{index-DW1RCzWC.cjs → index-D-uo7H2E.cjs} +1 -1
- package/dist/{index-D67gjfOO.cjs → index-D31qdo3B.cjs} +1 -1
- package/dist/{index-B-UnOwnc.js → index-DEN8cJAm.js} +2 -2
- package/dist/{index-BP07Gnjo.cjs → index-DOItJqcJ.cjs} +11 -11
- package/dist/{index-CPQHD9wh.js → index-DRDKKizg.js} +8 -7
- package/dist/{index-BpwyXpsR.cjs → index-DYFZIY8j.cjs} +1 -1
- package/dist/{index-Qe7Q00Fv.cjs → index-D_DpNI2W.cjs} +1 -1
- package/dist/{index-mjz9Da8Y.cjs → index-DaRuwvRP.cjs} +1 -1
- package/dist/{index-BdG8TrO6.js → index-DfFq9kkn.js} +2 -2
- package/dist/{index-t-bCvak-.cjs → index-DiRujSe_.cjs} +1 -1
- package/dist/{index-DOEl-NDu.cjs → index-DjzwipY0.cjs} +1 -1
- package/dist/{index-DRjU_LhS.js → index-Dq9Tho6E.js} +3 -3
- package/dist/{index-CtK95uR8.cjs → index-DqdWYUrz.cjs} +1 -1
- package/dist/{index-DdFjT9Lv.js → index-DzElE7Kh.js} +1 -1
- package/dist/{index-ewzEcjMi.js → index-EzLiPHAn.js} +4 -4
- package/dist/{index-K6PeHL12.cjs → index-KaxOq1_-.cjs} +1 -1
- package/dist/{index-RWbnXgK_.js → index-Oy-hRR6Z.js} +4 -4
- package/dist/{index-Db2i8Ibt.js → index-RLfjsj4L.js} +2 -2
- package/dist/{index-CDb9M8-d.js → index-aWkZx7My.js} +2 -2
- package/dist/{index-DHtKscY6.js → index-gruT7omp.js} +1 -1
- package/dist/{index-B3Nii_wb.js → index-r48vNrKN.js} +2 -2
- package/dist/{index-BdCj8NzO.cjs → index-ub7lvsfV.cjs} +1 -1
- package/dist/{index-G1p03SY5.cjs → index-z78zgQsK.cjs} +1 -1
- package/dist/{index-BT4zPLtT.cjs → index-zAtSFM2v.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DU8QxF4Q.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DpRm1D1L.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BVGLC2SV.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-hMJCL1Qk.js} +9 -9
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bamq-CWP.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C8n9olfd.cjs} +49 -49
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dz5T_AqR.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DgCNtMnV.js} +1197 -1202
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Dy6rsh2c.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-B9POGhwa.js} +7 -7
- package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-CLRlyz4U.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-aE8dAbK9.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-DQnMqyCR.js → index.vue_vue_type_style_index_1_lang-CtOB5lpf.js} +467 -343
- package/dist/index.vue_vue_type_style_index_1_lang-UuP0ZBQR.cjs +3 -0
- package/dist/{isString-5Nawl-Uc.js → isString-D70CzuJZ.js} +1 -1
- package/dist/{isString-DKZ1g7Pn.cjs → isString-Do5yyRUw.cjs} +1 -1
- package/dist/{main-CyCvDC23.js → main-Bhc4rs1O.js} +5 -5
- package/dist/{main-DQ6Ak0EZ.cjs → main-QJTAJyAl.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-VYZ6-TKK.js → threeModel-poOL5V2M.js} +5 -5
- package/dist/{threeModel-zbyHE0xz.cjs → threeModel-r6kZdDei.cjs} +1 -1
- package/dist/{threePreview-DmwhnnFP.js → threePreview-BY1POvl8.js} +4 -4
- package/dist/{threePreview-eC4zdGe3.cjs → threePreview-DKs8aYcW.cjs} +1 -1
- package/dist/{threeSceneView-DcaisuD7.cjs → threeSceneView-Cuz_EMZU.cjs} +1 -1
- package/dist/{threeSceneView-B1Vh9-kH.js → threeSceneView-KKWkkD2y.js} +11 -11
- package/dist/{threeSceneViewForCPMPIP-CrUTpcSK.cjs → threeSceneViewForCPMPIP-DFMYV0Jz.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bug3YpE6.js → threeSceneViewForCPMPIP-Dwa17cnT.js} +8 -8
- package/dist/{threeTrackPathView-SbLCNVjN.cjs → threeTrackPathView-BrPuXqrr.cjs} +1 -1
- package/dist/{threeTrackPathView-DoGfpu6-.js → threeTrackPathView-D4w6l9m2.js} +5 -5
- package/dist/{threeViewerHost-CMycPEys.js → threeViewerHost-DCU9cNEx.js} +4 -4
- package/dist/{threeViewerHost-DsgqzamS.cjs → threeViewerHost-krP0Lb0-.cjs} +1 -1
- package/dist/{urdfTree-CgNDwBy9.js → urdfTree-CQQPUmyr.js} +1 -1
- package/dist/{urdfTree-dEVNThOD.cjs → urdfTree-CcC8aW11.cjs} +1 -1
- package/dist/{workpieceTreePanel-DaS5Cegv.js → workpieceTreePanel-B6x641Qw.js} +4 -4
- package/dist/{workpieceTreePanel-N0OTMZ1G.cjs → workpieceTreePanel-Bm8mjA8R.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BcAmPr1D.js +0 -3112
- package/dist/index-DcJzP_x9.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_1_lang-DsHyjhmo.cjs +0 -3
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { _ as ka, M as Ia, g as ba } from "./index-
|
|
1
|
+
import { _ as ka, M as Ia, g as ba } from "./index-CmNMrF68.js";
|
|
2
2
|
import { defineComponent as na, defineProps as Ca, ref as B, computed as Ee, onMounted as Ta, watch as Ka, reactive as wa } from "vue";
|
|
3
|
-
import { u as _a, a as Ua } from "./index-
|
|
4
|
-
import { s as Fa } from "./index-
|
|
5
|
-
import { b as Aa } from "./index-
|
|
6
|
-
import { p as qe, u as Ea, s as je, c as xe, g as Ue, e as Pe, bv as Ge, by as ja, h as Pa, f as Qe } from "./index-
|
|
3
|
+
import { u as _a, a as Ua } from "./index-3oQGURYh.js";
|
|
4
|
+
import { s as Fa } from "./index-DzElE7Kh.js";
|
|
5
|
+
import { b as Aa } from "./index-DRDKKizg.js";
|
|
6
|
+
import { p as qe, u as Ea, s as je, c as xe, g as Ue, e as Pe, bv as Ge, by as ja, h as Pa, f as Qe } from "./index-7MBVUN82.js";
|
|
7
7
|
import { useRouter as La } from "vue-router";
|
|
8
8
|
import { a as Ma, e as xa, f as Ra, g as Ba, h as za } from "./index-CAPx0_D4.js";
|
|
9
9
|
import { S as Oa } from "./index-BHtNKL1L.js";
|
|
10
|
-
import { g as Le, b as Xe, V as Wa } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
11
|
-
import { v as Me } from "./index-
|
|
10
|
+
import { g as Le, b as Xe, V as Wa } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DgCNtMnV.js";
|
|
11
|
+
import { v as Me } from "./index-r48vNrKN.js";
|
|
12
12
|
const Ye = (W, d, A = 0) => {
|
|
13
13
|
let v = W;
|
|
14
14
|
return v != null && v.every((i) => Array.isArray(i)) && (v != null && v.every((i) => Array.isArray(i) && i.length === 1) ? v = v == null ? void 0 : v.filter((i) => (i == null ? void 0 : i[0]) !== (d == null ? void 0 : d[A])) : v = v == null ? void 0 : v.map((i) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const Me=require("./index-Qe7Q00Fv.cjs"),C=require("vue"),Ge=require("./index-By--71sB.cjs"),ya=require("./index-Dm9WJT36.cjs"),na=require("./index-DSc4zqmL.cjs"),D=require("./index-BP07Gnjo.cjs"),Da=require("vue-router"),Ue=require("./index-9hspBVrQ.cjs"),ga=require("./index-BpPyaNFa.cjs"),Z=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bamq-CWP.cjs"),je=require("./index-mjz9Da8Y.cjs"),qe=(z,d,E=0)=>{let y=z;return y!=null&&y.every(i=>Array.isArray(i))&&(y!=null&&y.every(i=>Array.isArray(i)&&i.length===1)?y=y==null?void 0:y.filter(i=>(i==null?void 0:i[0])!==(d==null?void 0:d[E])):y=y==null?void 0:y.map(i=>{if(i!=null&&i.find(s=>s===(d==null?void 0:d[E]))&&(d==null?void 0:d.length)!==1){let s=D.cloneDeep(d),o=i==null?void 0:i.filter(b=>b!==(s==null?void 0:s[E])),M=E+1,q=qe(o,s,M),K=[];K.push(i==null?void 0:i[0]),q==null||q.forEach(b=>{K.push(b)}),i=K}return i})),y},Pe=(z,d,E,y=0)=>{let i=z;return i!=null&&i.every(s=>Array.isArray(s))&&(i!=null&&i.every(s=>Array.isArray(s)&&s.length===1)?i.push([E]):i=i==null?void 0:i.map(s=>{if(s!=null&&s.find(o=>o===(d==null?void 0:d[y]))&&(d==null?void 0:d.length)!==1){let o=D.cloneDeep(d),M=s==null?void 0:s.filter(P=>P!==(o==null?void 0:o[y])),q=y+1,K=Pe(M,o,E,q),b=[];b.push(s==null?void 0:s[0]),K==null||K.forEach(P=>{b.push(P)}),s=b}return s})),i},Le=(z,d,E,y,i=0)=>{let s=z;return s!=null&&s.every(o=>Array.isArray(o))&&(s!=null&&s.every(o=>Array.isArray(o)&&o.length===1)?s=s==null?void 0:s.map(o=>((o==null?void 0:o[0])===E&&(o=[y]),o)):s=s==null?void 0:s.map(o=>{if(o!=null&&o.find(M=>M===(d==null?void 0:d[i]))&&(d==null?void 0:d.length)!==1){let M=D.cloneDeep(d),q=o==null?void 0:o.filter(H=>H!==(M==null?void 0:M[i])),K=i+1,b=Le(q,M,E,y,K),P=[];P.push(o==null?void 0:o[0]),b==null||b.forEach(H=>{P.push(H)}),o=P}return o})),s};function Qe(z="menu"){return{name:z,components:{SvgIcon:ga.SvgIcon,ssMenu:Me.ssMenu,DynamicIcon:Me._sfc_main,ssDialog:ya.ssDialog,ssInput:na._sfc_main$2},setup(d,{emit:E}){const y=C.defineProps({mode:{type:String,default:"vertical"}}),i=C.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=Ge.useMenuState(),o=Ge.useModelComp(D.pinia),M=D.useLoginState(D.pinia),{loginUserInfo:q}=D.storeToRefs(M),K=C.ref(0),b=Da.useRouter(),P=C.ref(),{asideMenus:H,menuTriggerType:Xe,platform:Ye}=D.storeToRefs(s),{fixMenuStatus:Ze}=D.storeToRefs(o),He=C.computed(()=>y==null?void 0:y.mode),$e=a=>a==null?void 0:a.map(e=>{var p,c;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=i.value:e!=null&&e.children&&((c=e==null?void 0:e.children)==null?void 0:c.length)>0&&(e.children=$e(e.children)),e}),Re=C.computed(()=>{let a=[...H.value];if((a==null?void 0:a.length)===0)return b.push("/"),[];const t=aa(a,me.value);return t.isFlag||(a=t==null?void 0:t.data),a=a==null?void 0:a.map(e=>{var p,c;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=i.value:e!=null&&e.children&&((c=e==null?void 0:e.children)==null?void 0:c.length)>0&&(e.children=$e(e.children)),e}),a}),Ne=async(a,t)=>{o.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(a==null?void 0:a.path),s.setActiveAsideMenu(a),a.isRouter?b.push(a.path):b.push("/"),E("node-click",a,t)},Ve=async a=>{const t=D.findNodeByPropInTree(Re.value,"path",a);s.setActiveAsideMenu(t),o.setRouteToChildPath(""),Ze.value?o.setFixMenuStatus(!1):Xe.value==="click"?K.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(a):(s.setMenuTriggerType("click"),s.setActiveMenuPath(a)),a!=null&&a.startsWith("/")?b.push(a):b.push("/"),K.value++},ue=a=>{s.setActiveMenuPath(a)},X=a=>{const t=document.documentElement;a==null||a.forEach(e=>{t.style.setProperty(e.name,e.value)})};C.onMounted(()=>{K.value=1});const me=C.computed(()=>{const a=sessionStorage.getItem("authority");return a?JSON.parse(a):[]});C.watch(()=>Ye.value,a=>{a==="browser"?X(Ue.browserVerticalMenuClasses):a==="client"?(X(Ue.clientHorizontalMenuClasses),X(Ue.clientVerticalMenuClasses)):a==="three"&&(X(Ue.threeHorizontalMenuClasses),X(Ue.threeVerticalMenuClasses))},{immediate:!0});const ea=(a,t)=>{function e(p){p==null||p.forEach(c=>{var $,T;const g=($=c==null?void 0:c.path)!=null&&$.startsWith("/")?(T=c==null?void 0:c.path)==null?void 0:T.substring(1):c==null?void 0:c.path;c.show=t==null?void 0:t.some(R=>R==null?void 0:R.includes(g)),c.children&&e(c.children)})}return e(a),a},aa=(a,t)=>{if(Array.isArray(t)){const e=Array.from(new Set(t==null?void 0:t.map(p=>p.substring(0,p.lastIndexOf("/")))));return{data:ea(a,e),isFlag:!1}}else return{isFlag:(t==null?void 0:t.toUpperCase())==="SUPERADMIN"}},B=C.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),ta=a=>Me.getComponent(a),sa=C.ref({}),la=C.ref([]),N=C.ref({}),Y=C.ref({}),ia=a=>{switch(a){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Be=C.ref({}),oa=a=>{s.setCacheInputMenu({type:B.type,data:a}),s.setIsRefreshMenus(!0)},ca=async(a,t,e)=>{var p,c,g,$,T,R,L,V,u,m,ee,ae,te,se,le,ie,oe,ce,re,pe,fe,he,de,ve,ye,ne,De,ge,Ie,Se,ke,Te,_e,be,Ce,Ae,Ke,we,h,w,x,k;if(t==="create"){let r=(e==null?void 0:e.title)+"(1)",A=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(c=(p=A==null?void 0:A.data)==null?void 0:p.result)==null?void 0:c[0],W=(g=S==null?void 0:S.value)==null?void 0:g.pageData;W.compData=($=W.compData)==null?void 0:$.map(l=>{var f;return(l==null?void 0:l.key)==="menuContents"&&(l.contents=Pe(l.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),r)),l}),await D.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:W}});let U=(R=(T=e==null?void 0:e.path)==null?void 0:T.split("/"))==null?void 0:R.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}),F=await Z.getItemData((u=(V=(L=e==null?void 0:e.path)==null?void 0:L.split("/"))==null?void 0:V.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:u.join("/"),sessionStorage.getItem("systemKey"),"");if(U.push(r),U=U==null?void 0:U.join("/"),(F==null?void 0:F.length)>0){let l=F==null?void 0:F[0],f=(ee=(m=l==null?void 0:l.compData)==null?void 0:m.find(n=>(n==null?void 0:n.key)==="header"))==null?void 0:ee.contents;if(((ae=f==null?void 0:f[0])==null?void 0:ae.directiveLabel)==="#isMain"){let n=(te=f==null?void 0:f[0])==null?void 0:te.prop,I=(le=(se=l==null?void 0:l.compData)==null?void 0:se.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:le.contents,J;I==null||I.forEach(_=>{var G,O;if(_.length===1)((G=_==null?void 0:_[0])==null?void 0:G[n])===(e==null?void 0:e.title)&&(J=_==null?void 0:_[0],J[n]=r);else{let Q=(O=f==null?void 0:f.filter(j=>j!=="操作"))==null?void 0:O.map(j=>j==null?void 0:j.prop),Fe=_==null?void 0:_.filter(j=>!(j!=null&&j.id)),xe=Z.getValueToObjectValue(Fe,Q);xe[n]=r,J=xe}}),await D.createInsofDataApi({key:{type:"data",pageKey:(ce=(oe=(ie=e==null?void 0:e.path)==null?void 0:ie.split("/"))==null?void 0:oe.filter((_,G)=>{var O,Q;return G!==((Q=(O=e==null?void 0:e.path)==null?void 0:O.split("/"))==null?void 0:Q.length)-1}))==null?void 0:ce.join("/"),tableId:l==null?void 0:l.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(re=q.value)==null?void 0:re.id,createUserLayer:((pe=q.value)==null?void 0:pe.dept)||((fe=q.value)==null?void 0:fe.部门名称)},value:{tableData:J}})}}await Z.newLoadingConstruct(e==null?void 0:e.path,U),s.setUpdateMenuStatus(!1),await je.verifyStructureDataToStore(),s.setActiveMenuPath((ve=(de=(he=e==null?void 0:e.path)==null?void 0:he.split("/"))==null?void 0:de.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:ve.join("/")),s.setActiveTopMenuPath((ne=(ye=e==null?void 0:e.path)==null?void 0:ye.split("/"))==null?void 0:ne[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(t==="update")P.value=e;else if(t==="delete"){let r=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),A=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(ge=(De=A==null?void 0:A.data)==null?void 0:De.result)==null?void 0:ge[0],W=(Ie=S==null?void 0:S.value)==null?void 0:Ie.pageData;if(W.compData=(Se=W.compData)==null?void 0:Se.map(l=>{var f;return(l==null?void 0:l.key)==="menuContents"&&(l.contents=qe(l.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),l}),await D.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:W}}),((Te=(ke=r==null?void 0:r.data)==null?void 0:ke.result)==null?void 0:Te.length)>0){let l=(be=(_e=r==null?void 0:r.data)==null?void 0:_e.result)==null?void 0:be.map(f=>f==null?void 0:f.id);(l==null?void 0:l.length)>0&&await D.batchDeleteInsofDataApi({ids:l})}let U=await Z.getItemData((Ke=(Ae=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:Ae.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:Ke.join("/"),sessionStorage.getItem("systemKey"),""),F=[];(U==null?void 0:U.length)>0&&(U==null||U.forEach(l=>{var n,I,J,_,G,O,Q,Fe,xe,j,Oe;let f=(_=(J=(I=(n=l==null?void 0:l.compData)==null?void 0:n.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:I.contents)==null?void 0:J[0])==null?void 0:_.prop;((Fe=(Q=(O=(G=l==null?void 0:l.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:O.contents)==null?void 0:Q[0])==null?void 0:Fe.directiveLabel)==="#isMain"&&((Oe=(j=(xe=l==null?void 0:l.compData)==null?void 0:xe.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:j.contents)==null||Oe.forEach(v=>{var ze,We,Je;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&F.push((ze=v==null?void 0:v[0])==null?void 0:ze.id):((We=v==null?void 0:v[0])==null?void 0:We[f])===(e==null?void 0:e.title)&&F.push((Je=v==null?void 0:v[0])==null?void 0:Je.id)}))})),(F==null?void 0:F.length)>0&&await D.batchDeleteInsofDataApi({ids:F}),s.setUpdateMenuStatus(!1),await je.verifyStructureDataToStore(),s.setActiveMenuPath((w=(h=(we=e==null?void 0:e.path)==null?void 0:we.split("/"))==null?void 0:h.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:w.join("/")),s.setActiveTopMenuPath((k=(x=e==null?void 0:e.path)==null?void 0:x.split("/"))==null?void 0:k[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},ra=async(a,t)=>{var V,u,m,ee,ae,te,se,le,ie,oe,ce,re,pe,fe,he,de,ve,ye,ne,De,ge,Ie,Se,ke,Te,_e,be,Ce,Ae,Ke,we;let e=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),p=(u=(V=e==null?void 0:e.data)==null?void 0:V.result)==null?void 0:u[0],c=(m=p==null?void 0:p.value)==null?void 0:m.pageData;c.compData=(ee=c.compData)==null?void 0:ee.map(h=>{var w,x;return(h==null?void 0:h.key)==="menuContents"&&(h.contents=Le(h.contents,(w=t==null?void 0:t.path)==null?void 0:w.split("/"),t==null?void 0:t.title,(x=a==null?void 0:a.target)==null?void 0:x.value)),h}),p!=null&&p.id&&await D.updateInsofDataApi({id:p==null?void 0:p.id,value:{pageData:c}});let g=(te=(ae=t==null?void 0:t.path)==null?void 0:ae.split("/"))==null?void 0:te.filter((h,w)=>{var x,k;return w!==((k=(x=t==null?void 0:t.path)==null?void 0:x.split("/"))==null?void 0:k.length)-1}),$=g==null?void 0:g.join("/");g.push((se=a==null?void 0:a.target)==null?void 0:se.value),g=g==null?void 0:g.join("/");let T=await Z.getItemData($,sessionStorage.getItem("systemKey"),"");if(((re=(ce=(oe=(ie=(le=T==null?void 0:T[0])==null?void 0:le.compData)==null?void 0:ie.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:oe.contents)==null?void 0:ce[0])==null?void 0:re.directiveLabel)==="#isMain"){let h=(ve=(de=(he=(fe=(pe=T==null?void 0:T[0])==null?void 0:pe.compData)==null?void 0:fe.find(r=>(r==null?void 0:r.key)==="header"))==null?void 0:he.contents)==null?void 0:de[0])==null?void 0:ve.prop,w=(De=(ne=(ye=T==null?void 0:T[0])==null?void 0:ye.compData)==null?void 0:ne.find(r=>(r==null?void 0:r.key)==="tableContents"))==null?void 0:De.contents,x=(ke=(Se=(Ie=(ge=T==null?void 0:T[0])==null?void 0:ge.compData)==null?void 0:Ie.find(r=>(r==null?void 0:r.key)==="header"))==null?void 0:Se.contents)==null?void 0:ke.map(r=>r==null?void 0:r.prop),k;if(w==null||w.forEach(r=>{var S;let A=Z.getValueToObjectValue(r,x);(A==null?void 0:A[h])===t.title&&(k=A,k[h]=(S=a==null?void 0:a.target)==null?void 0:S.value)}),k){let r={};for(let S in k)S!=="id"&&(r[S]=k==null?void 0:k[S]);let A=[{id:k==null?void 0:k.id,value:{tableData:r}}];await D.batchUpdateInsofDataApi({dataList:A})}}let R=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:t==null?void 0:t.path}}),L=(_e=(Te=R==null?void 0:R.data)==null?void 0:Te.result)==null?void 0:_e.map(h=>({id:h==null?void 0:h.id,key:h==null?void 0:h.key}));L=L==null?void 0:L.map(h=>(h.key.pageKey=g,h)),(L==null?void 0:L.length)>0&&await D.batchUpdateInsofDataApi({dataList:L}),s.setUpdateMenuStatus(!1),await je.verifyStructureDataToStore(),s.setActiveMenuPath((Ae=(Ce=(be=t==null?void 0:t.path)==null?void 0:be.split("/"))==null?void 0:Ce.filter((h,w)=>{var x,k;return w!==((k=(x=t==null?void 0:t.path)==null?void 0:x.split("/"))==null?void 0:k.length)-1}))==null?void 0:Ae.join("/")),s.setActiveTopMenuPath((we=(Ke=t==null?void 0:t.path)==null?void 0:Ke.split("/"))==null?void 0:we[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),P.value=void 0},pa=async(a,t)=>{B.type=ia(t==null?void 0:t.operateType),await ca(t,B.type,a),Y.value=a,Be.value=t},fa=()=>{B.show=!1},ha=a=>a==null?void 0:a.filter(t=>t.allowInherit),da=()=>{var e,p,c,g,$;let a;B.type==="create"&&(a=((e=Y.value)==null?void 0:e.path)+"/"+N.value[(p=N.value)==null?void 0:p.prop]),B.type==="update"&&(a=(c=Y.value)==null?void 0:c.path);const t={...Y.value,config:ha((g=Y.value)==null?void 0:g.config),children:[],childMenus:[],title:N.value[($=N.value)==null?void 0:$.prop],path:a};console.log("clickSubmitForm",Be.value,Y.value,t),oa(t),B.show=!1},va=a=>{var e,p;const t=(e=a==null?void 0:a.contents)==null?void 0:e.find(c=>c.key==="formContent");t&&(N.value=(p=t==null?void 0:t.contents)==null?void 0:p.reduce((c,g)=>(c[g.key]=g.value,c.prop=g.key,c),{}))},Ee=C.ref(!1);return{isCollapse:Ee,handleMenuCollapse:()=>{Ee.value=!Ee.value},handleCompChange:va,dialogForm:sa,dialogRenderComps:la,getComponents:ta,clickSubmitForm:da,dialogInfo:B,beforeDialogDestroy:fa,clickMenuIcon:pa,mode:He,renderMenuList:Re,clickMenu:Ne,openMenu:Ve,closeMenu:ue,changeMenuStyle:X,fixElement:P,onBlur:ra}}}}const Ia=C.defineComponent(Qe());exports._sfc_main=Ia;exports.addSelectMenu=Pe;exports.deleteSelectMenu=qe;exports.fixSelectMenu=Le;exports.setComponent=Qe;
|
|
1
|
+
"use strict";const Me=require("./index-D_DpNI2W.cjs"),C=require("vue"),Ge=require("./index-CXC0u8pm.cjs"),ya=require("./index-CnuMyt69.cjs"),na=require("./index-BPTR1s4o.cjs"),D=require("./index-DOItJqcJ.cjs"),Da=require("vue-router"),Ue=require("./index-9hspBVrQ.cjs"),ga=require("./index-BpPyaNFa.cjs"),Z=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C8n9olfd.cjs"),je=require("./index-DaRuwvRP.cjs"),qe=(z,d,E=0)=>{let y=z;return y!=null&&y.every(i=>Array.isArray(i))&&(y!=null&&y.every(i=>Array.isArray(i)&&i.length===1)?y=y==null?void 0:y.filter(i=>(i==null?void 0:i[0])!==(d==null?void 0:d[E])):y=y==null?void 0:y.map(i=>{if(i!=null&&i.find(s=>s===(d==null?void 0:d[E]))&&(d==null?void 0:d.length)!==1){let s=D.cloneDeep(d),o=i==null?void 0:i.filter(b=>b!==(s==null?void 0:s[E])),M=E+1,q=qe(o,s,M),K=[];K.push(i==null?void 0:i[0]),q==null||q.forEach(b=>{K.push(b)}),i=K}return i})),y},Pe=(z,d,E,y=0)=>{let i=z;return i!=null&&i.every(s=>Array.isArray(s))&&(i!=null&&i.every(s=>Array.isArray(s)&&s.length===1)?i.push([E]):i=i==null?void 0:i.map(s=>{if(s!=null&&s.find(o=>o===(d==null?void 0:d[y]))&&(d==null?void 0:d.length)!==1){let o=D.cloneDeep(d),M=s==null?void 0:s.filter(P=>P!==(o==null?void 0:o[y])),q=y+1,K=Pe(M,o,E,q),b=[];b.push(s==null?void 0:s[0]),K==null||K.forEach(P=>{b.push(P)}),s=b}return s})),i},Le=(z,d,E,y,i=0)=>{let s=z;return s!=null&&s.every(o=>Array.isArray(o))&&(s!=null&&s.every(o=>Array.isArray(o)&&o.length===1)?s=s==null?void 0:s.map(o=>((o==null?void 0:o[0])===E&&(o=[y]),o)):s=s==null?void 0:s.map(o=>{if(o!=null&&o.find(M=>M===(d==null?void 0:d[i]))&&(d==null?void 0:d.length)!==1){let M=D.cloneDeep(d),q=o==null?void 0:o.filter(H=>H!==(M==null?void 0:M[i])),K=i+1,b=Le(q,M,E,y,K),P=[];P.push(o==null?void 0:o[0]),b==null||b.forEach(H=>{P.push(H)}),o=P}return o})),s};function Qe(z="menu"){return{name:z,components:{SvgIcon:ga.SvgIcon,ssMenu:Me.ssMenu,DynamicIcon:Me._sfc_main,ssDialog:ya.ssDialog,ssInput:na._sfc_main$2},setup(d,{emit:E}){const y=C.defineProps({mode:{type:String,default:"vertical"}}),i=C.ref([{allowInherit:!1,operateType:"复制新增",operateIcon:"CopyAddMenu"},{allowInherit:!1,operateType:"删除",operateIcon:"DeleteMenu"},{allowInherit:!1,operateType:"修改菜单名",operateIcon:"FixedMenu"}]),s=Ge.useMenuState(),o=Ge.useModelComp(D.pinia),M=D.useLoginState(D.pinia),{loginUserInfo:q}=D.storeToRefs(M),K=C.ref(0),b=Da.useRouter(),P=C.ref(),{asideMenus:H,menuTriggerType:Xe,platform:Ye}=D.storeToRefs(s),{fixMenuStatus:Ze}=D.storeToRefs(o),He=C.computed(()=>y==null?void 0:y.mode),$e=a=>a==null?void 0:a.map(e=>{var p,c;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=i.value:e!=null&&e.children&&((c=e==null?void 0:e.children)==null?void 0:c.length)>0&&(e.children=$e(e.children)),e}),Re=C.computed(()=>{let a=[...H.value];if((a==null?void 0:a.length)===0)return b.push("/"),[];const t=aa(a,me.value);return t.isFlag||(a=t==null?void 0:t.data),a=a==null?void 0:a.map(e=>{var p,c;return!(e!=null&&e.children)||((p=e==null?void 0:e.children)==null?void 0:p.length)===0?e.config=i.value:e!=null&&e.children&&((c=e==null?void 0:e.children)==null?void 0:c.length)>0&&(e.children=$e(e.children)),e}),a}),Ne=async(a,t)=>{o.setRouteToChildPath(""),s.setMenuTriggerType("click"),s.setActiveMenuPath(a==null?void 0:a.path),s.setActiveAsideMenu(a),a.isRouter?b.push(a.path):b.push("/"),E("node-click",a,t)},Ve=async a=>{const t=D.findNodeByPropInTree(Re.value,"path",a);s.setActiveAsideMenu(t),o.setRouteToChildPath(""),Ze.value?o.setFixMenuStatus(!1):Xe.value==="click"?K.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(a):(s.setMenuTriggerType("click"),s.setActiveMenuPath(a)),a!=null&&a.startsWith("/")?b.push(a):b.push("/"),K.value++},ue=a=>{s.setActiveMenuPath(a)},X=a=>{const t=document.documentElement;a==null||a.forEach(e=>{t.style.setProperty(e.name,e.value)})};C.onMounted(()=>{K.value=1});const me=C.computed(()=>{const a=sessionStorage.getItem("authority");return a?JSON.parse(a):[]});C.watch(()=>Ye.value,a=>{a==="browser"?X(Ue.browserVerticalMenuClasses):a==="client"?(X(Ue.clientHorizontalMenuClasses),X(Ue.clientVerticalMenuClasses)):a==="three"&&(X(Ue.threeHorizontalMenuClasses),X(Ue.threeVerticalMenuClasses))},{immediate:!0});const ea=(a,t)=>{function e(p){p==null||p.forEach(c=>{var $,T;const g=($=c==null?void 0:c.path)!=null&&$.startsWith("/")?(T=c==null?void 0:c.path)==null?void 0:T.substring(1):c==null?void 0:c.path;c.show=t==null?void 0:t.some(R=>R==null?void 0:R.includes(g)),c.children&&e(c.children)})}return e(a),a},aa=(a,t)=>{if(Array.isArray(t)){const e=Array.from(new Set(t==null?void 0:t.map(p=>p.substring(0,p.lastIndexOf("/")))));return{data:ea(a,e),isFlag:!1}}else return{isFlag:(t==null?void 0:t.toUpperCase())==="SUPERADMIN"}},B=C.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),ta=a=>Me.getComponent(a),sa=C.ref({}),la=C.ref([]),N=C.ref({}),Y=C.ref({}),ia=a=>{switch(a){case"复制新增":return"create";case"修改菜单名":return"update";case"删除":return"delete"}},Be=C.ref({}),oa=a=>{s.setCacheInputMenu({type:B.type,data:a}),s.setIsRefreshMenus(!0)},ca=async(a,t,e)=>{var p,c,g,$,T,R,L,V,u,m,ee,ae,te,se,le,ie,oe,ce,re,pe,fe,he,de,ve,ye,ne,De,ge,Ie,Se,ke,Te,_e,be,Ce,Ae,Ke,we,h,w,x,k;if(t==="create"){let r=(e==null?void 0:e.title)+"(1)",A=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(c=(p=A==null?void 0:A.data)==null?void 0:p.result)==null?void 0:c[0],W=(g=S==null?void 0:S.value)==null?void 0:g.pageData;W.compData=($=W.compData)==null?void 0:$.map(l=>{var f;return(l==null?void 0:l.key)==="menuContents"&&(l.contents=Pe(l.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"),r)),l}),await D.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:W}});let U=(R=(T=e==null?void 0:e.path)==null?void 0:T.split("/"))==null?void 0:R.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}),F=await Z.getItemData((u=(V=(L=e==null?void 0:e.path)==null?void 0:L.split("/"))==null?void 0:V.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:u.join("/"),sessionStorage.getItem("systemKey"),"");if(U.push(r),U=U==null?void 0:U.join("/"),(F==null?void 0:F.length)>0){let l=F==null?void 0:F[0],f=(ee=(m=l==null?void 0:l.compData)==null?void 0:m.find(n=>(n==null?void 0:n.key)==="header"))==null?void 0:ee.contents;if(((ae=f==null?void 0:f[0])==null?void 0:ae.directiveLabel)==="#isMain"){let n=(te=f==null?void 0:f[0])==null?void 0:te.prop,I=(le=(se=l==null?void 0:l.compData)==null?void 0:se.find(_=>(_==null?void 0:_.key)==="tableContents"))==null?void 0:le.contents,J;I==null||I.forEach(_=>{var G,O;if(_.length===1)((G=_==null?void 0:_[0])==null?void 0:G[n])===(e==null?void 0:e.title)&&(J=_==null?void 0:_[0],J[n]=r);else{let Q=(O=f==null?void 0:f.filter(j=>j!=="操作"))==null?void 0:O.map(j=>j==null?void 0:j.prop),Fe=_==null?void 0:_.filter(j=>!(j!=null&&j.id)),xe=Z.getValueToObjectValue(Fe,Q);xe[n]=r,J=xe}}),await D.createInsofDataApi({key:{type:"data",pageKey:(ce=(oe=(ie=e==null?void 0:e.path)==null?void 0:ie.split("/"))==null?void 0:oe.filter((_,G)=>{var O,Q;return G!==((Q=(O=e==null?void 0:e.path)==null?void 0:O.split("/"))==null?void 0:Q.length)-1}))==null?void 0:ce.join("/"),tableId:l==null?void 0:l.id,systemKey:sessionStorage.getItem("systemKey"),createUserId:(re=q.value)==null?void 0:re.id,createUserLayer:((pe=q.value)==null?void 0:pe.dept)||((fe=q.value)==null?void 0:fe.部门名称)},value:{tableData:J}})}}await Z.newLoadingConstruct(e==null?void 0:e.path,U),s.setUpdateMenuStatus(!1),await je.verifyStructureDataToStore(),s.setActiveMenuPath((ve=(de=(he=e==null?void 0:e.path)==null?void 0:he.split("/"))==null?void 0:de.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:ve.join("/")),s.setActiveTopMenuPath((ne=(ye=e==null?void 0:e.path)==null?void 0:ye.split("/"))==null?void 0:ne[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}else if(t==="update")P.value=e;else if(t==="delete"){let r=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path}}),A=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),S=(ge=(De=A==null?void 0:A.data)==null?void 0:De.result)==null?void 0:ge[0],W=(Ie=S==null?void 0:S.value)==null?void 0:Ie.pageData;if(W.compData=(Se=W.compData)==null?void 0:Se.map(l=>{var f;return(l==null?void 0:l.key)==="menuContents"&&(l.contents=qe(l.contents,(f=e==null?void 0:e.path)==null?void 0:f.split("/"))),l}),await D.updateInsofDataApi({id:S==null?void 0:S.id,value:{pageData:W}}),((Te=(ke=r==null?void 0:r.data)==null?void 0:ke.result)==null?void 0:Te.length)>0){let l=(be=(_e=r==null?void 0:r.data)==null?void 0:_e.result)==null?void 0:be.map(f=>f==null?void 0:f.id);(l==null?void 0:l.length)>0&&await D.batchDeleteInsofDataApi({ids:l})}let U=await Z.getItemData((Ke=(Ae=(Ce=e==null?void 0:e.path)==null?void 0:Ce.split("/"))==null?void 0:Ae.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:Ke.join("/"),sessionStorage.getItem("systemKey"),""),F=[];(U==null?void 0:U.length)>0&&(U==null||U.forEach(l=>{var n,I,J,_,G,O,Q,Fe,xe,j,Oe;let f=(_=(J=(I=(n=l==null?void 0:l.compData)==null?void 0:n.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:I.contents)==null?void 0:J[0])==null?void 0:_.prop;((Fe=(Q=(O=(G=l==null?void 0:l.compData)==null?void 0:G.find(v=>(v==null?void 0:v.key)==="header"))==null?void 0:O.contents)==null?void 0:Q[0])==null?void 0:Fe.directiveLabel)==="#isMain"&&((Oe=(j=(xe=l==null?void 0:l.compData)==null?void 0:xe.find(v=>(v==null?void 0:v.key)==="tableContents"))==null?void 0:j.contents)==null||Oe.forEach(v=>{var ze,We,Je;(v==null?void 0:v.length)>1?(v==null?void 0:v[1])===(e==null?void 0:e.title)&&F.push((ze=v==null?void 0:v[0])==null?void 0:ze.id):((We=v==null?void 0:v[0])==null?void 0:We[f])===(e==null?void 0:e.title)&&F.push((Je=v==null?void 0:v[0])==null?void 0:Je.id)}))})),(F==null?void 0:F.length)>0&&await D.batchDeleteInsofDataApi({ids:F}),s.setUpdateMenuStatus(!1),await je.verifyStructureDataToStore(),s.setActiveMenuPath((w=(h=(we=e==null?void 0:e.path)==null?void 0:we.split("/"))==null?void 0:h.filter((l,f)=>{var n,I;return f!==((I=(n=e==null?void 0:e.path)==null?void 0:n.split("/"))==null?void 0:I.length)-1}))==null?void 0:w.join("/")),s.setActiveTopMenuPath((k=(x=e==null?void 0:e.path)==null?void 0:x.split("/"))==null?void 0:k[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0)}},ra=async(a,t)=>{var V,u,m,ee,ae,te,se,le,ie,oe,ce,re,pe,fe,he,de,ve,ye,ne,De,ge,Ie,Se,ke,Te,_e,be,Ce,Ae,Ke,we;let e=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"menu"}}),p=(u=(V=e==null?void 0:e.data)==null?void 0:V.result)==null?void 0:u[0],c=(m=p==null?void 0:p.value)==null?void 0:m.pageData;c.compData=(ee=c.compData)==null?void 0:ee.map(h=>{var w,x;return(h==null?void 0:h.key)==="menuContents"&&(h.contents=Le(h.contents,(w=t==null?void 0:t.path)==null?void 0:w.split("/"),t==null?void 0:t.title,(x=a==null?void 0:a.target)==null?void 0:x.value)),h}),p!=null&&p.id&&await D.updateInsofDataApi({id:p==null?void 0:p.id,value:{pageData:c}});let g=(te=(ae=t==null?void 0:t.path)==null?void 0:ae.split("/"))==null?void 0:te.filter((h,w)=>{var x,k;return w!==((k=(x=t==null?void 0:t.path)==null?void 0:x.split("/"))==null?void 0:k.length)-1}),$=g==null?void 0:g.join("/");g.push((se=a==null?void 0:a.target)==null?void 0:se.value),g=g==null?void 0:g.join("/");let T=await Z.getItemData($,sessionStorage.getItem("systemKey"),"");if(((re=(ce=(oe=(ie=(le=T==null?void 0:T[0])==null?void 0:le.compData)==null?void 0:ie.find(h=>(h==null?void 0:h.key)==="header"))==null?void 0:oe.contents)==null?void 0:ce[0])==null?void 0:re.directiveLabel)==="#isMain"){let h=(ve=(de=(he=(fe=(pe=T==null?void 0:T[0])==null?void 0:pe.compData)==null?void 0:fe.find(r=>(r==null?void 0:r.key)==="header"))==null?void 0:he.contents)==null?void 0:de[0])==null?void 0:ve.prop,w=(De=(ne=(ye=T==null?void 0:T[0])==null?void 0:ye.compData)==null?void 0:ne.find(r=>(r==null?void 0:r.key)==="tableContents"))==null?void 0:De.contents,x=(ke=(Se=(Ie=(ge=T==null?void 0:T[0])==null?void 0:ge.compData)==null?void 0:Ie.find(r=>(r==null?void 0:r.key)==="header"))==null?void 0:Se.contents)==null?void 0:ke.map(r=>r==null?void 0:r.prop),k;if(w==null||w.forEach(r=>{var S;let A=Z.getValueToObjectValue(r,x);(A==null?void 0:A[h])===t.title&&(k=A,k[h]=(S=a==null?void 0:a.target)==null?void 0:S.value)}),k){let r={};for(let S in k)S!=="id"&&(r[S]=k==null?void 0:k[S]);let A=[{id:k==null?void 0:k.id,value:{tableData:r}}];await D.batchUpdateInsofDataApi({dataList:A})}}let R=await D.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:t==null?void 0:t.path}}),L=(_e=(Te=R==null?void 0:R.data)==null?void 0:Te.result)==null?void 0:_e.map(h=>({id:h==null?void 0:h.id,key:h==null?void 0:h.key}));L=L==null?void 0:L.map(h=>(h.key.pageKey=g,h)),(L==null?void 0:L.length)>0&&await D.batchUpdateInsofDataApi({dataList:L}),s.setUpdateMenuStatus(!1),await je.verifyStructureDataToStore(),s.setActiveMenuPath((Ae=(Ce=(be=t==null?void 0:t.path)==null?void 0:be.split("/"))==null?void 0:Ce.filter((h,w)=>{var x,k;return w!==((k=(x=t==null?void 0:t.path)==null?void 0:x.split("/"))==null?void 0:k.length)-1}))==null?void 0:Ae.join("/")),s.setActiveTopMenuPath((we=(Ke=t==null?void 0:t.path)==null?void 0:Ke.split("/"))==null?void 0:we[0]),s.setIsRefreshMenus(!1),s.setIsRefreshMenus(!0),P.value=void 0},pa=async(a,t)=>{B.type=ia(t==null?void 0:t.operateType),await ca(t,B.type,a),Y.value=a,Be.value=t},fa=()=>{B.show=!1},ha=a=>a==null?void 0:a.filter(t=>t.allowInherit),da=()=>{var e,p,c,g,$;let a;B.type==="create"&&(a=((e=Y.value)==null?void 0:e.path)+"/"+N.value[(p=N.value)==null?void 0:p.prop]),B.type==="update"&&(a=(c=Y.value)==null?void 0:c.path);const t={...Y.value,config:ha((g=Y.value)==null?void 0:g.config),children:[],childMenus:[],title:N.value[($=N.value)==null?void 0:$.prop],path:a};console.log("clickSubmitForm",Be.value,Y.value,t),oa(t),B.show=!1},va=a=>{var e,p;const t=(e=a==null?void 0:a.contents)==null?void 0:e.find(c=>c.key==="formContent");t&&(N.value=(p=t==null?void 0:t.contents)==null?void 0:p.reduce((c,g)=>(c[g.key]=g.value,c.prop=g.key,c),{}))},Ee=C.ref(!1);return{isCollapse:Ee,handleMenuCollapse:()=>{Ee.value=!Ee.value},handleCompChange:va,dialogForm:sa,dialogRenderComps:la,getComponents:ta,clickSubmitForm:da,dialogInfo:B,beforeDialogDestroy:fa,clickMenuIcon:pa,mode:He,renderMenuList:Re,clickMenu:Ne,openMenu:Ve,closeMenu:ue,changeMenuStyle:X,fixElement:P,onBlur:ra}}}}const Ia=C.defineComponent(Qe());exports._sfc_main=Ia;exports.addSelectMenu=Pe;exports.deleteSelectMenu=qe;exports.fixSelectMenu=Le;exports.setComponent=Qe;
|