ss-component-new 1.2.85 → 1.2.87

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.
Files changed (90) hide show
  1. package/dist/{MTLLoader-DX8U25Z1.js → MTLLoader-DkSNLhC7.js} +1 -1
  2. package/dist/{MTLLoader-XWaijvjW.cjs → MTLLoader-J3dtRBIA.cjs} +1 -1
  3. package/dist/{OrbitControls-BoibflsJ.js → OrbitControls-CIInWJog.js} +1 -1
  4. package/dist/{OrbitControls-5sc4QVTb.cjs → OrbitControls-D7ENpunL.cjs} +1 -1
  5. package/dist/{URDFLoader-DRuMHEEY.js → URDFLoader-KWmrVx3h.js} +2 -2
  6. package/dist/{URDFLoader-DRsgdo2h.cjs → URDFLoader-ZNkXTFDG.cjs} +1 -1
  7. package/dist/{animationData-CQMP2Ry7.cjs → animationData-9UtaGYaZ.cjs} +1 -1
  8. package/dist/{animationData-Dcqbb7R7.js → animationData-AtWrsTvx.js} +1 -1
  9. package/dist/{array-CxvkAZo4.js → array-CATO5Q6T.js} +1 -1
  10. package/dist/{array-CsHTx87c.cjs → array-DfNjR0Qy.cjs} +1 -1
  11. package/dist/{iconfont-pGGINDaV.js → iconfont-CUOKY8wo.js} +2 -2
  12. package/dist/{iconfont-ufNSJ4gS.cjs → iconfont-U_cmKvyB.cjs} +1 -1
  13. package/dist/{index-CNjPIOkS.js → index-0IFTdOV8.js} +4 -4
  14. package/dist/{index-BTyVbfKd.cjs → index-B0lL5Vdy.cjs} +1 -1
  15. package/dist/{index-DujL6LbU.cjs → index-B52lJ3Ug.cjs} +1 -1
  16. package/dist/{index-DuFT4qcP.js → index-B69WOtXS.js} +16 -16
  17. package/dist/{index-5VP_0_pi.js → index-BOX5TGPv.js} +1 -1
  18. package/dist/{index-B-Ej5IDW.js → index-BPyk3UIE.js} +8 -8
  19. package/dist/{index-CGrundmL.cjs → index-BSnfRMZW.cjs} +1 -1
  20. package/dist/{index-DLxfEoby.js → index-BTR-xG0v.js} +1 -1
  21. package/dist/{index-CWXuROYc.js → index-Be9ofpB5.js} +1 -1
  22. package/dist/{index-BbLk6uGT.cjs → index-BecXuN38.cjs} +1 -1
  23. package/dist/{index-C-qlninE.js → index-ByrRF4uT.js} +3 -3
  24. package/dist/{index-DaODLF_y.cjs → index-C4h-dVEe.cjs} +1 -1
  25. package/dist/{index-ihmYWPUh.cjs → index-CAlMVMU_.cjs} +1 -1
  26. package/dist/{index-rkfjo_Gm.cjs → index-CB2c5ESn.cjs} +1 -1
  27. package/dist/{index-BReH9GpA.js → index-CDW9opLV.js} +4 -4
  28. package/dist/{index-C4Xg2c1m.js → index-CMsqZu-f.js} +1 -1
  29. package/dist/{index-i0NBWOoH.js → index-CN-NFjlN.js} +2 -2
  30. package/dist/{index-BxANp3fw.cjs → index-CffEdIhY.cjs} +1 -1
  31. package/dist/{index-CPaYwx5E.js → index-CluLZeK5.js} +2 -2
  32. package/dist/{index-exLt4yWh.js → index-CxVSFkzd.js} +1 -1
  33. package/dist/{index-AuhjxS2n.js → index-Cz2PyWsi.js} +4 -4
  34. package/dist/{index-DIdbFs9X.js → index-D38I7nZo.js} +1 -1
  35. package/dist/index-DCYFKE13.cjs +1 -0
  36. package/dist/{index-Wx_-zVEz.cjs → index-DHW5e_u_.cjs} +1 -1
  37. package/dist/{index-Cj17H0fw.cjs → index-DKeLuZIo.cjs} +1 -1
  38. package/dist/index-DMZt8ROM.js +2878 -0
  39. package/dist/{index-DVGqxAo1.cjs → index-DRL2SPEo.cjs} +1 -1
  40. package/dist/{index-J8TtNgq3.cjs → index-DTuRU8za.cjs} +1 -1
  41. package/dist/{index-BrbfK-gl.cjs → index-Dd3ofxbk.cjs} +1 -1
  42. package/dist/{index-BCr2tuwq.js → index-Ds0IFjwu.js} +1 -1
  43. package/dist/{index-BPq4kmwU.js → index-DtCpetgB.js} +1 -1
  44. package/dist/{index-DZxw71DQ.cjs → index-Dv5U7UHo.cjs} +1 -1
  45. package/dist/{index-VIc9HRPP.js → index-DzqEIEfs.js} +1 -1
  46. package/dist/{index-WI99pZuH.cjs → index-I9nYBweF.cjs} +1 -1
  47. package/dist/{index-7um03liv.cjs → index-Otnitd83.cjs} +1 -1
  48. package/dist/{index-1rJKDlxZ.cjs → index-UH73jPSH.cjs} +1 -1
  49. package/dist/{index-TL4pAA-u.js → index-kP_CVzzK.js} +1 -1
  50. package/dist/{index-BiNYM61q.js → index-m5CO_eOy.js} +7 -7
  51. package/dist/{index-ZQwYery3.cjs → index-o4iJ58d0.cjs} +1 -1
  52. package/dist/{index-Bs4AjJ09.js → index-rC2K3Bzj.js} +1 -1
  53. package/dist/{index-kG_zc7AB.cjs → index-sZDWq1eU.cjs} +1 -1
  54. package/dist/{index-Sx_xn72K.js → index-sawDaaXq.js} +3 -3
  55. package/dist/{index-BZyBjkTm.cjs → index-u7d75s7T.cjs} +1 -1
  56. package/dist/{index-B_vmEsjH.cjs → index-vB3AblAt.cjs} +1 -1
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BKBrtzw6.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BcCwZRas.js} +7488 -7453
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B3yzycJI.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DlpiRV_h.cjs} +11 -11
  59. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0v0KFdG.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BMVxMU7L.cjs} +149 -149
  60. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CoE66bK1.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-UNe6-w-O.js} +10032 -10016
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-aohz5G9I.js → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-8v2JVeca.js} +4 -4
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Cf3tVnf3.cjs → index.vue_vue_type_style_index_0_scoped_140f5e74_lang-AgWRuXVC.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_1_lang-DmlfCkWq.cjs → index.vue_vue_type_style_index_1_lang-C1z71r3A.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_1_lang-BlJX3s3k.js → index.vue_vue_type_style_index_1_lang-DqwucUxZ.js} +3 -3
  65. package/dist/{main-RiReisGA.js → main-CHjImz22.js} +3 -3
  66. package/dist/{main-C8AwB8hx.cjs → main-kIoRHR7Y.cjs} +1 -1
  67. package/dist/ss-component.cjs +1 -1
  68. package/dist/ss-component.css +1 -1
  69. package/dist/ss-component.js +9 -9
  70. package/dist/ss-component2.cjs +1 -1
  71. package/dist/ss-component2.js +10 -10
  72. package/dist/{threeModel-8KR0tSK_.js → threeModel-B7dMmL7L.js} +4 -4
  73. package/dist/{threeModel-D8uQOcZJ.cjs → threeModel-DhMeqTnZ.cjs} +1 -1
  74. package/dist/{threePreview-T8g8N9vx.js → threePreview-C7hIZVal.js} +3 -3
  75. package/dist/{threePreview-B0fRdL1U.cjs → threePreview-CloRtEyk.cjs} +1 -1
  76. package/dist/{threeSceneView-Cij2WoyK.cjs → threeSceneView-0NHz_iE7.cjs} +1 -1
  77. package/dist/{threeSceneView-B3-E-dSj.js → threeSceneView-DfL2muQG.js} +8 -8
  78. package/dist/{threeSceneViewForCPMPIP-D3SzrmQ1.cjs → threeSceneViewForCPMPIP-DKqP4yRh.cjs} +1 -1
  79. package/dist/{threeSceneViewForCPMPIP-B5dq9RkB.js → threeSceneViewForCPMPIP-DOcbIW0k.js} +7 -7
  80. package/dist/{threeTrackPathView-CfNlwHLQ.cjs → threeTrackPathView-BADN-C5w.cjs} +1 -1
  81. package/dist/{threeTrackPathView-C-AVXDKd.js → threeTrackPathView-BBGLRj2K.js} +3 -3
  82. package/dist/{threeViewerHost-CrjrxJI5.js → threeViewerHost-Cvy-AzyZ.js} +2 -2
  83. package/dist/{threeViewerHost-xe_Xn9SW.cjs → threeViewerHost-DmUYNEfj.cjs} +1 -1
  84. package/dist/{urdfTree-CWxkEb_j.js → urdfTree-CeIoAIYI.js} +1 -1
  85. package/dist/{urdfTree-p76qhqlU.cjs → urdfTree-Cf5fPKfb.cjs} +1 -1
  86. package/dist/{workpieceTreePanel-CzVWLxJ2.js → workpieceTreePanel-Bjf8fR7u.js} +4 -4
  87. package/dist/{workpieceTreePanel-BZ-a61Q8.cjs → workpieceTreePanel-CDnC5lGB.cjs} +1 -1
  88. package/package.json +1 -1
  89. package/dist/index-DUun0LWK.cjs +0 -1
  90. package/dist/index-vrk6oShs.js +0 -2878
