ss-component-new 1.1.228 → 1.1.230
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-BPoHqMUl.cjs +7 -0
- package/dist/array-BlNCcyR3.js +3576 -0
- package/dist/{cloneDeep-BNjCgM1i.cjs → cloneDeep-DC8YpUZ0.cjs} +1 -1
- package/dist/{cloneDeep-DgR0yNXB.js → cloneDeep-F9O5vPGw.js} +1 -1
- package/dist/icons/svg/Cancel.svg +1 -0
- package/dist/icons/svg/Save.svg +1 -0
- package/dist/icons/svg/Step.svg +1 -1
- package/dist/icons/svg/Store.svg +1 -0
- package/dist/index-23tRTD5t.cjs +1 -0
- package/dist/{index-CRnch0mI.cjs → index-B-SoLcGK.cjs} +1 -1
- package/dist/{index-B7NWe0kP.js → index-B2EUqH0l.js} +1 -1
- package/dist/{index-BGuPsvvj.js → index-B4NmkBtx.js} +1 -1
- package/dist/{index-Y8tPZJO9.cjs → index-B6kq6fHV.cjs} +1 -1
- package/dist/{index-DbHIZnNr.js → index-B7s76AP9.js} +1 -1
- package/dist/{index-DNEfy4B3.cjs → index-B8O5ErG3.cjs} +1 -1
- package/dist/{index-n6m3fsf9.js → index-BEigHtkm.js} +1 -1
- package/dist/{index-B2mGiohI.js → index-BMTWJxv9.js} +1 -1
- package/dist/{index-BeYnagNF.js → index-BVGtv7hS.js} +5 -5
- package/dist/index-BVTrhPrg.js +257 -0
- package/dist/{index-smvZDiTv.js → index-BbnVAolK.js} +4 -4
- package/dist/{index-D13eCgMO.js → index-Bc_-X02L.js} +4 -4
- package/dist/{index-D7gml1n4.cjs → index-Beqpq8XG.cjs} +1 -1
- package/dist/{index-B_IgiWba.cjs → index-BmB3pdK1.cjs} +1 -1
- package/dist/{index-aDP7uUOi.js → index-BvbtWO--.js} +3 -3
- package/dist/index-BxvYzJ-Q.cjs +1 -0
- package/dist/{index-u3OuRRIw.cjs → index-BzlGsXbt.cjs} +1 -1
- package/dist/{index-CpIyGqJT.cjs → index-C2OSPvvg.cjs} +1 -1
- package/dist/{index-BVrLzODb.cjs → index-C4EK74Eg.cjs} +1 -1
- package/dist/{index-DiZAT0BB.js → index-CBwd7Q9L.js} +6 -6
- package/dist/{index-Cj3kJfZd.cjs → index-CCWGXB9E.cjs} +1 -1
- package/dist/{index-BAkO7mMj.cjs → index-CHZ6wubH.cjs} +1 -1
- package/dist/{index-C4kIy-Lo.js → index-CJmVBlej.js} +14 -14
- package/dist/{index-DLKlhS2d.js → index-CMT5JDTd.js} +4 -4
- package/dist/{index-Bwbemw7m.js → index-CUDstL_x.js} +5 -5
- package/dist/{index-BCMlTeyT.js → index-CqT2lIEc.js} +5 -5
- package/dist/{index-CHj5sZs3.cjs → index-DDS-ylg2.cjs} +1 -1
- package/dist/{index-i9Tj0rFa.js → index-DHE1Ke3I.js} +1 -1
- package/dist/{index-BwcYw7zX.cjs → index-DONqd7Aq.cjs} +1 -1
- package/dist/{index-Du1SWB8m.js → index-DXHWTAss.js} +12 -11
- package/dist/{index-Bu_0HHSz.cjs → index-Dk3kLM0U.cjs} +1 -1
- package/dist/index-DkPbWVec.js +623 -0
- package/dist/index-DlNt5G13.cjs +1 -0
- package/dist/{index-B62rWq1B.js → index-Ds6Jw4mw.js} +956 -913
- package/dist/{index-CWWgom0d.cjs → index-DsUEFfCG.cjs} +1 -1
- package/dist/{index-DDG_UIZE.js → index-Fr7Zvv_X.js} +3 -3
- package/dist/{index-BHPmh6Kb.js → index-TyD9NurF.js} +37 -37
- package/dist/{index-D_eJe1J_.js → index-W7LB_3cY.js} +4 -4
- package/dist/{index-CQM-ATuR.cjs → index-Wyj4b3Yx.cjs} +1 -1
- package/dist/{index-Bcux0OnE.js → index-_20-riGU.js} +7 -7
- package/dist/index-cBmyaP1D.cjs +9 -0
- package/dist/{index-BRSwWEL5.js → index-hn9H8Q6t.js} +8 -8
- package/dist/{index-Dm2KLudv.cjs → index-hyBELhrs.cjs} +1 -1
- package/dist/{index-C4nMBT92.cjs → index-kTzoP5l8.cjs} +1 -1
- package/dist/index-vcclM6Nr.cjs +1 -0
- package/dist/{index-MewL72fy.cjs → index-wtgVfFUI.cjs} +1 -1
- package/dist/index-xwjGwnze.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_4f426cef_lang-Cr0accxl.cjs → index.vue_vue_type_script_setup_true_lang-C1fVVjab.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CDLfXFNW.js → index.vue_vue_type_script_setup_true_lang-C2Tkzeyh.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-Db8cNtot.cjs → index.vue_vue_type_script_setup_true_lang-CnWTLMvm.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_4f426cef_lang-CDM-XK-7.js → index.vue_vue_type_script_setup_true_lang-DPGTAlms.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-BoQmHMVX.cjs → index.vue_vue_type_style_index_0_scoped_997b1786_lang-4opgAMoq.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_997b1786_lang-l-5vQe28.js → index.vue_vue_type_style_index_0_scoped_997b1786_lang-FQ3ufMBI.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-Dg1aM1vB.cjs → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CBDePprB.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-sSXXx2kK.js → index.vue_vue_type_style_index_0_scoped_cea2aaad_lang-CnIMGYMj.js} +8 -8
- package/dist/{login-BCk4u_Dk.cjs → login-BU4ZYRf7.cjs} +1 -1
- package/dist/{login-BT_LpH38.js → login-DlVWeoQw.js} +2 -2
- package/dist/{main-Bn3G0kZ8.js → main-BB2lrzIa.js} +6 -6
- package/dist/{main-BUPyIPK7.cjs → main-tYN6L4Qm.cjs} +1 -1
- package/dist/{menu-D0Ty9T6w.js → menu-CoVhnbPn.js} +1 -1
- package/dist/{menu-4Vqp-Btb.cjs → menu-M7COGoA-.cjs} +1 -1
- package/dist/{modelComp-Ch2O4K6c.cjs → modelComp-BmjghJQ0.cjs} +1 -1
- package/dist/{modelComp-D5ZWRGgs.js → modelComp-TQlTSAdj.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- 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/public/icons/svg/Cancel.svg +1 -0
- package/public/icons/svg/Save.svg +1 -0
- package/public/icons/svg/Step.svg +1 -1
- package/public/icons/svg/Store.svg +1 -0
- package/dist/array-CVkXbBWT.cjs +0 -7
- package/dist/array-ozl4CvW9.js +0 -2805
- package/dist/index-BHKBSiyl.cjs +0 -1
- package/dist/index-BK3YFHYS.cjs +0 -1
- package/dist/index-CsqcmYNg.cjs +0 -1
- package/dist/index-Cx-v5nFX.js +0 -229
- package/dist/index-D5NrwWww.cjs +0 -1
- package/dist/index-DKMnuAFY.js +0 -583
- package/dist/index-cKyeFEHx.cjs +0 -9
- package/dist/index-pPl2pl1H.cjs +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const X=require("./index-C2OSPvvg.cjs"),e=require("vue"),ce=require("./index-Dk3kLM0U.cjs"),q=require("./index-cBmyaP1D.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./cloneDeep-DC8YpUZ0.cjs"),ie=require("./index-C4EK74Eg.cjs"),te=require("./menu-M7COGoA-.cjs"),ol=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),al=require("./modelComp-BmjghJQ0.cjs"),xe=require("./index.vue_vue_type_script_setup_true_lang-C1fVVjab.cjs"),sl=o=>o.match(/\((.*)\)/)[1],pe=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],ue=[{label:"输入框",value:"Input"},{label:"单选框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"}],tl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"}],rl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Select"},{key:"contents",label:"选项值",type:"Input"}],cl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Date"}],il=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue},{key:"originalContent",label:"初始值",type:"Input"}],ul=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:ue}],ee=[{key:"Input",value:tl},{key:"Select",value:rl},{key:"Date",value:cl},{key:"TextArea",value:il},{key:"Upload",value:ul}],pl=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],oe=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:pl},{key:"background",label:"颜色",type:"Color"}],dl={class:"form-content"},fl={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(o,{emit:s}){const n=o,l=s,a=e.ref([]),t=e.ref(!1),r=e.ref([]),m=X.useFormToTableComp(ce.pinia),k=e.ref(!1),y=e.ref(),C=g=>{var A,i,c,p;const N=(i=(A=h.cloneDeep(n.itemData))==null?void 0:A.find(u=>(u==null?void 0:u.key)==="formContent"))==null?void 0:i.contents,_=h.cloneDeep(g.content);let V={};_&&((c=Object.values(_))==null?void 0:c.length)>0&&((p=Object.values(_))==null||p.forEach((u,b)=>{V[N[b].key]=u}));const D={content:V,index:n==null?void 0:n.index,buttonName:g==null?void 0:g.buttonName};l("change",D)},E=g=>{var V,D;if(!g)return;if(((V=Object.values(h.cloneDeep(g)))==null?void 0:V.length)>0){const A=(D=Object.values(h.cloneDeep(g)))==null?void 0:D.map(c=>c);let i="";A==null||A.forEach(c=>{c!==""&&c!==void 0&&(i=i===""?c:i+"/"+c)}),m.setSelectArray(A),m.setSelectString(i)}const N=h.cloneDeep(n.itemData),_=N==null?void 0:N.map(A=>{var i;return(A==null?void 0:A.key)==="formContent"&&((i=A.contents)==null||i.map((c,p)=>{var u,b,O,x,F,f,w,B,d,I,v,T,$,L,S,j,W,G,K;return c.type=c!=null&&c.type?c.type:(x=(O=(b=(u=c==null?void 0:c.key)==null?void 0:u.split("$"))==null?void 0:b[1])==null?void 0:O.split("("))!=null&&x[0]?(F=pe==null?void 0:pe.find(Q=>{var ne,M,Z,H;return(Q==null?void 0:Q.key)===((H=(Z=(M=(ne=c==null?void 0:c.key)==null?void 0:ne.split("$"))==null?void 0:M[1])==null?void 0:Z.split("("))==null?void 0:H[0])}))==null?void 0:F.value:"Input",c.options=c!=null&&c.options?c.options:((B=(w=(f=c==null?void 0:c.key)==null?void 0:f.split("$"))==null?void 0:w[1])==null?void 0:B.length)>0?(T=(v=sl((I=(d=c==null?void 0:c.key)==null?void 0:d.split("$"))==null?void 0:I[1]))==null?void 0:v.split(","))==null?void 0:T.map(Q=>({label:Q,value:Q})):[],($=c==null?void 0:c.key)!=null&&$.includes("$")&&(c.key=(S=(L=c==null?void 0:c.key)==null?void 0:L.split("$"))==null?void 0:S[0]),c.value=Array.isArray((j=Object.values(g))==null?void 0:j[p])?(G=(W=Object.values(g))==null?void 0:W[p])==null?void 0:G[0]:(K=Object.values(g))==null?void 0:K[p],c})),A});l("contentChange",{contents:_,index:n.index})};return e.watch(()=>n.itemData,()=>{var A,i,c,p,u,b,O,x,F,f,w;const g=(A=h.cloneDeep(n.itemData))==null?void 0:A.find(B=>(B==null?void 0:B.key)==="formContent"),N=(i=h.cloneDeep(n.itemData))==null?void 0:i.find(B=>(B==null?void 0:B.key)==="formButton"),_=(c=h.cloneDeep(n.itemData))==null?void 0:c.find(B=>(B==null?void 0:B.key)==="formFlex"),V=(p=h.cloneDeep(n.itemData))==null?void 0:p.find(B=>(B==null?void 0:B.key)==="formWrap"),D=(u=h.cloneDeep(n.itemData))==null?void 0:u.find(B=>(B==null?void 0:B.key)==="enableWrap");if((V==null?void 0:V.contents)==="纵向"?t.value=!1:t.value=!0,k.value=(D==null?void 0:D.contents)===void 0?!1:D==null?void 0:D.contents,y.value=typeof(_==null?void 0:_.contents)!="boolean"?!(!(_!=null&&_.contents)===""||((b=_==null?void 0:_.contents)==null?void 0:b.toUpperCase())==="VERTICAL"):_==null?void 0:_.contents,((O=g==null?void 0:g.contents)==null?void 0:O.length)>0&&Array.isArray(g==null?void 0:g.contents)){const B=[];(x=g==null?void 0:g.contents)==null||x.forEach((v,T)=>{var $,L,S,j,W,G,K,Q,ne,M;if((v==null?void 0:v.label)!==""){let Z=(v==null?void 0:v.label)??(v==null?void 0:v.key)??"",H=(v==null?void 0:v.type)??"",z=(v==null?void 0:v.options)??[];if(($=v==null?void 0:v.key)!=null&&$.includes("$")&&(Z=(L=h.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:L[0],((j=(S=h.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:S[1])==null?void 0:j.length)>0)){const[Y,J]=(G=(W=h.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:W[1])==null?void 0:G.split(/[()]/);H=((K=pe.find(ae=>(ae==null?void 0:ae.key)===Y))==null?void 0:K.value)??"",((Q=J==null?void 0:J.split(","))==null?void 0:Q.length)>0&&(z=(ne=J==null?void 0:J.split(","))==null?void 0:ne.map(ae=>({label:ae,value:ae})))}B.push({label:Z??"",name:"t"+T,type:H===""?"Input":H,value:v!=null&&v.value?v.value:(z==null?void 0:z.length)>0?(M=z==null?void 0:z[0])==null?void 0:M.value:(v==null?void 0:v.value)??"",id:(v==null?void 0:v.id)??T,contents:z??[],width:(v==null?void 0:v.width)??1})}});const d=(F=h.cloneDeep(B))==null?void 0:F.map(v=>v.value);let I="";d==null||d.forEach(v=>{v!==""&&v!==void 0&&(I=I===""?v:I+"/"+v)}),m.setSelectArray(d),m.setSelectString(I),a.value=B}else a.value=[];if(((f=N==null?void 0:N.contents)==null?void 0:f.length)>0){const B=[];(w=N==null?void 0:N.contents)==null||w.forEach((d,I)=>{(d==null?void 0:d.label)!==""&&B.push({label:(d==null?void 0:d.label)??"",id:(d==null?void 0:d.id)??I,type:(d==null?void 0:d.type)??"",background:d==null?void 0:d.background})}),r.value=B}else r.value=[]},{deep:!0,immediate:!0}),(g,N)=>(e.openBlock(),e.createElementBlock("div",dl,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:a.value,formRules:o.formRules,buttonValue:r.value,isRowFlex:y.value,isEnableWrap:k.value,onOnButtonClick:C,onChange:E,isButtonRow:t.value,key:n.itemData},null,8,["rowContents","formRules","buttonValue","isRowFlex","isEnableWrap","isButtonRow"]))]))}},Ne=le._export_sfc(fl,[["__scopeId","data-v-63ad44fd"]]),ye=e.ref(0),Fe=o=>{var s;return!o||(o==null?void 0:o.length)===0?[]:(s=h.cloneDeep(o))==null?void 0:s.map(l=>(ye.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)??ye.value,children:Fe(l==null?void 0:l.children)},l))},hl=o=>{var n;return(n=h.cloneDeep(o))==null?void 0:n.map(l=>(ye.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)??ye.value,children:Fe(l==null?void 0:l.children)},l))},Le=(o,s)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===s)?(n=h.cloneDeep(o))==null?void 0:n.filter(a=>(a==null?void 0:a.id)!==s):(o=o==null?void 0:o.map(l=>(l.children=Le(l==null?void 0:l.children,s),l)),o)},je=(o,s)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(n=h.cloneDeep(o))==null?void 0:n.map(a=>((a==null?void 0:a.id)===(s==null?void 0:s.id)&&(a=s),a)):(o=o==null?void 0:o.map(l=>(l.children=je(l==null?void 0:l.children,s),l)),o)},Je=(o,s)=>{var n;return o!=null&&o.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(n=h.cloneDeep(o))==null?void 0:n.map(a=>((a==null?void 0:a.id)===(s==null?void 0:s.id)&&(a!=null&&a.children||(a.children=[]),a.children.push(s.contents)),a)):(o=o==null?void 0:o.map(l=>(l.children=Je(l==null?void 0:l.children,s),l)),o)},P=[{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"}],ml={class:"table-header-child"},yl={class:"table-header-child-main"},kl={class:"table-header-child-content"},gl={class:"table-header-child-content-item"},bl={class:"fix-button"},vl=["onClick"],Cl=["onClick"],Dl=["onClick"],_l={key:0},El={class:"form-content"},$l={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(!1),t=e.ref(""),r=e.ref(0),m=e.ref(""),k=e.ref([]),y=e.ref([]),C=i=>{var p;a.value=!0;let c=[];P==null||P.forEach(u=>{r.value++,c.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:i[u.key],id:r.value,contents:u==null?void 0:u.options})}),i!=null&&i.children&&((p=i==null?void 0:i.children)==null?void 0:p.length)>0&&c.push({children:i==null?void 0:i.children,isFormColHidden:!0}),m.value=i==null?void 0:i.id,k.value=c,y.value=c},E=i=>{l("fixChange",h.cloneDeep(i))},g=i=>{l("deleteChange",h.cloneDeep(i))},N=i=>{a.value=!0;let c=[];P==null||P.forEach(p=>{r.value++,c.push({label:p==null?void 0:p.label,name:p==null?void 0:p.label,type:p.type,value:"",id:r.value,contents:p==null?void 0:p.options})}),t.value=i==null?void 0:i.id,k.value=c,y.value=c},_=i=>{let c=h.cloneDeep(y.value);c=c==null?void 0:c.map(p=>(p.children||(p.value=i==null?void 0:i[p.name]),p)),y.value=c},V=()=>{var c;k.value=y.value;let i={};m.value!==""?i.id=m.value:(r.value++,i.id="id"+r.value),(c=k.value)==null||c.forEach(p=>{const u=P==null?void 0:P.find(b=>(b==null?void 0:b.label)===(p==null?void 0:p.label));u?i[u.key]=p.value:p!=null&&p.children&&p.children.length>0&&(i.children=p.children)}),a.value=!1,l("fixChange",{contents:h.cloneDeep(i),id:t.value})},D=()=>{a.value=!1,m.value="",t.value="",k.value=[],y.value=[]},A=i=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",i),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(i,c)=>(e.openBlock(),e.createElementBlock("div",ml,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(p,u)=>(e.openBlock(),e.createElementBlock("div",yl,[e.createElementVNode("div",kl,[e.createElementVNode("div",gl,e.toDisplayString(p.label),1),e.createElementVNode("div",bl,[e.createElementVNode("div",{class:"icon-content",onClick:b=>N(p)},e.toDisplayString("新增"),8,vl),e.createElementVNode("div",{class:"icon-content",onClick:b=>C(p)},e.toDisplayString("修改"),8,Cl),e.createElementVNode("div",{class:"icon-content",onClick:b=>A(p)},e.toDisplayString("删除"),8,Dl)])]),p!=null&&p.children&&p.children.length>0?(e.openBlock(),e.createElementBlock("div",_l,[e.createVNode(Ue,{tableChildContents:p==null?void 0:p.children,onDeleteChange:g,onFixChange:E},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(q.ssDialog,{visible:a.value,onBeforeDestroy:D,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",El,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:_},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:D,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:V},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},xl=le._export_sfc($l,[["__scopeId","data-v-b6884f79"]]),Nl={class:"table-header-child"},Al={class:"table-header-child-main"},Bl={class:"table-header-child-content"},wl={class:"table-header-child-content-item"},Il={class:"fix-button"},Tl=["onClick"],Vl=["onClick"],Ol=["onClick"],Sl={key:0},Fl={class:"form-content"},Ll={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(!1),t=e.ref(""),r=e.ref(0),m=e.ref(""),k=e.ref([]),y=e.ref([]),C=i=>{l("fixChange",h.cloneDeep(i))},E=i=>{var p;a.value=!0;let c=[];P==null||P.forEach(u=>{r.value++,c.push({label:u==null?void 0:u.label,name:u==null?void 0:u.label,type:u.type,value:i[u.key],id:r.value,contents:u==null?void 0:u.options})}),i!=null&&i.children&&((p=i==null?void 0:i.children)==null?void 0:p.length)>0&&c.push({children:i==null?void 0:i.children,isFormColHidden:!0}),m.value=i==null?void 0:i.id,k.value=c,y.value=c},g=i=>{a.value=!0;let c=[];P==null||P.forEach(p=>{r.value++,c.push({label:p==null?void 0:p.label,name:p==null?void 0:p.label,type:p.type,value:"",id:r.value,contents:p==null?void 0:p.options})}),t.value=i==null?void 0:i.id,k.value=c,y.value=c},N=i=>{let c=h.cloneDeep(y.value);c=c==null?void 0:c.map(p=>(p.children||(p.value=i==null?void 0:i[p.name]),p)),y.value=c},_=()=>{var c;k.value=y.value;let i={};m.value!==""?i.id=m.value:(r.value++,i.id="id"+r.value),(c=k.value)==null||c.forEach(p=>{const u=P==null?void 0:P.find(b=>(b==null?void 0:b.label)===(p==null?void 0:p.label));u?i[u.key]=p.value:p!=null&&p.children&&p.children.length>0&&(i.children=p.children)}),a.value=!1,l("fixChange",{contents:h.cloneDeep(i),id:t.value})},V=()=>{a.value=!1,m.value="",t.value="",k.value=[],y.value=[]},D=i=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",i),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},A=i=>{l("deleteChange",i)};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n==null?void 0:n.tableChildContents,(p,u)=>(e.openBlock(),e.createElementBlock("div",Al,[e.createElementVNode("div",Bl,[e.createElementVNode("div",wl,e.toDisplayString(p.label),1),e.createElementVNode("div",Il,[e.createElementVNode("div",{class:"icon-content",onClick:b=>g(p)},e.toDisplayString("新增"),8,Tl),e.createElementVNode("div",{class:"icon-content",onClick:b=>E(p)},e.toDisplayString("修改"),8,Vl),e.createElementVNode("div",{class:"icon-content",onClick:b=>D(p)},e.toDisplayString("删除"),8,Ol)])]),p!=null&&p.children&&p.children.length>0?(e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(xl,{tableChildContents:p==null?void 0:p.children,onDeleteChange:A,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(q.ssDialog,{visible:a.value,onBeforeDestroy:V,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Fl,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:k.value,key:k.value,isEnableWrap:!0,onChange:N},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:V,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:_},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Ue=le._export_sfc(Ll,[["__scopeId","data-v-cf81887a"]]),jl={class:"table-operate-content"},Jl={class:"table-operate-item"},Ul={class:"operate-title"},Pl={class:"operate-content"},Rl={class:"fix-content"},Wl={class:"fix-content-label"},zl={class:"fix-button"},Ml=["onClick"],Gl=["onClick"],ql=["onClick"],Hl={key:0},Zl={class:"form-content"},Kl={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=o,l=s,a=e.ref([]),t=e.ref(!1),r=e.ref([]),m=e.ref([]),k=e.ref([]),y=e.ref(""),C=e.ref(""),E=e.ref(0),g=()=>{t.value=!0;let u=[];P==null||P.forEach(b=>{E.value++,u.push({label:b==null?void 0:b.label,name:b==null?void 0:b.label,type:b.type,value:"",id:E.value,contents:b==null?void 0:b.options})}),m.value=u,k.value=u},N=u=>{t.value=!0;let b=[];P==null||P.forEach(O=>{E.value++,b.push({label:O==null?void 0:O.label,name:O==null?void 0:O.label,type:O.type,value:"",id:E.value,contents:O==null?void 0:O.options})}),m.value=b,C.value=u==null?void 0:u.id,k.value=b},_=u=>{var b;r.value=Le(h.cloneDeep(r.value),u==null?void 0:u.id),l("change",(b=h.cloneDeep(n.originalItemContents))==null?void 0:b.map(O=>{var x;return(O==null?void 0:O.key)==="header"&&(O.contents=(x=r.value)!=null&&x.some(F=>F==null?void 0:F.children)?[r.value]:r.value),O}))},V=u=>{var O,x,F;u.id===""?r.value=je(r.value,u==null?void 0:u.contents):r.value=Je(r.value,u),r.value=(O=r.value)!=null&&O.some(f=>f==null?void 0:f.children)?[r.value]:r.value,y.value="";let b=h.cloneDeep(n.originalItemContents);(x=h.cloneDeep(n.originalItemContents))!=null&&x.find(f=>(f==null?void 0:f.key)==="header")?b=(F=h.cloneDeep(n.originalItemContents))==null?void 0:F.map(f=>((f==null?void 0:f.key)==="header"&&(f.contents=r.value),f)):b.push({key:"header",contents:r.value}),l("change",b)},D=u=>{var O;t.value=!0;let b=[];P==null||P.forEach(x=>{E.value++,b.push({label:x==null?void 0:x.label,name:x==null?void 0:x.label,type:x.type,value:u[x.key],id:E.value,contents:x==null?void 0:x.options})}),u!=null&&u.children&&((O=u==null?void 0:u.children)==null?void 0:O.length)>0&&b.push({children:u==null?void 0:u.children,isFormColHidden:!0}),y.value=u==null?void 0:u.id,C.value="",m.value=b,k.value=b},A=u=>{let b=h.cloneDeep(k.value);b=b==null?void 0:b.map(O=>(O.children||(O.value=u==null?void 0:u[O.name]),O)),k.value=b},i=()=>{t.value=!1,y.value="",C.value="",k.value=[]},c=()=>{var O,x,F,f,w,B;m.value=k.value;let u={};if(y.value!==""?u.id=y.value:(E.value++,u.id="id"+E.value),(O=m.value)==null||O.forEach(d=>{const I=P==null?void 0:P.find(v=>(v==null?void 0:v.label)===(d==null?void 0:d.label));I?u[I.key]=d.value:d!=null&&d.children&&d.children.length>0&&(u.children=d.children)}),(x=r.value)!=null&&x.find(d=>d.id===u.id))r.value=(F=r.value)==null?void 0:F.map(d=>(d.id===u.id&&(d=u),d));else{let d=h.cloneDeep(r.value);C.value===""?d.push(u):d=d==null?void 0:d.map(I=>(I.id===C.value&&(I.children||(I.children=[]),I.children.push(u)),I)),r.value=d}r.value=(f=r.value)!=null&&f.some(d=>d==null?void 0:d.children)?[r.value]:r.value,t.value=!1,y.value="",C.value="";let b=h.cloneDeep(n.originalItemContents);(w=h.cloneDeep(n.originalItemContents))!=null&&w.find(d=>(d==null?void 0:d.key)==="header")?b=(B=h.cloneDeep(n.originalItemContents))==null?void 0:B.map(d=>((d==null?void 0:d.key)==="header"&&(d.contents=r.value),d)):b.push({key:"header",contents:r.value}),l("change",b)},p=u=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var b,O;r.value=(b=h.cloneDeep(r.value))==null?void 0:b.filter(x=>(x==null?void 0:x.id)!==(u==null?void 0:u.id)),l("change",(O=h.cloneDeep(n.originalItemContents))==null?void 0:O.map(x=>{var F;return(x==null?void 0:x.key)==="header"&&(x.contents=(F=r.value)!=null&&F.some(f=>f==null?void 0:f.children)?[r.value]:r.value),x})),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>n.originalItemContents,()=>{var u,b,O,x,F;!n.originalItemContents||n.originalItemContents.length===0||(a.value=h.cloneDeep(n.originalItemContents),r.value=(b=(u=a.value)==null?void 0:u.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:b.contents,r.value=(O=r.value)==null?void 0:O.map((f,w)=>(Array.isArray(f)?f=hl(f):f={label:(f==null?void 0:f.label)??"",prop:(f==null?void 0:f.label)==="操作"?"operate":f==null?void 0:f.prop,width:f!=null&&f.width?parseInt(f.width):"",fixed:(f==null?void 0:f.fixed)??void 0,sortable:(f==null?void 0:f.sortable)??!1,align:(f==null?void 0:f.align)??"center",showOverflowTooltip:(f==null?void 0:f.showOverflowTooltip)??!0,isNotDrag:(f==null?void 0:f.isNotDrag)??!1,isEditCol:(f==null?void 0:f.isEditCol)??!1,isOperate:(f==null?void 0:f.isOperate)??!1,id:(f==null?void 0:f.id)??w},f)),r.value=(x=r.value)!=null&&x.every(f=>Array.isArray(f))?(F=r.value)==null?void 0:F[0]:r.value)},{deep:!0,immediate:!0}),(u,b)=>{const O=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",jl,[e.createElementVNode("div",Jl,[e.createElementVNode("div",Ul,[b[1]||(b[1]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:g},[e.createVNode(O,{name:"Plus",class:"icon-size"}),b[0]||(b[0]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Pl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(x,F)=>(e.openBlock(),e.createElementBlock("div",{key:F},[e.createElementVNode("div",Rl,[e.createElementVNode("div",Wl,e.toDisplayString(x==null?void 0:x.label),1),e.createElementVNode("div",zl,[e.createElementVNode("div",{class:"icon-content",onClick:f=>N(x)},e.toDisplayString("新增"),8,Ml),e.createElementVNode("div",{class:"icon-content",onClick:f=>D(x)},e.toDisplayString("修改"),8,Gl),e.createElementVNode("div",{class:"icon-content",onClick:f=>p(x)},e.toDisplayString("删除"),8,ql)])]),x!=null&&x.children&&x.children.length>0?(e.openBlock(),e.createElementBlock("div",Hl,[e.createVNode(Ue,{tableChildContents:x==null?void 0:x.children,onDeleteChange:_,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))])]),e.createVNode(q.ssDialog,{visible:t.value,onBeforeDestroy:i,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Zl,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:A},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:i,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:c},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},Ql=le._export_sfc(Kl,[["__scopeId","data-v-663591e4"]]),Xl={class:"form-operate-content"},Yl={class:"form-operate-item"},en={class:"operate-title"},ln={class:"operate-content"},nn={class:"fix-content"},on={class:"fix-button"},an=["onClick"],sn=["onClick"],tn={class:"operate-title"},rn={class:"operate-content"},cn={class:"fix-content"},un={class:"fix-button"},pn=["onClick"],dn=["onClick"],fn={style:{display:"flex","justify-content":"space-between"}},hn={class:"form-content"},mn={class:"form-content"},yn={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(!1),t=e.ref([]),r=e.ref([]),m=e.ref(!1),k=e.ref([]),y=e.ref([]),C=e.ref(""),E=e.ref(!1),g=e.ref(0),N=e.ref([]),_=e.ref([]),V=f=>{var B,d;a.value=!0;let w=[];(d=(B=ee==null?void 0:ee.find(I=>(I==null?void 0:I.key)===((f==null?void 0:f.type)===""?"Input":f==null?void 0:f.type)))==null?void 0:B.value)==null||d.forEach(I=>{g.value++,w.push({label:I==null?void 0:I.label,name:I==null?void 0:I.label,type:I.type,value:(I==null?void 0:I.label)==="类型"&&f[I.key]===""?"Input":f[I.key],id:g.value,contents:I==null?void 0:I.options})}),C.value=f==null?void 0:f.id,t.value=w,r.value=w},D=f=>{m.value=!0;let w=[];oe==null||oe.forEach(B=>{g.value++,w.push({label:B==null?void 0:B.label,name:B==null?void 0:B.label,type:B.type,value:(B==null?void 0:B.label)==="类型"&&f[B.key]===""?"normal":f[B.key],id:g.value,contents:B==null?void 0:B.options})}),N.value=w,_.value=w,C.value=f==null?void 0:f.id};e.watch(()=>E.value,()=>{var w,B;let f=h.cloneDeep(n.originalItemContents);(w=h.cloneDeep(n.originalItemContents))!=null&&w.find(d=>(d==null?void 0:d.key)==="enableWrap")?f=(B=h.cloneDeep(n.originalItemContents))==null?void 0:B.map(d=>((d==null?void 0:d.key)==="enableWrap"&&(d.contents=!E.value),d)):f.push({key:"enableWrap",contents:!E.value}),l("change",f)},{deep:!0,immediate:!0});const A=()=>{var B,d,I,v,T;N.value=_.value;let f={};if(C.value!==""?f.id=C.value:(g.value++,f.id="id"+g.value),(B=N.value)==null||B.forEach($=>{const L=oe==null?void 0:oe.find(S=>(S==null?void 0:S.label)===($==null?void 0:$.label));L&&(f[L.key]=$.value)}),(d=k.value)!=null&&d.find($=>$.id===f.id))k.value=(I=k.value)==null?void 0:I.map($=>($.id===f.id&&($=f),$));else{let $=h.cloneDeep(k.value);k.value||(k.value=[]),$.push(f),k.value=$}m.value=!1,C.value="";let w=h.cloneDeep(n.originalItemContents);(v=h.cloneDeep(n.originalItemContents))!=null&&v.find($=>($==null?void 0:$.key)==="formButton")?w=(T=h.cloneDeep(n.originalItemContents))==null?void 0:T.map($=>(($==null?void 0:$.key)==="formButton"&&($.contents=k.value),$)):w.push({key:"formButton",contents:k.value}),l("change",w)},i=f=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var w,B;y.value=(w=h.cloneDeep(y.value))==null?void 0:w.filter(d=>(d==null?void 0:d.id)!==(f==null?void 0:f.id)),l("change",(B=h.cloneDeep(n.originalItemContents))==null?void 0:B.map(d=>((d==null?void 0:d.key)==="formContent"&&(d.contents=y.value),d))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},c=f=>{ie.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var w,B;k.value=(w=h.cloneDeep(k.value))==null?void 0:w.filter(d=>(d==null?void 0:d.id)!==(f==null?void 0:f.id)),l("change",(B=h.cloneDeep(n.originalItemContents))==null?void 0:B.map(d=>((d==null?void 0:d.key)==="formButton"&&(d.contents=k.value),d))),te.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},p=()=>{m.value=!0;let f=[];oe==null||oe.forEach(w=>{g.value++,f.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:(w==null?void 0:w.label)==="类型"?"normal":"",id:g.value,contents:w==null?void 0:w.options})}),N.value=f,_.value=f},u=()=>{var w,B;a.value=!0;let f=[];(B=(w=ee==null?void 0:ee.find(d=>(d==null?void 0:d.key)==="Input"))==null?void 0:w.value)==null||B.forEach(d=>{g.value++,f.push({label:d==null?void 0:d.label,name:d==null?void 0:d.label,type:d.type,value:(d==null?void 0:d.label)==="类型"?"Input":"",id:g.value,contents:d==null?void 0:d.options})}),t.value=f,r.value=f},b=f=>{let w=h.cloneDeep(_.value);w=w==null?void 0:w.map(B=>(B.value=f==null?void 0:f[B.name],B)),_.value=w},O=f=>{var w,B,d,I;if((f==null?void 0:f.类型)!==((B=(w=r.value)==null?void 0:w.find(v=>(v==null?void 0:v.label)==="类型"))==null?void 0:B.value)){let v=[];(I=(d=ee==null?void 0:ee.find(T=>(T==null?void 0:T.key)===((f==null?void 0:f.类型)===""?"Input":f==null?void 0:f.类型)))==null?void 0:d.value)==null||I.forEach(T=>{g.value++,v.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:(f==null?void 0:f[T.label])??"",id:g.value,contents:T==null?void 0:T.options})}),r.value=v,t.value=v}else{let v=h.cloneDeep(r.value);v=v==null?void 0:v.map(T=>(T.value=f==null?void 0:f[T.name],T)),r.value=v}},x=()=>{var d,I,v,T,$,L;t.value=r.value;let f={};C.value!==""?f.id=C.value:(g.value++,f.id="id"+g.value);let w=(d=ee==null?void 0:ee.find(S=>{var j,W;return(S==null?void 0:S.key)===(((W=(j=t.value)==null?void 0:j.find(G=>(G==null?void 0:G.label)==="类型"))==null?void 0:W.value)??"label")}))==null?void 0:d.value;if((I=t.value)==null||I.forEach(S=>{const j=w==null?void 0:w.find(W=>(W==null?void 0:W.label)===(S==null?void 0:S.label));j&&(f[j.key]=S.value)}),f.width=1,(v=y.value)!=null&&v.find(S=>S.id===f.id))y.value=(T=y.value)==null?void 0:T.map(S=>(S.id===f.id&&(S=f),S));else{let S=h.cloneDeep(y.value);S.push(f),y.value=S}a.value=!1,C.value="";let B=h.cloneDeep(n.originalItemContents);($=h.cloneDeep(n.originalItemContents))!=null&&$.find(S=>(S==null?void 0:S.key)==="formContent")?B=(L=h.cloneDeep(n.originalItemContents))==null?void 0:L.map(S=>((S==null?void 0:S.key)==="formContent"&&(S.contents=y.value),S)):B.push({key:"formContent",contents:y.value}),l("change",B)},F=()=>{a.value=!1,m.value=!1,C.value="",r.value=[],_.value=[]};return e.watch(()=>n.originalItemContents,()=>{var w,B,d,I,v,T;if(!n.originalItemContents||n.originalItemContents.length===0)return;const f=h.cloneDeep(n.originalItemContents);y.value=((w=f==null?void 0:f.find($=>($==null?void 0:$.key)==="formContent"))==null?void 0:w.contents)??[],k.value=((B=f==null?void 0:f.find($=>($==null?void 0:$.key)==="formButton"))==null?void 0:B.contents)??[],E.value=((d=f==null?void 0:f.find($=>($==null?void 0:$.key)==="enableWrap"))==null?void 0:d.contents)!==void 0?!((I=f==null?void 0:f.find($=>($==null?void 0:$.key)==="enableWrap"))!=null&&I.contents):!0,y.value=(v=h.cloneDeep(y.value))==null?void 0:v.map(($,L)=>$={label:($==null?void 0:$.key)??($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",contents:($==null?void 0:$.options)??"",id:($==null?void 0:$.id)??L,value:($==null?void 0:$.value)??""}),k.value=(T=k.value)==null?void 0:T.map(($,L)=>$={label:($==null?void 0:$.label)??"",type:($==null?void 0:$.type)??"",background:($==null?void 0:$.background)??"var(--ssComponent-primary-color)",id:($==null?void 0:$.id)??L})},{deep:!0,immediate:!0}),(f,w)=>{const B=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Xl,[e.createElementVNode("div",Yl,[e.createElementVNode("div",en,[w[2]||(w[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:u},[e.createVNode(B,{name:"Plus",class:"icon-size"}),w[1]||(w[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",ln,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(d,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",nn,[e.createElementVNode("div",null,e.toDisplayString(d.label),1),e.createElementVNode("div",on,[e.createElementVNode("div",{class:"icon-content",onClick:v=>V(d)},e.toDisplayString("修改"),8,an),e.createElementVNode("div",{class:"icon-content",onClick:v=>i(d)},e.toDisplayString("删除"),8,sn)])])]))),128))]),e.createElementVNode("div",tn,[w[4]||(w[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:p},[e.createVNode(B,{name:"Plus",class:"icon-size"}),w[3]||(w[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(d,I)=>(e.openBlock(),e.createElementBlock("div",{key:I},[e.createElementVNode("div",cn,[e.createElementVNode("div",null,e.toDisplayString(d.label),1),e.createElementVNode("div",un,[e.createElementVNode("div",{class:"icon-content",onClick:v=>D(d)},e.toDisplayString("修改"),8,pn),e.createElementVNode("div",{class:"icon-content",onClick:v=>c(d)},e.toDisplayString("删除"),8,dn)])])]))),128))]),w[6]||(w[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",fn,[w[5]||(w[5]=e.createElementVNode("div",null,e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(q._sfc_main$1,{modelValue:E.value,"onUpdate:modelValue":w[0]||(w[0]=d=>E.value=d)},null,8,["modelValue"])])]),e.createVNode(q.ssDialog,{visible:a.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",hn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:t.value,key:t.value,isEnableWrap:!0,onChange:O},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:x},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(q.ssDialog,{visible:m.value,onBeforeDestroy:F,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",mn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:N.value,key:N.value,isEnableWrap:!0,onChange:b},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"])])}}},Ae=le._export_sfc(yn,[["__scopeId","data-v-d6fcac3c"]]),kn={class:"step-module content"},gn={class:"module-data"},bn={class:"step-module layout"},vn={class:"form-content"},Cn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=s,l=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:""},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:""},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:""}]),a=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),t=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),r=e.reactive({visible:!1,width:"40%",title:"步骤条"}),m=e.ref("create"),k=e.ref({}),y=e.ref([]),C=V=>{k.value=V,console.log("handleLayoutFormChange",k.value),n("change",N.value)},E=(V,D)=>{var A,i;switch(V){case"create":(A=a.value)==null||A.forEach(c=>{c.value=""}),m.value="create",r.visible=!0;break;case"update":(i=a.value)==null||i.forEach(c=>{c.value=D[c==null?void 0:c.prop]}),m.value="update",r.visible=!0;break;case"delete":y.value.splice(D,1),m.value="delete";break}},g=V=>{var D,A;if((V==null?void 0:V.buttonName)==="确认"){const i=h.cloneDeep(V==null?void 0:V.content);switch(Object.keys(i).forEach(c=>{i[c]===""&&delete i[c]}),m.value){case"create":y.value.push({...i,index:((D=y.value)==null?void 0:D.length)+1});break;case"update":y.value=(A=y.value)==null?void 0:A.map(c=>c.index===(i==null?void 0:i.index)?{...c,title:i==null?void 0:i.title,description:i==null?void 0:i.description}:c);break}n("change",N.value),r.visible=!1}else r.visible=!1},N=e.computed(()=>({comp:"Step",compData:[{key:"stepList",contents:y.value},{key:"stepConfig",contents:k.value}]})),_=()=>{r.visible=!1};return(V,D)=>{const A=e.resolveComponent("svg-icon"),i=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",kn,[D[2]||(D[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:D[0]||(D[0]=c=>E("create"))},[e.createVNode(A,{name:"Plus",class:"icon-size"}),D[1]||(D[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",gn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:p},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.title),1),e.createElementVNode("div",null,[e.createVNode(i,{type:"primary",size:"small",onClick:u=>E("update",{...c,index:p+1})},{default:e.withCtx(()=>D[3]||(D[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(i,{type:"danger",size:"small",onClick:u=>E("delete",p)},{default:e.withCtx(()=>D[4]||(D[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",bn,[D[5]||(D[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(q.ssForm,{rowContents:l.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(q.ssDialog,{visible:r.visible,title:r.title,onBeforeDestroy:_,width:r.width},{default:e.withCtx(()=>[e.createElementVNode("div",vn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:a.value,key:a.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:t.value,onOnButtonClick:g},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),Dn=le._export_sfc(Cn,[["__scopeId","data-v-51c0d5b6"]]),_n={class:"step-module content"},En={class:"module-data"},$n={class:"step-module layout"},xn={class:"form-content"},Nn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(o,{emit:s}){const n=s,l=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:""},{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:""},{label:"颜色:",prop:"color",type:"colorSelect",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}]},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:""},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:""}]),a=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),t=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),r=e.reactive({visible:!1,width:"40%",title:"时间线"}),m=e.ref("create"),k=e.ref({}),y=e.ref([]),C=V=>{k.value=V,console.log("handleLayoutFormChange",k.value),n("change",N.value)},E=(V,D)=>{var A,i;switch(V){case"create":(A=a.value)==null||A.forEach(c=>{c.value=""}),m.value="create",r.visible=!0;break;case"update":(i=a.value)==null||i.forEach(c=>{c.value=D[c==null?void 0:c.prop]}),m.value="update",r.visible=!0;break;case"delete":y.value.splice(D,1),m.value="delete";break}},g=V=>{var D,A;if(console.log(1212,V),(V==null?void 0:V.buttonName)==="确认"){const i=h.cloneDeep(V==null?void 0:V.content);switch(Object.keys(i).forEach(c=>{i[c]===""&&delete i[c]}),m.value){case"create":y.value.push({...i,index:((D=y.value)==null?void 0:D.length)+1});break;case"update":y.value=(A=y.value)==null?void 0:A.map(c=>c.index===(i==null?void 0:i.index)?{...c,content:i==null?void 0:i.content,timestamp:i==null?void 0:i.timestamp}:c);break}n("change",N.value),r.visible=!1}else r.visible=!1},N=e.computed(()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:y.value},{key:"timeLineConfig",contents:k.value}]})),_=()=>{r.visible=!1};return(V,D)=>{const A=e.resolveComponent("svg-icon"),i=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",_n,[D[2]||(D[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:D[0]||(D[0]=c=>E("create"))},[e.createVNode(A,{name:"Plus",class:"icon-size"}),D[1]||(D[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",En,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:p},[e.createElementVNode("span",null,e.toDisplayString(c==null?void 0:c.content),1),e.createElementVNode("div",null,[e.createVNode(i,{type:"primary",size:"small",onClick:u=>E("update",{...c,index:p+1})},{default:e.withCtx(()=>D[3]||(D[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(i,{type:"danger",size:"small",onClick:u=>E("delete",p)},{default:e.withCtx(()=>D[4]||(D[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",$n,[D[5]||(D[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(q.ssForm,{rowContents:l.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(q.ssDialog,{visible:r.visible,title:r.title,onBeforeDestroy:_,width:r.width},{default:e.withCtx(()=>[e.createElementVNode("div",xn,[(e.openBlock(),e.createBlock(q.ssForm,{rowContents:a.value,key:a.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:t.value,onOnButtonClick:g},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),An=le._export_sfc(Nn,[["__scopeId","data-v-f346e372"]]),Bn={class:"extra-content"},wn={key:0},In={key:1},Tn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(o,{emit:s}){const n=o,l=e.ref(0),a=e.ref(),t=e.ref(),r=s,m=e.ref(!1),k=e.ref({}),y=e.ref({}),C=e.ref();e.watch(()=>[n.itemData],()=>{var p;const c=h.cloneDeep(n.itemData);a.value=(p=h.cloneDeep(c))==null?void 0:p.map(u=>{var b;if(u.key==="extra"){let O=[];(b=u.value)==null||b.forEach(x=>{var F;O.push((F=Object.values(x))==null?void 0:F[0])}),u.value=O}return u})},{deep:!0,immediate:!0});const E=(c,p,u,b)=>{var x;let O={};((x=c==null?void 0:c[0])==null?void 0:x.contents)==="详情"&&(m.value=!0,O[p]=c,t.value=c==null?void 0:c.filter(F=>(F==null?void 0:F.key)!=="tableContentName"),k.value=O,y.value=u,C.value=b.id)},g=c=>{var F,f,w,B;const p=(f=(F=Object.values(h.cloneDeep(k.value)))==null?void 0:F[0])==null?void 0:f.filter(d=>(d==null?void 0:d.key)==="tableContentName"),u=(B=(w=Object.values(h.cloneDeep(k.value)))==null?void 0:w[0])==null?void 0:B.filter(d=>(d==null?void 0:d.key)!=="tableContentName"),b=u==null?void 0:u.map((d,I)=>{var v;return I===c.index&&(d==null?void 0:d.comp)==="Table"&&(d.compData=(v=d.compData)==null?void 0:v.map(T=>{var $,L;return(T==null?void 0:T.key)==="tableContents"&&(T.contents=(L=($=c.content)==null?void 0:$.map(S=>{let j={};for(let W in S)W!=="id"&&(j[W]=S[W]);return j}))==null?void 0:L.map(S=>Object.values(S))),T})),d});b.unshift(p==null?void 0:p[0]);let O=h.cloneDeep(k.value),x={};for(let d in O)x[d]=b;k.value=x},N=()=>{m.value=!1,k.value={},y.value={},C.value=void 0,l.value++},_=c=>{var F,f,w,B;const p=(f=(F=Object.values(h.cloneDeep(k.value)))==null?void 0:F[0])==null?void 0:f.filter(d=>(d==null?void 0:d.key)==="tableContentName"),u=(B=(w=Object.values(h.cloneDeep(k.value)))==null?void 0:w[0])==null?void 0:B.filter(d=>(d==null?void 0:d.key)!=="tableContentName"),b=u==null?void 0:u.map((d,I)=>(I===c.index&&(d.compData=c.contents),d));b.unshift(p==null?void 0:p[0]);let O=h.cloneDeep(k.value),x={};for(let d in O)x[d]=b;k.value=x},V=()=>{var p,u;let c={};for(let b in y.value)b===((p=Object.keys(k.value))==null?void 0:p[0])?c[b]=(u=Object.values(k.value))==null?void 0:u[0]:c[b]=y.value[b];r("change",{buttonName:"编辑",index:C.value,singleContent:c},"methodData"),m.value=!1,k.value={},y.value={},C.value=void 0},D=()=>{m.value=!1,k.value={},y.value={},C.value=void 0},A=c=>{r("change",c,"methodData")},i=c=>Pe(c);return(c,p)=>(e.openBlock(),e.createElementBlock("div",Bn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,b)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(u==null?void 0:u.key)==="extra"?(e.openBlock(),e.createElementBlock("div",wn)):(e.openBlock(),e.createElementBlock("div",In,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(u.comp)),{itemData:u==null?void 0:u.compData,childItemData:u==null?void 0:u.itemChildData,key:b,index:(u==null?void 0:u.id)??b,onContentClick:E,onChange:A},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(q.ssDialog,{visible:m.value,onBeforeDestroy:D},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(u,b)=>(e.openBlock(),e.createElementBlock("div",{key:b,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i(u.comp)),{itemData:u==null?void 0:u.compData,onChange:g,childItemData:u==null?void 0:u.itemChildData,key:b,onContentChange:_,index:(u==null?void 0:u.id)??b,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:N},e.toDisplayString("取消")),e.createElementVNode("div",{class:"confirm-button footer-button",onClick:V},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},Vn=le._export_sfc(Tn,[["__scopeId","data-v-b0b2f71f"]]),On={class:"method-content"},Sn=["onClick"],Fn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(o){const s=e.ref([]),n=o,l=al.useModelComp(ce.pinia),{itemData:a}=te.storeToRefs(l),t=(k,y)=>{var E;const C=(E=y==null?void 0:y[0])==null?void 0:E.children;return k==null?void 0:k.map(g=>{var N;return g=(N=g==null?void 0:g.map((_,V)=>{var D;return{key:(D=C[V])==null?void 0:D.label,value:_}}))==null?void 0:N.filter(_=>_.key),g})};e.watch(()=>a.value,async()=>{await m(h.cloneDeep(n.itemData))},{deep:!0});const r=async k=>{var i,c,p,u,b,O;let y={};if((i=h.cloneDeep(k.content))==null||i.forEach((x,F)=>{var f,w,B,d,I,v,T,$,L,S,j,W,G,K,Q,ne,M;if((x==null?void 0:x.comp)==="Table"){let Z=(d=(B=(w=(f=x==null?void 0:x.compData)==null?void 0:f.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:w.contents)==null?void 0:B[0])==null?void 0:d.some(J=>J==null?void 0:J.children),H=(T=(v=(I=x==null?void 0:x.compData)==null?void 0:I.find(J=>(J==null?void 0:J.key)==="tableContents"))==null?void 0:v.contents)==null?void 0:T.map(J=>J.slice(1)),z=(W=(j=(S=(L=($=x==null?void 0:x.compData)==null?void 0:$.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:L.contents)==null?void 0:S[0])==null?void 0:j[0])==null?void 0:W.label,Y=(Q=(K=(G=x==null?void 0:x.compData)==null?void 0:G.find(J=>(J==null?void 0:J.key)==="header"))==null?void 0:K.contents)==null?void 0:Q[0];if(Z)y[z]=t(H,Y);else{const J=[];Y=Y.slice(1,Y.length-1),Y==null||Y.forEach((ae,nl)=>{H==null||H.forEach($e=>{J.push({key:ae.label+$e[0],value:$e[nl+1]})})}),y["form"+F]=J}}else{const Z=(M=(ne=x.compData)==null?void 0:ne.find(z=>(z==null?void 0:z.key)==="formContent"))==null?void 0:M.contents;y.form={};const H=[];Z==null||Z.forEach(z=>{z.key!==""&&(z={key:z==null?void 0:z.key,value:z==null?void 0:z.value},H.push(z))}),y.form=H}}),k.api){const x=await ce.axios.post(k.api,{data:y,templateFileName:(c=k==null?void 0:k.extraContent)==null?void 0:c[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var C=new Blob([x.data],{type:"application/octet-stream;charset=UTF-8"}),E=x.headers["content-disposition"],g=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),N=g.exec(E),_=((b=(u=(p=k==null?void 0:k.extraContent)==null?void 0:p[0])==null?void 0:u.split("."))==null?void 0:b[0])+"."+((O=N[1].split("."))==null?void 0:O[1]),V=document.createElement("a"),D=window.URL.createObjectURL(C),A=/^["](.*)["]$/g;V.style.display="none",V.href=D,V.download=decodeURI(_.replace(A,"$1")),document.body.appendChild(V),V.click(),document.body.removeChild(V),window.URL.revokeObjectURL(D)}},m=async k=>{var g;const y=h.cloneDeep(k),C=y==null?void 0:y.map(async N=>{var c,p,u,b,O,x;const V=(c=(await ce.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:N.method}})).data.result)==null?void 0:c[0],D=await ce.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:V==null?void 0:V.id}}),A=await X.getItemData((p=N==null?void 0:N.value)==null?void 0:p[0],sessionStorage.getItem("systemKey"),""),i=(u=D.data.result)==null?void 0:u[0];return{buttonName:(b=V==null?void 0:V.key)==null?void 0:b.methodKey,api:(x=(O=i==null?void 0:i.value)==null?void 0:O.tableData)==null?void 0:x[0],content:A==null?void 0:A.filter(F=>F.comp!=="methodButton"),extraContent:h.cloneDeep(N.value).slice(1)}}),E=await Promise.all(C);s.value=E,(g=s.value)==null||g.forEach(N=>{var _;N.api===""&&((_=N.content)==null||_.forEach(V=>{var D;V.comp=="Table"&&l.setExtraContents(X.methodTableToContent(V.compData,(D=N.extraContent)==null?void 0:D[0]))}))})};return e.watch(()=>n.itemData,async()=>{await m(h.cloneDeep(n.itemData))},{immediate:!0,deep:!0}),(k,y)=>(e.openBlock(),e.createElementBlock("div",On,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,C=>(e.openBlock(),e.createElementBlock("div",null,[C.api!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:E=>r(C),class:"method-buttons"},e.toDisplayString(C.buttonName),9,Sn)):e.createCommentVNode("",!0)]))),256))]))}},Ln=le._export_sfc(Fn,[["__scopeId","data-v-3daae5c9"]]),jn=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(o,{emit:s}){const n=o,l=s,a=e.ref(1),t=e.computed(()=>{var E,g;return(E=n==null?void 0:n.stepConfig)!=null&&E.allowTrigger?a.value:(g=n==null?void 0:n.stepConfig)==null?void 0:g.active}),r=(E,g)=>{a.value=g,l("clickStep",E,g)},m=E=>q.getComponent(E),k=()=>{var g;const E=(g=n==null?void 0:n.stepList)==null?void 0:g.find((N,_)=>_+1===t.value);return console.log("findStep",E),E?E==null?void 0:E.children:[]},y=E=>{l("clickTrigger",E)},C=E=>{l("changeTrigger",E)};return(E,g)=>{var V,D,A,i,c;const N=e.resolveComponent("el-step"),_=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(_,{direction:(V=o.stepConfig)==null?void 0:V.direction,active:t.value,"finish-status":"success",simple:(D=o.stepConfig)==null?void 0:D.simple,"align-center":(A=o.stepConfig)==null?void 0:A.alignCenter},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.stepList,(p,u)=>(e.openBlock(),e.createBlock(N,{key:u,class:"step-item",onClick:b=>r(p,u+1)},{title:e.withCtx(()=>[e.renderSlot(E.$slots,"title",{title:p==null?void 0:p.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(E.$slots,"description",{description:p==null?void 0:p.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(i=o.stepConfig)!=null&&i.allowTrigger&&((c=o.stepConfig)!=null&&c.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(k(),(p,u)=>(e.openBlock(),e.createElementBlock("div",{key:u,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m(p==null?void 0:p.type)),{modelValue:p.value,"onUpdate:modelValue":b=>p.value=b,onClickTrigger:y,onChangeTrigger:C,content:p==null?void 0:p.content},e.createSlots({_:2},[e.renderList(E.$slots,(b,O)=>({name:O,fn:e.withCtx(x=>[e.renderSlot(E.$slots,O,e.mergeProps({ref_for:!0},x||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Jn=le._export_sfc(jn,[["__scopeId","data-v-003d9390"]]),Un=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(o,{emit:s}){const n=o,l=s,a=e.ref({}),t=e.ref([]),r=(m,k)=>{l("clickStep",m,k)};return e.watch(()=>n==null?void 0:n.itemData,m=>{var C,E;const k=(C=m==null?void 0:m.compData)==null?void 0:C.find(g=>(g==null?void 0:g.key)==="stepList"),y=(E=m==null?void 0:m.compData)==null?void 0:E.find(g=>(g==null?void 0:g.key)==="stepConfig");a.value=y==null?void 0:y.contents,t.value=k==null?void 0:k.contents}),(m,k)=>{const y=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Jn,{stepConfig:a.value,stepList:t.value,onClickStep:r},{icon:e.withCtx(()=>[e.createVNode(y,{name:"import"})]),title:e.withCtx(({title:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),description:e.withCtx(({description:C})=>[e.createTextVNode(e.toDisplayString(C),1)]),_:1},8,["stepConfig","stepList"])}}}),Pn=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(o){return(s,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,(t,r)=>(e.openBlock(),e.createBlock(l,{key:r,timestamp:t.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(s.$slots,"content",{content:t==null?void 0:t.content,timestamp:t==null?void 0:t.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Rn=le._export_sfc(Pn,[["__scopeId","data-v-4172a886"]]),Wn={class:"line-content"},zn={class:"line-time"},Mn=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(o){const s=o,n=e.ref({}),l=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,a=>{var m,k;const t=(m=a==null?void 0:a.compData)==null?void 0:m.find(y=>(y==null?void 0:y.key)==="timeLineList"),r=(k=a==null?void 0:a.compData)==null?void 0:k.find(y=>(y==null?void 0:y.key)==="timeLineConfig");n.value=r==null?void 0:r.contents,l.value=t==null?void 0:t.contents}),(a,t)=>(e.openBlock(),e.createBlock(Rn,{activities:l.value,timeLineConfig:n.value},{content:e.withCtx(({content:r,timestamp:m})=>[e.createElementVNode("span",Wn,e.toDisplayString(r),1),e.createElementVNode("span",zn,e.toDisplayString(m),1)]),_:1},8,["activities","timeLineConfig"]))}}),Gn=le._export_sfc(Mn,[["__scopeId","data-v-3f953594"]]),qn=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"}]),Hn={TABLE:X.ssTable,FORM:Ne,TABLEOPERATE:Ql,FORMOPERATE:Ae,FOLD:ol._sfc_main,CALCULATOR:Vn,METHODBUTTON:Ln,AVATARUPLOAD:xe.ssAvatar,SIGNATURE:xe._sfc_main,FORMTOP:Ne,STEP:Un,STEPOPERATE:Dn,TIMELINE:Gn,TIMELINEOPERATE:An,FORMTOPOPERATE:Ae};function Pe(o){return Hn[o==null?void 0:o.toUpperCase()]||null}const R=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],U=[{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"}],se=e.ref(0),Zn=o=>{const[s,n]=o.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},he=o=>{try{return JSON.parse(o),!0}catch{return!1}},Kn=o=>o.includes("$")&&o.trim().endsWith("(")?o+")":o,Qn=o=>{let s=o;const n=[];let l="";for(const a of s)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(),h.cloneDeep(l).split("{").length-1===h.cloneDeep(l).split("}").length-1&&h.cloneDeep(l).split("【").length-1===h.cloneDeep(l).split("】").length-1&&h.cloneDeep(l).split("[").length-1===h.cloneDeep(l).split("]").length-1&&h.cloneDeep(l).split("(").length-1===h.cloneDeep(l).split(")").length-1&&h.cloneDeep(l).split("(").length-1===h.cloneDeep(l).split(")").length-1&&h.cloneDeep(l).split("/*").length-1===h.cloneDeep(l).split("*/").length-1&&(n.push(l),l="")):n.push(a.trim());return n==null?void 0:n.filter(a=>a.includes("{"))},Xn=o=>{var n;let s=[];return(n=Qn(o.slice(1,-1)))==null||n.forEach(l=>{var t,r,m,k;let a=((r=(t=l.slice(1,-1))==null?void 0:t.split(","))==null?void 0:r.length)??1;(k=(m=l.slice(1,-1))==null?void 0:m.split(","))==null||k.forEach(y=>{var N,_,V,D,A,i,c,p,u,b,O,x,F;let C=y==null?void 0:y.split(":"),E=C!=null&&C[0]?(C==null?void 0:C[1].split("$").length)-1===1?((N=C==null?void 0:C[0])==null?void 0:N.replace(/^"(.*)"$/,"$1"))+((_=C==null?void 0:C[1])==null?void 0:_.replace(/^"(.*)"$/,"$1")):Array.isArray((D=(V=C==null?void 0:C[1])==null?void 0:V.replace(/^"(.*)"$/,"$1"))==null?void 0:D.split("("))&&((c=(i=(A=C==null?void 0:C[1])==null?void 0:A.replace(/^"(.*)"$/,"$1"))==null?void 0:i.split("("))==null?void 0:c.length)>1?((p=C==null?void 0:C[0])==null?void 0:p.replace(/^"(.*)"$/,"$1"))+((O=(b=(u=C==null?void 0:C[1])==null?void 0:u.replace(/^"(.*)"$/,"$1"))==null?void 0:b.split("("))==null?void 0:O[0])+"()":(x=C==null?void 0:C[0])==null?void 0:x.replace(/^"(.*)"$/,"$1"):"",g=(C==null?void 0:C[1].split("$").length)-1===0?(F=C==null?void 0:C[1])==null?void 0:F.replace(/^"(.*)"$/,"$1"):"";se.value++,s.push({id:se.value,key:E,value:g,width:a,extraContent:C==null?void 0:C[1]})})}),s},Re=o=>{var s,n;try{const l=o.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(h.cloneDeep(l).split("{").length-1>1){let a=h.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(he(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),he(a)){const t=JSON.parse(a);let r=[];return t==null||t.forEach(m=>{var k;(k=Object.entries(h.cloneDeep(m)))==null||k.forEach(y=>{se.value++,r.push({id:se.value,key:(y==null?void 0:y[0])??"",value:(y==null?void 0:y[1])===""?"":y==null?void 0:y[1],width:Object.keys(h.cloneDeep(m)).length})})}),r}else return l.trim().startsWith("{{")?Xn(l.trim()):be(a)}else if(he(l)){const a=JSON.parse(l);return Object.entries(a).map(([t,r])=>(se.value++,{id:se.value,key:t,value:r===""?"":r,width:1}))}else return((s=be(l))==null?void 0:s.length)===0?l:(n=be(l))==null?void 0:n.map(a=>({label:a.label,method:Kn(a.method)}))}catch(l){return console.error("转换失败:",l),[]}},be=o=>{o=o.trim().replace(/^\{|\}$/g,"").trim();const s=[];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 t="",r=0,m=!1,k="";for(let y=n;y<o.length;y++){const C=o[y];if((C==='"'||C==="'")&&!m?(m=!0,k=C):C===k&&m&&(m=!1,k=""),!m&&((C==="{"||C==="("||C==="[")&&r++,(C==="}"||C===")"||C==="]")&&r--,C===","&&r===0||y===o.length-1)){t=o.slice(n,y+1).trim(),n=y+1;break}}s.push({label:a,method:t})}return s},Yn=(o,s)=>{try{if(R!=null&&R.find(n=>(n==null?void 0:n.key)===s))return o.replace(/['"]/g,"").trim();if(h.cloneDeep(o).split("[").length-1>1){const n=h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(he(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return Re(h.cloneDeep(o))}}catch(n){return console.error("解析失败:",n),o}},eo=o=>({[o==null?void 0:o.key]:Yn(o==null?void 0:o.value,o==null?void 0:o.key)}),lo=o=>{try{if(h.cloneDeep(o).split("[").length-1>1){const s=h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(s){return console.error("解析失败:",s),o}},no=o=>{const s=o.match(/\(([^)]+)\)/);return s?s[1]:""},oo=o=>{const s=o.match(/^([^(]+)\s*\(/);return s?s[1].trim():o},Be=o=>o.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(s=>s.trim()).filter(s=>s).join("/"),ao=o=>{var r,m;let s=[],n=[];const l=(r=h.cloneDeep(o))==null?void 0:r.map(k=>k==null?void 0:k.key),a=[...new Set((m=h.cloneDeep(l))==null?void 0:m.map(k=>no(k)))];a==null||a.forEach(k=>{let y=o==null?void 0:o.filter(g=>g.key.includes(k));y==null||y.forEach(g=>{g!=null&&g.key.includes("Menus")&&(s.push({key:"GroupName",value:Be(g==null?void 0:g.value)}),n.push(Be(g==null?void 0:g.value)))});let C=o==null?void 0:o.filter(g=>g.key.includes(k)&&!(g!=null&&g.key.includes("Menus")));C=C==null?void 0:C.map(g=>(g.key=oo(g.key),g));const E={key:"GroupContents",value:C};s.push(E)});const t={key:"Menus",value:n};return s.unshift(t),s},We=o=>{var s,n;if(Array.isArray(Object.keys(o))&&((s=Object.keys(o))==null?void 0:s.length)>0){let l=[];return(n=Object.entries(o))==null||n.forEach(([a,t])=>{var m,k;let r=[];if(r.push(a),((m=Object.keys(t))==null?void 0:m.length)>0){let y=[];(k=We(t))==null||k.forEach(C=>{y.push(C)}),y==null||y.forEach(C=>{r.push(C)})}l.push(r)}),l}},so=(o,s)=>{var l;let n=s;return Array.isArray(Object.keys(o))&&((l=Object.entries(o))==null||l.forEach(([a,t])=>{let r=[a];if(typeof t=="object"&&t!==null){let m=We(t);m==null||m.forEach(k=>{r.push(k)})}n.push(r)})),n},to=o=>{const s={};return o.forEach(l=>{const a=l.split("/");let t=s;a.forEach(r=>{t[r]||(t[r]={}),t=t[r]})}),so(s,[])},ze=o=>to(o),ro=o=>{var s,n,l,a,t,r,m,k;try{const y=Ee((n=(s=h.cloneDeep(o))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")),C=(a=(l=h.cloneDeep(y))==null?void 0:l.filter(_=>!_.includes("/*")))==null?void 0:a.map(_=>Zn(_)),E=ao(C),g=[];if(((t=E==null?void 0:E.find(_=>(_==null?void 0:_.key)==="Menus"))==null?void 0:t.value.length)===0)return!1;(r=h.cloneDeep(E))==null||r.forEach(_=>{var V,D,A,i,c;R!=null&&R.find(p=>{var u,b;return((u=p==null?void 0:p.key)==null?void 0:u.toUpperCase())===((b=_==null?void 0:_.key)==null?void 0:b.toUpperCase())})?g.push({comp:((V=R==null?void 0:R.find(p=>{var u,b;return((u=p==null?void 0:p.key)==null?void 0:u.toUpperCase())===((b=_==null?void 0:_.key)==null?void 0:b.toUpperCase())}))==null?void 0:V.value)??"",name:(D=_==null?void 0:_.value)==null?void 0:D.replace(/[’]|[‘]|[']/g,""),compData:[]}):U!=null&&U.find(p=>{var u,b;return((u=p==null?void 0:p.key)==null?void 0:u.toUpperCase())===((b=_==null?void 0:_.key)==null?void 0:b.toUpperCase())})&&((g==null?void 0:g.length)===0&&(A=_.key)!=null&&A.includes("Menus")&&g.push({comp:"Menu",name:"",compData:[]}),(i=g==null?void 0:g[(g==null?void 0:g.length)-1])!=null&&i.compData&&g[(g==null?void 0:g.length)-1].compData.push({key:(c=U==null?void 0:U.find(p=>{var u,b;return((u=p==null?void 0:p.key)==null?void 0:u.toUpperCase())===((b=_==null?void 0:_.key)==null?void 0:b.toUpperCase())}))==null?void 0:c.value,contents:_==null?void 0:_.value}))});let N=(m=h.cloneDeep(g))==null?void 0:m.map(_=>{var V;return _!=null&&_.compData&&(_.compData=(V=_==null?void 0:_.compData)==null?void 0:V.map(D=>{var A,i,c,p,u,b,O,x,F,f,w;if((D==null?void 0:D.key)==="formFlex")D.contents=((i=(A=D.contents)==null?void 0:A.replace(/[’]|[‘]|[']/g,""))==null?void 0:i.toUpperCase())!=="Vertical".toUpperCase();else if((D==null?void 0:D.key)==="groupContents")D.contents=(c=h.cloneDeep(D.contents))==null?void 0:c.map(B=>eo(h.cloneDeep(B)));else if(Array.isArray(D==null?void 0:D.contents))D.contents=ze(D.contents);else if(((u=(p=D==null?void 0:D.contents)==null?void 0:p.trim())!=null&&u.startsWith("[")||(O=(b=D.contents)==null?void 0:b.trim())!=null&&O.startsWith("【"))&&((F=(x=D.contents)==null?void 0:x.trim())!=null&&F.endsWith("]")||(w=(f=D.contents)==null?void 0:f.trim())!=null&&w.endsWith("】")))D.contents=lo(h.cloneDeep(D.contents));else{if(!D.contents)return;D.contents=Re(h.cloneDeep(D.contents))}return D})),_});return N=(k=h.cloneDeep(N))==null?void 0:k.map(_=>{var V;return(_==null?void 0:_.comp)==="Group"&&(_.compData=(V=_.compData)==null?void 0:V.map(D=>{var i;let A=[];return(i=D.contents)==null||i.forEach(c=>{var p,u,b,O,x,F,f,w,B,d,I,v;if(R!=null&&R.find(T=>{var $,L,S;return(($=T==null?void 0:T.key)==null?void 0:$.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))A.push({comp:(p=R==null?void 0:R.find(T=>{var $,L,S;return(($=T==null?void 0:T.key)==null?void 0:$.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))==null?void 0:p.value,name:(b=(u=Object.values(c))==null?void 0:u[0])==null?void 0:b.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(U!=null&&U.find(T=>{var $,L,S;return(($=T==null?void 0:T.key)==null?void 0:$.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())})){if((A==null?void 0:A.length)===0)return;(O=A==null?void 0:A[(A==null?void 0:A.length)-1])!=null&&O.compData&&A[(A==null?void 0:A.length)-1].compData.push({key:(x=U==null?void 0:U.find(T=>{var $,L,S;return(($=T==null?void 0:T.key)==null?void 0:$.toUpperCase())===((S=(L=Object.keys(c))==null?void 0:L[0])==null?void 0:S.toUpperCase())}))==null?void 0:x.value,contents:(F=Object.values(c))==null?void 0:F[0]})}else if((w=(f=Object.keys(c))==null?void 0:f[0])!=null&&w.includes("$")){const T=(d=(B=Object.keys(h.cloneDeep(c)))==null?void 0:B[0])==null?void 0:d.split("$");A[(A==null?void 0:A.length)-1].compData.push({key:(I=U==null?void 0:U.find($=>{var L,S;return((L=$==null?void 0:$.key)==null?void 0:L.toUpperCase())===((S=T==null?void 0:T[0])==null?void 0:S.toUpperCase())}))==null?void 0:I.value,contents:(v=Object.values(c))==null?void 0:v[0],selectLabel:T==null?void 0:T[1]})}return c}),D.contents=A,D})),_}),N}catch{return!1}},we=e.ref(0),Me=o=>{const s=[];let n=null;for(let l=0;l<o.length;l++){const a=o[l];if(Array.isArray(a))n&&(n.children=Me(a));else{const t={label:a};s.push(t),n=t}}return s},Ge=o=>{let s=0;for(const n of o)s++,n.children&&(s+=Ge(n.children));return s},qe=(o,s,n=[])=>{let l=0;for(const a of s){if(l>=o.length)break;const t=[...o[l]];if(n.push(t),l++,a.children&&a.children.length>0){const r=[];qe(o.slice(l),a.children,r),r.length>0&&(t.push(r),l+=Ge(a.children))}}return n},co=(o,s)=>{let n=[];return o==null||o.forEach(a=>{a.some(t=>Array.isArray(t))?n.push(...a):n.push(a)}),qe(n,s)},De=o=>{const s={label:o[0].trim()};if(o.length>1){const n=o.slice(1);n.length===1&&Array.isArray(n[0])?s.children=n[0].map(l=>Array.isArray(l)?De(l):{label:l.trim()}):s.children=n.map(l=>Array.isArray(l)?De(l):{label:l.trim()})}return s},Ie=o=>{let s=o.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return s=s.replace(/:}(?=,|]|}|$)/g,':""}'),s=s.replace(/:,(?=\s*")/g,':"",'),s=s.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(n,l,a)=>`"${l}://${a}"`),s=s.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),s},io=o=>{var n;return o.some(l=>!Array.isArray(l))?o:(n=h.cloneDeep(o))==null?void 0:n.map(l=>{let a=[];return l.some(t=>Array.isArray(t))?l==null||l.forEach(t=>{Array.isArray(t)&&a.push(De(t))}):l.some(t=>t.includes("["))?a.push(l):a=l.map(t=>({label:t.trim()})),a})},He=(o,s,n)=>{let l=o,a=n,t=s;return t.children&&(Array.isArray(a[a.length-1])?a[a.length-1].push(l[0]):a.push(l[0]),l.shift(),t=t.children),Array.isArray(t)&&t.forEach(r=>{if(r.children){const m=He(l,r,a);a=m[0],l=m[1]}}),[a,l]},uo=(o,s)=>{let n=o,l=[];return s.length>0?s==null||s.forEach(a=>{let t=n==null?void 0:n[0];n.shift();const r=He(h.cloneDeep(n),a,t);t=r[0],n=r[1],l.push(t)}):l=n,l},_e=(o,s)=>{const n=io(h.cloneDeep(o));return uo(n,s)},po=o=>{const s=[];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"?(s.push({comp:"Table",compData:[a,o[n+1]],name:""}),n+=2):(s.push(a),n+=1)}return s},Ze=o=>_e([o],[]),ke=o=>{const s=[];return o==null||o.forEach(n=>n==null?void 0:n.forEach(a=>{var t,r;we.value++,s.push({id:we.value,key:(t=Object.keys(a))==null?void 0:t[0],value:(r=Object.values(a))==null?void 0:r[0],width:n.length})})),s},Te=o=>{let s=po(o);return s=s==null?void 0:s.map(n=>{var l,a,t,r;if(n.comp==="Table")(l=n.compData)!=null&&l.find(m=>(m==null?void 0:m.key)==="header")||(n.compData=(a=n.compData)==null?void 0:a.map(m=>(m.key==="tableColumns"?m={key:"header",contents:_e(m.value,[])}:m={key:m.key,contents:m.value},m)),n.compData.push({key:"extraButton",contents:[{label:"新增"}]}),n.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(n.key==="form"){const m=(t=n==null?void 0:n.value)==null?void 0:t.map(k=>(Array.isArray(k)||(k=[k]),k));n={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke(m)}],name:""}}else if(n.key==="formTop"){const m=(r=n==null?void 0:n.value)==null?void 0:r.map(k=>(Array.isArray(k)||(k=[k]),k));n={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke(m)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return n}),s},fo=(o,s)=>{var m,k,y,C,E,g;const n=[],l=Me((k=(m=o==null?void 0:o.find(N=>N.key==="tableIndex"))==null?void 0:m.value)==null?void 0:k[0]);n.push({key:"tableIndexColumn",contents:s}),n.push({key:"tableIndex",contents:l});let a=[];const t=(y=o==null?void 0:o.find(N=>N.key==="tableColumns"))==null?void 0:y.value;t.length===1&&!(t!=null&&t[0].some(N=>Array.isArray(N)))?a=(C=t==null?void 0:t[0])==null?void 0:C.map(N=>({label:N})):a=_e((E=o==null?void 0:o.find(N=>N.key==="tableColumns"))==null?void 0:E.value,l),n.push({key:"header",contents:a});const r=co((g=o==null?void 0:o.find(N=>N.key==="tableContents"))==null?void 0:g.value,l);return n.push({key:"tableContents",contents:r}),n.push({key:"extraButton",contents:[{label:"新增"}]}),n.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),n},Ke=o=>o.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(s,n,l)=>{const a=Ke(l);return`"${n}",${a}`}),de=o=>{const s=o.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Ke(s).replace(/^"(.*)"$/,"$1")},ho=o=>{const s=new Set;return o.filter(n=>{const l=JSON.stringify(n);return s.has(l)?!1:s.add(l)})},Ve=o=>{var n;let s=[];return(n=h.cloneDeep(o))==null||n.forEach(l=>{var a;(a=l.contents)==null||a.forEach(t=>{s.push(t)})}),s=ho(s),s.push({label:"操作"}),[s]},mo=(o,s)=>o.reduce((n,l,a)=>{const t=Math.floor(a/s);return n[t]||(n[t]=[]),n[t].push(l),n},[]),Qe=o=>o.reduce((s,n)=>n.children&&n.children.length>0?s+Qe(n.children):s+1,0),yo=(o,s)=>{var l;let n=[];return(l=mo(o,Qe(s==null?void 0:s[0])-1))==null||l.forEach(a=>{let t=[];a.forEach(r=>{var m;Array.isArray(r.contents)?(m=r.contents)==null||m.forEach(k=>{t.push(k)}):t.push(r.contents)}),n.push(t)}),[n]},ko=["方法体","输入","输出"],Oe=e.ref(1),Ee=o=>{let s;o.replaceAll(" ",`\r
|
|
2
|
+
`).includes(`\r
|
|
3
|
+
`)?s=o.replaceAll(" ",`\r
|
|
4
|
+
`).split(`\r
|
|
5
|
+
`).filter(a=>a.trim()!==""):s=o.replaceAll(" ",`\r
|
|
6
|
+
`).split(`
|
|
7
|
+
`).filter(a=>a.trim()!=="");const n=[];let l="";for(const a of s)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(),h.cloneDeep(l).split("{").length-1===h.cloneDeep(l).split("}").length-1&&h.cloneDeep(l).split("【").length-1===h.cloneDeep(l).split("】").length-1&&h.cloneDeep(l).split("[").length-1===h.cloneDeep(l).split("]").length-1&&h.cloneDeep(l).split("(").length-1===h.cloneDeep(l).split(")").length-1&&h.cloneDeep(l).split("(").length-1===h.cloneDeep(l).split(")").length-1&&h.cloneDeep(l).split("/*").length-1===h.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},go=o=>{const[s,n]=o.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},ge=o=>{let s;o.includes(":")?s=o.split(":").filter(a=>a.trim()!==""):s=o.split(":").filter(a=>a.trim()!=="");const n=[];let l="";for(const a of s)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(),h.cloneDeep(l).split("{").length-1===h.cloneDeep(l).split("}").length-1&&h.cloneDeep(l).split("【").length-1===h.cloneDeep(l).split("】").length-1&&h.cloneDeep(l).split("[").length-1===h.cloneDeep(l).split("]").length-1&&h.cloneDeep(l).split("(").length-1===h.cloneDeep(l).split(")").length-1&&h.cloneDeep(l).split("(").length-1===h.cloneDeep(l).split(")").length-1&&h.cloneDeep(l).split("/*").length-1===h.cloneDeep(l).split("*/").length-1&&(n.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):n.push(a.trim().replace(/\/\*[\s\S]*?\*\//g,""));return n},bo=o=>/^[\x00-\x7F]*$/.test(o),vo=o=>{var a;const s=o.map(t=>{var m,k;let r=(k=(m=t.key.split("("))==null?void 0:m[1])==null?void 0:k.trim();return r.slice(0,r.length-1)}),n=s==null?void 0:s.map(t=>{var m;return(m=ge(t))==null?void 0:m.map(k=>{var y;if(k.includes("{")){let C=(y=k.split(":"))==null?void 0:y[0];k=C.slice(1,C.length)}return k})}).filter(t=>t.length!==0),l=(a=n==null?void 0:n.filter(t=>t.length!==0))==null?void 0:a.map(t=>{let r="";return t.forEach(m=>{m.includes("{")||(r=r===""?r+h.cloneDeep(m):r+"/"+h.cloneDeep(m))}),r});return ze([...new Set(l)])},Xe=o=>{var n,l,a,t,r,m,k,y;const s=(l=(n=o.split("("))==null?void 0:n[1])==null?void 0:l.trim();return((a=ge(s.slice(0,s.length-1)))==null?void 0:a.length)>0?s.slice(0,s.length-1):(y=(k=(m=(r=(t=o.split("("))==null?void 0:t[1])==null?void 0:r.trim())==null?void 0:m.split(")"))==null?void 0:k[0])==null?void 0:y.trim()},Co=o=>{var a;if(!o)return;const s=Xe(o),n=(a=ge(s))==null?void 0:a.map(t=>{var r;if(t.includes("{")){let m=(r=t.split(":"))==null?void 0:r[0];t=m.slice(1,m.length)}return t});let l="";return n.forEach(t=>{t.includes("{")||(l=l===""?l+h.cloneDeep(t):l+"/"+h.cloneDeep(t))}),l},Do=o=>{const s=o.match(/\[(.*)\]/s);if(s){const n=`[${s[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,'"'))}}},_o=o=>{var t;if(!o)return;const s=Xe(o);let n=[],l=[],a=[];return(t=ge(s))==null||t.forEach(r=>{var m;r.includes("[")?n.push(Do(r)):r.includes("{")&&(bo((m=r.slice(1,r.length-1).split(":"))==null?void 0:m[0])?a.push(JSON.parse(r.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):X.IsJson(r.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(r.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):r.includes("$"))}),[n,l,a]},Eo=o=>{const s=[];let n="";for(const l of o)l.includes("[")||n.includes("[")||l.includes("/*")||n.includes("/*")?(n+=l.trim(),h.cloneDeep(n).split("{").length-1===h.cloneDeep(n).split("}").length-1&&h.cloneDeep(n).split("【").length-1===h.cloneDeep(n).split("】").length-1&&h.cloneDeep(n).split("[").length-1===h.cloneDeep(n).split("]").length-1&&h.cloneDeep(n).split("(").length-1===h.cloneDeep(n).split(")").length-1&&h.cloneDeep(n).split("(").length-1===h.cloneDeep(n).split(")").length-1&&h.cloneDeep(n).split("/*").length-1===h.cloneDeep(n).split("*/").length-1&&(s.push(n.replace(/\/\*[\s\S]*?\*\//g,"")),n="")):s.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},Se=o=>{var r,m;const s=[],n=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=o.match(n);if(l){const k=l[1]||l[3],y=l[2]||l[4];if(k&&y){const C=`${k}/${y}`;s.push(C)}}const a=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,t=o.match(a);return t?s.push(t[0].replace(/\)+$/,"")):(o==null?void 0:o.split(",").length)===2&&s.push((m=(r=o==null?void 0:o.split(","))==null?void 0:r[1])==null?void 0:m.trim()),s},ve=o=>{let s=o.replace(/\[\s*,\s*,/g,'[{"": ""}, {"": ""},');return s=s.replace(/\[\s*,/g,'[{"": ""},'),s=s.replace(/,\s*,/g,', {"": ""},'),s=s.replace(/,\s*\]/g,', {"": ""}]'),s=s.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,\]}])/g,(n,l,a,t,r)=>a.includes("'")?`:${l}${a}${t}${r}`:`:${l}"${a}"${t}${r}`),s=s.replace(/:\s*([,\]}])/g,': ""$1'),s},$o=o=>!/\[[^\]]*\{[^\]]*\]/.test(o),xo=o=>{const s=h.cloneDeep(o).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),n=s?`${s[2]}/${s[3]}`:null,l=o.match(/\[\{([^}]+)\}\]/),a=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let t=null;if(a)try{t=JSON.parse(a)}catch(r){console.error("解析数组失败:",r)}return[n,t]},No=o=>{var m,k,y,C,E,g,N,_,V,D,A;let s=[],n=[],l={},a=[],t=o.trim(),r=[];if(t.trim().includes("输入")&&t.trim().includes("输出")){let i=[],c=o.trim();c=h.cloneDeep(c).slice(1,h.cloneDeep(c).length-1);const p=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(_=c.match(p))==null||_.forEach((u,b)=>{var F;const O=u;let x=[];(F=O.slice(1,O.length-1).replace(":","$:").split("$:"))==null||F.forEach(f=>{var w,B,d;if(ko.find(I=>f.includes(I)))if(!f.includes("=="))x.push({key:"tableIndexColumn",contents:f.replaceAll("'","")});else{let I=[];const v=f.replaceAll("'","").split("==");I.push(v==null?void 0:v[0]),v!=null&&v[1].includes("[")?I.push(v==null?void 0:v[1].trim().slice(1,(v==null?void 0:v[1].length)-1).split(",")):I.push([v==null?void 0:v[1]]),x.push({key:"header",contents:[(B=(w=Ze([I]))==null?void 0:w[0])==null?void 0:B[0]]})}else{let I=f.trim().replaceAll(",",",").replaceAll("'",'"');if(b%3===0)I.slice(1,I.length-1).includes("[")?i.push({key:"tableIndex",contents:[{label:I}]}):i.push({key:"tableIndex",contents:[{label:I.slice(1,I.length-1)}]});else if((I==null?void 0:I[0])==="{"){let v=[];const T=I.slice(1,I.length-1).split(":");if(T.every($=>X.IsJson($.trim()))){v.push({key:"tableContentName",contents:"详情"});let $=[];T.forEach((L,S)=>{if(S===0){const j=JSON.parse(L).map(W=>({label:W}));j.push({label:"操作"}),$.push({key:"header",contents:j})}else $.push({key:"tableContents",contents:JSON.parse(L)})}),$.push({key:"extraButton",contents:[{label:"新增"}]}),$.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),v.push({comp:"Table",compData:$,name:""}),i.push({key:"tableContents",contents:[v]})}}else{let v=I;v.slice(1,v.length-1).includes("[")||v.slice(1,v.length-1).includes("{")?X.IsJson(Ie(v.replace(/\s+/g,"")))&&((d=JSON.parse(Ie(v.replace(/\s+/g,""))))==null||d.map(T=>{if(Array.isArray(T==null?void 0:T[0])){const $=[];$.push({key:"tableContentName",contents:"详情"});let L=[];T.forEach(S=>{S.forEach(j=>{var W,G;Oe.value++,L.push({id:Oe.value,key:(W=Object.keys(j))==null?void 0:W[0],value:(G=Object.values(j))==null?void 0:G[0],width:S.length})})}),$.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:L}],name:""}),i.push({key:"tableContents",contents:[$]})}else i.push({key:"tableContents",contents:T==null?void 0:T[0]})})):i.push({key:"tableContents",contents:v.trim().slice(1,v.length-1)})}}}),i.push(x==null?void 0:x[0])}),r.push({key:"tableIndex",contents:(V=i==null?void 0:i.filter(u=>(u==null?void 0:u.key)==="tableIndex"))==null?void 0:V.map(u=>{var b;return(b=u.contents)==null?void 0:b[0]})}),r.push({key:"extraButton",contents:[{label:"新增"}]}),r.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),r.push({key:"tableIndexColumn",contents:(A=(D=i==null?void 0:i.filter(u=>(u==null?void 0:u.key)==="tableIndexColumn"))==null?void 0:D[0])==null?void 0:A.contents}),r.push({key:"header",contents:Ve(i==null?void 0:i.filter(u=>(u==null?void 0:u.key)==="header"))}),r.push({key:"tableContents",contents:yo(i==null?void 0:i.filter(u=>(u==null?void 0:u.key)==="tableContents"),Ve(i==null?void 0:i.filter(u=>(u==null?void 0:u.key)==="header")))})}else{const i=(m=t.trim().split(",$"))==null?void 0:m[0];i[0]==="["?t=i.slice(1,i.length-1):t.includes(",$")&&(t=(k=t.trim().split(",$"))==null?void 0:k[0]);let c;if(t.includes("$")){t=h.cloneDeep(t),l.method=(C=(y=h.cloneDeep(t).trim())==null?void 0:y.slice(1,t.length).split("("))==null?void 0:C[0];let p;Se(t.slice(1,t.length-2)).length>1?p=Se(t.slice(1,t.length-2)):p=xo(t),l.value=p}else X.IsJson("["+ve(t).replaceAll("'",'"')+"]")&&!$o(ve(t).replaceAll("'",'"'))?(t=JSON.parse("["+ve(t).replaceAll("'",'"')+"]"),a=t):c=(g=(E=h.cloneDeep(t).split("}"))==null?void 0:E.filter(p=>p!==""))==null?void 0:g.map(p=>{let u=p;return u[0]===","?u=u.slice(2,u.length):u=u.slice(1,u.length),u});(N=h.cloneDeep(c))==null||N.forEach(p=>{var u,b,O,x,F,f,w,B,d,I,v,T,$,L,S;if(p.includes("==")){const j=(T=p==null?void 0:p.split(":"))==null?void 0:T[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),W=($=p==null?void 0:p.split(":"))==null?void 0:$[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(X.IsJson(W.trim())?n.push(JSON.parse(W.trim())):n.push(JSON.parse(W.replaceAll("'",'"').trim())),j[0]!=="["){let G=[];X.IsJson("["+de(j)+"]")?G.push(JSON.parse("["+de(j)+"]")):X.IsJson("["+de(j).replaceAll("==",",")+"]")&&G.push(JSON.parse("["+de(j).replaceAll("==",",")+"]"));const K=h.cloneDeep(G);K.push(["操作"]),s.push(K)}else{const G=(L=j.slice(1,j.length-1).replaceAll(",",",|"))==null?void 0:L.split("|"),K=(S=Eo(G))==null?void 0:S.map(M=>((M==null?void 0:M[M.length-1])===","&&(M=M.slice(0,M.length-1)),M));let Q=[];K==null||K.forEach(M=>{var H,z,Y,J;let Z=[];Z.push((H=M.split("=="))==null?void 0:H[0].trim().replace(/^"|"$/g,"")),((z=M.split("=="))==null?void 0:z[1].trim()[0])==="["?Z.push(JSON.parse((Y=M.split("=="))==null?void 0:Y[1].trim())):Z.push([JSON.parse((J=M.split("=="))==null?void 0:J[1].trim())]),Q.push(Z)});const ne=h.cloneDeep(Q);ne.push(["操作"]),s.push(ne)}}else{if(X.IsJson((u=p==null?void 0:p.split(":"))==null?void 0:u[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let j=JSON.parse((b=p==null?void 0:p.split(":"))==null?void 0:b[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(j)||(j=[j]),j.push("操作"),s.push(j)}X.IsJson((F=(x=(O=p==null?void 0:p.split(":"))==null?void 0:O[1])==null?void 0:x.replace(/^"|"$/g,"'"))==null?void 0:F.replace(/'([^']+)'/g,'"$1"'))?n.push(JSON.parse((f=p==null?void 0:p.split(":"))==null?void 0:f[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):X.IsJson((I=(d=(B=(w=p==null?void 0:p.split(":"))==null?void 0:w[1])==null?void 0:B.replace(/^"|"$/g,"'"))==null?void 0:d.replaceAll("'",'"'))==null?void 0:I.replace(/'([^']+)'/g,'"$1"'))&&n.push(JSON.parse((v=p==null?void 0:p.split(":"))==null?void 0:v[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[s,n,r,l,a]},Ao=o=>{const s=[],n=Co(o==null?void 0:o.key),l=_o(o==null?void 0:o.key),a=No(o==null?void 0:o.value),t=l==null?void 0:l[0],r=a==null?void 0:a[4],m=l==null?void 0:l[1],k=l==null?void 0:l[2],y=a==null?void 0:a[0],C=a==null?void 0:a[1],E=a==null?void 0:a[2],g=a==null?void 0:a[3];return n&&s.push({key:"contentPath",value:n}),(t==null?void 0:t.length)>0&&s.push({key:"tableIndex",value:t}),g&&s.push({key:"extraButton",value:g}),(r==null?void 0:r.length)>0&&s.push({key:"form",value:r}),(m==null?void 0:m.length)>0&&s.push({key:"formTop",value:m}),(k==null?void 0:k.length)>0&&s.push({key:"extra",value:k}),(E==null?void 0:E.length)>0&&s.push({comp:"Table",compData:E,name:""}),(y==null?void 0:y.length)>0&&s.push({key:"tableColumns",value:y}),(C==null?void 0:C.length)>0&&s.push({key:"tableContents",value:C}),s},Bo=o=>{let s=[],n=[];o==null||o.forEach(a=>{Array.isArray(a)&&(a==null||a.forEach(t=>{var r;t.comp==="FormTop"&&((r=t.compData)==null||r.forEach(m=>{(m==null?void 0:m.key)==="formContent"&&(n=[...n,...m.contents])}))}))});const l=n.reduce((a,t)=>a.find(m=>(m==null?void 0:m.key)===(t==null?void 0:t.key))?a:a.concat([t]),[]);return l.length!==0&&s.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 t=a.filter(r=>r.comp!=="FormTop");s.push(t)}else a.comp!=="FormTop"&&s.push(a)}),s},wo=(o,s)=>{const n=s.split("/");let l=[];return o==null||o.forEach(a=>{var m,k,y,C,E,g,N,_,V,D,A;const t=[],r=(k=(m=a.find(i=>i.key==="tableIndex"))==null?void 0:m.value)==null?void 0:k[0];if(r&&!r.some(i=>Array.isArray(i))){const i=(C=(y=a.find(c=>c.key==="tableColumns"))==null?void 0:y.value)==null?void 0:C[0];t.push({key:"tableIndexColumn",contents:n[n.length-1]}),t.push({key:"tableIndex",contents:r==null?void 0:r.map(c=>({label:c}))}),t.push({key:"extraButton",contents:[{label:"新增"}]}),t.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(i)&&i.some(c=>Array.isArray(c))?t.push({key:"header",contents:Ze(i)}):t.push({key:"header",contents:Array.isArray(i)?i==null?void 0:i.map(c=>({label:c})):[i].map(c=>({label:c}))}),t.push({key:"tableContents",contents:Array.isArray(i)?(g=(E=a.find(c=>c.key==="tableContents"))==null?void 0:E.value)==null?void 0:g[0]:(V=(_=(N=a.find(c=>c.key==="tableContents"))==null?void 0:N.value)==null?void 0:_[0])==null?void 0:V.map(c=>[c])}),l.push({comp:"Table",name:"",compData:t}),a!=null&&a.find(c=>(c==null?void 0:c.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke([(D=a==null?void 0:a.find(c=>(c==null?void 0:c.key)==="formTop"))==null?void 0:D.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})}else r?(l.push({comp:"Table",name:"",compData:fo(a,n[n.length-1])}),a!=null&&a.find(i=>(i==null?void 0:i.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:ke([(A=a==null?void 0:a.find(i=>(i==null?void 0:i.key)==="formTop"))==null?void 0:A.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})):a.some(i=>i.key==="extra")?l.push({comp:"calculator",name:"",compData:Te(a)}):l.push(Te(a))}),Bo(l)},Io=(o,s)=>{var a,t;const n=o.map(r=>r.filter(m=>m.key!=="contentPath"));return{comp:"Group",compData:[{contents:wo(n,s),key:"groupContents"}],name:(t=(a=o[0])==null?void 0:a.find(r=>r.key==="contentPath"))==null?void 0:t.value}},To=o=>{var a;const s=[],n=h.cloneDeep(o).map(t=>{var r;if(t!=null&&t.find(m=>(m==null?void 0:m.key)==="contentPath"))return(r=t==null?void 0:t.find(m=>(m==null?void 0:m.key)==="contentPath"))==null?void 0:r.value}).filter(t=>t!==""),l=[...new Set(n)];return(a=l==null?void 0:l.filter(t=>t))==null||a.forEach(t=>{var r;s.push(Io((r=h.cloneDeep(o))==null?void 0:r.filter(m=>m.find(k=>k.key==="contentPath"&&k.value===t)),t))}),s},Vo=o=>{let s=[];s.push({comp:"Menu",compData:[{contents:vo(h.cloneDeep(o)),key:"menuContents"}],name:""});const n=o.map(l=>Ao(l)).filter(l=>l.length!==0);return s=[...s,...To(n)],s},Oo=o=>{var s,n,l,a,t;try{const r=(l=Ee((n=(s=h.cloneDeep(o))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")))==null?void 0:l.filter(y=>y!==""),m=(t=(a=h.cloneDeep(r))==null?void 0:a.filter(y=>!y.includes("/*")))==null?void 0:t.map(y=>go(y));return Vo(m)}catch{return!1}},fe=e.ref(0),Ce=e.ref(0),So=o=>{const s=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(s))!==null;){const t=a[1];let r=a[2].trim();(r.match(/\[/g)||[]).length!==(r.match(/\]/g)||[]).length&&(r=r==null?void 0:r.replace(/]$/,"")),l[t]?(l[t+Ce.value]&&Ce.value++,l[t+Ce.value]=t+"="+r):l[t]=t+"="+r}return l},Ye=o=>{const[s,n]=o.split("=").map(t=>t.trim()),l=s.replace(/['"]/g,""),a=n.replace(/^['"]|['"]$/g,"");return{key:l,value:a}},Fo=o=>{var r;let s=[];const[n,l]=o.split(/=(.+)/),a=n.replace(/['"]/g,"").trim(),t=l.replace(/^['"]|['"]$/g,"");return(r=Object.values(So(t)))==null||r.forEach(m=>{s.push(Ye(m))}),{key:a,value:s}},me=o=>{try{return JSON.parse(o),!0}catch{return!1}},el=o=>{try{const s=o.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(h.cloneDeep(s).split("{").length-1>1){let n=h.cloneDeep(s).replace(/^\{(.*)\}$/,"[$1]");if(me(n)&&!n.includes("$")||(n=n.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),me(n)){const l=JSON.parse(n);let a=[];return l==null||l.forEach(t=>{var r;(r=Object.entries(h.cloneDeep(t)))==null||r.forEach(m=>{fe.value++,a.push({id:fe.value,key:(m==null?void 0:m[0])??"",value:(m==null?void 0:m[1])===""?"":m==null?void 0:m[1],width:Object.keys(h.cloneDeep(t)).length})})}),a}else return console.error("转换类型不正确:"),[]}else if(me(s)){const n=JSON.parse(s);return Object.entries(n).map(([l,a])=>(fe.value++,{id:fe.value,key:l,value:a===""?"":a,width:1}))}else return s}catch(s){return console.error("转换失败:",s),[]}},Lo=(o,s)=>{try{if(R!=null&&R.find(n=>(n==null?void 0:n.key)===s))return JSON.parse(o.replace(/[’]|[‘]|[']/g,'"'));if(h.cloneDeep(o).split("[").length-1>1){const n=h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else{const n=h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(me(n)){const l=JSON.parse(n);return Array.isArray(l)?l.map(a=>({label:a})):l}else return el(h.cloneDeep(o))}}catch(n){return console.error("解析失败:",n),o}},jo=o=>({[o==null?void 0:o.key]:Lo(o==null?void 0:o.value,o==null?void 0:o.key)}),Jo=o=>{try{if(h.cloneDeep(o).split("[").length-1>1){const s=h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(h.cloneDeep(o).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(n=>({label:n}))}catch(s){return console.error("解析失败:",s),o}},ll=o=>{var s,n,l,a,t,r;try{const m=Ee((n=(s=h.cloneDeep(o))==null?void 0:s.replace("(","("))==null?void 0:n.replace(")",")")),k=(l=h.cloneDeep(m))==null?void 0:l.map(E=>{var N,_;let g=(_=(N=h.cloneDeep(E))==null?void 0:N.split("="))==null?void 0:_[0];return g!=null&&g.includes("GroupContents")?Fo(E):Ye(E)}),y=[];(a=h.cloneDeep(k))==null||a.forEach(E=>{var g,N,_,V,D;R!=null&&R.find(A=>{var i,c;return((i=A==null?void 0:A.key)==null?void 0:i.toUpperCase())===((c=E==null?void 0:E.key)==null?void 0:c.toUpperCase())})?y.push({comp:((g=R==null?void 0:R.find(A=>{var i,c;return((i=A==null?void 0:A.key)==null?void 0:i.toUpperCase())===((c=E==null?void 0:E.key)==null?void 0:c.toUpperCase())}))==null?void 0:g.value)??"",name:(N=E==null?void 0:E.value)==null?void 0:N.replace(/[’]|[‘]|[']/g,""),compData:[]}):U!=null&&U.find(A=>{var i,c;return((i=A==null?void 0:A.key)==null?void 0:i.toUpperCase())===((c=E==null?void 0:E.key)==null?void 0:c.toUpperCase())})&&((y==null?void 0:y.length)===0&&(_=E.key)!=null&&_.includes("Menus")&&y.push({comp:"Menu",name:"",compData:[]}),(V=y==null?void 0:y[(y==null?void 0:y.length)-1])!=null&&V.compData&&y[(y==null?void 0:y.length)-1].compData.push({key:(D=U==null?void 0:U.find(A=>{var i,c;return((i=A==null?void 0:A.key)==null?void 0:i.toUpperCase())===((c=E==null?void 0:E.key)==null?void 0:c.toUpperCase())}))==null?void 0:D.value,contents:E==null?void 0:E.value}))}),console.log("newContents",y);let C=(t=h.cloneDeep(y))==null?void 0:t.map(E=>{var g;return E!=null&&E.compData&&(E.compData=(g=E==null?void 0:E.compData)==null?void 0:g.map(N=>{var _,V,D,A,i,c,p,u,b,O,x;if((N==null?void 0:N.key)==="formFlex")N.contents=((V=(_=N.contents)==null?void 0:_.replace(/[’]|[‘]|[']/g,""))==null?void 0:V.toUpperCase())!=="Vertical".toUpperCase();else if((N==null?void 0:N.key)==="groupContents")N.contents=(D=h.cloneDeep(N.contents))==null?void 0:D.map(F=>jo(h.cloneDeep(F)));else if(((i=(A=N.contents)==null?void 0:A.trim())!=null&&i.startsWith("[")||(p=(c=N.contents)==null?void 0:c.trim())!=null&&p.startsWith("【"))&&((b=(u=N.contents)==null?void 0:u.trim())!=null&&b.endsWith("]")||(x=(O=N.contents)==null?void 0:O.trim())!=null&&x.endsWith("】")))N.contents=Jo(h.cloneDeep(N.contents));else{if(!N.contents)return;N.contents=el(h.cloneDeep(N.contents))}return N})),E});return C=(r=h.cloneDeep(C))==null?void 0:r.map(E=>{var g;return(E==null?void 0:E.comp)==="Group"&&(E.compData=(g=E.compData)==null?void 0:g.map(N=>{var V;let _=[];return(V=N.contents)==null||V.forEach(D=>{var A,i,c,p,u,b,O,x,F,f,w,B;if(R!=null&&R.find(d=>{var I,v,T;return((I=d==null?void 0:d.key)==null?void 0:I.toUpperCase())===((T=(v=Object.keys(D))==null?void 0:v[0])==null?void 0:T.toUpperCase())}))_.push({comp:(A=R==null?void 0:R.find(d=>{var I,v,T;return((I=d==null?void 0:d.key)==null?void 0:I.toUpperCase())===((T=(v=Object.keys(D))==null?void 0:v[0])==null?void 0:T.toUpperCase())}))==null?void 0:A.value,name:(c=(i=Object.values(D))==null?void 0:i[0])==null?void 0:c.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(U!=null&&U.find(d=>{var I,v,T;return((I=d==null?void 0:d.key)==null?void 0:I.toUpperCase())===((T=(v=Object.keys(D))==null?void 0:v[0])==null?void 0:T.toUpperCase())})){if((_==null?void 0:_.length)===0)return;(p=_==null?void 0:_[(_==null?void 0:_.length)-1])!=null&&p.compData&&_[(_==null?void 0:_.length)-1].compData.push({key:(u=U==null?void 0:U.find(d=>{var I,v,T;return((I=d==null?void 0:d.key)==null?void 0:I.toUpperCase())===((T=(v=Object.keys(D))==null?void 0:v[0])==null?void 0:T.toUpperCase())}))==null?void 0:u.value,contents:(b=Object.values(D))==null?void 0:b[0]})}else if((x=(O=Object.keys(D))==null?void 0:O[0])!=null&&x.includes("$")){const d=(f=(F=Object.keys(h.cloneDeep(D)))==null?void 0:F[0])==null?void 0:f.split("$");_[(_==null?void 0:_.length)-1].compData.push({key:(w=U==null?void 0:U.find(I=>{var v,T;return((v=I==null?void 0:I.key)==null?void 0:v.toUpperCase())===((T=d==null?void 0:d[0])==null?void 0:T.toUpperCase())}))==null?void 0:w.value,contents:(B=Object.values(D))==null?void 0:B[0],selectLabel:d==null?void 0:d[1]})}return D}),N.contents=_,N})),E}),C}catch{return!1}},Uo=o=>ll(o),Po=o=>!!ll(o),re=e.ref(0),Ro=o=>o.reduce((n,l)=>{var t,r;const a=Object.values(n);return(((t=Object.keys(n))==null?void 0:t.length)===0||a[a.length-1].length>=(l==null?void 0:l.width))&&(n[re.value]=[],re.value++),n[re.value-1].push(l),((r=Object.keys(n))==null?void 0:r.length)===(l==null?void 0:l.width)&&(n[re.value]=[],re.value++),n},{});exports.arrayToNumberArray=Ro;exports.expandContentStringToJson=Oo;exports.expandNewStringToJson=ro;exports.expandStringToJson=Uo;exports.getComponent=Pe;exports.isExpandStringToJson=Po;exports.slotContent=qn;
|