ss-component-new 1.1.239 → 1.1.251
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/array-Cfkocegc.cjs +7 -0
- package/dist/{array-DAwa7XAV.js → array-ajUPDjk-.js} +1286 -1249
- package/dist/{cloneDeep-kbsGGN_Q.cjs → cloneDeep-DCMyAr7F.cjs} +1 -1
- package/dist/{cloneDeep-BcK4cO7a.js → cloneDeep-DtdftT0f.js} +1 -1
- package/dist/{index-V9D4K_Sf.cjs → index-Ay3zWox0.cjs} +1 -1
- package/dist/{index-DxzvUr7M.cjs → index-B0HmXDcn.cjs} +1 -1
- package/dist/{index-Du-s_IGe.js → index-B51_btNj.js} +1 -1
- package/dist/{index-CG01yKU1.js → index-B7gPLrkw.js} +7 -7
- package/dist/{index-C3UTqVyv.cjs → index-BHTSR3FE.cjs} +1 -1
- package/dist/{index-3g7rW5vQ.js → index-BKRsxH2X.js} +1 -1
- package/dist/{index-BAWROpdj.js → index-BL7peXic.js} +1 -1
- package/dist/{index-Gc1epwAE.cjs → index-BPaNMRn3.cjs} +1 -1
- package/dist/index-BR3hwVDI.cjs +1 -0
- package/dist/{index-Bkc0R0j5.js → index-BYQHqPN_.js} +5 -5
- package/dist/{index-CiTgFX9o.js → index-BZn1s6Bk.js} +80 -80
- package/dist/{index-CoH0G-uS.cjs → index-BbIzB7YX.cjs} +1 -1
- package/dist/{index-P_6AmAJ6.js → index-BeiGUVWl.js} +1 -1
- package/dist/{index-GlyYi8eO.cjs → index-BgCZDbVt.cjs} +1 -1
- package/dist/{index-NdocPiqA.js → index-Bkxb5fHL.js} +9 -9
- package/dist/{index-B66Qf5rw.js → index-BozPGCih.js} +6 -6
- package/dist/{index-FX9zIOBz.cjs → index-BpHu02lA.cjs} +1 -1
- package/dist/{index-BhOckTgC.cjs → index-BqJOhKOc.cjs} +1 -1
- package/dist/{index-5JXCiHw3.cjs → index-C2pELaVv.cjs} +1 -1
- package/dist/{index-CWsALJ8f.cjs → index-C9j-6CeR.cjs} +1 -1
- package/dist/index-CKyiuQao.cjs +1 -0
- package/dist/{index-D0hUHQHn.cjs → index-CcRLR8Gr.cjs} +1 -1
- package/dist/{index-D0FNjq6G.cjs → index-CkJqNCcv.cjs} +1 -1
- package/dist/{index-DqLOgQsT.cjs → index-Ck_2rIhj.cjs} +1 -1
- package/dist/{index-B_VMMfxb.js → index-Cpx3RXJV.js} +1 -1
- package/dist/{index-BoA0FuEi.js → index-Cu1Ll7fu.js} +7 -7
- package/dist/{index-B2KK3HzA.cjs → index-CxlM7z0m.cjs} +1 -1
- package/dist/{index-BdiQsOpb.cjs → index-D02e7ds8.cjs} +1 -1
- package/dist/{index-CQ0bJWFx.cjs → index-D2rRKRIz.cjs} +1 -1
- package/dist/{index-DX3jtjLG.js → index-D3nDdxsA.js} +3 -3
- package/dist/{index-BFPZALXc.cjs → index-D4k4Kt_c.cjs} +1 -1
- package/dist/{index-C7Y_BQCw.js → index-D8oY3D0n.js} +7 -7
- package/dist/{index-BUga6nNK.cjs → index-DDn9ThJp.cjs} +1 -1
- package/dist/{index-D-auhS5f.js → index-DE_uaxm8.js} +3 -3
- package/dist/{index-DreX5xyP.js → index-DRXQ7Drm.js} +5 -5
- package/dist/{index-BMrHnCTf.js → index-DYNeAuQw.js} +4 -4
- package/dist/{index-Be4n2ecn.js → index-DaJlOaaY.js} +185 -186
- package/dist/{index-8hwiS85r.js → index-DcPPxNG8.js} +5 -5
- package/dist/{index-CK7nt4bL.cjs → index-DoWWO-3y.cjs} +1 -1
- package/dist/{index-DRcuI2gm.js → index-DpaiQOL7.js} +4 -4
- package/dist/{index-CrSVdnus.cjs → index-DpbJKFqm.cjs} +1 -1
- package/dist/{index-BOzSvFJA.cjs → index-Dryv4si2.cjs} +1 -1
- package/dist/{index-CgxSbKBz.js → index-Du2Yuykz.js} +4 -4
- package/dist/{index-CrdlZPHq.js → index-DvJjD7RR.js} +4 -4
- package/dist/{index-Cbj_oJPC.cjs → index-Smr1ALN3.cjs} +1 -1
- package/dist/{index-DcymGmWj.js → index-aRyZSa-G.js} +1 -1
- package/dist/{index-C8nLtJQB.js → index-jczyrHls.js} +6 -6
- package/dist/{index-FaQ9vBep.js → index-mG9i_KcW.js} +4 -4
- package/dist/{index-bC_377mt.cjs → index-xGP7OXSz.cjs} +1 -1
- package/dist/{index-B9K0EIpS.js → index-yhjaVvff.js} +5 -5
- package/dist/{index.vue_vue_type_script_setup_true_lang-DVmAEsPP.js → index.vue_vue_type_script_setup_true_lang-B0Djzy96.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-7hOFb1P0.cjs → index.vue_vue_type_script_setup_true_lang-DrbhnNKr.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-CMvvh_Fa.js → index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-DeXLg3dX.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-Df3FKHF1.cjs → index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-W3uUv6w7.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Rrc8X2Wa.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-BHR0eJcV.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DI887Xui.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DhI6ANoB.cjs} +1 -1
- package/dist/{login-C0pHH-1V.cjs → login-BaeCkWT1.cjs} +1 -1
- package/dist/{login-CbLjVnvi.js → login-Bkd6sncM.js} +2 -2
- package/dist/{main-wtI2yJ--.cjs → main-CNpsIQp6.cjs} +1 -1
- package/dist/{main-DLdZKJUK.js → main-DYIfLk_q.js} +6 -6
- package/dist/{menu-CAlO6ojx.js → menu-BkdM6zRG.js} +1 -1
- package/dist/{menu-LlBjM6b8.cjs → menu-D4qvDjG1.cjs} +1 -1
- package/dist/{modelComp-D9gZ6ZkE.js → modelComp-BMtv9CAa.js} +1 -1
- package/dist/{modelComp-Af3CYJjb.cjs → modelComp-Crl-NAn3.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/dist/array-D-J_e91G.cjs +0 -7
- package/dist/index-BZHxtM--.cjs +0 -1
- package/dist/index-VVRul53o.cjs +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const ce=require("./index-BHTSR3FE.cjs"),e=require("vue"),ye=require("./index-DpbJKFqm.cjs"),X=require("./index-xGP7OXSz.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p=require("./cloneDeep-DCMyAr7F.cjs"),de=require("./menu-D4qvDjG1.cjs"),ve=require("./index-DDn9ThJp.cjs"),bl=require("./modelComp-Crl-NAn3.cjs"),We=require("./index-CcRLR8Gr.cjs"),Cl=o=>o.match(/\((.*)\)/)[1],xe=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],De=[{label:"输入框",value:"Input"},{label:"单选框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"}],Dl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:De},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"}],xl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:De},{key:"originalContent",label:"初始值",type:"Select"},{key:"contents",label:"选项值",type:"Input"}],El=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:De},{key:"originalContent",label:"初始值",type:"Date"}],_l=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:De},{key:"originalContent",label:"初始值",type:"Input"}],Nl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:De}],ue=[{key:"Input",value:Dl},{key:"Select",value:xl},{key:"Date",value:El},{key:"TextArea",value:_l},{key:"Upload",value:Nl}],$l=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],fe=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:$l},{key:"background",label:"颜色",type:"Color"}],Vl={class:"form-content"},Bl={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(o,{emit:t}){const n=o,l=t,a=e.ref([]),s=e.ref(!1),c=e.ref([]),d=ce.useFormToTableComp(ye.pinia),b=e.ref(!1),m=e.ref(),h=D=>{var k,C,r,i;const B=(C=(k=p.cloneDeep(n.itemData))==null?void 0:k.find(u=>(u==null?void 0:u.key)==="formContent"))==null?void 0:C.contents,v=p.cloneDeep(D.content);let T={};v&&((r=Object.values(v))==null?void 0:r.length)>0&&((i=Object.values(v))==null||i.forEach((u,y)=>{T[B[y].key]=u}));const f={content:T,index:n==null?void 0:n.index,buttonName:D==null?void 0:D.buttonName};l("change",f)},E=D=>{var T,f;if(!D)return;if(((T=Object.values(p.cloneDeep(D)))==null?void 0:T.length)>0){const k=(f=Object.values(p.cloneDeep(D)))==null?void 0:f.map(r=>r);let C="";k==null||k.forEach(r=>{r!==""&&r!==void 0&&(C=C===""?r:C+"/"+r)}),d.setSelectArray(k),d.setSelectString(C)}const B=p.cloneDeep(n.itemData),v=B==null?void 0:B.map(k=>{var C;return(k==null?void 0:k.key)==="formContent"&&((C=k.contents)==null||C.map((r,i)=>{var u,y,j,J,U,V,O,A,g,F,_,S,w,W,P,G,H,ee,oe;return r.type=r!=null&&r.type?r.type:(J=(j=(y=(u=r==null?void 0:r.key)==null?void 0:u.split("$"))==null?void 0:y[1])==null?void 0:j.split("("))!=null&&J[0]?(U=xe==null?void 0:xe.find(ae=>{var ie,Y,re,te;return(ae==null?void 0:ae.key)===((te=(re=(Y=(ie=r==null?void 0:r.key)==null?void 0:ie.split("$"))==null?void 0:Y[1])==null?void 0:re.split("("))==null?void 0:te[0])}))==null?void 0:U.value:"Input",r.options=r!=null&&r.options?r.options:((A=(O=(V=r==null?void 0:r.key)==null?void 0:V.split("$"))==null?void 0:O[1])==null?void 0:A.length)>0?(S=(_=Cl((F=(g=r==null?void 0:r.key)==null?void 0:g.split("$"))==null?void 0:F[1]))==null?void 0:_.split(","))==null?void 0:S.map(ae=>({label:ae,value:ae})):[],(w=r==null?void 0:r.key)!=null&&w.includes("$")&&(r.key=(P=(W=r==null?void 0:r.key)==null?void 0:W.split("$"))==null?void 0:P[0]),r.value=Array.isArray((G=Object.values(D))==null?void 0:G[i])?(ee=(H=Object.values(D))==null?void 0:H[i])==null?void 0:ee[0]:(oe=Object.values(D))==null?void 0:oe[i],r})),k});l("contentChange",{contents:v,index:n.index})};return e.watch(()=>n.itemData,()=>{var k,C,r,i,u,y,j,J,U,V,O;const D=(k=p.cloneDeep(n.itemData))==null?void 0:k.find(A=>(A==null?void 0:A.key)==="formContent"),B=(C=p.cloneDeep(n.itemData))==null?void 0:C.find(A=>(A==null?void 0:A.key)==="formButton"),v=(r=p.cloneDeep(n.itemData))==null?void 0:r.find(A=>(A==null?void 0:A.key)==="formFlex"),T=(i=p.cloneDeep(n.itemData))==null?void 0:i.find(A=>(A==null?void 0:A.key)==="formWrap"),f=(u=p.cloneDeep(n.itemData))==null?void 0:u.find(A=>(A==null?void 0:A.key)==="enableWrap");if((T==null?void 0:T.contents)==="纵向"?s.value=!1:s.value=!0,b.value=(f==null?void 0:f.contents)===void 0?!1:f==null?void 0:f.contents,m.value=typeof(v==null?void 0:v.contents)!="boolean"?!(!(v!=null&&v.contents)===""||((y=v==null?void 0:v.contents)==null?void 0:y.toUpperCase())==="VERTICAL"):v==null?void 0:v.contents,((j=D==null?void 0:D.contents)==null?void 0:j.length)>0&&Array.isArray(D==null?void 0:D.contents)){const A=[];(J=D==null?void 0:D.contents)==null||J.forEach((_,S)=>{var w,W,P,G,H,ee,oe,ae,ie,Y;if((_==null?void 0:_.label)!==""){let re=(_==null?void 0:_.label)??(_==null?void 0:_.key)??"",te=(_==null?void 0:_.type)??"",le=(_==null?void 0:_.options)??[];if((w=_==null?void 0:_.key)!=null&&w.includes("$")&&(re=(W=p.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:W[0],((G=(P=p.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:P[1])==null?void 0:G.length)>0)){const[N,x]=(ee=(H=p.cloneDeep(_==null?void 0:_.key).split("$"))==null?void 0:H[1])==null?void 0:ee.split(/[()]/);te=((oe=xe.find($=>($==null?void 0:$.key)===N))==null?void 0:oe.value)??"",((ae=x==null?void 0:x.split(","))==null?void 0:ae.length)>0&&(le=(ie=x==null?void 0:x.split(","))==null?void 0:ie.map($=>({label:$,value:$})))}A.push({label:re??"",name:"t"+S,type:te===""?"Input":te,value:_!=null&&_.value?_.value:(le==null?void 0:le.length)>0?(Y=le==null?void 0:le[0])==null?void 0:Y.value:(_==null?void 0:_.value)??"",id:(_==null?void 0:_.id)??S,contents:le??[],width:(_==null?void 0:_.width)??1})}});const g=(U=p.cloneDeep(A))==null?void 0:U.map(_=>_.value);let F="";g==null||g.forEach(_=>{_!==""&&_!==void 0&&(F=F===""?_:F+"/"+_)}),d.setSelectArray(g),d.setSelectString(F),a.value=A}else a.value=[];if(((V=B==null?void 0:B.contents)==null?void 0:V.length)>0){const A=[];(O=B==null?void 0:B.contents)==null||O.forEach((g,F)=>{(g==null?void 0:g.label)!==""&&A.push({label:(g==null?void 0:g.label)??"",id:(g==null?void 0:g.id)??F,type:(g==null?void 0:g.type)??"",background:g==null?void 0:g.background})}),c.value=A}else c.value=[]},{deep:!0,immediate:!0}),(D,B)=>(e.openBlock(),e.createElementBlock("div",Vl,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:a.value,formRules:o.formRules,buttonValue:c.value,isRowFlex:m.value,isEnableWrap:b.value,onOnButtonClick:h,onChange:E,isButtonRow:s.value,key:n.itemData},null,8,["rowContents","formRules","buttonValue","isRowFlex","isEnableWrap","isButtonRow"]))]))}},ze=se._export_sfc(Bl,[["__scopeId","data-v-63ad44fd"]]),Ve=e.ref(0),Ye=o=>{var t;return!o||(o==null?void 0:o.length)===0?[]:(t=p.cloneDeep(o))==null?void 0:t.map(l=>(Ve.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"center",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??Ve.value,children:Ye(l==null?void 0:l.children)},l))},wl=o=>{var n;return(n=p.cloneDeep(o))==null?void 0:n.map(l=>(Ve.value++,l={label:(l==null?void 0:l.label)??"",prop:(l==null?void 0:l.label)==="操作"?"operate":l==null?void 0:l.prop,width:l!=null&&l.width?parseInt(l.width):"",fixed:(l==null?void 0:l.fixed)??void 0,sortable:(l==null?void 0:l.sortable)??!1,align:(l==null?void 0:l.align)??"center",showOverflowTooltip:(l==null?void 0:l.showOverflowTooltip)??!0,isNotDrag:(l==null?void 0:l.isNotDrag)??!1,isEditCol:(l==null?void 0:l.isEditCol)??!1,isOperate:(l==null?void 0:l.isOperate)??!1,id:(l==null?void 0:l.id)??Ve.value,children:Ye(l==null?void 0:l.children)},l))},el=(o,t)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===t)?(n=p.cloneDeep(o))==null?void 0:n.filter(a=>(a==null?void 0:a.id)!==t):(o=o==null?void 0:o.map(l=>(l.children=el(l==null?void 0:l.children,t),l)),o)},ll=(o,t)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===(t==null?void 0:t.id))?(n=p.cloneDeep(o))==null?void 0:n.map(a=>((a==null?void 0:a.id)===(t==null?void 0:t.id)&&(a=t),a)):(o=o==null?void 0:o.map(l=>(l.children=ll(l==null?void 0:l.children,t),l)),o)},nl=(o,t)=>{var n;return o!=null&&o.find(l=>{var a;return(l==null?void 0:l.id)===((a=t==null?void 0:t.contents)==null?void 0:a.id)})?(n=p.cloneDeep(o))==null?void 0:n.map(a=>{var s;return(a==null?void 0:a.id)===((s=t==null?void 0:t.contents)==null?void 0:s.id)&&(a=t==null?void 0:t.contents),a}):(o=o==null?void 0:o.map(l=>(l.children=nl(l==null?void 0:l.children,t),l)),o)},ol=(o,t)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===(t==null?void 0:t.id))?(n=p.cloneDeep(o))==null?void 0:n.map(a=>((a==null?void 0:a.id)===(t==null?void 0:t.id)&&(a!=null&&a.children||(a.children=[]),a.children.push(t.contents)),a)):(o=o==null?void 0:o.map(l=>(l.children=ol(l==null?void 0:l.children,t),l)),o)},q=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],Al=[{label:"view",value:"查看"},{label:"fix",value:"修改"},{label:"delete",value:"删除"}],Tl=[{label:"add",value:"新增"}],he=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Tl},{key:"background",label:"按钮背景色",type:"Color"}],me=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Al},{key:"textColor",label:"按钮颜色",type:"Color"}],al=de.defineStore("modelTableComp",{state:()=>({tableIndex:0}),actions:{setTableIndex(o){this.tableIndex=o}}}),Il={class:"table-header-child"},Ol={class:"table-header-child-main"},Sl={class:"table-header-child-content"},Fl={class:"table-header-child-content-item"},Ll={class:"fix-button"},jl={key:0},Ul={class:"form-content"},Jl={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:t}){const n=o,l=t,a=e.ref(!1),s=e.ref(""),c=al(ye.pinia),{tableIndex:d}=de.storeToRefs(c);e.ref(0);const b=e.ref(""),m=e.ref([]),h=e.ref([]),E=r=>{var u;a.value=!0;let i=[];q==null||q.forEach(y=>{let j=p.cloneDeep(d.value)+1;c.setTableIndex(j),i.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:r[y.key],id:d.value,contents:y==null?void 0:y.options})}),r!=null&&r.children&&((u=r==null?void 0:r.children)==null?void 0:u.length)>0&&i.push({children:r==null?void 0:r.children,isFormColHidden:!0}),b.value=r==null?void 0:r.id,m.value=i,h.value=i},D=r=>{l("fixChange",p.cloneDeep(r))},B=r=>{l("deleteChange",p.cloneDeep(r))},v=r=>{a.value=!0;let i=[];q==null||q.forEach(u=>{let y=p.cloneDeep(d.value)+1;c.setTableIndex(y),i.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:"",id:d.value,contents:u==null?void 0:u.options})}),s.value=r==null?void 0:r.id,m.value=i,h.value=i},T=r=>{let i=p.cloneDeep(h.value);i=i==null?void 0:i.map(u=>(u.children||(u.value=r==null?void 0:r[u.name]),u)),h.value=i},f=()=>{var i,u;m.value=h.value;let r={};if(b.value!=="")r.id=b.value,(i=m.value)==null||i.forEach(y=>{const j=q==null?void 0:q.find(J=>(J==null?void 0:J.label)===(y==null?void 0:y.label));j?r[j.key]=y.value:y!=null&&y.children&&y.children.length>0&&(r.children=y.children)}),a.value=!1,l("fixChange",{contents:p.cloneDeep(r),id:s.value,type:"fix"});else{let y=p.cloneDeep(d.value)+1;c.setTableIndex(y),r.id="id"+d.value,(u=m.value)==null||u.forEach(j=>{const J=q==null?void 0:q.find(U=>(U==null?void 0:U.label)===(j==null?void 0:j.label));J?r[J.key]=j.value:j!=null&&j.children&&j.children.length>0&&(r.children=j.children)}),a.value=!1,l("fixChange",{contents:p.cloneDeep(r),id:s.value,type:"add"})}b.value="",m.value=[],h.value=[]},k=()=>{a.value=!1,b.value="",s.value="",m.value=[],h.value=[]},C=r=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",r),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(r,i)=>{const u=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Il,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(y,j)=>(e.openBlock(),e.createElementBlock("div",Ol,[e.createElementVNode("div",Sl,[e.createElementVNode("div",Fl,e.toDisplayString(y.label),1),e.createElementVNode("div",Ll,[e.createVNode(u,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>v(y)},null,8,["onClick"]),e.createVNode(u,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>E(y)},null,8,["onClick"]),e.createVNode(u,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>C(y)},null,8,["onClick"])])]),y!=null&&y.children&&y.children.length>0?(e.openBlock(),e.createElementBlock("div",jl,[e.createVNode(tl,{tableChildContents:y==null?void 0:y.children,onDeleteChange:B,onFixChange:D},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(X.ssDialog,{visible:a.value,onBeforeDestroy:k,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ul,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:T},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:k,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:f},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Pl=se._export_sfc(Jl,[["__scopeId","data-v-e0fef72d"]]),Rl={class:"table-header-child"},Wl={class:"table-header-child-main"},zl={class:"table-header-child-content"},Ml={class:"table-header-child-content-item"},Gl={class:"fix-button"},ql={key:0},Hl={class:"form-content"},Zl={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:t}){const n=o,l=t,a=e.ref(!1),s=e.ref(""),c=al(ye.pinia),{tableIndex:d}=de.storeToRefs(c),b=e.ref(""),m=e.ref([]),h=e.ref([]),E=r=>{l("fixChange",p.cloneDeep(r))},D=r=>{var u;a.value=!0;let i=[];q==null||q.forEach(y=>{let j=p.cloneDeep(d.value)+1;c.setTableIndex(j),i.push({label:y==null?void 0:y.label,name:y==null?void 0:y.label,type:y.type,value:r[y.key],id:d.value,contents:y==null?void 0:y.options})}),r!=null&&r.children&&((u=r==null?void 0:r.children)==null?void 0:u.length)>0&&i.push({children:r==null?void 0:r.children,isFormColHidden:!0}),b.value=r==null?void 0:r.id,m.value=i,h.value=i},B=r=>{a.value=!0;let i=[];q==null||q.forEach(u=>{let y=p.cloneDeep(d.value)+1;c.setTableIndex(y),i.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:"",id:d.value,contents:u==null?void 0:u.options})}),s.value=r==null?void 0:r.id,m.value=i,h.value=i},v=r=>{let i=p.cloneDeep(h.value);i=i==null?void 0:i.map(u=>(u.children||(u.value=r==null?void 0:r[u.name]),u)),h.value=i},T=()=>{var i,u;m.value=h.value;let r={};if(b.value!=="")r.id=b.value,(i=m.value)==null||i.forEach(y=>{const j=q==null?void 0:q.find(J=>(J==null?void 0:J.label)===(y==null?void 0:y.label));j?r[j.key]=y.value:y!=null&&y.children&&y.children.length>0&&(r.children=y.children)}),a.value=!1,l("fixChange",{contents:p.cloneDeep(r),id:s.value,type:"fix"});else{let y=p.cloneDeep(d.value)+1;c.setTableIndex(y),r.id="idChild"+d.value,(u=m.value)==null||u.forEach(j=>{const J=q==null?void 0:q.find(U=>(U==null?void 0:U.label)===(j==null?void 0:j.label));J?r[J.key]=j.value:j!=null&&j.children&&j.children.length>0&&(r.children=j.children)}),a.value=!1,l("fixChange",{contents:p.cloneDeep(r),id:s.value,type:"add"})}b.value="",m.value=[],h.value=[]},f=()=>{a.value=!1,b.value="",s.value="",m.value=[],h.value=[]},k=r=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",r),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},C=r=>{l("deleteChange",r)};return(r,i)=>{const u=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Rl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(y,j)=>(e.openBlock(),e.createElementBlock("div",Wl,[e.createElementVNode("div",zl,[e.createElementVNode("div",Ml,e.toDisplayString(y.label),1),e.createElementVNode("div",Gl,[e.createVNode(u,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>B(y)},null,8,["onClick"]),e.createVNode(u,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>D(y)},null,8,["onClick"]),e.createVNode(u,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:J=>k(y)},null,8,["onClick"])])]),y!=null&&y.children&&y.children.length>0?(e.openBlock(),e.createElementBlock("div",ql,[e.createVNode(Pl,{tableChildContents:y==null?void 0:y.children,onDeleteChange:C,onFixChange:E},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(X.ssDialog,{visible:a.value,onBeforeDestroy:f,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Hl,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:v},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:f,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:T},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},tl=se._export_sfc(Zl,[["__scopeId","data-v-cc311a5f"]]),Kl={class:"table-operate-content"},Ql={class:"table-operate-item"},Xl={class:"operate-title"},Yl={class:"operate-content"},en={class:"fix-content"},ln={class:"fix-content-label"},nn={class:"fix-button"},on={key:0},an={class:"operate-title"},tn={class:"operate-content"},sn={class:"fix-content"},rn={class:"fix-content-label"},cn={class:"fix-button"},un={class:"operate-title"},pn={class:"operate-content"},dn={class:"fix-content"},fn={class:"fix-content-label"},hn={class:"fix-button"},mn={class:"operate-title"},yn={class:"operate-content"},vn={class:"fix-content"},kn={class:"fix-content-label"},gn={class:"fix-button"},bn={class:"operate-content"},Cn={style:{display:"flex","justify-content":"space-between"}},Dn={class:"form-content"},xn={class:"form-content"},En={class:"form-content"},_n={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,l=t,a=e.ref([]),s=e.ref(!1),c=e.ref([]),d=e.ref(!1),b=e.ref([]),m=e.ref(!1),h=e.ref([]),E=e.ref(""),D=e.ref(""),B=e.ref([]),v=e.ref([]),T=e.ref([]),f=e.ref([]),k=e.ref(!1),C=e.ref([]),r=e.ref([]),i=e.ref(0),u=e.ref([]),y=()=>{k.value=!0;let N=[];he==null||he.forEach(x=>{i.value++,N.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:(x==null?void 0:x.key)==="background"?"var(--ssComponent-primary-color)":"",id:i.value,contents:x==null?void 0:x.options})}),C.value=N,r.value=N},j=()=>{},J=N=>{},U=N=>{},V=N=>{k.value=!0;let x=[];he==null||he.forEach($=>{i.value++,x.push({label:$==null?void 0:$.label,name:$==null?void 0:$.label,type:$.type,value:N[$.key],id:i.value,contents:$==null?void 0:$.options})}),E.value=N==null?void 0:N.id,C.value=x,r.value=x};e.watch(()=>m.value,()=>{var x,$;let N=p.cloneDeep(n.originalItemContents);(x=p.cloneDeep(n.originalItemContents))!=null&&x.find(I=>(I==null?void 0:I.key)==="page")?N=($=p.cloneDeep(n.originalItemContents))==null?void 0:$.map(I=>((I==null?void 0:I.key)==="page"&&(I.contents=m.value),I)):N.push({key:"page",contents:m.value}),l("change",N)},{deep:!0});const O=N=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,$;v.value=(x=p.cloneDeep(v.value))==null?void 0:x.filter(I=>(I==null?void 0:I.id)!==(N==null?void 0:N.id)),l("change",($=p.cloneDeep(n.originalItemContents))==null?void 0:$.map(I=>((I==null?void 0:I.key)==="extraButton"&&(I.contents=v.value),I))),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=()=>{var $,I,Z,M,pe;C.value=r.value;let N={};if(E.value!==""?N.id=E.value:(i.value++,N.id="id"+i.value),($=C.value)==null||$.forEach(R=>{const z=he==null?void 0:he.find(ne=>(ne==null?void 0:ne.label)===(R==null?void 0:R.label));z?N[z.key]=R.value:R!=null&&R.children&&R.children.length>0&&(N.children=R.children)}),(I=v.value)!=null&&I.find(R=>R.id===N.id))v.value=(Z=v.value)==null?void 0:Z.map(R=>(R.id===N.id&&(R=N),R));else{let R=p.cloneDeep(v.value);R.push(N),v.value=R}k.value=!1,E.value="";let x=p.cloneDeep(n.originalItemContents);(M=p.cloneDeep(n.originalItemContents))!=null&&M.find(R=>(R==null?void 0:R.key)==="extraButton")?x=(pe=p.cloneDeep(n.originalItemContents))==null?void 0:pe.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=v.value),R)):x.push({key:"extraButton",contents:v.value}),l("change",x)},g=N=>{let x=p.cloneDeep(r.value);x=x==null?void 0:x.map($=>($.children||($.value=N==null?void 0:N[$.name]),$)),r.value=x},F=()=>{k.value=!1,C.value=[],E.value=""},_=N=>{d.value=!0;let x=[];me==null||me.forEach($=>{i.value++,x.push({label:$==null?void 0:$.label,name:$==null?void 0:$.label,type:$.type,value:N[$.key],id:i.value,contents:$==null?void 0:$.options})}),E.value=N==null?void 0:N.id,T.value=x,f.value=x},S=N=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,$;B.value=(x=p.cloneDeep(B.value))==null?void 0:x.filter(I=>(I==null?void 0:I.id)!==(N==null?void 0:N.id)),l("change",($=p.cloneDeep(n.originalItemContents))==null?void 0:$.map(I=>((I==null?void 0:I.key)==="rowButton"&&(I.contents=B.value),I))),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},w=()=>{s.value=!0;let N=[];q==null||q.forEach(x=>{i.value++,N.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:i.value,contents:x==null?void 0:x.options})}),b.value=N,h.value=N},W=()=>{d.value=!0;let N=[];me==null||me.forEach(x=>{i.value++,N.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:"",id:i.value,contents:x==null?void 0:x.options})}),T.value=N,f.value=N},P=N=>{let x=p.cloneDeep(f.value);x=x==null?void 0:x.map($=>($.children||($.value=N==null?void 0:N[$.name]),$)),f.value=x},G=()=>{var $,I,Z,M,pe;T.value=f.value;let N={};if(E.value!==""?N.id=E.value:(i.value++,N.id="id"+i.value),($=T.value)==null||$.forEach(R=>{const z=me==null?void 0:me.find(ne=>(ne==null?void 0:ne.label)===(R==null?void 0:R.label));z?N[z.key]=R.value:R!=null&&R.children&&R.children.length>0&&(N.children=R.children)}),(I=B.value)!=null&&I.find(R=>R.id===N.id))B.value=(Z=B.value)==null?void 0:Z.map(R=>(R.id===N.id&&(R=N),R));else{let R=p.cloneDeep(B.value);R.push(N),B.value=R}d.value=!1,E.value="";let x=p.cloneDeep(n.originalItemContents);(M=p.cloneDeep(n.originalItemContents))!=null&&M.find(R=>(R==null?void 0:R.key)==="rowButton")?x=(pe=p.cloneDeep(n.originalItemContents))==null?void 0:pe.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=B.value),R)):x.push({key:"rowButton",contents:B.value}),l("change",x)},H=()=>{d.value=!1,E.value="",f.value=[],T.value=[]},ee=N=>{s.value=!0;let x=[];q==null||q.forEach($=>{i.value++,x.push({label:$==null?void 0:$.label,name:$==null?void 0:$.label,type:$.type,value:"",id:i.value,contents:$==null?void 0:$.options})}),b.value=x,D.value=N==null?void 0:N.id,h.value=x},oe=N=>{var x;c.value=el(p.cloneDeep(c.value),N==null?void 0:N.id),l("change",(x=p.cloneDeep(n.originalItemContents))==null?void 0:x.map($=>{var I;return($==null?void 0:$.key)==="header"&&($.contents=(I=c.value)!=null&&I.some(Z=>Z==null?void 0:Z.children)?[c.value]:c.value),$}))},ae=N=>{var $,I,Z;N.type==="fix"?N.id!==""?c.value=nl(c.value,N):c.value=ll(c.value,N==null?void 0:N.contents):c.value=ol(c.value,N),c.value=($=c.value)!=null&&$.some(M=>M==null?void 0:M.children)?[c.value]:c.value,E.value="";let x=p.cloneDeep(n.originalItemContents);(I=p.cloneDeep(n.originalItemContents))!=null&&I.find(M=>(M==null?void 0:M.key)==="header")?x=(Z=p.cloneDeep(n.originalItemContents))==null?void 0:Z.map(M=>((M==null?void 0:M.key)==="header"&&(M.contents=c.value),M)):x.push({key:"header",contents:c.value}),l("change",x)},ie=N=>{var $;s.value=!0;let x=[];q==null||q.forEach(I=>{i.value++,x.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:N[I.key],id:i.value,contents:I==null?void 0:I.options})}),N!=null&&N.children&&(($=N==null?void 0:N.children)==null?void 0:$.length)>0&&x.push({children:N==null?void 0:N.children,isFormColHidden:!0}),E.value=N==null?void 0:N.id,D.value="",b.value=x,h.value=x},Y=N=>{let x=p.cloneDeep(h.value);x=x==null?void 0:x.map($=>($.children||($.value=N==null?void 0:N[$.name]),$)),h.value=x},re=()=>{s.value=!1,E.value="",D.value="",h.value=[]},te=()=>{var $,I,Z,M,pe,R;b.value=h.value;let N={};if(E.value!==""?N.id=E.value:(i.value++,N.id="id"+i.value),($=b.value)==null||$.forEach(z=>{const ne=q==null?void 0:q.find(ke=>(ke==null?void 0:ke.label)===(z==null?void 0:z.label));ne?N[ne.key]=z.value:z!=null&&z.children&&z.children.length>0&&(N.children=z.children)}),(I=c.value)!=null&&I.find(z=>z.id===N.id))c.value=(Z=c.value)==null?void 0:Z.map(z=>(z.id===N.id&&(z=N),z));else{let z=p.cloneDeep(c.value)??[];D.value===""?z.push(N):z=z==null?void 0:z.map(ne=>(ne.id===D.value&&(ne.children||(ne.children=[]),ne.children.push(N)),ne)),c.value=z}c.value=(M=c.value)!=null&&M.some(z=>z==null?void 0:z.children)?[c.value]:c.value,s.value=!1,E.value="",D.value="";let x=p.cloneDeep(n.originalItemContents);(pe=p.cloneDeep(n.originalItemContents))!=null&&pe.find(z=>(z==null?void 0:z.key)==="header")?x=(R=p.cloneDeep(n.originalItemContents))==null?void 0:R.map(z=>((z==null?void 0:z.key)==="header"&&(z.contents=c.value),z)):x.push({key:"header",contents:c.value}),l("change",x)},le=N=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var x,$;c.value=(x=p.cloneDeep(c.value))==null?void 0:x.filter(I=>(I==null?void 0:I.id)!==(N==null?void 0:N.id)),l("change",($=p.cloneDeep(n.originalItemContents))==null?void 0:$.map(I=>{var Z;return(I==null?void 0:I.key)==="header"&&(I.contents=(Z=c.value)!=null&&Z.some(M=>M==null?void 0:M.children)?[c.value]:c.value),I})),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var N,x,$,I,Z,M,pe,R,z,ne,ke,Ue,Je,Pe,Re;!n.originalItemContents||n.originalItemContents.length===0||(a.value=p.cloneDeep(n.originalItemContents),c.value=(x=(N=a.value)==null?void 0:N.find(L=>(L==null?void 0:L.key)==="header"))==null?void 0:x.contents,B.value=(I=($=a.value)==null?void 0:$.find(L=>(L==null?void 0:L.key)==="rowButton"))==null?void 0:I.contents,v.value=(M=(Z=a.value)==null?void 0:Z.find(L=>(L==null?void 0:L.key)==="extraButton"))==null?void 0:M.contents,m.value=(R=(pe=a.value)==null?void 0:pe.find(L=>(L==null?void 0:L.key)==="page"))!=null&&R.contents?!!((ne=(z=a.value)==null?void 0:z.find(L=>(L==null?void 0:L.key)==="page"))!=null&&ne.contents):!1,c.value=(ke=c.value)==null?void 0:ke.map((L,be)=>(Array.isArray(L)?L=wl(L):L={label:(L==null?void 0:L.label)??"",prop:(L==null?void 0:L.label)==="操作"?"operate":L==null?void 0:L.prop,width:L!=null&&L.width?parseInt(L.width):"",fixed:(L==null?void 0:L.fixed)??void 0,sortable:(L==null?void 0:L.sortable)??!1,align:(L==null?void 0:L.align)??"center",showOverflowTooltip:(L==null?void 0:L.showOverflowTooltip)??!0,isNotDrag:(L==null?void 0:L.isNotDrag)??!1,isEditCol:(L==null?void 0:L.isEditCol)??!1,isOperate:(L==null?void 0:L.isOperate)??!1,id:(L==null?void 0:L.id)??be},L)),c.value=(Ue=c.value)!=null&&Ue.every(L=>Array.isArray(L))?(Je=c.value)==null?void 0:Je[0]:c.value,B.value=(Pe=B.value)==null?void 0:Pe.map((L,be)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",textColor:(L==null?void 0:L.textColor)??"#000000",id:(L==null?void 0:L.id)??be}),v.value=(Re=v.value)==null?void 0:Re.map((L,be)=>L={label:(L==null?void 0:L.label)??"",type:(L==null?void 0:L.type)??"",background:(L==null?void 0:L.background)??"var(--ssComponent-primary-color)",id:(L==null?void 0:L.id)??be}))},{deep:!0,immediate:!0}),(N,x)=>{const $=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Kl,[e.createElementVNode("div",Ql,[e.createElementVNode("div",Xl,[x[2]||(x[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:w},[e.createVNode($,{name:"Plus",class:"icon-size"}),x[1]||(x[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Yl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(I,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z},[e.createElementVNode("div",en,[e.createElementVNode("div",ln,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",nn,[e.createVNode($,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>ee(I)},null,8,["onClick"]),e.createVNode($,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>ie(I)},null,8,["onClick"]),e.createVNode($,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>le(I)},null,8,["onClick"])])]),I!=null&&I.children&&I.children.length>0?(e.openBlock(),e.createElementBlock("div",on,[e.createVNode(tl,{tableChildContents:I==null?void 0:I.children,onDeleteChange:oe,onFixChange:ae},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",an,[x[4]||(x[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:W},[e.createVNode($,{name:"Plus",class:"icon-size"}),x[3]||(x[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",tn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(I,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z},[e.createElementVNode("div",sn,[e.createElementVNode("div",rn,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",cn,[e.createVNode($,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:M=>_(I)},null,8,["onClick"]),e.createVNode($,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>S(I)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",un,[x[6]||(x[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:y},[e.createVNode($,{name:"Plus",class:"icon-size"}),x[5]||(x[5]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(I,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z},[e.createElementVNode("div",dn,[e.createElementVNode("div",fn,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",hn,[e.createVNode($,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:M=>V(I)},null,8,["onClick"]),e.createVNode($,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>O(I)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",mn,[x[8]||(x[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:j},[e.createVNode($,{name:"Plus",class:"icon-size"}),x[7]||(x[7]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",yn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(I,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z},[e.createElementVNode("div",vn,[e.createElementVNode("div",kn,e.toDisplayString(I==null?void 0:I.label),1),e.createElementVNode("div",gn,[e.createVNode($,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:M=>J()},null,8,["onClick"]),e.createVNode($,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:M=>U()},null,8,["onClick"])])])]))),128))]),x[10]||(x[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",bn,[e.createElementVNode("div",Cn,[x[9]||(x[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(X._sfc_main$1,{modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=I=>m.value=I)},null,8,["modelValue"])])])]),e.createVNode(X.ssDialog,{visible:s.value,onBeforeDestroy:re,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Dn,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!0,onChange:Y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:re,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:te},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(X.ssDialog,{visible:d.value,onBeforeDestroy:H,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",xn,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:T.value,key:T.value,isEnableWrap:!0,onChange:P},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:H,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:G},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(X.ssDialog,{visible:k.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",En,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:C.value,key:C.value,isEnableWrap:!0,onChange:g},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:F,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:A},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Nn=se._export_sfc(_n,[["__scopeId","data-v-54f95875"]]),$n={class:"form-operate-content"},Vn={class:"form-operate-item"},Bn={class:"operate-title"},wn={class:"operate-content"},An={class:"fix-content"},Tn={class:"fix-button"},In={class:"operate-title"},On={class:"operate-content"},Sn={class:"fix-content"},Fn={class:"fix-button"},Ln={style:{display:"flex","justify-content":"space-between"}},jn={class:"form-content"},Un={class:"form-content"},Jn={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,l=t,a=e.ref(!1),s=e.ref([]),c=e.ref([]),d=e.ref(!1),b=e.ref([]),m=e.ref([]),h=e.ref(""),E=e.ref(!1),D=e.ref(0),B=e.ref([]),v=e.ref([]),T=V=>{var A,g;a.value=!0;let O=[];(g=(A=ue==null?void 0:ue.find(F=>(F==null?void 0:F.key)===((V==null?void 0:V.type)===""?"Input":V==null?void 0:V.type)))==null?void 0:A.value)==null||g.forEach(F=>{D.value++,O.push({label:F==null?void 0:F.label,name:F==null?void 0:F.label,type:F.type,value:(F==null?void 0:F.label)==="类型"&&V[F.key]===""?"Input":V[F.key],id:D.value,contents:F==null?void 0:F.options})}),h.value=V==null?void 0:V.id,s.value=O,c.value=O},f=V=>{d.value=!0;let O=[];fe==null||fe.forEach(A=>{D.value++,O.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:(A==null?void 0:A.label)==="类型"&&V[A.key]===""?"normal":V[A.key],id:D.value,contents:A==null?void 0:A.options})}),B.value=O,v.value=O,h.value=V==null?void 0:V.id};e.watch(()=>E.value,()=>{var O,A;let V=p.cloneDeep(n.originalItemContents);(O=p.cloneDeep(n.originalItemContents))!=null&&O.find(g=>(g==null?void 0:g.key)==="enableWrap")?V=(A=p.cloneDeep(n.originalItemContents))==null?void 0:A.map(g=>((g==null?void 0:g.key)==="enableWrap"&&(g.contents=!E.value),g)):V.push({key:"enableWrap",contents:!E.value}),l("change",V)},{deep:!0});const k=()=>{var A,g,F,_,S;B.value=v.value;let V={};if(h.value!==""?V.id=h.value:(D.value++,V.id="id"+D.value),(A=B.value)==null||A.forEach(w=>{const W=fe==null?void 0:fe.find(P=>(P==null?void 0:P.label)===(w==null?void 0:w.label));W&&(V[W.key]=w.value)}),(g=b.value)!=null&&g.find(w=>w.id===V.id))b.value=(F=b.value)==null?void 0:F.map(w=>(w.id===V.id&&(w=V),w));else{let w=p.cloneDeep(b.value);b.value||(b.value=[]),w.push(V),b.value=w}d.value=!1,h.value="";let O=p.cloneDeep(n.originalItemContents);(_=p.cloneDeep(n.originalItemContents))!=null&&_.find(w=>(w==null?void 0:w.key)==="formButton")?O=(S=p.cloneDeep(n.originalItemContents))==null?void 0:S.map(w=>((w==null?void 0:w.key)==="formButton"&&(w.contents=b.value),w)):O.push({key:"formButton",contents:b.value}),l("change",O)},C=V=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var O,A;m.value=(O=p.cloneDeep(m.value))==null?void 0:O.filter(g=>(g==null?void 0:g.id)!==(V==null?void 0:V.id)),l("change",(A=p.cloneDeep(n.originalItemContents))==null?void 0:A.map(g=>((g==null?void 0:g.key)==="formContent"&&(g.contents=m.value),g))),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},r=V=>{ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var O,A;b.value=(O=p.cloneDeep(b.value))==null?void 0:O.filter(g=>(g==null?void 0:g.id)!==(V==null?void 0:V.id)),l("change",(A=p.cloneDeep(n.originalItemContents))==null?void 0:A.map(g=>((g==null?void 0:g.key)==="formButton"&&(g.contents=b.value),g))),de.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},i=()=>{d.value=!0;let V=[];fe==null||fe.forEach(O=>{D.value++,V.push({label:O==null?void 0:O.label,name:O==null?void 0:O.label,type:O.type,value:(O==null?void 0:O.label)==="类型"?"normal":"",id:D.value,contents:O==null?void 0:O.options})}),B.value=V,v.value=V},u=()=>{var O,A;a.value=!0;let V=[];(A=(O=ue==null?void 0:ue.find(g=>(g==null?void 0:g.key)==="Input"))==null?void 0:O.value)==null||A.forEach(g=>{D.value++,V.push({label:g==null?void 0:g.label,name:g==null?void 0:g.label,type:g.type,value:(g==null?void 0:g.label)==="类型"?"Input":"",id:D.value,contents:g==null?void 0:g.options})}),s.value=V,c.value=V},y=V=>{let O=p.cloneDeep(v.value);O=O==null?void 0:O.map(A=>(A.value=V==null?void 0:V[A.name],A)),v.value=O},j=V=>{var O,A,g,F;if((V==null?void 0:V.类型)!==((A=(O=c.value)==null?void 0:O.find(_=>(_==null?void 0:_.label)==="类型"))==null?void 0:A.value)){let _=[];(F=(g=ue==null?void 0:ue.find(S=>(S==null?void 0:S.key)===((V==null?void 0:V.类型)===""?"Input":V==null?void 0:V.类型)))==null?void 0:g.value)==null||F.forEach(S=>{D.value++,_.push({label:S==null?void 0:S.label,name:S==null?void 0:S.label,type:S.type,value:(V==null?void 0:V[S.label])??"",id:D.value,contents:S==null?void 0:S.options})}),c.value=_,s.value=_}else{let _=p.cloneDeep(c.value);_=_==null?void 0:_.map(S=>(S.value=V==null?void 0:V[S.name],S)),c.value=_}},J=()=>{var g,F,_,S,w,W;s.value=c.value;let V={};h.value!==""?V.id=h.value:(D.value++,V.id="id"+D.value);let O=(g=ue==null?void 0:ue.find(P=>{var G,H;return(P==null?void 0:P.key)===(((H=(G=s.value)==null?void 0:G.find(ee=>(ee==null?void 0:ee.label)==="类型"))==null?void 0:H.value)??"label")}))==null?void 0:g.value;if((F=s.value)==null||F.forEach(P=>{const G=O==null?void 0:O.find(H=>(H==null?void 0:H.label)===(P==null?void 0:P.label));G&&(V[G.key]=P.value)}),V.width=1,(_=m.value)!=null&&_.find(P=>P.id===V.id))m.value=(S=m.value)==null?void 0:S.map(P=>(P.id===V.id&&(P=V),P));else{let P=p.cloneDeep(m.value);P.push(V),m.value=P}a.value=!1,h.value="";let A=p.cloneDeep(n.originalItemContents);(w=p.cloneDeep(n.originalItemContents))!=null&&w.find(P=>(P==null?void 0:P.key)==="formContent")?A=(W=p.cloneDeep(n.originalItemContents))==null?void 0:W.map(P=>((P==null?void 0:P.key)==="formContent"&&(P.contents=m.value),P)):A.push({key:"formContent",contents:m.value}),l("change",A)},U=()=>{a.value=!1,d.value=!1,h.value="",c.value=[],v.value=[]};return e.watch(()=>n.originalItemContents,()=>{var O,A,g,F,_,S;if(!n.originalItemContents||n.originalItemContents.length===0)return;const V=p.cloneDeep(n.originalItemContents);m.value=((O=V==null?void 0:V.find(w=>(w==null?void 0:w.key)==="formContent"))==null?void 0:O.contents)??[],b.value=((A=V==null?void 0:V.find(w=>(w==null?void 0:w.key)==="formButton"))==null?void 0:A.contents)??[],E.value=(g=V==null?void 0:V.find(w=>(w==null?void 0:w.key)==="enableWrap"))!=null&&g.contents?!((F=V==null?void 0:V.find(w=>(w==null?void 0:w.key)==="enableWrap"))!=null&&F.contents):!0,m.value=(_=p.cloneDeep(m.value))==null?void 0:_.map((w,W)=>w={label:(w==null?void 0:w.key)??(w==null?void 0:w.label)??"",type:(w==null?void 0:w.type)??"",contents:(w==null?void 0:w.options)??"",id:(w==null?void 0:w.id)??W,value:(w==null?void 0:w.value)??""}),b.value=(S=b.value)==null?void 0:S.map((w,W)=>w={label:(w==null?void 0:w.label)??"",type:(w==null?void 0:w.type)??"",background:(w==null?void 0:w.background)??"var(--ssComponent-primary-color)",id:(w==null?void 0:w.id)??W})},{deep:!0,immediate:!0}),(V,O)=>{const A=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",$n,[e.createElementVNode("div",Vn,[e.createElementVNode("div",Bn,[O[2]||(O[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:u},[e.createVNode(A,{name:"Plus",class:"icon-size"}),O[1]||(O[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",wn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(g,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",An,[e.createElementVNode("div",null,e.toDisplayString(g.label),1),e.createElementVNode("div",Tn,[e.createVNode(A,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_=>T(g)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_=>C(g)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",In,[O[4]||(O[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:i},[e.createVNode(A,{name:"Plus",class:"icon-size"}),O[3]||(O[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",On,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(g,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Sn,[e.createElementVNode("div",null,e.toDisplayString(g.label),1),e.createElementVNode("div",Fn,[e.createVNode(A,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_=>f(g)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:_=>r(g)},null,8,["onClick"])])])]))),128))]),O[6]||(O[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",Ln,[O[5]||(O[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(X._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":O[0]||(O[0]=g=>E.value=g)},null,8,["modelValue"])])]),e.createVNode(X.ssDialog,{visible:a.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",jn,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!0,onChange:j},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:U,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:J},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(X.ssDialog,{visible:d.value,onBeforeDestroy:U,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Un,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:B.value,key:B.value,isEnableWrap:!0,onChange:y},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:U,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:k},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Me=se._export_sfc(Jn,[["__scopeId","data-v-7904b0dd"]]),Pn={class:"step-module content"},Rn={class:"module-data"},Wn={class:"step-module layout"},zn={class:"form-content"},Mn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,l=t,a=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),s=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),c=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),d=e.reactive({visible:!1,width:"40%",title:"步骤条"}),b=e.ref("create"),m=e.ref({}),h=e.ref([]),E=f=>{var k;m.value=f,l("change",(k=v())==null?void 0:k.compData)},D=(f,k)=>{var C,r;switch(f){case"create":(C=s.value)==null||C.forEach(i=>{i.value=""}),b.value="create",d.visible=!0;break;case"update":(r=s.value)==null||r.forEach(i=>{i.value=k[i==null?void 0:i.prop]}),b.value="update",d.visible=!0;break;case"delete":h.value.splice(k,1),b.value="delete";break}},B=f=>{var k,C,r;if((f==null?void 0:f.buttonName)==="确认"){const i=p.cloneDeep(f==null?void 0:f.content);switch(Object.keys(i).forEach(u=>{i[u]===""&&delete i[u]}),b.value){case"create":h.value.push({...i,index:((k=h.value)==null?void 0:k.length)+1});break;case"update":h.value=(C=h.value)==null?void 0:C.map(u=>u.index===(i==null?void 0:i.index)?{...u,title:i==null?void 0:i.title,description:i==null?void 0:i.description}:u);break}l("change",(r=v())==null?void 0:r.compData),d.visible=!1}else d.visible=!1},v=()=>({comp:"Step",compData:[{key:"stepList",contents:h.value},{key:"stepConfig",contents:m.value}]}),T=()=>{d.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,f=>{var k,C;f&&(m.value=((k=f==null?void 0:f.find(r=>r.key==="stepConfig"))==null?void 0:k.contents)??{},h.value=((C=f==null?void 0:f.find(r=>r.key==="stepList"))==null?void 0:C.contents)??[])},{immediate:!0}),(f,k)=>{const C=e.resolveComponent("svg-icon"),r=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",Pn,[k[2]||(k[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:k[0]||(k[0]=i=>D("create"))},[e.createVNode(C,{name:"Plus",class:"icon-size"}),k[1]||(k[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",Rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(i,u)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:u},[e.createElementVNode("span",null,e.toDisplayString(i==null?void 0:i.title),1),e.createElementVNode("div",null,[e.createVNode(r,{type:"primary",size:"small",onClick:y=>D("update",{...i,index:u+1})},{default:e.withCtx(()=>k[3]||(k[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(r,{type:"danger",size:"small",onClick:y=>D("delete",u)},{default:e.withCtx(()=>k[4]||(k[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Wn,[k[5]||(k[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(X.ssForm,{rowContents:a.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(X.ssDialog,{visible:d.visible,title:d.title,onBeforeDestroy:T,width:d.width},{default:e.withCtx(()=>[e.createElementVNode("div",zn,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:s.value,key:s.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:c.value,onOnButtonClick:B},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Gn=se._export_sfc(Mn,[["__scopeId","data-v-47438605"]]),qn={class:"step-module content"},Hn={class:"module-data"},Zn={class:"step-module layout"},Kn={class:"form-content"},Qn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,l=t,a=e.ref("create"),s=e.ref({}),c=e.ref([]),d=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),b=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),m=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),h=e.reactive({visible:!1,width:"40%",title:"时间线"}),E=f=>{var k;s.value=f,console.log(1212,f),l("change",(k=v())==null?void 0:k.compData)},D=(f,k)=>{var C,r;switch(f){case"create":(C=b.value)==null||C.forEach(i=>{i.value=""}),a.value="create",h.visible=!0;break;case"update":(r=b.value)==null||r.forEach(i=>{i.value=k[i==null?void 0:i.prop]}),a.value="update",h.visible=!0;break;case"delete":c.value.splice(k,1),a.value="delete";break}},B=f=>{var k,C,r,i;if((f==null?void 0:f.buttonName)==="确认"){const u=p.cloneDeep(f==null?void 0:f.content);switch(Object.keys(u).forEach(y=>{u[y]===""&&delete u[y]}),a.value){case"create":console.log(1335,c.value,u),(C=c.value)==null||C.push({...u,index:((k=c.value)==null?void 0:k.length)+1});break;case"update":c.value=(r=c.value)==null?void 0:r.map(y=>y.index===(u==null?void 0:u.index)?{...y,content:u==null?void 0:u.content,timestamp:u==null?void 0:u.timestamp}:y);break}l("change",(i=v())==null?void 0:i.compData),h.visible=!1}else h.visible=!1},v=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:c.value},{key:"timeLineConfig",contents:s.value}]}),T=()=>{h.visible=!1};return e.watch(()=>n==null?void 0:n.itemContents,f=>{var k,C;f&&(s.value=((k=f==null?void 0:f.find(r=>r.key==="timeLineConfig"))==null?void 0:k.contents)??{},c.value=((C=f==null?void 0:f.find(r=>r.key==="timeLineList"))==null?void 0:C.contents)??[])},{immediate:!0}),(f,k)=>{const C=e.resolveComponent("svg-icon"),r=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",qn,[k[2]||(k[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:k[0]||(k[0]=i=>D("create"))},[e.createVNode(C,{name:"Plus",class:"icon-size"}),k[1]||(k[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",Hn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(i,u)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:u},[e.createElementVNode("span",null,e.toDisplayString(i==null?void 0:i.content),1),e.createElementVNode("div",null,[e.createVNode(r,{type:"primary",size:"small",onClick:y=>D("update",{...i,index:u+1})},{default:e.withCtx(()=>k[3]||(k[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(r,{type:"danger",size:"small",onClick:y=>D("delete",u)},{default:e.withCtx(()=>k[4]||(k[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",Zn,[k[5]||(k[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(X.ssForm,{rowContents:d.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(X.ssDialog,{visible:h.visible,title:h.title,onBeforeDestroy:T,width:h.width},{default:e.withCtx(()=>[e.createElementVNode("div",Kn,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:b.value,key:b.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:m.value,onOnButtonClick:B},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Xn=se._export_sfc(Qn,[["__scopeId","data-v-40aea043"]]),Yn={};function eo(o,t){return e.openBlock(),e.createElementBlock("div")}const lo=se._export_sfc(Yn,[["render",eo]]),no={class:"extra-content"},oo={key:0},ao={key:1},to={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(o,{emit:t}){const n=o,l=e.ref(0),a=e.ref(),s=e.ref(),c=t,d=e.ref(!1),b=e.ref({}),m=e.ref({}),h=e.ref();e.watch(()=>[n.itemData],()=>{var i;const r=p.cloneDeep(n.itemData);a.value=(i=p.cloneDeep(r))==null?void 0:i.map(u=>{var y;if(u.key==="extra"){let j=[];(y=u.value)==null||y.forEach(J=>{var U;j.push((U=Object.values(J))==null?void 0:U[0])}),u.value=j}return u})},{deep:!0,immediate:!0});const E=(r,i,u,y)=>{var J;let j={};((J=r==null?void 0:r[0])==null?void 0:J.contents)==="详情"&&(d.value=!0,j[i]=r,s.value=r==null?void 0:r.filter(U=>(U==null?void 0:U.key)!=="tableContentName"),b.value=j,m.value=u,h.value=y.id)},D=r=>{var U,V,O,A;const i=(V=(U=Object.values(p.cloneDeep(b.value)))==null?void 0:U[0])==null?void 0:V.filter(g=>(g==null?void 0:g.key)==="tableContentName"),u=(A=(O=Object.values(p.cloneDeep(b.value)))==null?void 0:O[0])==null?void 0:A.filter(g=>(g==null?void 0:g.key)!=="tableContentName"),y=u==null?void 0:u.map((g,F)=>{var _;return F===r.index&&(g==null?void 0:g.comp)==="Table"&&(g.compData=(_=g.compData)==null?void 0:_.map(S=>{var w,W;return(S==null?void 0:S.key)==="tableContents"&&(S.contents=(W=(w=r.content)==null?void 0:w.map(P=>{let G={};for(let H in P)H!=="id"&&(G[H]=P[H]);return G}))==null?void 0:W.map(P=>Object.values(P))),S})),g});y.unshift(i==null?void 0:i[0]);let j=p.cloneDeep(b.value),J={};for(let g in j)J[g]=y;b.value=J},B=()=>{d.value=!1,b.value={},m.value={},h.value=void 0,l.value++},v=r=>{var U,V,O,A;const i=(V=(U=Object.values(p.cloneDeep(b.value)))==null?void 0:U[0])==null?void 0:V.filter(g=>(g==null?void 0:g.key)==="tableContentName"),u=(A=(O=Object.values(p.cloneDeep(b.value)))==null?void 0:O[0])==null?void 0:A.filter(g=>(g==null?void 0:g.key)!=="tableContentName"),y=u==null?void 0:u.map((g,F)=>(F===r.index&&(g.compData=r.contents),g));y.unshift(i==null?void 0:i[0]);let j=p.cloneDeep(b.value),J={};for(let g in j)J[g]=y;b.value=J},T=()=>{var i,u;let r={};for(let y in m.value)y===((i=Object.keys(b.value))==null?void 0:i[0])?r[y]=(u=Object.values(b.value))==null?void 0:u[0]:r[y]=m.value[y];c("change",{buttonName:"编辑",index:h.value,singleContent:r},"methodData"),d.value=!1,b.value={},m.value={},h.value=void 0},f=()=>{d.value=!1,b.value={},m.value={},h.value=void 0},k=r=>{c("change",r,"methodData")},C=r=>sl(r);return(r,i)=>(e.openBlock(),e.createElementBlock("div",no,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,y)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(u==null?void 0:u.key)==="extra"?(e.openBlock(),e.createElementBlock("div",oo)):(e.openBlock(),e.createElementBlock("div",ao,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:y,index:(u==null?void 0:u.id)??y,onContentClick:E,onChange:k},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(X.ssDialog,{visible:d.value,onBeforeDestroy:f},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(u,y)=>(e.openBlock(),e.createElementBlock("div",{key:y,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(C(u.comp)),{itemData:u==null?void 0:u.compData,onChange:D,childItemData:u==null?void 0:u.itemChildData,key:y,onContentChange:v,index:(u==null?void 0:u.id)??y,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{class:"cancel-button footer-button",onClick:B},e.toDisplayString("取消")),e.createElementVNode("div",{class:"confirm-button footer-button",onClick:T},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},so=se._export_sfc(to,[["__scopeId","data-v-b0b2f71f"]]),ro={class:"method-content"},co=["onClick"],io={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(o){const t=e.ref([]),n=o,l=bl.useModelComp(ye.pinia),{itemData:a,isEdit:s}=de.storeToRefs(l),c=(m,h)=>{var D;const E=(D=h==null?void 0:h[0])==null?void 0:D.children;return m==null?void 0:m.map(B=>{var v;return B=(v=B==null?void 0:B.map((T,f)=>{var k;return{key:(k=E[f])==null?void 0:k.label,value:T}}))==null?void 0:v.filter(T=>T.key),B})};e.watch(()=>a.value,async()=>{s.value=="view"&&await b(p.cloneDeep(n.itemData))},{deep:!0});const d=async m=>{var r,i,u,y,j,J;let h={};if((r=p.cloneDeep(m.content))==null||r.forEach((U,V)=>{var O,A,g,F,_,S,w,W,P,G,H,ee,oe,ae,ie,Y,re;if((U==null?void 0:U.comp)==="Table"){let te=(F=(g=(A=(O=U==null?void 0:U.compData)==null?void 0:O.find($=>($==null?void 0:$.key)==="header"))==null?void 0:A.contents)==null?void 0:g[0])==null?void 0:F.some($=>$==null?void 0:$.children),le=(w=(S=(_=U==null?void 0:U.compData)==null?void 0:_.find($=>($==null?void 0:$.key)==="tableContents"))==null?void 0:S.contents)==null?void 0:w.map($=>$.slice(1)),N=(ee=(H=(G=(P=(W=U==null?void 0:U.compData)==null?void 0:W.find($=>($==null?void 0:$.key)==="header"))==null?void 0:P.contents)==null?void 0:G[0])==null?void 0:H[0])==null?void 0:ee.label,x=(ie=(ae=(oe=U==null?void 0:U.compData)==null?void 0:oe.find($=>($==null?void 0:$.key)==="header"))==null?void 0:ae.contents)==null?void 0:ie[0];if(te)h[N]=c(le,x);else{const $=[];x=x.slice(1,x.length-1),x==null||x.forEach((I,Z)=>{le==null||le.forEach(M=>{$.push({key:I.label+M[0],value:M[Z+1]})})}),h["form"+V]=$}}else{const te=(re=(Y=U.compData)==null?void 0:Y.find(N=>(N==null?void 0:N.key)==="formContent"))==null?void 0:re.contents;h.form={};const le=[];te==null||te.forEach(N=>{N.key!==""&&(N={key:N==null?void 0:N.key,value:N==null?void 0:N.value},le.push(N))}),h.form=le}}),m.api){const U=await ye.axios.post(m.api,{data:h,templateFileName:(i=m==null?void 0:m.extraContent)==null?void 0:i[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var E=new Blob([U.data],{type:"application/octet-stream;charset=UTF-8"}),D=U.headers["content-disposition"],B=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),v=B.exec(D),T=((j=(y=(u=m==null?void 0:m.extraContent)==null?void 0:u[0])==null?void 0:y.split("."))==null?void 0:j[0])+"."+((J=v[1].split("."))==null?void 0:J[1]),f=document.createElement("a"),k=window.URL.createObjectURL(E),C=/^["](.*)["]$/g;f.style.display="none",f.href=k,f.download=decodeURI(T.replace(C,"$1")),document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(k)}},b=async m=>{var B;const h=p.cloneDeep(m),E=h==null?void 0:h.map(async v=>{var i,u,y,j,J,U,V;const f=(i=(await ye.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:v.method}})).data.result)==null?void 0:i[0],k=await ye.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:f==null?void 0:f.id}}),C=await ce.getItemData((u=v==null?void 0:v.value)==null?void 0:u[0],sessionStorage.getItem("systemKey"),""),r=(y=k.data.result)==null?void 0:y[0];return{buttonName:(j=f==null?void 0:f.key)==null?void 0:j.methodKey,api:(U=(J=r==null?void 0:r.value)==null?void 0:J.tableData)==null?void 0:U[0],content:C==null?void 0:C.filter(O=>O.comp!=="methodButton"),extraContent:(V=p.cloneDeep(v.value))==null?void 0:V.slice(1)}}),D=await Promise.all(E);t.value=D==null?void 0:D.filter(v=>v==null?void 0:v.extraContent),(B=t.value)==null||B.forEach(v=>{var T;v.api===""&&((T=v.content)==null||T.forEach(f=>{var k;f.comp=="Table"&&l.setExtraContents(ce.methodTableToContent(f.compData,(k=v.extraContent)==null?void 0:k[0]))}))})};return e.watch(()=>n.itemData,async()=>{s.value=="view"&&await b(p.cloneDeep(n.itemData))},{immediate:!0,deep:!0}),(m,h)=>(e.openBlock(),e.createElementBlock("div",ro,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,E=>(e.openBlock(),e.createElementBlock("div",null,[E.api!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:D=>d(E),class:"method-buttons"},e.toDisplayString(E.buttonName),9,co)):e.createCommentVNode("",!0)]))),256))]))}},uo=se._export_sfc(io,[["__scopeId","data-v-9df085f9"]]),po={};function fo(o,t){return" 567 "}const ho=se._export_sfc(po,[["render",fo]]),mo={class:"module content"},yo={class:"module data"},vo={class:"module layout"},ko={class:"form-content"},go=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=t,l=e.reactive({visible:!1,width:"40%",title:"签名配置"}),a=e.ref("create"),s=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),d=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"input",value:""}]),b=e.ref({}),m=e.ref([]),h=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:m.value},{key:"signConfig",contents:b.value}]}),E=T=>{var f;b.value=p.cloneDeep(T),n("change",(f=h())==null?void 0:f.compData)},D=T=>{var f,k;if((T==null?void 0:T.buttonName)==="确认"){const C=p.cloneDeep(T==null?void 0:T.content);switch(console.log(1212,T),Object.keys(C).forEach(r=>{C[r]===""&&delete C[r]}),a.value){case"create":m.value.push({...C,index:((f=m.value)==null?void 0:f.length)+1});break;case"update":console.log(1213,m.value);break}n("change",(k=h())==null?void 0:k.compData),l.visible=!1}else l.visible=!1},B=(T,f)=>{var k,C;switch(T){case"create":(k=d.value)==null||k.forEach(r=>{r.value=""}),a.value="create",l.visible=!0;break;case"update":(C=d.value)==null||C.forEach(r=>{r.value=f[r==null?void 0:r.prop]}),console.log(345,f),a.value="update",l.visible=!0;break;case"delete":m.value.splice(f,1),a.value="delete";break}},v=()=>{l.visible=!1};return(T,f)=>{const k=e.resolveComponent("svg-icon"),C=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",mo,[f[2]||(f[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createElementVNode("div",{class:"module-icon",onClick:f[0]||(f[0]=r=>B("create"))},[e.createElementVNode("div",null,[e.createVNode(k,{name:"Plus",class:"icon-size"}),f[1]||(f[1]=e.createElementVNode("span",null,"新增",-1))])])]),e.createElementVNode("div",yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(r,i)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:i},[e.createElementVNode("span",null,e.toDisplayString(r==null?void 0:r.label),1),e.createElementVNode("div",null,[e.createVNode(C,{type:"primary",size:"small",onClick:u=>B("update",{...r,index:i+1})},{default:e.withCtx(()=>f[3]||(f[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(C,{type:"danger",size:"small",onClick:u=>B("delete",i)},{default:e.withCtx(()=>f[4]||(f[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",vo,[e.createVNode(X.ssForm,{rowContents:c.value,onChange:E},null,8,["rowContents"])])]),e.createVNode(X.ssDialog,{visible:l.visible,title:l.title,onBeforeDestroy:v,width:l.width},{default:e.withCtx(()=>[e.createElementVNode("div",ko,[(e.openBlock(),e.createBlock(X.ssForm,{rowContents:d.value,key:d.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:s.value,onOnButtonClick:D},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),bo=se._export_sfc(go,[["__scopeId","data-v-01849996"]]),Co=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(o,{emit:t}){const n=o,l=t,a=e.ref(1),s=e.computed(()=>{var E,D;return(E=n==null?void 0:n.stepConfig)!=null&&E.allowTrigger?a.value:(D=n==null?void 0:n.stepConfig)==null?void 0:D.active}),c=(E,D)=>{a.value=D,l("clickStep",E,D)},d=E=>X.getComponent(E),b=()=>{var D;const E=(D=n==null?void 0:n.stepList)==null?void 0:D.find((B,v)=>v+1===s.value);return console.log("findStep",E),E?E==null?void 0:E.children:[]},m=E=>{l("clickTrigger",E)},h=E=>{l("changeTrigger",E)};return(E,D)=>{var T,f,k,C,r;const B=e.resolveComponent("el-step"),v=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(v,{direction:(T=o.stepConfig)==null?void 0:T.direction,active:s.value,"finish-status":"success",simple:(f=o.stepConfig)==null?void 0:f.simple,"align-center":(k=o.stepConfig)==null?void 0:k.alignCenter},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.stepList,(i,u)=>(e.openBlock(),e.createBlock(B,{key:u,class:"step-item",onClick:y=>c(i,u+1)},{title:e.withCtx(()=>[e.renderSlot(E.$slots,"title",{title:i==null?void 0:i.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(E.$slots,"description",{description:i==null?void 0:i.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(C=o.stepConfig)!=null&&C.allowTrigger&&((r=o.stepConfig)!=null&&r.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(b(),(i,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d(i==null?void 0:i.type)),{modelValue:i.value,"onUpdate:modelValue":y=>i.value=y,onClickTrigger:m,onChangeTrigger:h,content:i==null?void 0:i.content},e.createSlots({_:2},[e.renderList(E.$slots,(y,j)=>({name:j,fn:e.withCtx(J=>[e.renderSlot(E.$slots,j,e.mergeProps({ref_for:!0},J||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Do=se._export_sfc(Co,[["__scopeId","data-v-003d9390"]]),xo=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(o,{emit:t}){const n=o,l=t,a=e.ref({}),s=e.ref([]),c=(d,b)=>{l("clickStep",d,b)};return e.watch(()=>n==null?void 0:n.itemData,d=>{var b,m;s.value=(b=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="stepList"))==null?void 0:b.contents,a.value=(m=d==null?void 0:d.find(h=>(h==null?void 0:h.key)==="stepConfig"))==null?void 0:m.contents},{immediate:!0}),(d,b)=>{const m=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Do,{stepConfig:a.value,stepList:s.value,onClickStep:c},{icon:e.withCtx(()=>[e.createVNode(m,{name:"import"})]),title:e.withCtx(({title:h})=>[e.createTextVNode(e.toDisplayString(h),1)]),description:e.withCtx(({description:h})=>[e.createTextVNode(e.toDisplayString(h),1)]),_:1},8,["stepConfig","stepList"])}}}),Eo=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(o){return(t,n)=>{const l=e.resolveComponent("el-timeline-item"),a=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(a,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.activities,(s,c)=>(e.openBlock(),e.createBlock(l,{key:c,timestamp:s.timestamp,placement:o.timeLineConfig.placement,center:o.timeLineConfig.isCenter,"hide-timestamp":!0,type:o.timeLineConfig.type,color:o.timeLineConfig.color,size:o.timeLineConfig.size,icon:o.timeLineConfig.icon,hollow:o.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"content",{content:s==null?void 0:s.content,timestamp:s==null?void 0:s.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),_o=se._export_sfc(Eo,[["__scopeId","data-v-4172a886"]]),No={class:"line-content"},$o={class:"line-time"},Vo=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(o){const t=o,n=e.ref({}),l=e.ref([]);return e.watch(()=>t==null?void 0:t.itemData,a=>{var s,c;l.value=(s=a==null?void 0:a.find(d=>(d==null?void 0:d.key)==="timeLineList"))==null?void 0:s.contents,n.value=(c=a==null?void 0:a.find(d=>(d==null?void 0:d.key)==="timeLineConfig"))==null?void 0:c.contents},{immediate:!0}),(a,s)=>(e.openBlock(),e.createBlock(_o,{activities:l.value,timeLineConfig:n.value},{content:e.withCtx(({content:c,timestamp:d})=>[e.createElementVNode("span",No,e.toDisplayString(c),1),e.createElementVNode("span",$o,e.toDisplayString(d),1)]),_:1},8,["activities","timeLineConfig"]))}}),Bo=se._export_sfc(Vo,[["__scopeId","data-v-b4d9deed"]]),wo={class:"tabs-content"},Ao={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(o){const t=o,n=e.ref([]);return e.watch(()=>t==null?void 0:t.itemData,l=>{const a=l.find(s=>(s==null?void 0:s.key)=="stepList");a&&(n.value=a.contents.map(s=>({value:s.value||s.title,label:s.label||s.title,children:s.children||[]})))},{immediate:!0,deep:!0}),(l,a)=>(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(X.ssTab,{tabsContents:n.value},null,8,["tabsContents"])]))}},To=se._export_sfc(Ao,[["__scopeId","data-v-d3bb10b7"]]),Io={class:"tabs-header"},Oo={class:"tabs-list"},So={class:"tab-name"},Fo={class:"tab-actions"},Lo={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:t}){const n=o,l=t,a=e.ref([]),s=e.ref(!1),c=e.ref(""),d=e.ref({title:""}),b=e.ref(-1),m=()=>{c.value="新增标签页",d.value.title="",b.value=-1,s.value=!0},h=v=>{c.value="修改标签页",d.value.title=a.value[v].title,b.value=v,s.value=!0},E=v=>{a.value.splice(v,1),B()},D=()=>{d.value.title.trim()&&(b.value===-1?a.value.push({title:d.value.title,value:d.value.title,label:d.value.title,children:[]}):(a.value[b.value].title=d.value.title,a.value[b.value].value=d.value.title,a.value[b.value].label=d.value.title),s.value=!1,B())},B=()=>{const v=[{key:"stepList",contents:a.value}];l("change",v)};return e.watch(()=>n.itemContents,v=>{if(v&&v.length>0){const T=v.find(f=>f.key==="stepList");T&&T.contents&&(a.value=T.contents.map(f=>({title:f.title||"",value:f.value||f.title||"",label:f.label||f.title||"",children:f.children||[]})))}},{immediate:!0}),(v,T)=>{const f=e.resolveComponent("svg-icon"),k=e.resolveComponent("el-button"),C=e.resolveComponent("el-input"),r=e.resolveComponent("el-form-item"),i=e.resolveComponent("el-form"),u=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Io,[T[4]||(T[4]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createVNode(k,{type:"primary",size:"small",onClick:m},{default:e.withCtx(()=>[e.createVNode(f,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),T[3]||(T[3]=e.createTextVNode(" 新增标签页 "))]),_:1,__:[3]})]),e.createElementVNode("div",Oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(y,j)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:j},[e.createElementVNode("span",So,e.toDisplayString(y.title),1),e.createElementVNode("div",Fo,[e.createVNode(k,{type:"primary",size:"small",onClick:J=>h(j)},{default:e.withCtx(()=>T[5]||(T[5]=[e.createTextVNode("修改")])),_:2,__:[5]},1032,["onClick"]),e.createVNode(k,{type:"danger",size:"small",onClick:J=>E(j)},{default:e.withCtx(()=>T[6]||(T[6]=[e.createTextVNode("删除")])),_:2,__:[6]},1032,["onClick"])])]))),128))]),e.createVNode(u,{modelValue:s.value,"onUpdate:modelValue":T[2]||(T[2]=y=>s.value=y),title:c.value},{footer:e.withCtx(()=>[e.createVNode(k,{onClick:T[1]||(T[1]=y=>s.value=!1)},{default:e.withCtx(()=>T[7]||(T[7]=[e.createTextVNode("取消")])),_:1,__:[7]}),e.createVNode(k,{type:"primary",onClick:D},{default:e.withCtx(()=>T[8]||(T[8]=[e.createTextVNode("确定")])),_:1,__:[8]})]),default:e.withCtx(()=>[e.createVNode(i,{model:d.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(r,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(C,{modelValue:d.value.title,"onUpdate:modelValue":T[0]||(T[0]=y=>d.value.title=y),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}},jo=se._export_sfc(Lo,[["__scopeId","data-v-a26b1c22"]]),Uo=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"}]),Jo={TABLE:ce.ssTable,FORM:ze,TABLEOPERATE:Nn,FORMOPERATE:Me,FOLD:lo,CALCULATOR:so,METHODBUTTON:uo,AVATARUPLOAD:We.ssAvatar,SIGNATURE:We.ssSignature,FORMTOP:ze,STEP:xo,STEPOPERATE:Gn,TIMELINE:Bo,TIMELINEOPERATE:Xn,FORMTOPOPERATE:Me,SIGNATUREOPERATE:bo,AVATARUPLOADOPERATE:ho,TABS:To,TABSOPERATE:jo};function sl(o){return Jo[o==null?void 0:o.toUpperCase()]||null}const Q=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],K=[{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"}],ge=e.ref(0),Po=o=>{const[t,n]=o.split(/=(.+)/),l=t.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},Ne=o=>{try{return JSON.parse(o),!0}catch{return!1}},Ro=o=>o.includes("$")&&o.trim().endsWith("(")?o+")":o,Wo=o=>{let t=o;const n=[];let l="";for(const a of t)a.includes("{")||l.includes("{")||a.includes("[")||l.includes("[")||a.includes("【")||l.includes("【")||a.includes("(")||l.includes("(")||a.includes("(")||l.includes("(")||a.includes("/*")||l.includes("/*")?(l+=a.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l),l="")):n.push(a.trim());return n==null?void 0:n.filter(a=>a.includes("{"))},zo=o=>{var n;let t=[];return(n=Wo(o.slice(1,-1)))==null||n.forEach(l=>{var s,c,d,b;let a=((c=(s=l.slice(1,-1))==null?void 0:s.split(","))==null?void 0:c.length)??1;(b=(d=l.slice(1,-1))==null?void 0:d.split(","))==null||b.forEach(m=>{var B,v,T,f,k,C,r,i,u,y,j,J,U;let h=m==null?void 0:m.split(":"),E=h!=null&&h[0]?(h==null?void 0:h[1].split("$").length)-1===1?((B=h==null?void 0:h[0])==null?void 0:B.replace(/^"(.*)"$/,"$1"))+((v=h==null?void 0:h[1])==null?void 0:v.replace(/^"(.*)"$/,"$1")):Array.isArray((f=(T=h==null?void 0:h[1])==null?void 0:T.replace(/^"(.*)"$/,"$1"))==null?void 0:f.split("("))&&((r=(C=(k=h==null?void 0:h[1])==null?void 0:k.replace(/^"(.*)"$/,"$1"))==null?void 0:C.split("("))==null?void 0:r.length)>1?((i=h==null?void 0:h[0])==null?void 0:i.replace(/^"(.*)"$/,"$1"))+((j=(y=(u=h==null?void 0:h[1])==null?void 0:u.replace(/^"(.*)"$/,"$1"))==null?void 0:y.split("("))==null?void 0:j[0])+"()":(J=h==null?void 0:h[0])==null?void 0:J.replace(/^"(.*)"$/,"$1"):"",D=(h==null?void 0:h[1].split("$").length)-1===0?(U=h==null?void 0:h[1])==null?void 0:U.replace(/^"(.*)"$/,"$1"):"";ge.value++,t.push({id:ge.value,key:E,value:D,width:a,extraContent:h==null?void 0:h[1]})})}),t},rl=o=>{var t,n;try{const l=o.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let a=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(Ne(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),Ne(a)){const s=JSON.parse(a);let c=[];return s==null||s.forEach(d=>{var b;(b=Object.entries(p.cloneDeep(d)))==null||b.forEach(m=>{ge.value++,c.push({id:ge.value,key:(m==null?void 0:m[0])??"",value:(m==null?void 0:m[1])===""?"":m==null?void 0:m[1],width:Object.keys(p.cloneDeep(d)).length})})}),c}else return l.trim().startsWith("{{")?zo(l.trim()):Te(a)}else if(Ne(l)){const a=JSON.parse(l);return Object.entries(a).map(([s,c])=>(ge.value++,{id:ge.value,key:s,value:c===""?"":c,width:1}))}else return((t=Te(l))==null?void 0:t.length)===0?l:(n=Te(l))==null?void 0:n.map(a=>({label:a.label,method:Ro(a.method)}))}catch(l){return console.error("转换失败:",l),[]}},Te=o=>{o=o.trim().replace(/^\{|\}$/g,"").trim();const t=[];let n=0;for(;n<o.length;){const l=o.slice(n).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const a=l[1];n+=l[0].length;let s="",c=0,d=!1,b="";for(let m=n;m<o.length;m++){const h=o[m];if((h==='"'||h==="'")&&!d?(d=!0,b=h):h===b&&d&&(d=!1,b=""),!d&&((h==="{"||h==="("||h==="[")&&c++,(h==="}"||h===")"||h==="]")&&c--,h===","&&c===0||m===o.length-1)){s=o.slice(n,m+1).trim(),n=m+1;break}}t.push({label:a,method:s})}return t},Mo=(o,t)=>{try{if(Q!=null&&Q.find(n=>(n==null?void 0:n.key)===t))return o.replace(/['"]/g,"").trim();if(p.cloneDeep(o).split("[").length-1>1){const n=p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(Ne(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return rl(p.cloneDeep(o))}}catch(n){return console.error("解析失败:",n),o}},Go=o=>({[o==null?void 0:o.key]:Mo(o==null?void 0:o.value,o==null?void 0:o.key)}),qo=o=>{try{if(p.cloneDeep(o).split("[").length-1>1){const t=p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),o}},Ho=o=>{const t=o.match(/\(([^)]+)\)/);return t?t[1]:""},Zo=o=>{const t=o.match(/^([^(]+)\s*\(/);return t?t[1].trim():o},Ge=o=>o.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(t=>t.trim()).filter(t=>t).join("/"),Ko=o=>{var c,d;let t=[],n=[];const l=(c=p.cloneDeep(o))==null?void 0:c.map(b=>b==null?void 0:b.key),a=[...new Set((d=p.cloneDeep(l))==null?void 0:d.map(b=>Ho(b)))];a==null||a.forEach(b=>{let m=o==null?void 0:o.filter(D=>D.key.includes(b));m==null||m.forEach(D=>{D!=null&&D.key.includes("Menus")&&(t.push({key:"GroupName",value:Ge(D==null?void 0:D.value)}),n.push(Ge(D==null?void 0:D.value)))});let h=o==null?void 0:o.filter(D=>D.key.includes(b)&&!(D!=null&&D.key.includes("Menus")));h=h==null?void 0:h.map(D=>(D.key=Zo(D.key),D));const E={key:"GroupContents",value:h};t.push(E)});const s={key:"Menus",value:n};return t.unshift(s),t},cl=o=>{var t,n;if(Array.isArray(Object.keys(o))&&((t=Object.keys(o))==null?void 0:t.length)>0){let l=[];return(n=Object.entries(o))==null||n.forEach(([a,s])=>{var d,b;let c=[];if(c.push(a),((d=Object.keys(s))==null?void 0:d.length)>0){let m=[];(b=cl(s))==null||b.forEach(h=>{m.push(h)}),m==null||m.forEach(h=>{c.push(h)})}l.push(c)}),l}},Qo=(o,t)=>{var l;let n=t;return Array.isArray(Object.keys(o))&&((l=Object.entries(o))==null||l.forEach(([a,s])=>{let c=[a];if(typeof s=="object"&&s!==null){let d=cl(s);d==null||d.forEach(b=>{c.push(b)})}n.push(c)})),n},Xo=o=>{const t={};return o.forEach(l=>{const a=l.split("/");let s=t;a.forEach(c=>{s[c]||(s[c]={}),s=s[c]})}),Qo(t,[])},Fe=o=>Xo(o),Yo=o=>{var t,n,l,a,s,c,d,b;try{const m=we((n=(t=p.cloneDeep(o))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),h=(a=(l=p.cloneDeep(m))==null?void 0:l.filter(v=>!v.includes("/*")))==null?void 0:a.map(v=>Po(v)),E=Ko(h),D=[];if(((s=E==null?void 0:E.find(v=>(v==null?void 0:v.key)==="Menus"))==null?void 0:s.value.length)===0)return!1;(c=p.cloneDeep(E))==null||c.forEach(v=>{var T,f,k,C,r;Q!=null&&Q.find(i=>{var u,y;return((u=i==null?void 0:i.key)==null?void 0:u.toUpperCase())===((y=v==null?void 0:v.key)==null?void 0:y.toUpperCase())})?D.push({comp:((T=Q==null?void 0:Q.find(i=>{var u,y;return((u=i==null?void 0:i.key)==null?void 0:u.toUpperCase())===((y=v==null?void 0:v.key)==null?void 0:y.toUpperCase())}))==null?void 0:T.value)??"",name:(f=v==null?void 0:v.value)==null?void 0:f.replace(/[’]|[‘]|[']/g,""),compData:[]}):K!=null&&K.find(i=>{var u,y;return((u=i==null?void 0:i.key)==null?void 0:u.toUpperCase())===((y=v==null?void 0:v.key)==null?void 0:y.toUpperCase())})&&((D==null?void 0:D.length)===0&&(k=v.key)!=null&&k.includes("Menus")&&D.push({comp:"Menu",name:"",compData:[]}),(C=D==null?void 0:D[(D==null?void 0:D.length)-1])!=null&&C.compData&&D[(D==null?void 0:D.length)-1].compData.push({key:(r=K==null?void 0:K.find(i=>{var u,y;return((u=i==null?void 0:i.key)==null?void 0:u.toUpperCase())===((y=v==null?void 0:v.key)==null?void 0:y.toUpperCase())}))==null?void 0:r.value,contents:v==null?void 0:v.value}))});let B=(d=p.cloneDeep(D))==null?void 0:d.map(v=>{var T;return v!=null&&v.compData&&(v.compData=(T=v==null?void 0:v.compData)==null?void 0:T.map(f=>{var k,C,r,i,u,y,j,J,U,V,O;if((f==null?void 0:f.key)==="formFlex")f.contents=((C=(k=f.contents)==null?void 0:k.replace(/[’]|[‘]|[']/g,""))==null?void 0:C.toUpperCase())!=="Vertical".toUpperCase();else if((f==null?void 0:f.key)==="groupContents")f.contents=(r=p.cloneDeep(f.contents))==null?void 0:r.map(A=>Go(p.cloneDeep(A)));else if(Array.isArray(f==null?void 0:f.contents))f.contents=Fe(f.contents);else if(((u=(i=f==null?void 0:f.contents)==null?void 0:i.trim())!=null&&u.startsWith("[")||(j=(y=f.contents)==null?void 0:y.trim())!=null&&j.startsWith("【"))&&((U=(J=f.contents)==null?void 0:J.trim())!=null&&U.endsWith("]")||(O=(V=f.contents)==null?void 0:V.trim())!=null&&O.endsWith("】")))f.contents=qo(p.cloneDeep(f.contents));else{if(!f.contents)return;f.contents=rl(p.cloneDeep(f.contents))}return f})),v});return B=(b=p.cloneDeep(B))==null?void 0:b.map(v=>{var T;return(v==null?void 0:v.comp)==="Group"&&(v.compData=(T=v.compData)==null?void 0:T.map(f=>{var C;let k=[];return(C=f.contents)==null||C.forEach(r=>{var i,u,y,j,J,U,V,O,A,g,F,_;if(Q!=null&&Q.find(S=>{var w,W,P;return((w=S==null?void 0:S.key)==null?void 0:w.toUpperCase())===((P=(W=Object.keys(r))==null?void 0:W[0])==null?void 0:P.toUpperCase())}))k.push({comp:(i=Q==null?void 0:Q.find(S=>{var w,W,P;return((w=S==null?void 0:S.key)==null?void 0:w.toUpperCase())===((P=(W=Object.keys(r))==null?void 0:W[0])==null?void 0:P.toUpperCase())}))==null?void 0:i.value,name:(y=(u=Object.values(r))==null?void 0:u[0])==null?void 0:y.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(K!=null&&K.find(S=>{var w,W,P;return((w=S==null?void 0:S.key)==null?void 0:w.toUpperCase())===((P=(W=Object.keys(r))==null?void 0:W[0])==null?void 0:P.toUpperCase())})){if((k==null?void 0:k.length)===0)return;(j=k==null?void 0:k[(k==null?void 0:k.length)-1])!=null&&j.compData&&k[(k==null?void 0:k.length)-1].compData.push({key:(J=K==null?void 0:K.find(S=>{var w,W,P;return((w=S==null?void 0:S.key)==null?void 0:w.toUpperCase())===((P=(W=Object.keys(r))==null?void 0:W[0])==null?void 0:P.toUpperCase())}))==null?void 0:J.value,contents:(U=Object.values(r))==null?void 0:U[0]})}else if((O=(V=Object.keys(r))==null?void 0:V[0])!=null&&O.includes("$")){const S=(g=(A=Object.keys(p.cloneDeep(r)))==null?void 0:A[0])==null?void 0:g.split("$");k[(k==null?void 0:k.length)-1].compData.push({key:(F=K==null?void 0:K.find(w=>{var W,P;return((W=w==null?void 0:w.key)==null?void 0:W.toUpperCase())===((P=S==null?void 0:S[0])==null?void 0:P.toUpperCase())}))==null?void 0:F.value,contents:(_=Object.values(r))==null?void 0:_[0],selectLabel:S==null?void 0:S[1]})}return r}),f.contents=k,f})),v}),B}catch{return!1}},qe=e.ref(0),il=o=>{const t=[];let n=null;for(let l=0;l<o.length;l++){const a=o[l];if(Array.isArray(a))n&&(n.children=il(a));else{const s={label:a};t.push(s),n=s}}return t},ul=o=>{let t=0;for(const n of o)t++,n.children&&(t+=ul(n.children));return t},pl=(o,t,n=[])=>{let l=0;for(const a of t){if(l>=o.length)break;const s=[...o[l]];if(n.push(s),l++,a.children&&a.children.length>0){const c=[];pl(o.slice(l),a.children,c),c.length>0&&(s.push(c),l+=ul(a.children))}}return n},ea=(o,t)=>{let n=[];return o==null||o.forEach(a=>{a.some(s=>Array.isArray(s))?n.push(...a):n.push(a)}),pl(n,t)},Se=o=>{const t={label:o[0].trim()};if(o.length>1){const n=o.slice(1);n.length===1&&Array.isArray(n[0])?t.children=n[0].map(l=>Array.isArray(l)?Se(l):{label:l.trim()}):t.children=n.map(l=>Array.isArray(l)?Se(l):{label:l.trim()})}return t},He=o=>{let t=o.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return t=t.replace(/:}(?=,|]|}|$)/g,':""}'),t=t.replace(/:,(?=\s*")/g,':"",'),t=t.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(n,l,a)=>`"${l}://${a}"`),t=t.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),t},la=o=>{var n;return o.some(l=>!Array.isArray(l))?o:(n=p.cloneDeep(o))==null?void 0:n.map(l=>{let a=[];return l.some(s=>Array.isArray(s))?l==null||l.forEach(s=>{Array.isArray(s)&&a.push(Se(s))}):l.some(s=>s.includes("["))?a.push(l):a=l.map(s=>({label:s.trim()})),a})},dl=(o,t,n)=>{let l=o,a=n,s=t;return s.children&&(Array.isArray(a[a.length-1])?a[a.length-1].push(l[0]):a.push(l[0]),l.shift(),s=s.children),Array.isArray(s)&&s.forEach(c=>{if(c.children){const d=dl(l,c,a);a=d[0],l=d[1]}}),[a,l]},na=(o,t)=>{let n=o,l=[];return t.length>0?t==null||t.forEach(a=>{let s=n==null?void 0:n[0];n.shift();const c=dl(p.cloneDeep(n),a,s);s=c[0],n=c[1],l.push(s)}):l=n,l},Le=(o,t)=>{const n=la(p.cloneDeep(o));return na(n,t)},oa=o=>{const t=[];let n=0;const l=o.length;for(;n<l;){const a=o[n];a.key==="tableColumns"&&n+1<l&&o[n+1].key==="tableContents"?(t.push({comp:"Table",compData:[a,o[n+1]],name:""}),n+=2):(t.push(a),n+=1)}return t},fl=o=>Le([o],[]),Be=o=>{const t=[];return o==null||o.forEach(n=>n==null?void 0:n.forEach(a=>{var s,c;qe.value++,t.push({id:qe.value,key:(s=Object.keys(a))==null?void 0:s[0],value:(c=Object.values(a))==null?void 0:c[0],width:n.length})})),t},Ze=o=>{let t=oa(o);return t=t==null?void 0:t.map(n=>{var l,a,s,c;if(n.comp==="Table")(l=n.compData)!=null&&l.find(d=>(d==null?void 0:d.key)==="header")||(n.compData=(a=n.compData)==null?void 0:a.map(d=>(d.key==="tableColumns"?d={key:"header",contents:Le(d.value,[])}:d={key:d.key,contents:d.value},d)),n.compData.push({key:"extraButton",contents:[{label:"新增"}]}),n.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(n.key==="form"){const d=(s=n==null?void 0:n.value)==null?void 0:s.map(b=>(Array.isArray(b)||(b=[b]),b));n={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be(d)}],name:""}}else if(n.key==="formTop"){const d=(c=n==null?void 0:n.value)==null?void 0:c.map(b=>(Array.isArray(b)||(b=[b]),b));n={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be(d)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return n}),t},aa=(o,t)=>{var d,b,m,h,E,D;const n=[],l=il((b=(d=o==null?void 0:o.find(B=>B.key==="tableIndex"))==null?void 0:d.value)==null?void 0:b[0]);n.push({key:"tableIndexColumn",contents:t}),n.push({key:"tableIndex",contents:l});let a=[];const s=(m=o==null?void 0:o.find(B=>B.key==="tableColumns"))==null?void 0:m.value;s.length===1&&!(s!=null&&s[0].some(B=>Array.isArray(B)))?a=(h=s==null?void 0:s[0])==null?void 0:h.map(B=>({label:B})):a=Le((E=o==null?void 0:o.find(B=>B.key==="tableColumns"))==null?void 0:E.value,l),n.push({key:"header",contents:a});const c=ea((D=o==null?void 0:o.find(B=>B.key==="tableContents"))==null?void 0:D.value,l);return n.push({key:"tableContents",contents:c}),n.push({key:"extraButton",contents:[{label:"新增"}]}),n.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),n},hl=o=>o.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(t,n,l)=>{const a=hl(l);return`"${n}",${a}`}),Ee=o=>{const t=o.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return hl(t).replace(/^"(.*)"$/,"$1")},ta=o=>{const t=new Set;return o.filter(n=>{const l=JSON.stringify(n);return t.has(l)?!1:t.add(l)})},Ke=o=>{var n;let t=[];return(n=p.cloneDeep(o))==null||n.forEach(l=>{var a;(a=l.contents)==null||a.forEach(s=>{t.push(s)})}),t=ta(t),t.push({label:"操作"}),[t]},sa=(o,t)=>o.reduce((n,l,a)=>{const s=Math.floor(a/t);return n[s]||(n[s]=[]),n[s].push(l),n},[]),ml=o=>o.reduce((t,n)=>n.children&&n.children.length>0?t+ml(n.children):t+1,0),ra=(o,t)=>{var l;let n=[];return(l=sa(o,ml(t==null?void 0:t[0])-1))==null||l.forEach(a=>{let s=[];a.forEach(c=>{var d;Array.isArray(c.contents)?(d=c.contents)==null||d.forEach(b=>{s.push(b)}):s.push(c.contents)}),n.push(s)}),[n]},ca=["方法体","输入","输出"],Qe=e.ref(1),we=o=>{let t;o.replaceAll(" ",`\r
|
|
2
|
+
`).includes(`\r
|
|
3
|
+
`)?t=o.replaceAll(" ",`\r
|
|
4
|
+
`).split(`\r
|
|
5
|
+
`).filter(a=>a.trim()!==""):t=o.replaceAll(" ",`\r
|
|
6
|
+
`).split(`
|
|
7
|
+
`).filter(a=>a.trim()!=="");const n=[];let l="";for(const a of t)a.includes("{")||l.includes("{")||a.includes("[")||l.includes("[")||a.includes("【")||l.includes("【")||a.includes("(")||l.includes("(")||a.includes("(")||l.includes("(")||a.includes("/*")||l.includes("/*")?(l+=a.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},yl=o=>{const[t,n]=o.split(/=(.+)/),l=t.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},Ae=o=>{let t;o!=null&&o.includes(":")?t=o.split(":").filter(a=>a.trim()!==""):t=o==null?void 0:o.split(":").filter(a=>a.trim()!=="");const n=[];let l="";for(const a of t)a.includes("{")||l.includes("{")||a.includes("[")||l.includes("[")||a.includes("【")||l.includes("【")||a.includes("(")||l.includes("(")||a.includes("(")||l.includes("(")||a.includes("/*")||l.includes("/*")?(l=l!==""?l+":"+a.trim():a.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},ia=o=>/^[\x00-\x7F]*$/.test(o),ua=o=>{var a,s;const t=(a=o.map(c=>{var b,m;let d=(m=(b=c.key.split("("))==null?void 0:b[1])==null?void 0:m.trim();return d==null?void 0:d.slice(0,d.length-1)}))==null?void 0:a.filter(c=>c),n=t==null?void 0:t.map(c=>{var b;return(b=Ae(c))==null?void 0:b.map(m=>{var h;if(m.includes("{")){let E=(h=m.split(":"))==null?void 0:h[0];m=E.slice(1,E.length)}return m})}).filter(c=>c.length!==0),l=(s=n==null?void 0:n.filter(c=>c.length!==0))==null?void 0:s.map(c=>{let d="";return c.forEach(b=>{b.includes("{")||(d=d===""?d+p.cloneDeep(b):d+"/"+p.cloneDeep(b))}),d});return Fe([...new Set(l)])},je=o=>{var n,l,a,s,c,d,b,m;const t=(l=(n=o.split("("))==null?void 0:n[1])==null?void 0:l.trim();return((a=Ae(t.slice(0,t.length-1)))==null?void 0:a.length)>0?t.slice(0,t.length-1):(m=(b=(d=(c=(s=o.split("("))==null?void 0:s[1])==null?void 0:c.trim())==null?void 0:d.split(")"))==null?void 0:b[0])==null?void 0:m.trim()},pa=o=>{var a;if(!o)return;const t=je(o),n=(a=Ae(t))==null?void 0:a.map(s=>{var c;if(s.includes("{")){let d=(c=s.split(":"))==null?void 0:c[0];s=d.slice(1,d.length)}return s});let l="";return n.forEach(s=>{s.includes("{")||(l=l===""?l+p.cloneDeep(s):l+"/"+p.cloneDeep(s))}),l},da=o=>{const t=o.match(/\[(.*)\]/s);if(t){const n=`[${t[1]}]`;try{const l=n.replace(/([^\[\],\s]+)/g,'"$1"');return JSON.parse(l)}catch{return JSON.parse(n.replace(/\[(\s*)(,|])/g,'[""$2').replace(/([^\[\],\s]+)/g,'"$1"').replace(/""/g,'"'))}}},fa=o=>{var s;if(!o)return;const t=je(o);let n=[],l=[],a=[];return(s=Ae(t))==null||s.forEach(c=>{var d;c.includes("[")?n.push(da(c)):c.includes("{")&&(ia((d=c.slice(1,c.length-1).split(":"))==null?void 0:d[0])?a.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):ce.IsJson(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(c.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):c.includes("$"))}),[n,l,a]},ha=o=>{const t=[];let n="";for(const l of o)l.includes("[")||n.includes("[")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),p.cloneDeep(n).split("{").length-1===p.cloneDeep(n).split("}").length-1&&p.cloneDeep(n).split("【").length-1===p.cloneDeep(n).split("】").length-1&&p.cloneDeep(n).split("[").length-1===p.cloneDeep(n).split("]").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("(").length-1===p.cloneDeep(n).split(")").length-1&&p.cloneDeep(n).split("/*").length-1===p.cloneDeep(n).split("*/").length-1&&(t.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):t.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return t},Xe=o=>{var c,d;const t=[],n=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=o.match(n);if(l){const b=l[1]||l[3],m=l[2]||l[4];if(b&&m){const h=`${b}/${m}`;t.push(h)}}const a=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,s=o.match(a);return s?t.push(s[0].replace(/\)+$/,"")):(o==null?void 0:o.split(",").length)===2&&t.push((d=(c=o==null?void 0:o.split(","))==null?void 0:c[1])==null?void 0:d.trim()),t},Ie=o=>{let t=o.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return t=t.replace(/\[\s*,/g,'[{"": ""},'),t=t.replace(/,\s*,/g,', {"": ""},'),t=t.replace(/,\s*\]/g,', {"": ""}]'),t=t.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(n,l,a,s,c)=>a.includes("'")?`:${l}${a}${s}${c}`:`:${l}"${a}"${s}${c}`),t=t.replace(/:\s*([,\]}])/g,': ""$1'),t},ma=o=>!/\[[^\]]*\{[^\]]*\]/.test(o),ya=o=>{const t=p.cloneDeep(o).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),n=t?`${t[2]}/${t[3]}`:null,l=o.match(/\[\{([^}]+)\}\]/),a=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let s=null;if(a)try{s=JSON.parse(a)}catch(c){console.error("解析数组失败:",c)}return[n,s]},va=o=>{var d,b,m,h,E,D,B,v,T,f,k;let t=[],n=[],l={},a=[],s=o.trim(),c=[];if(s.trim().includes("输入")&&s.trim().includes("输出")){let C=[],r=o.trim();r=p.cloneDeep(r).slice(1,p.cloneDeep(r).length-1);const i=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(v=r.match(i))==null||v.forEach((u,y)=>{var U;const j=u;let J=[];(U=j.slice(1,j.length-1).replace(":","$:").split("$:"))==null||U.forEach(V=>{var O,A,g;if(ca.find(F=>V.includes(F)))if(!V.includes("=="))J.push({key:"tableIndexColumn",contents:V.replaceAll("'","")});else{let F=[];const _=V.replaceAll("'","").split("==");F.push(_==null?void 0:_[0]),_!=null&&_[1].includes("[")?F.push(_==null?void 0:_[1].trim().slice(1,(_==null?void 0:_[1].length)-1).split(",")):F.push([_==null?void 0:_[1]]),J.push({key:"header",contents:[(A=(O=fl([F]))==null?void 0:O[0])==null?void 0:A[0]]})}else{let F=V.trim().replaceAll(",",",").replaceAll("'",'"');if(y%3===0)F.slice(1,F.length-1).includes("[")?C.push({key:"tableIndex",contents:[{label:F}]}):C.push({key:"tableIndex",contents:[{label:F.slice(1,F.length-1)}]});else if((F==null?void 0:F[0])==="{"){let _=[];const S=F.slice(1,F.length-1).split(":");if(S.every(w=>ce.IsJson(w.trim()))){_.push({key:"tableContentName",contents:"详情"});let w=[];S.forEach((W,P)=>{if(P===0){const G=JSON.parse(W).map(H=>({label:H}));G.push({label:"操作"}),w.push({key:"header",contents:G})}else w.push({key:"tableContents",contents:JSON.parse(W)})}),w.push({key:"extraButton",contents:[{label:"新增"}]}),w.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),_.push({comp:"Table",compData:w,name:""}),C.push({key:"tableContents",contents:[_]})}}else{let _=F;_.slice(1,_.length-1).includes("[")||_.slice(1,_.length-1).includes("{")?ce.IsJson(He(_.replace(/\s+/g,"")))&&((g=JSON.parse(He(_.replace(/\s+/g,""))))==null||g.map(S=>{if(Array.isArray(S==null?void 0:S[0])){const w=[];w.push({key:"tableContentName",contents:"详情"});let W=[];S.forEach(P=>{P.forEach(G=>{var H,ee;Qe.value++,W.push({id:Qe.value,key:(H=Object.keys(G))==null?void 0:H[0],value:(ee=Object.values(G))==null?void 0:ee[0],width:P.length})})}),w.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:W}],name:""}),C.push({key:"tableContents",contents:[w]})}else C.push({key:"tableContents",contents:S==null?void 0:S[0]})})):C.push({key:"tableContents",contents:_.trim().slice(1,_.length-1)})}}}),C.push(J==null?void 0:J[0])}),c.push({key:"tableIndex",contents:(T=C==null?void 0:C.filter(u=>(u==null?void 0:u.key)==="tableIndex"))==null?void 0:T.map(u=>{var y;return(y=u.contents)==null?void 0:y[0]})}),c.push({key:"extraButton",contents:[{label:"新增"}]}),c.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),c.push({key:"tableIndexColumn",contents:(k=(f=C==null?void 0:C.filter(u=>(u==null?void 0:u.key)==="tableIndexColumn"))==null?void 0:f[0])==null?void 0:k.contents}),c.push({key:"header",contents:Ke(C==null?void 0:C.filter(u=>(u==null?void 0:u.key)==="header"))}),c.push({key:"tableContents",contents:ra(C==null?void 0:C.filter(u=>(u==null?void 0:u.key)==="tableContents"),Ke(C==null?void 0:C.filter(u=>(u==null?void 0:u.key)==="header")))})}else{const C=(d=s.trim().split(",$"))==null?void 0:d[0];C[0]==="["?s=C.slice(1,C.length-1):s.includes(",$")&&(s=(b=s.trim().split(",$"))==null?void 0:b[0]);let r;if(s.includes("$")){s=p.cloneDeep(s),l.method=(h=(m=p.cloneDeep(s).trim())==null?void 0:m.slice(1,s.length).split("("))==null?void 0:h[0];let i;Xe(s.slice(1,s.length-2)).length>1?i=Xe(s.slice(1,s.length-2)):i=ya(s),l.value=i}else ce.IsJson("["+Ie(s).replaceAll("'",'"')+"]")&&!ma(Ie(s).replaceAll("'",'"'))?(s=JSON.parse("["+Ie(s).replaceAll("'",'"')+"]"),a=s):r=(D=(E=p.cloneDeep(s).split("}"))==null?void 0:E.filter(i=>i!==""))==null?void 0:D.map(i=>{let u=i;return u[0]===","?u=u.slice(2,u.length):u=u.slice(1,u.length),u});(B=p.cloneDeep(r))==null||B.forEach(i=>{var u,y,j,J,U,V,O,A,g,F,_,S,w,W,P;if(i.includes("==")){const G=(S=i==null?void 0:i.split(":"))==null?void 0:S[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),H=(w=i==null?void 0:i.split(":"))==null?void 0:w[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(ce.IsJson(H.trim())?n.push(JSON.parse(H.trim())):n.push(JSON.parse(H.replaceAll("'",'"').trim())),G[0]!=="["){let ee=[];ce.IsJson("["+Ee(G)+"]")?ee.push(JSON.parse("["+Ee(G)+"]")):ce.IsJson("["+Ee(G).replaceAll("==",",")+"]")&&ee.push(JSON.parse("["+Ee(G).replaceAll("==",",")+"]"));const oe=p.cloneDeep(ee);oe.push(["操作"]),t.push(oe)}else{const ee=(W=G.slice(1,G.length-1).replaceAll(",",",|"))==null?void 0:W.split("|"),oe=(P=ha(ee))==null?void 0:P.map(Y=>((Y==null?void 0:Y[Y.length-1])===","&&(Y=Y.slice(0,Y.length-1)),Y));let ae=[];oe==null||oe.forEach(Y=>{var te,le,N,x;let re=[];re.push((te=Y.split("=="))==null?void 0:te[0].trim().replace(/^"|"$/g,"")),((le=Y.split("=="))==null?void 0:le[1].trim()[0])==="["?re.push(JSON.parse((N=Y.split("=="))==null?void 0:N[1].trim())):re.push([JSON.parse((x=Y.split("=="))==null?void 0:x[1].trim())]),ae.push(re)});const ie=p.cloneDeep(ae);ie.push(["操作"]),t.push(ie)}}else{if(ce.IsJson((u=i==null?void 0:i.split(":"))==null?void 0:u[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let G=JSON.parse((y=i==null?void 0:i.split(":"))==null?void 0:y[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(G)||(G=[G]),G.push("操作"),t.push(G)}ce.IsJson((U=(J=(j=i==null?void 0:i.split(":"))==null?void 0:j[1])==null?void 0:J.replace(/^"|"$/g,"'"))==null?void 0:U.replace(/'([^']+)'/g,'"$1"'))?n.push(JSON.parse((V=i==null?void 0:i.split(":"))==null?void 0:V[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):ce.IsJson((F=(g=(A=(O=i==null?void 0:i.split(":"))==null?void 0:O[1])==null?void 0:A.replace(/^"|"$/g,"'"))==null?void 0:g.replaceAll("'",'"'))==null?void 0:F.replace(/'([^']+)'/g,'"$1"'))&&n.push(JSON.parse((_=i==null?void 0:i.split(":"))==null?void 0:_[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[t,n,c,l,a]},ka=o=>{const t=[],n=pa(o==null?void 0:o.key),l=fa(o==null?void 0:o.key),a=va(o==null?void 0:o.value),s=l==null?void 0:l[0],c=a==null?void 0:a[4],d=l==null?void 0:l[1],b=l==null?void 0:l[2],m=a==null?void 0:a[0],h=a==null?void 0:a[1],E=a==null?void 0:a[2],D=a==null?void 0:a[3];return n&&t.push({key:"contentPath",value:n}),(s==null?void 0:s.length)>0&&t.push({key:"tableIndex",value:s}),D&&t.push({key:"extraButton",value:D}),(c==null?void 0:c.length)>0&&t.push({key:"form",value:c}),(d==null?void 0:d.length)>0&&t.push({key:"formTop",value:d}),(b==null?void 0:b.length)>0&&t.push({key:"extra",value:b}),(E==null?void 0:E.length)>0&&t.push({comp:"Table",compData:E,name:""}),(m==null?void 0:m.length)>0&&t.push({key:"tableColumns",value:m}),(h==null?void 0:h.length)>0&&t.push({key:"tableContents",value:h}),t},ga=o=>{let t=[],n=[];o==null||o.forEach(a=>{Array.isArray(a)&&(a==null||a.forEach(s=>{var c;s.comp==="FormTop"&&((c=s.compData)==null||c.forEach(d=>{(d==null?void 0:d.key)==="formContent"&&(n=[...n,...d.contents])}))}))});const l=n.reduce((a,s)=>a.find(d=>(d==null?void 0:d.key)===(s==null?void 0:s.key))?a:a.concat([s]),[]);return l.length!==0&&t.push([{comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:l},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}]}]),o==null||o.forEach(a=>{if(Array.isArray(a)){const s=a.filter(c=>c.comp!=="FormTop");t.push(s)}else a.comp!=="FormTop"&&t.push(a)}),t},ba=(o,t)=>{const n=t.split("/");let l=[];return o==null||o.forEach(a=>{var d,b,m,h,E,D,B,v,T,f,k;const s=[],c=(b=(d=a.find(C=>C.key==="tableIndex"))==null?void 0:d.value)==null?void 0:b[0];if(c&&!c.some(C=>Array.isArray(C))){const C=(h=(m=a.find(r=>r.key==="tableColumns"))==null?void 0:m.value)==null?void 0:h[0];s.push({key:"tableIndexColumn",contents:n[n.length-1]}),s.push({key:"tableIndex",contents:c==null?void 0:c.map(r=>({label:r}))}),s.push({key:"extraButton",contents:[{label:"新增"}]}),s.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(C)&&C.some(r=>Array.isArray(r))?s.push({key:"header",contents:fl(C)}):s.push({key:"header",contents:Array.isArray(C)?C==null?void 0:C.map(r=>({label:r})):[C].map(r=>({label:r}))}),s.push({key:"tableContents",contents:Array.isArray(C)?(D=(E=a.find(r=>r.key==="tableContents"))==null?void 0:E.value)==null?void 0:D[0]:(T=(v=(B=a.find(r=>r.key==="tableContents"))==null?void 0:B.value)==null?void 0:v[0])==null?void 0:T.map(r=>[r])}),l.push({comp:"Table",name:"",compData:s}),a!=null&&a.find(r=>(r==null?void 0:r.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be([(f=a==null?void 0:a.find(r=>(r==null?void 0:r.key)==="formTop"))==null?void 0:f.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})}else c?(l.push({comp:"Table",name:"",compData:aa(a,n[n.length-1])}),a!=null&&a.find(C=>(C==null?void 0:C.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Be([(k=a==null?void 0:a.find(C=>(C==null?void 0:C.key)==="formTop"))==null?void 0:k.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})):a.some(C=>C.key==="extra")?l.push({comp:"calculator",name:"",compData:Ze(a)}):l.push(Ze(a))}),ga(l)},Ca=(o,t)=>{var a,s;const n=o.map(c=>c.filter(d=>d.key!=="contentPath"));return{comp:"Group",compData:[{contents:ba(n,t),key:"groupContents"}],name:(s=(a=o[0])==null?void 0:a.find(c=>c.key==="contentPath"))==null?void 0:s.value}},Da=o=>{var a;const t=[],n=p.cloneDeep(o).map(s=>{var c;if(s!=null&&s.find(d=>(d==null?void 0:d.key)==="contentPath"))return(c=s==null?void 0:s.find(d=>(d==null?void 0:d.key)==="contentPath"))==null?void 0:c.value}).filter(s=>s!==""),l=[...new Set(n)];return(a=l==null?void 0:l.filter(s=>s))==null||a.forEach(s=>{var c;t.push(Ca((c=p.cloneDeep(o))==null?void 0:c.filter(d=>d.find(b=>b.key==="contentPath"&&b.value===s)),s))}),t},xa=o=>{let t=[];t.push({comp:"Menu",compData:[{contents:ua(p.cloneDeep(o)),key:"menuContents"}],name:""});const n=o.map(l=>ka(l)).filter(l=>l.length!==0);return t=[...t,...Da(n)],t},Ea=o=>{var t,n,l,a,s;try{const c=(l=we((n=(t=p.cloneDeep(o))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")))==null?void 0:l.filter(m=>m!==""),d=(s=(a=p.cloneDeep(c))==null?void 0:a.filter(m=>!m.includes("/*")))==null?void 0:s.map(m=>yl(m));return xa(d)}catch{return!1}},_e=e.ref(0),Oe=e.ref(0),_a=o=>{const t=o.trim().replace(/^'|'$/g,""),n=/((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g,l={};let a;for(;(a=n.exec(t))!==null;){const s=a[1];let c=a[2].trim();(c.match(/\[/g)||[]).length!==(c.match(/\]/g)||[]).length&&(c=c==null?void 0:c.replace(/]$/,"")),l[s]?(l[s+Oe.value]&&Oe.value++,l[s+Oe.value]=s+"="+c):l[s]=s+"="+c}return l},vl=o=>{const[t,n]=o.split("=").map(s=>s.trim()),l=t.replace(/['"]/g,""),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},Na=o=>{var c;let t=[];const[n,l]=o.split(/=(.+)/),a=n.replace(/['"]/g,"").trim(),s=l.replace(/^['"]|['"]$/g,"");return(c=Object.values(_a(s)))==null||c.forEach(d=>{t.push(vl(d))}),{key:a,value:t}},$e=o=>{try{return JSON.parse(o),!0}catch{return!1}},kl=o=>{try{const t=o.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(t).split("{").length-1>1){let n=p.cloneDeep(t).replace(/^\{(.*)\}$/,"[$1]");if($e(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),$e(n)){const l=JSON.parse(n);let a=[];return l==null||l.forEach(s=>{var c;(c=Object.entries(p.cloneDeep(s)))==null||c.forEach(d=>{_e.value++,a.push({id:_e.value,key:(d==null?void 0:d[0])??"",value:(d==null?void 0:d[1])===""?"":d==null?void 0:d[1],width:Object.keys(p.cloneDeep(s)).length})})}),a}else return console.error("转换类型不正确:"),[]}else if($e(t)){const n=JSON.parse(t);return Object.entries(n).map(([l,a])=>(_e.value++,{id:_e.value,key:l,value:a===""?"":a,width:1}))}else return t}catch(t){return console.error("转换失败:",t),[]}},$a=(o,t)=>{try{if(Q!=null&&Q.find(n=>(n==null?void 0:n.key)===t))return JSON.parse(o.replace(/[’]|[‘]|[']/g,'"'));if(p.cloneDeep(o).split("[").length-1>1){const n=p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if($e(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return kl(p.cloneDeep(o))}}catch(n){return console.error("解析失败:",n),o}},Va=o=>({[o==null?void 0:o.key]:$a(o==null?void 0:o.value,o==null?void 0:o.key)}),Ba=o=>{try{if(p.cloneDeep(o).split("[").length-1>1){const t=p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else return JSON.parse(p.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(t){return console.error("解析失败:",t),o}},gl=o=>{var t,n,l,a,s,c;try{const d=we((n=(t=p.cloneDeep(o))==null?void 0:t.replace("(","("))==null?void 0:n.replace(")",")")),b=(l=p.cloneDeep(d))==null?void 0:l.map(E=>{var B,v;let D=(v=(B=p.cloneDeep(E))==null?void 0:B.split("="))==null?void 0:v[0];return D!=null&&D.includes("GroupContents")?Na(E):vl(E)}),m=[];(a=p.cloneDeep(b))==null||a.forEach(E=>{var D,B,v,T,f;Q!=null&&Q.find(k=>{var C,r;return((C=k==null?void 0:k.key)==null?void 0:C.toUpperCase())===((r=E==null?void 0:E.key)==null?void 0:r.toUpperCase())})?m.push({comp:((D=Q==null?void 0:Q.find(k=>{var C,r;return((C=k==null?void 0:k.key)==null?void 0:C.toUpperCase())===((r=E==null?void 0:E.key)==null?void 0:r.toUpperCase())}))==null?void 0:D.value)??"",name:(B=E==null?void 0:E.value)==null?void 0:B.replace(/[’]|[‘]|[']/g,""),compData:[]}):K!=null&&K.find(k=>{var C,r;return((C=k==null?void 0:k.key)==null?void 0:C.toUpperCase())===((r=E==null?void 0:E.key)==null?void 0:r.toUpperCase())})&&((m==null?void 0:m.length)===0&&(v=E.key)!=null&&v.includes("Menus")&&m.push({comp:"Menu",name:"",compData:[]}),(T=m==null?void 0:m[(m==null?void 0:m.length)-1])!=null&&T.compData&&m[(m==null?void 0:m.length)-1].compData.push({key:(f=K==null?void 0:K.find(k=>{var C,r;return((C=k==null?void 0:k.key)==null?void 0:C.toUpperCase())===((r=E==null?void 0:E.key)==null?void 0:r.toUpperCase())}))==null?void 0:f.value,contents:E==null?void 0:E.value}))}),console.log("newContents",m);let h=(s=p.cloneDeep(m))==null?void 0:s.map(E=>{var D;return E!=null&&E.compData&&(E.compData=(D=E==null?void 0:E.compData)==null?void 0:D.map(B=>{var v,T,f,k,C,r,i,u,y,j,J;if((B==null?void 0:B.key)==="formFlex")B.contents=((T=(v=B.contents)==null?void 0:v.replace(/[’]|[‘]|[']/g,""))==null?void 0:T.toUpperCase())!=="Vertical".toUpperCase();else if((B==null?void 0:B.key)==="groupContents")B.contents=(f=p.cloneDeep(B.contents))==null?void 0:f.map(U=>Va(p.cloneDeep(U)));else if(((C=(k=B.contents)==null?void 0:k.trim())!=null&&C.startsWith("[")||(i=(r=B.contents)==null?void 0:r.trim())!=null&&i.startsWith("【"))&&((y=(u=B.contents)==null?void 0:u.trim())!=null&&y.endsWith("]")||(J=(j=B.contents)==null?void 0:j.trim())!=null&&J.endsWith("】")))B.contents=Ba(p.cloneDeep(B.contents));else{if(!B.contents)return;B.contents=kl(p.cloneDeep(B.contents))}return B})),E});return h=(c=p.cloneDeep(h))==null?void 0:c.map(E=>{var D;return(E==null?void 0:E.comp)==="Group"&&(E.compData=(D=E.compData)==null?void 0:D.map(B=>{var T;let v=[];return(T=B.contents)==null||T.forEach(f=>{var k,C,r,i,u,y,j,J,U,V,O,A;if(Q!=null&&Q.find(g=>{var F,_,S;return((F=g==null?void 0:g.key)==null?void 0:F.toUpperCase())===((S=(_=Object.keys(f))==null?void 0:_[0])==null?void 0:S.toUpperCase())}))v.push({comp:(k=Q==null?void 0:Q.find(g=>{var F,_,S;return((F=g==null?void 0:g.key)==null?void 0:F.toUpperCase())===((S=(_=Object.keys(f))==null?void 0:_[0])==null?void 0:S.toUpperCase())}))==null?void 0:k.value,name:(r=(C=Object.values(f))==null?void 0:C[0])==null?void 0:r.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(K!=null&&K.find(g=>{var F,_,S;return((F=g==null?void 0:g.key)==null?void 0:F.toUpperCase())===((S=(_=Object.keys(f))==null?void 0:_[0])==null?void 0:S.toUpperCase())})){if((v==null?void 0:v.length)===0)return;(i=v==null?void 0:v[(v==null?void 0:v.length)-1])!=null&&i.compData&&v[(v==null?void 0:v.length)-1].compData.push({key:(u=K==null?void 0:K.find(g=>{var F,_,S;return((F=g==null?void 0:g.key)==null?void 0:F.toUpperCase())===((S=(_=Object.keys(f))==null?void 0:_[0])==null?void 0:S.toUpperCase())}))==null?void 0:u.value,contents:(y=Object.values(f))==null?void 0:y[0]})}else if((J=(j=Object.keys(f))==null?void 0:j[0])!=null&&J.includes("$")){const g=(V=(U=Object.keys(p.cloneDeep(f)))==null?void 0:U[0])==null?void 0:V.split("$");v[(v==null?void 0:v.length)-1].compData.push({key:(O=K==null?void 0:K.find(F=>{var _,S;return((_=F==null?void 0:F.key)==null?void 0:_.toUpperCase())===((S=g==null?void 0:g[0])==null?void 0:S.toUpperCase())}))==null?void 0:O.value,contents:(A=Object.values(f))==null?void 0:A[0],selectLabel:g==null?void 0:g[1]})}return f}),B.contents=v,B})),E}),h}catch{return!1}},wa=o=>gl(o),Aa=o=>!!gl(o),Ce=e.ref(0),Ta=o=>o.reduce((n,l)=>{var s,c;const a=Object.values(n);return(((s=Object.keys(n))==null?void 0:s.length)===0||a[a.length-1].length>=(l==null?void 0:l.width))&&(n[Ce.value]=[],Ce.value++),n[Ce.value-1].push(l),((c=Object.keys(n))==null?void 0:c.length)===(l==null?void 0:l.width)&&(n[Ce.value]=[],Ce.value++),n},{});exports.arrayToNumberArray=Ta;exports.contentTransArray=we;exports.expandContentStringToJson=Ea;exports.expandNewStringToJson=Yo;exports.expandStringToJson=wa;exports.getComponent=sl;exports.getContentValue=je;exports.isExpandStringToJson=Aa;exports.menuArray=Fe;exports.parseGroupValue=yl;exports.slotContent=Uo;
|