@@ -1 +0,0 @@
1
- "use strict";const l=require("vue"),k=require("./index-C8qRkCgn.cjs"),ae=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-C0v0KFdG.cjs"),Xe=require("./index-BxANp3fw.cjs"),ya=require("./threeViewerHost-xe_Xn9SW.cjs"),$l=require("./index-DeBHVrj0.cjs");require("./index.vue_vue_type_style_index_1_lang-DmlfCkWq.cjs");const Fl=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Tl=require("./index-DVGqxAo1.cjs");require("./index-CLJYSvkY.cjs");const va=require("./isString--eJE54G5.cjs"),Hl=O=>O.match(/\((.*)\)/)[1],ba={__name:"index",props:{isVisible:{type:Boolean,default:!1},title:{type:String,default:""},placement:{type:String,default:"bottom"},width:{type:Number,default:200}},setup(O){const Z=O,Q=l.ref(null),P=l.ref(!1),j=l.ref(null);return l.watch(()=>Z==null?void 0:Z.isVisible,()=>{P.value=Z==null?void 0:Z.isVisible},{deep:!0,immediate:!0}),l.watch(()=>j.value,()=>{l.nextTick(()=>{var i,ee;(ee=(i=Q.value)==null?void 0:i.updatePopper)==null||ee.call(i)})},{deep:!0,immediate:!0}),(i,ee)=>{const fe=l.resolveComponent("el-popover");return l.openBlock(),l.createBlock(fe,{visible:P.value,title:Z==null?void 0:Z.title,placement:Z==null?void 0:Z.placement,width:Z==null?void 0:Z.width,ref_key:"popOverRef",ref:Q},{reference:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(i.$slots,"reference",{ref_key:"referenceRef",ref:j})])]),default:l.withCtx(()=>[l.createElementVNode("div",null,[l.renderSlot(i.$slots,"content")])]),_:3},8,["visible","title","placement","width"])}}},Nn={key:0,class:"extra-button-content"},Bn={class:"table-operator-wrap"},En={class:"extra-button-filter"},An={class:"form-content-value"},_n={key:0,class:"extra-header"},wn={class:"drop-menu",style:{width:"120px"}},Un={key:0},On={key:1},Ln={key:1,class:"extra-button-content tabs-button-wrapper"},jn={class:"table-operator-wrap"},Mn={class:"extra-button-filter"},Pn={class:"form-content-value"},$n={key:0,class:"extra-header"},Fn={class:"drop-menu",style:{width:"120px"}},Vn={key:0},Kn={key:1},zn={__name:"header",props:{pageLayout:{type:String,default:"vertical"},lockingPage:Boolean,level:{type:Number,default:1},compName:{type:String,default:"表格名称",required:!1},isDevMode:Boolean,selectNums:Number,dataNums:Number,filterValues:Array,buttons:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick","filter","getImportData"],setup(O,{emit:Z}){const Q=Z,P=O,j=l.ref(""),i=l.ref(!1),ee=l.ref([]),fe=l.ref([{label:"取消",background:"#999999"},{label:"清空",background:"#999999"},{label:"确认"}]),Se=[{label:"新增",icon:"Plus"},{label:"导入",icon:"import"},{label:"导出",icon:"export"}],ge=ce=>{const ve=ce.raw;if(!ve)return;const re=new FileReader;re.onload=R=>{try{const z=new Uint8Array(R.target.result),Te=ae.readSync(z,{type:"array"}),Fe=Te.SheetNames[0],ne=Te.Sheets[Fe],Oe=ae.utils.decode_range(ne["!ref"]).e.c+1,W=new Array(Oe).fill(""),b=[];for(const K in ne){if(K[0]==="!")continue;const{r:ue,c:ke}=ae.utils.decode_cell(K);let Ne=ne[K].v;if(ne[K].t==="n"&&Ne>0&&Ne<1e6&&(Ne=new Date((Ne-25569)*86400*1e3).toISOString().split("T")[0]),(Ne==null||Ne==="")&&(Ne=""),ue===0)W[ke]=Ne;else{if(!b[ue-1]){b[ue-1]={};for(let Le=0;Le<Oe;Le++)b[ue-1][`col_${Le}`]=""}b[ue-1][`col_${ke}`]=Ne}}for(let K=0;K<Oe;K++)W[K]===void 0&&(W[K]="");const Ee=b==null?void 0:b[0];if(!(Ee!=null&&Ee.hasOwnProperty("col_0")))return k.ElMessage.error("导入的数据列不匹配,请检查是否错位");Q("getImportData",W,b)}catch(z){throw k.ElMessage.error(z.message),new Error(z.message)}},re.readAsArrayBuffer(ve)},ze=ce=>{var re;const ve=(re=ee.value)==null?void 0:re.reduce((R,z,Te)=>(Te===0?R[z.label]=ce:R[z.label]=z==null?void 0:z.value,R),{});Q("filter",ve,ce,!0)},Ye=ce=>{Q("buttonClick",ce)},ol=ce=>{var ve,re;ee.value=(re=(ve=ae.getColumnChild(k.cloneDeep(ce)))==null?void 0:ve.filter(R=>(R==null?void 0:R.label)!==""&&(R==null?void 0:R.label)!=="操作"))==null?void 0:re.map(R=>({label:(R==null?void 0:R.label)??"",value:"",name:(R==null?void 0:R.label)??"",isFormColHidden:R==null?void 0:R.isTableColHidden,width:2}))},Be=l.ref(!1),nl=ce=>{var ve;if((ce==null?void 0:ce.buttonName)==="确认"&&(Q("filter",ce==null?void 0:ce.content),Be.value=(ce==null?void 0:ce.content)&&Object.values(ce==null?void 0:ce.content).length>0),(ce==null?void 0:ce.buttonName)==="清空"){const re=k.cloneDeep(ce==null?void 0:ce.content);for(const R in re)re[R]="";ee.value=(ve=ee.value)==null?void 0:ve.map(R=>({...R,value:""})),Q("filter",re),Be.value=!1}i.value=!1},rl=()=>{var ve,re;ee.value=(ve=ee.value)==null?void 0:ve.map(R=>({...R,value:""}));const ce=(re=ee.value)==null?void 0:re.reduce((R,z)=>(R[z.label]=z.value,R),{});Q("filter",ce)};return l.onMounted(()=>{ol(P.columns)}),l.watch(()=>P.columns,()=>{ol(P.columns)},{deep:!0,immediate:!0}),(ce,ve)=>{var ne,Pe,Oe,W;const re=l.resolveComponent("el-icon"),R=l.resolveComponent("svg-icon"),z=l.resolveComponent("el-input"),Te=l.resolveComponent("el-button"),Fe=l.resolveComponent("el-upload");return O.pageLayout==="vertical"?(l.openBlock(),l.createElementBlock("div",Nn,[l.createElementVNode("div",{class:l.normalizeClass(O.compName?"table-name-wrap":""),style:l.normalizeStyle({background:(P==null?void 0:P.level)>1?"transparent":"var(--ssgroup-background)",paddingLeft:((P==null?void 0:P.level)-1)*12+"px",fontWeight:600-((P==null?void 0:P.level)-1)*100>=400?600-((P==null?void 0:P.level)-1)*100:400,fontSize:17-(P==null?void 0:P.level)>=14?17-(P==null?void 0:P.level)+"px":"14px"})},l.toDisplayString(O.compName),7),l.createElementVNode("div",Bn,[l.createElementVNode("div",En,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:i.value},{reference:l.withCtx(()=>{var b,Ee,K,ue;return[l.createVNode(z,{modelValue:j.value,"onUpdate:modelValue":ve[1]||(ve[1]=ke=>j.value=ke),style:{"min-width":"80px"},placeholder:Be.value?(K=(Ee=(b=O.filterValues)==null?void 0:b.filter(ke=>ke))==null?void 0:Ee.slice(0,3))==null?void 0:K.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:ze,disabled:((ue=ee.value)==null?void 0:ue.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!j.value&&((Ne=(ke=O.filterValues)==null?void 0:ke.filter(Le=>Le))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(re,{key:0,style:{cursor:"pointer"},onClick:rl},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:ve[0]||(ve[0]=ke=>i.value=!i.value)},[l.createVNode(R,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",An,[(l.openBlock(),l.createBlock(Xe.ssForm,{rowContents:ee.value,buttonValue:fe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:fe.value,isStartJustify:!1,onOnButtonClick:nl},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((ne=O.buttons)==null?void 0:ne.length)>0?(l.openBlock(),l.createElementBlock("div",_n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((Pe=O.buttons)==null?void 0:Pe.filter(b=>O.isDevMode||(b==null?void 0:b.label)!=="修改模板"),(b,Ee)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:Ee},[(b==null?void 0:b.type)==="upload"?(l.openBlock(),l.createBlock(Fe,{key:0,class:"upload-button-wrap","on-change":ge,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1,disabled:!!O.lockingPage},{default:l.withCtx(()=>[l.createVNode(Te,{disabled:!!O.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style"])]),_:2},1032,["disabled"])):l.createCommentVNode("",!0),(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Xe._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Te,{key:0,disabled:!!O.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style"])):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",wn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b==null?void 0:b.contents,K=>(l.openBlock(),l.createBlock(Te,{key:K==null?void 0:K.label,disabled:!!O.lockingPage,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ue=>Ye(K==null?void 0:K.label)},{default:l.withCtx(()=>{var ue,ke;return[l.createTextVNode(l.toDisplayString(K==null?void 0:K.label),1),(ue=K==null?void 0:K.label)!=null&&ue.includes("选中")?(l.openBlock(),l.createElementBlock("span",Un,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=K==null?void 0:K.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",On,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["disabled","onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),b!=null&&b.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Te,{key:2,id:"themeButton",disabled:!!O.lockingPage,style:l.normalizeStyle({background:(b==null?void 0:b.background)??"var(--ssbutton-theme-bg)",color:(b==null?void 0:b.color)??"var(--ssbutton-theme-color)"}),onClick:K=>Ye(b==null?void 0:b.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["disabled","style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])])):(l.openBlock(),l.createElementBlock("div",Ln,[l.createElementVNode("div",jn,[l.createElementVNode("div",Mn,[l.createVNode(ba,{title:"",width:800,placement:"bottom-start",isVisible:i.value},{reference:l.withCtx(()=>{var b,Ee,K,ue;return[l.createVNode(z,{modelValue:j.value,"onUpdate:modelValue":ve[3]||(ve[3]=ke=>j.value=ke),style:{"min-width":"80px"},placeholder:Be.value?(K=(Ee=(b=O.filterValues)==null?void 0:b.filter(ke=>ke))==null?void 0:Ee.slice(0,3))==null?void 0:K.join("/"):"搜索","prefix-icon":l.unref(k.search_default),clearable:"",onInput:ze,disabled:((ue=ee.value)==null?void 0:ue.length)===0},{suffix:l.withCtx(()=>{var ke,Ne;return[!j.value&&((Ne=(ke=O.filterValues)==null?void 0:ke.filter(Le=>Le))!=null&&Ne.join("/"))?(l.openBlock(),l.createBlock(re,{key:0,style:{cursor:"pointer"},onClick:rl},{default:l.withCtx(()=>[l.createVNode(l.unref(k.circle_close_default))]),_:1})):l.createCommentVNode("",!0)]}),append:l.withCtx(()=>[l.createElementVNode("span",{title:"条件查询",onClick:ve[2]||(ve[2]=ke=>i.value=!i.value)},[l.createVNode(R,{name:"query",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),_:1},8,["modelValue","placeholder","prefix-icon","disabled"])]}),content:l.withCtx(()=>[l.createElementVNode("div",Pn,[(l.openBlock(),l.createBlock(Xe.ssForm,{rowContents:ee.value,buttonValue:fe.value,isRowFlex:!0,isEnableWrap:!1,isButtonRow:!1,key:fe.value,isStartJustify:!1,onOnButtonClick:nl},null,8,["rowContents","buttonValue"]))])]),_:1},8,["isVisible"])]),O.buttons&&((Oe=O.buttons)==null?void 0:Oe.length)>0?(l.openBlock(),l.createElementBlock("div",$n,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((W=O.buttons)==null?void 0:W.filter(b=>O.isDevMode||(b==null?void 0:b.label)!=="修改模板"),(b,Ee)=>(l.openBlock(),l.createElementBlock("div",{class:"extra-contents",key:Ee},[(b==null?void 0:b.type)==="upload"?(l.openBlock(),l.createBlock(Fe,{key:0,class:"upload-button-wrap","on-change":ge,accept:".xlsx,.xls","auto-upload":!1,action:"#","show-file-list":!1},{default:l.withCtx(()=>[l.createVNode(Te,{style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var K;return[l.createVNode(R,{name:(K=Se==null?void 0:Se.find(ue=>(ue==null?void 0:ue.label)===(b==null?void 0:b.label)))==null?void 0:K.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1024)]),_:2},1024)):l.createCommentVNode("",!0),(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Xe._sfc_main,{key:1},{dropTitle:l.withCtx(()=>[(b==null?void 0:b.type)==="popover"?(l.openBlock(),l.createBlock(Te,{key:0,style:{background:"transparent",color:"#666666"}},{icon:l.withCtx(()=>{var K;return[l.createVNode(R,{name:(K=Se==null?void 0:Se.find(ue=>(ue==null?void 0:ue.label)===(b==null?void 0:b.label)))==null?void 0:K.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1024)):l.createCommentVNode("",!0)]),dropMenu:l.withCtx(()=>[l.createElementVNode("div",Fn,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(b==null?void 0:b.contents,K=>(l.openBlock(),l.createBlock(Te,{key:K==null?void 0:K.label,style:{width:"100%",margin:"0",border:"none",display:"flex","justify-content":"flex-start"},onClick:ue=>Ye(K==null?void 0:K.label)},{default:l.withCtx(()=>{var ue,ke;return[l.createTextVNode(l.toDisplayString(K==null?void 0:K.label),1),(ue=K==null?void 0:K.label)!=null&&ue.includes("选中")?(l.openBlock(),l.createElementBlock("span",Vn,"("+l.toDisplayString(O.selectNums)+")",1)):l.createCommentVNode("",!0),(ke=K==null?void 0:K.label)!=null&&ke.includes("全部")?(l.openBlock(),l.createElementBlock("span",Kn,"("+l.toDisplayString(O.dataNums)+")",1)):l.createCommentVNode("",!0)]}),_:2},1032,["onClick"]))),128))])]),_:2},1024)):l.createCommentVNode("",!0),b!=null&&b.type?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Te,{key:2,id:"themeButton",style:l.normalizeStyle({background:"transparent",color:(b==null?void 0:b.label)==="新增"?"var(--ssbutton-theme-bg)":"#666666"}),onClick:K=>Ye(b==null?void 0:b.label)},{icon:l.withCtx(()=>{var K;return[l.createVNode(R,{name:(K=Se==null?void 0:Se.find(ue=>(ue==null?void 0:ue.label)===(b==null?void 0:b.label)))==null?void 0:K.icon},null,8,["name"])]}),default:l.withCtx(()=>[l.createTextVNode(" "+l.toDisplayString(b==null?void 0:b.label),1)]),_:2},1032,["style","onClick"]))]))),128))])):l.createCommentVNode("",!0)])]))}}},qn=Fl._export_sfc(zn,[["__scopeId","data-v-dc7dc670"]]),Rn=l.defineComponent({__name:"batch",props:{lockingPage:Boolean,buttons:{type:Array,default:()=>[]},selectTableItems:{type:Array,default:()=>[]},columns:{type:Array,default:()=>[]}},emits:["buttonClick"],setup(O,{emit:Z}){const Q=O,P=Z,j=ee=>{P("buttonClick",ee)},i=ee=>{var fe;return ee!=null&&ee.includes("删除")?((fe=Q.selectTableItems)==null?void 0:fe.length)>0?"warning-active-type":"warning-type":"default-type"};return(ee,fe)=>{const Se=l.resolveComponent("el-button");return l.openBlock(),l.createElementBlock("div",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(O.buttons,ge=>(l.openBlock(),l.createBlock(Se,{key:ge==null?void 0:ge.label,disabled:!!O.lockingPage,class:l.normalizeClass(i(ge==null?void 0:ge.label)),onClick:ze=>j(ge==null?void 0:ge.label)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(ge==null?void 0:ge.label),1)]),_:2},1032,["disabled","class","onClick"]))),128))])}}}),Jn=Fl._export_sfc(Rn,[["__scopeId","data-v-70b12973"]]),ka=k.defineStore("formToTableComp",{state:()=>({selectArray:[],selectString:""}),actions:{setSelectArray(O){this.selectArray=O},setSelectString(O){this.selectString=O}}}),Wn={class:"calculator-content"},Gn={class:"calculator-child"},Hn={class:"calculator-child"},Qn=l.defineComponent({__name:"calculator",setup(O){const Z=l.ref(),Q=l.ref();return l.onMounted(()=>{Z.value=[{type:"Upload",label:"输入",name:"input"}],Q.value=[{type:"Upload",label:"输出",name:"output"}]}),(P,j)=>(l.openBlock(),l.createElementBlock("div",Wn,[l.createElementVNode("div",Gn,[l.createVNode(Xe.ssForm,{rowContents:Z.value,isRowFlex:!0},null,8,["rowContents"])]),l.createElementVNode("div",Hn,[l.createVNode(Xe.ssForm,{rowContents:Q.value,isEdit:!1,isRowFlex:!0},null,8,["rowContents"])])]))}}),Xn=Fl._export_sfc(Qn,[["__scopeId","data-v-73db0fe7"]]),ma=k.defineStore("unit",{state:()=>({selectIndex:"",selectMenu:"",selectTitle:[]}),actions:{setSelectIndex(O){this.selectIndex=O},setSelectMenu(O){this.selectMenu=O},setSelectTitle(O){this.selectTitle=O}}}),Ql=(O,Z)=>{let Q=O,P=Z;return Array.isArray(Q)&&(Q=Q==null?void 0:Q.map((j,i)=>{if(Array.isArray(j)){let ee={};return j=j==null?void 0:j.forEach((fe,Se)=>{var ge;(ge=P==null?void 0:P[Se])!=null&&ge.prop?ee[P[Se].prop]=fe:Array.isArray(fe)&&(ee.children=Ql(fe,P))}),Object.assign(ee,{id:i})}else return j})),Q},Sa=(O,Z,Q)=>{let P=O,j=Z;return P=P==null?void 0:P.map((i,ee)=>{var fe,Se;return!Array.isArray(i)||!((fe=j==null?void 0:j[ee])!=null&&fe.label)&&!Q||(i.unshift(((Se=j==null?void 0:j[ee])==null?void 0:Se.label)??""),i.some(ge=>Array.isArray(ge))&&(i=i==null?void 0:i.map(ge=>{var ze;return Array.isArray(ge)&&(ge=Sa(ge,(ze=j==null?void 0:j[ee])==null?void 0:ze.children,Q)),ge}))),i}),P},Yn=(O,Z,Q)=>{if(Z==="")return O==null?void 0:O.filter(P=>(P==null?void 0:P.id)!==Q);{const P=Z.split("-");return Zn(O,P,Q)}},Zn=(O,Z,Q)=>{let P=O,j=Z;return(j==null?void 0:j.length)===0?P=P==null?void 0:P.filter(i=>i.id!==Q):P=P==null?void 0:P.map(i=>(i.id.toString()===(j==null?void 0:j[0])&&(j==null||j.shift(),i=Ca(i,j,Q)),i)),P},Ca=(O,Z,Q)=>{var i,ee;let P=O,j=Z;return(j==null?void 0:j.length)===0?P.children=(i=P.children)==null?void 0:i.filter(fe=>fe.id!==Q):P.children=(ee=P.children)==null?void 0:ee.map(fe=>(fe.id.toString()===(j==null?void 0:j[0])&&(j==null||j.shift(),fe=Ca(fe,j,Q)),fe)),P},In=(O,Z,Q)=>{if(Z==="")return Q;{const P=Z.split("-");return er(O,P,Q)}},er=(O,Z,Q)=>{let P=O,j=Z;return(j==null?void 0:j.length)===0?P=Q:P=P==null?void 0:P.map(i=>(i.id.toString()===(j==null?void 0:j[0])&&(j==null||j.shift(),i=xa(i,j,Q)),i)),P},xa=(O,Z,Q)=>{var i;let P=O,j=Z;return(j==null?void 0:j.length)===0?P.children=Q:P.children=(i=P.children)==null?void 0:i.map(ee=>(ee.id.toString()===(j==null?void 0:j[0])&&(j==null||j.shift(),ee=xa(ee,j,Q)),ee)),P},Da=k.defineStore("formComp",{state:()=>({objUrl:[],blobUrls:[]}),actions:{setObjUrl(O){this.objUrl=O},setBlobUrls(O){this.blobUrls=O}}}),Xl=async(O,Z)=>{var ee,fe,Se,ge,ze,Ye,ol,Be,nl,rl,ce,ve,re,R,z,Te,Fe;let Q=(fe=(ee=k.cloneDeep(O))==null?void 0:ee.optionUrl)==null?void 0:fe.menuSelect,P=[];Q==null||Q.forEach(ne=>{});let j="",i=await ae.menuToParent(Q);if(i==null||i.forEach(ne=>{var Pe,Oe,W,b;(ne==null?void 0:ne.name)===(((b=(W=(Oe=(Pe=k.cloneDeep(O))==null?void 0:Pe.optionUrl)==null?void 0:Oe.groupSelect)==null?void 0:W[0])==null?void 0:b.replaceAll("'",""))??"")&&(j=ne==null?void 0:ne.id)}),Z){j=Z;const ne=await k.getInsofDataApi({id:j}),Pe=(Ye=(ze=(ge=(Se=ne==null?void 0:ne.data)==null?void 0:Se.result)==null?void 0:ge[0])==null?void 0:ze.key)==null?void 0:Ye.pageKey;i=await ae.getItemData(Pe,sessionStorage.getItem("systemKey"),"")}if(j!==""){let ne;Z?ne=(ol=i==null?void 0:i.find(W=>(W==null?void 0:W.id)===Z))==null?void 0:ol.compData:ne=(Be=i==null?void 0:i.find(W=>{var b,Ee,K,ue;return(W==null?void 0:W.name)===(((Ee=(b=O==null?void 0:O.groupSelect)==null?void 0:b.split(":"))==null?void 0:Ee[0])||((ue=(K=O==null?void 0:O.optionUrl)==null?void 0:K.groupSelect)==null?void 0:ue[0]))}))==null?void 0:Be.compData;let Pe=(rl=(nl=ne==null?void 0:ne.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:nl.contents)==null?void 0:rl.map(W=>W==null?void 0:W.label);(ve=(ce=ne==null?void 0:ne.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:ce.contents)!=null&&ve.every(W=>Array.isArray(W))&&(Pe=(z=ae.getColumnChild((R=(re=ne==null?void 0:ne.find(W=>(W==null?void 0:W.key)==="header"))==null?void 0:re.contents)==null?void 0:R[0]))==null?void 0:z.map(W=>W==null?void 0:W.prop));let Oe=(Fe=(Te=ne==null?void 0:ne.find(W=>(W==null?void 0:W.key)==="tableContents"))==null?void 0:Te.contents)==null?void 0:Fe.map(W=>(W=W==null?void 0:W.filter(b=>!(b!=null&&b.id)),W));Oe==null||Oe.forEach(W=>{P.push(ae.getValueToObjectValue(W,Pe))})}return P},lr={class:"table-content"},ar={class:"menu-config-wrap"},nr=["onClick"],rr={key:0,class:"viewport-wrap"},or=["onClick"],tr={title:"选择显示列信息"},ir={class:"menu-config-wrap",style:{padding:"0 0 0 16px","box-sizing":"border-box","min-height":"200px",width:"400px",overflow:"auto",position:"relative"}},sr=["title"],ur={class:"col-operate-wrap"},cr={title:"拖拽排序列",style:{cursor:"move",color:"grey",position:"absolute",right:"15px"}},dr={class:"pop-view"},pr={class:"pop-wrapper"},fr={class:"file-list-pop"},gr=["title","onClick"],hr=["onClick"],yr=["onClick"],vr={class:"form-content"},br={key:0,class:"dialog-footer"},kr={class:"dialog-footer"},mr={class:"form-content"},Sr={__name:"index",props:{pageLayout:{type:String,default:"vertical"},level:{type:Number,default:1},compName:{type:String,default:"",required:!1},compNames:{type:Array,default:()=>[],required:!1},compItem:{type:Object,default:()=>{}},operatingForm:{type:Object,default:()=>{}},cacheNewData:{type:Object,default:()=>{}},config:Object,parentTableId:{type:Number,default:0},itemData:{type:Array,default:()=>[]},childItemData:{type:Array,default:()=>[]},index:Number,isDevMode:Boolean,changedContent:{type:Object,default:()=>{}},showHeader:{type:Boolean,default:!0},allowSelect:{type:Boolean,default:!1},allowOperate:{type:Boolean,default:!0},allMapContents:{type:Object,default:()=>{}}},emits:["getSliceContLength","clickMainKey","change","contentChange","onButtonClick","contentClick","pageChange","rowClick","routeUrl"],setup(O,{emit:Z}){var ha;const Q=l.ref([]),P=Da(k.pinia),j=l.ref(null),i=O,ee=l.ref(i==null?void 0:i.allowSelect),fe=l.ref((ha=i==null?void 0:i.config)==null?void 0:ha.showIndex),Se=l.ref(),ge=l.ref([{label:"排序",value:"sortable",checked:!1},{label:"筛选",value:"filterable",checked:!1},{label:"合计",value:"showSummary",checked:!1},{label:"编辑",value:"operable",checked:!1}]),ze=ae.useOriginalState(k.pinia);let Ye="$R";const{originalPath:ol}=k.storeToRefs(ze),Be=ol.value,nl=l.ref(!1),rl=l.ref(!1),ce=l.ref(!1),ve=l.reactive({column:{},status:!1,text:"合计"}),re=l.reactive({currentPage:1,pageSize:10,total:0,pageSizes:[5,10,20,50,100]}),R=Z,z=l.ref([]),Te=l.reactive({prop:"",order:null}),Fe=l.ref([]),ne=l.ref(!1),Pe=l.ref(!1),Oe=l.ref(null),{isUseBackdrop:W,initTrackFileType:b,getFileExtension:Ee,setData:K,getFileInfo:ue,getFilesInfo:ke}=ya.useThreeSystem(),Ne=l.ref([]),Le=l.ref(!1),dl=l.ref(),_e=$l.useMenuState(),{importLoading:xr,activeMenuPath:me,contentLoading:Dr,linkMenuInfo:Ta}=k.storeToRefs(_e),Na=ae.useTableComp(k.pinia),xe=$l.useModelComp(k.pinia),{extraContents:be,cacheUpdatingData:yl,tableViewContents:vl,tableLoading:Tr,pageMapState:pl,lockingPage:Nl}=k.storeToRefs(xe),X=l.ref([]),Bl=l.ref([]),El=l.ref(new Map);l.ref(!1);const Ze=l.ref("");l.ref();const Al=l.ref(!0),fl=l.ref(0),Yl=l.ref(!0),qe=l.ref(""),Ie=l.ref(!1),Ba=l.ref({label:"查看三维模型"}),_l=l.ref(!1),Vl=l.ref(),Ve=l.ref([]),tl=l.ref([]),wl=l.ref(!1),bl=l.ref([]),gl=l.ref([]),il=l.ref([]),Ae=l.ref([]),Re=l.ref(),je=l.ref(),Ea=ka(k.pinia),Ul=l.ref(),Kl=l.ref(0),Ol=ma(k.pinia),{selectIndex:Aa,selectMenu:ll,selectTitle:zl}=k.storeToRefs(Ol),{selectString:sl}=k.storeToRefs(Ea),_a=k.useLoginState(k.pinia),{loginUserInfo:el}=k.storeToRefs(_a),wa=l.ref(720),Je=l.ref(!1),Ll=l.ref(!1),We=l.ref([]),ul=l.ref(),kl=l.ref(!0),Zl=l.ref(!0),cl=l.ref([]),Ua=l.inject("contentRef");l.provide("contentRef",Ua),l.watch(()=>{var e;return(e=X.value)==null?void 0:e.length},e=>{re.total=e}),l.watch(()=>vl.value,async()=>{var s,c,d,p,h,v,_,U,g,B,D,T,$,M,F,t,m,y;if(((s=vl.value)==null?void 0:s.length)===0||!((c=i==null?void 0:i.itemData)!=null&&c.find(N=>(N==null?void 0:N.key)==="columnPath"))||!((d=i==null?void 0:i.itemData)!=null&&d.find(N=>(N==null?void 0:N.key)==="pageColumn")))return;let e=(g=(U=(_=(v=(h=(p=i==null?void 0:i.itemData)==null?void 0:p.find(N=>(N==null?void 0:N.key)==="pageColumn"))==null?void 0:h.contents)==null?void 0:v.split("["))==null?void 0:_[1])==null?void 0:U.split("]"))==null?void 0:g[0],a=(($=(T=(D=(B=i==null?void 0:i.itemData)==null?void 0:B.find(N=>(N==null?void 0:N.key)==="pageColumn"))==null?void 0:D.contents)==null?void 0:T.split("["))==null?void 0:$[0])+((F=(M=vl.value)==null?void 0:M.find(N=>(N==null?void 0:N.key)===e))==null?void 0:F.value),r=((m=(t=i==null?void 0:i.itemData)==null?void 0:t.find(N=>(N==null?void 0:N.key)==="pageGroup"))==null?void 0:m.contents)??"",n=await ae.getItemData(a,sessionStorage.getItem("systemKey"),""),o=(y=n==null?void 0:n.find(N=>(N==null?void 0:N.name)===(r===""?i==null?void 0:i.compName:r)))==null?void 0:y.compData;fa(o,i.allMapContents)},{deep:!0});const Oa=async(e,a)=>{var r,n,o,s,c;try{const d=await k.getInsofDataApi({id:(i==null?void 0:i.parentTableId)||(i==null?void 0:i.index)});let p;((r=d==null?void 0:d.data)==null?void 0:r.code)===200&&(p=((o=(n=d==null?void 0:d.data)==null?void 0:n.result)==null?void 0:o[0])||null);const h={type:"data",pageKey:i!=null&&i.parentTableId?(s=p==null?void 0:p.key)==null?void 0:s.pageKey:me.value,tableId:(i==null?void 0:i.parentTableId)||(i==null?void 0:i.index),systemKey:sessionStorage.getItem("systemKey")},v=a==null?void 0:a.map(g=>{const B=Object.keys(g),D={};return B.forEach((T,$)=>{D[e[$]]=g[T]}),D}),_=v==null?void 0:v.map(g=>({key:h,value:{tableData:g}})),U=await k.batchAddInsofDataApi({dataList:_});((c=U==null?void 0:U.data)==null?void 0:c.code)===200?(xe.setRefreshCurStructure(!0),k.ElMessage.success("导入数据成功")):k.ElMessage.error("导入数据响应失败")}catch(d){throw k.ElMessage.error("导入数据处理失败"),new Error(d)}},La=async e=>{var a,r;if(e!=null&&e.includes(".txt")||e!=null&&e.includes(".cpt")||e!=null&&e.includes(".cyd")){const n=await k.axios.get(e,{responseType:"blob",headers:{"Content-Type":"application/json"}}),o=new Blob([n.data],{type:"application/octet-stream;charset=UTF-8"});let s=URL.createObjectURL(o);dl.value=[{name:(r=e==null?void 0:e.split("/"))==null?void 0:r[((a=e==null?void 0:e.split("/"))==null?void 0:a.length)-1],blobUrl:s}],Le.value=!0}};l.onBeforeUnmount(()=>{Zl.value=!1;let e=Kl.value;Kl.value=e+1});const Il=l.computed(()=>{var n,o;const e=(re.currentPage-1)*re.pageSize,a=e+re.pageSize,r=(n=z.value)==null?void 0:n.find(s=>{var c;return(s==null?void 0:s.sortable)&&((c=s==null?void 0:s.label)==null?void 0:c.includes("时间"))});return r&&(Te.order="descending",Te.prop=r==null?void 0:r.prop),R("getSliceContLength",re),(o=X.value)==null?void 0:o.slice(e,a)}),ja=e=>{re.currentPage=e,R("getSliceContLength",re)},Ma=e=>{var a;re.pageSize=e,e*re.currentPage>((a=X.value)==null?void 0:a.length)&&(re.currentPage=1,re.pageSize=10,k.ElMessage.warning("分页无效,返回第一页")),R("getSliceContLength",re)},Pa=(e,a)=>{var c,d;const r=(d=(c=z.value)==null?void 0:c.map(p=>p==null?void 0:p.prop))==null?void 0:d.filter(p=>p!=="operate");let n;const o=(e==null?void 0:e.length)===(r==null?void 0:r.length);if(e!=null&&e.includes("序号"))return k.ElMessage.error("导入的数据不需要包含序号列");if(n=o?e:e.slice(0,r==null?void 0:r.length),!(n==null?void 0:n.every(p=>r==null?void 0:r.find(h=>p===h))))return k.ElMessage.error("导入的数据表头不匹配");Oa(n,a)},$a=(e,a)=>{var r;xe.setRefreshCurStructure(!1),((r=z.value)==null?void 0:r.length)===0||Pa(e,a)},Fa=(e,a,r,n)=>{const o=[],s=[],c=h=>Object.keys(h).length;for(const h in e)if(e[h]!==void 0){const v=e[h],_=[];for(const[U,g]of Object.entries(v))_.push(g),s.length<c(v)&&s.push(U);o.push(_)}o.unshift(s);const d=ae.utils.aoa_to_sheet(o),p=ae.utils.book_new();ae.utils.book_append_sheet(p,d,n),ae.writeFileSync(p,`${a}.xlsx`),We.value=[]},jl=async(e,a,r,n=!1,o)=>{var s,c,d,p,h,v,_,U;try{xe.setRefreshCurStructure(!1);const g=await k.getInsofDataApi({id:i==null?void 0:i.index});if(((s=g==null?void 0:g.data)==null?void 0:s.code)===200){let B=(h=(p=(d=(c=g==null?void 0:g.data)==null?void 0:c.result)==null?void 0:d[0])==null?void 0:p.value)==null?void 0:h.pageData;n?B={...B,compData:(_=B==null?void 0:B.compData)==null?void 0:_.map(T=>{var $;return(T==null?void 0:T.key)==="header"?{...T,contents:($=T==null?void 0:T.contents)==null?void 0:$.map(M=>({...M,[e]:r}))}:T})}:B={...B,compData:(v=B==null?void 0:B.compData)==null?void 0:v.map(T=>{var $,M;return(T==null?void 0:T.key)==="header"?{...T,contents:($=T==null?void 0:T.contents)==null?void 0:$.map(F=>(F==null?void 0:F.prop)===(a==null?void 0:a.prop)?{...F,[e]:r}:F)}:(T==null?void 0:T.key)==="tableToForm"&&o?{...T,contents:(M=T==null?void 0:T.contents)==null?void 0:M.map(F=>(F==null?void 0:F.prop)===(a==null?void 0:a.prop)?{...F,[o]:r}:F)}:T})};const D=await k.updateInsofDataApi({id:i==null?void 0:i.index,value:{pageData:B}});((U=D==null?void 0:D.data)==null?void 0:U.code)===200?(k.ElMessage.success("编辑成功"),xe.setRefreshCurStructure(!0)):k.ElMessage.error("编辑响应失败")}}catch(g){k.ElMessage.error(g)}},Va=async(e,a)=>{await jl("label",a,e)},Ka=async(e,a)=>{await jl("columnType",a,e,!1,"type")},za=()=>{yl.value?Je.value=!1:ga()},qa=e=>{We.value=e},Ra=(e,a)=>{ul.value===a?kl.value=!1:kl.value=!0,ul.value=a==null?void 0:a.changeProp},ml=l.computed(()=>{var r,n,o;const e=(r=z.value)==null?void 0:r.some(s=>s==null?void 0:s.filterable);return document.documentElement.style.setProperty("--ssTable-header-filter-display",e?"inline-block":"none"),(o=(n=z.value)==null?void 0:n.filter(s=>(s==null?void 0:s.label)!=="操作"))==null?void 0:o.map(s=>({...s,filterable:!!(s!=null&&s.filterable),showSummary:!!(s!=null&&s.showSummary),operable:!!(s!=null&&s.operable)}))}),Ja=async(e,a,r)=>{const n=k.cloneDeep(z.value);await l.nextTick(),z.value=n==null?void 0:n.map(o=>(r==null?void 0:r.label)===(o==null?void 0:o.label)?{...o,[a]:e}:o),await jl(a,r,e)},ql=async(e,a)=>{await jl(a,null,e,!0)},Wa=()=>{Ie.value=!1},Ga=e=>{R("clickTrigger",e)},ea=async e=>{var s,c,d,p,h,v,_,U,g,B,D,T,$,M,F;const a=e==null?void 0:e.row,r=e==null?void 0:e.rowData,n=e==null?void 0:e.suffix;if((s=a==null?void 0:a.toString())!=null&&s.includes(".urdf")||e!=null&&e.isUrdf||n!=null&&n.includes(".urdf")){if(a.includes(",")){k.ElMessage.error("当前版本仅允许单个urdf预览!");return}if(W(a)){const m={files:[ue(a)],data:{}};K(m);return}bl.value=[{url:a,extension:Ee(a)}],Pe.value=!0,Oe.value={data:k.cloneDeep(r)},ne.value=!0;return}let o=[];if((c=a==null?void 0:a.toString())!=null&&c.includes(".stl")||(d=a==null?void 0:a.toString())!=null&&d.includes(".STL")||(p=a==null?void 0:a.toString())!=null&&p.includes(".obj")||(h=a==null?void 0:a.toString())!=null&&h.includes(".mtl")){const t=(v=a==null?void 0:a.toString())==null?void 0:v.split(","),m=ke(t),y=m==null?void 0:m[0];if(W(y==null?void 0:y.extension)){K({files:m,data:{}});return}bl.value=m,Pe.value=!1,ne.value=!0;return}if((_=a==null?void 0:a.toString())!=null&&_.includes(".stl")||(U=a==null?void 0:a.toString())!=null&&U.includes(".STL")||(g=a==null?void 0:a.toString())!=null&&g.includes(".obj")||(B=a==null?void 0:a.toString())!=null&&B.includes(".mtl")||n!=null&&n.includes(".stl")||n!=null&&n.includes(".STL")||n!=null&&n.includes(".obj")||n!=null&&n.includes(".mtl")){let t,m=[],y={};if(Array.isArray(a)?t=a:t=a==null?void 0:a.split(","),t==null||t.forEach(N=>{N.includes(".mtl")?m.push(N):y.blob=y.blob?y.blob+","+N:N}),(m==null?void 0:m.length)>0&&(y.mtlBlobs=m),n&&(y.suffix=n),(T=(D=Object.values(y))==null?void 0:D[0])!=null&&T.includes("http:"))o.push(y);else{const N=new Blob([y.blob],{type:"application/octet-stream;charset=UTF-8"});let x=URL.createObjectURL(N),H="";($=a==null?void 0:a.split("/"))==null||$.forEach((f,w)=>{var S;w===((S=a==null?void 0:a.split("/"))==null?void 0:S.length)-1&&(H=f)}),(M=y.blob)!=null&&M.includes(".stl")&&(H=(H==null?void 0:H.replaceAll(">",""))+".urdf"),dl.value=[{name:H,blobUrl:x}],Le.value=!0}}else{const t=await k.axios.get(a,{responseType:"blob",headers:{"Content-Type":"application/json"}}),m=new Blob([t.data],{type:"application/octet-stream;charset=UTF-8"});let y=URL.createObjectURL(m),N="";if((F=a==null?void 0:a.split("/"))==null||F.forEach((x,H)=>{var f;H===((f=a==null?void 0:a.split("/"))==null?void 0:f.length)-1&&(N=x)}),W(N)){const x=b(N),H=ue(a);K({files:[H],data:{trackFileType:x}});return}dl.value=[{name:N,blobUrl:y}],Le.value=!0}(o==null?void 0:o.length)>0&&P.setBlobUrls(o)},Ml=e=>{var n,o,s,c;if(e!=null&&e.downloadUrl)return e==null?void 0:e.name;const a=(c=(n=e==null?void 0:e.url)==null?void 0:n.split("."))==null?void 0:c[((s=(o=e==null?void 0:e.url)==null?void 0:o.split("."))==null?void 0:s.length)-1];return(e==null?void 0:e.name)+"."+a},Ha=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const o=await Rl(),s=Xe.ElLoading.service({lock:!0,text:"Loading",background:"rgba(0, 0, 0, 0.7)"}),c=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:o,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}).finally(()=>{s.close()}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),r=e==null?void 0:e.name}else{const o=await ae.downloadAvatarApi({url:e==null?void 0:e.url});!e.url.toUpperCase().includes(".OBJ")&&!e.url.toUpperCase().includes(".STL")&&!e.url.toUpperCase().includes(".MTL")&&!e.url.toUpperCase().includes(".URDF")?(a=URL.createObjectURL(o.data),r=Ml(e)):a=e==null?void 0:e.url}if(W(a)){const o={row:`${a}`,suffix:Ee(r)};ea(o);return}const n={name:r,blobUrl:a};dl.value=[n],Le.value=!0},Qa=async e=>{let a=null,r=null;if(e!=null&&e.downloadUrl){const s=await Rl(),c=await k.axios.post(e==null?void 0:e.url,null,{responseType:"blob",headers:{Authorization:s,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}}),d=new Blob([c.data],{type:"application/octet-stream;charset=UTF-8"});a=URL.createObjectURL(d),r=e==null?void 0:e.name}else{const s=await ae.downloadAvatarApi({url:e==null?void 0:e.url});a=URL.createObjectURL(s.data),r=Ml(e)}const n={name:r,blobUrl:a},o=document.createElement("a");o.href=n.blobUrl,o.download=n.name,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)},Xa=(e,a)=>{var r;if(Object.values(a).length!==0)return Object.values(a).find(n=>{var o,s,c;return((o=n==null?void 0:n.toString())==null?void 0:o.includes(".txt"))||((s=n==null?void 0:n.toString())==null?void 0:s.includes(".cpt"))||((c=n==null?void 0:n.toString())==null?void 0:c.includes(".obj"))})?[...e,Ba.value]:(r=i==null?void 0:i.config)!=null&&r.allowMove?[...e,{label:"迁移"}]:e},Ya=(e,a={})=>[...e==null?void 0:e.values()].filter(r=>Object.keys(a).every(n=>{var c;const o=r[n],s=(c=a[n])==null?void 0:c.toLowerCase();return s&&o&&typeof o=="string"?o.toLowerCase().includes(s):!0})),la=l.ref([]),Za=async(e,a,r=!1)=>{var n;if(e){if(xe.setTableLoading(!0),la.value=Object.values(e),e&&((n=Object.values(e))!=null&&n.every(o=>!o)))return X.value=Bl.value;if(r){X.value=[...El.value.values()].filter(o=>Object.values(o).some(s=>typeof s=="string"?s==null?void 0:s.toLowerCase().includes(a==null?void 0:a.toLowerCase()):!1));return}X.value=Ya(El.value,e),xe.setTableLoading(!1)}},Ia=async e=>{var c,d,p,h,v,_,U,g,B,D,T,$,M,F,t;const a=await k.getInsofDataApi({keyLikes:{pageKey:`loading${((c=el.value)==null?void 0:c.account)||((d=el.value)==null?void 0:d.账号)}`,systemKey:sessionStorage.getItem("systemKey")}}),r=await k.getInsofDataApi({keyLikes:{pageKey:`updateLoading${((p=el.value)==null?void 0:p.account)||((h=el.value)==null?void 0:h.账号)}`,systemKey:sessionStorage.getItem("systemKey")}});let n=(_=(v=a==null?void 0:a.data)==null?void 0:v.result)==null?void 0:_.map(m=>m==null?void 0:m.id);const o=(g=(U=r==null?void 0:r.data)==null?void 0:U.result)==null?void 0:g.map(m=>m==null?void 0:m.id);n=[...k.cloneDeep(n),...o],(n==null?void 0:n.length)>0&&(n!=null&&n.every(m=>m!==null&&m))&&await k.batchDeleteInsofDataApi({ids:n});let s=await ae.getItemData(me.value,sessionStorage.getItem("systemKey"),e.id);if(s=s==null?void 0:s.filter(m=>m.comp!=="methodButton"),s&&s.length>0){const m=!Array.isArray(zl.value)&&((B=zl.value)==null?void 0:B.key)!=="main"?[]:zl.value;m.push({key:ll.value===""?(D=e==null?void 0:e.id)==null?void 0:D.toString():ll.value+"-"+((T=e==null?void 0:e.id)==null?void 0:T.toString()),value:e[($=Object.keys(e))==null?void 0:$.filter(y=>y!=="index"&&y!=="id")[0]]}),Ol.setSelectMenu(ll.value===""?(M=e==null?void 0:e.id)==null?void 0:M.toString():ll.value+"-"+((F=e==null?void 0:e.id)==null?void 0:F.toString())),Ol.setSelectTitle(m),Ol.setSelectIndex((t=e==null?void 0:e.id)==null?void 0:t.toString()),R("pageChange",s)}},aa=async(e,a,r,n)=>{var o,s,c,d,p,h;if(R("clickMainKey",r),(n==null?void 0:n.isExistChild)===!0){let v=(o=n==null?void 0:n.columnType)==null?void 0:o.prop,_=n==null?void 0:n.data;if(cl.value=await ae.getItemData(me.value,sessionStorage.getItem("systemKey"),""),!cl.value){let g=(d=(c=(s=me.value)==null?void 0:s.split("/"))==null?void 0:c.filter((B,D)=>{var T,$;return D!==(($=(T=me.value)==null?void 0:T.split("/"))==null?void 0:$.length)-1}))==null?void 0:d.join("/");cl.value=await ae.getItemData(g,sessionStorage.getItem("systemKey"),"")}let U=(p=cl.value)==null?void 0:p.filter(g=>(g==null?void 0:g.name)===v);cl.value=U==null?void 0:U.map(g=>{var B;return g.compData=(B=g.compData)==null?void 0:B.map(D=>{var T,$;return(D==null?void 0:D.key)==="tableContents"&&(T=D==null?void 0:D.contents)!=null&&T.every(M=>M==null?void 0:M.find(F=>F==null?void 0:F.id))&&(D.contents=($=D==null?void 0:D.contents)==null?void 0:$.filter(M=>(M==null?void 0:M[1])===_)),D}),g}),R("routeUrl",cl.value,{isEdit:!0,routerUrl:me.value});return}if((n==null?void 0:n.data)==="查看"&&(e!=null&&e.every(v=>(v==null?void 0:v.url)&&(v==null?void 0:v.name)))){let v=k.cloneDeep(e);v=await((h=k.cloneDeep(v))==null?void 0:h.map(async U=>{var D,T,$,M;const g=await ae.downloadAvatarApi({url:U==null?void 0:U.url});let B=URL.createObjectURL(g.data);return{name:(U==null?void 0:U.name)+"."+((M=(D=U==null?void 0:U.url)==null?void 0:D.split("."))==null?void 0:M[(($=(T=U==null?void 0:U.url)==null?void 0:T.split("."))==null?void 0:$.length)-1]),blobUrl:B}}));let _=await Promise.all(v);dl.value=_,Le.value=!0}k.cloneDeep(z.value),(n==null?void 0:n.isMainKey)===!0&&(_e.setActiveMenuPath(void 0),xe.setRouteToChildPath(void 0),xe.setFixMenuStatus(!0),_e.setActiveMenuPath(k.cloneDeep(me).value+"/"+(n==null?void 0:n.data)))},en=()=>{Le.value=!1},ln=e=>{R("rowClick",e)};l.watch(()=>i.changedContent,()=>{var r,n;if(!i.changedContent)return;let e=(r=X.value)==null?void 0:r.map(o=>{var s;return o.id===((s=i.changedContent)==null?void 0:s.id)&&(o={...i.changedContent,id:i.changedContent.newId?i.changedContent.newId:i.changedContent.id},delete o.newId),o});const a=(n=i.itemData)==null?void 0:n.map(o=>((o==null?void 0:o.key)==="tableContents"&&(o.contents=e),o));X.value=e,R("contentChange",{contents:a,index:i.index}),R("change",{content:e,index:i==null?void 0:i.index,buttonName:"",id:i==null?void 0:i.index})},{deep:!0,immediate:!0});const an=()=>{},nn=async()=>{const e=me.value,a=sessionStorage.getItem("systemKey"),r=await ae.getItemData(e,a,""),n=(r==null?void 0:r.find(d=>(d==null?void 0:d.name)==="方法明细"))||(r==null?void 0:r[0]),o=(n==null?void 0:n.compData)||[],s=o==null?void 0:o.find(d=>{const p=d==null?void 0:d.key;return p==="formContent"||p==="tableContents"});return s==null?void 0:s.contents},Rl=async()=>`Bearer ${k.Local.get("access-token")}`,rn=async(e,{token:a,inputData:r}={})=>await k.axios.post(e,r,{headers:{Authorization:a}}).catch(o=>(_e.setImportLoading(!1),Promise.reject(o))),on=e=>{const a=[],r=n=>{n&&typeof n=="object"&&!Array.isArray(n)?Object.values(n).forEach(r):a.push(n)};return r(e),a},tn=async(e,a,r)=>{var M,F,t,m,y,N,x,H;_e.setImportLoading(!0),xe.setFreshContent(!1);let n=await nn().catch(f=>(_e.setImportLoading(!1),Promise.reject(f)));n=n==null?void 0:n.filter(f=>{var w;return((w=f==null?void 0:f.find(S=>S==null?void 0:S.id))==null?void 0:w.id)===(a==null?void 0:a.id)});let o=ae.getEqualChild([(M=z.value)==null?void 0:M.filter(f=>(f==null?void 0:f.label)!=="操作")]);const s=(t=(F=ae.tableToForm(n,o))==null?void 0:F[0])==null?void 0:t.find(f=>{const w=f==null?void 0:f.key;return w==="算法体"||w==="方法体"}),c=s==null?void 0:s.value;if(!c){console.log("未搜索到isMain, 缺少算法执行接口"),_e.setImportLoading(!1);return}const d=z.value?ae.getEqualChild([z.value]):[],p=d.find(f=>{const w=f==null?void 0:f.prop;return w==="输入"||w==="输入数据.输入1"||w==="样本输入数据"}),h=p==null?void 0:p.prop;let v=a==null?void 0:a[h];const _=await Rl().catch(f=>(_e.setImportLoading(!1),Promise.reject(f))),U=await rn(c,{token:_,inputData:v}).catch(f=>(_e.setImportLoading(!1),Promise.reject(f))),g=(m=U==null?void 0:U.data)==null?void 0:m.data,B=d.find(f=>(f==null?void 0:f.prop)==="输出数据.输出1"),D=B==null?void 0:B.prop;let T=[],$=[];if(((y=Object.values(g))==null?void 0:y.length)>0){let f=[];const w=new FormData,S=(N=on(g))==null?void 0:N.map(async q=>{var A,L;if(!Array.isArray(q)&&(q!=null&&q.includes("http"))){let J=await k.axios.get(q,{responseType:"blob"}),Y=(L=q==null?void 0:q.split("/"))==null?void 0:L[((A=q==null?void 0:q.split("/"))==null?void 0:A.length)-1];w.append("files",J.data,Y)}else f.push(q)});if(await Promise.all(S),!ae.isFormDataEmpty(w)){let q=await ae.uploadAmountApi(w),A=(H=(x=q==null?void 0:q.data)==null?void 0:x.result)==null?void 0:H.map(L=>{var J,Y,oe,te,C,I;return{name:(I=(C=(te=(J=L==null?void 0:L.url)==null?void 0:J.split("/"))==null?void 0:te[((oe=(Y=L==null?void 0:L.url)==null?void 0:Y.split("/"))==null?void 0:oe.length)-1])==null?void 0:C.split("."))==null?void 0:I[0],url:L==null?void 0:L.url}});f=[...f,...A]}let G={};for(let q in a)q!=="id"&&(G[q]=a[q]);G[D]=f,$.push({id:a==null?void 0:a.id,value:{tableData:G}})}($==null?void 0:$.length)>0&&await k.batchUpdateInsofDataApi({dataList:$}),(T==null?void 0:T.length)>0&&await k.batchAddInsofDataApi({dataList:T}),xl(!0),_e.setImportLoading(!1),xe.setFreshContent(!0)},na=(e,a)=>(e=e==null?void 0:e.map(r=>{var n,o;return r!=null&&r.children&&((n=r.children)!=null&&n.find(s=>s.id===(a==null?void 0:a.id))?r.children=(o=r.children)==null?void 0:o.filter(s=>(s==null?void 0:s.id)!==(a==null?void 0:a.id)):r.children=na(r.children,a)),r}),e),De=l.reactive({title:"迁移至",show:!1,width:"20%",selectRow:null,from:i==null?void 0:i.index,to:null,contents:[],formRules:{groupName:[{required:!0,message:"输入不能为空",trigger:"blur"},{validator:(e,a,r)=>{a===(i==null?void 0:i.index)?r(new Error("选择源不能和目标源一致")):r()}}]},buttonValue:[{label:"取消",background:"#999999",color:"var(--ssbutton-theme-color)"},{label:"确认",background:"var(--ssbutton-theme-bg)",color:"var(--ssbutton-theme-color)"}]}),sn=()=>{De.show=!1},un=e=>{var a,r;if((e==null?void 0:e.buttonName)==="取消")return De.show=!1;De.to=e==null?void 0:e.content,!(!(i!=null&&i.index)||!((a=De.to)!=null&&a.groupName))&&(i==null?void 0:i.index)!==((r=De.to)==null?void 0:r.groupName)&&(R("change",{buttonName:"迁移",value:{from:De.from,to:De.to,data:De.selectRow}}),De.show=!1)},Pl=async(e,a,r)=>{var n,o,s,c,d,p,h,v,_,U,g,B,D,T,$;if(Ze.value="",wl.value=!0,Al.value=!0,R("onButtonClick",e,a),e==="删除")$l.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var M,F;(M=X.value)!=null&&M.find(t=>(t==null?void 0:t.id)===(a==null?void 0:a.id))?X.value=(F=k.cloneDeep(X.value))==null?void 0:F.filter(t=>(t==null?void 0:t.id)!==(a==null?void 0:a.id)):X.value=na(k.cloneDeep(X.value),a),Yn(Ul.value,ll.value,a==null?void 0:a.id),xe.setTableLoading(i==null?void 0:i.index),R("change",{content:X.value,singleContent:a,index:i==null?void 0:i.index,type:"delete",buttonName:e,column:z.value})});else if(e==="批量删除"){if(((n=We.value)==null?void 0:n.length)===0)return k.ElMessage.warning("请先勾选操作的数据");$l.ElMessageBox.confirm("是否确认删除","温馨提示",{confirmButtonText:"确认",cancelButtonText:"取消",type:"warning"}).then(()=>{var F,t;const M=(F=We.value)==null?void 0:F.map(m=>m.id);X.value=(t=k.cloneDeep(X.value))==null?void 0:t.filter(m=>!(M!=null&&M.includes(m.id))),xe.setTableLoading(i==null?void 0:i.index),R("change",{content:X.value,singleContent:null,selectItems:We.value,index:i==null?void 0:i.index,type:"batchDelete",buttonName:e,column:z.value})})}else if(e==="复制新增"){qe.value="新增";const M=k.cloneDeep(a),F=(o=z.value)==null?void 0:o.find(y=>y==null?void 0:y.isMainKey),t=F||((s=z.value)==null?void 0:s[0]),m=(c=il.value)==null?void 0:c.find(y=>(y==null?void 0:y.label)==="新建");await oa(!0,m,{data:M,firstCol:t})}else if(e==="新增")qe.value="新增",Cl(""),Ie.value=!0;else if(e==="编辑")qe.value="编辑",Cl(a),Ie.value=!0;else if(e==="查看")qe.value="查看",Cl(a),wl.value=!1,Al.value=!1,Ie.value=!0;else if(e==="查看三维模型"){const M={};for(let t in a)t!=="id"&&(M[t]=a[t]);let F=(d=Object.values(M))==null?void 0:d[1];Na.setTableShowThree(F)}else if(((p=r==null?void 0:r.extra)==null?void 0:p.type)==="modelExample")qe.value=e,_l.value=!0;else if(e==="新建"){let M=pl.value,F=[];for(let x in M)x!=null&&x.includes(`loading${((h=el.value)==null?void 0:h.account)||((v=el.value)==null?void 0:v.账号)}`)&&(F=[...F,...x]);let t=[];for(let x in M)x!=null&&x.includes(`updateLoading${((_=el.value)==null?void 0:_.account)||((U=el.value)==null?void 0:U.账号)}`)&&(t=[...t,...x]);let m=F==null?void 0:F.map(x=>x==null?void 0:x.id);const y=t==null?void 0:t.map(x=>x==null?void 0:x.id);m=[...k.cloneDeep(m),...y],(m==null?void 0:m.length)>0&&(m!=null&&m.every(x=>x!==null&&x))&&await k.batchDeleteInsofDataApi({ids:m});const N=(g=il.value)==null?void 0:g.find(x=>(x==null?void 0:x.label)==="新建");await oa(!1,N)}else if(e==="修改模板"){let M=k.cloneDeep(me).value;xe.setRouteToChildPath(M),_e.setActiveMenuPath(M+Be)}else if(e==="执行")tn(e,a);else if(e!=null&&e.includes("导出")){if(e==="导出选中"&&((B=We.value)==null?void 0:B.length)===0)return k.ElMessage.warning(`请先勾选${e}的数据`);if(e==="导出全部"&&((D=X.value)==null?void 0:D.length)===0)return k.ElMessage.warning("暂无数据导出");const M=($=(T=z.value)==null?void 0:T.map(t=>t==null?void 0:t.label))==null?void 0:$.filter(t=>t!=="操作"),F=e==="导出全部"?k.cloneDeep(X.value):k.cloneDeep(We.value);F==null||F.forEach(t=>{t==null||delete t.id}),Fa(F,i==null?void 0:i.compName,M,i==null?void 0:i.compName)}else e==="迁移"&&(De.selectRow=a,De.show=!0)},cn=async e=>{var r,n,o,s,c,d;const a=await k.getInsofDataApi({key:{pageKey:e,type:"structure",systemKey:sessionStorage.getItem("systemKey")}});if(((r=a==null?void 0:a.data)==null?void 0:r.code)===200)return Array.isArray((n=a==null?void 0:a.data)==null?void 0:n.result)&&((s=(o=a==null?void 0:a.data)==null?void 0:o.result)==null?void 0:s.length)>0?(d=(c=a==null?void 0:a.data)==null?void 0:c.result)==null?void 0:d.map(p=>{var h;return{id:p==null?void 0:p.id,...(h=p==null?void 0:p.value)==null?void 0:h.pageData}}):[]},dn=async(e,a)=>{var r,n,o,s,c,d,p,h,v,_,U,g,B,D,T,$,M,F,t,m;try{let y,N;const x=(r=pl.value[me.value+Be])==null?void 0:r.filter(L=>{var J;return((J=L==null?void 0:L.key)==null?void 0:J.type)==="structureMethod"}),H=(n=pl.value[me.value+Be])==null?void 0:n.filter(L=>{var J;return((J=L==null?void 0:L.key)==null?void 0:J.type)==="structure"}),f=x==null?void 0:x.find(L=>{var J,Y;return((Y=(J=L==null?void 0:L.value)==null?void 0:J.pageData)==null?void 0:Y.method)==="保存"});if(!f)return;const w=(d=(c=pl.value[(s=(o=f==null?void 0:f.value)==null?void 0:o.pageData)==null?void 0:s.path])==null?void 0:c.filter(L=>{var J;return((J=L==null?void 0:L.key)==null?void 0:J.type)==="data"}))==null?void 0:d.find(L=>{var J,Y,oe,te;return((Y=(J=L==null?void 0:L.value)==null?void 0:J.tableData)==null?void 0:Y.算法名称)===((te=(oe=f==null?void 0:f.value)==null?void 0:oe.pageData)==null?void 0:te.method)});if(!w)return;const S={buttonName:(h=(p=f==null?void 0:f.value)==null?void 0:p.pageData)==null?void 0:h.method,api:(_=(v=w==null?void 0:w.value)==null?void 0:v.tableData)==null?void 0:_.算法体,content:H==null?void 0:H.map(L=>{var J;return(J=L==null?void 0:L.value)==null?void 0:J.pageData}),extraContent:[],extraValues:(g=(U=f==null?void 0:f.value)==null?void 0:U.pageData)==null?void 0:g.data,methodName:(D=(B=f==null?void 0:f.value)==null?void 0:B.pageData)==null?void 0:D.path};if(!e)return;const G={...e,compData:(T=e==null?void 0:e.compData)==null?void 0:T.map(L=>{var J;return(L==null?void 0:L.key)==="formContent"?{...L,contents:(J=L==null?void 0:L.contents)==null?void 0:J.map(Y=>(Y==null?void 0:Y.prop)===a?{...Y,value:""}:Y)}:L})},q={key:{pageKey:me.value+Be,parentTable:"",systemKey:sessionStorage.getItem("systemKey"),type:"structure"},value:{pageData:G}},A=await k.axios.post(S.api,q,{headers:{"Content-Type":"application/json"}});return(($=A==null?void 0:A.data)==null?void 0:$.code)===200&&(y=(F=(M=A==null?void 0:A.data)==null?void 0:M.result)==null?void 0:F.latestReportCode,N=(m=(t=A==null?void 0:A.data)==null?void 0:t.result)==null?void 0:m.status),{newMainKeyValue:y,newStatus:N}}catch(y){throw k.ElMessage.error(y),new Error(y)}},ra=(e,a,r,n)=>{var o;R("contentChange",{contents:(o=e==null?void 0:e.compData)==null?void 0:o.map(s=>{var c;return(s==null?void 0:s.key)==="formContent"?{...s,contents:(c=s==null?void 0:s.contents)==null?void 0:c.map(d=>(d==null?void 0:d.key)===a?{...d,value:r}:Sl.value&&(d==null?void 0:d.prop)===Sl.prop?{...d,value:Sl.value}:d)}:s}),index:e==null?void 0:e.id},n)},Sl=l.reactive({prop:"状态",value:""}),pn=l.ref(["系统自动生成信息","审批意见"]),fn=async(e,a,r)=>{var p,h;let n=e==null?void 0:e[a==null?void 0:a.prop],o=1,s,c;const d=k.cloneDeep(me).value+Be+n;if(d){Sl.value="",s=(p=pl.value[d])==null?void 0:p.filter(U=>{var g;return((g=U==null?void 0:U.key)==null?void 0:g.type)==="structure"});const v=s==null?void 0:s.find(U=>{var g,B,D;return((D=(B=(g=U==null?void 0:U.value)==null?void 0:g.pageData)==null?void 0:B.comp)==null?void 0:D.toUpperCase())==="FORM"});c={...(h=v==null?void 0:v.value)==null?void 0:h.pageData,id:v==null?void 0:v.id};const _=await dn(c,a==null?void 0:a.prop);if(Sl.value=_==null?void 0:_.newStatus,_!=null&&_.newMainKeyValue)return _==null?void 0:_.newMainKeyValue}if(X.value.some(v=>(v==null?void 0:v[a==null?void 0:a.prop])===n)){const v=n;for(;X.value.some(_=>(_==null?void 0:_[a==null?void 0:a.prop])===`${v}(${o})`);)o++;n=`${v}(${o})`}return n},oa=async(e,a,r)=>{var c,d,p,h,v,_,U,g;let n,o;const s=await fn(r==null?void 0:r.data,r==null?void 0:r.firstCol);if(e?(n=k.cloneDeep(me).value+Be+((h=r==null?void 0:r.data)==null?void 0:h[(p=r==null?void 0:r.firstCol)==null?void 0:p.prop]),o=k.cloneDeep(me).value+Be+s):(n=k.cloneDeep(me).value+Be,o=k.cloneDeep(n)+`loading${((c=el.value)==null?void 0:c.account)||((d=el.value)==null?void 0:d.账号)}`),a){const B=(_=(v=pl.value[o])==null?void 0:v.filter(D=>{var T;return((T=D==null?void 0:D.key)==null?void 0:T.parentTable)===""}))==null?void 0:_.map(D=>{var T;return{id:D==null?void 0:D.id,...(T=D==null?void 0:D.value)==null?void 0:T.pageData}});if((B==null?void 0:B.length)>0)if(e){const D=B==null?void 0:B.find(T=>{var $;return(($=T==null?void 0:T.comp)==null?void 0:$.toUpperCase())==="FORM"});D&&ra(D,(U=r==null?void 0:r.firstCol)==null?void 0:U.label,s,me.value)}else xe.setRouteToChildPath(k.cloneDeep(me).value),_e.setActiveMenuPath(o);else if(await ae.loadingConstruct(n,o,null,null,e?pn.value:null),e){const D=await cn(o);if((D==null?void 0:D.length)>0){const T=D==null?void 0:D.find($=>{var M;return((M=$==null?void 0:$.comp)==null?void 0:M.toUpperCase())==="FORM"});T&&ra(T,(g=r==null?void 0:r.firstCol)==null?void 0:g.label,s,me.value)}}else xe.setRouteToChildPath(k.cloneDeep(me).value),_e.setActiveMenuPath(o)}else e?(Ze.value="",je.value=r==null?void 0:r.data,xl(!0,r==null?void 0:r.firstCol,s)):(xe.setRouteToChildPath(k.cloneDeep(me).value),_e.setActiveMenuPath(o))},gn=()=>{ne.value=!1,bl.value=[],Pe.value=!1},Cl=e=>{var c,d,p,h,v,_,U,g,B,D,T,$,M,F;const a=[];let r=[];for(let t in e)Array.isArray(e==null?void 0:e[t])&&r.push(t);Fe.value=k.cloneDeep(z.value),(d=ae.getColumnChild((c=k.cloneDeep(z.value))==null?void 0:c.filter(t=>(t==null?void 0:t.label)!=="操作")))==null||d.forEach((t,m)=>{var y;r.find(N=>N===(t==null?void 0:t.prop))||(t!=null&&t.formType&&((y=t==null?void 0:t.formType)==null?void 0:y.toUpperCase())==="SELECT"||t!=null&&t.menuId?a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",name:(t==null?void 0:t.prop)??"t"+m,prop:t==null?void 0:t.prop,type:"Select",value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??m,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled,optionUrl:{groupSelect:t==null?void 0:t.groupSelect,menuSelect:t==null?void 0:t.formMenuSelect,type:"Select",selectRelateType:t==null?void 0:t.selectRelateType,allSelectionContents:(t==null?void 0:t.allSelectionContents)??[],selectFilter:t==null?void 0:t.selectFilter,menuId:t==null?void 0:t.menuId}}):a.push({label:(t==null?void 0:t.prop)||(t==null?void 0:t.label)||"",prop:t==null?void 0:t.prop,name:(t==null?void 0:t.prop)??"t"+m,type:!(t!=null&&t.formType)||(t==null?void 0:t.formType)===""?"Input":t==null?void 0:t.formType,value:(e==null?void 0:e[t==null?void 0:t.prop])??(t==null?void 0:t.value)??"",id:(t==null?void 0:t.id)??m,contents:(t==null?void 0:t.options)??[],width:1,isFormColHidden:t==null?void 0:t.isFormColHidden,disabled:t==null?void 0:t.disabled}))}),e===""||!e||(Ze.value=(e==null?void 0:e.id)??"");let n=ae.getColumnChild((p=k.cloneDeep(z.value))==null?void 0:p.filter(t=>(t==null?void 0:t.label)!=="操作"));Ve.value&&((h=Ve.value)==null?void 0:h.length)>0&&(Ve.value=(v=k.cloneDeep(Ve).value)==null?void 0:v.map(t=>{var y;let m=(t==null?void 0:t.prop)||((y=n==null?void 0:n.find(N=>(N==null?void 0:N.label)===(t==null?void 0:t.label)))==null?void 0:y.prop);return m&&(t.value=e[m]),t})),Ae.value=Ve.value&&((_=Ve.value)==null?void 0:_.length)>0?ae.getTableFormToForm(Ve.value):a;let o=[],s=(U=i.itemData)==null?void 0:U.filter(t=>(t==null?void 0:t.key)==="filterAllType");if((s==null?void 0:s.length)>0&&(o=(s==null?void 0:s.map(m=>m==null?void 0:m.value)).flat()),(o==null?void 0:o.length)>0){let t=o==null?void 0:o.find(m=>{var y;return(y=m==null?void 0:m.content)==null?void 0:y.includes("@Select")});if(t!=null&&t.content){let m=(D=(B=(g=t==null?void 0:t.content)==null?void 0:g.replace(":",Ye))==null?void 0:B.split(Ye))==null?void 0:D[1];if(((T=m==null?void 0:m.trim())==null?void 0:T.toUpperCase())==="MANUAL"){let y=(M=($=i.itemData)==null?void 0:$.find(N=>(N==null?void 0:N.key)==="contentTableId"))==null?void 0:M.contents;Ae.value=(F=Ae.value)==null?void 0:F.map((N,x)=>{var H,f,w,S,G,q,A,L,J,Y,oe;return(H=N==null?void 0:N.optionUrl)!=null&&H.menuId&&(N.type="Select",(f=N==null?void 0:N.optionUrl)!=null&&f.menuId?(N.optionUrl.menuId=y,N.optionUrl.menuFilter=o,N.optionUrl.multiple=(G=(S=(w=o==null?void 0:o.find(te=>{var C;return(C=te==null?void 0:te.content)==null?void 0:C.includes("@Num")}))==null?void 0:w.content)==null?void 0:S.split(":"))!=null&&G[1]&&parseInt((L=(A=(q=o==null?void 0:o.find(te=>{var C;return(C=te==null?void 0:te.content)==null?void 0:C.includes("@Num")}))==null?void 0:q.content)==null?void 0:A.split(":"))==null?void 0:L[1])>1?!0:void 0,N.optionUrl.multipleLimit=(oe=(Y=(J=o==null?void 0:o.find(te=>{var C;return(C=te==null?void 0:te.content)==null?void 0:C.includes("@Num")}))==null?void 0:J.content)==null?void 0:Y.split(":"))==null?void 0:oe[1]):N.optionUrl={menuId:y,menuFilter:o}),N})}}}},hn=()=>{var a;const e=(a=j.value)==null?void 0:a.$el;e&&ae.Sortable.create(e,{animation:150,handle:".col-drag-icon",ghostClass:"sortable-ghost",onEnd:r=>{var c;const{oldIndex:n,newIndex:o}=r;if(n===o)return;const s=ml.value.splice(n,1)[0];ml.value.splice(o,0,s),z.value=(c=z.value)==null?void 0:c.slice().sort((d,p)=>{if(d.label==="操作")return 1;if(p.label==="操作")return-1;const h=ml.value.findIndex(_=>_.label===d.label),v=ml.value.findIndex(_=>_.label===p.label);return h-v})}})};l.onMounted(()=>{Vl.value=window.innerWidth-240*2});const yn=()=>{l.nextTick(()=>{hn()})},Jl=(e,a)=>{var n;if(!e&&!(e!=null&&e.children))return{contents:e,currentSelectContents:void 0};let r;return e.children=(n=e.children)==null?void 0:n.map(o=>{var s,c;if((o==null?void 0:o.id)===Ze.value){let d={};for(let p in o){let h=(s=a==null?void 0:a.find(v=>(v==null?void 0:v.prop)===p))==null?void 0:s.label;h?d[p]=(c=je.value)==null?void 0:c[h]:d[p]=o[p]}o=Object.assign(d,je.value),r=o}else{let d=Jl(o,a);o=d==null?void 0:d.contents,r=d==null?void 0:d.currentSelectContents}return o}),{contents:e,currentSelectContents:r}},ta=(e,a)=>{let r,n;return e!=null&&e.find(o=>(o==null?void 0:o.id)===Ze.value)?r=e==null?void 0:e.map(o=>{var s,c;if((o==null?void 0:o.id)===Ze.value){let d={};for(let p in o){let h=(s=a==null?void 0:a.find(v=>(v==null?void 0:v.prop)===p))==null?void 0:s.label;h?d[p]=(c=je.value)==null?void 0:c[h]:d[p]=o[p]}o=Object.assign(d,je.value),n=o}return o}):r=e==null?void 0:e.map(o=>{var s,c,d,p;if((o==null?void 0:o.id)===Ze.value){let h={};for(let v in o){let _=(s=a==null?void 0:a.find(U=>(U==null?void 0:U.prop)===v))==null?void 0:s.label;_?h[v]=(c=je.value)==null?void 0:c[_]:h[v]=o[v]}o=Object.assign(h,je.value),n=o}else o=(d=Jl(o,a))==null?void 0:d.contents,n=(p=Jl(o,a))==null?void 0:p.currentSelectContents;return o}),{newContents:r,currentSelectContents:n}},ia=(e,a,r)=>{var n,o;return e[a==null?void 0:a.prop]=r,typeof e.id=="number"&&(e.id=(n=e.id)==null?void 0:n.toString()),e.children&&((o=e.children)==null?void 0:o.length)>0&&(e.children=e.children.map(ia)),e},Wl=e=>{var r;const a=[];return a.push({...e}),e!=null&&e.children&&Array.isArray(e.children)&&((r=e.children)==null||r.forEach(n=>{a.push(...Wl(n))})),(a==null?void 0:a.length)>0?a==null?void 0:a.map(n=>{const o={...n};return delete o.children,o}):[]},xl=(e=!0,a,r)=>{var h,v,_,U,g,B,D,T,$,M,F,t,m,y,N,x,H,f,w,S,G,q,A,L,J,Y,oe,te,C,I;let n=ae.getColumnChild((h=k.cloneDeep(z.value))==null?void 0:h.filter(V=>(V==null?void 0:V.label)!=="操作")),o,s=k.cloneDeep(X.value);if(!je.value){Ie.value=!1;return}if(Ze.value===""){fl.value++;let V;a&&r?V={id:fl.value.toString(),[a==null?void 0:a.prop]:r,children:je.value.children}:V={id:fl.value.toString()},V!=null&&V.children&&(V={...V,children:(v=V.children)==null?void 0:v.map(le=>ia(le,a,r))}),s.push(Object.assign(je.value,V)),o=Object.assign(je.value,V)}else s=(_=ta(s,n))==null?void 0:_.newContents,o=(U=ta(s,n))==null?void 0:U.currentSelectContents;const c=(g=i.itemData)==null?void 0:g.filter(V=>(V==null?void 0:V.key)==="childTree")[0];if(((B=c==null?void 0:c.contents)==null?void 0:B.length)>0){qe.value="编辑";const V=[];s==null||s.forEach((le,ie)=>{var E;let se={};if(Array.isArray(le)){let u=[];le==null||le.filter(de=>!(de!=null&&de.id)).forEach((de,pe)=>{var he,Ce,ye,Ge,He,Qe,we;if((Ce=(he=Re.value)==null?void 0:he[pe])!=null&&Ce.prop&&!Array.isArray(de)){let al={};al[Re.value[pe].column]=de,be!=null&&be.value&&((ye=be==null?void 0:be.value)==null?void 0:ye.length)>0&&((Ge=be==null?void 0:be.value)!=null&&Ge.find(Ue=>JSON.stringify(Ue==null?void 0:Ue[0])===JSON.stringify(al)))&&(u=(He=be==null?void 0:be.value)==null?void 0:He.find(Ue=>JSON.stringify(Ue==null?void 0:Ue[0])===JSON.stringify(al))),u&&u.length>0?se[Re.value[pe].prop]=u!=null&&u.find(Ue=>{var Ke;return((Ke=Object.keys(Ue))==null?void 0:Ke[0])===Re.value[pe].column})?(Qe=u==null?void 0:u.find(Ue=>{var Ke;return((Ke=Object.keys(Ue))==null?void 0:Ke[0])===Re.value[pe].column}))==null?void 0:Qe[Re.value[pe].column]:de:se[Re.value[pe].prop]=de}else Array.isArray(de)&&((we=Re.value[pe])!=null&&we.prop?se[Re.value[pe].prop]=de:se.children=Ql(de,Re.value))})}else se=le;Array.isArray(le)&&le.some(u=>u==null?void 0:u.id)?V.push(Object.assign(se,{id:(E=le==null?void 0:le.find(u=>u.id))==null?void 0:E.id})):se.id?V.push(se):V.push(Object.assign(se,{id:ie.toString()}))}),X.value=pa(V,c,z.value)}else X.value=s;ca(X.value),Ul.value=X.value;const d=In(Ul.value,ll.value,s);let p=[];if(yl.value?(p=(D=k.cloneDeep(yl).value.singleContent)==null?void 0:D.filter(V=>(V==null?void 0:V.id)!==(o==null?void 0:o.id)),p.push(o)):p=[o],Je.value){const V={content:d,singleContent:((T=c==null?void 0:c.contents)==null?void 0:T.length)>0?p==null?void 0:p.flatMap(Wl):p,index:i==null?void 0:i.index,buttonName:"编辑",column:z.value,parentTableId:i==null?void 0:i.parentTableId};xe.setCacheUpdatingData(V)}if(e&&!((F=(M=($=Ae.value)==null?void 0:$[0])==null?void 0:M.optionUrl)!=null&&F.menuId)){let V=(N=(y=(m=(t=i.itemData)==null?void 0:t.find(ie=>(ie==null?void 0:ie.key)==="filterAllType"))==null?void 0:m.value)==null?void 0:y.find(ie=>(ie==null?void 0:ie.value)==="onConditionContents"))==null?void 0:N.content;const le={content:d,singleContent:((x=c==null?void 0:c.contents)==null?void 0:x.length)>0?Wl(o):o,index:i==null?void 0:i.index,buttonName:qe.value,column:z.value,parentTableId:i==null?void 0:i.parentTableId,filter:V,allFilter:(f=(H=i.itemData)==null?void 0:H.find(ie=>(ie==null?void 0:ie.key)==="filterAllType"))==null?void 0:f.value,pathIndex:(S=(w=i.itemData)==null?void 0:w.find(ie=>(ie==null?void 0:ie.key)==="relatedFilter"))==null?void 0:S.index};xe.setTableLoading(i==null?void 0:i.index),Ie.value=!1,je.value=void 0,R("change",le)}if((A=(q=(G=Ae.value)==null?void 0:G[0])==null?void 0:q.optionUrl)!=null&&A.menuId){Ie.value=!1;let V=(L=i.itemData)==null?void 0:L.filter(le=>(le==null?void 0:le.key)==="filterAllType");if((V==null?void 0:V.length)>0){let ie=(oe=(Y=(J=(V==null?void 0:V.map(se=>se==null?void 0:se.value)).flat().find(se=>{var E;return(E=se==null?void 0:se.content)==null?void 0:E.includes("@Num")}))==null?void 0:J.content)==null?void 0:Y.split(":"))==null?void 0:oe[1];ie=parseInt(ie),X.value=(I=X.value)==null?void 0:I.slice(((te=X.value)==null?void 0:te.length)-ie,(C=X.value)==null?void 0:C.length)}}};l.onUnmounted(()=>{z.value=[],X.value=[],Fe.value=[],Ne.value=[],Ve.value=[],tl.value=[],bl.value=[],gl.value=[],Ae.value=[],We.value=[],j.value=null});const sa=async(e,a,r)=>{var h,v,_,U,g,B,D,T,$,M,F;ul.value=r==null?void 0:r.prop;const n=k.cloneDeep(i.itemData),o=n==null?void 0:n.map(t=>{var m;return(t==null?void 0:t.key)==="header"&&((m=t.contents)==null||m.map((y,N)=>{var x,H,f,w,S,G,q,A,L,J,Y,oe,te,C,I,V,le,ie,se;return y.type=y!=null&&y.type?y.type:(w=(f=(H=(x=y==null?void 0:y.key)==null?void 0:x.split("$"))==null?void 0:H[1])==null?void 0:f.split("("))!=null&&w[0]?(G=(S=ae.FormType)==null?void 0:S.find(E=>{var u,de,pe,he;return(E==null?void 0:E.key)===((he=(pe=(de=(u=y==null?void 0:y.key)==null?void 0:u.split("$"))==null?void 0:de[1])==null?void 0:pe.split("("))==null?void 0:he[0])}))==null?void 0:G.value:"Input",y.options=y!=null&&y.options?y.options:((L=(A=(q=y==null?void 0:y.key)==null?void 0:q.split("$"))==null?void 0:A[1])==null?void 0:L.length)>0?(te=(oe=Hl((Y=(J=y==null?void 0:y.key)==null?void 0:J.split("$"))==null?void 0:Y[1]))==null?void 0:oe.split(","))==null?void 0:te.map(E=>({label:E,value:E})):[],(C=y==null?void 0:y.key)!=null&&C.includes("$")&&(y.key=(V=(I=y==null?void 0:y.key)==null?void 0:I.split("$"))==null?void 0:V[0]),y.value=(le=Object.values(a))==null?void 0:le[N],y.optionUrl=y!=null&&y.formMenuSelect&&((ie=y==null?void 0:y.formMenuSelect)==null?void 0:ie.length)>0?{groupSelect:(se=y==null?void 0:y.groupSelect)==null?void 0:se.split(/[::]/).map(E=>E.trim()),menuSelect:y==null?void 0:y.formMenuSelect,selectRelateType:"",type:(y==null?void 0:y.formType)??(y!=null&&y.groupSelect?"Select":"")}:null,y})),t});let s=k.cloneDeep(Ae.value),c=(v=(h=k.cloneDeep(o))==null?void 0:h.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:v.contents;s=s==null?void 0:s.map(t=>{var m;return t.value=(m=c==null?void 0:c.find((y,N)=>N===(t==null?void 0:t.id)))==null?void 0:m.value,t});let d="",p=(g=(U=(_=k.cloneDeep(o))==null?void 0:_.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:U.contents)==null?void 0:g.find((t,m)=>{var y,N,x;return(t==null?void 0:t.label)===ul.value||(m==null?void 0:m.toString())===((x=(N=(y=ul.value)==null?void 0:y.split("a"))==null?void 0:N[1])==null?void 0:x.toString())});if((T=(D=(B=k.cloneDeep(o))==null?void 0:B.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:D.contents)==null||T.forEach(t=>{var m,y,N,x,H;d===""&&((N=(y=(m=t==null?void 0:t.optionUrl)==null?void 0:m.groupSelect)==null?void 0:y[1])!=null&&N.includes("["))&&(d=(H=(x=t==null?void 0:t.optionUrl)==null?void 0:x.groupSelect)==null?void 0:H[1])}),($=p==null?void 0:p.optionUrl)!=null&&$.menuSelect){let t=await Xl(p),m;if(t==null||t.forEach(y=>{var N,x,H,f,w,S,G,q,A,L;d===((x=(N=p==null?void 0:p.optionUrl)==null?void 0:N.groupSelect)==null?void 0:x[1])&&((w=(f=(H=p==null?void 0:p.optionUrl)==null?void 0:H.groupSelect)==null?void 0:f[1])!=null&&w.includes("["))&&((L=k.cloneDeep(y))==null?void 0:L[(A=(q=(G=(S=p==null?void 0:p.optionUrl)==null?void 0:S.groupSelect)==null?void 0:G[1])==null?void 0:q.replaceAll("[",""))==null?void 0:A.replaceAll("]","")])===(p==null?void 0:p.value)&&(m=y)}),m){let y=k.cloneDeep(s);y=y==null?void 0:y.map(x=>{var H,f,w,S,G,q,A,L,J,Y,oe;return(m!=null&&m[x==null?void 0:x.label]||m!=null&&m[(S=(w=(f=(H=x==null?void 0:x.optionUrl)==null?void 0:H.groupSelect)==null?void 0:f[1])==null?void 0:w.replaceAll("[",""))==null?void 0:S.replaceAll("]","")])&&((A=(q=(G=x==null?void 0:x.optionUrl)==null?void 0:G.groupSelect)==null?void 0:q[1])!=null&&A.includes("["))&&(x.value=(m==null?void 0:m[x==null?void 0:x.label])||(m==null?void 0:m[(oe=(Y=(J=(L=x==null?void 0:x.optionUrl)==null?void 0:L.groupSelect)==null?void 0:J[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:oe.replaceAll("]","")])),x}),X.value=(M=k.cloneDeep(X.value))==null?void 0:M.map(x=>{if((x==null?void 0:x.id)===(a==null?void 0:a.id)){const H={};return y==null||y.forEach(f=>{H[f.name]=f.value}),H.id=x==null?void 0:x.id,H}return x});let N=k.cloneDeep(y);N=N==null?void 0:N.map(x=>{var H,f,w,S;return(f=(H=x==null?void 0:x.optionUrl)==null?void 0:H.menuSelect)!=null&&f.some(G=>G==null?void 0:G.includes)&&(x.optionUrl.menuSelect=(S=(w=x==null?void 0:x.optionUrl)==null?void 0:w.menuSelect)==null?void 0:S.map(G=>{var q,A,L,J;if(G!=null&&G.includes("[")){let Y=(A=(q=G==null?void 0:G.replaceAll("[","").replaceAll("]",""))==null?void 0:q.split(":"))==null?void 0:A[1];G=(J=(L=k.cloneDeep(y))==null?void 0:L.find(oe=>(oe==null?void 0:oe.label)===Y))==null?void 0:J.value}return G})),x}),X.value=(F=k.cloneDeep(X.value))==null?void 0:F.map(x=>{if((x==null?void 0:x.id)===(a==null?void 0:a.id)){const H={};return N==null||N.forEach(f=>{H[f.name]=f.value}),H.id=x==null?void 0:x.id,H}return x})}}},vn=async e=>{var _,U,g,B,D,T,$,M,F,t,m,y,N,x,H;if(!e)return;je.value=e;const a=k.cloneDeep(i.itemData);let r=a==null?void 0:a.map(f=>{var w;return(f==null?void 0:f.key)==="header"&&((w=f.contents)==null||w.map((S,G)=>{var q,A,L,J,Y,oe,te,C,I,V,le,ie,se,E,u,de,pe,he,Ce;return S.type=S!=null&&S.type?S.type:(J=(L=(A=(q=S==null?void 0:S.key)==null?void 0:q.split("$"))==null?void 0:A[1])==null?void 0:L.split("("))!=null&&J[0]?(oe=(Y=ae.FormType)==null?void 0:Y.find(ye=>{var Ge,He,Qe,we;return(ye==null?void 0:ye.key)===((we=(Qe=(He=(Ge=S==null?void 0:S.key)==null?void 0:Ge.split("$"))==null?void 0:He[1])==null?void 0:Qe.split("("))==null?void 0:we[0])}))==null?void 0:oe.value:"Input",S.options=S!=null&&S.options?S.options:((I=(C=(te=S==null?void 0:S.key)==null?void 0:te.split("$"))==null?void 0:C[1])==null?void 0:I.length)>0?(se=(ie=Hl((le=(V=S==null?void 0:S.key)==null?void 0:V.split("$"))==null?void 0:le[1]))==null?void 0:ie.split(","))==null?void 0:se.map(ye=>({label:ye,value:ye})):[],(E=S==null?void 0:S.key)!=null&&E.includes("$")&&(S.key=(de=(u=S==null?void 0:S.key)==null?void 0:u.split("$"))==null?void 0:de[0]),S.value=(pe=Object.values(e))==null?void 0:pe[G],S.optionUrl=S!=null&&S.formMenuSelect&&((he=S==null?void 0:S.formMenuSelect)==null?void 0:he.length)>0?{groupSelect:(Ce=S==null?void 0:S.groupSelect)==null?void 0:Ce.split(/[::]/).map(ye=>ye.trim()),menuSelect:S==null?void 0:S.formMenuSelect,selectRelateType:"",type:(S==null?void 0:S.formType)??(S!=null&&S.groupSelect?"Select":"")}:null,S})),f}),n=Ae.value,o=(U=(_=k.cloneDeep(r))==null?void 0:_.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:U.contents;if(o=o==null?void 0:o.filter(f=>(f==null?void 0:f.label)!=="操作"),o.push({label:"操作",type:"operate"}),n=n==null?void 0:n.map(f=>{var w;return f.value=f.value??((w=o==null?void 0:o.find((S,G)=>(S==null?void 0:S.prop)===(f==null?void 0:f.name)))==null?void 0:w.value),f}),!kl.value)return;let s="",c=(D=(B=(g=k.cloneDeep(r))==null?void 0:g.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:B.contents)==null?void 0:D.find((f,w)=>{var S,G,q;return(f==null?void 0:f.label)===ul.value||(w==null?void 0:w.toString())===((q=(G=(S=ul.value)==null?void 0:S.split("a"))==null?void 0:G[1])==null?void 0:q.toString())}),d=(T=c==null?void 0:c.optionUrl)==null?void 0:T.menuSelect,p=!0;(F=(M=($=k.cloneDeep(r))==null?void 0:$.find(f=>(f==null?void 0:f.key)==="header"))==null?void 0:M.contents)==null||F.forEach(f=>{var w,S,G,q,A,L;p&&((G=(S=(w=f==null?void 0:f.optionUrl)==null?void 0:w.groupSelect)==null?void 0:S[1])!=null&&G.includes("["))&&(s=(A=(q=f==null?void 0:f.optionUrl)==null?void 0:q.groupSelect)==null?void 0:A[1],JSON.stringify(d)===JSON.stringify((L=f==null?void 0:f.optionUrl)==null?void 0:L.menuSelect)&&(p=!1))});let h=k.cloneDeep(n);h=h==null?void 0:h.map(f=>{var w,S;return(f==null?void 0:f.type)==="Select"&&((S=(w=f==null?void 0:f.optionUrl)==null?void 0:w.allSelectionContents)==null?void 0:S.length)>0&&(f.optionUrl.contactValue=e),f.value=e==null?void 0:e[f==null?void 0:f.prop],f}),Ae.value=k.cloneDeep(h);let v=(y=(m=(t=Ae.value)==null?void 0:t.find(f=>{var w;return(w=f==null?void 0:f.optionUrl)==null?void 0:w.menuId}))==null?void 0:m.optionUrl)==null?void 0:y.menuId;if((N=c==null?void 0:c.optionUrl)!=null&&N.menuSelect&&kl.value||v){let f=await Xl(c,v),w;if((x=c==null?void 0:c.optionUrl)==null||x.menuSelect,f==null||f.forEach(S=>{var G,q,A,L,J,Y,oe,te,C,I,V,le,ie,se;s===((q=(G=c==null?void 0:c.optionUrl)==null?void 0:G.groupSelect)==null?void 0:q[1])&&((J=(L=(A=c==null?void 0:c.optionUrl)==null?void 0:A.groupSelect)==null?void 0:L[1])!=null&&J.includes("["))&&((I=k.cloneDeep(S))==null?void 0:I[(C=(te=(oe=(Y=c==null?void 0:c.optionUrl)==null?void 0:Y.groupSelect)==null?void 0:oe[1])==null?void 0:te.replaceAll("[",""))==null?void 0:C.replaceAll("]","")])===(c==null?void 0:c.value)&&(w=S),v&&S[(le=(V=Ae.value)==null?void 0:V.find(E=>{var u;return(u=E==null?void 0:E.optionUrl)==null?void 0:u.menuId}))==null?void 0:le.prop]===e[(se=(ie=Ae.value)==null?void 0:ie.find(E=>{var u;return(u=E==null?void 0:E.optionUrl)==null?void 0:u.menuId}))==null?void 0:se.prop]&&(w=S)}),w){let S=k.cloneDeep(n);S=S==null?void 0:S.map(A=>{var L,J,Y,oe,te,C,I,V,le,ie,se,E,u,de,pe,he,Ce;return(w!=null&&w[A==null?void 0:A.label]||w!=null&&w[(oe=(Y=(J=(L=A==null?void 0:A.optionUrl)==null?void 0:L.groupSelect)==null?void 0:J[1])==null?void 0:Y.replaceAll("[",""))==null?void 0:oe.replaceAll("]","")])&&((I=(C=(te=A==null?void 0:A.optionUrl)==null?void 0:te.groupSelect)==null?void 0:C[1])!=null&&I.includes("["))&&(A.value=(w==null?void 0:w[A==null?void 0:A.label])||(w==null?void 0:w[(se=(ie=(le=(V=A==null?void 0:A.optionUrl)==null?void 0:V.groupSelect)==null?void 0:le[1])==null?void 0:ie.replaceAll("[",""))==null?void 0:se.replaceAll("]","")])),v&&(w!=null&&w[A==null?void 0:A.label])?A.value=(w==null?void 0:w[A==null?void 0:A.label])||(w==null?void 0:w[(pe=(de=(u=(E=A==null?void 0:A.optionUrl)==null?void 0:E.groupSelect)==null?void 0:u[1])==null?void 0:de.replaceAll("[",""))==null?void 0:pe.replaceAll("]","")]):A.value=(Ce=(he=Ae.value)==null?void 0:he.find(ye=>(ye==null?void 0:ye.prop)===(A==null?void 0:A.prop)))==null?void 0:Ce.value,A}),Ae.value=k.cloneDeep(S);let G=k.cloneDeep(S);G=G==null?void 0:G.map(A=>{var L,J,Y,oe,te,C;return(J=(L=A==null?void 0:A.optionUrl)==null?void 0:L.menuSelect)!=null&&J.some(I=>I==null?void 0:I.includes("["))&&(A.optionUrl.oldMenuSelect=(oe=(Y=k.cloneDeep(A))==null?void 0:Y.optionUrl)==null?void 0:oe.menuSelect,A.optionUrl.menuSelect=(C=(te=A==null?void 0:A.optionUrl)==null?void 0:te.menuSelect)==null?void 0:C.map(I=>{var V,le,ie,se;if(I!=null&&I.includes("[")){let E=(le=(V=I==null?void 0:I.replaceAll("[","").replaceAll("]",""))==null?void 0:V.split(":"))==null?void 0:le[1];I=(se=(ie=k.cloneDeep(S))==null?void 0:ie.find(u=>(u==null?void 0:u.label)===E))==null?void 0:se.value}return I})),A}),Ae.value=G;let q={};(H=Ae.value)==null||H.forEach(A=>{q[A.prop]=A==null?void 0:A.value}),je.value=q}}kl.value=!1},bn=e=>e?(e==null?void 0:e.toUpperCase())==="INPUT"?"TEXTAREA":e:"TEXTAREA",kn=e=>{var s,c;const a=(c=(s=Ve.value)==null?void 0:s.find(d=>(d==null?void 0:d.label)===(e==null?void 0:e.label)))==null?void 0:c.multiple,r=e==null?void 0:e.prop;if((e==null?void 0:e.formType)!="Select")return;X.value.forEach(d=>{const p=d==null?void 0:d[r];a&&va.isString(p)&&(d[r]=[p]),!a&&!va.isString(p)&&(d[r]="")})},ua=(e,a)=>{var r;return a==null||a.forEach(n=>{e[n==null?void 0:n.prop]=n==null?void 0:n.value}),e.children&&((r=e.children)==null?void 0:r.length)>0&&(e.children=e.children.map(n=>ua(n,a))),e},Gl=e=>{var r,n,o,s,c,d;Cl("");const a=(r=Ae.value)==null?void 0:r.reduce((p,h)=>(p[h.name]=h.value,p),{});if(((n=Object.keys(a))==null?void 0:n.length)>0){je.value=a,Ze.value="",fl.value=(o=X.value)==null?void 0:o.length,gl.value=(s=il.value)==null?void 0:s.filter(h=>(h==null?void 0:h.label)!=="新增");const p=(d=(c=Fe.value)==null?void 0:c.filter(h=>(h==null?void 0:h.label)!=="操作"))==null?void 0:d.map(h=>{var _,U,g;const v=(U=(_=Ve.value)==null?void 0:_.find(B=>(B==null?void 0:B.label)===(h==null?void 0:h.label)))==null?void 0:U.multiple;return kn(h),{...h,contents:(h==null?void 0:h.options)??[],optionUrl:h!=null&&h.formMenuSelect&&((g=h==null?void 0:h.formMenuSelect)==null?void 0:g.length)>0?{groupSelect:h==null?void 0:h.groupSelect,menuSelect:h==null?void 0:h.formMenuSelect,selectRelateType:"",type:h==null?void 0:h.formType,multiple:v}:null}});z.value=p==null?void 0:p.map(h=>ua(h,[{prop:"type",value:"edit"},{prop:"columnType",value:bn(h==null?void 0:h.formType)||(h==null?void 0:h.columnType)}])),e==="createClick"&&xl(!1)}},hl={START:"开始时间",END:"结束时间",HOURS:"工时"},mn=(e,a)=>Number(ae.dayjs(a).diff(ae.dayjs(e),"day",!0).toFixed(1)),ca=e=>{var s;const a=i.itemData,r=(s=a==null?void 0:a.find(c=>(c==null?void 0:c.key)==="header"))==null?void 0:s.contents,n=new Map;return r==null||r.forEach((c,d)=>{const{label:p}=c;n.set(p,d)}),!n.has(hl.START)||!n.has(hl.END)||!n.has(hl.HOURS)?e:e==null?void 0:e.map(c=>{const d=c==null?void 0:c[hl.START],p=c==null?void 0:c[hl.END],h=mn(d,p);return d&&p&&(c[hl.HOURS]=`${h}天`),c})},da=(e,a,r=0)=>{if(r>((a==null?void 0:a.length)??""))return e;const n=a==null?void 0:a[r],o=new Map;for(const c of e){const d=c[n];o.has(d)||o.set(d,[]),o.get(d)&&o.get(d).push(c)}const s=[];for(const[c,d]of o){const[p,...h]=d,v={...p};r+1===((a==null?void 0:a.length)??"")?v.children=d==null?void 0:d.map(_=>(_.level=k.cloneDeep(r)+1,_)).filter((_,U)=>U!==0):h.length>0&&(v.children=da(h,a,r+1)),v.level=r,s.push(v)}return s},pa=(e,a,r)=>{var o;if(!(a!=null&&a.contents)||((o=a==null?void 0:a.contents)==null?void 0:o.length)===0)return e;let n=[];return n=da(e,a==null?void 0:a.contents,0),n},fa=(e,a)=>{var U,g,B,D,T,$,M,F,t,m,y,N,x,H,f,w,S,G,q,A,L,J,Y,oe,te;const r=e==null?void 0:e.filter(C=>(C==null?void 0:C.key)==="header");e==null||e.filter(C=>(C==null?void 0:C.key)==="tableIndexColumn")[0];const n=e==null?void 0:e.filter(C=>(C==null?void 0:C.key)==="childTree")[0];let o=a;const s=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="page"),c=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="rowButton"),d=e==null?void 0:e.find(C=>(C==null?void 0:C.key)==="extraButton"),p=e==null?void 0:e.filter(C=>(C==null?void 0:C.key)==="tableContents"),h=e==null?void 0:e.filter(C=>(C==null?void 0:C.key)==="tableIndex");Ve.value=(g=(U=e==null?void 0:e.filter(C=>(C==null?void 0:C.key)==="tableToForm"))==null?void 0:U[0])==null?void 0:g.contents,Yl.value=(s==null?void 0:s.contents)??!0;let v=[];sl.value===""?v=r==null?void 0:r[0]:v=(r==null?void 0:r.find(C=>(C==null?void 0:C.selectLabel)==="("+sl.value+")"))??(r==null?void 0:r.find(C=>!(C!=null&&C.selectLabel)));let _=[];if(sl.value===""?_=h==null?void 0:h[0]:_=(h==null?void 0:h.find(C=>(C==null?void 0:C.selectLabel)==="("+sl.value+")"))??(h==null?void 0:h.find(C=>!(C!=null&&C.selectLabel))),((B=v==null?void 0:v.contents)==null?void 0:B.length)>0){let C=[];if(v!=null&&v.contents.some(E=>Array.isArray(E)&&(E==null?void 0:E.find(u=>u.children))))ll.value===""?C=(T=(D=ae.getGradeColumns(v==null?void 0:v.contents))==null?void 0:D[0])==null?void 0:T.filter(E=>!Array.isArray(E)):(ll.value.split("-"),C=($=ae.getGradeColumns(v==null?void 0:v.contents))==null?void 0:$[0]);else{let E=v!=null&&v.contents.some(u=>Array.isArray(u))?(M=v==null?void 0:v.contents)==null?void 0:M[0]:v==null?void 0:v.contents;E==null||E.forEach((u,de)=>{var Ce,ye,Ge,He,Qe;let pe="";(ye=(Ce=me.value)==null?void 0:Ce.split("/"))==null||ye.forEach(we=>{var al,Ue,Ke;if(we!==""){let $e=(Ke=(Ue=(al=we==null?void 0:we.split(Be+"updateLoading"))==null?void 0:al[0])==null?void 0:Ue.split(Be+"loading"))==null?void 0:Ke[0];pe=pe===""?pe+$e:pe+"/"+$e}}),pe=pe+Be+(u==null?void 0:u.directiveLabel);const he=(Ge=Ve.value)==null?void 0:Ge.find(we=>(we==null?void 0:we.prop)===(u==null?void 0:u.prop));C.push({label:(u==null?void 0:u.label)??"",prop:(u==null?void 0:u.label)==="操作"?"operate":(u==null?void 0:u.prop)??"a"+de,width:u!=null&&u.width?parseInt(u.width):"",fixed:(u==null?void 0:u.fixed)??void 0,sortable:(u==null?void 0:u.sortable)??!1,filterable:(u==null?void 0:u.filterable)??!1,operable:(u==null?void 0:u.operable)??!1,showSummary:(u==null?void 0:u.showSummary)??!1,align:(u==null?void 0:u.align)??"left",showOverflowTooltip:(u==null?void 0:u.showOverflowTooltip)??!0,isNotDrag:(u==null?void 0:u.isNotDrag)??!1,isEditCol:(u==null?void 0:u.isEditCol)??!1,isOperate:(u==null?void 0:u.isOperate)??!1,id:(u==null?void 0:u.id)??de,type:(u==null?void 0:u.label)==="操作"?"operate":void 0,formType:(u==null?void 0:u.formType)??(u!=null&&u.groupSelect?"Select":""),isTableColHidden:u==null?void 0:u.isTableColHidden,isFormColHidden:u==null?void 0:u.isFormColHidden,disabled:u==null?void 0:u.disabled,options:(u==null?void 0:u.options)??[],value:(u==null?void 0:u.value)??"",formMenuSelect:(u==null?void 0:u.formMenuSelect)??[],isRoute:(u==null?void 0:u.isRoute)??!1,groupSelect:u!=null&&u.groupSelect?(He=u==null?void 0:u.groupSelect)==null?void 0:He.replaceAll('"',"").split(":"):[],isMainKey:(u==null?void 0:u.isMainKey)||(u==null?void 0:u.directiveLabel)==="#isMain",columnType:(he==null?void 0:he.type)||(u==null?void 0:u.columnType)||"TEXTAREA",directiveLabel:u==null?void 0:u.directiveLabel,isExistChild:!!(u!=null&&u.directiveLabel&&!(o!=null&&o[pe])&&!((Qe=u==null?void 0:u.directiveLabel)!=null&&Qe.includes("@"))&&(u==null?void 0:u.directiveLabel)!=="#isMain"),childPath:(u==null?void 0:u.directiveLabel)!=="#isMain"?pe:void 0,allSelectionContents:(u==null?void 0:u.allSelectionContents)??[],selectFilter:u==null?void 0:u.selectFilter,menuId:u==null?void 0:u.menuId})})}z.value=ae.getNewColumnChild(C),Ne.value=ae.getNewColumnChild(C),Q.value=(F=z.value)==null?void 0:F.map(E=>E==null?void 0:E.label),rl.value=(t=z.value)==null?void 0:t.every(E=>E==null?void 0:E.filterable),ce.value=(m=z.value)==null?void 0:m.every(E=>E==null?void 0:E.operable),nl.value=(y=z.value)==null?void 0:y.every(E=>E==null?void 0:E.sortable);let I=(x=(N=ae.getAllLeafNodes(z.value))==null?void 0:N.filter(E=>(E==null?void 0:E.type)!=="operate"))==null?void 0:x.map((E,u)=>({prop:(E==null?void 0:E.prop)??"a"+u,column:E.label}));Re.value=I;let V=[];sl.value===""?V=p==null?void 0:p[0]:V=(p==null?void 0:p.find(E=>(E==null?void 0:E.selectLabel)==="("+sl.value+")"))??(p==null?void 0:p.find(E=>!(E!=null&&E.selectLabel)));let le=Array.isArray((H=V==null?void 0:V.contents)==null?void 0:H[0])&&((f=V==null?void 0:V.contents)!=null&&f[0].every(E=>Array.isArray(E)))?(w=V==null?void 0:V.contents)==null?void 0:w[0]:V==null?void 0:V.contents;_!=null&&_.contents&&((S=_==null?void 0:_.contents)==null?void 0:S.length)!==0&&(le=(G=k.cloneDeep(le))==null?void 0:G.map((E,u)=>{if(!Array.isArray(E)){let de={};for(let pe in E)pe!=="id"&&pe!=="index"&&(de[pe]=E[pe]);E=Object.values(de)}return E}));const ie=!!((q=z.value)!=null&&q.find(E=>E.prop==="index"));le=Sa(le,_==null?void 0:_.contents,ie);const se=[];le==null||le.forEach((E,u)=>{var pe;let de={};if(Array.isArray(E)){let he=[];E==null||E.filter(Ce=>!(Ce!=null&&Ce.id)).forEach((Ce,ye)=>{var Ge,He,Qe,we,al,Ue;if((Ge=I==null?void 0:I[ye])!=null&&Ge.prop&&!Array.isArray(Ce)){let Ke={};Ke[I[ye].column]=Ce,be!=null&&be.value&&((He=be==null?void 0:be.value)==null?void 0:He.length)>0&&((Qe=be==null?void 0:be.value)!=null&&Qe.find($e=>JSON.stringify($e==null?void 0:$e[0])===JSON.stringify(Ke)))&&(he=(we=be==null?void 0:be.value)==null?void 0:we.find($e=>JSON.stringify($e==null?void 0:$e[0])===JSON.stringify(Ke))),he&&he.length>0?de[I[ye].prop]=he!=null&&he.find($e=>{var Dl;return((Dl=Object.keys($e))==null?void 0:Dl[0])===I[ye].column})?(al=he==null?void 0:he.find($e=>{var Dl;return((Dl=Object.keys($e))==null?void 0:Dl[0])===I[ye].column}))==null?void 0:al[I[ye].column]:Ce:de[I[ye].prop]=Ce}else Array.isArray(Ce)&&((Ue=I[ye])!=null&&Ue.prop?de[I[ye].prop]=Ce:de.children=Ql(Ce,I))})}else de=E;Array.isArray(E)&&E.some(he=>he==null?void 0:he.id)?se.push(Object.assign(de,{id:(pe=E==null?void 0:E.find(he=>he.id))==null?void 0:pe.id})):de.id?se.push(de):se.push(Object.assign(de,{id:u.toString()}))}),X.value=pa(se,n,z.value),Bl.value=se,(A=Bl.value)==null||A.forEach(E=>{var u;(u=El.value)==null||u.set(E.id,E)})}else z.value=[],Fe.value=[],X.value=[],Bl.value=[],El.value=new Map;((L=c==null?void 0:c.contents)==null?void 0:L.length)>0?tl.value=c==null?void 0:c.contents:tl.value=[],((J=d==null?void 0:d.contents)==null?void 0:J.length)>0?(gl.value=d==null?void 0:d.contents,il.value=d==null?void 0:d.contents):(gl.value=[],il.value=[]),fl.value=((Y=X==null?void 0:X.value)==null?void 0:Y.length)??0,ca(X.value),Ul.value=X.value,Je.value&&(z.value=(te=(oe=Fe.value)==null?void 0:oe.filter(C=>(C==null?void 0:C.label)!=="操作"))==null?void 0:te.map(C=>{var I;return{...C,type:"edit",optionUrl:C!=null&&C.formMenuSelect&&((I=C==null?void 0:C.formMenuSelect)==null?void 0:I.length)>0?{groupSelect:C==null?void 0:C.groupSelect,menuSelect:C==null?void 0:C.formMenuSelect,selectRelateType:"",type:C==null?void 0:C.formType}:null}}),Gl())};l.watch(()=>[i.itemData,sl.value,Aa.value,ll.value,be==null?void 0:be.value],async()=>{var e,a,r,n,o,s;if((e=i==null?void 0:i.itemData)!=null&&e.find(c=>(c==null?void 0:c.key)==="columnPath")&&!((a=vl.value)!=null&&a.find(c=>{var d,p;return(c==null?void 0:c.key)===((p=(d=i==null?void 0:i.itemData)==null?void 0:d.find(h=>(h==null?void 0:h.key)==="columnPath"))==null?void 0:p.contents)}))){let c=vl.value,d={key:(n=(r=i==null?void 0:i.itemData)==null?void 0:r.find(p=>(p==null?void 0:p.key)==="columnPath"))==null?void 0:n.contents,value:(s=(o=i==null?void 0:i.itemData)==null?void 0:o.find(p=>(p==null?void 0:p.key)==="columnUsingPath"))==null?void 0:s.contents};c!=null&&c.find(p=>(p==null?void 0:p.key)===(d==null?void 0:d.key))?c=c==null?void 0:c.map(p=>((p==null?void 0:p.key)===(d==null?void 0:d.key)&&(p.value=d.value),p)):c.push(d),xe.setTableViewContents(c)}fa(i.itemData,i.allMapContents)},{deep:!0,immediate:!0}),l.watch(()=>i==null?void 0:i.operatingForm,e=>{e!=null&&e.form&&(Cl(e==null?void 0:e.form),qe.value=e==null?void 0:e.dialogTitle,wl.value=!0,Ie.value=!0)},{immediate:!0,deep:!0});const ga=()=>{var e;(e=Se.value)!=null&&e.includes("read")&&(Je.value=!Je.value)},Sn=()=>{Ll.value=!Ll.value};l.watch(()=>{var e;return(e=i==null?void 0:i.config)==null?void 0:e.viewport},e=>{var a;Se.value=e,(e==null?void 0:e.length)===0?Je.value=!1:(e!=null&&e.includes("read")||(Je.value=!0),e!=null&&e.includes("edit")||(Je.value=!1)),fe.value=((a=i==null?void 0:i.config)==null?void 0:a.showIndex)||Je.value},{immediate:!0}),l.watch(()=>Je.value,e=>{var a;e?(Gl("viewChange"),xe.setCacheUpdatingData(null)):(gl.value=il.value,z.value=Ne.value,yl.value&&(xe.setTableLoading(i==null?void 0:i.index),R("change",yl.value))),ee.value=e,fe.value=e||((a=i==null?void 0:i.config)==null?void 0:a.showIndex)},{immediate:!0}),l.watch(()=>{var e;return(e=Il.value)==null?void 0:e.length},e=>{e===0&&(re.currentPage=1)}),l.watch(()=>i==null?void 0:i.compNames,e=>{De.contents=[{label:"列表名",prop:"groupName",name:"列表名",type:"select",value:"",id:0,contents:e||[],width:1}]},{immediate:!0}),l.ref(!1);const Cn=(e,a)=>{var r;Gl("createClick"),a===re.pageSize&&(re.currentPage=Math.ceil(((r=X.value)==null?void 0:r.length)/re.pageSize))},xn=(e,a,r)=>{var n;sa(r,e,a),je.value=k.cloneDeep(e),Ze.value=e==null?void 0:e.id,fl.value=(n=X.value)==null?void 0:n.length,qe.value=typeof(e==null?void 0:e.id)=="string"?"新增":"编辑",xl(!1)},Me=e=>{var p,h,v,_,U,g,B,D,T,$;const{row:a,column:r,item:n,slotData:o}=e;let s=a!=null&&a[r==null?void 0:r.prop]||(a==null?void 0:a[r==null?void 0:r.prop])===0?((h=(p=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:p[0])==null?void 0:h.contents)??((a==null?void 0:a[r==null?void 0:r.prop])===0?"0":a==null?void 0:a[r==null?void 0:r.prop]):((_=(v=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:v[0])==null?void 0:_.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((g=(U=o==null?void 0:o[n==null?void 0:n.prop])==null?void 0:U[0])==null?void 0:g.contents)??(o==null?void 0:o[n==null?void 0:n.prop])??((T=(D=a==null?void 0:a[(B=n==null?void 0:n.child)==null?void 0:B.prop])==null?void 0:D[0])==null?void 0:T.contents)??(a==null?void 0:a[($=n==null?void 0:n.child)==null?void 0:$.prop]),d=Array.isArray(s)&&!(s!=null&&s.every(M=>typeof M=="string"||typeof M=="number"))?"查看":s;return d=Array.isArray(d)?d.join(","):d,d},Dn=e=>{var h,v,_,U,g,B,D,T,$,M;const{row:a,column:r,item:n,slotData:o}=e;let s=a!=null&&a[r==null?void 0:r.prop]?((v=(h=a==null?void 0:a[r==null?void 0:r.prop])==null?void 0:h[0])==null?void 0:v.contents)??(a==null?void 0:a[r==null?void 0:r.prop]):((U=(_=a==null?void 0:a[n==null?void 0:n.prop])==null?void 0:_[0])==null?void 0:U.contents)??(a==null?void 0:a[n==null?void 0:n.prop])??((B=(g=o==null?void 0:o[n==null?void 0:n.prop])==null?void 0:g[0])==null?void 0:B.contents)??(o==null?void 0:o[n==null?void 0:n.prop])??(($=(T=a==null?void 0:a[(D=n==null?void 0:n.child)==null?void 0:D.prop])==null?void 0:T[0])==null?void 0:$.contents)??(a==null?void 0:a[(M=n==null?void 0:n.child)==null?void 0:M.prop]);const d=Array.isArray(s)&&!(s!=null&&s.every(F=>typeof F=="string"||typeof F=="number")),p=Array.isArray(s)&&(s==null?void 0:s.find(F=>F==null?void 0:F.url));return d&&p},Tn=(e,a)=>e.find(r=>Object.values(r).some(n=>n===a));return l.watch(()=>Ta.value,async e=>{if(e){_e.setContentLoading(!0),await l.nextTick();const a=Tn(X.value,e==null?void 0:e.data);if(!a)return _e.setContentLoading(!1);await aa(e==null?void 0:e.data,null,a,{data:e==null?void 0:e.data,isMainKey:!0}),_e.setContentLoading(!1)}},{deep:!0,immediate:!0}),l.watch(()=>i==null?void 0:i.cacheNewData,e=>{var a;e&&(Array.isArray(e)||(e==null?void 0:e.compId)===(i==null?void 0:i.index)&&(X.value=(a=X.value)==null?void 0:a.map(r=>{var n;return(r==null?void 0:r.id)===((n=e==null?void 0:e.data)==null?void 0:n.id)?{...r,id:e==null?void 0:e.resId}:r})))},{immediate:!0,deep:!0}),(e,a)=>{var h,v,_,U;const r=l.resolveComponent("svg-icon"),n=l.resolveComponent("el-popover"),o=l.resolveComponent("el-switch"),s=l.resolveComponent("el-checkbox"),c=l.resolveComponent("el-checkbox-group"),d=l.resolveComponent("el-button"),p=l.resolveComponent("LookComponent");return l.openBlock(),l.createElementBlock("div",lr,[Zl.value?(l.openBlock(),l.createBlock(Xe.ssTable,{id:"excel-table",pageObj:re,showIndex:fe.value,isTree:(h=O.compItem)==null?void 0:h.isTree,summaryInfo:ve,columns:z.value,defaultSort:Te,isCardViewport:Ll.value,checkedColumns:Q.value,key:Kl.value+JSON.stringify(z.value),tableData:Il.value,isEditViewport:Je.value,isShowPagination:Yl.value,isShowEdit:!1,isShowDelete:!1,allowSelect:ee.value,onDbClickRow:Ia,extraButton:gl.value,rowButton:tl.value,cacheExtraButtons:il.value,isClearSelection:((v=We.value)==null?void 0:v.length)===0,onDoCurrentChange:ja,onDoSizeChange:Ma,onContentClick:aa,onRowClick:ln,onSelectChange:qa,onCellChange:xn,onChange:sa,onPreview:ea,onSubmitEditingTable:za,onHandleColEditChange:Va,onHandleColTypeChange:Ka,onClickButton:Pl},l.createSlots({headerButton:l.withCtx(g=>{var B,D;return[O.showHeader?(l.openBlock(),l.createBlock(qn,{key:0,pageLayout:O.pageLayout,lockingPage:l.unref(Nl)===l.unref(me),filterValues:la.value,selectNums:(B=We.value)==null?void 0:B.length,dataNums:(D=X.value)==null?void 0:D.length,compName:O.compName,isDevMode:O.isDevMode,buttons:g.buttons,onButtonClick:a[0]||(a[0]=T=>Pl(T,"",{})),columns:z.value,onFilter:Za,onGetImportData:$a,level:O.level},null,8,["pageLayout","lockingPage","filterValues","selectNums","dataNums","compName","isDevMode","buttons","columns","level"])):l.createCommentVNode("",!0)]}),viewport:l.withCtx(()=>{var g,B,D,T;return[((g=X.value)==null?void 0:g.length)>0&&O.allowOperate?(l.openBlock(),l.createElementBlock("div",rr,[(B=Se.value)!=null&&B.includes("read")&&((D=Se.value)!=null&&D.includes("edit"))&&((T=tl.value)!=null&&T.some($=>($==null?void 0:$.label)==="编辑"))&&!Ll.value&&l.unref(Nl)!==l.unref(me)?(l.openBlock(),l.createElementBlock("span",{key:0,title:"编辑表格",onClick:ga},[l.createVNode(r,{name:"editTable",class:"view-icon"})])):l.createCommentVNode("",!0),l.createElementVNode("span",{title:"卡片视图",onClick:Sn},[l.createVNode(r,{name:"cardViewport",class:"view-icon"})])])):l.createCommentVNode("",!0)]}),rowCreate:l.withCtx(({row:g,index:B})=>[l.createElementVNode("span",{title:"新增",class:"row-create-wrap",onClick:D=>Cn(g,B)},[l.createVNode(r,{name:"rowCreate",style:{width:"10px",height:"10px"}})],8,or)]),operateCol:l.withCtx(()=>[l.createVNode(n,{title:"选择显示列信息",placement:"left-start","popper-class":"menu-operate-popover",trigger:"hover",onShow:yn},{reference:l.withCtx(()=>[l.createElementVNode("span",tr,[l.createVNode(r,{name:"operate",style:{width:"15px",height:"15px",cursor:"pointer"}})])]),default:l.withCtx(()=>[l.createElementVNode("div",ir,[a[11]||(a[11]=l.createElementVNode("div",{class:"group-title"},"表格操作",-1)),l.createVNode(o,{"model-value":nl.value,"active-text":"排序","inactive-text":"",style:{"margin-right":"8px"},onChange:a[2]||(a[2]=g=>ql(g,"sortable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":rl.value,"active-text":"筛选","inactive-text":"",style:{"margin-right":"8px"},onChange:a[3]||(a[3]=g=>ql(g,"filterable"))},null,8,["model-value"]),l.createVNode(o,{"model-value":ce.value,"active-text":"编辑所有表头","inactive-text":"",onChange:a[4]||(a[4]=g=>ql(g,"operable"))},null,8,["model-value"]),a[12]||(a[12]=l.createElementVNode("div",{class:"group-title"},"表格列操作",-1)),l.createVNode(c,{modelValue:Q.value,"onUpdate:modelValue":a[5]||(a[5]=g=>Q.value=g),style:{height:"100%"},min:2,ref_key:"checkboxGroupRef",ref:j},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(ml.value,g=>(l.openBlock(),l.createElementBlock("div",{style:{display:"flex","align-items":"center"},key:g.label},[l.createVNode(s,{value:g.label,style:{width:"100%",marginRight:0}},{default:l.withCtx(()=>[l.createElementVNode("span",{title:g.label,style:{display:"inline-block",width:"250px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},l.toDisplayString(g.label),9,sr)]),_:2},1032,["value"]),l.createVNode(n,{title:"列操作",placement:"left",teleported:!1,trigger:"hover"},{reference:l.withCtx(()=>[l.createVNode(r,{name:"colOperate",style:{width:"15px",height:"15px",cursor:"pointer",color:"grey",position:"absolute",right:"40px"}})]),default:l.withCtx(()=>{var B;return[l.createElementVNode("div",ur,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((B=Object.keys(g))==null?void 0:B.filter(D=>{var T;return(T=ge.value)==null?void 0:T.find($=>($==null?void 0:$.value)===D)}),D=>{var T,$;return l.openBlock(),l.createElementBlock("div",{key:D},[l.createVNode(o,{"model-value":g==null?void 0:g[D],"active-text":($=(T=ge.value)==null?void 0:T.find(M=>(M==null?void 0:M.value)===D))==null?void 0:$.label,onChange:M=>Ja(M,D,g)},null,8,["model-value","active-text","onChange"])])}),128))])]}),_:2},1024),l.createElementVNode("span",cr,[l.createVNode(r,{name:"drag",class:"col-drag-icon",style:{width:"15px",height:"15px"}})])]))),128))]),_:1},8,["modelValue"])])]),_:1})]),content:l.withCtx(g=>{var B,D,T,$,M,F,t,m,y,N,x,H,f,w,S,G,q,A;return[Dn(g)?(l.openBlock(),l.createBlock(n,{key:0,"popper-class":"file-popover",placement:"right",trigger:"hover",effect:"light",width:"auto"},{reference:l.withCtx(()=>[l.createElementVNode("span",dr,l.toDisplayString(Me(g)),1)]),default:l.withCtx(()=>{var L,J;return[l.createElementVNode("div",pr,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList((J=g==null?void 0:g.row)==null?void 0:J[(L=g==null?void 0:g.column)==null?void 0:L.prop],Y=>(l.openBlock(),l.createElementBlock("div",fr,[l.createElementVNode("div",{class:"prop-url",title:Ml(Y),onClick:oe=>Ha(Y)},l.toDisplayString(Ml(Y)),9,gr),l.createElementVNode("div",{class:"prop-download",onClick:oe=>Qa(Y)}," 下载 ",8,hr)]))),256))])]}),_:2},1024)):(l.openBlock(),l.createElementBlock("div",{key:1,style:l.normalizeStyle({color:!Array.isArray(Me(g))&&((D=(B=Me(g))==null?void 0:B.toString())!=null&&D.includes(".txt")||($=(T=Me(g))==null?void 0:T.toString())!=null&&$.includes(".cpt")||(F=(M=Me(g))==null?void 0:M.toString())!=null&&F.includes(".cyd"))?"var(--vertical-menuitem-active-bg)":"",textDecoration:!Array.isArray(Me(g))&&((m=(t=Me(g))==null?void 0:t.toString())!=null&&m.includes(".txt")||(N=(y=Me(g))==null?void 0:y.toString())!=null&&N.includes(".cpt")||(H=(x=Me(g))==null?void 0:x.toString())!=null&&H.includes(".cyd"))?"underline":"",cursor:!Array.isArray(Me(g))&&((w=(f=Me(g))==null?void 0:f.toString())!=null&&w.includes(".txt")||(G=(S=Me(g))==null?void 0:S.toString())!=null&&G.includes(".cpt")||(A=(q=Me(g))==null?void 0:q.toString())!=null&&A.includes(".cyd"))?"pointer":"",marginLeft:(g==null?void 0:g.colIndex)===0?`${((g==null?void 0:g.level)??0)*20}px`:0}),onClick:L=>La(Me(g))},l.toDisplayString(Me(g)===0?"0":Me(g)),13,yr))]}),_:2},[((_=tl.value)==null?void 0:_.length)>0&&l.unref(Nl)!==l.unref(me)?{name:"actions",fn:l.withCtx(({item:g})=>[l.createVNode(n,{title:"",placement:"left-start","popper-class":"menu-operate-popover"},{reference:l.withCtx(()=>[l.createVNode(r,{name:"more",style:{cursor:"pointer",width:"15px",height:"15px"}})]),default:l.withCtx(()=>[l.createElementVNode("div",ar,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(Xa(tl.value,g),(B,D)=>(l.openBlock(),l.createElementBlock("div",{class:"menu-config-item",key:D,onClick:T=>Pl(B==null?void 0:B.label,g,{extra:B})},[l.createElementVNode("div",{style:l.normalizeStyle({color:B==null?void 0:B.textColor}),class:"extra-button-label"},l.toDisplayString(B==null?void 0:B.label),5)],8,nr))),128))])]),_:2},1024)]),key:"0"}:void 0,((U=X.value)==null?void 0:U.length)>0?{name:"batchButton",fn:l.withCtx(g=>[l.withDirectives(l.createVNode(Jn,{lockingPage:l.unref(Nl)===l.unref(me),buttons:g.buttons,selectTableItems:We.value,onButtonClick:a[1]||(a[1]=B=>Pl(B,"",{}))},null,8,["lockingPage","buttons","selectTableItems"]),[[l.vShow,ee.value]]),l.withDirectives(l.createElementVNode("div",null,null,512),[[l.vShow,!ee.value]])]),key:"1"}:void 0]),1032,["pageObj","showIndex","isTree","summaryInfo","columns","defaultSort","isCardViewport","checkedColumns","tableData","isEditViewport","isShowPagination","allowSelect","extraButton","rowButton","cacheExtraButtons","isClearSelection"])):l.createCommentVNode("",!0),l.createVNode(Tl.ssDialog,{title:qe.value,visible:Ie.value,width:wa.value,onBeforeDestroy:Wa,style:{height:"74%"}},{default:l.withCtx(()=>[l.createElementVNode("div",vr,[l.createVNode(Xe.ssForm,{rowContents:Ae.value,isEnableWrap:!1,showOperator:!1,onChange:vn,onClickTrigger:Ga,isEdit:Al.value,onBlurChange:Ra},null,8,["rowContents","isEdit"])])]),footer:l.withCtx(()=>[wl.value?(l.openBlock(),l.createElementBlock("div",br,[l.createVNode(d,{onClick:a[6]||(a[6]=g=>Ie.value=!1),id:"themeBorderButton"},{default:l.withCtx(()=>a[13]||(a[13]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[13]}),l.createVNode(d,{class:"ok-button",onClick:a[7]||(a[7]=g=>xl(!0)),id:"themeButton"},{default:l.withCtx(()=>a[14]||(a[14]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[14]})])):l.createCommentVNode("",!0)]),_:1},8,["title","visible","width"]),l.createVNode(Tl.ssDialog,{title:qe.value,visible:_l.value,width:Vl.value,onBeforeDestroy:a[9]||(a[9]=g=>_l.value=!1)},{default:l.withCtx(()=>[l.createVNode(Xn)]),footer:l.withCtx(()=>[l.createElementVNode("div",kr,[l.createVNode(d,{onClick:a[8]||(a[8]=g=>_l.value=!1),class:"cancel-button",id:"themeBorderButton"},{default:l.withCtx(()=>a[15]||(a[15]=[l.createTextVNode(l.toDisplayString("取消"))])),_:1,__:[15]}),l.createVNode(d,{class:"ok-button",onClick:an,id:"themeButton"},{default:l.withCtx(()=>a[16]||(a[16]=[l.createTextVNode(l.toDisplayString("确认"))])),_:1,__:[16]})])]),_:1},8,["title","visible","width"]),Le.value?(l.openBlock(),l.createBlock(Xe.ssFilePreview,{key:1,fileDataList:dl.value,onDestroy:en},null,8,["fileDataList"])):l.createCommentVNode("",!0),ne.value?(l.openBlock(),l.createBlock(Tl.ssDialog,{key:2,visible:ne.value,onBeforeDestroy:gn,style:{height:"80vh",width:"80vw"},"body-class":"three-dialog-body","footer-class":"three-dialog-footer"},{default:l.withCtx(()=>[l.createVNode(ya.ThreeViewerHost,{files:bl.value,threeData:Oe.value},null,8,["files","threeData"])]),_:1},8,["visible"])):l.createCommentVNode("",!0),l.createVNode(Tl.ssDialog,{visible:e.componentVisible,onBeforeDestroy:a[10]||(a[10]=g=>e.componentVisible=!1),width:Vl.value,style:{height:"70vh"}},{default:l.withCtx(()=>[l.createVNode(p,{dialogItem:cl.value},null,8,["dialogItem"])]),_:1},8,["visible","width"]),l.createVNode(Tl.ssDialog,{title:De.title,visible:De.show,width:De.width,onBeforeDestroy:sn},{default:l.withCtx(()=>[l.createElementVNode("div",mr,[l.createVNode(Xe.ssForm,{rowContents:De==null?void 0:De.contents,formRules:De==null?void 0:De.formRules,showOperator:!1,buttonValue:De.buttonValue,isEdit:Al.value,isStartJustify:!1,isEnableWrap:!1,onOnButtonClick:un},null,8,["rowContents","formRules","buttonValue","isEdit"])])]),_:1},8,["title","visible","width"])])}}},Cr=Fl._export_sfc(Sr,[["__scopeId","data-v-50faaca0"]]);exports.formGetOptions=Hl;exports.getSelectRow=Xl;exports.ssTable=Cr;exports.useFormComp=Da;exports.useFormToTableComp=ka;exports.useUnit=ma;