ss-component-new 1.1.150 → 1.1.151
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-CbhGfVxI.cjs → array-C09NLiVl.cjs} +1 -1
- package/dist/{array-BAYzUFnt.js → array-CqhTXR28.js} +7 -7
- package/dist/{cloneDeep-MnyT2_Nu.cjs → cloneDeep-B6Av9vYT.cjs} +1 -1
- package/dist/{cloneDeep-fkblO81M.js → cloneDeep-Cm2ut66T.js} +1 -1
- package/dist/{index-bLJ2Ndcm.cjs → index-1TcDjOsz.cjs} +1 -1
- package/dist/{index-BsqT_zoA.js → index-BH36LQch.js} +1 -1
- package/dist/{index-DMbEpGWW.js → index-BHjs6gMr.js} +2 -2
- package/dist/{index-nNZP7IB7.js → index-BQK2DuaH.js} +9 -9
- package/dist/{index-CeSRiTQw.cjs → index-BUkyNn3m.cjs} +1 -1
- package/dist/{index-rqjMCgx4.cjs → index-BZaGIyxe.cjs} +1 -1
- package/dist/{index-40cGB4ZU.cjs → index-BaSc02sA.cjs} +2 -2
- package/dist/{index-DJAReCcZ.js → index-Bel0p329.js} +63 -63
- package/dist/{index-CZGl4a5K.cjs → index-BgY5srT7.cjs} +1 -1
- package/dist/{index-CgSPgLET.js → index-BlNU-ya_.js} +5 -5
- package/dist/{index-CcMw1E6Z.cjs → index-C1sMNKRi.cjs} +1 -1
- package/dist/{index-DWJgcuCp.js → index-C8mv9PET.js} +6 -6
- package/dist/{index-CBml9Qri.cjs → index-CMue5Zek.cjs} +1 -1
- package/dist/{index-ujiozCmT.js → index-C_Ek6N_z.js} +4 -4
- package/dist/{index-DKy-U0Ae.cjs → index-CcxZZo6K.cjs} +1 -1
- package/dist/{index-B794iH2o.cjs → index-Ch7zPabE.cjs} +1 -1
- package/dist/{index-CqkslShI.js → index-Ckrm7F4u.js} +1 -1
- package/dist/{index-BB36Ovkv.cjs → index-CsK9LWak.cjs} +1 -1
- package/dist/{index-B0nZerbM.js → index-CtTbyHOu.js} +6 -6
- package/dist/{index-4knkqMwj.cjs → index-Cxz9ADeg.cjs} +1 -1
- package/dist/{index-BIBJrHIk.cjs → index-Cy23PxmQ.cjs} +1 -1
- package/dist/{index-Fq5eplQK.js → index-D-6CVrZh.js} +1 -1
- package/dist/{index-Cj1L4TRX.cjs → index-D9hjyDNL.cjs} +1 -1
- package/dist/{index-5GrZXVu3.js → index-DORM2j0-.js} +6 -6
- package/dist/{index-D1LGiton.cjs → index-DXQEaxeL.cjs} +1 -1
- package/dist/{index-UQ2X6aTt.js → index-D_JFO4Ed.js} +7 -7
- package/dist/{index-CqKT4RHj.js → index-DcuEMWMM.js} +5 -5
- package/dist/{index-Bu51Zajm.cjs → index-DjlDuRvf.cjs} +1 -1
- package/dist/{index-BCSmZRZ4.js → index-DoHr_nug.js} +563 -556
- package/dist/{index-B0OEJNhv.js → index-DqOy9nnX.js} +4 -4
- package/dist/{index-x8702P9U.js → index-DyhHmlGD.js} +1 -1
- package/dist/{index-CuHZUdg2.js → index-GvkFEReE.js} +4 -4
- package/dist/{index-BF9syrYM.cjs → index-LX4uBOi3.cjs} +1 -1
- package/dist/{index-D8YuwybG.js → index-Nb7mXZOf.js} +3 -3
- package/dist/{index-CydE52Wf.js → index-ODNyDte9.js} +5 -5
- package/dist/{index-CmDKKyE8.cjs → index-YajCTD4A.cjs} +1 -1
- package/dist/index-dm-zOhNm.cjs +1 -0
- package/dist/{index-BvHXosaE.cjs → index-wsyih2HQ.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-CPu5xlj0.cjs → index.vue_vue_type_script_setup_true_lang-ClNwGHXE.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BYJZNiyC.js → index.vue_vue_type_script_setup_true_lang-CuQ3xcyC.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_baf99455_lang-CcFtQ2jZ.js → index.vue_vue_type_style_index_0_scoped_baf99455_lang-FY_pjpOg.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_baf99455_lang-DDykhm8K.cjs → index.vue_vue_type_style_index_0_scoped_baf99455_lang-W4auoQ9V.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Ck79OK6N.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-BAlbShP-.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CkcA1kQ3.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-ClRL5aRq.cjs} +1 -1
- package/dist/{login-CpNPGXDJ.js → login-DnBDEGHt.js} +2 -2
- package/dist/{login-Cp0dfDHm.cjs → login-aDjal4KC.cjs} +1 -1
- package/dist/{main-CoJhQFHN.cjs → main-ChEDt98s.cjs} +1 -1
- package/dist/{main-DM5wZc2k.js → main-Do8E5J_V.js} +4 -4
- package/dist/{request-ChDD8cqD.cjs → request-BId7xEpo.cjs} +1 -1
- package/dist/{request-BNCQ__H9.js → request-RC5ET7Nr.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/index-DmDNy4oq.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const he=require("./index-DmDNy4oq.cjs"),f=require("vue"),le=require("./index-Bu51Zajm.cjs"),H=require("./index-40cGB4ZU.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p=require("./cloneDeep-MnyT2_Nu.cjs"),Ze=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),ze=require("./request-ChDD8cqD.cjs"),Qe=require("./index.vue_vue_type_script_setup_true_lang-CPu5xlj0.cjs"),X=require("./index-CeSRiTQw.cjs"),me=require("./menu-CxtX8L48.cjs"),Xe=require("./modelComp-BQutSX47.cjs");var Ye="__lodash_hash_undefined__";function el(e){return this.__data__.set(e,Ye),this}function ll(e){return this.__data__.has(e)}function pe(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new X.MapCache;++n<t;)this.add(e[n])}pe.prototype.add=pe.prototype.push=el;pe.prototype.has=ll;function nl(e,n){for(var t=-1,l=e==null?0:e.length;++t<l;)if(n(e[t],t,e))return!0;return!1}function tl(e,n){return e.has(n)}var al=1,rl=2;function Be(e,n,t,l,r,a){var s=t&al,d=e.length,k=n.length;if(d!=k&&!(s&&k>d))return!1;var h=a.get(e),D=a.get(n);if(h&&D)return h==n&&D==e;var C=-1,$=!0,x=t&rl?new pe:void 0;for(a.set(e,n),a.set(n,e);++C<d;){var A=e[C],j=n[C];if(l)var y=s?l(j,A,C,n,e,a):l(A,j,C,e,n,a);if(y!==void 0){if(y)continue;$=!1;break}if(x){if(!nl(n,function(i,u){if(!tl(x,u)&&(A===i||r(A,i,t,l,a)))return x.push(u)})){$=!1;break}}else if(!(A===j||r(A,j,t,l,a))){$=!1;break}}return a.delete(e),a.delete(n),$}function ol(e){var n=-1,t=Array(e.size);return e.forEach(function(l,r){t[++n]=[r,l]}),t}function sl(e){var n=-1,t=Array(e.size);return e.forEach(function(l){t[++n]=l}),t}var cl=1,pl=2,ul="[object Boolean]",il="[object Date]",fl="[object Error]",dl="[object Map]",yl="[object Number]",hl="[object RegExp]",ml="[object Set]",gl="[object String]",bl="[object Symbol]",kl="[object ArrayBuffer]",Dl="[object DataView]",Ae=X.Symbol?X.Symbol.prototype:void 0,ue=Ae?Ae.valueOf:void 0;function Cl(e,n,t,l,r,a,s){switch(t){case Dl:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case kl:return!(e.byteLength!=n.byteLength||!a(new p.Uint8Array(e),new p.Uint8Array(n)));case ul:case il:case yl:return X.eq(+e,+n);case fl:return e.name==n.name&&e.message==n.message;case hl:case gl:return e==n+"";case dl:var d=ol;case ml:var k=l&cl;if(d||(d=sl),e.size!=n.size&&!k)return!1;var h=s.get(e);if(h)return h==n;l|=pl,s.set(e,n);var D=Be(d(e),d(n),l,r,a,s);return s.delete(e),D;case bl:if(ue)return ue.call(e)==ue.call(n)}return!1}var Al=1,$l=Object.prototype,_l=$l.hasOwnProperty;function xl(e,n,t,l,r,a){var s=t&Al,d=p.getAllKeys(e),k=d.length,h=p.getAllKeys(n),D=h.length;if(k!=D&&!s)return!1;for(var C=k;C--;){var $=d[C];if(!(s?$ in n:_l.call(n,$)))return!1}var x=a.get(e),A=a.get(n);if(x&&A)return x==n&&A==e;var j=!0;a.set(e,n),a.set(n,e);for(var y=s;++C<k;){$=d[C];var i=e[$],u=n[$];if(l)var g=s?l(u,i,$,n,e,a):l(i,u,$,e,n,a);if(!(g===void 0?i===u||r(i,u,t,l,a):g)){j=!1;break}y||(y=$=="constructor")}if(j&&!y){var c=e.constructor,o=n.constructor;c!=o&&"constructor"in e&&"constructor"in n&&!(typeof c=="function"&&c instanceof c&&typeof o=="function"&&o instanceof o)&&(j=!1)}return a.delete(e),a.delete(n),j}var Ol=1,$e="[object Arguments]",_e="[object Array]",te="[object Object]",El=Object.prototype,xe=El.hasOwnProperty;function Tl(e,n,t,l,r,a){var s=X.isArray(e),d=X.isArray(n),k=s?_e:p.getTag(e),h=d?_e:p.getTag(n);k=k==$e?te:k,h=h==$e?te:h;var D=k==te,C=h==te,$=k==h;if($&&p.isBuffer(e)){if(!p.isBuffer(n))return!1;s=!0,D=!1}if($&&!D)return a||(a=new p.Stack),s||p.isTypedArray(e)?Be(e,n,t,l,r,a):Cl(e,n,k,t,l,r,a);if(!(t&Ol)){var x=D&&xe.call(e,"__wrapped__"),A=C&&xe.call(n,"__wrapped__");if(x||A){var j=x?e.value():e,y=A?n.value():n;return a||(a=new p.Stack),r(j,y,t,l,a)}}return $?(a||(a=new p.Stack),xl(e,n,t,l,r,a)):!1}function Pe(e,n,t,l,r){return e===n?!0:e==null||n==null||!X.isObjectLike(e)&&!X.isObjectLike(n)?e!==e&&n!==n:Tl(e,n,t,l,Pe,r)}function Nl(e,n){return Pe(e,n)}const ae=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],vl={class:"form-content"},Sl={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(e,{emit:n}){const t=e,l=n,r=f.ref([]),a=f.ref(!1),s=f.ref([]),d=he.useFormToTableComp(le.pinia),k=f.ref(),h=C=>{var y,i,u,g;const $=(i=(y=p.cloneDeep(t.itemData))==null?void 0:y.find(c=>(c==null?void 0:c.key)==="formContent"))==null?void 0:i.contents,x=p.cloneDeep(C.content);let A={};x&&((u=Object.values(x))==null?void 0:u.length)>0&&((g=Object.values(x))==null||g.forEach((c,o)=>{A[$[o].key]=c}));const j={content:A,index:t==null?void 0:t.index,buttonName:C==null?void 0:C.buttonName};l("change",j)},D=C=>{var A,j;if(!C)return;if(((A=Object.values(p.cloneDeep(C)))==null?void 0:A.length)>0){const y=(j=Object.values(p.cloneDeep(C)))==null?void 0:j.map(u=>u);let i="";y==null||y.forEach(u=>{u!==""&&u!==void 0&&(i=i===""?u:i+"/"+u)}),d.setSelectArray(y),d.setSelectString(i)}const $=p.cloneDeep(t.itemData),x=$==null?void 0:$.map(y=>{var i;return(y==null?void 0:y.key)==="formContent"&&((i=y.contents)==null||i.map((u,g)=>{var c,o,m,_,T,S,O,F,v,N,B,P,E,b,w,U,R,G,q;return u.type=u!=null&&u.type?u.type:(_=(m=(o=(c=u==null?void 0:u.key)==null?void 0:c.split("$"))==null?void 0:o[1])==null?void 0:m.split("("))!=null&&_[0]?(T=ae==null?void 0:ae.find(M=>{var Q,W,V,K;return(M==null?void 0:M.key)===((K=(V=(W=(Q=u==null?void 0:u.key)==null?void 0:Q.split("$"))==null?void 0:W[1])==null?void 0:V.split("("))==null?void 0:K[0])}))==null?void 0:T.value:"Input",u.options=u!=null&&u.options?u.options:((F=(O=(S=u==null?void 0:u.key)==null?void 0:S.split("$"))==null?void 0:O[1])==null?void 0:F.length)>0?(P=(B=H.formGetOptions((N=(v=u==null?void 0:u.key)==null?void 0:v.split("$"))==null?void 0:N[1]))==null?void 0:B.split(","))==null?void 0:P.map(M=>({label:M,value:M})):[],(E=u==null?void 0:u.key)!=null&&E.includes("$")&&(u.key=(w=(b=u==null?void 0:u.key)==null?void 0:b.split("$"))==null?void 0:w[0]),u.value=u!=null&&u.value?u.value:Array.isArray((U=Object.values(C))==null?void 0:U[g])?(G=(R=Object.values(C))==null?void 0:R[g])==null?void 0:G[0]:(q=Object.values(C))==null?void 0:q[g],u})),y});l("contentChange",{contents:x,index:t.index})};return f.watch(()=>t.itemData,()=>{var j,y,i,u,g,c,o,m,_,T;const C=(j=p.cloneDeep(t.itemData))==null?void 0:j.find(S=>(S==null?void 0:S.key)==="formContent"),$=(y=p.cloneDeep(t.itemData))==null?void 0:y.find(S=>(S==null?void 0:S.key)==="formButton"),x=(i=p.cloneDeep(t.itemData))==null?void 0:i.find(S=>(S==null?void 0:S.key)==="formFlex"),A=(u=p.cloneDeep(t.itemData))==null?void 0:u.find(S=>(S==null?void 0:S.key)==="formWrap");if((A==null?void 0:A.contents)==="纵向"?a.value=!1:a.value=!0,k.value=typeof(x==null?void 0:x.contents)!="boolean"?!(!(x!=null&&x.contents)===""||((g=x==null?void 0:x.contents)==null?void 0:g.toUpperCase())==="VERTICAL"):x==null?void 0:x.contents,((c=C==null?void 0:C.contents)==null?void 0:c.length)>0&&Array.isArray(C==null?void 0:C.contents)){const S=[];(o=C==null?void 0:C.contents)==null||o.forEach((v,N)=>{var B,P,E,b,w,U,R,G,q,M;if((v==null?void 0:v.label)!==""){let Q=(v==null?void 0:v.key)??"",W=(v==null?void 0:v.type)??"",V=(v==null?void 0:v.options)??[];if((B=v==null?void 0:v.key)!=null&&B.includes("$")&&(Q=(P=p.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:P[0],((b=(E=p.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:E[1])==null?void 0:b.length)>0)){const[K,Z]=(U=(w=p.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:w[1])==null?void 0:U.split(/[()]/);W=((R=ae.find(z=>(z==null?void 0:z.key)===K))==null?void 0:R.value)??"",((G=Z==null?void 0:Z.split(","))==null?void 0:G.length)>0&&(V=(q=Z==null?void 0:Z.split(","))==null?void 0:q.map(z=>({label:z,value:z})))}S.push({label:Q??"",name:"t"+N,type:W===""?"Input":W,value:v!=null&&v.value?v.value:(V==null?void 0:V.length)>0?(M=V==null?void 0:V[0])==null?void 0:M.value:(v==null?void 0:v.value)??"",id:(v==null?void 0:v.id)??N,contents:V??[],width:(v==null?void 0:v.width)??1})}});const O=(m=p.cloneDeep(S))==null?void 0:m.map(v=>v.value);let F="";O==null||O.forEach(v=>{v!==""&&v!==void 0&&(F=F===""?v:F+"/"+v)}),d.setSelectArray(O),d.setSelectString(F),r.value=S}else r.value=[];if(((_=$==null?void 0:$.contents)==null?void 0:_.length)>0){const S=[];(T=$==null?void 0:$.contents)==null||T.forEach((O,F)=>{(O==null?void 0:O.label)!==""&&S.push({label:(O==null?void 0:O.label)??"",id:(O==null?void 0:O.id)??F,type:(O==null?void 0:O.type)??"",background:O==null?void 0:O.background})}),s.value=S}else s.value=[]},{deep:!0,immediate:!0}),(C,$)=>(f.openBlock(),f.createElementBlock("div",vl,[f.createVNode(H.ssForm,{rowContents:r.value,buttonValue:s.value,isRowFlex:k.value,isEnableWrap:!1,onOnButtonClick:h,onChange:D,isButtonRow:a.value},null,8,["rowContents","buttonValue","isRowFlex","isButtonRow"])]))}},Bl=ne._export_sfc(Sl,[["__scopeId","data-v-1b0ef247"]]),Pl={class:"table-operate-content"},jl={class:"table-operate-item"},Fl={class:"operate-title"},wl={class:"operate-content"},Ul={class:"operate-title"},Jl={class:"operate-content"},Ll={class:"operate-title"},Rl={class:"operate-content"},Vl={class:"operate-content"},Gl={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:n}){const t=e,l=n,r=f.ref([]),a=f.ref([]),s=f.ref([]),d=f.ref([{label:"按钮名称",prop:"label",type:"edit"},{label:"按钮类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),k=f.ref([{label:"标签名称",prop:"label",type:"edit"},{label:"标签类型",prop:"type",type:"edit"},{label:"按钮文字颜色",prop:"textColor",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),h=f.ref([]),D=f.ref(0),C=f.ref([{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}]),$=[{label:"标签名",prop:"label",type:"edit"},{label:"属性名",prop:"prop",type:"edit"},{label:"宽度",prop:"width",type:"edit",columnType:"Number"},{label:"是否固定列",prop:"fixed",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"right",value:"右"}]},{label:"是否支持排序",prop:"sortable",type:"edit",columnType:"Switch"},{label:"文本所在位置",prop:"align",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{label:"溢出悬浮文字",prop:"showOverflowTooltip",type:"edit",columnType:"Switch"},{label:"是否不可拖动",prop:"isNotDrag",type:"edit",columnType:"Switch"},{label:"是否可编辑列名",prop:"isEditCol",type:"edit",columnType:"Switch"},{label:"是否出现在附属界面",prop:"isOperate",type:"edit",columnType:"Switch"},{label:"操作",prop:"operate",type:"operate",sortable:!1}],x=c=>{let o=p.cloneDeep(r.value);const m=o==null?void 0:o.find(_=>_.key==="page");(m==null?void 0:m.contents)!==void 0?o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="page"&&(_.contents=c==null?void 0:c.isPagination),_)):o.push({key:"page",contents:c==null?void 0:c.isPagination}),r.value=o};f.watch(()=>t.originalItemContents,()=>{var c,o,m,_,T,S,O,F,v,N,B,P,E;!t.originalItemContents||t.originalItemContents.length===0||(r.value=p.cloneDeep(t.originalItemContents),a.value=(o=(c=r.value)==null?void 0:c.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:o.contents,s.value=(_=(m=r.value)==null?void 0:m.find(b=>(b==null?void 0:b.key)==="rowButton"))==null?void 0:_.contents,d.value=(S=(T=r.value)==null?void 0:T.find(b=>(b==null?void 0:b.key)==="extraButton"))==null?void 0:S.contents,C.value=(F=(O=r.value)==null?void 0:O.find(b=>(b==null?void 0:b.key)==="page"))!=null&&F.contents?[{name:"isPagination",label:"是否显示分页",type:"Switch",value:(N=(v=r.value)==null?void 0:v.find(b=>(b==null?void 0:b.key)==="page"))==null?void 0:N.contents}]:[{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}],a.value=(B=a.value)==null?void 0:B.map((b,w)=>b={label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":b==null?void 0:b.prop,width:b!=null&&b.width?parseInt(b.width):"",fixed:(b==null?void 0:b.fixed)??void 0,sortable:(b==null?void 0:b.sortable)??!1,align:(b==null?void 0:b.align)??"center",showOverflowTooltip:(b==null?void 0:b.showOverflowTooltip)??!0,isNotDrag:(b==null?void 0:b.isNotDrag)??!1,isEditCol:(b==null?void 0:b.isEditCol)??!1,isOperate:(b==null?void 0:b.isOperate)??!1,id:(b==null?void 0:b.id)??w}),s.value=(P=s.value)==null?void 0:P.map((b,w)=>b={label:(b==null?void 0:b.label)??"",type:(b==null?void 0:b.type)??"",textColor:(b==null?void 0:b.textColor)??"#000000",id:(b==null?void 0:b.id)??w}),d.value=(E=d.value)==null?void 0:E.map((b,w)=>b={label:(b==null?void 0:b.label)??"",type:(b==null?void 0:b.type)??"",background:(b==null?void 0:b.textColor)??"#FFFFFF",id:(b==null?void 0:b.id)??w}))},{deep:!0,immediate:!0}),f.watch(()=>C.value,()=>{var m;let c=p.cloneDeep(r.value);const o=c==null?void 0:c.find(_=>_.key==="page");o!=null&&o.contents?c=c==null?void 0:c.map(_=>{var T;return(_==null?void 0:_.key)==="page"&&(_.contents=(T=C.value)==null?void 0:T[0].value),_}):c.push({key:"page",contents:(m=C.value)==null?void 0:m[0].value}),r.value=c},{immediate:!0,deep:!0});const A=()=>{const c=p.cloneDeep(a.value);let o=p.cloneDeep(r.value);c.push({label:"",prop:"",width:"",fixed:void 0,sortable:!1,align:"center",showOverflowTooltip:!0,isNotDrag:!1,isEditCol:!1,isOperate:!1,id:D.value}),a.value=c,D.value++;const m=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="header");m!=null&&m.contents?(m.contents=c,o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="header"&&(_.contents=c),_))):o.push({key:"header",contents:c}),r.value=o},j=()=>{const c=p.cloneDeep(s.value);let o=p.cloneDeep(r.value);c.push({label:"",type:"",textColor:"#000000",id:D.value}),s.value=c,D.value++;const m=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="rowButton");m!=null&&m.contents?(m.contents=c,o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="rowButton"&&(_.contents=c),_))):o.push({key:"rowButton",contents:c}),r.value=o},y=()=>{const c=p.cloneDeep(h.value);let o=p.cloneDeep(r.value);c.push({label:"",type:"",background:"#FFFFFF",id:D.value}),h.value=c,D.value++;const m=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="extraButton");m!=null&&m.contents?(m.contents=c,o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="extraButton"&&(_.contents=c),_))):o.push({key:"extraButton",contents:c}),r.value=o},i=c=>{const o=p.cloneDeep(s.value);let m=p.cloneDeep(r.value);s.value=o.filter(T=>T.id!==c.id);const _=m==null?void 0:m.find(T=>T.key==="rowButton");_!=null&&_.contents&&(m=m==null?void 0:m.map(T=>((T==null?void 0:T.key)==="rowButton"&&(T.contents=o.filter(S=>S.id!==c.id)),T))),r.value=m},u=c=>{const o=p.cloneDeep(h.value);let m=p.cloneDeep(r.value);h.value=o.filter(T=>T.id!==c.id);const _=m==null?void 0:m.find(T=>T.key==="extraButton");_!=null&&_.contents&&(m=m==null?void 0:m.map(T=>((T==null?void 0:T.key)==="extraButton"&&(T.contents=o.filter(S=>S.id!==c.id)),T))),r.value=m},g=c=>{const o=p.cloneDeep(a.value);let m=p.cloneDeep(r.value);a.value=o.filter(T=>T.id!==c.id);const _=m==null?void 0:m.find(T=>T.key==="header");_!=null&&_.contents&&(m=m==null?void 0:m.map(T=>((T==null?void 0:T.key)==="header"&&(T.contents=o.filter(S=>S.id!==c.id)),T))),r.value=m};return f.watch(()=>[r.value,a.value],()=>{let c=p.cloneDeep(r.value);const o=c==null?void 0:c.find(m=>(m==null?void 0:m.key)==="header");o!=null&&o.contents?(o.contents=a.value,c=c==null?void 0:c.map(m=>((m==null?void 0:m.key)==="header"&&(m.contents=a.value),m))):c.push({key:"header",contents:a.value}),l("change",c)},{deep:!0,immediate:!0}),(c,o)=>{const m=f.resolveComponent("el-button");return f.openBlock(),f.createElementBlock("div",Pl,[f.createElementVNode("div",jl,[f.createElementVNode("div",Fl,[o[1]||(o[1]=f.createElementVNode("div",null,f.toDisplayString("表头"),-1)),f.createVNode(m,{class:"blue-operate-button",icon:"ele-Plus",onClick:A},{default:f.withCtx(()=>o[0]||(o[0]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[0]})]),f.createElementVNode("div",wl,[f.createVNode(H.ssTable,{columns:$,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:a.value,onDeleteRow:g},null,8,["tableData"])]),f.createElementVNode("div",Ul,[o[3]||(o[3]=f.createElementVNode("div",null,f.toDisplayString("行内按钮"),-1)),f.createVNode(m,{class:"blue-operate-button",icon:"ele-Plus",onClick:j},{default:f.withCtx(()=>o[2]||(o[2]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[2]})]),f.createElementVNode("div",Jl,[f.createVNode(H.ssTable,{columns:k.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:s.value,onDeleteRow:i},null,8,["columns","tableData"])]),f.createElementVNode("div",Ll,[o[5]||(o[5]=f.createElementVNode("div",null,f.toDisplayString("表格外部按钮"),-1)),f.createVNode(m,{class:"blue-operate-button",icon:"ele-Plus",onClick:y},{default:f.withCtx(()=>o[4]||(o[4]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[4]})]),f.createElementVNode("div",Rl,[f.createVNode(H.ssTable,{columns:d.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:h.value,onDeleteRow:u},null,8,["columns","tableData"])]),o[6]||(o[6]=f.createElementVNode("div",{class:"operate-title"},[f.createElementVNode("div",null,f.toDisplayString("分页"))],-1)),f.createElementVNode("div",Vl,[f.createVNode(H.ssForm,{rowContents:C.value,onChange:x},null,8,["rowContents"])])])])}}},Ml=ne._export_sfc(Gl,[["__scopeId","data-v-877911eb"]]),ql={class:"form-operate-content"},Il={class:"form-operate-item"},Hl={class:"operate-title"},Wl={class:"operate-content"},Kl={class:"operate-title"},Zl={class:"operate-content"},zl={class:"operate-content"},Ql={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:n}){const t=e,l=n,r=f.ref([{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}]),a=f.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"字段值",prop:"key",type:"edit"},{label:"字段选项值",prop:"options",type:"edit"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),s=f.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),d=f.ref([]),k=f.ref([]),h=f.ref([]),D=f.ref(0);f.watch(()=>t.originalItemContents,()=>{var y,i,u,g,c,o,m,_,T,S;!t.originalItemContents||t.originalItemContents.length===0||(k.value=p.cloneDeep(t.originalItemContents),h.value=(i=(y=k.value)==null?void 0:y.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:i.contents,d.value=(g=(u=k.value)==null?void 0:u.find(O=>(O==null?void 0:O.key)==="formButton"))==null?void 0:g.contents,h.value=(c=h.value)==null?void 0:c.map((O,F)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",key:(O==null?void 0:O.key)??"",options:(O==null?void 0:O.options)??"",id:(O==null?void 0:O.id)??F}),d.value=(o=d.value)==null?void 0:o.map((O,F)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",background:(O==null?void 0:O.background)??"#000000",id:(O==null?void 0:O.id)??F}),r.value=(_=(m=k.value)==null?void 0:m.find(O=>(O==null?void 0:O.key)==="formFlex"))!=null&&_.contents?[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:(S=(T=k.value)==null?void 0:T.find(O=>(O==null?void 0:O.key)==="formFlex"))==null?void 0:S.contents}]:[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}])},{deep:!0,immediate:!0});const C=()=>{const y=p.cloneDeep(d.value);let i=p.cloneDeep(k.value);y.push({label:"",type:"",background:"#000000",id:D.value}),d.value=y,D.value++;const u=i==null?void 0:i.find(g=>(g==null?void 0:g.key)==="formButton");u!=null&&u.contents?(u.contents=y,i=i==null?void 0:i.map(g=>((g==null?void 0:g.key)==="formButton"&&(g.contents=y),g))):i.push({key:"formButton",contents:y}),k.value=i},$=()=>{const y=p.cloneDeep(h.value);let i=p.cloneDeep(k.value);y.push({label:"",type:"",key:"",options:"",id:D.value}),h.value=y,D.value++;const u=i==null?void 0:i.find(g=>(g==null?void 0:g.key)==="formContent");u!=null&&u.contents?(u.contents=y,i=i==null?void 0:i.map(g=>((g==null?void 0:g.key)==="formContent"&&(g.contents=y),g))):i.push({key:"formContent",contents:y}),k.value=i},x=y=>{const i=p.cloneDeep(d.value);let u=p.cloneDeep(k.value);d.value=i.filter(c=>c.id!==y.id);const g=u==null?void 0:u.find(c=>c.key==="formButton");g!=null&&g.contents&&(u=u==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formButton"&&(c.contents=i.filter(o=>o.id!==y.id)),c))),k.value=u},A=y=>{const i=p.cloneDeep(h.value);let u=p.cloneDeep(k.value);h.value=i.filter(c=>c.id!==y.id);const g=u==null?void 0:u.find(c=>c.key==="formContent");g!=null&&g.contents&&(u=u==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formContent"&&(c.contents=i.filter(o=>o.id!==y.id)),c))),k.value=u},j=y=>{let i=p.cloneDeep(k.value);const u=i==null?void 0:i.find(g=>g.key==="formFlex");(u==null?void 0:u.contents)!==void 0?i=i==null?void 0:i.map(g=>((g==null?void 0:g.key)==="formFlex"&&(g.contents=y==null?void 0:y.isRowFlex),g)):i.push({key:"formFlex",contents:y==null?void 0:y.isRowFlex}),k.value=i};return f.watch(()=>[k.value,h.value],()=>{let y=p.cloneDeep(k.value);const i=y==null?void 0:y.find(u=>(u==null?void 0:u.key)==="formContent");i!=null&&i.contents?(i.contents=h.value,y=y==null?void 0:y.map(u=>((u==null?void 0:u.key)==="formContent"&&(u.contents=h.value),u))):y.push({key:"formContent",contents:h.value}),l("change",y)},{deep:!0,immediate:!0}),(y,i)=>{const u=f.resolveComponent("el-button");return f.openBlock(),f.createElementBlock("div",ql,[f.createElementVNode("div",Il,[f.createElementVNode("div",Hl,[i[1]||(i[1]=f.createElementVNode("div",null,f.toDisplayString("表单信息"),-1)),f.createVNode(u,{class:"blue-operate-button",icon:"ele-Plus",onClick:$},{default:f.withCtx(()=>i[0]||(i[0]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[0]})]),f.createElementVNode("div",Wl,[f.createVNode(H.ssTable,{columns:a.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:h.value,onDeleteRow:A},null,8,["columns","tableData"])]),f.createElementVNode("div",Kl,[i[3]||(i[3]=f.createElementVNode("div",null,f.toDisplayString("表单按钮"),-1)),f.createVNode(u,{class:"blue-operate-button",icon:"ele-Plus",onClick:C},{default:f.withCtx(()=>i[2]||(i[2]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[2]})]),f.createElementVNode("div",Zl,[f.createVNode(H.ssTable,{columns:s.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:d.value,onDeleteRow:x},null,8,["columns","tableData"])]),i[4]||(i[4]=f.createElementVNode("div",{class:"operate-title"},[f.createElementVNode("div",null,f.toDisplayString("表单布局"))],-1)),f.createElementVNode("div",zl,[f.createVNode(H.ssForm,{rowContents:r.value,onChange:j},null,8,["rowContents"])])])])}}},Xl=ne._export_sfc(Ql,[["__scopeId","data-v-a36b8468"]]),Yl={class:"extra-content"},en={key:0},ln={key:1},nn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(e,{emit:n}){const t=e,l=f.ref(0),r=f.ref(),a=f.ref(),s=n,d=f.ref(!1),k=f.ref({}),h=f.ref({}),D=f.ref();f.watch(()=>[t.itemData],()=>{var c;const g=p.cloneDeep(t.itemData);r.value=(c=p.cloneDeep(g))==null?void 0:c.map(o=>{var m;if(o.key==="extra"){let _=[];(m=o.value)==null||m.forEach(T=>{var S;_.push((S=Object.values(T))==null?void 0:S[0])}),o.value=_}return o})},{deep:!0,immediate:!0});const C=(g,c,o,m)=>{var T;let _={};((T=g==null?void 0:g[0])==null?void 0:T.contents)==="详情"&&(d.value=!0,_[c]=g,a.value=g==null?void 0:g.filter(S=>(S==null?void 0:S.key)!=="tableContentName"),k.value=_,h.value=o,D.value=m.id)},$=g=>{var S,O,F,v;const c=(O=(S=Object.values(p.cloneDeep(k.value)))==null?void 0:S[0])==null?void 0:O.filter(N=>(N==null?void 0:N.key)==="tableContentName"),o=(v=(F=Object.values(p.cloneDeep(k.value)))==null?void 0:F[0])==null?void 0:v.filter(N=>(N==null?void 0:N.key)!=="tableContentName"),m=o==null?void 0:o.map((N,B)=>{var P;return B===g.index&&(N==null?void 0:N.comp)==="Table"&&(N.compData=(P=N.compData)==null?void 0:P.map(E=>{var b,w;return(E==null?void 0:E.key)==="tableContents"&&(E.contents=(w=(b=g.content)==null?void 0:b.map(U=>{let R={};for(let G in U)G!=="id"&&(R[G]=U[G]);return R}))==null?void 0:w.map(U=>Object.values(U))),E})),N});m.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(k.value),T={};for(let N in _)T[N]=m;k.value=T},x=()=>{d.value=!1,k.value={},h.value={},D.value=void 0,l.value++},A=g=>{var S,O,F,v;const c=(O=(S=Object.values(p.cloneDeep(k.value)))==null?void 0:S[0])==null?void 0:O.filter(N=>(N==null?void 0:N.key)==="tableContentName"),o=(v=(F=Object.values(p.cloneDeep(k.value)))==null?void 0:F[0])==null?void 0:v.filter(N=>(N==null?void 0:N.key)!=="tableContentName"),m=o==null?void 0:o.map((N,B)=>(B===g.index&&(N.compData=g.contents),N));m.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(k.value),T={};for(let N in _)T[N]=m;k.value=T},j=()=>{var c,o;let g={};for(let m in h.value)m===((c=Object.keys(k.value))==null?void 0:c[0])?g[m]=(o=Object.values(k.value))==null?void 0:o[0]:g[m]=h.value[m];s("change",{buttonName:"编辑",index:D.value,singleContent:g},"methodData"),d.value=!1,k.value={},h.value={},D.value=void 0},y=()=>{d.value=!1,k.value={},h.value={},D.value=void 0},i=g=>{s("change",g,"methodData")},u=g=>je(g);return(g,c)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("div",Yl,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.value,(o,m)=>(f.openBlock(),f.createElementBlock("div",{key:l.value},[(o==null?void 0:o.key)==="extra"?(f.openBlock(),f.createElementBlock("div",en)):(f.openBlock(),f.createElementBlock("div",ln,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(u(o.comp)),{itemData:o==null?void 0:o.compData,childItemData:o==null?void 0:o.itemChildData,key:m,index:(o==null?void 0:o.id)??m,onContentClick:C,onChange:i},null,40,["itemData","childItemData","index"]))]))]))),128))]),f.createVNode(H.ssDialog,{visible:d.value,onBeforeDestroy:y},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.value,(o,m)=>(f.openBlock(),f.createElementBlock("div",{key:m,class:"extra-dialog"},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(u(o.comp)),{itemData:o==null?void 0:o.compData,onChange:$,childItemData:o==null?void 0:o.itemChildData,key:m,onContentChange:A,index:(o==null?void 0:o.id)??m,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:f.withCtx(()=>[f.createElementVNode("div",{class:"dialog-footer"},[f.createElementVNode("div",{class:"cancel-button footer-button",onClick:x},f.toDisplayString("取消")),f.createElementVNode("div",{class:"confirm-button footer-button",onClick:j},f.toDisplayString("确认"))])]),_:1},8,["visible"])],64))}},tn=ne._export_sfc(nn,[["__scopeId","data-v-e3e0f29d"]]),an={class:"method-content"},rn=["onClick"],on={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(e){const n=f.ref([]),t=e,l=(a,s)=>{var k;const d=(k=s==null?void 0:s[0])==null?void 0:k.children;return a==null?void 0:a.map(h=>{var D;return h=(D=h==null?void 0:h.map((C,$)=>{var x;return{key:(x=d[$])==null?void 0:x.label,value:C}}))==null?void 0:D.filter(C=>C.key),h})},r=a=>{var d,k;let s={};if((d=p.cloneDeep(a.content))==null||d.forEach((h,D)=>{var C,$,x,A,j,y,i,u,g,c,o,m,_,T,S,O,F;if((h==null?void 0:h.comp)==="Table"){let v=(A=(x=($=(C=h==null?void 0:h.compData)==null?void 0:C.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:$.contents)==null?void 0:x[0])==null?void 0:A.some(E=>E==null?void 0:E.children),N=(i=(y=(j=h==null?void 0:h.compData)==null?void 0:j.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:y.contents)==null?void 0:i.map(E=>E.slice(1)),B=(m=(o=(c=(g=(u=h==null?void 0:h.compData)==null?void 0:u.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:g.contents)==null?void 0:c[0])==null?void 0:o[0])==null?void 0:m.label,P=(S=(T=(_=h==null?void 0:h.compData)==null?void 0:_.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:T.contents)==null?void 0:S[0];if(v)s[B]=l(N,P);else{const E=[];P=P.slice(1,P.length-1),P==null||P.forEach((b,w)=>{N==null||N.forEach(U=>{E.push({key:b.label+U[0],value:U[w+1]})})}),s["form"+D]=E}}else{const v=(F=(O=h.compData)==null?void 0:O.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:F.contents;s.form={};const N=[];v==null||v.forEach(B=>{B.key!==""&&(B={key:B==null?void 0:B.key,value:B==null?void 0:B.value},N.push(B))}),s.form=N}}),a.api){const h=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),D=URL.createObjectURL(h),C=document.createElement("a");C.href=D,C.download="data.json",C.click(),URL.revokeObjectURL(D),ze.axios.post(a.api,{content:s,templateFile:(k=a==null?void 0:a.extraContent)==null?void 0:k[0]})}};return f.watch(()=>t.itemData,async()=>{const a=p.cloneDeep(t.itemData),s=a==null?void 0:a.map(async k=>{var A,j,y,i,u,g;const D=(A=(await le.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:k.method}})).data.result)==null?void 0:A[0],C=await le.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:D.id}}),$=await he.getItemData((j=k==null?void 0:k.value)==null?void 0:j[0],sessionStorage.getItem("systemKey"),""),x=(y=C.data.result)==null?void 0:y[0];return{buttonName:(i=D==null?void 0:D.key)==null?void 0:i.methodKey,api:(g=(u=x==null?void 0:x.value)==null?void 0:u.tableData)==null?void 0:g[0],content:$==null?void 0:$.filter(c=>c.comp!=="methodButton"),extraContent:p.cloneDeep(k.value).slice(1)}}),d=await Promise.all(s);n.value=d},{immediate:!0,deep:!0}),(a,s)=>(f.openBlock(),f.createElementBlock("div",an,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.value,d=>(f.openBlock(),f.createElementBlock("div",null,[d.api!==""?(f.openBlock(),f.createElementBlock("div",{key:0,onClick:k=>r(d),class:"method-buttons"},f.toDisplayString(d.buttonName),9,rn)):f.createCommentVNode("",!0)]))),256))]))}},sn=ne._export_sfc(on,[["__scopeId","data-v-0e8b4df7"]]),cn=f.ref([{name:"表格",type:"table",comp:"Table",icon:"Grid"},{name:"表单",type:"form",comp:"Form",icon:"Film"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"Avatar",icon:"Avatar"}]),pn={TABLE:he.ssTable,FORM:Bl,TableOperate:Ml,FormOperate:Xl,FOLD:Ze._sfc_main,CALCULATOR:tn,METHODBUTTON:sn,AVATARUPLOAD:Qe._sfc_main};function je(e){return pn[e==null?void 0:e.toUpperCase()]||null}const L=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],J=[{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"}],Y=f.ref(0),un=e=>{const[n,t]=e.split(/=(.+)/),l=n.replace(/['"]/g,"").trim(),r=t.replace(/^['"]|['"]$/g,"");return{key:l,value:r}},se=e=>{try{return JSON.parse(e),!0}catch{return!1}},fn=e=>e.includes("$")&&e.trim().endsWith("(")?e+")":e,dn=e=>{let n=e;const t=[];let l="";for(const r of n)r.includes("{")||l.includes("{")||r.includes("[")||l.includes("[")||r.includes("【")||l.includes("【")||r.includes("(")||l.includes("(")||r.includes("(")||l.includes("(")||r.includes("/*")||l.includes("/*")?(l+=r.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&&(t.push(l),l="")):t.push(r.trim());return t==null?void 0:t.filter(r=>r.includes("{"))},yn=e=>{var t;let n=[];return(t=dn(e.slice(1,-1)))==null||t.forEach(l=>{var a,s,d,k;let r=((s=(a=l.slice(1,-1))==null?void 0:a.split(","))==null?void 0:s.length)??1;(k=(d=l.slice(1,-1))==null?void 0:d.split(","))==null||k.forEach(h=>{var x,A,j,y,i,u,g,c,o,m,_,T,S;let D=h==null?void 0:h.split(":"),C=D!=null&&D[0]?(D==null?void 0:D[1].split("$").length)-1===1?((x=D==null?void 0:D[0])==null?void 0:x.replace(/^"(.*)"$/,"$1"))+((A=D==null?void 0:D[1])==null?void 0:A.replace(/^"(.*)"$/,"$1")):Array.isArray((y=(j=D==null?void 0:D[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"))==null?void 0:y.split("("))&&((g=(u=(i=D==null?void 0:D[1])==null?void 0:i.replace(/^"(.*)"$/,"$1"))==null?void 0:u.split("("))==null?void 0:g.length)>1?((c=D==null?void 0:D[0])==null?void 0:c.replace(/^"(.*)"$/,"$1"))+((_=(m=(o=D==null?void 0:D[1])==null?void 0:o.replace(/^"(.*)"$/,"$1"))==null?void 0:m.split("("))==null?void 0:_[0])+"()":(T=D==null?void 0:D[0])==null?void 0:T.replace(/^"(.*)"$/,"$1"):"",$=(D==null?void 0:D[1].split("$").length)-1===0?(S=D==null?void 0:D[1])==null?void 0:S.replace(/^"(.*)"$/,"$1"):"";Y.value++,n.push({id:Y.value,key:C,value:$,width:r,extraContent:D==null?void 0:D[1]})})}),n},Fe=e=>{var n,t;try{const l=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let r=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(se(r)&&!r.includes("$")||(r=r.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),se(r)){const a=JSON.parse(r);let s=[];return a==null||a.forEach(d=>{var k;(k=Object.entries(p.cloneDeep(d)))==null||k.forEach(h=>{Y.value++,s.push({id:Y.value,key:(h==null?void 0:h[0])??"",value:(h==null?void 0:h[1])===""?"":h==null?void 0:h[1],width:Object.keys(p.cloneDeep(d)).length})})}),s}else return l.trim().startsWith("{{")?yn(l.trim()):ie(r)}else if(se(l)){const r=JSON.parse(l);return Object.entries(r).map(([a,s])=>(Y.value++,{id:Y.value,key:a,value:s===""?"":s,width:1}))}else return((n=ie(l))==null?void 0:n.length)===0?l:(t=ie(l))==null?void 0:t.map(r=>({label:r.label,method:fn(r.method)}))}catch(l){return console.error("转换失败:",l),[]}},ie=e=>{e=e.trim().replace(/^\{|\}$/g,"").trim();const n=[];let t=0;for(;t<e.length;){const l=e.slice(t).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const r=l[1];t+=l[0].length;let a="",s=0,d=!1,k="";for(let h=t;h<e.length;h++){const D=e[h];if((D==='"'||D==="'")&&!d?(d=!0,k=D):D===k&&d&&(d=!1,k=""),!d&&((D==="{"||D==="("||D==="[")&&s++,(D==="}"||D===")"||D==="]")&&s--,D===","&&s===0||h===e.length-1)){a=e.slice(t,h+1).trim(),t=h+1;break}}n.push({label:r,method:a})}return n},hn=(e,n)=>{try{if(L!=null&&L.find(t=>(t==null?void 0:t.key)===n))return e.replace(/['"]/g,"").trim();if(p.cloneDeep(e).split("[").length-1>1){const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else{const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(se(t)){const l=JSON.parse(t);return Array.isArray(l)?l.map(r=>({label:r})):l}else return Fe(p.cloneDeep(e))}}catch(t){return console.error("解析失败:",t),e}},mn=e=>({[e==null?void 0:e.key]:hn(e==null?void 0:e.value,e==null?void 0:e.key)}),gn=e=>{try{if(p.cloneDeep(e).split("[").length-1>1){const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else return JSON.parse(p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(t=>({label:t}))}catch(n){return console.error("解析失败:",n),e}},bn=e=>{const n=e.match(/\(([^)]+)\)/);return n?n[1]:""},kn=e=>{const n=e.match(/^([^(]+)\s*\(/);return n?n[1].trim():e},Oe=e=>e.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(n=>n.trim()).filter(n=>n).join("/"),Dn=e=>{var s,d;let n=[],t=[];const l=(s=p.cloneDeep(e))==null?void 0:s.map(k=>k==null?void 0:k.key),r=[...new Set((d=p.cloneDeep(l))==null?void 0:d.map(k=>bn(k)))];r==null||r.forEach(k=>{let h=e==null?void 0:e.filter($=>$.key.includes(k));h==null||h.forEach($=>{$!=null&&$.key.includes("Menus")&&(n.push({key:"GroupName",value:Oe($==null?void 0:$.value)}),t.push(Oe($==null?void 0:$.value)))});let D=e==null?void 0:e.filter($=>$.key.includes(k)&&!($!=null&&$.key.includes("Menus")));D=D==null?void 0:D.map($=>($.key=kn($.key),$));const C={key:"GroupContents",value:D};n.push(C)});const a={key:"Menus",value:t};return n.unshift(a),n},we=e=>{var n,t;if(Array.isArray(Object.keys(e))&&((n=Object.keys(e))==null?void 0:n.length)>0){let l=[];return(t=Object.entries(e))==null||t.forEach(([r,a])=>{var d,k;let s=[];if(s.push(r),((d=Object.keys(a))==null?void 0:d.length)>0){let h=[];(k=we(a))==null||k.forEach(D=>{h.push(D)}),h==null||h.forEach(D=>{s.push(D)})}l.push(s)}),l}},Cn=(e,n)=>{var l;let t=n;return Array.isArray(Object.keys(e))&&((l=Object.entries(e))==null||l.forEach(([r,a])=>{let s=[r];if(typeof a=="object"&&a!==null){let d=we(a);d==null||d.forEach(k=>{s.push(k)})}t.push(s)})),t},An=e=>{const n={};return e.forEach(l=>{const r=l.split("/");let a=n;r.forEach(s=>{a[s]||(a[s]={}),a=a[s]})}),Cn(n,[])},Ue=e=>An(e),$n=e=>{var n,t,l,r,a,s,d,k;try{const h=be((t=(n=p.cloneDeep(e))==null?void 0:n.replace("(","("))==null?void 0:t.replace(")",")")),D=(r=(l=p.cloneDeep(h))==null?void 0:l.filter(A=>!A.includes("/*")))==null?void 0:r.map(A=>un(A)),C=Dn(D),$=[];if(((a=C==null?void 0:C.find(A=>(A==null?void 0:A.key)==="Menus"))==null?void 0:a.value.length)===0)return!1;(s=p.cloneDeep(C))==null||s.forEach(A=>{var j,y,i,u,g;L!=null&&L.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())})?$.push({comp:((j=L==null?void 0:L.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())}))==null?void 0:j.value)??"",name:(y=A==null?void 0:A.value)==null?void 0:y.replace(/[’]|[‘]|[']/g,""),compData:[]}):J!=null&&J.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())})&&(($==null?void 0:$.length)===0&&(i=A.key)!=null&&i.includes("Menus")&&$.push({comp:"Menu",name:"",compData:[]}),(u=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&u.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(g=J==null?void 0:J.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())}))==null?void 0:g.value,contents:A==null?void 0:A.value}))});let x=(d=p.cloneDeep($))==null?void 0:d.map(A=>{var j;return A!=null&&A.compData&&(A.compData=(j=A==null?void 0:A.compData)==null?void 0:j.map(y=>{var i,u,g,c,o,m,_,T,S,O,F;if((y==null?void 0:y.key)==="formFlex")y.contents=((u=(i=y.contents)==null?void 0:i.replace(/[’]|[‘]|[']/g,""))==null?void 0:u.toUpperCase())!=="Vertical".toUpperCase();else if((y==null?void 0:y.key)==="groupContents")y.contents=(g=p.cloneDeep(y.contents))==null?void 0:g.map(v=>mn(p.cloneDeep(v)));else if(Array.isArray(y==null?void 0:y.contents))y.contents=Ue(y.contents);else if(((o=(c=y==null?void 0:y.contents)==null?void 0:c.trim())!=null&&o.startsWith("[")||(_=(m=y.contents)==null?void 0:m.trim())!=null&&_.startsWith("【"))&&((S=(T=y.contents)==null?void 0:T.trim())!=null&&S.endsWith("]")||(F=(O=y.contents)==null?void 0:O.trim())!=null&&F.endsWith("】")))y.contents=gn(p.cloneDeep(y.contents));else{if(!y.contents)return;y.contents=Fe(p.cloneDeep(y.contents))}return y})),A});return x=(k=p.cloneDeep(x))==null?void 0:k.map(A=>{var j;return(A==null?void 0:A.comp)==="Group"&&(A.compData=(j=A.compData)==null?void 0:j.map(y=>{var u;let i=[];return(u=y.contents)==null||u.forEach(g=>{var c,o,m,_,T,S,O,F,v,N,B,P;if(L!=null&&L.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))i.push({comp:(c=L==null?void 0:L.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))==null?void 0:c.value,name:(m=(o=Object.values(g))==null?void 0:o[0])==null?void 0:m.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(J!=null&&J.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())})){if((i==null?void 0:i.length)===0)return;(_=i==null?void 0:i[(i==null?void 0:i.length)-1])!=null&&_.compData&&i[(i==null?void 0:i.length)-1].compData.push({key:(T=J==null?void 0:J.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))==null?void 0:T.value,contents:(S=Object.values(g))==null?void 0:S[0]})}else if((F=(O=Object.keys(g))==null?void 0:O[0])!=null&&F.includes("$")){const E=(N=(v=Object.keys(p.cloneDeep(g)))==null?void 0:v[0])==null?void 0:N.split("$");i[(i==null?void 0:i.length)-1].compData.push({key:(B=J==null?void 0:J.find(b=>{var w,U;return((w=b==null?void 0:b.key)==null?void 0:w.toUpperCase())===((U=E==null?void 0:E[0])==null?void 0:U.toUpperCase())}))==null?void 0:B.value,contents:(P=Object.values(g))==null?void 0:P[0],selectLabel:E==null?void 0:E[1]})}return g}),y.contents=i,y})),A}),x}catch{return!1}},I=e=>{try{return JSON.parse(e),!0}catch{return!1}},_n=(e,n)=>Nl(e,n),Ee=f.ref(0),Je=e=>{const n=[];let t=null;for(let l=0;l<e.length;l++){const r=e[l];if(Array.isArray(r))t&&(t.children=Je(r));else{const a={label:r};n.push(a),t=a}}return n},Le=e=>{let n=0;for(const t of e)n++,t.children&&(n+=Le(t.children));return n},Re=(e,n,t=[])=>{let l=0;for(const r of n){if(l>=e.length)break;const a=[...e[l]];if(t.push(a),l++,r.children&&r.children.length>0){const s=[];Re(e.slice(l),r.children,s),s.length>0&&(a.push(s),l+=Le(r.children))}}return t},xn=(e,n)=>{let t=[];return e==null||e.forEach(r=>{r.some(a=>Array.isArray(a))?t.push(...r):t.push(r)}),Re(t,n)},ye=e=>{const n={label:e[0].trim()};if(e.length>1){const t=e.slice(1);t.length===1&&Array.isArray(t[0])?n.children=t[0].map(l=>Array.isArray(l)?ye(l):{label:l.trim()}):n.children=t.map(l=>Array.isArray(l)?ye(l):{label:l.trim()})}return n},Te=e=>{let n=e.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return n=n.replace(/:}(?=,|]|}|$)/g,':""}'),n=n.replace(/:,(?=\s*")/g,':"",'),n=n.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(t,l,r)=>`"${l}://${r}"`),n=n.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),n},On=e=>{var t;return e.some(l=>!Array.isArray(l))?e:(t=p.cloneDeep(e))==null?void 0:t.map(l=>{let r=[];return l.some(a=>Array.isArray(a))?l==null||l.forEach(a=>{Array.isArray(a)&&r.push(ye(a))}):l.some(a=>a.includes("["))?r.push(l):r=l.map(a=>({label:a.trim()})),r})},Ve=(e,n,t)=>{let l=e,r=t,a=n;return a.children&&(Array.isArray(r[r.length-1])?r[r.length-1].push(l[0]):r.push(l[0]),l.shift(),a=a.children),Array.isArray(a)&&a.forEach(s=>{if(s.children){const d=Ve(l,s,r);r=d[0],l=d[1]}}),[r,l]},En=(e,n)=>{let t=e,l=[];return n.length>0?n==null||n.forEach(r=>{let a=t==null?void 0:t[0];t.shift();const s=Ve(p.cloneDeep(t),r,a);a=s[0],t=s[1],l.push(a)}):l=t,l},ge=(e,n)=>{const t=On(p.cloneDeep(e));return En(t,n)},Tn=e=>{const n=[];let t=0;const l=e.length;for(;t<l;){const r=e[t];r.key==="tableColumns"&&t+1<l&&e[t+1].key==="tableContents"?(n.push({comp:"Table",compData:[r,e[t+1]],name:""}),t+=2):(n.push(r),t+=1)}return n},Ge=e=>ge([e],[]),Nn=e=>{const n=[];return e==null||e.forEach(t=>t==null?void 0:t.forEach(r=>{var a,s;Ee.value++,n.push({id:Ee.value,key:(a=Object.keys(r))==null?void 0:a[0],value:(s=Object.values(r))==null?void 0:s[0],width:t.length})})),n},Ne=e=>{let n=Tn(e);return n=n==null?void 0:n.map(t=>{var l,r,a;if(t.comp==="Table")(l=t.compData)!=null&&l.find(s=>(s==null?void 0:s.key)==="header")||(t.compData=(r=t.compData)==null?void 0:r.map(s=>(s.key==="tableColumns"?s={key:"header",contents:ge(s.value,[])}:s={key:s.key,contents:s.value},s)),t.compData.push({key:"extraButton",contents:[{label:"新增"}]}),t.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(t.key==="form"){const s=(a=t==null?void 0:t.value)==null?void 0:a.map(d=>(Array.isArray(d)||(d=[d]),d));t={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Nn(s)}],name:""}}return t}),n},vn=(e,n)=>{var d,k,h,D,C,$;const t=[],l=Je((k=(d=e==null?void 0:e.find(x=>x.key==="tableIndex"))==null?void 0:d.value)==null?void 0:k[0]);t.push({key:"tableIndexColumn",contents:n}),t.push({key:"tableIndex",contents:l});let r=[];const a=(h=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:h.value;a.length===1&&!(a!=null&&a[0].some(x=>Array.isArray(x)))?r=(D=a==null?void 0:a[0])==null?void 0:D.map(x=>({label:x})):r=ge((C=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:C.value,l),t.push({key:"header",contents:r});const s=xn(($=e==null?void 0:e.find(x=>x.key==="tableContents"))==null?void 0:$.value,l);return t.push({key:"tableContents",contents:s}),t.push({key:"extraButton",contents:[{label:"新增"}]}),t.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),t},Me=e=>e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(n,t,l)=>{const r=Me(l);return`"${t}",${r}`}),re=e=>{const n=e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Me(n).replace(/^"(.*)"$/,"$1")},Sn=e=>{const n=new Set;return e.filter(t=>{const l=JSON.stringify(t);return n.has(l)?!1:n.add(l)})},ve=e=>{var t;let n=[];return(t=p.cloneDeep(e))==null||t.forEach(l=>{var r;(r=l.contents)==null||r.forEach(a=>{n.push(a)})}),n=Sn(n),n.push({label:"操作"}),[n]},Bn=(e,n)=>e.reduce((t,l,r)=>{const a=Math.floor(r/n);return t[a]||(t[a]=[]),t[a].push(l),t},[]),qe=e=>e.reduce((n,t)=>t.children&&t.children.length>0?n+qe(t.children):n+1,0),Pn=(e,n)=>{var l;let t=[];return(l=Bn(e,qe(n==null?void 0:n[0])-1))==null||l.forEach(r=>{let a=[];r.forEach(s=>{var d;Array.isArray(s.contents)?(d=s.contents)==null||d.forEach(k=>{a.push(k)}):a.push(s.contents)}),t.push(a)}),[t]},jn=["方法体","输入","输出"],Se=f.ref(1),be=e=>{let n;e.replaceAll(" ",`\r
|
|
1
|
+
"use strict";const he=require("./index-dm-zOhNm.cjs"),f=require("vue"),le=require("./index-DjlDuRvf.cjs"),H=require("./index-BaSc02sA.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),p=require("./cloneDeep-B6Av9vYT.cjs"),Ze=require("./index.vue_vue_type_script_setup_true_lang-D0K1veK2.cjs"),ze=require("./request-BId7xEpo.cjs"),Qe=require("./index.vue_vue_type_script_setup_true_lang-ClNwGHXE.cjs"),X=require("./index-BUkyNn3m.cjs"),me=require("./menu-CxtX8L48.cjs"),Xe=require("./modelComp-BQutSX47.cjs");var Ye="__lodash_hash_undefined__";function el(e){return this.__data__.set(e,Ye),this}function ll(e){return this.__data__.has(e)}function pe(e){var n=-1,t=e==null?0:e.length;for(this.__data__=new X.MapCache;++n<t;)this.add(e[n])}pe.prototype.add=pe.prototype.push=el;pe.prototype.has=ll;function nl(e,n){for(var t=-1,l=e==null?0:e.length;++t<l;)if(n(e[t],t,e))return!0;return!1}function tl(e,n){return e.has(n)}var al=1,rl=2;function Be(e,n,t,l,r,a){var s=t&al,d=e.length,k=n.length;if(d!=k&&!(s&&k>d))return!1;var h=a.get(e),D=a.get(n);if(h&&D)return h==n&&D==e;var C=-1,$=!0,x=t&rl?new pe:void 0;for(a.set(e,n),a.set(n,e);++C<d;){var A=e[C],j=n[C];if(l)var y=s?l(j,A,C,n,e,a):l(A,j,C,e,n,a);if(y!==void 0){if(y)continue;$=!1;break}if(x){if(!nl(n,function(i,u){if(!tl(x,u)&&(A===i||r(A,i,t,l,a)))return x.push(u)})){$=!1;break}}else if(!(A===j||r(A,j,t,l,a))){$=!1;break}}return a.delete(e),a.delete(n),$}function ol(e){var n=-1,t=Array(e.size);return e.forEach(function(l,r){t[++n]=[r,l]}),t}function sl(e){var n=-1,t=Array(e.size);return e.forEach(function(l){t[++n]=l}),t}var cl=1,pl=2,ul="[object Boolean]",il="[object Date]",fl="[object Error]",dl="[object Map]",yl="[object Number]",hl="[object RegExp]",ml="[object Set]",gl="[object String]",bl="[object Symbol]",kl="[object ArrayBuffer]",Dl="[object DataView]",Ae=X.Symbol?X.Symbol.prototype:void 0,ue=Ae?Ae.valueOf:void 0;function Cl(e,n,t,l,r,a,s){switch(t){case Dl:if(e.byteLength!=n.byteLength||e.byteOffset!=n.byteOffset)return!1;e=e.buffer,n=n.buffer;case kl:return!(e.byteLength!=n.byteLength||!a(new p.Uint8Array(e),new p.Uint8Array(n)));case ul:case il:case yl:return X.eq(+e,+n);case fl:return e.name==n.name&&e.message==n.message;case hl:case gl:return e==n+"";case dl:var d=ol;case ml:var k=l&cl;if(d||(d=sl),e.size!=n.size&&!k)return!1;var h=s.get(e);if(h)return h==n;l|=pl,s.set(e,n);var D=Be(d(e),d(n),l,r,a,s);return s.delete(e),D;case bl:if(ue)return ue.call(e)==ue.call(n)}return!1}var Al=1,$l=Object.prototype,_l=$l.hasOwnProperty;function xl(e,n,t,l,r,a){var s=t&Al,d=p.getAllKeys(e),k=d.length,h=p.getAllKeys(n),D=h.length;if(k!=D&&!s)return!1;for(var C=k;C--;){var $=d[C];if(!(s?$ in n:_l.call(n,$)))return!1}var x=a.get(e),A=a.get(n);if(x&&A)return x==n&&A==e;var j=!0;a.set(e,n),a.set(n,e);for(var y=s;++C<k;){$=d[C];var i=e[$],u=n[$];if(l)var g=s?l(u,i,$,n,e,a):l(i,u,$,e,n,a);if(!(g===void 0?i===u||r(i,u,t,l,a):g)){j=!1;break}y||(y=$=="constructor")}if(j&&!y){var c=e.constructor,o=n.constructor;c!=o&&"constructor"in e&&"constructor"in n&&!(typeof c=="function"&&c instanceof c&&typeof o=="function"&&o instanceof o)&&(j=!1)}return a.delete(e),a.delete(n),j}var Ol=1,$e="[object Arguments]",_e="[object Array]",te="[object Object]",El=Object.prototype,xe=El.hasOwnProperty;function Tl(e,n,t,l,r,a){var s=X.isArray(e),d=X.isArray(n),k=s?_e:p.getTag(e),h=d?_e:p.getTag(n);k=k==$e?te:k,h=h==$e?te:h;var D=k==te,C=h==te,$=k==h;if($&&p.isBuffer(e)){if(!p.isBuffer(n))return!1;s=!0,D=!1}if($&&!D)return a||(a=new p.Stack),s||p.isTypedArray(e)?Be(e,n,t,l,r,a):Cl(e,n,k,t,l,r,a);if(!(t&Ol)){var x=D&&xe.call(e,"__wrapped__"),A=C&&xe.call(n,"__wrapped__");if(x||A){var j=x?e.value():e,y=A?n.value():n;return a||(a=new p.Stack),r(j,y,t,l,a)}}return $?(a||(a=new p.Stack),xl(e,n,t,l,r,a)):!1}function Pe(e,n,t,l,r){return e===n?!0:e==null||n==null||!X.isObjectLike(e)&&!X.isObjectLike(n)?e!==e&&n!==n:Tl(e,n,t,l,Pe,r)}function Nl(e,n){return Pe(e,n)}const ae=[{key:"单选",value:"Select"},{key:"日期",value:"Date"},{key:"长文本",value:"TextArea"},{key:"上传",value:"Upload"}],vl={class:"form-content"},Sl={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number},emits:["change","contentChange"],setup(e,{emit:n}){const t=e,l=n,r=f.ref([]),a=f.ref(!1),s=f.ref([]),d=he.useFormToTableComp(le.pinia),k=f.ref(),h=C=>{var y,i,u,g;const $=(i=(y=p.cloneDeep(t.itemData))==null?void 0:y.find(c=>(c==null?void 0:c.key)==="formContent"))==null?void 0:i.contents,x=p.cloneDeep(C.content);let A={};x&&((u=Object.values(x))==null?void 0:u.length)>0&&((g=Object.values(x))==null||g.forEach((c,o)=>{A[$[o].key]=c}));const j={content:A,index:t==null?void 0:t.index,buttonName:C==null?void 0:C.buttonName};l("change",j)},D=C=>{var A,j;if(!C)return;if(((A=Object.values(p.cloneDeep(C)))==null?void 0:A.length)>0){const y=(j=Object.values(p.cloneDeep(C)))==null?void 0:j.map(u=>u);let i="";y==null||y.forEach(u=>{u!==""&&u!==void 0&&(i=i===""?u:i+"/"+u)}),d.setSelectArray(y),d.setSelectString(i)}const $=p.cloneDeep(t.itemData),x=$==null?void 0:$.map(y=>{var i;return(y==null?void 0:y.key)==="formContent"&&((i=y.contents)==null||i.map((u,g)=>{var c,o,m,_,T,S,O,F,v,N,B,P,E,b,w,U,R,G,q;return u.type=u!=null&&u.type?u.type:(_=(m=(o=(c=u==null?void 0:u.key)==null?void 0:c.split("$"))==null?void 0:o[1])==null?void 0:m.split("("))!=null&&_[0]?(T=ae==null?void 0:ae.find(M=>{var Q,W,V,K;return(M==null?void 0:M.key)===((K=(V=(W=(Q=u==null?void 0:u.key)==null?void 0:Q.split("$"))==null?void 0:W[1])==null?void 0:V.split("("))==null?void 0:K[0])}))==null?void 0:T.value:"Input",u.options=u!=null&&u.options?u.options:((F=(O=(S=u==null?void 0:u.key)==null?void 0:S.split("$"))==null?void 0:O[1])==null?void 0:F.length)>0?(P=(B=H.formGetOptions((N=(v=u==null?void 0:u.key)==null?void 0:v.split("$"))==null?void 0:N[1]))==null?void 0:B.split(","))==null?void 0:P.map(M=>({label:M,value:M})):[],(E=u==null?void 0:u.key)!=null&&E.includes("$")&&(u.key=(w=(b=u==null?void 0:u.key)==null?void 0:b.split("$"))==null?void 0:w[0]),u.value=u!=null&&u.value?u.value:Array.isArray((U=Object.values(C))==null?void 0:U[g])?(G=(R=Object.values(C))==null?void 0:R[g])==null?void 0:G[0]:(q=Object.values(C))==null?void 0:q[g],u})),y});l("contentChange",{contents:x,index:t.index})};return f.watch(()=>t.itemData,()=>{var j,y,i,u,g,c,o,m,_,T;const C=(j=p.cloneDeep(t.itemData))==null?void 0:j.find(S=>(S==null?void 0:S.key)==="formContent"),$=(y=p.cloneDeep(t.itemData))==null?void 0:y.find(S=>(S==null?void 0:S.key)==="formButton"),x=(i=p.cloneDeep(t.itemData))==null?void 0:i.find(S=>(S==null?void 0:S.key)==="formFlex"),A=(u=p.cloneDeep(t.itemData))==null?void 0:u.find(S=>(S==null?void 0:S.key)==="formWrap");if((A==null?void 0:A.contents)==="纵向"?a.value=!1:a.value=!0,k.value=typeof(x==null?void 0:x.contents)!="boolean"?!(!(x!=null&&x.contents)===""||((g=x==null?void 0:x.contents)==null?void 0:g.toUpperCase())==="VERTICAL"):x==null?void 0:x.contents,((c=C==null?void 0:C.contents)==null?void 0:c.length)>0&&Array.isArray(C==null?void 0:C.contents)){const S=[];(o=C==null?void 0:C.contents)==null||o.forEach((v,N)=>{var B,P,E,b,w,U,R,G,q,M;if((v==null?void 0:v.label)!==""){let Q=(v==null?void 0:v.key)??"",W=(v==null?void 0:v.type)??"",V=(v==null?void 0:v.options)??[];if((B=v==null?void 0:v.key)!=null&&B.includes("$")&&(Q=(P=p.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:P[0],((b=(E=p.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:E[1])==null?void 0:b.length)>0)){const[K,Z]=(U=(w=p.cloneDeep(v==null?void 0:v.key).split("$"))==null?void 0:w[1])==null?void 0:U.split(/[()]/);W=((R=ae.find(z=>(z==null?void 0:z.key)===K))==null?void 0:R.value)??"",((G=Z==null?void 0:Z.split(","))==null?void 0:G.length)>0&&(V=(q=Z==null?void 0:Z.split(","))==null?void 0:q.map(z=>({label:z,value:z})))}S.push({label:Q??"",name:"t"+N,type:W===""?"Input":W,value:v!=null&&v.value?v.value:(V==null?void 0:V.length)>0?(M=V==null?void 0:V[0])==null?void 0:M.value:(v==null?void 0:v.value)??"",id:(v==null?void 0:v.id)??N,contents:V??[],width:(v==null?void 0:v.width)??1})}});const O=(m=p.cloneDeep(S))==null?void 0:m.map(v=>v.value);let F="";O==null||O.forEach(v=>{v!==""&&v!==void 0&&(F=F===""?v:F+"/"+v)}),d.setSelectArray(O),d.setSelectString(F),r.value=S}else r.value=[];if(((_=$==null?void 0:$.contents)==null?void 0:_.length)>0){const S=[];(T=$==null?void 0:$.contents)==null||T.forEach((O,F)=>{(O==null?void 0:O.label)!==""&&S.push({label:(O==null?void 0:O.label)??"",id:(O==null?void 0:O.id)??F,type:(O==null?void 0:O.type)??"",background:O==null?void 0:O.background})}),s.value=S}else s.value=[]},{deep:!0,immediate:!0}),(C,$)=>(f.openBlock(),f.createElementBlock("div",vl,[f.createVNode(H.ssForm,{rowContents:r.value,buttonValue:s.value,isRowFlex:k.value,isEnableWrap:!1,onOnButtonClick:h,onChange:D,isButtonRow:a.value},null,8,["rowContents","buttonValue","isRowFlex","isButtonRow"])]))}},Bl=ne._export_sfc(Sl,[["__scopeId","data-v-1b0ef247"]]),Pl={class:"table-operate-content"},jl={class:"table-operate-item"},Fl={class:"operate-title"},wl={class:"operate-content"},Ul={class:"operate-title"},Jl={class:"operate-content"},Ll={class:"operate-title"},Rl={class:"operate-content"},Vl={class:"operate-content"},Gl={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:n}){const t=e,l=n,r=f.ref([]),a=f.ref([]),s=f.ref([]),d=f.ref([{label:"按钮名称",prop:"label",type:"edit"},{label:"按钮类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),k=f.ref([{label:"标签名称",prop:"label",type:"edit"},{label:"标签类型",prop:"type",type:"edit"},{label:"按钮文字颜色",prop:"textColor",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),h=f.ref([]),D=f.ref(0),C=f.ref([{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}]),$=[{label:"标签名",prop:"label",type:"edit"},{label:"属性名",prop:"prop",type:"edit"},{label:"宽度",prop:"width",type:"edit",columnType:"Number"},{label:"是否固定列",prop:"fixed",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"right",value:"右"}]},{label:"是否支持排序",prop:"sortable",type:"edit",columnType:"Switch"},{label:"文本所在位置",prop:"align",type:"edit",columnType:"Radio",contents:[{label:"left",value:"左"},{label:"center",value:"中"},{label:"right",value:"右"}]},{label:"溢出悬浮文字",prop:"showOverflowTooltip",type:"edit",columnType:"Switch"},{label:"是否不可拖动",prop:"isNotDrag",type:"edit",columnType:"Switch"},{label:"是否可编辑列名",prop:"isEditCol",type:"edit",columnType:"Switch"},{label:"是否出现在附属界面",prop:"isOperate",type:"edit",columnType:"Switch"},{label:"操作",prop:"operate",type:"operate",sortable:!1}],x=c=>{let o=p.cloneDeep(r.value);const m=o==null?void 0:o.find(_=>_.key==="page");(m==null?void 0:m.contents)!==void 0?o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="page"&&(_.contents=c==null?void 0:c.isPagination),_)):o.push({key:"page",contents:c==null?void 0:c.isPagination}),r.value=o};f.watch(()=>t.originalItemContents,()=>{var c,o,m,_,T,S,O,F,v,N,B,P,E;!t.originalItemContents||t.originalItemContents.length===0||(r.value=p.cloneDeep(t.originalItemContents),a.value=(o=(c=r.value)==null?void 0:c.find(b=>(b==null?void 0:b.key)==="header"))==null?void 0:o.contents,s.value=(_=(m=r.value)==null?void 0:m.find(b=>(b==null?void 0:b.key)==="rowButton"))==null?void 0:_.contents,d.value=(S=(T=r.value)==null?void 0:T.find(b=>(b==null?void 0:b.key)==="extraButton"))==null?void 0:S.contents,C.value=(F=(O=r.value)==null?void 0:O.find(b=>(b==null?void 0:b.key)==="page"))!=null&&F.contents?[{name:"isPagination",label:"是否显示分页",type:"Switch",value:(N=(v=r.value)==null?void 0:v.find(b=>(b==null?void 0:b.key)==="page"))==null?void 0:N.contents}]:[{name:"isPagination",label:"是否显示分页",type:"Switch",value:!0}],a.value=(B=a.value)==null?void 0:B.map((b,w)=>b={label:(b==null?void 0:b.label)??"",prop:(b==null?void 0:b.label)==="操作"?"operate":b==null?void 0:b.prop,width:b!=null&&b.width?parseInt(b.width):"",fixed:(b==null?void 0:b.fixed)??void 0,sortable:(b==null?void 0:b.sortable)??!1,align:(b==null?void 0:b.align)??"center",showOverflowTooltip:(b==null?void 0:b.showOverflowTooltip)??!0,isNotDrag:(b==null?void 0:b.isNotDrag)??!1,isEditCol:(b==null?void 0:b.isEditCol)??!1,isOperate:(b==null?void 0:b.isOperate)??!1,id:(b==null?void 0:b.id)??w}),s.value=(P=s.value)==null?void 0:P.map((b,w)=>b={label:(b==null?void 0:b.label)??"",type:(b==null?void 0:b.type)??"",textColor:(b==null?void 0:b.textColor)??"#000000",id:(b==null?void 0:b.id)??w}),d.value=(E=d.value)==null?void 0:E.map((b,w)=>b={label:(b==null?void 0:b.label)??"",type:(b==null?void 0:b.type)??"",background:(b==null?void 0:b.textColor)??"#FFFFFF",id:(b==null?void 0:b.id)??w}))},{deep:!0,immediate:!0}),f.watch(()=>C.value,()=>{var m;let c=p.cloneDeep(r.value);const o=c==null?void 0:c.find(_=>_.key==="page");o!=null&&o.contents?c=c==null?void 0:c.map(_=>{var T;return(_==null?void 0:_.key)==="page"&&(_.contents=(T=C.value)==null?void 0:T[0].value),_}):c.push({key:"page",contents:(m=C.value)==null?void 0:m[0].value}),r.value=c},{immediate:!0,deep:!0});const A=()=>{const c=p.cloneDeep(a.value);let o=p.cloneDeep(r.value);c.push({label:"",prop:"",width:"",fixed:void 0,sortable:!1,align:"center",showOverflowTooltip:!0,isNotDrag:!1,isEditCol:!1,isOperate:!1,id:D.value}),a.value=c,D.value++;const m=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="header");m!=null&&m.contents?(m.contents=c,o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="header"&&(_.contents=c),_))):o.push({key:"header",contents:c}),r.value=o},j=()=>{const c=p.cloneDeep(s.value);let o=p.cloneDeep(r.value);c.push({label:"",type:"",textColor:"#000000",id:D.value}),s.value=c,D.value++;const m=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="rowButton");m!=null&&m.contents?(m.contents=c,o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="rowButton"&&(_.contents=c),_))):o.push({key:"rowButton",contents:c}),r.value=o},y=()=>{const c=p.cloneDeep(h.value);let o=p.cloneDeep(r.value);c.push({label:"",type:"",background:"#FFFFFF",id:D.value}),h.value=c,D.value++;const m=o==null?void 0:o.find(_=>(_==null?void 0:_.key)==="extraButton");m!=null&&m.contents?(m.contents=c,o=o==null?void 0:o.map(_=>((_==null?void 0:_.key)==="extraButton"&&(_.contents=c),_))):o.push({key:"extraButton",contents:c}),r.value=o},i=c=>{const o=p.cloneDeep(s.value);let m=p.cloneDeep(r.value);s.value=o.filter(T=>T.id!==c.id);const _=m==null?void 0:m.find(T=>T.key==="rowButton");_!=null&&_.contents&&(m=m==null?void 0:m.map(T=>((T==null?void 0:T.key)==="rowButton"&&(T.contents=o.filter(S=>S.id!==c.id)),T))),r.value=m},u=c=>{const o=p.cloneDeep(h.value);let m=p.cloneDeep(r.value);h.value=o.filter(T=>T.id!==c.id);const _=m==null?void 0:m.find(T=>T.key==="extraButton");_!=null&&_.contents&&(m=m==null?void 0:m.map(T=>((T==null?void 0:T.key)==="extraButton"&&(T.contents=o.filter(S=>S.id!==c.id)),T))),r.value=m},g=c=>{const o=p.cloneDeep(a.value);let m=p.cloneDeep(r.value);a.value=o.filter(T=>T.id!==c.id);const _=m==null?void 0:m.find(T=>T.key==="header");_!=null&&_.contents&&(m=m==null?void 0:m.map(T=>((T==null?void 0:T.key)==="header"&&(T.contents=o.filter(S=>S.id!==c.id)),T))),r.value=m};return f.watch(()=>[r.value,a.value],()=>{let c=p.cloneDeep(r.value);const o=c==null?void 0:c.find(m=>(m==null?void 0:m.key)==="header");o!=null&&o.contents?(o.contents=a.value,c=c==null?void 0:c.map(m=>((m==null?void 0:m.key)==="header"&&(m.contents=a.value),m))):c.push({key:"header",contents:a.value}),l("change",c)},{deep:!0,immediate:!0}),(c,o)=>{const m=f.resolveComponent("el-button");return f.openBlock(),f.createElementBlock("div",Pl,[f.createElementVNode("div",jl,[f.createElementVNode("div",Fl,[o[1]||(o[1]=f.createElementVNode("div",null,f.toDisplayString("表头"),-1)),f.createVNode(m,{class:"blue-operate-button",icon:"ele-Plus",onClick:A},{default:f.withCtx(()=>o[0]||(o[0]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[0]})]),f.createElementVNode("div",wl,[f.createVNode(H.ssTable,{columns:$,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:a.value,onDeleteRow:g},null,8,["tableData"])]),f.createElementVNode("div",Ul,[o[3]||(o[3]=f.createElementVNode("div",null,f.toDisplayString("行内按钮"),-1)),f.createVNode(m,{class:"blue-operate-button",icon:"ele-Plus",onClick:j},{default:f.withCtx(()=>o[2]||(o[2]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[2]})]),f.createElementVNode("div",Jl,[f.createVNode(H.ssTable,{columns:k.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:s.value,onDeleteRow:i},null,8,["columns","tableData"])]),f.createElementVNode("div",Ll,[o[5]||(o[5]=f.createElementVNode("div",null,f.toDisplayString("表格外部按钮"),-1)),f.createVNode(m,{class:"blue-operate-button",icon:"ele-Plus",onClick:y},{default:f.withCtx(()=>o[4]||(o[4]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[4]})]),f.createElementVNode("div",Rl,[f.createVNode(H.ssTable,{columns:d.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:h.value,onDeleteRow:u},null,8,["columns","tableData"])]),o[6]||(o[6]=f.createElementVNode("div",{class:"operate-title"},[f.createElementVNode("div",null,f.toDisplayString("分页"))],-1)),f.createElementVNode("div",Vl,[f.createVNode(H.ssForm,{rowContents:C.value,onChange:x},null,8,["rowContents"])])])])}}},Ml=ne._export_sfc(Gl,[["__scopeId","data-v-877911eb"]]),ql={class:"form-operate-content"},Il={class:"form-operate-item"},Hl={class:"operate-title"},Wl={class:"operate-content"},Kl={class:"operate-title"},Zl={class:"operate-content"},zl={class:"operate-content"},Ql={__name:"operate",props:{itemContents:{type:Array,default:()=>[]},originalItemContents:{type:Array,default:()=>[]}},emits:["change"],setup(e,{emit:n}){const t=e,l=n,r=f.ref([{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}]),a=f.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"字段值",prop:"key",type:"edit"},{label:"字段选项值",prop:"options",type:"edit"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),s=f.ref([{label:"字段名称",prop:"label",type:"edit"},{label:"字段类型",prop:"type",type:"edit"},{label:"按钮背景颜色",prop:"background",type:"edit",columnType:"Color"},{label:"操作",prop:"operate",type:"operate",sortable:!1}]),d=f.ref([]),k=f.ref([]),h=f.ref([]),D=f.ref(0);f.watch(()=>t.originalItemContents,()=>{var y,i,u,g,c,o,m,_,T,S;!t.originalItemContents||t.originalItemContents.length===0||(k.value=p.cloneDeep(t.originalItemContents),h.value=(i=(y=k.value)==null?void 0:y.find(O=>(O==null?void 0:O.key)==="formContent"))==null?void 0:i.contents,d.value=(g=(u=k.value)==null?void 0:u.find(O=>(O==null?void 0:O.key)==="formButton"))==null?void 0:g.contents,h.value=(c=h.value)==null?void 0:c.map((O,F)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",key:(O==null?void 0:O.key)??"",options:(O==null?void 0:O.options)??"",id:(O==null?void 0:O.id)??F}),d.value=(o=d.value)==null?void 0:o.map((O,F)=>O={label:(O==null?void 0:O.label)??"",type:(O==null?void 0:O.type)??"",background:(O==null?void 0:O.background)??"#000000",id:(O==null?void 0:O.id)??F}),r.value=(_=(m=k.value)==null?void 0:m.find(O=>(O==null?void 0:O.key)==="formFlex"))!=null&&_.contents?[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:(S=(T=k.value)==null?void 0:T.find(O=>(O==null?void 0:O.key)==="formFlex"))==null?void 0:S.contents}]:[{name:"isRowFlex",label:"是否横向布局",type:"Switch",value:!0}])},{deep:!0,immediate:!0});const C=()=>{const y=p.cloneDeep(d.value);let i=p.cloneDeep(k.value);y.push({label:"",type:"",background:"#000000",id:D.value}),d.value=y,D.value++;const u=i==null?void 0:i.find(g=>(g==null?void 0:g.key)==="formButton");u!=null&&u.contents?(u.contents=y,i=i==null?void 0:i.map(g=>((g==null?void 0:g.key)==="formButton"&&(g.contents=y),g))):i.push({key:"formButton",contents:y}),k.value=i},$=()=>{const y=p.cloneDeep(h.value);let i=p.cloneDeep(k.value);y.push({label:"",type:"",key:"",options:"",id:D.value}),h.value=y,D.value++;const u=i==null?void 0:i.find(g=>(g==null?void 0:g.key)==="formContent");u!=null&&u.contents?(u.contents=y,i=i==null?void 0:i.map(g=>((g==null?void 0:g.key)==="formContent"&&(g.contents=y),g))):i.push({key:"formContent",contents:y}),k.value=i},x=y=>{const i=p.cloneDeep(d.value);let u=p.cloneDeep(k.value);d.value=i.filter(c=>c.id!==y.id);const g=u==null?void 0:u.find(c=>c.key==="formButton");g!=null&&g.contents&&(u=u==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formButton"&&(c.contents=i.filter(o=>o.id!==y.id)),c))),k.value=u},A=y=>{const i=p.cloneDeep(h.value);let u=p.cloneDeep(k.value);h.value=i.filter(c=>c.id!==y.id);const g=u==null?void 0:u.find(c=>c.key==="formContent");g!=null&&g.contents&&(u=u==null?void 0:u.map(c=>((c==null?void 0:c.key)==="formContent"&&(c.contents=i.filter(o=>o.id!==y.id)),c))),k.value=u},j=y=>{let i=p.cloneDeep(k.value);const u=i==null?void 0:i.find(g=>g.key==="formFlex");(u==null?void 0:u.contents)!==void 0?i=i==null?void 0:i.map(g=>((g==null?void 0:g.key)==="formFlex"&&(g.contents=y==null?void 0:y.isRowFlex),g)):i.push({key:"formFlex",contents:y==null?void 0:y.isRowFlex}),k.value=i};return f.watch(()=>[k.value,h.value],()=>{let y=p.cloneDeep(k.value);const i=y==null?void 0:y.find(u=>(u==null?void 0:u.key)==="formContent");i!=null&&i.contents?(i.contents=h.value,y=y==null?void 0:y.map(u=>((u==null?void 0:u.key)==="formContent"&&(u.contents=h.value),u))):y.push({key:"formContent",contents:h.value}),l("change",y)},{deep:!0,immediate:!0}),(y,i)=>{const u=f.resolveComponent("el-button");return f.openBlock(),f.createElementBlock("div",ql,[f.createElementVNode("div",Il,[f.createElementVNode("div",Hl,[i[1]||(i[1]=f.createElementVNode("div",null,f.toDisplayString("表单信息"),-1)),f.createVNode(u,{class:"blue-operate-button",icon:"ele-Plus",onClick:$},{default:f.withCtx(()=>i[0]||(i[0]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[0]})]),f.createElementVNode("div",Wl,[f.createVNode(H.ssTable,{columns:a.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:h.value,onDeleteRow:A},null,8,["columns","tableData"])]),f.createElementVNode("div",Kl,[i[3]||(i[3]=f.createElementVNode("div",null,f.toDisplayString("表单按钮"),-1)),f.createVNode(u,{class:"blue-operate-button",icon:"ele-Plus",onClick:C},{default:f.withCtx(()=>i[2]||(i[2]=[f.createTextVNode(f.toDisplayString("新建"))])),_:1,__:[2]})]),f.createElementVNode("div",Zl,[f.createVNode(H.ssTable,{columns:s.value,isShowPagination:!1,isShowEdit:!1,isMoveColumn:!1,tableData:d.value,onDeleteRow:x},null,8,["columns","tableData"])]),i[4]||(i[4]=f.createElementVNode("div",{class:"operate-title"},[f.createElementVNode("div",null,f.toDisplayString("表单布局"))],-1)),f.createElementVNode("div",zl,[f.createVNode(H.ssForm,{rowContents:r.value,onChange:j},null,8,["rowContents"])])])])}}},Xl=ne._export_sfc(Ql,[["__scopeId","data-v-a36b8468"]]),Yl={class:"extra-content"},en={key:0},ln={key:1},nn={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},emits:["change"],setup(e,{emit:n}){const t=e,l=f.ref(0),r=f.ref(),a=f.ref(),s=n,d=f.ref(!1),k=f.ref({}),h=f.ref({}),D=f.ref();f.watch(()=>[t.itemData],()=>{var c;const g=p.cloneDeep(t.itemData);r.value=(c=p.cloneDeep(g))==null?void 0:c.map(o=>{var m;if(o.key==="extra"){let _=[];(m=o.value)==null||m.forEach(T=>{var S;_.push((S=Object.values(T))==null?void 0:S[0])}),o.value=_}return o})},{deep:!0,immediate:!0});const C=(g,c,o,m)=>{var T;let _={};((T=g==null?void 0:g[0])==null?void 0:T.contents)==="详情"&&(d.value=!0,_[c]=g,a.value=g==null?void 0:g.filter(S=>(S==null?void 0:S.key)!=="tableContentName"),k.value=_,h.value=o,D.value=m.id)},$=g=>{var S,O,F,v;const c=(O=(S=Object.values(p.cloneDeep(k.value)))==null?void 0:S[0])==null?void 0:O.filter(N=>(N==null?void 0:N.key)==="tableContentName"),o=(v=(F=Object.values(p.cloneDeep(k.value)))==null?void 0:F[0])==null?void 0:v.filter(N=>(N==null?void 0:N.key)!=="tableContentName"),m=o==null?void 0:o.map((N,B)=>{var P;return B===g.index&&(N==null?void 0:N.comp)==="Table"&&(N.compData=(P=N.compData)==null?void 0:P.map(E=>{var b,w;return(E==null?void 0:E.key)==="tableContents"&&(E.contents=(w=(b=g.content)==null?void 0:b.map(U=>{let R={};for(let G in U)G!=="id"&&(R[G]=U[G]);return R}))==null?void 0:w.map(U=>Object.values(U))),E})),N});m.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(k.value),T={};for(let N in _)T[N]=m;k.value=T},x=()=>{d.value=!1,k.value={},h.value={},D.value=void 0,l.value++},A=g=>{var S,O,F,v;const c=(O=(S=Object.values(p.cloneDeep(k.value)))==null?void 0:S[0])==null?void 0:O.filter(N=>(N==null?void 0:N.key)==="tableContentName"),o=(v=(F=Object.values(p.cloneDeep(k.value)))==null?void 0:F[0])==null?void 0:v.filter(N=>(N==null?void 0:N.key)!=="tableContentName"),m=o==null?void 0:o.map((N,B)=>(B===g.index&&(N.compData=g.contents),N));m.unshift(c==null?void 0:c[0]);let _=p.cloneDeep(k.value),T={};for(let N in _)T[N]=m;k.value=T},j=()=>{var c,o;let g={};for(let m in h.value)m===((c=Object.keys(k.value))==null?void 0:c[0])?g[m]=(o=Object.values(k.value))==null?void 0:o[0]:g[m]=h.value[m];s("change",{buttonName:"编辑",index:D.value,singleContent:g},"methodData"),d.value=!1,k.value={},h.value={},D.value=void 0},y=()=>{d.value=!1,k.value={},h.value={},D.value=void 0},i=g=>{s("change",g,"methodData")},u=g=>je(g);return(g,c)=>(f.openBlock(),f.createElementBlock(f.Fragment,null,[f.createElementVNode("div",Yl,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(r.value,(o,m)=>(f.openBlock(),f.createElementBlock("div",{key:l.value},[(o==null?void 0:o.key)==="extra"?(f.openBlock(),f.createElementBlock("div",en)):(f.openBlock(),f.createElementBlock("div",ln,[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(u(o.comp)),{itemData:o==null?void 0:o.compData,childItemData:o==null?void 0:o.itemChildData,key:m,index:(o==null?void 0:o.id)??m,onContentClick:C,onChange:i},null,40,["itemData","childItemData","index"]))]))]))),128))]),f.createVNode(H.ssDialog,{visible:d.value,onBeforeDestroy:y},{default:f.withCtx(()=>[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.value,(o,m)=>(f.openBlock(),f.createElementBlock("div",{key:m,class:"extra-dialog"},[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(u(o.comp)),{itemData:o==null?void 0:o.compData,onChange:$,childItemData:o==null?void 0:o.itemChildData,key:m,onContentChange:A,index:(o==null?void 0:o.id)??m,class:"extra-component"},null,40,["itemData","childItemData","index"]))]))),128))]),footer:f.withCtx(()=>[f.createElementVNode("div",{class:"dialog-footer"},[f.createElementVNode("div",{class:"cancel-button footer-button",onClick:x},f.toDisplayString("取消")),f.createElementVNode("div",{class:"confirm-button footer-button",onClick:j},f.toDisplayString("确认"))])]),_:1},8,["visible"])],64))}},tn=ne._export_sfc(nn,[["__scopeId","data-v-e3e0f29d"]]),an={class:"method-content"},rn=["onClick"],on={__name:"index",props:{itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,changedContent:{type:Object,default:()=>{}}},setup(e){const n=f.ref([]),t=e,l=(a,s)=>{var k;const d=(k=s==null?void 0:s[0])==null?void 0:k.children;return a==null?void 0:a.map(h=>{var D;return h=(D=h==null?void 0:h.map((C,$)=>{var x;return{key:(x=d[$])==null?void 0:x.label,value:C}}))==null?void 0:D.filter(C=>C.key),h})},r=a=>{var d,k;let s={};if((d=p.cloneDeep(a.content))==null||d.forEach((h,D)=>{var C,$,x,A,j,y,i,u,g,c,o,m,_,T,S,O,F;if((h==null?void 0:h.comp)==="Table"){let v=(A=(x=($=(C=h==null?void 0:h.compData)==null?void 0:C.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:$.contents)==null?void 0:x[0])==null?void 0:A.some(E=>E==null?void 0:E.children),N=(i=(y=(j=h==null?void 0:h.compData)==null?void 0:j.find(E=>(E==null?void 0:E.key)==="tableContents"))==null?void 0:y.contents)==null?void 0:i.map(E=>E.slice(1)),B=(m=(o=(c=(g=(u=h==null?void 0:h.compData)==null?void 0:u.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:g.contents)==null?void 0:c[0])==null?void 0:o[0])==null?void 0:m.label,P=(S=(T=(_=h==null?void 0:h.compData)==null?void 0:_.find(E=>(E==null?void 0:E.key)==="header"))==null?void 0:T.contents)==null?void 0:S[0];if(v)s[B]=l(N,P);else{const E=[];P=P.slice(1,P.length-1),P==null||P.forEach((b,w)=>{N==null||N.forEach(U=>{E.push({key:b.label+U[0],value:U[w+1]})})}),s["form"+D]=E}}else{const v=(F=(O=h.compData)==null?void 0:O.find(B=>(B==null?void 0:B.key)==="formContent"))==null?void 0:F.contents;s.form={};const N=[];v==null||v.forEach(B=>{B.key!==""&&(B={key:B==null?void 0:B.key,value:B==null?void 0:B.value},N.push(B))}),s.form=N}}),a.api){const h=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),D=URL.createObjectURL(h),C=document.createElement("a");C.href=D,C.download="data.json",C.click(),URL.revokeObjectURL(D),ze.axios.post(a.api,{content:s,templateFile:(k=a==null?void 0:a.extraContent)==null?void 0:k[0]})}};return f.watch(()=>t.itemData,async()=>{const a=p.cloneDeep(t.itemData),s=a==null?void 0:a.map(async k=>{var A,j,y,i,u,g;const D=(A=(await le.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),parentTable:"",type:"method",methodName:k.method}})).data.result)==null?void 0:A[0],C=await le.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),type:"methodData",tableId:D.id}}),$=await he.getItemData((j=k==null?void 0:k.value)==null?void 0:j[0],sessionStorage.getItem("systemKey"),""),x=(y=C.data.result)==null?void 0:y[0];return{buttonName:(i=D==null?void 0:D.key)==null?void 0:i.methodKey,api:(g=(u=x==null?void 0:x.value)==null?void 0:u.tableData)==null?void 0:g[0],content:$==null?void 0:$.filter(c=>c.comp!=="methodButton"),extraContent:p.cloneDeep(k.value).slice(1)}}),d=await Promise.all(s);n.value=d},{immediate:!0,deep:!0}),(a,s)=>(f.openBlock(),f.createElementBlock("div",an,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(n.value,d=>(f.openBlock(),f.createElementBlock("div",null,[d.api!==""?(f.openBlock(),f.createElementBlock("div",{key:0,onClick:k=>r(d),class:"method-buttons"},f.toDisplayString(d.buttonName),9,rn)):f.createCommentVNode("",!0)]))),256))]))}},sn=ne._export_sfc(on,[["__scopeId","data-v-0e8b4df7"]]),cn=f.ref([{name:"表格",type:"table",comp:"Table",icon:"Grid"},{name:"表单",type:"form",comp:"Form",icon:"Film"},{name:"折叠",type:"fold",comp:"Fold",icon:"Fold"},{name:"头像",type:"avatar",comp:"Avatar",icon:"Avatar"}]),pn={TABLE:he.ssTable,FORM:Bl,TableOperate:Ml,FormOperate:Xl,FOLD:Ze._sfc_main,CALCULATOR:tn,METHODBUTTON:sn,AVATARUPLOAD:Qe._sfc_main};function je(e){return pn[e==null?void 0:e.toUpperCase()]||null}const L=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"},{key:"MenuName",value:"Menu"},{key:"GroupName",value:"Group"},{key:"SystemKey",value:"System"}],J=[{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"}],Y=f.ref(0),un=e=>{const[n,t]=e.split(/=(.+)/),l=n.replace(/['"]/g,"").trim(),r=t.replace(/^['"]|['"]$/g,"");return{key:l,value:r}},se=e=>{try{return JSON.parse(e),!0}catch{return!1}},fn=e=>e.includes("$")&&e.trim().endsWith("(")?e+")":e,dn=e=>{let n=e;const t=[];let l="";for(const r of n)r.includes("{")||l.includes("{")||r.includes("[")||l.includes("[")||r.includes("【")||l.includes("【")||r.includes("(")||l.includes("(")||r.includes("(")||l.includes("(")||r.includes("/*")||l.includes("/*")?(l+=r.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&&(t.push(l),l="")):t.push(r.trim());return t==null?void 0:t.filter(r=>r.includes("{"))},yn=e=>{var t;let n=[];return(t=dn(e.slice(1,-1)))==null||t.forEach(l=>{var a,s,d,k;let r=((s=(a=l.slice(1,-1))==null?void 0:a.split(","))==null?void 0:s.length)??1;(k=(d=l.slice(1,-1))==null?void 0:d.split(","))==null||k.forEach(h=>{var x,A,j,y,i,u,g,c,o,m,_,T,S;let D=h==null?void 0:h.split(":"),C=D!=null&&D[0]?(D==null?void 0:D[1].split("$").length)-1===1?((x=D==null?void 0:D[0])==null?void 0:x.replace(/^"(.*)"$/,"$1"))+((A=D==null?void 0:D[1])==null?void 0:A.replace(/^"(.*)"$/,"$1")):Array.isArray((y=(j=D==null?void 0:D[1])==null?void 0:j.replace(/^"(.*)"$/,"$1"))==null?void 0:y.split("("))&&((g=(u=(i=D==null?void 0:D[1])==null?void 0:i.replace(/^"(.*)"$/,"$1"))==null?void 0:u.split("("))==null?void 0:g.length)>1?((c=D==null?void 0:D[0])==null?void 0:c.replace(/^"(.*)"$/,"$1"))+((_=(m=(o=D==null?void 0:D[1])==null?void 0:o.replace(/^"(.*)"$/,"$1"))==null?void 0:m.split("("))==null?void 0:_[0])+"()":(T=D==null?void 0:D[0])==null?void 0:T.replace(/^"(.*)"$/,"$1"):"",$=(D==null?void 0:D[1].split("$").length)-1===0?(S=D==null?void 0:D[1])==null?void 0:S.replace(/^"(.*)"$/,"$1"):"";Y.value++,n.push({id:Y.value,key:C,value:$,width:r,extraContent:D==null?void 0:D[1]})})}),n},Fe=e=>{var n,t;try{const l=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(p.cloneDeep(l).split("{").length-1>1){let r=p.cloneDeep(l).replace(/^\{(.*)\}$/,"[$1]");if(se(r)&&!r.includes("$")||(r=r.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),se(r)){const a=JSON.parse(r);let s=[];return a==null||a.forEach(d=>{var k;(k=Object.entries(p.cloneDeep(d)))==null||k.forEach(h=>{Y.value++,s.push({id:Y.value,key:(h==null?void 0:h[0])??"",value:(h==null?void 0:h[1])===""?"":h==null?void 0:h[1],width:Object.keys(p.cloneDeep(d)).length})})}),s}else return l.trim().startsWith("{{")?yn(l.trim()):ie(r)}else if(se(l)){const r=JSON.parse(l);return Object.entries(r).map(([a,s])=>(Y.value++,{id:Y.value,key:a,value:s===""?"":s,width:1}))}else return((n=ie(l))==null?void 0:n.length)===0?l:(t=ie(l))==null?void 0:t.map(r=>({label:r.label,method:fn(r.method)}))}catch(l){return console.error("转换失败:",l),[]}},ie=e=>{e=e.trim().replace(/^\{|\}$/g,"").trim();const n=[];let t=0;for(;t<e.length;){const l=e.slice(t).match(/^\s*"([^"]+)"\s*:\s*/);if(!l)break;const r=l[1];t+=l[0].length;let a="",s=0,d=!1,k="";for(let h=t;h<e.length;h++){const D=e[h];if((D==='"'||D==="'")&&!d?(d=!0,k=D):D===k&&d&&(d=!1,k=""),!d&&((D==="{"||D==="("||D==="[")&&s++,(D==="}"||D===")"||D==="]")&&s--,D===","&&s===0||h===e.length-1)){a=e.slice(t,h+1).trim(),t=h+1;break}}n.push({label:r,method:a})}return n},hn=(e,n)=>{try{if(L!=null&&L.find(t=>(t==null?void 0:t.key)===n))return e.replace(/['"]/g,"").trim();if(p.cloneDeep(e).split("[").length-1>1){const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(t)}else{const t=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(se(t)){const l=JSON.parse(t);return Array.isArray(l)?l.map(r=>({label:r})):l}else return Fe(p.cloneDeep(e))}}catch(t){return console.error("解析失败:",t),e}},mn=e=>({[e==null?void 0:e.key]:hn(e==null?void 0:e.value,e==null?void 0:e.key)}),gn=e=>{try{if(p.cloneDeep(e).split("[").length-1>1){const n=p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(n)}else return JSON.parse(p.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(t=>({label:t}))}catch(n){return console.error("解析失败:",n),e}},bn=e=>{const n=e.match(/\(([^)]+)\)/);return n?n[1]:""},kn=e=>{const n=e.match(/^([^(]+)\s*\(/);return n?n[1].trim():e},Oe=e=>e.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(n=>n.trim()).filter(n=>n).join("/"),Dn=e=>{var s,d;let n=[],t=[];const l=(s=p.cloneDeep(e))==null?void 0:s.map(k=>k==null?void 0:k.key),r=[...new Set((d=p.cloneDeep(l))==null?void 0:d.map(k=>bn(k)))];r==null||r.forEach(k=>{let h=e==null?void 0:e.filter($=>$.key.includes(k));h==null||h.forEach($=>{$!=null&&$.key.includes("Menus")&&(n.push({key:"GroupName",value:Oe($==null?void 0:$.value)}),t.push(Oe($==null?void 0:$.value)))});let D=e==null?void 0:e.filter($=>$.key.includes(k)&&!($!=null&&$.key.includes("Menus")));D=D==null?void 0:D.map($=>($.key=kn($.key),$));const C={key:"GroupContents",value:D};n.push(C)});const a={key:"Menus",value:t};return n.unshift(a),n},we=e=>{var n,t;if(Array.isArray(Object.keys(e))&&((n=Object.keys(e))==null?void 0:n.length)>0){let l=[];return(t=Object.entries(e))==null||t.forEach(([r,a])=>{var d,k;let s=[];if(s.push(r),((d=Object.keys(a))==null?void 0:d.length)>0){let h=[];(k=we(a))==null||k.forEach(D=>{h.push(D)}),h==null||h.forEach(D=>{s.push(D)})}l.push(s)}),l}},Cn=(e,n)=>{var l;let t=n;return Array.isArray(Object.keys(e))&&((l=Object.entries(e))==null||l.forEach(([r,a])=>{let s=[r];if(typeof a=="object"&&a!==null){let d=we(a);d==null||d.forEach(k=>{s.push(k)})}t.push(s)})),t},An=e=>{const n={};return e.forEach(l=>{const r=l.split("/");let a=n;r.forEach(s=>{a[s]||(a[s]={}),a=a[s]})}),Cn(n,[])},Ue=e=>An(e),$n=e=>{var n,t,l,r,a,s,d,k;try{const h=be((t=(n=p.cloneDeep(e))==null?void 0:n.replace("(","("))==null?void 0:t.replace(")",")")),D=(r=(l=p.cloneDeep(h))==null?void 0:l.filter(A=>!A.includes("/*")))==null?void 0:r.map(A=>un(A)),C=Dn(D),$=[];if(((a=C==null?void 0:C.find(A=>(A==null?void 0:A.key)==="Menus"))==null?void 0:a.value.length)===0)return!1;(s=p.cloneDeep(C))==null||s.forEach(A=>{var j,y,i,u,g;L!=null&&L.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())})?$.push({comp:((j=L==null?void 0:L.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())}))==null?void 0:j.value)??"",name:(y=A==null?void 0:A.value)==null?void 0:y.replace(/[’]|[‘]|[']/g,""),compData:[]}):J!=null&&J.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())})&&(($==null?void 0:$.length)===0&&(i=A.key)!=null&&i.includes("Menus")&&$.push({comp:"Menu",name:"",compData:[]}),(u=$==null?void 0:$[($==null?void 0:$.length)-1])!=null&&u.compData&&$[($==null?void 0:$.length)-1].compData.push({key:(g=J==null?void 0:J.find(c=>{var o,m;return((o=c==null?void 0:c.key)==null?void 0:o.toUpperCase())===((m=A==null?void 0:A.key)==null?void 0:m.toUpperCase())}))==null?void 0:g.value,contents:A==null?void 0:A.value}))});let x=(d=p.cloneDeep($))==null?void 0:d.map(A=>{var j;return A!=null&&A.compData&&(A.compData=(j=A==null?void 0:A.compData)==null?void 0:j.map(y=>{var i,u,g,c,o,m,_,T,S,O,F;if((y==null?void 0:y.key)==="formFlex")y.contents=((u=(i=y.contents)==null?void 0:i.replace(/[’]|[‘]|[']/g,""))==null?void 0:u.toUpperCase())!=="Vertical".toUpperCase();else if((y==null?void 0:y.key)==="groupContents")y.contents=(g=p.cloneDeep(y.contents))==null?void 0:g.map(v=>mn(p.cloneDeep(v)));else if(Array.isArray(y==null?void 0:y.contents))y.contents=Ue(y.contents);else if(((o=(c=y==null?void 0:y.contents)==null?void 0:c.trim())!=null&&o.startsWith("[")||(_=(m=y.contents)==null?void 0:m.trim())!=null&&_.startsWith("【"))&&((S=(T=y.contents)==null?void 0:T.trim())!=null&&S.endsWith("]")||(F=(O=y.contents)==null?void 0:O.trim())!=null&&F.endsWith("】")))y.contents=gn(p.cloneDeep(y.contents));else{if(!y.contents)return;y.contents=Fe(p.cloneDeep(y.contents))}return y})),A});return x=(k=p.cloneDeep(x))==null?void 0:k.map(A=>{var j;return(A==null?void 0:A.comp)==="Group"&&(A.compData=(j=A.compData)==null?void 0:j.map(y=>{var u;let i=[];return(u=y.contents)==null||u.forEach(g=>{var c,o,m,_,T,S,O,F,v,N,B,P;if(L!=null&&L.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))i.push({comp:(c=L==null?void 0:L.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))==null?void 0:c.value,name:(m=(o=Object.values(g))==null?void 0:o[0])==null?void 0:m.replace(/[’]|[‘]|[']/g,""),compData:[]});else if(J!=null&&J.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())})){if((i==null?void 0:i.length)===0)return;(_=i==null?void 0:i[(i==null?void 0:i.length)-1])!=null&&_.compData&&i[(i==null?void 0:i.length)-1].compData.push({key:(T=J==null?void 0:J.find(E=>{var b,w,U;return((b=E==null?void 0:E.key)==null?void 0:b.toUpperCase())===((U=(w=Object.keys(g))==null?void 0:w[0])==null?void 0:U.toUpperCase())}))==null?void 0:T.value,contents:(S=Object.values(g))==null?void 0:S[0]})}else if((F=(O=Object.keys(g))==null?void 0:O[0])!=null&&F.includes("$")){const E=(N=(v=Object.keys(p.cloneDeep(g)))==null?void 0:v[0])==null?void 0:N.split("$");i[(i==null?void 0:i.length)-1].compData.push({key:(B=J==null?void 0:J.find(b=>{var w,U;return((w=b==null?void 0:b.key)==null?void 0:w.toUpperCase())===((U=E==null?void 0:E[0])==null?void 0:U.toUpperCase())}))==null?void 0:B.value,contents:(P=Object.values(g))==null?void 0:P[0],selectLabel:E==null?void 0:E[1]})}return g}),y.contents=i,y})),A}),x}catch{return!1}},I=e=>{try{return JSON.parse(e),!0}catch{return!1}},_n=(e,n)=>Nl(e,n),Ee=f.ref(0),Je=e=>{const n=[];let t=null;for(let l=0;l<e.length;l++){const r=e[l];if(Array.isArray(r))t&&(t.children=Je(r));else{const a={label:r};n.push(a),t=a}}return n},Le=e=>{let n=0;for(const t of e)n++,t.children&&(n+=Le(t.children));return n},Re=(e,n,t=[])=>{let l=0;for(const r of n){if(l>=e.length)break;const a=[...e[l]];if(t.push(a),l++,r.children&&r.children.length>0){const s=[];Re(e.slice(l),r.children,s),s.length>0&&(a.push(s),l+=Le(r.children))}}return t},xn=(e,n)=>{let t=[];return e==null||e.forEach(r=>{r.some(a=>Array.isArray(a))?t.push(...r):t.push(r)}),Re(t,n)},ye=e=>{const n={label:e[0].trim()};if(e.length>1){const t=e.slice(1);t.length===1&&Array.isArray(t[0])?n.children=t[0].map(l=>Array.isArray(l)?ye(l):{label:l.trim()}):n.children=t.map(l=>Array.isArray(l)?ye(l):{label:l.trim()})}return n},Te=e=>{let n=e.replace(/:([^{}\[\],\s]+)([,\]}])/g,':"$1"$2');return n=n.replace(/:}(?=,|]|}|$)/g,':""}'),n=n.replace(/:,(?=\s*")/g,':"",'),n=n.replace(/(https?|HTTPS?):"\/\/([^"]+)"/gi,(t,l,r)=>`"${l}://${r}"`),n=n.replace(/(\[|\s|,)((?:https?|HTTPS?):\/\/[^\s,\]]+)(\]|,|$)/gi,'$1"$2"$3'),n},On=e=>{var t;return e.some(l=>!Array.isArray(l))?e:(t=p.cloneDeep(e))==null?void 0:t.map(l=>{let r=[];return l.some(a=>Array.isArray(a))?l==null||l.forEach(a=>{Array.isArray(a)&&r.push(ye(a))}):l.some(a=>a.includes("["))?r.push(l):r=l.map(a=>({label:a.trim()})),r})},Ve=(e,n,t)=>{let l=e,r=t,a=n;return a.children&&(Array.isArray(r[r.length-1])?r[r.length-1].push(l[0]):r.push(l[0]),l.shift(),a=a.children),Array.isArray(a)&&a.forEach(s=>{if(s.children){const d=Ve(l,s,r);r=d[0],l=d[1]}}),[r,l]},En=(e,n)=>{let t=e,l=[];return n.length>0?n==null||n.forEach(r=>{let a=t==null?void 0:t[0];t.shift();const s=Ve(p.cloneDeep(t),r,a);a=s[0],t=s[1],l.push(a)}):l=t,l},ge=(e,n)=>{const t=On(p.cloneDeep(e));return En(t,n)},Tn=e=>{const n=[];let t=0;const l=e.length;for(;t<l;){const r=e[t];r.key==="tableColumns"&&t+1<l&&e[t+1].key==="tableContents"?(n.push({comp:"Table",compData:[r,e[t+1]],name:""}),t+=2):(n.push(r),t+=1)}return n},Ge=e=>ge([e],[]),Nn=e=>{const n=[];return e==null||e.forEach(t=>t==null?void 0:t.forEach(r=>{var a,s;Ee.value++,n.push({id:Ee.value,key:(a=Object.keys(r))==null?void 0:a[0],value:(s=Object.values(r))==null?void 0:s[0],width:t.length})})),n},Ne=e=>{let n=Tn(e);return n=n==null?void 0:n.map(t=>{var l,r,a;if(t.comp==="Table")(l=t.compData)!=null&&l.find(s=>(s==null?void 0:s.key)==="header")||(t.compData=(r=t.compData)==null?void 0:r.map(s=>(s.key==="tableColumns"?s={key:"header",contents:ge(s.value,[])}:s={key:s.key,contents:s.value},s)),t.compData.push({key:"extraButton",contents:[{label:"新增"}]}),t.compData.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}));else if(t.key==="form"){const s=(a=t==null?void 0:t.value)==null?void 0:a.map(d=>(Array.isArray(d)||(d=[d]),d));t={comp:"Form",compData:[{key:"formFlex",contents:""},{key:"formContent",contents:Nn(s)}],name:""}}return t}),n},vn=(e,n)=>{var d,k,h,D,C,$;const t=[],l=Je((k=(d=e==null?void 0:e.find(x=>x.key==="tableIndex"))==null?void 0:d.value)==null?void 0:k[0]);t.push({key:"tableIndexColumn",contents:n}),t.push({key:"tableIndex",contents:l});let r=[];const a=(h=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:h.value;a.length===1&&!(a!=null&&a[0].some(x=>Array.isArray(x)))?r=(D=a==null?void 0:a[0])==null?void 0:D.map(x=>({label:x})):r=ge((C=e==null?void 0:e.find(x=>x.key==="tableColumns"))==null?void 0:C.value,l),t.push({key:"header",contents:r});const s=xn(($=e==null?void 0:e.find(x=>x.key==="tableContents"))==null?void 0:$.value,l);return t.push({key:"tableContents",contents:s}),t.push({key:"extraButton",contents:[{label:"新增"}]}),t.push({key:"rowButton",contents:[{label:"查看"},{label:"编辑"},{label:"删除"}]}),t},Me=e=>e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,(n,t,l)=>{const r=Me(l);return`"${t}",${r}`}),re=e=>{const n=e.replace(/"([^"]+)"\s*==\s*(\[[^\]]+\])/g,'"$1",$2');return Me(n).replace(/^"(.*)"$/,"$1")},Sn=e=>{const n=new Set;return e.filter(t=>{const l=JSON.stringify(t);return n.has(l)?!1:n.add(l)})},ve=e=>{var t;let n=[];return(t=p.cloneDeep(e))==null||t.forEach(l=>{var r;(r=l.contents)==null||r.forEach(a=>{n.push(a)})}),n=Sn(n),n.push({label:"操作"}),[n]},Bn=(e,n)=>e.reduce((t,l,r)=>{const a=Math.floor(r/n);return t[a]||(t[a]=[]),t[a].push(l),t},[]),qe=e=>e.reduce((n,t)=>t.children&&t.children.length>0?n+qe(t.children):n+1,0),Pn=(e,n)=>{var l;let t=[];return(l=Bn(e,qe(n==null?void 0:n[0])-1))==null||l.forEach(r=>{let a=[];r.forEach(s=>{var d;Array.isArray(s.contents)?(d=s.contents)==null||d.forEach(k=>{a.push(k)}):a.push(s.contents)}),t.push(a)}),[t]},jn=["方法体","输入","输出"],Se=f.ref(1),be=e=>{let n;e.replaceAll(" ",`\r
|
|
2
2
|
`).includes(`\r
|
|
3
3
|
`)?n=e.replaceAll(" ",`\r
|
|
4
4
|
`).split(`\r
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { u as hl, g as ml, s as bl } from "./index-
|
|
1
|
+
import { u as hl, g as ml, s as bl } from "./index-Bel0p329.js";
|
|
2
2
|
import { ref as w, watch as ne, createElementBlock as q, openBlock as W, createVNode as z, resolveComponent as Xe, createElementVNode as G, toDisplayString as Z, withCtx as te, createTextVNode as re, Fragment as de, renderList as $e, createBlock as Se, resolveDynamicComponent as Pe, createCommentVNode as gl } from "vue";
|
|
3
|
-
import { p as Oe, g as je } from "./index-
|
|
4
|
-
import { s as xe, f as kl, a as oe, b as Cl } from "./index-
|
|
3
|
+
import { p as Oe, g as je } from "./index-BH36LQch.js";
|
|
4
|
+
import { s as xe, f as kl, a as oe, b as Cl } from "./index-DoHr_nug.js";
|
|
5
5
|
import { _ as ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
|
-
import { U as Be, g as Ue, a as Fe, i as we, S as be, b as Al, c as p } from "./cloneDeep-
|
|
6
|
+
import { U as Be, g as Ue, a as Fe, i as we, S as be, b as Al, c as p } from "./cloneDeep-Cm2ut66T.js";
|
|
7
7
|
import { _ as $l } from "./index.vue_vue_type_script_setup_true_lang-DQ2k4Z7D.js";
|
|
8
|
-
import { a as _l } from "./request-
|
|
9
|
-
import { _ as Ol } from "./index.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { M as xl, S as Je, e as Tl, i as Re, b as Le } from "./index-
|
|
8
|
+
import { a as _l } from "./request-RC5ET7Nr.js";
|
|
9
|
+
import { _ as Ol } from "./index.vue_vue_type_script_setup_true_lang-CuQ3xcyC.js";
|
|
10
|
+
import { M as xl, S as Je, e as Tl, i as Re, b as Le } from "./index-D_JFO4Ed.js";
|
|
11
11
|
import { s as Ye, u as vl } from "./menu-XcYMZJLY.js";
|
|
12
12
|
import { u as Dl } from "./modelComp-CP-waker.js";
|
|
13
13
|
var El = "__lodash_hash_undefined__";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./index-
|
|
1
|
+
"use strict";const n=require("./index-BUkyNn3m.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 { a4 as A, a5 as l, d as re, e as ye, a6 as de, b as h, a7 as w, a8 as Te, i as I, a9 as P, aa as v, M as je, ab as T, S as D } from "./index-
|
|
1
|
+
import { a4 as A, a5 as l, d as re, e as ye, a6 as de, b as h, a7 as w, a8 as Te, i as I, a9 as P, aa as v, M as je, ab as T, S as D } from "./index-D_JFO4Ed.js";
|
|
2
2
|
var O = A(l, "WeakMap"), F = Object.create, $e = /* @__PURE__ */ function() {
|
|
3
3
|
function e() {
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./index-DKy-U0Ae.cjs"),J=require("./index-CmDKKyE8.cjs"),N=require("./index-Bu51Zajm.cjs"),F=require("./modelComp-BQutSX47.cjs"),B=require("./menu-CxtX8L48.cjs"),w=require("./array-CbhGfVxI.cjs"),C=require("./index-DmDNy4oq.cjs"),P=require("./index.vue_vue_type_style_index_0_scoped_baf99455_lang-DDykhm8K.cjs"),M=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R=require("./index-Cj1L4TRX.cjs"),K=require("./index-CeSRiTQw.cjs"),U=require("./cloneDeep-MnyT2_Nu.cjs"),L={class:"bread-content"},H=["onClick"],W={key:0},z={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(D,{emit:E}){const a=D,m=e.ref([]),k=E;e.onMounted(()=>{m.value=a==null?void 0:a.breadArray}),e.watch(()=>a==null?void 0:a.breadArray,()=>{m.value=a==null?void 0:a.breadArray},{deep:!0,immediate:!0});const h=S=>{k("click",S)};return(S,g)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(v,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:j=>h(v)},e.toDisplayString(v.value),9,H),I!==m.value.length-1&&Array.isArray(m.value)?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString("/"))):e.createCommentVNode("",!0)]))),128))]))}},G=M._export_sfc(z,[["__scopeId","data-v-ebb4c8e5"]]),Q={class:"system-wrap"},X={key:0,class:"show-content"},Y={key:0,class:"item-menu-content"},Z={class:"item-view-group"},ee={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(D,{emit:E}){e.onMounted(()=>{K.ElNotification({title:"温馨提示:",type:"success",message:"欢迎使用系统",duration:1e3})});const a=D,m=F.useModelComp(N.pinia);C.useFormToTableComp(N.pinia);const k=e.ref(!0),h=B.useMenuState();e.ref(!0);const{itemData:S}=B.storeToRefs(m),g=C.useUnit(N.pinia),{activeMenuPath:v,activeMenuOpenPaths:I,menuTriggerType:j,menus:q}=B.storeToRefs(h),{selectIndex:O,selectTitle:d}=B.storeToRefs(g);e.ref([]);const y=e.ref([]),x=async(t,i="data")=>{var n,o,c,r,u,s;if((t==null?void 0:t.type)==="delete")await C.deleteTableContents((n=t==null?void 0:t.singleContent)==null?void 0:n.id);else if((t==null?void 0:t.buttonName)==="新增"){let f={};for(let l in t==null?void 0:t.singleContent)l!=="id"&&l!=="index"&&(f[l]=t==null?void 0:t.singleContent[l]);await C.addTableContents(i,v.value,t==null?void 0:t.index,sessionStorage.getItem("systemKey"),Object.values(f))}else if((t==null?void 0:t.buttonName)==="编辑"){let f={},l=(o=t==null?void 0:t.singleContent)==null?void 0:o.id;for(let p in t==null?void 0:t.singleContent)p!=="id"&&p!=="index"&&(f[p]=t==null?void 0:t.singleContent[p]);await C.fixTableContents(i,v.value,t==null?void 0:t.index,l,sessionStorage.getItem("systemKey"),Object.values(f))}let _=(r=(c=d.value)==null?void 0:c[d.value.length-1])!=null&&r.key?parseInt((s=(u=d.value)==null?void 0:u[d.value.length-1])==null?void 0:s.key):"";y.value=await C.getItemData(v.value,sessionStorage.getItem("systemKey"),_),m.setItemData(y.value)},T=t=>{y.value=t,m.setItemData(y.value)},A=t=>{},b=async t=>{var i;if((t==null?void 0:t.key)==="main"||d.value.length===1)y.value=await C.getItemData(v.value,sessionStorage.getItem("systemKey")),g.setSelectIndex(""),g.setSelectMenu(""),g.setSelectTitle([]);else{const _=[];y.value=await C.getItemData(v.value,sessionStorage.getItem("systemKey"),t==null?void 0:t.key);let n=-1;(i=d.value)==null||i.forEach((o,c)=>{(o==null?void 0:o.key)===(t==null?void 0:t.key)&&(n=c),(n===-1||n>=c)&&_.push(o)}),g.setSelectTitle(_),g.setSelectMenu(t==null?void 0:t.key)}m.setItemData(y.value)};e.watch(()=>v.value,async t=>{if(t){R.verifyStructureDataToStore();const i=await C.getItemData(t,sessionStorage.getItem("systemKey")),_=sessionStorage.getItem("authority"),n=JSON.parse(_||"");if(Array.isArray(n)){const o=Array.isArray(n)&&(n==null?void 0:n.filter(r=>r==null?void 0:r.includes(t))),c=o==null?void 0:o.map(r=>{var u;return((u=r==null?void 0:r.split("/"))==null?void 0:u.pop())||""});y.value=i==null?void 0:i.map(r=>{var u;return{...r,compData:(u=r==null?void 0:r.compData)==null?void 0:u.map(s=>{var f;return(s==null?void 0:s.key)==="rowButton"||(s==null?void 0:s.key)==="extraButton"?{...s,contents:(f=s==null?void 0:s.contents)==null?void 0:f.filter(l=>c==null?void 0:c.includes(l==null?void 0:l.label))}:s})}})}else typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?y.value=i:y.value=[];m.setItemData(y.value),g.setSelectTitle([]),g.setSelectIndex(""),g.setSelectMenu("")}},{immediate:!0}),e.watch(()=>[a==null?void 0:a.content,a==null?void 0:a.jsonContents],()=>{var _,n,o,c;if(((_=a==null?void 0:a.jsonContents)==null?void 0:_.length)>0){m.setOriginalData(a==null?void 0:a.jsonContents);return}if(!(a!=null&&a.content)||((n=a==null?void 0:a.content)==null?void 0:n.length)===0)return;k.value=!0;let t=[],i=[];g.setSelectTitle([]),g.setSelectIndex(""),g.setSelectMenu(""),(c=(o=a==null?void 0:a.content)==null?void 0:o.filter(r=>r!==""))==null||c.forEach(r=>{w.isExpandStringToJson(r)?i.push(w.expandStringToJson(r)):w.expandNewStringToJson(r)?i.push(w.expandNewStringToJson(r)):i.push(w.expandContentStringToJson(r))}),t=i==null?void 0:i[0],P.savePageDataAsync(t),m.setOriginalData(t)},{deep:!0,immediate:!0});const $=t=>w.getComponent(t);return(t,i)=>{const _=e.resolveComponent("el-aside"),n=e.resolveComponent("router-view"),o=e.resolveComponent("el-main"),c=e.resolveComponent("el-container");return e.openBlock(),e.createElementBlock("div",Q,[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(_,{width:"250px"},{default:e.withCtx(()=>[e.createVNode(J.default)]),_:1}),e.createVNode(o,null,{default:e.withCtx(()=>{var r,u,s,f;return[t.$route.path==="/"&&((r=y.value)==null?void 0:r.length)>0?(e.openBlock(),e.createElementBlock("div",X,[Array.isArray(e.unref(d))&&((u=e.unref(d))==null?void 0:u.length)>1||Array.isArray(e.unref(d))&&!((s=e.unref(d))!=null&&s.find(l=>(l==null?void 0:l.key)==="main"))&&((f=e.unref(d))==null?void 0:f.length)===1||!Array.isArray(e.unref(d))&&e.unref(d).key!=="main"?(e.openBlock(),e.createElementBlock("div",Y,[(e.openBlock(),e.createBlock(G,{key:e.unref(d),breadArray:e.unref(d),onClick:b},null,8,["breadArray"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:p},[e.createElementVNode("div",Z,e.toDisplayString(l.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(l.comp)),{itemData:l==null?void 0:l.compData,childItemData:l==null?void 0:l.itemChildData,key:(l==null?void 0:l.id)??p,onChange:x,index:(l==null?void 0:l.id)??p,onContentChange:A,onPageChange:T},null,40,["itemData","childItemData","index"]))]))),128))])])):(e.openBlock(),e.createBlock(n,{key:1}))]}),_:1})]),_:1})])}}},te=M._export_sfc(ee,[["__scopeId","data-v-a6f5a4ec"]]),ae={class:"add-model-content"},ne={key:0,class:"model-import-data"},re={class:"import-button"},oe={key:0},le={key:1,class:"model-operate"},se={class:"model-select"},ce={class:"model-fill"},ie={key:2,class:"model-view"},ue={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(D,{emit:E}){const a=D,m=E,k=e.ref([]),h=e.ref([]),S=e.ref([]),g=e.ref(0),v=F.useModelComp(N.pinia),I=B.useMenuState(N.pinia),{itemData:j,originalData:q}=B.storeToRefs(v),{activeMenuPath:O}=B.storeToRefs(I),d=e.ref(null),y=e.ref(0),x=e.ref([]),T=e.ref(""),A=e.ref(0),b=n=>{m("contentChange",n)},$=n=>{var c;const o=(c=U.cloneDeep(n==null?void 0:n.wholeValue))==null?void 0:c.map(r=>{var u;return(r==null?void 0:r.comp)==="Form"&&(r.compData=(u=r.compData)==null?void 0:u.map(s=>((s==null?void 0:s.key)==="formContent"&&(s.contents=w.arrayToNumberArray(s==null?void 0:s.contents)),s))),r});m("change",{originalContents:q.value,currentContents:n==null?void 0:n.wholeValue,editContent:n==null?void 0:n.editValue,arrayToContents:o})};e.watch(()=>h.value,()=>{A.value===h.value.length&&h.value.length!==0&&(k.value=h.value)},{deep:!0,immediate:!0});const t=()=>{d.value.click()},i=async n=>{const o=n.target.files;if(!o)return;new FileReader,k.value=[],h.value=[],A.value=o.length;const c=Array.from(o).map(async r=>await new Promise(u=>{const s=new FileReader;s.onload=f=>{try{h.value.push(f.target.result),x.value=_(f.target.result),y.value++}catch(l){console.error("解析失败:",l);return}},s.onerror=()=>u(`读取 ${r.name} 失败`),s.readAsText(r)}));await Promise.all(c)};e.watch(()=>[a==null?void 0:a.content,a==null?void 0:a.jsonContents],()=>{k.value=a.content,S.value=a==null?void 0:a.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>y.value,()=>{var n;((n=x.value)==null?void 0:n.length)!==0&&(v.setOriginalData(x.value),v.setItemData(x.value))},{deep:!0,immediate:!0});const _=n=>{let o=n.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");o=o.replace(/(\w+)\s*:/g,"$1:"),o=o.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),o=o.replace(/,\s*([}\]])/g,"$1"),o=o.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(o)}catch(c){try{const u=new Function(`return ${o}`)();if(Array.isArray(u)||typeof u=="object")return u;throw new Error(`解析结果不是有效的数组或对象: ${c}`)}catch(r){throw new Error(`无法解析JSON: ${r.message}`)}}};return(n,o)=>{var c;return e.openBlock(),e.createElementBlock("div",ae,[((c=a==null?void 0:a.jsonContents)==null?void 0:c.length)===0&&(a!=null&&a.showButton)?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:d,accept:".txt, .inm",onChange:i,style:{display:"none"},multiple:""},null,544),e.createElementVNode("button",{onClick:t,class:"import-button-content"},"导入文件"),T.value?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(T.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(a==null?void 0:a.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",se,[e.createVNode(V.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:g.value},[e.createVNode(V.modelShow)])),e.createElementVNode("div",ce,[e.createVNode(V.modelFill)])])):e.createCommentVNode("",!0),(a==null?void 0:a.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te,{content:k.value,onChange:$,jsonContents:S.value,onContentChange:b,key:g.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},de=M._export_sfc(ue,[["__scopeId","data-v-baf99455"]]);exports.default=de;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./index-CcxZZo6K.cjs"),J=require("./index-YajCTD4A.cjs"),N=require("./index-DjlDuRvf.cjs"),F=require("./modelComp-BQutSX47.cjs"),B=require("./menu-CxtX8L48.cjs"),w=require("./array-C09NLiVl.cjs"),C=require("./index-dm-zOhNm.cjs"),P=require("./index.vue_vue_type_style_index_0_scoped_baf99455_lang-W4auoQ9V.cjs"),M=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),R=require("./index-D9hjyDNL.cjs"),K=require("./index-BUkyNn3m.cjs"),U=require("./cloneDeep-B6Av9vYT.cjs"),L={class:"bread-content"},H=["onClick"],W={key:0},z={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(D,{emit:E}){const a=D,m=e.ref([]),k=E;e.onMounted(()=>{m.value=a==null?void 0:a.breadArray}),e.watch(()=>a==null?void 0:a.breadArray,()=>{m.value=a==null?void 0:a.breadArray},{deep:!0,immediate:!0});const h=S=>{k("click",S)};return(S,g)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(v,I)=>(e.openBlock(),e.createElementBlock("div",{key:I,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:j=>h(v)},e.toDisplayString(v.value),9,H),I!==m.value.length-1&&Array.isArray(m.value)?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString("/"))):e.createCommentVNode("",!0)]))),128))]))}},G=M._export_sfc(z,[["__scopeId","data-v-ebb4c8e5"]]),Q={class:"system-wrap"},X={key:0,class:"show-content"},Y={key:0,class:"item-menu-content"},Z={class:"item-view-group"},ee={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(D,{emit:E}){e.onMounted(()=>{K.ElNotification({title:"温馨提示:",type:"success",message:"欢迎使用系统",duration:1e3})});const a=D,m=F.useModelComp(N.pinia);C.useFormToTableComp(N.pinia);const k=e.ref(!0),h=B.useMenuState();e.ref(!0);const{itemData:S}=B.storeToRefs(m),g=C.useUnit(N.pinia),{activeMenuPath:v,activeMenuOpenPaths:I,menuTriggerType:j,menus:q}=B.storeToRefs(h),{selectIndex:O,selectTitle:d}=B.storeToRefs(g);e.ref([]);const y=e.ref([]),x=async(t,i="data")=>{var n,o,c,r,u,s;if((t==null?void 0:t.type)==="delete")await C.deleteTableContents((n=t==null?void 0:t.singleContent)==null?void 0:n.id);else if((t==null?void 0:t.buttonName)==="新增"){let f={};for(let l in t==null?void 0:t.singleContent)l!=="id"&&l!=="index"&&(f[l]=t==null?void 0:t.singleContent[l]);await C.addTableContents(i,v.value,t==null?void 0:t.index,sessionStorage.getItem("systemKey"),Object.values(f))}else if((t==null?void 0:t.buttonName)==="编辑"){let f={},l=(o=t==null?void 0:t.singleContent)==null?void 0:o.id;for(let p in t==null?void 0:t.singleContent)p!=="id"&&p!=="index"&&(f[p]=t==null?void 0:t.singleContent[p]);await C.fixTableContents(i,v.value,t==null?void 0:t.index,l,sessionStorage.getItem("systemKey"),Object.values(f))}let _=(r=(c=d.value)==null?void 0:c[d.value.length-1])!=null&&r.key?parseInt((s=(u=d.value)==null?void 0:u[d.value.length-1])==null?void 0:s.key):"";y.value=await C.getItemData(v.value,sessionStorage.getItem("systemKey"),_),m.setItemData(y.value)},T=t=>{y.value=t,m.setItemData(y.value)},A=t=>{},b=async t=>{var i;if((t==null?void 0:t.key)==="main"||d.value.length===1)y.value=await C.getItemData(v.value,sessionStorage.getItem("systemKey")),g.setSelectIndex(""),g.setSelectMenu(""),g.setSelectTitle([]);else{const _=[];y.value=await C.getItemData(v.value,sessionStorage.getItem("systemKey"),t==null?void 0:t.key);let n=-1;(i=d.value)==null||i.forEach((o,c)=>{(o==null?void 0:o.key)===(t==null?void 0:t.key)&&(n=c),(n===-1||n>=c)&&_.push(o)}),g.setSelectTitle(_),g.setSelectMenu(t==null?void 0:t.key)}m.setItemData(y.value)};e.watch(()=>v.value,async t=>{if(t){R.verifyStructureDataToStore();const i=await C.getItemData(t,sessionStorage.getItem("systemKey")),_=sessionStorage.getItem("authority"),n=JSON.parse(_||"");if(Array.isArray(n)){const o=Array.isArray(n)&&(n==null?void 0:n.filter(r=>r==null?void 0:r.includes(t))),c=o==null?void 0:o.map(r=>{var u;return((u=r==null?void 0:r.split("/"))==null?void 0:u.pop())||""});y.value=i==null?void 0:i.map(r=>{var u;return{...r,compData:(u=r==null?void 0:r.compData)==null?void 0:u.map(s=>{var f;return(s==null?void 0:s.key)==="rowButton"||(s==null?void 0:s.key)==="extraButton"?{...s,contents:(f=s==null?void 0:s.contents)==null?void 0:f.filter(l=>c==null?void 0:c.includes(l==null?void 0:l.label))}:s})}})}else typeof n=="string"&&(n==null?void 0:n.toUpperCase())==="SUPERADMIN"?y.value=i:y.value=[];m.setItemData(y.value),g.setSelectTitle([]),g.setSelectIndex(""),g.setSelectMenu("")}},{immediate:!0}),e.watch(()=>[a==null?void 0:a.content,a==null?void 0:a.jsonContents],()=>{var _,n,o,c;if(((_=a==null?void 0:a.jsonContents)==null?void 0:_.length)>0){m.setOriginalData(a==null?void 0:a.jsonContents);return}if(!(a!=null&&a.content)||((n=a==null?void 0:a.content)==null?void 0:n.length)===0)return;k.value=!0;let t=[],i=[];g.setSelectTitle([]),g.setSelectIndex(""),g.setSelectMenu(""),(c=(o=a==null?void 0:a.content)==null?void 0:o.filter(r=>r!==""))==null||c.forEach(r=>{w.isExpandStringToJson(r)?i.push(w.expandStringToJson(r)):w.expandNewStringToJson(r)?i.push(w.expandNewStringToJson(r)):i.push(w.expandContentStringToJson(r))}),t=i==null?void 0:i[0],P.savePageDataAsync(t),m.setOriginalData(t)},{deep:!0,immediate:!0});const $=t=>w.getComponent(t);return(t,i)=>{const _=e.resolveComponent("el-aside"),n=e.resolveComponent("router-view"),o=e.resolveComponent("el-main"),c=e.resolveComponent("el-container");return e.openBlock(),e.createElementBlock("div",Q,[e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(_,{width:"250px"},{default:e.withCtx(()=>[e.createVNode(J.default)]),_:1}),e.createVNode(o,null,{default:e.withCtx(()=>{var r,u,s,f;return[t.$route.path==="/"&&((r=y.value)==null?void 0:r.length)>0?(e.openBlock(),e.createElementBlock("div",X,[Array.isArray(e.unref(d))&&((u=e.unref(d))==null?void 0:u.length)>1||Array.isArray(e.unref(d))&&!((s=e.unref(d))!=null&&s.find(l=>(l==null?void 0:l.key)==="main"))&&((f=e.unref(d))==null?void 0:f.length)===1||!Array.isArray(e.unref(d))&&e.unref(d).key!=="main"?(e.openBlock(),e.createElementBlock("div",Y,[(e.openBlock(),e.createBlock(G,{key:e.unref(d),breadArray:e.unref(d),onClick:b},null,8,["breadArray"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(l,p)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:p},[e.createElementVNode("div",Z,e.toDisplayString(l.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent($(l.comp)),{itemData:l==null?void 0:l.compData,childItemData:l==null?void 0:l.itemChildData,key:(l==null?void 0:l.id)??p,onChange:x,index:(l==null?void 0:l.id)??p,onContentChange:A,onPageChange:T},null,40,["itemData","childItemData","index"]))]))),128))])])):(e.openBlock(),e.createBlock(n,{key:1}))]}),_:1})]),_:1})])}}},te=M._export_sfc(ee,[["__scopeId","data-v-a6f5a4ec"]]),ae={class:"add-model-content"},ne={key:0,class:"model-import-data"},re={class:"import-button"},oe={key:0},le={key:1,class:"model-operate"},se={class:"model-select"},ce={class:"model-fill"},ie={key:2,class:"model-view"},ue={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(D,{emit:E}){const a=D,m=E,k=e.ref([]),h=e.ref([]),S=e.ref([]),g=e.ref(0),v=F.useModelComp(N.pinia),I=B.useMenuState(N.pinia),{itemData:j,originalData:q}=B.storeToRefs(v),{activeMenuPath:O}=B.storeToRefs(I),d=e.ref(null),y=e.ref(0),x=e.ref([]),T=e.ref(""),A=e.ref(0),b=n=>{m("contentChange",n)},$=n=>{var c;const o=(c=U.cloneDeep(n==null?void 0:n.wholeValue))==null?void 0:c.map(r=>{var u;return(r==null?void 0:r.comp)==="Form"&&(r.compData=(u=r.compData)==null?void 0:u.map(s=>((s==null?void 0:s.key)==="formContent"&&(s.contents=w.arrayToNumberArray(s==null?void 0:s.contents)),s))),r});m("change",{originalContents:q.value,currentContents:n==null?void 0:n.wholeValue,editContent:n==null?void 0:n.editValue,arrayToContents:o})};e.watch(()=>h.value,()=>{A.value===h.value.length&&h.value.length!==0&&(k.value=h.value)},{deep:!0,immediate:!0});const t=()=>{d.value.click()},i=async n=>{const o=n.target.files;if(!o)return;new FileReader,k.value=[],h.value=[],A.value=o.length;const c=Array.from(o).map(async r=>await new Promise(u=>{const s=new FileReader;s.onload=f=>{try{h.value.push(f.target.result),x.value=_(f.target.result),y.value++}catch(l){console.error("解析失败:",l);return}},s.onerror=()=>u(`读取 ${r.name} 失败`),s.readAsText(r)}));await Promise.all(c)};e.watch(()=>[a==null?void 0:a.content,a==null?void 0:a.jsonContents],()=>{k.value=a.content,S.value=a==null?void 0:a.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>y.value,()=>{var n;((n=x.value)==null?void 0:n.length)!==0&&(v.setOriginalData(x.value),v.setItemData(x.value))},{deep:!0,immediate:!0});const _=n=>{let o=n.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");o=o.replace(/(\w+)\s*:/g,"$1:"),o=o.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),o=o.replace(/,\s*([}\]])/g,"$1"),o=o.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(o)}catch(c){try{const u=new Function(`return ${o}`)();if(Array.isArray(u)||typeof u=="object")return u;throw new Error(`解析结果不是有效的数组或对象: ${c}`)}catch(r){throw new Error(`无法解析JSON: ${r.message}`)}}};return(n,o)=>{var c;return e.openBlock(),e.createElementBlock("div",ae,[((c=a==null?void 0:a.jsonContents)==null?void 0:c.length)===0&&(a!=null&&a.showButton)?(e.openBlock(),e.createElementBlock("div",ne,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:d,accept:".txt, .inm",onChange:i,style:{display:"none"},multiple:""},null,544),e.createElementVNode("button",{onClick:t,class:"import-button-content"},"导入文件"),T.value?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(T.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(a==null?void 0:a.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",se,[e.createVNode(V.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:g.value},[e.createVNode(V.modelShow)])),e.createElementVNode("div",ce,[e.createVNode(V.modelFill)])])):e.createCommentVNode("",!0),(a==null?void 0:a.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(te,{content:k.value,onChange:$,jsonContents:S.value,onContentChange:b,key:g.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},de=M._export_sfc(ue,[["__scopeId","data-v-baf99455"]]);exports.default=de;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as h } from "./menu-XcYMZJLY.js";
|
|
2
|
-
import { s as d } from "./request-
|
|
2
|
+
import { s as d } from "./request-RC5ET7Nr.js";
|
|
3
3
|
const w = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/, O = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/, $ = /^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;
|
|
4
4
|
function D(r, t) {
|
|
5
5
|
if (r === "__proto__" || r === "constructor" && t && typeof t == "object" && "prototype" in t) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as he, ref as wt, reactive as Se, resolveComponent as it, createElementBlock as ce, openBlock as le, createVNode as Y, withCtx as z, createElementVNode as I, createTextVNode as gt, toDisplayString as Re, nextTick as ke, Fragment as Le, renderSlot as Be } from "vue";
|
|
2
|
-
import { Q as Pe, ac as ze, j as pe, m as _, N as V } from "./index-
|
|
2
|
+
import { Q as Pe, ac as ze, j as pe, m as _, N as V } from "./index-D_JFO4Ed.js";
|
|
3
3
|
import { i as We } from "./isNil-CjWwlQS3.js";
|
|
4
|
-
import { m as Ut, s as de, E as Ye } from "./request-
|
|
4
|
+
import { m as Ut, s as de, E as Ye } from "./request-RC5ET7Nr.js";
|
|
5
5
|
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const He = "ElUpload";
|
|
7
7
|
class je extends Error {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ref as h, onMounted as G, watch as T, createElementBlock as v, openBlock as c, Fragment as H, renderList as Q, createElementVNode as I, createCommentVNode as b, toDisplayString as K, resolveComponent as O, createVNode as x, withCtx as U, createBlock as P, unref as k, resolveDynamicComponent as ee } from "vue";
|
|
2
|
-
import { m as te, a as ae, b as se } from "./index-
|
|
3
|
-
import ne from "./index-
|
|
4
|
-
import { p as N } from "./index-
|
|
2
|
+
import { m as te, a as ae, b as se } from "./index-C_Ek6N_z.js";
|
|
3
|
+
import ne from "./index-Ckrm7F4u.js";
|
|
4
|
+
import { p as N } from "./index-BH36LQch.js";
|
|
5
5
|
import { u as X } from "./modelComp-CP-waker.js";
|
|
6
6
|
import { u as Y, s as M } from "./menu-XcYMZJLY.js";
|
|
7
|
-
import { i as re, e as le, b as z, c as oe, g as ie, a as ue } from "./array-
|
|
8
|
-
import { u as ce, a as de, g as J, d as me, b as ge, f as ye } from "./index-
|
|
9
|
-
import { s as ve } from "./index.vue_vue_type_style_index_0_scoped_baf99455_lang-
|
|
7
|
+
import { i as re, e as le, b as z, c as oe, g as ie, a as ue } from "./array-CqhTXR28.js";
|
|
8
|
+
import { u as ce, a as de, g as J, d as me, b as ge, f as ye } from "./index-Bel0p329.js";
|
|
9
|
+
import { s as ve } from "./index.vue_vue_type_style_index_0_scoped_baf99455_lang-FY_pjpOg.js";
|
|
10
10
|
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
import { v as fe } from "./index-
|
|
12
|
-
import { E as he } from "./index-
|
|
13
|
-
import { c as _e } from "./cloneDeep-
|
|
11
|
+
import { v as fe } from "./index-Nb7mXZOf.js";
|
|
12
|
+
import { E as he } from "./index-D_JFO4Ed.js";
|
|
13
|
+
import { c as _e } from "./cloneDeep-Cm2ut66T.js";
|
|
14
14
|
const Ce = { class: "bread-content" }, we = ["onClick"], ke = { key: 0 }, Se = {
|
|
15
15
|
__name: "index",
|
|
16
16
|
props: {
|