ss-component-new 1.1.830 → 1.1.832
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/{animationData-CyWJ1p2u.js → animationData-0KPfP_vV.js} +2 -2
- package/dist/{animationData-B_i0kxmh.cjs → animationData-Ss9CACrK.cjs} +1 -1
- package/dist/{array-DbAuNWGt.js → array-DwOhT-Gf.js} +1 -1
- package/dist/{array-Bfmx0w6P.cjs → array-qx4N1D5z.cjs} +1 -1
- package/dist/icons/svg/message.svg +1 -1
- package/dist/{index-D7vw_KbA.js → index-9pnXnKog.js} +1 -1
- package/dist/{index-E8gMNHGw.js → index-B-FoTjgv.js} +2 -2
- package/dist/{index-EeFzwVvO.cjs → index-B1n-l__T.cjs} +1 -1
- package/dist/index-B2BAJXIH.cjs +1 -0
- package/dist/{index-BZaJxbJy.cjs → index-BChe07xV.cjs} +7 -7
- package/dist/index-BFEoXfck.cjs +4 -0
- package/dist/{index-DhXjraO2.js → index-BGJC1s3S.js} +4 -4
- package/dist/index-BMRf5Oa0.cjs +1 -0
- package/dist/{index-CK4dtVga.js → index-BN1ZyC0Z.js} +1385 -1346
- package/dist/{index-DsGUYlXC.js → index-BTjt3Dq1.js} +5 -5
- package/dist/{index-DXm88X_Y.cjs → index-BYcYpJB_.cjs} +1 -1
- package/dist/{index-CVx3tf4q.js → index-BaPtZog8.js} +11 -11
- package/dist/{index-CxUGBz5C.cjs → index-BjRaHSGT.cjs} +1 -1
- package/dist/{index-C7U_xGUR.js → index-BoWo0bZG.js} +3 -3
- package/dist/{index-zWk1m9w0.js → index-BsDK_xBB.js} +5 -5
- package/dist/{index-CvKclezh.cjs → index-C0Yj00D_.cjs} +1 -1
- package/dist/{index-BhqoPseV.cjs → index-C1rZ6tCq.cjs} +1 -1
- package/dist/{index-D1qfMxQG.js → index-C529iIt_.js} +3 -3
- package/dist/{index-zYupK4tS.cjs → index-C6ijDBab.cjs} +1 -1
- package/dist/{index-D0Aa4Bh0.cjs → index-C7U1oYG2.cjs} +1 -1
- package/dist/{index-DkHqLJ5x.js → index-CD11qWkW.js} +2 -2
- package/dist/{index-_FTi3DvK.js → index-CEVmFIVZ.js} +328 -328
- package/dist/{index-BYYmq0aA.cjs → index-CKE6x8Z9.cjs} +1 -1
- package/dist/{index-_dzreiTU.js → index-CKVX-zHZ.js} +5 -5
- package/dist/{index-CeewG07I.cjs → index-CNoiS0KS.cjs} +1 -1
- package/dist/index-CV_jQDcg.js +9 -0
- package/dist/{index-IUkCD4R_.js → index-C_qC5RgB.js} +1 -1
- package/dist/{index-BdaUJfDv.cjs → index-CebulRe9.cjs} +1 -1
- package/dist/{index-CAmLMB0r.js → index-CeopbMdu.js} +2 -2
- package/dist/{index-mqFy2IAT.cjs → index-CiKWwuTs.cjs} +1 -1
- package/dist/{index-Dt2McMki.js → index-CjPDUSMu.js} +3 -1
- package/dist/{index-BJUqxVuP.js → index-Cjchsa-y.js} +2 -2
- package/dist/{index-C9miTCuZ.js → index-Cl0prtH7.js} +2 -2
- package/dist/{index-BMqMzKcB.cjs → index-CmbrvzvK.cjs} +1 -1
- package/dist/{index-BkiEcIy4.js → index-Cp8iZJDH.js} +79 -79
- package/dist/{index-DyK_gGcN.js → index-Cr_wYNCc.js} +816 -651
- package/dist/{index-DVCrYVKw.cjs → index-CrrP1zfn.cjs} +1 -1
- package/dist/{index-2c4nlRMw.cjs → index-CsWn-BHf.cjs} +1 -1
- package/dist/{index-K6BRW_Bw.js → index-D3fjvD-J.js} +1 -1
- package/dist/{index-DjMdHi3y.cjs → index-D559W0FF.cjs} +1 -1
- package/dist/{index-B0coampR.js → index-DA5wDYG_.js} +4 -4
- package/dist/{index-A9Ix2hG6.js → index-DFqkgz5y.js} +2 -2
- package/dist/{index-BOev8isw.cjs → index-DGKTZoR7.cjs} +10 -10
- package/dist/{index-DzJuUBGV.js → index-DLFD9em8.js} +2 -2
- package/dist/index-DPIg2S6M.cjs +1 -0
- package/dist/{index--G4GSk6p.cjs → index-DREe7piL.cjs} +1 -1
- package/dist/{index-jiDXIf8m.js → index-DU48SWjj.js} +3 -3
- package/dist/{index-i4ZezXWW.js → index-DYtj_6cu.js} +4 -4
- package/dist/{index-DprRiskq.js → index-D_xp4hkG.js} +2 -2
- package/dist/{index-DB0QwrlS.js → index-Ddyoewpv.js} +1 -1
- package/dist/{index-DVAGljX0.cjs → index-Dga1Byef.cjs} +1 -1
- package/dist/{index-B_ogtWcd.js → index-Di46ud6G.js} +3 -3
- package/dist/{index-4qu7ZI8N.cjs → index-DnYXVvD5.cjs} +1 -1
- package/dist/{index-CuQy4ZlL.cjs → index-Dqb4D6PM.cjs} +1 -1
- package/dist/{index-XHy0Kxjr.js → index-Dy7_3-vM.js} +4 -4
- package/dist/{index-By_WAdEO.cjs → index-NgXAQ_rB.cjs} +1 -1
- package/dist/{index-D-UGvPWa.cjs → index-Pp3pKepX.cjs} +1 -1
- package/dist/{index-G0nc2HJI.js → index-UbY99Fxm.js} +3 -3
- package/dist/{index-DPpKJ3vk.cjs → index-Wj9GYx4Z.cjs} +1 -1
- package/dist/{index-Dx_67aD9.cjs → index-XH0ionv5.cjs} +1 -1
- package/dist/{index-CUZpPFqg.cjs → index-dlIhHw6U.cjs} +1 -1
- package/dist/{index-DphasbkI.js → index-lUHGaWRP.js} +1 -1
- package/dist/index-p2x9Cqck.cjs +1 -0
- package/dist/index-uF-ibwG0.js +9 -0
- package/dist/{index-BoPJIKsJ.cjs → index-uuI9fOqf.cjs} +1 -1
- package/dist/{index-anfeiO_2.cjs → index-w2muq44C.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-B0zxzt3Q.js → index.vue_vue_type_script_setup_true_lang-Db_U1jWr.js} +2 -2
- package/dist/{index.vue_vue_type_script_setup_true_lang-CEeGtRry.cjs → index.vue_vue_type_script_setup_true_lang-dom74nW7.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dg0qVbtx.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BXVS6q2k.cjs} +57 -57
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CcG1dtn6.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C9xynbFz.js} +1720 -1715
- package/dist/{index.vue_vue_type_style_index_0_scoped_3e6df338_lang-9vjCke1X.js → index.vue_vue_type_style_index_0_scoped_3e6df338_lang-BGr-NUAO.js} +14 -14
- package/dist/{index.vue_vue_type_style_index_0_scoped_3e6df338_lang-BRtlbqKm.cjs → index.vue_vue_type_style_index_0_scoped_3e6df338_lang-DrLlQaMR.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-CpvbX766.js → index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-DpW78OvL.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-BOKXIDLb.cjs → index.vue_vue_type_style_index_0_scoped_86d2b6b8_lang-DtAjec3H.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-DmOzc6Gr.js → index.vue_vue_type_style_index_1_lang-Bdw0FobF.js} +1997 -1914
- package/dist/index.vue_vue_type_style_index_1_lang-SSe8ZwaD.cjs +32 -0
- package/dist/{isUndefined-4Qg9wncf.js → isUndefined-BFlo9HI9.js} +1 -1
- package/dist/{isUndefined-BEt4O79g.cjs → isUndefined-Dy3NeRh5.cjs} +1 -1
- package/dist/{main-Cd6wnd3s.cjs → main-BujyfKj-.cjs} +1 -1
- package/dist/{main-CSXtfvay.js → main-DBCAJZ0e.js} +5 -5
- 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 +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +25 -15
- package/dist/{threeModel-ZVTFY42l.cjs → threeModel-DBgjKIEu.cjs} +1 -1
- package/dist/{threeModel-CszYRXyZ.js → threeModel-WTYf9Ght.js} +2 -2
- package/dist/{threePreview-CKvbwCiX.cjs → threePreview-BVPr3v_F.cjs} +1 -1
- package/dist/{threePreview-BSqdALPK.js → threePreview-MZZhotHF.js} +1 -1
- package/dist/{threeSceneView-BIQUfjVW.js → threeSceneView-Be4QwRxF.js} +6 -6
- package/dist/{threeSceneView-DWm4osiw.cjs → threeSceneView-dCNda13S.cjs} +1 -1
- package/dist/{threeViewerHost-DZIlynAB.js → threeViewerHost-CI3dazgZ.js} +3 -3
- package/dist/{threeViewerHost-WvLjApNW.cjs → threeViewerHost-CdEhLvqV.cjs} +1 -1
- package/package.json +1 -1
- package/public/icons/svg/message.svg +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-Ba3XXFzT.cjs +0 -4
- package/dist/index-D0LA66X0.cjs +0 -1
- package/dist/index-D9Hs1UPF.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_1_lang-CLyCGxO7.cjs +0 -32
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as k, k as A } from "./index.vue_vue_type_style_index_1_lang-
|
|
2
|
-
import { c as I } from "./index-
|
|
1
|
+
import { j as k, k as A } from "./index.vue_vue_type_style_index_1_lang-Bdw0FobF.js";
|
|
2
|
+
import { c as I } from "./index-CjPDUSMu.js";
|
|
3
3
|
const j = async () => {
|
|
4
4
|
const m = "弯管仿真加工分析";
|
|
5
5
|
let b = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("./index.vue_vue_type_style_index_1_lang-
|
|
1
|
+
"use strict";const l=require("./index.vue_vue_type_style_index_1_lang-SSe8ZwaD.cjs"),K=require("./index-DGKTZoR7.cjs"),T=async()=>{const m="弯管仿真加工分析";let D={};const f=sessionStorage.getItem("systemKey"),s=await l.getItemData(`${m}/管件解析`,f,"");let L=["管长","外径"],r={};s==null||s.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{L.includes(a==null?void 0:a.key)&&(r[a.key]=a.value)}))}))});const d=r.管长,k=r.外径;console.log("管长",d,"外径",k,r);const R=d,x=k/2,p=await l.getItemData(`${m}/加工位姿生成`,f,"");let _=["夹持长度"],h={};p==null||p.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{_.includes(a==null?void 0:a.key)&&(h[a.key]=a.value)}))}))});const E=h.夹持长度;console.log("夹持长度",E,h);const w=Number(E),y={},u=await l.getItemData(`${m}/仿真动画生成`,f,"");u==null||u.forEach(e=>{var t,n,c,a,F,C;if((e==null?void 0:e.comp)==="Table"){let I=[],g=(c=(n=(t=e==null?void 0:e.compData)==null?void 0:t.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:n.contents)==null?void 0:c.map(o=>o==null?void 0:o.label),b=(C=(F=(a=e==null?void 0:e.compData)==null?void 0:a.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:C.map(o=>(o=o==null?void 0:o.filter(i=>!(i!=null&&i.id)),o));b==null||b.forEach(o=>{I.push(l.getValueToObjectValue(o,g==null?void 0:g.filter(i=>i!=="操作")))}),y[e.name]=I,y[e.name+"Content"]=e}});const A=K.cloneDeep(y);return D={initialPipeLength:R,pipeRadius:x,clampLength:w,animationData:A},D},$=async()=>{const m="双弯管仿真加工分析";let D={};const f=sessionStorage.getItem("systemKey"),s=await l.getItemData(`${m}/管件解析`,f,"");let L=["管长","外径"],r={};s==null||s.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{L.includes(a==null?void 0:a.key)&&(r[a.key]=a.value)}))}))});const d=r.管长,k=r.外径;console.log("管长",d,"外径",k,r);const R=d,x=k/2,p=await l.getItemData(`${m}/加工位姿生成`,f,"");let _=["夹持长度"],h={};p==null||p.forEach(e=>{var t;(e==null?void 0:e.comp)==="Form"&&((t=e==null?void 0:e.compData)==null||t.forEach(n=>{var c;(n==null?void 0:n.key)==="formContent"&&((c=n==null?void 0:n.contents)==null||c.forEach(a=>{_.includes(a==null?void 0:a.key)&&(h[a.key]=a.value)}))}))});const E=h.夹持长度;console.log("夹持长度",E,h);const w=Number(E),y={},u=await l.getItemData(`${m}/仿真动画生成`,f,"");u==null||u.forEach(e=>{var t,n,c,a,F,C;if((e==null?void 0:e.comp)==="Table"){let I=[],g=(c=(n=(t=e==null?void 0:e.compData)==null?void 0:t.find(o=>(o==null?void 0:o.key)==="header"))==null?void 0:n.contents)==null?void 0:c.map(o=>o==null?void 0:o.label),b=(C=(F=(a=e==null?void 0:e.compData)==null?void 0:a.find(o=>(o==null?void 0:o.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:C.map(o=>(o=o==null?void 0:o.filter(i=>!(i!=null&&i.id)),o));b==null||b.forEach(o=>{I.push(l.getValueToObjectValue(o,g==null?void 0:g.filter(i=>i!=="操作")))}),y[e.name]=I,y[e.name+"Content"]=e}});const A=K.cloneDeep(y);return D={initialPipeLength:R,pipeRadius:x,clampLength:w,animationData:A},D};exports.fetchDoubleRobotAnimationData=$;exports.fetchSingleRobotAnimationData=T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const x=require("vue"),c=require("./index-
|
|
1
|
+
"use strict";const x=require("vue"),c=require("./index-DGKTZoR7.cjs"),D=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],b=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"FormFlex",value:"formWrap"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"TableLineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"},{key:"Menus",value:"menuContents"},{key:"GroupContents",value:"groupContents"}];x.ref(0);const I=l=>{var t,r;if(Array.isArray(Object.keys(l))&&((t=Object.keys(l))==null?void 0:t.length)>0){let e=[];return(r=Object.entries(l))==null||r.forEach(([s,n])=>{var y,$;let a=[];if(a.push(s),((y=Object.keys(n))==null?void 0:y.length)>0){let f=[];($=I(n))==null||$.forEach(T=>{f.push(T)}),f==null||f.forEach(T=>{a.push(T)})}e.push(a)}),e}},R=(l,t)=>{var e;let r=t;return Array.isArray(Object.keys(l))&&((e=Object.entries(l))==null||e.forEach(([s,n])=>{let a=[s];if(typeof n=="object"&&n!==null){let y=I(n);y==null||y.forEach($=>{a.push($)})}r.push(a)})),r},X=l=>{const t={};return l.forEach(e=>{const s=e.split("/");let n=t;s.forEach(a=>{n[a]||(n[a]={}),n=n[a]})}),R(t,[])},Y=l=>X(l);x.ref(0);x.ref(1);const q=l=>{let t;l.replaceAll(" ",`\r
|
|
2
2
|
`).replaceAll(`
|
|
3
3
|
`,`\r
|
|
4
4
|
`).includes(`\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755501431321" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5933" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M864 192c38.4 0 64 25.6 64 64v512c0 38.4-25.6 64-64 64h-704c-38.4 0-64-25.6-64-64V256c0-38.4 25.6-64 64-64h704m0-64h-704c-70.4 0-128 57.6-128 128v512c0 70.4 57.6 128 128 128h704c70.4 0 128-57.6 128-128V256c0-70.4-57.6-128-128-128z" p-id="5934"></path><path d="M864 192c12.8 0 25.6 6.4 32 12.8L556.8 544c-12.8 12.8-25.6 19.2-44.8 19.2s-32-6.4-44.8-19.2L128 204.8c6.4-6.4 19.2-12.8 32-12.8h704m0-64h-704C108.8 128 57.6 160 38.4 211.2l377.6 377.6c32 25.6 64 38.4 96 38.4s64-12.8 89.6-38.4l377.6-377.6c-12.8-51.2-64-83.2-115.2-83.2z" p-id="5935"></path><path d="M578.368 520.32l45.248-45.312 330.368 330.368-45.248 45.248zM71.104 805.952L401.472 475.52l45.248 45.248L116.352 851.2z" p-id="5936"></path></svg>
|
|
1
|
+
<?xml version="1.0" fill="#fff" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1755501431321" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5933" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M864 192c38.4 0 64 25.6 64 64v512c0 38.4-25.6 64-64 64h-704c-38.4 0-64-25.6-64-64V256c0-38.4 25.6-64 64-64h704m0-64h-704c-70.4 0-128 57.6-128 128v512c0 70.4 57.6 128 128 128h704c70.4 0 128-57.6 128-128V256c0-70.4-57.6-128-128-128z" p-id="5934"></path><path d="M864 192c12.8 0 25.6 6.4 32 12.8L556.8 544c-12.8 12.8-25.6 19.2-44.8 19.2s-32-6.4-44.8-19.2L128 204.8c6.4-6.4 19.2-12.8 32-12.8h704m0-64h-704C108.8 128 57.6 160 38.4 211.2l377.6 377.6c32 25.6 64 38.4 96 38.4s64-12.8 89.6-38.4l377.6-377.6c-12.8-51.2-64-83.2-115.2-83.2z" p-id="5935"></path><path d="M578.368 520.32l45.248-45.312 330.368 330.368-45.248 45.248zM71.104 805.952L401.472 475.52l45.248 45.248L116.352 851.2z" p-id="5936"></path></svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as n, computed as c, defineComponent as s, reactive as p, onMounted as i, createElementBlock as u, openBlock as b, createVNode as m } from "vue";
|
|
2
|
-
import { s as d } from "./index-
|
|
3
|
-
import { g as f, c as _ } from "./index-
|
|
2
|
+
import { s as d } from "./index-Cp8iZJDH.js";
|
|
3
|
+
import { g as f, c as _ } from "./index-D_xp4hkG.js";
|
|
4
4
|
import { _ as k } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const l = n([]), g = c(() => [
|
|
6
6
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const g=require("vue"),O=require("./index.vue_vue_type_style_index_1_lang-CLyCGxO7.cjs"),i=require("./index-BOev8isw.cjs"),pe=require("./index-BZaJxbJy.cjs"),A=O.useModelComp(i.pinia),m=pe.useUnit(i.pinia),I=O.useMenuState(i.pinia),{menus:ee,configMenu:B,activeMenuPath:q,cacheStructures:E}=i.storeToRefs(I),j=g.ref(!1),te=g.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=i.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=g.ref([]),H=g.ref([{label:"新建"}]),fe=g.computed(()=>[{key:"extraButton",contents:H.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),J=g.ref([]),k=g.ref({}),de=g.ref({}),_=g.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),R=e=>{var t;J.value=e?(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):_.value},ie=g.ref([{label:"查询"},{label:"重置"}]),ge=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),v=g.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=g.ref([]),C=g.ref({}),h=g.ref(null),ae=g.ref([]),oe=g.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await i.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:i.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await F(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return i.ElMessage.warning("请先选择菜单");if(v.type=ye(e),U.value=[],A.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=i.cloneDeep(t),v.type!=="delete"){switch(v.type){case"create":R(null),await I.setConfigMenu(null);break;case"update":R(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await g.nextTick(),v.title=`【${v.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,v.show=!0}else await re(C.value,v.type)},ue=g.ref(!0),he=async e=>{var t;k.value=e,await I.setConfigMenu({...k.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};g.watch(()=>ue.value,async e=>{var t;await g.nextTick(),J.value=(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:k.value?k.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ce=g.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(v.type==="create"){const a=(p=(r=E.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);A.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return i.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var T,M,w,N,P,o,K;return{id:(w=(M=(T=d==null?void 0:d.data)==null?void 0:T.result)==null?void 0:M[0])==null?void 0:w.id,...(K=(o=(P=(N=d==null?void 0:d.data)==null?void 0:N.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:K.pageData}});A.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(C.value,t);let l;(n=k.value)!=null&&n.subMenus&&((c=k.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;v.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:v.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),A.setIsEdit("edit")},F=async e=>{var l,u,n,c,r,p;const t=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&($.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),j.value=!1},x=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=i.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=i.updateInsofDataApi):t==="delete"&&(s={id:e},b=i.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw i.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{i.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(x(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(x(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(x(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await g.nextTick();const a=(n=(u=(l=E.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=E.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const T=Y(b,a),M=Y(s,d),w=Z("dialogConfig",T),N=Z("contentConfig",M),P=[...w,...N];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(y=>y.status)))return;let S=(z=o==null?void 0:o.flatMap(y=>y==null?void 0:y.data))==null?void 0:z.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(((G=T==null?void 0:T.updateComps)==null?void 0:G.length)===0&&v.type==="update"){const y=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(D=>(D==null?void 0:D.key)==="dialogConfig");S=[...S,...y]}if(((Q=M==null?void 0:M.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(D=>(D==null?void 0:D.key)==="contentConfig");S=[...S,...y]}const ce=Te(S);re({...t,isNotInitial:!0,structureIds:ce},v.type)}).catch(o=>{i.ElMessage.error(o)})}catch(s){throw i.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=i.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=i.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=i.batchDeleteInsofDataApi),O.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&i.ElMessage.success("响应成功"),F(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(i.cloneDeep(JSON.stringify(E.value)));await g.nextTick();const t=v.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Me(e,t),k.value={},v.show=!1,await F(h.value)},Se=()=>{v.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},we=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:v,formatFormData:R,getInitialSubStructure:ne,getTableDataAsync:F,handleItemDataChange:ge,inputForm:k,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=we;exports.tempMenuPageData=se;
|
|
1
|
+
"use strict";const g=require("vue"),O=require("./index.vue_vue_type_style_index_1_lang-SSe8ZwaD.cjs"),i=require("./index-DGKTZoR7.cjs"),pe=require("./index-BChe07xV.cjs"),A=O.useModelComp(i.pinia),m=pe.useUnit(i.pinia),I=O.useMenuState(i.pinia),{menus:ee,configMenu:B,activeMenuPath:q,cacheStructures:E}=i.storeToRefs(I),j=g.ref(!1),te=g.computed(()=>{var e,t;return[{key:"extraButton",contents:[]},{key:"rowButton",contents:[{label:"修改"}]},{key:"header",contents:[{label:"菜单名称",prop:"title",isFormColHidden:!1},{label:"菜单类型",prop:"menuType",formType:"select",options:[{label:"系统菜单",value:"集团"},{label:"公司",value:"公司"}],isTableColHidden:!1,isFormColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:(t=(e=i.cloneDeep(ee.value))==null?void 0:e.map(l=>({...l,menuType:"系统菜单"})))==null?void 0:t.filter(l=>l.title!=="系统管理"&&l.title!=="平台管理")}]}),$=g.ref([]),H=g.ref([{label:"新建"}]),fe=g.computed(()=>[{key:"extraButton",contents:H.value},{key:"rowButton",contents:[{label:"修改"},{label:"删除"}]},{key:"header",contents:[{label:"操作类型",prop:"operateType",formType:"select",options:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标",prop:"operateIcon",formType:"inputPopover",value:""},{label:"操作触发事件",prop:"trigger",formType:"select",options:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"配置一:",prop:"dialogConfig",formType:"button",value:"弹窗内容",isTableColHidden:!0},{label:"配置二:",prop:"contentConfig",formType:"button",value:"模块内容",isTableColHidden:!0},{label:"继承配置:",prop:"allowInherit",formType:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1,isTableColHidden:!0},{label:"操作"}]},{key:"tableContents",contents:$.value}]),J=g.ref([]),k=g.ref({}),de=g.ref({}),_=g.ref([{label:"菜单",prop:"path",isFormColHidden:!0,value:""},{label:"操作类型:",prop:"operateType",type:"select",contents:[{label:"新增",value:"新增"},{label:"编辑",value:"编辑"},{label:"删除",value:"删除"}],value:""},{label:"操作图标:",prop:"operateIcon",type:"inputPopover",value:""},{label:"操作触发事件:",prop:"trigger",type:"select",contents:[{label:"弹出弹窗",value:"openDialog"}],value:"openDialog"},{label:"生成的菜单图标:",prop:"menuIcon",type:"inputPopover",value:""},{label:"配置一:",prop:"dialogConfig",type:"button",value:"操作触发的弹窗结构"},{label:"配置二:",prop:"contentConfig",type:"button",value:"操作生成的模块结构",isFormColHidden:!1},{label:"",prop:"structureIds",type:"input",value:[],isFormColHidden:!0},{label:"继承配置:",prop:"allowInherit",type:"radio",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),R=e=>{var t;J.value=e?(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l:{...l,value:e?e[l==null?void 0:l.prop]:""}):_.value},ie=g.ref([{label:"查询"},{label:"重置"}]),ge=async()=>{},le=e=>e.map(t=>t.childMenus&&t.childMenus.length>0?{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title,children:le(t.childMenus)}:{...t,value:t==null?void 0:t.title,label:t==null?void 0:t.title}),v=g.reactive({show:!1,title:"菜单配置",width:"30%",type:"create"}),U=g.ref([]),C=g.ref({}),h=g.ref(null),ae=g.ref([]),oe=g.computed(()=>{var e;return(e=le(ee.value))==null?void 0:e.filter(t=>t.title!=="系统管理"&&t.title!=="平台管理")}),ne=async e=>{var l,u,n,c;const t=await i.getInsofDataApi({key:{type:"subStructure",systemKey:sessionStorage.getItem("systemKey"),pageKey:e,version:1}});if(((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result){const r=(c=(n=t.data)==null?void 0:n.result)==null?void 0:c.map(p=>{var f;return{id:p==null?void 0:p.id,...(f=p==null?void 0:p.value)==null?void 0:f.pageData}});ae.value=r,I.setCacheStructures({key:"contentConfig",data:r})}},ve=async e=>{var t;j.value=!0,h.value={...e,rootNode:i.findRootNodeByPath(oe.value,e.path)},I.setCacheStructures(null),(e==null?void 0:e.level)===0?H.value.splice(0):(H.value=[{label:"新建"}],U.value=(t=e==null?void 0:e.path)==null?void 0:t.split("/")),await I.setConfigMenu(null),await ne(e==null?void 0:e.path),await F(e)},ye=e=>{switch(e){case"新建":return"create";case"修改":return"update";case"删除":return"delete"}},be=async(e,t)=>{var l,u;if(!h.value)return i.ElMessage.warning("请先选择菜单");if(v.type=ye(e),U.value=[],A.setSubmitCurStructure(!1),m.setSelectTitle([]),C.value=i.cloneDeep(t),v.type!=="delete"){switch(v.type){case"create":R(null),await I.setConfigMenu(null);break;case"update":R(C.value),await I.setConfigMenu(C.value),console.log("clickRowButton",C.value);break}await g.nextTick(),v.title=`【${v.type==="create"?(l=h.value)==null?void 0:l.path:(u=C.value)==null?void 0:u.path}】菜单配置${e}`,v.show=!0}else await re(C.value,v.type)},ue=g.ref(!0),he=async e=>{var t;k.value=e,await I.setConfigMenu({...k.value,path:(t=h.value)==null?void 0:t.path}),ue.value=(e==null?void 0:e.operateType)!=="新增"};g.watch(()=>ue.value,async e=>{var t;await g.nextTick(),J.value=(t=_.value)==null?void 0:t.map(l=>l.prop==="dialogConfig"||l.prop==="contentConfig"||l.prop==="trigger"?l.prop==="contentConfig"?{...l,isFormColHidden:e}:l:{...l,value:k.value?k.value[l==null?void 0:l.prop]:""})},{immediate:!0,deep:!0});const Ce=g.ref(null),Ie=async(e,t)=>{var r,p,f,s,b;if(v.type==="create"){const a=(p=(r=E.value)==null?void 0:r.filter(d=>(d==null?void 0:d.key)===t))==null?void 0:p.flatMap(d=>d==null?void 0:d.data);A.setItemData(a),I.setCacheStructures({key:t,data:a})}if(console.log("getTriggerStructures1",e==null?void 0:e.structureIds,t),!(e!=null&&e.structureIds)||((f=e==null?void 0:e.structureIds)==null?void 0:f.length)===0)return;const l=(b=(s=e==null?void 0:e.structureIds)==null?void 0:s.filter(a=>(a==null?void 0:a.key)===t))==null?void 0:b.map(a=>a==null?void 0:a.id);let u=l==null?void 0:l.map(a=>{if(a)return i.getInsofDataApi({id:a})});const n=await Promise.all(u),c=n==null?void 0:n.every(a=>{var d;return((d=a==null?void 0:a.data)==null?void 0:d.code)===200});if(console.log("getTriggerStructures2",e==null?void 0:e.structureIds,t,n),c&&(n==null?void 0:n.length)>0){const a=n==null?void 0:n.map(d=>{var T,M,w,N,P,o,K;return{id:(w=(M=(T=d==null?void 0:d.data)==null?void 0:T.result)==null?void 0:M[0])==null?void 0:w.id,...(K=(o=(P=(N=d==null?void 0:d.data)==null?void 0:N.result)==null?void 0:P[0])==null?void 0:o.value)==null?void 0:K.pageData}});A.setItemData(a),I.setCacheStructures({key:t,data:a})}},ke=async e=>{var n,c,r,p,f;const t=e==="操作触发的弹窗结构"?"dialogConfig":"contentConfig";I.setButtonTriggerType(t),await Ie(C.value,t);let l;(n=k.value)!=null&&n.subMenus&&((c=k.value)==null?void 0:c.subMenus.length)>0&&(l=(r=U.value)==null?void 0:r.map(s=>({value:s})),l.unshift({value:(p=C.value)==null?void 0:p.title}));let u;v.type==="create"?u={...k.value,path:(f=h.value)==null?void 0:f.path}:v.type==="update"&&(u=B.value),await I.setConfigMenu(u),m.setSelectTitle(l),A.setIsEdit("edit")},F=async e=>{var l,u,n,c,r,p;const t=await i.getInsofDataApi({key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+(e==null?void 0:e.path),tableId:""}});((l=t==null?void 0:t.data)==null?void 0:l.code)===200&&(u=t.data)!=null&&u.result&&($.value=((c=(n=t.data)==null?void 0:n.result)==null?void 0:c.length)>0?(p=(r=t.data)==null?void 0:r.result)==null?void 0:p.map(f=>{var s;return{id:f==null?void 0:f.id,...(s=f==null?void 0:f.value)==null?void 0:s.tableData}}):[]),j.value=!1},x=async(e,t,l="contentConfig")=>{var u,n,c,r,p,f;try{let s,b;t==="create"?(s={key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((u=h.value)==null?void 0:u.path),type:"structure",rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,structureBelong:l,parentTable:"",version:1},value:{pageData:e}},b=i.createInsofDataApi):t==="update"?(s={id:e==null?void 0:e.id,value:{pageData:e}},b=i.updateInsofDataApi):t==="delete"&&(s={id:e},b=i.deleteInsofDataApi);const a=await b(s);if(((r=a==null?void 0:a.data)==null?void 0:r.code)!==200)throw i.ElMessage.error("保存响应失败"),new Error("保存响应失败");const d=t==="create"?(p=a==null?void 0:a.data)==null?void 0:p.result:e==null?void 0:e.id;return{status:((f=a==null?void 0:a.data)==null?void 0:f.code)===200,data:{id:d,key:l}}}catch{i.ElMessage.error("保存响应失败")}},Y=(e,t)=>{var f,s,b;const l=(f=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:f.map(a=>a==null?void 0:a.id),u=t.filter(a=>!(l!=null&&l.includes(a))),n=l==null?void 0:l.filter(a=>!t.includes(a));let c=null,r=null,p=null;return c=[...u,...n].filter(a=>a),r=(s=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:s.filter(a=>!(a!=null&&a.id)),p=(b=e==null?void 0:e.flatMap(a=>a==null?void 0:a.data))==null?void 0:b.filter(a=>a==null?void 0:a.id).filter(a=>Object.keys(a).length>1),{deleteIds:c,createComps:r,updateComps:p}},Z=(e,t)=>{var u,n,c,r,p,f;let l=[];return((u=t==null?void 0:t.deleteIds)==null?void 0:u.length)>0&&((n=t==null?void 0:t.deleteIds)==null||n.forEach(s=>{l.push(x(s,"delete",e))})),((c=t==null?void 0:t.createComps)==null?void 0:c.length)>0&&((r=t==null?void 0:t.createComps)==null||r.forEach(s=>{l.push(x(s,"create",e))})),((p=t==null?void 0:t.updateComps)==null?void 0:p.length)>0&&((f=t==null?void 0:t.updateComps)==null||f.forEach(s=>{s!=null&&s.id&&l.push(x(s,"update",e))})),l},Te=e=>{const t=new Map;return e.forEach(l=>{t.set(l.id,l)}),Array.from(t.values())},Me=async(e,t)=>{var l,u,n,c,r,p,f;try{const s=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="contentConfig"),b=e==null?void 0:e.filter(o=>(o==null?void 0:o.key)==="dialogConfig");await g.nextTick();const a=(n=(u=(l=E.value)==null?void 0:l.filter(o=>(o==null?void 0:o.key)==="dialogConfig"))==null?void 0:u.flatMap(o=>o==null?void 0:o.data))==null?void 0:n.map(o=>o==null?void 0:o.id);let d=(p=(r=(c=E.value)==null?void 0:c.filter(o=>(o==null?void 0:o.key)==="contentConfig"))==null?void 0:r.flatMap(o=>o==null?void 0:o.data))==null?void 0:p.map(o=>o==null?void 0:o.id);d=[...d,...(f=ae.value)==null?void 0:f.map(o=>o==null?void 0:o.id)];const T=Y(b,a),M=Y(s,d),w=Z("dialogConfig",T),N=Z("contentConfig",M),P=[...w,...N];await Promise.all(P).then(o=>{var z,G,L,V,Q,W,X;if(!(o==null?void 0:o.every(y=>y.status)))return;let S=(z=o==null?void 0:o.flatMap(y=>y==null?void 0:y.data))==null?void 0:z.filter(y=>(y==null?void 0:y.id)!==null&&(y==null?void 0:y.id)!==void 0);if(((G=T==null?void 0:T.updateComps)==null?void 0:G.length)===0&&v.type==="update"){const y=(V=(L=C.value)==null?void 0:L.structureIds)==null?void 0:V.filter(D=>(D==null?void 0:D.key)==="dialogConfig");S=[...S,...y]}if(((Q=M==null?void 0:M.updateComps)==null?void 0:Q.length)===0&&v.type==="update"){const y=(X=(W=C.value)==null?void 0:W.structureIds)==null?void 0:X.filter(D=>(D==null?void 0:D.key)==="contentConfig");S=[...S,...y]}const ce=Te(S);re({...t,isNotInitial:!0,structureIds:ce},v.type)}).catch(o=>{i.ElMessage.error(o)})}catch(s){throw i.ElMessage.error(s),new Error(s)}},re=async(e,t)=>{var n,c;let l,u;t==="create"?(l={key:{type:"menuConfigData",systemKey:sessionStorage.getItem("systemKey"),pageKey:q.value+"/"+((n=h.value)==null?void 0:n.path),tableId:"",rootNodePath:e==null?void 0:e.rootNodePath},value:{tableData:e}},u=i.createInsofDataApi):t==="update"?(l={id:e==null?void 0:e.id,value:{tableData:e}},u=i.updateInsofDataApi):t==="delete"&&(l={ids:[e.id,...(c=e==null?void 0:e.structureIds)==null?void 0:c.map(r=>r.id)]},u=i.batchDeleteInsofDataApi),O.handleSubmitAsync(u,l,t).then(r=>{t==="create"&&$.value.push({...e,id:r}),t&&r&&i.ElMessage.success("响应成功"),F(h.value)})},De=async()=>{var l,u,n,c,r;const e=JSON.parse(i.cloneDeep(JSON.stringify(E.value)));await g.nextTick();const t=v.type==="create"?{...B.value,rootNodePath:(u=(l=h.value)==null?void 0:l.rootNode)==null?void 0:u.path}:{...B.value,rootNodePath:(c=(n=h.value)==null?void 0:n.rootNode)==null?void 0:c.path,id:(r=C.value)==null?void 0:r.id};await Me(e,t),k.value={},v.show=!1,await F(h.value)},Se=()=>{v.show=!1},se={comp:"Group",name:"/平台管理/菜单管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:te.value,name:""}]}]},we=Object.freeze(Object.defineProperty({__proto__:null,beforeDialogDestroy:Se,buttonValue:ie,changeTrigger:he,changedRow:de,clickNodeTrigger:ve,clickRowButton:be,clickSubmitForm:De,clickTrigger:ke,dialogInfo:v,formatFormData:R,getInitialSubStructure:ne,getTableDataAsync:F,handleItemDataChange:ge,inputForm:k,menuPageData:fe,operatingForm:Ce,pageData:te,renderFormData:J,tableLoading:j,tempMenuPageData:se,treeData:oe},Symbol.toStringTag,{value:"Module"}));exports.State=we;exports.tempMenuPageData=se;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),r={};function t(c,o){return" 1212 "}const n=e._export_sfc(r,[["render",t]]);exports.default=n;
|