ss-component-new 1.1.239 → 1.1.252
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-BhjrAPhE.js +4734 -0
- package/dist/array-DsZXIcD2.cjs +7 -0
- package/dist/{cloneDeep-kbsGGN_Q.cjs → cloneDeep-B135w891.cjs} +1 -1
- package/dist/{cloneDeep-BcK4cO7a.js → cloneDeep-BllTpMX-.js} +1 -1
- package/dist/icons/img/insofworkslogo.ico +0 -0
- package/dist/{index-NdocPiqA.js → index-13kbVn0I.js} +9 -9
- package/dist/{index-FX9zIOBz.cjs → index-B3IqlUYG.cjs} +1 -1
- package/dist/{index-DRcuI2gm.js → index-B56weiCa.js} +4 -4
- package/dist/{index-Be4n2ecn.js → index-B5d1OhV0.js} +185 -186
- package/dist/index-B7kLv-oH.js +3757 -0
- package/dist/{index-BUga6nNK.cjs → index-B8vD15H0.cjs} +1 -1
- package/dist/{index-FaQ9vBep.js → index-B9rOZR1k.js} +4 -4
- package/dist/index-BK5w6uMd.js +461 -0
- package/dist/{index-C7Y_BQCw.js → index-BM97Nh7v.js} +102 -97
- package/dist/{index-BoA0FuEi.js → index-BOXue8CC.js} +7 -7
- package/dist/index-BV-R8PQn.cjs +1 -0
- package/dist/index-BWTusWqR.js +224 -0
- package/dist/index-BYqzfeul.cjs +1 -0
- package/dist/{index-CQ0bJWFx.cjs → index-Bg0BoMyK.cjs} +1 -1
- package/dist/{index-V9D4K_Sf.cjs → index-Bhbral-D.cjs} +1 -1
- package/dist/{index-BOzSvFJA.cjs → index-BlWV5dab.cjs} +1 -1
- package/dist/index-BsUoHS_0.cjs +9 -0
- package/dist/{index-D0FNjq6G.cjs → index-Bsm0oDd2.cjs} +1 -1
- package/dist/{index-CWsALJ8f.cjs → index-BtHcbXIL.cjs} +1 -1
- package/dist/{index-3g7rW5vQ.js → index-BubJ_6uh.js} +1 -1
- package/dist/{index-CgxSbKBz.js → index-C6QcbKBS.js} +4 -4
- package/dist/{index-B66Qf5rw.js → index-CCTPQ2Og.js} +6 -6
- package/dist/{index-Du-s_IGe.js → index-CKdmCGWv.js} +1 -1
- package/dist/{index-DX3jtjLG.js → index-CM3SjbuE.js} +3 -3
- package/dist/{index-CrSVdnus.cjs → index-COjok9zl.cjs} +1 -1
- package/dist/{index-CiTgFX9o.js → index-CSuijRgr.js} +80 -80
- package/dist/{index-Cbj_oJPC.cjs → index-CXQfynOD.cjs} +1 -1
- package/dist/{index-GlyYi8eO.cjs → index-CgKEpk2a.cjs} +1 -1
- package/dist/{index-CrdlZPHq.js → index-CgZhftQO.js} +4 -4
- package/dist/{index-CG01yKU1.js → index-Cm5IxLo3.js} +2893 -2892
- package/dist/{index-Gc1epwAE.cjs → index-CmW94cTp.cjs} +1 -1
- package/dist/{index-C3UTqVyv.cjs → index-D-SMmlK-.cjs} +33 -33
- package/dist/{index-BMrHnCTf.js → index-D1-U0vrH.js} +75 -66
- package/dist/{index-CoH0G-uS.cjs → index-D6VayVA6.cjs} +1 -1
- package/dist/{index-BAWROpdj.js → index-DMLGnO0b.js} +1 -1
- package/dist/{index-DcymGmWj.js → index-DRxZt4Wv.js} +1 -1
- package/dist/{index-8hwiS85r.js → index-DVjTXK6S.js} +5 -5
- package/dist/index-D_29gkCH.cjs +1 -0
- package/dist/{index-B_VMMfxb.js → index-DowLTE1s.js} +1 -1
- package/dist/{index-DreX5xyP.js → index-LgF7m5cd.js} +5 -5
- package/dist/{index-BdiQsOpb.cjs → index-MCv8h_HT.cjs} +1 -1
- package/dist/{index-DqLOgQsT.cjs → index-PKHQ7Nyl.cjs} +1 -1
- package/dist/{index-DxzvUr7M.cjs → index-RVlvIJC4.cjs} +1 -1
- package/dist/{index-BhOckTgC.cjs → index-RusK-dxZ.cjs} +1 -1
- package/dist/{index-5JXCiHw3.cjs → index-Ub-DS2ga.cjs} +1 -1
- package/dist/{index-C8nLtJQB.js → index-VN54J5oj.js} +6 -6
- package/dist/{index-D-auhS5f.js → index-X7YNR_bm.js} +3 -3
- package/dist/{index-B2KK3HzA.cjs → index-_vDsdUJi.cjs} +1 -1
- package/dist/{index-CK7nt4bL.cjs → index-g5lygwSm.cjs} +1 -1
- package/dist/{index-P_6AmAJ6.js → index-nNNsd9if.js} +1 -1
- package/dist/index-vFYm7SIH.cjs +1 -0
- package/dist/index-xOEFDxna.cjs +1 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DVmAEsPP.js → index.vue_vue_type_script_setup_true_lang-T9gGbni6.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-7hOFb1P0.cjs → index.vue_vue_type_script_setup_true_lang-TGwej3z-.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-BrZ1zhys.js +612 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-CREMevxh.cjs +1 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Rrc8X2Wa.js → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Bz3v6Nn0.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DI887Xui.cjs → index.vue_vue_type_style_index_0_scoped_11a5120d_lang-DHAxO4Cg.cjs} +1 -1
- package/dist/{login-CbLjVnvi.js → login-BSiDyISU.js} +2 -2
- package/dist/{login-C0pHH-1V.cjs → login-DSB9dWl3.cjs} +1 -1
- package/dist/{main-wtI2yJ--.cjs → main-B6B8EHeL.cjs} +1 -1
- package/dist/{main-DLdZKJUK.js → main-CNLqlWam.js} +6 -6
- package/dist/{menu-CAlO6ojx.js → menu-BsDSnWTk.js} +97 -78
- package/dist/{menu-LlBjM6b8.cjs → menu-CVJXAhG-.cjs} +4 -4
- package/dist/{modelComp-Af3CYJjb.cjs → modelComp-BE3B5jke.cjs} +1 -1
- package/dist/{modelComp-D9gZ6ZkE.js → modelComp-O0eO-YTR.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
- package/public/icons/img/insofworkslogo.ico +0 -0
- package/dist/array-D-J_e91G.cjs +0 -7
- package/dist/array-DAwa7XAV.js +0 -4476
- package/dist/index-B9K0EIpS.js +0 -461
- package/dist/index-BFPZALXc.cjs +0 -1
- package/dist/index-BZHxtM--.cjs +0 -1
- package/dist/index-Bkc0R0j5.js +0 -3551
- package/dist/index-D0hUHQHn.cjs +0 -1
- package/dist/index-VVRul53o.cjs +0 -1
- package/dist/index-bC_377mt.cjs +0 -9
- package/dist/index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-CMvvh_Fa.js +0 -612
- package/dist/index.vue_vue_type_style_index_0_scoped_aefda2d8_lang-Df3FKHF1.cjs +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";const me=require("./index-D-SMmlK-.cjs"),e=require("vue"),Be=require("./index-COjok9zl.cjs"),le=require("./index-BsUoHS_0.cjs"),p=require("./cloneDeep-B135w891.cjs"),de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=require("./menu-CVJXAhG-.cjs"),Ve=require("./index-B8vD15H0.cjs"),Sl=require("./modelComp-BE3B5jke.cjs"),ll=require("./index-BV-R8PQn.cjs"),Ol=n=>n.match(/\((.*)\)/)[1],Fl=n=>n==null?void 0:n.map(a=>(a=dl(a),a)),Ll=async()=>{var a,l,o,r,u,c,f,g,y,V,C,I;let n;const s=await Be.getInsofDataApi({key:{type:"structure",pageKey:"menu",systemKey:sessionStorage.getItem("systemKey")}});return(c=(u=(r=(o=(l=(a=s.data.result)==null?void 0:a[0])==null?void 0:l.value)==null?void 0:o.pageData)==null?void 0:r.compData)==null?void 0:u[0])!=null&&c.contents&&(n=Fl((I=(C=(V=(y=(g=(f=s.data.result)==null?void 0:f[0])==null?void 0:g.value)==null?void 0:y.pageData)==null?void 0:V.compData)==null?void 0:C[0])==null?void 0:I.contents)),n},jl=n=>{var a,l,o,r;return{label:n==null?void 0:n.name,value:n==null?void 0:n.name,children:(r=me.getColumnChild((o=(l=(a=n==null?void 0:n.compData)==null?void 0:a.find(u=>(u==null?void 0:u.key)==="header"))==null?void 0:l.contents)==null?void 0:o[0]))==null?void 0:r.map(u=>({label:u==null?void 0:u.label,value:u==null?void 0:u.label}))}},al=async n=>{var o,r,u,c;let s="";(o=p.cloneDeep(n))==null||o.forEach(f=>{s=s===""?s+f:s+"/"+f});const a=await Be.getInsofDataApi({key:{type:"structure",pageKey:s,systemKey:sessionStorage.getItem("systemKey"),parentTable:""}});let l=[];return((r=a==null?void 0:a.data)==null?void 0:r.type)==="success"&&(l=(c=(u=a.data.result)==null?void 0:u.map(f=>f.value.pageData))==null?void 0:c.filter(f=>(f==null?void 0:f.comp)==="Table"),l=l==null?void 0:l.map(f=>jl(f))),l},Se=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],Ie=[{label:"输入框",value:"Input"},{label:"单选框",value:"Select"},{label:"日期选择器",value:"Date"},{label:"长文本",value:"TextArea"},{label:"附件选择器",value:"Upload"}],Ul=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ie},{key:"originalContent",label:"初始值",type:"Input"},{key:"value",label:"固定值",type:"Input"}],Jl=async()=>{const n=await Ll();return[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ie},{key:"originalContent",label:"初始值",type:"Select"},{key:"contents",label:"选项值",type:"Input"},{key:"menuSelect",label:"菜单选项",type:"cascader",options:n},{key:"groupSelect",label:"组信息选项",type:"cascader",options:[]}]},Pl=e.computed(async()=>await Jl()),Rl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ie},{key:"originalContent",label:"初始值",type:"Date"}],Wl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ie},{key:"originalContent",label:"初始值",type:"Input"}],zl=[{key:"label",label:"标签名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ie}],G=[{key:"Input",value:Ul},{key:"Select",value:Pl},{key:"Date",value:Rl},{key:"TextArea",value:Wl},{key:"Upload",value:zl}],Ml=[{value:"normal",label:"自定义"},{value:"add",label:"新增"},{value:"fix",label:"修改"},{value:"view",label:"查看"},{value:"delete",label:"删除"}],Ne=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Ml},{key:"background",label:"颜色",type:"Color"}],Oe=n=>{var a,l,o,r,u;let s=p.cloneDeep(n);if(((a=s==null?void 0:s.find(c=>(c==null?void 0:c.name)==="类型"))==null?void 0:a.type)==="Select"){const c=(u=(r=(o=(l=p.cloneDeep(s))==null?void 0:l.find(f=>(f==null?void 0:f.name)==="选项值"))==null?void 0:o.value)==null?void 0:r.split(","))==null?void 0:u.map(f=>({label:f,value:f}));s=s==null?void 0:s.map(f=>((f==null?void 0:f.name)==="初始值"&&(f.contents=c,f.value=(f==null?void 0:f.value)??""),f))}return s},dl=n=>{var o;let s={};const a=(o=n==null?void 0:n.filter(r=>!Array.isArray(r)))==null?void 0:o[0];s.label=a,s.value=a;const l=n==null?void 0:n.filter(r=>Array.isArray(r));return l&&(l==null?void 0:l.length)>0&&(s.children=l==null?void 0:l.map(r=>dl(r))),s},Gl={class:"form-content"},ql={__name:"index",props:{formRules:Object,itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(n,{emit:s}){const a=n,l=s,o=e.ref([]),r=e.ref(!1),u=e.ref([]),c=me.useFormToTableComp(Be.pinia),f=e.ref(!1),g=e.ref(),y=C=>{var v,x,t,d;const I=(x=(v=p.cloneDeep(a.itemData))==null?void 0:v.find(i=>(i==null?void 0:i.key)==="formContent"))==null?void 0:x.contents,b=p.cloneDeep(C.content);let S={};b&&((t=Object.values(b))==null?void 0:t.length)>0&&((d=Object.values(b))==null||d.forEach((i,h)=>{S[I[h].key]=i}));const m={content:S,index:a==null?void 0:a.index,buttonName:C==null?void 0:C.buttonName};l("change",m)},V=C=>{var S,m;if(!C)return;if(((S=Object.values(p.cloneDeep(C)))==null?void 0:S.length)>0){const v=(m=Object.values(p.cloneDeep(C)))==null?void 0:m.map(t=>t);let x="";v==null||v.forEach(t=>{t!==""&&t!==void 0&&(x=x===""?t:x+"/"+t)}),c.setSelectArray(v),c.setSelectString(x)}const I=p.cloneDeep(a.itemData),b=I==null?void 0:I.map(v=>{var x;return(v==null?void 0:v.key)==="formContent"&&((x=v.contents)==null||x.map((t,d)=>{var i,h,L,F,P,K,D,T,_,B,$,U,z,E,M,W,Z,J,se;return t.type=t!=null&&t.type?t.type:(F=(L=(h=(i=t==null?void 0:t.key)==null?void 0:i.split("$"))==null?void 0:h[1])==null?void 0:L.split("("))!=null&&F[0]?(P=Se==null?void 0:Se.find(re=>{var ie,ce,fe,he;return(re==null?void 0:re.key)===((he=(fe=(ce=(ie=t==null?void 0:t.key)==null?void 0:ie.split("$"))==null?void 0:ce[1])==null?void 0:fe.split("("))==null?void 0:he[0])}))==null?void 0:P.value:"Input",t.options=t!=null&&t.options?t.options:((T=(D=(K=t==null?void 0:t.key)==null?void 0:K.split("$"))==null?void 0:D[1])==null?void 0:T.length)>0?(U=($=Ol((B=(_=t==null?void 0:t.key)==null?void 0:_.split("$"))==null?void 0:B[1]))==null?void 0:$.split(","))==null?void 0:U.map(re=>({label:re,value:re})):[],(z=t==null?void 0:t.key)!=null&&z.includes("$")&&(t.key=(M=(E=t==null?void 0:t.key)==null?void 0:E.split("$"))==null?void 0:M[0]),t.value=Array.isArray((W=Object.values(C))==null?void 0:W[d])?(J=(Z=Object.values(C))==null?void 0:Z[d])==null?void 0:J[0]:(se=Object.values(C))==null?void 0:se[d],t})),v});l("contentChange",{contents:b,index:a.index})};return e.watch(()=>a.itemData,()=>{var v,x,t,d,i,h,L,F,P,K,D;const C=(v=p.cloneDeep(a.itemData))==null?void 0:v.find(T=>(T==null?void 0:T.key)==="formContent"),I=(x=p.cloneDeep(a.itemData))==null?void 0:x.find(T=>(T==null?void 0:T.key)==="formButton"),b=(t=p.cloneDeep(a.itemData))==null?void 0:t.find(T=>(T==null?void 0:T.key)==="formFlex"),S=(d=p.cloneDeep(a.itemData))==null?void 0:d.find(T=>(T==null?void 0:T.key)==="formWrap"),m=(i=p.cloneDeep(a.itemData))==null?void 0:i.find(T=>(T==null?void 0:T.key)==="enableWrap");if((S==null?void 0:S.contents)==="纵向"?r.value=!1:r.value=!0,f.value=(m==null?void 0:m.contents)===void 0?!1:m==null?void 0:m.contents,g.value=typeof(b==null?void 0:b.contents)!="boolean"?!(!(b!=null&&b.contents)===""||((h=b==null?void 0:b.contents)==null?void 0:h.toUpperCase())==="VERTICAL"):b==null?void 0:b.contents,((L=C==null?void 0:C.contents)==null?void 0:L.length)>0&&Array.isArray(C==null?void 0:C.contents)){const T=[];(F=C==null?void 0:C.contents)==null||F.forEach(($,U)=>{var z,E,M,W,Z,J,se,re,ie,ce,fe,he;if(($==null?void 0:$.label)!==""){let ye=($==null?void 0:$.label)??($==null?void 0:$.key)??"",te=($==null?void 0:$.type)??"",ue=($==null?void 0:$.options)??[];if((z=$==null?void 0:$.key)!=null&&z.includes("$")&&(ye=(E=p.cloneDeep($==null?void 0:$.key).split("$"))==null?void 0:E[0],((W=(M=p.cloneDeep($==null?void 0:$.key).split("$"))==null?void 0:M[1])==null?void 0:W.length)>0)){const[_e,xe]=(J=(Z=p.cloneDeep($==null?void 0:$.key).split("$"))==null?void 0:Z[1])==null?void 0:J.split(/[()]/);te=((se=Se.find(De=>(De==null?void 0:De.key)===_e))==null?void 0:se.value)??"",((re=xe==null?void 0:xe.split(","))==null?void 0:re.length)>0&&(ue=(ie=xe==null?void 0:xe.split(","))==null?void 0:ie.map(De=>({label:De,value:De})))}const ee=(fe=(ce=$==null?void 0:$.contents)==null?void 0:ce.split(","))==null?void 0:fe.map(_e=>({label:_e,value:_e}));T.push({label:ye??"",name:"t"+U,type:te===""?"Input":te,value:$!=null&&$.originalContent&&($==null?void 0:$.originalContent)!==""?$.originalContent:$!=null&&$.value?$.value:(ue==null?void 0:ue.length)>0?(he=ue==null?void 0:ue[0])==null?void 0:he.value:($==null?void 0:$.value)??"",id:($==null?void 0:$.id)??U,contents:(ee==null?void 0:ee.length)>0?ee:ue??[],width:($==null?void 0:$.width)??1})}});const _=(P=p.cloneDeep(T))==null?void 0:P.map($=>$.value);let B="";_==null||_.forEach($=>{$!==""&&$!==void 0&&(B=B===""?$:B+"/"+$)}),c.setSelectArray(_),c.setSelectString(B),o.value=T}else o.value=[];if(((K=I==null?void 0:I.contents)==null?void 0:K.length)>0){const T=[];(D=I==null?void 0:I.contents)==null||D.forEach((_,B)=>{(_==null?void 0:_.label)!==""&&T.push({label:(_==null?void 0:_.label)??"",id:(_==null?void 0:_.id)??B,type:(_==null?void 0:_.type)??"",background:_==null?void 0:_.background})}),u.value=T}else u.value=[]},{deep:!0,immediate:!0}),(C,I)=>(e.openBlock(),e.createElementBlock("div",Gl,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:o.value,formRules:n.formRules,buttonValue:u.value,isRowFlex:g.value,isEnableWrap:f.value,onOnButtonClick:y,onChange:V,isButtonRow:r.value,key:a.itemData},null,8,["rowContents","formRules","buttonValue","isRowFlex","isEnableWrap","isButtonRow"]))]))}},nl=de._export_sfc(ql,[["__scopeId","data-v-05e786aa"]]),Je=e.ref(0),fl=n=>{var s;return!n||(n==null?void 0:n.length)===0?[]:(s=p.cloneDeep(n))==null?void 0:s.map(l=>(Je.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)??Je.value,children:fl(l==null?void 0:l.children)},l))},Kl=n=>{var a;return(a=p.cloneDeep(n))==null?void 0:a.map(l=>(Je.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)??Je.value,children:fl(l==null?void 0:l.children)},l))},hl=(n,s)=>{var a;return n!=null&&n.find(l=>(l==null?void 0:l.id)===s)?(a=p.cloneDeep(n))==null?void 0:a.filter(o=>(o==null?void 0:o.id)!==s):(n=n==null?void 0:n.map(l=>(l.children=hl(l==null?void 0:l.children,s),l)),n)},ml=(n,s)=>{var a;return n!=null&&n.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(a=p.cloneDeep(n))==null?void 0:a.map(o=>((o==null?void 0:o.id)===(s==null?void 0:s.id)&&(o=s),o)):(n=n==null?void 0:n.map(l=>(l.children=ml(l==null?void 0:l.children,s),l)),n)},yl=(n,s)=>{var a;return n!=null&&n.find(l=>{var o;return(l==null?void 0:l.id)===((o=s==null?void 0:s.contents)==null?void 0:o.id)})?(a=p.cloneDeep(n))==null?void 0:a.map(o=>{var r;return(o==null?void 0:o.id)===((r=s==null?void 0:s.contents)==null?void 0:r.id)&&(o=s==null?void 0:s.contents),o}):(n=n==null?void 0:n.map(l=>(l.children=yl(l==null?void 0:l.children,s),l)),n)},vl=(n,s)=>{var a;return n!=null&&n.find(l=>(l==null?void 0:l.id)===(s==null?void 0:s.id))?(a=p.cloneDeep(n))==null?void 0:a.map(o=>((o==null?void 0:o.id)===(s==null?void 0:s.id)&&(o!=null&&o.children||(o.children=[]),o.children.push(s.contents)),o)):(n=n==null?void 0:n.map(l=>(l.children=vl(l==null?void 0:l.children,s),l)),n)},Q=[{key:"label",label:"标签名",type:"Input"},{key:"prop",label:"属性名",type:"Input"},{key:"width",label:"宽度",type:"Input"},{key:"sortable",label:"是否支持排序",type:"Switch"},{key:"align",label:"文本所在位置",type:"Radio",options:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{key:"fixed",label:"是否固定列",type:"Switch"}],Hl=[{label:"view",value:"查看"},{label:"fix",value:"修改"},{label:"delete",value:"删除"}],Zl=[{label:"add",value:"新增"}],we=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Zl},{key:"background",label:"按钮背景色",type:"Color"}],$e=[{key:"label",label:"按钮名",type:"Input"},{key:"type",label:"类型",type:"Select",options:Hl},{key:"textColor",label:"按钮颜色",type:"Color"}],kl=Ce.defineStore("modelTableComp",{state:()=>({tableIndex:0}),actions:{setTableIndex(n){this.tableIndex=n}}}),Ql={class:"table-header-child"},Xl={class:"table-header-child-main"},Yl={class:"table-header-child-content"},ea={class:"table-header-child-content-item"},la={class:"fix-button"},aa={key:0},na={class:"form-content"},oa={__name:"tableNewChild",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:s}){const a=n,l=s,o=e.ref(!1),r=e.ref(""),u=kl(Be.pinia),{tableIndex:c}=Ce.storeToRefs(u);e.ref(0);const f=e.ref(""),g=e.ref([]),y=e.ref([]),V=t=>{var i;o.value=!0;let d=[];Q==null||Q.forEach(h=>{let L=p.cloneDeep(c.value)+1;u.setTableIndex(L),d.push({label:h==null?void 0:h.label,name:h==null?void 0:h.label,type:h.type,value:t[h.key],id:c.value,contents:h==null?void 0:h.options})}),t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&d.push({children:t==null?void 0:t.children,isFormColHidden:!0}),f.value=t==null?void 0:t.id,g.value=d,y.value=d},C=t=>{l("fixChange",p.cloneDeep(t))},I=t=>{l("deleteChange",p.cloneDeep(t))},b=t=>{o.value=!0;let d=[];Q==null||Q.forEach(i=>{let h=p.cloneDeep(c.value)+1;u.setTableIndex(h),d.push({label:i==null?void 0:i.label,name:i==null?void 0:i.label,type:i.type,value:"",id:c.value,contents:i==null?void 0:i.options})}),r.value=t==null?void 0:t.id,g.value=d,y.value=d},S=t=>{let d=p.cloneDeep(y.value);d=d==null?void 0:d.map(i=>(i.children||(i.value=t==null?void 0:t[i.name]),i)),y.value=d},m=()=>{var d,i;g.value=y.value;let t={};if(f.value!=="")t.id=f.value,(d=g.value)==null||d.forEach(h=>{const L=Q==null?void 0:Q.find(F=>(F==null?void 0:F.label)===(h==null?void 0:h.label));L?t[L.key]=h.value:h!=null&&h.children&&h.children.length>0&&(t.children=h.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"fix"});else{let h=p.cloneDeep(c.value)+1;u.setTableIndex(h),t.id="id"+c.value,(i=g.value)==null||i.forEach(L=>{const F=Q==null?void 0:Q.find(P=>(P==null?void 0:P.label)===(L==null?void 0:L.label));F?t[F.key]=L.value:L!=null&&L.children&&L.children.length>0&&(t.children=L.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"add"})}f.value="",g.value=[],y.value=[]},v=()=>{o.value=!1,f.value="",r.value="",g.value=[],y.value=[]},x=t=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",t),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return(t,d)=>{const i=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ql,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a==null?void 0:a.tableChildContents,(h,L)=>(e.openBlock(),e.createElementBlock("div",Xl,[e.createElementVNode("div",Yl,[e.createElementVNode("div",ea,e.toDisplayString(h.label),1),e.createElementVNode("div",la,[e.createVNode(i,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>b(h)},null,8,["onClick"]),e.createVNode(i,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>V(h)},null,8,["onClick"]),e.createVNode(i,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>x(h)},null,8,["onClick"])])]),h!=null&&h.children&&h.children.length>0?(e.openBlock(),e.createElementBlock("div",aa,[e.createVNode(gl,{tableChildContents:h==null?void 0:h.children,onDeleteChange:I,onFixChange:C},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(le.ssDialog,{visible:o.value,onBeforeDestroy:v,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",na,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:S},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:m},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},sa=de._export_sfc(oa,[["__scopeId","data-v-e0fef72d"]]),ra={class:"table-header-child"},ta={class:"table-header-child-main"},ca={class:"table-header-child-content"},ia={class:"table-header-child-content-item"},ua={class:"fix-button"},pa={key:0},da={class:"form-content"},fa={__name:"tableChildren",props:{tableChildContents:Array},emits:["fixChange","deleteChange"],setup(n,{emit:s}){const a=n,l=s,o=e.ref(!1),r=e.ref(""),u=kl(Be.pinia),{tableIndex:c}=Ce.storeToRefs(u),f=e.ref(""),g=e.ref([]),y=e.ref([]),V=t=>{l("fixChange",p.cloneDeep(t))},C=t=>{var i;o.value=!0;let d=[];Q==null||Q.forEach(h=>{let L=p.cloneDeep(c.value)+1;u.setTableIndex(L),d.push({label:h==null?void 0:h.label,name:h==null?void 0:h.label,type:h.type,value:t[h.key],id:c.value,contents:h==null?void 0:h.options})}),t!=null&&t.children&&((i=t==null?void 0:t.children)==null?void 0:i.length)>0&&d.push({children:t==null?void 0:t.children,isFormColHidden:!0}),f.value=t==null?void 0:t.id,g.value=d,y.value=d},I=t=>{o.value=!0;let d=[];Q==null||Q.forEach(i=>{let h=p.cloneDeep(c.value)+1;u.setTableIndex(h),d.push({label:i==null?void 0:i.label,name:i==null?void 0:i.label,type:i.type,value:"",id:c.value,contents:i==null?void 0:i.options})}),r.value=t==null?void 0:t.id,g.value=d,y.value=d},b=t=>{let d=p.cloneDeep(y.value);d=d==null?void 0:d.map(i=>(i.children||(i.value=t==null?void 0:t[i.name]),i)),y.value=d},S=()=>{var d,i;g.value=y.value;let t={};if(f.value!=="")t.id=f.value,(d=g.value)==null||d.forEach(h=>{const L=Q==null?void 0:Q.find(F=>(F==null?void 0:F.label)===(h==null?void 0:h.label));L?t[L.key]=h.value:h!=null&&h.children&&h.children.length>0&&(t.children=h.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"fix"});else{let h=p.cloneDeep(c.value)+1;u.setTableIndex(h),t.id="idChild"+c.value,(i=g.value)==null||i.forEach(L=>{const F=Q==null?void 0:Q.find(P=>(P==null?void 0:P.label)===(L==null?void 0:L.label));F?t[F.key]=L.value:L!=null&&L.children&&L.children.length>0&&(t.children=L.children)}),o.value=!1,l("fixChange",{contents:p.cloneDeep(t),id:r.value,type:"add"})}f.value="",g.value=[],y.value=[]},m=()=>{o.value=!1,f.value="",r.value="",g.value=[],y.value=[]},v=t=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{l("deleteChange",t),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},x=t=>{l("deleteChange",t)};return(t,d)=>{const i=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ra,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a==null?void 0:a.tableChildContents,(h,L)=>(e.openBlock(),e.createElementBlock("div",ta,[e.createElementVNode("div",ca,[e.createElementVNode("div",ia,e.toDisplayString(h.label),1),e.createElementVNode("div",ua,[e.createVNode(i,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>I(h)},null,8,["onClick"]),e.createVNode(i,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>C(h)},null,8,["onClick"]),e.createVNode(i,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:F=>v(h)},null,8,["onClick"])])]),h!=null&&h.children&&h.children.length>0?(e.openBlock(),e.createElementBlock("div",pa,[e.createVNode(sa,{tableChildContents:h==null?void 0:h.children,onDeleteChange:x,onFixChange:V},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),256)),e.createVNode(le.ssDialog,{visible:o.value,onBeforeDestroy:m,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",da,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:b},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:m,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:S},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},gl=de._export_sfc(fa,[["__scopeId","data-v-cc311a5f"]]),ha={class:"table-operate-content"},ma={class:"table-operate-item"},ya={class:"operate-title"},va={class:"operate-content"},ka={class:"fix-content"},ga={class:"fix-content-label"},ba={class:"fix-button"},Ca={key:0},Da={class:"operate-title"},xa={class:"operate-content"},Ea={class:"fix-content"},_a={class:"fix-content-label"},Na={class:"fix-button"},wa={class:"operate-title"},$a={class:"operate-content"},Ba={class:"fix-content"},Va={class:"fix-content-label"},Ta={class:"fix-button"},Aa={class:"operate-title"},Ia={class:"operate-content"},Sa={class:"fix-content"},Oa={class:"fix-content-label"},Fa={class:"fix-button"},La={class:"operate-content"},ja={style:{display:"flex","justify-content":"space-between"}},Ua={class:"form-content"},Ja={class:"form-content"},Pa={class:"form-content"},Ra={class:"form-content"},Wa={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,l=s,o=e.ref([]),r=e.ref(!1),u=e.ref(!1),c=e.ref([]),f=e.ref(!1),g=e.ref([]),y=e.ref(!1),V=e.ref([]),C=e.ref(""),I=e.ref(""),b=e.ref([]),S=e.ref([]),m=e.ref([]),v=e.ref([]),x=e.ref(!1),t=e.ref([]),d=e.ref([]),i=e.ref(0),h=e.ref([]),L=e.ref([]),F=e.ref([]),P=()=>{x.value=!0;let k=[];we==null||we.forEach(N=>{i.value++,k.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:(N==null?void 0:N.key)==="background"?"var(--ssComponent-primary-color)":"",id:i.value,contents:N==null?void 0:N.options})}),t.value=k,d.value=k},K=()=>{var N,A;u.value=!0;let k=[];(A=(N=G==null?void 0:G.find(w=>(w==null?void 0:w.key)==="Input"))==null?void 0:N.value)==null||A.forEach(w=>{i.value++,k.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)==="类型"?"Input":"",id:i.value,contents:w==null?void 0:w.options})}),h.value=k,L.value=k},D=async k=>{var N,A,w,H,q,pe,R;if((k==null?void 0:k.类型)!==((A=(N=L.value)==null?void 0:N.find(j=>(j==null?void 0:j.label)==="类型"))==null?void 0:A.value)){let j=[],ae=await((H=(w=G==null?void 0:G.find(Y=>(Y==null?void 0:Y.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:w.value)==null?void 0:H.value)?await((R=(pe=G==null?void 0:G.find(Y=>(Y==null?void 0:Y.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:pe.value)==null?void 0:R.value):(q=G==null?void 0:G.find(Y=>(Y==null?void 0:Y.key)===((k==null?void 0:k.类型)===""?"Input":k==null?void 0:k.类型)))==null?void 0:q.value;ae==null||ae.forEach(Y=>{i.value++,j.push({label:Y==null?void 0:Y.label,name:Y==null?void 0:Y.label,type:Y.type,value:(k==null?void 0:k[Y.label])??"",id:i.value,contents:Y==null?void 0:Y.options})}),L.value=j,h.value=j}else{let j=p.cloneDeep(h.value);j=j==null?void 0:j.map(ae=>(ae.value=k==null?void 0:k[ae.name],ae)),L.value=j}},T=async k=>{var w,H,q,pe,R;u.value=!0;let N=[];const A=await((H=(w=G==null?void 0:G.find(j=>(j==null?void 0:j.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:w.value)==null?void 0:H.value)?await((R=(pe=G==null?void 0:G.find(j=>(j==null?void 0:j.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:pe.value)==null?void 0:R.value):(q=G==null?void 0:G.find(j=>(j==null?void 0:j.key)===((k==null?void 0:k.type)===""?"Input":k==null?void 0:k.type)))==null?void 0:q.value;A==null||A.forEach(j=>{i.value++,N.push({label:j==null?void 0:j.label,name:j==null?void 0:j.label,type:j.type,value:(j==null?void 0:j.label)==="类型"&&k[j.key]===""?"Input":k[j.key],id:i.value,contents:j==null?void 0:j.options})}),C.value=k==null?void 0:k.id,h.value=N,L.value=N},_=k=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,A;F.value=(N=p.cloneDeep(F.value))==null?void 0:N.filter(w=>(w==null?void 0:w.id)!==(k==null?void 0:k.id)),l("change",(A=p.cloneDeep(a.originalItemContents))==null?void 0:A.map(w=>((w==null?void 0:w.key)==="tableToForm"&&(w.contents=F.value),w))),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},B=()=>{u.value=!1,h.value=[],C.value=""},$=async()=>{var w,H,q,pe,R,j,ae,Y;h.value=L.value;let k={};C.value!==""?k.id=C.value:(i.value++,k.id="id"+i.value);let N=await((H=(w=G==null?void 0:G.find(X=>{var ve,ge;return(X==null?void 0:X.key)===(((ge=(ve=h.value)==null?void 0:ve.find(Ee=>(Ee==null?void 0:Ee.label)==="类型"))==null?void 0:ge.value)??"label")}))==null?void 0:w.value)==null?void 0:H.value)??((q=G==null?void 0:G.find(X=>{var ve,ge;return(X==null?void 0:X.key)===(((ge=(ve=h.value)==null?void 0:ve.find(Ee=>(Ee==null?void 0:Ee.label)==="类型"))==null?void 0:ge.value)??"label")}))==null?void 0:q.value);if((pe=h.value)==null||pe.forEach(X=>{const ve=N==null?void 0:N.find(ge=>(ge==null?void 0:ge.label)===(X==null?void 0:X.label));ve&&(k[ve.key]=X.value)}),k.name=k.label,(R=F.value)!=null&&R.find(X=>X.id===k.id))F.value=(j=F.value)==null?void 0:j.map(X=>(X.id===k.id&&(X=k),X));else{let X=p.cloneDeep(F.value);F.value||(F.value=[]),X.push(k),F.value=X}F.value=F.value.map(({id:X,...ve})=>ve),u.value=!1,C.value="";let A=p.cloneDeep(a.originalItemContents);(ae=p.cloneDeep(a.originalItemContents))!=null&&ae.find(X=>(X==null?void 0:X.key)==="tableToForm")?A=(Y=p.cloneDeep(a.originalItemContents))==null?void 0:Y.map(X=>((X==null?void 0:X.key)==="tableToForm"&&(X.contents=F.value),X)):A.push({key:"tableToForm",contents:F.value}),l("change",A)},U=k=>{x.value=!0;let N=[];we==null||we.forEach(A=>{i.value++,N.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:k[A.key],id:i.value,contents:A==null?void 0:A.options})}),C.value=k==null?void 0:k.id,t.value=N,d.value=N};e.watch(()=>y.value,()=>{var N,A;let k=p.cloneDeep(a.originalItemContents);(N=p.cloneDeep(a.originalItemContents))!=null&&N.find(w=>(w==null?void 0:w.key)==="page")?k=(A=p.cloneDeep(a.originalItemContents))==null?void 0:A.map(w=>((w==null?void 0:w.key)==="page"&&(w.contents=y.value),w)):k.push({key:"page",contents:y.value}),l("change",k)},{deep:!0});const z=k=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,A;S.value=(N=p.cloneDeep(S.value))==null?void 0:N.filter(w=>(w==null?void 0:w.id)!==(k==null?void 0:k.id)),l("change",(A=p.cloneDeep(a.originalItemContents))==null?void 0:A.map(w=>((w==null?void 0:w.key)==="extraButton"&&(w.contents=S.value),w))),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},E=()=>{var A,w,H,q,pe;t.value=d.value;let k={};if(C.value!==""?k.id=C.value:(i.value++,k.id="id"+i.value),(A=t.value)==null||A.forEach(R=>{const j=we==null?void 0:we.find(ae=>(ae==null?void 0:ae.label)===(R==null?void 0:R.label));j?k[j.key]=R.value:R!=null&&R.children&&R.children.length>0&&(k.children=R.children)}),(w=S.value)!=null&&w.find(R=>R.id===k.id))S.value=(H=S.value)==null?void 0:H.map(R=>(R.id===k.id&&(R=k),R));else{let R=p.cloneDeep(S.value);R.push(k),S.value=R}x.value=!1,C.value="";let N=p.cloneDeep(a.originalItemContents);(q=p.cloneDeep(a.originalItemContents))!=null&&q.find(R=>(R==null?void 0:R.key)==="extraButton")?N=(pe=p.cloneDeep(a.originalItemContents))==null?void 0:pe.map(R=>((R==null?void 0:R.key)==="extraButton"&&(R.contents=S.value),R)):N.push({key:"extraButton",contents:S.value}),l("change",N)},M=k=>{let N=p.cloneDeep(d.value);N=N==null?void 0:N.map(A=>(A.children||(A.value=k==null?void 0:k[A.name]),A)),d.value=N},W=()=>{x.value=!1,t.value=[],C.value=""},Z=k=>{f.value=!0;let N=[];$e==null||$e.forEach(A=>{i.value++,N.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:k[A.key],id:i.value,contents:A==null?void 0:A.options})}),C.value=k==null?void 0:k.id,m.value=N,v.value=N},J=k=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,A;b.value=(N=p.cloneDeep(b.value))==null?void 0:N.filter(w=>(w==null?void 0:w.id)!==(k==null?void 0:k.id)),l("change",(A=p.cloneDeep(a.originalItemContents))==null?void 0:A.map(w=>((w==null?void 0:w.key)==="rowButton"&&(w.contents=b.value),w))),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},se=()=>{r.value=!0;let k=[];Q==null||Q.forEach(N=>{i.value++,k.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:"",id:i.value,contents:N==null?void 0:N.options})}),g.value=k,V.value=k},re=()=>{f.value=!0;let k=[];$e==null||$e.forEach(N=>{i.value++,k.push({label:N==null?void 0:N.label,name:N==null?void 0:N.label,type:N.type,value:"",id:i.value,contents:N==null?void 0:N.options})}),m.value=k,v.value=k},ie=k=>{let N=p.cloneDeep(v.value);N=N==null?void 0:N.map(A=>(A.children||(A.value=k==null?void 0:k[A.name]),A)),v.value=N},ce=()=>{var A,w,H,q,pe;m.value=v.value;let k={};if(C.value!==""?k.id=C.value:(i.value++,k.id="id"+i.value),(A=m.value)==null||A.forEach(R=>{const j=$e==null?void 0:$e.find(ae=>(ae==null?void 0:ae.label)===(R==null?void 0:R.label));j?k[j.key]=R.value:R!=null&&R.children&&R.children.length>0&&(k.children=R.children)}),(w=b.value)!=null&&w.find(R=>R.id===k.id))b.value=(H=b.value)==null?void 0:H.map(R=>(R.id===k.id&&(R=k),R));else{let R=p.cloneDeep(b.value);R.push(k),b.value=R}f.value=!1,C.value="";let N=p.cloneDeep(a.originalItemContents);(q=p.cloneDeep(a.originalItemContents))!=null&&q.find(R=>(R==null?void 0:R.key)==="rowButton")?N=(pe=p.cloneDeep(a.originalItemContents))==null?void 0:pe.map(R=>((R==null?void 0:R.key)==="rowButton"&&(R.contents=b.value),R)):N.push({key:"rowButton",contents:b.value}),l("change",N)},fe=()=>{f.value=!1,C.value="",v.value=[],m.value=[]},he=k=>{r.value=!0;let N=[];Q==null||Q.forEach(A=>{i.value++,N.push({label:A==null?void 0:A.label,name:A==null?void 0:A.label,type:A.type,value:"",id:i.value,contents:A==null?void 0:A.options})}),g.value=N,I.value=k==null?void 0:k.id,V.value=N},ye=k=>{var N;c.value=hl(p.cloneDeep(c.value),k==null?void 0:k.id),l("change",(N=p.cloneDeep(a.originalItemContents))==null?void 0:N.map(A=>{var w;return(A==null?void 0:A.key)==="header"&&(A.contents=(w=c.value)!=null&&w.some(H=>H==null?void 0:H.children)?[c.value]:c.value),A}))},te=k=>{var A,w,H;k.type==="fix"?k.id!==""?c.value=yl(c.value,k):c.value=ml(c.value,k==null?void 0:k.contents):c.value=vl(c.value,k),c.value=(A=c.value)!=null&&A.some(q=>q==null?void 0:q.children)?[c.value]:c.value,C.value="";let N=p.cloneDeep(a.originalItemContents);(w=p.cloneDeep(a.originalItemContents))!=null&&w.find(q=>(q==null?void 0:q.key)==="header")?N=(H=p.cloneDeep(a.originalItemContents))==null?void 0:H.map(q=>((q==null?void 0:q.key)==="header"&&(q.contents=c.value),q)):N.push({key:"header",contents:c.value}),l("change",N)},ue=k=>{var A;r.value=!0;let N=[];Q==null||Q.forEach(w=>{i.value++,N.push({label:w==null?void 0:w.label,name:w==null?void 0:w.label,type:w.type,value:k[w.key],id:i.value,contents:w==null?void 0:w.options})}),k!=null&&k.children&&((A=k==null?void 0:k.children)==null?void 0:A.length)>0&&N.push({children:k==null?void 0:k.children,isFormColHidden:!0}),C.value=k==null?void 0:k.id,I.value="",g.value=N,V.value=N},ee=k=>{let N=p.cloneDeep(V.value);N=N==null?void 0:N.map(A=>(A.children||(A.value=k==null?void 0:k[A.name]),A)),V.value=N},_e=()=>{r.value=!1,C.value="",I.value="",V.value=[]},xe=()=>{var A,w,H,q,pe,R;g.value=V.value;let k={};if(C.value!==""?k.id=C.value:(i.value++,k.id="id"+i.value),(A=g.value)==null||A.forEach(j=>{const ae=Q==null?void 0:Q.find(Y=>(Y==null?void 0:Y.label)===(j==null?void 0:j.label));ae?k[ae.key]=j.value:j!=null&&j.children&&j.children.length>0&&(k.children=j.children)}),(w=c.value)!=null&&w.find(j=>j.id===k.id))c.value=(H=c.value)==null?void 0:H.map(j=>(j.id===k.id&&(j=k),j));else{let j=p.cloneDeep(c.value)??[];I.value===""?j.push(k):j=j==null?void 0:j.map(ae=>(ae.id===I.value&&(ae.children||(ae.children=[]),ae.children.push(k)),ae)),c.value=j}c.value=(q=c.value)!=null&&q.some(j=>j==null?void 0:j.children)?[c.value]:c.value,r.value=!1,C.value="",I.value="";let N=p.cloneDeep(a.originalItemContents);(pe=p.cloneDeep(a.originalItemContents))!=null&&pe.find(j=>(j==null?void 0:j.key)==="header")?N=(R=p.cloneDeep(a.originalItemContents))==null?void 0:R.map(j=>((j==null?void 0:j.key)==="header"&&(j.contents=c.value),j)):N.push({key:"header",contents:c.value}),l("change",N)},De=k=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var N,A;c.value=(N=p.cloneDeep(c.value))==null?void 0:N.filter(w=>(w==null?void 0:w.id)!==(k==null?void 0:k.id)),l("change",(A=p.cloneDeep(a.originalItemContents))==null?void 0:A.map(w=>{var H;return(w==null?void 0:w.key)==="header"&&(w.contents=(H=c.value)!=null&&H.some(q=>q==null?void 0:q.children)?[c.value]:c.value),w})),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})};return e.watch(()=>a.originalItemContents,()=>{var k,N,A,w,H,q,pe,R,j,ae,Y,X,ve,ge,Ee,Qe,Xe,Ye,el;if(!(!a.originalItemContents||a.originalItemContents.length===0))if(o.value=p.cloneDeep(a.originalItemContents),c.value=(N=(k=o.value)==null?void 0:k.find(O=>(O==null?void 0:O.key)==="header"))==null?void 0:N.contents,b.value=(w=(A=o.value)==null?void 0:A.find(O=>(O==null?void 0:O.key)==="rowButton"))==null?void 0:w.contents,S.value=(q=(H=o.value)==null?void 0:H.find(O=>(O==null?void 0:O.key)==="extraButton"))==null?void 0:q.contents,y.value=(R=(pe=o.value)==null?void 0:pe.find(O=>(O==null?void 0:O.key)==="page"))!=null&&R.contents?!!((ae=(j=o.value)==null?void 0:j.find(O=>(O==null?void 0:O.key)==="page"))!=null&&ae.contents):!1,F.value=(X=(Y=o.value)==null?void 0:Y.find(O=>(O==null?void 0:O.key)==="tableToForm"))==null?void 0:X.contents,c.value=(ve=c.value)==null?void 0:ve.map((O,be)=>(Array.isArray(O)?O=Kl(O):O={label:(O==null?void 0:O.label)??"",prop:(O==null?void 0:O.label)==="操作"?"operate":O==null?void 0:O.prop,width:O!=null&&O.width?parseInt(O.width):"",fixed:(O==null?void 0:O.fixed)??void 0,sortable:(O==null?void 0:O.sortable)??!1,align:(O==null?void 0:O.align)??"center",showOverflowTooltip:(O==null?void 0:O.showOverflowTooltip)??!0,isNotDrag:(O==null?void 0:O.isNotDrag)??!1,isEditCol:(O==null?void 0:O.isEditCol)??!1,isOperate:(O==null?void 0:O.isOperate)??!1,id:(O==null?void 0:O.id)??be},O)),c.value=(ge=c.value)!=null&&ge.every(O=>Array.isArray(O))?(Ee=c.value)==null?void 0:Ee[0]:c.value,b.value=(Qe=b.value)==null?void 0:Qe.map((O,be)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",textColor:(O==null?void 0:O.textColor)??"#000000",id:(O==null?void 0:O.id)??be}),S.value=(Xe=S.value)==null?void 0:Xe.map((O,be)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",background:(O==null?void 0:O.background)??"var(--ssComponent-primary-color)",id:(O==null?void 0:O.id)??be}),F.value)F.value=(el=F.value)==null?void 0:el.map(O=>{i.value++;let be=O;return be.id=i.value,be});else{let O=[];const be=(Ye=me.getColumnChild(p.cloneDeep(c.value)))==null?void 0:Ye.filter(ke=>(ke==null?void 0:ke.prop)!=="operate");be==null||be.forEach(ke=>{i.value++,O.push({label:ke==null?void 0:ke.label,name:ke==null?void 0:ke.label,type:"Input",value:"",id:i.value,contents:ke==null?void 0:ke.options})}),F.value=O}},{deep:!0,immediate:!0}),(k,N)=>{const A=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",ha,[e.createElementVNode("div",ma,[e.createElementVNode("div",ya,[N[2]||(N[2]=e.createElementVNode("div",null,e.toDisplayString("表头"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:se},[e.createVNode(A,{name:"Plus",class:"icon-size"}),N[1]||(N[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",va,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(w,H)=>(e.openBlock(),e.createElementBlock("div",{key:H},[e.createElementVNode("div",ka,[e.createElementVNode("div",ga,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",ba,[e.createVNode(A,{name:"ChildAdd",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>he(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>ue(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>De(w)},null,8,["onClick"])])]),w!=null&&w.children&&w.children.length>0?(e.openBlock(),e.createElementBlock("div",Ca,[e.createVNode(gl,{tableChildContents:w==null?void 0:w.children,onDeleteChange:ye,onFixChange:te},null,8,["tableChildContents"])])):e.createCommentVNode("",!0)]))),128))]),e.createElementVNode("div",Da,[N[4]||(N[4]=e.createElementVNode("div",null,e.toDisplayString("行内按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:re},[e.createVNode(A,{name:"Plus",class:"icon-size"}),N[3]||(N[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",xa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,(w,H)=>(e.openBlock(),e.createElementBlock("div",{key:H},[e.createElementVNode("div",Ea,[e.createElementVNode("div",_a,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Na,[e.createVNode(A,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>Z(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>J(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",wa,[N[6]||(N[6]=e.createElementVNode("div",null,e.toDisplayString("表外按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:P},[e.createVNode(A,{name:"Plus",class:"icon-size"}),N[5]||(N[5]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",$a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(w,H)=>(e.openBlock(),e.createElementBlock("div",{key:H},[e.createElementVNode("div",Ba,[e.createElementVNode("div",Va,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Ta,[e.createVNode(A,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>U(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>z(w)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Aa,[N[8]||(N[8]=e.createElementVNode("div",null,e.toDisplayString("表格弹框字段设置"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:K},[e.createVNode(A,{name:"Plus",class:"icon-size"}),N[7]||(N[7]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Ia,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(F.value,(w,H)=>(e.openBlock(),e.createElementBlock("div",{key:H},[e.createElementVNode("div",Sa,[e.createElementVNode("div",Oa,e.toDisplayString(w==null?void 0:w.label),1),e.createElementVNode("div",Fa,[e.createVNode(A,{name:"ChildFix",style:{width:"24px",height:"24px"},class:"svg-icon-content",onClick:q=>T(w)},null,8,["onClick"]),e.createVNode(A,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:q=>_(w)},null,8,["onClick"])])])]))),128))]),N[10]||(N[10]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("分页"))],-1)),e.createElementVNode("div",La,[e.createElementVNode("div",ja,[N[9]||(N[9]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否分页"),-1)),e.createVNode(le._sfc_main$1,{modelValue:y.value,"onUpdate:modelValue":N[0]||(N[0]=w=>y.value=w)},null,8,["modelValue"])])])]),e.createVNode(le.ssDialog,{visible:r.value,onBeforeDestroy:_e,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ua,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:g.value,key:g.value,isEnableWrap:!0,onChange:ee},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:_e,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:xe},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(le.ssDialog,{visible:f.value,onBeforeDestroy:fe,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ja,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:m.value,key:m.value,isEnableWrap:!0,onChange:ie},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:fe,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:ce},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(le.ssDialog,{visible:x.value,onBeforeDestroy:W,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Pa,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:t.value,key:t.value,isEnableWrap:!0,onChange:M},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:W,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:E},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(le.ssDialog,{visible:u.value,onBeforeDestroy:B,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",Ra,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:h.value,key:h.value,isEnableWrap:!0,onChange:D},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:B,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:$},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},za=de._export_sfc(Wa,[["__scopeId","data-v-14ead5ff"]]),Ma={class:"form-operate-content"},Ga={class:"form-operate-item"},qa={class:"operate-title"},Ka={class:"operate-content"},Ha={class:"fix-content"},Za={class:"fix-button"},Qa={class:"operate-title"},Xa={class:"operate-content"},Ya={class:"fix-content"},en={class:"fix-button"},ln={style:{display:"flex","justify-content":"space-between"}},an={class:"form-content"},nn={class:"form-content"},on={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,l=s,o=e.ref(!1),r=e.ref([]),u=e.ref([]),c=e.ref(!1),f=e.ref([]),g=e.ref([]),y=e.ref(""),V=e.ref(!1),C=e.ref(0),I=e.ref([]),b=e.ref([]),S=async D=>{var B,$,U,z;o.value=!0;let T=[];const _=await(($=(B=G==null?void 0:G.find(E=>(E==null?void 0:E.key)===((D==null?void 0:D.type)===""?"Input":D==null?void 0:D.type)))==null?void 0:B.value)==null?void 0:$.value)??((U=G==null?void 0:G.find(E=>(E==null?void 0:E.key)===((D==null?void 0:D.type)===""?"Input":D==null?void 0:D.type)))==null?void 0:U.value);if(_==null||_.forEach(E=>{C.value++,T.push({label:E==null?void 0:E.label,name:E==null?void 0:E.label,type:E.type,value:(E==null?void 0:E.label)==="类型"&&D[E.key]===""?"Input":D[E.key],id:C.value,contents:E==null?void 0:E.options})}),D!=null&&D.menuSelect&&((z=D==null?void 0:D.menuSelect)==null?void 0:z.length)>0){const E=await al(D==null?void 0:D.menuSelect);T=T==null?void 0:T.map(M=>((M==null?void 0:M.name)==="组信息选项"&&(M.contents=E),M))}y.value=D==null?void 0:D.id,r.value=Oe(T),u.value=Oe(T)},m=D=>{c.value=!0;let T=[];Ne==null||Ne.forEach(_=>{C.value++,T.push({label:_==null?void 0:_.label,name:_==null?void 0:_.label,type:_.type,value:(_==null?void 0:_.label)==="类型"&&D[_.key]===""?"normal":D[_.key],id:C.value,contents:_==null?void 0:_.options})}),I.value=T,b.value=T,y.value=D==null?void 0:D.id};e.watch(()=>V.value,()=>{var T,_;let D=p.cloneDeep(a.originalItemContents);(T=p.cloneDeep(a.originalItemContents))!=null&&T.find(B=>(B==null?void 0:B.key)==="enableWrap")?D=(_=p.cloneDeep(a.originalItemContents))==null?void 0:_.map(B=>((B==null?void 0:B.key)==="enableWrap"&&(B.contents=!V.value),B)):D.push({key:"enableWrap",contents:!V.value}),l("change",D)},{deep:!0});const v=()=>{var _,B,$,U,z;I.value=b.value;let D={};if(y.value!==""?D.id=y.value:(C.value++,D.id="id"+C.value),(_=I.value)==null||_.forEach(E=>{const M=Ne==null?void 0:Ne.find(W=>(W==null?void 0:W.label)===(E==null?void 0:E.label));M&&(D[M.key]=E.value)}),(B=f.value)!=null&&B.find(E=>E.id===D.id))f.value=($=f.value)==null?void 0:$.map(E=>(E.id===D.id&&(E=D),E));else{let E=p.cloneDeep(f.value);f.value||(f.value=[]),E.push(D),f.value=E}c.value=!1,y.value="";let T=p.cloneDeep(a.originalItemContents);(U=p.cloneDeep(a.originalItemContents))!=null&&U.find(E=>(E==null?void 0:E.key)==="formButton")?T=(z=p.cloneDeep(a.originalItemContents))==null?void 0:z.map(E=>((E==null?void 0:E.key)==="formButton"&&(E.contents=f.value),E)):T.push({key:"formButton",contents:f.value}),l("change",T)},x=D=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var T,_;g.value=(T=p.cloneDeep(g.value))==null?void 0:T.filter(B=>(B==null?void 0:B.id)!==(D==null?void 0:D.id)),l("change",(_=p.cloneDeep(a.originalItemContents))==null?void 0:_.map(B=>((B==null?void 0:B.key)==="formContent"&&(B.contents=g.value),B))),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},t=D=>{Ve.ElMessageBox.confirm("是否确认要删除","",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var T,_;f.value=(T=p.cloneDeep(f.value))==null?void 0:T.filter(B=>(B==null?void 0:B.id)!==(D==null?void 0:D.id)),l("change",(_=p.cloneDeep(a.originalItemContents))==null?void 0:_.map(B=>((B==null?void 0:B.key)==="formButton"&&(B.contents=f.value),B))),Ce.ElMessage({type:"success",message:"删除成功"})}).catch(()=>{})},d=()=>{c.value=!0;let D=[];Ne==null||Ne.forEach(T=>{C.value++,D.push({label:T==null?void 0:T.label,name:T==null?void 0:T.label,type:T.type,value:(T==null?void 0:T.label)==="类型"?"normal":"",id:C.value,contents:T==null?void 0:T.options})}),I.value=D,b.value=D},i=()=>{var T,_;o.value=!0;let D=[];(_=(T=G==null?void 0:G.find(B=>(B==null?void 0:B.key)==="Input"))==null?void 0:T.value)==null||_.forEach(B=>{C.value++,D.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)==="类型"?"Input":"",id:C.value,contents:B==null?void 0:B.options})}),r.value=D,u.value=D},h=D=>{let T=p.cloneDeep(b.value);T=T==null?void 0:T.map(_=>(_.value=D==null?void 0:D[_.name],_)),b.value=T},L=async D=>{var T,_,B,$,U,z,E,M;if((D==null?void 0:D.类型)!==((_=(T=u.value)==null?void 0:T.find(W=>(W==null?void 0:W.label)==="类型"))==null?void 0:_.value)){let W=[];const Z=await(($=(B=G==null?void 0:G.find(J=>(J==null?void 0:J.key)===((D==null?void 0:D.类型)===""?"Input":D==null?void 0:D.类型)))==null?void 0:B.value)==null?void 0:$.value)?await((E=(z=G==null?void 0:G.find(J=>(J==null?void 0:J.key)===((D==null?void 0:D.类型)===""?"Input":D==null?void 0:D.类型)))==null?void 0:z.value)==null?void 0:E.value):(U=G==null?void 0:G.find(J=>(J==null?void 0:J.key)===((D==null?void 0:D.类型)===""?"Input":D==null?void 0:D.类型)))==null?void 0:U.value;Z==null||Z.forEach(J=>{C.value++,W.push({label:J==null?void 0:J.label,name:J==null?void 0:J.label,type:J.type,value:(D==null?void 0:D[J.label])??"",id:C.value,contents:J==null?void 0:J.options})}),u.value=W,r.value=W}else{let W=p.cloneDeep(u.value);if(W=W==null?void 0:W.map(Z=>(Z.value=D==null?void 0:D[Z.name],Z)),D!=null&&D.菜单选项&&((M=D==null?void 0:D.菜单选项)==null?void 0:M.length)>0){const Z=await al(D==null?void 0:D.菜单选项);W=W==null?void 0:W.map(J=>((J==null?void 0:J.name)==="组信息选项"&&(J.contents=Z),J))}W=Oe(W),u.value=W}},F=()=>{},P=async()=>{var B,$,U,z,E,M,W,Z;r.value=u.value;let D={};y.value!==""?D.id=y.value:(C.value++,D.id="id"+C.value);let T=await(($=(B=G==null?void 0:G.find(J=>{var se,re;return(J==null?void 0:J.key)===(((re=(se=r.value)==null?void 0:se.find(ie=>(ie==null?void 0:ie.label)==="类型"))==null?void 0:re.value)??"label")}))==null?void 0:B.value)==null?void 0:$.value)??((U=G==null?void 0:G.find(J=>{var se,re;return(J==null?void 0:J.key)===(((re=(se=r.value)==null?void 0:se.find(ie=>(ie==null?void 0:ie.label)==="类型"))==null?void 0:re.value)??"label")}))==null?void 0:U.value);if((z=r.value)==null||z.forEach(J=>{const se=T==null?void 0:T.find(re=>(re==null?void 0:re.label)===(J==null?void 0:J.label));se&&(D[se.key]=J.value)}),D.width=1,D.key=D==null?void 0:D.label,(E=g.value)!=null&&E.find(J=>J.id===D.id))g.value=(M=g.value)==null?void 0:M.map(J=>(J.id===D.id&&(J=D),J));else{let J=p.cloneDeep(g.value);J.push(D),g.value=J}g.value=g.value.map(({id:J,...se})=>se),o.value=!1,y.value="";let _=p.cloneDeep(a.originalItemContents);(W=p.cloneDeep(a.originalItemContents))!=null&&W.find(J=>(J==null?void 0:J.key)==="formContent")?_=(Z=p.cloneDeep(a.originalItemContents))==null?void 0:Z.map(J=>((J==null?void 0:J.key)==="formContent"&&(J.contents=g.value),J)):_.push({key:"formContent",contents:g.value}),l("change",_)},K=()=>{o.value=!1,c.value=!1,y.value="",u.value=[],b.value=[]};return e.watch(()=>a.originalItemContents,()=>{var T,_,B,$,U,z;if(!a.originalItemContents||a.originalItemContents.length===0)return;const D=p.cloneDeep(a.originalItemContents);g.value=((T=D==null?void 0:D.find(E=>(E==null?void 0:E.key)==="formContent"))==null?void 0:T.contents)??[],f.value=((_=D==null?void 0:D.find(E=>(E==null?void 0:E.key)==="formButton"))==null?void 0:_.contents)??[],V.value=(B=D==null?void 0:D.find(E=>(E==null?void 0:E.key)==="enableWrap"))!=null&&B.contents?!(($=D==null?void 0:D.find(E=>(E==null?void 0:E.key)==="enableWrap"))!=null&&$.contents):!0,g.value=(U=p.cloneDeep(g.value))==null?void 0:U.map((E,M)=>{let W=E;return W.id=(E==null?void 0:E.id)??M,E!=null&&E.label||(E.label=(E==null?void 0:E.key)??(E==null?void 0:E.label)??""),E!=null&&E.type||(E.type=(E==null?void 0:E.type)??""),E.contents=(E==null?void 0:E.options)??"",W}),g.value=Oe(g.value),f.value=(z=f.value)==null?void 0:z.map((E,M)=>E={label:(E==null?void 0:E.label)??"",type:(E==null?void 0:E.type)??"",background:(E==null?void 0:E.background)??"var(--ssComponent-primary-color)",id:(E==null?void 0:E.id)??M})},{deep:!0,immediate:!0}),(D,T)=>{const _=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("div",Ma,[e.createElementVNode("div",Ga,[e.createElementVNode("div",qa,[T[2]||(T[2]=e.createElementVNode("div",null,e.toDisplayString("表单内容"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:i},[e.createVNode(_,{name:"Plus",class:"icon-size"}),T[1]||(T[1]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Ka,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(B,$)=>(e.openBlock(),e.createElementBlock("div",{key:$},[e.createElementVNode("div",Ha,[e.createElementVNode("div",null,e.toDisplayString(B.label),1),e.createElementVNode("div",Za,[e.createVNode(_,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>S(B)},null,8,["onClick"]),e.createVNode(_,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>x(B)},null,8,["onClick"])])])]))),128))]),e.createElementVNode("div",Qa,[T[4]||(T[4]=e.createElementVNode("div",null,e.toDisplayString("表单按钮"),-1)),e.createElementVNode("div",{class:"icon-content",onClick:d},[e.createVNode(_,{name:"Plus",class:"icon-size"}),T[3]||(T[3]=e.createElementVNode("div",null,e.toDisplayString("新增"),-1))])]),e.createElementVNode("div",Xa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(B,$)=>(e.openBlock(),e.createElementBlock("div",{key:$},[e.createElementVNode("div",Ya,[e.createElementVNode("div",null,e.toDisplayString(B.label),1),e.createElementVNode("div",en,[e.createVNode(_,{name:"ChildFix",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>m(B)},null,8,["onClick"]),e.createVNode(_,{name:"ChildDelete",class:"svg-icon-content",style:{width:"24px",height:"24px"},onClick:U=>t(B)},null,8,["onClick"])])])]))),128))]),T[6]||(T[6]=e.createElementVNode("div",{class:"operate-title"},[e.createElementVNode("div",null,e.toDisplayString("表单布局"))],-1)),e.createElementVNode("div",ln,[T[5]||(T[5]=e.createElementVNode("div",{class:"operate-center-content"},e.toDisplayString("是否自动撑宽"),-1)),e.createVNode(le._sfc_main$1,{modelValue:V.value,"onUpdate:modelValue":T[0]||(T[0]=B=>V.value=B)},null,8,["modelValue"])])]),e.createVNode(le.ssDialog,{visible:o.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",an,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:r.value,key:r.value,isEnableWrap:!0,onChange:L,onBlur:F},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:P},e.toDisplayString("确认"))])]),_:1},8,["visible"]),e.createVNode(le.ssDialog,{visible:c.value,onBeforeDestroy:K,width:840},{default:e.withCtx(()=>[e.createElementVNode("div",nn,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:I.value,key:I.value,isEnableWrap:!0,onChange:h},null,8,["rowContents"]))])]),footer:e.withCtx(()=>[e.createElementVNode("div",{class:"dialog-footer"},[e.createElementVNode("div",{onClick:K,class:"cancel-button button"},e.toDisplayString("取消")),e.createElementVNode("div",{class:"ok-button button",onClick:v},e.toDisplayString("确认"))])]),_:1},8,["visible"])])}}},ol=de._export_sfc(on,[["__scopeId","data-v-82a6cf04"]]),sn={class:"step-module content"},rn={class:"module-data"},tn={class:"step-module layout"},cn={class:"form-content"},un=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,l=s,o=e.ref([{label:"方向:",prop:"direction",type:"RADIO",contents:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}],value:"horizontal"},{label:"是否居中:",prop:"alignCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"应用简洁风格",prop:"simple",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!1}]),r=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"标题",prop:"title",type:"input",value:""},{label:"描述",prop:"description",type:"input",value:""}]),u=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.reactive({visible:!1,width:"40%",title:"步骤条"}),f=e.ref("create"),g=e.ref({}),y=e.ref([]),V=m=>{var v;g.value=m,l("change",(v=b())==null?void 0:v.compData)},C=(m,v)=>{var x,t;switch(m){case"create":(x=r.value)==null||x.forEach(d=>{d.value=""}),f.value="create",c.visible=!0;break;case"update":(t=r.value)==null||t.forEach(d=>{d.value=v[d==null?void 0:d.prop]}),f.value="update",c.visible=!0;break;case"delete":y.value.splice(v,1),f.value="delete";break}},I=m=>{var v,x,t;if((m==null?void 0:m.buttonName)==="确认"){const d=p.cloneDeep(m==null?void 0:m.content);switch(Object.keys(d).forEach(i=>{d[i]===""&&delete d[i]}),f.value){case"create":y.value.push({...d,index:((v=y.value)==null?void 0:v.length)+1});break;case"update":y.value=(x=y.value)==null?void 0:x.map(i=>i.index===(d==null?void 0:d.index)?{...i,title:d==null?void 0:d.title,description:d==null?void 0:d.description}:i);break}l("change",(t=b())==null?void 0:t.compData),c.visible=!1}else c.visible=!1},b=()=>({comp:"Step",compData:[{key:"stepList",contents:y.value},{key:"stepConfig",contents:g.value}]}),S=()=>{c.visible=!1};return e.watch(()=>a==null?void 0:a.itemContents,m=>{var v,x;m&&(g.value=((v=m==null?void 0:m.find(t=>t.key==="stepConfig"))==null?void 0:v.contents)??{},y.value=((x=m==null?void 0:m.find(t=>t.key==="stepList"))==null?void 0:x.contents)??[])},{immediate:!0}),(m,v)=>{const x=e.resolveComponent("svg-icon"),t=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",sn,[v[2]||(v[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:v[0]||(v[0]=d=>C("create"))},[e.createVNode(x,{name:"Plus",class:"icon-size"}),v[1]||(v[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",rn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(d,i)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:i},[e.createElementVNode("span",null,e.toDisplayString(d==null?void 0:d.title),1),e.createElementVNode("div",null,[e.createVNode(t,{type:"primary",size:"small",onClick:h=>C("update",{...d,index:i+1})},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(t,{type:"danger",size:"small",onClick:h=>C("delete",i)},{default:e.withCtx(()=>v[4]||(v[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",tn,[v[5]||(v[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(le.ssForm,{rowContents:o.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(le.ssDialog,{visible:c.visible,title:c.title,onBeforeDestroy:S,width:c.width},{default:e.withCtx(()=>[e.createElementVNode("div",cn,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:r.value,key:r.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:u.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),pn=de._export_sfc(un,[["__scopeId","data-v-47438605"]]),dn={class:"step-module content"},fn={class:"module-data"},hn={class:"step-module layout"},mn={class:"form-content"},yn=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,l=s,o=e.ref("create"),r=e.ref({}),u=e.ref([]),c=e.ref([{label:"方向:",prop:"placement",type:"radio",contents:[{label:"底部",value:"bottom"},{label:"顶部",value:"top"}],value:"bottom"},{label:"节点类型:",prop:"type",type:"select",contents:[{label:"primary",value:"primary"},{label:"success",value:"success"},{label:"warning",value:"warning"},{label:"danger",value:"danger"},{label:"info",value:"info"}],value:"primary"},{label:"颜色:",prop:"color",type:"color",value:""},{label:"尺寸:",prop:"size",type:"radio",contents:[{label:"normal",value:"normal"},{label:"large",value:"large"}],value:"normal"},{label:"是否空心",prop:"isHollow",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0},{label:"是否居中",prop:"isCenter",type:"RADIO",contents:[{label:"是",value:!0},{label:"否",value:!1}],value:!0}]),f=e.ref([{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"内容",prop:"content",type:"input",value:""},{label:"时间戳",prop:"timestamp",type:"datetime",value:""}]),g=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),y=e.reactive({visible:!1,width:"40%",title:"时间线"}),V=m=>{var v;r.value=m,console.log(1212,m),l("change",(v=b())==null?void 0:v.compData)},C=(m,v)=>{var x,t;switch(m){case"create":(x=f.value)==null||x.forEach(d=>{d.value=""}),o.value="create",y.visible=!0;break;case"update":(t=f.value)==null||t.forEach(d=>{d.value=v[d==null?void 0:d.prop]}),o.value="update",y.visible=!0;break;case"delete":u.value.splice(v,1),o.value="delete";break}},I=m=>{var v,x,t,d;if((m==null?void 0:m.buttonName)==="确认"){const i=p.cloneDeep(m==null?void 0:m.content);switch(Object.keys(i).forEach(h=>{i[h]===""&&delete i[h]}),o.value){case"create":console.log(1335,u.value,i),(x=u.value)==null||x.push({...i,index:((v=u.value)==null?void 0:v.length)+1});break;case"update":u.value=(t=u.value)==null?void 0:t.map(h=>h.index===(i==null?void 0:i.index)?{...h,content:i==null?void 0:i.content,timestamp:i==null?void 0:i.timestamp}:h);break}l("change",(d=b())==null?void 0:d.compData),y.visible=!1}else y.visible=!1},b=()=>({comp:"TimeLine",compData:[{key:"timeLineList",contents:u.value},{key:"timeLineConfig",contents:r.value}]}),S=()=>{y.visible=!1};return e.watch(()=>a==null?void 0:a.itemContents,m=>{var v,x;m&&(r.value=((v=m==null?void 0:m.find(t=>t.key==="timeLineConfig"))==null?void 0:v.contents)??{},u.value=((x=m==null?void 0:m.find(t=>t.key==="timeLineList"))==null?void 0:x.contents)??[])},{immediate:!0}),(m,v)=>{const x=e.resolveComponent("svg-icon"),t=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",dn,[v[2]||(v[2]=e.createElementVNode("h4",{class:"module-title"},"内容",-1)),e.createElementVNode("div",{class:"module-icon",onClick:v[0]||(v[0]=d=>C("create"))},[e.createVNode(x,{name:"Plus",class:"icon-size"}),v[1]||(v[1]=e.createElementVNode("div",null,"新增",-1))])]),e.createElementVNode("div",fn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(d,i)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:i},[e.createElementVNode("span",null,e.toDisplayString(d==null?void 0:d.content),1),e.createElementVNode("div",null,[e.createVNode(t,{type:"primary",size:"small",onClick:h=>C("update",{...d,index:i+1})},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(t,{type:"danger",size:"small",onClick:h=>C("delete",i)},{default:e.withCtx(()=>v[4]||(v[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",hn,[v[5]||(v[5]=e.createElementVNode("div",{class:"module-title"},"布局",-1)),e.createVNode(le.ssForm,{rowContents:c.value,onChange:V},null,8,["rowContents"])])]),e.createVNode(le.ssDialog,{visible:y.visible,title:y.title,onBeforeDestroy:S,width:y.width},{default:e.withCtx(()=>[e.createElementVNode("div",mn,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:g.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),vn=de._export_sfc(yn,[["__scopeId","data-v-40aea043"]]),kn={};function gn(n,s){return e.openBlock(),e.createElementBlock("div")}const bn=de._export_sfc(kn,[["render",gn]]),Cn={class:"extra-content"},Dn={key:0},xn={key:1},En={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(n,{emit:s}){const a=n,l=e.ref(0),o=e.ref(),r=e.ref(),u=s,c=e.ref(!1),f=e.ref({}),g=e.ref({}),y=e.ref();e.watch(()=>[a.itemData],()=>{var d;const t=p.cloneDeep(a.itemData);o.value=(d=p.cloneDeep(t))==null?void 0:d.map(i=>{var h;if(i.key==="extra"){let L=[];(h=i.value)==null||h.forEach(F=>{var P;L.push((P=Object.values(F))==null?void 0:P[0])}),i.value=L}return i})},{deep:!0,immediate:!0});const V=(t,d,i,h)=>{var F;let L={};((F=t==null?void 0:t[0])==null?void 0:F.contents)==="详情"&&(c.value=!0,L[d]=t,r.value=t==null?void 0:t.filter(P=>(P==null?void 0:P.key)!=="tableContentName"),f.value=L,g.value=i,y.value=h.id)},C=t=>{var P,K,D,T;const d=(K=(P=Object.values(p.cloneDeep(f.value)))==null?void 0:P[0])==null?void 0:K.filter(_=>(_==null?void 0:_.key)==="tableContentName"),i=(T=(D=Object.values(p.cloneDeep(f.value)))==null?void 0:D[0])==null?void 0:T.filter(_=>(_==null?void 0:_.key)!=="tableContentName"),h=i==null?void 0:i.map((_,B)=>{var $;return B===t.index&&(_==null?void 0:_.comp)==="Table"&&(_.compData=($=_.compData)==null?void 0:$.map(U=>{var z,E;return(U==null?void 0:U.key)==="tableContents"&&(U.contents=(E=(z=t.content)==null?void 0:z.map(M=>{let W={};for(let Z in M)Z!=="id"&&(W[Z]=M[Z]);return W}))==null?void 0:E.map(M=>Object.values(M))),U})),_});h.unshift(d==null?void 0:d[0]);let L=p.cloneDeep(f.value),F={};for(let _ in L)F[_]=h;f.value=F},I=()=>{c.value=!1,f.value={},g.value={},y.value=void 0,l.value++},b=t=>{var P,K,D,T;const d=(K=(P=Object.values(p.cloneDeep(f.value)))==null?void 0:P[0])==null?void 0:K.filter(_=>(_==null?void 0:_.key)==="tableContentName"),i=(T=(D=Object.values(p.cloneDeep(f.value)))==null?void 0:D[0])==null?void 0:T.filter(_=>(_==null?void 0:_.key)!=="tableContentName"),h=i==null?void 0:i.map((_,B)=>(B===t.index&&(_.compData=t.contents),_));h.unshift(d==null?void 0:d[0]);let L=p.cloneDeep(f.value),F={};for(let _ in L)F[_]=h;f.value=F},S=()=>{var d,i;let t={};for(let h in g.value)h===((d=Object.keys(f.value))==null?void 0:d[0])?t[h]=(i=Object.values(f.value))==null?void 0:i[0]:t[h]=g.value[h];u("change",{buttonName:"编辑",index:y.value,singleContent:t},"methodData"),c.value=!1,f.value={},g.value={},y.value=void 0},m=()=>{c.value=!1,f.value={},g.value={},y.value=void 0},v=t=>{u("change",t,"methodData")},x=t=>bl(t);return(t,d)=>(e.openBlock(),e.createElementBlock("div",Cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(i,h)=>(e.openBlock(),e.createElementBlock("div",{key:l.value},[(i==null?void 0:i.key)==="extra"?(e.openBlock(),e.createElementBlock("div",Dn)):(e.openBlock(),e.createElementBlock("div",xn,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:h,index:(i==null?void 0:i.id)??h,onContentClick:V,onChange:v},null,40,["itemData","childItemData","index"]))]))]))),128)),e.createVNode(le.ssDialog,{visible:c.value,onBeforeDestroy:m},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(i,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"extra-dialog"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(x(i.comp)),{itemData:i==null?void 0:i.compData,onChange:C,childItemData:i==null?void 0:i.itemChildData,key:h,onContentChange:b,index:(i==null?void 0:i.id)??h,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:I},e.toDisplayString("取消")),e.createElementVNode("div",{class:"confirm-button footer-button",onClick:S},e.toDisplayString("确认"))])]),_:1},8,["visible"])]))}},_n=de._export_sfc(En,[["__scopeId","data-v-b0b2f71f"]]),Nn={class:"method-content"},wn=["onClick"],$n={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(n){const s=e.ref([]),a=n,l=Sl.useModelComp(Be.pinia),{itemData:o,isEdit:r}=Ce.storeToRefs(l),u=(g,y)=>{var C;const V=(C=y==null?void 0:y[0])==null?void 0:C.children;return g==null?void 0:g.map(I=>{var b;return I=(b=I==null?void 0:I.map((S,m)=>{var v;return{key:(v=V[m])==null?void 0:v.label,value:S}}))==null?void 0:b.filter(S=>S.key),I})};e.watch(()=>o.value,async()=>{r.value=="view"&&await f(p.cloneDeep(a.itemData))},{deep:!0});const c=async g=>{var t,d,i,h,L,F;let y={};if((t=p.cloneDeep(g.content))==null||t.forEach((P,K)=>{var D,T,_,B,$,U,z,E,M,W,Z,J,se,re,ie,ce,fe;if((P==null?void 0:P.comp)==="Table"){let he=(B=(_=(T=(D=P==null?void 0:P.compData)==null?void 0:D.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:T.contents)==null?void 0:_[0])==null?void 0:B.some(ee=>ee==null?void 0:ee.children),ye=(z=(U=($=P==null?void 0:P.compData)==null?void 0:$.find(ee=>(ee==null?void 0:ee.key)==="tableContents"))==null?void 0:U.contents)==null?void 0:z.map(ee=>ee.slice(1)),te=(J=(Z=(W=(M=(E=P==null?void 0:P.compData)==null?void 0:E.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:M.contents)==null?void 0:W[0])==null?void 0:Z[0])==null?void 0:J.label,ue=(ie=(re=(se=P==null?void 0:P.compData)==null?void 0:se.find(ee=>(ee==null?void 0:ee.key)==="header"))==null?void 0:re.contents)==null?void 0:ie[0];if(he)y[te]=u(ye,ue);else{const ee=[];ue=ue.slice(1,ue.length-1),ue==null||ue.forEach((_e,xe)=>{ye==null||ye.forEach(De=>{ee.push({key:_e.label+De[0],value:De[xe+1]})})}),y["form"+K]=ee}}else{const he=(fe=(ce=P.compData)==null?void 0:ce.find(te=>(te==null?void 0:te.key)==="formContent"))==null?void 0:fe.contents;y.form={};const ye=[];he==null||he.forEach(te=>{te.key!==""&&(te={key:(te==null?void 0:te.key)??(te==null?void 0:te.label),value:te==null?void 0:te.value},ye.push(te))}),y.form=ye}}),g.api){const P=await Be.axios.post(g.api,{data:y,templateFileName:(d=g==null?void 0:g.extraContent)==null?void 0:d[0]},{responseType:"blob",headers:{"Content-Type":"application/json"}});var V=new Blob([P.data],{type:"application/octet-stream;charset=UTF-8"}),C=P.headers["content-disposition"],I=new RegExp("filename=([^;]+\\.[^\\.;]+);*"),b=I.exec(C),S=((L=(h=(i=g==null?void 0:g.extraContent)==null?void 0:i[0])==null?void 0:h.split("."))==null?void 0:L[0])+"."+((F=b[1].split("."))==null?void 0:F[1]),m=document.createElement("a"),v=window.URL.createObjectURL(V),x=/^["](.*)["]$/g;m.style.display="none",m.href=v,m.download=decodeURI(S.replace(x,"$1")),document.body.appendChild(m),m.click(),document.body.removeChild(m),window.URL.revokeObjectURL(v)}},f=async g=>{var I;const y=p.cloneDeep(g),V=y==null?void 0:y.map(async b=>{var d,i,h,L,F,P,K;const m=(d=(await Be.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:b.method}})).data.result)==null?void 0:d[0],v=await Be.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:m==null?void 0:m.id}}),x=await me.getItemData((i=b==null?void 0:b.value)==null?void 0:i[0],sessionStorage.getItem("systemKey"),""),t=(h=v.data.result)==null?void 0:h[0];return{buttonName:(L=m==null?void 0:m.key)==null?void 0:L.methodKey,api:(P=(F=t==null?void 0:t.value)==null?void 0:F.tableData)==null?void 0:P[0],content:x==null?void 0:x.filter(D=>D.comp!=="methodButton"),extraContent:(K=p.cloneDeep(b.value))==null?void 0:K.slice(1)}}),C=await Promise.all(V);s.value=C==null?void 0:C.filter(b=>b==null?void 0:b.extraContent),(I=s.value)==null||I.forEach(b=>{var S;b.api===""&&((S=b.content)==null||S.forEach(m=>{var v;m.comp=="Table"&&l.setExtraContents(me.methodTableToContent(m.compData,(v=b.extraContent)==null?void 0:v[0]))}))})};return e.watch(()=>a.itemData,async()=>{r.value=="view"&&await f(p.cloneDeep(a.itemData))},{immediate:!0,deep:!0}),(g,y)=>(e.openBlock(),e.createElementBlock("div",Nn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,V=>(e.openBlock(),e.createElementBlock("div",null,[V.api!==""?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:C=>c(V),class:"method-buttons"},e.toDisplayString(V.buttonName),9,wn)):e.createCommentVNode("",!0)]))),256))]))}},Bn=de._export_sfc($n,[["__scopeId","data-v-0c52611a"]]),Vn={};function Tn(n,s){return" 567 "}const An=de._export_sfc(Vn,[["render",Tn]]),In={class:"module content"},Sn={class:"module data"},On={class:"module layout"},Fn={class:"form-content"},Ln=e.defineComponent({__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,l=s,o=e.reactive({visible:!1,width:"40%",title:"签名配置"}),r=e.ref("create"),u=e.ref([{label:"取消",background:"#c0c4cc"},{label:"确认",background:"#436aaf"}]),c=e.ref([{label:"宽度(%):",prop:"signPadWidth",type:"number",value:"30"},{label:"弹窗名称:",prop:"dialogTitle",type:"input",value:""},{label:"弹窗宽度(%):",prop:"dialogWidth",type:"number",value:"30"},{label:"弹窗显示:",prop:"dialogShow",type:"radio",contents:[{label:"显示",value:!0},{label:"隐藏",value:!1}],value:!1,isFormColHidden:!0},{label:"路径:",prop:"url",type:"input",value:"",isFormColHidden:!0}]),f=e.computed(()=>[{label:"",prop:"index",type:"input",value:"",isFormColHidden:!0},{label:"类型:",prop:"label",type:"select",contents:[{label:"电子签名",value:"电子签名"},{label:"签字版",value:"签字版"},{label:"上传签名",value:"上传签名"}],value:""},{label:"图标",prop:"icon",type:"inputPopover",value:""}]),g=e.ref({}),y=e.ref([]),V=()=>({comp:"Signature",compData:[{key:"signTypeList",contents:y.value},{key:"signConfig",contents:g.value}]}),C=m=>{var v;g.value=p.cloneDeep(m),l("change",(v=V())==null?void 0:v.compData)},I=m=>{var v,x;if((m==null?void 0:m.buttonName)==="确认"){const t=p.cloneDeep(m==null?void 0:m.content);switch(r.value){case"create":y.value.push({...t,index:((v=y.value)==null?void 0:v.length)+1});break}l("change",(x=V())==null?void 0:x.compData),o.visible=!1}else o.visible=!1},b=(m,v)=>{var x,t;switch(m){case"create":(x=f.value)==null||x.forEach(d=>{d.value=""}),r.value="create",o.visible=!0;break;case"update":(t=f.value)==null||t.forEach(d=>{d.value=v[d==null?void 0:d.prop]}),console.log(345,v),r.value="update",o.visible=!0;break;case"delete":y.value.splice(v,1),r.value="delete";break}},S=()=>{o.visible=!1};return e.watch(()=>a==null?void 0:a.itemContents,m=>{var v,x;m&&(console.log(5670,m),g.value=((v=m==null?void 0:m.find(t=>t.key==="signConfig"))==null?void 0:v.contents)??{},y.value=((x=m==null?void 0:m.find(t=>t.key==="signTypeList"))==null?void 0:x.contents)??[])},{immediate:!0}),(m,v)=>{const x=e.resolveComponent("svg-icon"),t=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",null,[e.createElementVNode("div",In,[v[2]||(v[2]=e.createElementVNode("h4",{class:"module-title"},"签名类型",-1)),e.createElementVNode("div",{class:"module-icon",onClick:v[0]||(v[0]=d=>b("create"))},[e.createElementVNode("div",null,[e.createVNode(x,{name:"Plus",class:"icon-size"}),v[1]||(v[1]=e.createElementVNode("span",null,"新增",-1))])])]),e.createElementVNode("div",Sn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(d,i)=>(e.openBlock(),e.createElementBlock("div",{class:"module-data-item",key:i},[e.createElementVNode("span",null,e.toDisplayString(d==null?void 0:d.label),1),e.createElementVNode("div",null,[e.createVNode(t,{type:"primary",size:"small",onClick:h=>b("update",{...d,index:i+1})},{default:e.withCtx(()=>v[3]||(v[3]=[e.createTextVNode("修改")])),_:2,__:[3]},1032,["onClick"]),e.createVNode(t,{type:"danger",size:"small",onClick:h=>b("delete",i)},{default:e.withCtx(()=>v[4]||(v[4]=[e.createTextVNode("删除")])),_:2,__:[4]},1032,["onClick"])])]))),128))]),e.createElementVNode("div",On,[e.createVNode(le.ssForm,{rowContents:c.value,onChange:C},null,8,["rowContents"])])]),e.createVNode(le.ssDialog,{visible:o.visible,title:o.title,onBeforeDestroy:S,width:o.width},{default:e.withCtx(()=>[e.createElementVNode("div",Fn,[(e.openBlock(),e.createBlock(le.ssForm,{rowContents:f.value,key:f.value,isEnableWrap:!1,isButtonRow:!1,isStartJustify:!1,buttonValue:u.value,onOnButtonClick:I},null,8,["rowContents","buttonValue"]))])]),_:1},8,["visible","title","width"])],64)}}}),jn=de._export_sfc(Ln,[["__scopeId","data-v-4b15bd3e"]]),Un=e.defineComponent({__name:"index",props:{stepConfig:{type:Object,default:{}},stepList:{type:Array,default:()=>[]}},emits:["clickStep","clickTrigger","changeTrigger"],setup(n,{emit:s}){const a=n,l=s,o=e.ref(1),r=e.computed(()=>{var V,C;return(V=a==null?void 0:a.stepConfig)!=null&&V.allowTrigger?o.value:(C=a==null?void 0:a.stepConfig)==null?void 0:C.active}),u=(V,C)=>{o.value=C,l("clickStep",V,C)},c=V=>le.getComponent(V),f=()=>{var C;const V=(C=a==null?void 0:a.stepList)==null?void 0:C.find((I,b)=>b+1===r.value);return console.log("findStep",V),V?V==null?void 0:V.children:[]},g=V=>{l("clickTrigger",V)},y=V=>{l("changeTrigger",V)};return(V,C)=>{var S,m,v,x,t;const I=e.resolveComponent("el-step"),b=e.resolveComponent("el-steps");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(b,{direction:(S=n.stepConfig)==null?void 0:S.direction,active:r.value,"finish-status":"success",simple:(m=n.stepConfig)==null?void 0:m.simple,"align-center":(v=n.stepConfig)==null?void 0:v.alignCenter},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.stepList,(d,i)=>(e.openBlock(),e.createBlock(I,{key:i,class:"step-item",onClick:h=>u(d,i+1)},{title:e.withCtx(()=>[e.renderSlot(V.$slots,"title",{title:d==null?void 0:d.title},void 0,!0)]),description:e.withCtx(()=>[e.renderSlot(V.$slots,"description",{description:d==null?void 0:d.description},void 0,!0)]),_:2},1032,["onClick"]))),128))]),_:3},8,["direction","active","simple","align-center"]),(x=n.stepConfig)!=null&&x.allowTrigger&&((t=n.stepConfig)!=null&&t.active)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(f(),(d,i)=>(e.openBlock(),e.createElementBlock("div",{key:i,class:"step-cont-wrap"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c(d==null?void 0:d.type)),{modelValue:d.value,"onUpdate:modelValue":h=>d.value=h,onClickTrigger:g,onChangeTrigger:y,content:d==null?void 0:d.content},e.createSlots({_:2},[e.renderList(V.$slots,(h,L)=>({name:L,fn:e.withCtx(F=>[e.renderSlot(V.$slots,L,e.mergeProps({ref_for:!0},F||{}),void 0,!0)])}))]),1064,["modelValue","onUpdate:modelValue","content"]))]))),128)):e.createCommentVNode("",!0)],64)}}}),Jn=de._export_sfc(Un,[["__scopeId","data-v-85b1cc5d"]]),Pn=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]}},emits:["clickStep"],setup(n,{emit:s}){const a=n,l=s,o=e.ref({}),r=e.ref([]),u=(c,f)=>{l("clickStep",c,f)};return e.watch(()=>a==null?void 0:a.itemData,c=>{var f,g;r.value=(f=c==null?void 0:c.find(y=>(y==null?void 0:y.key)==="stepList"))==null?void 0:f.contents,o.value=(g=c==null?void 0:c.find(y=>(y==null?void 0:y.key)==="stepConfig"))==null?void 0:g.contents},{immediate:!0}),(c,f)=>{const g=e.resolveComponent("svg-icon");return e.openBlock(),e.createBlock(Jn,{stepConfig:o.value,stepList:r.value,onClickStep:u},{icon:e.withCtx(()=>[e.createVNode(g,{name:"import"})]),title:e.withCtx(({title:y})=>[e.createTextVNode(e.toDisplayString(y),1)]),description:e.withCtx(({description:y})=>[e.createTextVNode(e.toDisplayString(y),1)]),_:1},8,["stepConfig","stepList"])}}}),Rn=e.defineComponent({__name:"index",props:{activities:{type:Array,default:()=>[]},timeLineConfig:{type:Object,default:()=>{}}},setup(n){return(s,a)=>{const l=e.resolveComponent("el-timeline-item"),o=e.resolveComponent("el-timeline");return e.openBlock(),e.createBlock(o,null,{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.activities,(r,u)=>(e.openBlock(),e.createBlock(l,{key:u,timestamp:r.timestamp,placement:n.timeLineConfig.placement,center:n.timeLineConfig.isCenter,"hide-timestamp":!0,type:n.timeLineConfig.type,color:n.timeLineConfig.color,size:n.timeLineConfig.size,icon:n.timeLineConfig.icon,hollow:n.timeLineConfig.isHollow},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"content",{content:r==null?void 0:r.content,timestamp:r==null?void 0:r.timestamp},void 0,!0)]),_:2},1032,["timestamp","placement","center","type","color","size","icon","hollow"]))),128))]),_:3})}}}),Wn=de._export_sfc(Rn,[["__scopeId","data-v-4172a886"]]),zn={class:"line-content"},Mn={class:"line-time"},Gn=e.defineComponent({__name:"index",props:{itemData:{type:Array,default:()=>[]}},setup(n){const s=n,a=e.ref({}),l=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,o=>{var r,u;l.value=(r=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineList"))==null?void 0:r.contents,a.value=(u=o==null?void 0:o.find(c=>(c==null?void 0:c.key)==="timeLineConfig"))==null?void 0:u.contents},{immediate:!0}),(o,r)=>(e.openBlock(),e.createBlock(Wn,{activities:l.value,timeLineConfig:a.value},{content:e.withCtx(({content:u,timestamp:c})=>[e.createElementVNode("span",zn,e.toDisplayString(u),1),e.createElementVNode("span",Mn,e.toDisplayString(c),1)]),_:1},8,["activities","timeLineConfig"]))}}),qn=de._export_sfc(Gn,[["__scopeId","data-v-b4d9deed"]]),Kn={class:"tabs-content"},Hn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},setup(n){const s=n,a=e.ref([]);return e.watch(()=>s==null?void 0:s.itemData,l=>{const o=l.find(r=>(r==null?void 0:r.key)=="stepList");o&&(a.value=o.contents.map(r=>({value:r.value||r.title,label:r.label||r.title,children:r.children||[]})))},{immediate:!0,deep:!0}),(l,o)=>(e.openBlock(),e.createElementBlock("div",Kn,[e.createVNode(le.ssTab,{tabsContents:a.value},null,8,["tabsContents"])]))}},Zn=de._export_sfc(Hn,[["__scopeId","data-v-d3bb10b7"]]),Qn={class:"tabs-header"},Xn={class:"tabs-list"},Yn={class:"tab-name"},eo={class:"tab-actions"},lo={__name:"operate",props:{itemContents:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:s}){const a=n,l=s,o=e.ref([]),r=e.ref(!1),u=e.ref(""),c=e.ref({title:""}),f=e.ref(-1),g=()=>{u.value="新增标签页",c.value.title="",f.value=-1,r.value=!0},y=b=>{u.value="修改标签页",c.value.title=o.value[b].title,f.value=b,r.value=!0},V=b=>{o.value.splice(b,1),I()},C=()=>{c.value.title.trim()&&(f.value===-1?o.value.push({title:c.value.title,value:c.value.title,label:c.value.title,children:[]}):(o.value[f.value].title=c.value.title,o.value[f.value].value=c.value.title,o.value[f.value].label=c.value.title),r.value=!1,I())},I=()=>{const b=[{key:"stepList",contents:o.value}];l("change",b)};return e.watch(()=>a.itemContents,b=>{if(b&&b.length>0){const S=b.find(m=>m.key==="stepList");S&&S.contents&&(o.value=S.contents.map(m=>({title:m.title||"",value:m.value||m.title||"",label:m.label||m.title||"",children:m.children||[]})))}},{immediate:!0}),(b,S)=>{const m=e.resolveComponent("svg-icon"),v=e.resolveComponent("el-button"),x=e.resolveComponent("el-input"),t=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-form"),i=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Qn,[S[4]||(S[4]=e.createElementVNode("h4",null,"标签页管理",-1)),e.createVNode(v,{type:"primary",size:"small",onClick:g},{default:e.withCtx(()=>[e.createVNode(m,{name:"Plus",style:{width:"14px",height:"14px","margin-right":"4px"}}),S[3]||(S[3]=e.createTextVNode(" 新增标签页 "))]),_:1,__:[3]})]),e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(h,L)=>(e.openBlock(),e.createElementBlock("div",{class:"tab-item",key:L},[e.createElementVNode("span",Yn,e.toDisplayString(h.title),1),e.createElementVNode("div",eo,[e.createVNode(v,{type:"primary",size:"small",onClick:F=>y(L)},{default:e.withCtx(()=>S[5]||(S[5]=[e.createTextVNode("修改")])),_:2,__:[5]},1032,["onClick"]),e.createVNode(v,{type:"danger",size:"small",onClick:F=>V(L)},{default:e.withCtx(()=>S[6]||(S[6]=[e.createTextVNode("删除")])),_:2,__:[6]},1032,["onClick"])])]))),128))]),e.createVNode(i,{modelValue:r.value,"onUpdate:modelValue":S[2]||(S[2]=h=>r.value=h),title:u.value},{footer:e.withCtx(()=>[e.createVNode(v,{onClick:S[1]||(S[1]=h=>r.value=!1)},{default:e.withCtx(()=>S[7]||(S[7]=[e.createTextVNode("取消")])),_:1,__:[7]}),e.createVNode(v,{type:"primary",onClick:C},{default:e.withCtx(()=>S[8]||(S[8]=[e.createTextVNode("确定")])),_:1,__:[8]})]),default:e.withCtx(()=>[e.createVNode(d,{model:c.value,"label-width":"80px"},{default:e.withCtx(()=>[e.createVNode(t,{label:"标签名称",required:""},{default:e.withCtx(()=>[e.createVNode(x,{modelValue:c.value.title,"onUpdate:modelValue":S[0]||(S[0]=h=>c.value.title=h),placeholder:"请输入标签页名称"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","title"])])}}},ao=de._export_sfc(lo,[["__scopeId","data-v-a26b1c22"]]),no=e.ref([{name:"表格",type:"table",comp:"Table",icon:"Table"},{name:"表单",type:"form",comp:"Form",icon:"Form"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"AvatarUpload",icon:"Avatar"},{name:"签名",type:"signature",comp:"Signature",icon:"Signature"},{name:"步骤条",type:"step",comp:"Step",icon:"Step"},{name:"时间线",type:"timeLine",comp:"TimeLine",icon:"TimeLine"},{name:"标签页",type:"tabs",comp:"Tabs",icon:"Tabs"}]),oo={TABLE:me.ssTable,FORM:nl,TABLEOPERATE:za,FORMOPERATE:ol,FOLD:bn,CALCULATOR:_n,METHODBUTTON:Bn,AVATARUPLOAD:ll.ssAvatar,SIGNATURE:ll.ssSignature,FORMTOP:nl,STEP:Pn,STEPOPERATE:pn,TIMELINE:qn,TIMELINEOPERATE:vn,FORMTOPOPERATE:ol,SIGNATUREOPERATE:jn,AVATARUPLOADOPERATE:An,TABS:Zn,TABSOPERATE:ao};function bl(n){return oo[n==null?void 0:n.toUpperCase()]||null}const oe=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],ne=[{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"}],Te=e.ref(0),so=n=>{const[s,a]=n.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),o=a.replace(/^['"]|['"]$/g,"");return{key:l,value:o}},je=n=>{try{return JSON.parse(n),!0}catch{return!1}},ro=n=>n.includes("$")&&n.trim().endsWith("(")?n+")":n,to=n=>{let s=n;const a=[];let l="";for(const o of s)o.includes("{")||l.includes("{")||o.includes("[")||l.includes("[")||o.includes("【")||l.includes("【")||o.includes("(")||l.includes("(")||o.includes("(")||l.includes("(")||o.includes("/*")||l.includes("/*")?(l+=o.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(a.push(l),l="")):a.push(o.trim());return a==null?void 0:a.filter(o=>o.includes("{"))},co=n=>{var a;let s=[];return(a=to(n.slice(1,-1)))==null||a.forEach(l=>{var r,u,c,f;let o=((u=(r=l.slice(1,-1))==null?void 0:r.split(","))==null?void 0:u.length)??1;(f=(c=l.slice(1,-1))==null?void 0:c.split(","))==null||f.forEach(g=>{var I,b,S,m,v,x,t,d,i,h,L,F,P;let y=g==null?void 0:g.split(":"),V=y!=null&&y[0]?(y==null?void 0:y[1].split("$").length)-1===1?((I=y==null?void 0:y[0])==null?void 0:I.replace(/^"(.*)"$/,"$1"))+((b=y==null?void 0:y[1])==null?void 0:b.replace(/^"(.*)"$/,"$1")):Array.isArray((m=(S=y==null?void 0:y[1])==null?void 0:S.replace(/^"(.*)"$/,"$1"))==null?void 0:m.split("("))&&((t=(x=(v=y==null?void 0:y[1])==null?void 0:v.replace(/^"(.*)"$/,"$1"))==null?void 0:x.split("("))==null?void 0:t.length)>1?((d=y==null?void 0:y[0])==null?void 0:d.replace(/^"(.*)"$/,"$1"))+((L=(h=(i=y==null?void 0:y[1])==null?void 0:i.replace(/^"(.*)"$/,"$1"))==null?void 0:h.split("("))==null?void 0:L[0])+"()":(F=y==null?void 0:y[0])==null?void 0:F.replace(/^"(.*)"$/,"$1"):"",C=(y==null?void 0:y[1].split("$").length)-1===0?(P=y==null?void 0:y[1])==null?void 0:P.replace(/^"(.*)"$/,"$1"):"";Te.value++,s.push({id:Te.value,key:V,value:C,width:o,extraContent:y==null?void 0:y[1]})})}),s},Cl=n=>{var s,a;try{const l=n.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let o=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(je(o)&&!o.includes("$")||(o=o.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),je(o)){const r=JSON.parse(o);let u=[];return r==null||r.forEach(c=>{var f;(f=Object.entries(p.cloneDeep(c)))==null||f.forEach(g=>{Te.value++,u.push({id:Te.value,key:(g==null?void 0:g[0])??"",value:(g==null?void 0:g[1])===""?"":g==null?void 0:g[1],width:Object.keys(p.cloneDeep(c)).length})})}),u}else return l.trim().startsWith("{{")?co(l.trim()):ze(o)}else if(je(l)){const o=JSON.parse(l);return Object.entries(o).map(([r,u])=>(Te.value++,{id:Te.value,key:r,value:u===""?"":u,width:1}))}else return((s=ze(l))==null?void 0:s.length)===0?l:(a=ze(l))==null?void 0:a.map(o=>({label:o.label,method:ro(o.method)}))}catch(l){return console.error("转换失败:",l),[]}},ze=n=>{n=n.trim().replace(/^\{|\}$/g,"").trim();const s=[];let a=0;for(;a<n.length;){const l=n.slice(a).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const o=l[1];a+=l[0].length;let r="",u=0,c=!1,f="";for(let g=a;g<n.length;g++){const y=n[g];if((y==='"'||y==="'")&&!c?(c=!0,f=y):y===f&&c&&(c=!1,f=""),!c&&((y==="{"||y==="("||y==="[")&&u++,(y==="}"||y===")"||y==="]")&&u--,y===","&&u===0||g===n.length-1)){r=n.slice(a,g+1).trim(),a=g+1;break}}s.push({label:o,method:r})}return s},io=(n,s)=>{try{if(oe!=null&&oe.find(a=>(a==null?void 0:a.key)===s))return n.replace(/['"]/g,"").trim();if(p.cloneDeep(n).split("[").length-1>1){const a=p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(a)}else{const a=p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(je(a)){const l=JSON.parse(a);return Array.isArray(l)?l.map(o=>({label:o})):l}else return Cl(p.cloneDeep(n))}}catch(a){return console.error("解析失败:",a),n}},uo=n=>({[n==null?void 0:n.key]:io(n==null?void 0:n.value,n==null?void 0:n.key)}),po=n=>{try{if(p.cloneDeep(n).split("[").length-1>1){const s=p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(a=>({label:a}))}catch(s){return console.error("解析失败:",s),n}},fo=n=>{const s=n.match(/\(([^)]+)\)/);return s?s[1]:""},ho=n=>{const s=n.match(/^([^(]+)\s*\(/);return s?s[1].trim():n},sl=n=>n.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(s=>s.trim()).filter(s=>s).join("/"),mo=n=>{var u,c;let s=[],a=[];const l=(u=p.cloneDeep(n))==null?void 0:u.map(f=>f==null?void 0:f.key),o=[...new Set((c=p.cloneDeep(l))==null?void 0:c.map(f=>fo(f)))];o==null||o.forEach(f=>{let g=n==null?void 0:n.filter(C=>C.key.includes(f));g==null||g.forEach(C=>{C!=null&&C.key.includes("Menus")&&(s.push({key:"GroupName",value:sl(C==null?void 0:C.value)}),a.push(sl(C==null?void 0:C.value)))});let y=n==null?void 0:n.filter(C=>C.key.includes(f)&&!(C!=null&&C.key.includes("Menus")));y=y==null?void 0:y.map(C=>(C.key=ho(C.key),C));const V={key:"GroupContents",value:y};s.push(V)});const r={key:"Menus",value:a};return s.unshift(r),s},Dl=n=>{var s,a;if(Array.isArray(Object.keys(n))&&((s=Object.keys(n))==null?void 0:s.length)>0){let l=[];return(a=Object.entries(n))==null||a.forEach(([o,r])=>{var c,f;let u=[];if(u.push(o),((c=Object.keys(r))==null?void 0:c.length)>0){let g=[];(f=Dl(r))==null||f.forEach(y=>{g.push(y)}),g==null||g.forEach(y=>{u.push(y)})}l.push(u)}),l}},yo=(n,s)=>{var l;let a=s;return Array.isArray(Object.keys(n))&&((l=Object.entries(n))==null||l.forEach(([o,r])=>{let u=[o];if(typeof r=="object"&&r!==null){let c=Dl(r);c==null||c.forEach(f=>{u.push(f)})}a.push(u)})),a},vo=n=>{const s={};return n.forEach(l=>{const o=l.split("/");let r=s;o.forEach(u=>{r[u]||(r[u]={}),r=r[u]})}),yo(s,[])},Ke=n=>vo(n),ko=n=>{var s,a,l,o,r,u,c,f;try{const g=Re((a=(s=p.cloneDeep(n))==null?void 0:s.replace("(","("))==null?void 0:a.replace(")",")")),y=(o=(l=p.cloneDeep(g))==null?void 0:l.filter(b=>!b.includes("/*")))==null?void 0:o.map(b=>so(b)),V=mo(y),C=[];if(((r=V==null?void 0:V.find(b=>(b==null?void 0:b.key)==="Menus"))==null?void 0:r.value.length)===0)return!1;(u=p.cloneDeep(V))==null||u.forEach(b=>{var S,m,v,x,t;oe!=null&&oe.find(d=>{var i,h;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((h=b==null?void 0:b.key)==null?void 0:h.toUpperCase())})?C.push({comp:((S=oe==null?void 0:oe.find(d=>{var i,h;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((h=b==null?void 0:b.key)==null?void 0:h.toUpperCase())}))==null?void 0:S.value)??"",name:(m=b==null?void 0:b.value)==null?void 0:m.replace(/[’]|[‘]|[']/g,""),compData:[]}):ne!=null&&ne.find(d=>{var i,h;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((h=b==null?void 0:b.key)==null?void 0:h.toUpperCase())})&&((C==null?void 0:C.length)===0&&(v=b.key)!=null&&v.includes("Menus")&&C.push({comp:"Menu",name:"",compData:[]}),(x=C==null?void 0:C[(C==null?void 0:C.length)-1])!=null&&x.compData&&C[(C==null?void 0:C.length)-1].compData.push({key:(t=ne==null?void 0:ne.find(d=>{var i,h;return((i=d==null?void 0:d.key)==null?void 0:i.toUpperCase())===((h=b==null?void 0:b.key)==null?void 0:h.toUpperCase())}))==null?void 0:t.value,contents:b==null?void 0:b.value}))});let I=(c=p.cloneDeep(C))==null?void 0:c.map(b=>{var S;return b!=null&&b.compData&&(b.compData=(S=b==null?void 0:b.compData)==null?void 0:S.map(m=>{var v,x,t,d,i,h,L,F,P,K,D;if((m==null?void 0:m.key)==="formFlex")m.contents=((x=(v=m.contents)==null?void 0:v.replace(/[’]|[‘]|[']/g,""))==null?void 0:x.toUpperCase())!=="Vertical".toUpperCase();else if((m==null?void 0:m.key)==="groupContents")m.contents=(t=p.cloneDeep(m.contents))==null?void 0:t.map(T=>uo(p.cloneDeep(T)));else if(Array.isArray(m==null?void 0:m.contents))m.contents=Ke(m.contents);else if(((i=(d=m==null?void 0:m.contents)==null?void 0:d.trim())!=null&&i.startsWith("[")||(L=(h=m.contents)==null?void 0:h.trim())!=null&&L.startsWith("【"))&&((P=(F=m.contents)==null?void 0:F.trim())!=null&&P.endsWith("]")||(D=(K=m.contents)==null?void 0:K.trim())!=null&&D.endsWith("】")))m.contents=po(p.cloneDeep(m.contents));else{if(!m.contents)return;m.contents=Cl(p.cloneDeep(m.contents))}return m})),b});return I=(f=p.cloneDeep(I))==null?void 0:f.map(b=>{var S;return(b==null?void 0:b.comp)==="Group"&&(b.compData=(S=b.compData)==null?void 0:S.map(m=>{var x;let v=[];return(x=m.contents)==null||x.forEach(t=>{var d,i,h,L,F,P,K,D,T,_,B,$;if(oe!=null&&oe.find(U=>{var z,E,M;return((z=U==null?void 0:U.key)==null?void 0:z.toUpperCase())===((M=(E=Object.keys(t))==null?void 0:E[0])==null?void 0:M.toUpperCase())}))v.push({comp:(d=oe==null?void 0:oe.find(U=>{var z,E,M;return((z=U==null?void 0:U.key)==null?void 0:z.toUpperCase())===((M=(E=Object.keys(t))==null?void 0:E[0])==null?void 0:M.toUpperCase())}))==null?void 0:d.value,name:(h=(i=Object.values(t))==null?void 0:i[0])==null?void 0:h.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(ne!=null&&ne.find(U=>{var z,E,M;return((z=U==null?void 0:U.key)==null?void 0:z.toUpperCase())===((M=(E=Object.keys(t))==null?void 0:E[0])==null?void 0:M.toUpperCase())})){if((v==null?void 0:v.length)===0)return;(L=v==null?void 0:v[(v==null?void 0:v.length)-1])!=null&&L.compData&&v[(v==null?void 0:v.length)-1].compData.push({key:(F=ne==null?void 0:ne.find(U=>{var z,E,M;return((z=U==null?void 0:U.key)==null?void 0:z.toUpperCase())===((M=(E=Object.keys(t))==null?void 0:E[0])==null?void 0:M.toUpperCase())}))==null?void 0:F.value,contents:(P=Object.values(t))==null?void 0:P[0]})}else if((D=(K=Object.keys(t))==null?void 0:K[0])!=null&&D.includes("$")){const U=(_=(T=Object.keys(p.cloneDeep(t)))==null?void 0:T[0])==null?void 0:_.split("$");v[(v==null?void 0:v.length)-1].compData.push({key:(B=ne==null?void 0:ne.find(z=>{var E,M;return((E=z==null?void 0:z.key)==null?void 0:E.toUpperCase())===((M=U==null?void 0:U[0])==null?void 0:M.toUpperCase())}))==null?void 0:B.value,contents:($=Object.values(t))==null?void 0:$[0],selectLabel:U==null?void 0:U[1]})}return t}),m.contents=v,m})),b}),I}catch{return!1}},rl=e.ref(0),xl=n=>{const s=[];let a=null;for(let l=0;l<n.length;l++){const o=n[l];if(Array.isArray(o))a&&(a.children=xl(o));else{const r={label:o};s.push(r),a=r}}return s},El=n=>{let s=0;for(const a of n)s++,a.children&&(s+=El(a.children));return s},_l=(n,s,a=[])=>{let l=0;for(const o of s){if(l>=n.length)break;const r=[...n[l]];if(a.push(r),l++,o.children&&o.children.length>0){const u=[];_l(n.slice(l),o.children,u),u.length>0&&(r.push(u),l+=El(o.children))}}return a},go=(n,s)=>{let a=[];return n==null||n.forEach(o=>{o.some(r=>Array.isArray(r))?a.push(...o):a.push(o)}),_l(a,s)},qe=n=>{const s={label:n[0].trim()};if(n.length>1){const a=n.slice(1);a.length===1&&Array.isArray(a[0])?s.children=a[0].map(l=>Array.isArray(l)?qe(l):{label:l.trim()}):s.children=a.map(l=>Array.isArray(l)?qe(l):{label:l.trim()})}return s},tl=n=>{let s=n.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return s=s.replace(/:}(?=,|]|}|$)/g,':""}'),s=s.replace(/:,(?=\s*")/g,':"",'),s=s.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(a,l,o)=>`"${l}://${o}"`),s=s.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),s},bo=n=>{var a;return n.some(l=>!Array.isArray(l))?n:(a=p.cloneDeep(n))==null?void 0:a.map(l=>{let o=[];return l.some(r=>Array.isArray(r))?l==null||l.forEach(r=>{Array.isArray(r)&&o.push(qe(r))}):l.some(r=>r.includes("["))?o.push(l):o=l.map(r=>({label:r.trim()})),o})},Nl=(n,s,a)=>{let l=n,o=a,r=s;return r.children&&(Array.isArray(o[o.length-1])?o[o.length-1].push(l[0]):o.push(l[0]),l.shift(),r=r.children),Array.isArray(r)&&r.forEach(u=>{if(u.children){const c=Nl(l,u,o);o=c[0],l=c[1]}}),[o,l]},Co=(n,s)=>{let a=n,l=[];return s.length>0?s==null||s.forEach(o=>{let r=a==null?void 0:a[0];a.shift();const u=Nl(p.cloneDeep(a),o,r);r=u[0],a=u[1],l.push(r)}):l=a,l},He=(n,s)=>{const a=bo(p.cloneDeep(n));return Co(a,s)},Do=n=>{const s=[];let a=0;const l=n.length;for(;a<l;){const o=n[a];o.key==="tableColumns"&&a+1<l&&n[a+1].key==="tableContents"?(s.push({comp:"Table",compData:[o,n[a+1]],name:""}),a+=2):(s.push(o),a+=1)}return s},wl=n=>He([n],[]),Pe=n=>{const s=[];return n==null||n.forEach(a=>a==null?void 0:a.forEach(o=>{var r,u;rl.value++,s.push({id:rl.value,key:(r=Object.keys(o))==null?void 0:r[0],value:(u=Object.values(o))==null?void 0:u[0],width:a.length})})),s},cl=n=>{let s=Do(n);return s=s==null?void 0:s.map(a=>{var l,o,r,u;if(a.comp==="Table")(l=a.compData)!=null&&l.find(c=>(c==null?void 0:c.key)==="header")||(a.compData=(o=a.compData)==null?void 0:o.map(c=>(c.key==="tableColumns"?c={key:"header",contents:He(c.value,[])}:c={key:c.key,contents:c.value},c)),a.compData.push({key:"extraButton",contents:[{label:"新增"}]}),a.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(a.key==="form"){const c=(r=a==null?void 0:a.value)==null?void 0:r.map(f=>(Array.isArray(f)||(f=[f]),f));a={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Pe(c)}],name:""}}else if(a.key==="formTop"){const c=(u=a==null?void 0:a.value)==null?void 0:u.map(f=>(Array.isArray(f)||(f=[f]),f));a={comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Pe(c)},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""}}return a}),s},xo=(n,s)=>{var c,f,g,y,V,C;const a=[],l=xl((f=(c=n==null?void 0:n.find(I=>I.key==="tableIndex"))==null?void 0:c.value)==null?void 0:f[0]);a.push({key:"tableIndexColumn",contents:s}),a.push({key:"tableIndex",contents:l});let o=[];const r=(g=n==null?void 0:n.find(I=>I.key==="tableColumns"))==null?void 0:g.value;r.length===1&&!(r!=null&&r[0].some(I=>Array.isArray(I)))?o=(y=r==null?void 0:r[0])==null?void 0:y.map(I=>({label:I})):o=He((V=n==null?void 0:n.find(I=>I.key==="tableColumns"))==null?void 0:V.value,l),a.push({key:"header",contents:o});const u=go((C=n==null?void 0:n.find(I=>I.key==="tableContents"))==null?void 0:C.value,l);return a.push({key:"tableContents",contents:u}),a.push({key:"extraButton",contents:[{label:"新增"}]}),a.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),a},$l=n=>n.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(s,a,l)=>{const o=$l(l);return`"${a}",${o}`}),Fe=n=>{const s=n.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return $l(s).replace(/^"(.*)"$/,"$1")},Eo=n=>{const s=new Set;return n.filter(a=>{const l=JSON.stringify(a);return s.has(l)?!1:s.add(l)})},il=n=>{var a;let s=[];return(a=p.cloneDeep(n))==null||a.forEach(l=>{var o;(o=l.contents)==null||o.forEach(r=>{s.push(r)})}),s=Eo(s),s.push({label:"操作"}),[s]},_o=(n,s)=>n.reduce((a,l,o)=>{const r=Math.floor(o/s);return a[r]||(a[r]=[]),a[r].push(l),a},[]),Bl=n=>n.reduce((s,a)=>a.children&&a.children.length>0?s+Bl(a.children):s+1,0),No=(n,s)=>{var l;let a=[];return(l=_o(n,Bl(s==null?void 0:s[0])-1))==null||l.forEach(o=>{let r=[];o.forEach(u=>{var c;Array.isArray(u.contents)?(c=u.contents)==null||c.forEach(f=>{r.push(f)}):r.push(u.contents)}),a.push(r)}),[a]},wo=["方法体","输入","输出"],ul=e.ref(1),Re=n=>{let s;n.replaceAll(" ",`\r
|
|
2
|
+
`).includes(`\r
|
|
3
|
+
`)?s=n.replaceAll(" ",`\r
|
|
4
|
+
`).split(`\r
|
|
5
|
+
`).filter(o=>o.trim()!==""):s=n.replaceAll(" ",`\r
|
|
6
|
+
`).split(`
|
|
7
|
+
`).filter(o=>o.trim()!=="");const a=[];let l="";for(const o of s)o.includes("{")||l.includes("{")||o.includes("[")||l.includes("[")||o.includes("【")||l.includes("【")||o.includes("(")||l.includes("(")||o.includes("(")||l.includes("(")||o.includes("/*")||l.includes("/*")?(l+=o.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&l[l.length-1]!==","&&(a.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):a.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return a},Vl=n=>{const[s,a]=n.split(/=(.+)/),l=s.replace(/['"]/g,"").trim(),o=a.replace(/^['"]|['"]$/g,"");return{key:l,value:o}},We=n=>{let s;n!=null&&n.includes(":")?s=n.split(":").filter(o=>o.trim()!==""):s=n==null?void 0:n.split(":").filter(o=>o.trim()!=="");const a=[];let l="";for(const o of s)o.includes("{")||l.includes("{")||o.includes("[")||l.includes("[")||o.includes("【")||l.includes("【")||o.includes("(")||l.includes("(")||o.includes("(")||l.includes("(")||o.includes("/*")||l.includes("/*")?(l=l!==""?l+":"+o.trim():o.trim(),p.cloneDeep(l).split("{").length-1===p.cloneDeep(l).split("}").length-1&&p.cloneDeep(l).split("【").length-1===p.cloneDeep(l).split("】").length-1&&p.cloneDeep(l).split("[").length-1===p.cloneDeep(l).split("]").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("(").length-1===p.cloneDeep(l).split(")").length-1&&p.cloneDeep(l).split("/*").length-1===p.cloneDeep(l).split("*/").length-1&&(a.push(l.replace(/\/\*[\s\S]*?\*\//g,"")),l="")):a.push(o.trim().replace(/\/\*[\s\S]*?\*\//g,""));return a},$o=n=>/^[\x00-\x7F]*$/.test(n),Bo=n=>{var o,r;const s=(o=n.map(u=>{var f,g;let c=(g=(f=u.key.split("("))==null?void 0:f[1])==null?void 0:g.trim();return c==null?void 0:c.slice(0,c.length-1)}))==null?void 0:o.filter(u=>u),a=s==null?void 0:s.map(u=>{var f;return(f=We(u))==null?void 0:f.map(g=>{var y;if(g.includes("{")){let V=(y=g.split(":"))==null?void 0:y[0];g=V.slice(1,V.length)}return g})}).filter(u=>u.length!==0),l=(r=a==null?void 0:a.filter(u=>u.length!==0))==null?void 0:r.map(u=>{let c="";return u.forEach(f=>{f.includes("{")||(c=c===""?c+p.cloneDeep(f):c+"/"+p.cloneDeep(f))}),c});return Ke([...new Set(l)])},Ze=n=>{var a,l,o,r,u,c,f,g;const s=(l=(a=n.split("("))==null?void 0:a[1])==null?void 0:l.trim();return((o=We(s.slice(0,s.length-1)))==null?void 0:o.length)>0?s.slice(0,s.length-1):(g=(f=(c=(u=(r=n.split("("))==null?void 0:r[1])==null?void 0:u.trim())==null?void 0:c.split(")"))==null?void 0:f[0])==null?void 0:g.trim()},Vo=n=>{var o;if(!n)return;const s=Ze(n),a=(o=We(s))==null?void 0:o.map(r=>{var u;if(r.includes("{")){let c=(u=r.split(":"))==null?void 0:u[0];r=c.slice(1,c.length)}return r});let l="";return a.forEach(r=>{r.includes("{")||(l=l===""?l+p.cloneDeep(r):l+"/"+p.cloneDeep(r))}),l},To=n=>{const s=n.match(/\[(.*)\]/s);if(s){const a=`[${s[1]}]`;try{const l=a.replace(/([^\[\],\s]+)/g,'"$1"');return JSON.parse(l)}catch{return JSON.parse(a.replace(/\[(\s*)(,|])/g,'[""$2').replace(/([^\[\],\s]+)/g,'"$1"').replace(/""/g,'"'))}}},Ao=n=>{var r;if(!n)return;const s=Ze(n);let a=[],l=[],o=[];return(r=We(s))==null||r.forEach(u=>{var c;u.includes("[")?a.push(To(u)):u.includes("{")&&($o((c=u.slice(1,u.length-1).split(":"))==null?void 0:c[0])?o.push(JSON.parse(u.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):me.IsJson(u.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))?l.push(JSON.parse(u.replace(/([{,]\s*)([^:{\[\],\s]+)(\s*:\s*)/g,'$1"$2"$3').replace(/(:\s*)([^{}\[\]",\s]+)(\s*[,}])/g,'$1"$2"$3'))):u.includes("$"))}),[a,l,o]},Io=n=>{const s=[];let a="";for(const l of n)l.includes("[")||a.includes("[")||l.includes("/*")||a.includes("/*")?(a+=l.trim(),p.cloneDeep(a).split("{").length-1===p.cloneDeep(a).split("}").length-1&&p.cloneDeep(a).split("【").length-1===p.cloneDeep(a).split("】").length-1&&p.cloneDeep(a).split("[").length-1===p.cloneDeep(a).split("]").length-1&&p.cloneDeep(a).split("(").length-1===p.cloneDeep(a).split(")").length-1&&p.cloneDeep(a).split("(").length-1===p.cloneDeep(a).split(")").length-1&&p.cloneDeep(a).split("/*").length-1===p.cloneDeep(a).split("*/").length-1&&(s.push(a.replace(/\/\*[\s\S]*?\*\//g,"")),a="")):s.push(l.trim().replace(/\/\*[\s\S]*?\*\//g,""));return s},pl=n=>{var u,c;const s=[],a=/(?:{'([^']+)'[^}]+}: {'([^']+)'[^}]+}|'([^']+)': {'([^']+)'[^}]+})/,l=n.match(a);if(l){const f=l[1]||l[3],g=l[2]||l[4];if(f&&g){const y=`${f}/${g}`;s.push(y)}}const o=/(https?:\/\/[^\s)]+|Http:\/\/[^\s)]+|\/[^\s)]+)/i,r=n.match(o);return r?s.push(r[0].replace(/\)+$/,"")):(n==null?void 0:n.split(",").length)===2&&s.push((c=(u=n==null?void 0:n.split(","))==null?void 0:u[1])==null?void 0:c.trim()),s},Me=n=>{let s=n.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,(a,l,o,r,u)=>o.includes("'")?`:${l}${o}${r}${u}`:`:${l}"${o}"${r}${u}`),s=s.replace(/:\s*([,\]}])/g,': ""$1'),s},So=n=>!/\[[^\]]*\{[^\]]*\]/.test(n),Oo=n=>{const s=p.cloneDeep(n).match(/(\w+)\(['"]([^'"]+)['"]:\s*\{['"]([^'"]+)['"]\}\)/),a=s?`${s[2]}/${s[3]}`:null,l=n.match(/\[\{([^}]+)\}\]/),o=l==null?void 0:l[1].replaceAll(":","").replaceAll("'",'"').trim();let r=null;if(o)try{r=JSON.parse(o)}catch(u){console.error("解析数组失败:",u)}return[a,r]},Fo=n=>{var c,f,g,y,V,C,I,b,S,m,v;let s=[],a=[],l={},o=[],r=n.trim(),u=[];if(r.trim().includes("输入")&&r.trim().includes("输出")){let x=[],t=n.trim();t=p.cloneDeep(t).slice(1,p.cloneDeep(t).length-1);const d=/(\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})/g;(b=t.match(d))==null||b.forEach((i,h)=>{var P;const L=i;let F=[];(P=L.slice(1,L.length-1).replace(":","$:").split("$:"))==null||P.forEach(K=>{var D,T,_;if(wo.find(B=>K.includes(B)))if(!K.includes("=="))F.push({key:"tableIndexColumn",contents:K.replaceAll("'","")});else{let B=[];const $=K.replaceAll("'","").split("==");B.push($==null?void 0:$[0]),$!=null&&$[1].includes("[")?B.push($==null?void 0:$[1].trim().slice(1,($==null?void 0:$[1].length)-1).split(",")):B.push([$==null?void 0:$[1]]),F.push({key:"header",contents:[(T=(D=wl([B]))==null?void 0:D[0])==null?void 0:T[0]]})}else{let B=K.trim().replaceAll(",",",").replaceAll("'",'"');if(h%3===0)B.slice(1,B.length-1).includes("[")?x.push({key:"tableIndex",contents:[{label:B}]}):x.push({key:"tableIndex",contents:[{label:B.slice(1,B.length-1)}]});else if((B==null?void 0:B[0])==="{"){let $=[];const U=B.slice(1,B.length-1).split(":");if(U.every(z=>me.IsJson(z.trim()))){$.push({key:"tableContentName",contents:"详情"});let z=[];U.forEach((E,M)=>{if(M===0){const W=JSON.parse(E).map(Z=>({label:Z}));W.push({label:"操作"}),z.push({key:"header",contents:W})}else z.push({key:"tableContents",contents:JSON.parse(E)})}),z.push({key:"extraButton",contents:[{label:"新增"}]}),z.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),$.push({comp:"Table",compData:z,name:""}),x.push({key:"tableContents",contents:[$]})}}else{let $=B;$.slice(1,$.length-1).includes("[")||$.slice(1,$.length-1).includes("{")?me.IsJson(tl($.replace(/\s+/g,"")))&&((_=JSON.parse(tl($.replace(/\s+/g,""))))==null||_.map(U=>{if(Array.isArray(U==null?void 0:U[0])){const z=[];z.push({key:"tableContentName",contents:"详情"});let E=[];U.forEach(M=>{M.forEach(W=>{var Z,J;ul.value++,E.push({id:ul.value,key:(Z=Object.keys(W))==null?void 0:Z[0],value:(J=Object.values(W))==null?void 0:J[0],width:M.length})})}),z.push({comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:E}],name:""}),x.push({key:"tableContents",contents:[z]})}else x.push({key:"tableContents",contents:U==null?void 0:U[0]})})):x.push({key:"tableContents",contents:$.trim().slice(1,$.length-1)})}}}),x.push(F==null?void 0:F[0])}),u.push({key:"tableIndex",contents:(S=x==null?void 0:x.filter(i=>(i==null?void 0:i.key)==="tableIndex"))==null?void 0:S.map(i=>{var h;return(h=i.contents)==null?void 0:h[0]})}),u.push({key:"extraButton",contents:[{label:"新增"}]}),u.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),u.push({key:"tableIndexColumn",contents:(v=(m=x==null?void 0:x.filter(i=>(i==null?void 0:i.key)==="tableIndexColumn"))==null?void 0:m[0])==null?void 0:v.contents}),u.push({key:"header",contents:il(x==null?void 0:x.filter(i=>(i==null?void 0:i.key)==="header"))}),u.push({key:"tableContents",contents:No(x==null?void 0:x.filter(i=>(i==null?void 0:i.key)==="tableContents"),il(x==null?void 0:x.filter(i=>(i==null?void 0:i.key)==="header")))})}else{const x=(c=r.trim().split(",$"))==null?void 0:c[0];x[0]==="["?r=x.slice(1,x.length-1):r.includes(",$")&&(r=(f=r.trim().split(",$"))==null?void 0:f[0]);let t;if(r.includes("$")){r=p.cloneDeep(r),l.method=(y=(g=p.cloneDeep(r).trim())==null?void 0:g.slice(1,r.length).split("("))==null?void 0:y[0];let d;pl(r.slice(1,r.length-2)).length>1?d=pl(r.slice(1,r.length-2)):d=Oo(r),l.value=d}else me.IsJson("["+Me(r).replaceAll("'",'"')+"]")&&!So(Me(r).replaceAll("'",'"'))?(r=JSON.parse("["+Me(r).replaceAll("'",'"')+"]"),o=r):t=(C=(V=p.cloneDeep(r).split("}"))==null?void 0:V.filter(d=>d!==""))==null?void 0:C.map(d=>{let i=d;return i[0]===","?i=i.slice(2,i.length):i=i.slice(1,i.length),i});(I=p.cloneDeep(t))==null||I.forEach(d=>{var i,h,L,F,P,K,D,T,_,B,$,U,z,E,M;if(d.includes("==")){const W=(U=d==null?void 0:d.split(":"))==null?void 0:U[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'),Z=(z=d==null?void 0:d.split(":"))==null?void 0:z[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"');if(me.IsJson(Z.trim())?a.push(JSON.parse(Z.trim())):a.push(JSON.parse(Z.replaceAll("'",'"').trim())),W[0]!=="["){let J=[];me.IsJson("["+Fe(W)+"]")?J.push(JSON.parse("["+Fe(W)+"]")):me.IsJson("["+Fe(W).replaceAll("==",",")+"]")&&J.push(JSON.parse("["+Fe(W).replaceAll("==",",")+"]"));const se=p.cloneDeep(J);se.push(["操作"]),s.push(se)}else{const J=(E=W.slice(1,W.length-1).replaceAll(",",",|"))==null?void 0:E.split("|"),se=(M=Io(J))==null?void 0:M.map(ce=>((ce==null?void 0:ce[ce.length-1])===","&&(ce=ce.slice(0,ce.length-1)),ce));let re=[];se==null||se.forEach(ce=>{var he,ye,te,ue;let fe=[];fe.push((he=ce.split("=="))==null?void 0:he[0].trim().replace(/^"|"$/g,"")),((ye=ce.split("=="))==null?void 0:ye[1].trim()[0])==="["?fe.push(JSON.parse((te=ce.split("=="))==null?void 0:te[1].trim())):fe.push([JSON.parse((ue=ce.split("=="))==null?void 0:ue[1].trim())]),re.push(fe)});const ie=p.cloneDeep(re);ie.push(["操作"]),s.push(ie)}}else{if(me.IsJson((i=d==null?void 0:d.split(":"))==null?void 0:i[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'))){let W=JSON.parse((h=d==null?void 0:d.split(":"))==null?void 0:h[0].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"').replaceAll("'",'"'));Array.isArray(W)||(W=[W]),W.push("操作"),s.push(W)}me.IsJson((P=(F=(L=d==null?void 0:d.split(":"))==null?void 0:L[1])==null?void 0:F.replace(/^"|"$/g,"'"))==null?void 0:P.replace(/'([^']+)'/g,'"$1"'))?a.push(JSON.parse((K=d==null?void 0:d.split(":"))==null?void 0:K[1].replace(/^"|"$/g,"'").replace(/'([^']+)'/g,'"$1"'))):me.IsJson((B=(_=(T=(D=d==null?void 0:d.split(":"))==null?void 0:D[1])==null?void 0:T.replace(/^"|"$/g,"'"))==null?void 0:_.replaceAll("'",'"'))==null?void 0:B.replace(/'([^']+)'/g,'"$1"'))&&a.push(JSON.parse(($=d==null?void 0:d.split(":"))==null?void 0:$[1].replace(/^"|"$/g,"'").replaceAll("'",'"').replace(/'([^']+)'/g,'"$1"')))}})}return[s,a,u,l,o]},Lo=n=>{const s=[],a=Vo(n==null?void 0:n.key),l=Ao(n==null?void 0:n.key),o=Fo(n==null?void 0:n.value),r=l==null?void 0:l[0],u=o==null?void 0:o[4],c=l==null?void 0:l[1],f=l==null?void 0:l[2],g=o==null?void 0:o[0],y=o==null?void 0:o[1],V=o==null?void 0:o[2],C=o==null?void 0:o[3];return a&&s.push({key:"contentPath",value:a}),(r==null?void 0:r.length)>0&&s.push({key:"tableIndex",value:r}),C&&s.push({key:"extraButton",value:C}),(u==null?void 0:u.length)>0&&s.push({key:"form",value:u}),(c==null?void 0:c.length)>0&&s.push({key:"formTop",value:c}),(f==null?void 0:f.length)>0&&s.push({key:"extra",value:f}),(V==null?void 0:V.length)>0&&s.push({comp:"Table",compData:V,name:""}),(g==null?void 0:g.length)>0&&s.push({key:"tableColumns",value:g}),(y==null?void 0:y.length)>0&&s.push({key:"tableContents",value:y}),s},jo=n=>{let s=[],a=[];n==null||n.forEach(o=>{Array.isArray(o)&&(o==null||o.forEach(r=>{var u;r.comp==="FormTop"&&((u=r.compData)==null||u.forEach(c=>{(c==null?void 0:c.key)==="formContent"&&(a=[...a,...c.contents])}))}))});const l=a.reduce((o,r)=>o.find(c=>(c==null?void 0:c.key)===(r==null?void 0:r.key))?o:o.concat([r]),[]);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:"重置"}]}]}]),n==null||n.forEach(o=>{if(Array.isArray(o)){const r=o.filter(u=>u.comp!=="FormTop");s.push(r)}else o.comp!=="FormTop"&&s.push(o)}),s},Uo=(n,s)=>{const a=s.split("/");let l=[];return n==null||n.forEach(o=>{var c,f,g,y,V,C,I,b,S,m,v;const r=[],u=(f=(c=o.find(x=>x.key==="tableIndex"))==null?void 0:c.value)==null?void 0:f[0];if(u&&!u.some(x=>Array.isArray(x))){const x=(y=(g=o.find(t=>t.key==="tableColumns"))==null?void 0:g.value)==null?void 0:y[0];r.push({key:"tableIndexColumn",contents:a[a.length-1]}),r.push({key:"tableIndex",contents:u==null?void 0:u.map(t=>({label:t}))}),r.push({key:"extraButton",contents:[{label:"新增"}]}),r.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),Array.isArray(x)&&x.some(t=>Array.isArray(t))?r.push({key:"header",contents:wl(x)}):r.push({key:"header",contents:Array.isArray(x)?x==null?void 0:x.map(t=>({label:t})):[x].map(t=>({label:t}))}),r.push({key:"tableContents",contents:Array.isArray(x)?(C=(V=o.find(t=>t.key==="tableContents"))==null?void 0:V.value)==null?void 0:C[0]:(S=(b=(I=o.find(t=>t.key==="tableContents"))==null?void 0:I.value)==null?void 0:b[0])==null?void 0:S.map(t=>[t])}),l.push({comp:"Table",name:"",compData:r}),o!=null&&o.find(t=>(t==null?void 0:t.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Pe([(m=o==null?void 0:o.find(t=>(t==null?void 0:t.key)==="formTop"))==null?void 0:m.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})}else u?(l.push({comp:"Table",name:"",compData:xo(o,a[a.length-1])}),o!=null&&o.find(x=>(x==null?void 0:x.key)==="formTop")&&l.push({comp:"FormTop",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Pe([(v=o==null?void 0:o.find(x=>(x==null?void 0:x.key)==="formTop"))==null?void 0:v.value])},{key:"enableWrap",contents:!0},{key:"formButton",contents:[{label:"查询"},{label:"重置"}]}],name:""})):o.some(x=>x.key==="extra")?l.push({comp:"calculator",name:"",compData:cl(o)}):l.push(cl(o))}),jo(l)},Jo=(n,s)=>{var o,r;const a=n.map(u=>u.filter(c=>c.key!=="contentPath"));return{comp:"Group",compData:[{contents:Uo(a,s),key:"groupContents"}],name:(r=(o=n[0])==null?void 0:o.find(u=>u.key==="contentPath"))==null?void 0:r.value}},Po=n=>{var o;const s=[],a=p.cloneDeep(n).map(r=>{var u;if(r!=null&&r.find(c=>(c==null?void 0:c.key)==="contentPath"))return(u=r==null?void 0:r.find(c=>(c==null?void 0:c.key)==="contentPath"))==null?void 0:u.value}).filter(r=>r!==""),l=[...new Set(a)];return(o=l==null?void 0:l.filter(r=>r))==null||o.forEach(r=>{var u;s.push(Jo((u=p.cloneDeep(n))==null?void 0:u.filter(c=>c.find(f=>f.key==="contentPath"&&f.value===r)),r))}),s},Ro=n=>{let s=[];s.push({comp:"Menu",compData:[{contents:Bo(p.cloneDeep(n)),key:"menuContents"}],name:""});const a=n.map(l=>Lo(l)).filter(l=>l.length!==0);return s=[...s,...Po(a)],s},Wo=n=>{var s,a,l,o,r;try{const u=(l=Re((a=(s=p.cloneDeep(n))==null?void 0:s.replace("(","("))==null?void 0:a.replace(")",")")))==null?void 0:l.filter(g=>g!==""),c=(r=(o=p.cloneDeep(u))==null?void 0:o.filter(g=>!g.includes("/*")))==null?void 0:r.map(g=>Vl(g));return Ro(c)}catch{return!1}},Le=e.ref(0),Ge=e.ref(0),zo=n=>{const s=n.trim().replace(/^'|'$/g,""),a=/((?:\$?[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 o;for(;(o=a.exec(s))!==null;){const r=o[1];let u=o[2].trim();(u.match(/\[/g)||[]).length!==(u.match(/\]/g)||[]).length&&(u=u==null?void 0:u.replace(/]$/,"")),l[r]?(l[r+Ge.value]&&Ge.value++,l[r+Ge.value]=r+"="+u):l[r]=r+"="+u}return l},Tl=n=>{const[s,a]=n.split("=").map(r=>r.trim()),l=s.replace(/['"]/g,""),o=a.replace(/^['"]|['"]$/g,"");return{key:l,value:o}},Mo=n=>{var u;let s=[];const[a,l]=n.split(/=(.+)/),o=a.replace(/['"]/g,"").trim(),r=l.replace(/^['"]|['"]$/g,"");return(u=Object.values(zo(r)))==null||u.forEach(c=>{s.push(Tl(c))}),{key:o,value:s}},Ue=n=>{try{return JSON.parse(n),!0}catch{return!1}},Al=n=>{try{const s=n.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(s).split("{").length-1>1){let a=p.cloneDeep(s).replace(/^\{(.*)\}$/,"[$1]");if(Ue(a)&&!a.includes("$")||(a=a.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),Ue(a)){const l=JSON.parse(a);let o=[];return l==null||l.forEach(r=>{var u;(u=Object.entries(p.cloneDeep(r)))==null||u.forEach(c=>{Le.value++,o.push({id:Le.value,key:(c==null?void 0:c[0])??"",value:(c==null?void 0:c[1])===""?"":c==null?void 0:c[1],width:Object.keys(p.cloneDeep(r)).length})})}),o}else return console.error("转换类型不正确:"),[]}else if(Ue(s)){const a=JSON.parse(s);return Object.entries(a).map(([l,o])=>(Le.value++,{id:Le.value,key:l,value:o===""?"":o,width:1}))}else return s}catch(s){return console.error("转换失败:",s),[]}},Go=(n,s)=>{try{if(oe!=null&&oe.find(a=>(a==null?void 0:a.key)===s))return JSON.parse(n.replace(/[’]|[‘]|[']/g,'"'));if(p.cloneDeep(n).split("[").length-1>1){const a=p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(a)}else{const a=p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(Ue(a)){const l=JSON.parse(a);return Array.isArray(l)?l.map(o=>({label:o})):l}else return Al(p.cloneDeep(n))}}catch(a){return console.error("解析失败:",a),n}},qo=n=>({[n==null?void 0:n.key]:Go(n==null?void 0:n.value,n==null?void 0:n.key)}),Ko=n=>{try{if(p.cloneDeep(n).split("[").length-1>1){const s=p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(s)}else return JSON.parse(p.cloneDeep(n).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(a=>({label:a}))}catch(s){return console.error("解析失败:",s),n}},Il=n=>{var s,a,l,o,r,u;try{const c=Re((a=(s=p.cloneDeep(n))==null?void 0:s.replace("(","("))==null?void 0:a.replace(")",")")),f=(l=p.cloneDeep(c))==null?void 0:l.map(V=>{var I,b;let C=(b=(I=p.cloneDeep(V))==null?void 0:I.split("="))==null?void 0:b[0];return C!=null&&C.includes("GroupContents")?Mo(V):Tl(V)}),g=[];(o=p.cloneDeep(f))==null||o.forEach(V=>{var C,I,b,S,m;oe!=null&&oe.find(v=>{var x,t;return((x=v==null?void 0:v.key)==null?void 0:x.toUpperCase())===((t=V==null?void 0:V.key)==null?void 0:t.toUpperCase())})?g.push({comp:((C=oe==null?void 0:oe.find(v=>{var x,t;return((x=v==null?void 0:v.key)==null?void 0:x.toUpperCase())===((t=V==null?void 0:V.key)==null?void 0:t.toUpperCase())}))==null?void 0:C.value)??"",name:(I=V==null?void 0:V.value)==null?void 0:I.replace(/[’]|[‘]|[']/g,""),compData:[]}):ne!=null&&ne.find(v=>{var x,t;return((x=v==null?void 0:v.key)==null?void 0:x.toUpperCase())===((t=V==null?void 0:V.key)==null?void 0:t.toUpperCase())})&&((g==null?void 0:g.length)===0&&(b=V.key)!=null&&b.includes("Menus")&&g.push({comp:"Menu",name:"",compData:[]}),(S=g==null?void 0:g[(g==null?void 0:g.length)-1])!=null&&S.compData&&g[(g==null?void 0:g.length)-1].compData.push({key:(m=ne==null?void 0:ne.find(v=>{var x,t;return((x=v==null?void 0:v.key)==null?void 0:x.toUpperCase())===((t=V==null?void 0:V.key)==null?void 0:t.toUpperCase())}))==null?void 0:m.value,contents:V==null?void 0:V.value}))}),console.log("newContents",g);let y=(r=p.cloneDeep(g))==null?void 0:r.map(V=>{var C;return V!=null&&V.compData&&(V.compData=(C=V==null?void 0:V.compData)==null?void 0:C.map(I=>{var b,S,m,v,x,t,d,i,h,L,F;if((I==null?void 0:I.key)==="formFlex")I.contents=((S=(b=I.contents)==null?void 0:b.replace(/[’]|[‘]|[']/g,""))==null?void 0:S.toUpperCase())!=="Vertical".toUpperCase();else if((I==null?void 0:I.key)==="groupContents")I.contents=(m=p.cloneDeep(I.contents))==null?void 0:m.map(P=>qo(p.cloneDeep(P)));else if(((x=(v=I.contents)==null?void 0:v.trim())!=null&&x.startsWith("[")||(d=(t=I.contents)==null?void 0:t.trim())!=null&&d.startsWith("【"))&&((h=(i=I.contents)==null?void 0:i.trim())!=null&&h.endsWith("]")||(F=(L=I.contents)==null?void 0:L.trim())!=null&&F.endsWith("】")))I.contents=Ko(p.cloneDeep(I.contents));else{if(!I.contents)return;I.contents=Al(p.cloneDeep(I.contents))}return I})),V});return y=(u=p.cloneDeep(y))==null?void 0:u.map(V=>{var C;return(V==null?void 0:V.comp)==="Group"&&(V.compData=(C=V.compData)==null?void 0:C.map(I=>{var S;let b=[];return(S=I.contents)==null||S.forEach(m=>{var v,x,t,d,i,h,L,F,P,K,D,T;if(oe!=null&&oe.find(_=>{var B,$,U;return((B=_==null?void 0:_.key)==null?void 0:B.toUpperCase())===((U=($=Object.keys(m))==null?void 0:$[0])==null?void 0:U.toUpperCase())}))b.push({comp:(v=oe==null?void 0:oe.find(_=>{var B,$,U;return((B=_==null?void 0:_.key)==null?void 0:B.toUpperCase())===((U=($=Object.keys(m))==null?void 0:$[0])==null?void 0:U.toUpperCase())}))==null?void 0:v.value,name:(t=(x=Object.values(m))==null?void 0:x[0])==null?void 0:t.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(ne!=null&&ne.find(_=>{var B,$,U;return((B=_==null?void 0:_.key)==null?void 0:B.toUpperCase())===((U=($=Object.keys(m))==null?void 0:$[0])==null?void 0:U.toUpperCase())})){if((b==null?void 0:b.length)===0)return;(d=b==null?void 0:b[(b==null?void 0:b.length)-1])!=null&&d.compData&&b[(b==null?void 0:b.length)-1].compData.push({key:(i=ne==null?void 0:ne.find(_=>{var B,$,U;return((B=_==null?void 0:_.key)==null?void 0:B.toUpperCase())===((U=($=Object.keys(m))==null?void 0:$[0])==null?void 0:U.toUpperCase())}))==null?void 0:i.value,contents:(h=Object.values(m))==null?void 0:h[0]})}else if((F=(L=Object.keys(m))==null?void 0:L[0])!=null&&F.includes("$")){const _=(K=(P=Object.keys(p.cloneDeep(m)))==null?void 0:P[0])==null?void 0:K.split("$");b[(b==null?void 0:b.length)-1].compData.push({key:(D=ne==null?void 0:ne.find(B=>{var $,U;return(($=B==null?void 0:B.key)==null?void 0:$.toUpperCase())===((U=_==null?void 0:_[0])==null?void 0:U.toUpperCase())}))==null?void 0:D.value,contents:(T=Object.values(m))==null?void 0:T[0],selectLabel:_==null?void 0:_[1]})}return m}),I.contents=b,I})),V}),y}catch{return!1}},Ho=n=>Il(n),Zo=n=>!!Il(n),Ae=e.ref(0),Qo=n=>n.reduce((a,l)=>{var r,u;const o=Object.values(a);return(((r=Object.keys(a))==null?void 0:r.length)===0||o[o.length-1].length>=(l==null?void 0:l.width))&&(a[Ae.value]=[],Ae.value++),a[Ae.value-1].push(l),((u=Object.keys(a))==null?void 0:u.length)===(l==null?void 0:l.width)&&(a[Ae.value]=[],Ae.value++),a},{});exports.arrayToNumberArray=Qo;exports.contentTransArray=Re;exports.expandContentStringToJson=Wo;exports.expandNewStringToJson=ko;exports.expandStringToJson=Ho;exports.getComponent=bl;exports.getContentValue=Ze;exports.isExpandStringToJson=Zo;exports.menuArray=Ke;exports.parseGroupValue=Vl;exports.slotContent=no;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./index-
|
|
1
|
+
"use strict";const n=require("./index-BtHcbXIL.cjs");var A=n.getNative(n.root,"WeakMap"),x=Object.create,ge=function(){function e(){}return function(t){if(!n.isObject(t))return{};if(x)return x(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),h=function(){try{var e=n.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}}();function be(e,t){for(var r=-1,a=e==null?0:e.length;++r<a&&t(e[r],r,e)!==!1;);return e}var pe=9007199254740991,ye=/^(?:0|[1-9]\d*)$/;function Y(e,t){var r=typeof e;return t=t??pe,!!t&&(r=="number"||r!="symbol"&&ye.test(e))&&e>-1&&e%1==0&&e<t}function Te(e,t,r){t=="__proto__"&&h?h(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var le=Object.prototype,je=le.hasOwnProperty;function H(e,t,r){var a=e[t];(!(je.call(e,t)&&n.eq(a,r))||r===void 0&&!(t in e))&&Te(e,t,r)}var de=9007199254740991;function _(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=de}function $e(e){return e!=null&&_(e.length)&&!n.isFunction$1(e)}var Ae=Object.prototype;function Z(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ae;return e===r}function he(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}var ve="[object Arguments]";function C(e){return n.isObjectLike(e)&&n.baseGetTag(e)==ve}var J=Object.prototype,we=J.hasOwnProperty,me=J.propertyIsEnumerable,Q=C(function(){return arguments}())?C:function(e){return n.isObjectLike(e)&&we.call(e,"callee")&&!me.call(e,"callee")};function Oe(){return!1}var ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,B=ee&&typeof module=="object"&&module&&!module.nodeType&&module,_e=B&&B.exports===ee,L=_e?n.root.Buffer:void 0,Se=L?L.isBuffer:void 0,S=Se||Oe,Pe="[object Arguments]",Ee="[object Array]",Ie="[object Boolean]",Me="[object Date]",xe="[object Error]",Ce="[object Function]",Be="[object Map]",Le="[object Number]",Ue="[object Object]",De="[object RegExp]",Fe="[object Set]",Ge="[object String]",Ne="[object WeakMap]",Ve="[object ArrayBuffer]",Re="[object DataView]",ze="[object Float32Array]",Ke="[object Float64Array]",We="[object Int8Array]",qe="[object Int16Array]",ke="[object Int32Array]",Xe="[object Uint8Array]",Ye="[object Uint8ClampedArray]",He="[object Uint16Array]",Ze="[object Uint32Array]",i={};i[ze]=i[Ke]=i[We]=i[qe]=i[ke]=i[Xe]=i[Ye]=i[He]=i[Ze]=!0;i[Pe]=i[Ee]=i[Ve]=i[Ie]=i[Re]=i[Me]=i[xe]=i[Ce]=i[Be]=i[Le]=i[Ue]=i[De]=i[Fe]=i[Ge]=i[Ne]=!1;function Je(e){return n.isObjectLike(e)&&_(e.length)&&!!i[n.baseGetTag(e)]}function P(e){return function(t){return e(t)}}var te=typeof exports=="object"&&exports&&!exports.nodeType&&exports,j=te&&typeof module=="object"&&module&&!module.nodeType&&module,Qe=j&&j.exports===te,$=Qe&&n.freeGlobal.process,l=function(){try{var e=j&&j.require&&j.require("util").types;return e||$&&$.binding&&$.binding("util")}catch{}}(),U=l&&l.isTypedArray,re=U?P(U):Je,et=Object.prototype,tt=et.hasOwnProperty;function rt(e,t){var r=n.isArray(e),a=!r&&Q(e),f=!r&&!a&&S(e),s=!r&&!a&&!f&&re(e),c=r||a||f||s,T=c?he(e.length,String):[],g=T.length;for(var u in e)tt.call(e,u)&&!(c&&(u=="length"||f&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||Y(u,g)))&&T.push(u);return T}function ne(e,t){return function(r){return e(t(r))}}var nt=ne(Object.keys,Object),at=Object.prototype,ot=at.hasOwnProperty;function it(e){if(!Z(e))return nt(e);var t=[];for(var r in Object(e))ot.call(e,r)&&r!="constructor"&&t.push(r);return t}function ct(e){return $e(e)?rt(e):it(e)}function ae(e,t){for(var r=-1,a=t.length,f=e.length;++r<a;)e[f+r]=t[r];return e}var st=ne(Object.getPrototypeOf,Object);function ut(){this.__data__=new n.ListCache,this.size=0}function ft(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function gt(e){return this.__data__.get(e)}function bt(e){return this.__data__.has(e)}var pt=200;function yt(e,t){var r=this.__data__;if(r instanceof n.ListCache){var a=r.__data__;if(!n.Map||a.length<pt-1)return a.push([e,t]),this.size=++r.size,this;r=this.__data__=new n.MapCache(a)}return r.set(e,t),this.size=r.size,this}function y(e){var t=this.__data__=new n.ListCache(e);this.size=t.size}y.prototype.clear=ut;y.prototype.delete=ft;y.prototype.get=gt;y.prototype.has=bt;y.prototype.set=yt;var oe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D=oe&&typeof module=="object"&&module&&!module.nodeType&&module,Tt=D&&D.exports===oe,F=Tt?n.root.Buffer:void 0;F&&F.allocUnsafe;function lt(e,t){return e.slice()}function jt(e,t){for(var r=-1,a=e==null?0:e.length,f=0,s=[];++r<a;){var c=e[r];t(c,r,e)&&(s[f++]=c)}return s}function dt(){return[]}var $t=Object.prototype,At=$t.propertyIsEnumerable,G=Object.getOwnPropertySymbols,ht=G?function(e){return e==null?[]:(e=Object(e),jt(G(e),function(t){return At.call(e,t)}))}:dt;function vt(e,t,r){var a=t(e);return n.isArray(e)?a:ae(a,r(e))}function ie(e){return vt(e,ct,ht)}var v=n.getNative(n.root,"DataView"),w=n.getNative(n.root,"Promise"),m=n.getNative(n.root,"Set"),N="[object Map]",wt="[object Object]",V="[object Promise]",R="[object Set]",z="[object WeakMap]",K="[object DataView]",mt=n.toSource(v),Ot=n.toSource(n.Map),_t=n.toSource(w),St=n.toSource(m),Pt=n.toSource(A);exports.getTag=n.baseGetTag;(v&&exports.getTag(new v(new ArrayBuffer(1)))!=K||n.Map&&exports.getTag(new n.Map)!=N||w&&exports.getTag(w.resolve())!=V||m&&exports.getTag(new m)!=R||A&&exports.getTag(new A)!=z)&&(exports.getTag=function(e){var t=n.baseGetTag(e),r=t==wt?e.constructor:void 0,a=r?n.toSource(r):"";if(a)switch(a){case mt:return K;case Ot:return N;case _t:return V;case St:return R;case Pt:return z}return t});var Et=Object.prototype,It=Et.hasOwnProperty;function Mt(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&It.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var O=n.root.Uint8Array;function E(e){var t=new e.constructor(e.byteLength);return new O(t).set(new O(e)),t}function xt(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.byteLength)}var Ct=/\w*$/;function Bt(e){var t=new e.constructor(e.source,Ct.exec(e));return t.lastIndex=e.lastIndex,t}var W=n.Symbol?n.Symbol.prototype:void 0,q=W?W.valueOf:void 0;function Lt(e){return q?Object(q.call(e)):{}}function Ut(e,t){var r=E(e.buffer);return new e.constructor(r,e.byteOffset,e.length)}var Dt="[object Boolean]",Ft="[object Date]",Gt="[object Map]",Nt="[object Number]",Vt="[object RegExp]",Rt="[object Set]",zt="[object String]",Kt="[object Symbol]",Wt="[object ArrayBuffer]",qt="[object DataView]",kt="[object Float32Array]",Xt="[object Float64Array]",Yt="[object Int8Array]",Ht="[object Int16Array]",Zt="[object Int32Array]",Jt="[object Uint8Array]",Qt="[object Uint8ClampedArray]",er="[object Uint16Array]",tr="[object Uint32Array]";function rr(e,t,r){var a=e.constructor;switch(t){case Wt:return E(e);case Dt:case Ft:return new a(+e);case qt:return xt(e);case kt:case Xt:case Yt:case Ht:case Zt:case Jt:case Qt:case er:case tr:return Ut(e);case Gt:return new a;case Nt:case zt:return new a(e);case Vt:return Bt(e);case Rt:return new a;case Kt:return Lt(e)}}function nr(e){return typeof e.constructor=="function"&&!Z(e)?ge(st(e)):{}}var ar="[object Map]";function or(e){return n.isObjectLike(e)&&exports.getTag(e)==ar}var k=l&&l.isMap,ir=k?P(k):or,cr="[object Set]";function sr(e){return n.isObjectLike(e)&&exports.getTag(e)==cr}var X=l&&l.isSet,ur=X?P(X):sr,ce="[object Arguments]",fr="[object Array]",gr="[object Boolean]",br="[object Date]",pr="[object Error]",se="[object Function]",yr="[object GeneratorFunction]",Tr="[object Map]",lr="[object Number]",ue="[object Object]",jr="[object RegExp]",dr="[object Set]",$r="[object String]",Ar="[object Symbol]",hr="[object WeakMap]",vr="[object ArrayBuffer]",wr="[object DataView]",mr="[object Float32Array]",Or="[object Float64Array]",_r="[object Int8Array]",Sr="[object Int16Array]",Pr="[object Int32Array]",Er="[object Uint8Array]",Ir="[object Uint8ClampedArray]",Mr="[object Uint16Array]",xr="[object Uint32Array]",o={};o[ce]=o[fr]=o[vr]=o[wr]=o[gr]=o[br]=o[mr]=o[Or]=o[_r]=o[Sr]=o[Pr]=o[Tr]=o[lr]=o[ue]=o[jr]=o[dr]=o[$r]=o[Ar]=o[Er]=o[Ir]=o[Mr]=o[xr]=!0;o[pr]=o[se]=o[hr]=!1;function d(e,t,r,a,f,s){var c;if(c!==void 0)return c;if(!n.isObject(e))return e;var T=n.isArray(e);if(T)c=Mt(e);else{var g=exports.getTag(e),u=g==se||g==yr;if(S(e))return lt(e);if(g==ue||g==ce||u&&!f)c=u?{}:nr(e);else{if(!o[g])return f?e:{};c=rr(e,g)}}s||(s=new y);var I=s.get(e);if(I)return I;s.set(e,c),ur(e)?e.forEach(function(b){c.add(d(b,t,r,b,e,s))}):ir(e)&&e.forEach(function(b,p){c.set(p,d(b,t,r,p,e,s))});var fe=ie,M=T?void 0:fe(e);return be(M||e,function(b,p){M&&(p=b,b=e[p]),H(c,p,d(b,t,r,p,e,s))}),c}var Cr=1,Br=4;function Lr(e){return d(e,Cr|Br)}exports.Stack=y;exports.Uint8Array=O;exports.arrayPush=ae;exports.assignValue=H;exports.cloneDeep=Lr;exports.defineProperty=h;exports.getAllKeys=ie;exports.isArguments=Q;exports.isBuffer=S;exports.isIndex=Y;exports.isLength=_;exports.isTypedArray=re;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a6 as A, a7 as l, f as re, a3 as ye, a8 as de, a4 as h, a9 as w, aa as Te, i as I, ab as P, ac as v, a2 as je, ad as T, S as D } from "./index-
|
|
1
|
+
import { a6 as A, a7 as l, f as re, a3 as ye, a8 as de, a4 as h, a9 as w, aa as Te, i as I, ab as P, ac as v, a2 as je, ad as T, S as D } from "./index-BM97Nh7v.js";
|
|
2
2
|
var O = A(l, "WeakMap"), F = Object.create, $e = /* @__PURE__ */ function() {
|
|
3
3
|
function e() {
|
|
4
4
|
}
|
|
Binary file
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { resolveComponent as n, createElementBlock as r, openBlock as m, createVNode as i } from "vue";
|
|
2
|
-
import "./array-
|
|
3
|
-
import "./index-
|
|
2
|
+
import "./array-BhjrAPhE.js";
|
|
3
|
+
import "./index-CKdmCGWv.js";
|
|
4
4
|
import { _ as c } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
import "./index.vue_vue_type_style_index_0_scoped_11a5120d_lang-
|
|
6
|
-
import "./menu-
|
|
7
|
-
import "./index.
|
|
8
|
-
import "./index-
|
|
9
|
-
import "./index-
|
|
10
|
-
import "./login-
|
|
11
|
-
import "./index-
|
|
5
|
+
import "./index.vue_vue_type_style_index_0_scoped_11a5120d_lang-Bz3v6Nn0.js";
|
|
6
|
+
import "./menu-BsDSnWTk.js";
|
|
7
|
+
import "./index.vue_vue_type_style_index_0_scoped_0cbc0899_lang-BrZ1zhys.js";
|
|
8
|
+
import "./index-Cm5IxLo3.js";
|
|
9
|
+
import "./index-CM3SjbuE.js";
|
|
10
|
+
import "./login-BSiDyISU.js";
|
|
11
|
+
import "./index-BOXue8CC.js";
|
|
12
12
|
import "./crypto-BRyGpjGR.js";
|
|
13
13
|
import "./index-BHtNKL1L.js";
|
|
14
14
|
const d = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("vue"),d=require("./index-
|
|
1
|
+
"use strict";const l=require("vue"),d=require("./index-COjok9zl.cjs"),c=require("./index-CmW94cTp.cjs"),D=require("./modelComp-BE3B5jke.cjs"),g=require("./menu-CVJXAhG-.cjs"),i=D.useModelComp(),{itemData:f}=g.storeToRefs(i),u=l.ref(0),m=l.ref([{label:"机构名称",value:"",name:"deptName"}]),C=e=>{console.log("handleQueryChange",e)},s=l.ref([{key:"extraButton",contents:[{label:"新增"}]},{key:"rowButton",contents:[{label:"编辑"},{label:"删除"}]},{key:"header",contents:[{label:"机构名称",prop:"deptName"},{label:"机构类型",prop:"deptType",formType:"Select",options:[{label:"集团",value:"集团"},{label:"公司",value:"公司"},{label:"部门",value:"部门"},{label:"区域",value:"区域"},{label:"组",value:"组"}]},{label:"机构状态",formType:"Radio",prop:"deptStatus",options:[{label:"启用",value:"启用"},{label:"禁用",value:"禁用"}]},{label:"操作"}]},{key:"tableContents",contents:[]}]),h=e=>{c.submitTableAsyncByVerify(e.singleContent,e.buttonName,u.value)},k=e=>{console.log("onDoubleClick",e)},S=(e,t)=>{console.log("onButtonClick",e,t)},T=async e=>{const t=await c.handleSubmitAsync(d.getInsofDataApi,{key:{systemKey:sessionStorage.getItem("systemKey"),type:"data",pageKey:e}},"查询"),n=t==null?void 0:t.map(a=>{var o;return{id:a.id,tableData:(o=a==null?void 0:a.value)==null?void 0:o.tableData}});return n==null?void 0:n.map(a=>{var o;if(Array.isArray(a==null?void 0:a.tableData)){let r={id:a.id};return(o=a==null?void 0:a.tableData)==null||o.forEach((b,y)=>{r[`a${y}`]=b}),r}else return{...a.tableData,id:a.id}})},p={comp:"Group",name:"/系统管理/部门管理",compData:[{key:"groupContents",contents:[{comp:"Table",compData:s.value,name:""}]}]};l.watch(()=>f.value,e=>{var t;e&&(e==null?void 0:e.length)>0&&(s.value=(t=e==null?void 0:e[0])==null?void 0:t.compData)});const q=Object.freeze(Object.defineProperty({__proto__:null,getPageDataAsync:T,handleItemDataChange:h,handleQueryChange:C,onButtonClick:S,onDoubleClick:k,pageData:s,queryFormData:m,structureId:u,tempDeptPageData:p},Symbol.toStringTag,{value:"Module"}));exports.State=q;exports.tempDeptPageData=p;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as l, watch as b } from "vue";
|
|
2
|
-
import { g as y } from "./index-
|
|
3
|
-
import { s as m, h as d } from "./index-
|
|
4
|
-
import { u as g } from "./modelComp-
|
|
5
|
-
import { s as f } from "./menu-
|
|
2
|
+
import { g as y } from "./index-CKdmCGWv.js";
|
|
3
|
+
import { s as m, h as d } from "./index-BOXue8CC.js";
|
|
4
|
+
import { u as g } from "./modelComp-O0eO-YTR.js";
|
|
5
|
+
import { s as f } from "./menu-BsDSnWTk.js";
|
|
6
6
|
const D = g(), { itemData: h } = f(D), c = l(0), i = l([
|
|
7
7
|
{
|
|
8
8
|
label: "机构名称",
|